From d8573e20d5d6974305599dde42b5dd7583310ccf Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 13 Jul 2006 16:05:26 -0700 Subject: [PATCH 1/5] [SPARC64]: Make sure IRQs are disabled properly during early boot. Else we trigger the new irqs_disable() assertion in start_kernel(). Signed-off-by: David S. Miller --- arch/sparc64/kernel/head.S | 13 ++++++------- arch/sparc64/kernel/time.c | 2 -- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index 75684b56767e..c8e9dc9d68a9 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S @@ -551,9 +551,10 @@ setup_trap_table: save %sp, -192, %sp /* Force interrupts to be disabled. */ - rdpr %pstate, %o1 - andn %o1, PSTATE_IE, %o1 + rdpr %pstate, %l0 + andn %l0, PSTATE_IE, %o1 wrpr %o1, 0x0, %pstate + rdpr %pil, %l1 wrpr %g0, 15, %pil /* Make the firmware call to jump over to the Linux trap table. */ @@ -622,11 +623,9 @@ setup_trap_table: call init_irqwork_curcpu nop - /* Now we can turn interrupts back on. */ - rdpr %pstate, %o1 - or %o1, PSTATE_IE, %o1 - wrpr %o1, 0, %pstate - wrpr %g0, 0x0, %pil + /* Now we can restore interrupt state. */ + wrpr %l0, 0, %pstate + wrpr %l1, 0x0, %pil ret restore diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index b43de647ba73..094d3e35be18 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c @@ -928,8 +928,6 @@ static void sparc64_start_timers(void) __asm__ __volatile__("wrpr %0, 0x0, %%pstate" : /* no outputs */ : "r" (pstate)); - - local_irq_enable(); } struct freq_table { From c964521c54304f51705764334f7b27a9518ed65a Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 13 Jul 2006 16:05:57 -0700 Subject: [PATCH 2/5] [SERIAL] sunsu: Report keyboard and mouse ports in kernel log. Otherwise there is no explicit mention of these devices. Signed-off-by: David S. Miller --- drivers/serial/sunsu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 93bdaa3169fc..d3a5aeee73a3 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c @@ -1200,6 +1200,11 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up) if (up->port.type == PORT_UNKNOWN) return -ENODEV; + printk("%s: %s port at %lx, irq %u\n", + to_of_device(up->port.dev)->node->full_name, + (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", + up->port.mapbase, up->port.irq); + #ifdef CONFIG_SERIO serio = &up->serio; serio->port_data = up; From 5b4bbb3d78285ab735941365c17f1c55a228c659 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 13 Jul 2006 16:07:25 -0700 Subject: [PATCH 3/5] [SERIAL] sunsab: Fix significant typo in sab_probe() Instead of initializing both ports of a SAB device properly, we were setting up the first port structure twice and ending up only with the second port, oops. Signed-off-by: David S. Miller --- drivers/serial/sunsab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 0dbd4df44c05..979497f108c8 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c @@ -1052,7 +1052,7 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id * if (err) return err; - err = sunsab_init_one(&up[0], op, 0, + err = sunsab_init_one(&up[1], op, 0, (inst * 2) + 1); if (err) { of_iounmap(up[0].port.membase, From a49261585e2c89f16b5a4bb80f623d2e9c2c1566 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Fri, 14 Jul 2006 16:49:55 -0700 Subject: [PATCH 4/5] [SPARC64] psycho: Fix pbm->name handling in pbm_register_toplevel_resources() We shouldn't overwrite it, it's the device node full name already and that's what we want. Based upon a report from Marc Zyngier. Signed-off-by: David S. Miller --- arch/sparc64/kernel/pci_psycho.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c index 197a7ffd57ee..83f88ad4ffa5 100644 --- a/arch/sparc64/kernel/pci_psycho.c +++ b/arch/sparc64/kernel/pci_psycho.c @@ -1099,9 +1099,6 @@ static void pbm_register_toplevel_resources(struct pci_controller_info *p, { char *name = pbm->name; - sprintf(name, "PSYCHO%d PBM%c", - p->index, - (pbm == &p->pbm_A ? 'A' : 'B')); pbm->io_space.name = pbm->mem_space.name = name; request_resource(&ioport_resource, &pbm->io_space); From ee7022dcfbf660727d6b8553cb0dbc0d4eae8f44 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Fri, 14 Jul 2006 16:53:50 -0700 Subject: [PATCH 5/5] [SPARC64] Fix PSYCHO PCI controler init. pbm->name should be initialized before calling pbm_register_toplevel_resources. Move the call a few lines down to avoid a nice Oops. Signed-off-by: Marc Zyngier Signed-off-by: David S. Miller --- arch/sparc64/kernel/pci_psycho.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c index 83f88ad4ffa5..1ec0aab68c08 100644 --- a/arch/sparc64/kernel/pci_psycho.c +++ b/arch/sparc64/kernel/pci_psycho.c @@ -1200,12 +1200,13 @@ static void psycho_pbm_init(struct pci_controller_info *p, pbm->io_space.flags = IORESOURCE_IO; pbm->mem_space.end = pbm->mem_space.start + PSYCHO_MEMSPACE_SIZE; pbm->mem_space.flags = IORESOURCE_MEM; - pbm_register_toplevel_resources(p, pbm); pbm->parent = p; pbm->prom_node = dp; pbm->name = dp->full_name; + pbm_register_toplevel_resources(p, pbm); + printk("%s: PSYCHO PCI Bus Module ver[%x:%x]\n", pbm->name, pbm->chip_version, pbm->chip_revision);