Skip to content

Commit

Permalink
MIPS: Allow CPU specific overriding of CP0 hwrena impl bits.
Browse files Browse the repository at this point in the history
Some CPUs have implementation dependent rdhwr registers.  Allow them
to be enabled on a per CPU basis.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
David Daney authored and Ralf Baechle committed Jun 17, 2009
1 parent 9cffd15 commit fbeda19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions arch/mips/include/asm/cpu-features.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,8 @@
#define cpu_scache_line_size() cpu_data[0].scache.linesz
#endif

#ifndef cpu_hwrena_impl_bits
#define cpu_hwrena_impl_bits 0
#endif

#endif /* __ASM_CPU_FEATURES_H */
2 changes: 1 addition & 1 deletion arch/mips/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@ void __cpuinit per_cpu_trap_init(void)
status_set);

if (cpu_has_mips_r2) {
unsigned int enable = 0x0000000f;
unsigned int enable = 0x0000000f | cpu_hwrena_impl_bits;

if (!noulri && cpu_has_userlocal)
enable |= (1 << 29);
Expand Down

0 comments on commit fbeda19

Please sign in to comment.