MIPS: Add 1074K CPU support explicitly.
authorSteven J. Hill <Steven.Hill@imgtec.com>
Fri, 17 Jan 2014 21:03:50 +0000 (15:03 -0600)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 6 Mar 2014 20:25:21 +0000 (21:25 +0100)
The 1074K is a multiprocessing coherent processing system (CPS) based
on modified 74K cores. This patch makes the 1074K an actual unique
CPU type, instead of a 74K derivative, which it is not.

Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Reviewed-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6389/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 files changed:
arch/mips/bcm47xx/setup.c
arch/mips/include/asm/cpu.h
arch/mips/kernel/cpu-probe.c
arch/mips/kernel/idle.c
arch/mips/kernel/perf_event_mipsxx.c
arch/mips/kernel/spram.c
arch/mips/kernel/traps.c
arch/mips/mm/c-r4k.c
arch/mips/mm/sc-mips.c
arch/mips/mm/tlbex.c
arch/mips/oprofile/common.c
arch/mips/oprofile/op_model_mipsxx.c

index 025be218ea1518bebfac47c2ec2cef514fff4e83..b847d037344340b292d05c78de45aefeee27b89c 100644 (file)
@@ -212,7 +212,7 @@ void __init plat_mem_setup(void)
 {
        struct cpuinfo_mips *c = &current_cpu_data;
 
-       if (c->cputype == CPU_74K) {
+       if ((c->cputype == CPU_74K) || (c->cputype == CPU_1074K)) {
                printk(KERN_INFO "bcm47xx: using bcma bus\n");
 #ifdef CONFIG_BCM47XX_BCMA
                bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA;
index 76411df3d971efee351615d05824cbfa3be72a85..559c668f7e5c42a8b1ecfec7eade2c452366e055 100644 (file)
@@ -296,7 +296,7 @@ enum cpu_type_enum {
        CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_1004K, CPU_74K,
        CPU_ALCHEMY, CPU_PR4450, CPU_BMIPS32, CPU_BMIPS3300, CPU_BMIPS4350,
        CPU_BMIPS4380, CPU_BMIPS5000, CPU_JZRISC, CPU_LOONGSON1, CPU_M14KC,
-       CPU_M14KEC, CPU_INTERAPTIV, CPU_PROAPTIV,
+       CPU_M14KEC, CPU_INTERAPTIV, CPU_PROAPTIV, CPU_1074K,
 
        /*
         * MIPS64 class processors
index 530f832de02c20165c6d36a6a63f5db8b2603f99..ac09248b7468ead96a7431e381ee6f70f07b65cb 100644 (file)
@@ -806,7 +806,7 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu)
                __cpu_name[cpu] = "MIPS 1004Kc";
                break;
        case PRID_IMP_1074K:
-               c->cputype = CPU_74K;
+               c->cputype = CPU_1074K;
                __cpu_name[cpu] = "MIPS 1074Kc";
                break;
        case PRID_IMP_INTERAPTIV_UP:
index 3553243bf9d660f0f7ec69941462990ac7ee55b7..c1fd0bc7a31558d724cdde34eb650c14775dc1eb 100644 (file)
@@ -184,6 +184,7 @@ void __init check_wait(void)
        case CPU_24K:
        case CPU_34K:
        case CPU_1004K:
+       case CPU_1074K:
        case CPU_INTERAPTIV:
        case CPU_PROAPTIV:
                cpu_wait = r4k_wait;
index 24cdf64789c39dcf8be4a4c214b02540aa02370b..17594b81a5d2ed76a7bb87a1237e38ec5248246d 100644 (file)
@@ -1442,6 +1442,7 @@ static const struct mips_perf_event *mipsxx_pmu_map_raw_event(u64 config)
 #endif
                break;
        case CPU_74K:
+       case CPU_1074K:
                if (IS_BOTH_COUNTERS_74K_EVENT(base_id))
                        raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD;
                else
@@ -1584,6 +1585,11 @@ init_hw_perf_events(void)
                mipspmu.general_event_map = &mipsxxcore_event_map;
                mipspmu.cache_event_map = &mipsxxcore_cache_map;
                break;
+       case CPU_1074K:
+               mipspmu.name = "mips/1074K";
+               mipspmu.general_event_map = &mipsxxcore_event_map;
+               mipspmu.cache_event_map = &mipsxxcore_cache_map;
+               break;
        case CPU_LOONGSON1:
                mipspmu.name = "mips/loongson1";
                mipspmu.general_event_map = &mipsxxcore_event_map;
index b242e2c10ea0b6b5c1230579e4a6ad83463fed49..707d957e6a661e1c2b460ac085fe2fcc0a89bac3 100644 (file)
@@ -205,6 +205,7 @@ void spram_config(void)
        case CPU_34K:
        case CPU_74K:
        case CPU_1004K:
+       case CPU_1074K:
        case CPU_INTERAPTIV:
        case CPU_PROAPTIV:
                config0 = read_c0_config();
index e0b499694d180ae1513153b1acbcfbf031ab240a..b0c7f80e05e51cee6d83387875ff98357ffd0307 100644 (file)
@@ -1337,6 +1337,7 @@ static inline void parity_protection_init(void)
        case CPU_34K:
        case CPU_74K:
        case CPU_1004K:
+       case CPU_1074K:
        case CPU_INTERAPTIV:
        case CPU_PROAPTIV:
                {
index 8f1d549d5132b4ea19a7cbdbdecb996b9ee9dfb6..ae810320875e4f10aff48a71a2c20e2925482285 100644 (file)
@@ -1113,9 +1113,10 @@ static void probe_pcache(void)
        case CPU_34K:
        case CPU_74K:
        case CPU_1004K:
+       case CPU_1074K:
        case CPU_INTERAPTIV:
        case CPU_PROAPTIV:
-               if (current_cpu_type() == CPU_74K)
+               if ((c->cputype == CPU_74K) || (c->cputype == CPU_1074K))
                        alias_74k_erratum(c);
                if (!(read_c0_config7() & MIPS_CONF7_IAR) &&
                    (c->icache.waysize > PAGE_SIZE))
index 7a56aee5fce70ebc5c7fb627a262f1e84b2176f2..7b3977035a4605bb0dfcce123f090578b0882b7d 100644 (file)
@@ -76,6 +76,7 @@ static inline int mips_sc_is_activated(struct cpuinfo_mips *c)
        case CPU_34K:
        case CPU_74K:
        case CPU_1004K:
+       case CPU_1074K:
        case CPU_INTERAPTIV:
        case CPU_PROAPTIV:
        case CPU_BMIPS5000:
index b234b1b5ccada646b9286d8cc31c531d3b9f2a8a..151ca264c8a62c5cc0385ae40885b0afc009b66f 100644 (file)
@@ -509,6 +509,7 @@ static void build_tlb_write_entry(u32 **p, struct uasm_label **l,
                switch (current_cpu_type()) {
                case CPU_M14KC:
                case CPU_74K:
+               case CPU_1074K:
                case CPU_PROAPTIV:
                        break;
 
index 2a86e38872a725a89e31f2a5ad1907eb84a3b854..710e7f0105338a719b511a3cf23ac1c44e2a7eed 100644 (file)
@@ -86,6 +86,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
        case CPU_34K:
        case CPU_1004K:
        case CPU_74K:
+       case CPU_1074K:
        case CPU_INTERAPTIV:
        case CPU_PROAPTIV:
        case CPU_LOONGSON1:
index 4d94d75ec6f98f47351afd695202be986355ba24..3a040ebb8378f1f70cb4a3f42510fcf6e56d6fe5 100644 (file)
@@ -372,6 +372,7 @@ static int __init mipsxx_init(void)
                op_model_mipsxx_ops.cpu_type = "mips/34K";
                break;
 
+       case CPU_1074K:
        case CPU_74K:
                op_model_mipsxx_ops.cpu_type = "mips/74K";
                break;