summaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/init.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2015-01-14 17:51:17 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-01-22 12:15:59 +0100
commit1f6b83e5e4d3aed46eac1d219322fba9c7341cd8 (patch)
treea7839cd769ec8637746d5e20a7eb7117373caaf0 /arch/s390/mm/init.c
parentf8b2dcbd9e6d1479b9b5a9e9e78bbaf783bde819 (diff)
downloadlinux-1f6b83e5e4d3aed46eac1d219322fba9c7341cd8.tar.gz
linux-1f6b83e5e4d3aed46eac1d219322fba9c7341cd8.tar.bz2
linux-1f6b83e5e4d3aed46eac1d219322fba9c7341cd8.zip
s390: avoid z13 cache aliasing
Avoid cache aliasing on z13 by aligning shared objects to multiples of 512K. The virtual addresses of a page from a shared file needs to have identical bits in the range 2^12 to 2^18. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm/init.c')
-rw-r--r--arch/s390/mm/init.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index c7235e01fd67..d35b15113b17 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -71,13 +71,16 @@ static void __init setup_zero_pages(void)
break;
case 0x2827: /* zEC12 */
case 0x2828: /* zEC12 */
- default:
order = 5;
break;
+ case 0x2964: /* z13 */
+ default:
+ order = 7;
+ break;
}
/* Limit number of empty zero pages for small memory sizes */
- if (order > 2 && totalram_pages <= 16384)
- order = 2;
+ while (order > 2 && (totalram_pages >> 10) < (1UL << order))
+ order--;
empty_zero_page = __get_free_pages(GFP_KERNEL | __GFP_ZERO, order);
if (!empty_zero_page)