From 76f9d500954aedeab0373c92994b49abb446a2b7 Mon Sep 17 00:00:00 2001 From: Aaron Carroll Date: Tue, 30 Oct 2007 10:40:12 +0100 Subject: [PATCH] --- yaml --- r: 73101 b: refs/heads/master c: 5d1a536621403b442eef60ddd35e6b7a46fb04b7 h: refs/heads/master i: 73099: 282589b492e59338e38f3963d57023f6ce00102f v: v3 --- [refs] | 2 +- trunk/MAINTAINERS | 11 +- trunk/Makefile | 3 +- trunk/arch/mips/Kconfig | 13 - trunk/arch/mips/au1000/mtx-1/Makefile | 2 - trunk/arch/mips/au1000/mtx-1/platform.c | 9 + trunk/arch/mips/au1000/pb1200/Makefile | 2 - trunk/arch/mips/au1000/pb1200/board_setup.c | 6 +- trunk/arch/mips/au1000/pb1200/irqmap.c | 100 +++---- trunk/arch/mips/basler/excite/excite_setup.c | 2 +- trunk/arch/mips/jazz/irq.c | 27 +- trunk/arch/mips/kernel/Makefile | 4 - trunk/arch/mips/kernel/cevt-bcm1480.c | 149 --------- trunk/arch/mips/kernel/cevt-sb1250.c | 148 --------- trunk/arch/mips/kernel/csrc-bcm1480.c | 54 ---- trunk/arch/mips/kernel/csrc-sb1250.c | 70 ----- trunk/arch/mips/kernel/i8253.c | 25 +- trunk/arch/mips/kernel/time.c | 73 ++++- trunk/arch/mips/qemu/q-irq.c | 1 - trunk/arch/mips/sgi-ip27/ip27-timer.c | 4 +- trunk/arch/mips/sgi-ip32/ip32-platform.c | 2 +- trunk/arch/mips/sibyte/Kconfig | 14 - trunk/arch/mips/sibyte/bcm1480/irq.c | 16 + trunk/arch/mips/sibyte/bcm1480/time.c | 159 +++++++++- trunk/arch/mips/sibyte/sb1250/irq.c | 14 + trunk/arch/mips/sibyte/sb1250/time.c | 191 +++++++++++- trunk/arch/mips/sni/time.c | 5 +- trunk/arch/sh/Kconfig | 8 +- trunk/arch/sh/Kconfig.debug | 8 - trunk/arch/sh/Makefile | 2 +- trunk/arch/sh/boards/renesas/r7780rp/setup.c | 71 ----- trunk/arch/sh/boards/se/7722/setup.c | 4 +- trunk/arch/sh/configs/r7785rp_defconfig | 299 ++++++++++++------- trunk/arch/sh/drivers/pci/pci-st40.c | 4 +- trunk/arch/sh/kernel/cpu/irq/ipr.c | 9 + trunk/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 27 -- trunk/arch/sh/kernel/irq.c | 8 +- trunk/arch/sh/kernel/setup.c | 46 ++- trunk/arch/sh/kernel/vmlinux.lds.S | 201 ++++++------- trunk/arch/sh/kernel/vsyscall/vsyscall.lds.S | 5 +- trunk/arch/sh/mm/copy_page.S | 4 - trunk/arch/sh/oprofile/op_model_sh7750.c | 22 +- trunk/arch/sh/tools/mach-types | 29 +- trunk/arch/sh64/configs/cayman_defconfig | 140 +++++---- trunk/arch/sh64/configs/harp_defconfig | 105 ++++--- trunk/arch/sh64/configs/sim_defconfig | 68 +++-- trunk/arch/x86/kernel/kprobes_32.c | 7 +- trunk/arch/x86/kernel/kprobes_64.c | 7 +- trunk/arch/x86/kernel/traps_32.c | 2 - trunk/arch/x86/kernel/traps_64.c | 2 - trunk/arch/x86/mm/fault_32.c | 5 - trunk/arch/x86/mm/fault_64.c | 5 - trunk/block/deadline-iosched.c | 28 +- trunk/block/ll_rw_blk.c | 2 +- trunk/crypto/anubis.c | 1 + trunk/crypto/blowfish.c | 1 + trunk/crypto/compress.c | 1 + trunk/crypto/crypto_null.c | 1 + trunk/crypto/khazad.c | 1 + trunk/crypto/sha1_generic.c | 1 + trunk/crypto/sha256_generic.c | 1 + trunk/crypto/sha512.c | 1 + trunk/crypto/tea.c | 1 + trunk/crypto/tgr192.c | 1 + trunk/crypto/wp512.c | 1 + trunk/drivers/ata/libata-core.c | 38 +-- trunk/drivers/ata/libata-eh.c | 148 +++++---- trunk/drivers/ata/libata-scsi.c | 2 +- trunk/drivers/ata/sata_fsl.c | 159 ++++++++-- trunk/drivers/ata/sata_promise.c | 2 +- trunk/drivers/base/dmapool.c | 1 + trunk/drivers/hid/hid-input.c | 22 +- trunk/drivers/hid/usbhid/hid-quirks.c | 8 - trunk/drivers/hid/usbhid/hiddev.c | 2 +- trunk/drivers/ieee1394/sbp2.c | 2 +- trunk/drivers/input/joystick/xpad.c | 2 - trunk/drivers/input/misc/pcspkr.c | 2 +- trunk/drivers/input/mouse/appletouch.c | 125 +++----- trunk/drivers/input/mouse/inport.c | 2 +- trunk/drivers/input/mouse/logibm.c | 2 +- trunk/drivers/input/serio/hp_sdc.c | 4 + trunk/drivers/media/video/bt8xx/bttvp.h | 2 +- trunk/drivers/mmc/core/core.c | 1 + trunk/drivers/mmc/core/mmc_ops.c | 1 + trunk/drivers/mmc/core/sd_ops.c | 1 + trunk/drivers/mmc/core/sdio_ops.c | 1 + trunk/drivers/net/Kconfig | 4 +- trunk/drivers/net/fec_mpc52xx.c | 4 +- trunk/drivers/net/meth.c | 1 + trunk/drivers/net/myri10ge/myri10ge.c | 6 +- trunk/drivers/scsi/scsi_lib.c | 2 +- trunk/drivers/sh/maple/maple.c | 3 +- trunk/drivers/usb/core/buffer.c | 1 + trunk/drivers/usb/core/hcd.c | 1 + trunk/drivers/usb/core/usb.c | 2 +- trunk/drivers/watchdog/alim1535_wdt.c | 4 +- trunk/drivers/watchdog/davinci_wdt.c | 6 +- trunk/drivers/watchdog/i6300esb.c | 4 +- trunk/drivers/watchdog/iTCO_wdt.c | 114 +++---- trunk/drivers/watchdog/ib700wdt.c | 4 +- trunk/drivers/watchdog/machzwd.c | 7 +- trunk/drivers/watchdog/mpc83xx_wdt.c | 5 +- trunk/drivers/watchdog/pc87413_wdt.c | 4 +- trunk/drivers/watchdog/pnx4008_wdt.c | 6 +- trunk/drivers/watchdog/sbc8360.c | 3 +- trunk/drivers/watchdog/sc1200wdt.c | 3 +- trunk/drivers/watchdog/sc520_wdt.c | 4 +- trunk/drivers/watchdog/smsc37b787_wdt.c | 4 +- trunk/drivers/watchdog/w83627hf_wdt.c | 4 +- trunk/drivers/watchdog/w83697hf_wdt.c | 4 +- trunk/drivers/watchdog/w83877f_wdt.c | 4 +- trunk/drivers/watchdog/w83977f_wdt.c | 4 +- trunk/drivers/watchdog/wafer5823wdt.c | 4 +- trunk/drivers/watchdog/wdt.c | 3 +- trunk/drivers/watchdog/wdt977.c | 4 +- trunk/drivers/watchdog/wdt_pci.c | 6 +- trunk/fs/nfsd/nfs4recover.c | 2 +- trunk/fs/ntfs/aops.c | 10 +- trunk/fs/ntfs/attrib.c | 5 +- trunk/fs/ntfs/compress.c | 10 - trunk/include/asm-mips/i8253.h | 17 +- trunk/include/asm-mips/mach-au1x00/timex.h | 13 + trunk/include/asm-mips/mach-cobalt/irq.h | 3 +- trunk/include/asm-mips/mach-generic/timex.h | 13 + trunk/include/asm-mips/mach-jazz/timex.h | 16 + trunk/include/asm-mips/mach-qemu/timex.h | 16 + trunk/include/asm-mips/mach-rm/timex.h | 13 + trunk/include/asm-mips/time.h | 18 ++ trunk/include/asm-mips/timex.h | 25 +- trunk/include/asm-sh/cache.h | 3 +- trunk/include/asm-sh/irq.h | 2 +- trunk/include/asm-sh/page.h | 1 + trunk/include/asm-sh/pgtable.h | 2 +- trunk/include/asm-sh/processor.h | 2 +- trunk/include/asm-sh/setup.h | 14 - trunk/include/asm-sh64/dma-mapping.h | 5 +- trunk/include/asm-sh64/pci.h | 9 + trunk/include/asm-sh64/scatterlist.h | 9 - trunk/include/asm-x86/irqflags_32.h | 21 -- trunk/include/asm-x86/irqflags_64.h | 20 -- trunk/include/linux/ata.h | 6 - trunk/include/linux/input.h | 3 - trunk/include/linux/scatterlist.h | 60 ++-- trunk/include/net/esp.h | 2 +- trunk/include/rdma/ib_verbs.h | 2 +- trunk/include/scsi/libsas.h | 2 +- trunk/kernel/lockdep.c | 2 +- trunk/kernel/sched_debug.c | 5 +- trunk/net/core/skbuff.c | 2 +- trunk/net/ieee80211/ieee80211_crypt_ccmp.c | 1 + trunk/net/ipv4/ah4.c | 1 + trunk/net/ipv4/ipcomp.c | 1 + trunk/net/ipv4/tcp_ipv4.c | 2 +- trunk/net/ipv6/ah6.c | 1 + trunk/net/ipv6/ipcomp6.c | 1 + trunk/net/ipv6/tcp_ipv6.c | 2 +- trunk/net/mac80211/aes_ccm.c | 1 + trunk/net/rxrpc/rxkad.c | 2 +- trunk/net/sunrpc/auth_gss/gss_krb5_crypto.c | 6 +- trunk/net/sunrpc/auth_gss/gss_krb5_seal.c | 1 + trunk/net/sunrpc/auth_gss/gss_krb5_wrap.c | 1 + trunk/net/xfrm/xfrm_algo.c | 1 + 162 files changed, 1715 insertions(+), 1626 deletions(-) delete mode 100644 trunk/arch/mips/kernel/cevt-bcm1480.c delete mode 100644 trunk/arch/mips/kernel/cevt-sb1250.c delete mode 100644 trunk/arch/mips/kernel/csrc-bcm1480.c delete mode 100644 trunk/arch/mips/kernel/csrc-sb1250.c create mode 100644 trunk/include/asm-mips/mach-au1x00/timex.h create mode 100644 trunk/include/asm-mips/mach-generic/timex.h create mode 100644 trunk/include/asm-mips/mach-jazz/timex.h create mode 100644 trunk/include/asm-mips/mach-qemu/timex.h create mode 100644 trunk/include/asm-mips/mach-rm/timex.h diff --git a/[refs] b/[refs] index a16df1b5f22e..1daa0b26987a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 160acc2e899f26356bde92bc257253b7ca78f0c3 +refs/heads/master: 5d1a536621403b442eef60ddd35e6b7a46fb04b7 diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 6c0e44bbf601..4a26f832b4b5 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -398,12 +398,6 @@ P: Arnaldo Carvalho de Melo M: acme@ghostprotocols.net S: Maintained -APPLETOUCH TOUCHPAD DRIVER -P: Johannes Berg -M: johannes@sipsolutions.net -L: linux-input@vger.kernel.org -S: Maintained - ARC FRAMEBUFFER DRIVER P: Jaya Kumar M: jayalk@intworks.biz @@ -1707,7 +1701,7 @@ S: Maintained HID CORE LAYER P: Jiri Kosina M: jkosina@suse.cz -L: linux-input@vger.kernel.org +L: linux-input@atrey.karlin.mff.cuni.cz T: git kernel.org:/pub/scm/linux/kernel/git/jikos/hid.git S: Maintained @@ -1933,7 +1927,8 @@ INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS P: Dmitry Torokhov M: dmitry.torokhov@gmail.com M: dtor@mail.ru -L: linux-input@vger.kernel.org +L: linux-input@atrey.karlin.mff.cuni.cz +L: linux-joystick@atrey.karlin.mff.cuni.cz T: git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git S: Maintained diff --git a/trunk/Makefile b/trunk/Makefile index 188c3b6b3fa9..8816060cdf40 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -168,8 +168,7 @@ export srctree objtree VPATH TOPDIR SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \ - -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ - -e s/sh[234].*/sh/ ) + -e s/ppc.*/powerpc/ -e s/mips.*/mips/ ) # Cross compiling and selecting different set of gcc/bin-utils # --------------------------------------------------------------------------- diff --git a/trunk/arch/mips/Kconfig b/trunk/arch/mips/Kconfig index 2c7d6c240b73..97da953eb5d0 100644 --- a/trunk/arch/mips/Kconfig +++ b/trunk/arch/mips/Kconfig @@ -546,7 +546,6 @@ config SIBYTE_BIGSUR select SWAP_IO_SPACE select SYS_HAS_CPU_SB1 select SYS_SUPPORTS_BIG_ENDIAN - select SYS_SUPPORTS_HIGHMEM select SYS_SUPPORTS_LITTLE_ENDIAN config SNI_RM @@ -734,27 +733,15 @@ config ARCH_MAY_HAVE_PC_FDC config BOOT_RAW bool -config CEVT_BCM1480 - bool - config CEVT_GT641XX bool config CEVT_R4K bool -config CEVT_SB1250 - bool - config CEVT_TXX9 bool -config CSRC_BCM1480 - bool - -config CSRC_SB1250 - bool - config CFE bool diff --git a/trunk/arch/mips/au1000/mtx-1/Makefile b/trunk/arch/mips/au1000/mtx-1/Makefile index 85a90941de4f..afa7007d67f7 100644 --- a/trunk/arch/mips/au1000/mtx-1/Makefile +++ b/trunk/arch/mips/au1000/mtx-1/Makefile @@ -9,5 +9,3 @@ lib-y := init.o board_setup.o irqmap.o obj-y := platform.o - -EXTRA_CFLAGS += -Werror diff --git a/trunk/arch/mips/au1000/mtx-1/platform.c b/trunk/arch/mips/au1000/mtx-1/platform.c index 49c0fb409fea..01ebff677978 100644 --- a/trunk/arch/mips/au1000/mtx-1/platform.c +++ b/trunk/arch/mips/au1000/mtx-1/platform.c @@ -34,6 +34,15 @@ static struct resource mtx1_wdt_res[] = { } }; +static struct resource mtx1_sys_btn[] = { + [0] = { + .start = 7, + .end = 7, + .name = "mtx1-sys-btn-gpio", + .flags = IORESOURCE_IRQ, + } +}; + static struct platform_device mtx1_wdt = { .name = "mtx1-wdt", .id = 0, diff --git a/trunk/arch/mips/au1000/pb1200/Makefile b/trunk/arch/mips/au1000/pb1200/Makefile index 970b1b1d5cda..22b673cf55af 100644 --- a/trunk/arch/mips/au1000/pb1200/Makefile +++ b/trunk/arch/mips/au1000/pb1200/Makefile @@ -3,5 +3,3 @@ # lib-y := init.o board_setup.o irqmap.o - -EXTRA_CFLAGS += -Werror diff --git a/trunk/arch/mips/au1000/pb1200/board_setup.c b/trunk/arch/mips/au1000/pb1200/board_setup.c index b98bebfa87c6..5dbc9868f598 100644 --- a/trunk/arch/mips/au1000/pb1200/board_setup.c +++ b/trunk/arch/mips/au1000/pb1200/board_setup.c @@ -68,11 +68,9 @@ void board_reset(void) void __init board_setup(void) { char *argptr = NULL; - -#if 0 - { u32 pin_func; +#if 0 /* Enable PSC1 SYNC for AC97. Normaly done in audio driver, * but it is board specific code, so put it here. */ @@ -83,13 +81,11 @@ void __init board_setup(void) au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */ au_sync(); - } #endif #if defined(CONFIG_I2C_AU1550) { u32 freq0, clksrc; - u32 pin_func; /* Select SMBUS in CPLD */ bcsr->resets &= ~(BCSR_RESETS_PCS0MUX); diff --git a/trunk/arch/mips/au1000/pb1200/irqmap.c b/trunk/arch/mips/au1000/pb1200/irqmap.c index c096be4ed4e7..bdf00e2a35e4 100644 --- a/trunk/arch/mips/au1000/pb1200/irqmap.c +++ b/trunk/arch/mips/au1000/pb1200/irqmap.c @@ -94,41 +94,51 @@ inline void pb1200_disable_irq(unsigned int irq_nr) bcsr->intclr = 1<<(irq_nr - PB1200_INT_BEGIN); } -static unsigned int pb1200_setup_cascade(void) +static unsigned int pb1200_startup_irq( unsigned int irq_nr ) { - int err; - - err = request_irq(AU1000_GPIO_7, &pb1200_cascade_handler, - 0, "Pb1200 Cascade", &pb1200_cascade_handler); - if (err) - return err; - - return 0; -} - -static unsigned int pb1200_startup_irq(unsigned int irq) -{ - if (++pb1200_cascade_en == 1) { - int res; - - res = pb1200_setup_cascade(); - if (res) - return res; + if (++pb1200_cascade_en == 1) + { + request_irq(AU1000_GPIO_7, &pb1200_cascade_handler, + 0, "Pb1200 Cascade", (void *)&pb1200_cascade_handler ); +#ifdef CONFIG_MIPS_PB1200 + /* We have a problem with CPLD rev3. Enable a workaround */ + if( ((bcsr->whoami & BCSR_WHOAMI_CPLD)>>4) <= 3) + { + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("Pb1200 must be at CPLD rev4. Please have Pb1200\n"); + printk("updated to latest revision. This software will not\n"); + printk("work on anything less than CPLD rev4\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + printk("\nWARNING!!!\n"); + while(1); } - - pb1200_enable_irq(irq); - +#endif + } + pb1200_enable_irq(irq_nr); return 0; } -static void pb1200_shutdown_irq(unsigned int irq) +static void pb1200_shutdown_irq( unsigned int irq_nr ) { - pb1200_disable_irq(irq); + pb1200_disable_irq(irq_nr); if (--pb1200_cascade_en == 0) - free_irq(AU1000_GPIO_7, &pb1200_cascade_handler); + { + free_irq(AU1000_GPIO_7, &pb1200_cascade_handler ); + } + return; } -static struct irq_chip external_irq_type = { +static struct irq_chip external_irq_type = +{ #ifdef CONFIG_MIPS_PB1200 .name = "Pb1200 Ext", #endif @@ -145,38 +155,16 @@ static struct irq_chip external_irq_type = { void _board_init_irq(void) { - unsigned int irq; - -#ifdef CONFIG_MIPS_PB1200 - /* We have a problem with CPLD rev3. Enable a workaround */ - if (((bcsr->whoami & BCSR_WHOAMI_CPLD) >> 4) <= 3) { - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("Pb1200 must be at CPLD rev4. Please have Pb1200\n"); - printk("updated to latest revision. This software will not\n"); - printk("work on anything less than CPLD rev4\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - printk("\nWARNING!!!\n"); - panic("Game over. Your score is 0."); - } -#endif + int irq_nr; - for (irq = PB1200_INT_BEGIN; irq <= PB1200_INT_END; irq++) { - set_irq_chip_and_handler(irq, &external_irq_type, + for (irq_nr = PB1200_INT_BEGIN; irq_nr <= PB1200_INT_END; irq_nr++) + { + set_irq_chip_and_handler(irq_nr, &external_irq_type, handle_level_irq); - pb1200_disable_irq(irq); + pb1200_disable_irq(irq_nr); } - /* - * GPIO_7 can not be hooked here, so it is hooked upon first - * request of any source attached to the cascade - */ + /* GPIO_7 can not be hooked here, so it is hooked upon first + request of any source attached to the cascade */ } + diff --git a/trunk/arch/mips/basler/excite/excite_setup.c b/trunk/arch/mips/basler/excite/excite_setup.c index 6dd8f0d46d09..24378b9223f9 100644 --- a/trunk/arch/mips/basler/excite/excite_setup.c +++ b/trunk/arch/mips/basler/excite/excite_setup.c @@ -77,7 +77,7 @@ int titan_irqflags; void __init plat_time_init(void) { const u32 modebit5 = ocd_readl(0x00e4); - unsigned int mult = ((modebit5 >> 11) & 0x1f) + 2; + unsigned int mult = ((modebit5 >> 11) & 0x1f) + 2, unsigned int div = ((modebit5 >> 16) & 0x1f) + 2; if (div == 33) diff --git a/trunk/arch/mips/jazz/irq.c b/trunk/arch/mips/jazz/irq.c index d7f8a782aae4..ae25b480723e 100644 --- a/trunk/arch/mips/jazz/irq.c +++ b/trunk/arch/mips/jazz/irq.c @@ -97,10 +97,9 @@ asmlinkage void plat_irq_dispatch(void) if (pending & IE_IRQ4) { r4030_read_reg32(JAZZ_TIMER_REGISTER); do_IRQ(JAZZ_TIMER_IRQ); - } else if (pending & IE_IRQ2) { - irq = *(volatile u8 *)JAZZ_EISA_IRQ_ACK; - do_IRQ(irq); - } else if (pending & IE_IRQ1) { + } else if (pending & IE_IRQ2) + do_IRQ(r4030_read_reg32(JAZZ_EISA_IRQ_ACK)); + else if (pending & IE_IRQ1) { irq = *(volatile u8 *)JAZZ_IO_IRQ_SOURCE >> 2; if (likely(irq > 0)) do_IRQ(irq + JAZZ_IRQ_START - 1); @@ -118,16 +117,16 @@ static void r4030_set_mode(enum clock_event_mode mode, struct clock_event_device r4030_clockevent = { .name = "r4030", .features = CLOCK_EVT_FEAT_PERIODIC, - .rating = 300, + .rating = 100, .irq = JAZZ_TIMER_IRQ, + .cpumask = CPU_MASK_CPU0, .set_mode = r4030_set_mode, }; static irqreturn_t r4030_timer_interrupt(int irq, void *dev_id) { - struct clock_event_device *cd = dev_id; + r4030_clockevent.event_handler(&r4030_clockevent); - cd->event_handler(cd); return IRQ_HANDLED; } @@ -135,22 +134,15 @@ static struct irqaction r4030_timer_irqaction = { .handler = r4030_timer_interrupt, .flags = IRQF_DISABLED, .mask = CPU_MASK_CPU0, - .name = "R4030 timer", + .name = "timer", }; void __init plat_time_init(void) { - struct clock_event_device *cd = &r4030_clockevent; - struct irqaction *action = &r4030_timer_irqaction; - unsigned int cpu = smp_processor_id(); + struct irqaction *irq = &r4030_timer_irqaction; BUG_ON(HZ != 100); - cd->cpumask = cpumask_of_cpu(cpu); - clockevents_register_device(cd); - action->dev_id = cd; - setup_irq(JAZZ_TIMER_IRQ, action); - /* * Set clock to 100Hz. * @@ -158,5 +150,8 @@ void __init plat_time_init(void) * a programmable 4-bit divider. This makes it fairly inflexible. */ r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9); + setup_irq(JAZZ_TIMER_IRQ, irq); + + clockevents_register_device(&r4030_clockevent); setup_pit_timer(); } diff --git a/trunk/arch/mips/kernel/Makefile b/trunk/arch/mips/kernel/Makefile index b551535b7e48..3196509a28d5 100644 --- a/trunk/arch/mips/kernel/Makefile +++ b/trunk/arch/mips/kernel/Makefile @@ -8,13 +8,9 @@ obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \ ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \ time.o topology.o traps.o unaligned.o -obj-$(CONFIG_CEVT_BCM1480) += cevt-bcm1480.o obj-$(CONFIG_CEVT_R4K) += cevt-r4k.o obj-$(CONFIG_CEVT_GT641XX) += cevt-gt641xx.o -obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o -obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o -obj-$(CONFIG_CSRC_SB1250) += csrc-sb1250.o binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ irix5sys.o sysirix.o diff --git a/trunk/arch/mips/kernel/cevt-bcm1480.c b/trunk/arch/mips/kernel/cevt-bcm1480.c deleted file mode 100644 index 21e6d63eb4d1..000000000000 --- a/trunk/arch/mips/kernel/cevt-bcm1480.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (C) 2000,2001,2004 Broadcom Corporation - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#define IMR_IP2_VAL K_BCM1480_INT_MAP_I0 -#define IMR_IP3_VAL K_BCM1480_INT_MAP_I1 -#define IMR_IP4_VAL K_BCM1480_INT_MAP_I2 - -/* - * The general purpose timer ticks at 1MHz independent if - * the rest of the system - */ -static void sibyte_set_mode(enum clock_event_mode mode, - struct clock_event_device *evt) -{ - unsigned int cpu = smp_processor_id(); - void __iomem *cfg, *init; - - cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); - init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); - - switch (mode) { - case CLOCK_EVT_MODE_PERIODIC: - __raw_writeq(0, cfg); - __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, init); - __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, - cfg); - break; - - case CLOCK_EVT_MODE_ONESHOT: - /* Stop the timer until we actually program a shot */ - case CLOCK_EVT_MODE_SHUTDOWN: - __raw_writeq(0, cfg); - break; - - case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */ - case CLOCK_EVT_MODE_RESUME: - ; - } -} - -static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd) -{ - unsigned int cpu = smp_processor_id(); - void __iomem *cfg, *init; - - cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); - init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); - - __raw_writeq(delta - 1, init); - __raw_writeq(M_SCD_TIMER_ENABLE, cfg); - - return 0; -} - -static irqreturn_t sibyte_counter_handler(int irq, void *dev_id) -{ - unsigned int cpu = smp_processor_id(); - struct clock_event_device *cd = dev_id; - void __iomem *cfg; - unsigned long tmode; - - if (cd->mode == CLOCK_EVT_MODE_PERIODIC) - tmode = M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS; - else - tmode = 0; - - /* ACK interrupt */ - cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); - ____raw_writeq(tmode, cfg); - - cd->event_handler(cd); - - return IRQ_HANDLED; -} - -static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent); -static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction); -static DEFINE_PER_CPU(char [18], sibyte_hpt_name); - -void __cpuinit sb1480_clockevent_init(void) -{ - unsigned int cpu = smp_processor_id(); - unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu; - struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu); - struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu); - unsigned char *name = per_cpu(sibyte_hpt_name, cpu); - - BUG_ON(cpu > 3); /* Only have 4 general purpose timers */ - - sprintf(name, "bcm1480-counter-%d", cpu); - cd->name = name; - cd->features = CLOCK_EVT_FEAT_PERIODIC | - CLOCK_EVT_FEAT_ONESHOT; - clockevent_set_clock(cd, V_SCD_TIMER_FREQ); - cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd); - cd->min_delta_ns = clockevent_delta2ns(1, cd); - cd->rating = 200; - cd->irq = irq; - cd->cpumask = cpumask_of_cpu(cpu); - cd->set_next_event = sibyte_next_event; - cd->set_mode = sibyte_set_mode; - clockevents_register_device(cd); - - bcm1480_mask_irq(cpu, irq); - - /* - * Map the timer interrupt to IP[4] of this cpu - */ - __raw_writeq(IMR_IP4_VAL, - IOADDR(A_BCM1480_IMR_REGISTER(cpu, - R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + (irq << 3))); - - bcm1480_unmask_irq(cpu, irq); - - action->handler = sibyte_counter_handler; - action->flags = IRQF_DISABLED | IRQF_PERCPU; - action->name = name; - action->dev_id = cd; - setup_irq(irq, action); -} diff --git a/trunk/arch/mips/kernel/cevt-sb1250.c b/trunk/arch/mips/kernel/cevt-sb1250.c deleted file mode 100644 index e2029d0fc39b..000000000000 --- a/trunk/arch/mips/kernel/cevt-sb1250.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (C) 2000, 2001 Broadcom Corporation - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#define IMR_IP2_VAL K_INT_MAP_I0 -#define IMR_IP3_VAL K_INT_MAP_I1 -#define IMR_IP4_VAL K_INT_MAP_I2 - -/* - * The general purpose timer ticks at 1MHz independent if - * the rest of the system - */ -static void sibyte_set_mode(enum clock_event_mode mode, - struct clock_event_device *evt) -{ - unsigned int cpu = smp_processor_id(); - void __iomem *cfg, *init; - - cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); - init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); - - switch (mode) { - case CLOCK_EVT_MODE_PERIODIC: - __raw_writeq(0, cfg); - __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, init); - __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, - cfg); - break; - - case CLOCK_EVT_MODE_ONESHOT: - /* Stop the timer until we actually program a shot */ - case CLOCK_EVT_MODE_SHUTDOWN: - __raw_writeq(0, cfg); - break; - - case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */ - case CLOCK_EVT_MODE_RESUME: - ; - } -} - -static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd) -{ - unsigned int cpu = smp_processor_id(); - void __iomem *cfg, *init; - - cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); - init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); - - __raw_writeq(delta - 1, init); - __raw_writeq(M_SCD_TIMER_ENABLE, cfg); - - return 0; -} - -static irqreturn_t sibyte_counter_handler(int irq, void *dev_id) -{ - unsigned int cpu = smp_processor_id(); - struct clock_event_device *cd = dev_id; - void __iomem *cfg; - unsigned long tmode; - - if (cd->mode == CLOCK_EVT_MODE_PERIODIC) - tmode = M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS; - else - tmode = 0; - - /* ACK interrupt */ - cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); - ____raw_writeq(tmode, cfg); - - cd->event_handler(cd); - - return IRQ_HANDLED; -} - -static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent); -static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction); -static DEFINE_PER_CPU(char [18], sibyte_hpt_name); - -void __cpuinit sb1250_clockevent_init(void) -{ - unsigned int cpu = smp_processor_id(); - unsigned int irq = K_INT_TIMER_0 + cpu; - struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu); - struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu); - unsigned char *name = per_cpu(sibyte_hpt_name, cpu); - - /* Only have 4 general purpose timers, and we use last one as hpt */ - BUG_ON(cpu > 2); - - sprintf(name, "sb1250-counter-%d", cpu); - cd->name = name; - cd->features = CLOCK_EVT_FEAT_PERIODIC | - CLOCK_EVT_FEAT_ONESHOT; - clockevent_set_clock(cd, V_SCD_TIMER_FREQ); - cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd); - cd->min_delta_ns = clockevent_delta2ns(1, cd); - cd->rating = 200; - cd->irq = irq; - cd->cpumask = cpumask_of_cpu(cpu); - cd->set_next_event = sibyte_next_event; - cd->set_mode = sibyte_set_mode; - clockevents_register_device(cd); - - sb1250_mask_irq(cpu, irq); - - /* - * Map the timer interrupt to IP[4] of this cpu - */ - __raw_writeq(IMR_IP4_VAL, - IOADDR(A_IMR_REGISTER(cpu, R_IMR_INTERRUPT_MAP_BASE) + - (irq << 3))); - - sb1250_unmask_irq(cpu, irq); - - action->handler = sibyte_counter_handler; - action->flags = IRQF_DISABLED | IRQF_PERCPU; - action->name = name; - action->dev_id = cd; - setup_irq(irq, action); -} diff --git a/trunk/arch/mips/kernel/csrc-bcm1480.c b/trunk/arch/mips/kernel/csrc-bcm1480.c deleted file mode 100644 index 868745e7184b..000000000000 --- a/trunk/arch/mips/kernel/csrc-bcm1480.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2000,2001,2004 Broadcom Corporation - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include - -static cycle_t bcm1480_hpt_read(void) -{ - return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT)); -} - -struct clocksource bcm1480_clocksource = { - .name = "zbbus-cycles", - .rating = 200, - .read = bcm1480_hpt_read, - .mask = CLOCKSOURCE_MASK(64), - .flags = CLOCK_SOURCE_IS_CONTINUOUS, -}; - -void __init sb1480_clocksource_init(void) -{ - struct clocksource *cs = &bcm1480_clocksource; - unsigned int plldiv; - unsigned long zbbus; - - plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG))); - zbbus = ((plldiv >> 1) * 50000000) + ((plldiv & 1) * 25000000); - clocksource_set_clock(cs, zbbus); - clocksource_register(cs); -} diff --git a/trunk/arch/mips/kernel/csrc-sb1250.c b/trunk/arch/mips/kernel/csrc-sb1250.c deleted file mode 100644 index ebb16e668877..000000000000 --- a/trunk/arch/mips/kernel/csrc-sb1250.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2000, 2001 Broadcom Corporation - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ -#include - -#include -#include -#include - -#include -#include -#include -#include - -#define SB1250_HPT_NUM 3 -#define SB1250_HPT_VALUE M_SCD_TIMER_CNT /* max value */ - -/* - * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over - * again. - */ -static cycle_t sb1250_hpt_read(void) -{ - unsigned int count; - - count = G_SCD_TIMER_CNT(__raw_readq(IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CNT)))); - - return SB1250_HPT_VALUE - count; -} - -struct clocksource bcm1250_clocksource = { - .name = "MIPS", - .rating = 200, - .read = sb1250_hpt_read, - .mask = CLOCKSOURCE_MASK(23), - .flags = CLOCK_SOURCE_IS_CONTINUOUS, -}; - -void __init sb1250_clocksource_init(void) -{ - struct clocksource *cs = &bcm1250_clocksource; - - /* Setup hpt using timer #3 but do not enable irq for it */ - __raw_writeq(0, - IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, - R_SCD_TIMER_CFG))); - __raw_writeq(SB1250_HPT_VALUE, - IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, - R_SCD_TIMER_INIT))); - __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, - IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, - R_SCD_TIMER_CFG))); - - clocksource_set_clock(cs, V_SCD_TIMER_FREQ); - clocksource_register(cs); -} diff --git a/trunk/arch/mips/kernel/i8253.c b/trunk/arch/mips/kernel/i8253.c index c2d497ceffdd..5d9830df3595 100644 --- a/trunk/arch/mips/kernel/i8253.c +++ b/trunk/arch/mips/kernel/i8253.c @@ -12,9 +12,8 @@ #include #include #include -#include -DEFINE_SPINLOCK(i8253_lock); +static DEFINE_SPINLOCK(i8253_lock); /* * Initialize the PIT timer. @@ -88,10 +87,11 @@ struct clock_event_device pit_clockevent = { .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, .set_mode = init_pit_timer, .set_next_event = pit_next_event, + .shift = 32, .irq = 0, }; -static irqreturn_t timer_interrupt(int irq, void *dev_id) +irqreturn_t timer_interrupt(int irq, void *dev_id) { pit_clockevent.event_handler(&pit_clockevent); @@ -111,20 +111,19 @@ static struct irqaction irq0 = { */ void __init setup_pit_timer(void) { - struct clock_event_device *cd = &pit_clockevent; - unsigned int cpu = smp_processor_id(); - /* * Start pit with the boot cpu mask and make it global after the * IO_APIC has been initialized. */ - cd->cpumask = cpumask_of_cpu(cpu); - clockevent_set_clock(cd, CLOCK_TICK_RATE); - cd->max_delta_ns = clockevent_delta2ns(0x7FFF, cd); - cd->min_delta_ns = clockevent_delta2ns(0xF, cd); - clockevents_register_device(cd); - - irq0.mask = cpumask_of_cpu(cpu); + pit_clockevent.cpumask = cpumask_of_cpu(0); + pit_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, 32); + pit_clockevent.max_delta_ns = + clockevent_delta2ns(0x7FFF, &pit_clockevent); + pit_clockevent.min_delta_ns = + clockevent_delta2ns(0xF, &pit_clockevent); + clockevents_register_device(&pit_clockevent); + + irq0.mask = cpumask_of_cpu(0); setup_irq(0, &irq0); } diff --git a/trunk/arch/mips/kernel/time.c b/trunk/arch/mips/kernel/time.c index 3284b9b4ecac..27228f583dae 100644 --- a/trunk/arch/mips/kernel/time.c +++ b/trunk/arch/mips/kernel/time.c @@ -3,7 +3,8 @@ * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net * Copyright (c) 2003, 2004 Maciej W. Rozycki * - * Common time service routines for MIPS machines. + * Common time service routines for MIPS machines. See + * Documentation/mips/time.README. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -17,17 +18,28 @@ #include #include #include +#include #include #include #include +#include #include +#include #include +#include +#include +#include +#include +#include #include #include +#include #include #include +#include + /* * forward reference */ @@ -50,6 +62,14 @@ int update_persistent_clock(struct timespec now) return rtc_mips_set_mmss(now.tv_sec); } +/* + * Null high precision timer functions for systems lacking one. + */ +static cycle_t null_hpt_read(void) +{ + return 0; +} + /* * High precision timer functions for a R4k-compatible timer. */ @@ -60,6 +80,22 @@ static cycle_t c0_hpt_read(void) int (*mips_timer_state)(void); +/* + * local_timer_interrupt() does profiling and process accounting + * on a per-CPU basis. + * + * In UP mode, it is invoked from the (global) timer_interrupt. + * + * In SMP mode, it might invoked by per-CPU timer interrupt, or + * a broadcasted inter-processor interrupt which itself is triggered + * by the global timer interrupt. + */ +void local_timer_interrupt(int irq, void *dev_id) +{ + profile_tick(CPU_PROFILING); + update_process_times(user_mode(get_irq_regs())); +} + int null_perf_irq(void) { return 0; @@ -84,13 +120,6 @@ EXPORT_SYMBOL(perf_irq); unsigned int mips_hpt_frequency; -static struct clocksource clocksource_mips = { - .name = "MIPS", - .read = c0_hpt_read, - .mask = CLOCKSOURCE_MASK(32), - .flags = CLOCK_SOURCE_IS_CONTINUOUS, -}; - static unsigned int __init calibrate_hpt(void) { cycle_t frequency, hpt_start, hpt_end, hpt_count, hz; @@ -133,6 +162,12 @@ static unsigned int __init calibrate_hpt(void) return frequency >> log_2_loops; } +struct clocksource clocksource_mips = { + .name = "MIPS", + .mask = CLOCKSOURCE_MASK(32), + .flags = CLOCK_SOURCE_IS_CONTINUOUS, +}; + void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) { u64 temp; @@ -168,6 +203,9 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd, static void __init init_mips_clocksource(void) { + if (!mips_hpt_frequency || clocksource_mips.read == null_hpt_read) + return; + /* Calclate a somewhat reasonable rating value */ clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; @@ -189,7 +227,7 @@ void __init __weak plat_time_init(void) * setup_irq calls and each clock_event_device should use its own * struct irqrequest. */ -void __init plat_timer_setup(void) +void __init plat_timer_setup(struct irqaction *irq) { BUG(); } @@ -198,8 +236,21 @@ void __init time_init(void) { plat_time_init(); - if (cpu_has_counter && (mips_hpt_frequency || mips_timer_state)) { + /* Choose appropriate high precision timer routines. */ + if (!cpu_has_counter && !clocksource_mips.read) + /* No high precision timer -- sorry. */ + clocksource_mips.read = null_hpt_read; + else if (!mips_hpt_frequency && !mips_timer_state) { + /* A high precision timer of unknown frequency. */ + if (!clocksource_mips.read) + /* No external high precision timer -- use R4k. */ + clocksource_mips.read = c0_hpt_read; + } else { /* We know counter frequency. Or we can get it. */ + if (!clocksource_mips.read) { + /* No external high precision timer -- use R4k. */ + clocksource_mips.read = c0_hpt_read; + } if (!mips_hpt_frequency) mips_hpt_frequency = calibrate_hpt(); @@ -207,8 +258,8 @@ void __init time_init(void) printk("Using %u.%03u MHz high precision timer.\n", ((mips_hpt_frequency + 500) / 1000) / 1000, ((mips_hpt_frequency + 500) / 1000) % 1000); - init_mips_clocksource(); } + init_mips_clocksource(); mips_clockevent_init(); } diff --git a/trunk/arch/mips/qemu/q-irq.c b/trunk/arch/mips/qemu/q-irq.c index 11f984767880..4681757460a1 100644 --- a/trunk/arch/mips/qemu/q-irq.c +++ b/trunk/arch/mips/qemu/q-irq.c @@ -1,5 +1,4 @@ #include -#include #include #include diff --git a/trunk/arch/mips/sgi-ip27/ip27-timer.c b/trunk/arch/mips/sgi-ip27/ip27-timer.c index 08d45369be45..dc59c3b708ed 100644 --- a/trunk/arch/mips/sgi-ip27/ip27-timer.c +++ b/trunk/arch/mips/sgi-ip27/ip27-timer.c @@ -131,7 +131,7 @@ static struct irq_chip rt_irq_type = { static int rt_next_event(unsigned long delta, struct clock_event_device *evt) { unsigned int cpu = smp_processor_id(); - int slice = cputoslice(cpu); + int slice putoslice(cpu); unsigned long cnt; cnt = LOCAL_HUB_L(PI_RT_COUNT); @@ -169,7 +169,7 @@ static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id) /* * Ack */ - LOCAL_HUB_S(PI_RT_PEND_A + PI_COUNT_OFFSET * slice, 0); + LOCAL_HUB_S(PI_RT_PEND_A + PI_COUNT_OFFSET * slice, cnt); cd->event_handler(cd); return IRQ_HANDLED; diff --git a/trunk/arch/mips/sgi-ip32/ip32-platform.c b/trunk/arch/mips/sgi-ip32/ip32-platform.c index 77febd68fcd4..7309e48d163d 100644 --- a/trunk/arch/mips/sgi-ip32/ip32-platform.c +++ b/trunk/arch/mips/sgi-ip32/ip32-platform.c @@ -42,7 +42,7 @@ static struct platform_device uart8250_device = { static int __init uart8250_init(void) { uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1; - uart8250_data[1].membase = (void __iomem *) &mace->isa.serial2; + uart8250_data[1].membase = (void __iomem *) &mace->isa.serial1; return platform_device_register(&uart8250_device); } diff --git a/trunk/arch/mips/sibyte/Kconfig b/trunk/arch/mips/sibyte/Kconfig index 366b19d33f77..e8fb880272bd 100644 --- a/trunk/arch/mips/sibyte/Kconfig +++ b/trunk/arch/mips/sibyte/Kconfig @@ -1,7 +1,5 @@ config SIBYTE_SB1250 bool - select CEVT_SB1250 - select CSRC_SB1250 select HW_HAS_PCI select IRQ_CPU select SIBYTE_ENABLE_LDT_IF_PCI @@ -11,8 +9,6 @@ config SIBYTE_SB1250 config SIBYTE_BCM1120 bool - select CEVT_SB1250 - select CSRC_SB1250 select IRQ_CPU select SIBYTE_BCM112X select SIBYTE_HAS_ZBUS_PROFILING @@ -20,8 +16,6 @@ config SIBYTE_BCM1120 config SIBYTE_BCM1125 bool - select CEVT_SB1250 - select CSRC_SB1250 select HW_HAS_PCI select IRQ_CPU select SIBYTE_BCM112X @@ -30,8 +24,6 @@ config SIBYTE_BCM1125 config SIBYTE_BCM1125H bool - select CEVT_SB1250 - select CSRC_SB1250 select HW_HAS_PCI select IRQ_CPU select SIBYTE_BCM112X @@ -41,16 +33,12 @@ config SIBYTE_BCM1125H config SIBYTE_BCM112X bool - select CEVT_SB1250 - select CSRC_SB1250 select IRQ_CPU select SIBYTE_SB1xxx_SOC select SIBYTE_HAS_ZBUS_PROFILING config SIBYTE_BCM1x80 bool - select CEVT_BCM1480 - select CSRC_BCM1480 select HW_HAS_PCI select IRQ_CPU select SIBYTE_HAS_ZBUS_PROFILING @@ -59,8 +47,6 @@ config SIBYTE_BCM1x80 config SIBYTE_BCM1x55 bool - select CEVT_BCM1480 - select CSRC_BCM1480 select HW_HAS_PCI select IRQ_CPU select SIBYTE_SB1xxx_SOC diff --git a/trunk/arch/mips/sibyte/bcm1480/irq.c b/trunk/arch/mips/sibyte/bcm1480/irq.c index e28d626255a3..61790c4bfb60 100644 --- a/trunk/arch/mips/sibyte/bcm1480/irq.c +++ b/trunk/arch/mips/sibyte/bcm1480/irq.c @@ -265,6 +265,21 @@ void __init init_bcm1480_irqs(void) } } + +static irqreturn_t bcm1480_dummy_handler(int irq, void *dev_id) +{ + return IRQ_NONE; +} + +static struct irqaction bcm1480_dummy_action = { + .handler = bcm1480_dummy_handler, + .flags = 0, + .mask = CPU_MASK_NONE, + .name = "bcm1480-private", + .next = NULL, + .dev_id = 0 +}; + /* * init_IRQ is called early in the boot sequence from init/main.c. It * is responsible for setting up the interrupt mapper and installing the @@ -293,6 +308,7 @@ void __init init_bcm1480_irqs(void) void __init arch_init_irq(void) { + unsigned int i, cpu; u64 tmp; unsigned int imask = STATUSF_IP4 | STATUSF_IP3 | STATUSF_IP2 | diff --git a/trunk/arch/mips/sibyte/bcm1480/time.c b/trunk/arch/mips/sibyte/bcm1480/time.c index 1680a68952ae..bbf19bfabccb 100644 --- a/trunk/arch/mips/sibyte/bcm1480/time.c +++ b/trunk/arch/mips/sibyte/bcm1480/time.c @@ -15,10 +15,163 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include +#include +#include +#include +#include -extern void sb1480_clockevent_init(void); -extern void sb1480_clocksource_init(void); +#include +#include +#include + +#include +#include +#include +#include + +#include + + +#define IMR_IP2_VAL K_BCM1480_INT_MAP_I0 +#define IMR_IP3_VAL K_BCM1480_INT_MAP_I1 +#define IMR_IP4_VAL K_BCM1480_INT_MAP_I2 + +/* + * The general purpose timer ticks at 1MHz independent if + * the rest of the system + */ +static void sibyte_set_mode(enum clock_event_mode mode, + struct clock_event_device *evt) +{ + unsigned int cpu = smp_processor_id(); + void __iomem *timer_cfg, *timer_init; + + timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); + timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); + + switch (mode) { + case CLOCK_EVT_MODE_PERIODIC: + __raw_writeq(0, timer_cfg); + __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, timer_init); + __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, + timer_cfg); + break; + + case CLOCK_EVT_MODE_ONESHOT: + /* Stop the timer until we actually program a shot */ + case CLOCK_EVT_MODE_SHUTDOWN: + __raw_writeq(0, timer_cfg); + break; + + case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */ + case CLOCK_EVT_MODE_RESUME: + ; + } +} + +static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd) +{ + unsigned int cpu = smp_processor_id(); + void __iomem *timer_init; + unsigned int cnt; + int res; + + timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); + cnt = __raw_readq(timer_init); + cnt += delta; + __raw_writeq(cnt, timer_init); + res = ((long)(__raw_readq(timer_init) - cnt ) > 0) ? -ETIME : 0; + + return res; +} + +static irqreturn_t sibyte_counter_handler(int irq, void *dev_id) +{ + unsigned int cpu = smp_processor_id(); + struct clock_event_device *cd = dev_id; + void __iomem *timer_cfg; + + timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); + + /* Reset the timer */ + __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, + timer_cfg); + cd->event_handler(cd); + + return IRQ_HANDLED; +} + +static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent); +static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction); +static DEFINE_PER_CPU(char [18], sibyte_hpt_name); + +void __cpuinit sb1480_clockevent_init(void) +{ + unsigned int cpu = smp_processor_id(); + unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu; + struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu); + struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu); + unsigned char *name = per_cpu(sibyte_hpt_name, cpu); + + BUG_ON(cpu > 3); /* Only have 4 general purpose timers */ + + sprintf(name, "bcm1480-counter %d", cpu); + cd->name = name; + cd->features = CLOCK_EVT_FEAT_PERIODIC | + CLOCK_EVT_FEAT_ONESHOT; + clockevent_set_clock(cd, V_SCD_TIMER_FREQ); + cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd); + cd->min_delta_ns = clockevent_delta2ns(1, cd); + cd->rating = 200; + cd->irq = irq; + cd->cpumask = cpumask_of_cpu(cpu); + cd->set_next_event = sibyte_next_event; + cd->set_mode = sibyte_set_mode; + clockevents_register_device(cd); + + bcm1480_mask_irq(cpu, irq); + + /* + * Map timer interrupt to IP[4] of this cpu + */ + __raw_writeq(IMR_IP4_VAL, + IOADDR(A_BCM1480_IMR_REGISTER(cpu, + R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + (irq << 3))); + + bcm1480_unmask_irq(cpu, irq); + + action->handler = sibyte_counter_handler; + action->flags = IRQF_DISABLED | IRQF_PERCPU; + action->name = name; + action->dev_id = cd; + setup_irq(irq, action); +} + +static cycle_t bcm1480_hpt_read(void) +{ + return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT)); +} + +struct clocksource bcm1480_clocksource = { + .name = "zbbus-cycles", + .rating = 200, + .read = bcm1480_hpt_read, + .mask = CLOCKSOURCE_MASK(64), + .flags = CLOCK_SOURCE_IS_CONTINUOUS, +}; + +void __init sb1480_clocksource_init(void) +{ + struct clocksource *cs = &bcm1480_clocksource; + unsigned int plldiv; + unsigned long zbbus; + + plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG))); + zbbus = ((plldiv >> 1) * 50000000) + ((plldiv & 1) * 25000000); + clocksource_set_clock(cs, zbbus); + clocksource_register(cs); +} void __init plat_time_init(void) { diff --git a/trunk/arch/mips/sibyte/sb1250/irq.c b/trunk/arch/mips/sibyte/sb1250/irq.c index eac9065ffe0c..52d18fc91f32 100644 --- a/trunk/arch/mips/sibyte/sb1250/irq.c +++ b/trunk/arch/mips/sibyte/sb1250/irq.c @@ -236,6 +236,20 @@ void __init init_sb1250_irqs(void) } +static irqreturn_t sb1250_dummy_handler(int irq, void *dev_id) +{ + return IRQ_NONE; +} + +static struct irqaction sb1250_dummy_action = { + .handler = sb1250_dummy_handler, + .flags = 0, + .mask = CPU_MASK_NONE, + .name = "sb1250-private", + .next = NULL, + .dev_id = 0 +}; + /* * arch_init_irq is called early in the boot sequence from init/main.c via * init_IRQ. It is responsible for setting up the interrupt mapper and diff --git a/trunk/arch/mips/sibyte/sb1250/time.c b/trunk/arch/mips/sibyte/sb1250/time.c index 68337bf7a5aa..95ad34e3fbac 100644 --- a/trunk/arch/mips/sibyte/sb1250/time.c +++ b/trunk/arch/mips/sibyte/sb1250/time.c @@ -15,10 +15,195 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include -extern void sb1250_clocksource_init(void); -extern void sb1250_clockevent_init(void); +/* + * These are routines to set up and handle interrupts from the + * sb1250 general purpose timer 0. We're using the timer as a + * system clock, so we set it up to run at 100 Hz. On every + * interrupt, we update our idea of what the time of day is, + * then call do_timer() in the architecture-independent kernel + * code to do general bookkeeping (e.g. update jiffies, run + * bottom halves, etc.) + */ +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + + +#define IMR_IP2_VAL K_INT_MAP_I0 +#define IMR_IP3_VAL K_INT_MAP_I1 +#define IMR_IP4_VAL K_INT_MAP_I2 + +#define SB1250_HPT_NUM 3 +#define SB1250_HPT_VALUE M_SCD_TIMER_CNT /* max value */ + + +/* + * The general purpose timer ticks at 1 Mhz independent if + * the rest of the system + */ +static void sibyte_set_mode(enum clock_event_mode mode, + struct clock_event_device *evt) +{ + unsigned int cpu = smp_processor_id(); + void __iomem *timer_cfg, *timer_init; + + timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); + timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); + + switch(mode) { + case CLOCK_EVT_MODE_PERIODIC: + __raw_writeq(0, timer_cfg); + __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, timer_init); + __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, + timer_cfg); + break; + + case CLOCK_EVT_MODE_ONESHOT: + /* Stop the timer until we actually program a shot */ + case CLOCK_EVT_MODE_SHUTDOWN: + __raw_writeq(0, timer_cfg); + break; + + case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */ + case CLOCK_EVT_MODE_RESUME: + ; + } +} + +static int +sibyte_next_event(unsigned long delta, struct clock_event_device *evt) +{ + unsigned int cpu = smp_processor_id(); + void __iomem *timer_cfg, *timer_init; + + timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)); + timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT)); + + __raw_writeq(0, timer_cfg); + __raw_writeq(delta, timer_init); + __raw_writeq(M_SCD_TIMER_ENABLE, timer_cfg); + + return 0; +} + +static irqreturn_t sibyte_counter_handler(int irq, void *dev_id) +{ + unsigned int cpu = smp_processor_id(); + struct clock_event_device *cd = dev_id; + + /* ACK interrupt */ + ____raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, + IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); + + cd->event_handler(cd); + + return IRQ_HANDLED; +} + +static struct irqaction sibyte_irqaction = { + .handler = sibyte_counter_handler, + .flags = IRQF_DISABLED | IRQF_PERCPU, + .name = "timer", +}; + +static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent); +static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction); +static DEFINE_PER_CPU(char [18], sibyte_hpt_name); + +void __cpuinit sb1250_clockevent_init(void) +{ + unsigned int cpu = smp_processor_id(); + unsigned int irq = K_INT_TIMER_0 + cpu; + struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu); + struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu); + unsigned char *name = per_cpu(sibyte_hpt_name, cpu); + + /* Only have 4 general purpose timers, and we use last one as hpt */ + BUG_ON(cpu > 2); + + sprintf(name, "bcm1480-counter %d", cpu); + cd->name = name; + cd->features = CLOCK_EVT_FEAT_PERIODIC | + CLOCK_EVT_FEAT_ONESHOT; + clockevent_set_clock(cd, V_SCD_TIMER_FREQ); + cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd); + cd->min_delta_ns = clockevent_delta2ns(1, cd); + cd->rating = 200; + cd->irq = irq; + cd->cpumask = cpumask_of_cpu(cpu); + cd->set_next_event = sibyte_next_event; + cd->set_mode = sibyte_set_mode; + clockevents_register_device(cd); + + sb1250_mask_irq(cpu, irq); + + /* Map the timer interrupt to ip[4] of this cpu */ + __raw_writeq(IMR_IP4_VAL, + IOADDR(A_IMR_REGISTER(cpu, R_IMR_INTERRUPT_MAP_BASE) + + (irq << 3))); + cd->cpumask = cpumask_of_cpu(0); + + sb1250_unmask_irq(cpu, irq); + + action->handler = sibyte_counter_handler; + action->flags = IRQF_DISABLED | IRQF_PERCPU; + action->name = name; + action->dev_id = cd; + setup_irq(irq, &sibyte_irqaction); +} + +/* + * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over + * again. + */ +static cycle_t sb1250_hpt_read(void) +{ + unsigned int count; + + count = G_SCD_TIMER_CNT(__raw_readq(IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CNT)))); + + return SB1250_HPT_VALUE - count; +} + +struct clocksource bcm1250_clocksource = { + .name = "MIPS", + .rating = 200, + .read = sb1250_hpt_read, + .mask = CLOCKSOURCE_MASK(23), + .flags = CLOCK_SOURCE_IS_CONTINUOUS, +}; + +void __init sb1250_clocksource_init(void) +{ + struct clocksource *cs = &bcm1250_clocksource; + + /* Setup hpt using timer #3 but do not enable irq for it */ + __raw_writeq(0, + IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, + R_SCD_TIMER_CFG))); + __raw_writeq(SB1250_HPT_VALUE, + IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, + R_SCD_TIMER_INIT))); + __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, + IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, + R_SCD_TIMER_CFG))); + + clocksource_set_clock(cs, V_SCD_TIMER_FREQ); + clocksource_register(cs); +} void __init plat_time_init(void) { diff --git a/trunk/arch/mips/sni/time.c b/trunk/arch/mips/sni/time.c index 6f339af08d22..60bc62ef0935 100644 --- a/trunk/arch/mips/sni/time.c +++ b/trunk/arch/mips/sni/time.c @@ -1,7 +1,6 @@ #include #include #include -#include #include #include @@ -81,7 +80,7 @@ static void __init sni_a20r_timer_setup(void) unsigned int cpu = smp_processor_id(); cd->cpumask = cpumask_of_cpu(cpu); - clockevents_register_device(cd); + action->dev_id = cd; setup_irq(SNI_A20R_IRQ_TIMER, &a20r_irqaction); } @@ -170,6 +169,8 @@ void __init plat_time_init(void) mips_hpt_frequency = r4k_tick * HZ; + setup_pit_timer(); + switch (sni_brd_type) { case SNI_BRD_10: case SNI_BRD_10NEW: diff --git a/trunk/arch/sh/Kconfig b/trunk/arch/sh/Kconfig index 22a3eb38438b..247f8a65e733 100644 --- a/trunk/arch/sh/Kconfig +++ b/trunk/arch/sh/Kconfig @@ -182,7 +182,9 @@ config CPU_HAS_IPR_IRQ bool config CPU_HAS_SR_RB - bool + bool "CPU has SR.RB" + depends on CPU_SH3 || CPU_SH4 + default y help This will enable the use of SR.RB register bank usage. Processors that are lacking this bit must have another method in place for @@ -289,7 +291,9 @@ config SH_DREAMCAST depends on CPU_SUBTYPE_SH7091 help Select Dreamcast if configuring for a SEGA Dreamcast. - More information at + More information at + . There is a + Dreamcast project is at . config SH_MPC1211 bool "Interface MPC1211" diff --git a/trunk/arch/sh/Kconfig.debug b/trunk/arch/sh/Kconfig.debug index ab2f9f3c354c..b507b501f0cf 100644 --- a/trunk/arch/sh/Kconfig.debug +++ b/trunk/arch/sh/Kconfig.debug @@ -86,14 +86,6 @@ config 4KSTACKS on the VM subsystem for higher order allocations. This option will also use IRQ stacks to compensate for the reduced stackspace. -config IRQSTACKS - bool "Use separate kernel stacks when processing interrupts" - depends on DEBUG_KERNEL - help - If you say Y here the kernel will use separate kernel stacks - for handling hard and soft interrupts. This can help avoid - overflowing the process kernel stacks. - config SH_KGDB bool "Include KGDB kernel debugger" select FRAME_POINTER diff --git a/trunk/arch/sh/Makefile b/trunk/arch/sh/Makefile index e189fae8b60c..408342b175c8 100644 --- a/trunk/arch/sh/Makefile +++ b/trunk/arch/sh/Makefile @@ -66,7 +66,7 @@ cflags-y += $(isaflags-y) -ffreestanding cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \ $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g') -OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -R .stab -R .stabstr -S +OBJCOPYFLAGS := -O binary -R .note -R .comment -R .stab -R .stabstr -S # # arch/sh/defconfig doesn't reflect any real hardware, and as such should diff --git a/trunk/arch/sh/boards/renesas/r7780rp/setup.c b/trunk/arch/sh/boards/renesas/r7780rp/setup.c index 0fdc0bc19145..afe9de73666a 100644 --- a/trunk/arch/sh/boards/renesas/r7780rp/setup.c +++ b/trunk/arch/sh/boards/renesas/r7780rp/setup.c @@ -16,8 +16,6 @@ #include #include #include -#include -#include #include #include #include @@ -138,50 +136,11 @@ static struct platform_device heartbeat_device = { .resource = heartbeat_resources, }; -static struct ax_plat_data ax88796_platdata = { - .flags = AXFLG_HAS_93CX6, - .wordlength = 2, - .dcr_val = 0x1, - .rcr_val = 0x40, -}; - -static struct resource ax88796_resources[] = { - { -#ifdef CONFIG_SH_R7780RP - .start = 0xa5800400, - .end = 0xa5800400 + (0x20 * 0x2) - 1, -#else - .start = 0xa4100400, - .end = 0xa4100400 + (0x20 * 0x2) - 1, -#endif - .flags = IORESOURCE_MEM, - }, - { - .start = IRQ_AX88796, - .end = IRQ_AX88796, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device ax88796_device = { - .name = "ax88796", - .id = 0, - - .dev = { - .platform_data = &ax88796_platdata, - }, - - .num_resources = ARRAY_SIZE(ax88796_resources), - .resource = ax88796_resources, -}; - - static struct platform_device *r7780rp_devices[] __initdata = { &r8a66597_usb_host_device, &m66592_usb_peripheral_device, &cf_ide_device, &heartbeat_device, - &ax88796_device, }; static int __init r7780rp_devices_setup(void) @@ -224,34 +183,6 @@ static void r7780rp_power_off(void) ctrl_outw(0x0001, PA_POFF); } -static inline unsigned char is_ide_ioaddr(unsigned long addr) -{ - return ((cf_ide_resources[0].start <= addr && - addr <= cf_ide_resources[0].end) || - (cf_ide_resources[1].start <= addr && - addr <= cf_ide_resources[1].end)); -} - -void highlander_writeb(u8 b, void __iomem *addr) -{ - unsigned long tmp = (unsigned long __force)addr; - - if (is_ide_ioaddr(tmp)) - ctrl_outw((u16)b, tmp); - else - ctrl_outb(b, tmp); -} - -u8 highlander_readb(void __iomem *addr) -{ - unsigned long tmp = (unsigned long __force)addr; - - if (is_ide_ioaddr(tmp)) - return ctrl_inw(tmp) & 0xff; - else - return ctrl_inb(tmp); -} - /* * Initialize the board */ @@ -336,6 +267,4 @@ static struct sh_machine_vector mv_highlander __initmv = { .mv_setup = highlander_setup, .mv_init_irq = highlander_init_irq, .mv_irq_demux = highlander_irq_demux, - .mv_readb = highlander_readb, - .mv_writeb = highlander_writeb, }; diff --git a/trunk/arch/sh/boards/se/7722/setup.c b/trunk/arch/sh/boards/se/7722/setup.c index 20f064083cc2..03b63457e178 100644 --- a/trunk/arch/sh/boards/se/7722/setup.c +++ b/trunk/arch/sh/boards/se/7722/setup.c @@ -103,8 +103,8 @@ static void __init se7722_setup(char **cmdline_p) ctrl_outl(0x00051001, MSTPCR0); ctrl_outl(0x00000000, MSTPCR1); - /* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC, USB */ - ctrl_outl(0xffffb7c0, MSTPCR2); + /* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC */ + ctrl_outl(0xffffbfC0, MSTPCR2); ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */ ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */ diff --git a/trunk/arch/sh/configs/r7785rp_defconfig b/trunk/arch/sh/configs/r7785rp_defconfig index 158e03f0b1ef..5c29338532da 100644 --- a/trunk/arch/sh/configs/r7785rp_defconfig +++ b/trunk/arch/sh/configs/r7785rp_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24-rc1 -# Fri Nov 2 14:30:49 2007 +# Linux kernel version: 2.6.22-rc4 +# Thu Jul 12 12:33:15 2007 # CONFIG_SUPERH=y CONFIG_RWSEM_GENERIC_SPINLOCK=y @@ -13,40 +13,39 @@ CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_TIME=y CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_SYS_SUPPORTS_NUMA=y CONFIG_SYS_SUPPORTS_PCI=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y # CONFIG_ARCH_HAS_ILOG2_U32 is not set # CONFIG_ARCH_HAS_ILOG2_U64 is not set -CONFIG_ARCH_NO_VIRT_TO_BUS=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # -# General setup +# Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_IPC_NS is not set CONFIG_SYSVIPC_SYSCTL=y # CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set # CONFIG_TASKSTATS is not set -# CONFIG_USER_NS is not set +# CONFIG_UTS_NS is not set # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_CGROUPS is not set -CONFIG_FAIR_GROUP_SCHED=y -CONFIG_FAIR_USER_SCHED=y -# CONFIG_FAIR_CGROUP_SCHED is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set # CONFIG_BLK_DEV_INITRD is not set @@ -67,6 +66,7 @@ CONFIG_BASE_FULL=y CONFIG_ANON_INODES=y # CONFIG_EPOLL is not set CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_VM_EVENT_COUNTERS=y @@ -75,17 +75,24 @@ CONFIG_SLAB=y # CONFIG_SLOB is not set # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 + +# +# Loadable module support +# CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y + +# +# Block layer +# CONFIG_BLOCK=y # CONFIG_LBD is not set # CONFIG_BLK_DEV_IO_TRACE is not set # CONFIG_LSF is not set -# CONFIG_BLK_DEV_BSG is not set # # IO Schedulers @@ -108,6 +115,7 @@ CONFIG_CPU_SH4A=y CONFIG_CPU_SHX2=y # CONFIG_CPU_SUBTYPE_SH7619 is not set # CONFIG_CPU_SUBTYPE_SH7206 is not set +# CONFIG_CPU_SUBTYPE_SH7300 is not set # CONFIG_CPU_SUBTYPE_SH7705 is not set # CONFIG_CPU_SUBTYPE_SH7706 is not set # CONFIG_CPU_SUBTYPE_SH7707 is not set @@ -115,7 +123,6 @@ CONFIG_CPU_SHX2=y # CONFIG_CPU_SUBTYPE_SH7709 is not set # CONFIG_CPU_SUBTYPE_SH7710 is not set # CONFIG_CPU_SUBTYPE_SH7712 is not set -# CONFIG_CPU_SUBTYPE_SH7720 is not set # CONFIG_CPU_SUBTYPE_SH7750 is not set # CONFIG_CPU_SUBTYPE_SH7091 is not set # CONFIG_CPU_SUBTYPE_SH7750R is not set @@ -130,6 +137,7 @@ CONFIG_CPU_SHX2=y # CONFIG_CPU_SUBTYPE_SH7780 is not set CONFIG_CPU_SUBTYPE_SH7785=y # CONFIG_CPU_SUBTYPE_SHX3 is not set +# CONFIG_CPU_SUBTYPE_SH73180 is not set # CONFIG_CPU_SUBTYPE_SH7343 is not set # CONFIG_CPU_SUBTYPE_SH7722 is not set @@ -141,17 +149,15 @@ CONFIG_MMU=y CONFIG_PAGE_OFFSET=0x80000000 CONFIG_MEMORY_START=0x08000000 CONFIG_MEMORY_SIZE=0x08000000 -# CONFIG_32BIT is not set +CONFIG_32BIT=y # CONFIG_X2TLB is not set CONFIG_VSYSCALL=y -# CONFIG_NUMA is not set CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_DEFAULT=y -CONFIG_MAX_ACTIVE_REGIONS=2 +CONFIG_MAX_ACTIVE_REGIONS=1 CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_64KB is not set @@ -161,14 +167,12 @@ CONFIG_HUGETLB_PAGE_SIZE_1MB=y # CONFIG_HUGETLB_PAGE_SIZE_4MB is not set # CONFIG_HUGETLB_PAGE_SIZE_64MB is not set CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set +CONFIG_FLATMEM_MANUAL=y # CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_HAVE_MEMORY_PRESENT=y +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPARSEMEM_STATIC=y -# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set -# CONFIG_MEMORY_HOTPLUG is not set CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=0 @@ -178,9 +182,7 @@ CONFIG_NR_QUICK=2 # Cache configuration # # CONFIG_SH_DIRECT_MAPPED is not set -CONFIG_CACHE_WRITEBACK=y -# CONFIG_CACHE_WRITETHROUGH is not set -# CONFIG_CACHE_OFF is not set +# CONFIG_SH_WRITETHROUGH is not set # # Processor features @@ -188,11 +190,12 @@ CONFIG_CACHE_WRITEBACK=y CONFIG_CPU_LITTLE_ENDIAN=y # CONFIG_CPU_BIG_ENDIAN is not set CONFIG_SH_FPU=y +# CONFIG_SH_DSP is not set CONFIG_SH_STORE_QUEUES=y CONFIG_CPU_HAS_INTEVT=y +CONFIG_CPU_HAS_INTC2_IRQ=y CONFIG_CPU_HAS_SR_RB=y CONFIG_CPU_HAS_PTEA=y -CONFIG_CPU_HAS_FPU=y # # Board support @@ -211,7 +214,6 @@ CONFIG_SH_PCLK_FREQ=50000000 # CONFIG_TICK_ONESHOT is not set # CONFIG_NO_HZ is not set # CONFIG_HIGH_RES_TIMERS is not set -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y # # CPU Frequency scaling @@ -247,7 +249,6 @@ CONFIG_KEXEC=y # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT=y CONFIG_PREEMPT_BKL=y -CONFIG_GUSA=y # # Boot options @@ -267,6 +268,10 @@ CONFIG_PCI_AUTO=y CONFIG_PCI_AUTO_UPDATE_RESOURCES=y # CONFIG_ARCH_SUPPORTS_MSI is not set # CONFIG_PCI_DEBUG is not set + +# +# PCCARD (PCMCIA/CardBus) support +# # CONFIG_PCCARD is not set # CONFIG_HOTPLUG_PCI is not set @@ -317,7 +322,6 @@ CONFIG_IP_PNP_DHCP=y CONFIG_INET_XFRM_MODE_TRANSPORT=y CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -344,6 +348,10 @@ CONFIG_LLC=m # CONFIG_LAPB is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# # CONFIG_NET_SCHED is not set # @@ -363,7 +371,6 @@ CONFIG_WIRELESS_EXT=y # CONFIG_MAC80211 is not set # CONFIG_IEEE80211 is not set # CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set # # Device Drivers @@ -372,17 +379,33 @@ CONFIG_WIRELESS_EXT=y # # Generic Driver Options # -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_SYS_HYPERVISOR is not set + +# +# Connector - unified userspace <-> kernelspace linker +# # CONFIG_CONNECTOR is not set # CONFIG_MTD is not set + +# +# Parallel port support +# # CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y + +# +# Plug and Play support +# +# CONFIG_PNPACPI is not set + +# +# Block devices +# +# CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set @@ -396,11 +419,14 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set -CONFIG_MISC_DEVICES=y + +# +# Misc devices +# # CONFIG_PHANTOM is not set -CONFIG_EEPROM_93CX6=y # CONFIG_SGI_IOC4 is not set # CONFIG_TIFM_CORE is not set +# CONFIG_BLINK is not set # CONFIG_IDE is not set # @@ -408,7 +434,6 @@ CONFIG_EEPROM_93CX6=y # # CONFIG_RAID_ATTRS is not set CONFIG_SCSI=y -CONFIG_SCSI_DMA=y # CONFIG_SCSI_TGT is not set # CONFIG_SCSI_NETLINK is not set CONFIG_SCSI_PROC_FS=y @@ -438,9 +463,12 @@ CONFIG_SCSI_WAIT_SCAN=m # CONFIG_SCSI_SPI_ATTRS is not set # CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set # CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -CONFIG_SCSI_LOWLEVEL=y + +# +# SCSI low-level drivers +# # CONFIG_ISCSI_TCP is not set # CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_SCSI_3W_9XXX is not set @@ -450,6 +478,7 @@ CONFIG_SCSI_LOWLEVEL=y # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_AIC94XX is not set +# CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_ARCMSR is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set @@ -514,7 +543,6 @@ CONFIG_SATA_SIL=y # CONFIG_PATA_OLDPIIX is not set # CONFIG_PATA_NETCELL is not set # CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_NS87415 is not set # CONFIG_PATA_OPTI is not set # CONFIG_PATA_OPTIDMA is not set # CONFIG_PATA_PDC_OLD is not set @@ -528,26 +556,45 @@ CONFIG_SATA_SIL=y # CONFIG_PATA_VIA is not set # CONFIG_PATA_WINBOND is not set CONFIG_PATA_PLATFORM=y + +# +# Multi-device support (RAID and LVM) +# # CONFIG_MD is not set + +# +# Fusion MPT device support +# # CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set # # IEEE 1394 (FireWire) support # # CONFIG_FIREWIRE is not set # CONFIG_IEEE1394 is not set + +# +# I2O device support +# # CONFIG_I2O is not set + +# +# Network device support +# CONFIG_NETDEVICES=y -# CONFIG_NETDEVICES_MULTIQUEUE is not set # CONFIG_DUMMY is not set # CONFIG_BONDING is not set -# CONFIG_MACVLAN is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# CONFIG_VETH is not set -# CONFIG_IP1000 is not set # CONFIG_ARCNET is not set # CONFIG_PHYLIB is not set + +# +# Ethernet (10 or 100Mbit) +# CONFIG_NET_ETHERNET=y CONFIG_MII=y # CONFIG_STNIC is not set @@ -556,20 +603,17 @@ CONFIG_MII=y # CONFIG_CASSINI is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_SMC91X is not set -# CONFIG_SMC911X is not set + +# +# Tulip family network device support +# # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set -# CONFIG_IBM_NEW_EMAC_ZMII is not set -# CONFIG_IBM_NEW_EMAC_RGMII is not set -# CONFIG_IBM_NEW_EMAC_TAH is not set -# CONFIG_IBM_NEW_EMAC_EMAC4 is not set # CONFIG_NET_PCI is not set -# CONFIG_B44 is not set CONFIG_NETDEV_1000=y # CONFIG_ACENIC is not set # CONFIG_DL2K is not set # CONFIG_E1000 is not set -# CONFIG_E1000E is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set @@ -587,14 +631,11 @@ CONFIG_R8169=y CONFIG_NETDEV_10000=y # CONFIG_CHELSIO_T1 is not set # CONFIG_CHELSIO_T3 is not set -# CONFIG_IXGBE is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set # CONFIG_MYRI10GE is not set # CONFIG_NETXEN_NIC is not set -# CONFIG_NIU is not set # CONFIG_MLX4_CORE is not set -# CONFIG_TEHUTI is not set # CONFIG_TR is not set # @@ -612,7 +653,15 @@ CONFIG_NETDEV_10000=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# # CONFIG_ISDN is not set + +# +# Telephony Support +# # CONFIG_PHONE is not set # @@ -620,7 +669,6 @@ CONFIG_NETDEV_10000=y # CONFIG_INPUT=y # CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set # # Userland interfaces @@ -630,6 +678,7 @@ CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set @@ -683,11 +732,21 @@ CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# # CONFIG_IPMI_HANDLER is not set +# CONFIG_WATCHDOG is not set CONFIG_HW_RANDOM=y # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set +# CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# # CONFIG_TCG_TPM is not set CONFIG_DEVPORT=y # CONFIG_I2C is not set @@ -697,31 +756,21 @@ CONFIG_DEVPORT=y # # CONFIG_SPI is not set # CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# # CONFIG_W1 is not set -# CONFIG_POWER_SUPPLY is not set CONFIG_HWMON=y # CONFIG_HWMON_VID is not set +# CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_F71882FG is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_PC87427 is not set -# CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_VT1211 is not set -# CONFIG_SENSORS_VT8231 is not set # CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set # CONFIG_HWMON_DEBUG_CHIP is not set -# CONFIG_WATCHDOG is not set - -# -# Sonics Silicon Backplane -# -CONFIG_SSB_POSSIBLE=y -# CONFIG_SSB is not set # # Multifunction device drivers @@ -738,16 +787,19 @@ CONFIG_SSB_POSSIBLE=y # # Graphics support # -# CONFIG_DRM is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set # CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set CONFIG_FB=y # CONFIG_FIRMWARE_EDID is not set # CONFIG_FB_DDC is not set # CONFIG_FB_CFB_FILLRECT is not set # CONFIG_FB_CFB_COPYAREA is not set # CONFIG_FB_CFB_IMAGEBLIT is not set -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set # CONFIG_FB_SYS_FILLRECT is not set # CONFIG_FB_SYS_COPYAREA is not set # CONFIG_FB_SYS_IMAGEBLIT is not set @@ -767,6 +819,7 @@ CONFIG_FB_DEFERRED_IO=y # CONFIG_FB_CYBER2000 is not set # CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set +# CONFIG_FB_EPSON1355 is not set # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_NVIDIA is not set # CONFIG_FB_RIVA is not set @@ -786,12 +839,6 @@ CONFIG_FB_DEFERRED_IO=y # CONFIG_FB_ARK is not set # CONFIG_FB_PM3 is not set # CONFIG_FB_VIRTUAL is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Display device support -# -# CONFIG_DISPLAY_SUPPORT is not set # CONFIG_LOGO is not set # @@ -808,14 +855,20 @@ CONFIG_SOUND=m # Open Sound System # CONFIG_SOUND_PRIME=m +# CONFIG_OSS_OBSOLETE is not set # CONFIG_SOUND_TRIDENT is not set # CONFIG_SOUND_MSNDCLAS is not set # CONFIG_SOUND_MSNDPIN is not set -CONFIG_HID_SUPPORT=y + +# +# HID Devices +# CONFIG_HID=y # CONFIG_HID_DEBUG is not set -# CONFIG_HIDRAW is not set -CONFIG_USB_SUPPORT=y + +# +# USB support +# CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y @@ -830,8 +883,32 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_USB_GADGET is not set # CONFIG_MMC is not set + +# +# LED devices +# # CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + +# +# InfiniBand support +# # CONFIG_INFINIBAND is not set + +# +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# + +# +# Real Time Clock +# CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y CONFIG_RTC_HCTOSYS=y @@ -847,6 +924,10 @@ CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # CONFIG_RTC_DRV_TEST is not set +# +# I2C RTC drivers +# + # # SPI RTC drivers # @@ -855,10 +936,8 @@ CONFIG_RTC_INTF_DEV=y # Platform RTC drivers # # CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set # CONFIG_RTC_DRV_DS1742 is not set # CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T59 is not set # CONFIG_RTC_DRV_V3020 is not set # @@ -867,9 +946,17 @@ CONFIG_RTC_INTF_DEV=y CONFIG_RTC_DRV_SH=y # -# Userspace I/O +# DMA Engine support +# +# CONFIG_DMA_ENGINE is not set + +# +# DMA Clients +# + +# +# DMA Devices # -# CONFIG_UIO is not set # # File systems @@ -930,6 +1017,7 @@ CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y +CONFIG_RAMFS=y CONFIG_CONFIGFS_FS=m # @@ -948,7 +1036,10 @@ CONFIG_CONFIGFS_FS=m # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y + +# +# Network File Systems +# CONFIG_NFS_FS=y CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set @@ -974,12 +1065,17 @@ CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y @@ -1020,18 +1116,23 @@ CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set + +# +# Distributed Lock Manager +# # CONFIG_DLM is not set -CONFIG_INSTRUMENTATION=y + +# +# Profiling support +# CONFIG_PROFILING=y CONFIG_OPROFILE=m -# CONFIG_MARKERS is not set # # Kernel hacking # CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set @@ -1040,7 +1141,6 @@ CONFIG_DEBUG_FS=y CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_SHIRQ is not set # CONFIG_DETECT_SOFTLOCKUP is not set -CONFIG_SCHED_DEBUG=y # CONFIG_SCHEDSTATS is not set # CONFIG_TIMER_STATS is not set # CONFIG_DEBUG_SLAB is not set @@ -1050,7 +1150,6 @@ CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_LOCK_ALLOC=y # CONFIG_PROVE_LOCKING is not set CONFIG_LOCKDEP=y -# CONFIG_LOCK_STAT is not set # CONFIG_DEBUG_LOCKDEP is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set CONFIG_DEBUG_LOCKING_API_SELFTESTS=y @@ -1060,21 +1159,17 @@ CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_SG is not set CONFIG_FRAME_POINTER=y CONFIG_FORCED_INLINING=y -# CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_FAULT_INJECTION is not set -# CONFIG_SAMPLES is not set CONFIG_SH_STANDARD_BIOS=y # CONFIG_EARLY_SCIF_CONSOLE is not set CONFIG_EARLY_PRINTK=y # CONFIG_DEBUG_BOOTMEM is not set CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y -CONFIG_4KSTACKS=y -# CONFIG_IRQSTACKS is not set +# CONFIG_4KSTACKS is not set # CONFIG_SH_KGDB is not set # @@ -1082,7 +1177,10 @@ CONFIG_4KSTACKS=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set -# CONFIG_SECURITY_FILE_CAPABILITIES is not set + +# +# Cryptographic options +# CONFIG_CRYPTO=y CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_BLKCIPHER=y @@ -1103,7 +1201,6 @@ CONFIG_CRYPTO_ECB=m CONFIG_CRYPTO_CBC=y CONFIG_CRYPTO_PCBC=m # CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_XTS is not set # CONFIG_CRYPTO_CRYPTD is not set CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_FCRYPT is not set @@ -1117,14 +1214,15 @@ CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_KHAZAD is not set # CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_SEED is not set # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_CAMELLIA is not set # CONFIG_CRYPTO_TEST is not set -# CONFIG_CRYPTO_AUTHENC is not set -CONFIG_CRYPTO_HW=y + +# +# Hardware crypto devices +# # # Library routines @@ -1134,7 +1232,6 @@ CONFIG_BITREVERSE=y # CONFIG_CRC16 is not set # CONFIG_CRC_ITU_T is not set CONFIG_CRC32=y -# CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y diff --git a/trunk/arch/sh/drivers/pci/pci-st40.c b/trunk/arch/sh/drivers/pci/pci-st40.c index 0814a5afe9b7..1502a14386b6 100644 --- a/trunk/arch/sh/drivers/pci/pci-st40.c +++ b/trunk/arch/sh/drivers/pci/pci-st40.c @@ -114,7 +114,7 @@ static struct pci_err int_error[]={ { INT_MWPDI, "MWPDI: PERR from target at data write"}, { INT_MRDPEI, "MRDPEI: Master read data parity error"} }; -#define NUM_PCI_INT_ERRS ARRAY_SIZE(int_error) +#define NUM_PCI_INT_ERRS (sizeof(int_error)/sizeof(struct pci_err)) static struct pci_err aint_error[]={ { AINT_MBI, "MBI: Master broken"}, @@ -126,7 +126,7 @@ static struct pci_err aint_error[]={ { AINT_WDPE, "WDPE: Write data parity"} }; -#define NUM_PCI_AINT_ERRS ARRAY_SIZE(aint_error) +#define NUM_PCI_AINT_ERRS (sizeof(aint_error)/sizeof(struct pci_err)) static void print_pci_errors(unsigned reg,struct pci_err *error,int num_errors) { diff --git a/trunk/arch/sh/kernel/cpu/irq/ipr.c b/trunk/arch/sh/kernel/cpu/irq/ipr.c index 56ea7b269b59..5da325414880 100644 --- a/trunk/arch/sh/kernel/cpu/irq/ipr.c +++ b/trunk/arch/sh/kernel/cpu/irq/ipr.c @@ -49,6 +49,7 @@ static void enable_ipr_irq(unsigned int irq) * bits/4. This is to make it easier to read the value directly from the * datasheets. The IPR address is calculated using the ipr_offset table. */ + void register_ipr_controller(struct ipr_desc *desc) { int i; @@ -70,4 +71,12 @@ void register_ipr_controller(struct ipr_desc *desc) disable_ipr_irq(p->irq); } } + EXPORT_SYMBOL(register_ipr_controller); + +#if !defined(CONFIG_CPU_HAS_PINT_IRQ) +int ipr_irq_demux(int irq) +{ + return irq; +} +#endif diff --git a/trunk/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/trunk/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index b9c6547c4a90..55f66104431d 100644 --- a/trunk/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/trunk/arch/sh/kernel/cpu/sh4a/setup-sh7722.c @@ -14,32 +14,6 @@ #include #include -static struct resource usbf_resources[] = { - [0] = { - .name = "m66592_udc", - .start = 0xA4480000, - .end = 0xA44800FF, - .flags = IORESOURCE_MEM, - }, - [1] = { - .name = "m66592_udc", - .start = 65, - .end = 65, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device usbf_device = { - .name = "m66592_udc", - .id = -1, - .dev = { - .dma_mask = NULL, - .coherent_dma_mask = 0xffffffff, - }, - .num_resources = ARRAY_SIZE(usbf_resources), - .resource = usbf_resources, -}; - static struct plat_sci_port sci_platform_data[] = { { .mapbase = 0xffe00000, @@ -73,7 +47,6 @@ static struct platform_device sci_device = { }; static struct platform_device *sh7722_devices[] __initdata = { - &usbf_device, &sci_device, }; diff --git a/trunk/arch/sh/kernel/irq.c b/trunk/arch/sh/kernel/irq.c index 348da194ec99..4b49d03ffbd2 100644 --- a/trunk/arch/sh/kernel/irq.c +++ b/trunk/arch/sh/kernel/irq.c @@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v) } #endif -#ifdef CONFIG_IRQSTACKS +#ifdef CONFIG_4KSTACKS /* * per-CPU IRQ handling contexts (thread information and stack) */ @@ -85,7 +85,7 @@ static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) { struct pt_regs *old_regs = set_irq_regs(regs); -#ifdef CONFIG_IRQSTACKS +#ifdef CONFIG_4KSTACKS union irq_ctx *curctx, *irqctx; #endif @@ -109,7 +109,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) irq = irq_demux(evt2irq(irq)); -#ifdef CONFIG_IRQSTACKS +#ifdef CONFIG_4KSTACKS curctx = (union irq_ctx *)current_thread_info(); irqctx = hardirq_ctx[smp_processor_id()]; @@ -157,7 +157,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) return 1; } -#ifdef CONFIG_IRQSTACKS +#ifdef CONFIG_4KSTACKS static char softirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__section__(".bss.page_aligned"))); diff --git a/trunk/arch/sh/kernel/setup.c b/trunk/arch/sh/kernel/setup.c index 0b8c45d53a47..b749403f6b38 100644 --- a/trunk/arch/sh/kernel/setup.c +++ b/trunk/arch/sh/kernel/setup.c @@ -32,6 +32,12 @@ #include #include +extern void * __rd_start, * __rd_end; + +/* + * Machine setup.. + */ + /* * Initialize loops_per_jiffy as 10000000 (1000MIPS). * This value will be used at the very early stage of serial setup. @@ -57,25 +63,33 @@ struct screen_info screen_info; extern int root_mountflags; +/* + * This is set up by the setup-routine at boot-time + */ +#define PARAM ((unsigned char *)empty_zero_page) + +#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000)) +#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004)) +#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008)) +#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c)) +#define INITRD_START (*(unsigned long *) (PARAM+0x010)) +#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014)) +/* ... */ +#define COMMAND_LINE ((char *) (PARAM+0x100)) + #define RAMDISK_IMAGE_START_MASK 0x07FF #define RAMDISK_PROMPT_FLAG 0x8000 #define RAMDISK_LOAD_FLAG 0x4000 static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, }; -static struct resource code_resource = { - .name = "Kernel code", - .flags = IORESOURCE_BUSY | IORESOURCE_MEM, -}; - -static struct resource data_resource = { - .name = "Kernel data", - .flags = IORESOURCE_BUSY | IORESOURCE_MEM, -}; +static struct resource code_resource = { .name = "Kernel code", }; +static struct resource data_resource = { .name = "Kernel data", }; unsigned long memory_start; EXPORT_SYMBOL(memory_start); -unsigned long memory_end = 0; + +unsigned long memory_end; EXPORT_SYMBOL(memory_end); static int __init early_parse_mem(char *p) @@ -181,7 +195,14 @@ void __init setup_bootmem_allocator(unsigned long free_pfn) sparse_memory_present_with_active_regions(0); #ifdef CONFIG_BLK_DEV_INITRD - ROOT_DEV = Root_RAM0; + ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); + if (&__rd_start != &__rd_end) { + LOADER_TYPE = 1; + INITRD_START = PHYSADDR((unsigned long)&__rd_start) - + __MEMORY_START; + INITRD_SIZE = (unsigned long)&__rd_end - + (unsigned long)&__rd_start; + } if (LOADER_TYPE && INITRD_START) { if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { @@ -244,8 +265,7 @@ void __init setup_arch(char **cmdline_p) data_resource.end = virt_to_phys(_edata)-1; memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; - if (!memory_end) - memory_end = memory_start + __MEMORY_SIZE; + memory_end = memory_start + __MEMORY_SIZE; #ifdef CONFIG_CMDLINE_BOOL strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line)); diff --git a/trunk/arch/sh/kernel/vmlinux.lds.S b/trunk/arch/sh/kernel/vmlinux.lds.S index 0956fb3681a3..6d5abba2ee27 100644 --- a/trunk/arch/sh/kernel/vmlinux.lds.S +++ b/trunk/arch/sh/kernel/vmlinux.lds.S @@ -1,4 +1,4 @@ -/* +/* $Id: vmlinux.lds.S,v 1.8 2003/05/16 17:18:14 lethal Exp $ * ld script to make SuperH Linux kernel * Written by Niibe Yutaka */ @@ -15,124 +15,121 @@ OUTPUT_ARCH(sh) ENTRY(_start) SECTIONS { - . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET; - _text = .; /* Text and read-only data */ - - .empty_zero_page : { - *(.empty_zero_page) + . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET; + _text = .; /* Text and read-only data */ + text = .; /* Text and read-only data */ + .empty_zero_page : { + *(.empty_zero_page) } = 0 - - .text : { - *(.text.head) - TEXT_TEXT - SCHED_TEXT - LOCK_TEXT - KPROBES_TEXT - *(.fixup) - *(.gnu.warning) + .text : { + *(.text.head) + TEXT_TEXT + SCHED_TEXT + LOCK_TEXT + *(.fixup) + *(.gnu.warning) } = 0x0009 - . = ALIGN(16); /* Exception table */ - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - _etext = .; /* End of text section */ + . = ALIGN(16); /* Exception table */ + __start___ex_table = .; + __ex_table : { *(__ex_table) } + __stop___ex_table = .; - BUG_TABLE - NOTES - RO_DATA(PAGE_SIZE) + _etext = .; /* End of text section */ - . = ALIGN(THREAD_SIZE); - .data : { /* Data */ - *(.data.init_task) + RODATA - . = ALIGN(L1_CACHE_BYTES); - *(.data.cacheline_aligned) + BUG_TABLE - . = ALIGN(L1_CACHE_BYTES); - *(.data.read_mostly) + .data : { /* Data */ + DATA_DATA - . = ALIGN(PAGE_SIZE); - *(.data.page_aligned) + /* Align the initial ramdisk image (INITRD) on page boundaries. */ + . = ALIGN(PAGE_SIZE); + __rd_start = .; + *(.initrd) + . = ALIGN(PAGE_SIZE); + __rd_end = .; - __nosave_begin = .; - *(.data.nosave) - . = ALIGN(PAGE_SIZE); - __nosave_end = .; - - DATA_DATA - CONSTRUCTORS + CONSTRUCTORS } - _edata = .; /* End of data section */ - - . = ALIGN(PAGE_SIZE); /* Init code and data */ - __init_begin = .; - _sinittext = .; - .init.text : { *(.init.text) } - _einittext = .; - .init.data : { *(.init.data) } - - . = ALIGN(16); - __setup_start = .; - .init.setup : { *(.init.setup) } - __setup_end = .; - - __initcall_start = .; - .initcall.init : { - INITCALLS - } - __initcall_end = .; - __con_initcall_start = .; - .con_initcall.init : { *(.con_initcall.init) } - __con_initcall_end = .; - - SECURITY_INIT + . = ALIGN(PAGE_SIZE); + .data.page_aligned : { *(.data.page_aligned) } + __nosave_begin = .; + .data_nosave : { *(.data.nosave) } + . = ALIGN(PAGE_SIZE); + __nosave_end = .; + + PERCPU(PAGE_SIZE) + + . = ALIGN(L1_CACHE_BYTES); + .data.cacheline_aligned : { *(.data.cacheline_aligned) } + + _edata = .; /* End of data section */ + + . = ALIGN(THREAD_SIZE); /* init_task */ + .data.init_task : { *(.data.init_task) } + + . = ALIGN(PAGE_SIZE); /* Init code and data */ + __init_begin = .; + _sinittext = .; + .init.text : { *(.init.text) } + _einittext = .; + .init.data : { *(.init.data) } + . = ALIGN(16); + __setup_start = .; + .init.setup : { *(.init.setup) } + __setup_end = .; + __initcall_start = .; + .initcall.init : { + INITCALLS + } + __initcall_end = .; + __con_initcall_start = .; + .con_initcall.init : { *(.con_initcall.init) } + __con_initcall_end = .; + SECURITY_INIT + + /* .exit.text is discarded at runtime, not link time, to deal with + references from .rodata */ + .exit.text : { *(.exit.text) } + .exit.data : { *(.exit.data) } #ifdef CONFIG_BLK_DEV_INITRD - . = ALIGN(PAGE_SIZE); - __initramfs_start = .; - .init.ramfs : { *(.init.ramfs) } - __initramfs_end = .; + . = ALIGN(PAGE_SIZE); + + __initramfs_start = .; + .init.ramfs : { *(.init.ramfs) } + __initramfs_end = .; #endif + . = ALIGN(4); + __machvec_start = .; + .machvec.init : { *(.machvec.init) } + __machvec_end = .; + + . = ALIGN(PAGE_SIZE); + .bss : { + __init_end = .; + __bss_start = .; /* BSS */ + *(.bss.page_aligned) + *(.bss) . = ALIGN(4); - __machvec_start = .; - .machvec.init : { *(.machvec.init) } - __machvec_end = .; - - PERCPU(PAGE_SIZE) - - /* - * .exit.text is discarded at runtime, not link time, to deal with - * references from __bug_table - */ - .exit.text : { *(.exit.text) } - .exit.data : { *(.exit.data) } - - . = ALIGN(PAGE_SIZE); - .bss : { - __init_end = .; - __bss_start = .; /* BSS */ - *(.bss.page_aligned) - *(.bss) - *(COMMON) - . = ALIGN(4); - _ebss = .; /* uClinux MTD sucks */ - _end = . ; + _ebss = .; /* uClinux MTD sucks */ + _end = . ; + } + + /* When something in the kernel is NOT compiled as a module, the + * module cleanup code and data are put into these segments. Both + * can then be thrown away, as cleanup code is never called unless + * it's a module. + */ + /DISCARD/ : { + *(.exitcall.exit) } - /* - * When something in the kernel is NOT compiled as a module, the - * module cleanup code and data are put into these segments. Both - * can then be thrown away, as cleanup code is never called unless - * it's a module. - */ - /DISCARD/ : { - *(.exitcall.exit) - } + STABS_DEBUG - STABS_DEBUG - DWARF_DEBUG + DWARF_DEBUG } diff --git a/trunk/arch/sh/kernel/vsyscall/vsyscall.lds.S b/trunk/arch/sh/kernel/vsyscall/vsyscall.lds.S index 6d59ee7c23dd..c9bf2af35d35 100644 --- a/trunk/arch/sh/kernel/vsyscall/vsyscall.lds.S +++ b/trunk/arch/sh/kernel/vsyscall/vsyscall.lds.S @@ -38,10 +38,7 @@ SECTIONS .text : { *(.text) } :text =0x90909090 .note : { *(.note.*) } :text :note .eh_frame_hdr : { *(.eh_frame_hdr ) } :text :eh_frame_hdr - .eh_frame : { - KEEP (*(.eh_frame)) - LONG (0) - } :text + .eh_frame : { KEEP (*(.eh_frame)) } :text .dynamic : { *(.dynamic) } :text :dynamic .useless : { *(.got.plt) *(.got) diff --git a/trunk/arch/sh/mm/copy_page.S b/trunk/arch/sh/mm/copy_page.S index 3d8409daa4be..a81dbdb05596 100644 --- a/trunk/arch/sh/mm/copy_page.S +++ b/trunk/arch/sh/mm/copy_page.S @@ -255,11 +255,7 @@ EX( mov.l @r5+,r8 ) EX( mov.l @r5+,r9 ) EX( mov.l @r5+,r10 ) EX( mov.l @r5+,r11 ) -#ifdef CONFIG_CPU_SH4 EX( movca.l r0,@r4 ) -#else -EX( mov.l r0,@r4 ) -#endif add #-32, r6 EX( mov.l r1,@(4,r4) ) mov #32, r0 diff --git a/trunk/arch/sh/oprofile/op_model_sh7750.c b/trunk/arch/sh/oprofile/op_model_sh7750.c index 6b9a98e07004..ebee7e24ede9 100644 --- a/trunk/arch/sh/oprofile/op_model_sh7750.c +++ b/trunk/arch/sh/oprofile/op_model_sh7750.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -43,6 +44,8 @@ */ #define NR_CNTRS 2 +extern const char *get_cpu_subtype(void); + struct op_counter_config { unsigned long enabled; unsigned long event; @@ -108,12 +111,17 @@ static struct op_counter_config ctr[NR_CNTRS]; * behavior. */ -static int sh7750_timer_notify(struct pt_regs *regs) +static int sh7750_timer_notify(struct notifier_block *self, + unsigned long val, void *regs) { - oprofile_add_sample(regs, 0); + oprofile_add_sample((struct pt_regs *)regs, 0); return 0; } +static struct notifier_block sh7750_timer_notifier = { + .notifier_call = sh7750_timer_notify, +}; + static u64 sh7750_read_counter(int counter) { u32 hi, lo; @@ -232,7 +240,7 @@ static int sh7750_perf_counter_start(void) ctrl_outw(pmcr | PMCR_ENABLE, PMCR2); } - return register_timer_hook(sh7750_timer_notify); + return register_profile_notifier(&sh7750_timer_notifier); } static void sh7750_perf_counter_stop(void) @@ -240,7 +248,7 @@ static void sh7750_perf_counter_stop(void) ctrl_outw(ctrl_inw(PMCR1) & ~PMCR_PMEN, PMCR1); ctrl_outw(ctrl_inw(PMCR2) & ~PMCR_PMEN, PMCR2); - unregister_timer_hook(sh7750_timer_notify); + unregister_profile_notifier(&sh7750_timer_notifier); } static struct oprofile_operations sh7750_perf_counter_ops = { @@ -249,13 +257,13 @@ static struct oprofile_operations sh7750_perf_counter_ops = { .stop = sh7750_perf_counter_stop, }; -int __init oprofile_arch_init(struct oprofile_operations *ops) +int __init oprofile_arch_init(struct oprofile_operations **ops) { if (!(current_cpu_data.flags & CPU_HAS_PERF_COUNTER)) return -ENODEV; - ops = &sh7750_perf_counter_ops; - ops->cpu_type = (char *)get_cpu_subtype(¤t_cpu_data); + sh7750_perf_counter_ops.cpu_type = (char *)get_cpu_subtype(); + *ops = &sh7750_perf_counter_ops; printk(KERN_INFO "oprofile: using SH-4 (%s) performance monitoring.\n", sh7750_perf_counter_ops.cpu_type); diff --git a/trunk/arch/sh/tools/mach-types b/trunk/arch/sh/tools/mach-types index ff071693325c..439bfe3d29af 100644 --- a/trunk/arch/sh/tools/mach-types +++ b/trunk/arch/sh/tools/mach-types @@ -1,35 +1,26 @@ # -# MACH_ CONFIG_ +# List of boards. # # -# List of board groups. +# MACH_ CONFIG_ # SE SH_SOLUTION_ENGINE -HIGHLANDER SH_HIGHLANDER -RTS7751R2D SH_RTS7751R2D - -# -# List of companion chips / MFDs. -# -HD64461 HD64461 -HD64465 HD64465 - -# -# List of boards. -# -7206SE SH_7206_SOLUTION_ENGINE +7751SE SH_7751_SOLUTION_ENGINE +7722SE SH_7722_SOLUTION_ENGINE 7343SE SH_7343_SOLUTION_ENGINE +7206SE SH_7206_SOLUTION_ENGINE 7619SE SH_7619_SOLUTION_ENGINE -7722SE SH_7722_SOLUTION_ENGINE -7751SE SH_7751_SOLUTION_ENGINE 7780SE SH_7780_SOLUTION_ENGINE 7751SYSTEMH SH_7751_SYSTEMH HP6XX SH_HP6XX +HD64461 HD64461 +HD64465 HD64465 DREAMCAST SH_DREAMCAST MPC1211 SH_MPC1211 SNAPGEAR SH_SECUREEDGE5410 HS7751RVOIP SH_HS7751RVOIP +RTS7751R2D SH_RTS7751R2D EDOSK7705 SH_EDOSK7705 SH4202_MICRODEV SH_SH4202_MICRODEV SH03 SH_SH03 @@ -41,7 +32,3 @@ TITAN SH_TITAN SHMIN SH_SHMIN 7710VOIPGW SH_7710VOIPGW LBOXRE2 SH_LBOX_RE2 -X3PROTO SH_X3PROTO -MAGICPANELR2 SH_MAGIC_PANEL_R2 -R2D_PLUS RTS7751R2D_PLUS -R2D_1 RTS7751R2D_1 diff --git a/trunk/arch/sh64/configs/cayman_defconfig b/trunk/arch/sh64/configs/cayman_defconfig index 75552bb01405..91b59118c1b1 100644 --- a/trunk/arch/sh64/configs/cayman_defconfig +++ b/trunk/arch/sh64/configs/cayman_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24-rc1 -# Fri Nov 2 14:35:27 2007 +# Linux kernel version: 2.6.23-rc8 +# Tue Oct 9 15:37:16 2007 # CONFIG_SUPERH=y CONFIG_SUPERH64=y @@ -36,10 +36,6 @@ CONFIG_POSIX_MQUEUE=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_CGROUPS is not set -CONFIG_FAIR_GROUP_SCHED=y -CONFIG_FAIR_USER_SCHED=y -# CONFIG_FAIR_CGROUP_SCHED is not set CONFIG_SYSFS_DEPRECATED=y # CONFIG_RELAY is not set # CONFIG_BLK_DEV_INITRD is not set @@ -152,7 +148,6 @@ CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set -# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=0 @@ -165,6 +160,10 @@ CONFIG_PCI=y CONFIG_SH_PCIDMA_NONCOHERENT=y # CONFIG_ARCH_SUPPORTS_MSI is not set # CONFIG_PCI_DEBUG is not set + +# +# PCCARD (PCMCIA/CardBus) support +# # CONFIG_PCCARD is not set # CONFIG_HOTPLUG_PCI is not set @@ -210,7 +209,6 @@ CONFIG_IP_PNP=y CONFIG_INET_XFRM_MODE_TRANSPORT=y CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -236,6 +234,10 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_LAPB is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# # CONFIG_NET_SCHED is not set # @@ -264,7 +266,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # # Generic Driver Options # -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set @@ -332,7 +333,6 @@ CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_ISCSI_ATTRS is not set # CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set CONFIG_SCSI_LOWLEVEL=y # CONFIG_ISCSI_TCP is not set # CONFIG_BLK_DEV_3W_XXXX_RAID is not set @@ -370,7 +370,14 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_SRP is not set # CONFIG_ATA is not set # CONFIG_MD is not set + +# +# Fusion MPT device support +# # CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set # # IEEE 1394 (FireWire) support @@ -385,8 +392,6 @@ CONFIG_NETDEVICES=y # CONFIG_MACVLAN is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# CONFIG_VETH is not set -# CONFIG_IP1000 is not set # CONFIG_ARCNET is not set # CONFIG_PHYLIB is not set CONFIG_NET_ETHERNET=y @@ -397,7 +402,6 @@ CONFIG_NET_ETHERNET=y # CONFIG_CASSINI is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_SMC91X is not set -# CONFIG_SMC911X is not set CONFIG_NET_TULIP=y # CONFIG_DE2104X is not set CONFIG_TULIP=y @@ -409,16 +413,13 @@ CONFIG_TULIP=y # CONFIG_DM9102 is not set # CONFIG_ULI526X is not set # CONFIG_HP100 is not set -# CONFIG_IBM_NEW_EMAC_ZMII is not set -# CONFIG_IBM_NEW_EMAC_RGMII is not set -# CONFIG_IBM_NEW_EMAC_TAH is not set -# CONFIG_IBM_NEW_EMAC_EMAC4 is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set # CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set @@ -436,7 +437,6 @@ CONFIG_NETDEV_1000=y # CONFIG_ACENIC is not set # CONFIG_DL2K is not set # CONFIG_E1000 is not set -# CONFIG_E1000E is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set @@ -453,14 +453,11 @@ CONFIG_NETDEV_1000=y CONFIG_NETDEV_10000=y # CONFIG_CHELSIO_T1 is not set # CONFIG_CHELSIO_T3 is not set -# CONFIG_IXGBE is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set # CONFIG_MYRI10GE is not set # CONFIG_NETXEN_NIC is not set -# CONFIG_NIU is not set # CONFIG_MLX4_CORE is not set -# CONFIG_TEHUTI is not set # CONFIG_TR is not set # @@ -496,6 +493,7 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set @@ -563,9 +561,23 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_IPMI_HANDLER is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set + +# +# PCI-based Watchdog Cards +# +# CONFIG_PCIPCWATCHDOG is not set +# CONFIG_WDTPCI is not set CONFIG_HW_RANDOM=y # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set +# CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # CONFIG_TCG_TPM is not set CONFIG_DEVPORT=y @@ -632,6 +644,8 @@ CONFIG_I2C_BOARDINFO=y # CONFIG_POWER_SUPPLY is not set CONFIG_HWMON=y # CONFIG_HWMON_VID is not set +# CONFIG_SENSORS_ABITUGURU is not set +# CONFIG_SENSORS_ABITUGURU3 is not set # CONFIG_SENSORS_AD7418 is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set @@ -639,12 +653,12 @@ CONFIG_HWMON=y # CONFIG_SENSORS_ADM1029 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_ATXP1 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_F71882FG is not set -# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set @@ -680,25 +694,6 @@ CONFIG_HWMON=y # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set # CONFIG_HWMON_DEBUG_CHIP is not set -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set - -# -# Sonics Silicon Backplane -# -CONFIG_SSB_POSSIBLE=y -# CONFIG_SSB is not set # # Multifunction device drivers @@ -718,11 +713,11 @@ CONFIG_VIDEO_HELPER_CHIPS_AUTO=y # CONFIG_VIDEO_VIVI is not set # CONFIG_VIDEO_SAA5246A is not set # CONFIG_VIDEO_SAA5249 is not set +# CONFIG_TUNER_TEA5761 is not set # CONFIG_VIDEO_SAA7134 is not set # CONFIG_VIDEO_HEXIUM_ORION is not set # CONFIG_VIDEO_HEXIUM_GEMINI is not set # CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_CX23885 is not set # CONFIG_VIDEO_CAFE_CCIC is not set # CONFIG_RADIO_ADAPTERS is not set CONFIG_DVB_CORE=y @@ -801,7 +796,6 @@ CONFIG_DVB_CAPTURE_DRIVERS=y # CONFIG_DVB_OR51132 is not set # CONFIG_DVB_BCM3510 is not set # CONFIG_DVB_LGDT330X is not set -# CONFIG_DVB_S5H1409 is not set # # Tuners/PLL support @@ -811,9 +805,6 @@ CONFIG_DVB_CAPTURE_DRIVERS=y # CONFIG_DVB_TDA827X is not set # CONFIG_DVB_TUNER_QT1010 is not set # CONFIG_DVB_TUNER_MT2060 is not set -# CONFIG_DVB_TUNER_MT2266 is not set -# CONFIG_DVB_TUNER_MT2131 is not set -# CONFIG_DVB_TUNER_DIB0070 is not set # # Miscellaneous devices @@ -826,7 +817,12 @@ CONFIG_DAB=y # # Graphics support # -# CONFIG_DRM is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set # CONFIG_VGASTATE is not set CONFIG_VIDEO_OUTPUT_CONTROL=y CONFIG_FB=y @@ -835,7 +831,6 @@ CONFIG_FIRMWARE_EDID=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set # CONFIG_FB_SYS_FILLRECT is not set # CONFIG_FB_SYS_COPYAREA is not set # CONFIG_FB_SYS_IMAGEBLIT is not set @@ -874,12 +869,6 @@ CONFIG_FB_KYRO=y # CONFIG_FB_ARK is not set # CONFIG_FB_PM3 is not set # CONFIG_FB_VIRTUAL is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Display device support -# -# CONFIG_DISPLAY_SUPPORT is not set # # Console display driver support @@ -914,7 +903,6 @@ CONFIG_LOGO_SUPERH_CLUT224=y CONFIG_HID_SUPPORT=y CONFIG_HID=y # CONFIG_HID_DEBUG is not set -# CONFIG_HIDRAW is not set CONFIG_USB_SUPPORT=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y @@ -934,6 +922,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_INFINIBAND is not set # CONFIG_RTC_CLASS is not set +# +# DMA Engine support +# +# CONFIG_DMA_ENGINE is not set + +# +# DMA Clients +# + +# +# DMA Devices +# + # # Userspace I/O # @@ -993,6 +994,7 @@ CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y +CONFIG_RAMFS=y # CONFIG_CONFIGFS_FS is not set # @@ -1011,7 +1013,10 @@ CONFIG_HUGETLB_PAGE=y # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y + +# +# Network File Systems +# CONFIG_NFS_FS=y CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set @@ -1053,17 +1058,26 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_KARMA_PARTITION is not set # CONFIG_EFI_PARTITION is not set # CONFIG_SYSV68_PARTITION is not set + +# +# Native Language Support +# # CONFIG_NLS is not set + +# +# Distributed Lock Manager +# # CONFIG_DLM is not set -CONFIG_INSTRUMENTATION=y + +# +# Profiling support +# # CONFIG_PROFILING is not set -# CONFIG_MARKERS is not set # # Kernel hacking # # CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set @@ -1087,13 +1101,10 @@ CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_SG is not set CONFIG_FRAME_POINTER=y CONFIG_FORCED_INLINING=y -# CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_FAULT_INJECTION is not set -# CONFIG_SAMPLES is not set # CONFIG_EARLY_PRINTK is not set CONFIG_SH64_PROC_TLB=y CONFIG_SH64_PROC_ASIDS=y @@ -1107,7 +1118,6 @@ CONFIG_SH64_SR_WATCH=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set -# CONFIG_SECURITY_FILE_CAPABILITIES is not set # CONFIG_CRYPTO is not set # diff --git a/trunk/arch/sh64/configs/harp_defconfig b/trunk/arch/sh64/configs/harp_defconfig index ba302cd0c285..e4b84b51baf8 100644 --- a/trunk/arch/sh64/configs/harp_defconfig +++ b/trunk/arch/sh64/configs/harp_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24-rc1 -# Fri Nov 2 14:35:57 2007 +# Linux kernel version: 2.6.23-rc8 +# Mon Oct 1 18:01:38 2007 # CONFIG_SUPERH=y CONFIG_SUPERH64=y @@ -36,10 +36,6 @@ CONFIG_POSIX_MQUEUE=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_CGROUPS is not set -CONFIG_FAIR_GROUP_SCHED=y -CONFIG_FAIR_USER_SCHED=y -# CONFIG_FAIR_CGROUP_SCHED is not set CONFIG_SYSFS_DEPRECATED=y # CONFIG_RELAY is not set # CONFIG_BLK_DEV_INITRD is not set @@ -145,7 +141,6 @@ CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set -# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=0 @@ -155,6 +150,10 @@ CONFIG_NR_QUICK=1 # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # # CONFIG_ARCH_SUPPORTS_MSI is not set + +# +# PCCARD (PCMCIA/CardBus) support +# # CONFIG_PCCARD is not set # @@ -199,7 +198,6 @@ CONFIG_IP_PNP=y CONFIG_INET_XFRM_MODE_TRANSPORT=y CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -225,6 +223,10 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_LAPB is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# # CONFIG_NET_SCHED is not set # @@ -253,7 +255,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # # Generic Driver Options # -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set @@ -313,7 +314,6 @@ CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_ISCSI_ATTRS is not set # CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set CONFIG_SCSI_LOWLEVEL=y # CONFIG_ISCSI_TCP is not set # CONFIG_SCSI_DEBUG is not set @@ -326,18 +326,11 @@ CONFIG_NETDEVICES=y # CONFIG_MACVLAN is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# CONFIG_VETH is not set # CONFIG_PHYLIB is not set CONFIG_NET_ETHERNET=y # CONFIG_MII is not set # CONFIG_STNIC is not set # CONFIG_SMC91X is not set -# CONFIG_SMC911X is not set -# CONFIG_IBM_NEW_EMAC_ZMII is not set -# CONFIG_IBM_NEW_EMAC_RGMII is not set -# CONFIG_IBM_NEW_EMAC_TAH is not set -# CONFIG_IBM_NEW_EMAC_EMAC4 is not set -# CONFIG_B44 is not set CONFIG_NETDEV_1000=y CONFIG_NETDEV_10000=y @@ -371,6 +364,7 @@ CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set @@ -416,6 +410,13 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_IPMI_HANDLER is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set CONFIG_HW_RANDOM=y # CONFIG_R3964 is not set # CONFIG_RAW_DRIVER is not set @@ -431,8 +432,9 @@ CONFIG_HW_RANDOM=y # CONFIG_POWER_SUPPLY is not set CONFIG_HWMON=y # CONFIG_HWMON_VID is not set +# CONFIG_SENSORS_ABITUGURU is not set +# CONFIG_SENSORS_ABITUGURU3 is not set # CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_F71882FG is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_PC87427 is not set @@ -442,19 +444,6 @@ CONFIG_HWMON=y # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set # CONFIG_HWMON_DEBUG_CHIP is not set -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set - -# -# Sonics Silicon Backplane -# -CONFIG_SSB_POSSIBLE=y -# CONFIG_SSB is not set # # Multifunction device drivers @@ -471,6 +460,12 @@ CONFIG_DAB=y # # Graphics support # +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set # CONFIG_VGASTATE is not set CONFIG_VIDEO_OUTPUT_CONTROL=y CONFIG_FB=y @@ -479,7 +474,6 @@ CONFIG_FIRMWARE_EDID=y # CONFIG_FB_CFB_FILLRECT is not set # CONFIG_FB_CFB_COPYAREA is not set # CONFIG_FB_CFB_IMAGEBLIT is not set -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set # CONFIG_FB_SYS_FILLRECT is not set # CONFIG_FB_SYS_COPYAREA is not set # CONFIG_FB_SYS_IMAGEBLIT is not set @@ -496,12 +490,6 @@ CONFIG_FB_MODE_HELPERS=y # # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_VIRTUAL is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Display device support -# -# CONFIG_DISPLAY_SUPPORT is not set # # Console display driver support @@ -536,7 +524,6 @@ CONFIG_LOGO_SUPERH_CLUT224=y CONFIG_HID_SUPPORT=y CONFIG_HID=y # CONFIG_HID_DEBUG is not set -# CONFIG_HIDRAW is not set CONFIG_USB_SUPPORT=y CONFIG_USB_ARCH_HAS_HCD=y # CONFIG_USB_ARCH_HAS_OHCI is not set @@ -555,6 +542,19 @@ CONFIG_USB_ARCH_HAS_HCD=y # CONFIG_NEW_LEDS is not set # CONFIG_RTC_CLASS is not set +# +# DMA Engine support +# +# CONFIG_DMA_ENGINE is not set + +# +# DMA Clients +# + +# +# DMA Devices +# + # # Userspace I/O # @@ -614,6 +614,7 @@ CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y +CONFIG_RAMFS=y # CONFIG_CONFIGFS_FS is not set # @@ -632,7 +633,10 @@ CONFIG_HUGETLB_PAGE=y # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y + +# +# Network File Systems +# CONFIG_NFS_FS=y CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set @@ -674,17 +678,26 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_KARMA_PARTITION is not set # CONFIG_EFI_PARTITION is not set # CONFIG_SYSV68_PARTITION is not set + +# +# Native Language Support +# # CONFIG_NLS is not set + +# +# Distributed Lock Manager +# # CONFIG_DLM is not set -CONFIG_INSTRUMENTATION=y + +# +# Profiling support +# # CONFIG_PROFILING is not set -# CONFIG_MARKERS is not set # # Kernel hacking # # CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set @@ -708,17 +721,16 @@ CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_SG is not set CONFIG_FRAME_POINTER=y CONFIG_FORCED_INLINING=y -# CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_FAULT_INJECTION is not set -# CONFIG_SAMPLES is not set # CONFIG_EARLY_PRINTK is not set +# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set CONFIG_SH64_PROC_TLB=y CONFIG_SH64_PROC_ASIDS=y CONFIG_SH64_SR_WATCH=y # CONFIG_POOR_MANS_STRACE is not set +# CONFIG_SH_ALPHANUMERIC is not set # CONFIG_SH_NO_BSS_INIT is not set # @@ -726,7 +738,6 @@ CONFIG_SH64_SR_WATCH=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set -# CONFIG_SECURITY_FILE_CAPABILITIES is not set # CONFIG_CRYPTO is not set # diff --git a/trunk/arch/sh64/configs/sim_defconfig b/trunk/arch/sh64/configs/sim_defconfig index 18476cc522c3..f83bae659dc3 100644 --- a/trunk/arch/sh64/configs/sim_defconfig +++ b/trunk/arch/sh64/configs/sim_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24-rc1 -# Fri Nov 2 14:36:08 2007 +# Linux kernel version: 2.6.23-rc8 +# Mon Oct 1 17:50:35 2007 # CONFIG_SUPERH=y CONFIG_SUPERH64=y @@ -33,10 +33,6 @@ CONFIG_SWAP=y # CONFIG_USER_NS is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_CGROUPS is not set -CONFIG_FAIR_GROUP_SCHED=y -CONFIG_FAIR_USER_SCHED=y -# CONFIG_FAIR_CGROUP_SCHED is not set CONFIG_SYSFS_DEPRECATED=y # CONFIG_RELAY is not set # CONFIG_BLK_DEV_INITRD is not set @@ -142,7 +138,6 @@ CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set -# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=0 @@ -152,6 +147,10 @@ CONFIG_NR_QUICK=1 # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # # CONFIG_ARCH_SUPPORTS_MSI is not set + +# +# PCCARD (PCMCIA/CardBus) support +# # CONFIG_PCCARD is not set # @@ -172,7 +171,6 @@ CONFIG_BINFMT_ELF=y # # Generic Driver Options # -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set @@ -219,7 +217,6 @@ CONFIG_SCSI_MULTI_LUN=y CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set CONFIG_SCSI_LOWLEVEL=y # CONFIG_SCSI_DEBUG is not set # CONFIG_ATA is not set @@ -241,6 +238,7 @@ CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set @@ -285,6 +283,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set # CONFIG_IPMI_HANDLER is not set +# CONFIG_WATCHDOG is not set # CONFIG_HW_RANDOM is not set # CONFIG_R3964 is not set # CONFIG_RAW_DRIVER is not set @@ -299,13 +298,6 @@ CONFIG_UNIX98_PTYS=y # CONFIG_W1 is not set # CONFIG_POWER_SUPPLY is not set # CONFIG_HWMON is not set -# CONFIG_WATCHDOG is not set - -# -# Sonics Silicon Backplane -# -CONFIG_SSB_POSSIBLE=y -# CONFIG_SSB is not set # # Multifunction device drivers @@ -321,6 +313,12 @@ CONFIG_DAB=y # # Graphics support # +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set # CONFIG_VGASTATE is not set CONFIG_VIDEO_OUTPUT_CONTROL=y CONFIG_FB=y @@ -329,7 +327,6 @@ CONFIG_FIRMWARE_EDID=y # CONFIG_FB_CFB_FILLRECT is not set # CONFIG_FB_CFB_COPYAREA is not set # CONFIG_FB_CFB_IMAGEBLIT is not set -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set # CONFIG_FB_SYS_FILLRECT is not set # CONFIG_FB_SYS_COPYAREA is not set # CONFIG_FB_SYS_IMAGEBLIT is not set @@ -346,12 +343,6 @@ CONFIG_FB_MODE_HELPERS=y # # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_VIRTUAL is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Display device support -# -# CONFIG_DISPLAY_SUPPORT is not set # # Console display driver support @@ -389,6 +380,19 @@ CONFIG_LOGO_SUPERH_CLUT224=y # CONFIG_NEW_LEDS is not set # CONFIG_RTC_CLASS is not set +# +# DMA Engine support +# +# CONFIG_DMA_ENGINE is not set + +# +# DMA Clients +# + +# +# DMA Devices +# + # # Userspace I/O # @@ -447,6 +451,7 @@ CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y +CONFIG_RAMFS=y # CONFIG_CONFIGFS_FS is not set # @@ -487,17 +492,22 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_KARMA_PARTITION is not set # CONFIG_EFI_PARTITION is not set # CONFIG_SYSV68_PARTITION is not set + +# +# Native Language Support +# # CONFIG_NLS is not set -CONFIG_INSTRUMENTATION=y + +# +# Profiling support +# CONFIG_PROFILING=y # CONFIG_OPROFILE is not set -# CONFIG_MARKERS is not set # # Kernel hacking # # CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set @@ -521,17 +531,16 @@ CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_SG is not set CONFIG_FRAME_POINTER=y CONFIG_FORCED_INLINING=y -# CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_FAULT_INJECTION is not set -# CONFIG_SAMPLES is not set # CONFIG_EARLY_PRINTK is not set +# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set CONFIG_SH64_PROC_TLB=y CONFIG_SH64_PROC_ASIDS=y CONFIG_SH64_SR_WATCH=y # CONFIG_POOR_MANS_STRACE is not set +# CONFIG_SH_ALPHANUMERIC is not set CONFIG_SH_NO_BSS_INIT=y # @@ -539,7 +548,6 @@ CONFIG_SH_NO_BSS_INIT=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set -# CONFIG_SECURITY_FILE_CAPABILITIES is not set # CONFIG_CRYPTO is not set # diff --git a/trunk/arch/x86/kernel/kprobes_32.c b/trunk/arch/x86/kernel/kprobes_32.c index d87a523070d1..90f778c04b3f 100644 --- a/trunk/arch/x86/kernel/kprobes_32.c +++ b/trunk/arch/x86/kernel/kprobes_32.c @@ -564,7 +564,12 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs) resume_execution(cur, regs, kcb); regs->eflags |= kcb->kprobe_saved_eflags; - trace_hardirqs_fixup_flags(regs->eflags); +#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT + if (raw_irqs_disabled_flags(regs->eflags)) + trace_hardirqs_off(); + else + trace_hardirqs_on(); +#endif /*Restore back the original saved kprobes variables and continue. */ if (kcb->kprobe_status == KPROBE_REENTER) { diff --git a/trunk/arch/x86/kernel/kprobes_64.c b/trunk/arch/x86/kernel/kprobes_64.c index 3db3611933d8..681b801c5e26 100644 --- a/trunk/arch/x86/kernel/kprobes_64.c +++ b/trunk/arch/x86/kernel/kprobes_64.c @@ -551,7 +551,12 @@ int __kprobes post_kprobe_handler(struct pt_regs *regs) resume_execution(cur, regs, kcb); regs->eflags |= kcb->kprobe_saved_rflags; - trace_hardirqs_fixup_flags(regs->eflags); +#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT + if (raw_irqs_disabled_flags(regs->eflags)) + trace_hardirqs_off(); + else + trace_hardirqs_on(); +#endif /* Restore the original saved kprobes variables and continue. */ if (kcb->kprobe_status == KPROBE_REENTER) { diff --git a/trunk/arch/x86/kernel/traps_32.c b/trunk/arch/x86/kernel/traps_32.c index 298d13ed3ab3..cc9acace7e23 100644 --- a/trunk/arch/x86/kernel/traps_32.c +++ b/trunk/arch/x86/kernel/traps_32.c @@ -789,8 +789,6 @@ void restart_nmi(void) #ifdef CONFIG_KPROBES fastcall void __kprobes do_int3(struct pt_regs *regs, long error_code) { - trace_hardirqs_fixup(); - if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) == NOTIFY_STOP) return; diff --git a/trunk/arch/x86/kernel/traps_64.c b/trunk/arch/x86/kernel/traps_64.c index 4a6bd4965f56..d0c2bc7ab2ec 100644 --- a/trunk/arch/x86/kernel/traps_64.c +++ b/trunk/arch/x86/kernel/traps_64.c @@ -807,8 +807,6 @@ asmlinkage __kprobes void default_do_nmi(struct pt_regs *regs) /* runs on IST stack. */ asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code) { - trace_hardirqs_fixup(); - if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) == NOTIFY_STOP) { return; } diff --git a/trunk/arch/x86/mm/fault_32.c b/trunk/arch/x86/mm/fault_32.c index a2273d44aa27..33563ee8eb0f 100644 --- a/trunk/arch/x86/mm/fault_32.c +++ b/trunk/arch/x86/mm/fault_32.c @@ -303,11 +303,6 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, int write, si_code; int fault; - /* - * We can fault from pretty much anywhere, with unknown IRQ state. - */ - trace_hardirqs_fixup(); - /* get the address */ address = read_cr2(); diff --git a/trunk/arch/x86/mm/fault_64.c b/trunk/arch/x86/mm/fault_64.c index 0e26230669ca..644b4f7ece10 100644 --- a/trunk/arch/x86/mm/fault_64.c +++ b/trunk/arch/x86/mm/fault_64.c @@ -304,11 +304,6 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long flags; siginfo_t info; - /* - * We can fault from pretty much anywhere, with unknown IRQ state. - */ - trace_hardirqs_fixup(); - tsk = current; mm = tsk->mm; prefetchw(&mm->mmap_sem); diff --git a/trunk/block/deadline-iosched.c b/trunk/block/deadline-iosched.c index 1a511ffaf8a4..a44437e5a94b 100644 --- a/trunk/block/deadline-iosched.c +++ b/trunk/block/deadline-iosched.c @@ -55,6 +55,20 @@ static void deadline_move_request(struct deadline_data *, struct request *); #define RQ_RB_ROOT(dd, rq) (&(dd)->sort_list[rq_data_dir((rq))]) +/* + * get the request after `rq' in sector-sorted order + */ +static inline struct request * +deadline_latter_request(struct request *rq) +{ + struct rb_node *node = rb_next(&rq->rb_node); + + if (node) + return rb_entry_rq(node); + + return NULL; +} + static void deadline_add_rq_rb(struct deadline_data *dd, struct request *rq) { @@ -74,13 +88,8 @@ deadline_del_rq_rb(struct deadline_data *dd, struct request *rq) { const int data_dir = rq_data_dir(rq); - if (dd->next_rq[data_dir] == rq) { - struct rb_node *rbnext = rb_next(&rq->rb_node); - - dd->next_rq[data_dir] = NULL; - if (rbnext) - dd->next_rq[data_dir] = rb_entry_rq(rbnext); - } + if (dd->next_rq[data_dir] == rq) + dd->next_rq[data_dir] = deadline_latter_request(rq); elv_rb_del(RQ_RB_ROOT(dd, rq), rq); } @@ -198,14 +207,11 @@ static void deadline_move_request(struct deadline_data *dd, struct request *rq) { const int data_dir = rq_data_dir(rq); - struct rb_node *rbnext = rb_next(&rq->rb_node); dd->next_rq[READ] = NULL; dd->next_rq[WRITE] = NULL; + dd->next_rq[data_dir] = deadline_latter_request(rq); - if (rbnext) - dd->next_rq[data_dir] = rb_entry_rq(rbnext); - dd->last_sector = rq->sector + rq->nr_sectors; /* diff --git a/trunk/block/ll_rw_blk.c b/trunk/block/ll_rw_blk.c index 54fd38589674..56f2646612e6 100644 --- a/trunk/block/ll_rw_blk.c +++ b/trunk/block/ll_rw_blk.c @@ -1369,7 +1369,7 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq, } /* segments in rq */ if (sg) - sg_mark_end(sg); + __sg_mark_end(sg); return nsegs; } diff --git a/trunk/crypto/anubis.c b/trunk/crypto/anubis.c index 4ff0e1e243ad..1c771f7f4dc5 100644 --- a/trunk/crypto/anubis.c +++ b/trunk/crypto/anubis.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include diff --git a/trunk/crypto/blowfish.c b/trunk/crypto/blowfish.c index 80c3fd8be97c..55238c4e37f0 100644 --- a/trunk/crypto/blowfish.c +++ b/trunk/crypto/blowfish.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/trunk/crypto/compress.c b/trunk/crypto/compress.c index 1ee357085d3a..0a6570048c1e 100644 --- a/trunk/crypto/compress.c +++ b/trunk/crypto/compress.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "internal.h" diff --git a/trunk/crypto/crypto_null.c b/trunk/crypto/crypto_null.c index 29f77477d701..24dbb5d8617e 100644 --- a/trunk/crypto/crypto_null.c +++ b/trunk/crypto/crypto_null.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/trunk/crypto/khazad.c b/trunk/crypto/khazad.c index 704ebfe26b55..9fa24a2dd6ff 100644 --- a/trunk/crypto/khazad.c +++ b/trunk/crypto/khazad.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/trunk/crypto/sha1_generic.c b/trunk/crypto/sha1_generic.c index 68c62f528eb5..48a3c3e0bf5f 100644 --- a/trunk/crypto/sha1_generic.c +++ b/trunk/crypto/sha1_generic.c @@ -23,6 +23,7 @@ #include #include #include +#include #include struct sha1_ctx { diff --git a/trunk/crypto/sha256_generic.c b/trunk/crypto/sha256_generic.c index fd3918be58b5..5f4332edcf6b 100644 --- a/trunk/crypto/sha256_generic.c +++ b/trunk/crypto/sha256_generic.c @@ -22,6 +22,7 @@ #include #include #include +#include #include struct sha256_ctx { diff --git a/trunk/crypto/sha512.c b/trunk/crypto/sha512.c index c39c803ecc02..e736596ca574 100644 --- a/trunk/crypto/sha512.c +++ b/trunk/crypto/sha512.c @@ -19,6 +19,7 @@ #include #include +#include #include struct sha512_ctx { diff --git a/trunk/crypto/tea.c b/trunk/crypto/tea.c index 6893b3fdf9d6..1c54e26fa529 100644 --- a/trunk/crypto/tea.c +++ b/trunk/crypto/tea.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/trunk/crypto/tgr192.c b/trunk/crypto/tgr192.c index 2e7ea1680c7f..a0fadf3dd3e2 100644 --- a/trunk/crypto/tgr192.c +++ b/trunk/crypto/tgr192.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/trunk/crypto/wp512.c b/trunk/crypto/wp512.c index f746952b93fc..727d05a19ff4 100644 --- a/trunk/crypto/wp512.c +++ b/trunk/crypto/wp512.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/ata/libata-core.c b/trunk/drivers/ata/libata-core.c index 164c7d9514f9..63035d71a61a 100644 --- a/trunk/drivers/ata/libata-core.c +++ b/trunk/drivers/ata/libata-core.c @@ -704,8 +704,8 @@ static int ata_dev_set_dipm(struct ata_device *dev, enum link_pm policy) /** * ata_dev_enable_pm - enable SATA interface power management - * @dev: device to enable power management - * @policy: the link power management policy + * @device - device to enable ipm for + * @policy - the link power management policy * * Enable SATA Interface power management. This will enable * Device Interface Power Management (DIPM) for min_power @@ -735,10 +735,9 @@ void ata_dev_enable_pm(struct ata_device *dev, enum link_pm policy) return /* rc */; /* hopefully we can use 'rc' eventually */ } -#ifdef CONFIG_PM /** * ata_dev_disable_pm - disable SATA interface power management - * @dev: device to disable power management + * @device - device to enable ipm for * * Disable SATA Interface power management. This will disable * Device Interface Power Management (DIPM) without changing @@ -756,7 +755,6 @@ static void ata_dev_disable_pm(struct ata_device *dev) if (ap->ops->disable_pm) ap->ops->disable_pm(ap); } -#endif /* CONFIG_PM */ void ata_lpm_schedule(struct ata_port *ap, enum link_pm policy) { @@ -766,7 +764,6 @@ void ata_lpm_schedule(struct ata_port *ap, enum link_pm policy) ata_port_schedule_eh(ap); } -#ifdef CONFIG_PM static void ata_lpm_enable(struct ata_host *host) { struct ata_link *link; @@ -792,7 +789,6 @@ static void ata_lpm_disable(struct ata_host *host) ata_lpm_schedule(ap, ap->pm_policy); } } -#endif /* CONFIG_PM */ /** @@ -2304,10 +2300,6 @@ int ata_dev_configure(struct ata_device *dev) dev->max_sectors = ATA_MAX_SECTORS; } - if ((dev->class == ATA_DEV_ATAPI) && - (atapi_command_packet_set(id) == TYPE_TAPE)) - dev->max_sectors = ATA_MAX_SECTORS_TAPE; - if (dev->horkage & ATA_HORKAGE_MAX_SEC_128) dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128, dev->max_sectors); @@ -2751,27 +2743,17 @@ int sata_down_spd_limit(struct ata_link *link) static int __sata_set_spd_needed(struct ata_link *link, u32 *scontrol) { - struct ata_link *host_link = &link->ap->link; - u32 limit, target, spd; - - limit = link->sata_spd_limit; + u32 spd, limit; - /* Don't configure downstream link faster than upstream link. - * It doesn't speed up anything and some PMPs choke on such - * configuration. - */ - if (!ata_is_host_link(link) && host_link->sata_spd) - limit &= (1 << host_link->sata_spd) - 1; - - if (limit == UINT_MAX) - target = 0; + if (link->sata_spd_limit == UINT_MAX) + limit = 0; else - target = fls(limit); + limit = fls(link->sata_spd_limit); spd = (*scontrol >> 4) & 0xf; - *scontrol = (*scontrol & ~0xf0) | ((target & 0xf) << 4); + *scontrol = (*scontrol & ~0xf0) | ((limit & 0xf) << 4); - return spd != target; + return spd != limit; } /** @@ -2794,7 +2776,7 @@ int sata_set_spd_needed(struct ata_link *link) u32 scontrol; if (sata_scr_read(link, SCR_CONTROL, &scontrol)) - return 1; + return 0; return __sata_set_spd_needed(link, &scontrol); } diff --git a/trunk/drivers/ata/libata-eh.c b/trunk/drivers/ata/libata-eh.c index ed8813b222a0..8d64f8fd8f1d 100644 --- a/trunk/drivers/ata/libata-eh.c +++ b/trunk/drivers/ata/libata-eh.c @@ -1747,7 +1747,6 @@ static void ata_eh_link_autopsy(struct ata_link *link) { struct ata_port *ap = link->ap; struct ata_eh_context *ehc = &link->eh_context; - struct ata_device *dev; unsigned int all_err_mask = 0; int tag, is_io = 0; u32 serror; @@ -1819,24 +1818,18 @@ static void ata_eh_link_autopsy(struct ata_link *link) (!is_io && (all_err_mask & ~AC_ERR_DEV))) ehc->i.action |= ATA_EH_REVALIDATE; - /* If we have offending qcs and the associated failed device, - * perform per-dev EH action only on the offending device. - */ + /* if we have offending qcs and the associated failed device */ if (ehc->i.dev) { + /* speed down */ + ehc->i.action |= ata_eh_speed_down(ehc->i.dev, is_io, + all_err_mask); + + /* perform per-dev EH action only on the offending device */ ehc->i.dev_action[ehc->i.dev->devno] |= ehc->i.action & ATA_EH_PERDEV_MASK; ehc->i.action &= ~ATA_EH_PERDEV_MASK; } - /* consider speeding down */ - dev = ehc->i.dev; - if (!dev && ata_link_max_devices(link) == 1 && - ata_dev_enabled(link->device)) - dev = link->device; - - if (dev) - ehc->i.action |= ata_eh_speed_down(dev, is_io, all_err_mask); - DPRINTK("EXIT\n"); } @@ -2072,19 +2065,16 @@ int ata_eh_reset(struct ata_link *link, int classify, ata_prereset_fn_t prereset, ata_reset_fn_t softreset, ata_reset_fn_t hardreset, ata_postreset_fn_t postreset) { - const int max_tries = ARRAY_SIZE(ata_eh_reset_timeouts); struct ata_port *ap = link->ap; struct ata_eh_context *ehc = &link->eh_context; unsigned int *classes = ehc->classes; - unsigned int lflags = link->flags; int verbose = !(ehc->i.flags & ATA_EHI_QUIET); int try = 0; struct ata_device *dev; - unsigned long deadline, now; + unsigned long deadline; unsigned int tmp_action; ata_reset_fn_t reset; unsigned long flags; - u32 sstatus; int rc; /* about to reset */ @@ -2116,7 +2106,7 @@ int ata_eh_reset(struct ata_link *link, int classify, /* Determine which reset to use and record in ehc->i.action. * prereset() may examine and modify it. */ - if (softreset && (!hardreset || (!(lflags & ATA_LFLAG_NO_SRST) && + if (softreset && (!hardreset || (!(link->flags & ATA_LFLAG_NO_SRST) && !sata_set_spd_needed(link) && !(ehc->i.action & ATA_EH_HARDRESET)))) tmp_action = ATA_EH_SOFTRESET; @@ -2191,64 +2181,82 @@ int ata_eh_reset(struct ata_link *link, int classify, "follow-up softreset required " "but no softreset avaliable\n"); rc = -EINVAL; - goto fail; + goto out; } ata_eh_about_to_do(link, NULL, ATA_EH_RESET_MASK); rc = ata_do_reset(link, reset, classes, deadline); - } - - /* -EAGAIN can happen if we skipped followup SRST */ - if (rc && rc != -EAGAIN) - goto fail; - /* was classification successful? */ - if (classify && classes[0] == ATA_DEV_UNKNOWN && - !(lflags & ATA_LFLAG_ASSUME_CLASS)) { - if (try < max_tries) { - ata_link_printk(link, KERN_WARNING, + if (rc == 0 && classify && classes[0] == ATA_DEV_UNKNOWN && + !(link->flags & ATA_LFLAG_ASSUME_CLASS)) { + ata_link_printk(link, KERN_ERR, "classification failed\n"); rc = -EINVAL; - goto fail; + goto out; } - - ata_link_printk(link, KERN_WARNING, - "classfication failed, assuming ATA\n"); - lflags |= ATA_LFLAG_ASSUME_ATA; } - ata_link_for_each_dev(dev, link) { - /* After the reset, the device state is PIO 0 and the - * controller state is undefined. Reset also wakes up - * drives from sleeping mode. - */ - dev->pio_mode = XFER_PIO_0; - dev->flags &= ~ATA_DFLAG_SLEEPING; + /* if we skipped follow-up srst, clear rc */ + if (rc == -EAGAIN) + rc = 0; - if (ata_link_offline(link)) - continue; + if (rc && rc != -ERESTART && try < ARRAY_SIZE(ata_eh_reset_timeouts)) { + unsigned long now = jiffies; - /* apply class override and convert UNKNOWN to NONE */ - if (lflags & ATA_LFLAG_ASSUME_ATA) - classes[dev->devno] = ATA_DEV_ATA; - else if (lflags & ATA_LFLAG_ASSUME_SEMB) - classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */ - else if (classes[dev->devno] == ATA_DEV_UNKNOWN) - classes[dev->devno] = ATA_DEV_NONE; + if (time_before(now, deadline)) { + unsigned long delta = deadline - jiffies; + + ata_link_printk(link, KERN_WARNING, "reset failed " + "(errno=%d), retrying in %u secs\n", + rc, (jiffies_to_msecs(delta) + 999) / 1000); + + while (delta) + delta = schedule_timeout_uninterruptible(delta); + } + + if (rc == -EPIPE || + try == ARRAY_SIZE(ata_eh_reset_timeouts) - 1) + sata_down_spd_limit(link); + if (hardreset) + reset = hardreset; + goto retry; } - /* record current link speed */ - if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0) - link->sata_spd = (sstatus >> 4) & 0xf; + if (rc == 0) { + u32 sstatus; + + ata_link_for_each_dev(dev, link) { + /* After the reset, the device state is PIO 0 + * and the controller state is undefined. + * Reset also wakes up drives from sleeping + * mode. + */ + dev->pio_mode = XFER_PIO_0; + dev->flags &= ~ATA_DFLAG_SLEEPING; + + if (ata_link_offline(link)) + continue; + + /* apply class override and convert UNKNOWN to NONE */ + if (link->flags & ATA_LFLAG_ASSUME_ATA) + classes[dev->devno] = ATA_DEV_ATA; + else if (link->flags & ATA_LFLAG_ASSUME_SEMB) + classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */ + else if (classes[dev->devno] == ATA_DEV_UNKNOWN) + classes[dev->devno] = ATA_DEV_NONE; + } - if (postreset) - postreset(link, classes); + /* record current link speed */ + if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0) + link->sata_spd = (sstatus >> 4) & 0xf; - /* reset successful, schedule revalidation */ - ata_eh_done(link, NULL, ehc->i.action & ATA_EH_RESET_MASK); - ehc->i.action |= ATA_EH_REVALIDATE; + if (postreset) + postreset(link, classes); - rc = 0; + /* reset successful, schedule revalidation */ + ata_eh_done(link, NULL, ehc->i.action & ATA_EH_RESET_MASK); + ehc->i.action |= ATA_EH_REVALIDATE; + } out: /* clear hotplug flag */ ehc->i.flags &= ~ATA_EHI_HOTPLUGGED; @@ -2258,28 +2266,6 @@ int ata_eh_reset(struct ata_link *link, int classify, spin_unlock_irqrestore(ap->lock, flags); return rc; - - fail: - if (rc == -ERESTART || try >= max_tries) - goto out; - - now = jiffies; - if (time_before(now, deadline)) { - unsigned long delta = deadline - now; - - ata_link_printk(link, KERN_WARNING, "reset failed " - "(errno=%d), retrying in %u secs\n", - rc, (jiffies_to_msecs(delta) + 999) / 1000); - - while (delta) - delta = schedule_timeout_uninterruptible(delta); - } - - if (rc == -EPIPE || try == max_tries - 1) - sata_down_spd_limit(link); - if (hardreset) - reset = hardreset; - goto retry; } static int ata_eh_revalidate_and_attach(struct ata_link *link, diff --git a/trunk/drivers/ata/libata-scsi.c b/trunk/drivers/ata/libata-scsi.c index 245057df69d6..fc89590d3772 100644 --- a/trunk/drivers/ata/libata-scsi.c +++ b/trunk/drivers/ata/libata-scsi.c @@ -120,7 +120,7 @@ static const struct { { MEDIUM_POWER, "medium_power" }, }; -static const char *ata_scsi_lpm_get(enum link_pm policy) +const char *ata_scsi_lpm_get(enum link_pm policy) { int i; diff --git a/trunk/drivers/ata/sata_fsl.c b/trunk/drivers/ata/sata_fsl.c index d015b4adcfe0..b4c37b9e413c 100644 --- a/trunk/drivers/ata/sata_fsl.c +++ b/trunk/drivers/ata/sata_fsl.c @@ -34,8 +34,7 @@ enum { SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | - ATA_FLAG_NCQ), - SATA_FSL_HOST_LFLAGS = ATA_LFLAG_SKIP_D2H_BSY, + ATA_FLAG_NCQ | ATA_FLAG_SKIP_D2H_BSY), SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH, SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */ @@ -265,11 +264,10 @@ struct sata_fsl_host_priv { void __iomem *hcr_base; void __iomem *ssr_base; void __iomem *csr_base; - int irq; }; static inline unsigned int sata_fsl_tag(unsigned int tag, - void __iomem *hcr_base) + void __iomem * hcr_base) { /* We let libATA core do actual (queue) tag allocation */ @@ -308,7 +306,7 @@ static void sata_fsl_setup_cmd_hdr_entry(struct sata_fsl_port_priv *pp, pp->cmdslot[tag].prde_fis_len = cpu_to_le32((num_prde << 16) | (fis_len << 2)); pp->cmdslot[tag].ttl = cpu_to_le32(data_xfer_len & ~0x03); - pp->cmdslot[tag].desc_info = cpu_to_le32(desc_info | (tag & 0x1F)); + pp->cmdslot[tag].desc_info = cpu_to_le32((desc_info | (tag & 0x1F))); VPRINTK("cda=0x%x, prde_fis_len=0x%x, ttl=0x%x, di=0x%x\n", pp->cmdslot[tag].cda, @@ -318,7 +316,7 @@ static void sata_fsl_setup_cmd_hdr_entry(struct sata_fsl_port_priv *pp, } static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc, - u32 *ttl, dma_addr_t cmd_desc_paddr) + u32 * ttl, dma_addr_t cmd_desc_paddr) { struct scatterlist *sg; unsigned int num_prde = 0; @@ -355,7 +353,7 @@ static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc, "s/g len unaligned : 0x%x\n", sg_len); if ((num_prde == (SATA_FSL_MAX_PRD_DIRECT - 1)) && - (qc->n_iter + 1 != qc->n_elem)) { + !ata_sg_is_last(sg, qc)) { VPRINTK("setting indirect prde\n"); prd_ptr_to_indirect_ext = prd; prd->dba = cpu_to_le32(indirect_ext_segment_paddr); @@ -406,7 +404,7 @@ static void sata_fsl_qc_prep(struct ata_queued_cmd *qc) cd = (struct command_desc *)pp->cmdentry + tag; cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; - ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) &cd->cfis); + ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) & cd->cfis); VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n", cd->cfis[0], cd->cfis[1], cd->cfis[2]); @@ -472,10 +470,16 @@ static int sata_fsl_scr_write(struct ata_port *ap, unsigned int sc_reg_in, switch (sc_reg_in) { case SCR_STATUS: + sc_reg = 0; + break; case SCR_ERROR: + sc_reg = 1; + break; case SCR_CONTROL: + sc_reg = 2; + break; case SCR_ACTIVE: - sc_reg = sc_reg_in; + sc_reg = 3; break; default: return -EINVAL; @@ -483,7 +487,7 @@ static int sata_fsl_scr_write(struct ata_port *ap, unsigned int sc_reg_in, VPRINTK("xx_scr_write, reg_in = %d\n", sc_reg); - iowrite32(val, ssr_base + (sc_reg * 4)); + iowrite32(val, (void __iomem *)ssr_base + (sc_reg * 4)); return 0; } @@ -496,10 +500,16 @@ static int sata_fsl_scr_read(struct ata_port *ap, unsigned int sc_reg_in, switch (sc_reg_in) { case SCR_STATUS: + sc_reg = 0; + break; case SCR_ERROR: + sc_reg = 1; + break; case SCR_CONTROL: + sc_reg = 2; + break; case SCR_ACTIVE: - sc_reg = sc_reg_in; + sc_reg = 3; break; default: return -EINVAL; @@ -507,7 +517,7 @@ static int sata_fsl_scr_read(struct ata_port *ap, unsigned int sc_reg_in, VPRINTK("xx_scr_read, reg_in = %d\n", sc_reg); - *val = ioread32(ssr_base + (sc_reg * 4)); + *val = ioread32((void __iomem *)ssr_base + (sc_reg * 4)); return 0; } @@ -561,6 +571,7 @@ static inline void sata_fsl_cache_taskfile_from_d2h_fis(struct ata_queued_cmd struct ata_port *ap) { struct sata_fsl_port_priv *pp = ap->private_data; + u8 fis[6 * 4]; struct sata_fsl_host_priv *host_priv = ap->host->private_data; void __iomem *hcr_base = host_priv->hcr_base; unsigned int tag = sata_fsl_tag(qc->tag, hcr_base); @@ -568,7 +579,8 @@ static inline void sata_fsl_cache_taskfile_from_d2h_fis(struct ata_queued_cmd cd = pp->cmdentry + tag; - ata_tf_from_fis(cd->sfis, &pp->tf); + memcpy(fis, &cd->sfis, 6 * 4); /* should we use memcpy_from_io() */ + ata_tf_from_fis(fis, &pp->tf); } static u8 sata_fsl_check_status(struct ata_port *ap) @@ -652,7 +664,6 @@ static int sata_fsl_port_start(struct ata_port *ap) VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); VPRINTK("CHBA = 0x%x\n", ioread32(hcr_base + CHBA)); -#ifdef CONFIG_MPC8315_DS /* * Workaround for 8315DS board 3gbps link-up issue, * currently limit SATA port to GEN1 speed @@ -665,7 +676,6 @@ static int sata_fsl_port_start(struct ata_port *ap) sata_fsl_scr_read(ap, SCR_CONTROL, &temp); dev_printk(KERN_WARNING, dev, "scr_control, speed limited to %x\n", temp); -#endif return 0; } @@ -718,10 +728,9 @@ static unsigned int sata_fsl_dev_classify(struct ata_port *ap) return ata_dev_classify(&tf); } -static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, +static int sata_fsl_softreset(struct ata_port *ap, unsigned int *class, unsigned long deadline) { - struct ata_port *ap = link->ap; struct sata_fsl_port_priv *pp = ap->private_data; struct sata_fsl_host_priv *host_priv = ap->host->private_data; void __iomem *hcr_base = host_priv->hcr_base; @@ -730,6 +739,10 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, u8 *cfis; u32 Serror; int i = 0; + struct ata_queued_cmd qc; + u8 *buf; + dma_addr_t dma_address; + struct scatterlist *sg; unsigned long start_jiffies; DPRINTK("in xx_softreset\n"); @@ -798,7 +811,7 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, */ temp = ata_wait_register(hcr_base + HSTATUS, 0xFF, 0, 1, 500); - if ((!(temp & 0x10)) || ata_link_offline(link)) { + if ((!(temp & 0x10)) || ata_port_offline(ap)) { ata_port_printk(ap, KERN_WARNING, "No Device OR PHYRDY change,Hstatus = 0x%x\n", ioread32(hcr_base + HSTATUS)); @@ -829,10 +842,13 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, * reached here, we can send a command to the target device */ + if (ap->sactive) + goto skip_srst_do_ncq_error_handling; + DPRINTK("Sending SRST/device reset\n"); - ata_tf_init(link->device, &tf); - cfis = (u8 *) &pp->cmdentry->cfis; + ata_tf_init(ap->device, &tf); + cfis = (u8 *) & pp->cmdentry->cfis; /* device reset/SRST is a control register update FIS, uses tag0 */ sata_fsl_setup_cmd_hdr_entry(pp, 0, @@ -896,13 +912,76 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, * command bit of the CCreg */ iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */ + goto check_device_signature; + +skip_srst_do_ncq_error_handling: + + VPRINTK("Sending read log ext(10h) command\n"); + + memset(&qc, 0, sizeof(struct ata_queued_cmd)); + ata_tf_init(ap->device, &tf); + + tf.command = ATA_CMD_READ_LOG_EXT; + tf.lbal = ATA_LOG_SATA_NCQ; + tf.nsect = 1; + tf.hob_nsect = 0; + tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_LBA48 | ATA_TFLAG_DEVICE; + tf.protocol = ATA_PROT_PIO; + + qc.tag = ATA_TAG_INTERNAL; + qc.scsicmd = NULL; + qc.ap = ap; + qc.dev = ap->device; + + qc.tf = tf; + qc.flags |= ATA_QCFLAG_RESULT_TF; + qc.dma_dir = DMA_FROM_DEVICE; + + buf = ap->sector_buf; + ata_sg_init_one(&qc, buf, 1 * ATA_SECT_SIZE); + + /* + * Need to DMA-map the memory buffer associated with the command + */ + + sg = qc.__sg; + dma_address = dma_map_single(ap->dev, qc.buf_virt, + sg->length, DMA_FROM_DEVICE); + + sg_dma_address(sg) = dma_address; + sg_dma_len(sg) = sg->length; + + VPRINTK("EH, addr = 0x%x, len = 0x%x\n", dma_address, sg->length); + + sata_fsl_qc_prep(&qc); + sata_fsl_qc_issue(&qc); + + temp = ata_wait_register(CQ + hcr_base, 0x1, 0x1, 1, 5000); + if (temp & 0x1) { + VPRINTK("READ_LOG_EXT_10H issue failed\n"); + + VPRINTK("READ_LOG@5000,CQ=0x%x,CA=0x%x,CC=0x%x\n", + ioread32(CQ + hcr_base), + ioread32(CA + hcr_base), ioread32(CC + hcr_base)); + + sata_fsl_scr_read(ap, SCR_ERROR, &Serror); + + VPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS)); + VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); + VPRINTK("Serror = 0x%x\n", Serror); + goto err; + } + + iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */ + + check_device_signature: DPRINTK("SATA FSL : Now checking device signature\n"); *class = ATA_DEV_NONE; /* Verify if SStatus indicates device presence */ - if (ata_link_online(link)) { + if (ata_port_online(ap)) { /* * if we are here, device presence has been detected, * 1st D2H FIS would have been received, but sfis in @@ -923,13 +1002,25 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, return -EIO; } +static int sata_fsl_hardreset(struct ata_port *ap, unsigned int *class, + unsigned long deadline) +{ + int retval; + + retval = sata_std_hardreset(ap, class, deadline); + + DPRINTK("SATA FSL : in xx_hardreset, retval = 0x%d\n", retval); + + return retval; +} + static void sata_fsl_error_handler(struct ata_port *ap) { DPRINTK("in xx_error_handler\n"); /* perform recovery */ - ata_do_eh(ap, ata_std_prereset, sata_fsl_softreset, sata_std_hardreset, + ata_do_eh(ap, ata_std_prereset, sata_fsl_softreset, sata_fsl_hardreset, ata_std_postreset); } @@ -951,8 +1042,7 @@ static void sata_fsl_irq_clear(struct ata_port *ap) static void sata_fsl_error_intr(struct ata_port *ap) { - struct ata_link *link = &ap->link; - struct ata_eh_info *ehi = &link->eh_info; + struct ata_eh_info *ehi = &ap->eh_info; struct sata_fsl_host_priv *host_priv = ap->host->private_data; void __iomem *hcr_base = host_priv->hcr_base; u32 hstatus, dereg, cereg = 0, SError = 0; @@ -1021,7 +1111,7 @@ static void sata_fsl_error_intr(struct ata_port *ap) } /* record error info */ - qc = ata_qc_from_tag(ap, link->active_tag); + qc = ata_qc_from_tag(ap, ap->active_tag); if (qc) { sata_fsl_cache_taskfile_from_d2h_fis(qc, qc->ap); @@ -1049,7 +1139,6 @@ static void sata_fsl_qc_complete(struct ata_queued_cmd *qc) static void sata_fsl_host_intr(struct ata_port *ap) { - struct ata_link *link = &ap->link; struct sata_fsl_host_priv *host_priv = ap->host->private_data; void __iomem *hcr_base = host_priv->hcr_base; u32 hstatus, qc_active = 0; @@ -1072,7 +1161,7 @@ static void sata_fsl_host_intr(struct ata_port *ap) return; } - if (link->sactive) { /* only true for NCQ commands */ + if (ap->sactive) { /* only true for NCQ commands */ int i; /* Read command completed register */ qc_active = ioread32(hcr_base + CC); @@ -1101,10 +1190,10 @@ static void sata_fsl_host_intr(struct ata_port *ap) } else if (ap->qc_active) { iowrite32(1, hcr_base + CC); - qc = ata_qc_from_tag(ap, link->active_tag); + qc = ata_qc_from_tag(ap, ap->active_tag); DPRINTK("completing non-ncq cmd, tag=%d,CC=0x%x\n", - link->active_tag, ioread32(hcr_base + CC)); + ap->active_tag, ioread32(hcr_base + CC)); if (qc) { sata_fsl_qc_complete(qc); @@ -1223,9 +1312,15 @@ static struct scsi_host_template sata_fsl_sht = { .slave_configure = ata_scsi_slave_config, .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, +#ifdef CONFIG_PM + .suspend = ata_scsi_device_suspend, + .resume = ata_scsi_device_resume, +#endif }; static const struct ata_port_operations sata_fsl_ops = { + .port_disable = ata_port_disable, + .check_status = sata_fsl_check_status, .check_altstatus = sata_fsl_check_status, .dev_select = ata_noop_dev_select, @@ -1235,6 +1330,8 @@ static const struct ata_port_operations sata_fsl_ops = { .qc_prep = sata_fsl_qc_prep, .qc_issue = sata_fsl_qc_issue, .irq_clear = sata_fsl_irq_clear, + .irq_on = ata_dummy_irq_on, + .irq_ack = ata_dummy_irq_ack, .scr_read = sata_fsl_scr_read, .scr_write = sata_fsl_scr_write, @@ -1251,7 +1348,6 @@ static const struct ata_port_operations sata_fsl_ops = { static const struct ata_port_info sata_fsl_port_info[] = { { .flags = SATA_FSL_HOST_FLAGS, - .link_flags = SATA_FSL_HOST_LFLAGS, .pio_mask = 0x1f, /* pio 0-4 */ .udma_mask = 0x7f, /* udma 0-6 */ .port_ops = &sata_fsl_ops, @@ -1302,7 +1398,6 @@ static int sata_fsl_probe(struct of_device *ofdev, dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n"); goto error_exit_with_cleanup; } - host_priv->irq = irq; /* allocate host structure */ host = ata_host_alloc_pinfo(&ofdev->dev, ppi, SATA_FSL_MAX_PORTS); @@ -1349,7 +1444,7 @@ static int sata_fsl_remove(struct of_device *ofdev) dev_set_drvdata(&ofdev->dev, NULL); - irq_dispose_mapping(host_priv->irq); + irq_dispose_mapping(host->irq); iounmap(host_priv->hcr_base); kfree(host_priv); diff --git a/trunk/drivers/ata/sata_promise.c b/trunk/drivers/ata/sata_promise.c index 7914def54fa3..825e717bcef9 100644 --- a/trunk/drivers/ata/sata_promise.c +++ b/trunk/drivers/ata/sata_promise.c @@ -587,7 +587,7 @@ static void pdc_fill_sg(struct ata_queued_cmd *qc) VPRINTK("Splitting last PRD.\n"); addr = le32_to_cpu(ap->prd[idx - 1].addr); - ap->prd[idx - 1].flags_len = cpu_to_le32(len - SG_COUNT_ASIC_BUG); + ap->prd[idx - 1].flags_len -= cpu_to_le32(SG_COUNT_ASIC_BUG); VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", idx - 1, addr, SG_COUNT_ASIC_BUG); addr = addr + len - SG_COUNT_ASIC_BUG; diff --git a/trunk/drivers/base/dmapool.c b/trunk/drivers/base/dmapool.c index b5034dc72a05..5beddc322e6f 100644 --- a/trunk/drivers/base/dmapool.c +++ b/trunk/drivers/base/dmapool.c @@ -2,6 +2,7 @@ #include #include #include /* Needed for i386 to build */ +#include /* Needed for i386 to build */ #include #include #include diff --git a/trunk/drivers/hid/hid-input.c b/trunk/drivers/hid/hid-input.c index 0b27da7d7497..dd332f28e08c 100644 --- a/trunk/drivers/hid/hid-input.c +++ b/trunk/drivers/hid/hid-input.c @@ -297,7 +297,7 @@ static struct hid_usage *hidinput_find_key(struct hid_device *hid, static int hidinput_getkeycode(struct input_dev *dev, int scancode, int *keycode) { - struct hid_device *hid = input_get_drvdata(dev); + struct hid_device *hid = dev->private; struct hid_usage *usage; usage = hidinput_find_key(hid, scancode, 0); @@ -311,7 +311,7 @@ static int hidinput_getkeycode(struct input_dev *dev, int scancode, static int hidinput_setkeycode(struct input_dev *dev, int scancode, int keycode) { - struct hid_device *hid = input_get_drvdata(dev); + struct hid_device *hid = dev->private; struct hid_usage *usage; int old_keycode; @@ -1152,7 +1152,7 @@ int hidinput_connect(struct hid_device *hid) kfree(hidinput); input_free_device(input_dev); err_hid("Out of memory during hid input probe"); - goto out_unwind; + return -1; } input_set_drvdata(input_dev, hid); @@ -1186,25 +1186,15 @@ int hidinput_connect(struct hid_device *hid) * UGCI) cram a lot of unrelated inputs into the * same interface. */ hidinput->report = report; - if (input_register_device(hidinput->input)) - goto out_cleanup; + input_register_device(hidinput->input); hidinput = NULL; } } - if (hidinput && input_register_device(hidinput->input)) - goto out_cleanup; + if (hidinput) + input_register_device(hidinput->input); return 0; - -out_cleanup: - input_free_device(hidinput->input); - kfree(hidinput); -out_unwind: - /* unwind the ones we already registered */ - hidinput_disconnect(hid); - - return -1; } EXPORT_SYMBOL_GPL(hidinput_connect); diff --git a/trunk/drivers/hid/usbhid/hid-quirks.c b/trunk/drivers/hid/usbhid/hid-quirks.c index a2552856476b..41a59a80e7ed 100644 --- a/trunk/drivers/hid/usbhid/hid-quirks.c +++ b/trunk/drivers/hid/usbhid/hid-quirks.c @@ -129,11 +129,6 @@ #define USB_DEVICE_ID_0_8_8_IF_KIT 0x0053 #define USB_DEVICE_ID_PHIDGET_MOTORCONTROL 0x0058 -#define USB_VENDOR_ID_GOTOP 0x08f2 -#define USB_DEVICE_ID_SUPER_Q2 0x007f -#define USB_DEVICE_ID_GOGOPEN 0x00ce -#define USB_DEVICE_ID_PENPOWER 0x00f4 - #define USB_VENDOR_ID_GRIFFIN 0x077d #define USB_DEVICE_ID_POWERMATE 0x0410 #define USB_DEVICE_ID_SOUNDKNOB 0x04AA @@ -420,9 +415,6 @@ static const struct hid_blacklist { { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_7_IF_KIT, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_PHIDGET_MOTORCONTROL, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_SUPER_Q2, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_GOGOPEN, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_PENPOWER, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_90, HID_QUIRK_IGNORE }, diff --git a/trunk/drivers/hid/usbhid/hiddev.c b/trunk/drivers/hid/usbhid/hiddev.c index 5fc4019956ba..9837adcb17e9 100644 --- a/trunk/drivers/hid/usbhid/hiddev.c +++ b/trunk/drivers/hid/usbhid/hiddev.c @@ -743,7 +743,7 @@ static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd static long hiddev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { struct inode *inode = file->f_path.dentry->d_inode; - return hiddev_ioctl(inode, file, cmd, (unsigned long)compat_ptr(arg)); + return hiddev_ioctl(inode, file, cmd, compat_ptr(arg)); } #endif diff --git a/trunk/drivers/ieee1394/sbp2.c b/trunk/drivers/ieee1394/sbp2.c index b83d254bc86e..d5dfe11aa5c6 100644 --- a/trunk/drivers/ieee1394/sbp2.c +++ b/trunk/drivers/ieee1394/sbp2.c @@ -71,11 +71,11 @@ #include #include #include -#include #include #include #include +#include #include #include diff --git a/trunk/drivers/input/joystick/xpad.c b/trunk/drivers/input/joystick/xpad.c index 6e9d75bd2b15..6dd375825a14 100644 --- a/trunk/drivers/input/joystick/xpad.c +++ b/trunk/drivers/input/joystick/xpad.c @@ -120,7 +120,6 @@ static const struct xpad_device { { 0x0738, 0x4536, "Mad Catz MicroCON", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x0738, 0x4540, "Mad Catz Beat Pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, { 0x0738, 0x4556, "Mad Catz Lynx Wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, - { 0x0738, 0x4716, "Mad Catz Wired Xbox 360 Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX360 }, { 0x0738, 0x6040, "Mad Catz Beat Pad Pro", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, { 0x0c12, 0x8802, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x0c12, 0x8810, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, @@ -130,7 +129,6 @@ static const struct xpad_device { { 0x0e6f, 0x0003, "Logic3 Freebird wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x0e6f, 0x0005, "Eclipse wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x0e6f, 0x0006, "Edge wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, - { 0x0e6f, 0x0006, "Pelican 'TSZ' Wired Xbox 360 Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX360 }, { 0x0e8f, 0x0201, "SmartJoy Frag Xpad/PS2 adaptor", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x0f30, 0x0202, "Joytech Advanced Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, diff --git a/trunk/drivers/input/misc/pcspkr.c b/trunk/drivers/input/misc/pcspkr.c index 43aaa5cebd12..4941a9e61e90 100644 --- a/trunk/drivers/input/misc/pcspkr.c +++ b/trunk/drivers/input/misc/pcspkr.c @@ -24,7 +24,7 @@ MODULE_DESCRIPTION("PC Speaker beeper driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:pcspkr"); -#if defined(CONFIG_MIPS) || defined(CONFIG_X86) +#ifdef CONFIG_X86 /* Use the global PIT lock ! */ #include #else diff --git a/trunk/drivers/input/mouse/appletouch.c b/trunk/drivers/input/mouse/appletouch.c index b4423a471f02..f132702d137d 100644 --- a/trunk/drivers/input/mouse/appletouch.c +++ b/trunk/drivers/input/mouse/appletouch.c @@ -129,12 +129,12 @@ MODULE_DEVICE_TABLE (usb, atp_table); */ #define ATP_THRESHOLD 5 -/* Geyser initialization constants */ -#define ATP_GEYSER_MODE_READ_REQUEST_ID 1 -#define ATP_GEYSER_MODE_WRITE_REQUEST_ID 9 -#define ATP_GEYSER_MODE_REQUEST_VALUE 0x300 -#define ATP_GEYSER_MODE_REQUEST_INDEX 0 -#define ATP_GEYSER_MODE_VENDOR_VALUE 0x04 +/* MacBook Pro (Geyser 3 & 4) initialization constants */ +#define ATP_GEYSER3_MODE_READ_REQUEST_ID 1 +#define ATP_GEYSER3_MODE_WRITE_REQUEST_ID 9 +#define ATP_GEYSER3_MODE_REQUEST_VALUE 0x300 +#define ATP_GEYSER3_MODE_REQUEST_INDEX 0 +#define ATP_GEYSER3_MODE_VENDOR_VALUE 0x04 /* Structure to hold all of our device specific stuff */ struct atp { @@ -142,11 +142,9 @@ struct atp { struct usb_device * udev; /* usb device */ struct urb * urb; /* usb request block */ signed char * data; /* transferred data */ - struct input_dev * input; /* input dev */ - unsigned char open; /* non-zero if opened */ - unsigned char valid; /* are the sensors valid ? */ - unsigned char size_detect_done; - unsigned char overflowwarn; /* overflow warning printed? */ + int open; /* non-zero if opened */ + struct input_dev *input; /* input dev */ + int valid; /* are the sensors valid ? */ int x_old; /* last reported x/y, */ int y_old; /* used for smoothing */ /* current value of the sensors */ @@ -155,6 +153,7 @@ struct atp { signed char xy_old[ATP_XSENSORS + ATP_YSENSORS]; /* accumulated sensors */ int xy_acc[ATP_XSENSORS + ATP_YSENSORS]; + int overflowwarn; /* overflow warning printed? */ int datalen; /* size of an USB urb transfer */ int idlecount; /* number of empty packets */ struct work_struct work; @@ -171,7 +170,7 @@ struct atp { #define dprintk(format, a...) \ do { \ - if (debug) printk(KERN_DEBUG format, ##a); \ + if (debug) printk(format, ##a); \ } while (0) MODULE_AUTHOR("Johannes Berg, Stelian Pop, Frank Arnold, Michael Hanselmann"); @@ -189,15 +188,6 @@ static int debug = 1; module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Activate debugging output"); -static inline int atp_is_fountain(struct atp *dev) -{ - u16 productId = le16_to_cpu(dev->udev->descriptor.idProduct); - - return productId == FOUNTAIN_ANSI_PRODUCT_ID || - productId == FOUNTAIN_ISO_PRODUCT_ID || - productId == FOUNTAIN_TP_ONLY_PRODUCT_ID; -} - /* Checks if the device a Geyser 2 (ANSI, ISO, JIS) */ static inline int atp_is_geyser_2(struct atp *dev) { @@ -221,63 +211,52 @@ static inline int atp_is_geyser_3(struct atp *dev) } /* - * By default newer Geyser devices send standard USB HID mouse + * By default Geyser 3 device sends standard USB HID mouse * packets (Report ID 2). This code changes device mode, so it * sends raw sensor reports (Report ID 5). */ -static int atp_geyser_init(struct usb_device *udev) +static int atp_geyser3_init(struct usb_device *udev) { char data[8]; int size; size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), - ATP_GEYSER_MODE_READ_REQUEST_ID, + ATP_GEYSER3_MODE_READ_REQUEST_ID, USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, - ATP_GEYSER_MODE_REQUEST_VALUE, - ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000); + ATP_GEYSER3_MODE_REQUEST_VALUE, + ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000); if (size != 8) { err("Could not do mode read request from device" - " (Geyser Raw mode)"); + " (Geyser 3 mode)"); return -EIO; } /* Apply the mode switch */ - data[0] = ATP_GEYSER_MODE_VENDOR_VALUE; + data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE; size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), - ATP_GEYSER_MODE_WRITE_REQUEST_ID, + ATP_GEYSER3_MODE_WRITE_REQUEST_ID, USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, - ATP_GEYSER_MODE_REQUEST_VALUE, - ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000); + ATP_GEYSER3_MODE_REQUEST_VALUE, + ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000); if (size != 8) { err("Could not do mode write request to device" - " (Geyser Raw mode)"); + " (Geyser 3 mode)"); return -EIO; } return 0; } -/* - * Reinitialise the device. This usually stops stream of empty packets - * coming from it. - */ +/* Reinitialise the device if it's a geyser 3 */ static void atp_reinit(struct work_struct *work) { struct atp *dev = container_of(work, struct atp, work); struct usb_device *udev = dev->udev; - int retval; dev->idlecount = 0; - - atp_geyser_init(udev); - - retval = usb_submit_urb(dev->urb, GFP_ATOMIC); - if (retval) { - err("%s - usb_submit_urb failed with result %d", - __FUNCTION__, retval); - } + atp_geyser3_init(udev); } static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact, @@ -358,7 +337,7 @@ static void atp_complete(struct urb* urb) break; case -EOVERFLOW: if(!dev->overflowwarn) { - printk(KERN_WARNING "appletouch: OVERFLOW with data " + printk("appletouch: OVERFLOW with data " "length %d, actual length is %d\n", dev->datalen, dev->urb->actual_length); dev->overflowwarn = 1; @@ -447,17 +426,15 @@ static void atp_complete(struct urb* urb) dev->x_old = dev->y_old = -1; memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old)); - if (dev->size_detect_done || - atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */ + if (atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */ goto exit; /* 17" Powerbooks have extra X sensors */ - for (i = (atp_is_geyser_2(dev) ? 15 : 16); i < ATP_XSENSORS; i++) { - if (!dev->xy_cur[i]) - continue; + for (i = (atp_is_geyser_2(dev)?15:16); i < ATP_XSENSORS; i++) { + if (!dev->xy_cur[i]) continue; - printk(KERN_INFO "appletouch: 17\" model detected.\n"); - if (atp_is_geyser_2(dev)) + printk("appletouch: 17\" model detected.\n"); + if(atp_is_geyser_2(dev)) input_set_abs_params(dev->input, ABS_X, 0, (20 - 1) * ATP_XFACT - 1, @@ -467,10 +444,10 @@ static void atp_complete(struct urb* urb) (ATP_XSENSORS - 1) * ATP_XFACT - 1, ATP_FUZZ, 0); + break; } - dev->size_detect_done = 1; goto exit; } @@ -502,7 +479,7 @@ static void atp_complete(struct urb* urb) dev->y_old = y; if (debug > 1) - printk(KERN_DEBUG "appletouch: X: %3d Y: %3d " + printk("appletouch: X: %3d Y: %3d " "Xz: %3d Yz: %3d\n", x, y, x_z, y_z); @@ -530,25 +507,19 @@ static void atp_complete(struct urb* urb) input_report_key(dev->input, BTN_LEFT, key); input_sync(dev->input); - /* - * Many Geysers will continue to send packets continually after - * the first touch unless reinitialised. Do so if it's been - * idle for a while in order to avoid waking the kernel up - * several hundred times a second. Re-initialization does not - * work on Fountain touchpads. - */ - if (!atp_is_fountain(dev)) { - if (!x && !y && !key) { - dev->idlecount++; - if (dev->idlecount == 10) { - dev->valid = 0; - schedule_work(&dev->work); - /* Don't resubmit urb here, wait for reinit */ - return; - } - } else - dev->idlecount = 0; - } + /* Many Geysers will continue to send packets continually after + the first touch unless reinitialised. Do so if it's been + idle for a while in order to avoid waking the kernel up + several hundred times a second */ + + if (!x && !y && !key) { + dev->idlecount++; + if (dev->idlecount == 10) { + dev->valid = 0; + schedule_work(&dev->work); + } + } else + dev->idlecount = 0; exit: retval = usb_submit_urb(dev->urb, GFP_ATOMIC); @@ -622,12 +593,12 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id else dev->datalen = 81; - if (!atp_is_fountain(dev)) { + if (atp_is_geyser_3(dev)) { /* switch to raw sensor mode */ - if (atp_geyser_init(udev)) + if (atp_geyser3_init(udev)) goto err_free_devs; - printk(KERN_INFO "appletouch: Geyser mode initialized.\n"); + printk("appletouch Geyser 3 inited.\n"); } dev->urb = usb_alloc_urb(0, GFP_KERNEL); diff --git a/trunk/drivers/input/mouse/inport.c b/trunk/drivers/input/mouse/inport.c index 26ec09529b51..655a39217432 100644 --- a/trunk/drivers/input/mouse/inport.c +++ b/trunk/drivers/input/mouse/inport.c @@ -144,7 +144,7 @@ static int __init inport_init(void) b = inb(INPORT_SIGNATURE_PORT); c = inb(INPORT_SIGNATURE_PORT); if (a == b || a != c) { - printk(KERN_INFO "inport.c: Didn't find InPort mouse at %#x\n", INPORT_BASE); + printk(KERN_ERR "inport.c: Didn't find InPort mouse at %#x\n", INPORT_BASE); err = -ENODEV; goto err_release_region; } diff --git a/trunk/drivers/input/mouse/logibm.c b/trunk/drivers/input/mouse/logibm.c index 37e7c75b43bd..b23a4f3ea5cd 100644 --- a/trunk/drivers/input/mouse/logibm.c +++ b/trunk/drivers/input/mouse/logibm.c @@ -134,7 +134,7 @@ static int __init logibm_init(void) udelay(100); if (inb(LOGIBM_SIGNATURE_PORT) != LOGIBM_SIGNATURE_BYTE) { - printk(KERN_INFO "logibm.c: Didn't find Logitech busmouse at %#x\n", LOGIBM_BASE); + printk(KERN_ERR "logibm.c: Didn't find Logitech busmouse at %#x\n", LOGIBM_BASE); err = -ENODEV; goto err_release_region; } diff --git a/trunk/drivers/input/serio/hp_sdc.c b/trunk/drivers/input/serio/hp_sdc.c index 02b3ad8c0826..6af199805ffc 100644 --- a/trunk/drivers/input/serio/hp_sdc.c +++ b/trunk/drivers/input/serio/hp_sdc.c @@ -944,7 +944,11 @@ static int __init hp_sdc_init_hppa(struct parisc_device *d) #endif /* __hppa__ */ +#if !defined(__mc68000__) /* Link error on m68k! */ +static void __exit hp_sdc_exit(void) +#else static void hp_sdc_exit(void) +#endif { write_lock_irq(&hp_sdc.lock); diff --git a/trunk/drivers/media/video/bt8xx/bttvp.h b/trunk/drivers/media/video/bt8xx/bttvp.h index d4ac4c4b49b4..0b92c35a8435 100644 --- a/trunk/drivers/media/video/bt8xx/bttvp.h +++ b/trunk/drivers/media/video/bt8xx/bttvp.h @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include diff --git a/trunk/drivers/mmc/core/core.c b/trunk/drivers/mmc/core/core.c index b96667448eb5..09435e0ec680 100644 --- a/trunk/drivers/mmc/core/core.c +++ b/trunk/drivers/mmc/core/core.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/mmc/core/mmc_ops.c b/trunk/drivers/mmc/core/mmc_ops.c index 64b05c6270f2..7471d49909b2 100644 --- a/trunk/drivers/mmc/core/mmc_ops.c +++ b/trunk/drivers/mmc/core/mmc_ops.c @@ -10,6 +10,7 @@ */ #include +#include #include #include diff --git a/trunk/drivers/mmc/core/sd_ops.c b/trunk/drivers/mmc/core/sd_ops.c index 0d96080d44b0..a6dafe62b992 100644 --- a/trunk/drivers/mmc/core/sd_ops.c +++ b/trunk/drivers/mmc/core/sd_ops.c @@ -10,6 +10,7 @@ */ #include +#include #include #include diff --git a/trunk/drivers/mmc/core/sdio_ops.c b/trunk/drivers/mmc/core/sdio_ops.c index e1fca588e385..4d289b275031 100644 --- a/trunk/drivers/mmc/core/sdio_ops.c +++ b/trunk/drivers/mmc/core/sdio_ops.c @@ -9,6 +9,7 @@ * your option) any later version. */ +#include #include #include diff --git a/trunk/drivers/net/Kconfig b/trunk/drivers/net/Kconfig index 5f800a6dd978..867cb7345b5f 100644 --- a/trunk/drivers/net/Kconfig +++ b/trunk/drivers/net/Kconfig @@ -1883,7 +1883,9 @@ config FEC2 config FEC_MPC52xx tristate "MPC52xx FEC driver" - depends on PPC_MERGE && PPC_MPC52xx && PPC_BESTCOMM_FEC + depends on PPC_MPC52xx + select PPC_BESTCOMM + select PPC_BESTCOMM_FEC select CRC32 select PHYLIB ---help--- diff --git a/trunk/drivers/net/fec_mpc52xx.c b/trunk/drivers/net/fec_mpc52xx.c index a8a0ee220da6..fc1cf0b742b0 100644 --- a/trunk/drivers/net/fec_mpc52xx.c +++ b/trunk/drivers/net/fec_mpc52xx.c @@ -879,9 +879,9 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) "Error while parsing device node resource\n" ); return rv; } - if ((mem.end - mem.start + 1) < sizeof(struct mpc52xx_fec)) { + if ((mem.end - mem.start + 1) != sizeof(struct mpc52xx_fec)) { printk(KERN_ERR DRIVER_NAME - " - invalid resource size (%lx < %x), check mpc52xx_devices.c\n", + " - invalid resource size (%lx != %x), check mpc52xx_devices.c\n", (unsigned long)(mem.end - mem.start + 1), sizeof(struct mpc52xx_fec)); return -EINVAL; } diff --git a/trunk/drivers/net/meth.c b/trunk/drivers/net/meth.c index 0c89b028a80c..e25dbab67363 100644 --- a/trunk/drivers/net/meth.c +++ b/trunk/drivers/net/meth.c @@ -33,6 +33,7 @@ #include #include +#include #include "meth.h" diff --git a/trunk/drivers/net/myri10ge/myri10ge.c b/trunk/drivers/net/myri10ge/myri10ge.c index 0f306ddb5630..366e62a2b1e5 100644 --- a/trunk/drivers/net/myri10ge/myri10ge.c +++ b/trunk/drivers/net/myri10ge/myri10ge.c @@ -1151,7 +1151,7 @@ static inline int myri10ge_clean_rx_done(struct myri10ge_priv *mgp, int budget) u16 length; __wsum checksum; - while (rx_done->entry[idx].length != 0 && work_done < budget) { + while (rx_done->entry[idx].length != 0 && work_done++ < budget) { length = ntohs(rx_done->entry[idx].length); rx_done->entry[idx].length = 0; checksum = csum_unfold(rx_done->entry[idx].checksum); @@ -1167,7 +1167,6 @@ static inline int myri10ge_clean_rx_done(struct myri10ge_priv *mgp, int budget) rx_bytes += rx_ok * (unsigned long)length; cnt++; idx = cnt & (myri10ge_max_intr_slots - 1); - work_done++; } rx_done->idx = idx; rx_done->cnt = cnt; @@ -1234,12 +1233,13 @@ static int myri10ge_poll(struct napi_struct *napi, int budget) struct myri10ge_priv *mgp = container_of(napi, struct myri10ge_priv, napi); struct net_device *netdev = mgp->dev; + struct myri10ge_rx_done *rx_done = &mgp->rx_done; int work_done; /* process as many rx events as NAPI will allow */ work_done = myri10ge_clean_rx_done(mgp, budget); - if (work_done < budget || !netif_running(netdev)) { + if (rx_done->entry[rx_done->idx].length == 0 || !netif_running(netdev)) { netif_rx_complete(netdev, napi); put_be32(htonl(3), mgp->irq_claim); } diff --git a/trunk/drivers/scsi/scsi_lib.c b/trunk/drivers/scsi/scsi_lib.c index 88de771d3569..61fdaf02f251 100644 --- a/trunk/drivers/scsi/scsi_lib.c +++ b/trunk/drivers/scsi/scsi_lib.c @@ -785,7 +785,7 @@ struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, gfp_t gfp_mask) * end-of-list */ if (!left) - sg_mark_end(&sgl[this - 1]); + sg_mark_end(sgl, this); /* * don't allow subsequent mempool allocs to sleep, it would diff --git a/trunk/drivers/sh/maple/maple.c b/trunk/drivers/sh/maple/maple.c index e52a6296ca46..161d1021b7eb 100644 --- a/trunk/drivers/sh/maple/maple.c +++ b/trunk/drivers/sh/maple/maple.c @@ -601,7 +601,8 @@ static int match_maple_bus_driver(struct device *devptr, return 0; } -static int maple_bus_uevent(struct device *dev, struct kobj_uevent_env *env) +static int maple_bus_uevent(struct device *dev, char **envp, + int num_envp, char *buffer, int buffer_size) { return 0; } diff --git a/trunk/drivers/usb/core/buffer.c b/trunk/drivers/usb/core/buffer.c index 28d4972f7ad5..ead2475406b8 100644 --- a/trunk/drivers/usb/core/buffer.c +++ b/trunk/drivers/usb/core/buffer.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/usb/core/hcd.c b/trunk/drivers/usb/core/hcd.c index fea8256a18d6..3dd997df8505 100644 --- a/trunk/drivers/usb/core/hcd.c +++ b/trunk/drivers/usb/core/hcd.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/usb/core/usb.c b/trunk/drivers/usb/core/usb.c index c4a6f1095b8b..69aa68287d3f 100644 --- a/trunk/drivers/usb/core/usb.c +++ b/trunk/drivers/usb/core/usb.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include diff --git a/trunk/drivers/watchdog/alim1535_wdt.c b/trunk/drivers/watchdog/alim1535_wdt.c index b481cc0e32e4..c404fc69e7e6 100644 --- a/trunk/drivers/watchdog/alim1535_wdt.c +++ b/trunk/drivers/watchdog/alim1535_wdt.c @@ -31,7 +31,7 @@ static unsigned long ali_is_open; static char ali_expect_release; static struct pci_dev *ali_pci; static u32 ali_timeout_bits; /* stores the computed timeout */ -static DEFINE_SPINLOCK(ali_lock); /* Guards the hardware */ +static spinlock_t ali_lock; /* Guards the hardware */ /* module parameters */ static int timeout = WATCHDOG_TIMEOUT; @@ -398,6 +398,8 @@ static int __init watchdog_init(void) { int ret; + spin_lock_init(&ali_lock); + /* Check whether or not the hardware watchdog is there */ if (ali_find_watchdog() != 0) { return -ENODEV; diff --git a/trunk/drivers/watchdog/davinci_wdt.c b/trunk/drivers/watchdog/davinci_wdt.c index a61cbd48dc07..19db5302ba6e 100644 --- a/trunk/drivers/watchdog/davinci_wdt.c +++ b/trunk/drivers/watchdog/davinci_wdt.c @@ -61,7 +61,7 @@ static int heartbeat = DEFAULT_HEARTBEAT; -static DEFINE_SPINLOCK(io_lock); +static spinlock_t io_lock; static unsigned long wdt_status; #define WDT_IN_USE 0 #define WDT_OK_TO_CLOSE 1 @@ -200,6 +200,8 @@ static int davinci_wdt_probe(struct platform_device *pdev) int ret = 0, size; struct resource *res; + spin_lock_init(&io_lock); + if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT) heartbeat = DEFAULT_HEARTBEAT; @@ -260,7 +262,7 @@ static int __init davinci_wdt_init(void) static void __exit davinci_wdt_exit(void) { - platform_driver_unregister(&platform_wdt_driver); + return platform_driver_unregister(&platform_wdt_driver); } module_init(davinci_wdt_init); diff --git a/trunk/drivers/watchdog/i6300esb.c b/trunk/drivers/watchdog/i6300esb.c index ca44fd9b19bb..f236954d2536 100644 --- a/trunk/drivers/watchdog/i6300esb.c +++ b/trunk/drivers/watchdog/i6300esb.c @@ -77,7 +77,7 @@ /* internal variables */ static void __iomem *BASEADDR; -static DEFINE_SPINLOCK(esb_lock); /* Guards the hardware */ +static spinlock_t esb_lock; /* Guards the hardware */ static unsigned long timer_alive; static struct pci_dev *esb_pci; static unsigned short triggered; /* The status of the watchdog upon boot */ @@ -456,6 +456,8 @@ static int __init watchdog_init (void) { int ret; + spin_lock_init(&esb_lock); + /* Check whether or not the hardware watchdog is there */ if (!esb_getdevice () || esb_pci == NULL) return -ENODEV; diff --git a/trunk/drivers/watchdog/iTCO_wdt.c b/trunk/drivers/watchdog/iTCO_wdt.c index a0e6809e369f..cd5a565bc3a0 100644 --- a/trunk/drivers/watchdog/iTCO_wdt.c +++ b/trunk/drivers/watchdog/iTCO_wdt.c @@ -35,12 +35,10 @@ * 82801GDH (ICH7DH) : document number 307013-002, 307014-009, * 82801GBM (ICH7-M) : document number 307013-002, 307014-009, * 82801GHM (ICH7-M DH) : document number 307013-002, 307014-009, - * 82801HB (ICH8) : document number 313056-003, 313057-009, - * 82801HR (ICH8R) : document number 313056-003, 313057-009, - * 82801HBM (ICH8M) : document number 313056-003, 313057-009, - * 82801HH (ICH8DH) : document number 313056-003, 313057-009, - * 82801HO (ICH8DO) : document number 313056-003, 313057-009, - * 82801HEM (ICH8M-E) : document number 313056-003, 313057-009, + * 82801HB (ICH8) : document number 313056-002, 313057-004, + * 82801HR (ICH8R) : document number 313056-002, 313057-004, + * 82801HH (ICH8DH) : document number 313056-002, 313057-004, + * 82801HO (ICH8DO) : document number 313056-002, 313057-004, * 82801IB (ICH9) : document number 316972-001, 316973-001, * 82801IR (ICH9R) : document number 316972-001, 316973-001, * 82801IH (ICH9DH) : document number 316972-001, 316973-001, @@ -97,10 +95,8 @@ enum iTCO_chipsets { TCO_ICH7M, /* ICH7-M */ TCO_ICH7MDH, /* ICH7-M DH */ TCO_ICH8, /* ICH8 & ICH8R */ - TCO_ICH8ME, /* ICH8M-E */ TCO_ICH8DH, /* ICH8DH */ TCO_ICH8DO, /* ICH8DO */ - TCO_ICH8M, /* ICH8M */ TCO_ICH9, /* ICH9 */ TCO_ICH9R, /* ICH9R */ TCO_ICH9DH, /* ICH9DH */ @@ -129,10 +125,8 @@ static struct { {"ICH7-M", 2}, {"ICH7-M DH", 2}, {"ICH8 or ICH8R", 2}, - {"ICH8M-E", 2}, {"ICH8DH", 2}, {"ICH8DO", 2}, - {"ICH8M", 2}, {"ICH9", 2}, {"ICH9R", 2}, {"ICH9DH", 2}, @@ -140,15 +134,6 @@ static struct { {NULL,0} }; -#define ITCO_PCI_DEVICE(dev, data) \ - .vendor = PCI_VENDOR_ID_INTEL, \ - .device = dev, \ - .subvendor = PCI_ANY_ID, \ - .subdevice = PCI_ANY_ID, \ - .class = 0, \ - .class_mask = 0, \ - .driver_data = data - /* * This data only exists for exporting the supported PCI ids * via MODULE_DEVICE_TABLE. We do not actually register a @@ -156,47 +141,45 @@ static struct { * functions that probably will be registered by other drivers. */ static struct pci_device_id iTCO_wdt_pci_tbl[] = { - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801AA_0, TCO_ICH )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801AB_0, TCO_ICH0 )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801BA_0, TCO_ICH2 )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801BA_10, TCO_ICH2M )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801CA_0, TCO_ICH3 )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801CA_12, TCO_ICH3M )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801DB_0, TCO_ICH4 )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801DB_12, TCO_ICH4M )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801E_0, TCO_CICH )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801EB_0, TCO_ICH5 )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB_1, TCO_6300ESB)}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_0, TCO_ICH6 )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_1, TCO_ICH6M )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_2, TCO_ICH6W )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_0, TCO_ICH7 )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_1, TCO_ICH7M )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_31, TCO_ICH7MDH)}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_0, TCO_ICH8 )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_1, TCO_ICH8ME )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_2, TCO_ICH8DH )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_3, TCO_ICH8DO )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_4, TCO_ICH8M )}, - { ITCO_PCI_DEVICE(0x2918, TCO_ICH9 )}, - { ITCO_PCI_DEVICE(0x2916, TCO_ICH9R )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_2, TCO_ICH9DH )}, - { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB2_0, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x2671, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x2672, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x2673, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x2674, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x2675, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x2676, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x2677, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x2678, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x2679, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x267a, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x267b, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x267c, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x267d, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x267e, TCO_631XESB)}, - { ITCO_PCI_DEVICE(0x267f, TCO_631XESB)}, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH0 }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH2 }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_10, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH2M }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH3 }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH3M }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH4 }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH4M }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_CICH }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH5 }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_6300ESB }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH6 }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH6M }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH6W }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH7 }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH7M }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH7MDH }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH8 }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH8DH }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH8DO }, + { PCI_VENDOR_ID_INTEL, 0x2918, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH9 }, + { PCI_VENDOR_ID_INTEL, 0x2916, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH9R }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH9DH }, + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x2671, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x2672, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x2673, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x2674, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x2675, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x2676, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x2677, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x2678, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x2679, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x267a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x267b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x267c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x267d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x267e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, + { PCI_VENDOR_ID_INTEL, 0x267f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, { 0, }, /* End of list */ }; MODULE_DEVICE_TABLE (pci, iTCO_wdt_pci_tbl); @@ -317,7 +300,6 @@ static int iTCO_wdt_start(void) /* disable chipset's NO_REBOOT bit */ if (iTCO_wdt_unset_NO_REBOOT_bit()) { - spin_unlock(&iTCO_wdt_private.io_lock); printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n"); return -EIO; } @@ -608,7 +590,7 @@ static struct miscdevice iTCO_wdt_miscdev = { * Init & exit routines */ -static int __devinit iTCO_wdt_init(struct pci_dev *pdev, const struct pci_device_id *ent, struct platform_device *dev) +static int iTCO_wdt_init(struct pci_dev *pdev, const struct pci_device_id *ent, struct platform_device *dev) { int ret; u32 base_address; @@ -712,7 +694,7 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev, const struct pci_device return ret; } -static void __devexit iTCO_wdt_cleanup(void) +static void iTCO_wdt_cleanup(void) { /* Stop the timer before we leave */ if (!nowayout) @@ -727,7 +709,7 @@ static void __devexit iTCO_wdt_cleanup(void) iTCO_wdt_private.ACPIBASE = 0; } -static int __devinit iTCO_wdt_probe(struct platform_device *dev) +static int iTCO_wdt_probe(struct platform_device *dev) { int found = 0; struct pci_dev *pdev = NULL; @@ -753,7 +735,7 @@ static int __devinit iTCO_wdt_probe(struct platform_device *dev) return 0; } -static int __devexit iTCO_wdt_remove(struct platform_device *dev) +static int iTCO_wdt_remove(struct platform_device *dev) { if (iTCO_wdt_private.ACPIBASE) iTCO_wdt_cleanup(); @@ -771,7 +753,7 @@ static void iTCO_wdt_shutdown(struct platform_device *dev) static struct platform_driver iTCO_wdt_driver = { .probe = iTCO_wdt_probe, - .remove = __devexit_p(iTCO_wdt_remove), + .remove = iTCO_wdt_remove, .shutdown = iTCO_wdt_shutdown, .suspend = iTCO_wdt_suspend, .resume = iTCO_wdt_resume, diff --git a/trunk/drivers/watchdog/ib700wdt.c b/trunk/drivers/watchdog/ib700wdt.c index 4b89f401691a..c3a60f52ccb9 100644 --- a/trunk/drivers/watchdog/ib700wdt.c +++ b/trunk/drivers/watchdog/ib700wdt.c @@ -48,7 +48,7 @@ static struct platform_device *ibwdt_platform_device; static unsigned long ibwdt_is_open; -static DEFINE_SPINLOCK(ibwdt_lock); +static spinlock_t ibwdt_lock; static char expect_close; /* Module information */ @@ -308,6 +308,8 @@ static int __devinit ibwdt_probe(struct platform_device *dev) { int res; + spin_lock_init(&ibwdt_lock); + #if WDT_START != WDT_STOP if (!request_region(WDT_STOP, 1, "IB700 WDT")) { printk (KERN_ERR PFX "STOP method I/O %X is not available.\n", WDT_STOP); diff --git a/trunk/drivers/watchdog/machzwd.c b/trunk/drivers/watchdog/machzwd.c index e6e07b4575eb..6d35bb112a5f 100644 --- a/trunk/drivers/watchdog/machzwd.c +++ b/trunk/drivers/watchdog/machzwd.c @@ -123,8 +123,8 @@ static void zf_ping(unsigned long data); static int zf_action = GEN_RESET; static unsigned long zf_is_open; static char zf_expect_close; -static DEFINE_SPINLOCK(zf_lock); -static DEFINE_SPINLOCK(zf_port_lock); +static spinlock_t zf_lock; +static spinlock_t zf_port_lock; static DEFINE_TIMER(zf_timer, zf_ping, 0, 0); static unsigned long next_heartbeat = 0; @@ -438,6 +438,9 @@ static int __init zf_init(void) zf_show_action(action); + spin_lock_init(&zf_lock); + spin_lock_init(&zf_port_lock); + if(!request_region(ZF_IOBASE, 3, "MachZ ZFL WDT")){ printk(KERN_ERR "cannot reserve I/O ports at %d\n", ZF_IOBASE); diff --git a/trunk/drivers/watchdog/mpc83xx_wdt.c b/trunk/drivers/watchdog/mpc83xx_wdt.c index 6369f569517f..a0bf95fb9763 100644 --- a/trunk/drivers/watchdog/mpc83xx_wdt.c +++ b/trunk/drivers/watchdog/mpc83xx_wdt.c @@ -56,7 +56,7 @@ static int prescale = 1; static unsigned int timeout_sec; static unsigned long wdt_is_open; -static DEFINE_SPINLOCK(wdt_spinlock); +static spinlock_t wdt_spinlock; static void mpc83xx_wdt_keepalive(void) { @@ -185,6 +185,9 @@ static int __devinit mpc83xx_wdt_probe(struct platform_device *dev) printk(KERN_INFO "WDT driver for MPC83xx initialized. " "mode:%s timeout=%d (%d seconds)\n", reset ? "reset":"interrupt", timeout, timeout_sec); + + spin_lock_init(&wdt_spinlock); + return 0; err_unmap: diff --git a/trunk/drivers/watchdog/pc87413_wdt.c b/trunk/drivers/watchdog/pc87413_wdt.c index 15e4f8887a9e..3d3deae0d64b 100644 --- a/trunk/drivers/watchdog/pc87413_wdt.c +++ b/trunk/drivers/watchdog/pc87413_wdt.c @@ -61,7 +61,7 @@ static unsigned long timer_enabled = 0; /* is the timer enabled? */ static char expect_close; /* is the close expected? */ -static DEFINE_SPINLOCK(io_lock);/* to guard the watchdog from io races */ +static spinlock_t io_lock; /* to guard the watchdog from io races */ static int nowayout = WATCHDOG_NOWAYOUT; @@ -561,6 +561,8 @@ static int __init pc87413_init(void) { int ret; + spin_lock_init(&io_lock); + printk(KERN_INFO PFX "Version " VERSION " at io 0x%X\n", WDT_INDEX_IO_PORT); /* request_region(io, 2, "pc87413"); */ diff --git a/trunk/drivers/watchdog/pnx4008_wdt.c b/trunk/drivers/watchdog/pnx4008_wdt.c index b04aa096a10a..22f8873dd092 100644 --- a/trunk/drivers/watchdog/pnx4008_wdt.c +++ b/trunk/drivers/watchdog/pnx4008_wdt.c @@ -80,7 +80,7 @@ static int nowayout = WATCHDOG_NOWAYOUT; static int heartbeat = DEFAULT_HEARTBEAT; -static DEFINE_SPINLOCK(io_lock); +static spinlock_t io_lock; static unsigned long wdt_status; #define WDT_IN_USE 0 #define WDT_OK_TO_CLOSE 1 @@ -254,6 +254,8 @@ static int pnx4008_wdt_probe(struct platform_device *pdev) int ret = 0, size; struct resource *res; + spin_lock_init(&io_lock); + if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT) heartbeat = DEFAULT_HEARTBEAT; @@ -333,7 +335,7 @@ static int __init pnx4008_wdt_init(void) static void __exit pnx4008_wdt_exit(void) { - platform_driver_unregister(&platform_wdt_driver); + return platform_driver_unregister(&platform_wdt_driver); } module_init(pnx4008_wdt_init); diff --git a/trunk/drivers/watchdog/sbc8360.c b/trunk/drivers/watchdog/sbc8360.c index 2ee2677f3648..285d85289532 100644 --- a/trunk/drivers/watchdog/sbc8360.c +++ b/trunk/drivers/watchdog/sbc8360.c @@ -54,7 +54,7 @@ #include static unsigned long sbc8360_is_open; -static DEFINE_SPINLOCK(sbc8360_lock); +static spinlock_t sbc8360_lock; static char expect_close; #define PFX "sbc8360: " @@ -359,6 +359,7 @@ static int __init sbc8360_init(void) goto out_noreboot; } + spin_lock_init(&sbc8360_lock); res = misc_register(&sbc8360_miscdev); if (res) { printk(KERN_ERR PFX "failed to register misc device\n"); diff --git a/trunk/drivers/watchdog/sc1200wdt.c b/trunk/drivers/watchdog/sc1200wdt.c index 32ccd7c89c7d..9670d47190d0 100644 --- a/trunk/drivers/watchdog/sc1200wdt.c +++ b/trunk/drivers/watchdog/sc1200wdt.c @@ -74,7 +74,7 @@ static int io = -1; static int io_len = 2; /* for non plug and play */ static struct semaphore open_sem; static char expect_close; -static DEFINE_SPINLOCK(sc1200wdt_lock); /* io port access serialisation */ +static spinlock_t sc1200wdt_lock; /* io port access serialisation */ #if defined CONFIG_PNP static int isapnp = 1; @@ -375,6 +375,7 @@ static int __init sc1200wdt_init(void) printk("%s\n", banner); + spin_lock_init(&sc1200wdt_lock); sema_init(&open_sem, 1); #if defined CONFIG_PNP diff --git a/trunk/drivers/watchdog/sc520_wdt.c b/trunk/drivers/watchdog/sc520_wdt.c index 2847324a2be2..e8594c64d1e6 100644 --- a/trunk/drivers/watchdog/sc520_wdt.c +++ b/trunk/drivers/watchdog/sc520_wdt.c @@ -125,7 +125,7 @@ static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0); static unsigned long next_heartbeat; static unsigned long wdt_is_open; static char wdt_expect_close; -static DEFINE_SPINLOCK(wdt_spinlock); +static spinlock_t wdt_spinlock; /* * Whack the dog @@ -383,6 +383,8 @@ static int __init sc520_wdt_init(void) { int rc = -EBUSY; + spin_lock_init(&wdt_spinlock); + /* Check that the timeout value is within it's range ; if not reset to the default */ if (wdt_set_heartbeat(timeout)) { wdt_set_heartbeat(WATCHDOG_TIMEOUT); diff --git a/trunk/drivers/watchdog/smsc37b787_wdt.c b/trunk/drivers/watchdog/smsc37b787_wdt.c index 5d2b5ba61414..d3cb0a766020 100644 --- a/trunk/drivers/watchdog/smsc37b787_wdt.c +++ b/trunk/drivers/watchdog/smsc37b787_wdt.c @@ -83,7 +83,7 @@ static unsigned long timer_enabled = 0; /* is the timer enabled? */ static char expect_close; /* is the close expected? */ -static DEFINE_SPINLOCK(io_lock);/* to guard the watchdog from io races */ +static spinlock_t io_lock; /* to guard the watchdog from io races */ static int nowayout = WATCHDOG_NOWAYOUT; @@ -540,6 +540,8 @@ static int __init wb_smsc_wdt_init(void) { int ret; + spin_lock_init(&io_lock); + printk("SMsC 37B787 watchdog component driver " VERSION " initialising...\n"); if (!request_region(IOPORT, IOPORT_SIZE, "SMsC 37B787 watchdog")) { diff --git a/trunk/drivers/watchdog/w83627hf_wdt.c b/trunk/drivers/watchdog/w83627hf_wdt.c index 386492821fc2..df33b3b5a53c 100644 --- a/trunk/drivers/watchdog/w83627hf_wdt.c +++ b/trunk/drivers/watchdog/w83627hf_wdt.c @@ -48,7 +48,7 @@ static unsigned long wdt_is_open; static char expect_close; -static DEFINE_SPINLOCK(io_lock); +static spinlock_t io_lock; /* You must set this - there is no sane way to probe for this board. */ static int wdt_io = 0x2E; @@ -328,6 +328,8 @@ wdt_init(void) { int ret; + spin_lock_init(&io_lock); + printk(KERN_INFO "WDT driver for the Winbond(TM) W83627HF/THF/HG Super I/O chip initialising.\n"); if (wdt_set_heartbeat(timeout)) { diff --git a/trunk/drivers/watchdog/w83697hf_wdt.c b/trunk/drivers/watchdog/w83697hf_wdt.c index c622a0e6c9ae..51826c216d6d 100644 --- a/trunk/drivers/watchdog/w83697hf_wdt.c +++ b/trunk/drivers/watchdog/w83697hf_wdt.c @@ -47,7 +47,7 @@ static unsigned long wdt_is_open; static char expect_close; -static DEFINE_SPINLOCK(io_lock); +static spinlock_t io_lock; /* You must set this - there is no sane way to probe for this board. */ static int wdt_io = 0x2e; @@ -376,6 +376,8 @@ wdt_init(void) { int ret, i, found = 0; + spin_lock_init(&io_lock); + printk (KERN_INFO PFX "WDT driver for W83697HF/HG initializing\n"); if (wdt_io == 0) { diff --git a/trunk/drivers/watchdog/w83877f_wdt.c b/trunk/drivers/watchdog/w83877f_wdt.c index bcc9d48955de..3c88fe18f4f4 100644 --- a/trunk/drivers/watchdog/w83877f_wdt.c +++ b/trunk/drivers/watchdog/w83877f_wdt.c @@ -94,7 +94,7 @@ static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0); static unsigned long next_heartbeat; static unsigned long wdt_is_open; static char wdt_expect_close; -static DEFINE_SPINLOCK(wdt_spinlock); +static spinlock_t wdt_spinlock; /* * Whack the dog @@ -350,6 +350,8 @@ static int __init w83877f_wdt_init(void) { int rc = -EBUSY; + spin_lock_init(&wdt_spinlock); + if(timeout < 1 || timeout > 3600) /* arbitrary upper limit */ { timeout = WATCHDOG_TIMEOUT; diff --git a/trunk/drivers/watchdog/w83977f_wdt.c b/trunk/drivers/watchdog/w83977f_wdt.c index b475529d2475..157968442891 100644 --- a/trunk/drivers/watchdog/w83977f_wdt.c +++ b/trunk/drivers/watchdog/w83977f_wdt.c @@ -50,7 +50,7 @@ static int timeoutW; /* timeout in watchdog counter units */ static unsigned long timer_alive; static int testmode; static char expect_close; -static DEFINE_SPINLOCK(spinlock); +static spinlock_t spinlock; module_param(timeout, int, 0); MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (15..7635), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")"); @@ -476,6 +476,8 @@ static int __init w83977f_wdt_init(void) printk(KERN_INFO PFX DRIVER_VERSION); + spin_lock_init(&spinlock); + /* * Check that the timeout value is within it's range ; * if not reset to the default diff --git a/trunk/drivers/watchdog/wafer5823wdt.c b/trunk/drivers/watchdog/wafer5823wdt.c index 9e368091f799..950905d3c39f 100644 --- a/trunk/drivers/watchdog/wafer5823wdt.c +++ b/trunk/drivers/watchdog/wafer5823wdt.c @@ -45,7 +45,7 @@ static unsigned long wafwdt_is_open; static char expect_close; -static DEFINE_SPINLOCK(wafwdt_lock); +static spinlock_t wafwdt_lock; /* * You must set these - there is no sane way to probe for this board. @@ -252,6 +252,8 @@ static int __init wafwdt_init(void) printk(KERN_INFO "WDT driver for Wafer 5823 single board computer initialising.\n"); + spin_lock_init(&wafwdt_lock); + if (timeout < 1 || timeout > 255) { timeout = WD_TIMO; printk (KERN_INFO PFX "timeout value must be 1<=x<=255, using %d\n", diff --git a/trunk/drivers/watchdog/wdt.c b/trunk/drivers/watchdog/wdt.c index 53d0bb410df8..0a3de6a02442 100644 --- a/trunk/drivers/watchdog/wdt.c +++ b/trunk/drivers/watchdog/wdt.c @@ -253,7 +253,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id) printk(KERN_CRIT "Possible fan fault.\n"); } #endif /* CONFIG_WDT_501 */ - if (!(status & WDC_SR_WCCR)) { + if (!(status & WDC_SR_WCCR)) #ifdef SOFTWARE_REBOOT #ifdef ONLY_TESTING printk(KERN_CRIT "Would Reboot.\n"); @@ -264,7 +264,6 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id) #else printk(KERN_CRIT "Reset in 5ms.\n"); #endif - } return IRQ_HANDLED; } diff --git a/trunk/drivers/watchdog/wdt977.c b/trunk/drivers/watchdog/wdt977.c index 9b7f6b6edef6..7d300ff7ab07 100644 --- a/trunk/drivers/watchdog/wdt977.c +++ b/trunk/drivers/watchdog/wdt977.c @@ -59,7 +59,7 @@ static int timeoutM; /* timeout in minutes */ static unsigned long timer_alive; static int testmode; static char expect_close; -static DEFINE_SPINLOCK(spinlock); +static spinlock_t spinlock; module_param(timeout, int, 0); MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (60..15300), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")"); @@ -448,6 +448,8 @@ static int __init wd977_init(void) printk(KERN_INFO PFX DRIVER_VERSION); + spin_lock_init(&spinlock); + /* Check that the timeout value is within it's range ; if not reset to the default */ if (wdt977_set_timeout(timeout)) { diff --git a/trunk/drivers/watchdog/wdt_pci.c b/trunk/drivers/watchdog/wdt_pci.c index 1355608683e4..6baf4ae42c9d 100644 --- a/trunk/drivers/watchdog/wdt_pci.c +++ b/trunk/drivers/watchdog/wdt_pci.c @@ -74,7 +74,7 @@ static int dev_count; static struct semaphore open_sem; -static DEFINE_SPINLOCK(wdtpci_lock); +static spinlock_t wdtpci_lock; static char expect_close; static int io; @@ -298,7 +298,7 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id) printk(KERN_CRIT PFX "Possible fan fault.\n"); } #endif /* CONFIG_WDT_501_PCI */ - if (!(status&WDC_SR_WCCR)) { + if (!(status&WDC_SR_WCCR)) #ifdef SOFTWARE_REBOOT #ifdef ONLY_TESTING printk(KERN_CRIT PFX "Would Reboot.\n"); @@ -309,7 +309,6 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id) #else printk(KERN_CRIT PFX "Reset in 5ms.\n"); #endif - } return IRQ_HANDLED; } @@ -607,6 +606,7 @@ static int __devinit wdtpci_init_one (struct pci_dev *dev, } sema_init(&open_sem, 1); + spin_lock_init(&wdtpci_lock); irq = dev->irq; io = pci_resource_start (dev, 2); diff --git a/trunk/fs/nfsd/nfs4recover.c b/trunk/fs/nfsd/nfs4recover.c index 1602cd00dd45..6f03918018a3 100644 --- a/trunk/fs/nfsd/nfs4recover.c +++ b/trunk/fs/nfsd/nfs4recover.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include diff --git a/trunk/fs/ntfs/aops.c b/trunk/fs/ntfs/aops.c index ad87cb01299b..cfdc7900d271 100644 --- a/trunk/fs/ntfs/aops.c +++ b/trunk/fs/ntfs/aops.c @@ -405,15 +405,6 @@ static int ntfs_readpage(struct file *file, struct page *page) retry_readpage: BUG_ON(!PageLocked(page)); - vi = page->mapping->host; - i_size = i_size_read(vi); - /* Is the page fully outside i_size? (truncate in progress) */ - if (unlikely(page->index >= (i_size + PAGE_CACHE_SIZE - 1) >> - PAGE_CACHE_SHIFT)) { - zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0); - ntfs_debug("Read outside i_size - truncated?"); - goto done; - } /* * This can potentially happen because we clear PageUptodate() during * ntfs_writepage() of MstProtected() attributes. @@ -422,6 +413,7 @@ static int ntfs_readpage(struct file *file, struct page *page) unlock_page(page); return 0; } + vi = page->mapping->host; ni = NTFS_I(vi); /* * Only $DATA attributes can be encrypted and only unnamed $DATA diff --git a/trunk/fs/ntfs/attrib.c b/trunk/fs/ntfs/attrib.c index 50d3b0c258e3..92dabdcf2b80 100644 --- a/trunk/fs/ntfs/attrib.c +++ b/trunk/fs/ntfs/attrib.c @@ -179,7 +179,10 @@ int ntfs_map_runlist_nolock(ntfs_inode *ni, VCN vcn, ntfs_attr_search_ctx *ctx) * ntfs_mapping_pairs_decompress() fails. */ end_vcn = sle64_to_cpu(a->data.non_resident.highest_vcn) + 1; - if (unlikely(vcn && vcn >= end_vcn)) { + if (!a->data.non_resident.lowest_vcn && end_vcn == 1) + end_vcn = sle64_to_cpu(a->data.non_resident.allocated_size) >> + ni->vol->cluster_size_bits; + if (unlikely(vcn >= end_vcn)) { err = -ENOENT; goto err_out; } diff --git a/trunk/fs/ntfs/compress.c b/trunk/fs/ntfs/compress.c index d1619d05eb23..d98daf59e0b6 100644 --- a/trunk/fs/ntfs/compress.c +++ b/trunk/fs/ntfs/compress.c @@ -561,16 +561,6 @@ int ntfs_read_compressed_block(struct page *page) read_unlock_irqrestore(&ni->size_lock, flags); max_page = ((i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) - offset; - /* Is the page fully outside i_size? (truncate in progress) */ - if (xpage >= max_page) { - kfree(bhs); - kfree(pages); - zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0); - ntfs_debug("Compressed read outside i_size - truncated?"); - SetPageUptodate(page); - unlock_page(page); - return 0; - } if (nr_pages < max_page) max_page = nr_pages; for (i = 0; i < max_page; i++, offset++) { diff --git a/trunk/include/asm-mips/i8253.h b/trunk/include/asm-mips/i8253.h index 032ca73f181b..affb32ce4af9 100644 --- a/trunk/include/asm-mips/i8253.h +++ b/trunk/include/asm-mips/i8253.h @@ -5,14 +5,25 @@ #ifndef __ASM_I8253_H #define __ASM_I8253_H -#include - /* i8253A PIT registers */ #define PIT_MODE 0x43 #define PIT_CH0 0x40 #define PIT_CH2 0x42 -extern spinlock_t i8253_lock; +/* i8259A PIC registers */ +#define PIC_MASTER_CMD 0x20 +#define PIC_MASTER_IMR 0x21 +#define PIC_MASTER_ISR PIC_MASTER_CMD +#define PIC_MASTER_POLL PIC_MASTER_ISR +#define PIC_MASTER_OCW3 PIC_MASTER_ISR +#define PIC_SLAVE_CMD 0xa0 +#define PIC_SLAVE_IMR 0xa1 + +/* i8259A PIC related value */ +#define PIC_CASCADE_IR 2 +#define MASTER_ICW4_DEFAULT 0x01 +#define SLAVE_ICW4_DEFAULT 0x01 +#define PIC_ICW4_AEOI 2 extern void setup_pit_timer(void); diff --git a/trunk/include/asm-mips/mach-au1x00/timex.h b/trunk/include/asm-mips/mach-au1x00/timex.h new file mode 100644 index 000000000000..e3ada66cb636 --- /dev/null +++ b/trunk/include/asm-mips/mach-au1x00/timex.h @@ -0,0 +1,13 @@ +/* + * 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) 2003 by Ralf Baechle + */ +#ifndef __ASM_MACH_AU1X00_TIMEX_H +#define __ASM_MACH_AU1X00_TIMEX_H + +#define CLOCK_TICK_RATE ((HZ * 100000UL) / 2) + +#endif /* __ASM_MACH_AU1X00_TIMEX_H */ diff --git a/trunk/include/asm-mips/mach-cobalt/irq.h b/trunk/include/asm-mips/mach-cobalt/irq.h index 57c8c9ac5851..179d0e850b59 100644 --- a/trunk/include/asm-mips/mach-cobalt/irq.h +++ b/trunk/include/asm-mips/mach-cobalt/irq.h @@ -35,7 +35,7 @@ * 4 - ethernet * 5 - 16550 UART * 6 - cascade i8259 - * 7 - CP0 counter + * 7 - CP0 counter (unused) */ #define MIPS_CPU_IRQ_BASE 16 @@ -48,6 +48,7 @@ #define SCSI_IRQ (MIPS_CPU_IRQ_BASE + 5) #define I8259_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 6) + #define GT641XX_IRQ_BASE 24 #include diff --git a/trunk/include/asm-mips/mach-generic/timex.h b/trunk/include/asm-mips/mach-generic/timex.h new file mode 100644 index 000000000000..48b4cfaa0d50 --- /dev/null +++ b/trunk/include/asm-mips/mach-generic/timex.h @@ -0,0 +1,13 @@ +/* + * 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) 2003, 2005 by Ralf Baechle + */ +#ifndef __ASM_MACH_GENERIC_TIMEX_H +#define __ASM_MACH_GENERIC_TIMEX_H + +#define CLOCK_TICK_RATE 500000 + +#endif /* __ASM_MACH_GENERIC_TIMEX_H */ diff --git a/trunk/include/asm-mips/mach-jazz/timex.h b/trunk/include/asm-mips/mach-jazz/timex.h new file mode 100644 index 000000000000..93affa33dfa8 --- /dev/null +++ b/trunk/include/asm-mips/mach-jazz/timex.h @@ -0,0 +1,16 @@ +/* + * 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) 2003 by Ralf Baechle + */ +#ifndef __ASM_MACH_JAZZ_TIMEX_H +#define __ASM_MACH_JAZZ_TIMEX_H + +/* + * Jazz is still using the R4030 100Hz counter + */ +#define CLOCK_TICK_RATE 100 + +#endif /* __ASM_MACH_JAZZ_TIMEX_H */ diff --git a/trunk/include/asm-mips/mach-qemu/timex.h b/trunk/include/asm-mips/mach-qemu/timex.h new file mode 100644 index 000000000000..cd543693fb0a --- /dev/null +++ b/trunk/include/asm-mips/mach-qemu/timex.h @@ -0,0 +1,16 @@ +/* + * 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) 2005 Daniel Jacobowitz + */ +#ifndef __ASM_MACH_QEMU_TIMEX_H +#define __ASM_MACH_QEMU_TIMEX_H + +/* + * We use a simulated i8254 PIC... + */ +#define CLOCK_TICK_RATE 1193182 + +#endif /* __ASM_MACH_QEMU_TIMEX_H */ diff --git a/trunk/include/asm-mips/mach-rm/timex.h b/trunk/include/asm-mips/mach-rm/timex.h new file mode 100644 index 000000000000..11ff6cb0f214 --- /dev/null +++ b/trunk/include/asm-mips/mach-rm/timex.h @@ -0,0 +1,13 @@ +/* + * 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) 2003, 2005 by Ralf Baechle + */ +#ifndef __ASM_MACH_RM200_TIMEX_H +#define __ASM_MACH_RM200_TIMEX_H + +#define CLOCK_TICK_RATE 1193182 + +#endif /* __ASM_MACH_RM200_TIMEX_H */ diff --git a/trunk/include/asm-mips/time.h b/trunk/include/asm-mips/time.h index ee1663e64da1..0a6bc7dc158e 100644 --- a/trunk/include/asm-mips/time.h +++ b/trunk/include/asm-mips/time.h @@ -10,10 +10,15 @@ * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. + * + * Please refer to Documentation/mips/time.README. */ #ifndef _ASM_TIME_H #define _ASM_TIME_H +#include +#include +#include #include #include #include @@ -33,12 +38,25 @@ extern int rtc_mips_set_mmss(unsigned long); /* * Timer interrupt functions. * mips_timer_state is needed for high precision timer calibration. + * mips_timer_ack may be NULL if the interrupt is self-recoverable. */ extern int (*mips_timer_state)(void); +/* + * High precision timer clocksource. + * If .read is NULL, an R4k-compatible timer setup is attempted. + */ +extern struct clocksource clocksource_mips; + +/* + * profiling and process accouting is done separately in local_timer_interrupt + */ +extern void local_timer_interrupt(int irq, void *dev_id); + /* * board specific routines required by time_init(). */ +struct irqaction; extern void plat_time_init(void); /* diff --git a/trunk/include/asm-mips/timex.h b/trunk/include/asm-mips/timex.h index 5816ad1569d6..87c68ae76ff8 100644 --- a/trunk/include/asm-mips/timex.h +++ b/trunk/include/asm-mips/timex.h @@ -13,12 +13,27 @@ #include /* - * This is the clock rate of the i8253 PIT. A MIPS system may not have - * a PIT by the symbol is used all over the kernel including some APIs. - * So keeping it defined to the number for the PIT is the only sane thing - * for now. + * This is the frequency of the timer used for Linux's timer interrupt. + * The value should be defined as accurate as possible or under certain + * circumstances Linux timekeeping might become inaccurate or fail. + * + * For many system the exact clockrate of the timer isn't known but due to + * the way this value is used we can get away with a wrong value as long + * as this value is: + * + * - a multiple of HZ + * - a divisor of the actual rate + * + * 500000 is a good such cheat value. + * + * The obscure number 1193182 is the same as used by the original i8254 + * time in legacy PC hardware; the chip unfortunately also found in a + * bunch of MIPS systems. The last remaining user of the i8254 for the + * timer interrupt is the RM200; it's a very standard system so there is + * no reason to make this a separate architecture. */ -#define CLOCK_TICK_RATE 1193182 + +#include /* * Standard way to access the cycle counter. diff --git a/trunk/include/asm-sh/cache.h b/trunk/include/asm-sh/cache.h index 01e5cf51ba9b..7a18649d1ccb 100644 --- a/trunk/include/asm-sh/cache.h +++ b/trunk/include/asm-sh/cache.h @@ -18,8 +18,9 @@ #define SH_CACHE_ASSOC 8 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) +#define SMP_CACHE_BYTES L1_CACHE_BYTES -#define __read_mostly __attribute__((__section__(".data.read_mostly"))) +#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) #ifndef __ASSEMBLY__ struct cache_info { diff --git a/trunk/include/asm-sh/irq.h b/trunk/include/asm-sh/irq.h index 11850f65c922..c61d902b8bff 100644 --- a/trunk/include/asm-sh/irq.h +++ b/trunk/include/asm-sh/irq.h @@ -41,7 +41,7 @@ static inline int generic_irq_demux(int irq) #define irq_canonicalize(irq) (irq) #define irq_demux(irq) sh_mv.mv_irq_demux(irq) -#ifdef CONFIG_IRQSTACKS +#ifdef CONFIG_4KSTACKS extern void irq_ctx_init(int cpu); extern void irq_ctx_exit(int cpu); # define __ARCH_HAS_DO_SOFTIRQ diff --git a/trunk/include/asm-sh/page.h b/trunk/include/asm-sh/page.h index 3aa8b07da47d..cb3d46c59eab 100644 --- a/trunk/include/asm-sh/page.h +++ b/trunk/include/asm-sh/page.h @@ -128,6 +128,7 @@ typedef struct { unsigned long pgd; } pgd_t; #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) +#define phys_to_page(phys) (pfn_to_page(phys >> PAGE_SHIFT)) #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) /* PFN start number, because of __MEMORY_START */ diff --git a/trunk/include/asm-sh/pgtable.h b/trunk/include/asm-sh/pgtable.h index 0b1d7c665659..cf0dd2b648c2 100644 --- a/trunk/include/asm-sh/pgtable.h +++ b/trunk/include/asm-sh/pgtable.h @@ -399,7 +399,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte) #define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK) #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) -#define pte_page(x) pfn_to_page(pte_pfn(x)) +#define pte_page(x) phys_to_page(pte_val(x)&PTE_PHYS_MASK) /* * The following only work if pte_present() is true. diff --git a/trunk/include/asm-sh/processor.h b/trunk/include/asm-sh/processor.h index ab0028db645a..4f2922a1979c 100644 --- a/trunk/include/asm-sh/processor.h +++ b/trunk/include/asm-sh/processor.h @@ -71,7 +71,7 @@ struct sh_cpuinfo { struct cache_info scache; /* Secondary cache */ unsigned long flags; -} __attribute__ ((aligned(L1_CACHE_BYTES))); +} __attribute__ ((aligned(SMP_CACHE_BYTES))); extern struct sh_cpuinfo cpu_data[]; #define boot_cpu_data cpu_data[0] diff --git a/trunk/include/asm-sh/setup.h b/trunk/include/asm-sh/setup.h index 55a2bd328d99..586a9711a75d 100644 --- a/trunk/include/asm-sh/setup.h +++ b/trunk/include/asm-sh/setup.h @@ -5,20 +5,6 @@ #ifdef __KERNEL__ -/* - * This is set up by the setup-routine at boot-time - */ -#define PARAM ((unsigned char *)empty_zero_page) - -#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000)) -#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004)) -#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008)) -#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c)) -#define INITRD_START (*(unsigned long *) (PARAM+0x010)) -#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014)) -/* ... */ -#define COMMAND_LINE ((char *) (PARAM+0x100)) - int setup_early_printk(char *); void sh_mv_setup(void); diff --git a/trunk/include/asm-sh64/dma-mapping.h b/trunk/include/asm-sh64/dma-mapping.h index 18f8dd642ac5..1438b763a5ea 100644 --- a/trunk/include/asm-sh64/dma-mapping.h +++ b/trunk/include/asm-sh64/dma-mapping.h @@ -42,9 +42,8 @@ static inline void dma_free_coherent(struct device *dev, size_t size, static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, enum dma_data_direction dir) { - unsigned long start = (unsigned long) vaddr; - unsigned long s = start & L1_CACHE_ALIGN_MASK; - unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK; + unsigned long s = (unsigned long) vaddr & L1_CACHE_ALIGN_MASK; + unsigned long e = (vaddr + size) & L1_CACHE_ALIGN_MASK; for (; s <= e; s += L1_CACHE_BYTES) asm volatile ("ocbp %0, 0" : : "r" (s)); diff --git a/trunk/include/asm-sh64/pci.h b/trunk/include/asm-sh64/pci.h index 18055dbbb4b5..57a67cf7a5c4 100644 --- a/trunk/include/asm-sh64/pci.h +++ b/trunk/include/asm-sh64/pci.h @@ -72,6 +72,15 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) #endif +/* These macros should be used after a pci_map_sg call has been done + * to get bus addresses of each of the SG entries and their lengths. + * You should only work with the number of sg entries pci_map_sg + * returns, or alternatively stop on the first sg_dma_len(sg) which + * is 0. + */ +#define sg_dma_address(sg) ((sg)->dma_address) +#define sg_dma_len(sg) ((sg)->length) + #ifdef CONFIG_PCI static inline void pci_dma_burst_advice(struct pci_dev *pdev, enum pci_dma_burst_strategy *strat, diff --git a/trunk/include/asm-sh64/scatterlist.h b/trunk/include/asm-sh64/scatterlist.h index 7f729bbfce43..5109251970e7 100644 --- a/trunk/include/asm-sh64/scatterlist.h +++ b/trunk/include/asm-sh64/scatterlist.h @@ -23,15 +23,6 @@ struct scatterlist { unsigned int length; }; -/* These macros should be used after a pci_map_sg call has been done - * to get bus addresses of each of the SG entries and their lengths. - * You should only work with the number of sg entries pci_map_sg - * returns, or alternatively stop on the first sg_dma_len(sg) which - * is 0. - */ -#define sg_dma_address(sg) ((sg)->dma_address) -#define sg_dma_len(sg) ((sg)->length) - #define ISA_DMA_THRESHOLD (0xffffffff) #endif /* !__ASM_SH64_SCATTERLIST_H */ diff --git a/trunk/include/asm-x86/irqflags_32.h b/trunk/include/asm-x86/irqflags_32.h index 4c7720089cb5..d058b04e0083 100644 --- a/trunk/include/asm-x86/irqflags_32.h +++ b/trunk/include/asm-x86/irqflags_32.h @@ -129,27 +129,6 @@ static inline int raw_irqs_disabled(void) return raw_irqs_disabled_flags(flags); } - -/* - * makes the traced hardirq state match with the machine state - * - * should be a rarely used function, only in places where its - * otherwise impossible to know the irq state, like in traps. - */ -static inline void trace_hardirqs_fixup_flags(unsigned long flags) -{ - if (raw_irqs_disabled_flags(flags)) - trace_hardirqs_off(); - else - trace_hardirqs_on(); -} - -static inline void trace_hardirqs_fixup(void) -{ - unsigned long flags = __raw_local_save_flags(); - - trace_hardirqs_fixup_flags(flags); -} #endif /* __ASSEMBLY__ */ /* diff --git a/trunk/include/asm-x86/irqflags_64.h b/trunk/include/asm-x86/irqflags_64.h index bb9163bb29d1..5341ea1f815a 100644 --- a/trunk/include/asm-x86/irqflags_64.h +++ b/trunk/include/asm-x86/irqflags_64.h @@ -111,26 +111,6 @@ static inline int raw_irqs_disabled(void) return raw_irqs_disabled_flags(flags); } -/* - * makes the traced hardirq state match with the machine state - * - * should be a rarely used function, only in places where its - * otherwise impossible to know the irq state, like in traps. - */ -static inline void trace_hardirqs_fixup_flags(unsigned long flags) -{ - if (raw_irqs_disabled_flags(flags)) - trace_hardirqs_off(); - else - trace_hardirqs_on(); -} - -static inline void trace_hardirqs_fixup(void) -{ - unsigned long flags = __raw_local_save_flags(); - - trace_hardirqs_fixup_flags(flags); -} /* * Used in the idle loop; sti takes one instruction cycle * to complete: diff --git a/trunk/include/linux/ata.h b/trunk/include/linux/ata.h index 61535e72834d..128dc7ad4901 100644 --- a/trunk/include/linux/ata.h +++ b/trunk/include/linux/ata.h @@ -43,7 +43,6 @@ enum { ATA_MAX_SECTORS_128 = 128, ATA_MAX_SECTORS = 256, ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ - ATA_MAX_SECTORS_TAPE = 65535, ATA_ID_WORDS = 256, ATA_ID_SERNO = 10, @@ -545,11 +544,6 @@ static inline int atapi_cdb_len(const u16 *dev_id) } } -static inline int atapi_command_packet_set(const u16 *dev_id) -{ - return (dev_id[0] >> 8) & 0x1f; -} - static inline int is_atapi_taskfile(const struct ata_taskfile *tf) { return (tf->protocol == ATA_PROT_ATAPI) || diff --git a/trunk/include/linux/input.h b/trunk/include/linux/input.h index b45f240a8c45..62268929856c 100644 --- a/trunk/include/linux/input.h +++ b/trunk/include/linux/input.h @@ -527,9 +527,6 @@ struct input_absinfo { #define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ #define KEY_LOGOFF 0x1b1 /* AL Logoff */ -#define KEY_DOLLAR 0x1b2 -#define KEY_EURO 0x1b3 - #define KEY_DEL_EOL 0x1c0 #define KEY_DEL_EOS 0x1c1 #define KEY_INS_LINE 0x1c2 diff --git a/trunk/include/linux/scatterlist.h b/trunk/include/linux/scatterlist.h index 259735044148..32326c293d7b 100644 --- a/trunk/include/linux/scatterlist.h +++ b/trunk/include/linux/scatterlist.h @@ -188,23 +188,43 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, /** * sg_mark_end - Mark the end of the scatterlist - * @sg: SG entryScatterlist + * @sgl: Scatterlist + * @nents: Number of entries in sgl * * Description: - * Marks the passed in sg entry as the termination point for the sg - * table. A call to sg_next() on this entry will return NULL. + * Marks the last entry as the termination point for sg_next() * **/ -static inline void sg_mark_end(struct scatterlist *sg) +static inline void sg_mark_end(struct scatterlist *sgl, unsigned int nents) { + sgl[nents - 1].page_link = 0x02; +} + +static inline void __sg_mark_end(struct scatterlist *sg) +{ + sg->page_link |= 0x02; +} + +/** + * sg_init_one - Initialize a single entry sg list + * @sg: SG entry + * @buf: Virtual address for IO + * @buflen: IO length + * + * Notes: + * This should not be used on a single entry that is part of a larger + * table. Use sg_init_table() for that. + * + **/ +static inline void sg_init_one(struct scatterlist *sg, const void *buf, + unsigned int buflen) +{ + memset(sg, 0, sizeof(*sg)); #ifdef CONFIG_DEBUG_SG - BUG_ON(sg->sg_magic != SG_MAGIC); + sg->sg_magic = SG_MAGIC; #endif - /* - * Set termination bit, clear potential chain bit - */ - sg->page_link |= 0x02; - sg->page_link &= ~0x01; + sg_mark_end(sg, 1); + sg_set_buf(sg, buf, buflen); } /** @@ -220,6 +240,7 @@ static inline void sg_mark_end(struct scatterlist *sg) static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) { memset(sgl, 0, sizeof(*sgl) * nents); + sg_mark_end(sgl, nents); #ifdef CONFIG_DEBUG_SG { unsigned int i; @@ -227,25 +248,6 @@ static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) sgl[i].sg_magic = SG_MAGIC; } #endif - sg_mark_end(&sgl[nents - 1]); -} - -/** - * sg_init_one - Initialize a single entry sg list - * @sg: SG entry - * @buf: Virtual address for IO - * @buflen: IO length - * - * Notes: - * This should not be used on a single entry that is part of a larger - * table. Use sg_init_table() for that. - * - **/ -static inline void sg_init_one(struct scatterlist *sg, const void *buf, - unsigned int buflen) -{ - sg_init_table(sg, 1); - sg_set_buf(sg, buf, buflen); } /** diff --git a/trunk/include/net/esp.h b/trunk/include/net/esp.h index c05f529bff28..c1bc529809da 100644 --- a/trunk/include/net/esp.h +++ b/trunk/include/net/esp.h @@ -3,7 +3,7 @@ #include #include -#include +#include #define ESP_NUM_FAST_SG 4 diff --git a/trunk/include/rdma/ib_verbs.h b/trunk/include/rdma/ib_verbs.h index 11f39606e7d9..4bea182d7116 100644 --- a/trunk/include/rdma/ib_verbs.h +++ b/trunk/include/rdma/ib_verbs.h @@ -48,9 +48,9 @@ #include #include #include -#include #include +#include #include union ib_gid { diff --git a/trunk/include/scsi/libsas.h b/trunk/include/scsi/libsas.h index a466c2cb8955..8dda2d66b5b9 100644 --- a/trunk/include/scsi/libsas.h +++ b/trunk/include/scsi/libsas.h @@ -36,7 +36,7 @@ #include #include #include -#include +#include struct block_device; diff --git a/trunk/kernel/lockdep.c b/trunk/kernel/lockdep.c index ed38bbfc48a3..55fe0c7cd95f 100644 --- a/trunk/kernel/lockdep.c +++ b/trunk/kernel/lockdep.c @@ -2424,7 +2424,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, return 0; /* - * Calculate the chain hash: it's the combined hash of all the + * Calculate the chain hash: it's the combined has of all the * lock keys along the dependency chain. We save the hash value * at every step so that we can get the current hash easily * after unlock. The chain hash is then used to cache dependency diff --git a/trunk/kernel/sched_debug.c b/trunk/kernel/sched_debug.c index 415e5c385542..e6fb392e5164 100644 --- a/trunk/kernel/sched_debug.c +++ b/trunk/kernel/sched_debug.c @@ -80,7 +80,6 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p) static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu) { struct task_struct *g, *p; - unsigned long flags; SEQ_printf(m, "\nrunnable tasks:\n" @@ -89,7 +88,7 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu) "------------------------------------------------------" "----------------------------------------------------\n"); - read_lock_irqsave(&tasklist_lock, flags); + read_lock_irq(&tasklist_lock); do_each_thread(g, p) { if (!p->se.on_rq || task_cpu(p) != rq_cpu) @@ -98,7 +97,7 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu) print_task(m, rq, p); } while_each_thread(g, p); - read_unlock_irqrestore(&tasklist_lock, flags); + read_unlock_irq(&tasklist_lock); } void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) diff --git a/trunk/net/core/skbuff.c b/trunk/net/core/skbuff.c index 32d5826b7177..64b50ff7a413 100644 --- a/trunk/net/core/skbuff.c +++ b/trunk/net/core/skbuff.c @@ -2095,7 +2095,7 @@ int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int le { int nsg = __skb_to_sgvec(skb, sg, offset, len); - sg_mark_end(&sg[nsg - 1]); + __sg_mark_end(&sg[nsg - 1]); return nsg; } diff --git a/trunk/net/ieee80211/ieee80211_crypt_ccmp.c b/trunk/net/ieee80211/ieee80211_crypt_ccmp.c index c6d760d9fbbe..0936a3e0210b 100644 --- a/trunk/net/ieee80211/ieee80211_crypt_ccmp.c +++ b/trunk/net/ieee80211/ieee80211_crypt_ccmp.c @@ -25,6 +25,7 @@ #include #include +#include MODULE_AUTHOR("Jouni Malinen"); MODULE_DESCRIPTION("Host AP crypt: CCMP"); diff --git a/trunk/net/ipv4/ah4.c b/trunk/net/ipv4/ah4.c index 5fc346d8b566..4e8e3b079f5b 100644 --- a/trunk/net/ipv4/ah4.c +++ b/trunk/net/ipv4/ah4.c @@ -8,6 +8,7 @@ #include #include #include +#include /* Clear mutable options and find final destination to substitute diff --git a/trunk/net/ipv4/ipcomp.c b/trunk/net/ipv4/ipcomp.c index ca1b5fdb8d31..0bfeb02a5f87 100644 --- a/trunk/net/ipv4/ipcomp.c +++ b/trunk/net/ipv4/ipcomp.c @@ -14,6 +14,7 @@ * - Adaptive compression. */ #include +#include #include #include #include diff --git a/trunk/net/ipv4/tcp_ipv4.c b/trunk/net/ipv4/tcp_ipv4.c index d438dfb0c8f3..eec02b29ffcf 100644 --- a/trunk/net/ipv4/tcp_ipv4.c +++ b/trunk/net/ipv4/tcp_ipv4.c @@ -1083,7 +1083,7 @@ static int tcp_v4_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key, sg_set_buf(&sg[block++], key->key, key->keylen); nbytes += key->keylen; - sg_mark_end(&sg[block - 1]); + __sg_mark_end(&sg[block - 1]); /* Now store the Hash into the packet */ err = crypto_hash_init(desc); diff --git a/trunk/net/ipv6/ah6.c b/trunk/net/ipv6/ah6.c index 4eaf55072b1b..66a9139d46e9 100644 --- a/trunk/net/ipv6/ah6.c +++ b/trunk/net/ipv6/ah6.c @@ -35,6 +35,7 @@ #include #include #include +#include static int zero_out_mutable_opts(struct ipv6_opt_hdr *opthdr) { diff --git a/trunk/net/ipv6/ipcomp6.c b/trunk/net/ipv6/ipcomp6.c index 85eb4798d8d2..80ef2a1d39fd 100644 --- a/trunk/net/ipv6/ipcomp6.c +++ b/trunk/net/ipv6/ipcomp6.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/net/ipv6/tcp_ipv6.c b/trunk/net/ipv6/tcp_ipv6.c index 06be2a1f2730..4b9032880959 100644 --- a/trunk/net/ipv6/tcp_ipv6.c +++ b/trunk/net/ipv6/tcp_ipv6.c @@ -781,7 +781,7 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key, sg_set_buf(&sg[block++], key->key, key->keylen); nbytes += key->keylen; - sg_mark_end(&sg[block - 1]); + __sg_mark_end(&sg[block - 1]); /* Now store the hash into the packet */ err = crypto_hash_init(desc); diff --git a/trunk/net/mac80211/aes_ccm.c b/trunk/net/mac80211/aes_ccm.c index e62fe55944b8..bf7ba128b963 100644 --- a/trunk/net/mac80211/aes_ccm.c +++ b/trunk/net/mac80211/aes_ccm.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "ieee80211_key.h" diff --git a/trunk/net/rxrpc/rxkad.c b/trunk/net/rxrpc/rxkad.c index e09a95aa68ff..c387cf68a08c 100644 --- a/trunk/net/rxrpc/rxkad.c +++ b/trunk/net/rxrpc/rxkad.c @@ -702,7 +702,7 @@ static void rxkad_sg_set_buf2(struct scatterlist sg[2], nsg++; } - sg_mark_end(&sg[nsg - 1]); + __sg_mark_end(&sg[nsg - 1]); ASSERTCMP(sg[0].length + sg[1].length, ==, buflen); } diff --git a/trunk/net/sunrpc/auth_gss/gss_krb5_crypto.c b/trunk/net/sunrpc/auth_gss/gss_krb5_crypto.c index 0dd792338fa9..ab7cbd6575c4 100644 --- a/trunk/net/sunrpc/auth_gss/gss_krb5_crypto.c +++ b/trunk/net/sunrpc/auth_gss/gss_krb5_crypto.c @@ -211,8 +211,8 @@ encryptor(struct scatterlist *sg, void *data) if (thislen == 0) return 0; - sg_mark_end(&desc->infrags[desc->fragno - 1]); - sg_mark_end(&desc->outfrags[desc->fragno - 1]); + __sg_mark_end(&desc->infrags[desc->fragno - 1]); + __sg_mark_end(&desc->outfrags[desc->fragno - 1]); ret = crypto_blkcipher_encrypt_iv(&desc->desc, desc->outfrags, desc->infrags, thislen); @@ -293,7 +293,7 @@ decryptor(struct scatterlist *sg, void *data) if (thislen == 0) return 0; - sg_mark_end(&desc->frags[desc->fragno - 1]); + __sg_mark_end(&desc->frags[desc->fragno - 1]); ret = crypto_blkcipher_decrypt_iv(&desc->desc, desc->frags, desc->frags, thislen); diff --git a/trunk/net/sunrpc/auth_gss/gss_krb5_seal.c b/trunk/net/sunrpc/auth_gss/gss_krb5_seal.c index 1c6eda5077c1..a0d9faa59cb5 100644 --- a/trunk/net/sunrpc/auth_gss/gss_krb5_seal.c +++ b/trunk/net/sunrpc/auth_gss/gss_krb5_seal.c @@ -63,6 +63,7 @@ #include #include #include +#include #include #ifdef RPC_DEBUG diff --git a/trunk/net/sunrpc/auth_gss/gss_krb5_wrap.c b/trunk/net/sunrpc/auth_gss/gss_krb5_wrap.c index 3bdc527ee64a..8bd074df27d3 100644 --- a/trunk/net/sunrpc/auth_gss/gss_krb5_wrap.c +++ b/trunk/net/sunrpc/auth_gss/gss_krb5_wrap.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #ifdef RPC_DEBUG diff --git a/trunk/net/xfrm/xfrm_algo.c b/trunk/net/xfrm/xfrm_algo.c index 1686f64c4352..0426388d351d 100644 --- a/trunk/net/xfrm/xfrm_algo.c +++ b/trunk/net/xfrm/xfrm_algo.c @@ -21,6 +21,7 @@ #if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE) #include #endif +#include /* * Algorithms supported by IPsec. These entries contain properties which