From 67bace72ee64f6a11cfb914b91d9d6bd47e80ed8 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Mon, 29 Nov 2010 20:34:38 -0500 Subject: parisc: remove redundant initialization in sigsegv path of sys_rt_sigreturn Noticed-by: Randy Dunlap Signed-off-by: Kyle McMartin diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 35c827e..609a331 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c @@ -98,7 +98,6 @@ void sys_rt_sigreturn(struct pt_regs *regs, int in_syscall) { struct rt_sigframe __user *frame; - struct siginfo si; sigset_t set; unsigned long usp = (regs->gr[30] & ~(0x01UL)); unsigned long sigframe_size = PARISC_RT_SIGFRAME_SIZE; @@ -178,13 +177,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall) give_sigsegv: DBG(1,"sys_rt_sigreturn: Sending SIGSEGV\n"); - si.si_signo = SIGSEGV; - si.si_errno = 0; - si.si_code = SI_KERNEL; - si.si_pid = task_pid_vnr(current); - si.si_uid = current_uid(); - si.si_addr = &frame->uc; - force_sig_info(SIGSEGV, &si, current); + force_sig(SIGSEGV, current); return; } -- cgit v0.10.2 From d16cd297d288e48482c3c261db434a2e13bd9f20 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Thu, 2 Dec 2010 23:36:47 +0000 Subject: parisc: fix dino/gsc interrupts The essential problem we're currently having is that dino (and gsc) is a cascaded CPU interrupt. Under the old __do_IRQ() handler, our CPU interrupts basically did an ack followed by an end. In the new scheme, we replaced them with level handlers which do a mask, an ack and then an unmask (but no end). Instead, with the renaming of end to eoi, we actually want to call the percpu flow handlers, because they actually have all the characteristics we want. This patch does the conversion and gets my C360 booting again. Signed-off-by: James Bottomley Signed-off-by: Kyle McMartin diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index 5024f64..48aa711 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -392,7 +392,7 @@ static void claim_cpu_irqs(void) int i; for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) { set_irq_chip_and_handler(i, &cpu_interrupt_type, - handle_level_irq); + handle_percpu_irq); } set_irq_handler(TIMER_IRQ, handle_percpu_irq); -- cgit v0.10.2 From 51890613f2bfa70453a5cc22c91c63946dd311cd Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Fri, 3 Dec 2010 02:01:05 +0000 Subject: parisc: convert the rest of the irq handlers to simple/percpu The generic conversion eliminates the spurious no_ack and no_end routines, converts all the cascaded handlers to handle_simple_irq() and makes iosapic use a modified handle_percpu_irq() to become the same as the CPU irq's. This isn't an essential change, but it eliminates the mask/unmask overhead of handle_level_irq(). Signed-off-by: James Bottomley Tested-by: Helge Deller Signed-off-by: Kyle McMartin diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index 48aa711..d7d94b8 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -75,9 +75,6 @@ static void cpu_unmask_irq(unsigned int irq) smp_send_all_nop(); } -void no_ack_irq(unsigned int irq) { } -void no_end_irq(unsigned int irq) { } - void cpu_ack_irq(unsigned int irq) { unsigned long mask = EIEM_MASK(irq); @@ -241,7 +238,7 @@ int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data) /* for iosapic interrupts */ if (type) { - set_irq_chip_and_handler(irq, type, handle_level_irq); + set_irq_chip_and_handler(irq, type, handle_percpu_irq); set_irq_chip_data(irq, data); cpu_unmask_irq(irq); } diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index d9f5148..9383063 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c @@ -349,7 +349,6 @@ static struct irq_chip dino_interrupt_type = { .name = "GSC-PCI", .unmask = dino_unmask_irq, .mask = dino_mask_irq, - .ack = no_ack_irq, }; diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c index 1211974..e860038 100644 --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c @@ -186,7 +186,6 @@ static struct irq_chip eisa_interrupt_type = { .name = "EISA", .unmask = eisa_unmask_irq, .mask = eisa_mask_irq, - .ack = no_ack_irq, }; static irqreturn_t eisa_irq(int wax_irq, void *intr_dev) @@ -340,7 +339,7 @@ static int __init eisa_probe(struct parisc_device *dev) setup_irq(2, &irq2_action); for (i = 0; i < 16; i++) { set_irq_chip_and_handler(i, &eisa_interrupt_type, - handle_level_irq); + handle_simple_irq); } EISA_bus = 1; diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c index e605298..772b193 100644 --- a/drivers/parisc/gsc.c +++ b/drivers/parisc/gsc.c @@ -143,7 +143,6 @@ static struct irq_chip gsc_asic_interrupt_type = { .name = "GSC-ASIC", .unmask = gsc_asic_unmask_irq, .mask = gsc_asic_mask_irq, - .ack = no_ack_irq, }; int gsc_assign_irq(struct irq_chip *type, void *data) @@ -153,7 +152,7 @@ int gsc_assign_irq(struct irq_chip *type, void *data) if (irq > GSC_IRQ_MAX) return NO_IRQ; - set_irq_chip_and_handler(irq, type, handle_level_irq); + set_irq_chip_and_handler(irq, type, handle_simple_irq); set_irq_chip_data(irq, data); return irq++; diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index a3120a0..0327894 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c @@ -669,6 +669,13 @@ printk("\n"); DBG(KERN_DEBUG "enable_irq(%d): eoi(%p, 0x%x)\n", irq, vi->eoi_addr, vi->eoi_data); iosapic_eoi(vi->eoi_addr, vi->eoi_data); +} + +static void iosapic_eoi_irq(unsigned int irq) +{ + struct vector_info *vi = get_irq_chip_data(irq); + + iosapic_eoi(vi->eoi_addr, vi->eoi_data); cpu_eoi_irq(irq); } @@ -705,6 +712,7 @@ static struct irq_chip iosapic_interrupt_type = { .unmask = iosapic_unmask_irq, .mask = iosapic_mask_irq, .ack = cpu_ack_irq, + .eoi = iosapic_eoi_irq, #ifdef CONFIG_SMP .set_affinity = iosapic_set_affinity_irq, #endif diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c index 0846daf..2824153 100644 --- a/drivers/parisc/superio.c +++ b/drivers/parisc/superio.c @@ -323,7 +323,6 @@ static struct irq_chip superio_interrupt_type = { .name = SUPERIO, .unmask = superio_unmask_irq, .mask = superio_mask_irq, - .ack = no_ack_irq, }; #ifdef DEBUG_SUPERIO_INIT @@ -354,7 +353,7 @@ int superio_fixup_irq(struct pci_dev *pcidev) #endif for (i = 0; i < 16; i++) { - set_irq_chip_and_handler(i, &superio_interrupt_type, handle_level_irq); + set_irq_chip_and_handler(i, &superio_interrupt_type, handle_simple_irq); } /* -- cgit v0.10.2 From 79a04296231171157031d0bd8cd4038317e13cf2 Mon Sep 17 00:00:00 2001 From: Guy Martin Date: Sat, 6 Nov 2010 16:24:29 +0000 Subject: parisc: KittyHawk LCD fix K class aka KittyHawk don't have LED support on their LCD. Installing HP-UX confirmed this. The current led_wq fills the LCD with black characters each time it runs. The patch prevents the led_wq workqueue and its proc entry to be created for KittyHawk machines. It also increase min_cmd_delay as currently, one character out of two is lost when a string is sent to the LCD. Signed-off-by: Guy Martin Signed-off-by: Kyle McMartin diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 2350e8a..f2f501e 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c @@ -64,6 +64,7 @@ static unsigned int led_diskio __read_mostly = 1; static unsigned int led_lanrxtx __read_mostly = 1; static char lcd_text[32] __read_mostly; static char lcd_text_default[32] __read_mostly; +static int lcd_no_led_support __read_mostly = 0; /* KittyHawk doesn't support LED on its LCD */ static struct workqueue_struct *led_wq; @@ -115,7 +116,7 @@ lcd_info __attribute__((aligned(8))) __read_mostly = .lcd_width = 16, .lcd_cmd_reg_addr = KITTYHAWK_LCD_CMD, .lcd_data_reg_addr = KITTYHAWK_LCD_DATA, - .min_cmd_delay = 40, + .min_cmd_delay = 80, .reset_cmd1 = 0x80, .reset_cmd2 = 0xc0, }; @@ -135,6 +136,9 @@ static int start_task(void) /* Display the default text now */ if (led_type == LED_HASLCD) lcd_print( lcd_text_default ); + /* KittyHawk has no LED support on its LCD */ + if (lcd_no_led_support) return 0; + /* Create the work queue and queue the LED task */ led_wq = create_singlethread_workqueue("led_wq"); queue_delayed_work(led_wq, &led_task, 0); @@ -248,9 +252,13 @@ static int __init led_create_procfs(void) proc_pdc_root = proc_mkdir("pdc", 0); if (!proc_pdc_root) return -1; - ent = proc_create_data("led", S_IRUGO|S_IWUSR, proc_pdc_root, - &led_proc_fops, (void *)LED_NOLCD); /* LED */ - if (!ent) return -1; + + if (!lcd_no_led_support) + { + ent = proc_create_data("led", S_IRUGO|S_IWUSR, proc_pdc_root, + &led_proc_fops, (void *)LED_NOLCD); /* LED */ + if (!ent) return -1; + } if (led_type == LED_HASLCD) { @@ -692,6 +700,7 @@ int __init led_init(void) case 0x58B: /* KittyHawk DC2 100 (K200) */ printk(KERN_INFO "%s: KittyHawk-Machine (hversion 0x%x) found, " "LED detection skipped.\n", __FILE__, CPU_HVERSION); + lcd_no_led_support = 1; goto found; /* use the preinitialized values of lcd_info */ } -- cgit v0.10.2 From 7bfbeae9c78fb9404ccbd62a25c82f5860432ac9 Mon Sep 17 00:00:00 2001 From: Guy Martin Date: Tue, 2 Nov 2010 15:23:08 +0000 Subject: parisc: Fix GSC PS/2 driver name for keyboard and mouse Fix kernel warnings caused by the driver name of GSC PS/2 containing '/'. The following warnings are observed on a K410 system : [ 10.700000] name 'GSC PS/2 keyboard' [ 10.732000] ------------[ cut here ]------------ [ 10.772000] WARNING: at fs/proc/generic.c:323 [ 10.828000] Modules linked in: [ 10.916000] [ 10.916000] YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI [ 10.936000] PSW: 00000000000001000000000000001111 Not tainted [ 10.992000] r00-03 0004000f 104fe3e0 10201ea0 00000000 [ 11.060000] r04-07 4fc405c8 00000006 4fc405c8 4fc40694 [ 11.124000] r08-11 4fc40708 10438aa0 00000001 1043bfc8 [ 11.184000] r12-15 104ff2a0 104ff2a0 4fc38634 104ff2a0 [ 11.248000] r16-19 f0001570 10479af0 f000006c 1044fe50 [ 11.308000] r20-23 00000000 00000028 104cd858 00000000 [ 11.372000] r24-27 ffffffff 0000000e 1044fe10 1043bbe0 [ 11.436000] r28-31 0000002b 00000078 4fc40800 0000000d [ 11.496000] sr00-03 00000000 00000000 00000000 00000000 [ 11.560000] sr04-07 00000000 00000000 00000000 00000000 [ 11.624000] [ 11.688000] IASQ: 00000000 00000000 IAOQ: 10201ea0 10201ea4 [ 11.704000] IIR: 03ffe01f ISR: 00000000 IOR: 0000000d [ 11.772000] CPU: 0 CR30: 4fc40000 CR31: f01043b0 [ 11.836000] ORIG_R28: 4fc40940 [ 11.904000] IAOQ[0]: __xlate_proc_name+0x90/0xd0 [ 11.940000] IAOQ[1]: __xlate_proc_name+0x94/0xd0 [ 11.996000] RP(r2): __xlate_proc_name+0x90/0xd0 [ 12.052000] Backtrace: [ 12.108000] [<10257790>] vsnprintf+0x290/0x4f4 [ 12.136000] [ 12.188000] ---[ end trace 91bf6ece17e322dd ]--- [ 12.208000] serio: GSC PS/2 keyboard port at 0x0001c000 irq 19 @ 10:12:7 [ 12.264000] name 'GSC PS/2 mouse' [ 12.344000] ------------[ cut here ]------------ [ 12.384000] WARNING: at fs/proc/generic.c:323 [ 12.436000] Modules linked in: [ 12.524000] [ 12.528000] YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI [ 12.544000] PSW: 00000000000001000000000000001111 Tainted: G W [ 12.600000] r00-03 0004000f 104fe3e0 10201ea0 00000000 [ 12.680000] r04-07 4fc405c8 00000006 4fc405c8 4fc40694 [ 12.740000] r08-11 4fc40708 10438aa0 00000001 1043bfc8 [ 12.804000] r12-15 104ff2a0 104ff2a0 4fc38634 104ff2a0 [ 12.868000] r16-19 f0001570 10479af0 f000006c 1044fe50 [ 12.928000] r20-23 00000000 00000025 104cd858 00000000 [ 12.992000] r24-27 ffffffff 0000000e 1044fe10 1043bbe0 [ 13.056000] r28-31 00000028 00000078 4fc40800 0000000d [ 13.116000] sr00-03 00000000 00000000 00000000 00000000 [ 13.180000] sr04-07 00000000 00000000 00000000 00000000 [ 13.244000] [ 13.308000] IASQ: 00000000 00000000 IAOQ: 10201ea0 10201ea4 [ 13.324000] IIR: 03ffe01f ISR: 00000000 IOR: 0000000d [ 13.392000] CPU: 0 CR30: 4fc40000 CR31: f01043b0 [ 13.456000] ORIG_R28: 4fc40940 [ 13.524000] IAOQ[0]: __xlate_proc_name+0x90/0xd0 [ 13.560000] IAOQ[1]: __xlate_proc_name+0x94/0xd0 [ 13.616000] RP(r2): __xlate_proc_name+0x90/0xd0 [ 13.672000] Backtrace: [ 13.728000] [<10257790>] vsnprintf+0x290/0x4f4 [ 13.756000] [ 13.808000] ---[ end trace 91bf6ece17e322de ]--- [ 13.828000] serio: GSC PS/2 mouse port at 0x00020100 irq 19 @ 10:12:8 Signed-off-by: Guy Martin Acked-by: Helge Deller Signed-off-by: Kyle McMartin diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index 3c287dd..4225f5d 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c @@ -358,7 +358,7 @@ static int __devinit gscps2_probe(struct parisc_device *dev) gscps2_reset(ps2port); ps2port->id = readb(ps2port->addr + GSC_ID) & 0x0f; - snprintf(serio->name, sizeof(serio->name), "GSC PS/2 %s", + snprintf(serio->name, sizeof(serio->name), "gsc-ps2-%s", (ps2port->id == GSC_ID_KEYBOARD) ? "keyboard" : "mouse"); strlcpy(serio->phys, dev_name(&dev->dev), sizeof(serio->phys)); serio->id.type = SERIO_8042; -- cgit v0.10.2