@@ -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;
@@ -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;
@@ -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
{
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 <deller@gmx.de> --- arch/parisc/kernel/cache.c | 2 +- include/linux/sysctl.h | 1 + kernel/sysctl.c | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) -- 2.34.1