mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 17:03:47 -04:00
staging: zcache: fix ppc64 and other arches where PAGE_SIZE!=4K
Replace raw constant 12 with PAGE_SHIFT to fix non-x86 arches and provoke build failure if PAGE_SHIFT is too big Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c4048c641a
commit
e49ee36d24
@@ -103,8 +103,8 @@ struct zbudpage {
|
||||
struct {
|
||||
unsigned long space_for_flags;
|
||||
struct {
|
||||
unsigned zbud0_size:12;
|
||||
unsigned zbud1_size:12;
|
||||
unsigned zbud0_size: PAGE_SHIFT;
|
||||
unsigned zbud1_size: PAGE_SHIFT;
|
||||
unsigned unevictable:2;
|
||||
};
|
||||
struct list_head budlist;
|
||||
@@ -112,6 +112,9 @@ struct zbudpage {
|
||||
};
|
||||
};
|
||||
};
|
||||
#if (PAGE_SHIFT * 2) + 2 > BITS_PER_LONG
|
||||
#error "zbud won't work for this arch, PAGE_SIZE is too large"
|
||||
#endif
|
||||
|
||||
struct zbudref {
|
||||
union {
|
||||
|
||||
Reference in New Issue
Block a user