lkml.org 
[lkml]   [2012]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v7 26/27] x86: add Crash kernel low reservation
    From
    On Wed, Dec 19, 2012 at 9:22 AM, Borislav Petkov <bp@alien8.de> wrote:
    > On Mon, Dec 17, 2012 at 11:15:58PM -0800, Yinghai Lu wrote:
    >> +static u64 __init get_mem_size(unsigned long limit_pfn)
    >> +{
    >> + int i;
    >> + u64 pages = 0;
    >> + unsigned long start_pfn, end_pfn;
    >> +
    >> + for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL) {
    >> + start_pfn = min_t(unsigned long, start_pfn, limit_pfn);
    >> + end_pfn = min_t(unsigned long, end_pfn, limit_pfn);
    >> + pages += end_pfn - start_pfn;
    >> + }
    >> +
    >> + return pages << PAGE_SHIFT;
    >> +}
    >
    > This needs an empty function prototype for the .config variant where both
    >
    > # CONFIG_BLK_DEV_INITRD is not set
    > # CONFIG_KEXEC is not set
    >
    > otherwise:
    >
    > arch/x86/kernel/setup.c:295:19: warning: ‘get_mem_size’ defined but not used [-Wunused-function]
    >
    > At a second glance though, a better fix might be if that whole
    > if-deffery in setup.c could be cleaned up a bit.
    >

    ok, will move the function into e820.c or memblock.c

    Thanks

    Yinghai
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2012-12-19 19:01    [W:4.077 / U:0.420 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site