Skip to content

Commit 1b05018

Browse files
committed
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fixes from Ralf Baechle: "MIPS fixes for 3.11. Half of then is for Netlogic the remainder touches things across arch/mips. Nothing really dramatic and by rc1 standards MIPS will be in fairly good shape with this applied. Tested by building all MIPS defconfigs of which with this pull request four platforms won't build. And yes, it boots also on my favorite test systems" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: kvm: Kconfig: Drop HAVE_KVM dependency from VIRTUALIZATION MIPS: Octeon: Fix DT pruning bug with pip ports MIPS: KVM: Mark KVM_GUEST (T&E KVM) as BROKEN_ON_SMP MIPS: tlbex: fix broken build in v3.11-rc1 MIPS: Netlogic: Add XLP PIC irqdomain MIPS: Netlogic: Fix USB block's coherent DMA mask MIPS: tlbex: Fix typo in r3000 tlb store handler MIPS: BMIPS: Fix thinko to release slave TP from reset MIPS: Delete dead invocation of exception_exit().
2 parents 89d0abe + f1b7001 commit 1b05018

File tree

10 files changed

+69
-21
lines changed

10 files changed

+69
-21
lines changed

arch/mips/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,6 +1702,7 @@ endchoice
17021702

17031703
config KVM_GUEST
17041704
bool "KVM Guest Kernel"
1705+
depends on BROKEN_ON_SMP
17051706
help
17061707
Select this option if building a guest kernel for KVM (Trap & Emulate) mode
17071708

arch/mips/cavium-octeon/octeon-platform.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,10 @@ static void __init octeon_fdt_pip_iface(int pip, int idx, u64 *pmac)
334334
char name_buffer[20];
335335
int iface;
336336
int p;
337-
int count;
337+
int count = 0;
338338

339-
count = cvmx_helper_interface_enumerate(idx);
339+
if (cvmx_helper_interface_enumerate(idx) == 0)
340+
count = cvmx_helper_ports_on_interface(idx);
340341

341342
snprintf(name_buffer, sizeof(name_buffer), "interface@%d", idx);
342343
iface = fdt_subnode_offset(initial_boot_params, pip, name_buffer);

arch/mips/kernel/smp-bmips.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static void bmips_boot_secondary(int cpu, struct task_struct *idle)
173173
else {
174174
#if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380)
175175
/* Reset slave TP1 if booting from TP0 */
176-
if (cpu_logical_map(cpu) == 0)
176+
if (cpu_logical_map(cpu) == 1)
177177
set_c0_brcm_cmt_ctrl(0x01);
178178
#elif defined(CONFIG_CPU_BMIPS5000)
179179
if (cpu & 0x01)

arch/mips/kernel/traps.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,6 @@ asmlinkage void do_mcheck(struct pt_regs *regs)
12421242
panic("Caught Machine Check exception - %scaused by multiple "
12431243
"matching entries in the TLB.",
12441244
(multi_match) ? "" : "not ");
1245-
exception_exit(prev_state);
12461245
}
12471246

12481247
asmlinkage void do_mt(struct pt_regs *regs)

arch/mips/kvm/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ source "virt/kvm/Kconfig"
55

66
menuconfig VIRTUALIZATION
77
bool "Virtualization"
8-
depends on HAVE_KVM
98
---help---
109
Say Y here to get to see options for using your Linux host to run
1110
other operating systems inside virtual machines (guests).

arch/mips/mm/tlbex.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,7 @@ static void build_r4000_setup_pgd(void)
14561456
{
14571457
const int a0 = 4;
14581458
const int a1 = 5;
1459-
u32 *p = tlbmiss_handler_setup_pgd_array;
1459+
u32 *p = tlbmiss_handler_setup_pgd;
14601460
const int tlbmiss_handler_setup_pgd_size =
14611461
tlbmiss_handler_setup_pgd_end - tlbmiss_handler_setup_pgd;
14621462
struct uasm_label *l = labels;
@@ -1793,7 +1793,7 @@ static void build_r3000_tlb_store_handler(void)
17931793
uasm_i_j(&p, (unsigned long)tlb_do_page_fault_1 & 0x0fffffff);
17941794
uasm_i_nop(&p);
17951795

1796-
if (p >= handle_tlbs)
1796+
if (p >= handle_tlbs_end)
17971797
panic("TLB store handler fastpath space exceeded");
17981798

17991799
uasm_resolve_relocs(relocs, labels);

arch/mips/netlogic/common/irq.c

Lines changed: 57 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
#include <linux/slab.h>
4141
#include <linux/irq.h>
4242

43+
#include <linux/irqdomain.h>
44+
#include <linux/of_address.h>
45+
#include <linux/of_irq.h>
46+
4347
#include <asm/errno.h>
4448
#include <asm/signal.h>
4549
#include <asm/ptrace.h>
@@ -223,17 +227,6 @@ static void nlm_init_node_irqs(int node)
223227
nodep->irqmask = irqmask;
224228
}
225229

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-
237230
void nlm_smp_irq_init(int hwcpuid)
238231
{
239232
int node, cpu;
@@ -266,3 +259,56 @@ asmlinkage void plat_irq_dispatch(void)
266259
/* top level irq handling */
267260
do_IRQ(nlm_irq_to_xirq(node, i));
268261
}
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+
}

arch/mips/netlogic/dts/xlp_evp.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@
7676
};
7777
};
7878
pic: pic@4000 {
79-
interrupt-controller;
79+
compatible = "netlogic,xlp-pic";
8080
#address-cells = <0>;
8181
#interrupt-cells = <1>;
8282
reg = <0 0x4000 0x200>;
83+
interrupt-controller;
8384
};
8485

8586
nor_flash@1,0 {

arch/mips/netlogic/dts/xlp_svp.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@
7676
};
7777
};
7878
pic: pic@4000 {
79-
interrupt-controller;
79+
compatible = "netlogic,xlp-pic";
8080
#address-cells = <0>;
8181
#interrupt-cells = <1>;
8282
reg = <0 0x4000 0x200>;
83+
interrupt-controller;
8384
};
8485

8586
nor_flash@1,0 {

arch/mips/netlogic/xlp/usb-init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static u64 xlp_usb_dmamask = ~(u32)0;
119119
static void nlm_usb_fixup_final(struct pci_dev *dev)
120120
{
121121
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);
123123
switch (dev->devfn) {
124124
case 0x10:
125125
dev->irq = PIC_EHCI_0_IRQ;

0 commit comments

Comments
 (0)