On Mon, Aug 28, 2006 at 05:22:00PM -0400, Don Zickus wrote:
> I was rummaging through the code and noticed
>
> {kexec-tools}../kexec-tools-1.101>grep -r PAGE_SIZE *
>
> kexec/arch/ppc/kexec-dol-ppc.c:#define PAGE_SIZE (1UL <<
> PAGE_SHIFT)
> kexec/arch/ppc/kexec-dol-ppc.c:#define PAGE_ALIGN(addr) (((addr) +
> PAGE_SIZE - 1) & PAGE_MASK)
> kexec/arch/ppc64/crashdump-ppc64.c: base = _ALIGN_DOWN(base,
> PAGE_SIZE);
> kexec/arch/ppc64/crashdump-ppc64.c: end = _ALIGN_UP(end, PAGE_SIZE);
> kexec/arch/ppc64/crashdump-ppc64.h:#ifndef PAGE_SIZE
> kexec/arch/ppc64/crashdump-ppc64.h:#define PAGE_SIZE 4096
> kexec/arch/i386/kexec-multiboot-x86.c: PAGE_SIZE,
> 0, 0xffffffffUL, 1);
>
> If I convert these PAGE_SIZE macros to getpagesize() syscalls, will that
> cause issues on these platforms? My main concern is if these usages are
> for setting up memory on the second kernel or not (where getpagesize()
> becomes useless).
Can't think of chaning these to using getpagesize(). Anyway we don't
run kexec at all in second kernel's context. (Kdump usage).
>
> The reason for me doing this is I am trying to use the newly exported
> kernel header files. PAGE_SIZE in those files is no longer exported (and
> rightfully so), which can cause some compiler errors. In addition, I am
> working on machines where 4K pages is not the default. On ppc64, for
> example 64K is very useful for database servers.
Makes sense. ppc64 will be broken if we hardcode PAGE_SIZE. We should
change it to getpagesize().
Thanks
Vivek
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot