lkml.org 
[lkml]   [2010]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 02/23] lmb: Prepare x86 to use lmb to replace early_res
    Date
    1. expose lmb_debug
    2. expose lmb_reserved_init_regions

    -v2: drop lmb_add_region() and LMB_ERROR export
    -v3: seperate wrong return of lmb_fin_base to another patch
    -v4: expose lmb_can_resize to handle x86 EFI that could have more than
    128 entries
    -v5: add lmb_dbg, so we can spare some if (lmb_debug) suggested by Ingo.

    Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    ---
    include/linux/lmb.h | 6 ++++++
    lib/lmb.c | 5 +++--
    2 files changed, 9 insertions(+), 2 deletions(-)

    diff --git a/include/linux/lmb.h b/include/linux/lmb.h
    index 6f8c4bd..5124fca 100644
    --- a/include/linux/lmb.h
    +++ b/include/linux/lmb.h
    @@ -39,6 +39,12 @@ struct lmb {
    };

    extern struct lmb lmb;
    +extern int lmb_debug;
    +extern int lmb_can_resize;
    +extern struct lmb_region lmb_reserved_init_regions[];
    +
    +#define lmb_dbg(fmt, ...) \
    + if (lmb_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)

    extern void __init lmb_init(void);
    extern void __init lmb_analyze(void);
    diff --git a/lib/lmb.c b/lib/lmb.c
    index 13d1a04..bbdb1ec 100644
    --- a/lib/lmb.c
    +++ b/lib/lmb.c
    @@ -22,9 +22,10 @@

    struct lmb lmb;

    -static int lmb_debug, lmb_can_resize;
    +int lmb_debug;
    +int lmb_can_resize;
    static struct lmb_region lmb_memory_init_regions[INIT_LMB_REGIONS + 1];
    -static struct lmb_region lmb_reserved_init_regions[INIT_LMB_REGIONS + 1];
    +struct lmb_region lmb_reserved_init_regions[INIT_LMB_REGIONS + 1];

    #define LMB_ERROR (~(phys_addr_t)0)

    --
    1.6.4.2


    \
     
     \ /
      Last update: 2010-07-04 09:05    [W:0.020 / U:0.384 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site