diff options
Diffstat (limited to 'litmus/cache_proc.c')
-rw-r--r-- | litmus/cache_proc.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/litmus/cache_proc.c b/litmus/cache_proc.c index 2f308142d2da..01350294afaf 100644 --- a/litmus/cache_proc.c +++ b/litmus/cache_proc.c | |||
@@ -410,7 +410,9 @@ void do_partition(enum crit_level lv, int cpu) | |||
410 | 410 | ||
411 | } | 411 | } |
412 | barrier(); | 412 | barrier(); |
413 | cache_lockdown(regs, cpu); | 413 | //cache_lockdown(regs, cpu); |
414 | writel_relaxed(regs, cache_base + L2X0_LOCKDOWN_WAY_D_BASE + cpu * L2X0_LOCKDOWN_STRIDE); | ||
415 | writel_relaxed(regs, cache_base + L2X0_LOCKDOWN_WAY_I_BASE + cpu * L2X0_LOCKDOWN_STRIDE); | ||
414 | barrier(); | 416 | barrier(); |
415 | 417 | ||
416 | raw_spin_unlock_irqrestore(&cache_lock, flags); | 418 | raw_spin_unlock_irqrestore(&cache_lock, flags); |
@@ -418,6 +420,25 @@ void do_partition(enum crit_level lv, int cpu) | |||
418 | flush_cache(0); | 420 | flush_cache(0); |
419 | } | 421 | } |
420 | 422 | ||
423 | void lock_cache(int cpu, u32 val) | ||
424 | { | ||
425 | unsigned long flags; | ||
426 | |||
427 | local_irq_save(flags); | ||
428 | if (val != 0xffffffff) { | ||
429 | writel_relaxed(val, cache_base + L2X0_LOCKDOWN_WAY_D_BASE + | ||
430 | cpu * L2X0_LOCKDOWN_STRIDE); | ||
431 | writel_relaxed(val, cache_base + L2X0_LOCKDOWN_WAY_I_BASE + | ||
432 | cpu * L2X0_LOCKDOWN_STRIDE); | ||
433 | } | ||
434 | else { | ||
435 | int i; | ||
436 | for (i = 0; i < 4; i++) | ||
437 | do_partition(CRIT_LEVEL_A, i); | ||
438 | } | ||
439 | local_irq_restore(flags); | ||
440 | } | ||
441 | |||
421 | int use_part_proc_handler(struct ctl_table *table, int write, void __user *buffer, | 442 | int use_part_proc_handler(struct ctl_table *table, int write, void __user *buffer, |
422 | size_t *lenp, loff_t *ppos) | 443 | size_t *lenp, loff_t *ppos) |
423 | { | 444 | { |