Netlogic XLR/XLP updates.
Subsystems (2)
cover Netlogic XLR/XLP updates.
Fixes and updates for the Netlogic XLP code, this should apply cleanly on top of the current linux-next tree.
Patch 1 (Netlogic: Fix indentation of smpboot.S) and patch 3 (Netlogic: merge of.c into setup.c) are fixups to the merge fallout in linux-next.
Regards,
JC.
Ganesan Ramalingam (1):
MIPS: Netlogic: DTS file for XLP boards
Jayachandran C (9):
MIPS: Netlogic: Fix indentation of smpboot.S
MIPS: Netlogic: Fix low-level flush on core wakeup
MIPS: Netlogic: merge of.c into setup.c
MIPS: Netlogic: remove cpu_has_dc_aliases define for XLP
MIPS: PCI: Fix for byte swap for Netlogic XLP
MIPS: Netlogic: early console fix
MIPS: Netlogic: Move serial ports to device tree
MIPS: Netlogic: Add support for built in DTB
MIPS: Netlogic: XLP defconfig update
Madhusudan Bhat (1):
MIPS: oprofile: Support for XLR/XLS processors
Zi Shen Lim (1):
MIPS: perf: Add XLP support for hardware perf.
arch/mips/Kconfig | 3 +- arch/mips/configs/nlm_xlp_defconfig | 133 +++++++++++++------- .../asm/mach-netlogic/cpu-feature-overrides.h | 1 - arch/mips/kernel/perf_event_mipsxx.c | 124 ++++++++++++++++++ arch/mips/netlogic/Kconfig | 15 +++ arch/mips/netlogic/Makefile | 1 + arch/mips/netlogic/common/earlycons.c | 2 +- arch/mips/netlogic/common/smpboot.S | 22 ++-- arch/mips/netlogic/dts/Makefile | 4 + arch/mips/netlogic/dts/xlp_evp.dts | 124 ++++++++++++++++++ arch/mips/netlogic/xlp/Makefile | 3 +- arch/mips/netlogic/xlp/of.c | 34 ----- arch/mips/netlogic/xlp/platform.c | 108 ---------------- arch/mips/netlogic/xlp/setup.c | 32 ++++- arch/mips/oprofile/Makefile | 1 + arch/mips/oprofile/common.c | 1 + arch/mips/oprofile/op_model_mipsxx.c | 28 +++++ arch/mips/pci/pci-xlp.c | 5 +- 18 files changed, 437 insertions(+), 204 deletions(-) create mode 100644 arch/mips/netlogic/dts/Makefile create mode 100644 arch/mips/netlogic/dts/xlp_evp.dts delete mode 100644 arch/mips/netlogic/xlp/of.c delete mode 100644 arch/mips/netlogic/xlp/platform.c
Signature · 1 line
1.7.9.5
PATCH 1/12 MIPS: Netlogic: Fix indentation of smpboot.S
Fix whitespace issue introduced in the last merge, and while there use tabs consistently in assembly after opcode. No change in logic.
--- arch/mips/netlogic/common/smpboot.S | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
arch/mips/netlogic/common/smpboot.S +10 -10
@@ -67,7 +67,7 @@ li t2, ~0xe /* S1RCM */ and t1, t1, t2 #endif - mtcr t1, t0 + mtcr t1, t0 #ifdef XLP_AX_WORKAROUND li t0, SCHED_DEFEATURE
@@ -82,7 +82,7 @@ */ .macro xlp_flush_l1_dcache li t0, LSU_DEBUG_DATA0 - li t1, LSU_DEBUG_ADDR + li t1, LSU_DEBUG_ADDR li t2, 0 /* index */ li t3, 0x200 /* loop count, 512 sets */ 1:
@@ -95,13 +95,13 @@ andi v1, 0x1 /* wait for write_active == 0 */ bnez v1, 2b nop - mtcr zero, t0 + mtcr zero, t0 ori v1, v0, 0x7 /* way1 | write_enable | write_active */ - mtcr v1, t1 + mtcr v1, t1 3: - mfcr v1, t1 - andi v1, 0x1 /* wait for write_active == 0 */ - bnez v1, 3b + mfcr v1, t1 + andi v1, 0x1 /* wait for write_active == 0 */ + bnez v1, 3b nop addi t2, 1 bne t3, t2, 1b
@@ -193,9 +193,9 @@ EXPORT(nlm_boot_siblings) bnez v1, 2f nop - li t0, MMU_SETUP - li t1, 0 - mtcr t1, t0 + li t0, MMU_SETUP + li t1, 0 + mtcr t1, t0 _ehb 2: beqz v0, 4f /* boot cpu (cpuid == 0)? */
Signature · 1 line
1.7.9.5
PATCH 2/12 MIPS: Netlogic: Fix low-level flush on core wakeup
In reply to Jayachandran CThe L1D cache flush needs to be done for more iterations to ensure that the cache is clean before waking up threads.
This change is experimental, but should not have any negative impact.
--- arch/mips/netlogic/common/smpboot.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/netlogic/common/smpboot.S +1 -1
@@ -84,7 +84,7 @@ li t0, LSU_DEBUG_DATA0 li t1, LSU_DEBUG_ADDR li t2, 0 /* index */ - li t3, 0x200 /* loop count, 512 sets */ + li t3, 0x1000 /* loop count */ 1: sll v0, t2, 5 mtcr zero, t0
Signature · 1 line
1.7.9.5
Re: [PATCH 02/12] MIPS: Netlogic: Fix low-level flush on core wakeup
Folded into https://patchwork.linux-mips.org/patch/3755/. Thanks,
Ralf
PATCH 3/12 MIPS: Netlogic: merge of.c into setup.c
In reply to Jayachandran CMove the function device_tree_init() from netlogic/xlp/of.c to setup.c, and remove the wrapper functions reserve_mem_mach() and free_mem_mach().
Remove file netlogic/xlp/of.c, and the Makefile entry for it.
--- arch/mips/netlogic/xlp/Makefile | 1 - arch/mips/netlogic/xlp/of.c | 34 ---------------------------------- arch/mips/netlogic/xlp/setup.c | 20 ++++++++++++++++++++ 3 files changed, 20 insertions(+), 35 deletions(-) delete mode 100644 arch/mips/netlogic/xlp/of.c
arch/mips/netlogic/xlp/Makefile +0 -1
@@ -1,4 +1,3 @@ obj-y += setup.o platform.o nlm_hal.o -obj-$(CONFIG_OF) += of.o obj-$(CONFIG_SMP) += wakeup.o obj-$(CONFIG_USB) += usb-init.o
arch/mips/netlogic/xlp/of.c deleted +0 -34
@@ -1,34 +0,0 @@ -#include <linux/bootmem.h> -#include <linux/init.h> -#include <linux/io.h> -#include <linux/of_fdt.h> -#include <asm/byteorder.h> - -static int __init reserve_mem_mach (unsigned long addr,unsigned long size) -{ -return reserve_bootmem (addr, size,BOOTMEM_DEFAULT ); -} - -void __init free_mem_mach (unsigned long addr,unsigned long size) -{ -return free_bootmem (addr, size); -} - -void __init device_tree_init (void ) -{ -unsigned long base, size; - -if (!initial_boot_params) -return ; - - base =virt_to_phys ((void *)initial_boot_params); - size =be32_to_cpu (initial_boot_params->totalsize); - -/* Before we do anything, lets reserve the dt blob */ -reserve_mem_mach (base, size); - -unflatten_device_tree (); - -/* free the space reserved for the dt blob */ -free_mem_mach (base, size); -}
arch/mips/netlogic/xlp/setup.c +20 -0
@@ -35,6 +35,7 @@#include <linux/kernel.h> #include <linux/serial_8250.h> #include <linux/pm.h> +#include <linux/bootmem.h> #include <asm/reboot.h> #include <asm/time.h>
@@ -112,6 +113,25 @@ void __init prom_init(void)#endif } +void __init device_tree_init (void ) +{ +unsigned long base, size; + +if (!initial_boot_params) +return ; + + base =virt_to_phys ((void *)initial_boot_params); + size =be32_to_cpu (initial_boot_params->totalsize); + +/* Before we do anything, lets reserve the dt blob */ +reserve_bootmem (base, size,BOOTMEM_DEFAULT ); + +unflatten_device_tree (); + +/* free the space reserved for the dt blob */ +free_bootmem (base, size); +} +static struct of_device_id __initdata xlp_ids[] = { { .compatible ="simple-bus" , }, {},
Signature · 1 line
1.7.9.5
PATCH 4/12 MIPS: Netlogic: remove cpu_has_dc_aliases define for XLP
In reply to Jayachandran COn XLP, the dcache size depends on the number of enabled threads in core. There are no dcache aliases if the pagesize is large enough or if enough threads are enabled in the core.
Remove the #define for cpu_has_dc_aliases and leave it to be computed at runtime.
--- .../asm/mach-netlogic/cpu-feature-overrides.h | 1 - 1 file changed, 1 deletion(-)
arch/mips/include/asm/mach-netlogic/cpu-feature-overrides.h +0 -1
@@ -48,7 +48,6 @@#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
Signature · 1 line
1.7.9.5
PATCH 5/12 MIPS: PCI: Fix for byte swap for Netlogic XLP
In reply to Jayachandran CThe last 12 bits of the PCIe hardware swap size and limit registers are significant, while the same bits of the bridge PCIe registers are 0.
So, to program limits correctly, we need to set the last 12 bits of the value read from the bridge limit registers to 1 before writing to the PCIe limit registers.
--- arch/mips/pci/pci-xlp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/mips/pci/pci-xlp.c +3 -2
@@ -213,13 +213,14 @@ static int xlp_enable_pci_bswap(void)nlm_write_pci_reg (pciebase,PCIE_BYTE_SWAP_MEM_BASE , reg); reg =nlm_read_bridge_reg (sysbase,BRIDGE_PCIEMEM_LIMIT0 + i); -nlm_write_pci_reg (pciebase,PCIE_BYTE_SWAP_MEM_LIM , reg); +nlm_write_pci_reg (pciebase,PCIE_BYTE_SWAP_MEM_LIM , + reg |0xfff ); reg =nlm_read_bridge_reg (sysbase,BRIDGE_PCIEIO_BASE0 + i);nlm_write_pci_reg (pciebase,PCIE_BYTE_SWAP_IO_BASE , reg); reg =nlm_read_bridge_reg (sysbase,BRIDGE_PCIEIO_LIMIT0 + i); -nlm_write_pci_reg (pciebase,PCIE_BYTE_SWAP_IO_LIM , reg); +nlm_write_pci_reg (pciebase,PCIE_BYTE_SWAP_IO_LIM , reg |0xfff ); }return 0 ; }
Signature · 1 line
1.7.9.5
Re: [PATCH 05/12] MIPS: PCI: Fix for byte swap for Netlogic XLP
Folded into https://patchwork.linux-mips.org/patch/3760/. Thanks,
Ralf
PATCH 6/12 MIPS: Netlogic: early console fix
In reply to Jayachandran CIn prom_putchar(), wait for just the TX empty bit to clear in the UART LSR.
--- arch/mips/netlogic/common/earlycons.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/netlogic/common/earlycons.c +1 -1
@@ -54,7 +54,7 @@ void prom_putchar(char c)#elif defined(CONFIG_CPU_XLR ) uartbase =nlm_mmio_base (NETLOGIC_IO_UART_0_OFFSET );#endif -while (nlm_read_reg (uartbase,UART_LSR ) ==0 ) +while ((nlm_read_reg (uartbase,UART_LSR ) &0x20 ) ==0 ) ;nlm_write_reg (uartbase,UART_TX , c); }
Signature · 1 line
1.7.9.5
Re: [PATCH 06/12] MIPS: Netlogic: early console fix
Review
Quoted 9 lines · On Friday 13 July 2012 21:53:19 Jayachandran C wrote:
In
prom_putchar(), wait for just the TX empty bit to clear in the UART LSR.Signed-off-by Jayachandran C <[email protected]>--- arch/mips/netlogic/common/earlycons.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/mips/netlogic/common/earlycons.c
arch/mips/netlogic/common/earlycons.c void prom_putchar(char c) · line 58
Quoted 10 lines
index f193f7b..53b200a5 100644
arch/mips/netlogic/common/earlycons.c +1
-1@@ -54,7 +54,7 @@ void prom_putchar(char c)#elif defined(CONFIG_CPU_XLR ) uartbase =nlm_mmio_base (NETLOGIC_IO_UART_0_OFFSET );#endif -while (nlm_read_reg (uartbase,UART_LSR ) ==0 ) +while ((nlm_read_reg (uartbase,UART_LSR ) &0x20 ) ==0 ) ;
You could use use UART_LSR_THRE here instead of 0x20. --
Florian
PATCH 6/12 MIPS: Netlogic: early console fix
In prom_putchar(), wait for just the TX empty bit to clear in the UART LSR.
---
[Updated to use UART_LSR_THRE instead of 0x20, as suggested by
Florian Fainelli <[email protected]>]
arch/mips/netlogic/common/earlycons.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/netlogic/common/earlycons.c +1 -1
@@ -54,7 +54,7 @@ void prom_putchar(char c)#elif defined(CONFIG_CPU_XLR ) uartbase =nlm_mmio_base (NETLOGIC_IO_UART_0_OFFSET );#endif -while (nlm_read_reg (uartbase,UART_LSR ) ==0 ) +while ((nlm_read_reg (uartbase,UART_LSR ) &UART_LSR_THRE ) ==0 ) ;nlm_write_reg (uartbase,UART_TX , c); }
Signature · 1 line
1.7.9.5
PATCH 7/12 MIPS: Netlogic: DTS file for XLP boards
In reply to Jayachandran CFrom: Ganesan Ramalingam <[email protected]>
Add a basic DTS file netlogic/dts/nlm_xlp.dts which contains memory, i2c devices, NOR flash and command line arguments.
--- arch/mips/netlogic/dts/xlp_evp.dts | 103 ++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 arch/mips/netlogic/dts/xlp_evp.dts
arch/mips/netlogic/dts/xlp_evp.dts new file +103 -0
@@ -0,0 +1,103 @@ +/* + * XLP8XX Device Tree Source for EVP boards + */ + +/dts-v1/; +/ { + model = "netlogic,XLP-EVP"; + compatible = "netlogic,xlp"; + #address-cells = <2>; + #size-cells = <2>; + + memory { + device_type = "memory"; + reg = <0 0x00100000 0 0x0FF00000 // 255M at 1M + 0 0x20000000 0 0xa0000000 // 2560M at 512M + 0 0xe0000000 1 0x00000000>; + }; + + soc { + #address-cells = <2>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges = <0 0 0 0x18000000 0x04000000 // PCIe CFG + 1 0 0 0x16000000 0x01000000>; // GBU chipselects + i2c0: ocores@32000 { + compatible = "opencores,i2c-ocores"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0 0x32100 0xa00>; + reg-shift = <2>; + reg-io-width = <4>; + clock-frequency = <32000000>; + interrupt-parent = <&pic>; + interrupts = <30>; + }; + i2c1: ocores@33000 { + compatible = "opencores,i2c-ocores"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0 0x33100 0xa00>; + reg-shift = <2>; + reg-io-width = <4>; + clock-frequency = <32000000>; + interrupt-parent = <&pic>; + interrupts = <31>; + + rtc@68 { + compatible = "dallas,ds1374"; + reg = <0x68>; + }; + + dtt@4c { + compatible = "national,lm90"; + reg = <0x4c>; + }; + }; + pic: pic@4000 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = <0 0x4000 0x200>; + }; + + nor_flash@1,0 { + compatible = "cfi-flash"; + #address-cells = <1>; + #size-cells = <1>; + bank-width = <2>; + reg = <1 0 0x1000000>; + + partition@0 { + label = "x-loader"; + reg = <0x0 0x100000>; /* 1M */ + read-only; + }; + + partition@100000 { + label = "u-boot"; + reg = <0x100000 0x100000>; /* 1M */ + }; + + partition@200000 { + label = "kernel"; + reg = <0x200000 0x500000>; /* 5M */ + }; + + partition@700000 { + label = "rootfs"; + reg = <0x700000 0x800000>; /* 8M */ + }; + + partition@f00000 { + label = "env"; + reg = <0xf00000 0x100000>; /* 1M */ + read-only; + }; + }; + }; + + chosen { + bootargs = "console=ttyS0,115200 rdinit=/sbin/init"; + }; +};
Signature · 1 line
1.7.9.5
PATCH 8/12 MIPS: Netlogic: Move serial ports to device tree
In reply to Jayachandran CAdd the serial ports to the device tree and remove the platform code for adding them.
--- arch/mips/netlogic/dts/xlp_evp.dts | 21 +++++++ arch/mips/netlogic/xlp/Makefile | 2 +- arch/mips/netlogic/xlp/platform.c | 108 ------------------------------------ 3 files changed, 22 insertions(+), 109 deletions(-) delete mode 100644 arch/mips/netlogic/xlp/platform.c
arch/mips/netlogic/dts/xlp_evp.dts +21 -0
@@ -22,6 +22,27 @@ compatible = "simple-bus"; ranges = <0 0 0 0x18000000 0x04000000 // PCIe CFG 1 0 0 0x16000000 0x01000000>; // GBU chipselects + + serial0: serial@30000 { + device_type = "serial"; + compatible = "ns16550"; + reg = <0 0x30100 0xa00>; + reg-shift = <2>; + reg-io-width = <4>; + clock-frequency = <133333333>; + interrupt-parent = <&pic>; + interrupts = <17>; + }; + serial1: serial@31000 { + device_type = "serial"; + compatible = "ns16550"; + reg = <0 0x31100 0xa00>; + reg-shift = <2>; + reg-io-width = <4>; + clock-frequency = <133333333>; + interrupt-parent = <&pic>; + interrupts = <18>; + }; i2c0: ocores@32000 { compatible = "opencores,i2c-ocores"; #address-cells = <1>;
arch/mips/netlogic/xlp/Makefile +1 -1
@@ -1,3 +1,3 @@ -obj-y += setup.o platform.o nlm_hal.o +obj-y += setup.o nlm_hal.o obj-$(CONFIG_SMP) += wakeup.o obj-$(CONFIG_USB) += usb-init.o
arch/mips/netlogic/xlp/platform.c deleted +0 -108
108 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 9/12 MIPS: Netlogic: Add support for built in DTB
In reply to Jayachandran CProvide a config option to embed a device tree for XLP evaluation boards. This DTB will be used if the firmware does not pass in a device tree pointer.
--- arch/mips/Kconfig | 1 + arch/mips/netlogic/Kconfig | 15 +++++++++++++++ arch/mips/netlogic/Makefile | 1 + arch/mips/netlogic/dts/Makefile | 4 ++++ arch/mips/netlogic/xlp/setup.c | 12 +++++++++++- 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 arch/mips/netlogic/dts/Makefile
arch/mips/Kconfig +1 -0
@@ -827,6 +827,7 @@ config NLM_XLP_BOARD select ZONE_DMA if 64BIT select SYNC_R4K select SYS_HAS_EARLY_PRINTK + select USE_OF help This board is based on Netlogic XLP Processor. Say Y here if you have a XLP based board.
arch/mips/netlogic/Kconfig +15 -0
@@ -1,2 +1,17 @@ +if NLM_XLP_BOARD || NLM_XLR_BOARD + +if NLM_XLP_BOARD +config DT_XLP_EVP + bool "Built-in device tree for XLP EVP/SVP boards" + default y + help + Add an FDT blob for XLP EVP and SVP boards into the kernel. + This DTB will be used if the firmware does not pass in a DTB + pointer to the kernel. The corresponding DTS file is at + arch/mips/netlogic/dts/xlp_evp.dts +endif + config NLM_COMMON bool + +endif
arch/mips/netlogic/Makefile +1 -0
@@ -1,3 +1,4 @@ obj-$(CONFIG_NLM_COMMON) += common/ obj-$(CONFIG_CPU_XLR) += xlr/ obj-$(CONFIG_CPU_XLP) += xlp/ +obj-$(CONFIG_CPU_XLP) += dts/
arch/mips/netlogic/dts/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +obj-$(CONFIG_DT_XLP_EVP) := xlp_evp.dtb.o + +$(obj)/%.dtb: $(obj)/%.dts + $(call if_changed,dtc)
arch/mips/netlogic/xlp/setup.c +11 -1
@@ -57,6 +57,7 @@ unsigned long nlm_common_ebase = 0x0;/* default to uniprocessor */ uint32_t nlm_coremask =1 , nlm_cpumask =1 ;int nlm_threads_per_core =1 ; +extern u32 __dtb_start[];static void nlm_linux_exit (void ) {
@@ -97,9 +98,18 @@ void __init prom_init(void) {void *fdtp; - fdtp = (void *)(long )fw_arg0;xlp_mmu_init ();nlm_hal_init (); + +/* +* If no FDT pointer is passed in, use the built-in FDT. +* device_tree_init() does not handle CKSEG0 pointers in +* 64-bit, so convert pointer. +*/ + fdtp = (void *)(long )fw_arg0; +if (!fdtp) + fdtp = __dtb_start; + fdtp =phys_to_virt (__pa (fdtp));early_init_devtree (fdtp); nlm_common_ebase =read_c0_ebase () & (~((1 <<12 ) -1 ));
Signature · 1 line
1.7.9.5
PATCH 10/12 MIPS: oprofile: Support for XLR/XLS processors
In reply to Jayachandran CFrom: Madhusudan Bhat <[email protected]>
Add support for XLR and XLS processors in MIPS Oprofile code. These processors are multi-threaded and have two counters per core. Each counter can track either all the events in the core (global mode), or events in just one thread.
We use the counters in the global mode, and use only the first thread in each core to handle the configuration etc.
--- arch/mips/oprofile/Makefile | 1 + arch/mips/oprofile/common.c | 1 + arch/mips/oprofile/op_model_mipsxx.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+)
arch/mips/oprofile/Makefile +1 -0
@@ -12,5 +12,6 @@ oprofile-$(CONFIG_CPU_MIPS32) += op_model_mipsxx.o oprofile-$(CONFIG_CPU_MIPS64) += op_model_mipsxx.o oprofile-$(CONFIG_CPU_R10000) += op_model_mipsxx.o oprofile-$(CONFIG_CPU_SB1) += op_model_mipsxx.o +oprofile-$(CONFIG_CPU_XLR) += op_model_mipsxx.o oprofile-$(CONFIG_CPU_RM9000) += op_model_rm9000.o oprofile-$(CONFIG_CPU_LOONGSON2) += op_model_loongson2.o
arch/mips/oprofile/common.c +1 -0
@@ -91,6 +91,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)case CPU_R10000 :case CPU_R12000 :case CPU_R14000 : +case CPU_XLR : lmodel = &op_model_mipsxx_ops;break ;
arch/mips/oprofile/op_model_mipsxx.c +29 -0
@@ -31,8 +31,22 @@#define M_COUNTER_OVERFLOW (1UL << 31) +/* Netlogic XLR specific, count events in all threads in a core */ +#define M_PERFCTL_COUNT_ALL_THREADS (1UL << 13) +static int (*save_perf_irq)(void ); +/* +* XLR has only one set of counters per core. Designate the +* first hardware thread in the core for setup and init. +* Skip CPUs with non-zero hardware thread id (4 hwt per core) +*/ +#ifdef CONFIG_CPU_XLR +#define oprofile_skip_cpu (c) ((cpu_logical_map(c) & 0x3) != 0) +#else +#define oprofile_skip_cpu (c) 0 +#endif +#ifdef CONFIG_MIPS_MT_SMP static int cpu_has_mipsmt_pertccounters;#define WHAT (M_TC_EN_VPE | \
@@ -152,6 +166,8 @@ static void mipsxx_reg_setup(struct op_counter_config *ctr) reg.control[i] |=M_PERFCTL_USER ;if (ctr[i].exl) reg.control[i] |=M_PERFCTL_EXL ; +if (current_cpu_type () ==CPU_XLR ) + reg.control[i] |=M_PERFCTL_COUNT_ALL_THREADS ; reg.counter[i] =0x80000000 - ctr[i].count; } }
@@ -162,6 +178,9 @@ static void mipsxx_cpu_setup(void *args) {unsigned int counters = op_model_mipsxx_ops.num_counters; +if (oprofile_skip_cpu (smp_processor_id ())) +return ; +switch (counters) {case 4 :w_c0_perfctrl3 (0 );
@@ -183,6 +202,9 @@ static void mipsxx_cpu_start(void *args) {unsigned int counters = op_model_mipsxx_ops.num_counters; +if (oprofile_skip_cpu (smp_processor_id ())) +return ; +switch (counters) {case 4 :w_c0_perfctrl3 (WHAT | reg.control[3 ]);
@@ -200,6 +222,9 @@ static void mipsxx_cpu_stop(void *args) {unsigned int counters = op_model_mipsxx_ops.num_counters; +if (oprofile_skip_cpu (smp_processor_id ())) +return ; +switch (counters) {case 4 :w_c0_perfctrl3 (0 );
@@ -372,6 +397,10 @@ static int __init mipsxx_init(void) op_model_mipsxx_ops.cpu_type ="mips/loongson1" ;break ; +case CPU_XLR : + op_model_mipsxx_ops.cpu_type ="mips/xlr" ; +break ; +default :printk (KERN_ERR "Profiling unsupported for this CPU\n" );
Signature · 1 line
1.7.9.5
PATCH 11/12 MIPS: perf: Add XLP support for hardware perf.
In reply to Jayachandran CFrom: Zi Shen Lim <[email protected]>
--- arch/mips/Kconfig | 2 +- arch/mips/kernel/perf_event_mipsxx.c | 124 ++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 1 deletion(-)
arch/mips/Kconfig +1 -1
@@ -2164,7 +2164,7 @@ config NODES_SHIFT config HW_PERF_EVENTS bool "Enable hardware performance counter support for perf events" - depends on PERF_EVENTS && !MIPS_MT_SMTC && OPROFILE=n && (CPU_MIPS32 || CPU_MIPS64 || CPU_R10000 || CPU_SB1 || CPU_CAVIUM_OCTEON) + depends on PERF_EVENTS && !MIPS_MT_SMTC && OPROFILE=n && (CPU_MIPS32 || CPU_MIPS64 || CPU_R10000 || CPU_SB1 || CPU_CAVIUM_OCTEON || CPU_XLP) default y help Enable hardware performance counter support for perf events. If
arch/mips/kernel/perf_event_mipsxx.c +124 -0
148 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 12/12 MIPS: Netlogic: XLP defconfig update
In reply to Jayachandran CEnable more devices and options for XLP default configuration:
- Serial ports from FDT
- NOR Flash support and partitions from FDT
- PCI and PCI bus support and devices - SATA, e1000e, sky2
- I2C ocores controller and devices - ds1374, lm90
- Misc options such as RTC, partition formats etc.
--- arch/mips/configs/nlm_xlp_defconfig | 133 ++++++++++++++++++++++++----------- 1 file changed, 90 insertions(+), 43 deletions(-)
arch/mips/configs/nlm_xlp_defconfig +90 -43
@@ -1,14 +1,12 @@ CONFIG_NLM_XLP_BOARD=y CONFIG_64BIT=y +CONFIG_PAGE_SIZE_16KB=y +# CONFIG_HW_PERF_EVENTS is not set CONFIG_KSM=y CONFIG_DEFAULT_MMAP_MIN_ADDR=65536 CONFIG_SMP=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y # CONFIG_SECCOMP is not set -CONFIG_USE_OF=y CONFIG_EXPERIMENTAL=y -CONFIG_CROSS_COMPILE="" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y
@@ -19,13 +17,13 @@ CONFIG_TASK_DELAY_ACCT=y CONFIG_TASK_XACCT=y CONFIG_TASK_IO_ACCOUNTING=y CONFIG_AUDIT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y CONFIG_CGROUPS=y CONFIG_NAMESPACES=y CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" CONFIG_RD_BZIP2=y CONFIG_RD_LZMA=y -CONFIG_INITRAMFS_COMPRESSION_LZMA=y CONFIG_KALLSYMS_ALL=y CONFIG_EMBEDDED=y # CONFIG_COMPAT_BRK is not set
@@ -35,6 +33,29 @@ CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_BLK_DEV_INTEGRITY=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_ACORN_PARTITION=y +CONFIG_ACORN_PARTITION_ICS=y +CONFIG_ACORN_PARTITION_RISCIX=y +CONFIG_OSF_PARTITION=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_LDM_PARTITION=y +CONFIG_SGI_PARTITION=y +CONFIG_ULTRIX_PARTITION=y +CONFIG_SUN_PARTITION=y +CONFIG_KARMA_PARTITION=y +CONFIG_EFI_PARTITION=y +CONFIG_SYSV68_PARTITION=y +CONFIG_PCI=y +CONFIG_PCI_DEBUG=y +CONFIG_PCI_REALLOC_ENABLE_AUTO=y +CONFIG_PCI_STUB=y # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set CONFIG_BINFMT_MISC=y CONFIG_MIPS32_COMPAT=y
@@ -170,7 +191,6 @@ CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m CONFIG_IP_NF_TARGET_ULOG=m CONFIG_NF_NAT=m CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -186,7 +206,6 @@ CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m CONFIG_IP_NF_ARP_MANGLE=m CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m CONFIG_IP6_NF_IPTABLES=m CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m
@@ -197,7 +216,6 @@ CONFIG_IP6_NF_MATCH_IPV6HEADER=m CONFIG_IP6_NF_MATCH_MH=m CONFIG_IP6_NF_MATCH_RT=m CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_TARGET_LOG=m CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_REJECT=m CONFIG_IP6_NF_MANGLE=m
@@ -248,9 +266,6 @@ CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y CONFIG_X25=m CONFIG_LAPB=m -CONFIG_ECONET=m -CONFIG_ECONET_AUNUDP=y -CONFIG_ECONET_NATIVE=y CONFIG_WAN_ROUTER=m CONFIG_PHONET=m CONFIG_IEEE802154=m
@@ -297,11 +312,21 @@ CONFIG_NET_ACT_SIMP=m CONFIG_NET_ACT_SKBEDIT=m CONFIG_DCB=y CONFIG_NET_PKTGEN=m -# CONFIG_WIRELESS is not set CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y # CONFIG_STANDALONE is not set CONFIG_CONNECTOR=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_LE_BYTE_SWAP=y +CONFIG_MTD_CFI_GEOMETRY=y +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_OF=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_NBD=m
@@ -310,7 +335,6 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_CDROM_PKTCDVD=y CONFIG_RAID_ATTRS=m -CONFIG_SCSI=y CONFIG_SCSI_TGT=m CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_ST=m
@@ -337,6 +361,48 @@ CONFIG_SCSI_DH_EMC=m CONFIG_SCSI_DH_ALUA=m CONFIG_SCSI_OSD_INITIATOR=m CONFIG_SCSI_OSD_ULD=m +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_SIL24=y +# CONFIG_ATA_SFF is not set +CONFIG_NETDEVICES=y +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_ADAPTEC is not set +# CONFIG_NET_VENDOR_ALTEON is not set +# CONFIG_NET_VENDOR_AMD is not set +# CONFIG_NET_VENDOR_ATHEROS is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_BROCADE is not set +# CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_DEC is not set +# CONFIG_NET_VENDOR_DLINK is not set +# CONFIG_NET_VENDOR_EMULEX is not set +# CONFIG_NET_VENDOR_EXAR is not set +# CONFIG_NET_VENDOR_HP is not set +CONFIG_E1000E=y +# CONFIG_NET_VENDOR_I825XX is not set +CONFIG_SKY2=y +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MYRI is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NVIDIA is not set +# CONFIG_NET_VENDOR_OKI is not set +# CONFIG_NET_PACKET_ENGINE is not set +# CONFIG_NET_VENDOR_QLOGIC is not set +# CONFIG_NET_VENDOR_REALTEK is not set +# CONFIG_NET_VENDOR_RDC is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SILAN is not set +# CONFIG_NET_VENDOR_SIS is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_TEHUTI is not set +# CONFIG_NET_VENDOR_TI is not set +# CONFIG_NET_VENDOR_TOSHIBA is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set # CONFIG_INPUT_MOUSEDEV is not set CONFIG_INPUT_EVDEV=y CONFIG_INPUT_EVBUG=m
@@ -360,16 +426,23 @@ CONFIG_SERIAL_8250_EXTENDED=y CONFIG_SERIAL_8250_MANY_PORTS=y CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_RSA=y +CONFIG_SERIAL_OF_PLATFORM=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_TIMERIOMEM=m CONFIG_RAW_DRIVER=m -# CONFIG_HWMON is not set +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_OCORES=y +CONFIG_SENSORS_LM90=y +CONFIG_THERMAL=y # CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set # CONFIG_USB_SUPPORT is not set +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1374=y CONFIG_UIO=y CONFIG_UIO_PDRV=m CONFIG_UIO_PDRV_GENIRQ=m +# CONFIG_IOMMU_SUPPORT is not set CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y
@@ -381,15 +454,10 @@ CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y CONFIG_GFS2_FS=m -CONFIG_GFS2_FS_LOCKING_DLM=y -CONFIG_OCFS2_FS=m CONFIG_BTRFS_FS=m CONFIG_BTRFS_FS_POSIX_ACL=y CONFIG_NILFS2_FS=m CONFIG_QUOTA_NETLINK_INTERFACE=y -# CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=y CONFIG_CUSE=m
@@ -415,6 +483,7 @@ CONFIG_HFSPLUS_FS=m CONFIG_BEFS_FS=m CONFIG_BFS_FS=m CONFIG_EFS_FS=m +CONFIG_JFFS2_FS=y CONFIG_CRAMFS=m CONFIG_SQUASHFS=m CONFIG_VXFS_FS=m
@@ -427,7 +496,6 @@ CONFIG_SYSV_FS=m CONFIG_UFS_FS=m CONFIG_EXOFS_FS=m CONFIG_NFS_FS=m -CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y CONFIG_NFS_FSCACHE=y
@@ -450,25 +518,6 @@ CONFIG_NCPFS_NLS=y CONFIG_NCPFS_EXTRAS=y CONFIG_CODA_FS=m CONFIG_AFS_FS=m -CONFIG_PARTITION_ADVANCED=y -CONFIG_ACORN_PARTITION=y -CONFIG_ACORN_PARTITION_ICS=y -CONFIG_ACORN_PARTITION_RISCIX=y -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y -CONFIG_SYSV68_PARTITION=y CONFIG_NLS=y CONFIG_NLS_DEFAULT="cp437" CONFIG_NLS_CODEPAGE_437=m
@@ -518,12 +567,10 @@ CONFIG_SCHEDSTATS=y CONFIG_TIMER_STATS=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_MEMORY_INIT=y -CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_SCHED_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y CONFIG_KGDB=y CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y CONFIG_LSM_MMAP_MIN_ADDR=0 CONFIG_SECURITY_SELINUX=y CONFIG_SECURITY_SELINUX_BOOTPARAM=y
Signature · 1 line
1.7.9.5
Re: [PATCH 12/12] MIPS: Netlogic: XLP defconfig update
Quoted 9 lines · Jayachandran C
arch/mips/configs/nlm_xlp_defconfig +9
-0+CONFIG_PARTITION_ADVANCED=y +CONFIG_ACORN_PARTITION=y +CONFIG_ACORN_PARTITION_ICS=y +CONFIG_ACORN_PARTITION_RISCIX=y +CONFIG_OSF_PARTITION=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y
arch/mips/configs/nlm_xlp_defconfig CONFIG_MODULE_UNLOAD=y · line 54
Quoted 10 lines
arch/mips/configs/nlm_xlp_defconfig +10
-0+CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_LDM_PARTITION=y +CONFIG_SGI_PARTITION=y +CONFIG_ULTRIX_PARTITION=y +CONFIG_SUN_PARTITION=y +CONFIG_KARMA_PARTITION=y +CONFIG_EFI_PARTITION=y +CONFIG_SYSV68_PARTITION=y
Plenty of weird partition types enabled in this config update; you may want to review the config file for a future version. Unless you really want to be able to deal with 1980's partitioning schemes, of course.
Ralf
Re: [PATCH 12/12] MIPS: Netlogic: XLP defconfig update
Quoted 17 lines · Ralf Baechle
Quoted 15 lines · Jayachandran C
arch/mips/configs/nlm_xlp_defconfig +15
-0+CONFIG_PARTITION_ADVANCED=y +CONFIG_ACORN_PARTITION=y +CONFIG_ACORN_PARTITION_ICS=y +CONFIG_ACORN_PARTITION_RISCIX=y +CONFIG_OSF_PARTITION=y +CONFIG_AMIGA_PARTITION=y +CONFIG_ATARI_PARTITION=y +CONFIG_MAC_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_LDM_PARTITION=y +CONFIG_SGI_PARTITION=y +CONFIG_ULTRIX_PARTITION=y
Quoted 8 lines
arch/mips/configs/nlm_xlp_defconfig CONFIG_MODULE_UNLOAD=y · line 54
Quoted 4 lines
arch/mips/configs/nlm_xlp_defconfig +4
-0+CONFIG_SUN_PARTITION=y +CONFIG_KARMA_PARTITION=y +CONFIG_EFI_PARTITION=y +CONFIG_SYSV68_PARTITION=yPlenty of weird partition types enabled in this config update; you may want to review the config file for a future version. Unless you really want to be able to deal with 1980's partitioning schemes, of course.
This seems to be present from the very first version, and got rearranged when I regenerated this file. Will clean this up with the next update.
Thanks,
JC.