[PATCH 1/2] ppc64: fix read/write on large /dev/nvram

Paul Mackerras paulus at samba.org
Tue Jun 28 19:36:22 EST 2005


Arnd Bergmann writes:

> For large nvram devices on ppc64, reading and writing fails because
> of oversized arguments to kmalloc. 
> This patch makes the driver use __get_free_page instead of kmalloc
> and sanitizes error handling while touching the functions.

Hmmm, I'm not sure that always using __get_free_page even for small
reads is necessarily a good idea.  If we are just limiting the size of
the read or write to PAGE_SIZE we might as well just limit the count
to PAGE_SIZE and continue to use kmalloc.  I think that we should
probably limit the buffer size but then loop around until the whole
user request is satisfied.

Regards,
Paul.



More information about the Linuxppc64-dev mailing list