From b1b8e8ee7c044f52d9dd1ac81ce45a77df41c9b3 Mon Sep 17 00:00:00 2001 From: Gerrit Renker Date: Wed, 11 Oct 2006 16:26:54 +0100 Subject: [PATCH] --- yaml --- r: 40189 b: refs/heads/master c: 82709531a800fcf8de71bb8c5d8e92462fb81f84 h: refs/heads/master i: 40187: 424fd1000086ea5226a7d44295f049cc532d18bb v: v3 --- [refs] | 2 +- trunk/arch/sh/boards/hp6xx/hp6xx_apm.c | 2 +- trunk/arch/sh/boards/hp6xx/pm.c | 2 +- trunk/arch/sh/boards/hp6xx/setup.c | 2 +- trunk/arch/sh/boards/renesas/hs7751rvoip/io.c | 2 +- .../arch/sh/boards/renesas/hs7751rvoip/irq.c | 2 +- .../sh/boards/renesas/hs7751rvoip/setup.c | 7 +- trunk/arch/sh/boards/renesas/r7780rp/io.c | 2 +- trunk/arch/sh/boards/renesas/r7780rp/irq.c | 9 +- trunk/arch/sh/boards/renesas/r7780rp/setup.c | 2 +- trunk/arch/sh/boards/renesas/rts7751r2d/io.c | 4 +- trunk/arch/sh/boards/renesas/rts7751r2d/irq.c | 6 +- trunk/arch/sh/boards/renesas/rts7751r2d/led.c | 15 +- .../arch/sh/boards/renesas/rts7751r2d/setup.c | 2 +- trunk/arch/sh/boards/shmin/setup.c | 2 +- trunk/arch/sh/cchips/voyagergx/irq.c | 22 ++- trunk/arch/sh/drivers/pci/ops-r7780rp.c | 2 +- trunk/arch/sh/drivers/pci/ops-rts7751r2d.c | 24 +-- trunk/arch/sh/kernel/cpu/irq/intc2.c | 165 ++++++++++++++--- trunk/arch/sh/kernel/cpu/irq/ipr.c | 5 +- trunk/arch/sh/kernel/cpu/sh3/ex.S | 9 +- trunk/arch/sh/kernel/cpu/sh4/ex.S | 9 +- trunk/arch/sh/kernel/cpu/sh4/setup-sh7760.c | 63 ------- trunk/arch/sh/kernel/cpu/sh4/setup-sh7780.c | 27 --- trunk/arch/sh/kernel/irq.c | 2 +- trunk/arch/sh/kernel/process.c | 12 +- trunk/arch/sh/kernel/traps.c | 167 ++++++++---------- .../input/touchscreen/hp680_ts_input.c | 2 +- trunk/drivers/video/hitfb.c | 1 + .../asm-sh/{edosk7705.h => edosk7705/io.h} | 0 trunk/include/asm-sh/{ => hp6xx}/hp6xx.h | 0 trunk/include/asm-sh/hp6xx/ide.h | 8 + trunk/include/asm-sh/hp6xx/io.h | 10 ++ .../asm-sh/{ => hs7751rvoip}/hs7751rvoip.h | 0 trunk/include/asm-sh/hs7751rvoip/ide.h | 8 + trunk/include/asm-sh/irq-sh7780.h | 10 ++ trunk/include/asm-sh/irq.h | 21 ++- trunk/include/asm-sh/landisk/ide.h | 14 ++ trunk/include/asm-sh/processor.h | 2 - trunk/include/asm-sh/r7780rp/ide.h | 8 + trunk/include/asm-sh/{ => r7780rp}/r7780rp.h | 6 + trunk/include/asm-sh/rts7751r2d/ide.h | 8 + .../asm-sh/{ => rts7751r2d}/rts7751r2d.h | 0 trunk/include/asm-sh/sh03/ide.h | 7 + trunk/include/asm-sh/{ => shmin}/shmin.h | 0 trunk/include/asm-sh/system.h | 7 - trunk/include/asm-sparc64/compat.h | 7 +- trunk/net/dccp/ipv4.c | 4 +- trunk/net/dccp/ipv6.c | 4 +- trunk/sound/oss/sh_dac_audio.c | 2 +- 50 files changed, 407 insertions(+), 290 deletions(-) rename trunk/include/asm-sh/{edosk7705.h => edosk7705/io.h} (100%) rename trunk/include/asm-sh/{ => hp6xx}/hp6xx.h (100%) create mode 100644 trunk/include/asm-sh/hp6xx/ide.h create mode 100644 trunk/include/asm-sh/hp6xx/io.h rename trunk/include/asm-sh/{ => hs7751rvoip}/hs7751rvoip.h (100%) create mode 100644 trunk/include/asm-sh/hs7751rvoip/ide.h create mode 100644 trunk/include/asm-sh/landisk/ide.h create mode 100644 trunk/include/asm-sh/r7780rp/ide.h rename trunk/include/asm-sh/{ => r7780rp}/r7780rp.h (96%) create mode 100644 trunk/include/asm-sh/rts7751r2d/ide.h rename trunk/include/asm-sh/{ => rts7751r2d}/rts7751r2d.h (100%) create mode 100644 trunk/include/asm-sh/sh03/ide.h rename trunk/include/asm-sh/{ => shmin}/shmin.h (100%) diff --git a/[refs] b/[refs] index 974ae4fbef4c..fde000af00d6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d0b72a0817b0164986d35366c8ffe92fd985f713 +refs/heads/master: 82709531a800fcf8de71bb8c5d8e92462fb81f84 diff --git a/trunk/arch/sh/boards/hp6xx/hp6xx_apm.c b/trunk/arch/sh/boards/hp6xx/hp6xx_apm.c index d146cdaa0b8b..219179114f0f 100644 --- a/trunk/arch/sh/boards/hp6xx/hp6xx_apm.c +++ b/trunk/arch/sh/boards/hp6xx/hp6xx_apm.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #define SH7709_PGDR 0xa400012c diff --git a/trunk/arch/sh/boards/hp6xx/pm.c b/trunk/arch/sh/boards/hp6xx/pm.c index d1947732fb3e..83d327212064 100644 --- a/trunk/arch/sh/boards/hp6xx/pm.c +++ b/trunk/arch/sh/boards/hp6xx/pm.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/trunk/arch/sh/boards/hp6xx/setup.c b/trunk/arch/sh/boards/hp6xx/setup.c index b5a96649ed26..2d3a5b4faf58 100644 --- a/trunk/arch/sh/boards/hp6xx/setup.c +++ b/trunk/arch/sh/boards/hp6xx/setup.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #define SCPCR 0xa4000116 diff --git a/trunk/arch/sh/boards/renesas/hs7751rvoip/io.c b/trunk/arch/sh/boards/renesas/hs7751rvoip/io.c index bb9aa0d62852..51f3f6574210 100644 --- a/trunk/arch/sh/boards/renesas/hs7751rvoip/io.c +++ b/trunk/arch/sh/boards/renesas/hs7751rvoip/io.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include extern void *area6_io8_base; /* Area 6 8bit I/O Base address */ diff --git a/trunk/arch/sh/boards/renesas/hs7751rvoip/irq.c b/trunk/arch/sh/boards/renesas/hs7751rvoip/irq.c index 943f93aa6052..c617b188258a 100644 --- a/trunk/arch/sh/boards/renesas/hs7751rvoip/irq.c +++ b/trunk/arch/sh/boards/renesas/hs7751rvoip/irq.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include static int mask_pos[] = {8, 9, 10, 11, 12, 13, 0, 1, 2, 3, 4, 5, 6, 7}; diff --git a/trunk/arch/sh/boards/renesas/hs7751rvoip/setup.c b/trunk/arch/sh/boards/renesas/hs7751rvoip/setup.c index 1d997ffd7931..0414c15c3458 100644 --- a/trunk/arch/sh/boards/renesas/hs7751rvoip/setup.c +++ b/trunk/arch/sh/boards/renesas/hs7751rvoip/setup.c @@ -10,10 +10,15 @@ #include #include #include +#include +#include +#include #include -#include #include +#include #include +#include +#include static void __init hs7751rvoip_init_irq(void) { diff --git a/trunk/arch/sh/boards/renesas/r7780rp/io.c b/trunk/arch/sh/boards/renesas/r7780rp/io.c index 311ccccba718..db92d6e6ae99 100644 --- a/trunk/arch/sh/boards/renesas/r7780rp/io.c +++ b/trunk/arch/sh/boards/renesas/r7780rp/io.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/trunk/arch/sh/boards/renesas/r7780rp/irq.c b/trunk/arch/sh/boards/renesas/r7780rp/irq.c index aa15ec5bc69e..b544772cbc72 100644 --- a/trunk/arch/sh/boards/renesas/r7780rp/irq.c +++ b/trunk/arch/sh/boards/renesas/r7780rp/irq.c @@ -10,8 +10,7 @@ */ #include #include -#include -#include +#include #ifdef CONFIG_SH_R7780MP static int mask_pos[] = {12, 11, 9, 14, 15, 8, 13, 6, 5, 4, 3, 2, 0, 0, 1, 0}; @@ -33,7 +32,7 @@ static void disable_r7780rp_irq(unsigned int irq) } static struct irq_chip r7780rp_irq_chip __read_mostly = { - .name = "R7780RP", + .name = "r7780rp", .mask = disable_r7780rp_irq, .unmask = enable_r7780rp_irq, .mask_ack = disable_r7780rp_irq, @@ -48,8 +47,8 @@ void __init init_r7780rp_IRQ(void) for (i = 0; i < 15; i++) { disable_irq_nosync(i); - set_irq_chip_and_handler_name(i, &r7780rp_irq_chip, - handle_level_irq, "level"); + set_irq_chip_and_handler(i, &r7780rp_irq_chip, + handle_level_irq); enable_r7780rp_irq(i); } } diff --git a/trunk/arch/sh/boards/renesas/r7780rp/setup.c b/trunk/arch/sh/boards/renesas/r7780rp/setup.c index c331caeb694b..b941aa0aa34e 100644 --- a/trunk/arch/sh/boards/renesas/r7780rp/setup.c +++ b/trunk/arch/sh/boards/renesas/r7780rp/setup.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/trunk/arch/sh/boards/renesas/rts7751r2d/io.c b/trunk/arch/sh/boards/renesas/rts7751r2d/io.c index f2507a804979..135aa0b5e62d 100644 --- a/trunk/arch/sh/boards/renesas/rts7751r2d/io.c +++ b/trunk/arch/sh/boards/renesas/rts7751r2d/io.c @@ -11,8 +11,8 @@ #include #include #include -#include -#include +#include +#include #include /* diff --git a/trunk/arch/sh/boards/renesas/rts7751r2d/irq.c b/trunk/arch/sh/boards/renesas/rts7751r2d/irq.c index cb0eb20d1b43..c915e7a3693a 100644 --- a/trunk/arch/sh/boards/renesas/rts7751r2d/irq.c +++ b/trunk/arch/sh/boards/renesas/rts7751r2d/irq.c @@ -8,10 +8,12 @@ * Modified for RTS7751R2D by * Atom Create Engineering Co., Ltd. 2002. */ + #include #include -#include -#include +#include +#include +#include #if defined(CONFIG_RTS7751R2D_REV11) static int mask_pos[] = {11, 9, 8, 12, 10, 6, 5, 4, 7, 14, 13, 0, 0, 0, 0}; diff --git a/trunk/arch/sh/boards/renesas/rts7751r2d/led.c b/trunk/arch/sh/boards/renesas/rts7751r2d/led.c index 509f548bdce0..a7ce66c1e4f0 100644 --- a/trunk/arch/sh/boards/renesas/rts7751r2d/led.c +++ b/trunk/arch/sh/boards/renesas/rts7751r2d/led.c @@ -8,9 +8,13 @@ * * This file contains Renesas Technology Sales RTS7751R2D specific LED code. */ -#include + +#include +#include + +#ifdef CONFIG_HEARTBEAT + #include -#include /* Cycle the LED's in the clasic Knightriger/Sun pattern */ void heartbeat_rts7751r2d(void) @@ -42,3 +46,10 @@ void heartbeat_rts7751r2d(void) else bit--; } +#endif /* CONFIG_HEARTBEAT */ + +void rts7751r2d_led(unsigned short value) +{ + ctrl_outw(value, PA_OUTPORT); +} + diff --git a/trunk/arch/sh/boards/renesas/rts7751r2d/setup.c b/trunk/arch/sh/boards/renesas/rts7751r2d/setup.c index 5c042d35ec91..20597a6e6702 100644 --- a/trunk/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/trunk/arch/sh/boards/renesas/rts7751r2d/setup.c @@ -12,9 +12,9 @@ #include #include #include +#include #include #include -#include #include extern void heartbeat_rts7751r2d(void); diff --git a/trunk/arch/sh/boards/shmin/setup.c b/trunk/arch/sh/boards/shmin/setup.c index a31a1d1e2681..2f0c19706cf9 100644 --- a/trunk/arch/sh/boards/shmin/setup.c +++ b/trunk/arch/sh/boards/shmin/setup.c @@ -7,7 +7,7 @@ */ #include #include -#include +#include #include #include #include diff --git a/trunk/arch/sh/cchips/voyagergx/irq.c b/trunk/arch/sh/cchips/voyagergx/irq.c index f7ea700d05ae..bf1b28feca06 100644 --- a/trunk/arch/sh/cchips/voyagergx/irq.c +++ b/trunk/arch/sh/cchips/voyagergx/irq.c @@ -17,18 +17,29 @@ Copyright 2003 (c) Lineo uSolutions,Inc. */ +/* -------------------------------------------------------------------- */ + +#undef DEBUG + +#include +#include +#include +#include +#include #include #include -#include +#include + +#include +#include #include -#include static void disable_voyagergx_irq(unsigned int irq) { unsigned long val; unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); - pr_debug("disable_voyagergx_irq(%d): mask=%lx\n", irq, mask); + pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask); val = inl(VOYAGER_INT_MASK); val &= ~mask; outl(val, VOYAGER_INT_MASK); @@ -39,7 +50,7 @@ static void enable_voyagergx_irq(unsigned int irq) unsigned long val; unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); - pr_debug("disable_voyagergx_irq(%d): mask=%lx\n", irq, mask); + pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask); val = inl(VOYAGER_INT_MASK); val |= mask; outl(val, VOYAGER_INT_MASK); @@ -126,7 +137,7 @@ int voyagergx_irq_demux(int irq) } else { printk("Unexpected IRQ irq = %d status = 0x%08lx\n", irq, val); } - pr_debug("voyagergx_irq_demux %ld\n", i); + pr_debug("voyagergx_irq_demux %d \n", i); #else for (bit = 1, i = 0 ; i < VOYAGER_IRQ_NUM ; bit <<= 1, i++) if (val & bit) @@ -174,3 +185,4 @@ void __init setup_voyagergx_irq(void) setup_irq(IRQ_VOYAGER, &irq0); } + diff --git a/trunk/arch/sh/drivers/pci/ops-r7780rp.c b/trunk/arch/sh/drivers/pci/ops-r7780rp.c index eeea1577e112..6e3ba9c65b40 100644 --- a/trunk/arch/sh/drivers/pci/ops-r7780rp.c +++ b/trunk/arch/sh/drivers/pci/ops-r7780rp.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include "pci-sh4.h" diff --git a/trunk/arch/sh/drivers/pci/ops-rts7751r2d.c b/trunk/arch/sh/drivers/pci/ops-rts7751r2d.c index 4a518d948049..b68824c8b81e 100644 --- a/trunk/arch/sh/drivers/pci/ops-rts7751r2d.c +++ b/trunk/arch/sh/drivers/pci/ops-rts7751r2d.c @@ -10,24 +10,28 @@ * * PCI initialization for the Renesas SH7751R RTS7751R2D board */ + #include #include #include +#include #include -#include -#include +#include +#include +#include #include "pci-sh4.h" -static u8 rts7751r2d_irq_tab[] __initdata = { - IRQ_PCISLOT1, - IRQ_PCISLOT2, - IRQ_PCMCIA, - IRQ_PCIETH, -}; - int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) { - return rts7751r2d_irq_tab[slot]; + switch (slot) { + case 0: return IRQ_PCISLOT1; /* PCI Extend slot #1 */ + case 1: return IRQ_PCISLOT2; /* PCI Extend slot #2 */ + case 2: return IRQ_PCMCIA; /* PCI Cardbus Bridge */ + case 3: return IRQ_PCIETH; /* Realtek Ethernet controller */ + default: + printk("PCI: Bad IRQ mapping request for slot %d\n", slot); + return -1; + } } static struct resource sh7751_io_resource = { diff --git a/trunk/arch/sh/kernel/cpu/irq/intc2.c b/trunk/arch/sh/kernel/cpu/irq/intc2.c index 74ca576a7ce5..d4b2bb7e08c7 100644 --- a/trunk/arch/sh/kernel/cpu/irq/intc2.c +++ b/trunk/arch/sh/kernel/cpu/irq/intc2.c @@ -11,9 +11,10 @@ * Hitachi 7751, the STM ST40 STB1, SH7760, and SH7780. */ #include +#include #include -#include #include +#include static void disable_intc2_irq(unsigned int irq) { @@ -30,7 +31,7 @@ static void enable_intc2_irq(unsigned int irq) } static struct irq_chip intc2_irq_chip = { - .name = "INTC2", + .typename = "intc2", .mask = disable_intc2_irq, .unmask = enable_intc2_irq, .mask_ack = disable_intc2_irq, @@ -44,36 +45,150 @@ static struct irq_chip intc2_irq_chip = { * PIO1 which is INTPRI00[19,16] and INTMSK00[13] * would be: ^ ^ ^ ^ * | | | | - * { 84, 0, 16, 0, 13 }, - * - * in the intc2_data table. + * make_intc2_irq(84, 0, 16, 0, 13); */ -void make_intc2_irq(struct intc2_data *table, unsigned int nr_irqs) +void make_intc2_irq(struct intc2_data *p) { - int i; + unsigned int flags; + unsigned long ipr; + + disable_irq_nosync(p->irq); + + /* Set the priority level */ + local_irq_save(flags); + + ipr = ctrl_inl(INTC2_BASE + INTC2_INTPRI_OFFSET + p->ipr_offset); + ipr &= ~(0xf << p->ipr_shift); + ipr |= p->priority << p->ipr_shift; + ctrl_outl(ipr, INTC2_BASE + INTC2_INTPRI_OFFSET + p->ipr_offset); + + local_irq_restore(flags); - for (i = 0; i < nr_irqs; i++) { - unsigned long ipr, flags; - struct intc2_data *p = table + i; + set_irq_chip_and_handler(p->irq, &intc2_irq_chip, handle_level_irq); + set_irq_chip_data(p->irq, p); - disable_irq_nosync(p->irq); + enable_intc2_irq(p->irq); +} - /* Set the priority level */ - local_irq_save(flags); +static struct intc2_data intc2_irq_table[] = { +#if defined(CONFIG_CPU_SUBTYPE_ST40) + {64, 0, 0, 0, 0, 13}, /* PCI serr */ + {65, 0, 4, 0, 1, 13}, /* PCI err */ + {66, 0, 4, 0, 2, 13}, /* PCI ad */ + {67, 0, 4, 0, 3, 13}, /* PCI pwd down */ + {72, 0, 8, 0, 5, 13}, /* DMAC INT0 */ + {73, 0, 8, 0, 6, 13}, /* DMAC INT1 */ + {74, 0, 8, 0, 7, 13}, /* DMAC INT2 */ + {75, 0, 8, 0, 8, 13}, /* DMAC INT3 */ + {76, 0, 8, 0, 9, 13}, /* DMAC INT4 */ + {78, 0, 8, 0, 11, 13}, /* DMAC ERR */ + {80, 0, 12, 0, 12, 13}, /* PIO0 */ + {84, 0, 16, 0, 13, 13}, /* PIO1 */ + {88, 0, 20, 0, 14, 13}, /* PIO2 */ + {112, 4, 0, 4, 0, 13}, /* Mailbox */ + #ifdef CONFIG_CPU_SUBTYPE_ST40GX1 + {116, 4, 4, 4, 4, 13}, /* SSC0 */ + {120, 4, 8, 4, 8, 13}, /* IR Blaster */ + {124, 4, 12, 4, 12, 13}, /* USB host */ + {128, 4, 16, 4, 16, 13}, /* Video processor BLITTER */ + {132, 4, 20, 4, 20, 13}, /* UART0 */ + {134, 4, 20, 4, 22, 13}, /* UART2 */ + {136, 4, 24, 4, 24, 13}, /* IO_PIO0 */ + {140, 4, 28, 4, 28, 13}, /* EMPI */ + {144, 8, 0, 8, 0, 13}, /* MAFE */ + {148, 8, 4, 8, 4, 13}, /* PWM */ + {152, 8, 8, 8, 8, 13}, /* SSC1 */ + {156, 8, 12, 8, 12, 13}, /* IO_PIO1 */ + {160, 8, 16, 8, 16, 13}, /* USB target */ + {164, 8, 20, 8, 20, 13}, /* UART1 */ + {168, 8, 24, 8, 24, 13}, /* Teletext */ + {172, 8, 28, 8, 28, 13}, /* VideoSync VTG */ + {173, 8, 28, 8, 29, 13}, /* VideoSync DVP0 */ + {174, 8, 28, 8, 30, 13}, /* VideoSync DVP1 */ +#endif +#elif defined(CONFIG_CPU_SUBTYPE_SH7760) +/* + * SH7760 INTC2-Style interrupts, vectors IRQ48-111 INTEVT 0x800-0xFE0 + */ + /* INTPRIO0 | INTMSK0 */ + {48, 0, 28, 0, 31, 3}, /* IRQ 4 */ + {49, 0, 24, 0, 30, 3}, /* IRQ 3 */ + {50, 0, 20, 0, 29, 3}, /* IRQ 2 */ + {51, 0, 16, 0, 28, 3}, /* IRQ 1 */ + /* 52-55 (INTEVT 0x880-0x8E0) unused/reserved */ + /* INTPRIO4 | INTMSK0 */ + {56, 4, 28, 0, 25, 3}, /* HCAN2_CHAN0 */ + {57, 4, 24, 0, 24, 3}, /* HCAN2_CHAN1 */ + {58, 4, 20, 0, 23, 3}, /* I2S_CHAN0 */ + {59, 4, 16, 0, 22, 3}, /* I2S_CHAN1 */ + {60, 4, 12, 0, 21, 3}, /* AC97_CHAN0 */ + {61, 4, 8, 0, 20, 3}, /* AC97_CHAN1 */ + {62, 4, 4, 0, 19, 3}, /* I2C_CHAN0 */ + {63, 4, 0, 0, 18, 3}, /* I2C_CHAN1 */ + /* INTPRIO8 | INTMSK0 */ + {52, 8, 16, 0, 11, 3}, /* SCIF0_ERI_IRQ */ + {53, 8, 16, 0, 10, 3}, /* SCIF0_RXI_IRQ */ + {54, 8, 16, 0, 9, 3}, /* SCIF0_BRI_IRQ */ + {55, 8, 16, 0, 8, 3}, /* SCIF0_TXI_IRQ */ + {64, 8, 28, 0, 17, 3}, /* USBHI_IRQ */ + {65, 8, 24, 0, 16, 3}, /* LCDC */ + /* 66, 67 unused */ + {68, 8, 20, 0, 14, 13}, /* DMABRGI0_IRQ */ + {69, 8, 20, 0, 13, 13}, /* DMABRGI1_IRQ */ + {70, 8, 20, 0, 12, 13}, /* DMABRGI2_IRQ */ + /* 71 unused */ + {72, 8, 12, 0, 7, 3}, /* SCIF1_ERI_IRQ */ + {73, 8, 12, 0, 6, 3}, /* SCIF1_RXI_IRQ */ + {74, 8, 12, 0, 5, 3}, /* SCIF1_BRI_IRQ */ + {75, 8, 12, 0, 4, 3}, /* SCIF1_TXI_IRQ */ + {76, 8, 8, 0, 3, 3}, /* SCIF2_ERI_IRQ */ + {77, 8, 8, 0, 2, 3}, /* SCIF2_RXI_IRQ */ + {78, 8, 8, 0, 1, 3}, /* SCIF2_BRI_IRQ */ + {79, 8, 8, 0, 0, 3}, /* SCIF2_TXI_IRQ */ + /* | INTMSK4 */ + {80, 8, 4, 4, 23, 3}, /* SIM_ERI */ + {81, 8, 4, 4, 22, 3}, /* SIM_RXI */ + {82, 8, 4, 4, 21, 3}, /* SIM_TXI */ + {83, 8, 4, 4, 20, 3}, /* SIM_TEI */ + {84, 8, 0, 4, 19, 3}, /* HSPII */ + /* INTPRIOC | INTMSK4 */ + /* 85-87 unused/reserved */ + {88, 12, 20, 4, 18, 3}, /* MMCI0 */ + {89, 12, 20, 4, 17, 3}, /* MMCI1 */ + {90, 12, 20, 4, 16, 3}, /* MMCI2 */ + {91, 12, 20, 4, 15, 3}, /* MMCI3 */ + {92, 12, 12, 4, 6, 3}, /* MFI (unsure, bug? in my 7760 manual*/ + /* 93-107 reserved/undocumented */ + {108,12, 4, 4, 1, 3}, /* ADC */ + {109,12, 0, 4, 0, 3}, /* CMTI */ + /* 110-111 reserved/unused */ +#elif defined(CONFIG_CPU_SUBTYPE_SH7780) + { TIMER_IRQ, 0, 24, 0, INTC_TMU0_MSK, 2}, + { 21, 1, 0, 0, INTC_RTC_MSK, TIMER_PRIORITY }, + { 22, 1, 1, 0, INTC_RTC_MSK, TIMER_PRIORITY }, + { 23, 1, 2, 0, INTC_RTC_MSK, TIMER_PRIORITY }, + { SCIF0_ERI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, + { SCIF0_RXI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, + { SCIF0_BRI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, + { SCIF0_TXI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, - ipr = ctrl_inl(INTC2_BASE + INTC2_INTPRI_OFFSET + - p->ipr_offset); - ipr &= ~(0xf << p->ipr_shift); - ipr |= p->priority << p->ipr_shift; - ctrl_outl(ipr, INTC2_BASE + INTC2_INTPRI_OFFSET + - p->ipr_offset); + { SCIF1_ERI_IRQ, 8, 16, 0, INTC_SCIF1_MSK, SCIF1_PRIORITY }, + { SCIF1_RXI_IRQ, 8, 16, 0, INTC_SCIF1_MSK, SCIF1_PRIORITY }, + { SCIF1_BRI_IRQ, 8, 16, 0, INTC_SCIF1_MSK, SCIF1_PRIORITY }, + { SCIF1_TXI_IRQ, 8, 16, 0, INTC_SCIF1_MSK, SCIF1_PRIORITY }, - local_irq_restore(flags); + { PCIC0_IRQ, 0x10, 8, 0, INTC_PCIC0_MSK, PCIC0_PRIORITY }, + { PCIC1_IRQ, 0x10, 0, 0, INTC_PCIC1_MSK, PCIC1_PRIORITY }, + { PCIC2_IRQ, 0x14, 24, 0, INTC_PCIC2_MSK, PCIC2_PRIORITY }, + { PCIC3_IRQ, 0x14, 16, 0, INTC_PCIC3_MSK, PCIC3_PRIORITY }, + { PCIC4_IRQ, 0x14, 8, 0, INTC_PCIC4_MSK, PCIC4_PRIORITY }, +#endif +}; - set_irq_chip_and_handler_name(p->irq, &intc2_irq_chip, - handle_level_irq, "level"); - set_irq_chip_data(p->irq, p); +void __init init_IRQ_intc2(void) +{ + int i; - enable_intc2_irq(p->irq); - } + for (i = 0; i < ARRAY_SIZE(intc2_irq_table); i++) + make_intc2_irq(intc2_irq_table + i); } diff --git a/trunk/arch/sh/kernel/cpu/irq/ipr.c b/trunk/arch/sh/kernel/cpu/irq/ipr.c index f7997312ef98..8944abdf6e1c 100644 --- a/trunk/arch/sh/kernel/cpu/irq/ipr.c +++ b/trunk/arch/sh/kernel/cpu/irq/ipr.c @@ -44,7 +44,7 @@ static void enable_ipr_irq(unsigned int irq) } static struct irq_chip ipr_irq_chip = { - .name = "IPR", + .name = "ipr", .mask = disable_ipr_irq, .unmask = enable_ipr_irq, .mask_ack = disable_ipr_irq, @@ -60,8 +60,7 @@ void make_ipr_irq(unsigned int irq, unsigned int addr, int pos, int priority) ipr_data.shift = pos*4; /* POSition (0-3) x 4 means shift */ ipr_data.priority = priority; - set_irq_chip_and_handler_name(irq, &ipr_irq_chip, - handle_level_irq, "level"); + set_irq_chip_and_handler(irq, &ipr_irq_chip, handle_level_irq); set_irq_chip_data(irq, &ipr_data); enable_ipr_irq(irq); diff --git a/trunk/arch/sh/kernel/cpu/sh3/ex.S b/trunk/arch/sh/kernel/cpu/sh3/ex.S index ba3082d640b5..6be46f0686b7 100644 --- a/trunk/arch/sh/kernel/cpu/sh3/ex.S +++ b/trunk/arch/sh/kernel/cpu/sh3/ex.S @@ -4,7 +4,7 @@ * The SH-3 exception vector table. * Copyright (C) 1999, 2000, 2002 Niibe Yutaka - * Copyright (C) 2003 - 2006 Paul Mundt + * Copyright (C) 2003 Paul Mundt * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -49,10 +49,3 @@ ENTRY(nmi_slot) #endif ENTRY(user_break_point_trap) .long break_point_trap /* 1E0 */ - - /* - * Pad the remainder of the table out, exceptions residing in far - * away offsets can be manually inserted in to their appropriate - * location via set_exception_table_{evt,vec}(). - */ - .balign 4096,0,4096 diff --git a/trunk/arch/sh/kernel/cpu/sh4/ex.S b/trunk/arch/sh/kernel/cpu/sh4/ex.S index ac8ab57413cc..3f4cd043e900 100644 --- a/trunk/arch/sh/kernel/cpu/sh4/ex.S +++ b/trunk/arch/sh/kernel/cpu/sh4/ex.S @@ -4,7 +4,7 @@ * The SH-4 exception vector table. * Copyright (C) 1999, 2000, 2002 Niibe Yutaka - * Copyright (C) 2003 - 2006 Paul Mundt + * Copyright (C) 2003 Paul Mundt * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -53,10 +53,3 @@ ENTRY(nmi_slot) #endif ENTRY(user_break_point_trap) .long break_point_trap /* 1E0 */ - - /* - * Pad the remainder of the table out, exceptions residing in far - * away offsets can be manually inserted in to their appropriate - * location via set_exception_table_{evt,vec}(). - */ - .balign 4096,0,4096 diff --git a/trunk/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/trunk/arch/sh/kernel/cpu/sh4/setup-sh7760.c index 07e5377bf550..97f1c9af35d6 100644 --- a/trunk/arch/sh/kernel/cpu/sh4/setup-sh7760.c +++ b/trunk/arch/sh/kernel/cpu/sh4/setup-sh7760.c @@ -51,66 +51,3 @@ static int __init sh7760_devices_setup(void) ARRAY_SIZE(sh7760_devices)); } __initcall(sh7760_devices_setup); - -/* - * SH7760 INTC2-Style interrupts, vectors IRQ48-111 INTEVT 0x800-0xFE0 - */ -static struct intc2_data intc2_irq_table[] = { - /* INTPRIO0 | INTMSK0 */ - {48, 0, 28, 0, 31, 3}, /* IRQ 4 */ - {49, 0, 24, 0, 30, 3}, /* IRQ 3 */ - {50, 0, 20, 0, 29, 3}, /* IRQ 2 */ - {51, 0, 16, 0, 28, 3}, /* IRQ 1 */ - /* 52-55 (INTEVT 0x880-0x8E0) unused/reserved */ - /* INTPRIO4 | INTMSK0 */ - {56, 4, 28, 0, 25, 3}, /* HCAN2_CHAN0 */ - {57, 4, 24, 0, 24, 3}, /* HCAN2_CHAN1 */ - {58, 4, 20, 0, 23, 3}, /* I2S_CHAN0 */ - {59, 4, 16, 0, 22, 3}, /* I2S_CHAN1 */ - {60, 4, 12, 0, 21, 3}, /* AC97_CHAN0 */ - {61, 4, 8, 0, 20, 3}, /* AC97_CHAN1 */ - {62, 4, 4, 0, 19, 3}, /* I2C_CHAN0 */ - {63, 4, 0, 0, 18, 3}, /* I2C_CHAN1 */ - /* INTPRIO8 | INTMSK0 */ - {52, 8, 16, 0, 11, 3}, /* SCIF0_ERI_IRQ */ - {53, 8, 16, 0, 10, 3}, /* SCIF0_RXI_IRQ */ - {54, 8, 16, 0, 9, 3}, /* SCIF0_BRI_IRQ */ - {55, 8, 16, 0, 8, 3}, /* SCIF0_TXI_IRQ */ - {64, 8, 28, 0, 17, 3}, /* USBHI_IRQ */ - {65, 8, 24, 0, 16, 3}, /* LCDC */ - /* 66, 67 unused */ - {68, 8, 20, 0, 14, 13}, /* DMABRGI0_IRQ */ - {69, 8, 20, 0, 13, 13}, /* DMABRGI1_IRQ */ - {70, 8, 20, 0, 12, 13}, /* DMABRGI2_IRQ */ - /* 71 unused */ - {72, 8, 12, 0, 7, 3}, /* SCIF1_ERI_IRQ */ - {73, 8, 12, 0, 6, 3}, /* SCIF1_RXI_IRQ */ - {74, 8, 12, 0, 5, 3}, /* SCIF1_BRI_IRQ */ - {75, 8, 12, 0, 4, 3}, /* SCIF1_TXI_IRQ */ - {76, 8, 8, 0, 3, 3}, /* SCIF2_ERI_IRQ */ - {77, 8, 8, 0, 2, 3}, /* SCIF2_RXI_IRQ */ - {78, 8, 8, 0, 1, 3}, /* SCIF2_BRI_IRQ */ - {79, 8, 8, 0, 0, 3}, /* SCIF2_TXI_IRQ */ - /* | INTMSK4 */ - {80, 8, 4, 4, 23, 3}, /* SIM_ERI */ - {81, 8, 4, 4, 22, 3}, /* SIM_RXI */ - {82, 8, 4, 4, 21, 3}, /* SIM_TXI */ - {83, 8, 4, 4, 20, 3}, /* SIM_TEI */ - {84, 8, 0, 4, 19, 3}, /* HSPII */ - /* INTPRIOC | INTMSK4 */ - /* 85-87 unused/reserved */ - {88, 12, 20, 4, 18, 3}, /* MMCI0 */ - {89, 12, 20, 4, 17, 3}, /* MMCI1 */ - {90, 12, 20, 4, 16, 3}, /* MMCI2 */ - {91, 12, 20, 4, 15, 3}, /* MMCI3 */ - {92, 12, 12, 4, 6, 3}, /* MFI (unsure, bug? in my 7760 manual*/ - /* 93-107 reserved/undocumented */ - {108,12, 4, 4, 1, 3}, /* ADC */ - {109,12, 0, 4, 0, 3}, /* CMTI */ - /* 110-111 reserved/unused */ -}; - -void __init init_IRQ_intc2(void) -{ - make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table)); -} diff --git a/trunk/arch/sh/kernel/cpu/sh4/setup-sh7780.c b/trunk/arch/sh/kernel/cpu/sh4/setup-sh7780.c index 814ddb226531..72493f259edc 100644 --- a/trunk/arch/sh/kernel/cpu/sh4/setup-sh7780.c +++ b/trunk/arch/sh/kernel/cpu/sh4/setup-sh7780.c @@ -77,30 +77,3 @@ static int __init sh7780_devices_setup(void) ARRAY_SIZE(sh7780_devices)); } __initcall(sh7780_devices_setup); - -static struct intc2_data intc2_irq_table[] = { - { TIMER_IRQ, 0, 24, 0, INTC_TMU0_MSK, 2 }, - { 21, 1, 0, 0, INTC_RTC_MSK, TIMER_PRIORITY }, - { 22, 1, 1, 0, INTC_RTC_MSK, TIMER_PRIORITY }, - { 23, 1, 2, 0, INTC_RTC_MSK, TIMER_PRIORITY }, - { SCIF0_ERI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, - { SCIF0_RXI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, - { SCIF0_BRI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, - { SCIF0_TXI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, - - { SCIF1_ERI_IRQ, 8, 16, 0, INTC_SCIF1_MSK, SCIF1_PRIORITY }, - { SCIF1_RXI_IRQ, 8, 16, 0, INTC_SCIF1_MSK, SCIF1_PRIORITY }, - { SCIF1_BRI_IRQ, 8, 16, 0, INTC_SCIF1_MSK, SCIF1_PRIORITY }, - { SCIF1_TXI_IRQ, 8, 16, 0, INTC_SCIF1_MSK, SCIF1_PRIORITY }, - - { PCIC0_IRQ, 0x10, 8, 0, INTC_PCIC0_MSK, PCIC0_PRIORITY }, - { PCIC1_IRQ, 0x10, 0, 0, INTC_PCIC1_MSK, PCIC1_PRIORITY }, - { PCIC2_IRQ, 0x14, 24, 0, INTC_PCIC2_MSK, PCIC2_PRIORITY }, - { PCIC3_IRQ, 0x14, 16, 0, INTC_PCIC3_MSK, PCIC3_PRIORITY }, - { PCIC4_IRQ, 0x14, 8, 0, INTC_PCIC4_MSK, PCIC4_PRIORITY }, -}; - -void __init init_IRQ_intc2(void) -{ - make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table)); -} diff --git a/trunk/arch/sh/kernel/irq.c b/trunk/arch/sh/kernel/irq.c index 944128ce9706..acf2602569c4 100644 --- a/trunk/arch/sh/kernel/irq.c +++ b/trunk/arch/sh/kernel/irq.c @@ -54,7 +54,7 @@ int show_interrupts(struct seq_file *p, void *v) for_each_online_cpu(j) seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); seq_printf(p, " %14s", irq_desc[i].chip->name); - seq_printf(p, "-%-8s", irq_desc[i].name); + seq_printf(p, "-%s", handle_irq_name(irq_desc[i].handle_irq)); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) diff --git a/trunk/arch/sh/kernel/process.c b/trunk/arch/sh/kernel/process.c index a52b13ac6b7f..91516dca4a85 100644 --- a/trunk/arch/sh/kernel/process.c +++ b/trunk/arch/sh/kernel/process.c @@ -105,7 +105,7 @@ void show_regs(struct pt_regs * regs) { printk("\n"); printk("Pid : %d, Comm: %20s\n", current->pid, current->comm); - print_symbol("PC is at %s\n", instruction_pointer(regs)); + print_symbol("PC is at %s\n", regs->pc); printk("PC : %08lx SP : %08lx SR : %08lx ", regs->pc, regs->regs[15], regs->sr); #ifdef CONFIG_MMU @@ -130,7 +130,15 @@ void show_regs(struct pt_regs * regs) printk("MACH: %08lx MACL: %08lx GBR : %08lx PR : %08lx\n", regs->mach, regs->macl, regs->gbr, regs->pr); - show_trace(NULL, (unsigned long *)regs->regs[15], regs); + /* + * If we're in kernel mode, dump the stack too.. + */ + if (!user_mode(regs)) { + extern void show_task(unsigned long *sp); + unsigned long sp = regs->regs[15]; + + show_task((unsigned long *)sp); + } } /* diff --git a/trunk/arch/sh/kernel/traps.c b/trunk/arch/sh/kernel/traps.c index 53dfa55f3156..c2c597e09482 100644 --- a/trunk/arch/sh/kernel/traps.c +++ b/trunk/arch/sh/kernel/traps.c @@ -1,25 +1,38 @@ -/* - * 'traps.c' handles hardware traps and faults after we have saved some - * state in 'entry.S'. +/* $Id: traps.c,v 1.17 2004/05/02 01:46:30 sugioka Exp $ + * + * linux/arch/sh/traps.c * * SuperH version: Copyright (C) 1999 Niibe Yutaka * Copyright (C) 2000 Philipp Rumpf * Copyright (C) 2000 David Howells - * Copyright (C) 2002 - 2006 Paul Mundt - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. + * Copyright (C) 2002, 2003 Paul Mundt */ + +/* + * 'Traps.c' handles hardware traps and faults after we have saved some + * state in 'entry.S'. + */ +#include #include +#include +#include #include +#include +#include +#include +#include #include +#include #include #include #include -#include + #include #include +#include +#include +#include +#include #ifdef CONFIG_SH_KGDB #include @@ -40,32 +53,13 @@ #define TRAP_ILLEGAL_SLOT_INST 13 #endif -static void dump_mem(const char *str, unsigned long bottom, unsigned long top) -{ - unsigned long p; - int i; - - printk("%s(0x%08lx to 0x%08lx)\n", str, bottom, top); - - for (p = bottom & ~31; p < top; ) { - printk("%04lx: ", p & 0xffff); - - for (i = 0; i < 8; i++, p += 4) { - unsigned int val; - - if (p < bottom || p >= top) - printk(" "); - else { - if (__get_user(val, (unsigned int __user *)p)) { - printk("\n"); - return; - } - printk("%08x ", val); - } - } - printk("\n"); - } -} +/* + * These constants are for searching for possible module text + * segments. VMALLOC_OFFSET comes from mm/vmalloc.c; MODULE_RANGE is + * a guess of how much space is likely to be vmalloced. + */ +#define VMALLOC_OFFSET (8*1024*1024) +#define MODULE_RANGE (8*1024*1024) DEFINE_SPINLOCK(die_lock); @@ -75,28 +69,14 @@ void die(const char * str, struct pt_regs * regs, long err) console_verbose(); spin_lock_irq(&die_lock); - bust_spinlocks(1); - printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); - CHK_REMOTE_DEBUG(regs); - print_modules(); show_regs(regs); - - printk("Process: %s (pid: %d, stack limit = %p)\n", - current->comm, current->pid, task_stack_page(current) + 1); - - if (!user_mode(regs) || in_interrupt()) - dump_mem("Stack: ", regs->regs[15], THREAD_SIZE + - (unsigned long)task_stack_page(current)); - - bust_spinlocks(0); spin_unlock_irq(&die_lock); do_exit(SIGSEGV); } -static inline void die_if_kernel(const char *str, struct pt_regs *regs, - long err) +static inline void die_if_kernel(const char * str, struct pt_regs * regs, long err) { if (!user_mode(regs)) die(str, regs, err); @@ -113,7 +93,8 @@ static int handle_unaligned_notify_count = 10; */ static int die_if_no_fixup(const char * str, struct pt_regs * regs, long err) { - if (!user_mode(regs)) { + if (!user_mode(regs)) + { const struct exception_table_entry *fixup; fixup = search_exception_tables(regs->pc); if (fixup) { @@ -569,10 +550,7 @@ int is_dsp_inst(struct pt_regs *regs) #define is_dsp_inst(regs) (0) #endif /* CONFIG_SH_DSP */ -/* arch/sh/kernel/cpu/sh4/fpu.c */ -extern int do_fpu_inst(unsigned short, struct pt_regs *); -extern asmlinkage void do_fpu_state_restore(unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7, struct pt_regs regs); +extern int do_fpu_inst(unsigned short, struct pt_regs*); asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7, @@ -731,20 +709,14 @@ void __init per_cpu_trap_init(void) : "memory"); } -void *set_exception_table_vec(unsigned int vec, void *handler) +void __init trap_init(void) { extern void *exception_handling_table[]; - void *old_handler; - - old_handler = exception_handling_table[vec]; - exception_handling_table[vec] = handler; - return old_handler; -} -void __init trap_init(void) -{ - set_exception_table_vec(TRAP_RESERVED_INST, do_reserved_inst); - set_exception_table_vec(TRAP_ILLEGAL_SLOT_INST, do_illegal_slot_inst); + exception_handling_table[TRAP_RESERVED_INST] + = (void *)do_reserved_inst; + exception_handling_table[TRAP_ILLEGAL_SLOT_INST] + = (void *)do_illegal_slot_inst; #if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SH_FPU) || \ defined(CONFIG_SH_FPU_EMU) @@ -753,54 +725,61 @@ void __init trap_init(void) * reserved. They'll be handled in the math-emu case, or faulted on * otherwise. */ - set_exception_table_evt(0x800, do_reserved_inst); - set_exception_table_evt(0x820, do_illegal_slot_inst); -#elif defined(CONFIG_SH_FPU) - set_exception_table_evt(0x800, do_fpu_state_restore); - set_exception_table_evt(0x820, do_fpu_state_restore); + /* entry 64 corresponds to EXPEVT=0x800 */ + exception_handling_table[64] = (void *)do_reserved_inst; + exception_handling_table[65] = (void *)do_illegal_slot_inst; #endif /* Setup VBR for boot cpu */ per_cpu_trap_init(); } -void show_trace(struct task_struct *tsk, unsigned long *sp, - struct pt_regs *regs) +void show_stack(struct task_struct *tsk, unsigned long *sp) { - unsigned long addr; + unsigned long *stack, addr; + unsigned long module_start = VMALLOC_START; + unsigned long module_end = VMALLOC_END; + int i = 1; - if (regs && user_mode(regs)) - return; + if (!tsk) + tsk = current; + if (tsk == current) + sp = (unsigned long *)current_stack_pointer; + else + sp = (unsigned long *)tsk->thread.sp; + + stack = sp; printk("\nCall trace: "); #ifdef CONFIG_KALLSYMS printk("\n"); #endif - while (!kstack_end(sp)) { - addr = *sp++; - if (kernel_text_address(addr)) - print_ip_sym(addr); + while (!kstack_end(stack)) { + addr = *stack++; + if (((addr >= (unsigned long)_text) && + (addr <= (unsigned long)_etext)) || + ((addr >= module_start) && (addr <= module_end))) { + /* + * For 80-columns display, 6 entry is maximum. + * NOTE: '[<8c00abcd>] ' consumes 13 columns . + */ +#ifndef CONFIG_KALLSYMS + if (i && ((i % 6) == 0)) + printk("\n "); +#endif + printk("[<%08lx>] ", addr); + print_symbol("%s\n", addr); + i++; + } } printk("\n"); } -void show_stack(struct task_struct *tsk, unsigned long *sp) +void show_task(unsigned long *sp) { - unsigned long stack; - - if (!tsk) - tsk = current; - if (tsk == current) - sp = (unsigned long *)current_stack_pointer; - else - sp = (unsigned long *)tsk->thread.sp; - - stack = (unsigned long)sp; - dump_mem("Stack: ", stack, THREAD_SIZE + - (unsigned long)task_stack_page(tsk)); - show_trace(tsk, sp, NULL); + show_stack(NULL, sp); } void dump_stack(void) diff --git a/trunk/drivers/input/touchscreen/hp680_ts_input.c b/trunk/drivers/input/touchscreen/hp680_ts_input.c index 58fca316786c..e31c6c55b2e2 100644 --- a/trunk/drivers/input/touchscreen/hp680_ts_input.c +++ b/trunk/drivers/input/touchscreen/hp680_ts_input.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include #define MODNAME "hp680_ts_input" diff --git a/trunk/drivers/video/hitfb.c b/trunk/drivers/video/hitfb.c index 3dc49424dc75..3afb472763c0 100644 --- a/trunk/drivers/video/hitfb.c +++ b/trunk/drivers/video/hitfb.c @@ -29,6 +29,7 @@ #include #include #include +#include #define WIDTH 640 diff --git a/trunk/include/asm-sh/edosk7705.h b/trunk/include/asm-sh/edosk7705/io.h similarity index 100% rename from trunk/include/asm-sh/edosk7705.h rename to trunk/include/asm-sh/edosk7705/io.h diff --git a/trunk/include/asm-sh/hp6xx.h b/trunk/include/asm-sh/hp6xx/hp6xx.h similarity index 100% rename from trunk/include/asm-sh/hp6xx.h rename to trunk/include/asm-sh/hp6xx/hp6xx.h diff --git a/trunk/include/asm-sh/hp6xx/ide.h b/trunk/include/asm-sh/hp6xx/ide.h new file mode 100644 index 000000000000..570395a5ebe5 --- /dev/null +++ b/trunk/include/asm-sh/hp6xx/ide.h @@ -0,0 +1,8 @@ +#ifndef __ASM_SH_HP6XX_IDE_H +#define __ASM_SH_HP6XX_IDE_H + +#define IRQ_CFCARD 93 +#define IRQ_PCMCIA 94 + +#endif /* __ASM_SH_HP6XX_IDE_H */ + diff --git a/trunk/include/asm-sh/hp6xx/io.h b/trunk/include/asm-sh/hp6xx/io.h new file mode 100644 index 000000000000..2044476ab199 --- /dev/null +++ b/trunk/include/asm-sh/hp6xx/io.h @@ -0,0 +1,10 @@ +#ifndef __ASM_SH_HP6XX_IO_H +#define __ASM_SH_HP6XX_IO_H + +/* + * Nothing special here.. just use the generic cchip io routines. + */ +#include + +#endif /* __ASM_SH_HP6XX_IO_H */ + diff --git a/trunk/include/asm-sh/hs7751rvoip.h b/trunk/include/asm-sh/hs7751rvoip/hs7751rvoip.h similarity index 100% rename from trunk/include/asm-sh/hs7751rvoip.h rename to trunk/include/asm-sh/hs7751rvoip/hs7751rvoip.h diff --git a/trunk/include/asm-sh/hs7751rvoip/ide.h b/trunk/include/asm-sh/hs7751rvoip/ide.h new file mode 100644 index 000000000000..65ad1d0f763b --- /dev/null +++ b/trunk/include/asm-sh/hs7751rvoip/ide.h @@ -0,0 +1,8 @@ +#ifndef __ASM_SH_HS7751RVOIP_IDE_H +#define __ASM_SH_HS7751RVOIP_IDE_H + +/* Nothing to see here.. */ +#include + +#endif /* __ASM_SH_HS7751RVOIP_IDE_H */ + diff --git a/trunk/include/asm-sh/irq-sh7780.h b/trunk/include/asm-sh/irq-sh7780.h index 19912ae6a7f7..895c5780e454 100644 --- a/trunk/include/asm-sh/irq-sh7780.h +++ b/trunk/include/asm-sh/irq-sh7780.h @@ -6,6 +6,16 @@ * * Copyright (C) 2004 Takashi SHUDO */ + +#ifdef CONFIG_IDE +# ifndef IRQ_CFCARD +# define IRQ_CFCARD 14 +# endif +# ifndef IRQ_PCMCIA +# define IRQ_PCMCIA 15 +# endif +#endif + #define INTC_BASE 0xffd00000 #define INTC_ICR0 (INTC_BASE+0x0) #define INTC_ICR1 (INTC_BASE+0x1c) diff --git a/trunk/include/asm-sh/irq.h b/trunk/include/asm-sh/irq.h index 7596ab83e0d4..28996f9c58cc 100644 --- a/trunk/include/asm-sh/irq.h +++ b/trunk/include/asm-sh/irq.h @@ -14,6 +14,16 @@ #include #include /* for pt_regs */ +#if defined(CONFIG_SH_HP6XX) || \ + defined(CONFIG_SH_RTS7751R2D) || \ + defined(CONFIG_SH_HS7751RVOIP) || \ + defined(CONFIG_SH_HS7751RVOIP) || \ + defined(CONFIG_SH_SH03) || \ + defined(CONFIG_SH_R7780RP) || \ + defined(CONFIG_SH_LANDISK) +#include +#endif + #ifndef CONFIG_CPU_SUBTYPE_SH7780 #define INTC_DMAC0_MSK 0 @@ -28,6 +38,15 @@ #define INTC_IPRD 0xffd00010UL #endif +#ifdef CONFIG_IDE +# ifndef IRQ_CFCARD +# define IRQ_CFCARD 14 +# endif +# ifndef IRQ_PCMCIA +# define IRQ_PCMCIA 15 +# endif +#endif + #define TIMER_IRQ 16 #define TIMER_IPR_ADDR INTC_IPRA #define TIMER_IPR_POS 3 @@ -685,7 +704,7 @@ struct intc2_data { unsigned char priority; }; -void make_intc2_irq(struct intc2_data *, unsigned int nr_irqs); +void make_intc2_irq(struct intc2_data *); void init_IRQ_intc2(void); #endif diff --git a/trunk/include/asm-sh/landisk/ide.h b/trunk/include/asm-sh/landisk/ide.h new file mode 100644 index 000000000000..6490e28415ed --- /dev/null +++ b/trunk/include/asm-sh/landisk/ide.h @@ -0,0 +1,14 @@ +/* + * modifed by kogiidena + * 2005.03.03 + */ + +#ifndef __ASM_SH_LANDISK_IDE_H +#define __ASM_SH_LANDISK_IDE_H + +/* Nothing to see here.. */ +#include +#define IRQ_CFCARD IRQ_FATA /* CF Card IRQ */ +#define IRQ_PCMCIA IRQ_ATA /* PCMCIA IRQ */ + +#endif /* __ASM_SH_LANDISK_IDE_H */ diff --git a/trunk/include/asm-sh/processor.h b/trunk/include/asm-sh/processor.h index 45bb74e35d32..474773853cd1 100644 --- a/trunk/include/asm-sh/processor.h +++ b/trunk/include/asm-sh/processor.h @@ -255,8 +255,6 @@ extern void save_fpu(struct task_struct *__tsk, struct pt_regs *regs); */ #define thread_saved_pc(tsk) (tsk->thread.pc) -void show_trace(struct task_struct *tsk, unsigned long *sp, - struct pt_regs *regs); extern unsigned long get_wchan(struct task_struct *p); #define KSTK_EIP(tsk) ((tsk)->thread.pc) diff --git a/trunk/include/asm-sh/r7780rp/ide.h b/trunk/include/asm-sh/r7780rp/ide.h new file mode 100644 index 000000000000..a1ed78e0f617 --- /dev/null +++ b/trunk/include/asm-sh/r7780rp/ide.h @@ -0,0 +1,8 @@ +#ifndef __ASM_SH_R7780RP_IDE_H +#define __ASM_SH_R7780RP_IDE_H + +/* Nothing to see here.. */ +#include + +#endif /* __ASM_SH_R7780RP_IDE_H */ + diff --git a/trunk/include/asm-sh/r7780rp.h b/trunk/include/asm-sh/r7780rp/r7780rp.h similarity index 96% rename from trunk/include/asm-sh/r7780rp.h rename to trunk/include/asm-sh/r7780rp/r7780rp.h index c18f648a7995..f95d9dba31a2 100644 --- a/trunk/include/asm-sh/r7780rp.h +++ b/trunk/include/asm-sh/r7780rp/r7780rp.h @@ -72,6 +72,8 @@ #define PA_AX88796L 0xa4100400 /* AX88796L Area */ #define PA_SC1602BSLB 0xa6000000 /* SC1602BSLB Area */ +#define PA_AREA5_IO 0xb4000000 /* Area 5 IO Memory */ +#define PA_AREA6_IO 0xb8000000 /* Area 6 IO Memory */ #define PA_IDE_OFFSET 0x1f0 /* CF IDE Offset */ #define AX88796L_IO_BASE 0x1000 /* AX88796L IO Base Address */ @@ -81,6 +83,7 @@ #define IRQ_PCISLOT2 66 /* PCI Slot #2 IRQ */ #define IRQ_PCISLOT3 67 /* PCI Slot #3 IRQ */ #define IRQ_PCISLOT4 68 /* PCI Slot #4 IRQ */ +#define IRQ_CFCARD 1 /* CF Card IRQ */ // #define IRQ_CFINST 0 /* CF Card Insert IRQ */ #define IRQ_TP 2 /* Touch Panel IRQ */ #define IRQ_SCI1 3 /* SCI1 IRQ */ @@ -143,6 +146,8 @@ #define PA_AX88796L 0xa5800400 /* AX88796L Area */ #define PA_SC1602BSLB 0xa6000000 /* SC1602BSLB Area */ +#define PA_AREA5_IO 0xb4000000 /* Area 5 IO Memory */ +#define PA_AREA6_IO 0xb8000000 /* Area 6 IO Memory */ #define PA_IDE_OFFSET 0x1f0 /* CF IDE Offset */ #define AX88796L_IO_BASE 0x1000 /* AX88796L IO Base Address */ @@ -152,6 +157,7 @@ #define IRQ_PCISLOT2 1 /* PCI Slot #2 IRQ */ #define IRQ_PCISLOT3 2 /* PCI Slot #3 IRQ */ #define IRQ_PCISLOT4 3 /* PCI Slot #4 IRQ */ +#define IRQ_CFCARD 4 /* CF Card IRQ */ #define IRQ_CFINST 5 /* CF Card Insert IRQ */ #define IRQ_M66596 6 /* M66596 IRQ */ #define IRQ_SDCARD 7 /* SD Card IRQ */ diff --git a/trunk/include/asm-sh/rts7751r2d/ide.h b/trunk/include/asm-sh/rts7751r2d/ide.h new file mode 100644 index 000000000000..416f96b407cb --- /dev/null +++ b/trunk/include/asm-sh/rts7751r2d/ide.h @@ -0,0 +1,8 @@ +#ifndef __ASM_SH_RTS7751R2D_IDE_H +#define __ASM_SH_RTS7751R2D_IDE_H + +/* Nothing to see here.. */ +#include + +#endif /* __ASM_SH_RTS7751R2D_IDE_H */ + diff --git a/trunk/include/asm-sh/rts7751r2d.h b/trunk/include/asm-sh/rts7751r2d/rts7751r2d.h similarity index 100% rename from trunk/include/asm-sh/rts7751r2d.h rename to trunk/include/asm-sh/rts7751r2d/rts7751r2d.h diff --git a/trunk/include/asm-sh/sh03/ide.h b/trunk/include/asm-sh/sh03/ide.h new file mode 100644 index 000000000000..73ee92e5c79e --- /dev/null +++ b/trunk/include/asm-sh/sh03/ide.h @@ -0,0 +1,7 @@ +#ifndef __ASM_SH_SH03_IDE_H +#define __ASM_SH_SH03_IDE_H + +#define IRQ_CFCARD 8 +#define IRQ_PCMCIA 8 + +#endif /* __ASM_SH_SH03_IDE_H */ diff --git a/trunk/include/asm-sh/shmin.h b/trunk/include/asm-sh/shmin/shmin.h similarity index 100% rename from trunk/include/asm-sh/shmin.h rename to trunk/include/asm-sh/shmin/shmin.h diff --git a/trunk/include/asm-sh/system.h b/trunk/include/asm-sh/system.h index 3340126f4e0f..6c1f8fde5ac4 100644 --- a/trunk/include/asm-sh/system.h +++ b/trunk/include/asm-sh/system.h @@ -353,13 +353,6 @@ static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old, (unsigned long)_n_, sizeof(*(ptr))); \ }) -extern void *set_exception_table_vec(unsigned int vec, void *handler); - -static inline void *set_exception_table_evt(unsigned int evt, void *handler) -{ - return set_exception_table_vec(evt >> 5, handler); -} - /* XXX * disable hlt during certain critical i/o operations */ diff --git a/trunk/include/asm-sparc64/compat.h b/trunk/include/asm-sparc64/compat.h index 36511ca51416..c73935dc7ba1 100644 --- a/trunk/include/asm-sparc64/compat.h +++ b/trunk/include/asm-sparc64/compat.h @@ -164,7 +164,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr) return (u32)(unsigned long)uptr; } -static inline void __user *compat_alloc_user_space(long len) +static __inline__ void __user *compat_alloc_user_space(long len) { struct pt_regs *regs = current_thread_info()->kregs; unsigned long usp = regs->u_regs[UREG_I6]; @@ -174,10 +174,7 @@ static inline void __user *compat_alloc_user_space(long len) else usp &= 0xffffffffUL; - usp -= len; - usp &= ~0x7UL; - - return (void __user *) usp; + return (void __user *) (usp - len); } struct compat_ipc64_perm { diff --git a/trunk/net/dccp/ipv4.c b/trunk/net/dccp/ipv4.c index 7e746c4c1688..aaaf4d09516b 100644 --- a/trunk/net/dccp/ipv4.c +++ b/trunk/net/dccp/ipv4.c @@ -449,6 +449,8 @@ static inline u64 dccp_v4_init_sequence(const struct sock *sk, dccp_hdr(skb)->dccph_sport); } +static struct request_sock_ops dccp_request_sock_ops; + int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) { struct inet_request_sock *ireq; @@ -489,7 +491,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) goto drop; - req = reqsk_alloc(sk->sk_prot->rsk_prot); + req = reqsk_alloc(&dccp_request_sock_ops); if (req == NULL) goto drop; diff --git a/trunk/net/dccp/ipv6.c b/trunk/net/dccp/ipv6.c index 7171a78671aa..91e7b12df13b 100644 --- a/trunk/net/dccp/ipv6.c +++ b/trunk/net/dccp/ipv6.c @@ -672,7 +672,6 @@ static struct sock *dccp_v6_hnd_req(struct sock *sk,struct sk_buff *skb) static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) { - struct inet_request_sock *ireq; struct dccp_sock dp; struct request_sock *req; struct dccp_request_sock *dreq; @@ -701,7 +700,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) goto drop; - req = inet6_reqsk_alloc(sk->sk_prot->rsk_prot); + req = inet6_reqsk_alloc(&dccp6_request_sock_ops); if (req == NULL) goto drop; @@ -713,7 +712,6 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) goto drop_and_free; ireq6 = inet6_rsk(req); - ireq = inet_rsk(req); ipv6_addr_copy(&ireq6->rmt_addr, &skb->nh.ipv6h->saddr); ipv6_addr_copy(&ireq6->loc_addr, &skb->nh.ipv6h->daddr); req->rcv_wnd = dccp_feat_default_sequence_window; diff --git a/trunk/sound/oss/sh_dac_audio.c b/trunk/sound/oss/sh_dac_audio.c index 51f554154c48..3b3b4da8cfd3 100644 --- a/trunk/sound/oss/sh_dac_audio.c +++ b/trunk/sound/oss/sh_dac_audio.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #define MODNAME "sh_dac_audio"