diff options
| -rw-r--r-- | arch/mips/Kconfig | 1 | ||||
| -rw-r--r-- | arch/mips/cavium-octeon/octeon-platform.c | 5 | ||||
| -rw-r--r-- | arch/mips/kernel/smp-bmips.c | 2 | ||||
| -rw-r--r-- | arch/mips/kernel/traps.c | 1 | ||||
| -rw-r--r-- | arch/mips/kvm/Kconfig | 1 | ||||
| -rw-r--r-- | arch/mips/mm/tlbex.c | 4 | ||||
| -rw-r--r-- | arch/mips/netlogic/common/irq.c | 68 | ||||
| -rw-r--r-- | arch/mips/netlogic/dts/xlp_evp.dts | 3 | ||||
| -rw-r--r-- | arch/mips/netlogic/dts/xlp_svp.dts | 3 | ||||
| -rw-r--r-- | arch/mips/netlogic/xlp/usb-init.c | 2 |
10 files changed, 69 insertions, 21 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 4758a8fd3e99..c3abed332301 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
| @@ -1702,6 +1702,7 @@ endchoice | |||
| 1702 | 1702 | ||
| 1703 | config KVM_GUEST | 1703 | config KVM_GUEST |
| 1704 | bool "KVM Guest Kernel" | 1704 | bool "KVM Guest Kernel" |
| 1705 | depends on BROKEN_ON_SMP | ||
| 1705 | help | 1706 | help |
| 1706 | Select this option if building a guest kernel for KVM (Trap & Emulate) mode | 1707 | Select this option if building a guest kernel for KVM (Trap & Emulate) mode |
| 1707 | 1708 | ||
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c index 7b746e7bf7a1..1830874ff1e2 100644 --- a/arch/mips/cavium-octeon/octeon-platform.c +++ b/arch/mips/cavium-octeon/octeon-platform.c | |||
| @@ -334,9 +334,10 @@ static void __init octeon_fdt_pip_iface(int pip, int idx, u64 *pmac) | |||
| 334 | char name_buffer[20]; | 334 | char name_buffer[20]; |
| 335 | int iface; | 335 | int iface; |
| 336 | int p; | 336 | int p; |
| 337 | int count; | 337 | int count = 0; |
| 338 | 338 | ||
| 339 | count = cvmx_helper_interface_enumerate(idx); | 339 | if (cvmx_helper_interface_enumerate(idx) == 0) |
| 340 | count = cvmx_helper_ports_on_interface(idx); | ||
| 340 | 341 | ||
| 341 | snprintf(name_buffer, sizeof(name_buffer), "interface@%d", idx); | 342 | snprintf(name_buffer, sizeof(name_buffer), "interface@%d", idx); |
| 342 | iface = fdt_subnode_offset(initial_boot_params, pip, name_buffer); | 343 | iface = fdt_subnode_offset(initial_boot_params, pip, name_buffer); |
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c index 76f31353e718..c0bb4d59076a 100644 --- a/arch/mips/kernel/smp-bmips.c +++ b/arch/mips/kernel/smp-bmips.c | |||
| @@ -173,7 +173,7 @@ static void bmips_boot_secondary(int cpu, struct task_struct *idle) | |||
| 173 | else { | 173 | else { |
| 174 | #if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380) | 174 | #if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380) |
| 175 | /* Reset slave TP1 if booting from TP0 */ | 175 | /* Reset slave TP1 if booting from TP0 */ |
| 176 | if (cpu_logical_map(cpu) == 0) | 176 | if (cpu_logical_map(cpu) == 1) |
| 177 | set_c0_brcm_cmt_ctrl(0x01); | 177 | set_c0_brcm_cmt_ctrl(0x01); |
| 178 | #elif defined(CONFIG_CPU_BMIPS5000) | 178 | #elif defined(CONFIG_CPU_BMIPS5000) |
| 179 | if (cpu & 0x01) | 179 | if (cpu & 0x01) |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index c89568f88bfd..aec3408edd4b 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
| @@ -1242,7 +1242,6 @@ asmlinkage void do_mcheck(struct pt_regs *regs) | |||
| 1242 | panic("Caught Machine Check exception - %scaused by multiple " | 1242 | panic("Caught Machine Check exception - %scaused by multiple " |
| 1243 | "matching entries in the TLB.", | 1243 | "matching entries in the TLB.", |
| 1244 | (multi_match) ? "" : "not "); | 1244 | (multi_match) ? "" : "not "); |
| 1245 | exception_exit(prev_state); | ||
| 1246 | } | 1245 | } |
| 1247 | 1246 | ||
| 1248 | asmlinkage void do_mt(struct pt_regs *regs) | 1247 | asmlinkage void do_mt(struct pt_regs *regs) |
diff --git a/arch/mips/kvm/Kconfig b/arch/mips/kvm/Kconfig index 2c15590e55f7..30e334e823bd 100644 --- a/arch/mips/kvm/Kconfig +++ b/arch/mips/kvm/Kconfig | |||
| @@ -5,7 +5,6 @@ source "virt/kvm/Kconfig" | |||
| 5 | 5 | ||
| 6 | menuconfig VIRTUALIZATION | 6 | menuconfig VIRTUALIZATION |
| 7 | bool "Virtualization" | 7 | bool "Virtualization" |
| 8 | depends on HAVE_KVM | ||
| 9 | ---help--- | 8 | ---help--- |
| 10 | Say Y here to get to see options for using your Linux host to run | 9 | Say Y here to get to see options for using your Linux host to run |
| 11 | other operating systems inside virtual machines (guests). | 10 | other operating systems inside virtual machines (guests). |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 34fce2b2095b..556cb4815770 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
| @@ -1456,7 +1456,7 @@ static void build_r4000_setup_pgd(void) | |||
| 1456 | { | 1456 | { |
| 1457 | const int a0 = 4; | 1457 | const int a0 = 4; |
| 1458 | const int a1 = 5; | 1458 | const int a1 = 5; |
| 1459 | u32 *p = tlbmiss_handler_setup_pgd_array; | 1459 | u32 *p = tlbmiss_handler_setup_pgd; |
| 1460 | const int tlbmiss_handler_setup_pgd_size = | 1460 | const int tlbmiss_handler_setup_pgd_size = |
| 1461 | tlbmiss_handler_setup_pgd_end - tlbmiss_handler_setup_pgd; | 1461 | tlbmiss_handler_setup_pgd_end - tlbmiss_handler_setup_pgd; |
| 1462 | struct uasm_label *l = labels; | 1462 | struct uasm_label *l = labels; |
| @@ -1793,7 +1793,7 @@ static void build_r3000_tlb_store_handler(void) | |||
| 1793 | uasm_i_j(&p, (unsigned long)tlb_do_page_fault_1 & 0x0fffffff); | 1793 | uasm_i_j(&p, (unsigned long)tlb_do_page_fault_1 & 0x0fffffff); |
| 1794 | uasm_i_nop(&p); | 1794 | uasm_i_nop(&p); |
| 1795 | 1795 | ||
| 1796 | if (p >= handle_tlbs) | 1796 | if (p >= handle_tlbs_end) |
| 1797 | panic("TLB store handler fastpath space exceeded"); | 1797 | panic("TLB store handler fastpath space exceeded"); |
| 1798 | 1798 | ||
| 1799 | uasm_resolve_relocs(relocs, labels); | 1799 | uasm_resolve_relocs(relocs, labels); |
diff --git a/arch/mips/netlogic/common/irq.c b/arch/mips/netlogic/common/irq.c index 73facb2b33bb..1c7e3a1b81ab 100644 --- a/arch/mips/netlogic/common/irq.c +++ b/arch/mips/netlogic/common/irq.c | |||
| @@ -40,6 +40,10 @@ | |||
| 40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
| 41 | #include <linux/irq.h> | 41 | #include <linux/irq.h> |
| 42 | 42 | ||
| 43 | #include <linux/irqdomain.h> | ||
| 44 | #include <linux/of_address.h> | ||
| 45 | #include <linux/of_irq.h> | ||
| 46 | |||
| 43 | #include <asm/errno.h> | 47 | #include <asm/errno.h> |
| 44 | #include <asm/signal.h> | 48 | #include <asm/signal.h> |
| 45 | #include <asm/ptrace.h> | 49 | #include <asm/ptrace.h> |
| @@ -223,17 +227,6 @@ static void nlm_init_node_irqs(int node) | |||
| 223 | nodep->irqmask = irqmask; | 227 | nodep->irqmask = irqmask; |
| 224 | } | 228 | } |
| 225 | 229 | ||
| 226 | void __init arch_init_irq(void) | ||
| 227 | { | ||
| 228 | /* Initialize the irq descriptors */ | ||
| 229 | nlm_init_percpu_irqs(); | ||
| 230 | nlm_init_node_irqs(0); | ||
| 231 | write_c0_eimr(nlm_current_node()->irqmask); | ||
| 232 | #if defined(CONFIG_CPU_XLR) | ||
| 233 | nlm_setup_fmn_irq(); | ||
| 234 | #endif | ||
| 235 | } | ||
| 236 | |||
| 237 | void nlm_smp_irq_init(int hwcpuid) | 230 | void nlm_smp_irq_init(int hwcpuid) |
| 238 | { | 231 | { |
| 239 | int node, cpu; | 232 | int node, cpu; |
| @@ -266,3 +259,56 @@ asmlinkage void plat_irq_dispatch(void) | |||
| 266 | /* top level irq handling */ | 259 | /* top level irq handling */ |
| 267 | do_IRQ(nlm_irq_to_xirq(node, i)); | 260 | do_IRQ(nlm_irq_to_xirq(node, i)); |
| 268 | } | 261 | } |
| 262 | |||
| 263 | #ifdef CONFIG_OF | ||
| 264 | static struct irq_domain *xlp_pic_domain; | ||
| 265 | |||
| 266 | static const struct irq_domain_ops xlp_pic_irq_domain_ops = { | ||
| 267 | .xlate = irq_domain_xlate_onetwocell, | ||
| 268 | }; | ||
| 269 | |||
| 270 | static int __init xlp_of_pic_init(struct device_node *node, | ||
| 271 | struct device_node *parent) | ||
| 272 | { | ||
| 273 | const int n_picirqs = PIC_IRT_LAST_IRQ - PIC_IRQ_BASE + 1; | ||
| 274 | struct resource res; | ||
| 275 | int socid, ret; | ||
| 276 | |||
| 277 | /* we need a hack to get the PIC's SoC chip id */ | ||
| 278 | ret = of_address_to_resource(node, 0, &res); | ||
| 279 | if (ret < 0) { | ||
| 280 | pr_err("PIC %s: reg property not found!\n", node->name); | ||
| 281 | return -EINVAL; | ||
| 282 | } | ||
| 283 | socid = (res.start >> 18) & 0x3; | ||
| 284 | xlp_pic_domain = irq_domain_add_legacy(node, n_picirqs, | ||
| 285 | nlm_irq_to_xirq(socid, PIC_IRQ_BASE), PIC_IRQ_BASE, | ||
| 286 | &xlp_pic_irq_domain_ops, NULL); | ||
| 287 | if (xlp_pic_domain == NULL) { | ||
| 288 | pr_err("PIC %s: Creating legacy domain failed!\n", node->name); | ||
| 289 | return -EINVAL; | ||
| 290 | } | ||
| 291 | pr_info("Node %d: IRQ domain created for PIC@%pa\n", socid, | ||
| 292 | &res.start); | ||
| 293 | return 0; | ||
| 294 | } | ||
| 295 | |||
| 296 | static struct of_device_id __initdata xlp_pic_irq_ids[] = { | ||
| 297 | { .compatible = "netlogic,xlp-pic", .data = xlp_of_pic_init }, | ||
| 298 | {}, | ||
| 299 | }; | ||
| 300 | #endif | ||
| 301 | |||
| 302 | void __init arch_init_irq(void) | ||
| 303 | { | ||
| 304 | /* Initialize the irq descriptors */ | ||
| 305 | nlm_init_percpu_irqs(); | ||
| 306 | nlm_init_node_irqs(0); | ||
| 307 | write_c0_eimr(nlm_current_node()->irqmask); | ||
| 308 | #if defined(CONFIG_CPU_XLR) | ||
| 309 | nlm_setup_fmn_irq(); | ||
| 310 | #endif | ||
| 311 | #if defined(CONFIG_OF) | ||
| 312 | of_irq_init(xlp_pic_irq_ids); | ||
| 313 | #endif | ||
| 314 | } | ||
diff --git a/arch/mips/netlogic/dts/xlp_evp.dts b/arch/mips/netlogic/dts/xlp_evp.dts index e14f42308064..06407033678e 100644 --- a/arch/mips/netlogic/dts/xlp_evp.dts +++ b/arch/mips/netlogic/dts/xlp_evp.dts | |||
| @@ -76,10 +76,11 @@ | |||
| 76 | }; | 76 | }; |
| 77 | }; | 77 | }; |
| 78 | pic: pic@4000 { | 78 | pic: pic@4000 { |
| 79 | interrupt-controller; | 79 | compatible = "netlogic,xlp-pic"; |
| 80 | #address-cells = <0>; | 80 | #address-cells = <0>; |
| 81 | #interrupt-cells = <1>; | 81 | #interrupt-cells = <1>; |
| 82 | reg = <0 0x4000 0x200>; | 82 | reg = <0 0x4000 0x200>; |
| 83 | interrupt-controller; | ||
| 83 | }; | 84 | }; |
| 84 | 85 | ||
| 85 | nor_flash@1,0 { | 86 | nor_flash@1,0 { |
diff --git a/arch/mips/netlogic/dts/xlp_svp.dts b/arch/mips/netlogic/dts/xlp_svp.dts index 8af4bdbe5d99..9c5db102df53 100644 --- a/arch/mips/netlogic/dts/xlp_svp.dts +++ b/arch/mips/netlogic/dts/xlp_svp.dts | |||
| @@ -76,10 +76,11 @@ | |||
| 76 | }; | 76 | }; |
| 77 | }; | 77 | }; |
| 78 | pic: pic@4000 { | 78 | pic: pic@4000 { |
| 79 | interrupt-controller; | 79 | compatible = "netlogic,xlp-pic"; |
| 80 | #address-cells = <0>; | 80 | #address-cells = <0>; |
| 81 | #interrupt-cells = <1>; | 81 | #interrupt-cells = <1>; |
| 82 | reg = <0 0x4000 0x200>; | 82 | reg = <0 0x4000 0x200>; |
| 83 | interrupt-controller; | ||
| 83 | }; | 84 | }; |
| 84 | 85 | ||
| 85 | nor_flash@1,0 { | 86 | nor_flash@1,0 { |
diff --git a/arch/mips/netlogic/xlp/usb-init.c b/arch/mips/netlogic/xlp/usb-init.c index 9c401dd78337..ef3897ef0dc7 100644 --- a/arch/mips/netlogic/xlp/usb-init.c +++ b/arch/mips/netlogic/xlp/usb-init.c | |||
| @@ -119,7 +119,7 @@ static u64 xlp_usb_dmamask = ~(u32)0; | |||
| 119 | static void nlm_usb_fixup_final(struct pci_dev *dev) | 119 | static void nlm_usb_fixup_final(struct pci_dev *dev) |
| 120 | { | 120 | { |
| 121 | dev->dev.dma_mask = &xlp_usb_dmamask; | 121 | dev->dev.dma_mask = &xlp_usb_dmamask; |
| 122 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(64); | 122 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); |
| 123 | switch (dev->devfn) { | 123 | switch (dev->devfn) { |
| 124 | case 0x10: | 124 | case 0x10: |
| 125 | dev->irq = PIC_EHCI_0_IRQ; | 125 | dev->irq = PIC_EHCI_0_IRQ; |
