Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54343
b: refs/heads/master
c: 45ed285
h: refs/heads/master
i:
  54341: 5ed3df7
  54339: 2d752ab
  54335: 602210d
v: v3
  • Loading branch information
Paul Mundt authored and Paul Mundt committed May 7, 2007
1 parent d4514e9 commit cd8626f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc31b80957a14a60513d953cc67a55519a2b09c7
refs/heads/master: 45ed285b54930767937deb0eaf718b1d08c3c475
10 changes: 10 additions & 0 deletions trunk/arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,16 @@ config SH_STORE_QUEUES
Selecting this option will enable an in-kernel API for manipulating
the store queues integrated in the SH-4 processors.

config SPECULATIVE_EXECUTION
bool "Speculative subroutine return"
depends on CPU_SUBTYPE_SH7780 && EXPERIMENTAL
help
This enables support for a speculative instruction fetch for
subroutine return. There are various pitfalls associated with
this, as outlined in the SH7780 hardware manual.

If unsure, say N.

config CPU_HAS_INTEVT
bool

Expand Down
19 changes: 19 additions & 0 deletions trunk/arch/sh/kernel/cpu/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@ __setup("no" __stringify(x), x##_setup);
onchip_setup(fpu);
onchip_setup(dsp);

#ifdef CONFIG_SPECULATIVE_EXECUTION
#define CPUOPM 0xff2f0000
#define CPUOPM_RABD (1 << 5)

static void __init speculative_execution_init(void)
{
/* Clear RABD */
ctrl_outl(ctrl_inl(CPUOPM) & ~CPUOPM_RABD, CPUOPM);

/* Flush the update */
(void)ctrl_inl(CPUOPM);
ctrl_barrier();
}
#else
#define speculative_execution_init() do { } while (0)
#endif

/*
* Generic first-level cache init
*/
Expand Down Expand Up @@ -261,4 +278,6 @@ asmlinkage void __init sh_cpu_init(void)
*/
ubc_wakeup();
#endif

speculative_execution_init();
}

0 comments on commit cd8626f

Please sign in to comment.