diff options
author | Helge Deller <deller@gmx.de> | 2022-05-08 19:55:13 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-05-08 20:13:36 +0200 |
commit | ba0c04104082ca211e108dd8eec6db2ad7676528 (patch) | |
tree | 1f54a610cc57679d051ce8822bfdde1a28b10bf7 /arch | |
parent | 340233dcc0160aafcce46ca893d1679f16acf409 (diff) | |
download | linux-stable-ba0c04104082ca211e108dd8eec6db2ad7676528.tar.gz linux-stable-ba0c04104082ca211e108dd8eec6db2ad7676528.tar.bz2 linux-stable-ba0c04104082ca211e108dd8eec6db2ad7676528.zip |
Revert "parisc: Increase parisc_cache_flush_threshold setting"
This reverts commit a58e9d0984e8dad53f17ec73ae3c1cc7f8d88151.
Triggers segfaults with 32-bit kernels on PA8500 machines.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/parisc/kernel/cache.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index 23348199f3f8..e7911225a4f8 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c @@ -403,7 +403,7 @@ void __init parisc_setup_cache_timing(void) { unsigned long rangetime, alltime; unsigned long size; - unsigned long threshold, threshold2; + unsigned long threshold; alltime = mfctl(16); flush_data_cache(); @@ -418,20 +418,8 @@ void __init parisc_setup_cache_timing(void) alltime, size, rangetime); threshold = L1_CACHE_ALIGN(size * alltime / rangetime); - - /* - * The threshold computed above isn't very reliable since the - * flush times depend greatly on the percentage of dirty lines - * in the flush range. Further, the whole cache time doesn't - * include the time to refill lines that aren't in the mm/vma - * being flushed. By timing glibc build and checks on mako cpus, - * the following formula seems to work reasonably well. The - * value from the timing calculation is too small, and increases - * build and check times by almost a factor two. - */ - threshold2 = cache_info.dc_size * num_online_cpus(); - if (threshold2 > threshold) - threshold = threshold2; + if (threshold > cache_info.dc_size) + threshold = cache_info.dc_size; if (threshold) parisc_cache_flush_threshold = threshold; printk(KERN_INFO "Cache flush threshold set to %lu KiB\n", |