Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284787
b: refs/heads/master
c: a3d4fb2
h: refs/heads/master
i:
  284785: 975489a
  284783: 709e99b
v: v3
  • Loading branch information
Jayachandran C authored and Ralf Baechle committed Dec 7, 2011
1 parent d114f22 commit bb097e5
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0be3d9bb1460a87170a1b78b9ab12cb0ac02c2dc
refs/heads/master: a3d4fb2d2a4c52b22cde90049a78e323cde187e5
3 changes: 2 additions & 1 deletion trunk/arch/mips/include/asm/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
#define PRID_IMP_NETLOGIC_XLS408B 0x4e00
#define PRID_IMP_NETLOGIC_XLS404B 0x4f00

#define PRID_IMP_NETLOGIC_XLP832 0x1000
/*
* Definitions for 7:0 on legacy processors
*/
Expand Down Expand Up @@ -263,7 +264,7 @@ enum cpu_type_enum {
*/
CPU_5KC, CPU_20KC, CPU_25KF, CPU_SB1, CPU_SB1A, CPU_LOONGSON2,
CPU_CAVIUM_OCTEON, CPU_CAVIUM_OCTEON_PLUS, CPU_CAVIUM_OCTEON2,
CPU_XLR,
CPU_XLR, CPU_XLP,

CPU_LAST
};
Expand Down
18 changes: 14 additions & 4 deletions trunk/arch/mips/include/asm/mach-netlogic/cpu-feature-overrides.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,33 @@

#define cpu_has_llsc 1
#define cpu_has_vtag_icache 0
#define cpu_has_dc_aliases 0
#define cpu_has_ic_fills_f_dc 1
#define cpu_has_dsp 0
#define cpu_has_mipsmt 0
#define cpu_has_userlocal 0
#define cpu_icache_snoops_remote_store 1

#define cpu_has_64bits 1

#define cpu_has_mips32r1 1
#define cpu_has_mips32r2 0
#define cpu_has_mips64r1 1
#define cpu_has_mips64r2 0

#define cpu_has_inclusive_pcaches 0

#define cpu_dcache_line_size() 32
#define cpu_icache_line_size() 32

#if defined(CONFIG_CPU_XLR)
#define cpu_has_userlocal 0
#define cpu_has_dc_aliases 0
#define cpu_has_mips32r2 0
#define cpu_has_mips64r2 0
#elif defined(CONFIG_CPU_XLP)
#define cpu_has_userlocal 1
#define cpu_has_mips32r2 1
#define cpu_has_mips64r2 1
#define cpu_has_dc_aliases 1
#else
#error "Unknown Netlogic CPU"
#endif

#endif /* __ASM_MACH_NETLOGIC_CPU_FEATURE_OVERRIDES_H */
2 changes: 2 additions & 0 deletions trunk/arch/mips/include/asm/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ search_module_dbetables(unsigned long addr)
#define MODULE_PROC_FAMILY "OCTEON "
#elif defined CONFIG_CPU_XLR
#define MODULE_PROC_FAMILY "XLR "
#elif defined CONFIG_CPU_XLP
#define MODULE_PROC_FAMILY "XLP "
#else
#error MODULE_PROC_FAMILY undefined for your processor configuration
#endif
Expand Down
19 changes: 16 additions & 3 deletions trunk/arch/mips/kernel/cpu-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ void __init check_wait(void)
case CPU_CAVIUM_OCTEON2:
case CPU_JZRISC:
case CPU_XLR:
case CPU_XLP:
cpu_wait = r4k_wait;
break;

Expand Down Expand Up @@ -1024,6 +1025,11 @@ static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu)
MIPS_CPU_LLSC);

switch (c->processor_id & 0xff00) {
case PRID_IMP_NETLOGIC_XLP832:
c->cputype = CPU_XLP;
__cpu_name[cpu] = "Netlogic XLP";
break;

case PRID_IMP_NETLOGIC_XLR732:
case PRID_IMP_NETLOGIC_XLR716:
case PRID_IMP_NETLOGIC_XLR532:
Expand Down Expand Up @@ -1054,14 +1060,21 @@ static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu)
break;

default:
printk(KERN_INFO "Unknown Netlogic chip id [%02x]!\n",
pr_info("Unknown Netlogic chip id [%02x]!\n",
c->processor_id);
c->cputype = CPU_XLR;
break;
}

c->isa_level = MIPS_CPU_ISA_M64R1;
c->tlbsize = ((read_c0_config1() >> 25) & 0x3f) + 1;
if (c->cputype == CPU_XLP) {
c->isa_level = MIPS_CPU_ISA_M64R2;
c->options |= (MIPS_CPU_FPU | MIPS_CPU_ULRI | MIPS_CPU_MCHECK);
/* This will be updated again after all threads are woken up */
c->tlbsize = ((read_c0_config6() >> 16) & 0xffff) + 1;
} else {
c->isa_level = MIPS_CPU_ISA_M64R1;
c->tlbsize = ((read_c0_config1() >> 25) & 0x3f) + 1;
}
}

#ifdef CONFIG_64BIT
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/mips/mm/c-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,9 @@ static void __cpuinit setup_scache(void)
loongson2_sc_init();
return;
#endif
case CPU_XLP:
/* don't need to worry about L2, fully coherent */
return;

default:
if (c->isa_level == MIPS_CPU_ISA_M32R1 ||
Expand Down

0 comments on commit bb097e5

Please sign in to comment.