diff options
author | Dan Magenheimer <dan.magenheimer@oracle.com> | 2013-01-23 13:46:30 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 11:26:26 -0800 |
commit | e49ee36d2477e405da1fe0e6efbf4c122df3b300 (patch) | |
tree | c951f89690077925c5e03f7939fa0255c3dd6a49 /drivers/staging/zcache | |
parent | c4048c641ad7769e4197ff114eaab01f4662cbca (diff) | |
download | op-kernel-dev-e49ee36d2477e405da1fe0e6efbf4c122df3b300.zip op-kernel-dev-e49ee36d2477e405da1fe0e6efbf4c122df3b300.tar.gz |
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>
Diffstat (limited to 'drivers/staging/zcache')
-rw-r--r-- | drivers/staging/zcache/zbud.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/zcache/zbud.c b/drivers/staging/zcache/zbud.c index a7c4361..6835fab 100644 --- a/drivers/staging/zcache/zbud.c +++ b/drivers/staging/zcache/zbud.c @@ -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 { |