about arm_add_memory
Dave Hylands
dhylands at gmail.com
Sun Jan 16 13:39:15 EST 2011
Hi,
2011/1/11 wangjun <wj_nwpu at 163.com>:
> in /arch/arm/kernel/setup.c
>
> static int __init arm_add_memory(unsigned long start, unsigned long size)
> ...
> size -= start & ~PAGE_MASK;
> bank->start = PAGE_ALIGN(start);
> bank->size = size & PAGE_MASK;
> bank->node = PHYS_TO_NID(start);
> .....
>
> what size -= start & ~PAGE_MASK to do ?
If you passed in a non-aligned start address, then this adjusts the
size by the same amount as bank->start = PAGE_ALIGN(start) will adjust
the start address.
Dave Hylands
More information about the linux-arm-kernel
mailing list