parisc: Add sysctl entry for parisc_cache_flush_threshold
Subsystems (2)
Helge Deller
maintainerPATCH 1/1 parisc: Add sysctl entry for parisc_cache_flush_threshold
Add the sysctl entry /proc/sys/kernel/cache_flush_threshold which allows the user to modify the threshold above which the kernel will flush all CPU caches, instead of manually flushing only specific memory areas.
Signed-off-by Helge Deller <[email protected]>
--- arch/parisc/kernel/cache.c | 2 +- include/linux/sysctl.h | 1 + kernel/sysctl.c | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-)
arch/parisc/kernel/cache.c +1 -1
@@ -379,7 +379,7 @@ EXPORT_SYMBOL(flush_data_cache_local);EXPORT_SYMBOL (flush_kernel_icache_range_asm);#define FLUSH_THRESHOLD 0x80000/* 0.5MB */ -static unsigned long parisc_cache_flush_threshold__ro_after_init =FLUSH_THRESHOLD ; +unsigned long parisc_cache_flush_threshold =FLUSH_THRESHOLD ;#define FLUSH_TLB_THRESHOLD (16*1024)/* 16 KiB minimum TLB threshold */ static unsigned long parisc_tlb_flush_threshold__ro_after_init = ~0UL ;
include/linux/sysctl.h +1 -0
@@ -243,6 +243,7 @@ int do_proc_douintvec(struct ctl_table *table, int write, void *data);extern int pwrsw_enabled; +extern unsigned long parisc_cache_flush_threshold;extern int unaligned_enabled;extern int unaligned_dump_stack;extern int no_unaligned_warning;
kernel/sysctl.c +7 -0
@@ -1889,6 +1889,13 @@ static struct ctl_table kern_table[] = { .mode = 0644, .proc_handler = proc_dointvec, }, + { + .procname = "cache_flush_threshold", + .data = &parisc_cache_flush_threshold, + .maxlen = sizeof (unsigned long), + .mode = 0644, + .proc_handler = proc_doulongvec_minmax, + },#endif #ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW {
--
2.34.1