Re: [PATCH v7 26/27] x86: add Crash kernel low reservation

From: Yinghai Lu
Date: Wed Dec 19 2012 - 12:36:26 EST


On Wed, Dec 19, 2012 at 9:22 AM, Borislav Petkov <bp@xxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/