Vivek Goyal <[EMAIL PROTECTED]> writes:

> On Mon, Aug 28, 2006 at 05:33:09PM -0400, Vivek Goyal wrote:
>> 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().
>
> Sorry garbeled the response string. What I meant is that can't think of 
> any issues if we change those to using getpagesize().

Agreed.  It will probably take an eyeball in each location to make certain
we don't have silly dependencies on PAGE_SIZE being a constant and things
like that but we should be ok.  As long as the user space program uses
a page size greater or equal to what the kernel uses we should be in good
shape.

The fact you did more is because the code is generally careful, and only
on the outlying bits are there bugs.

Eric
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to