diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2008-10-29 08:33:34 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-10-30 10:44:34 -0400 |
commit | 558ce12494e9e0321b77b9f1ef62c16d0b893cf5 (patch) | |
tree | b8ebd80ade7f49e43aed728766cb85691aecdf2e /arch/mips/kernel/cpu-probe.c | |
parent | ba3049ed4086737dab200b6087138a4b8e06915d (diff) |
MIPS: Probe for watch registers on cores of all vendors, not just MTI.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: David Daney <ddaney@caviumnetworks.com>
Diffstat (limited to 'arch/mips/kernel/cpu-probe.c')
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 0cf15457ecac..41a1d07b4750 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -652,21 +652,24 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c) | |||
652 | 652 | ||
653 | static void __cpuinit decode_configs(struct cpuinfo_mips *c) | 653 | static void __cpuinit decode_configs(struct cpuinfo_mips *c) |
654 | { | 654 | { |
655 | int ok; | ||
656 | |||
655 | /* MIPS32 or MIPS64 compliant CPU. */ | 657 | /* MIPS32 or MIPS64 compliant CPU. */ |
656 | c->options = MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER | | 658 | c->options = MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER | |
657 | MIPS_CPU_DIVEC | MIPS_CPU_LLSC | MIPS_CPU_MCHECK; | 659 | MIPS_CPU_DIVEC | MIPS_CPU_LLSC | MIPS_CPU_MCHECK; |
658 | 660 | ||
659 | c->scache.flags = MIPS_CACHE_NOT_PRESENT; | 661 | c->scache.flags = MIPS_CACHE_NOT_PRESENT; |
660 | 662 | ||
661 | /* Read Config registers. */ | 663 | ok = decode_config0(c); /* Read Config registers. */ |
662 | if (!decode_config0(c)) | 664 | BUG_ON(!ok); /* Arch spec violation! */ |
663 | return; /* actually worth a panic() */ | 665 | if (ok) |
664 | if (!decode_config1(c)) | 666 | ok = decode_config1(c); |
665 | return; | 667 | if (ok) |
666 | if (!decode_config2(c)) | 668 | ok = decode_config2(c); |
667 | return; | 669 | if (ok) |
668 | if (!decode_config3(c)) | 670 | ok = decode_config3(c); |
669 | return; | 671 | |
672 | mips_probe_watch_registers(c); | ||
670 | } | 673 | } |
671 | 674 | ||
672 | #ifdef CONFIG_CPU_MIPSR2 | 675 | #ifdef CONFIG_CPU_MIPSR2 |
@@ -678,7 +681,6 @@ static inline void spram_config(void) {} | |||
678 | static inline void cpu_probe_mips(struct cpuinfo_mips *c) | 681 | static inline void cpu_probe_mips(struct cpuinfo_mips *c) |
679 | { | 682 | { |
680 | decode_configs(c); | 683 | decode_configs(c); |
681 | mips_probe_watch_registers(c); | ||
682 | switch (c->processor_id & 0xff00) { | 684 | switch (c->processor_id & 0xff00) { |
683 | case PRID_IMP_4KC: | 685 | case PRID_IMP_4KC: |
684 | c->cputype = CPU_4KC; | 686 | c->cputype = CPU_4KC; |