Allocate natural alignment with get_cont_pages()
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 23 Nov 2016 17:08:41 +0000 (12:08 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 29 Nov 2016 16:27:40 +0000 (11:27 -0500)
commit224ac4ac8d9a8bd220609dd1363c91d01e3deba6
tree0c1528c8e7e70cfb9f693faae6738205698fe597
parent57b4356f1ca18ad7f331b6a9fc5b39fd128d15a2
Allocate natural alignment with get_cont_pages()

Linux code, notoriously the bnx2x driver, occasionally needs naturally
aligned contiguous page allocations.  Since the only code using
get_cont_pages() is Linux code, we can just use xalloc and get the
alignment they want.  Note that xalloc() is less efficient than the regular
allocations, due mostly to bypassing the arena's qcaches.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/net/udrvr/compat.h
kern/include/linux_compat.h
kern/src/page_alloc.c