aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS11
-rw-r--r--Makefile3
-rw-r--r--arch/mips/Kconfig13
-rw-r--r--arch/mips/au1000/mtx-1/Makefile2
-rw-r--r--arch/mips/au1000/mtx-1/platform.c9
-rw-r--r--arch/mips/au1000/pb1200/Makefile2
-rw-r--r--arch/mips/au1000/pb1200/board_setup.c6
-rw-r--r--arch/mips/au1000/pb1200/irqmap.c100
-rw-r--r--arch/mips/basler/excite/excite_setup.c2
-rw-r--r--arch/mips/jazz/irq.c27
-rw-r--r--arch/mips/kernel/Makefile4
-rw-r--r--arch/mips/kernel/cevt-bcm1480.c149
-rw-r--r--arch/mips/kernel/cevt-sb1250.c148
-rw-r--r--arch/mips/kernel/csrc-bcm1480.c54
-rw-r--r--arch/mips/kernel/csrc-sb1250.c70
-rw-r--r--arch/mips/kernel/i8253.c25
-rw-r--r--arch/mips/kernel/time.c73
-rw-r--r--arch/mips/qemu/q-irq.c1
-rw-r--r--arch/mips/sgi-ip27/ip27-timer.c4
-rw-r--r--arch/mips/sgi-ip32/ip32-platform.c2
-rw-r--r--arch/mips/sibyte/Kconfig14
-rw-r--r--arch/mips/sibyte/bcm1480/irq.c16
-rw-r--r--arch/mips/sibyte/bcm1480/time.c159
-rw-r--r--arch/mips/sibyte/sb1250/irq.c14
-rw-r--r--arch/mips/sibyte/sb1250/time.c191
-rw-r--r--arch/mips/sni/time.c5
-rw-r--r--arch/sh/Kconfig8
-rw-r--r--arch/sh/Kconfig.debug8
-rw-r--r--arch/sh/Makefile2
-rw-r--r--arch/sh/boards/renesas/r7780rp/setup.c71
-rw-r--r--arch/sh/boards/se/7722/setup.c4
-rw-r--r--arch/sh/configs/r7785rp_defconfig299
-rw-r--r--arch/sh/drivers/pci/pci-st40.c4
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c9
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c27
-rw-r--r--arch/sh/kernel/irq.c8
-rw-r--r--arch/sh/kernel/setup.c46
-rw-r--r--arch/sh/kernel/vmlinux.lds.S201
-rw-r--r--arch/sh/kernel/vsyscall/vsyscall.lds.S5
-rw-r--r--arch/sh/mm/copy_page.S4
-rw-r--r--arch/sh/oprofile/op_model_sh7750.c22
-rw-r--r--arch/sh/tools/mach-types29
-rw-r--r--arch/sh64/configs/cayman_defconfig140
-rw-r--r--arch/sh64/configs/harp_defconfig105
-rw-r--r--arch/sh64/configs/sim_defconfig68
-rw-r--r--arch/x86/kernel/kprobes_32.c7
-rw-r--r--arch/x86/kernel/kprobes_64.c7
-rw-r--r--arch/x86/kernel/traps_32.c2
-rw-r--r--arch/x86/kernel/traps_64.c2
-rw-r--r--arch/x86/mm/fault_32.c5
-rw-r--r--arch/x86/mm/fault_64.c5
-rw-r--r--block/ll_rw_blk.c2
-rw-r--r--crypto/anubis.c1
-rw-r--r--crypto/blowfish.c1
-rw-r--r--crypto/compress.c1
-rw-r--r--crypto/crypto_null.c1
-rw-r--r--crypto/khazad.c1
-rw-r--r--crypto/sha1_generic.c1
-rw-r--r--crypto/sha256_generic.c1
-rw-r--r--crypto/sha512.c1
-rw-r--r--crypto/tea.c1
-rw-r--r--crypto/tgr192.c1
-rw-r--r--crypto/wp512.c1
-rw-r--r--drivers/ata/libata-core.c38
-rw-r--r--drivers/ata/libata-eh.c148
-rw-r--r--drivers/ata/libata-scsi.c2
-rw-r--r--drivers/ata/sata_fsl.c159
-rw-r--r--drivers/ata/sata_promise.c2
-rw-r--r--drivers/base/dmapool.c1
-rw-r--r--drivers/hid/hid-input.c22
-rw-r--r--drivers/hid/usbhid/hid-quirks.c8
-rw-r--r--drivers/hid/usbhid/hiddev.c2
-rw-r--r--drivers/ieee1394/sbp2.c2
-rw-r--r--drivers/input/joystick/xpad.c2
-rw-r--r--drivers/input/misc/pcspkr.c2
-rw-r--r--drivers/input/mouse/appletouch.c125
-rw-r--r--drivers/input/mouse/inport.c2
-rw-r--r--drivers/input/mouse/logibm.c2
-rw-r--r--drivers/input/serio/hp_sdc.c4
-rw-r--r--drivers/media/video/bt8xx/bttvp.h2
-rw-r--r--drivers/mmc/core/core.c1
-rw-r--r--drivers/mmc/core/mmc_ops.c1
-rw-r--r--drivers/mmc/core/sd_ops.c1
-rw-r--r--drivers/mmc/core/sdio_ops.c1
-rw-r--r--drivers/net/Kconfig4
-rw-r--r--drivers/net/fec_mpc52xx.c4
-rw-r--r--drivers/net/meth.c1
-rw-r--r--drivers/net/myri10ge/myri10ge.c6
-rw-r--r--drivers/scsi/scsi_lib.c2
-rw-r--r--drivers/sh/maple/maple.c3
-rw-r--r--drivers/usb/core/buffer.c1
-rw-r--r--drivers/usb/core/hcd.c1
-rw-r--r--drivers/usb/core/usb.c2
-rw-r--r--drivers/watchdog/alim1535_wdt.c4
-rw-r--r--drivers/watchdog/davinci_wdt.c6
-rw-r--r--drivers/watchdog/i6300esb.c4
-rw-r--r--drivers/watchdog/iTCO_wdt.c114
-rw-r--r--drivers/watchdog/ib700wdt.c4
-rw-r--r--drivers/watchdog/machzwd.c7
-rw-r--r--drivers/watchdog/mpc83xx_wdt.c5
-rw-r--r--drivers/watchdog/pc87413_wdt.c4
-rw-r--r--drivers/watchdog/pnx4008_wdt.c6
-rw-r--r--drivers/watchdog/sbc8360.c3
-rw-r--r--drivers/watchdog/sc1200wdt.c3
-rw-r--r--drivers/watchdog/sc520_wdt.c4
-rw-r--r--drivers/watchdog/smsc37b787_wdt.c4
-rw-r--r--drivers/watchdog/w83627hf_wdt.c4
-rw-r--r--drivers/watchdog/w83697hf_wdt.c4
-rw-r--r--drivers/watchdog/w83877f_wdt.c4
-rw-r--r--drivers/watchdog/w83977f_wdt.c4
-rw-r--r--drivers/watchdog/wafer5823wdt.c4
-rw-r--r--drivers/watchdog/wdt.c3
-rw-r--r--drivers/watchdog/wdt977.c4
-rw-r--r--drivers/watchdog/wdt_pci.c6
-rw-r--r--fs/nfsd/nfs4recover.c2
-rw-r--r--fs/ntfs/aops.c10
-rw-r--r--fs/ntfs/attrib.c5
-rw-r--r--fs/ntfs/compress.c10
-rw-r--r--include/asm-mips/i8253.h17
-rw-r--r--include/asm-mips/mach-au1x00/timex.h13
-rw-r--r--include/asm-mips/mach-cobalt/irq.h3
-rw-r--r--include/asm-mips/mach-generic/timex.h13
-rw-r--r--include/asm-mips/mach-jazz/timex.h16
-rw-r--r--include/asm-mips/mach-qemu/timex.h16
-rw-r--r--include/asm-mips/mach-rm/timex.h13
-rw-r--r--include/asm-mips/time.h18
-rw-r--r--include/asm-mips/timex.h25
-rw-r--r--include/asm-sh/cache.h3
-rw-r--r--include/asm-sh/irq.h2
-rw-r--r--include/asm-sh/page.h1
-rw-r--r--include/asm-sh/pgtable.h2
-rw-r--r--include/asm-sh/processor.h2
-rw-r--r--include/asm-sh/setup.h14
-rw-r--r--include/asm-sh64/dma-mapping.h5
-rw-r--r--include/asm-sh64/pci.h9
-rw-r--r--include/asm-sh64/scatterlist.h9
-rw-r--r--include/asm-x86/irqflags_32.h21
-rw-r--r--include/asm-x86/irqflags_64.h20
-rw-r--r--include/linux/ata.h6
-rw-r--r--include/linux/input.h3
-rw-r--r--include/linux/scatterlist.h60
-rw-r--r--include/net/esp.h2
-rw-r--r--include/rdma/ib_verbs.h2
-rw-r--r--include/scsi/libsas.h2
-rw-r--r--kernel/lockdep.c2
-rw-r--r--kernel/sched_debug.c5
-rw-r--r--net/core/skbuff.c2
-rw-r--r--net/ieee80211/ieee80211_crypt_ccmp.c1
-rw-r--r--net/ipv4/ah4.c1
-rw-r--r--net/ipv4/ipcomp.c1
-rw-r--r--net/ipv4/tcp_ipv4.c2
-rw-r--r--net/ipv6/ah6.c1
-rw-r--r--net/ipv6/ipcomp6.c1
-rw-r--r--net/ipv6/tcp_ipv6.c2
-rw-r--r--net/mac80211/aes_ccm.c1
-rw-r--r--net/rxrpc/rxkad.c2
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_crypto.c6
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_seal.c1
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_wrap.c1
-rw-r--r--net/xfrm/xfrm_algo.c1
160 files changed, 1614 insertions, 1697 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 4a26f832b4b..6c0e44bbf60 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -398,6 +398,12 @@ P: Arnaldo Carvalho de Melo
398M: acme@ghostprotocols.net 398M: acme@ghostprotocols.net
399S: Maintained 399S: Maintained
400 400
401APPLETOUCH TOUCHPAD DRIVER
402P: Johannes Berg
403M: johannes@sipsolutions.net
404L: linux-input@vger.kernel.org
405S: Maintained
406
401ARC FRAMEBUFFER DRIVER 407ARC FRAMEBUFFER DRIVER
402P: Jaya Kumar 408P: Jaya Kumar
403M: jayalk@intworks.biz 409M: jayalk@intworks.biz
@@ -1701,7 +1707,7 @@ S: Maintained
1701HID CORE LAYER 1707HID CORE LAYER
1702P: Jiri Kosina 1708P: Jiri Kosina
1703M: jkosina@suse.cz 1709M: jkosina@suse.cz
1704L: linux-input@atrey.karlin.mff.cuni.cz 1710L: linux-input@vger.kernel.org
1705T: git kernel.org:/pub/scm/linux/kernel/git/jikos/hid.git 1711T: git kernel.org:/pub/scm/linux/kernel/git/jikos/hid.git
1706S: Maintained 1712S: Maintained
1707 1713
@@ -1927,8 +1933,7 @@ INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS
1927P: Dmitry Torokhov 1933P: Dmitry Torokhov
1928M: dmitry.torokhov@gmail.com 1934M: dmitry.torokhov@gmail.com
1929M: dtor@mail.ru 1935M: dtor@mail.ru
1930L: linux-input@atrey.karlin.mff.cuni.cz 1936L: linux-input@vger.kernel.org
1931L: linux-joystick@atrey.karlin.mff.cuni.cz
1932T: git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git 1937T: git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git
1933S: Maintained 1938S: Maintained
1934 1939
diff --git a/Makefile b/Makefile
index 8816060cdf4..188c3b6b3fa 100644
--- a/Makefile
+++ b/Makefile
@@ -168,7 +168,8 @@ export srctree objtree VPATH TOPDIR
168SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ 168SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
169 -e s/arm.*/arm/ -e s/sa110/arm/ \ 169 -e s/arm.*/arm/ -e s/sa110/arm/ \
170 -e s/s390x/s390/ -e s/parisc64/parisc/ \ 170 -e s/s390x/s390/ -e s/parisc64/parisc/ \
171 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ ) 171 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
172 -e s/sh[234].*/sh/ )
172 173
173# Cross compiling and selecting different set of gcc/bin-utils 174# Cross compiling and selecting different set of gcc/bin-utils
174# --------------------------------------------------------------------------- 175# ---------------------------------------------------------------------------
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 97da953eb5d..2c7d6c240b7 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -546,6 +546,7 @@ config SIBYTE_BIGSUR
546 select SWAP_IO_SPACE 546 select SWAP_IO_SPACE
547 select SYS_HAS_CPU_SB1 547 select SYS_HAS_CPU_SB1
548 select SYS_SUPPORTS_BIG_ENDIAN 548 select SYS_SUPPORTS_BIG_ENDIAN
549 select SYS_SUPPORTS_HIGHMEM
549 select SYS_SUPPORTS_LITTLE_ENDIAN 550 select SYS_SUPPORTS_LITTLE_ENDIAN
550 551
551config SNI_RM 552config SNI_RM
@@ -733,15 +734,27 @@ config ARCH_MAY_HAVE_PC_FDC
733config BOOT_RAW 734config BOOT_RAW
734 bool 735 bool
735 736
737config CEVT_BCM1480
738 bool
739
736config CEVT_GT641XX 740config CEVT_GT641XX
737 bool 741 bool
738 742
739config CEVT_R4K 743config CEVT_R4K
740 bool 744 bool
741 745
746config CEVT_SB1250
747 bool
748
742config CEVT_TXX9 749config CEVT_TXX9
743 bool 750 bool
744 751
752config CSRC_BCM1480
753 bool
754
755config CSRC_SB1250
756 bool
757
745config CFE 758config CFE
746 bool 759 bool
747 760
diff --git a/arch/mips/au1000/mtx-1/Makefile b/arch/mips/au1000/mtx-1/Makefile
index afa7007d67f..85a90941de4 100644
--- a/arch/mips/au1000/mtx-1/Makefile
+++ b/arch/mips/au1000/mtx-1/Makefile
@@ -9,3 +9,5 @@
9 9
10lib-y := init.o board_setup.o irqmap.o 10lib-y := init.o board_setup.o irqmap.o
11obj-y := platform.o 11obj-y := platform.o
12
13EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/au1000/mtx-1/platform.c b/arch/mips/au1000/mtx-1/platform.c
index 01ebff67797..49c0fb409fe 100644
--- a/arch/mips/au1000/mtx-1/platform.c
+++ b/arch/mips/au1000/mtx-1/platform.c
@@ -34,15 +34,6 @@ static struct resource mtx1_wdt_res[] = {
34 } 34 }
35}; 35};
36 36
37static struct resource mtx1_sys_btn[] = {
38 [0] = {
39 .start = 7,
40 .end = 7,
41 .name = "mtx1-sys-btn-gpio",
42 .flags = IORESOURCE_IRQ,
43 }
44};
45
46static struct platform_device mtx1_wdt = { 37static struct platform_device mtx1_wdt = {
47 .name = "mtx1-wdt", 38 .name = "mtx1-wdt",
48 .id = 0, 39 .id = 0,
diff --git a/arch/mips/au1000/pb1200/Makefile b/arch/mips/au1000/pb1200/Makefile
index 22b673cf55a..970b1b1d5cd 100644
--- a/arch/mips/au1000/pb1200/Makefile
+++ b/arch/mips/au1000/pb1200/Makefile
@@ -3,3 +3,5 @@
3# 3#
4 4
5lib-y := init.o board_setup.o irqmap.o 5lib-y := init.o board_setup.o irqmap.o
6
7EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/au1000/pb1200/board_setup.c b/arch/mips/au1000/pb1200/board_setup.c
index 5dbc9868f59..b98bebfa87c 100644
--- a/arch/mips/au1000/pb1200/board_setup.c
+++ b/arch/mips/au1000/pb1200/board_setup.c
@@ -68,9 +68,11 @@ void board_reset(void)
68void __init board_setup(void) 68void __init board_setup(void)
69{ 69{
70 char *argptr = NULL; 70 char *argptr = NULL;
71 u32 pin_func;
72 71
73#if 0 72#if 0
73 {
74 u32 pin_func;
75
74 /* Enable PSC1 SYNC for AC97. Normaly done in audio driver, 76 /* Enable PSC1 SYNC for AC97. Normaly done in audio driver,
75 * but it is board specific code, so put it here. 77 * but it is board specific code, so put it here.
76 */ 78 */
@@ -81,11 +83,13 @@ void __init board_setup(void)
81 83
82 au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */ 84 au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */
83 au_sync(); 85 au_sync();
86 }
84#endif 87#endif
85 88
86#if defined(CONFIG_I2C_AU1550) 89#if defined(CONFIG_I2C_AU1550)
87 { 90 {
88 u32 freq0, clksrc; 91 u32 freq0, clksrc;
92 u32 pin_func;
89 93
90 /* Select SMBUS in CPLD */ 94 /* Select SMBUS in CPLD */
91 bcsr->resets &= ~(BCSR_RESETS_PCS0MUX); 95 bcsr->resets &= ~(BCSR_RESETS_PCS0MUX);
diff --git a/arch/mips/au1000/pb1200/irqmap.c b/arch/mips/au1000/pb1200/irqmap.c
index bdf00e2a35e..c096be4ed4e 100644
--- a/arch/mips/au1000/pb1200/irqmap.c
+++ b/arch/mips/au1000/pb1200/irqmap.c
@@ -94,51 +94,41 @@ inline void pb1200_disable_irq(unsigned int irq_nr)
94 bcsr->intclr = 1<<(irq_nr - PB1200_INT_BEGIN); 94 bcsr->intclr = 1<<(irq_nr - PB1200_INT_BEGIN);
95} 95}
96 96
97static unsigned int pb1200_startup_irq( unsigned int irq_nr ) 97static unsigned int pb1200_setup_cascade(void)
98{ 98{
99 if (++pb1200_cascade_en == 1) 99 int err;
100 { 100
101 request_irq(AU1000_GPIO_7, &pb1200_cascade_handler, 101 err = request_irq(AU1000_GPIO_7, &pb1200_cascade_handler,
102 0, "Pb1200 Cascade", (void *)&pb1200_cascade_handler ); 102 0, "Pb1200 Cascade", &pb1200_cascade_handler);
103#ifdef CONFIG_MIPS_PB1200 103 if (err)
104 /* We have a problem with CPLD rev3. Enable a workaround */ 104 return err;
105 if( ((bcsr->whoami & BCSR_WHOAMI_CPLD)>>4) <= 3) 105
106 {
107 printk("\nWARNING!!!\n");
108 printk("\nWARNING!!!\n");
109 printk("\nWARNING!!!\n");
110 printk("\nWARNING!!!\n");
111 printk("\nWARNING!!!\n");
112 printk("\nWARNING!!!\n");
113 printk("Pb1200 must be at CPLD rev4. Please have Pb1200\n");
114 printk("updated to latest revision. This software will not\n");
115 printk("work on anything less than CPLD rev4\n");
116 printk("\nWARNING!!!\n");
117 printk("\nWARNING!!!\n");
118 printk("\nWARNING!!!\n");
119 printk("\nWARNING!!!\n");
120 printk("\nWARNING!!!\n");
121 printk("\nWARNING!!!\n");
122 while(1);
123 }
124#endif
125 }
126 pb1200_enable_irq(irq_nr);
127 return 0; 106 return 0;
128} 107}
129 108
130static void pb1200_shutdown_irq( unsigned int irq_nr ) 109static unsigned int pb1200_startup_irq(unsigned int irq)
131{ 110{
132 pb1200_disable_irq(irq_nr); 111 if (++pb1200_cascade_en == 1) {
133 if (--pb1200_cascade_en == 0) 112 int res;
134 { 113
135 free_irq(AU1000_GPIO_7, &pb1200_cascade_handler ); 114 res = pb1200_setup_cascade();
115 if (res)
116 return res;
136 } 117 }
137 return; 118
119 pb1200_enable_irq(irq);
120
121 return 0;
138} 122}
139 123
140static struct irq_chip external_irq_type = 124static void pb1200_shutdown_irq(unsigned int irq)
141{ 125{
126 pb1200_disable_irq(irq);
127 if (--pb1200_cascade_en == 0)
128 free_irq(AU1000_GPIO_7, &pb1200_cascade_handler);
129}
130
131static struct irq_chip external_irq_type = {
142#ifdef CONFIG_MIPS_PB1200 132#ifdef CONFIG_MIPS_PB1200
143 .name = "Pb1200 Ext", 133 .name = "Pb1200 Ext",
144#endif 134#endif
@@ -155,16 +145,38 @@ static struct irq_chip external_irq_type =
155 145
156void _board_init_irq(void) 146void _board_init_irq(void)
157{ 147{
158 int irq_nr; 148 unsigned int irq;
159 149
160 for (irq_nr = PB1200_INT_BEGIN; irq_nr <= PB1200_INT_END; irq_nr++) 150#ifdef CONFIG_MIPS_PB1200
161 { 151 /* We have a problem with CPLD rev3. Enable a workaround */
162 set_irq_chip_and_handler(irq_nr, &external_irq_type, 152 if (((bcsr->whoami & BCSR_WHOAMI_CPLD) >> 4) <= 3) {
153 printk("\nWARNING!!!\n");
154 printk("\nWARNING!!!\n");
155 printk("\nWARNING!!!\n");
156 printk("\nWARNING!!!\n");
157 printk("\nWARNING!!!\n");
158 printk("\nWARNING!!!\n");
159 printk("Pb1200 must be at CPLD rev4. Please have Pb1200\n");
160 printk("updated to latest revision. This software will not\n");
161 printk("work on anything less than CPLD rev4\n");
162 printk("\nWARNING!!!\n");
163 printk("\nWARNING!!!\n");
164 printk("\nWARNING!!!\n");
165 printk("\nWARNING!!!\n");
166 printk("\nWARNING!!!\n");
167 printk("\nWARNING!!!\n");
168 panic("Game over. Your score is 0.");
169 }
170#endif
171
172 for (irq = PB1200_INT_BEGIN; irq <= PB1200_INT_END; irq++) {
173 set_irq_chip_and_handler(irq, &external_irq_type,
163 handle_level_irq); 174 handle_level_irq);
164 pb1200_disable_irq(irq_nr); 175 pb1200_disable_irq(irq);
165 } 176 }
166 177
167 /* GPIO_7 can not be hooked here, so it is hooked upon first 178 /*
168 request of any source attached to the cascade */ 179 * GPIO_7 can not be hooked here, so it is hooked upon first
180 * request of any source attached to the cascade
181 */
169} 182}
170
diff --git a/arch/mips/basler/excite/excite_setup.c b/arch/mips/basler/excite/excite_setup.c
index 24378b9223f..6dd8f0d46d0 100644
--- a/arch/mips/basler/excite/excite_setup.c
+++ b/arch/mips/basler/excite/excite_setup.c
@@ -77,7 +77,7 @@ int titan_irqflags;
77void __init plat_time_init(void) 77void __init plat_time_init(void)
78{ 78{
79 const u32 modebit5 = ocd_readl(0x00e4); 79 const u32 modebit5 = ocd_readl(0x00e4);
80 unsigned int mult = ((modebit5 >> 11) & 0x1f) + 2, 80 unsigned int mult = ((modebit5 >> 11) & 0x1f) + 2;
81 unsigned int div = ((modebit5 >> 16) & 0x1f) + 2; 81 unsigned int div = ((modebit5 >> 16) & 0x1f) + 2;
82 82
83 if (div == 33) 83 if (div == 33)
diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c
index ae25b480723..d7f8a782aae 100644
--- a/arch/mips/jazz/irq.c
+++ b/arch/mips/jazz/irq.c
@@ -97,9 +97,10 @@ asmlinkage void plat_irq_dispatch(void)
97 if (pending & IE_IRQ4) { 97 if (pending & IE_IRQ4) {
98 r4030_read_reg32(JAZZ_TIMER_REGISTER); 98 r4030_read_reg32(JAZZ_TIMER_REGISTER);
99 do_IRQ(JAZZ_TIMER_IRQ); 99 do_IRQ(JAZZ_TIMER_IRQ);
100 } else if (pending & IE_IRQ2) 100 } else if (pending & IE_IRQ2) {
101 do_IRQ(r4030_read_reg32(JAZZ_EISA_IRQ_ACK)); 101 irq = *(volatile u8 *)JAZZ_EISA_IRQ_ACK;
102 else if (pending & IE_IRQ1) { 102 do_IRQ(irq);
103 } else if (pending & IE_IRQ1) {
103 irq = *(volatile u8 *)JAZZ_IO_IRQ_SOURCE >> 2; 104 irq = *(volatile u8 *)JAZZ_IO_IRQ_SOURCE >> 2;
104 if (likely(irq > 0)) 105 if (likely(irq > 0))
105 do_IRQ(irq + JAZZ_IRQ_START - 1); 106 do_IRQ(irq + JAZZ_IRQ_START - 1);
@@ -117,16 +118,16 @@ static void r4030_set_mode(enum clock_event_mode mode,
117struct clock_event_device r4030_clockevent = { 118struct clock_event_device r4030_clockevent = {
118 .name = "r4030", 119 .name = "r4030",
119 .features = CLOCK_EVT_FEAT_PERIODIC, 120 .features = CLOCK_EVT_FEAT_PERIODIC,
120 .rating = 100, 121 .rating = 300,
121 .irq = JAZZ_TIMER_IRQ, 122 .irq = JAZZ_TIMER_IRQ,
122 .cpumask = CPU_MASK_CPU0,
123 .set_mode = r4030_set_mode, 123 .set_mode = r4030_set_mode,
124}; 124};
125 125
126static irqreturn_t r4030_timer_interrupt(int irq, void *dev_id) 126static irqreturn_t r4030_timer_interrupt(int irq, void *dev_id)
127{ 127{
128 r4030_clockevent.event_handler(&r4030_clockevent); 128 struct clock_event_device *cd = dev_id;
129 129
130 cd->event_handler(cd);
130 return IRQ_HANDLED; 131 return IRQ_HANDLED;
131} 132}
132 133
@@ -134,15 +135,22 @@ static struct irqaction r4030_timer_irqaction = {
134 .handler = r4030_timer_interrupt, 135 .handler = r4030_timer_interrupt,
135 .flags = IRQF_DISABLED, 136 .flags = IRQF_DISABLED,
136 .mask = CPU_MASK_CPU0, 137 .mask = CPU_MASK_CPU0,
137 .name = "timer", 138 .name = "R4030 timer",
138}; 139};
139 140
140void __init plat_time_init(void) 141void __init plat_time_init(void)
141{ 142{
142 struct irqaction *irq = &r4030_timer_irqaction; 143 struct clock_event_device *cd = &r4030_clockevent;
144 struct irqaction *action = &r4030_timer_irqaction;
145 unsigned int cpu = smp_processor_id();
143 146
144 BUG_ON(HZ != 100); 147 BUG_ON(HZ != 100);
145 148
149 cd->cpumask = cpumask_of_cpu(cpu);
150 clockevents_register_device(cd);
151 action->dev_id = cd;
152 setup_irq(JAZZ_TIMER_IRQ, action);
153
146 /* 154 /*
147 * Set clock to 100Hz. 155 * Set clock to 100Hz.
148 * 156 *
@@ -150,8 +158,5 @@ void __init plat_time_init(void)
150 * a programmable 4-bit divider. This makes it fairly inflexible. 158 * a programmable 4-bit divider. This makes it fairly inflexible.
151 */ 159 */
152 r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9); 160 r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9);
153 setup_irq(JAZZ_TIMER_IRQ, irq);
154
155 clockevents_register_device(&r4030_clockevent);
156 setup_pit_timer(); 161 setup_pit_timer();
157} 162}
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 3196509a28d..b551535b7e4 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -8,9 +8,13 @@ obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \
8 ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \ 8 ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
9 time.o topology.o traps.o unaligned.o 9 time.o topology.o traps.o unaligned.o
10 10
11obj-$(CONFIG_CEVT_BCM1480) += cevt-bcm1480.o
11obj-$(CONFIG_CEVT_R4K) += cevt-r4k.o 12obj-$(CONFIG_CEVT_R4K) += cevt-r4k.o
12obj-$(CONFIG_CEVT_GT641XX) += cevt-gt641xx.o 13obj-$(CONFIG_CEVT_GT641XX) += cevt-gt641xx.o
14obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o
13obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o 15obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o
16obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o
17obj-$(CONFIG_CSRC_SB1250) += csrc-sb1250.o
14 18
15binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ 19binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \
16 irix5sys.o sysirix.o 20 irix5sys.o sysirix.o
diff --git a/arch/mips/kernel/cevt-bcm1480.c b/arch/mips/kernel/cevt-bcm1480.c
new file mode 100644
index 00000000000..21e6d63eb4d
--- /dev/null
+++ b/arch/mips/kernel/cevt-bcm1480.c
@@ -0,0 +1,149 @@
1/*
2 * Copyright (C) 2000,2001,2004 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18#include <linux/clockchips.h>
19#include <linux/interrupt.h>
20#include <linux/percpu.h>
21
22#include <asm/addrspace.h>
23#include <asm/io.h>
24#include <asm/time.h>
25
26#include <asm/sibyte/bcm1480_regs.h>
27#include <asm/sibyte/sb1250_regs.h>
28#include <asm/sibyte/bcm1480_int.h>
29#include <asm/sibyte/bcm1480_scd.h>
30
31#include <asm/sibyte/sb1250.h>
32
33#define IMR_IP2_VAL K_BCM1480_INT_MAP_I0
34#define IMR_IP3_VAL K_BCM1480_INT_MAP_I1
35#define IMR_IP4_VAL K_BCM1480_INT_MAP_I2
36
37/*
38 * The general purpose timer ticks at 1MHz independent if
39 * the rest of the system
40 */
41static void sibyte_set_mode(enum clock_event_mode mode,
42 struct clock_event_device *evt)
43{
44 unsigned int cpu = smp_processor_id();
45 void __iomem *cfg, *init;
46
47 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
48 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
49
50 switch (mode) {
51 case CLOCK_EVT_MODE_PERIODIC:
52 __raw_writeq(0, cfg);
53 __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, init);
54 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
55 cfg);
56 break;
57
58 case CLOCK_EVT_MODE_ONESHOT:
59 /* Stop the timer until we actually program a shot */
60 case CLOCK_EVT_MODE_SHUTDOWN:
61 __raw_writeq(0, cfg);
62 break;
63
64 case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */
65 case CLOCK_EVT_MODE_RESUME:
66 ;
67 }
68}
69
70static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd)
71{
72 unsigned int cpu = smp_processor_id();
73 void __iomem *cfg, *init;
74
75 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
76 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
77
78 __raw_writeq(delta - 1, init);
79 __raw_writeq(M_SCD_TIMER_ENABLE, cfg);
80
81 return 0;
82}
83
84static irqreturn_t sibyte_counter_handler(int irq, void *dev_id)
85{
86 unsigned int cpu = smp_processor_id();
87 struct clock_event_device *cd = dev_id;
88 void __iomem *cfg;
89 unsigned long tmode;
90
91 if (cd->mode == CLOCK_EVT_MODE_PERIODIC)
92 tmode = M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS;
93 else
94 tmode = 0;
95
96 /* ACK interrupt */
97 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
98 ____raw_writeq(tmode, cfg);
99
100 cd->event_handler(cd);
101
102 return IRQ_HANDLED;
103}
104
105static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
106static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
107static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
108
109void __cpuinit sb1480_clockevent_init(void)
110{
111 unsigned int cpu = smp_processor_id();
112 unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu;
113 struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
114 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
115 unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
116
117 BUG_ON(cpu > 3); /* Only have 4 general purpose timers */
118
119 sprintf(name, "bcm1480-counter-%d", cpu);
120 cd->name = name;
121 cd->features = CLOCK_EVT_FEAT_PERIODIC |
122 CLOCK_EVT_FEAT_ONESHOT;
123 clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
124 cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd);
125 cd->min_delta_ns = clockevent_delta2ns(1, cd);
126 cd->rating = 200;
127 cd->irq = irq;
128 cd->cpumask = cpumask_of_cpu(cpu);
129 cd->set_next_event = sibyte_next_event;
130 cd->set_mode = sibyte_set_mode;
131 clockevents_register_device(cd);
132
133 bcm1480_mask_irq(cpu, irq);
134
135 /*
136 * Map the timer interrupt to IP[4] of this cpu
137 */
138 __raw_writeq(IMR_IP4_VAL,
139 IOADDR(A_BCM1480_IMR_REGISTER(cpu,
140 R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + (irq << 3)));
141
142 bcm1480_unmask_irq(cpu, irq);
143
144 action->handler = sibyte_counter_handler;
145 action->flags = IRQF_DISABLED | IRQF_PERCPU;
146 action->name = name;
147 action->dev_id = cd;
148 setup_irq(irq, action);
149}
diff --git a/arch/mips/kernel/cevt-sb1250.c b/arch/mips/kernel/cevt-sb1250.c
new file mode 100644
index 00000000000..e2029d0fc39
--- /dev/null
+++ b/arch/mips/kernel/cevt-sb1250.c
@@ -0,0 +1,148 @@
1/*
2 * Copyright (C) 2000, 2001 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18#include <linux/clockchips.h>
19#include <linux/interrupt.h>
20#include <linux/percpu.h>
21
22#include <asm/addrspace.h>
23#include <asm/io.h>
24#include <asm/time.h>
25
26#include <asm/sibyte/sb1250.h>
27#include <asm/sibyte/sb1250_regs.h>
28#include <asm/sibyte/sb1250_int.h>
29#include <asm/sibyte/sb1250_scd.h>
30
31#define IMR_IP2_VAL K_INT_MAP_I0
32#define IMR_IP3_VAL K_INT_MAP_I1
33#define IMR_IP4_VAL K_INT_MAP_I2
34
35/*
36 * The general purpose timer ticks at 1MHz independent if
37 * the rest of the system
38 */
39static void sibyte_set_mode(enum clock_event_mode mode,
40 struct clock_event_device *evt)
41{
42 unsigned int cpu = smp_processor_id();
43 void __iomem *cfg, *init;
44
45 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
46 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
47
48 switch (mode) {
49 case CLOCK_EVT_MODE_PERIODIC:
50 __raw_writeq(0, cfg);
51 __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, init);
52 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
53 cfg);
54 break;
55
56 case CLOCK_EVT_MODE_ONESHOT:
57 /* Stop the timer until we actually program a shot */
58 case CLOCK_EVT_MODE_SHUTDOWN:
59 __raw_writeq(0, cfg);
60 break;
61
62 case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */
63 case CLOCK_EVT_MODE_RESUME:
64 ;
65 }
66}
67
68static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd)
69{
70 unsigned int cpu = smp_processor_id();
71 void __iomem *cfg, *init;
72
73 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
74 init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
75
76 __raw_writeq(delta - 1, init);
77 __raw_writeq(M_SCD_TIMER_ENABLE, cfg);
78
79 return 0;
80}
81
82static irqreturn_t sibyte_counter_handler(int irq, void *dev_id)
83{
84 unsigned int cpu = smp_processor_id();
85 struct clock_event_device *cd = dev_id;
86 void __iomem *cfg;
87 unsigned long tmode;
88
89 if (cd->mode == CLOCK_EVT_MODE_PERIODIC)
90 tmode = M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS;
91 else
92 tmode = 0;
93
94 /* ACK interrupt */
95 cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
96 ____raw_writeq(tmode, cfg);
97
98 cd->event_handler(cd);
99
100 return IRQ_HANDLED;
101}
102
103static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
104static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
105static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
106
107void __cpuinit sb1250_clockevent_init(void)
108{
109 unsigned int cpu = smp_processor_id();
110 unsigned int irq = K_INT_TIMER_0 + cpu;
111 struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
112 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
113 unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
114
115 /* Only have 4 general purpose timers, and we use last one as hpt */
116 BUG_ON(cpu > 2);
117
118 sprintf(name, "sb1250-counter-%d", cpu);
119 cd->name = name;
120 cd->features = CLOCK_EVT_FEAT_PERIODIC |
121 CLOCK_EVT_FEAT_ONESHOT;
122 clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
123 cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd);
124 cd->min_delta_ns = clockevent_delta2ns(1, cd);
125 cd->rating = 200;
126 cd->irq = irq;
127 cd->cpumask = cpumask_of_cpu(cpu);
128 cd->set_next_event = sibyte_next_event;
129 cd->set_mode = sibyte_set_mode;
130 clockevents_register_device(cd);
131
132 sb1250_mask_irq(cpu, irq);
133
134 /*
135 * Map the timer interrupt to IP[4] of this cpu
136 */
137 __raw_writeq(IMR_IP4_VAL,
138 IOADDR(A_IMR_REGISTER(cpu, R_IMR_INTERRUPT_MAP_BASE) +
139 (irq << 3)));
140
141 sb1250_unmask_irq(cpu, irq);
142
143 action->handler = sibyte_counter_handler;
144 action->flags = IRQF_DISABLED | IRQF_PERCPU;
145 action->name = name;
146 action->dev_id = cd;
147 setup_irq(irq, action);
148}
diff --git a/arch/mips/kernel/csrc-bcm1480.c b/arch/mips/kernel/csrc-bcm1480.c
new file mode 100644
index 00000000000..868745e7184
--- /dev/null
+++ b/arch/mips/kernel/csrc-bcm1480.c
@@ -0,0 +1,54 @@
1/*
2 * Copyright (C) 2000,2001,2004 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18#include <linux/clocksource.h>
19
20#include <asm/addrspace.h>
21#include <asm/io.h>
22#include <asm/time.h>
23
24#include <asm/sibyte/bcm1480_regs.h>
25#include <asm/sibyte/sb1250_regs.h>
26#include <asm/sibyte/bcm1480_int.h>
27#include <asm/sibyte/bcm1480_scd.h>
28
29#include <asm/sibyte/sb1250.h>
30
31static cycle_t bcm1480_hpt_read(void)
32{
33 return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
34}
35
36struct clocksource bcm1480_clocksource = {
37 .name = "zbbus-cycles",
38 .rating = 200,
39 .read = bcm1480_hpt_read,
40 .mask = CLOCKSOURCE_MASK(64),
41 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
42};
43
44void __init sb1480_clocksource_init(void)
45{
46 struct clocksource *cs = &bcm1480_clocksource;
47 unsigned int plldiv;
48 unsigned long zbbus;
49
50 plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG)));
51 zbbus = ((plldiv >> 1) * 50000000) + ((plldiv & 1) * 25000000);
52 clocksource_set_clock(cs, zbbus);
53 clocksource_register(cs);
54}
diff --git a/arch/mips/kernel/csrc-sb1250.c b/arch/mips/kernel/csrc-sb1250.c
new file mode 100644
index 00000000000..ebb16e66887
--- /dev/null
+++ b/arch/mips/kernel/csrc-sb1250.c
@@ -0,0 +1,70 @@
1/*
2 * Copyright (C) 2000, 2001 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18#include <linux/clocksource.h>
19
20#include <asm/addrspace.h>
21#include <asm/io.h>
22#include <asm/time.h>
23
24#include <asm/sibyte/sb1250.h>
25#include <asm/sibyte/sb1250_regs.h>
26#include <asm/sibyte/sb1250_int.h>
27#include <asm/sibyte/sb1250_scd.h>
28
29#define SB1250_HPT_NUM 3
30#define SB1250_HPT_VALUE M_SCD_TIMER_CNT /* max value */
31
32/*
33 * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over
34 * again.
35 */
36static cycle_t sb1250_hpt_read(void)
37{
38 unsigned int count;
39
40 count = G_SCD_TIMER_CNT(__raw_readq(IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CNT))));
41
42 return SB1250_HPT_VALUE - count;
43}
44
45struct clocksource bcm1250_clocksource = {
46 .name = "MIPS",
47 .rating = 200,
48 .read = sb1250_hpt_read,
49 .mask = CLOCKSOURCE_MASK(23),
50 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
51};
52
53void __init sb1250_clocksource_init(void)
54{
55 struct clocksource *cs = &bcm1250_clocksource;
56
57 /* Setup hpt using timer #3 but do not enable irq for it */
58 __raw_writeq(0,
59 IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
60 R_SCD_TIMER_CFG)));
61 __raw_writeq(SB1250_HPT_VALUE,
62 IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
63 R_SCD_TIMER_INIT)));
64 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
65 IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
66 R_SCD_TIMER_CFG)));
67
68 clocksource_set_clock(cs, V_SCD_TIMER_FREQ);
69 clocksource_register(cs);
70}
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c
index 5d9830df359..c2d497ceffd 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/i8253.c
@@ -12,8 +12,9 @@
12#include <asm/delay.h> 12#include <asm/delay.h>
13#include <asm/i8253.h> 13#include <asm/i8253.h>
14#include <asm/io.h> 14#include <asm/io.h>
15#include <asm/time.h>
15 16
16static DEFINE_SPINLOCK(i8253_lock); 17DEFINE_SPINLOCK(i8253_lock);
17 18
18/* 19/*
19 * Initialize the PIT timer. 20 * Initialize the PIT timer.
@@ -87,11 +88,10 @@ struct clock_event_device pit_clockevent = {
87 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 88 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
88 .set_mode = init_pit_timer, 89 .set_mode = init_pit_timer,
89 .set_next_event = pit_next_event, 90 .set_next_event = pit_next_event,
90 .shift = 32,
91 .irq = 0, 91 .irq = 0,
92}; 92};
93 93
94irqreturn_t timer_interrupt(int irq, void *dev_id) 94static irqreturn_t timer_interrupt(int irq, void *dev_id)
95{ 95{
96 pit_clockevent.event_handler(&pit_clockevent); 96 pit_clockevent.event_handler(&pit_clockevent);
97 97
@@ -111,19 +111,20 @@ static struct irqaction irq0 = {
111 */ 111 */
112void __init setup_pit_timer(void) 112void __init setup_pit_timer(void)
113{ 113{
114 struct clock_event_device *cd = &pit_clockevent;
115 unsigned int cpu = smp_processor_id();
116
114 /* 117 /*
115 * Start pit with the boot cpu mask and make it global after the 118 * Start pit with the boot cpu mask and make it global after the
116 * IO_APIC has been initialized. 119 * IO_APIC has been initialized.
117 */ 120 */
118 pit_clockevent.cpumask = cpumask_of_cpu(0); 121 cd->cpumask = cpumask_of_cpu(cpu);
119 pit_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, 32); 122 clockevent_set_clock(cd, CLOCK_TICK_RATE);
120 pit_clockevent.max_delta_ns = 123 cd->max_delta_ns = clockevent_delta2ns(0x7FFF, cd);
121 clockevent_delta2ns(0x7FFF, &pit_clockevent); 124 cd->min_delta_ns = clockevent_delta2ns(0xF, cd);
122 pit_clockevent.min_delta_ns = 125 clockevents_register_device(cd);
123 clockevent_delta2ns(0xF, &pit_clockevent); 126
124 clockevents_register_device(&pit_clockevent); 127 irq0.mask = cpumask_of_cpu(cpu);
125
126 irq0.mask = cpumask_of_cpu(0);
127 setup_irq(0, &irq0); 128 setup_irq(0, &irq0);
128} 129}
129 130
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index 27228f583da..3284b9b4eca 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -3,8 +3,7 @@
3 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net 3 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
4 * Copyright (c) 2003, 2004 Maciej W. Rozycki 4 * Copyright (c) 2003, 2004 Maciej W. Rozycki
5 * 5 *
6 * Common time service routines for MIPS machines. See 6 * Common time service routines for MIPS machines.
7 * Documentation/mips/time.README.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify it 8 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the 9 * under the terms of the GNU General Public License as published by the
@@ -18,28 +17,17 @@
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <linux/param.h> 19#include <linux/param.h>
21#include <linux/profile.h>
22#include <linux/time.h> 20#include <linux/time.h>
23#include <linux/timex.h> 21#include <linux/timex.h>
24#include <linux/smp.h> 22#include <linux/smp.h>
25#include <linux/kernel_stat.h>
26#include <linux/spinlock.h> 23#include <linux/spinlock.h>
27#include <linux/interrupt.h>
28#include <linux/module.h> 24#include <linux/module.h>
29#include <linux/kallsyms.h>
30 25
31#include <asm/bootinfo.h>
32#include <asm/cache.h>
33#include <asm/compiler.h>
34#include <asm/cpu.h>
35#include <asm/cpu-features.h> 26#include <asm/cpu-features.h>
36#include <asm/div64.h> 27#include <asm/div64.h>
37#include <asm/sections.h>
38#include <asm/smtc_ipi.h> 28#include <asm/smtc_ipi.h>
39#include <asm/time.h> 29#include <asm/time.h>
40 30
41#include <irq.h>
42
43/* 31/*
44 * forward reference 32 * forward reference
45 */ 33 */
@@ -63,14 +51,6 @@ int update_persistent_clock(struct timespec now)
63} 51}
64 52
65/* 53/*
66 * Null high precision timer functions for systems lacking one.
67 */
68static cycle_t null_hpt_read(void)
69{
70 return 0;
71}
72
73/*
74 * High precision timer functions for a R4k-compatible timer. 54 * High precision timer functions for a R4k-compatible timer.
75 */ 55 */
76static cycle_t c0_hpt_read(void) 56static cycle_t c0_hpt_read(void)
@@ -80,22 +60,6 @@ static cycle_t c0_hpt_read(void)
80 60
81int (*mips_timer_state)(void); 61int (*mips_timer_state)(void);
82 62
83/*
84 * local_timer_interrupt() does profiling and process accounting
85 * on a per-CPU basis.
86 *
87 * In UP mode, it is invoked from the (global) timer_interrupt.
88 *
89 * In SMP mode, it might invoked by per-CPU timer interrupt, or
90 * a broadcasted inter-processor interrupt which itself is triggered
91 * by the global timer interrupt.
92 */
93void local_timer_interrupt(int irq, void *dev_id)
94{
95 profile_tick(CPU_PROFILING);
96 update_process_times(user_mode(get_irq_regs()));
97}
98
99int null_perf_irq(void) 63int null_perf_irq(void)
100{ 64{
101 return 0; 65 return 0;
@@ -120,6 +84,13 @@ EXPORT_SYMBOL(perf_irq);
120 84
121unsigned int mips_hpt_frequency; 85unsigned int mips_hpt_frequency;
122 86
87static struct clocksource clocksource_mips = {
88 .name = "MIPS",
89 .read = c0_hpt_read,
90 .mask = CLOCKSOURCE_MASK(32),
91 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
92};
93
123static unsigned int __init calibrate_hpt(void) 94static unsigned int __init calibrate_hpt(void)
124{ 95{
125 cycle_t frequency, hpt_start, hpt_end, hpt_count, hz; 96 cycle_t frequency, hpt_start, hpt_end, hpt_count, hz;
@@ -162,12 +133,6 @@ static unsigned int __init calibrate_hpt(void)
162 return frequency >> log_2_loops; 133 return frequency >> log_2_loops;
163} 134}
164 135
165struct clocksource clocksource_mips = {
166 .name = "MIPS",
167 .mask = CLOCKSOURCE_MASK(32),
168 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
169};
170
171void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) 136void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock)
172{ 137{
173 u64 temp; 138 u64 temp;
@@ -203,9 +168,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
203 168
204static void __init init_mips_clocksource(void) 169static void __init init_mips_clocksource(void)
205{ 170{
206 if (!mips_hpt_frequency || clocksource_mips.read == null_hpt_read)
207 return;
208
209 /* Calclate a somewhat reasonable rating value */ 171 /* Calclate a somewhat reasonable rating value */
210 clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; 172 clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000;
211 173
@@ -227,7 +189,7 @@ void __init __weak plat_time_init(void)
227 * setup_irq calls and each clock_event_device should use its own 189 * setup_irq calls and each clock_event_device should use its own
228 * struct irqrequest. 190 * struct irqrequest.
229 */ 191 */
230void __init plat_timer_setup(struct irqaction *irq) 192void __init plat_timer_setup(void)
231{ 193{
232 BUG(); 194 BUG();
233} 195}
@@ -236,21 +198,8 @@ void __init time_init(void)
236{ 198{
237 plat_time_init(); 199 plat_time_init();
238 200
239 /* Choose appropriate high precision timer routines. */ 201 if (cpu_has_counter && (mips_hpt_frequency || mips_timer_state)) {
240 if (!cpu_has_counter && !clocksource_mips.read)
241 /* No high precision timer -- sorry. */
242 clocksource_mips.read = null_hpt_read;
243 else if (!mips_hpt_frequency && !mips_timer_state) {
244 /* A high precision timer of unknown frequency. */
245 if (!clocksource_mips.read)
246 /* No external high precision timer -- use R4k. */
247 clocksource_mips.read = c0_hpt_read;
248 } else {
249 /* We know counter frequency. Or we can get it. */ 202 /* We know counter frequency. Or we can get it. */
250 if (!clocksource_mips.read) {
251 /* No external high precision timer -- use R4k. */
252 clocksource_mips.read = c0_hpt_read;
253 }
254 if (!mips_hpt_frequency) 203 if (!mips_hpt_frequency)
255 mips_hpt_frequency = calibrate_hpt(); 204 mips_hpt_frequency = calibrate_hpt();
256 205
@@ -258,8 +207,8 @@ void __init time_init(void)
258 printk("Using %u.%03u MHz high precision timer.\n", 207 printk("Using %u.%03u MHz high precision timer.\n",
259 ((mips_hpt_frequency + 500) / 1000) / 1000, 208 ((mips_hpt_frequency + 500) / 1000) / 1000,
260 ((mips_hpt_frequency + 500) / 1000) % 1000); 209 ((mips_hpt_frequency + 500) / 1000) % 1000);
210 init_mips_clocksource();
261 } 211 }
262 212
263 init_mips_clocksource();
264 mips_clockevent_init(); 213 mips_clockevent_init();
265} 214}
diff --git a/arch/mips/qemu/q-irq.c b/arch/mips/qemu/q-irq.c
index 4681757460a..11f98476788 100644
--- a/arch/mips/qemu/q-irq.c
+++ b/arch/mips/qemu/q-irq.c
@@ -1,4 +1,5 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/interrupt.h>
2#include <linux/linkage.h> 3#include <linux/linkage.h>
3 4
4#include <asm/i8259.h> 5#include <asm/i8259.h>
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index dc59c3b708e..08d45369be4 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -131,7 +131,7 @@ static struct irq_chip rt_irq_type = {
131static int rt_next_event(unsigned long delta, struct clock_event_device *evt) 131static int rt_next_event(unsigned long delta, struct clock_event_device *evt)
132{ 132{
133 unsigned int cpu = smp_processor_id(); 133 unsigned int cpu = smp_processor_id();
134 int slice putoslice(cpu); 134 int slice = cputoslice(cpu);
135 unsigned long cnt; 135 unsigned long cnt;
136 136
137 cnt = LOCAL_HUB_L(PI_RT_COUNT); 137 cnt = LOCAL_HUB_L(PI_RT_COUNT);
@@ -169,7 +169,7 @@ static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id)
169 /* 169 /*
170 * Ack 170 * Ack
171 */ 171 */
172 LOCAL_HUB_S(PI_RT_PEND_A + PI_COUNT_OFFSET * slice, cnt); 172 LOCAL_HUB_S(PI_RT_PEND_A + PI_COUNT_OFFSET * slice, 0);
173 cd->event_handler(cd); 173 cd->event_handler(cd);
174 174
175 return IRQ_HANDLED; 175 return IRQ_HANDLED;
diff --git a/arch/mips/sgi-ip32/ip32-platform.c b/arch/mips/sgi-ip32/ip32-platform.c
index 7309e48d163..77febd68fcd 100644
--- a/arch/mips/sgi-ip32/ip32-platform.c
+++ b/arch/mips/sgi-ip32/ip32-platform.c
@@ -42,7 +42,7 @@ static struct platform_device uart8250_device = {
42static int __init uart8250_init(void) 42static int __init uart8250_init(void)
43{ 43{
44 uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1; 44 uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1;
45 uart8250_data[1].membase = (void __iomem *) &mace->isa.serial1; 45 uart8250_data[1].membase = (void __iomem *) &mace->isa.serial2;
46 46
47 return platform_device_register(&uart8250_device); 47 return platform_device_register(&uart8250_device);
48} 48}
diff --git a/arch/mips/sibyte/Kconfig b/arch/mips/sibyte/Kconfig
index e8fb880272b..366b19d33f7 100644
--- a/arch/mips/sibyte/Kconfig
+++ b/arch/mips/sibyte/Kconfig
@@ -1,5 +1,7 @@
1config SIBYTE_SB1250 1config SIBYTE_SB1250
2 bool 2 bool
3 select CEVT_SB1250
4 select CSRC_SB1250
3 select HW_HAS_PCI 5 select HW_HAS_PCI
4 select IRQ_CPU 6 select IRQ_CPU
5 select SIBYTE_ENABLE_LDT_IF_PCI 7 select SIBYTE_ENABLE_LDT_IF_PCI
@@ -9,6 +11,8 @@ config SIBYTE_SB1250
9 11
10config SIBYTE_BCM1120 12config SIBYTE_BCM1120
11 bool 13 bool
14 select CEVT_SB1250
15 select CSRC_SB1250
12 select IRQ_CPU 16 select IRQ_CPU
13 select SIBYTE_BCM112X 17 select SIBYTE_BCM112X
14 select SIBYTE_HAS_ZBUS_PROFILING 18 select SIBYTE_HAS_ZBUS_PROFILING
@@ -16,6 +20,8 @@ config SIBYTE_BCM1120
16 20
17config SIBYTE_BCM1125 21config SIBYTE_BCM1125
18 bool 22 bool
23 select CEVT_SB1250
24 select CSRC_SB1250
19 select HW_HAS_PCI 25 select HW_HAS_PCI
20 select IRQ_CPU 26 select IRQ_CPU
21 select SIBYTE_BCM112X 27 select SIBYTE_BCM112X
@@ -24,6 +30,8 @@ config SIBYTE_BCM1125
24 30
25config SIBYTE_BCM1125H 31config SIBYTE_BCM1125H
26 bool 32 bool
33 select CEVT_SB1250
34 select CSRC_SB1250
27 select HW_HAS_PCI 35 select HW_HAS_PCI
28 select IRQ_CPU 36 select IRQ_CPU
29 select SIBYTE_BCM112X 37 select SIBYTE_BCM112X
@@ -33,12 +41,16 @@ config SIBYTE_BCM1125H
33 41
34config SIBYTE_BCM112X 42config SIBYTE_BCM112X
35 bool 43 bool
44 select CEVT_SB1250
45 select CSRC_SB1250
36 select IRQ_CPU 46 select IRQ_CPU
37 select SIBYTE_SB1xxx_SOC 47 select SIBYTE_SB1xxx_SOC
38 select SIBYTE_HAS_ZBUS_PROFILING 48 select SIBYTE_HAS_ZBUS_PROFILING
39 49
40config SIBYTE_BCM1x80 50config SIBYTE_BCM1x80
41 bool 51 bool
52 select CEVT_BCM1480
53 select CSRC_BCM1480
42 select HW_HAS_PCI 54 select HW_HAS_PCI
43 select IRQ_CPU 55 select IRQ_CPU
44 select SIBYTE_HAS_ZBUS_PROFILING 56 select SIBYTE_HAS_ZBUS_PROFILING
@@ -47,6 +59,8 @@ config SIBYTE_BCM1x80
47 59
48config SIBYTE_BCM1x55 60config SIBYTE_BCM1x55
49 bool 61 bool
62 select CEVT_BCM1480
63 select CSRC_BCM1480
50 select HW_HAS_PCI 64 select HW_HAS_PCI
51 select IRQ_CPU 65 select IRQ_CPU
52 select SIBYTE_SB1xxx_SOC 66 select SIBYTE_SB1xxx_SOC
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
index 61790c4bfb6..e28d626255a 100644
--- a/arch/mips/sibyte/bcm1480/irq.c
+++ b/arch/mips/sibyte/bcm1480/irq.c
@@ -265,21 +265,6 @@ void __init init_bcm1480_irqs(void)
265 } 265 }
266} 266}
267 267
268
269static irqreturn_t bcm1480_dummy_handler(int irq, void *dev_id)
270{
271 return IRQ_NONE;
272}
273
274static struct irqaction bcm1480_dummy_action = {
275 .handler = bcm1480_dummy_handler,
276 .flags = 0,
277 .mask = CPU_MASK_NONE,
278 .name = "bcm1480-private",
279 .next = NULL,
280 .dev_id = 0
281};
282
283/* 268/*
284 * init_IRQ is called early in the boot sequence from init/main.c. It 269 * init_IRQ is called early in the boot sequence from init/main.c. It
285 * is responsible for setting up the interrupt mapper and installing the 270 * is responsible for setting up the interrupt mapper and installing the
@@ -308,7 +293,6 @@ static struct irqaction bcm1480_dummy_action = {
308 293
309void __init arch_init_irq(void) 294void __init arch_init_irq(void)
310{ 295{
311
312 unsigned int i, cpu; 296 unsigned int i, cpu;
313 u64 tmp; 297 u64 tmp;
314 unsigned int imask = STATUSF_IP4 | STATUSF_IP3 | STATUSF_IP2 | 298 unsigned int imask = STATUSF_IP4 | STATUSF_IP3 | STATUSF_IP2 |
diff --git a/arch/mips/sibyte/bcm1480/time.c b/arch/mips/sibyte/bcm1480/time.c
index bbf19bfabcc..1680a68952a 100644
--- a/arch/mips/sibyte/bcm1480/time.c
+++ b/arch/mips/sibyte/bcm1480/time.c
@@ -15,163 +15,10 @@
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18#include <linux/clockchips.h> 18#include <linux/init.h>
19#include <linux/interrupt.h>
20#include <linux/irq.h>
21#include <linux/percpu.h>
22#include <linux/spinlock.h>
23 19
24#include <asm/addrspace.h> 20extern void sb1480_clockevent_init(void);
25#include <asm/time.h> 21extern void sb1480_clocksource_init(void);
26#include <asm/io.h>
27
28#include <asm/sibyte/bcm1480_regs.h>
29#include <asm/sibyte/sb1250_regs.h>
30#include <asm/sibyte/bcm1480_int.h>
31#include <asm/sibyte/bcm1480_scd.h>
32
33#include <asm/sibyte/sb1250.h>
34
35
36#define IMR_IP2_VAL K_BCM1480_INT_MAP_I0
37#define IMR_IP3_VAL K_BCM1480_INT_MAP_I1
38#define IMR_IP4_VAL K_BCM1480_INT_MAP_I2
39
40/*
41 * The general purpose timer ticks at 1MHz independent if
42 * the rest of the system
43 */
44static void sibyte_set_mode(enum clock_event_mode mode,
45 struct clock_event_device *evt)
46{
47 unsigned int cpu = smp_processor_id();
48 void __iomem *timer_cfg, *timer_init;
49
50 timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
51 timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
52
53 switch (mode) {
54 case CLOCK_EVT_MODE_PERIODIC:
55 __raw_writeq(0, timer_cfg);
56 __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, timer_init);
57 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
58 timer_cfg);
59 break;
60
61 case CLOCK_EVT_MODE_ONESHOT:
62 /* Stop the timer until we actually program a shot */
63 case CLOCK_EVT_MODE_SHUTDOWN:
64 __raw_writeq(0, timer_cfg);
65 break;
66
67 case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */
68 case CLOCK_EVT_MODE_RESUME:
69 ;
70 }
71}
72
73static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd)
74{
75 unsigned int cpu = smp_processor_id();
76 void __iomem *timer_init;
77 unsigned int cnt;
78 int res;
79
80 timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
81 cnt = __raw_readq(timer_init);
82 cnt += delta;
83 __raw_writeq(cnt, timer_init);
84 res = ((long)(__raw_readq(timer_init) - cnt ) > 0) ? -ETIME : 0;
85
86 return res;
87}
88
89static irqreturn_t sibyte_counter_handler(int irq, void *dev_id)
90{
91 unsigned int cpu = smp_processor_id();
92 struct clock_event_device *cd = dev_id;
93 void __iomem *timer_cfg;
94
95 timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
96
97 /* Reset the timer */
98 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
99 timer_cfg);
100 cd->event_handler(cd);
101
102 return IRQ_HANDLED;
103}
104
105static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
106static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
107static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
108
109void __cpuinit sb1480_clockevent_init(void)
110{
111 unsigned int cpu = smp_processor_id();
112 unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu;
113 struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
114 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
115 unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
116
117 BUG_ON(cpu > 3); /* Only have 4 general purpose timers */
118
119 sprintf(name, "bcm1480-counter %d", cpu);
120 cd->name = name;
121 cd->features = CLOCK_EVT_FEAT_PERIODIC |
122 CLOCK_EVT_FEAT_ONESHOT;
123 clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
124 cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd);
125 cd->min_delta_ns = clockevent_delta2ns(1, cd);
126 cd->rating = 200;
127 cd->irq = irq;
128 cd->cpumask = cpumask_of_cpu(cpu);
129 cd->set_next_event = sibyte_next_event;
130 cd->set_mode = sibyte_set_mode;
131 clockevents_register_device(cd);
132
133 bcm1480_mask_irq(cpu, irq);
134
135 /*
136 * Map timer interrupt to IP[4] of this cpu
137 */
138 __raw_writeq(IMR_IP4_VAL,
139 IOADDR(A_BCM1480_IMR_REGISTER(cpu,
140 R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + (irq << 3)));
141
142 bcm1480_unmask_irq(cpu, irq);
143
144 action->handler = sibyte_counter_handler;
145 action->flags = IRQF_DISABLED | IRQF_PERCPU;
146 action->name = name;
147 action->dev_id = cd;
148 setup_irq(irq, action);
149}
150
151static cycle_t bcm1480_hpt_read(void)
152{
153 return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
154}
155
156struct clocksource bcm1480_clocksource = {
157 .name = "zbbus-cycles",
158 .rating = 200,
159 .read = bcm1480_hpt_read,
160 .mask = CLOCKSOURCE_MASK(64),
161 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
162};
163
164void __init sb1480_clocksource_init(void)
165{
166 struct clocksource *cs = &bcm1480_clocksource;
167 unsigned int plldiv;
168 unsigned long zbbus;
169
170 plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG)));
171 zbbus = ((plldiv >> 1) * 50000000) + ((plldiv & 1) * 25000000);
172 clocksource_set_clock(cs, zbbus);
173 clocksource_register(cs);
174}
175 22
176void __init plat_time_init(void) 23void __init plat_time_init(void)
177{ 24{
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c
index 52d18fc91f3..eac9065ffe0 100644
--- a/arch/mips/sibyte/sb1250/irq.c
+++ b/arch/mips/sibyte/sb1250/irq.c
@@ -236,20 +236,6 @@ void __init init_sb1250_irqs(void)
236} 236}
237 237
238 238
239static irqreturn_t sb1250_dummy_handler(int irq, void *dev_id)
240{
241 return IRQ_NONE;
242}
243
244static struct irqaction sb1250_dummy_action = {
245 .handler = sb1250_dummy_handler,
246 .flags = 0,
247 .mask = CPU_MASK_NONE,
248 .name = "sb1250-private",
249 .next = NULL,
250 .dev_id = 0
251};
252
253/* 239/*
254 * arch_init_irq is called early in the boot sequence from init/main.c via 240 * arch_init_irq is called early in the boot sequence from init/main.c via
255 * init_IRQ. It is responsible for setting up the interrupt mapper and 241 * init_IRQ. It is responsible for setting up the interrupt mapper and
diff --git a/arch/mips/sibyte/sb1250/time.c b/arch/mips/sibyte/sb1250/time.c
index 95ad34e3fba..68337bf7a5a 100644
--- a/arch/mips/sibyte/sb1250/time.c
+++ b/arch/mips/sibyte/sb1250/time.c
@@ -15,195 +15,10 @@
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18#include <linux/init.h>
18 19
19/* 20extern void sb1250_clocksource_init(void);
20 * These are routines to set up and handle interrupts from the 21extern void sb1250_clockevent_init(void);
21 * sb1250 general purpose timer 0. We're using the timer as a
22 * system clock, so we set it up to run at 100 Hz. On every
23 * interrupt, we update our idea of what the time of day is,
24 * then call do_timer() in the architecture-independent kernel
25 * code to do general bookkeeping (e.g. update jiffies, run
26 * bottom halves, etc.)
27 */
28#include <linux/clockchips.h>
29#include <linux/interrupt.h>
30#include <linux/sched.h>
31#include <linux/spinlock.h>
32#include <linux/kernel_stat.h>
33
34#include <asm/irq.h>
35#include <asm/addrspace.h>
36#include <asm/time.h>
37#include <asm/io.h>
38
39#include <asm/sibyte/sb1250.h>
40#include <asm/sibyte/sb1250_regs.h>
41#include <asm/sibyte/sb1250_int.h>
42#include <asm/sibyte/sb1250_scd.h>
43
44
45#define IMR_IP2_VAL K_INT_MAP_I0
46#define IMR_IP3_VAL K_INT_MAP_I1
47#define IMR_IP4_VAL K_INT_MAP_I2
48
49#define SB1250_HPT_NUM 3
50#define SB1250_HPT_VALUE M_SCD_TIMER_CNT /* max value */
51
52
53/*
54 * The general purpose timer ticks at 1 Mhz independent if
55 * the rest of the system
56 */
57static void sibyte_set_mode(enum clock_event_mode mode,
58 struct clock_event_device *evt)
59{
60 unsigned int cpu = smp_processor_id();
61 void __iomem *timer_cfg, *timer_init;
62
63 timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
64 timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
65
66 switch(mode) {
67 case CLOCK_EVT_MODE_PERIODIC:
68 __raw_writeq(0, timer_cfg);
69 __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, timer_init);
70 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
71 timer_cfg);
72 break;
73
74 case CLOCK_EVT_MODE_ONESHOT:
75 /* Stop the timer until we actually program a shot */
76 case CLOCK_EVT_MODE_SHUTDOWN:
77 __raw_writeq(0, timer_cfg);
78 break;
79
80 case CLOCK_EVT_MODE_UNUSED: /* shuddup gcc */
81 case CLOCK_EVT_MODE_RESUME:
82 ;
83 }
84}
85
86static int
87sibyte_next_event(unsigned long delta, struct clock_event_device *evt)
88{
89 unsigned int cpu = smp_processor_id();
90 void __iomem *timer_cfg, *timer_init;
91
92 timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
93 timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
94
95 __raw_writeq(0, timer_cfg);
96 __raw_writeq(delta, timer_init);
97 __raw_writeq(M_SCD_TIMER_ENABLE, timer_cfg);
98
99 return 0;
100}
101
102static irqreturn_t sibyte_counter_handler(int irq, void *dev_id)
103{
104 unsigned int cpu = smp_processor_id();
105 struct clock_event_device *cd = dev_id;
106
107 /* ACK interrupt */
108 ____raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
109 IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)));
110
111 cd->event_handler(cd);
112
113 return IRQ_HANDLED;
114}
115
116static struct irqaction sibyte_irqaction = {
117 .handler = sibyte_counter_handler,
118 .flags = IRQF_DISABLED | IRQF_PERCPU,
119 .name = "timer",
120};
121
122static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
123static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
124static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
125
126void __cpuinit sb1250_clockevent_init(void)
127{
128 unsigned int cpu = smp_processor_id();
129 unsigned int irq = K_INT_TIMER_0 + cpu;
130 struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
131 struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
132 unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
133
134 /* Only have 4 general purpose timers, and we use last one as hpt */
135 BUG_ON(cpu > 2);
136
137 sprintf(name, "bcm1480-counter %d", cpu);
138 cd->name = name;
139 cd->features = CLOCK_EVT_FEAT_PERIODIC |
140 CLOCK_EVT_FEAT_ONESHOT;
141 clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
142 cd->max_delta_ns = clockevent_delta2ns(0x7fffff, cd);
143 cd->min_delta_ns = clockevent_delta2ns(1, cd);
144 cd->rating = 200;
145 cd->irq = irq;
146 cd->cpumask = cpumask_of_cpu(cpu);
147 cd->set_next_event = sibyte_next_event;
148 cd->set_mode = sibyte_set_mode;
149 clockevents_register_device(cd);
150
151 sb1250_mask_irq(cpu, irq);
152
153 /* Map the timer interrupt to ip[4] of this cpu */
154 __raw_writeq(IMR_IP4_VAL,
155 IOADDR(A_IMR_REGISTER(cpu, R_IMR_INTERRUPT_MAP_BASE) +
156 (irq << 3)));
157 cd->cpumask = cpumask_of_cpu(0);
158
159 sb1250_unmask_irq(cpu, irq);
160
161 action->handler = sibyte_counter_handler;
162 action->flags = IRQF_DISABLED | IRQF_PERCPU;
163 action->name = name;
164 action->dev_id = cd;
165 setup_irq(irq, &sibyte_irqaction);
166}
167
168/*
169 * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over
170 * again.
171 */
172static cycle_t sb1250_hpt_read(void)
173{
174 unsigned int count;
175
176 count = G_SCD_TIMER_CNT(__raw_readq(IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CNT))));
177
178 return SB1250_HPT_VALUE - count;
179}
180
181struct clocksource bcm1250_clocksource = {
182 .name = "MIPS",
183 .rating = 200,
184 .read = sb1250_hpt_read,
185 .mask = CLOCKSOURCE_MASK(23),
186 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
187};
188
189void __init sb1250_clocksource_init(void)
190{
191 struct clocksource *cs = &bcm1250_clocksource;
192
193 /* Setup hpt using timer #3 but do not enable irq for it */
194 __raw_writeq(0,
195 IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
196 R_SCD_TIMER_CFG)));
197 __raw_writeq(SB1250_HPT_VALUE,
198 IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
199 R_SCD_TIMER_INIT)));
200 __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
201 IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
202 R_SCD_TIMER_CFG)));
203
204 clocksource_set_clock(cs, V_SCD_TIMER_FREQ);
205 clocksource_register(cs);
206}
207 22
208void __init plat_time_init(void) 23void __init plat_time_init(void)
209{ 24{
diff --git a/arch/mips/sni/time.c b/arch/mips/sni/time.c
index 60bc62ef093..6f339af08d2 100644
--- a/arch/mips/sni/time.c
+++ b/arch/mips/sni/time.c
@@ -1,6 +1,7 @@
1#include <linux/types.h> 1#include <linux/types.h>
2#include <linux/interrupt.h> 2#include <linux/interrupt.h>
3#include <linux/time.h> 3#include <linux/time.h>
4#include <linux/clockchips.h>
4 5
5#include <asm/i8253.h> 6#include <asm/i8253.h>
6#include <asm/sni.h> 7#include <asm/sni.h>
@@ -80,7 +81,7 @@ static void __init sni_a20r_timer_setup(void)
80 unsigned int cpu = smp_processor_id(); 81 unsigned int cpu = smp_processor_id();
81 82
82 cd->cpumask = cpumask_of_cpu(cpu); 83 cd->cpumask = cpumask_of_cpu(cpu);
83 84 clockevents_register_device(cd);
84 action->dev_id = cd; 85 action->dev_id = cd;
85 setup_irq(SNI_A20R_IRQ_TIMER, &a20r_irqaction); 86 setup_irq(SNI_A20R_IRQ_TIMER, &a20r_irqaction);
86} 87}
@@ -169,8 +170,6 @@ void __init plat_time_init(void)
169 170
170 mips_hpt_frequency = r4k_tick * HZ; 171 mips_hpt_frequency = r4k_tick * HZ;
171 172
172 setup_pit_timer();
173
174 switch (sni_brd_type) { 173 switch (sni_brd_type) {
175 case SNI_BRD_10: 174 case SNI_BRD_10:
176 case SNI_BRD_10NEW: 175 case SNI_BRD_10NEW:
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 247f8a65e73..22a3eb38438 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -182,9 +182,7 @@ config CPU_HAS_IPR_IRQ
182 bool 182 bool
183 183
184config CPU_HAS_SR_RB 184config CPU_HAS_SR_RB
185 bool "CPU has SR.RB" 185 bool
186 depends on CPU_SH3 || CPU_SH4
187 default y
188 help 186 help
189 This will enable the use of SR.RB register bank usage. Processors 187 This will enable the use of SR.RB register bank usage. Processors
190 that are lacking this bit must have another method in place for 188 that are lacking this bit must have another method in place for
@@ -291,9 +289,7 @@ config SH_DREAMCAST
291 depends on CPU_SUBTYPE_SH7091 289 depends on CPU_SUBTYPE_SH7091
292 help 290 help
293 Select Dreamcast if configuring for a SEGA Dreamcast. 291 Select Dreamcast if configuring for a SEGA Dreamcast.
294 More information at 292 More information at <http://www.linux-sh.org>
295 <http://www.m17n.org/linux-sh/dreamcast/>. There is a
296 Dreamcast project is at <http://linuxdc.sourceforge.net/>.
297 293
298config SH_MPC1211 294config SH_MPC1211
299 bool "Interface MPC1211" 295 bool "Interface MPC1211"
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index b507b501f0c..ab2f9f3c354 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -86,6 +86,14 @@ config 4KSTACKS
86 on the VM subsystem for higher order allocations. This option 86 on the VM subsystem for higher order allocations. This option
87 will also use IRQ stacks to compensate for the reduced stackspace. 87 will also use IRQ stacks to compensate for the reduced stackspace.
88 88
89config IRQSTACKS
90 bool "Use separate kernel stacks when processing interrupts"
91 depends on DEBUG_KERNEL
92 help
93 If you say Y here the kernel will use separate kernel stacks
94 for handling hard and soft interrupts. This can help avoid
95 overflowing the process kernel stacks.
96
89config SH_KGDB 97config SH_KGDB
90 bool "Include KGDB kernel debugger" 98 bool "Include KGDB kernel debugger"
91 select FRAME_POINTER 99 select FRAME_POINTER
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 408342b175c..e189fae8b60 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -66,7 +66,7 @@ cflags-y += $(isaflags-y) -ffreestanding
66cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \ 66cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \
67 $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g') 67 $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
68 68
69OBJCOPYFLAGS := -O binary -R .note -R .comment -R .stab -R .stabstr -S 69OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -R .stab -R .stabstr -S
70 70
71# 71#
72# arch/sh/defconfig doesn't reflect any real hardware, and as such should 72# arch/sh/defconfig doesn't reflect any real hardware, and as such should
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index afe9de73666..0fdc0bc1914 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -16,6 +16,8 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/pata_platform.h> 18#include <linux/pata_platform.h>
19#include <linux/types.h>
20#include <net/ax88796.h>
19#include <asm/machvec.h> 21#include <asm/machvec.h>
20#include <asm/r7780rp.h> 22#include <asm/r7780rp.h>
21#include <asm/clock.h> 23#include <asm/clock.h>
@@ -136,11 +138,50 @@ static struct platform_device heartbeat_device = {
136 .resource = heartbeat_resources, 138 .resource = heartbeat_resources,
137}; 139};
138 140
141static struct ax_plat_data ax88796_platdata = {
142 .flags = AXFLG_HAS_93CX6,
143 .wordlength = 2,
144 .dcr_val = 0x1,
145 .rcr_val = 0x40,
146};
147
148static struct resource ax88796_resources[] = {
149 {
150#ifdef CONFIG_SH_R7780RP
151 .start = 0xa5800400,
152 .end = 0xa5800400 + (0x20 * 0x2) - 1,
153#else
154 .start = 0xa4100400,
155 .end = 0xa4100400 + (0x20 * 0x2) - 1,
156#endif
157 .flags = IORESOURCE_MEM,
158 },
159 {
160 .start = IRQ_AX88796,
161 .end = IRQ_AX88796,
162 .flags = IORESOURCE_IRQ,
163 },
164};
165
166static struct platform_device ax88796_device = {
167 .name = "ax88796",
168 .id = 0,
169
170 .dev = {
171 .platform_data = &ax88796_platdata,
172 },
173
174 .num_resources = ARRAY_SIZE(ax88796_resources),
175 .resource = ax88796_resources,
176};
177
178
139static struct platform_device *r7780rp_devices[] __initdata = { 179static struct platform_device *r7780rp_devices[] __initdata = {
140 &r8a66597_usb_host_device, 180 &r8a66597_usb_host_device,
141 &m66592_usb_peripheral_device, 181 &m66592_usb_peripheral_device,
142 &cf_ide_device, 182 &cf_ide_device,
143 &heartbeat_device, 183 &heartbeat_device,
184 &ax88796_device,
144}; 185};
145 186
146static int __init r7780rp_devices_setup(void) 187static int __init r7780rp_devices_setup(void)
@@ -183,6 +224,34 @@ static void r7780rp_power_off(void)
183 ctrl_outw(0x0001, PA_POFF); 224 ctrl_outw(0x0001, PA_POFF);
184} 225}
185 226
227static inline unsigned char is_ide_ioaddr(unsigned long addr)
228{
229 return ((cf_ide_resources[0].start <= addr &&
230 addr <= cf_ide_resources[0].end) ||
231 (cf_ide_resources[1].start <= addr &&
232 addr <= cf_ide_resources[1].end));
233}
234
235void highlander_writeb(u8 b, void __iomem *addr)
236{
237 unsigned long tmp = (unsigned long __force)addr;
238
239 if (is_ide_ioaddr(tmp))
240 ctrl_outw((u16)b, tmp);
241 else
242 ctrl_outb(b, tmp);
243}
244
245u8 highlander_readb(void __iomem *addr)
246{
247 unsigned long tmp = (unsigned long __force)addr;
248
249 if (is_ide_ioaddr(tmp))
250 return ctrl_inw(tmp) & 0xff;
251 else
252 return ctrl_inb(tmp);
253}
254
186/* 255/*
187 * Initialize the board 256 * Initialize the board
188 */ 257 */
@@ -267,4 +336,6 @@ static struct sh_machine_vector mv_highlander __initmv = {
267 .mv_setup = highlander_setup, 336 .mv_setup = highlander_setup,
268 .mv_init_irq = highlander_init_irq, 337 .mv_init_irq = highlander_init_irq,
269 .mv_irq_demux = highlander_irq_demux, 338 .mv_irq_demux = highlander_irq_demux,
339 .mv_readb = highlander_readb,
340 .mv_writeb = highlander_writeb,
270}; 341};
diff --git a/arch/sh/boards/se/7722/setup.c b/arch/sh/boards/se/7722/setup.c
index 03b63457e17..20f064083cc 100644
--- a/arch/sh/boards/se/7722/setup.c
+++ b/arch/sh/boards/se/7722/setup.c
@@ -103,8 +103,8 @@ static void __init se7722_setup(char **cmdline_p)
103 103
104 ctrl_outl(0x00051001, MSTPCR0); 104 ctrl_outl(0x00051001, MSTPCR0);
105 ctrl_outl(0x00000000, MSTPCR1); 105 ctrl_outl(0x00000000, MSTPCR1);
106 /* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC */ 106 /* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC, USB */
107 ctrl_outl(0xffffbfC0, MSTPCR2); 107 ctrl_outl(0xffffb7c0, MSTPCR2);
108 108
109 ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */ 109 ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */
110 ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */ 110 ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */
diff --git a/arch/sh/configs/r7785rp_defconfig b/arch/sh/configs/r7785rp_defconfig
index 5c29338532d..158e03f0b1e 100644
--- a/arch/sh/configs/r7785rp_defconfig
+++ b/arch/sh/configs/r7785rp_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22-rc4 3# Linux kernel version: 2.6.24-rc1
4# Thu Jul 12 12:33:15 2007 4# Fri Nov 2 14:30:49 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -13,39 +13,40 @@ CONFIG_GENERIC_IRQ_PROBE=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
14CONFIG_GENERIC_TIME=y 14CONFIG_GENERIC_TIME=y
15CONFIG_GENERIC_CLOCKEVENTS=y 15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_SYS_SUPPORTS_NUMA=y
16CONFIG_SYS_SUPPORTS_PCI=y 17CONFIG_SYS_SUPPORTS_PCI=y
17CONFIG_STACKTRACE_SUPPORT=y 18CONFIG_STACKTRACE_SUPPORT=y
18CONFIG_LOCKDEP_SUPPORT=y 19CONFIG_LOCKDEP_SUPPORT=y
19# CONFIG_ARCH_HAS_ILOG2_U32 is not set 20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
20# CONFIG_ARCH_HAS_ILOG2_U64 is not set 21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_ARCH_NO_VIRT_TO_BUS=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22 24
23# 25#
24# Code maturity level options 26# General setup
25# 27#
26CONFIG_EXPERIMENTAL=y 28CONFIG_EXPERIMENTAL=y
27CONFIG_BROKEN_ON_SMP=y 29CONFIG_BROKEN_ON_SMP=y
28CONFIG_LOCK_KERNEL=y 30CONFIG_LOCK_KERNEL=y
29CONFIG_INIT_ENV_ARG_LIMIT=32 31CONFIG_INIT_ENV_ARG_LIMIT=32
30
31#
32# General setup
33#
34CONFIG_LOCALVERSION="" 32CONFIG_LOCALVERSION=""
35CONFIG_LOCALVERSION_AUTO=y 33CONFIG_LOCALVERSION_AUTO=y
36CONFIG_SWAP=y 34CONFIG_SWAP=y
37CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
38# CONFIG_IPC_NS is not set
39CONFIG_SYSVIPC_SYSCTL=y 36CONFIG_SYSVIPC_SYSCTL=y
40# CONFIG_POSIX_MQUEUE is not set 37# CONFIG_POSIX_MQUEUE is not set
41CONFIG_BSD_PROCESS_ACCT=y 38CONFIG_BSD_PROCESS_ACCT=y
42# CONFIG_BSD_PROCESS_ACCT_V3 is not set 39# CONFIG_BSD_PROCESS_ACCT_V3 is not set
43# CONFIG_TASKSTATS is not set 40# CONFIG_TASKSTATS is not set
44# CONFIG_UTS_NS is not set 41# CONFIG_USER_NS is not set
45# CONFIG_AUDIT is not set 42# CONFIG_AUDIT is not set
46CONFIG_IKCONFIG=y 43CONFIG_IKCONFIG=y
47CONFIG_IKCONFIG_PROC=y 44CONFIG_IKCONFIG_PROC=y
48CONFIG_LOG_BUF_SHIFT=14 45CONFIG_LOG_BUF_SHIFT=14
46# CONFIG_CGROUPS is not set
47CONFIG_FAIR_GROUP_SCHED=y
48CONFIG_FAIR_USER_SCHED=y
49# CONFIG_FAIR_CGROUP_SCHED is not set
49# CONFIG_SYSFS_DEPRECATED is not set 50# CONFIG_SYSFS_DEPRECATED is not set
50# CONFIG_RELAY is not set 51# CONFIG_RELAY is not set
51# CONFIG_BLK_DEV_INITRD is not set 52# CONFIG_BLK_DEV_INITRD is not set
@@ -66,7 +67,6 @@ CONFIG_BASE_FULL=y
66CONFIG_ANON_INODES=y 67CONFIG_ANON_INODES=y
67# CONFIG_EPOLL is not set 68# CONFIG_EPOLL is not set
68CONFIG_SIGNALFD=y 69CONFIG_SIGNALFD=y
69CONFIG_TIMERFD=y
70CONFIG_EVENTFD=y 70CONFIG_EVENTFD=y
71CONFIG_SHMEM=y 71CONFIG_SHMEM=y
72CONFIG_VM_EVENT_COUNTERS=y 72CONFIG_VM_EVENT_COUNTERS=y
@@ -75,24 +75,17 @@ CONFIG_SLAB=y
75# CONFIG_SLOB is not set 75# CONFIG_SLOB is not set
76# CONFIG_TINY_SHMEM is not set 76# CONFIG_TINY_SHMEM is not set
77CONFIG_BASE_SMALL=0 77CONFIG_BASE_SMALL=0
78
79#
80# Loadable module support
81#
82CONFIG_MODULES=y 78CONFIG_MODULES=y
83CONFIG_MODULE_UNLOAD=y 79CONFIG_MODULE_UNLOAD=y
84# CONFIG_MODULE_FORCE_UNLOAD is not set 80# CONFIG_MODULE_FORCE_UNLOAD is not set
85# CONFIG_MODVERSIONS is not set 81# CONFIG_MODVERSIONS is not set
86# CONFIG_MODULE_SRCVERSION_ALL is not set 82# CONFIG_MODULE_SRCVERSION_ALL is not set
87CONFIG_KMOD=y 83CONFIG_KMOD=y
88
89#
90# Block layer
91#
92CONFIG_BLOCK=y 84CONFIG_BLOCK=y
93# CONFIG_LBD is not set 85# CONFIG_LBD is not set
94# CONFIG_BLK_DEV_IO_TRACE is not set 86# CONFIG_BLK_DEV_IO_TRACE is not set
95# CONFIG_LSF is not set 87# CONFIG_LSF is not set
88# CONFIG_BLK_DEV_BSG is not set
96 89
97# 90#
98# IO Schedulers 91# IO Schedulers
@@ -115,7 +108,6 @@ CONFIG_CPU_SH4A=y
115CONFIG_CPU_SHX2=y 108CONFIG_CPU_SHX2=y
116# CONFIG_CPU_SUBTYPE_SH7619 is not set 109# CONFIG_CPU_SUBTYPE_SH7619 is not set
117# CONFIG_CPU_SUBTYPE_SH7206 is not set 110# CONFIG_CPU_SUBTYPE_SH7206 is not set
118# CONFIG_CPU_SUBTYPE_SH7300 is not set
119# CONFIG_CPU_SUBTYPE_SH7705 is not set 111# CONFIG_CPU_SUBTYPE_SH7705 is not set
120# CONFIG_CPU_SUBTYPE_SH7706 is not set 112# CONFIG_CPU_SUBTYPE_SH7706 is not set
121# CONFIG_CPU_SUBTYPE_SH7707 is not set 113# CONFIG_CPU_SUBTYPE_SH7707 is not set
@@ -123,6 +115,7 @@ CONFIG_CPU_SHX2=y
123# CONFIG_CPU_SUBTYPE_SH7709 is not set 115# CONFIG_CPU_SUBTYPE_SH7709 is not set
124# CONFIG_CPU_SUBTYPE_SH7710 is not set 116# CONFIG_CPU_SUBTYPE_SH7710 is not set
125# CONFIG_CPU_SUBTYPE_SH7712 is not set 117# CONFIG_CPU_SUBTYPE_SH7712 is not set
118# CONFIG_CPU_SUBTYPE_SH7720 is not set
126# CONFIG_CPU_SUBTYPE_SH7750 is not set 119# CONFIG_CPU_SUBTYPE_SH7750 is not set
127# CONFIG_CPU_SUBTYPE_SH7091 is not set 120# CONFIG_CPU_SUBTYPE_SH7091 is not set
128# CONFIG_CPU_SUBTYPE_SH7750R is not set 121# CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -137,7 +130,6 @@ CONFIG_CPU_SHX2=y
137# CONFIG_CPU_SUBTYPE_SH7780 is not set 130# CONFIG_CPU_SUBTYPE_SH7780 is not set
138CONFIG_CPU_SUBTYPE_SH7785=y 131CONFIG_CPU_SUBTYPE_SH7785=y
139# CONFIG_CPU_SUBTYPE_SHX3 is not set 132# CONFIG_CPU_SUBTYPE_SHX3 is not set
140# CONFIG_CPU_SUBTYPE_SH73180 is not set
141# CONFIG_CPU_SUBTYPE_SH7343 is not set 133# CONFIG_CPU_SUBTYPE_SH7343 is not set
142# CONFIG_CPU_SUBTYPE_SH7722 is not set 134# CONFIG_CPU_SUBTYPE_SH7722 is not set
143 135
@@ -149,15 +141,17 @@ CONFIG_MMU=y
149CONFIG_PAGE_OFFSET=0x80000000 141CONFIG_PAGE_OFFSET=0x80000000
150CONFIG_MEMORY_START=0x08000000 142CONFIG_MEMORY_START=0x08000000
151CONFIG_MEMORY_SIZE=0x08000000 143CONFIG_MEMORY_SIZE=0x08000000
152CONFIG_32BIT=y 144# CONFIG_32BIT is not set
153# CONFIG_X2TLB is not set 145# CONFIG_X2TLB is not set
154CONFIG_VSYSCALL=y 146CONFIG_VSYSCALL=y
147# CONFIG_NUMA is not set
155CONFIG_ARCH_FLATMEM_ENABLE=y 148CONFIG_ARCH_FLATMEM_ENABLE=y
156CONFIG_ARCH_SPARSEMEM_ENABLE=y 149CONFIG_ARCH_SPARSEMEM_ENABLE=y
157CONFIG_ARCH_SPARSEMEM_DEFAULT=y 150CONFIG_ARCH_SPARSEMEM_DEFAULT=y
158CONFIG_MAX_ACTIVE_REGIONS=1 151CONFIG_MAX_ACTIVE_REGIONS=2
159CONFIG_ARCH_POPULATES_NODE_MAP=y 152CONFIG_ARCH_POPULATES_NODE_MAP=y
160CONFIG_ARCH_SELECT_MEMORY_MODEL=y 153CONFIG_ARCH_SELECT_MEMORY_MODEL=y
154CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
161CONFIG_PAGE_SIZE_4KB=y 155CONFIG_PAGE_SIZE_4KB=y
162# CONFIG_PAGE_SIZE_8KB is not set 156# CONFIG_PAGE_SIZE_8KB is not set
163# CONFIG_PAGE_SIZE_64KB is not set 157# CONFIG_PAGE_SIZE_64KB is not set
@@ -167,12 +161,14 @@ CONFIG_HUGETLB_PAGE_SIZE_1MB=y
167# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set 161# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
168# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set 162# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
169CONFIG_SELECT_MEMORY_MODEL=y 163CONFIG_SELECT_MEMORY_MODEL=y
170CONFIG_FLATMEM_MANUAL=y 164# CONFIG_FLATMEM_MANUAL is not set
171# CONFIG_DISCONTIGMEM_MANUAL is not set 165# CONFIG_DISCONTIGMEM_MANUAL is not set
172# CONFIG_SPARSEMEM_MANUAL is not set 166CONFIG_SPARSEMEM_MANUAL=y
173CONFIG_FLATMEM=y 167CONFIG_SPARSEMEM=y
174CONFIG_FLAT_NODE_MEM_MAP=y 168CONFIG_HAVE_MEMORY_PRESENT=y
175CONFIG_SPARSEMEM_STATIC=y 169CONFIG_SPARSEMEM_STATIC=y
170# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
171# CONFIG_MEMORY_HOTPLUG is not set
176CONFIG_SPLIT_PTLOCK_CPUS=4 172CONFIG_SPLIT_PTLOCK_CPUS=4
177# CONFIG_RESOURCES_64BIT is not set 173# CONFIG_RESOURCES_64BIT is not set
178CONFIG_ZONE_DMA_FLAG=0 174CONFIG_ZONE_DMA_FLAG=0
@@ -182,7 +178,9 @@ CONFIG_NR_QUICK=2
182# Cache configuration 178# Cache configuration
183# 179#
184# CONFIG_SH_DIRECT_MAPPED is not set 180# CONFIG_SH_DIRECT_MAPPED is not set
185# CONFIG_SH_WRITETHROUGH is not set 181CONFIG_CACHE_WRITEBACK=y
182# CONFIG_CACHE_WRITETHROUGH is not set
183# CONFIG_CACHE_OFF is not set
186 184
187# 185#
188# Processor features 186# Processor features
@@ -190,12 +188,11 @@ CONFIG_NR_QUICK=2
190CONFIG_CPU_LITTLE_ENDIAN=y 188CONFIG_CPU_LITTLE_ENDIAN=y
191# CONFIG_CPU_BIG_ENDIAN is not set 189# CONFIG_CPU_BIG_ENDIAN is not set
192CONFIG_SH_FPU=y 190CONFIG_SH_FPU=y
193# CONFIG_SH_DSP is not set
194CONFIG_SH_STORE_QUEUES=y 191CONFIG_SH_STORE_QUEUES=y
195CONFIG_CPU_HAS_INTEVT=y 192CONFIG_CPU_HAS_INTEVT=y
196CONFIG_CPU_HAS_INTC2_IRQ=y
197CONFIG_CPU_HAS_SR_RB=y 193CONFIG_CPU_HAS_SR_RB=y
198CONFIG_CPU_HAS_PTEA=y 194CONFIG_CPU_HAS_PTEA=y
195CONFIG_CPU_HAS_FPU=y
199 196
200# 197#
201# Board support 198# Board support
@@ -214,6 +211,7 @@ CONFIG_SH_PCLK_FREQ=50000000
214# CONFIG_TICK_ONESHOT is not set 211# CONFIG_TICK_ONESHOT is not set
215# CONFIG_NO_HZ is not set 212# CONFIG_NO_HZ is not set
216# CONFIG_HIGH_RES_TIMERS is not set 213# CONFIG_HIGH_RES_TIMERS is not set
214CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
217 215
218# 216#
219# CPU Frequency scaling 217# CPU Frequency scaling
@@ -249,6 +247,7 @@ CONFIG_KEXEC=y
249# CONFIG_PREEMPT_VOLUNTARY is not set 247# CONFIG_PREEMPT_VOLUNTARY is not set
250CONFIG_PREEMPT=y 248CONFIG_PREEMPT=y
251CONFIG_PREEMPT_BKL=y 249CONFIG_PREEMPT_BKL=y
250CONFIG_GUSA=y
252 251
253# 252#
254# Boot options 253# Boot options
@@ -268,10 +267,6 @@ CONFIG_PCI_AUTO=y
268CONFIG_PCI_AUTO_UPDATE_RESOURCES=y 267CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
269# CONFIG_ARCH_SUPPORTS_MSI is not set 268# CONFIG_ARCH_SUPPORTS_MSI is not set
270# CONFIG_PCI_DEBUG is not set 269# CONFIG_PCI_DEBUG is not set
271
272#
273# PCCARD (PCMCIA/CardBus) support
274#
275# CONFIG_PCCARD is not set 270# CONFIG_PCCARD is not set
276# CONFIG_HOTPLUG_PCI is not set 271# CONFIG_HOTPLUG_PCI is not set
277 272
@@ -322,6 +317,7 @@ CONFIG_IP_PNP_DHCP=y
322CONFIG_INET_XFRM_MODE_TRANSPORT=y 317CONFIG_INET_XFRM_MODE_TRANSPORT=y
323CONFIG_INET_XFRM_MODE_TUNNEL=y 318CONFIG_INET_XFRM_MODE_TUNNEL=y
324CONFIG_INET_XFRM_MODE_BEET=y 319CONFIG_INET_XFRM_MODE_BEET=y
320# CONFIG_INET_LRO is not set
325CONFIG_INET_DIAG=y 321CONFIG_INET_DIAG=y
326CONFIG_INET_TCP_DIAG=y 322CONFIG_INET_TCP_DIAG=y
327# CONFIG_TCP_CONG_ADVANCED is not set 323# CONFIG_TCP_CONG_ADVANCED is not set
@@ -348,10 +344,6 @@ CONFIG_LLC=m
348# CONFIG_LAPB is not set 344# CONFIG_LAPB is not set
349# CONFIG_ECONET is not set 345# CONFIG_ECONET is not set
350# CONFIG_WAN_ROUTER is not set 346# CONFIG_WAN_ROUTER is not set
351
352#
353# QoS and/or fair queueing
354#
355# CONFIG_NET_SCHED is not set 347# CONFIG_NET_SCHED is not set
356 348
357# 349#
@@ -371,6 +363,7 @@ CONFIG_WIRELESS_EXT=y
371# CONFIG_MAC80211 is not set 363# CONFIG_MAC80211 is not set
372# CONFIG_IEEE80211 is not set 364# CONFIG_IEEE80211 is not set
373# CONFIG_RFKILL is not set 365# CONFIG_RFKILL is not set
366# CONFIG_NET_9P is not set
374 367
375# 368#
376# Device Drivers 369# Device Drivers
@@ -379,33 +372,17 @@ CONFIG_WIRELESS_EXT=y
379# 372#
380# Generic Driver Options 373# Generic Driver Options
381# 374#
375CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
382CONFIG_STANDALONE=y 376CONFIG_STANDALONE=y
383CONFIG_PREVENT_FIRMWARE_BUILD=y 377CONFIG_PREVENT_FIRMWARE_BUILD=y
384CONFIG_FW_LOADER=m 378CONFIG_FW_LOADER=m
385# CONFIG_DEBUG_DRIVER is not set 379# CONFIG_DEBUG_DRIVER is not set
386# CONFIG_DEBUG_DEVRES is not set 380# CONFIG_DEBUG_DEVRES is not set
387# CONFIG_SYS_HYPERVISOR is not set 381# CONFIG_SYS_HYPERVISOR is not set
388
389#
390# Connector - unified userspace <-> kernelspace linker
391#
392# CONFIG_CONNECTOR is not set 382# CONFIG_CONNECTOR is not set
393# CONFIG_MTD is not set 383# CONFIG_MTD is not set
394
395#
396# Parallel port support
397#
398# CONFIG_PARPORT is not set 384# CONFIG_PARPORT is not set
399 385CONFIG_BLK_DEV=y
400#
401# Plug and Play support
402#
403# CONFIG_PNPACPI is not set
404
405#
406# Block devices
407#
408# CONFIG_BLK_CPQ_DA is not set
409# CONFIG_BLK_CPQ_CISS_DA is not set 386# CONFIG_BLK_CPQ_CISS_DA is not set
410# CONFIG_BLK_DEV_DAC960 is not set 387# CONFIG_BLK_DEV_DAC960 is not set
411# CONFIG_BLK_DEV_UMEM is not set 388# CONFIG_BLK_DEV_UMEM is not set
@@ -419,14 +396,11 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
419CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 396CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
420# CONFIG_CDROM_PKTCDVD is not set 397# CONFIG_CDROM_PKTCDVD is not set
421# CONFIG_ATA_OVER_ETH is not set 398# CONFIG_ATA_OVER_ETH is not set
422 399CONFIG_MISC_DEVICES=y
423#
424# Misc devices
425#
426# CONFIG_PHANTOM is not set 400# CONFIG_PHANTOM is not set
401CONFIG_EEPROM_93CX6=y
427# CONFIG_SGI_IOC4 is not set 402# CONFIG_SGI_IOC4 is not set
428# CONFIG_TIFM_CORE is not set 403# CONFIG_TIFM_CORE is not set
429# CONFIG_BLINK is not set
430# CONFIG_IDE is not set 404# CONFIG_IDE is not set
431 405
432# 406#
@@ -434,6 +408,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
434# 408#
435# CONFIG_RAID_ATTRS is not set 409# CONFIG_RAID_ATTRS is not set
436CONFIG_SCSI=y 410CONFIG_SCSI=y
411CONFIG_SCSI_DMA=y
437# CONFIG_SCSI_TGT is not set 412# CONFIG_SCSI_TGT is not set
438# CONFIG_SCSI_NETLINK is not set 413# CONFIG_SCSI_NETLINK is not set
439CONFIG_SCSI_PROC_FS=y 414CONFIG_SCSI_PROC_FS=y
@@ -463,12 +438,9 @@ CONFIG_SCSI_WAIT_SCAN=m
463# CONFIG_SCSI_SPI_ATTRS is not set 438# CONFIG_SCSI_SPI_ATTRS is not set
464# CONFIG_SCSI_FC_ATTRS is not set 439# CONFIG_SCSI_FC_ATTRS is not set
465# CONFIG_SCSI_ISCSI_ATTRS is not set 440# CONFIG_SCSI_ISCSI_ATTRS is not set
466# CONFIG_SCSI_SAS_ATTRS is not set
467# CONFIG_SCSI_SAS_LIBSAS is not set 441# CONFIG_SCSI_SAS_LIBSAS is not set
468 442# CONFIG_SCSI_SRP_ATTRS is not set
469# 443CONFIG_SCSI_LOWLEVEL=y
470# SCSI low-level drivers
471#
472# CONFIG_ISCSI_TCP is not set 444# CONFIG_ISCSI_TCP is not set
473# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 445# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
474# CONFIG_SCSI_3W_9XXX is not set 446# CONFIG_SCSI_3W_9XXX is not set
@@ -478,7 +450,6 @@ CONFIG_SCSI_WAIT_SCAN=m
478# CONFIG_SCSI_AIC7XXX_OLD is not set 450# CONFIG_SCSI_AIC7XXX_OLD is not set
479# CONFIG_SCSI_AIC79XX is not set 451# CONFIG_SCSI_AIC79XX is not set
480# CONFIG_SCSI_AIC94XX is not set 452# CONFIG_SCSI_AIC94XX is not set
481# CONFIG_SCSI_DPT_I2O is not set
482# CONFIG_SCSI_ARCMSR is not set 453# CONFIG_SCSI_ARCMSR is not set
483# CONFIG_MEGARAID_NEWGEN is not set 454# CONFIG_MEGARAID_NEWGEN is not set
484# CONFIG_MEGARAID_LEGACY is not set 455# CONFIG_MEGARAID_LEGACY is not set
@@ -543,6 +514,7 @@ CONFIG_SATA_SIL=y
543# CONFIG_PATA_OLDPIIX is not set 514# CONFIG_PATA_OLDPIIX is not set
544# CONFIG_PATA_NETCELL is not set 515# CONFIG_PATA_NETCELL is not set
545# CONFIG_PATA_NS87410 is not set 516# CONFIG_PATA_NS87410 is not set
517# CONFIG_PATA_NS87415 is not set
546# CONFIG_PATA_OPTI is not set 518# CONFIG_PATA_OPTI is not set
547# CONFIG_PATA_OPTIDMA is not set 519# CONFIG_PATA_OPTIDMA is not set
548# CONFIG_PATA_PDC_OLD is not set 520# CONFIG_PATA_PDC_OLD is not set
@@ -556,45 +528,26 @@ CONFIG_SATA_SIL=y
556# CONFIG_PATA_VIA is not set 528# CONFIG_PATA_VIA is not set
557# CONFIG_PATA_WINBOND is not set 529# CONFIG_PATA_WINBOND is not set
558CONFIG_PATA_PLATFORM=y 530CONFIG_PATA_PLATFORM=y
559
560#
561# Multi-device support (RAID and LVM)
562#
563# CONFIG_MD is not set 531# CONFIG_MD is not set
564
565#
566# Fusion MPT device support
567#
568# CONFIG_FUSION is not set 532# CONFIG_FUSION is not set
569# CONFIG_FUSION_SPI is not set
570# CONFIG_FUSION_FC is not set
571# CONFIG_FUSION_SAS is not set
572 533
573# 534#
574# IEEE 1394 (FireWire) support 535# IEEE 1394 (FireWire) support
575# 536#
576# CONFIG_FIREWIRE is not set 537# CONFIG_FIREWIRE is not set
577# CONFIG_IEEE1394 is not set 538# CONFIG_IEEE1394 is not set
578
579#
580# I2O device support
581#
582# CONFIG_I2O is not set 539# CONFIG_I2O is not set
583
584#
585# Network device support
586#
587CONFIG_NETDEVICES=y 540CONFIG_NETDEVICES=y
541# CONFIG_NETDEVICES_MULTIQUEUE is not set
588# CONFIG_DUMMY is not set 542# CONFIG_DUMMY is not set
589# CONFIG_BONDING is not set 543# CONFIG_BONDING is not set
544# CONFIG_MACVLAN is not set
590# CONFIG_EQUALIZER is not set 545# CONFIG_EQUALIZER is not set
591# CONFIG_TUN is not set 546# CONFIG_TUN is not set
547# CONFIG_VETH is not set
548# CONFIG_IP1000 is not set
592# CONFIG_ARCNET is not set 549# CONFIG_ARCNET is not set
593# CONFIG_PHYLIB is not set 550# CONFIG_PHYLIB is not set
594
595#
596# Ethernet (10 or 100Mbit)
597#
598CONFIG_NET_ETHERNET=y 551CONFIG_NET_ETHERNET=y
599CONFIG_MII=y 552CONFIG_MII=y
600# CONFIG_STNIC is not set 553# CONFIG_STNIC is not set
@@ -603,17 +556,20 @@ CONFIG_MII=y
603# CONFIG_CASSINI is not set 556# CONFIG_CASSINI is not set
604# CONFIG_NET_VENDOR_3COM is not set 557# CONFIG_NET_VENDOR_3COM is not set
605# CONFIG_SMC91X is not set 558# CONFIG_SMC91X is not set
606 559# CONFIG_SMC911X is not set
607#
608# Tulip family network device support
609#
610# CONFIG_NET_TULIP is not set 560# CONFIG_NET_TULIP is not set
611# CONFIG_HP100 is not set 561# CONFIG_HP100 is not set
562# CONFIG_IBM_NEW_EMAC_ZMII is not set
563# CONFIG_IBM_NEW_EMAC_RGMII is not set
564# CONFIG_IBM_NEW_EMAC_TAH is not set
565# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
612# CONFIG_NET_PCI is not set 566# CONFIG_NET_PCI is not set
567# CONFIG_B44 is not set
613CONFIG_NETDEV_1000=y 568CONFIG_NETDEV_1000=y
614# CONFIG_ACENIC is not set 569# CONFIG_ACENIC is not set
615# CONFIG_DL2K is not set 570# CONFIG_DL2K is not set
616# CONFIG_E1000 is not set 571# CONFIG_E1000 is not set
572# CONFIG_E1000E is not set
617# CONFIG_NS83820 is not set 573# CONFIG_NS83820 is not set
618# CONFIG_HAMACHI is not set 574# CONFIG_HAMACHI is not set
619# CONFIG_YELLOWFIN is not set 575# CONFIG_YELLOWFIN is not set
@@ -631,11 +587,14 @@ CONFIG_R8169=y
631CONFIG_NETDEV_10000=y 587CONFIG_NETDEV_10000=y
632# CONFIG_CHELSIO_T1 is not set 588# CONFIG_CHELSIO_T1 is not set
633# CONFIG_CHELSIO_T3 is not set 589# CONFIG_CHELSIO_T3 is not set
590# CONFIG_IXGBE is not set
634# CONFIG_IXGB is not set 591# CONFIG_IXGB is not set
635# CONFIG_S2IO is not set 592# CONFIG_S2IO is not set
636# CONFIG_MYRI10GE is not set 593# CONFIG_MYRI10GE is not set
637# CONFIG_NETXEN_NIC is not set 594# CONFIG_NETXEN_NIC is not set
595# CONFIG_NIU is not set
638# CONFIG_MLX4_CORE is not set 596# CONFIG_MLX4_CORE is not set
597# CONFIG_TEHUTI is not set
639# CONFIG_TR is not set 598# CONFIG_TR is not set
640 599
641# 600#
@@ -653,15 +612,7 @@ CONFIG_NETDEV_10000=y
653# CONFIG_NETCONSOLE is not set 612# CONFIG_NETCONSOLE is not set
654# CONFIG_NETPOLL is not set 613# CONFIG_NETPOLL is not set
655# CONFIG_NET_POLL_CONTROLLER is not set 614# CONFIG_NET_POLL_CONTROLLER is not set
656
657#
658# ISDN subsystem
659#
660# CONFIG_ISDN is not set 615# CONFIG_ISDN is not set
661
662#
663# Telephony Support
664#
665# CONFIG_PHONE is not set 616# CONFIG_PHONE is not set
666 617
667# 618#
@@ -669,6 +620,7 @@ CONFIG_NETDEV_10000=y
669# 620#
670CONFIG_INPUT=y 621CONFIG_INPUT=y
671# CONFIG_INPUT_FF_MEMLESS is not set 622# CONFIG_INPUT_FF_MEMLESS is not set
623# CONFIG_INPUT_POLLDEV is not set
672 624
673# 625#
674# Userland interfaces 626# Userland interfaces
@@ -678,7 +630,6 @@ CONFIG_INPUT_MOUSEDEV=y
678CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 630CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
679CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 631CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
680# CONFIG_INPUT_JOYDEV is not set 632# CONFIG_INPUT_JOYDEV is not set
681# CONFIG_INPUT_TSDEV is not set
682# CONFIG_INPUT_EVDEV is not set 633# CONFIG_INPUT_EVDEV is not set
683# CONFIG_INPUT_EVBUG is not set 634# CONFIG_INPUT_EVBUG is not set
684 635
@@ -732,21 +683,11 @@ CONFIG_SERIAL_CORE_CONSOLE=y
732CONFIG_UNIX98_PTYS=y 683CONFIG_UNIX98_PTYS=y
733CONFIG_LEGACY_PTYS=y 684CONFIG_LEGACY_PTYS=y
734CONFIG_LEGACY_PTY_COUNT=256 685CONFIG_LEGACY_PTY_COUNT=256
735
736#
737# IPMI
738#
739# CONFIG_IPMI_HANDLER is not set 686# CONFIG_IPMI_HANDLER is not set
740# CONFIG_WATCHDOG is not set
741CONFIG_HW_RANDOM=y 687CONFIG_HW_RANDOM=y
742# CONFIG_R3964 is not set 688# CONFIG_R3964 is not set
743# CONFIG_APPLICOM is not set 689# CONFIG_APPLICOM is not set
744# CONFIG_DRM is not set
745# CONFIG_RAW_DRIVER is not set 690# CONFIG_RAW_DRIVER is not set
746
747#
748# TPM devices
749#
750# CONFIG_TCG_TPM is not set 691# CONFIG_TCG_TPM is not set
751CONFIG_DEVPORT=y 692CONFIG_DEVPORT=y
752# CONFIG_I2C is not set 693# CONFIG_I2C is not set
@@ -756,21 +697,31 @@ CONFIG_DEVPORT=y
756# 697#
757# CONFIG_SPI is not set 698# CONFIG_SPI is not set
758# CONFIG_SPI_MASTER is not set 699# CONFIG_SPI_MASTER is not set
759
760#
761# Dallas's 1-wire bus
762#
763# CONFIG_W1 is not set 700# CONFIG_W1 is not set
701# CONFIG_POWER_SUPPLY is not set
764CONFIG_HWMON=y 702CONFIG_HWMON=y
765# CONFIG_HWMON_VID is not set 703# CONFIG_HWMON_VID is not set
766# CONFIG_SENSORS_ABITUGURU is not set
767# CONFIG_SENSORS_F71805F is not set 704# CONFIG_SENSORS_F71805F is not set
705# CONFIG_SENSORS_F71882FG is not set
706# CONFIG_SENSORS_IT87 is not set
707# CONFIG_SENSORS_PC87360 is not set
768# CONFIG_SENSORS_PC87427 is not set 708# CONFIG_SENSORS_PC87427 is not set
709# CONFIG_SENSORS_SIS5595 is not set
769# CONFIG_SENSORS_SMSC47M1 is not set 710# CONFIG_SENSORS_SMSC47M1 is not set
770# CONFIG_SENSORS_SMSC47B397 is not set 711# CONFIG_SENSORS_SMSC47B397 is not set
712# CONFIG_SENSORS_VIA686A is not set
771# CONFIG_SENSORS_VT1211 is not set 713# CONFIG_SENSORS_VT1211 is not set
714# CONFIG_SENSORS_VT8231 is not set
772# CONFIG_SENSORS_W83627HF is not set 715# CONFIG_SENSORS_W83627HF is not set
716# CONFIG_SENSORS_W83627EHF is not set
773# CONFIG_HWMON_DEBUG_CHIP is not set 717# CONFIG_HWMON_DEBUG_CHIP is not set
718# CONFIG_WATCHDOG is not set
719
720#
721# Sonics Silicon Backplane
722#
723CONFIG_SSB_POSSIBLE=y
724# CONFIG_SSB is not set
774 725
775# 726#
776# Multifunction device drivers 727# Multifunction device drivers
@@ -787,19 +738,16 @@ CONFIG_HWMON=y
787# 738#
788# Graphics support 739# Graphics support
789# 740#
790# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 741# CONFIG_DRM is not set
791
792#
793# Display device support
794#
795# CONFIG_DISPLAY_SUPPORT is not set
796# CONFIG_VGASTATE is not set 742# CONFIG_VGASTATE is not set
743# CONFIG_VIDEO_OUTPUT_CONTROL is not set
797CONFIG_FB=y 744CONFIG_FB=y
798# CONFIG_FIRMWARE_EDID is not set 745# CONFIG_FIRMWARE_EDID is not set
799# CONFIG_FB_DDC is not set 746# CONFIG_FB_DDC is not set
800# CONFIG_FB_CFB_FILLRECT is not set 747# CONFIG_FB_CFB_FILLRECT is not set
801# CONFIG_FB_CFB_COPYAREA is not set 748# CONFIG_FB_CFB_COPYAREA is not set
802# CONFIG_FB_CFB_IMAGEBLIT is not set 749# CONFIG_FB_CFB_IMAGEBLIT is not set
750# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
803# CONFIG_FB_SYS_FILLRECT is not set 751# CONFIG_FB_SYS_FILLRECT is not set
804# CONFIG_FB_SYS_COPYAREA is not set 752# CONFIG_FB_SYS_COPYAREA is not set
805# CONFIG_FB_SYS_IMAGEBLIT is not set 753# CONFIG_FB_SYS_IMAGEBLIT is not set
@@ -819,7 +767,6 @@ CONFIG_FB_DEFERRED_IO=y
819# CONFIG_FB_CYBER2000 is not set 767# CONFIG_FB_CYBER2000 is not set
820# CONFIG_FB_ASILIANT is not set 768# CONFIG_FB_ASILIANT is not set
821# CONFIG_FB_IMSTT is not set 769# CONFIG_FB_IMSTT is not set
822# CONFIG_FB_EPSON1355 is not set
823# CONFIG_FB_S1D13XXX is not set 770# CONFIG_FB_S1D13XXX is not set
824# CONFIG_FB_NVIDIA is not set 771# CONFIG_FB_NVIDIA is not set
825# CONFIG_FB_RIVA is not set 772# CONFIG_FB_RIVA is not set
@@ -839,6 +786,12 @@ CONFIG_FB_DEFERRED_IO=y
839# CONFIG_FB_ARK is not set 786# CONFIG_FB_ARK is not set
840# CONFIG_FB_PM3 is not set 787# CONFIG_FB_PM3 is not set
841# CONFIG_FB_VIRTUAL is not set 788# CONFIG_FB_VIRTUAL is not set
789# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
790
791#
792# Display device support
793#
794# CONFIG_DISPLAY_SUPPORT is not set
842# CONFIG_LOGO is not set 795# CONFIG_LOGO is not set
843 796
844# 797#
@@ -855,20 +808,14 @@ CONFIG_SOUND=m
855# Open Sound System 808# Open Sound System
856# 809#
857CONFIG_SOUND_PRIME=m 810CONFIG_SOUND_PRIME=m
858# CONFIG_OSS_OBSOLETE is not set
859# CONFIG_SOUND_TRIDENT is not set 811# CONFIG_SOUND_TRIDENT is not set
860# CONFIG_SOUND_MSNDCLAS is not set 812# CONFIG_SOUND_MSNDCLAS is not set
861# CONFIG_SOUND_MSNDPIN is not set 813# CONFIG_SOUND_MSNDPIN is not set
862 814CONFIG_HID_SUPPORT=y
863#
864# HID Devices
865#
866CONFIG_HID=y 815CONFIG_HID=y
867# CONFIG_HID_DEBUG is not set 816# CONFIG_HID_DEBUG is not set
868 817# CONFIG_HIDRAW is not set
869# 818CONFIG_USB_SUPPORT=y
870# USB support
871#
872CONFIG_USB_ARCH_HAS_HCD=y 819CONFIG_USB_ARCH_HAS_HCD=y
873CONFIG_USB_ARCH_HAS_OHCI=y 820CONFIG_USB_ARCH_HAS_OHCI=y
874CONFIG_USB_ARCH_HAS_EHCI=y 821CONFIG_USB_ARCH_HAS_EHCI=y
@@ -883,32 +830,8 @@ CONFIG_USB_ARCH_HAS_EHCI=y
883# 830#
884# CONFIG_USB_GADGET is not set 831# CONFIG_USB_GADGET is not set
885# CONFIG_MMC is not set 832# CONFIG_MMC is not set
886
887#
888# LED devices
889#
890# CONFIG_NEW_LEDS is not set 833# CONFIG_NEW_LEDS is not set
891
892#
893# LED drivers
894#
895
896#
897# LED Triggers
898#
899
900#
901# InfiniBand support
902#
903# CONFIG_INFINIBAND is not set 834# CONFIG_INFINIBAND is not set
904
905#
906# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
907#
908
909#
910# Real Time Clock
911#
912CONFIG_RTC_LIB=y 835CONFIG_RTC_LIB=y
913CONFIG_RTC_CLASS=y 836CONFIG_RTC_CLASS=y
914CONFIG_RTC_HCTOSYS=y 837CONFIG_RTC_HCTOSYS=y
@@ -925,10 +848,6 @@ CONFIG_RTC_INTF_DEV=y
925# CONFIG_RTC_DRV_TEST is not set 848# CONFIG_RTC_DRV_TEST is not set
926 849
927# 850#
928# I2C RTC drivers
929#
930
931#
932# SPI RTC drivers 851# SPI RTC drivers
933# 852#
934 853
@@ -936,8 +855,10 @@ CONFIG_RTC_INTF_DEV=y
936# Platform RTC drivers 855# Platform RTC drivers
937# 856#
938# CONFIG_RTC_DRV_DS1553 is not set 857# CONFIG_RTC_DRV_DS1553 is not set
858# CONFIG_RTC_DRV_STK17TA8 is not set
939# CONFIG_RTC_DRV_DS1742 is not set 859# CONFIG_RTC_DRV_DS1742 is not set
940# CONFIG_RTC_DRV_M48T86 is not set 860# CONFIG_RTC_DRV_M48T86 is not set
861# CONFIG_RTC_DRV_M48T59 is not set
941# CONFIG_RTC_DRV_V3020 is not set 862# CONFIG_RTC_DRV_V3020 is not set
942 863
943# 864#
@@ -946,17 +867,9 @@ CONFIG_RTC_INTF_DEV=y
946CONFIG_RTC_DRV_SH=y 867CONFIG_RTC_DRV_SH=y
947 868
948# 869#
949# DMA Engine support 870# Userspace I/O
950#
951# CONFIG_DMA_ENGINE is not set
952
953#
954# DMA Clients
955#
956
957#
958# DMA Devices
959# 871#
872# CONFIG_UIO is not set
960 873
961# 874#
962# File systems 875# File systems
@@ -1017,7 +930,6 @@ CONFIG_TMPFS=y
1017# CONFIG_TMPFS_POSIX_ACL is not set 930# CONFIG_TMPFS_POSIX_ACL is not set
1018CONFIG_HUGETLBFS=y 931CONFIG_HUGETLBFS=y
1019CONFIG_HUGETLB_PAGE=y 932CONFIG_HUGETLB_PAGE=y
1020CONFIG_RAMFS=y
1021CONFIG_CONFIGFS_FS=m 933CONFIG_CONFIGFS_FS=m
1022 934
1023# 935#
@@ -1036,10 +948,7 @@ CONFIG_CONFIGFS_FS=m
1036# CONFIG_QNX4FS_FS is not set 948# CONFIG_QNX4FS_FS is not set
1037# CONFIG_SYSV_FS is not set 949# CONFIG_SYSV_FS is not set
1038# CONFIG_UFS_FS is not set 950# CONFIG_UFS_FS is not set
1039 951CONFIG_NETWORK_FILESYSTEMS=y
1040#
1041# Network File Systems
1042#
1043CONFIG_NFS_FS=y 952CONFIG_NFS_FS=y
1044CONFIG_NFS_V3=y 953CONFIG_NFS_V3=y
1045# CONFIG_NFS_V3_ACL is not set 954# CONFIG_NFS_V3_ACL is not set
@@ -1065,17 +974,12 @@ CONFIG_RPCSEC_GSS_KRB5=y
1065# CONFIG_NCP_FS is not set 974# CONFIG_NCP_FS is not set
1066# CONFIG_CODA_FS is not set 975# CONFIG_CODA_FS is not set
1067# CONFIG_AFS_FS is not set 976# CONFIG_AFS_FS is not set
1068# CONFIG_9P_FS is not set
1069 977
1070# 978#
1071# Partition Types 979# Partition Types
1072# 980#
1073# CONFIG_PARTITION_ADVANCED is not set 981# CONFIG_PARTITION_ADVANCED is not set
1074CONFIG_MSDOS_PARTITION=y 982CONFIG_MSDOS_PARTITION=y
1075
1076#
1077# Native Language Support
1078#
1079CONFIG_NLS=y 983CONFIG_NLS=y
1080CONFIG_NLS_DEFAULT="iso8859-1" 984CONFIG_NLS_DEFAULT="iso8859-1"
1081CONFIG_NLS_CODEPAGE_437=y 985CONFIG_NLS_CODEPAGE_437=y
@@ -1116,23 +1020,18 @@ CONFIG_NLS_ISO8859_1=y
1116# CONFIG_NLS_KOI8_R is not set 1020# CONFIG_NLS_KOI8_R is not set
1117# CONFIG_NLS_KOI8_U is not set 1021# CONFIG_NLS_KOI8_U is not set
1118# CONFIG_NLS_UTF8 is not set 1022# CONFIG_NLS_UTF8 is not set
1119
1120#
1121# Distributed Lock Manager
1122#
1123# CONFIG_DLM is not set 1023# CONFIG_DLM is not set
1124 1024CONFIG_INSTRUMENTATION=y
1125#
1126# Profiling support
1127#
1128CONFIG_PROFILING=y 1025CONFIG_PROFILING=y
1129CONFIG_OPROFILE=m 1026CONFIG_OPROFILE=m
1027# CONFIG_MARKERS is not set
1130 1028
1131# 1029#
1132# Kernel hacking 1030# Kernel hacking
1133# 1031#
1134CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1032CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1135# CONFIG_PRINTK_TIME is not set 1033# CONFIG_PRINTK_TIME is not set
1034CONFIG_ENABLE_WARN_DEPRECATED=y
1136CONFIG_ENABLE_MUST_CHECK=y 1035CONFIG_ENABLE_MUST_CHECK=y
1137CONFIG_MAGIC_SYSRQ=y 1036CONFIG_MAGIC_SYSRQ=y
1138# CONFIG_UNUSED_SYMBOLS is not set 1037# CONFIG_UNUSED_SYMBOLS is not set
@@ -1141,6 +1040,7 @@ CONFIG_DEBUG_FS=y
1141CONFIG_DEBUG_KERNEL=y 1040CONFIG_DEBUG_KERNEL=y
1142# CONFIG_DEBUG_SHIRQ is not set 1041# CONFIG_DEBUG_SHIRQ is not set
1143# CONFIG_DETECT_SOFTLOCKUP is not set 1042# CONFIG_DETECT_SOFTLOCKUP is not set
1043CONFIG_SCHED_DEBUG=y
1144# CONFIG_SCHEDSTATS is not set 1044# CONFIG_SCHEDSTATS is not set
1145# CONFIG_TIMER_STATS is not set 1045# CONFIG_TIMER_STATS is not set
1146# CONFIG_DEBUG_SLAB is not set 1046# CONFIG_DEBUG_SLAB is not set
@@ -1150,6 +1050,7 @@ CONFIG_DEBUG_MUTEXES=y
1150CONFIG_DEBUG_LOCK_ALLOC=y 1050CONFIG_DEBUG_LOCK_ALLOC=y
1151# CONFIG_PROVE_LOCKING is not set 1051# CONFIG_PROVE_LOCKING is not set
1152CONFIG_LOCKDEP=y 1052CONFIG_LOCKDEP=y
1053# CONFIG_LOCK_STAT is not set
1153# CONFIG_DEBUG_LOCKDEP is not set 1054# CONFIG_DEBUG_LOCKDEP is not set
1154# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1055# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1155CONFIG_DEBUG_LOCKING_API_SELFTESTS=y 1056CONFIG_DEBUG_LOCKING_API_SELFTESTS=y
@@ -1159,17 +1060,21 @@ CONFIG_DEBUG_BUGVERBOSE=y
1159CONFIG_DEBUG_INFO=y 1060CONFIG_DEBUG_INFO=y
1160# CONFIG_DEBUG_VM is not set 1061# CONFIG_DEBUG_VM is not set
1161# CONFIG_DEBUG_LIST is not set 1062# CONFIG_DEBUG_LIST is not set
1063# CONFIG_DEBUG_SG is not set
1162CONFIG_FRAME_POINTER=y 1064CONFIG_FRAME_POINTER=y
1163CONFIG_FORCED_INLINING=y 1065CONFIG_FORCED_INLINING=y
1066# CONFIG_BOOT_PRINTK_DELAY is not set
1164# CONFIG_RCU_TORTURE_TEST is not set 1067# CONFIG_RCU_TORTURE_TEST is not set
1165# CONFIG_FAULT_INJECTION is not set 1068# CONFIG_FAULT_INJECTION is not set
1069# CONFIG_SAMPLES is not set
1166CONFIG_SH_STANDARD_BIOS=y 1070CONFIG_SH_STANDARD_BIOS=y
1167# CONFIG_EARLY_SCIF_CONSOLE is not set 1071# CONFIG_EARLY_SCIF_CONSOLE is not set
1168CONFIG_EARLY_PRINTK=y 1072CONFIG_EARLY_PRINTK=y
1169# CONFIG_DEBUG_BOOTMEM is not set 1073# CONFIG_DEBUG_BOOTMEM is not set
1170CONFIG_DEBUG_STACKOVERFLOW=y 1074CONFIG_DEBUG_STACKOVERFLOW=y
1171CONFIG_DEBUG_STACK_USAGE=y 1075CONFIG_DEBUG_STACK_USAGE=y
1172# CONFIG_4KSTACKS is not set 1076CONFIG_4KSTACKS=y
1077# CONFIG_IRQSTACKS is not set
1173# CONFIG_SH_KGDB is not set 1078# CONFIG_SH_KGDB is not set
1174 1079
1175# 1080#
@@ -1177,10 +1082,7 @@ CONFIG_DEBUG_STACK_USAGE=y
1177# 1082#
1178# CONFIG_KEYS is not set 1083# CONFIG_KEYS is not set
1179# CONFIG_SECURITY is not set 1084# CONFIG_SECURITY is not set
1180 1085# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1181#
1182# Cryptographic options
1183#
1184CONFIG_CRYPTO=y 1086CONFIG_CRYPTO=y
1185CONFIG_CRYPTO_ALGAPI=y 1087CONFIG_CRYPTO_ALGAPI=y
1186CONFIG_CRYPTO_BLKCIPHER=y 1088CONFIG_CRYPTO_BLKCIPHER=y
@@ -1201,6 +1103,7 @@ CONFIG_CRYPTO_ECB=m
1201CONFIG_CRYPTO_CBC=y 1103CONFIG_CRYPTO_CBC=y
1202CONFIG_CRYPTO_PCBC=m 1104CONFIG_CRYPTO_PCBC=m
1203# CONFIG_CRYPTO_LRW is not set 1105# CONFIG_CRYPTO_LRW is not set
1106# CONFIG_CRYPTO_XTS is not set
1204# CONFIG_CRYPTO_CRYPTD is not set 1107# CONFIG_CRYPTO_CRYPTD is not set
1205CONFIG_CRYPTO_DES=y 1108CONFIG_CRYPTO_DES=y
1206# CONFIG_CRYPTO_FCRYPT is not set 1109# CONFIG_CRYPTO_FCRYPT is not set
@@ -1214,15 +1117,14 @@ CONFIG_CRYPTO_DES=y
1214# CONFIG_CRYPTO_ARC4 is not set 1117# CONFIG_CRYPTO_ARC4 is not set
1215# CONFIG_CRYPTO_KHAZAD is not set 1118# CONFIG_CRYPTO_KHAZAD is not set
1216# CONFIG_CRYPTO_ANUBIS is not set 1119# CONFIG_CRYPTO_ANUBIS is not set
1120# CONFIG_CRYPTO_SEED is not set
1217# CONFIG_CRYPTO_DEFLATE is not set 1121# CONFIG_CRYPTO_DEFLATE is not set
1218# CONFIG_CRYPTO_MICHAEL_MIC is not set 1122# CONFIG_CRYPTO_MICHAEL_MIC is not set
1219# CONFIG_CRYPTO_CRC32C is not set 1123# CONFIG_CRYPTO_CRC32C is not set
1220# CONFIG_CRYPTO_CAMELLIA is not set 1124# CONFIG_CRYPTO_CAMELLIA is not set
1221# CONFIG_CRYPTO_TEST is not set 1125# CONFIG_CRYPTO_TEST is not set
1222 1126# CONFIG_CRYPTO_AUTHENC is not set
1223# 1127CONFIG_CRYPTO_HW=y
1224# Hardware crypto devices
1225#
1226 1128
1227# 1129#
1228# Library routines 1130# Library routines
@@ -1232,6 +1134,7 @@ CONFIG_BITREVERSE=y
1232# CONFIG_CRC16 is not set 1134# CONFIG_CRC16 is not set
1233# CONFIG_CRC_ITU_T is not set 1135# CONFIG_CRC_ITU_T is not set
1234CONFIG_CRC32=y 1136CONFIG_CRC32=y
1137# CONFIG_CRC7 is not set
1235# CONFIG_LIBCRC32C is not set 1138# CONFIG_LIBCRC32C is not set
1236CONFIG_HAS_IOMEM=y 1139CONFIG_HAS_IOMEM=y
1237CONFIG_HAS_IOPORT=y 1140CONFIG_HAS_IOPORT=y
diff --git a/arch/sh/drivers/pci/pci-st40.c b/arch/sh/drivers/pci/pci-st40.c
index 1502a14386b..0814a5afe9b 100644
--- a/arch/sh/drivers/pci/pci-st40.c
+++ b/arch/sh/drivers/pci/pci-st40.c
@@ -114,7 +114,7 @@ static struct pci_err int_error[]={
114 { INT_MWPDI, "MWPDI: PERR from target at data write"}, 114 { INT_MWPDI, "MWPDI: PERR from target at data write"},
115 { INT_MRDPEI, "MRDPEI: Master read data parity error"} 115 { INT_MRDPEI, "MRDPEI: Master read data parity error"}
116}; 116};
117#define NUM_PCI_INT_ERRS (sizeof(int_error)/sizeof(struct pci_err)) 117#define NUM_PCI_INT_ERRS ARRAY_SIZE(int_error)
118 118
119static struct pci_err aint_error[]={ 119static struct pci_err aint_error[]={
120 { AINT_MBI, "MBI: Master broken"}, 120 { AINT_MBI, "MBI: Master broken"},
@@ -126,7 +126,7 @@ static struct pci_err aint_error[]={
126 { AINT_WDPE, "WDPE: Write data parity"} 126 { AINT_WDPE, "WDPE: Write data parity"}
127}; 127};
128 128
129#define NUM_PCI_AINT_ERRS (sizeof(aint_error)/sizeof(struct pci_err)) 129#define NUM_PCI_AINT_ERRS ARRAY_SIZE(aint_error)
130 130
131static void print_pci_errors(unsigned reg,struct pci_err *error,int num_errors) 131static void print_pci_errors(unsigned reg,struct pci_err *error,int num_errors)
132{ 132{
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index 5da32541488..56ea7b269b5 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -49,7 +49,6 @@ static void enable_ipr_irq(unsigned int irq)
49 * bits/4. This is to make it easier to read the value directly from the 49 * bits/4. This is to make it easier to read the value directly from the
50 * datasheets. The IPR address is calculated using the ipr_offset table. 50 * datasheets. The IPR address is calculated using the ipr_offset table.
51 */ 51 */
52
53void register_ipr_controller(struct ipr_desc *desc) 52void register_ipr_controller(struct ipr_desc *desc)
54{ 53{
55 int i; 54 int i;
@@ -71,12 +70,4 @@ void register_ipr_controller(struct ipr_desc *desc)
71 disable_ipr_irq(p->irq); 70 disable_ipr_irq(p->irq);
72 } 71 }
73} 72}
74
75EXPORT_SYMBOL(register_ipr_controller); 73EXPORT_SYMBOL(register_ipr_controller);
76
77#if !defined(CONFIG_CPU_HAS_PINT_IRQ)
78int ipr_irq_demux(int irq)
79{
80 return irq;
81}
82#endif
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index 55f66104431..b9c6547c4a9 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -14,6 +14,32 @@
14#include <asm/mmzone.h> 14#include <asm/mmzone.h>
15#include <asm/sci.h> 15#include <asm/sci.h>
16 16
17static struct resource usbf_resources[] = {
18 [0] = {
19 .name = "m66592_udc",
20 .start = 0xA4480000,
21 .end = 0xA44800FF,
22 .flags = IORESOURCE_MEM,
23 },
24 [1] = {
25 .name = "m66592_udc",
26 .start = 65,
27 .end = 65,
28 .flags = IORESOURCE_IRQ,
29 },
30};
31
32static struct platform_device usbf_device = {
33 .name = "m66592_udc",
34 .id = -1,
35 .dev = {
36 .dma_mask = NULL,
37 .coherent_dma_mask = 0xffffffff,
38 },
39 .num_resources = ARRAY_SIZE(usbf_resources),
40 .resource = usbf_resources,
41};
42
17static struct plat_sci_port sci_platform_data[] = { 43static struct plat_sci_port sci_platform_data[] = {
18 { 44 {
19 .mapbase = 0xffe00000, 45 .mapbase = 0xffe00000,
@@ -47,6 +73,7 @@ static struct platform_device sci_device = {
47}; 73};
48 74
49static struct platform_device *sh7722_devices[] __initdata = { 75static struct platform_device *sh7722_devices[] __initdata = {
76 &usbf_device,
50 &sci_device, 77 &sci_device,
51}; 78};
52 79
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 4b49d03ffbd..348da194ec9 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -69,7 +69,7 @@ unlock:
69} 69}
70#endif 70#endif
71 71
72#ifdef CONFIG_4KSTACKS 72#ifdef CONFIG_IRQSTACKS
73/* 73/*
74 * per-CPU IRQ handling contexts (thread information and stack) 74 * per-CPU IRQ handling contexts (thread information and stack)
75 */ 75 */
@@ -85,7 +85,7 @@ static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
85asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) 85asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
86{ 86{
87 struct pt_regs *old_regs = set_irq_regs(regs); 87 struct pt_regs *old_regs = set_irq_regs(regs);
88#ifdef CONFIG_4KSTACKS 88#ifdef CONFIG_IRQSTACKS
89 union irq_ctx *curctx, *irqctx; 89 union irq_ctx *curctx, *irqctx;
90#endif 90#endif
91 91
@@ -109,7 +109,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
109 109
110 irq = irq_demux(evt2irq(irq)); 110 irq = irq_demux(evt2irq(irq));
111 111
112#ifdef CONFIG_4KSTACKS 112#ifdef CONFIG_IRQSTACKS
113 curctx = (union irq_ctx *)current_thread_info(); 113 curctx = (union irq_ctx *)current_thread_info();
114 irqctx = hardirq_ctx[smp_processor_id()]; 114 irqctx = hardirq_ctx[smp_processor_id()];
115 115
@@ -157,7 +157,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
157 return 1; 157 return 1;
158} 158}
159 159
160#ifdef CONFIG_4KSTACKS 160#ifdef CONFIG_IRQSTACKS
161static char softirq_stack[NR_CPUS * THREAD_SIZE] 161static char softirq_stack[NR_CPUS * THREAD_SIZE]
162 __attribute__((__section__(".bss.page_aligned"))); 162 __attribute__((__section__(".bss.page_aligned")));
163 163
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index b749403f6b3..0b8c45d53a4 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -32,12 +32,6 @@
32#include <asm/clock.h> 32#include <asm/clock.h>
33#include <asm/mmu_context.h> 33#include <asm/mmu_context.h>
34 34
35extern void * __rd_start, * __rd_end;
36
37/*
38 * Machine setup..
39 */
40
41/* 35/*
42 * Initialize loops_per_jiffy as 10000000 (1000MIPS). 36 * Initialize loops_per_jiffy as 10000000 (1000MIPS).
43 * This value will be used at the very early stage of serial setup. 37 * This value will be used at the very early stage of serial setup.
@@ -63,33 +57,25 @@ struct screen_info screen_info;
63 57
64extern int root_mountflags; 58extern int root_mountflags;
65 59
66/*
67 * This is set up by the setup-routine at boot-time
68 */
69#define PARAM ((unsigned char *)empty_zero_page)
70
71#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
72#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
73#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
74#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
75#define INITRD_START (*(unsigned long *) (PARAM+0x010))
76#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014))
77/* ... */
78#define COMMAND_LINE ((char *) (PARAM+0x100))
79
80#define RAMDISK_IMAGE_START_MASK 0x07FF 60#define RAMDISK_IMAGE_START_MASK 0x07FF
81#define RAMDISK_PROMPT_FLAG 0x8000 61#define RAMDISK_PROMPT_FLAG 0x8000
82#define RAMDISK_LOAD_FLAG 0x4000 62#define RAMDISK_LOAD_FLAG 0x4000
83 63
84static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, }; 64static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
85 65
86static struct resource code_resource = { .name = "Kernel code", }; 66static struct resource code_resource = {
87static struct resource data_resource = { .name = "Kernel data", }; 67 .name = "Kernel code",
68 .flags = IORESOURCE_BUSY | IORESOURCE_MEM,
69};
70
71static struct resource data_resource = {
72 .name = "Kernel data",
73 .flags = IORESOURCE_BUSY | IORESOURCE_MEM,
74};
88 75
89unsigned long memory_start; 76unsigned long memory_start;
90EXPORT_SYMBOL(memory_start); 77EXPORT_SYMBOL(memory_start);
91 78unsigned long memory_end = 0;
92unsigned long memory_end;
93EXPORT_SYMBOL(memory_end); 79EXPORT_SYMBOL(memory_end);
94 80
95static int __init early_parse_mem(char *p) 81static int __init early_parse_mem(char *p)
@@ -195,14 +181,7 @@ void __init setup_bootmem_allocator(unsigned long free_pfn)
195 sparse_memory_present_with_active_regions(0); 181 sparse_memory_present_with_active_regions(0);
196 182
197#ifdef CONFIG_BLK_DEV_INITRD 183#ifdef CONFIG_BLK_DEV_INITRD
198 ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); 184 ROOT_DEV = Root_RAM0;
199 if (&__rd_start != &__rd_end) {
200 LOADER_TYPE = 1;
201 INITRD_START = PHYSADDR((unsigned long)&__rd_start) -
202 __MEMORY_START;
203 INITRD_SIZE = (unsigned long)&__rd_end -
204 (unsigned long)&__rd_start;
205 }
206 185
207 if (LOADER_TYPE && INITRD_START) { 186 if (LOADER_TYPE && INITRD_START) {
208 if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { 187 if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
@@ -265,7 +244,8 @@ void __init setup_arch(char **cmdline_p)
265 data_resource.end = virt_to_phys(_edata)-1; 244 data_resource.end = virt_to_phys(_edata)-1;
266 245
267 memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; 246 memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
268 memory_end = memory_start + __MEMORY_SIZE; 247 if (!memory_end)
248 memory_end = memory_start + __MEMORY_SIZE;
269 249
270#ifdef CONFIG_CMDLINE_BOOL 250#ifdef CONFIG_CMDLINE_BOOL
271 strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line)); 251 strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line));
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index 6d5abba2ee2..0956fb3681a 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -1,4 +1,4 @@
1/* $Id: vmlinux.lds.S,v 1.8 2003/05/16 17:18:14 lethal Exp $ 1/*
2 * ld script to make SuperH Linux kernel 2 * ld script to make SuperH Linux kernel
3 * Written by Niibe Yutaka 3 * Written by Niibe Yutaka
4 */ 4 */
@@ -15,121 +15,124 @@ OUTPUT_ARCH(sh)
15ENTRY(_start) 15ENTRY(_start)
16SECTIONS 16SECTIONS
17{ 17{
18 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET; 18 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
19 _text = .; /* Text and read-only data */ 19 _text = .; /* Text and read-only data */
20 text = .; /* Text and read-only data */ 20
21 .empty_zero_page : { 21 .empty_zero_page : {
22 *(.empty_zero_page) 22 *(.empty_zero_page)
23 } = 0 23 } = 0
24 .text : { 24
25 *(.text.head) 25 .text : {
26 TEXT_TEXT 26 *(.text.head)
27 SCHED_TEXT 27 TEXT_TEXT
28 LOCK_TEXT 28 SCHED_TEXT
29 *(.fixup) 29 LOCK_TEXT
30 *(.gnu.warning) 30 KPROBES_TEXT
31 *(.fixup)
32 *(.gnu.warning)
31 } = 0x0009 33 } = 0x0009
32 34
33 . = ALIGN(16); /* Exception table */ 35 . = ALIGN(16); /* Exception table */
34 __start___ex_table = .; 36 __start___ex_table = .;
35 __ex_table : { *(__ex_table) } 37 __ex_table : { *(__ex_table) }
36 __stop___ex_table = .; 38 __stop___ex_table = .;
39
40 _etext = .; /* End of text section */
37 41
38 _etext = .; /* End of text section */ 42 BUG_TABLE
43 NOTES
44 RO_DATA(PAGE_SIZE)
39 45
40 RODATA 46 . = ALIGN(THREAD_SIZE);
47 .data : { /* Data */
48 *(.data.init_task)
41 49
42 BUG_TABLE 50 . = ALIGN(L1_CACHE_BYTES);
51 *(.data.cacheline_aligned)
43 52
44 .data : { /* Data */ 53 . = ALIGN(L1_CACHE_BYTES);
45 DATA_DATA 54 *(.data.read_mostly)
46 55
47 /* Align the initial ramdisk image (INITRD) on page boundaries. */ 56 . = ALIGN(PAGE_SIZE);
48 . = ALIGN(PAGE_SIZE); 57 *(.data.page_aligned)
49 __rd_start = .;
50 *(.initrd)
51 . = ALIGN(PAGE_SIZE);
52 __rd_end = .;
53 58
54 CONSTRUCTORS 59 __nosave_begin = .;
60 *(.data.nosave)
61 . = ALIGN(PAGE_SIZE);
62 __nosave_end = .;
63
64 DATA_DATA
65 CONSTRUCTORS
55 } 66 }
56 67
57 . = ALIGN(PAGE_SIZE); 68 _edata = .; /* End of data section */
58 .data.page_aligned : { *(.data.page_aligned) }
59 __nosave_begin = .;
60 .data_nosave : { *(.data.nosave) }
61 . = ALIGN(PAGE_SIZE);
62 __nosave_end = .;
63
64 PERCPU(PAGE_SIZE)
65
66 . = ALIGN(L1_CACHE_BYTES);
67 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
68
69 _edata = .; /* End of data section */
70
71 . = ALIGN(THREAD_SIZE); /* init_task */
72 .data.init_task : { *(.data.init_task) }
73
74 . = ALIGN(PAGE_SIZE); /* Init code and data */
75 __init_begin = .;
76 _sinittext = .;
77 .init.text : { *(.init.text) }
78 _einittext = .;
79 .init.data : { *(.init.data) }
80 . = ALIGN(16);
81 __setup_start = .;
82 .init.setup : { *(.init.setup) }
83 __setup_end = .;
84 __initcall_start = .;
85 .initcall.init : {
86 INITCALLS
87 }
88 __initcall_end = .;
89 __con_initcall_start = .;
90 .con_initcall.init : { *(.con_initcall.init) }
91 __con_initcall_end = .;
92 SECURITY_INIT
93
94 /* .exit.text is discarded at runtime, not link time, to deal with
95 references from .rodata */
96 .exit.text : { *(.exit.text) }
97 .exit.data : { *(.exit.data) }
98 69
99#ifdef CONFIG_BLK_DEV_INITRD 70 . = ALIGN(PAGE_SIZE); /* Init code and data */
100 . = ALIGN(PAGE_SIZE); 71 __init_begin = .;
72 _sinittext = .;
73 .init.text : { *(.init.text) }
74 _einittext = .;
75 .init.data : { *(.init.data) }
76
77 . = ALIGN(16);
78 __setup_start = .;
79 .init.setup : { *(.init.setup) }
80 __setup_end = .;
101 81
102 __initramfs_start = .; 82 __initcall_start = .;
103 .init.ramfs : { *(.init.ramfs) } 83 .initcall.init : {
104 __initramfs_end = .; 84 INITCALLS
85 }
86 __initcall_end = .;
87 __con_initcall_start = .;
88 .con_initcall.init : { *(.con_initcall.init) }
89 __con_initcall_end = .;
90
91 SECURITY_INIT
92
93#ifdef CONFIG_BLK_DEV_INITRD
94 . = ALIGN(PAGE_SIZE);
95 __initramfs_start = .;
96 .init.ramfs : { *(.init.ramfs) }
97 __initramfs_end = .;
105#endif 98#endif
106 99
107 . = ALIGN(4);
108 __machvec_start = .;
109 .machvec.init : { *(.machvec.init) }
110 __machvec_end = .;
111
112 . = ALIGN(PAGE_SIZE);
113 .bss : {
114 __init_end = .;
115 __bss_start = .; /* BSS */
116 *(.bss.page_aligned)
117 *(.bss)
118 . = ALIGN(4); 100 . = ALIGN(4);
119 _ebss = .; /* uClinux MTD sucks */ 101 __machvec_start = .;
120 _end = . ; 102 .machvec.init : { *(.machvec.init) }
121 } 103 __machvec_end = .;
122 104
123 /* When something in the kernel is NOT compiled as a module, the 105 PERCPU(PAGE_SIZE)
124 * module cleanup code and data are put into these segments. Both 106
125 * can then be thrown away, as cleanup code is never called unless 107 /*
126 * it's a module. 108 * .exit.text is discarded at runtime, not link time, to deal with
127 */ 109 * references from __bug_table
128 /DISCARD/ : { 110 */
129 *(.exitcall.exit) 111 .exit.text : { *(.exit.text) }
112 .exit.data : { *(.exit.data) }
113
114 . = ALIGN(PAGE_SIZE);
115 .bss : {
116 __init_end = .;
117 __bss_start = .; /* BSS */
118 *(.bss.page_aligned)
119 *(.bss)
120 *(COMMON)
121 . = ALIGN(4);
122 _ebss = .; /* uClinux MTD sucks */
123 _end = . ;
130 } 124 }
131 125
132 STABS_DEBUG 126 /*
127 * When something in the kernel is NOT compiled as a module, the
128 * module cleanup code and data are put into these segments. Both
129 * can then be thrown away, as cleanup code is never called unless
130 * it's a module.
131 */
132 /DISCARD/ : {
133 *(.exitcall.exit)
134 }
133 135
134 DWARF_DEBUG 136 STABS_DEBUG
137 DWARF_DEBUG
135} 138}
diff --git a/arch/sh/kernel/vsyscall/vsyscall.lds.S b/arch/sh/kernel/vsyscall/vsyscall.lds.S
index c9bf2af35d3..6d59ee7c23d 100644
--- a/arch/sh/kernel/vsyscall/vsyscall.lds.S
+++ b/arch/sh/kernel/vsyscall/vsyscall.lds.S
@@ -38,7 +38,10 @@ SECTIONS
38 .text : { *(.text) } :text =0x90909090 38 .text : { *(.text) } :text =0x90909090
39 .note : { *(.note.*) } :text :note 39 .note : { *(.note.*) } :text :note
40 .eh_frame_hdr : { *(.eh_frame_hdr ) } :text :eh_frame_hdr 40 .eh_frame_hdr : { *(.eh_frame_hdr ) } :text :eh_frame_hdr
41 .eh_frame : { KEEP (*(.eh_frame)) } :text 41 .eh_frame : {
42 KEEP (*(.eh_frame))
43 LONG (0)
44 } :text
42 .dynamic : { *(.dynamic) } :text :dynamic 45 .dynamic : { *(.dynamic) } :text :dynamic
43 .useless : { 46 .useless : {
44 *(.got.plt) *(.got) 47 *(.got.plt) *(.got)
diff --git a/arch/sh/mm/copy_page.S b/arch/sh/mm/copy_page.S
index a81dbdb0559..3d8409daa4b 100644
--- a/arch/sh/mm/copy_page.S
+++ b/arch/sh/mm/copy_page.S
@@ -255,7 +255,11 @@ EX( mov.l @r5+,r8 )
255EX( mov.l @r5+,r9 ) 255EX( mov.l @r5+,r9 )
256EX( mov.l @r5+,r10 ) 256EX( mov.l @r5+,r10 )
257EX( mov.l @r5+,r11 ) 257EX( mov.l @r5+,r11 )
258#ifdef CONFIG_CPU_SH4
258EX( movca.l r0,@r4 ) 259EX( movca.l r0,@r4 )
260#else
261EX( mov.l r0,@r4 )
262#endif
259 add #-32, r6 263 add #-32, r6
260EX( mov.l r1,@(4,r4) ) 264EX( mov.l r1,@(4,r4) )
261 mov #32, r0 265 mov #32, r0
diff --git a/arch/sh/oprofile/op_model_sh7750.c b/arch/sh/oprofile/op_model_sh7750.c
index ebee7e24ede..6b9a98e0700 100644
--- a/arch/sh/oprofile/op_model_sh7750.c
+++ b/arch/sh/oprofile/op_model_sh7750.c
@@ -16,7 +16,6 @@
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/fs.h> 18#include <linux/fs.h>
19#include <linux/notifier.h>
20#include <asm/uaccess.h> 19#include <asm/uaccess.h>
21#include <asm/io.h> 20#include <asm/io.h>
22 21
@@ -44,8 +43,6 @@
44 */ 43 */
45#define NR_CNTRS 2 44#define NR_CNTRS 2
46 45
47extern const char *get_cpu_subtype(void);
48
49struct op_counter_config { 46struct op_counter_config {
50 unsigned long enabled; 47 unsigned long enabled;
51 unsigned long event; 48 unsigned long event;
@@ -111,17 +108,12 @@ static struct op_counter_config ctr[NR_CNTRS];
111 * behavior. 108 * behavior.
112 */ 109 */
113 110
114static int sh7750_timer_notify(struct notifier_block *self, 111static int sh7750_timer_notify(struct pt_regs *regs)
115 unsigned long val, void *regs)
116{ 112{
117 oprofile_add_sample((struct pt_regs *)regs, 0); 113 oprofile_add_sample(regs, 0);
118 return 0; 114 return 0;
119} 115}
120 116
121static struct notifier_block sh7750_timer_notifier = {
122 .notifier_call = sh7750_timer_notify,
123};
124
125static u64 sh7750_read_counter(int counter) 117static u64 sh7750_read_counter(int counter)
126{ 118{
127 u32 hi, lo; 119 u32 hi, lo;
@@ -240,7 +232,7 @@ static int sh7750_perf_counter_start(void)
240 ctrl_outw(pmcr | PMCR_ENABLE, PMCR2); 232 ctrl_outw(pmcr | PMCR_ENABLE, PMCR2);
241 } 233 }
242 234
243 return register_profile_notifier(&sh7750_timer_notifier); 235 return register_timer_hook(sh7750_timer_notify);
244} 236}
245 237
246static void sh7750_perf_counter_stop(void) 238static void sh7750_perf_counter_stop(void)
@@ -248,7 +240,7 @@ static void sh7750_perf_counter_stop(void)
248 ctrl_outw(ctrl_inw(PMCR1) & ~PMCR_PMEN, PMCR1); 240 ctrl_outw(ctrl_inw(PMCR1) & ~PMCR_PMEN, PMCR1);
249 ctrl_outw(ctrl_inw(PMCR2) & ~PMCR_PMEN, PMCR2); 241 ctrl_outw(ctrl_inw(PMCR2) & ~PMCR_PMEN, PMCR2);
250 242
251 unregister_profile_notifier(&sh7750_timer_notifier); 243 unregister_timer_hook(sh7750_timer_notify);
252} 244}
253 245
254static struct oprofile_operations sh7750_perf_counter_ops = { 246static struct oprofile_operations sh7750_perf_counter_ops = {
@@ -257,13 +249,13 @@ static struct oprofile_operations sh7750_perf_counter_ops = {
257 .stop = sh7750_perf_counter_stop, 249 .stop = sh7750_perf_counter_stop,
258}; 250};
259 251
260int __init oprofile_arch_init(struct oprofile_operations **ops) 252int __init oprofile_arch_init(struct oprofile_operations *ops)
261{ 253{
262 if (!(current_cpu_data.flags & CPU_HAS_PERF_COUNTER)) 254 if (!(current_cpu_data.flags & CPU_HAS_PERF_COUNTER))
263 return -ENODEV; 255 return -ENODEV;
264 256
265 sh7750_perf_counter_ops.cpu_type = (char *)get_cpu_subtype(); 257 ops = &sh7750_perf_counter_ops;
266 *ops = &sh7750_perf_counter_ops; 258 ops->cpu_type = (char *)get_cpu_subtype(&current_cpu_data);
267 259
268 printk(KERN_INFO "oprofile: using SH-4 (%s) performance monitoring.\n", 260 printk(KERN_INFO "oprofile: using SH-4 (%s) performance monitoring.\n",
269 sh7750_perf_counter_ops.cpu_type); 261 sh7750_perf_counter_ops.cpu_type);
diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types
index 439bfe3d29a..ff071693325 100644
--- a/arch/sh/tools/mach-types
+++ b/arch/sh/tools/mach-types
@@ -1,26 +1,35 @@
1# 1#
2# List of boards. 2# MACH_<xxx> CONFIG_<xxx>
3# 3#
4 4
5# 5#
6# MACH_<xxx> CONFIG_<xxx> 6# List of board groups.
7# 7#
8SE SH_SOLUTION_ENGINE 8SE SH_SOLUTION_ENGINE
97751SE SH_7751_SOLUTION_ENGINE 9HIGHLANDER SH_HIGHLANDER
107722SE SH_7722_SOLUTION_ENGINE 10RTS7751R2D SH_RTS7751R2D
117343SE SH_7343_SOLUTION_ENGINE 11
12#
13# List of companion chips / MFDs.
14#
15HD64461 HD64461
16HD64465 HD64465
17
18#
19# List of boards.
20#
127206SE SH_7206_SOLUTION_ENGINE 217206SE SH_7206_SOLUTION_ENGINE
227343SE SH_7343_SOLUTION_ENGINE
137619SE SH_7619_SOLUTION_ENGINE 237619SE SH_7619_SOLUTION_ENGINE
247722SE SH_7722_SOLUTION_ENGINE
257751SE SH_7751_SOLUTION_ENGINE
147780SE SH_7780_SOLUTION_ENGINE 267780SE SH_7780_SOLUTION_ENGINE
157751SYSTEMH SH_7751_SYSTEMH 277751SYSTEMH SH_7751_SYSTEMH
16HP6XX SH_HP6XX 28HP6XX SH_HP6XX
17HD64461 HD64461
18HD64465 HD64465
19DREAMCAST SH_DREAMCAST 29DREAMCAST SH_DREAMCAST
20MPC1211 SH_MPC1211 30MPC1211 SH_MPC1211
21SNAPGEAR SH_SECUREEDGE5410 31SNAPGEAR SH_SECUREEDGE5410
22HS7751RVOIP SH_HS7751RVOIP 32HS7751RVOIP SH_HS7751RVOIP
23RTS7751R2D SH_RTS7751R2D
24EDOSK7705 SH_EDOSK7705 33EDOSK7705 SH_EDOSK7705
25SH4202_MICRODEV SH_SH4202_MICRODEV 34SH4202_MICRODEV SH_SH4202_MICRODEV
26SH03 SH_SH03 35SH03 SH_SH03
@@ -32,3 +41,7 @@ TITAN SH_TITAN
32SHMIN SH_SHMIN 41SHMIN SH_SHMIN
337710VOIPGW SH_7710VOIPGW 427710VOIPGW SH_7710VOIPGW
34LBOXRE2 SH_LBOX_RE2 43LBOXRE2 SH_LBOX_RE2
44X3PROTO SH_X3PROTO
45MAGICPANELR2 SH_MAGIC_PANEL_R2
46R2D_PLUS RTS7751R2D_PLUS
47R2D_1 RTS7751R2D_1
diff --git a/arch/sh64/configs/cayman_defconfig b/arch/sh64/configs/cayman_defconfig
index 91b59118c1b..75552bb0140 100644
--- a/arch/sh64/configs/cayman_defconfig
+++ b/arch/sh64/configs/cayman_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc8 3# Linux kernel version: 2.6.24-rc1
4# Tue Oct 9 15:37:16 2007 4# Fri Nov 2 14:35:27 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH64=y 7CONFIG_SUPERH64=y
@@ -36,6 +36,10 @@ CONFIG_POSIX_MQUEUE=y
36# CONFIG_AUDIT is not set 36# CONFIG_AUDIT is not set
37# CONFIG_IKCONFIG is not set 37# CONFIG_IKCONFIG is not set
38CONFIG_LOG_BUF_SHIFT=14 38CONFIG_LOG_BUF_SHIFT=14
39# CONFIG_CGROUPS is not set
40CONFIG_FAIR_GROUP_SCHED=y
41CONFIG_FAIR_USER_SCHED=y
42# CONFIG_FAIR_CGROUP_SCHED is not set
39CONFIG_SYSFS_DEPRECATED=y 43CONFIG_SYSFS_DEPRECATED=y
40# CONFIG_RELAY is not set 44# CONFIG_RELAY is not set
41# CONFIG_BLK_DEV_INITRD is not set 45# CONFIG_BLK_DEV_INITRD is not set
@@ -148,6 +152,7 @@ CONFIG_FLATMEM_MANUAL=y
148CONFIG_FLATMEM=y 152CONFIG_FLATMEM=y
149CONFIG_FLAT_NODE_MEM_MAP=y 153CONFIG_FLAT_NODE_MEM_MAP=y
150# CONFIG_SPARSEMEM_STATIC is not set 154# CONFIG_SPARSEMEM_STATIC is not set
155# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
151CONFIG_SPLIT_PTLOCK_CPUS=4 156CONFIG_SPLIT_PTLOCK_CPUS=4
152# CONFIG_RESOURCES_64BIT is not set 157# CONFIG_RESOURCES_64BIT is not set
153CONFIG_ZONE_DMA_FLAG=0 158CONFIG_ZONE_DMA_FLAG=0
@@ -160,10 +165,6 @@ CONFIG_PCI=y
160CONFIG_SH_PCIDMA_NONCOHERENT=y 165CONFIG_SH_PCIDMA_NONCOHERENT=y
161# CONFIG_ARCH_SUPPORTS_MSI is not set 166# CONFIG_ARCH_SUPPORTS_MSI is not set
162# CONFIG_PCI_DEBUG is not set 167# CONFIG_PCI_DEBUG is not set
163
164#
165# PCCARD (PCMCIA/CardBus) support
166#
167# CONFIG_PCCARD is not set 168# CONFIG_PCCARD is not set
168# CONFIG_HOTPLUG_PCI is not set 169# CONFIG_HOTPLUG_PCI is not set
169 170
@@ -209,6 +210,7 @@ CONFIG_IP_PNP=y
209CONFIG_INET_XFRM_MODE_TRANSPORT=y 210CONFIG_INET_XFRM_MODE_TRANSPORT=y
210CONFIG_INET_XFRM_MODE_TUNNEL=y 211CONFIG_INET_XFRM_MODE_TUNNEL=y
211CONFIG_INET_XFRM_MODE_BEET=y 212CONFIG_INET_XFRM_MODE_BEET=y
213# CONFIG_INET_LRO is not set
212CONFIG_INET_DIAG=y 214CONFIG_INET_DIAG=y
213CONFIG_INET_TCP_DIAG=y 215CONFIG_INET_TCP_DIAG=y
214# CONFIG_TCP_CONG_ADVANCED is not set 216# CONFIG_TCP_CONG_ADVANCED is not set
@@ -234,10 +236,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
234# CONFIG_LAPB is not set 236# CONFIG_LAPB is not set
235# CONFIG_ECONET is not set 237# CONFIG_ECONET is not set
236# CONFIG_WAN_ROUTER is not set 238# CONFIG_WAN_ROUTER is not set
237
238#
239# QoS and/or fair queueing
240#
241# CONFIG_NET_SCHED is not set 239# CONFIG_NET_SCHED is not set
242 240
243# 241#
@@ -266,6 +264,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
266# 264#
267# Generic Driver Options 265# Generic Driver Options
268# 266#
267CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
269CONFIG_STANDALONE=y 268CONFIG_STANDALONE=y
270CONFIG_PREVENT_FIRMWARE_BUILD=y 269CONFIG_PREVENT_FIRMWARE_BUILD=y
271# CONFIG_FW_LOADER is not set 270# CONFIG_FW_LOADER is not set
@@ -333,6 +332,7 @@ CONFIG_SCSI_SPI_ATTRS=y
333# CONFIG_SCSI_FC_ATTRS is not set 332# CONFIG_SCSI_FC_ATTRS is not set
334# CONFIG_SCSI_ISCSI_ATTRS is not set 333# CONFIG_SCSI_ISCSI_ATTRS is not set
335# CONFIG_SCSI_SAS_LIBSAS is not set 334# CONFIG_SCSI_SAS_LIBSAS is not set
335# CONFIG_SCSI_SRP_ATTRS is not set
336CONFIG_SCSI_LOWLEVEL=y 336CONFIG_SCSI_LOWLEVEL=y
337# CONFIG_ISCSI_TCP is not set 337# CONFIG_ISCSI_TCP is not set
338# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 338# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
@@ -370,14 +370,7 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
370# CONFIG_SCSI_SRP is not set 370# CONFIG_SCSI_SRP is not set
371# CONFIG_ATA is not set 371# CONFIG_ATA is not set
372# CONFIG_MD is not set 372# CONFIG_MD is not set
373
374#
375# Fusion MPT device support
376#
377# CONFIG_FUSION is not set 373# CONFIG_FUSION is not set
378# CONFIG_FUSION_SPI is not set
379# CONFIG_FUSION_FC is not set
380# CONFIG_FUSION_SAS is not set
381 374
382# 375#
383# IEEE 1394 (FireWire) support 376# IEEE 1394 (FireWire) support
@@ -392,6 +385,8 @@ CONFIG_NETDEVICES=y
392# CONFIG_MACVLAN is not set 385# CONFIG_MACVLAN is not set
393# CONFIG_EQUALIZER is not set 386# CONFIG_EQUALIZER is not set
394# CONFIG_TUN is not set 387# CONFIG_TUN is not set
388# CONFIG_VETH is not set
389# CONFIG_IP1000 is not set
395# CONFIG_ARCNET is not set 390# CONFIG_ARCNET is not set
396# CONFIG_PHYLIB is not set 391# CONFIG_PHYLIB is not set
397CONFIG_NET_ETHERNET=y 392CONFIG_NET_ETHERNET=y
@@ -402,6 +397,7 @@ CONFIG_NET_ETHERNET=y
402# CONFIG_CASSINI is not set 397# CONFIG_CASSINI is not set
403# CONFIG_NET_VENDOR_3COM is not set 398# CONFIG_NET_VENDOR_3COM is not set
404# CONFIG_SMC91X is not set 399# CONFIG_SMC91X is not set
400# CONFIG_SMC911X is not set
405CONFIG_NET_TULIP=y 401CONFIG_NET_TULIP=y
406# CONFIG_DE2104X is not set 402# CONFIG_DE2104X is not set
407CONFIG_TULIP=y 403CONFIG_TULIP=y
@@ -413,13 +409,16 @@ CONFIG_TULIP=y
413# CONFIG_DM9102 is not set 409# CONFIG_DM9102 is not set
414# CONFIG_ULI526X is not set 410# CONFIG_ULI526X is not set
415# CONFIG_HP100 is not set 411# CONFIG_HP100 is not set
412# CONFIG_IBM_NEW_EMAC_ZMII is not set
413# CONFIG_IBM_NEW_EMAC_RGMII is not set
414# CONFIG_IBM_NEW_EMAC_TAH is not set
415# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
416CONFIG_NET_PCI=y 416CONFIG_NET_PCI=y
417# CONFIG_PCNET32 is not set 417# CONFIG_PCNET32 is not set
418# CONFIG_AMD8111_ETH is not set 418# CONFIG_AMD8111_ETH is not set
419# CONFIG_ADAPTEC_STARFIRE is not set 419# CONFIG_ADAPTEC_STARFIRE is not set
420# CONFIG_B44 is not set 420# CONFIG_B44 is not set
421# CONFIG_FORCEDETH is not set 421# CONFIG_FORCEDETH is not set
422# CONFIG_DGRS is not set
423# CONFIG_EEPRO100 is not set 422# CONFIG_EEPRO100 is not set
424# CONFIG_E100 is not set 423# CONFIG_E100 is not set
425# CONFIG_FEALNX is not set 424# CONFIG_FEALNX is not set
@@ -437,6 +436,7 @@ CONFIG_NETDEV_1000=y
437# CONFIG_ACENIC is not set 436# CONFIG_ACENIC is not set
438# CONFIG_DL2K is not set 437# CONFIG_DL2K is not set
439# CONFIG_E1000 is not set 438# CONFIG_E1000 is not set
439# CONFIG_E1000E is not set
440# CONFIG_NS83820 is not set 440# CONFIG_NS83820 is not set
441# CONFIG_HAMACHI is not set 441# CONFIG_HAMACHI is not set
442# CONFIG_YELLOWFIN is not set 442# CONFIG_YELLOWFIN is not set
@@ -453,11 +453,14 @@ CONFIG_NETDEV_1000=y
453CONFIG_NETDEV_10000=y 453CONFIG_NETDEV_10000=y
454# CONFIG_CHELSIO_T1 is not set 454# CONFIG_CHELSIO_T1 is not set
455# CONFIG_CHELSIO_T3 is not set 455# CONFIG_CHELSIO_T3 is not set
456# CONFIG_IXGBE is not set
456# CONFIG_IXGB is not set 457# CONFIG_IXGB is not set
457# CONFIG_S2IO is not set 458# CONFIG_S2IO is not set
458# CONFIG_MYRI10GE is not set 459# CONFIG_MYRI10GE is not set
459# CONFIG_NETXEN_NIC is not set 460# CONFIG_NETXEN_NIC is not set
461# CONFIG_NIU is not set
460# CONFIG_MLX4_CORE is not set 462# CONFIG_MLX4_CORE is not set
463# CONFIG_TEHUTI is not set
461# CONFIG_TR is not set 464# CONFIG_TR is not set
462 465
463# 466#
@@ -493,7 +496,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
493CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 496CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
494CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 497CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
495# CONFIG_INPUT_JOYDEV is not set 498# CONFIG_INPUT_JOYDEV is not set
496# CONFIG_INPUT_TSDEV is not set
497# CONFIG_INPUT_EVDEV is not set 499# CONFIG_INPUT_EVDEV is not set
498# CONFIG_INPUT_EVBUG is not set 500# CONFIG_INPUT_EVBUG is not set
499 501
@@ -561,23 +563,9 @@ CONFIG_UNIX98_PTYS=y
561CONFIG_LEGACY_PTYS=y 563CONFIG_LEGACY_PTYS=y
562CONFIG_LEGACY_PTY_COUNT=256 564CONFIG_LEGACY_PTY_COUNT=256
563# CONFIG_IPMI_HANDLER is not set 565# CONFIG_IPMI_HANDLER is not set
564CONFIG_WATCHDOG=y
565# CONFIG_WATCHDOG_NOWAYOUT is not set
566
567#
568# Watchdog Device Drivers
569#
570# CONFIG_SOFT_WATCHDOG is not set
571
572#
573# PCI-based Watchdog Cards
574#
575# CONFIG_PCIPCWATCHDOG is not set
576# CONFIG_WDTPCI is not set
577CONFIG_HW_RANDOM=y 566CONFIG_HW_RANDOM=y
578# CONFIG_R3964 is not set 567# CONFIG_R3964 is not set
579# CONFIG_APPLICOM is not set 568# CONFIG_APPLICOM is not set
580# CONFIG_DRM is not set
581# CONFIG_RAW_DRIVER is not set 569# CONFIG_RAW_DRIVER is not set
582# CONFIG_TCG_TPM is not set 570# CONFIG_TCG_TPM is not set
583CONFIG_DEVPORT=y 571CONFIG_DEVPORT=y
@@ -644,8 +632,6 @@ CONFIG_I2C_BOARDINFO=y
644# CONFIG_POWER_SUPPLY is not set 632# CONFIG_POWER_SUPPLY is not set
645CONFIG_HWMON=y 633CONFIG_HWMON=y
646# CONFIG_HWMON_VID is not set 634# CONFIG_HWMON_VID is not set
647# CONFIG_SENSORS_ABITUGURU is not set
648# CONFIG_SENSORS_ABITUGURU3 is not set
649# CONFIG_SENSORS_AD7418 is not set 635# CONFIG_SENSORS_AD7418 is not set
650# CONFIG_SENSORS_ADM1021 is not set 636# CONFIG_SENSORS_ADM1021 is not set
651# CONFIG_SENSORS_ADM1025 is not set 637# CONFIG_SENSORS_ADM1025 is not set
@@ -653,12 +639,12 @@ CONFIG_HWMON=y
653# CONFIG_SENSORS_ADM1029 is not set 639# CONFIG_SENSORS_ADM1029 is not set
654# CONFIG_SENSORS_ADM1031 is not set 640# CONFIG_SENSORS_ADM1031 is not set
655# CONFIG_SENSORS_ADM9240 is not set 641# CONFIG_SENSORS_ADM9240 is not set
656# CONFIG_SENSORS_ASB100 is not set 642# CONFIG_SENSORS_ADT7470 is not set
657# CONFIG_SENSORS_ATXP1 is not set 643# CONFIG_SENSORS_ATXP1 is not set
658# CONFIG_SENSORS_DS1621 is not set 644# CONFIG_SENSORS_DS1621 is not set
659# CONFIG_SENSORS_F71805F is not set 645# CONFIG_SENSORS_F71805F is not set
660# CONFIG_SENSORS_FSCHER is not set 646# CONFIG_SENSORS_F71882FG is not set
661# CONFIG_SENSORS_FSCPOS is not set 647# CONFIG_SENSORS_F75375S is not set
662# CONFIG_SENSORS_GL518SM is not set 648# CONFIG_SENSORS_GL518SM is not set
663# CONFIG_SENSORS_GL520SM is not set 649# CONFIG_SENSORS_GL520SM is not set
664# CONFIG_SENSORS_IT87 is not set 650# CONFIG_SENSORS_IT87 is not set
@@ -694,6 +680,25 @@ CONFIG_HWMON=y
694# CONFIG_SENSORS_W83627HF is not set 680# CONFIG_SENSORS_W83627HF is not set
695# CONFIG_SENSORS_W83627EHF is not set 681# CONFIG_SENSORS_W83627EHF is not set
696# CONFIG_HWMON_DEBUG_CHIP is not set 682# CONFIG_HWMON_DEBUG_CHIP is not set
683CONFIG_WATCHDOG=y
684# CONFIG_WATCHDOG_NOWAYOUT is not set
685
686#
687# Watchdog Device Drivers
688#
689# CONFIG_SOFT_WATCHDOG is not set
690
691#
692# PCI-based Watchdog Cards
693#
694# CONFIG_PCIPCWATCHDOG is not set
695# CONFIG_WDTPCI is not set
696
697#
698# Sonics Silicon Backplane
699#
700CONFIG_SSB_POSSIBLE=y
701# CONFIG_SSB is not set
697 702
698# 703#
699# Multifunction device drivers 704# Multifunction device drivers
@@ -713,11 +718,11 @@ CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
713# CONFIG_VIDEO_VIVI is not set 718# CONFIG_VIDEO_VIVI is not set
714# CONFIG_VIDEO_SAA5246A is not set 719# CONFIG_VIDEO_SAA5246A is not set
715# CONFIG_VIDEO_SAA5249 is not set 720# CONFIG_VIDEO_SAA5249 is not set
716# CONFIG_TUNER_TEA5761 is not set
717# CONFIG_VIDEO_SAA7134 is not set 721# CONFIG_VIDEO_SAA7134 is not set
718# CONFIG_VIDEO_HEXIUM_ORION is not set 722# CONFIG_VIDEO_HEXIUM_ORION is not set
719# CONFIG_VIDEO_HEXIUM_GEMINI is not set 723# CONFIG_VIDEO_HEXIUM_GEMINI is not set
720# CONFIG_VIDEO_CX88 is not set 724# CONFIG_VIDEO_CX88 is not set
725# CONFIG_VIDEO_CX23885 is not set
721# CONFIG_VIDEO_CAFE_CCIC is not set 726# CONFIG_VIDEO_CAFE_CCIC is not set
722# CONFIG_RADIO_ADAPTERS is not set 727# CONFIG_RADIO_ADAPTERS is not set
723CONFIG_DVB_CORE=y 728CONFIG_DVB_CORE=y
@@ -796,6 +801,7 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
796# CONFIG_DVB_OR51132 is not set 801# CONFIG_DVB_OR51132 is not set
797# CONFIG_DVB_BCM3510 is not set 802# CONFIG_DVB_BCM3510 is not set
798# CONFIG_DVB_LGDT330X is not set 803# CONFIG_DVB_LGDT330X is not set
804# CONFIG_DVB_S5H1409 is not set
799 805
800# 806#
801# Tuners/PLL support 807# Tuners/PLL support
@@ -805,6 +811,9 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
805# CONFIG_DVB_TDA827X is not set 811# CONFIG_DVB_TDA827X is not set
806# CONFIG_DVB_TUNER_QT1010 is not set 812# CONFIG_DVB_TUNER_QT1010 is not set
807# CONFIG_DVB_TUNER_MT2060 is not set 813# CONFIG_DVB_TUNER_MT2060 is not set
814# CONFIG_DVB_TUNER_MT2266 is not set
815# CONFIG_DVB_TUNER_MT2131 is not set
816# CONFIG_DVB_TUNER_DIB0070 is not set
808 817
809# 818#
810# Miscellaneous devices 819# Miscellaneous devices
@@ -817,12 +826,7 @@ CONFIG_DAB=y
817# 826#
818# Graphics support 827# Graphics support
819# 828#
820# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 829# CONFIG_DRM is not set
821
822#
823# Display device support
824#
825# CONFIG_DISPLAY_SUPPORT is not set
826# CONFIG_VGASTATE is not set 830# CONFIG_VGASTATE is not set
827CONFIG_VIDEO_OUTPUT_CONTROL=y 831CONFIG_VIDEO_OUTPUT_CONTROL=y
828CONFIG_FB=y 832CONFIG_FB=y
@@ -831,6 +835,7 @@ CONFIG_FIRMWARE_EDID=y
831CONFIG_FB_CFB_FILLRECT=y 835CONFIG_FB_CFB_FILLRECT=y
832CONFIG_FB_CFB_COPYAREA=y 836CONFIG_FB_CFB_COPYAREA=y
833CONFIG_FB_CFB_IMAGEBLIT=y 837CONFIG_FB_CFB_IMAGEBLIT=y
838# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
834# CONFIG_FB_SYS_FILLRECT is not set 839# CONFIG_FB_SYS_FILLRECT is not set
835# CONFIG_FB_SYS_COPYAREA is not set 840# CONFIG_FB_SYS_COPYAREA is not set
836# CONFIG_FB_SYS_IMAGEBLIT is not set 841# CONFIG_FB_SYS_IMAGEBLIT is not set
@@ -869,6 +874,12 @@ CONFIG_FB_KYRO=y
869# CONFIG_FB_ARK is not set 874# CONFIG_FB_ARK is not set
870# CONFIG_FB_PM3 is not set 875# CONFIG_FB_PM3 is not set
871# CONFIG_FB_VIRTUAL is not set 876# CONFIG_FB_VIRTUAL is not set
877# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
878
879#
880# Display device support
881#
882# CONFIG_DISPLAY_SUPPORT is not set
872 883
873# 884#
874# Console display driver support 885# Console display driver support
@@ -903,6 +914,7 @@ CONFIG_LOGO_SUPERH_CLUT224=y
903CONFIG_HID_SUPPORT=y 914CONFIG_HID_SUPPORT=y
904CONFIG_HID=y 915CONFIG_HID=y
905# CONFIG_HID_DEBUG is not set 916# CONFIG_HID_DEBUG is not set
917# CONFIG_HIDRAW is not set
906CONFIG_USB_SUPPORT=y 918CONFIG_USB_SUPPORT=y
907CONFIG_USB_ARCH_HAS_HCD=y 919CONFIG_USB_ARCH_HAS_HCD=y
908CONFIG_USB_ARCH_HAS_OHCI=y 920CONFIG_USB_ARCH_HAS_OHCI=y
@@ -923,19 +935,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y
923# CONFIG_RTC_CLASS is not set 935# CONFIG_RTC_CLASS is not set
924 936
925# 937#
926# DMA Engine support
927#
928# CONFIG_DMA_ENGINE is not set
929
930#
931# DMA Clients
932#
933
934#
935# DMA Devices
936#
937
938#
939# Userspace I/O 938# Userspace I/O
940# 939#
941# CONFIG_UIO is not set 940# CONFIG_UIO is not set
@@ -994,7 +993,6 @@ CONFIG_TMPFS=y
994# CONFIG_TMPFS_POSIX_ACL is not set 993# CONFIG_TMPFS_POSIX_ACL is not set
995CONFIG_HUGETLBFS=y 994CONFIG_HUGETLBFS=y
996CONFIG_HUGETLB_PAGE=y 995CONFIG_HUGETLB_PAGE=y
997CONFIG_RAMFS=y
998# CONFIG_CONFIGFS_FS is not set 996# CONFIG_CONFIGFS_FS is not set
999 997
1000# 998#
@@ -1013,10 +1011,7 @@ CONFIG_RAMFS=y
1013# CONFIG_QNX4FS_FS is not set 1011# CONFIG_QNX4FS_FS is not set
1014# CONFIG_SYSV_FS is not set 1012# CONFIG_SYSV_FS is not set
1015# CONFIG_UFS_FS is not set 1013# CONFIG_UFS_FS is not set
1016 1014CONFIG_NETWORK_FILESYSTEMS=y
1017#
1018# Network File Systems
1019#
1020CONFIG_NFS_FS=y 1015CONFIG_NFS_FS=y
1021CONFIG_NFS_V3=y 1016CONFIG_NFS_V3=y
1022# CONFIG_NFS_V3_ACL is not set 1017# CONFIG_NFS_V3_ACL is not set
@@ -1058,26 +1053,17 @@ CONFIG_MSDOS_PARTITION=y
1058# CONFIG_KARMA_PARTITION is not set 1053# CONFIG_KARMA_PARTITION is not set
1059# CONFIG_EFI_PARTITION is not set 1054# CONFIG_EFI_PARTITION is not set
1060# CONFIG_SYSV68_PARTITION is not set 1055# CONFIG_SYSV68_PARTITION is not set
1061
1062#
1063# Native Language Support
1064#
1065# CONFIG_NLS is not set 1056# CONFIG_NLS is not set
1066
1067#
1068# Distributed Lock Manager
1069#
1070# CONFIG_DLM is not set 1057# CONFIG_DLM is not set
1071 1058CONFIG_INSTRUMENTATION=y
1072#
1073# Profiling support
1074#
1075# CONFIG_PROFILING is not set 1059# CONFIG_PROFILING is not set
1060# CONFIG_MARKERS is not set
1076 1061
1077# 1062#
1078# Kernel hacking 1063# Kernel hacking
1079# 1064#
1080# CONFIG_PRINTK_TIME is not set 1065# CONFIG_PRINTK_TIME is not set
1066CONFIG_ENABLE_WARN_DEPRECATED=y
1081CONFIG_ENABLE_MUST_CHECK=y 1067CONFIG_ENABLE_MUST_CHECK=y
1082CONFIG_MAGIC_SYSRQ=y 1068CONFIG_MAGIC_SYSRQ=y
1083# CONFIG_UNUSED_SYMBOLS is not set 1069# CONFIG_UNUSED_SYMBOLS is not set
@@ -1101,10 +1087,13 @@ CONFIG_DEBUG_BUGVERBOSE=y
1101# CONFIG_DEBUG_INFO is not set 1087# CONFIG_DEBUG_INFO is not set
1102# CONFIG_DEBUG_VM is not set 1088# CONFIG_DEBUG_VM is not set
1103# CONFIG_DEBUG_LIST is not set 1089# CONFIG_DEBUG_LIST is not set
1090# CONFIG_DEBUG_SG is not set
1104CONFIG_FRAME_POINTER=y 1091CONFIG_FRAME_POINTER=y
1105CONFIG_FORCED_INLINING=y 1092CONFIG_FORCED_INLINING=y
1093# CONFIG_BOOT_PRINTK_DELAY is not set
1106# CONFIG_RCU_TORTURE_TEST is not set 1094# CONFIG_RCU_TORTURE_TEST is not set
1107# CONFIG_FAULT_INJECTION is not set 1095# CONFIG_FAULT_INJECTION is not set
1096# CONFIG_SAMPLES is not set
1108# CONFIG_EARLY_PRINTK is not set 1097# CONFIG_EARLY_PRINTK is not set
1109CONFIG_SH64_PROC_TLB=y 1098CONFIG_SH64_PROC_TLB=y
1110CONFIG_SH64_PROC_ASIDS=y 1099CONFIG_SH64_PROC_ASIDS=y
@@ -1118,6 +1107,7 @@ CONFIG_SH64_SR_WATCH=y
1118# 1107#
1119# CONFIG_KEYS is not set 1108# CONFIG_KEYS is not set
1120# CONFIG_SECURITY is not set 1109# CONFIG_SECURITY is not set
1110# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1121# CONFIG_CRYPTO is not set 1111# CONFIG_CRYPTO is not set
1122 1112
1123# 1113#
diff --git a/arch/sh64/configs/harp_defconfig b/arch/sh64/configs/harp_defconfig
index e4b84b51baf..ba302cd0c28 100644
--- a/arch/sh64/configs/harp_defconfig
+++ b/arch/sh64/configs/harp_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc8 3# Linux kernel version: 2.6.24-rc1
4# Mon Oct 1 18:01:38 2007 4# Fri Nov 2 14:35:57 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH64=y 7CONFIG_SUPERH64=y
@@ -36,6 +36,10 @@ CONFIG_POSIX_MQUEUE=y
36# CONFIG_AUDIT is not set 36# CONFIG_AUDIT is not set
37# CONFIG_IKCONFIG is not set 37# CONFIG_IKCONFIG is not set
38CONFIG_LOG_BUF_SHIFT=14 38CONFIG_LOG_BUF_SHIFT=14
39# CONFIG_CGROUPS is not set
40CONFIG_FAIR_GROUP_SCHED=y
41CONFIG_FAIR_USER_SCHED=y
42# CONFIG_FAIR_CGROUP_SCHED is not set
39CONFIG_SYSFS_DEPRECATED=y 43CONFIG_SYSFS_DEPRECATED=y
40# CONFIG_RELAY is not set 44# CONFIG_RELAY is not set
41# CONFIG_BLK_DEV_INITRD is not set 45# CONFIG_BLK_DEV_INITRD is not set
@@ -141,6 +145,7 @@ CONFIG_FLATMEM_MANUAL=y
141CONFIG_FLATMEM=y 145CONFIG_FLATMEM=y
142CONFIG_FLAT_NODE_MEM_MAP=y 146CONFIG_FLAT_NODE_MEM_MAP=y
143# CONFIG_SPARSEMEM_STATIC is not set 147# CONFIG_SPARSEMEM_STATIC is not set
148# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
144CONFIG_SPLIT_PTLOCK_CPUS=4 149CONFIG_SPLIT_PTLOCK_CPUS=4
145# CONFIG_RESOURCES_64BIT is not set 150# CONFIG_RESOURCES_64BIT is not set
146CONFIG_ZONE_DMA_FLAG=0 151CONFIG_ZONE_DMA_FLAG=0
@@ -150,10 +155,6 @@ CONFIG_NR_QUICK=1
150# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 155# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
151# 156#
152# CONFIG_ARCH_SUPPORTS_MSI is not set 157# CONFIG_ARCH_SUPPORTS_MSI is not set
153
154#
155# PCCARD (PCMCIA/CardBus) support
156#
157# CONFIG_PCCARD is not set 158# CONFIG_PCCARD is not set
158 159
159# 160#
@@ -198,6 +199,7 @@ CONFIG_IP_PNP=y
198CONFIG_INET_XFRM_MODE_TRANSPORT=y 199CONFIG_INET_XFRM_MODE_TRANSPORT=y
199CONFIG_INET_XFRM_MODE_TUNNEL=y 200CONFIG_INET_XFRM_MODE_TUNNEL=y
200CONFIG_INET_XFRM_MODE_BEET=y 201CONFIG_INET_XFRM_MODE_BEET=y
202# CONFIG_INET_LRO is not set
201CONFIG_INET_DIAG=y 203CONFIG_INET_DIAG=y
202CONFIG_INET_TCP_DIAG=y 204CONFIG_INET_TCP_DIAG=y
203# CONFIG_TCP_CONG_ADVANCED is not set 205# CONFIG_TCP_CONG_ADVANCED is not set
@@ -223,10 +225,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
223# CONFIG_LAPB is not set 225# CONFIG_LAPB is not set
224# CONFIG_ECONET is not set 226# CONFIG_ECONET is not set
225# CONFIG_WAN_ROUTER is not set 227# CONFIG_WAN_ROUTER is not set
226
227#
228# QoS and/or fair queueing
229#
230# CONFIG_NET_SCHED is not set 228# CONFIG_NET_SCHED is not set
231 229
232# 230#
@@ -255,6 +253,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
255# 253#
256# Generic Driver Options 254# Generic Driver Options
257# 255#
256CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
258CONFIG_STANDALONE=y 257CONFIG_STANDALONE=y
259CONFIG_PREVENT_FIRMWARE_BUILD=y 258CONFIG_PREVENT_FIRMWARE_BUILD=y
260# CONFIG_FW_LOADER is not set 259# CONFIG_FW_LOADER is not set
@@ -314,6 +313,7 @@ CONFIG_SCSI_SPI_ATTRS=y
314# CONFIG_SCSI_FC_ATTRS is not set 313# CONFIG_SCSI_FC_ATTRS is not set
315# CONFIG_SCSI_ISCSI_ATTRS is not set 314# CONFIG_SCSI_ISCSI_ATTRS is not set
316# CONFIG_SCSI_SAS_LIBSAS is not set 315# CONFIG_SCSI_SAS_LIBSAS is not set
316# CONFIG_SCSI_SRP_ATTRS is not set
317CONFIG_SCSI_LOWLEVEL=y 317CONFIG_SCSI_LOWLEVEL=y
318# CONFIG_ISCSI_TCP is not set 318# CONFIG_ISCSI_TCP is not set
319# CONFIG_SCSI_DEBUG is not set 319# CONFIG_SCSI_DEBUG is not set
@@ -326,11 +326,18 @@ CONFIG_NETDEVICES=y
326# CONFIG_MACVLAN is not set 326# CONFIG_MACVLAN is not set
327# CONFIG_EQUALIZER is not set 327# CONFIG_EQUALIZER is not set
328# CONFIG_TUN is not set 328# CONFIG_TUN is not set
329# CONFIG_VETH is not set
329# CONFIG_PHYLIB is not set 330# CONFIG_PHYLIB is not set
330CONFIG_NET_ETHERNET=y 331CONFIG_NET_ETHERNET=y
331# CONFIG_MII is not set 332# CONFIG_MII is not set
332# CONFIG_STNIC is not set 333# CONFIG_STNIC is not set
333# CONFIG_SMC91X is not set 334# CONFIG_SMC91X is not set
335# CONFIG_SMC911X is not set
336# CONFIG_IBM_NEW_EMAC_ZMII is not set
337# CONFIG_IBM_NEW_EMAC_RGMII is not set
338# CONFIG_IBM_NEW_EMAC_TAH is not set
339# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
340# CONFIG_B44 is not set
334CONFIG_NETDEV_1000=y 341CONFIG_NETDEV_1000=y
335CONFIG_NETDEV_10000=y 342CONFIG_NETDEV_10000=y
336 343
@@ -364,7 +371,6 @@ CONFIG_INPUT_MOUSEDEV=y
364CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 371CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
365CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 372CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
366# CONFIG_INPUT_JOYDEV is not set 373# CONFIG_INPUT_JOYDEV is not set
367# CONFIG_INPUT_TSDEV is not set
368# CONFIG_INPUT_EVDEV is not set 374# CONFIG_INPUT_EVDEV is not set
369# CONFIG_INPUT_EVBUG is not set 375# CONFIG_INPUT_EVBUG is not set
370 376
@@ -410,13 +416,6 @@ CONFIG_UNIX98_PTYS=y
410CONFIG_LEGACY_PTYS=y 416CONFIG_LEGACY_PTYS=y
411CONFIG_LEGACY_PTY_COUNT=256 417CONFIG_LEGACY_PTY_COUNT=256
412# CONFIG_IPMI_HANDLER is not set 418# CONFIG_IPMI_HANDLER is not set
413CONFIG_WATCHDOG=y
414# CONFIG_WATCHDOG_NOWAYOUT is not set
415
416#
417# Watchdog Device Drivers
418#
419# CONFIG_SOFT_WATCHDOG is not set
420CONFIG_HW_RANDOM=y 419CONFIG_HW_RANDOM=y
421# CONFIG_R3964 is not set 420# CONFIG_R3964 is not set
422# CONFIG_RAW_DRIVER is not set 421# CONFIG_RAW_DRIVER is not set
@@ -432,9 +431,8 @@ CONFIG_HW_RANDOM=y
432# CONFIG_POWER_SUPPLY is not set 431# CONFIG_POWER_SUPPLY is not set
433CONFIG_HWMON=y 432CONFIG_HWMON=y
434# CONFIG_HWMON_VID is not set 433# CONFIG_HWMON_VID is not set
435# CONFIG_SENSORS_ABITUGURU is not set
436# CONFIG_SENSORS_ABITUGURU3 is not set
437# CONFIG_SENSORS_F71805F is not set 434# CONFIG_SENSORS_F71805F is not set
435# CONFIG_SENSORS_F71882FG is not set
438# CONFIG_SENSORS_IT87 is not set 436# CONFIG_SENSORS_IT87 is not set
439# CONFIG_SENSORS_PC87360 is not set 437# CONFIG_SENSORS_PC87360 is not set
440# CONFIG_SENSORS_PC87427 is not set 438# CONFIG_SENSORS_PC87427 is not set
@@ -444,6 +442,19 @@ CONFIG_HWMON=y
444# CONFIG_SENSORS_W83627HF is not set 442# CONFIG_SENSORS_W83627HF is not set
445# CONFIG_SENSORS_W83627EHF is not set 443# CONFIG_SENSORS_W83627EHF is not set
446# CONFIG_HWMON_DEBUG_CHIP is not set 444# CONFIG_HWMON_DEBUG_CHIP is not set
445CONFIG_WATCHDOG=y
446# CONFIG_WATCHDOG_NOWAYOUT is not set
447
448#
449# Watchdog Device Drivers
450#
451# CONFIG_SOFT_WATCHDOG is not set
452
453#
454# Sonics Silicon Backplane
455#
456CONFIG_SSB_POSSIBLE=y
457# CONFIG_SSB is not set
447 458
448# 459#
449# Multifunction device drivers 460# Multifunction device drivers
@@ -460,12 +471,6 @@ CONFIG_DAB=y
460# 471#
461# Graphics support 472# Graphics support
462# 473#
463# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
464
465#
466# Display device support
467#
468# CONFIG_DISPLAY_SUPPORT is not set
469# CONFIG_VGASTATE is not set 474# CONFIG_VGASTATE is not set
470CONFIG_VIDEO_OUTPUT_CONTROL=y 475CONFIG_VIDEO_OUTPUT_CONTROL=y
471CONFIG_FB=y 476CONFIG_FB=y
@@ -474,6 +479,7 @@ CONFIG_FIRMWARE_EDID=y
474# CONFIG_FB_CFB_FILLRECT is not set 479# CONFIG_FB_CFB_FILLRECT is not set
475# CONFIG_FB_CFB_COPYAREA is not set 480# CONFIG_FB_CFB_COPYAREA is not set
476# CONFIG_FB_CFB_IMAGEBLIT is not set 481# CONFIG_FB_CFB_IMAGEBLIT is not set
482# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
477# CONFIG_FB_SYS_FILLRECT is not set 483# CONFIG_FB_SYS_FILLRECT is not set
478# CONFIG_FB_SYS_COPYAREA is not set 484# CONFIG_FB_SYS_COPYAREA is not set
479# CONFIG_FB_SYS_IMAGEBLIT is not set 485# CONFIG_FB_SYS_IMAGEBLIT is not set
@@ -490,6 +496,12 @@ CONFIG_FB_MODE_HELPERS=y
490# 496#
491# CONFIG_FB_S1D13XXX is not set 497# CONFIG_FB_S1D13XXX is not set
492# CONFIG_FB_VIRTUAL is not set 498# CONFIG_FB_VIRTUAL is not set
499# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
500
501#
502# Display device support
503#
504# CONFIG_DISPLAY_SUPPORT is not set
493 505
494# 506#
495# Console display driver support 507# Console display driver support
@@ -524,6 +536,7 @@ CONFIG_LOGO_SUPERH_CLUT224=y
524CONFIG_HID_SUPPORT=y 536CONFIG_HID_SUPPORT=y
525CONFIG_HID=y 537CONFIG_HID=y
526# CONFIG_HID_DEBUG is not set 538# CONFIG_HID_DEBUG is not set
539# CONFIG_HIDRAW is not set
527CONFIG_USB_SUPPORT=y 540CONFIG_USB_SUPPORT=y
528CONFIG_USB_ARCH_HAS_HCD=y 541CONFIG_USB_ARCH_HAS_HCD=y
529# CONFIG_USB_ARCH_HAS_OHCI is not set 542# CONFIG_USB_ARCH_HAS_OHCI is not set
@@ -543,19 +556,6 @@ CONFIG_USB_ARCH_HAS_HCD=y
543# CONFIG_RTC_CLASS is not set 556# CONFIG_RTC_CLASS is not set
544 557
545# 558#
546# DMA Engine support
547#
548# CONFIG_DMA_ENGINE is not set
549
550#
551# DMA Clients
552#
553
554#
555# DMA Devices
556#
557
558#
559# Userspace I/O 559# Userspace I/O
560# 560#
561# CONFIG_UIO is not set 561# CONFIG_UIO is not set
@@ -614,7 +614,6 @@ CONFIG_TMPFS=y
614# CONFIG_TMPFS_POSIX_ACL is not set 614# CONFIG_TMPFS_POSIX_ACL is not set
615CONFIG_HUGETLBFS=y 615CONFIG_HUGETLBFS=y
616CONFIG_HUGETLB_PAGE=y 616CONFIG_HUGETLB_PAGE=y
617CONFIG_RAMFS=y
618# CONFIG_CONFIGFS_FS is not set 617# CONFIG_CONFIGFS_FS is not set
619 618
620# 619#
@@ -633,10 +632,7 @@ CONFIG_RAMFS=y
633# CONFIG_QNX4FS_FS is not set 632# CONFIG_QNX4FS_FS is not set
634# CONFIG_SYSV_FS is not set 633# CONFIG_SYSV_FS is not set
635# CONFIG_UFS_FS is not set 634# CONFIG_UFS_FS is not set
636 635CONFIG_NETWORK_FILESYSTEMS=y
637#
638# Network File Systems
639#
640CONFIG_NFS_FS=y 636CONFIG_NFS_FS=y
641CONFIG_NFS_V3=y 637CONFIG_NFS_V3=y
642# CONFIG_NFS_V3_ACL is not set 638# CONFIG_NFS_V3_ACL is not set
@@ -678,26 +674,17 @@ CONFIG_MSDOS_PARTITION=y
678# CONFIG_KARMA_PARTITION is not set 674# CONFIG_KARMA_PARTITION is not set
679# CONFIG_EFI_PARTITION is not set 675# CONFIG_EFI_PARTITION is not set
680# CONFIG_SYSV68_PARTITION is not set 676# CONFIG_SYSV68_PARTITION is not set
681
682#
683# Native Language Support
684#
685# CONFIG_NLS is not set 677# CONFIG_NLS is not set
686
687#
688# Distributed Lock Manager
689#
690# CONFIG_DLM is not set 678# CONFIG_DLM is not set
691 679CONFIG_INSTRUMENTATION=y
692#
693# Profiling support
694#
695# CONFIG_PROFILING is not set 680# CONFIG_PROFILING is not set
681# CONFIG_MARKERS is not set
696 682
697# 683#
698# Kernel hacking 684# Kernel hacking
699# 685#
700# CONFIG_PRINTK_TIME is not set 686# CONFIG_PRINTK_TIME is not set
687CONFIG_ENABLE_WARN_DEPRECATED=y
701CONFIG_ENABLE_MUST_CHECK=y 688CONFIG_ENABLE_MUST_CHECK=y
702CONFIG_MAGIC_SYSRQ=y 689CONFIG_MAGIC_SYSRQ=y
703# CONFIG_UNUSED_SYMBOLS is not set 690# CONFIG_UNUSED_SYMBOLS is not set
@@ -721,16 +708,17 @@ CONFIG_DEBUG_BUGVERBOSE=y
721# CONFIG_DEBUG_INFO is not set 708# CONFIG_DEBUG_INFO is not set
722# CONFIG_DEBUG_VM is not set 709# CONFIG_DEBUG_VM is not set
723# CONFIG_DEBUG_LIST is not set 710# CONFIG_DEBUG_LIST is not set
711# CONFIG_DEBUG_SG is not set
724CONFIG_FRAME_POINTER=y 712CONFIG_FRAME_POINTER=y
725CONFIG_FORCED_INLINING=y 713CONFIG_FORCED_INLINING=y
714# CONFIG_BOOT_PRINTK_DELAY is not set
726# CONFIG_FAULT_INJECTION is not set 715# CONFIG_FAULT_INJECTION is not set
716# CONFIG_SAMPLES is not set
727# CONFIG_EARLY_PRINTK is not set 717# CONFIG_EARLY_PRINTK is not set
728# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set
729CONFIG_SH64_PROC_TLB=y 718CONFIG_SH64_PROC_TLB=y
730CONFIG_SH64_PROC_ASIDS=y 719CONFIG_SH64_PROC_ASIDS=y
731CONFIG_SH64_SR_WATCH=y 720CONFIG_SH64_SR_WATCH=y
732# CONFIG_POOR_MANS_STRACE is not set 721# CONFIG_POOR_MANS_STRACE is not set
733# CONFIG_SH_ALPHANUMERIC is not set
734# CONFIG_SH_NO_BSS_INIT is not set 722# CONFIG_SH_NO_BSS_INIT is not set
735 723
736# 724#
@@ -738,6 +726,7 @@ CONFIG_SH64_SR_WATCH=y
738# 726#
739# CONFIG_KEYS is not set 727# CONFIG_KEYS is not set
740# CONFIG_SECURITY is not set 728# CONFIG_SECURITY is not set
729# CONFIG_SECURITY_FILE_CAPABILITIES is not set
741# CONFIG_CRYPTO is not set 730# CONFIG_CRYPTO is not set
742 731
743# 732#
diff --git a/arch/sh64/configs/sim_defconfig b/arch/sh64/configs/sim_defconfig
index f83bae659dc..18476cc522c 100644
--- a/arch/sh64/configs/sim_defconfig
+++ b/arch/sh64/configs/sim_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc8 3# Linux kernel version: 2.6.24-rc1
4# Mon Oct 1 17:50:35 2007 4# Fri Nov 2 14:36:08 2007
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH64=y 7CONFIG_SUPERH64=y
@@ -33,6 +33,10 @@ CONFIG_SWAP=y
33# CONFIG_USER_NS is not set 33# CONFIG_USER_NS is not set
34# CONFIG_IKCONFIG is not set 34# CONFIG_IKCONFIG is not set
35CONFIG_LOG_BUF_SHIFT=14 35CONFIG_LOG_BUF_SHIFT=14
36# CONFIG_CGROUPS is not set
37CONFIG_FAIR_GROUP_SCHED=y
38CONFIG_FAIR_USER_SCHED=y
39# CONFIG_FAIR_CGROUP_SCHED is not set
36CONFIG_SYSFS_DEPRECATED=y 40CONFIG_SYSFS_DEPRECATED=y
37# CONFIG_RELAY is not set 41# CONFIG_RELAY is not set
38# CONFIG_BLK_DEV_INITRD is not set 42# CONFIG_BLK_DEV_INITRD is not set
@@ -138,6 +142,7 @@ CONFIG_FLATMEM_MANUAL=y
138CONFIG_FLATMEM=y 142CONFIG_FLATMEM=y
139CONFIG_FLAT_NODE_MEM_MAP=y 143CONFIG_FLAT_NODE_MEM_MAP=y
140# CONFIG_SPARSEMEM_STATIC is not set 144# CONFIG_SPARSEMEM_STATIC is not set
145# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
141CONFIG_SPLIT_PTLOCK_CPUS=4 146CONFIG_SPLIT_PTLOCK_CPUS=4
142# CONFIG_RESOURCES_64BIT is not set 147# CONFIG_RESOURCES_64BIT is not set
143CONFIG_ZONE_DMA_FLAG=0 148CONFIG_ZONE_DMA_FLAG=0
@@ -147,10 +152,6 @@ CONFIG_NR_QUICK=1
147# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 152# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
148# 153#
149# CONFIG_ARCH_SUPPORTS_MSI is not set 154# CONFIG_ARCH_SUPPORTS_MSI is not set
150
151#
152# PCCARD (PCMCIA/CardBus) support
153#
154# CONFIG_PCCARD is not set 155# CONFIG_PCCARD is not set
155 156
156# 157#
@@ -171,6 +172,7 @@ CONFIG_BINFMT_ELF=y
171# 172#
172# Generic Driver Options 173# Generic Driver Options
173# 174#
175CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
174CONFIG_STANDALONE=y 176CONFIG_STANDALONE=y
175CONFIG_PREVENT_FIRMWARE_BUILD=y 177CONFIG_PREVENT_FIRMWARE_BUILD=y
176# CONFIG_FW_LOADER is not set 178# CONFIG_FW_LOADER is not set
@@ -217,6 +219,7 @@ CONFIG_SCSI_MULTI_LUN=y
217CONFIG_SCSI_SPI_ATTRS=y 219CONFIG_SCSI_SPI_ATTRS=y
218# CONFIG_SCSI_FC_ATTRS is not set 220# CONFIG_SCSI_FC_ATTRS is not set
219# CONFIG_SCSI_SAS_LIBSAS is not set 221# CONFIG_SCSI_SAS_LIBSAS is not set
222# CONFIG_SCSI_SRP_ATTRS is not set
220CONFIG_SCSI_LOWLEVEL=y 223CONFIG_SCSI_LOWLEVEL=y
221# CONFIG_SCSI_DEBUG is not set 224# CONFIG_SCSI_DEBUG is not set
222# CONFIG_ATA is not set 225# CONFIG_ATA is not set
@@ -238,7 +241,6 @@ CONFIG_INPUT_MOUSEDEV=y
238CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 241CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
239CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 242CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
240# CONFIG_INPUT_JOYDEV is not set 243# CONFIG_INPUT_JOYDEV is not set
241# CONFIG_INPUT_TSDEV is not set
242# CONFIG_INPUT_EVDEV is not set 244# CONFIG_INPUT_EVDEV is not set
243# CONFIG_INPUT_EVBUG is not set 245# CONFIG_INPUT_EVBUG is not set
244 246
@@ -283,7 +285,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y
283CONFIG_UNIX98_PTYS=y 285CONFIG_UNIX98_PTYS=y
284# CONFIG_LEGACY_PTYS is not set 286# CONFIG_LEGACY_PTYS is not set
285# CONFIG_IPMI_HANDLER is not set 287# CONFIG_IPMI_HANDLER is not set
286# CONFIG_WATCHDOG is not set
287# CONFIG_HW_RANDOM is not set 288# CONFIG_HW_RANDOM is not set
288# CONFIG_R3964 is not set 289# CONFIG_R3964 is not set
289# CONFIG_RAW_DRIVER is not set 290# CONFIG_RAW_DRIVER is not set
@@ -298,6 +299,13 @@ CONFIG_UNIX98_PTYS=y
298# CONFIG_W1 is not set 299# CONFIG_W1 is not set
299# CONFIG_POWER_SUPPLY is not set 300# CONFIG_POWER_SUPPLY is not set
300# CONFIG_HWMON is not set 301# CONFIG_HWMON is not set
302# CONFIG_WATCHDOG is not set
303
304#
305# Sonics Silicon Backplane
306#
307CONFIG_SSB_POSSIBLE=y
308# CONFIG_SSB is not set
301 309
302# 310#
303# Multifunction device drivers 311# Multifunction device drivers
@@ -313,12 +321,6 @@ CONFIG_DAB=y
313# 321#
314# Graphics support 322# Graphics support
315# 323#
316# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
317
318#
319# Display device support
320#
321# CONFIG_DISPLAY_SUPPORT is not set
322# CONFIG_VGASTATE is not set 324# CONFIG_VGASTATE is not set
323CONFIG_VIDEO_OUTPUT_CONTROL=y 325CONFIG_VIDEO_OUTPUT_CONTROL=y
324CONFIG_FB=y 326CONFIG_FB=y
@@ -327,6 +329,7 @@ CONFIG_FIRMWARE_EDID=y
327# CONFIG_FB_CFB_FILLRECT is not set 329# CONFIG_FB_CFB_FILLRECT is not set
328# CONFIG_FB_CFB_COPYAREA is not set 330# CONFIG_FB_CFB_COPYAREA is not set
329# CONFIG_FB_CFB_IMAGEBLIT is not set 331# CONFIG_FB_CFB_IMAGEBLIT is not set
332# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
330# CONFIG_FB_SYS_FILLRECT is not set 333# CONFIG_FB_SYS_FILLRECT is not set
331# CONFIG_FB_SYS_COPYAREA is not set 334# CONFIG_FB_SYS_COPYAREA is not set
332# CONFIG_FB_SYS_IMAGEBLIT is not set 335# CONFIG_FB_SYS_IMAGEBLIT is not set
@@ -343,6 +346,12 @@ CONFIG_FB_MODE_HELPERS=y
343# 346#
344# CONFIG_FB_S1D13XXX is not set 347# CONFIG_FB_S1D13XXX is not set
345# CONFIG_FB_VIRTUAL is not set 348# CONFIG_FB_VIRTUAL is not set
349# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
350
351#
352# Display device support
353#
354# CONFIG_DISPLAY_SUPPORT is not set
346 355
347# 356#
348# Console display driver support 357# Console display driver support
@@ -381,19 +390,6 @@ CONFIG_LOGO_SUPERH_CLUT224=y
381# CONFIG_RTC_CLASS is not set 390# CONFIG_RTC_CLASS is not set
382 391
383# 392#
384# DMA Engine support
385#
386# CONFIG_DMA_ENGINE is not set
387
388#
389# DMA Clients
390#
391
392#
393# DMA Devices
394#
395
396#
397# Userspace I/O 393# Userspace I/O
398# 394#
399# CONFIG_UIO is not set 395# CONFIG_UIO is not set
@@ -451,7 +447,6 @@ CONFIG_TMPFS=y
451# CONFIG_TMPFS_POSIX_ACL is not set 447# CONFIG_TMPFS_POSIX_ACL is not set
452CONFIG_HUGETLBFS=y 448CONFIG_HUGETLBFS=y
453CONFIG_HUGETLB_PAGE=y 449CONFIG_HUGETLB_PAGE=y
454CONFIG_RAMFS=y
455# CONFIG_CONFIGFS_FS is not set 450# CONFIG_CONFIGFS_FS is not set
456 451
457# 452#
@@ -492,22 +487,17 @@ CONFIG_MSDOS_PARTITION=y
492# CONFIG_KARMA_PARTITION is not set 487# CONFIG_KARMA_PARTITION is not set
493# CONFIG_EFI_PARTITION is not set 488# CONFIG_EFI_PARTITION is not set
494# CONFIG_SYSV68_PARTITION is not set 489# CONFIG_SYSV68_PARTITION is not set
495
496#
497# Native Language Support
498#
499# CONFIG_NLS is not set 490# CONFIG_NLS is not set
500 491CONFIG_INSTRUMENTATION=y
501#
502# Profiling support
503#
504CONFIG_PROFILING=y 492CONFIG_PROFILING=y
505# CONFIG_OPROFILE is not set 493# CONFIG_OPROFILE is not set
494# CONFIG_MARKERS is not set
506 495
507# 496#
508# Kernel hacking 497# Kernel hacking
509# 498#
510# CONFIG_PRINTK_TIME is not set 499# CONFIG_PRINTK_TIME is not set
500CONFIG_ENABLE_WARN_DEPRECATED=y
511CONFIG_ENABLE_MUST_CHECK=y 501CONFIG_ENABLE_MUST_CHECK=y
512CONFIG_MAGIC_SYSRQ=y 502CONFIG_MAGIC_SYSRQ=y
513# CONFIG_UNUSED_SYMBOLS is not set 503# CONFIG_UNUSED_SYMBOLS is not set
@@ -531,16 +521,17 @@ CONFIG_DEBUG_BUGVERBOSE=y
531# CONFIG_DEBUG_INFO is not set 521# CONFIG_DEBUG_INFO is not set
532# CONFIG_DEBUG_VM is not set 522# CONFIG_DEBUG_VM is not set
533# CONFIG_DEBUG_LIST is not set 523# CONFIG_DEBUG_LIST is not set
524# CONFIG_DEBUG_SG is not set
534CONFIG_FRAME_POINTER=y 525CONFIG_FRAME_POINTER=y
535CONFIG_FORCED_INLINING=y 526CONFIG_FORCED_INLINING=y
527# CONFIG_BOOT_PRINTK_DELAY is not set
536# CONFIG_FAULT_INJECTION is not set 528# CONFIG_FAULT_INJECTION is not set
529# CONFIG_SAMPLES is not set
537# CONFIG_EARLY_PRINTK is not set 530# CONFIG_EARLY_PRINTK is not set
538# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set
539CONFIG_SH64_PROC_TLB=y 531CONFIG_SH64_PROC_TLB=y
540CONFIG_SH64_PROC_ASIDS=y 532CONFIG_SH64_PROC_ASIDS=y
541CONFIG_SH64_SR_WATCH=y 533CONFIG_SH64_SR_WATCH=y
542# CONFIG_POOR_MANS_STRACE is not set 534# CONFIG_POOR_MANS_STRACE is not set
543# CONFIG_SH_ALPHANUMERIC is not set
544CONFIG_SH_NO_BSS_INIT=y 535CONFIG_SH_NO_BSS_INIT=y
545 536
546# 537#
@@ -548,6 +539,7 @@ CONFIG_SH_NO_BSS_INIT=y
548# 539#
549# CONFIG_KEYS is not set 540# CONFIG_KEYS is not set
550# CONFIG_SECURITY is not set 541# CONFIG_SECURITY is not set
542# CONFIG_SECURITY_FILE_CAPABILITIES is not set
551# CONFIG_CRYPTO is not set 543# CONFIG_CRYPTO is not set
552 544
553# 545#
diff --git a/arch/x86/kernel/kprobes_32.c b/arch/x86/kernel/kprobes_32.c
index 90f778c04b3..d87a523070d 100644
--- a/arch/x86/kernel/kprobes_32.c
+++ b/arch/x86/kernel/kprobes_32.c
@@ -564,12 +564,7 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs)
564 564
565 resume_execution(cur, regs, kcb); 565 resume_execution(cur, regs, kcb);
566 regs->eflags |= kcb->kprobe_saved_eflags; 566 regs->eflags |= kcb->kprobe_saved_eflags;
567#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT 567 trace_hardirqs_fixup_flags(regs->eflags);
568 if (raw_irqs_disabled_flags(regs->eflags))
569 trace_hardirqs_off();
570 else
571 trace_hardirqs_on();
572#endif
573 568
574 /*Restore back the original saved kprobes variables and continue. */ 569 /*Restore back the original saved kprobes variables and continue. */
575 if (kcb->kprobe_status == KPROBE_REENTER) { 570 if (kcb->kprobe_status == KPROBE_REENTER) {
diff --git a/arch/x86/kernel/kprobes_64.c b/arch/x86/kernel/kprobes_64.c
index 681b801c5e2..3db3611933d 100644
--- a/arch/x86/kernel/kprobes_64.c
+++ b/arch/x86/kernel/kprobes_64.c
@@ -551,12 +551,7 @@ int __kprobes post_kprobe_handler(struct pt_regs *regs)
551 551
552 resume_execution(cur, regs, kcb); 552 resume_execution(cur, regs, kcb);
553 regs->eflags |= kcb->kprobe_saved_rflags; 553 regs->eflags |= kcb->kprobe_saved_rflags;
554#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT 554 trace_hardirqs_fixup_flags(regs->eflags);
555 if (raw_irqs_disabled_flags(regs->eflags))
556 trace_hardirqs_off();
557 else
558 trace_hardirqs_on();
559#endif
560 555
561 /* Restore the original saved kprobes variables and continue. */ 556 /* Restore the original saved kprobes variables and continue. */
562 if (kcb->kprobe_status == KPROBE_REENTER) { 557 if (kcb->kprobe_status == KPROBE_REENTER) {
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index cc9acace7e2..298d13ed3ab 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -789,6 +789,8 @@ void restart_nmi(void)
789#ifdef CONFIG_KPROBES 789#ifdef CONFIG_KPROBES
790fastcall void __kprobes do_int3(struct pt_regs *regs, long error_code) 790fastcall void __kprobes do_int3(struct pt_regs *regs, long error_code)
791{ 791{
792 trace_hardirqs_fixup();
793
792 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) 794 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
793 == NOTIFY_STOP) 795 == NOTIFY_STOP)
794 return; 796 return;
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index d0c2bc7ab2e..4a6bd4965f5 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -807,6 +807,8 @@ asmlinkage __kprobes void default_do_nmi(struct pt_regs *regs)
807/* runs on IST stack. */ 807/* runs on IST stack. */
808asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code) 808asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code)
809{ 809{
810 trace_hardirqs_fixup();
811
810 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) == NOTIFY_STOP) { 812 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) == NOTIFY_STOP) {
811 return; 813 return;
812 } 814 }
diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c
index 33563ee8eb0..a2273d44aa2 100644
--- a/arch/x86/mm/fault_32.c
+++ b/arch/x86/mm/fault_32.c
@@ -303,6 +303,11 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
303 int write, si_code; 303 int write, si_code;
304 int fault; 304 int fault;
305 305
306 /*
307 * We can fault from pretty much anywhere, with unknown IRQ state.
308 */
309 trace_hardirqs_fixup();
310
306 /* get the address */ 311 /* get the address */
307 address = read_cr2(); 312 address = read_cr2();
308 313
diff --git a/arch/x86/mm/fault_64.c b/arch/x86/mm/fault_64.c
index 644b4f7ece1..0e26230669c 100644
--- a/arch/x86/mm/fault_64.c
+++ b/arch/x86/mm/fault_64.c
@@ -304,6 +304,11 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
304 unsigned long flags; 304 unsigned long flags;
305 siginfo_t info; 305 siginfo_t info;
306 306
307 /*
308 * We can fault from pretty much anywhere, with unknown IRQ state.
309 */
310 trace_hardirqs_fixup();
311
307 tsk = current; 312 tsk = current;
308 mm = tsk->mm; 313 mm = tsk->mm;
309 prefetchw(&mm->mmap_sem); 314 prefetchw(&mm->mmap_sem);
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 3e4e8bfbe85..75c98d58f4d 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1369,7 +1369,7 @@ new_segment:
1369 } /* segments in rq */ 1369 } /* segments in rq */
1370 1370
1371 if (sg) 1371 if (sg)
1372 __sg_mark_end(sg); 1372 sg_mark_end(sg);
1373 1373
1374 return nsegs; 1374 return nsegs;
1375} 1375}
diff --git a/crypto/anubis.c b/crypto/anubis.c
index 1c771f7f4dc..4ff0e1e243a 100644
--- a/crypto/anubis.c
+++ b/crypto/anubis.c
@@ -33,7 +33,6 @@
33#include <linux/module.h> 33#include <linux/module.h>
34#include <linux/mm.h> 34#include <linux/mm.h>
35#include <asm/byteorder.h> 35#include <asm/byteorder.h>
36#include <asm/scatterlist.h>
37#include <linux/crypto.h> 36#include <linux/crypto.h>
38#include <linux/types.h> 37#include <linux/types.h>
39 38
diff --git a/crypto/blowfish.c b/crypto/blowfish.c
index 55238c4e37f..80c3fd8be97 100644
--- a/crypto/blowfish.c
+++ b/crypto/blowfish.c
@@ -20,7 +20,6 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <asm/byteorder.h> 22#include <asm/byteorder.h>
23#include <asm/scatterlist.h>
24#include <linux/crypto.h> 23#include <linux/crypto.h>
25#include <linux/types.h> 24#include <linux/types.h>
26 25
diff --git a/crypto/compress.c b/crypto/compress.c
index 0a6570048c1..1ee357085d3 100644
--- a/crypto/compress.c
+++ b/crypto/compress.c
@@ -14,7 +14,6 @@
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/crypto.h> 15#include <linux/crypto.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <asm/scatterlist.h>
18#include <linux/string.h> 17#include <linux/string.h>
19#include "internal.h" 18#include "internal.h"
20 19
diff --git a/crypto/crypto_null.c b/crypto/crypto_null.c
index 24dbb5d8617..29f77477d70 100644
--- a/crypto/crypto_null.c
+++ b/crypto/crypto_null.c
@@ -19,7 +19,6 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <asm/scatterlist.h>
23#include <linux/crypto.h> 22#include <linux/crypto.h>
24#include <linux/string.h> 23#include <linux/string.h>
25 24
diff --git a/crypto/khazad.c b/crypto/khazad.c
index 9fa24a2dd6f..704ebfe26b5 100644
--- a/crypto/khazad.c
+++ b/crypto/khazad.c
@@ -23,7 +23,6 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <asm/byteorder.h> 25#include <asm/byteorder.h>
26#include <asm/scatterlist.h>
27#include <linux/crypto.h> 26#include <linux/crypto.h>
28#include <linux/types.h> 27#include <linux/types.h>
29 28
diff --git a/crypto/sha1_generic.c b/crypto/sha1_generic.c
index 48a3c3e0bf5..68c62f528eb 100644
--- a/crypto/sha1_generic.c
+++ b/crypto/sha1_generic.c
@@ -23,7 +23,6 @@
23#include <linux/cryptohash.h> 23#include <linux/cryptohash.h>
24#include <linux/types.h> 24#include <linux/types.h>
25#include <crypto/sha.h> 25#include <crypto/sha.h>
26#include <asm/scatterlist.h>
27#include <asm/byteorder.h> 26#include <asm/byteorder.h>
28 27
29struct sha1_ctx { 28struct sha1_ctx {
diff --git a/crypto/sha256_generic.c b/crypto/sha256_generic.c
index 5f4332edcf6..fd3918be58b 100644
--- a/crypto/sha256_generic.c
+++ b/crypto/sha256_generic.c
@@ -22,7 +22,6 @@
22#include <linux/crypto.h> 22#include <linux/crypto.h>
23#include <linux/types.h> 23#include <linux/types.h>
24#include <crypto/sha.h> 24#include <crypto/sha.h>
25#include <asm/scatterlist.h>
26#include <asm/byteorder.h> 25#include <asm/byteorder.h>
27 26
28struct sha256_ctx { 27struct sha256_ctx {
diff --git a/crypto/sha512.c b/crypto/sha512.c
index e736596ca57..c39c803ecc0 100644
--- a/crypto/sha512.c
+++ b/crypto/sha512.c
@@ -19,7 +19,6 @@
19#include <linux/types.h> 19#include <linux/types.h>
20#include <crypto/sha.h> 20#include <crypto/sha.h>
21 21
22#include <asm/scatterlist.h>
23#include <asm/byteorder.h> 22#include <asm/byteorder.h>
24 23
25struct sha512_ctx { 24struct sha512_ctx {
diff --git a/crypto/tea.c b/crypto/tea.c
index 1c54e26fa52..6893b3fdf9d 100644
--- a/crypto/tea.c
+++ b/crypto/tea.c
@@ -23,7 +23,6 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <asm/byteorder.h> 25#include <asm/byteorder.h>
26#include <asm/scatterlist.h>
27#include <linux/crypto.h> 26#include <linux/crypto.h>
28#include <linux/types.h> 27#include <linux/types.h>
29 28
diff --git a/crypto/tgr192.c b/crypto/tgr192.c
index a0fadf3dd3e..2e7ea1680c7 100644
--- a/crypto/tgr192.c
+++ b/crypto/tgr192.c
@@ -25,7 +25,6 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/mm.h> 26#include <linux/mm.h>
27#include <asm/byteorder.h> 27#include <asm/byteorder.h>
28#include <asm/scatterlist.h>
29#include <linux/crypto.h> 28#include <linux/crypto.h>
30#include <linux/types.h> 29#include <linux/types.h>
31 30
diff --git a/crypto/wp512.c b/crypto/wp512.c
index 727d05a19ff..f746952b93f 100644
--- a/crypto/wp512.c
+++ b/crypto/wp512.c
@@ -23,7 +23,6 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <asm/byteorder.h> 25#include <asm/byteorder.h>
26#include <asm/scatterlist.h>
27#include <linux/crypto.h> 26#include <linux/crypto.h>
28#include <linux/types.h> 27#include <linux/types.h>
29 28
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 63035d71a61..164c7d9514f 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -704,8 +704,8 @@ static int ata_dev_set_dipm(struct ata_device *dev, enum link_pm policy)
704 704
705/** 705/**
706 * ata_dev_enable_pm - enable SATA interface power management 706 * ata_dev_enable_pm - enable SATA interface power management
707 * @device - device to enable ipm for 707 * @dev: device to enable power management
708 * @policy - the link power management policy 708 * @policy: the link power management policy
709 * 709 *
710 * Enable SATA Interface power management. This will enable 710 * Enable SATA Interface power management. This will enable
711 * Device Interface Power Management (DIPM) for min_power 711 * Device Interface Power Management (DIPM) for min_power
@@ -735,9 +735,10 @@ enable_pm_out:
735 return /* rc */; /* hopefully we can use 'rc' eventually */ 735 return /* rc */; /* hopefully we can use 'rc' eventually */
736} 736}
737 737
738#ifdef CONFIG_PM
738/** 739/**
739 * ata_dev_disable_pm - disable SATA interface power management 740 * ata_dev_disable_pm - disable SATA interface power management
740 * @device - device to enable ipm for 741 * @dev: device to disable power management
741 * 742 *
742 * Disable SATA Interface power management. This will disable 743 * Disable SATA Interface power management. This will disable
743 * Device Interface Power Management (DIPM) without changing 744 * Device Interface Power Management (DIPM) without changing
@@ -755,6 +756,7 @@ static void ata_dev_disable_pm(struct ata_device *dev)
755 if (ap->ops->disable_pm) 756 if (ap->ops->disable_pm)
756 ap->ops->disable_pm(ap); 757 ap->ops->disable_pm(ap);
757} 758}
759#endif /* CONFIG_PM */
758 760
759void ata_lpm_schedule(struct ata_port *ap, enum link_pm policy) 761void ata_lpm_schedule(struct ata_port *ap, enum link_pm policy)
760{ 762{
@@ -764,6 +766,7 @@ void ata_lpm_schedule(struct ata_port *ap, enum link_pm policy)
764 ata_port_schedule_eh(ap); 766 ata_port_schedule_eh(ap);
765} 767}
766 768
769#ifdef CONFIG_PM
767static void ata_lpm_enable(struct ata_host *host) 770static void ata_lpm_enable(struct ata_host *host)
768{ 771{
769 struct ata_link *link; 772 struct ata_link *link;
@@ -789,6 +792,7 @@ static void ata_lpm_disable(struct ata_host *host)
789 ata_lpm_schedule(ap, ap->pm_policy); 792 ata_lpm_schedule(ap, ap->pm_policy);
790 } 793 }
791} 794}
795#endif /* CONFIG_PM */
792 796
793 797
794/** 798/**
@@ -2300,6 +2304,10 @@ int ata_dev_configure(struct ata_device *dev)
2300 dev->max_sectors = ATA_MAX_SECTORS; 2304 dev->max_sectors = ATA_MAX_SECTORS;
2301 } 2305 }
2302 2306
2307 if ((dev->class == ATA_DEV_ATAPI) &&
2308 (atapi_command_packet_set(id) == TYPE_TAPE))
2309 dev->max_sectors = ATA_MAX_SECTORS_TAPE;
2310
2303 if (dev->horkage & ATA_HORKAGE_MAX_SEC_128) 2311 if (dev->horkage & ATA_HORKAGE_MAX_SEC_128)
2304 dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128, 2312 dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128,
2305 dev->max_sectors); 2313 dev->max_sectors);
@@ -2743,17 +2751,27 @@ int sata_down_spd_limit(struct ata_link *link)
2743 2751
2744static int __sata_set_spd_needed(struct ata_link *link, u32 *scontrol) 2752static int __sata_set_spd_needed(struct ata_link *link, u32 *scontrol)
2745{ 2753{
2746 u32 spd, limit; 2754 struct ata_link *host_link = &link->ap->link;
2755 u32 limit, target, spd;
2756
2757 limit = link->sata_spd_limit;
2747 2758
2748 if (link->sata_spd_limit == UINT_MAX) 2759 /* Don't configure downstream link faster than upstream link.
2749 limit = 0; 2760 * It doesn't speed up anything and some PMPs choke on such
2761 * configuration.
2762 */
2763 if (!ata_is_host_link(link) && host_link->sata_spd)
2764 limit &= (1 << host_link->sata_spd) - 1;
2765
2766 if (limit == UINT_MAX)
2767 target = 0;
2750 else 2768 else
2751 limit = fls(link->sata_spd_limit); 2769 target = fls(limit);
2752 2770
2753 spd = (*scontrol >> 4) & 0xf; 2771 spd = (*scontrol >> 4) & 0xf;
2754 *scontrol = (*scontrol & ~0xf0) | ((limit & 0xf) << 4); 2772 *scontrol = (*scontrol & ~0xf0) | ((target & 0xf) << 4);
2755 2773
2756 return spd != limit; 2774 return spd != target;
2757} 2775}
2758 2776
2759/** 2777/**
@@ -2776,7 +2794,7 @@ int sata_set_spd_needed(struct ata_link *link)
2776 u32 scontrol; 2794 u32 scontrol;
2777 2795
2778 if (sata_scr_read(link, SCR_CONTROL, &scontrol)) 2796 if (sata_scr_read(link, SCR_CONTROL, &scontrol))
2779 return 0; 2797 return 1;
2780 2798
2781 return __sata_set_spd_needed(link, &scontrol); 2799 return __sata_set_spd_needed(link, &scontrol);
2782} 2800}
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 8d64f8fd8f1..ed8813b222a 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1747,6 +1747,7 @@ static void ata_eh_link_autopsy(struct ata_link *link)
1747{ 1747{
1748 struct ata_port *ap = link->ap; 1748 struct ata_port *ap = link->ap;
1749 struct ata_eh_context *ehc = &link->eh_context; 1749 struct ata_eh_context *ehc = &link->eh_context;
1750 struct ata_device *dev;
1750 unsigned int all_err_mask = 0; 1751 unsigned int all_err_mask = 0;
1751 int tag, is_io = 0; 1752 int tag, is_io = 0;
1752 u32 serror; 1753 u32 serror;
@@ -1818,18 +1819,24 @@ static void ata_eh_link_autopsy(struct ata_link *link)
1818 (!is_io && (all_err_mask & ~AC_ERR_DEV))) 1819 (!is_io && (all_err_mask & ~AC_ERR_DEV)))
1819 ehc->i.action |= ATA_EH_REVALIDATE; 1820 ehc->i.action |= ATA_EH_REVALIDATE;
1820 1821
1821 /* if we have offending qcs and the associated failed device */ 1822 /* If we have offending qcs and the associated failed device,
1823 * perform per-dev EH action only on the offending device.
1824 */
1822 if (ehc->i.dev) { 1825 if (ehc->i.dev) {
1823 /* speed down */
1824 ehc->i.action |= ata_eh_speed_down(ehc->i.dev, is_io,
1825 all_err_mask);
1826
1827 /* perform per-dev EH action only on the offending device */
1828 ehc->i.dev_action[ehc->i.dev->devno] |= 1826 ehc->i.dev_action[ehc->i.dev->devno] |=
1829 ehc->i.action & ATA_EH_PERDEV_MASK; 1827 ehc->i.action & ATA_EH_PERDEV_MASK;
1830 ehc->i.action &= ~ATA_EH_PERDEV_MASK; 1828 ehc->i.action &= ~ATA_EH_PERDEV_MASK;
1831 } 1829 }
1832 1830
1831 /* consider speeding down */
1832 dev = ehc->i.dev;
1833 if (!dev && ata_link_max_devices(link) == 1 &&
1834 ata_dev_enabled(link->device))
1835 dev = link->device;
1836
1837 if (dev)
1838 ehc->i.action |= ata_eh_speed_down(dev, is_io, all_err_mask);
1839
1833 DPRINTK("EXIT\n"); 1840 DPRINTK("EXIT\n");
1834} 1841}
1835 1842
@@ -2065,16 +2072,19 @@ int ata_eh_reset(struct ata_link *link, int classify,
2065 ata_prereset_fn_t prereset, ata_reset_fn_t softreset, 2072 ata_prereset_fn_t prereset, ata_reset_fn_t softreset,
2066 ata_reset_fn_t hardreset, ata_postreset_fn_t postreset) 2073 ata_reset_fn_t hardreset, ata_postreset_fn_t postreset)
2067{ 2074{
2075 const int max_tries = ARRAY_SIZE(ata_eh_reset_timeouts);
2068 struct ata_port *ap = link->ap; 2076 struct ata_port *ap = link->ap;
2069 struct ata_eh_context *ehc = &link->eh_context; 2077 struct ata_eh_context *ehc = &link->eh_context;
2070 unsigned int *classes = ehc->classes; 2078 unsigned int *classes = ehc->classes;
2079 unsigned int lflags = link->flags;
2071 int verbose = !(ehc->i.flags & ATA_EHI_QUIET); 2080 int verbose = !(ehc->i.flags & ATA_EHI_QUIET);
2072 int try = 0; 2081 int try = 0;
2073 struct ata_device *dev; 2082 struct ata_device *dev;
2074 unsigned long deadline; 2083 unsigned long deadline, now;
2075 unsigned int tmp_action; 2084 unsigned int tmp_action;
2076 ata_reset_fn_t reset; 2085 ata_reset_fn_t reset;
2077 unsigned long flags; 2086 unsigned long flags;
2087 u32 sstatus;
2078 int rc; 2088 int rc;
2079 2089
2080 /* about to reset */ 2090 /* about to reset */
@@ -2106,7 +2116,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
2106 /* Determine which reset to use and record in ehc->i.action. 2116 /* Determine which reset to use and record in ehc->i.action.
2107 * prereset() may examine and modify it. 2117 * prereset() may examine and modify it.
2108 */ 2118 */
2109 if (softreset && (!hardreset || (!(link->flags & ATA_LFLAG_NO_SRST) && 2119 if (softreset && (!hardreset || (!(lflags & ATA_LFLAG_NO_SRST) &&
2110 !sata_set_spd_needed(link) && 2120 !sata_set_spd_needed(link) &&
2111 !(ehc->i.action & ATA_EH_HARDRESET)))) 2121 !(ehc->i.action & ATA_EH_HARDRESET))))
2112 tmp_action = ATA_EH_SOFTRESET; 2122 tmp_action = ATA_EH_SOFTRESET;
@@ -2181,82 +2191,64 @@ int ata_eh_reset(struct ata_link *link, int classify,
2181 "follow-up softreset required " 2191 "follow-up softreset required "
2182 "but no softreset avaliable\n"); 2192 "but no softreset avaliable\n");
2183 rc = -EINVAL; 2193 rc = -EINVAL;
2184 goto out; 2194 goto fail;
2185 } 2195 }
2186 2196
2187 ata_eh_about_to_do(link, NULL, ATA_EH_RESET_MASK); 2197 ata_eh_about_to_do(link, NULL, ATA_EH_RESET_MASK);
2188 rc = ata_do_reset(link, reset, classes, deadline); 2198 rc = ata_do_reset(link, reset, classes, deadline);
2189
2190 if (rc == 0 && classify && classes[0] == ATA_DEV_UNKNOWN &&
2191 !(link->flags & ATA_LFLAG_ASSUME_CLASS)) {
2192 ata_link_printk(link, KERN_ERR,
2193 "classification failed\n");
2194 rc = -EINVAL;
2195 goto out;
2196 }
2197 } 2199 }
2198 2200
2199 /* if we skipped follow-up srst, clear rc */ 2201 /* -EAGAIN can happen if we skipped followup SRST */
2200 if (rc == -EAGAIN) 2202 if (rc && rc != -EAGAIN)
2201 rc = 0; 2203 goto fail;
2202
2203 if (rc && rc != -ERESTART && try < ARRAY_SIZE(ata_eh_reset_timeouts)) {
2204 unsigned long now = jiffies;
2205
2206 if (time_before(now, deadline)) {
2207 unsigned long delta = deadline - jiffies;
2208
2209 ata_link_printk(link, KERN_WARNING, "reset failed "
2210 "(errno=%d), retrying in %u secs\n",
2211 rc, (jiffies_to_msecs(delta) + 999) / 1000);
2212 2204
2213 while (delta) 2205 /* was classification successful? */
2214 delta = schedule_timeout_uninterruptible(delta); 2206 if (classify && classes[0] == ATA_DEV_UNKNOWN &&
2207 !(lflags & ATA_LFLAG_ASSUME_CLASS)) {
2208 if (try < max_tries) {
2209 ata_link_printk(link, KERN_WARNING,
2210 "classification failed\n");
2211 rc = -EINVAL;
2212 goto fail;
2215 } 2213 }
2216 2214
2217 if (rc == -EPIPE || 2215 ata_link_printk(link, KERN_WARNING,
2218 try == ARRAY_SIZE(ata_eh_reset_timeouts) - 1) 2216 "classfication failed, assuming ATA\n");
2219 sata_down_spd_limit(link); 2217 lflags |= ATA_LFLAG_ASSUME_ATA;
2220 if (hardreset)
2221 reset = hardreset;
2222 goto retry;
2223 } 2218 }
2224 2219
2225 if (rc == 0) { 2220 ata_link_for_each_dev(dev, link) {
2226 u32 sstatus; 2221 /* After the reset, the device state is PIO 0 and the
2222 * controller state is undefined. Reset also wakes up
2223 * drives from sleeping mode.
2224 */
2225 dev->pio_mode = XFER_PIO_0;
2226 dev->flags &= ~ATA_DFLAG_SLEEPING;
2227 2227
2228 ata_link_for_each_dev(dev, link) { 2228 if (ata_link_offline(link))
2229 /* After the reset, the device state is PIO 0 2229 continue;
2230 * and the controller state is undefined.
2231 * Reset also wakes up drives from sleeping
2232 * mode.
2233 */
2234 dev->pio_mode = XFER_PIO_0;
2235 dev->flags &= ~ATA_DFLAG_SLEEPING;
2236 2230
2237 if (ata_link_offline(link)) 2231 /* apply class override and convert UNKNOWN to NONE */
2238 continue; 2232 if (lflags & ATA_LFLAG_ASSUME_ATA)
2233 classes[dev->devno] = ATA_DEV_ATA;
2234 else if (lflags & ATA_LFLAG_ASSUME_SEMB)
2235 classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */
2236 else if (classes[dev->devno] == ATA_DEV_UNKNOWN)
2237 classes[dev->devno] = ATA_DEV_NONE;
2238 }
2239 2239
2240 /* apply class override and convert UNKNOWN to NONE */ 2240 /* record current link speed */
2241 if (link->flags & ATA_LFLAG_ASSUME_ATA) 2241 if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0)
2242 classes[dev->devno] = ATA_DEV_ATA; 2242 link->sata_spd = (sstatus >> 4) & 0xf;
2243 else if (link->flags & ATA_LFLAG_ASSUME_SEMB)
2244 classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */
2245 else if (classes[dev->devno] == ATA_DEV_UNKNOWN)
2246 classes[dev->devno] = ATA_DEV_NONE;
2247 }
2248 2243
2249 /* record current link speed */ 2244 if (postreset)
2250 if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0) 2245 postreset(link, classes);
2251 link->sata_spd = (sstatus >> 4) & 0xf;
2252 2246
2253 if (postreset) 2247 /* reset successful, schedule revalidation */
2254 postreset(link, classes); 2248 ata_eh_done(link, NULL, ehc->i.action & ATA_EH_RESET_MASK);
2249 ehc->i.action |= ATA_EH_REVALIDATE;
2255 2250
2256 /* reset successful, schedule revalidation */ 2251 rc = 0;
2257 ata_eh_done(link, NULL, ehc->i.action & ATA_EH_RESET_MASK);
2258 ehc->i.action |= ATA_EH_REVALIDATE;
2259 }
2260 out: 2252 out:
2261 /* clear hotplug flag */ 2253 /* clear hotplug flag */
2262 ehc->i.flags &= ~ATA_EHI_HOTPLUGGED; 2254 ehc->i.flags &= ~ATA_EHI_HOTPLUGGED;
@@ -2266,6 +2258,28 @@ int ata_eh_reset(struct ata_link *link, int classify,
2266 spin_unlock_irqrestore(ap->lock, flags); 2258 spin_unlock_irqrestore(ap->lock, flags);
2267 2259
2268 return rc; 2260 return rc;
2261
2262 fail:
2263 if (rc == -ERESTART || try >= max_tries)
2264 goto out;
2265
2266 now = jiffies;
2267 if (time_before(now, deadline)) {
2268 unsigned long delta = deadline - now;
2269
2270 ata_link_printk(link, KERN_WARNING, "reset failed "
2271 "(errno=%d), retrying in %u secs\n",
2272 rc, (jiffies_to_msecs(delta) + 999) / 1000);
2273
2274 while (delta)
2275 delta = schedule_timeout_uninterruptible(delta);
2276 }
2277
2278 if (rc == -EPIPE || try == max_tries - 1)
2279 sata_down_spd_limit(link);
2280 if (hardreset)
2281 reset = hardreset;
2282 goto retry;
2269} 2283}
2270 2284
2271static int ata_eh_revalidate_and_attach(struct ata_link *link, 2285static int ata_eh_revalidate_and_attach(struct ata_link *link,
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index fc89590d377..245057df69d 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -120,7 +120,7 @@ static const struct {
120 { MEDIUM_POWER, "medium_power" }, 120 { MEDIUM_POWER, "medium_power" },
121}; 121};
122 122
123const char *ata_scsi_lpm_get(enum link_pm policy) 123static const char *ata_scsi_lpm_get(enum link_pm policy)
124{ 124{
125 int i; 125 int i;
126 126
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index b4c37b9e413..d015b4adcfe 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -34,7 +34,8 @@ enum {
34 34
35 SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 35 SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
36 ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | 36 ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
37 ATA_FLAG_NCQ | ATA_FLAG_SKIP_D2H_BSY), 37 ATA_FLAG_NCQ),
38 SATA_FSL_HOST_LFLAGS = ATA_LFLAG_SKIP_D2H_BSY,
38 39
39 SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH, 40 SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH,
40 SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */ 41 SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */
@@ -264,10 +265,11 @@ struct sata_fsl_host_priv {
264 void __iomem *hcr_base; 265 void __iomem *hcr_base;
265 void __iomem *ssr_base; 266 void __iomem *ssr_base;
266 void __iomem *csr_base; 267 void __iomem *csr_base;
268 int irq;
267}; 269};
268 270
269static inline unsigned int sata_fsl_tag(unsigned int tag, 271static inline unsigned int sata_fsl_tag(unsigned int tag,
270 void __iomem * hcr_base) 272 void __iomem *hcr_base)
271{ 273{
272 /* We let libATA core do actual (queue) tag allocation */ 274 /* We let libATA core do actual (queue) tag allocation */
273 275
@@ -306,7 +308,7 @@ static void sata_fsl_setup_cmd_hdr_entry(struct sata_fsl_port_priv *pp,
306 pp->cmdslot[tag].prde_fis_len = 308 pp->cmdslot[tag].prde_fis_len =
307 cpu_to_le32((num_prde << 16) | (fis_len << 2)); 309 cpu_to_le32((num_prde << 16) | (fis_len << 2));
308 pp->cmdslot[tag].ttl = cpu_to_le32(data_xfer_len & ~0x03); 310 pp->cmdslot[tag].ttl = cpu_to_le32(data_xfer_len & ~0x03);
309 pp->cmdslot[tag].desc_info = cpu_to_le32((desc_info | (tag & 0x1F))); 311 pp->cmdslot[tag].desc_info = cpu_to_le32(desc_info | (tag & 0x1F));
310 312
311 VPRINTK("cda=0x%x, prde_fis_len=0x%x, ttl=0x%x, di=0x%x\n", 313 VPRINTK("cda=0x%x, prde_fis_len=0x%x, ttl=0x%x, di=0x%x\n",
312 pp->cmdslot[tag].cda, 314 pp->cmdslot[tag].cda,
@@ -316,7 +318,7 @@ static void sata_fsl_setup_cmd_hdr_entry(struct sata_fsl_port_priv *pp,
316} 318}
317 319
318static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc, 320static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
319 u32 * ttl, dma_addr_t cmd_desc_paddr) 321 u32 *ttl, dma_addr_t cmd_desc_paddr)
320{ 322{
321 struct scatterlist *sg; 323 struct scatterlist *sg;
322 unsigned int num_prde = 0; 324 unsigned int num_prde = 0;
@@ -353,7 +355,7 @@ static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
353 "s/g len unaligned : 0x%x\n", sg_len); 355 "s/g len unaligned : 0x%x\n", sg_len);
354 356
355 if ((num_prde == (SATA_FSL_MAX_PRD_DIRECT - 1)) && 357 if ((num_prde == (SATA_FSL_MAX_PRD_DIRECT - 1)) &&
356 !ata_sg_is_last(sg, qc)) { 358 (qc->n_iter + 1 != qc->n_elem)) {
357 VPRINTK("setting indirect prde\n"); 359 VPRINTK("setting indirect prde\n");
358 prd_ptr_to_indirect_ext = prd; 360 prd_ptr_to_indirect_ext = prd;
359 prd->dba = cpu_to_le32(indirect_ext_segment_paddr); 361 prd->dba = cpu_to_le32(indirect_ext_segment_paddr);
@@ -404,7 +406,7 @@ static void sata_fsl_qc_prep(struct ata_queued_cmd *qc)
404 cd = (struct command_desc *)pp->cmdentry + tag; 406 cd = (struct command_desc *)pp->cmdentry + tag;
405 cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; 407 cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE;
406 408
407 ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) & cd->cfis); 409 ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) &cd->cfis);
408 410
409 VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n", 411 VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n",
410 cd->cfis[0], cd->cfis[1], cd->cfis[2]); 412 cd->cfis[0], cd->cfis[1], cd->cfis[2]);
@@ -470,16 +472,10 @@ static int sata_fsl_scr_write(struct ata_port *ap, unsigned int sc_reg_in,
470 472
471 switch (sc_reg_in) { 473 switch (sc_reg_in) {
472 case SCR_STATUS: 474 case SCR_STATUS:
473 sc_reg = 0;
474 break;
475 case SCR_ERROR: 475 case SCR_ERROR:
476 sc_reg = 1;
477 break;
478 case SCR_CONTROL: 476 case SCR_CONTROL:
479 sc_reg = 2;
480 break;
481 case SCR_ACTIVE: 477 case SCR_ACTIVE:
482 sc_reg = 3; 478 sc_reg = sc_reg_in;
483 break; 479 break;
484 default: 480 default:
485 return -EINVAL; 481 return -EINVAL;
@@ -487,7 +483,7 @@ static int sata_fsl_scr_write(struct ata_port *ap, unsigned int sc_reg_in,
487 483
488 VPRINTK("xx_scr_write, reg_in = %d\n", sc_reg); 484 VPRINTK("xx_scr_write, reg_in = %d\n", sc_reg);
489 485
490 iowrite32(val, (void __iomem *)ssr_base + (sc_reg * 4)); 486 iowrite32(val, ssr_base + (sc_reg * 4));
491 return 0; 487 return 0;
492} 488}
493 489
@@ -500,16 +496,10 @@ static int sata_fsl_scr_read(struct ata_port *ap, unsigned int sc_reg_in,
500 496
501 switch (sc_reg_in) { 497 switch (sc_reg_in) {
502 case SCR_STATUS: 498 case SCR_STATUS:
503 sc_reg = 0;
504 break;
505 case SCR_ERROR: 499 case SCR_ERROR:
506 sc_reg = 1;
507 break;
508 case SCR_CONTROL: 500 case SCR_CONTROL:
509 sc_reg = 2;
510 break;
511 case SCR_ACTIVE: 501 case SCR_ACTIVE:
512 sc_reg = 3; 502 sc_reg = sc_reg_in;
513 break; 503 break;
514 default: 504 default:
515 return -EINVAL; 505 return -EINVAL;
@@ -517,7 +507,7 @@ static int sata_fsl_scr_read(struct ata_port *ap, unsigned int sc_reg_in,
517 507
518 VPRINTK("xx_scr_read, reg_in = %d\n", sc_reg); 508 VPRINTK("xx_scr_read, reg_in = %d\n", sc_reg);
519 509
520 *val = ioread32((void __iomem *)ssr_base + (sc_reg * 4)); 510 *val = ioread32(ssr_base + (sc_reg * 4));
521 return 0; 511 return 0;
522} 512}
523 513
@@ -571,7 +561,6 @@ static inline void sata_fsl_cache_taskfile_from_d2h_fis(struct ata_queued_cmd
571 struct ata_port *ap) 561 struct ata_port *ap)
572{ 562{
573 struct sata_fsl_port_priv *pp = ap->private_data; 563 struct sata_fsl_port_priv *pp = ap->private_data;
574 u8 fis[6 * 4];
575 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 564 struct sata_fsl_host_priv *host_priv = ap->host->private_data;
576 void __iomem *hcr_base = host_priv->hcr_base; 565 void __iomem *hcr_base = host_priv->hcr_base;
577 unsigned int tag = sata_fsl_tag(qc->tag, hcr_base); 566 unsigned int tag = sata_fsl_tag(qc->tag, hcr_base);
@@ -579,8 +568,7 @@ static inline void sata_fsl_cache_taskfile_from_d2h_fis(struct ata_queued_cmd
579 568
580 cd = pp->cmdentry + tag; 569 cd = pp->cmdentry + tag;
581 570
582 memcpy(fis, &cd->sfis, 6 * 4); /* should we use memcpy_from_io() */ 571 ata_tf_from_fis(cd->sfis, &pp->tf);
583 ata_tf_from_fis(fis, &pp->tf);
584} 572}
585 573
586static u8 sata_fsl_check_status(struct ata_port *ap) 574static u8 sata_fsl_check_status(struct ata_port *ap)
@@ -664,6 +652,7 @@ static int sata_fsl_port_start(struct ata_port *ap)
664 VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL)); 652 VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL));
665 VPRINTK("CHBA = 0x%x\n", ioread32(hcr_base + CHBA)); 653 VPRINTK("CHBA = 0x%x\n", ioread32(hcr_base + CHBA));
666 654
655#ifdef CONFIG_MPC8315_DS
667 /* 656 /*
668 * Workaround for 8315DS board 3gbps link-up issue, 657 * Workaround for 8315DS board 3gbps link-up issue,
669 * currently limit SATA port to GEN1 speed 658 * currently limit SATA port to GEN1 speed
@@ -676,6 +665,7 @@ static int sata_fsl_port_start(struct ata_port *ap)
676 sata_fsl_scr_read(ap, SCR_CONTROL, &temp); 665 sata_fsl_scr_read(ap, SCR_CONTROL, &temp);
677 dev_printk(KERN_WARNING, dev, "scr_control, speed limited to %x\n", 666 dev_printk(KERN_WARNING, dev, "scr_control, speed limited to %x\n",
678 temp); 667 temp);
668#endif
679 669
680 return 0; 670 return 0;
681} 671}
@@ -728,9 +718,10 @@ static unsigned int sata_fsl_dev_classify(struct ata_port *ap)
728 return ata_dev_classify(&tf); 718 return ata_dev_classify(&tf);
729} 719}
730 720
731static int sata_fsl_softreset(struct ata_port *ap, unsigned int *class, 721static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
732 unsigned long deadline) 722 unsigned long deadline)
733{ 723{
724 struct ata_port *ap = link->ap;
734 struct sata_fsl_port_priv *pp = ap->private_data; 725 struct sata_fsl_port_priv *pp = ap->private_data;
735 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 726 struct sata_fsl_host_priv *host_priv = ap->host->private_data;
736 void __iomem *hcr_base = host_priv->hcr_base; 727 void __iomem *hcr_base = host_priv->hcr_base;
@@ -739,10 +730,6 @@ static int sata_fsl_softreset(struct ata_port *ap, unsigned int *class,
739 u8 *cfis; 730 u8 *cfis;
740 u32 Serror; 731 u32 Serror;
741 int i = 0; 732 int i = 0;
742 struct ata_queued_cmd qc;
743 u8 *buf;
744 dma_addr_t dma_address;
745 struct scatterlist *sg;
746 unsigned long start_jiffies; 733 unsigned long start_jiffies;
747 734
748 DPRINTK("in xx_softreset\n"); 735 DPRINTK("in xx_softreset\n");
@@ -811,7 +798,7 @@ try_offline_again:
811 */ 798 */
812 799
813 temp = ata_wait_register(hcr_base + HSTATUS, 0xFF, 0, 1, 500); 800 temp = ata_wait_register(hcr_base + HSTATUS, 0xFF, 0, 1, 500);
814 if ((!(temp & 0x10)) || ata_port_offline(ap)) { 801 if ((!(temp & 0x10)) || ata_link_offline(link)) {
815 ata_port_printk(ap, KERN_WARNING, 802 ata_port_printk(ap, KERN_WARNING,
816 "No Device OR PHYRDY change,Hstatus = 0x%x\n", 803 "No Device OR PHYRDY change,Hstatus = 0x%x\n",
817 ioread32(hcr_base + HSTATUS)); 804 ioread32(hcr_base + HSTATUS));
@@ -842,13 +829,10 @@ try_offline_again:
842 * reached here, we can send a command to the target device 829 * reached here, we can send a command to the target device
843 */ 830 */
844 831
845 if (ap->sactive)
846 goto skip_srst_do_ncq_error_handling;
847
848 DPRINTK("Sending SRST/device reset\n"); 832 DPRINTK("Sending SRST/device reset\n");
849 833
850 ata_tf_init(ap->device, &tf); 834 ata_tf_init(link->device, &tf);
851 cfis = (u8 *) & pp->cmdentry->cfis; 835 cfis = (u8 *) &pp->cmdentry->cfis;
852 836
853 /* device reset/SRST is a control register update FIS, uses tag0 */ 837 /* device reset/SRST is a control register update FIS, uses tag0 */
854 sata_fsl_setup_cmd_hdr_entry(pp, 0, 838 sata_fsl_setup_cmd_hdr_entry(pp, 0,
@@ -912,76 +896,13 @@ try_offline_again:
912 * command bit of the CCreg 896 * command bit of the CCreg
913 */ 897 */
914 iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */ 898 iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */
915 goto check_device_signature;
916
917skip_srst_do_ncq_error_handling:
918
919 VPRINTK("Sending read log ext(10h) command\n");
920
921 memset(&qc, 0, sizeof(struct ata_queued_cmd));
922 ata_tf_init(ap->device, &tf);
923
924 tf.command = ATA_CMD_READ_LOG_EXT;
925 tf.lbal = ATA_LOG_SATA_NCQ;
926 tf.nsect = 1;
927 tf.hob_nsect = 0;
928 tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_LBA48 | ATA_TFLAG_DEVICE;
929 tf.protocol = ATA_PROT_PIO;
930
931 qc.tag = ATA_TAG_INTERNAL;
932 qc.scsicmd = NULL;
933 qc.ap = ap;
934 qc.dev = ap->device;
935
936 qc.tf = tf;
937 qc.flags |= ATA_QCFLAG_RESULT_TF;
938 qc.dma_dir = DMA_FROM_DEVICE;
939
940 buf = ap->sector_buf;
941 ata_sg_init_one(&qc, buf, 1 * ATA_SECT_SIZE);
942
943 /*
944 * Need to DMA-map the memory buffer associated with the command
945 */
946
947 sg = qc.__sg;
948 dma_address = dma_map_single(ap->dev, qc.buf_virt,
949 sg->length, DMA_FROM_DEVICE);
950
951 sg_dma_address(sg) = dma_address;
952 sg_dma_len(sg) = sg->length;
953
954 VPRINTK("EH, addr = 0x%x, len = 0x%x\n", dma_address, sg->length);
955
956 sata_fsl_qc_prep(&qc);
957 sata_fsl_qc_issue(&qc);
958
959 temp = ata_wait_register(CQ + hcr_base, 0x1, 0x1, 1, 5000);
960 if (temp & 0x1) {
961 VPRINTK("READ_LOG_EXT_10H issue failed\n");
962
963 VPRINTK("READ_LOG@5000,CQ=0x%x,CA=0x%x,CC=0x%x\n",
964 ioread32(CQ + hcr_base),
965 ioread32(CA + hcr_base), ioread32(CC + hcr_base));
966
967 sata_fsl_scr_read(ap, SCR_ERROR, &Serror);
968
969 VPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS));
970 VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL));
971 VPRINTK("Serror = 0x%x\n", Serror);
972 goto err;
973 }
974
975 iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */
976
977 check_device_signature:
978 899
979 DPRINTK("SATA FSL : Now checking device signature\n"); 900 DPRINTK("SATA FSL : Now checking device signature\n");
980 901
981 *class = ATA_DEV_NONE; 902 *class = ATA_DEV_NONE;
982 903
983 /* Verify if SStatus indicates device presence */ 904 /* Verify if SStatus indicates device presence */
984 if (ata_port_online(ap)) { 905 if (ata_link_online(link)) {
985 /* 906 /*
986 * if we are here, device presence has been detected, 907 * if we are here, device presence has been detected,
987 * 1st D2H FIS would have been received, but sfis in 908 * 1st D2H FIS would have been received, but sfis in
@@ -1002,25 +923,13 @@ err:
1002 return -EIO; 923 return -EIO;
1003} 924}
1004 925
1005static int sata_fsl_hardreset(struct ata_port *ap, unsigned int *class,
1006 unsigned long deadline)
1007{
1008 int retval;
1009
1010 retval = sata_std_hardreset(ap, class, deadline);
1011
1012 DPRINTK("SATA FSL : in xx_hardreset, retval = 0x%d\n", retval);
1013
1014 return retval;
1015}
1016
1017static void sata_fsl_error_handler(struct ata_port *ap) 926static void sata_fsl_error_handler(struct ata_port *ap)
1018{ 927{
1019 928
1020 DPRINTK("in xx_error_handler\n"); 929 DPRINTK("in xx_error_handler\n");
1021 930
1022 /* perform recovery */ 931 /* perform recovery */
1023 ata_do_eh(ap, ata_std_prereset, sata_fsl_softreset, sata_fsl_hardreset, 932 ata_do_eh(ap, ata_std_prereset, sata_fsl_softreset, sata_std_hardreset,
1024 ata_std_postreset); 933 ata_std_postreset);
1025} 934}
1026 935
@@ -1042,7 +951,8 @@ static void sata_fsl_irq_clear(struct ata_port *ap)
1042 951
1043static void sata_fsl_error_intr(struct ata_port *ap) 952static void sata_fsl_error_intr(struct ata_port *ap)
1044{ 953{
1045 struct ata_eh_info *ehi = &ap->eh_info; 954 struct ata_link *link = &ap->link;
955 struct ata_eh_info *ehi = &link->eh_info;
1046 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 956 struct sata_fsl_host_priv *host_priv = ap->host->private_data;
1047 void __iomem *hcr_base = host_priv->hcr_base; 957 void __iomem *hcr_base = host_priv->hcr_base;
1048 u32 hstatus, dereg, cereg = 0, SError = 0; 958 u32 hstatus, dereg, cereg = 0, SError = 0;
@@ -1111,7 +1021,7 @@ static void sata_fsl_error_intr(struct ata_port *ap)
1111 } 1021 }
1112 1022
1113 /* record error info */ 1023 /* record error info */
1114 qc = ata_qc_from_tag(ap, ap->active_tag); 1024 qc = ata_qc_from_tag(ap, link->active_tag);
1115 1025
1116 if (qc) { 1026 if (qc) {
1117 sata_fsl_cache_taskfile_from_d2h_fis(qc, qc->ap); 1027 sata_fsl_cache_taskfile_from_d2h_fis(qc, qc->ap);
@@ -1139,6 +1049,7 @@ static void sata_fsl_qc_complete(struct ata_queued_cmd *qc)
1139 1049
1140static void sata_fsl_host_intr(struct ata_port *ap) 1050static void sata_fsl_host_intr(struct ata_port *ap)
1141{ 1051{
1052 struct ata_link *link = &ap->link;
1142 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 1053 struct sata_fsl_host_priv *host_priv = ap->host->private_data;
1143 void __iomem *hcr_base = host_priv->hcr_base; 1054 void __iomem *hcr_base = host_priv->hcr_base;
1144 u32 hstatus, qc_active = 0; 1055 u32 hstatus, qc_active = 0;
@@ -1161,7 +1072,7 @@ static void sata_fsl_host_intr(struct ata_port *ap)
1161 return; 1072 return;
1162 } 1073 }
1163 1074
1164 if (ap->sactive) { /* only true for NCQ commands */ 1075 if (link->sactive) { /* only true for NCQ commands */
1165 int i; 1076 int i;
1166 /* Read command completed register */ 1077 /* Read command completed register */
1167 qc_active = ioread32(hcr_base + CC); 1078 qc_active = ioread32(hcr_base + CC);
@@ -1190,10 +1101,10 @@ static void sata_fsl_host_intr(struct ata_port *ap)
1190 1101
1191 } else if (ap->qc_active) { 1102 } else if (ap->qc_active) {
1192 iowrite32(1, hcr_base + CC); 1103 iowrite32(1, hcr_base + CC);
1193 qc = ata_qc_from_tag(ap, ap->active_tag); 1104 qc = ata_qc_from_tag(ap, link->active_tag);
1194 1105
1195 DPRINTK("completing non-ncq cmd, tag=%d,CC=0x%x\n", 1106 DPRINTK("completing non-ncq cmd, tag=%d,CC=0x%x\n",
1196 ap->active_tag, ioread32(hcr_base + CC)); 1107 link->active_tag, ioread32(hcr_base + CC));
1197 1108
1198 if (qc) { 1109 if (qc) {
1199 sata_fsl_qc_complete(qc); 1110 sata_fsl_qc_complete(qc);
@@ -1312,15 +1223,9 @@ static struct scsi_host_template sata_fsl_sht = {
1312 .slave_configure = ata_scsi_slave_config, 1223 .slave_configure = ata_scsi_slave_config,
1313 .slave_destroy = ata_scsi_slave_destroy, 1224 .slave_destroy = ata_scsi_slave_destroy,
1314 .bios_param = ata_std_bios_param, 1225 .bios_param = ata_std_bios_param,
1315#ifdef CONFIG_PM
1316 .suspend = ata_scsi_device_suspend,
1317 .resume = ata_scsi_device_resume,
1318#endif
1319}; 1226};
1320 1227
1321static const struct ata_port_operations sata_fsl_ops = { 1228static const struct ata_port_operations sata_fsl_ops = {
1322 .port_disable = ata_port_disable,
1323
1324 .check_status = sata_fsl_check_status, 1229 .check_status = sata_fsl_check_status,
1325 .check_altstatus = sata_fsl_check_status, 1230 .check_altstatus = sata_fsl_check_status,
1326 .dev_select = ata_noop_dev_select, 1231 .dev_select = ata_noop_dev_select,
@@ -1330,8 +1235,6 @@ static const struct ata_port_operations sata_fsl_ops = {
1330 .qc_prep = sata_fsl_qc_prep, 1235 .qc_prep = sata_fsl_qc_prep,
1331 .qc_issue = sata_fsl_qc_issue, 1236 .qc_issue = sata_fsl_qc_issue,
1332 .irq_clear = sata_fsl_irq_clear, 1237 .irq_clear = sata_fsl_irq_clear,
1333 .irq_on = ata_dummy_irq_on,
1334 .irq_ack = ata_dummy_irq_ack,
1335 1238
1336 .scr_read = sata_fsl_scr_read, 1239 .scr_read = sata_fsl_scr_read,
1337 .scr_write = sata_fsl_scr_write, 1240 .scr_write = sata_fsl_scr_write,
@@ -1348,6 +1251,7 @@ static const struct ata_port_operations sata_fsl_ops = {
1348static const struct ata_port_info sata_fsl_port_info[] = { 1251static const struct ata_port_info sata_fsl_port_info[] = {
1349 { 1252 {
1350 .flags = SATA_FSL_HOST_FLAGS, 1253 .flags = SATA_FSL_HOST_FLAGS,
1254 .link_flags = SATA_FSL_HOST_LFLAGS,
1351 .pio_mask = 0x1f, /* pio 0-4 */ 1255 .pio_mask = 0x1f, /* pio 0-4 */
1352 .udma_mask = 0x7f, /* udma 0-6 */ 1256 .udma_mask = 0x7f, /* udma 0-6 */
1353 .port_ops = &sata_fsl_ops, 1257 .port_ops = &sata_fsl_ops,
@@ -1398,6 +1302,7 @@ static int sata_fsl_probe(struct of_device *ofdev,
1398 dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n"); 1302 dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n");
1399 goto error_exit_with_cleanup; 1303 goto error_exit_with_cleanup;
1400 } 1304 }
1305 host_priv->irq = irq;
1401 1306
1402 /* allocate host structure */ 1307 /* allocate host structure */
1403 host = ata_host_alloc_pinfo(&ofdev->dev, ppi, SATA_FSL_MAX_PORTS); 1308 host = ata_host_alloc_pinfo(&ofdev->dev, ppi, SATA_FSL_MAX_PORTS);
@@ -1444,7 +1349,7 @@ static int sata_fsl_remove(struct of_device *ofdev)
1444 1349
1445 dev_set_drvdata(&ofdev->dev, NULL); 1350 dev_set_drvdata(&ofdev->dev, NULL);
1446 1351
1447 irq_dispose_mapping(host->irq); 1352 irq_dispose_mapping(host_priv->irq);
1448 iounmap(host_priv->hcr_base); 1353 iounmap(host_priv->hcr_base);
1449 kfree(host_priv); 1354 kfree(host_priv);
1450 1355
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index 825e717bcef..7914def54fa 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -587,7 +587,7 @@ static void pdc_fill_sg(struct ata_queued_cmd *qc)
587 VPRINTK("Splitting last PRD.\n"); 587 VPRINTK("Splitting last PRD.\n");
588 588
589 addr = le32_to_cpu(ap->prd[idx - 1].addr); 589 addr = le32_to_cpu(ap->prd[idx - 1].addr);
590 ap->prd[idx - 1].flags_len -= cpu_to_le32(SG_COUNT_ASIC_BUG); 590 ap->prd[idx - 1].flags_len = cpu_to_le32(len - SG_COUNT_ASIC_BUG);
591 VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", idx - 1, addr, SG_COUNT_ASIC_BUG); 591 VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", idx - 1, addr, SG_COUNT_ASIC_BUG);
592 592
593 addr = addr + len - SG_COUNT_ASIC_BUG; 593 addr = addr + len - SG_COUNT_ASIC_BUG;
diff --git a/drivers/base/dmapool.c b/drivers/base/dmapool.c
index 5beddc322e6..b5034dc72a0 100644
--- a/drivers/base/dmapool.c
+++ b/drivers/base/dmapool.c
@@ -2,7 +2,6 @@
2#include <linux/device.h> 2#include <linux/device.h>
3#include <linux/mm.h> 3#include <linux/mm.h>
4#include <asm/io.h> /* Needed for i386 to build */ 4#include <asm/io.h> /* Needed for i386 to build */
5#include <asm/scatterlist.h> /* Needed for i386 to build */
6#include <linux/dma-mapping.h> 5#include <linux/dma-mapping.h>
7#include <linux/dmapool.h> 6#include <linux/dmapool.h>
8#include <linux/slab.h> 7#include <linux/slab.h>
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index dd332f28e08..0b27da7d749 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -297,7 +297,7 @@ static struct hid_usage *hidinput_find_key(struct hid_device *hid,
297static int hidinput_getkeycode(struct input_dev *dev, int scancode, 297static int hidinput_getkeycode(struct input_dev *dev, int scancode,
298 int *keycode) 298 int *keycode)
299{ 299{
300 struct hid_device *hid = dev->private; 300 struct hid_device *hid = input_get_drvdata(dev);
301 struct hid_usage *usage; 301 struct hid_usage *usage;
302 302
303 usage = hidinput_find_key(hid, scancode, 0); 303 usage = hidinput_find_key(hid, scancode, 0);
@@ -311,7 +311,7 @@ static int hidinput_getkeycode(struct input_dev *dev, int scancode,
311static int hidinput_setkeycode(struct input_dev *dev, int scancode, 311static int hidinput_setkeycode(struct input_dev *dev, int scancode,
312 int keycode) 312 int keycode)
313{ 313{
314 struct hid_device *hid = dev->private; 314 struct hid_device *hid = input_get_drvdata(dev);
315 struct hid_usage *usage; 315 struct hid_usage *usage;
316 int old_keycode; 316 int old_keycode;
317 317
@@ -1152,7 +1152,7 @@ int hidinput_connect(struct hid_device *hid)
1152 kfree(hidinput); 1152 kfree(hidinput);
1153 input_free_device(input_dev); 1153 input_free_device(input_dev);
1154 err_hid("Out of memory during hid input probe"); 1154 err_hid("Out of memory during hid input probe");
1155 return -1; 1155 goto out_unwind;
1156 } 1156 }
1157 1157
1158 input_set_drvdata(input_dev, hid); 1158 input_set_drvdata(input_dev, hid);
@@ -1186,15 +1186,25 @@ int hidinput_connect(struct hid_device *hid)
1186 * UGCI) cram a lot of unrelated inputs into the 1186 * UGCI) cram a lot of unrelated inputs into the
1187 * same interface. */ 1187 * same interface. */
1188 hidinput->report = report; 1188 hidinput->report = report;
1189 input_register_device(hidinput->input); 1189 if (input_register_device(hidinput->input))
1190 goto out_cleanup;
1190 hidinput = NULL; 1191 hidinput = NULL;
1191 } 1192 }
1192 } 1193 }
1193 1194
1194 if (hidinput) 1195 if (hidinput && input_register_device(hidinput->input))
1195 input_register_device(hidinput->input); 1196 goto out_cleanup;
1196 1197
1197 return 0; 1198 return 0;
1199
1200out_cleanup:
1201 input_free_device(hidinput->input);
1202 kfree(hidinput);
1203out_unwind:
1204 /* unwind the ones we already registered */
1205 hidinput_disconnect(hid);
1206
1207 return -1;
1198} 1208}
1199EXPORT_SYMBOL_GPL(hidinput_connect); 1209EXPORT_SYMBOL_GPL(hidinput_connect);
1200 1210
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index 41a59a80e7e..a2552856476 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -129,6 +129,11 @@
129#define USB_DEVICE_ID_0_8_8_IF_KIT 0x0053 129#define USB_DEVICE_ID_0_8_8_IF_KIT 0x0053
130#define USB_DEVICE_ID_PHIDGET_MOTORCONTROL 0x0058 130#define USB_DEVICE_ID_PHIDGET_MOTORCONTROL 0x0058
131 131
132#define USB_VENDOR_ID_GOTOP 0x08f2
133#define USB_DEVICE_ID_SUPER_Q2 0x007f
134#define USB_DEVICE_ID_GOGOPEN 0x00ce
135#define USB_DEVICE_ID_PENPOWER 0x00f4
136
132#define USB_VENDOR_ID_GRIFFIN 0x077d 137#define USB_VENDOR_ID_GRIFFIN 0x077d
133#define USB_DEVICE_ID_POWERMATE 0x0410 138#define USB_DEVICE_ID_POWERMATE 0x0410
134#define USB_DEVICE_ID_SOUNDKNOB 0x04AA 139#define USB_DEVICE_ID_SOUNDKNOB 0x04AA
@@ -415,6 +420,9 @@ static const struct hid_blacklist {
415 { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_7_IF_KIT, HID_QUIRK_IGNORE }, 420 { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_7_IF_KIT, HID_QUIRK_IGNORE },
416 { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE }, 421 { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE },
417 { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_PHIDGET_MOTORCONTROL, HID_QUIRK_IGNORE }, 422 { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_PHIDGET_MOTORCONTROL, HID_QUIRK_IGNORE },
423 { USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_SUPER_Q2, HID_QUIRK_IGNORE },
424 { USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_GOGOPEN, HID_QUIRK_IGNORE },
425 { USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_PENPOWER, HID_QUIRK_IGNORE },
418 { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE }, 426 { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE },
419 { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE }, 427 { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE },
420 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_90, HID_QUIRK_IGNORE }, 428 { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_90, HID_QUIRK_IGNORE },
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index 9837adcb17e..5fc4019956b 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -743,7 +743,7 @@ inval:
743static long hiddev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 743static long hiddev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
744{ 744{
745 struct inode *inode = file->f_path.dentry->d_inode; 745 struct inode *inode = file->f_path.dentry->d_inode;
746 return hiddev_ioctl(inode, file, cmd, compat_ptr(arg)); 746 return hiddev_ioctl(inode, file, cmd, (unsigned long)compat_ptr(arg));
747} 747}
748#endif 748#endif
749 749
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index d5dfe11aa5c..b83d254bc86 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -71,11 +71,11 @@
71#include <linux/types.h> 71#include <linux/types.h>
72#include <linux/wait.h> 72#include <linux/wait.h>
73#include <linux/workqueue.h> 73#include <linux/workqueue.h>
74#include <linux/scatterlist.h>
74 75
75#include <asm/byteorder.h> 76#include <asm/byteorder.h>
76#include <asm/errno.h> 77#include <asm/errno.h>
77#include <asm/param.h> 78#include <asm/param.h>
78#include <asm/scatterlist.h>
79#include <asm/system.h> 79#include <asm/system.h>
80#include <asm/types.h> 80#include <asm/types.h>
81 81
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 6dd375825a1..6e9d75bd2b1 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -120,6 +120,7 @@ static const struct xpad_device {
120 { 0x0738, 0x4536, "Mad Catz MicroCON", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 120 { 0x0738, 0x4536, "Mad Catz MicroCON", MAP_DPAD_TO_AXES, XTYPE_XBOX },
121 { 0x0738, 0x4540, "Mad Catz Beat Pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, 121 { 0x0738, 0x4540, "Mad Catz Beat Pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
122 { 0x0738, 0x4556, "Mad Catz Lynx Wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 122 { 0x0738, 0x4556, "Mad Catz Lynx Wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
123 { 0x0738, 0x4716, "Mad Catz Wired Xbox 360 Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX360 },
123 { 0x0738, 0x6040, "Mad Catz Beat Pad Pro", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, 124 { 0x0738, 0x6040, "Mad Catz Beat Pad Pro", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
124 { 0x0c12, 0x8802, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 125 { 0x0c12, 0x8802, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
125 { 0x0c12, 0x8810, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 126 { 0x0c12, 0x8810, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
@@ -129,6 +130,7 @@ static const struct xpad_device {
129 { 0x0e6f, 0x0003, "Logic3 Freebird wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 130 { 0x0e6f, 0x0003, "Logic3 Freebird wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
130 { 0x0e6f, 0x0005, "Eclipse wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 131 { 0x0e6f, 0x0005, "Eclipse wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
131 { 0x0e6f, 0x0006, "Edge wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 132 { 0x0e6f, 0x0006, "Edge wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
133 { 0x0e6f, 0x0006, "Pelican 'TSZ' Wired Xbox 360 Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX360 },
132 { 0x0e8f, 0x0201, "SmartJoy Frag Xpad/PS2 adaptor", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 134 { 0x0e8f, 0x0201, "SmartJoy Frag Xpad/PS2 adaptor", MAP_DPAD_TO_AXES, XTYPE_XBOX },
133 { 0x0f30, 0x0202, "Joytech Advanced Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 135 { 0x0f30, 0x0202, "Joytech Advanced Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
134 { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 136 { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c
index 4941a9e61e9..43aaa5cebd1 100644
--- a/drivers/input/misc/pcspkr.c
+++ b/drivers/input/misc/pcspkr.c
@@ -24,7 +24,7 @@ MODULE_DESCRIPTION("PC Speaker beeper driver");
24MODULE_LICENSE("GPL"); 24MODULE_LICENSE("GPL");
25MODULE_ALIAS("platform:pcspkr"); 25MODULE_ALIAS("platform:pcspkr");
26 26
27#ifdef CONFIG_X86 27#if defined(CONFIG_MIPS) || defined(CONFIG_X86)
28/* Use the global PIT lock ! */ 28/* Use the global PIT lock ! */
29#include <asm/i8253.h> 29#include <asm/i8253.h>
30#else 30#else
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index f132702d137..b4423a471f0 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -129,12 +129,12 @@ MODULE_DEVICE_TABLE (usb, atp_table);
129 */ 129 */
130#define ATP_THRESHOLD 5 130#define ATP_THRESHOLD 5
131 131
132/* MacBook Pro (Geyser 3 & 4) initialization constants */ 132/* Geyser initialization constants */
133#define ATP_GEYSER3_MODE_READ_REQUEST_ID 1 133#define ATP_GEYSER_MODE_READ_REQUEST_ID 1
134#define ATP_GEYSER3_MODE_WRITE_REQUEST_ID 9 134#define ATP_GEYSER_MODE_WRITE_REQUEST_ID 9
135#define ATP_GEYSER3_MODE_REQUEST_VALUE 0x300 135#define ATP_GEYSER_MODE_REQUEST_VALUE 0x300
136#define ATP_GEYSER3_MODE_REQUEST_INDEX 0 136#define ATP_GEYSER_MODE_REQUEST_INDEX 0
137#define ATP_GEYSER3_MODE_VENDOR_VALUE 0x04 137#define ATP_GEYSER_MODE_VENDOR_VALUE 0x04
138 138
139/* Structure to hold all of our device specific stuff */ 139/* Structure to hold all of our device specific stuff */
140struct atp { 140struct atp {
@@ -142,9 +142,11 @@ struct atp {
142 struct usb_device * udev; /* usb device */ 142 struct usb_device * udev; /* usb device */
143 struct urb * urb; /* usb request block */ 143 struct urb * urb; /* usb request block */
144 signed char * data; /* transferred data */ 144 signed char * data; /* transferred data */
145 int open; /* non-zero if opened */ 145 struct input_dev * input; /* input dev */
146 struct input_dev *input; /* input dev */ 146 unsigned char open; /* non-zero if opened */
147 int valid; /* are the sensors valid ? */ 147 unsigned char valid; /* are the sensors valid ? */
148 unsigned char size_detect_done;
149 unsigned char overflowwarn; /* overflow warning printed? */
148 int x_old; /* last reported x/y, */ 150 int x_old; /* last reported x/y, */
149 int y_old; /* used for smoothing */ 151 int y_old; /* used for smoothing */
150 /* current value of the sensors */ 152 /* current value of the sensors */
@@ -153,7 +155,6 @@ struct atp {
153 signed char xy_old[ATP_XSENSORS + ATP_YSENSORS]; 155 signed char xy_old[ATP_XSENSORS + ATP_YSENSORS];
154 /* accumulated sensors */ 156 /* accumulated sensors */
155 int xy_acc[ATP_XSENSORS + ATP_YSENSORS]; 157 int xy_acc[ATP_XSENSORS + ATP_YSENSORS];
156 int overflowwarn; /* overflow warning printed? */
157 int datalen; /* size of an USB urb transfer */ 158 int datalen; /* size of an USB urb transfer */
158 int idlecount; /* number of empty packets */ 159 int idlecount; /* number of empty packets */
159 struct work_struct work; 160 struct work_struct work;
@@ -170,7 +171,7 @@ struct atp {
170 171
171#define dprintk(format, a...) \ 172#define dprintk(format, a...) \
172 do { \ 173 do { \
173 if (debug) printk(format, ##a); \ 174 if (debug) printk(KERN_DEBUG format, ##a); \
174 } while (0) 175 } while (0)
175 176
176MODULE_AUTHOR("Johannes Berg, Stelian Pop, Frank Arnold, Michael Hanselmann"); 177MODULE_AUTHOR("Johannes Berg, Stelian Pop, Frank Arnold, Michael Hanselmann");
@@ -188,6 +189,15 @@ static int debug = 1;
188module_param(debug, int, 0644); 189module_param(debug, int, 0644);
189MODULE_PARM_DESC(debug, "Activate debugging output"); 190MODULE_PARM_DESC(debug, "Activate debugging output");
190 191
192static inline int atp_is_fountain(struct atp *dev)
193{
194 u16 productId = le16_to_cpu(dev->udev->descriptor.idProduct);
195
196 return productId == FOUNTAIN_ANSI_PRODUCT_ID ||
197 productId == FOUNTAIN_ISO_PRODUCT_ID ||
198 productId == FOUNTAIN_TP_ONLY_PRODUCT_ID;
199}
200
191/* Checks if the device a Geyser 2 (ANSI, ISO, JIS) */ 201/* Checks if the device a Geyser 2 (ANSI, ISO, JIS) */
192static inline int atp_is_geyser_2(struct atp *dev) 202static inline int atp_is_geyser_2(struct atp *dev)
193{ 203{
@@ -211,52 +221,63 @@ static inline int atp_is_geyser_3(struct atp *dev)
211} 221}
212 222
213/* 223/*
214 * By default Geyser 3 device sends standard USB HID mouse 224 * By default newer Geyser devices send standard USB HID mouse
215 * packets (Report ID 2). This code changes device mode, so it 225 * packets (Report ID 2). This code changes device mode, so it
216 * sends raw sensor reports (Report ID 5). 226 * sends raw sensor reports (Report ID 5).
217 */ 227 */
218static int atp_geyser3_init(struct usb_device *udev) 228static int atp_geyser_init(struct usb_device *udev)
219{ 229{
220 char data[8]; 230 char data[8];
221 int size; 231 int size;
222 232
223 size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), 233 size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
224 ATP_GEYSER3_MODE_READ_REQUEST_ID, 234 ATP_GEYSER_MODE_READ_REQUEST_ID,
225 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 235 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
226 ATP_GEYSER3_MODE_REQUEST_VALUE, 236 ATP_GEYSER_MODE_REQUEST_VALUE,
227 ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000); 237 ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000);
228 238
229 if (size != 8) { 239 if (size != 8) {
230 err("Could not do mode read request from device" 240 err("Could not do mode read request from device"
231 " (Geyser 3 mode)"); 241 " (Geyser Raw mode)");
232 return -EIO; 242 return -EIO;
233 } 243 }
234 244
235 /* Apply the mode switch */ 245 /* Apply the mode switch */
236 data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE; 246 data[0] = ATP_GEYSER_MODE_VENDOR_VALUE;
237 247
238 size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 248 size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
239 ATP_GEYSER3_MODE_WRITE_REQUEST_ID, 249 ATP_GEYSER_MODE_WRITE_REQUEST_ID,
240 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 250 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
241 ATP_GEYSER3_MODE_REQUEST_VALUE, 251 ATP_GEYSER_MODE_REQUEST_VALUE,
242 ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000); 252 ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000);
243 253
244 if (size != 8) { 254 if (size != 8) {
245 err("Could not do mode write request to device" 255 err("Could not do mode write request to device"
246 " (Geyser 3 mode)"); 256 " (Geyser Raw mode)");
247 return -EIO; 257 return -EIO;
248 } 258 }
249 return 0; 259 return 0;
250} 260}
251 261
252/* Reinitialise the device if it's a geyser 3 */ 262/*
263 * Reinitialise the device. This usually stops stream of empty packets
264 * coming from it.
265 */
253static void atp_reinit(struct work_struct *work) 266static void atp_reinit(struct work_struct *work)
254{ 267{
255 struct atp *dev = container_of(work, struct atp, work); 268 struct atp *dev = container_of(work, struct atp, work);
256 struct usb_device *udev = dev->udev; 269 struct usb_device *udev = dev->udev;
270 int retval;
257 271
258 dev->idlecount = 0; 272 dev->idlecount = 0;
259 atp_geyser3_init(udev); 273
274 atp_geyser_init(udev);
275
276 retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
277 if (retval) {
278 err("%s - usb_submit_urb failed with result %d",
279 __FUNCTION__, retval);
280 }
260} 281}
261 282
262static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact, 283static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact,
@@ -337,7 +358,7 @@ static void atp_complete(struct urb* urb)
337 break; 358 break;
338 case -EOVERFLOW: 359 case -EOVERFLOW:
339 if(!dev->overflowwarn) { 360 if(!dev->overflowwarn) {
340 printk("appletouch: OVERFLOW with data " 361 printk(KERN_WARNING "appletouch: OVERFLOW with data "
341 "length %d, actual length is %d\n", 362 "length %d, actual length is %d\n",
342 dev->datalen, dev->urb->actual_length); 363 dev->datalen, dev->urb->actual_length);
343 dev->overflowwarn = 1; 364 dev->overflowwarn = 1;
@@ -426,15 +447,17 @@ static void atp_complete(struct urb* urb)
426 dev->x_old = dev->y_old = -1; 447 dev->x_old = dev->y_old = -1;
427 memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old)); 448 memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old));
428 449
429 if (atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */ 450 if (dev->size_detect_done ||
451 atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */
430 goto exit; 452 goto exit;
431 453
432 /* 17" Powerbooks have extra X sensors */ 454 /* 17" Powerbooks have extra X sensors */
433 for (i = (atp_is_geyser_2(dev)?15:16); i < ATP_XSENSORS; i++) { 455 for (i = (atp_is_geyser_2(dev) ? 15 : 16); i < ATP_XSENSORS; i++) {
434 if (!dev->xy_cur[i]) continue; 456 if (!dev->xy_cur[i])
457 continue;
435 458
436 printk("appletouch: 17\" model detected.\n"); 459 printk(KERN_INFO "appletouch: 17\" model detected.\n");
437 if(atp_is_geyser_2(dev)) 460 if (atp_is_geyser_2(dev))
438 input_set_abs_params(dev->input, ABS_X, 0, 461 input_set_abs_params(dev->input, ABS_X, 0,
439 (20 - 1) * 462 (20 - 1) *
440 ATP_XFACT - 1, 463 ATP_XFACT - 1,
@@ -444,10 +467,10 @@ static void atp_complete(struct urb* urb)
444 (ATP_XSENSORS - 1) * 467 (ATP_XSENSORS - 1) *
445 ATP_XFACT - 1, 468 ATP_XFACT - 1,
446 ATP_FUZZ, 0); 469 ATP_FUZZ, 0);
447
448 break; 470 break;
449 } 471 }
450 472
473 dev->size_detect_done = 1;
451 goto exit; 474 goto exit;
452 } 475 }
453 476
@@ -479,7 +502,7 @@ static void atp_complete(struct urb* urb)
479 dev->y_old = y; 502 dev->y_old = y;
480 503
481 if (debug > 1) 504 if (debug > 1)
482 printk("appletouch: X: %3d Y: %3d " 505 printk(KERN_DEBUG "appletouch: X: %3d Y: %3d "
483 "Xz: %3d Yz: %3d\n", 506 "Xz: %3d Yz: %3d\n",
484 x, y, x_z, y_z); 507 x, y, x_z, y_z);
485 508
@@ -507,19 +530,25 @@ static void atp_complete(struct urb* urb)
507 input_report_key(dev->input, BTN_LEFT, key); 530 input_report_key(dev->input, BTN_LEFT, key);
508 input_sync(dev->input); 531 input_sync(dev->input);
509 532
510 /* Many Geysers will continue to send packets continually after 533 /*
511 the first touch unless reinitialised. Do so if it's been 534 * Many Geysers will continue to send packets continually after
512 idle for a while in order to avoid waking the kernel up 535 * the first touch unless reinitialised. Do so if it's been
513 several hundred times a second */ 536 * idle for a while in order to avoid waking the kernel up
514 537 * several hundred times a second. Re-initialization does not
515 if (!x && !y && !key) { 538 * work on Fountain touchpads.
516 dev->idlecount++; 539 */
517 if (dev->idlecount == 10) { 540 if (!atp_is_fountain(dev)) {
518 dev->valid = 0; 541 if (!x && !y && !key) {
519 schedule_work(&dev->work); 542 dev->idlecount++;
520 } 543 if (dev->idlecount == 10) {
521 } else 544 dev->valid = 0;
522 dev->idlecount = 0; 545 schedule_work(&dev->work);
546 /* Don't resubmit urb here, wait for reinit */
547 return;
548 }
549 } else
550 dev->idlecount = 0;
551 }
523 552
524exit: 553exit:
525 retval = usb_submit_urb(dev->urb, GFP_ATOMIC); 554 retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
@@ -593,12 +622,12 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id
593 else 622 else
594 dev->datalen = 81; 623 dev->datalen = 81;
595 624
596 if (atp_is_geyser_3(dev)) { 625 if (!atp_is_fountain(dev)) {
597 /* switch to raw sensor mode */ 626 /* switch to raw sensor mode */
598 if (atp_geyser3_init(udev)) 627 if (atp_geyser_init(udev))
599 goto err_free_devs; 628 goto err_free_devs;
600 629
601 printk("appletouch Geyser 3 inited.\n"); 630 printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
602 } 631 }
603 632
604 dev->urb = usb_alloc_urb(0, GFP_KERNEL); 633 dev->urb = usb_alloc_urb(0, GFP_KERNEL);
diff --git a/drivers/input/mouse/inport.c b/drivers/input/mouse/inport.c
index 655a3921743..26ec09529b5 100644
--- a/drivers/input/mouse/inport.c
+++ b/drivers/input/mouse/inport.c
@@ -144,7 +144,7 @@ static int __init inport_init(void)
144 b = inb(INPORT_SIGNATURE_PORT); 144 b = inb(INPORT_SIGNATURE_PORT);
145 c = inb(INPORT_SIGNATURE_PORT); 145 c = inb(INPORT_SIGNATURE_PORT);
146 if (a == b || a != c) { 146 if (a == b || a != c) {
147 printk(KERN_ERR "inport.c: Didn't find InPort mouse at %#x\n", INPORT_BASE); 147 printk(KERN_INFO "inport.c: Didn't find InPort mouse at %#x\n", INPORT_BASE);
148 err = -ENODEV; 148 err = -ENODEV;
149 goto err_release_region; 149 goto err_release_region;
150 } 150 }
diff --git a/drivers/input/mouse/logibm.c b/drivers/input/mouse/logibm.c
index b23a4f3ea5c..37e7c75b43b 100644
--- a/drivers/input/mouse/logibm.c
+++ b/drivers/input/mouse/logibm.c
@@ -134,7 +134,7 @@ static int __init logibm_init(void)
134 udelay(100); 134 udelay(100);
135 135
136 if (inb(LOGIBM_SIGNATURE_PORT) != LOGIBM_SIGNATURE_BYTE) { 136 if (inb(LOGIBM_SIGNATURE_PORT) != LOGIBM_SIGNATURE_BYTE) {
137 printk(KERN_ERR "logibm.c: Didn't find Logitech busmouse at %#x\n", LOGIBM_BASE); 137 printk(KERN_INFO "logibm.c: Didn't find Logitech busmouse at %#x\n", LOGIBM_BASE);
138 err = -ENODEV; 138 err = -ENODEV;
139 goto err_release_region; 139 goto err_release_region;
140 } 140 }
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c
index 6af199805ff..02b3ad8c082 100644
--- a/drivers/input/serio/hp_sdc.c
+++ b/drivers/input/serio/hp_sdc.c
@@ -944,11 +944,7 @@ static int __init hp_sdc_init_hppa(struct parisc_device *d)
944 944
945#endif /* __hppa__ */ 945#endif /* __hppa__ */
946 946
947#if !defined(__mc68000__) /* Link error on m68k! */
948static void __exit hp_sdc_exit(void)
949#else
950static void hp_sdc_exit(void) 947static void hp_sdc_exit(void)
951#endif
952{ 948{
953 write_lock_irq(&hp_sdc.lock); 949 write_lock_irq(&hp_sdc.lock);
954 950
diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h
index 0b92c35a843..d4ac4c4b49b 100644
--- a/drivers/media/video/bt8xx/bttvp.h
+++ b/drivers/media/video/bt8xx/bttvp.h
@@ -36,7 +36,7 @@
36#include <linux/pci.h> 36#include <linux/pci.h>
37#include <linux/input.h> 37#include <linux/input.h>
38#include <linux/mutex.h> 38#include <linux/mutex.h>
39#include <asm/scatterlist.h> 39#include <linux/scatterlist.h>
40#include <asm/io.h> 40#include <asm/io.h>
41#include <media/v4l2-common.h> 41#include <media/v4l2-common.h>
42 42
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 09435e0ec68..b96667448eb 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -19,7 +19,6 @@
19#include <linux/pagemap.h> 19#include <linux/pagemap.h>
20#include <linux/err.h> 20#include <linux/err.h>
21#include <linux/leds.h> 21#include <linux/leds.h>
22#include <asm/scatterlist.h>
23#include <linux/scatterlist.h> 22#include <linux/scatterlist.h>
24 23
25#include <linux/mmc/card.h> 24#include <linux/mmc/card.h>
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 7471d49909b..64b05c6270f 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/types.h> 12#include <linux/types.h>
13#include <asm/scatterlist.h>
14#include <linux/scatterlist.h> 13#include <linux/scatterlist.h>
15 14
16#include <linux/mmc/host.h> 15#include <linux/mmc/host.h>
diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
index a6dafe62b99..0d96080d44b 100644
--- a/drivers/mmc/core/sd_ops.c
+++ b/drivers/mmc/core/sd_ops.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/types.h> 12#include <linux/types.h>
13#include <asm/scatterlist.h>
14#include <linux/scatterlist.h> 13#include <linux/scatterlist.h>
15 14
16#include <linux/mmc/host.h> 15#include <linux/mmc/host.h>
diff --git a/drivers/mmc/core/sdio_ops.c b/drivers/mmc/core/sdio_ops.c
index 4d289b27503..e1fca588e38 100644
--- a/drivers/mmc/core/sdio_ops.c
+++ b/drivers/mmc/core/sdio_ops.c
@@ -9,7 +9,6 @@
9 * your option) any later version. 9 * your option) any later version.
10 */ 10 */
11 11
12#include <asm/scatterlist.h>
13#include <linux/scatterlist.h> 12#include <linux/scatterlist.h>
14 13
15#include <linux/mmc/host.h> 14#include <linux/mmc/host.h>
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 867cb7345b5..5f800a6dd97 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1883,9 +1883,7 @@ config FEC2
1883 1883
1884config FEC_MPC52xx 1884config FEC_MPC52xx
1885 tristate "MPC52xx FEC driver" 1885 tristate "MPC52xx FEC driver"
1886 depends on PPC_MPC52xx 1886 depends on PPC_MERGE && PPC_MPC52xx && PPC_BESTCOMM_FEC
1887 select PPC_BESTCOMM
1888 select PPC_BESTCOMM_FEC
1889 select CRC32 1887 select CRC32
1890 select PHYLIB 1888 select PHYLIB
1891 ---help--- 1889 ---help---
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index fc1cf0b742b..a8a0ee220da 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -879,9 +879,9 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
879 "Error while parsing device node resource\n" ); 879 "Error while parsing device node resource\n" );
880 return rv; 880 return rv;
881 } 881 }
882 if ((mem.end - mem.start + 1) != sizeof(struct mpc52xx_fec)) { 882 if ((mem.end - mem.start + 1) < sizeof(struct mpc52xx_fec)) {
883 printk(KERN_ERR DRIVER_NAME 883 printk(KERN_ERR DRIVER_NAME
884 " - invalid resource size (%lx != %x), check mpc52xx_devices.c\n", 884 " - invalid resource size (%lx < %x), check mpc52xx_devices.c\n",
885 (unsigned long)(mem.end - mem.start + 1), sizeof(struct mpc52xx_fec)); 885 (unsigned long)(mem.end - mem.start + 1), sizeof(struct mpc52xx_fec));
886 return -EINVAL; 886 return -EINVAL;
887 } 887 }
diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index e25dbab6736..0c89b028a80 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -33,7 +33,6 @@
33#include <asm/ip32/ip32_ints.h> 33#include <asm/ip32/ip32_ints.h>
34 34
35#include <asm/io.h> 35#include <asm/io.h>
36#include <asm/scatterlist.h>
37 36
38#include "meth.h" 37#include "meth.h"
39 38
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 366e62a2b1e..0f306ddb563 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -1151,7 +1151,7 @@ static inline int myri10ge_clean_rx_done(struct myri10ge_priv *mgp, int budget)
1151 u16 length; 1151 u16 length;
1152 __wsum checksum; 1152 __wsum checksum;
1153 1153
1154 while (rx_done->entry[idx].length != 0 && work_done++ < budget) { 1154 while (rx_done->entry[idx].length != 0 && work_done < budget) {
1155 length = ntohs(rx_done->entry[idx].length); 1155 length = ntohs(rx_done->entry[idx].length);
1156 rx_done->entry[idx].length = 0; 1156 rx_done->entry[idx].length = 0;
1157 checksum = csum_unfold(rx_done->entry[idx].checksum); 1157 checksum = csum_unfold(rx_done->entry[idx].checksum);
@@ -1167,6 +1167,7 @@ static inline int myri10ge_clean_rx_done(struct myri10ge_priv *mgp, int budget)
1167 rx_bytes += rx_ok * (unsigned long)length; 1167 rx_bytes += rx_ok * (unsigned long)length;
1168 cnt++; 1168 cnt++;
1169 idx = cnt & (myri10ge_max_intr_slots - 1); 1169 idx = cnt & (myri10ge_max_intr_slots - 1);
1170 work_done++;
1170 } 1171 }
1171 rx_done->idx = idx; 1172 rx_done->idx = idx;
1172 rx_done->cnt = cnt; 1173 rx_done->cnt = cnt;
@@ -1233,13 +1234,12 @@ static int myri10ge_poll(struct napi_struct *napi, int budget)
1233 struct myri10ge_priv *mgp = 1234 struct myri10ge_priv *mgp =
1234 container_of(napi, struct myri10ge_priv, napi); 1235 container_of(napi, struct myri10ge_priv, napi);
1235 struct net_device *netdev = mgp->dev; 1236 struct net_device *netdev = mgp->dev;
1236 struct myri10ge_rx_done *rx_done = &mgp->rx_done;
1237 int work_done; 1237 int work_done;
1238 1238
1239 /* process as many rx events as NAPI will allow */ 1239 /* process as many rx events as NAPI will allow */
1240 work_done = myri10ge_clean_rx_done(mgp, budget); 1240 work_done = myri10ge_clean_rx_done(mgp, budget);
1241 1241
1242 if (rx_done->entry[rx_done->idx].length == 0 || !netif_running(netdev)) { 1242 if (work_done < budget || !netif_running(netdev)) {
1243 netif_rx_complete(netdev, napi); 1243 netif_rx_complete(netdev, napi);
1244 put_be32(htonl(3), mgp->irq_claim); 1244 put_be32(htonl(3), mgp->irq_claim);
1245 } 1245 }
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 61fdaf02f25..88de771d356 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -785,7 +785,7 @@ struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, gfp_t gfp_mask)
785 * end-of-list 785 * end-of-list
786 */ 786 */
787 if (!left) 787 if (!left)
788 sg_mark_end(sgl, this); 788 sg_mark_end(&sgl[this - 1]);
789 789
790 /* 790 /*
791 * don't allow subsequent mempool allocs to sleep, it would 791 * don't allow subsequent mempool allocs to sleep, it would
diff --git a/drivers/sh/maple/maple.c b/drivers/sh/maple/maple.c
index 161d1021b7e..e52a6296ca4 100644
--- a/drivers/sh/maple/maple.c
+++ b/drivers/sh/maple/maple.c
@@ -601,8 +601,7 @@ static int match_maple_bus_driver(struct device *devptr,
601 return 0; 601 return 0;
602} 602}
603 603
604static int maple_bus_uevent(struct device *dev, char **envp, 604static int maple_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
605 int num_envp, char *buffer, int buffer_size)
606{ 605{
607 return 0; 606 return 0;
608} 607}
diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
index ead2475406b..28d4972f7ad 100644
--- a/drivers/usb/core/buffer.c
+++ b/drivers/usb/core/buffer.c
@@ -11,7 +11,6 @@
11#include <linux/device.h> 11#include <linux/device.h>
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <asm/io.h> 13#include <asm/io.h>
14#include <asm/scatterlist.h>
15#include <linux/dma-mapping.h> 14#include <linux/dma-mapping.h>
16#include <linux/dmapool.h> 15#include <linux/dmapool.h>
17#include <linux/usb.h> 16#include <linux/usb.h>
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 3dd997df850..fea8256a18d 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -30,7 +30,6 @@
30#include <linux/utsname.h> 30#include <linux/utsname.h>
31#include <linux/mm.h> 31#include <linux/mm.h>
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/scatterlist.h>
34#include <linux/device.h> 33#include <linux/device.h>
35#include <linux/dma-mapping.h> 34#include <linux/dma-mapping.h>
36#include <linux/mutex.h> 35#include <linux/mutex.h>
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 69aa68287d3..c4a6f1095b8 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -36,7 +36,7 @@
36#include <linux/workqueue.h> 36#include <linux/workqueue.h>
37 37
38#include <asm/io.h> 38#include <asm/io.h>
39#include <asm/scatterlist.h> 39#include <linux/scatterlist.h>
40#include <linux/mm.h> 40#include <linux/mm.h>
41#include <linux/dma-mapping.h> 41#include <linux/dma-mapping.h>
42 42
diff --git a/drivers/watchdog/alim1535_wdt.c b/drivers/watchdog/alim1535_wdt.c
index c404fc69e7e..b481cc0e32e 100644
--- a/drivers/watchdog/alim1535_wdt.c
+++ b/drivers/watchdog/alim1535_wdt.c
@@ -31,7 +31,7 @@ static unsigned long ali_is_open;
31static char ali_expect_release; 31static char ali_expect_release;
32static struct pci_dev *ali_pci; 32static struct pci_dev *ali_pci;
33static u32 ali_timeout_bits; /* stores the computed timeout */ 33static u32 ali_timeout_bits; /* stores the computed timeout */
34static spinlock_t ali_lock; /* Guards the hardware */ 34static DEFINE_SPINLOCK(ali_lock); /* Guards the hardware */
35 35
36/* module parameters */ 36/* module parameters */
37static int timeout = WATCHDOG_TIMEOUT; 37static int timeout = WATCHDOG_TIMEOUT;
@@ -398,8 +398,6 @@ static int __init watchdog_init(void)
398{ 398{
399 int ret; 399 int ret;
400 400
401 spin_lock_init(&ali_lock);
402
403 /* Check whether or not the hardware watchdog is there */ 401 /* Check whether or not the hardware watchdog is there */
404 if (ali_find_watchdog() != 0) { 402 if (ali_find_watchdog() != 0) {
405 return -ENODEV; 403 return -ENODEV;
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index 19db5302ba6..a61cbd48dc0 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -61,7 +61,7 @@
61 61
62static int heartbeat = DEFAULT_HEARTBEAT; 62static int heartbeat = DEFAULT_HEARTBEAT;
63 63
64static spinlock_t io_lock; 64static DEFINE_SPINLOCK(io_lock);
65static unsigned long wdt_status; 65static unsigned long wdt_status;
66#define WDT_IN_USE 0 66#define WDT_IN_USE 0
67#define WDT_OK_TO_CLOSE 1 67#define WDT_OK_TO_CLOSE 1
@@ -200,8 +200,6 @@ static int davinci_wdt_probe(struct platform_device *pdev)
200 int ret = 0, size; 200 int ret = 0, size;
201 struct resource *res; 201 struct resource *res;
202 202
203 spin_lock_init(&io_lock);
204
205 if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT) 203 if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
206 heartbeat = DEFAULT_HEARTBEAT; 204 heartbeat = DEFAULT_HEARTBEAT;
207 205
@@ -262,7 +260,7 @@ static int __init davinci_wdt_init(void)
262 260
263static void __exit davinci_wdt_exit(void) 261static void __exit davinci_wdt_exit(void)
264{ 262{
265 return platform_driver_unregister(&platform_wdt_driver); 263 platform_driver_unregister(&platform_wdt_driver);
266} 264}
267 265
268module_init(davinci_wdt_init); 266module_init(davinci_wdt_init);
diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c
index f236954d253..ca44fd9b19b 100644
--- a/drivers/watchdog/i6300esb.c
+++ b/drivers/watchdog/i6300esb.c
@@ -77,7 +77,7 @@
77 77
78/* internal variables */ 78/* internal variables */
79static void __iomem *BASEADDR; 79static void __iomem *BASEADDR;
80static spinlock_t esb_lock; /* Guards the hardware */ 80static DEFINE_SPINLOCK(esb_lock); /* Guards the hardware */
81static unsigned long timer_alive; 81static unsigned long timer_alive;
82static struct pci_dev *esb_pci; 82static struct pci_dev *esb_pci;
83static unsigned short triggered; /* The status of the watchdog upon boot */ 83static unsigned short triggered; /* The status of the watchdog upon boot */
@@ -456,8 +456,6 @@ static int __init watchdog_init (void)
456{ 456{
457 int ret; 457 int ret;
458 458
459 spin_lock_init(&esb_lock);
460
461 /* Check whether or not the hardware watchdog is there */ 459 /* Check whether or not the hardware watchdog is there */
462 if (!esb_getdevice () || esb_pci == NULL) 460 if (!esb_getdevice () || esb_pci == NULL)
463 return -ENODEV; 461 return -ENODEV;
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index cd5a565bc3a..a0e6809e369 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -35,10 +35,12 @@
35 * 82801GDH (ICH7DH) : document number 307013-002, 307014-009, 35 * 82801GDH (ICH7DH) : document number 307013-002, 307014-009,
36 * 82801GBM (ICH7-M) : document number 307013-002, 307014-009, 36 * 82801GBM (ICH7-M) : document number 307013-002, 307014-009,
37 * 82801GHM (ICH7-M DH) : document number 307013-002, 307014-009, 37 * 82801GHM (ICH7-M DH) : document number 307013-002, 307014-009,
38 * 82801HB (ICH8) : document number 313056-002, 313057-004, 38 * 82801HB (ICH8) : document number 313056-003, 313057-009,
39 * 82801HR (ICH8R) : document number 313056-002, 313057-004, 39 * 82801HR (ICH8R) : document number 313056-003, 313057-009,
40 * 82801HH (ICH8DH) : document number 313056-002, 313057-004, 40 * 82801HBM (ICH8M) : document number 313056-003, 313057-009,
41 * 82801HO (ICH8DO) : document number 313056-002, 313057-004, 41 * 82801HH (ICH8DH) : document number 313056-003, 313057-009,
42 * 82801HO (ICH8DO) : document number 313056-003, 313057-009,
43 * 82801HEM (ICH8M-E) : document number 313056-003, 313057-009,
42 * 82801IB (ICH9) : document number 316972-001, 316973-001, 44 * 82801IB (ICH9) : document number 316972-001, 316973-001,
43 * 82801IR (ICH9R) : document number 316972-001, 316973-001, 45 * 82801IR (ICH9R) : document number 316972-001, 316973-001,
44 * 82801IH (ICH9DH) : document number 316972-001, 316973-001, 46 * 82801IH (ICH9DH) : document number 316972-001, 316973-001,
@@ -95,8 +97,10 @@ enum iTCO_chipsets {
95 TCO_ICH7M, /* ICH7-M */ 97 TCO_ICH7M, /* ICH7-M */
96 TCO_ICH7MDH, /* ICH7-M DH */ 98 TCO_ICH7MDH, /* ICH7-M DH */
97 TCO_ICH8, /* ICH8 & ICH8R */ 99 TCO_ICH8, /* ICH8 & ICH8R */
100 TCO_ICH8ME, /* ICH8M-E */
98 TCO_ICH8DH, /* ICH8DH */ 101 TCO_ICH8DH, /* ICH8DH */
99 TCO_ICH8DO, /* ICH8DO */ 102 TCO_ICH8DO, /* ICH8DO */
103 TCO_ICH8M, /* ICH8M */
100 TCO_ICH9, /* ICH9 */ 104 TCO_ICH9, /* ICH9 */
101 TCO_ICH9R, /* ICH9R */ 105 TCO_ICH9R, /* ICH9R */
102 TCO_ICH9DH, /* ICH9DH */ 106 TCO_ICH9DH, /* ICH9DH */
@@ -125,8 +129,10 @@ static struct {
125 {"ICH7-M", 2}, 129 {"ICH7-M", 2},
126 {"ICH7-M DH", 2}, 130 {"ICH7-M DH", 2},
127 {"ICH8 or ICH8R", 2}, 131 {"ICH8 or ICH8R", 2},
132 {"ICH8M-E", 2},
128 {"ICH8DH", 2}, 133 {"ICH8DH", 2},
129 {"ICH8DO", 2}, 134 {"ICH8DO", 2},
135 {"ICH8M", 2},
130 {"ICH9", 2}, 136 {"ICH9", 2},
131 {"ICH9R", 2}, 137 {"ICH9R", 2},
132 {"ICH9DH", 2}, 138 {"ICH9DH", 2},
@@ -134,6 +140,15 @@ static struct {
134 {NULL,0} 140 {NULL,0}
135}; 141};
136 142
143#define ITCO_PCI_DEVICE(dev, data) \
144 .vendor = PCI_VENDOR_ID_INTEL, \
145 .device = dev, \
146 .subvendor = PCI_ANY_ID, \
147 .subdevice = PCI_ANY_ID, \
148 .class = 0, \
149 .class_mask = 0, \
150 .driver_data = data
151
137/* 152/*
138 * This data only exists for exporting the supported PCI ids 153 * This data only exists for exporting the supported PCI ids
139 * via MODULE_DEVICE_TABLE. We do not actually register a 154 * via MODULE_DEVICE_TABLE. We do not actually register a
@@ -141,45 +156,47 @@ static struct {
141 * functions that probably will be registered by other drivers. 156 * functions that probably will be registered by other drivers.
142 */ 157 */
143static struct pci_device_id iTCO_wdt_pci_tbl[] = { 158static struct pci_device_id iTCO_wdt_pci_tbl[] = {
144 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH }, 159 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801AA_0, TCO_ICH )},
145 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH0 }, 160 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801AB_0, TCO_ICH0 )},
146 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH2 }, 161 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801BA_0, TCO_ICH2 )},
147 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_10, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH2M }, 162 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801BA_10, TCO_ICH2M )},
148 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH3 }, 163 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801CA_0, TCO_ICH3 )},
149 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH3M }, 164 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801CA_12, TCO_ICH3M )},
150 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH4 }, 165 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801DB_0, TCO_ICH4 )},
151 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH4M }, 166 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801DB_12, TCO_ICH4M )},
152 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_CICH }, 167 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801E_0, TCO_CICH )},
153 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH5 }, 168 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801EB_0, TCO_ICH5 )},
154 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_6300ESB }, 169 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB_1, TCO_6300ESB)},
155 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH6 }, 170 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_0, TCO_ICH6 )},
156 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH6M }, 171 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_1, TCO_ICH6M )},
157 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH6W }, 172 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_2, TCO_ICH6W )},
158 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH7 }, 173 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_0, TCO_ICH7 )},
159 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH7M }, 174 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_1, TCO_ICH7M )},
160 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH7MDH }, 175 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_31, TCO_ICH7MDH)},
161 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH8 }, 176 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_0, TCO_ICH8 )},
162 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH8DH }, 177 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_1, TCO_ICH8ME )},
163 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH8DO }, 178 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_2, TCO_ICH8DH )},
164 { PCI_VENDOR_ID_INTEL, 0x2918, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH9 }, 179 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_3, TCO_ICH8DO )},
165 { PCI_VENDOR_ID_INTEL, 0x2916, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH9R }, 180 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_4, TCO_ICH8M )},
166 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH9DH }, 181 { ITCO_PCI_DEVICE(0x2918, TCO_ICH9 )},
167 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 182 { ITCO_PCI_DEVICE(0x2916, TCO_ICH9R )},
168 { PCI_VENDOR_ID_INTEL, 0x2671, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 183 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_2, TCO_ICH9DH )},
169 { PCI_VENDOR_ID_INTEL, 0x2672, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 184 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB2_0, TCO_631XESB)},
170 { PCI_VENDOR_ID_INTEL, 0x2673, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 185 { ITCO_PCI_DEVICE(0x2671, TCO_631XESB)},
171 { PCI_VENDOR_ID_INTEL, 0x2674, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 186 { ITCO_PCI_DEVICE(0x2672, TCO_631XESB)},
172 { PCI_VENDOR_ID_INTEL, 0x2675, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 187 { ITCO_PCI_DEVICE(0x2673, TCO_631XESB)},
173 { PCI_VENDOR_ID_INTEL, 0x2676, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 188 { ITCO_PCI_DEVICE(0x2674, TCO_631XESB)},
174 { PCI_VENDOR_ID_INTEL, 0x2677, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 189 { ITCO_PCI_DEVICE(0x2675, TCO_631XESB)},
175 { PCI_VENDOR_ID_INTEL, 0x2678, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 190 { ITCO_PCI_DEVICE(0x2676, TCO_631XESB)},
176 { PCI_VENDOR_ID_INTEL, 0x2679, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 191 { ITCO_PCI_DEVICE(0x2677, TCO_631XESB)},
177 { PCI_VENDOR_ID_INTEL, 0x267a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 192 { ITCO_PCI_DEVICE(0x2678, TCO_631XESB)},
178 { PCI_VENDOR_ID_INTEL, 0x267b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 193 { ITCO_PCI_DEVICE(0x2679, TCO_631XESB)},
179 { PCI_VENDOR_ID_INTEL, 0x267c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 194 { ITCO_PCI_DEVICE(0x267a, TCO_631XESB)},
180 { PCI_VENDOR_ID_INTEL, 0x267d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 195 { ITCO_PCI_DEVICE(0x267b, TCO_631XESB)},
181 { PCI_VENDOR_ID_INTEL, 0x267e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 196 { ITCO_PCI_DEVICE(0x267c, TCO_631XESB)},
182 { PCI_VENDOR_ID_INTEL, 0x267f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB }, 197 { ITCO_PCI_DEVICE(0x267d, TCO_631XESB)},
198 { ITCO_PCI_DEVICE(0x267e, TCO_631XESB)},
199 { ITCO_PCI_DEVICE(0x267f, TCO_631XESB)},
183 { 0, }, /* End of list */ 200 { 0, }, /* End of list */
184}; 201};
185MODULE_DEVICE_TABLE (pci, iTCO_wdt_pci_tbl); 202MODULE_DEVICE_TABLE (pci, iTCO_wdt_pci_tbl);
@@ -300,6 +317,7 @@ static int iTCO_wdt_start(void)
300 317
301 /* disable chipset's NO_REBOOT bit */ 318 /* disable chipset's NO_REBOOT bit */
302 if (iTCO_wdt_unset_NO_REBOOT_bit()) { 319 if (iTCO_wdt_unset_NO_REBOOT_bit()) {
320 spin_unlock(&iTCO_wdt_private.io_lock);
303 printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n"); 321 printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n");
304 return -EIO; 322 return -EIO;
305 } 323 }
@@ -590,7 +608,7 @@ static struct miscdevice iTCO_wdt_miscdev = {
590 * Init & exit routines 608 * Init & exit routines
591 */ 609 */
592 610
593static int iTCO_wdt_init(struct pci_dev *pdev, const struct pci_device_id *ent, struct platform_device *dev) 611static int __devinit iTCO_wdt_init(struct pci_dev *pdev, const struct pci_device_id *ent, struct platform_device *dev)
594{ 612{
595 int ret; 613 int ret;
596 u32 base_address; 614 u32 base_address;
@@ -694,7 +712,7 @@ out:
694 return ret; 712 return ret;
695} 713}
696 714
697static void iTCO_wdt_cleanup(void) 715static void __devexit iTCO_wdt_cleanup(void)
698{ 716{
699 /* Stop the timer before we leave */ 717 /* Stop the timer before we leave */
700 if (!nowayout) 718 if (!nowayout)
@@ -709,7 +727,7 @@ static void iTCO_wdt_cleanup(void)
709 iTCO_wdt_private.ACPIBASE = 0; 727 iTCO_wdt_private.ACPIBASE = 0;
710} 728}
711 729
712static int iTCO_wdt_probe(struct platform_device *dev) 730static int __devinit iTCO_wdt_probe(struct platform_device *dev)
713{ 731{
714 int found = 0; 732 int found = 0;
715 struct pci_dev *pdev = NULL; 733 struct pci_dev *pdev = NULL;
@@ -735,7 +753,7 @@ static int iTCO_wdt_probe(struct platform_device *dev)
735 return 0; 753 return 0;
736} 754}
737 755
738static int iTCO_wdt_remove(struct platform_device *dev) 756static int __devexit iTCO_wdt_remove(struct platform_device *dev)
739{ 757{
740 if (iTCO_wdt_private.ACPIBASE) 758 if (iTCO_wdt_private.ACPIBASE)
741 iTCO_wdt_cleanup(); 759 iTCO_wdt_cleanup();
@@ -753,7 +771,7 @@ static void iTCO_wdt_shutdown(struct platform_device *dev)
753 771
754static struct platform_driver iTCO_wdt_driver = { 772static struct platform_driver iTCO_wdt_driver = {
755 .probe = iTCO_wdt_probe, 773 .probe = iTCO_wdt_probe,
756 .remove = iTCO_wdt_remove, 774 .remove = __devexit_p(iTCO_wdt_remove),
757 .shutdown = iTCO_wdt_shutdown, 775 .shutdown = iTCO_wdt_shutdown,
758 .suspend = iTCO_wdt_suspend, 776 .suspend = iTCO_wdt_suspend,
759 .resume = iTCO_wdt_resume, 777 .resume = iTCO_wdt_resume,
diff --git a/drivers/watchdog/ib700wdt.c b/drivers/watchdog/ib700wdt.c
index c3a60f52ccb..4b89f401691 100644
--- a/drivers/watchdog/ib700wdt.c
+++ b/drivers/watchdog/ib700wdt.c
@@ -48,7 +48,7 @@
48 48
49static struct platform_device *ibwdt_platform_device; 49static struct platform_device *ibwdt_platform_device;
50static unsigned long ibwdt_is_open; 50static unsigned long ibwdt_is_open;
51static spinlock_t ibwdt_lock; 51static DEFINE_SPINLOCK(ibwdt_lock);
52static char expect_close; 52static char expect_close;
53 53
54/* Module information */ 54/* Module information */
@@ -308,8 +308,6 @@ static int __devinit ibwdt_probe(struct platform_device *dev)
308{ 308{
309 int res; 309 int res;
310 310
311 spin_lock_init(&ibwdt_lock);
312
313#if WDT_START != WDT_STOP 311#if WDT_START != WDT_STOP
314 if (!request_region(WDT_STOP, 1, "IB700 WDT")) { 312 if (!request_region(WDT_STOP, 1, "IB700 WDT")) {
315 printk (KERN_ERR PFX "STOP method I/O %X is not available.\n", WDT_STOP); 313 printk (KERN_ERR PFX "STOP method I/O %X is not available.\n", WDT_STOP);
diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c
index 6d35bb112a5..e6e07b4575e 100644
--- a/drivers/watchdog/machzwd.c
+++ b/drivers/watchdog/machzwd.c
@@ -123,8 +123,8 @@ static void zf_ping(unsigned long data);
123static int zf_action = GEN_RESET; 123static int zf_action = GEN_RESET;
124static unsigned long zf_is_open; 124static unsigned long zf_is_open;
125static char zf_expect_close; 125static char zf_expect_close;
126static spinlock_t zf_lock; 126static DEFINE_SPINLOCK(zf_lock);
127static spinlock_t zf_port_lock; 127static DEFINE_SPINLOCK(zf_port_lock);
128static DEFINE_TIMER(zf_timer, zf_ping, 0, 0); 128static DEFINE_TIMER(zf_timer, zf_ping, 0, 0);
129static unsigned long next_heartbeat = 0; 129static unsigned long next_heartbeat = 0;
130 130
@@ -438,9 +438,6 @@ static int __init zf_init(void)
438 438
439 zf_show_action(action); 439 zf_show_action(action);
440 440
441 spin_lock_init(&zf_lock);
442 spin_lock_init(&zf_port_lock);
443
444 if(!request_region(ZF_IOBASE, 3, "MachZ ZFL WDT")){ 441 if(!request_region(ZF_IOBASE, 3, "MachZ ZFL WDT")){
445 printk(KERN_ERR "cannot reserve I/O ports at %d\n", 442 printk(KERN_ERR "cannot reserve I/O ports at %d\n",
446 ZF_IOBASE); 443 ZF_IOBASE);
diff --git a/drivers/watchdog/mpc83xx_wdt.c b/drivers/watchdog/mpc83xx_wdt.c
index a0bf95fb976..6369f569517 100644
--- a/drivers/watchdog/mpc83xx_wdt.c
+++ b/drivers/watchdog/mpc83xx_wdt.c
@@ -56,7 +56,7 @@ static int prescale = 1;
56static unsigned int timeout_sec; 56static unsigned int timeout_sec;
57 57
58static unsigned long wdt_is_open; 58static unsigned long wdt_is_open;
59static spinlock_t wdt_spinlock; 59static DEFINE_SPINLOCK(wdt_spinlock);
60 60
61static void mpc83xx_wdt_keepalive(void) 61static void mpc83xx_wdt_keepalive(void)
62{ 62{
@@ -185,9 +185,6 @@ static int __devinit mpc83xx_wdt_probe(struct platform_device *dev)
185 printk(KERN_INFO "WDT driver for MPC83xx initialized. " 185 printk(KERN_INFO "WDT driver for MPC83xx initialized. "
186 "mode:%s timeout=%d (%d seconds)\n", 186 "mode:%s timeout=%d (%d seconds)\n",
187 reset ? "reset":"interrupt", timeout, timeout_sec); 187 reset ? "reset":"interrupt", timeout, timeout_sec);
188
189 spin_lock_init(&wdt_spinlock);
190
191 return 0; 188 return 0;
192 189
193err_unmap: 190err_unmap:
diff --git a/drivers/watchdog/pc87413_wdt.c b/drivers/watchdog/pc87413_wdt.c
index 3d3deae0d64..15e4f8887a9 100644
--- a/drivers/watchdog/pc87413_wdt.c
+++ b/drivers/watchdog/pc87413_wdt.c
@@ -61,7 +61,7 @@ static unsigned long timer_enabled = 0; /* is the timer enabled? */
61 61
62static char expect_close; /* is the close expected? */ 62static char expect_close; /* is the close expected? */
63 63
64static spinlock_t io_lock; /* to guard the watchdog from io races */ 64static DEFINE_SPINLOCK(io_lock);/* to guard the watchdog from io races */
65 65
66static int nowayout = WATCHDOG_NOWAYOUT; 66static int nowayout = WATCHDOG_NOWAYOUT;
67 67
@@ -561,8 +561,6 @@ static int __init pc87413_init(void)
561{ 561{
562 int ret; 562 int ret;
563 563
564 spin_lock_init(&io_lock);
565
566 printk(KERN_INFO PFX "Version " VERSION " at io 0x%X\n", WDT_INDEX_IO_PORT); 564 printk(KERN_INFO PFX "Version " VERSION " at io 0x%X\n", WDT_INDEX_IO_PORT);
567 565
568 /* request_region(io, 2, "pc87413"); */ 566 /* request_region(io, 2, "pc87413"); */
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 22f8873dd09..b04aa096a10 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -80,7 +80,7 @@
80static int nowayout = WATCHDOG_NOWAYOUT; 80static int nowayout = WATCHDOG_NOWAYOUT;
81static int heartbeat = DEFAULT_HEARTBEAT; 81static int heartbeat = DEFAULT_HEARTBEAT;
82 82
83static spinlock_t io_lock; 83static DEFINE_SPINLOCK(io_lock);
84static unsigned long wdt_status; 84static unsigned long wdt_status;
85#define WDT_IN_USE 0 85#define WDT_IN_USE 0
86#define WDT_OK_TO_CLOSE 1 86#define WDT_OK_TO_CLOSE 1
@@ -254,8 +254,6 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
254 int ret = 0, size; 254 int ret = 0, size;
255 struct resource *res; 255 struct resource *res;
256 256
257 spin_lock_init(&io_lock);
258
259 if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT) 257 if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
260 heartbeat = DEFAULT_HEARTBEAT; 258 heartbeat = DEFAULT_HEARTBEAT;
261 259
@@ -335,7 +333,7 @@ static int __init pnx4008_wdt_init(void)
335 333
336static void __exit pnx4008_wdt_exit(void) 334static void __exit pnx4008_wdt_exit(void)
337{ 335{
338 return platform_driver_unregister(&platform_wdt_driver); 336 platform_driver_unregister(&platform_wdt_driver);
339} 337}
340 338
341module_init(pnx4008_wdt_init); 339module_init(pnx4008_wdt_init);
diff --git a/drivers/watchdog/sbc8360.c b/drivers/watchdog/sbc8360.c
index 285d8528953..2ee2677f364 100644
--- a/drivers/watchdog/sbc8360.c
+++ b/drivers/watchdog/sbc8360.c
@@ -54,7 +54,7 @@
54#include <asm/system.h> 54#include <asm/system.h>
55 55
56static unsigned long sbc8360_is_open; 56static unsigned long sbc8360_is_open;
57static spinlock_t sbc8360_lock; 57static DEFINE_SPINLOCK(sbc8360_lock);
58static char expect_close; 58static char expect_close;
59 59
60#define PFX "sbc8360: " 60#define PFX "sbc8360: "
@@ -359,7 +359,6 @@ static int __init sbc8360_init(void)
359 goto out_noreboot; 359 goto out_noreboot;
360 } 360 }
361 361
362 spin_lock_init(&sbc8360_lock);
363 res = misc_register(&sbc8360_miscdev); 362 res = misc_register(&sbc8360_miscdev);
364 if (res) { 363 if (res) {
365 printk(KERN_ERR PFX "failed to register misc device\n"); 364 printk(KERN_ERR PFX "failed to register misc device\n");
diff --git a/drivers/watchdog/sc1200wdt.c b/drivers/watchdog/sc1200wdt.c
index 9670d47190d..32ccd7c89c7 100644
--- a/drivers/watchdog/sc1200wdt.c
+++ b/drivers/watchdog/sc1200wdt.c
@@ -74,7 +74,7 @@ static int io = -1;
74static int io_len = 2; /* for non plug and play */ 74static int io_len = 2; /* for non plug and play */
75static struct semaphore open_sem; 75static struct semaphore open_sem;
76static char expect_close; 76static char expect_close;
77static spinlock_t sc1200wdt_lock; /* io port access serialisation */ 77static DEFINE_SPINLOCK(sc1200wdt_lock); /* io port access serialisation */
78 78
79#if defined CONFIG_PNP 79#if defined CONFIG_PNP
80static int isapnp = 1; 80static int isapnp = 1;
@@ -375,7 +375,6 @@ static int __init sc1200wdt_init(void)
375 375
376 printk("%s\n", banner); 376 printk("%s\n", banner);
377 377
378 spin_lock_init(&sc1200wdt_lock);
379 sema_init(&open_sem, 1); 378 sema_init(&open_sem, 1);
380 379
381#if defined CONFIG_PNP 380#if defined CONFIG_PNP
diff --git a/drivers/watchdog/sc520_wdt.c b/drivers/watchdog/sc520_wdt.c
index e8594c64d1e..2847324a2be 100644
--- a/drivers/watchdog/sc520_wdt.c
+++ b/drivers/watchdog/sc520_wdt.c
@@ -125,7 +125,7 @@ static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
125static unsigned long next_heartbeat; 125static unsigned long next_heartbeat;
126static unsigned long wdt_is_open; 126static unsigned long wdt_is_open;
127static char wdt_expect_close; 127static char wdt_expect_close;
128static spinlock_t wdt_spinlock; 128static DEFINE_SPINLOCK(wdt_spinlock);
129 129
130/* 130/*
131 * Whack the dog 131 * Whack the dog
@@ -383,8 +383,6 @@ static int __init sc520_wdt_init(void)
383{ 383{
384 int rc = -EBUSY; 384 int rc = -EBUSY;
385 385
386 spin_lock_init(&wdt_spinlock);
387
388 /* Check that the timeout value is within it's range ; if not reset to the default */ 386 /* Check that the timeout value is within it's range ; if not reset to the default */
389 if (wdt_set_heartbeat(timeout)) { 387 if (wdt_set_heartbeat(timeout)) {
390 wdt_set_heartbeat(WATCHDOG_TIMEOUT); 388 wdt_set_heartbeat(WATCHDOG_TIMEOUT);
diff --git a/drivers/watchdog/smsc37b787_wdt.c b/drivers/watchdog/smsc37b787_wdt.c
index d3cb0a76602..5d2b5ba6141 100644
--- a/drivers/watchdog/smsc37b787_wdt.c
+++ b/drivers/watchdog/smsc37b787_wdt.c
@@ -83,7 +83,7 @@ static unsigned long timer_enabled = 0; /* is the timer enabled? */
83 83
84static char expect_close; /* is the close expected? */ 84static char expect_close; /* is the close expected? */
85 85
86static spinlock_t io_lock; /* to guard the watchdog from io races */ 86static DEFINE_SPINLOCK(io_lock);/* to guard the watchdog from io races */
87 87
88static int nowayout = WATCHDOG_NOWAYOUT; 88static int nowayout = WATCHDOG_NOWAYOUT;
89 89
@@ -540,8 +540,6 @@ static int __init wb_smsc_wdt_init(void)
540{ 540{
541 int ret; 541 int ret;
542 542
543 spin_lock_init(&io_lock);
544
545 printk("SMsC 37B787 watchdog component driver " VERSION " initialising...\n"); 543 printk("SMsC 37B787 watchdog component driver " VERSION " initialising...\n");
546 544
547 if (!request_region(IOPORT, IOPORT_SIZE, "SMsC 37B787 watchdog")) { 545 if (!request_region(IOPORT, IOPORT_SIZE, "SMsC 37B787 watchdog")) {
diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
index df33b3b5a53..386492821fc 100644
--- a/drivers/watchdog/w83627hf_wdt.c
+++ b/drivers/watchdog/w83627hf_wdt.c
@@ -48,7 +48,7 @@
48 48
49static unsigned long wdt_is_open; 49static unsigned long wdt_is_open;
50static char expect_close; 50static char expect_close;
51static spinlock_t io_lock; 51static DEFINE_SPINLOCK(io_lock);
52 52
53/* You must set this - there is no sane way to probe for this board. */ 53/* You must set this - there is no sane way to probe for this board. */
54static int wdt_io = 0x2E; 54static int wdt_io = 0x2E;
@@ -328,8 +328,6 @@ wdt_init(void)
328{ 328{
329 int ret; 329 int ret;
330 330
331 spin_lock_init(&io_lock);
332
333 printk(KERN_INFO "WDT driver for the Winbond(TM) W83627HF/THF/HG Super I/O chip initialising.\n"); 331 printk(KERN_INFO "WDT driver for the Winbond(TM) W83627HF/THF/HG Super I/O chip initialising.\n");
334 332
335 if (wdt_set_heartbeat(timeout)) { 333 if (wdt_set_heartbeat(timeout)) {
diff --git a/drivers/watchdog/w83697hf_wdt.c b/drivers/watchdog/w83697hf_wdt.c
index 51826c216d6..c622a0e6c9a 100644
--- a/drivers/watchdog/w83697hf_wdt.c
+++ b/drivers/watchdog/w83697hf_wdt.c
@@ -47,7 +47,7 @@
47 47
48static unsigned long wdt_is_open; 48static unsigned long wdt_is_open;
49static char expect_close; 49static char expect_close;
50static spinlock_t io_lock; 50static DEFINE_SPINLOCK(io_lock);
51 51
52/* You must set this - there is no sane way to probe for this board. */ 52/* You must set this - there is no sane way to probe for this board. */
53static int wdt_io = 0x2e; 53static int wdt_io = 0x2e;
@@ -376,8 +376,6 @@ wdt_init(void)
376{ 376{
377 int ret, i, found = 0; 377 int ret, i, found = 0;
378 378
379 spin_lock_init(&io_lock);
380
381 printk (KERN_INFO PFX "WDT driver for W83697HF/HG initializing\n"); 379 printk (KERN_INFO PFX "WDT driver for W83697HF/HG initializing\n");
382 380
383 if (wdt_io == 0) { 381 if (wdt_io == 0) {
diff --git a/drivers/watchdog/w83877f_wdt.c b/drivers/watchdog/w83877f_wdt.c
index 3c88fe18f4f..bcc9d48955d 100644
--- a/drivers/watchdog/w83877f_wdt.c
+++ b/drivers/watchdog/w83877f_wdt.c
@@ -94,7 +94,7 @@ static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
94static unsigned long next_heartbeat; 94static unsigned long next_heartbeat;
95static unsigned long wdt_is_open; 95static unsigned long wdt_is_open;
96static char wdt_expect_close; 96static char wdt_expect_close;
97static spinlock_t wdt_spinlock; 97static DEFINE_SPINLOCK(wdt_spinlock);
98 98
99/* 99/*
100 * Whack the dog 100 * Whack the dog
@@ -350,8 +350,6 @@ static int __init w83877f_wdt_init(void)
350{ 350{
351 int rc = -EBUSY; 351 int rc = -EBUSY;
352 352
353 spin_lock_init(&wdt_spinlock);
354
355 if(timeout < 1 || timeout > 3600) /* arbitrary upper limit */ 353 if(timeout < 1 || timeout > 3600) /* arbitrary upper limit */
356 { 354 {
357 timeout = WATCHDOG_TIMEOUT; 355 timeout = WATCHDOG_TIMEOUT;
diff --git a/drivers/watchdog/w83977f_wdt.c b/drivers/watchdog/w83977f_wdt.c
index 15796844289..b475529d247 100644
--- a/drivers/watchdog/w83977f_wdt.c
+++ b/drivers/watchdog/w83977f_wdt.c
@@ -50,7 +50,7 @@ static int timeoutW; /* timeout in watchdog counter units */
50static unsigned long timer_alive; 50static unsigned long timer_alive;
51static int testmode; 51static int testmode;
52static char expect_close; 52static char expect_close;
53static spinlock_t spinlock; 53static DEFINE_SPINLOCK(spinlock);
54 54
55module_param(timeout, int, 0); 55module_param(timeout, int, 0);
56MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (15..7635), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")"); 56MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (15..7635), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")");
@@ -476,8 +476,6 @@ static int __init w83977f_wdt_init(void)
476 476
477 printk(KERN_INFO PFX DRIVER_VERSION); 477 printk(KERN_INFO PFX DRIVER_VERSION);
478 478
479 spin_lock_init(&spinlock);
480
481 /* 479 /*
482 * Check that the timeout value is within it's range ; 480 * Check that the timeout value is within it's range ;
483 * if not reset to the default 481 * if not reset to the default
diff --git a/drivers/watchdog/wafer5823wdt.c b/drivers/watchdog/wafer5823wdt.c
index 950905d3c39..9e368091f79 100644
--- a/drivers/watchdog/wafer5823wdt.c
+++ b/drivers/watchdog/wafer5823wdt.c
@@ -45,7 +45,7 @@
45 45
46static unsigned long wafwdt_is_open; 46static unsigned long wafwdt_is_open;
47static char expect_close; 47static char expect_close;
48static spinlock_t wafwdt_lock; 48static DEFINE_SPINLOCK(wafwdt_lock);
49 49
50/* 50/*
51 * You must set these - there is no sane way to probe for this board. 51 * You must set these - there is no sane way to probe for this board.
@@ -252,8 +252,6 @@ static int __init wafwdt_init(void)
252 252
253 printk(KERN_INFO "WDT driver for Wafer 5823 single board computer initialising.\n"); 253 printk(KERN_INFO "WDT driver for Wafer 5823 single board computer initialising.\n");
254 254
255 spin_lock_init(&wafwdt_lock);
256
257 if (timeout < 1 || timeout > 255) { 255 if (timeout < 1 || timeout > 255) {
258 timeout = WD_TIMO; 256 timeout = WD_TIMO;
259 printk (KERN_INFO PFX "timeout value must be 1<=x<=255, using %d\n", 257 printk (KERN_INFO PFX "timeout value must be 1<=x<=255, using %d\n",
diff --git a/drivers/watchdog/wdt.c b/drivers/watchdog/wdt.c
index 0a3de6a0244..53d0bb410df 100644
--- a/drivers/watchdog/wdt.c
+++ b/drivers/watchdog/wdt.c
@@ -253,7 +253,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id)
253 printk(KERN_CRIT "Possible fan fault.\n"); 253 printk(KERN_CRIT "Possible fan fault.\n");
254 } 254 }
255#endif /* CONFIG_WDT_501 */ 255#endif /* CONFIG_WDT_501 */
256 if (!(status & WDC_SR_WCCR)) 256 if (!(status & WDC_SR_WCCR)) {
257#ifdef SOFTWARE_REBOOT 257#ifdef SOFTWARE_REBOOT
258#ifdef ONLY_TESTING 258#ifdef ONLY_TESTING
259 printk(KERN_CRIT "Would Reboot.\n"); 259 printk(KERN_CRIT "Would Reboot.\n");
@@ -264,6 +264,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id)
264#else 264#else
265 printk(KERN_CRIT "Reset in 5ms.\n"); 265 printk(KERN_CRIT "Reset in 5ms.\n");
266#endif 266#endif
267 }
267 return IRQ_HANDLED; 268 return IRQ_HANDLED;
268} 269}
269 270
diff --git a/drivers/watchdog/wdt977.c b/drivers/watchdog/wdt977.c
index 7d300ff7ab0..9b7f6b6edef 100644
--- a/drivers/watchdog/wdt977.c
+++ b/drivers/watchdog/wdt977.c
@@ -59,7 +59,7 @@ static int timeoutM; /* timeout in minutes */
59static unsigned long timer_alive; 59static unsigned long timer_alive;
60static int testmode; 60static int testmode;
61static char expect_close; 61static char expect_close;
62static spinlock_t spinlock; 62static DEFINE_SPINLOCK(spinlock);
63 63
64module_param(timeout, int, 0); 64module_param(timeout, int, 0);
65MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (60..15300), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")"); 65MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (60..15300), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")");
@@ -448,8 +448,6 @@ static int __init wd977_init(void)
448 448
449 printk(KERN_INFO PFX DRIVER_VERSION); 449 printk(KERN_INFO PFX DRIVER_VERSION);
450 450
451 spin_lock_init(&spinlock);
452
453 /* Check that the timeout value is within it's range ; if not reset to the default */ 451 /* Check that the timeout value is within it's range ; if not reset to the default */
454 if (wdt977_set_timeout(timeout)) 452 if (wdt977_set_timeout(timeout))
455 { 453 {
diff --git a/drivers/watchdog/wdt_pci.c b/drivers/watchdog/wdt_pci.c
index 6baf4ae42c9..1355608683e 100644
--- a/drivers/watchdog/wdt_pci.c
+++ b/drivers/watchdog/wdt_pci.c
@@ -74,7 +74,7 @@
74static int dev_count; 74static int dev_count;
75 75
76static struct semaphore open_sem; 76static struct semaphore open_sem;
77static spinlock_t wdtpci_lock; 77static DEFINE_SPINLOCK(wdtpci_lock);
78static char expect_close; 78static char expect_close;
79 79
80static int io; 80static int io;
@@ -298,7 +298,7 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id)
298 printk(KERN_CRIT PFX "Possible fan fault.\n"); 298 printk(KERN_CRIT PFX "Possible fan fault.\n");
299 } 299 }
300#endif /* CONFIG_WDT_501_PCI */ 300#endif /* CONFIG_WDT_501_PCI */
301 if (!(status&WDC_SR_WCCR)) 301 if (!(status&WDC_SR_WCCR)) {
302#ifdef SOFTWARE_REBOOT 302#ifdef SOFTWARE_REBOOT
303#ifdef ONLY_TESTING 303#ifdef ONLY_TESTING
304 printk(KERN_CRIT PFX "Would Reboot.\n"); 304 printk(KERN_CRIT PFX "Would Reboot.\n");
@@ -309,6 +309,7 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id)
309#else 309#else
310 printk(KERN_CRIT PFX "Reset in 5ms.\n"); 310 printk(KERN_CRIT PFX "Reset in 5ms.\n");
311#endif 311#endif
312 }
312 return IRQ_HANDLED; 313 return IRQ_HANDLED;
313} 314}
314 315
@@ -606,7 +607,6 @@ static int __devinit wdtpci_init_one (struct pci_dev *dev,
606 } 607 }
607 608
608 sema_init(&open_sem, 1); 609 sema_init(&open_sem, 1);
609 spin_lock_init(&wdtpci_lock);
610 610
611 irq = dev->irq; 611 irq = dev->irq;
612 io = pci_resource_start (dev, 2); 612 io = pci_resource_start (dev, 2);
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index 6f03918018a..1602cd00dd4 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -43,7 +43,7 @@
43#include <linux/file.h> 43#include <linux/file.h>
44#include <linux/namei.h> 44#include <linux/namei.h>
45#include <asm/uaccess.h> 45#include <asm/uaccess.h>
46#include <asm/scatterlist.h> 46#include <linux/scatterlist.h>
47#include <linux/crypto.h> 47#include <linux/crypto.h>
48#include <linux/sched.h> 48#include <linux/sched.h>
49 49
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
index cfdc7900d27..ad87cb01299 100644
--- a/fs/ntfs/aops.c
+++ b/fs/ntfs/aops.c
@@ -405,6 +405,15 @@ static int ntfs_readpage(struct file *file, struct page *page)
405 405
406retry_readpage: 406retry_readpage:
407 BUG_ON(!PageLocked(page)); 407 BUG_ON(!PageLocked(page));
408 vi = page->mapping->host;
409 i_size = i_size_read(vi);
410 /* Is the page fully outside i_size? (truncate in progress) */
411 if (unlikely(page->index >= (i_size + PAGE_CACHE_SIZE - 1) >>
412 PAGE_CACHE_SHIFT)) {
413 zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
414 ntfs_debug("Read outside i_size - truncated?");
415 goto done;
416 }
408 /* 417 /*
409 * This can potentially happen because we clear PageUptodate() during 418 * This can potentially happen because we clear PageUptodate() during
410 * ntfs_writepage() of MstProtected() attributes. 419 * ntfs_writepage() of MstProtected() attributes.
@@ -413,7 +422,6 @@ retry_readpage:
413 unlock_page(page); 422 unlock_page(page);
414 return 0; 423 return 0;
415 } 424 }
416 vi = page->mapping->host;
417 ni = NTFS_I(vi); 425 ni = NTFS_I(vi);
418 /* 426 /*
419 * Only $DATA attributes can be encrypted and only unnamed $DATA 427 * Only $DATA attributes can be encrypted and only unnamed $DATA
diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c
index 92dabdcf2b8..50d3b0c258e 100644
--- a/fs/ntfs/attrib.c
+++ b/fs/ntfs/attrib.c
@@ -179,10 +179,7 @@ int ntfs_map_runlist_nolock(ntfs_inode *ni, VCN vcn, ntfs_attr_search_ctx *ctx)
179 * ntfs_mapping_pairs_decompress() fails. 179 * ntfs_mapping_pairs_decompress() fails.
180 */ 180 */
181 end_vcn = sle64_to_cpu(a->data.non_resident.highest_vcn) + 1; 181 end_vcn = sle64_to_cpu(a->data.non_resident.highest_vcn) + 1;
182 if (!a->data.non_resident.lowest_vcn && end_vcn == 1) 182 if (unlikely(vcn && vcn >= end_vcn)) {
183 end_vcn = sle64_to_cpu(a->data.non_resident.allocated_size) >>
184 ni->vol->cluster_size_bits;
185 if (unlikely(vcn >= end_vcn)) {
186 err = -ENOENT; 183 err = -ENOENT;
187 goto err_out; 184 goto err_out;
188 } 185 }
diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c
index d98daf59e0b..d1619d05eb2 100644
--- a/fs/ntfs/compress.c
+++ b/fs/ntfs/compress.c
@@ -561,6 +561,16 @@ int ntfs_read_compressed_block(struct page *page)
561 read_unlock_irqrestore(&ni->size_lock, flags); 561 read_unlock_irqrestore(&ni->size_lock, flags);
562 max_page = ((i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) - 562 max_page = ((i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) -
563 offset; 563 offset;
564 /* Is the page fully outside i_size? (truncate in progress) */
565 if (xpage >= max_page) {
566 kfree(bhs);
567 kfree(pages);
568 zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
569 ntfs_debug("Compressed read outside i_size - truncated?");
570 SetPageUptodate(page);
571 unlock_page(page);
572 return 0;
573 }
564 if (nr_pages < max_page) 574 if (nr_pages < max_page)
565 max_page = nr_pages; 575 max_page = nr_pages;
566 for (i = 0; i < max_page; i++, offset++) { 576 for (i = 0; i < max_page; i++, offset++) {
diff --git a/include/asm-mips/i8253.h b/include/asm-mips/i8253.h
index affb32ce4af..032ca73f181 100644
--- a/include/asm-mips/i8253.h
+++ b/include/asm-mips/i8253.h
@@ -5,25 +5,14 @@
5#ifndef __ASM_I8253_H 5#ifndef __ASM_I8253_H
6#define __ASM_I8253_H 6#define __ASM_I8253_H
7 7
8#include <linux/spinlock.h>
9
8/* i8253A PIT registers */ 10/* i8253A PIT registers */
9#define PIT_MODE 0x43 11#define PIT_MODE 0x43
10#define PIT_CH0 0x40 12#define PIT_CH0 0x40
11#define PIT_CH2 0x42 13#define PIT_CH2 0x42
12 14
13/* i8259A PIC registers */ 15extern spinlock_t i8253_lock;
14#define PIC_MASTER_CMD 0x20
15#define PIC_MASTER_IMR 0x21
16#define PIC_MASTER_ISR PIC_MASTER_CMD
17#define PIC_MASTER_POLL PIC_MASTER_ISR
18#define PIC_MASTER_OCW3 PIC_MASTER_ISR
19#define PIC_SLAVE_CMD 0xa0
20#define PIC_SLAVE_IMR 0xa1
21
22/* i8259A PIC related value */
23#define PIC_CASCADE_IR 2
24#define MASTER_ICW4_DEFAULT 0x01
25#define SLAVE_ICW4_DEFAULT 0x01
26#define PIC_ICW4_AEOI 2
27 16
28extern void setup_pit_timer(void); 17extern void setup_pit_timer(void);
29 18
diff --git a/include/asm-mips/mach-au1x00/timex.h b/include/asm-mips/mach-au1x00/timex.h
deleted file mode 100644
index e3ada66cb63..00000000000
--- a/include/asm-mips/mach-au1x00/timex.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2003 by Ralf Baechle
7 */
8#ifndef __ASM_MACH_AU1X00_TIMEX_H
9#define __ASM_MACH_AU1X00_TIMEX_H
10
11#define CLOCK_TICK_RATE ((HZ * 100000UL) / 2)
12
13#endif /* __ASM_MACH_AU1X00_TIMEX_H */
diff --git a/include/asm-mips/mach-cobalt/irq.h b/include/asm-mips/mach-cobalt/irq.h
index 179d0e850b5..57c8c9ac585 100644
--- a/include/asm-mips/mach-cobalt/irq.h
+++ b/include/asm-mips/mach-cobalt/irq.h
@@ -35,7 +35,7 @@
35 * 4 - ethernet 35 * 4 - ethernet
36 * 5 - 16550 UART 36 * 5 - 16550 UART
37 * 6 - cascade i8259 37 * 6 - cascade i8259
38 * 7 - CP0 counter (unused) 38 * 7 - CP0 counter
39 */ 39 */
40#define MIPS_CPU_IRQ_BASE 16 40#define MIPS_CPU_IRQ_BASE 16
41 41
@@ -48,7 +48,6 @@
48#define SCSI_IRQ (MIPS_CPU_IRQ_BASE + 5) 48#define SCSI_IRQ (MIPS_CPU_IRQ_BASE + 5)
49#define I8259_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 6) 49#define I8259_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 6)
50 50
51
52#define GT641XX_IRQ_BASE 24 51#define GT641XX_IRQ_BASE 24
53 52
54#include <asm/irq_gt641xx.h> 53#include <asm/irq_gt641xx.h>
diff --git a/include/asm-mips/mach-generic/timex.h b/include/asm-mips/mach-generic/timex.h
deleted file mode 100644
index 48b4cfaa0d5..00000000000
--- a/include/asm-mips/mach-generic/timex.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2003, 2005 by Ralf Baechle
7 */
8#ifndef __ASM_MACH_GENERIC_TIMEX_H
9#define __ASM_MACH_GENERIC_TIMEX_H
10
11#define CLOCK_TICK_RATE 500000
12
13#endif /* __ASM_MACH_GENERIC_TIMEX_H */
diff --git a/include/asm-mips/mach-jazz/timex.h b/include/asm-mips/mach-jazz/timex.h
deleted file mode 100644
index 93affa33dfa..00000000000
--- a/include/asm-mips/mach-jazz/timex.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2003 by Ralf Baechle
7 */
8#ifndef __ASM_MACH_JAZZ_TIMEX_H
9#define __ASM_MACH_JAZZ_TIMEX_H
10
11/*
12 * Jazz is still using the R4030 100Hz counter
13 */
14#define CLOCK_TICK_RATE 100
15
16#endif /* __ASM_MACH_JAZZ_TIMEX_H */
diff --git a/include/asm-mips/mach-qemu/timex.h b/include/asm-mips/mach-qemu/timex.h
deleted file mode 100644
index cd543693fb0..00000000000
--- a/include/asm-mips/mach-qemu/timex.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2005 Daniel Jacobowitz
7 */
8#ifndef __ASM_MACH_QEMU_TIMEX_H
9#define __ASM_MACH_QEMU_TIMEX_H
10
11/*
12 * We use a simulated i8254 PIC...
13 */
14#define CLOCK_TICK_RATE 1193182
15
16#endif /* __ASM_MACH_QEMU_TIMEX_H */
diff --git a/include/asm-mips/mach-rm/timex.h b/include/asm-mips/mach-rm/timex.h
deleted file mode 100644
index 11ff6cb0f21..00000000000
--- a/include/asm-mips/mach-rm/timex.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2003, 2005 by Ralf Baechle
7 */
8#ifndef __ASM_MACH_RM200_TIMEX_H
9#define __ASM_MACH_RM200_TIMEX_H
10
11#define CLOCK_TICK_RATE 1193182
12
13#endif /* __ASM_MACH_RM200_TIMEX_H */
diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h
index 0a6bc7dc158..ee1663e64da 100644
--- a/include/asm-mips/time.h
+++ b/include/asm-mips/time.h
@@ -10,15 +10,10 @@
10 * under the terms of the GNU General Public License as published by the 10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version. 12 * option) any later version.
13 *
14 * Please refer to Documentation/mips/time.README.
15 */ 13 */
16#ifndef _ASM_TIME_H 14#ifndef _ASM_TIME_H
17#define _ASM_TIME_H 15#define _ASM_TIME_H
18 16
19#include <linux/interrupt.h>
20#include <linux/linkage.h>
21#include <linux/ptrace.h>
22#include <linux/rtc.h> 17#include <linux/rtc.h>
23#include <linux/spinlock.h> 18#include <linux/spinlock.h>
24#include <linux/clockchips.h> 19#include <linux/clockchips.h>
@@ -38,25 +33,12 @@ extern int rtc_mips_set_mmss(unsigned long);
38/* 33/*
39 * Timer interrupt functions. 34 * Timer interrupt functions.
40 * mips_timer_state is needed for high precision timer calibration. 35 * mips_timer_state is needed for high precision timer calibration.
41 * mips_timer_ack may be NULL if the interrupt is self-recoverable.
42 */ 36 */
43extern int (*mips_timer_state)(void); 37extern int (*mips_timer_state)(void);
44 38
45/* 39/*
46 * High precision timer clocksource.
47 * If .read is NULL, an R4k-compatible timer setup is attempted.
48 */
49extern struct clocksource clocksource_mips;
50
51/*
52 * profiling and process accouting is done separately in local_timer_interrupt
53 */
54extern void local_timer_interrupt(int irq, void *dev_id);
55
56/*
57 * board specific routines required by time_init(). 40 * board specific routines required by time_init().
58 */ 41 */
59struct irqaction;
60extern void plat_time_init(void); 42extern void plat_time_init(void);
61 43
62/* 44/*
diff --git a/include/asm-mips/timex.h b/include/asm-mips/timex.h
index 87c68ae76ff..5816ad1569d 100644
--- a/include/asm-mips/timex.h
+++ b/include/asm-mips/timex.h
@@ -13,27 +13,12 @@
13#include <asm/mipsregs.h> 13#include <asm/mipsregs.h>
14 14
15/* 15/*
16 * This is the frequency of the timer used for Linux's timer interrupt. 16 * This is the clock rate of the i8253 PIT. A MIPS system may not have
17 * The value should be defined as accurate as possible or under certain 17 * a PIT by the symbol is used all over the kernel including some APIs.
18 * circumstances Linux timekeeping might become inaccurate or fail. 18 * So keeping it defined to the number for the PIT is the only sane thing
19 * 19 * for now.
20 * For many system the exact clockrate of the timer isn't known but due to
21 * the way this value is used we can get away with a wrong value as long
22 * as this value is:
23 *
24 * - a multiple of HZ
25 * - a divisor of the actual rate
26 *
27 * 500000 is a good such cheat value.
28 *
29 * The obscure number 1193182 is the same as used by the original i8254
30 * time in legacy PC hardware; the chip unfortunately also found in a
31 * bunch of MIPS systems. The last remaining user of the i8254 for the
32 * timer interrupt is the RM200; it's a very standard system so there is
33 * no reason to make this a separate architecture.
34 */ 20 */
35 21#define CLOCK_TICK_RATE 1193182
36#include <timex.h>
37 22
38/* 23/*
39 * Standard way to access the cycle counter. 24 * Standard way to access the cycle counter.
diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h
index 7a18649d1cc..01e5cf51ba9 100644
--- a/include/asm-sh/cache.h
+++ b/include/asm-sh/cache.h
@@ -18,9 +18,8 @@
18#define SH_CACHE_ASSOC 8 18#define SH_CACHE_ASSOC 8
19 19
20#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 20#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
21#define SMP_CACHE_BYTES L1_CACHE_BYTES
22 21
23#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) 22#define __read_mostly __attribute__((__section__(".data.read_mostly")))
24 23
25#ifndef __ASSEMBLY__ 24#ifndef __ASSEMBLY__
26struct cache_info { 25struct cache_info {
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h
index c61d902b8bf..11850f65c92 100644
--- a/include/asm-sh/irq.h
+++ b/include/asm-sh/irq.h
@@ -41,7 +41,7 @@ static inline int generic_irq_demux(int irq)
41#define irq_canonicalize(irq) (irq) 41#define irq_canonicalize(irq) (irq)
42#define irq_demux(irq) sh_mv.mv_irq_demux(irq) 42#define irq_demux(irq) sh_mv.mv_irq_demux(irq)
43 43
44#ifdef CONFIG_4KSTACKS 44#ifdef CONFIG_IRQSTACKS
45extern void irq_ctx_init(int cpu); 45extern void irq_ctx_init(int cpu);
46extern void irq_ctx_exit(int cpu); 46extern void irq_ctx_exit(int cpu);
47# define __ARCH_HAS_DO_SOFTIRQ 47# define __ARCH_HAS_DO_SOFTIRQ
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h
index cb3d46c59ea..3aa8b07da47 100644
--- a/include/asm-sh/page.h
+++ b/include/asm-sh/page.h
@@ -128,7 +128,6 @@ typedef struct { unsigned long pgd; } pgd_t;
128#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) 128#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
129#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) 129#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
130 130
131#define phys_to_page(phys) (pfn_to_page(phys >> PAGE_SHIFT))
132#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) 131#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
133 132
134/* PFN start number, because of __MEMORY_START */ 133/* PFN start number, because of __MEMORY_START */
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h
index cf0dd2b648c..0b1d7c66565 100644
--- a/include/asm-sh/pgtable.h
+++ b/include/asm-sh/pgtable.h
@@ -399,7 +399,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
399#define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK) 399#define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK)
400 400
401#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) 401#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
402#define pte_page(x) phys_to_page(pte_val(x)&PTE_PHYS_MASK) 402#define pte_page(x) pfn_to_page(pte_pfn(x))
403 403
404/* 404/*
405 * The following only work if pte_present() is true. 405 * The following only work if pte_present() is true.
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h
index 4f2922a1979..ab0028db645 100644
--- a/include/asm-sh/processor.h
+++ b/include/asm-sh/processor.h
@@ -71,7 +71,7 @@ struct sh_cpuinfo {
71 struct cache_info scache; /* Secondary cache */ 71 struct cache_info scache; /* Secondary cache */
72 72
73 unsigned long flags; 73 unsigned long flags;
74} __attribute__ ((aligned(SMP_CACHE_BYTES))); 74} __attribute__ ((aligned(L1_CACHE_BYTES)));
75 75
76extern struct sh_cpuinfo cpu_data[]; 76extern struct sh_cpuinfo cpu_data[];
77#define boot_cpu_data cpu_data[0] 77#define boot_cpu_data cpu_data[0]
diff --git a/include/asm-sh/setup.h b/include/asm-sh/setup.h
index 586a9711a75..55a2bd328d9 100644
--- a/include/asm-sh/setup.h
+++ b/include/asm-sh/setup.h
@@ -5,6 +5,20 @@
5 5
6#ifdef __KERNEL__ 6#ifdef __KERNEL__
7 7
8/*
9 * This is set up by the setup-routine at boot-time
10 */
11#define PARAM ((unsigned char *)empty_zero_page)
12
13#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
14#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
15#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
16#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
17#define INITRD_START (*(unsigned long *) (PARAM+0x010))
18#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014))
19/* ... */
20#define COMMAND_LINE ((char *) (PARAM+0x100))
21
8int setup_early_printk(char *); 22int setup_early_printk(char *);
9void sh_mv_setup(void); 23void sh_mv_setup(void);
10 24
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h
index 1438b763a5e..18f8dd642ac 100644
--- a/include/asm-sh64/dma-mapping.h
+++ b/include/asm-sh64/dma-mapping.h
@@ -42,8 +42,9 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
42static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, 42static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
43 enum dma_data_direction dir) 43 enum dma_data_direction dir)
44{ 44{
45 unsigned long s = (unsigned long) vaddr & L1_CACHE_ALIGN_MASK; 45 unsigned long start = (unsigned long) vaddr;
46 unsigned long e = (vaddr + size) & L1_CACHE_ALIGN_MASK; 46 unsigned long s = start & L1_CACHE_ALIGN_MASK;
47 unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK;
47 48
48 for (; s <= e; s += L1_CACHE_BYTES) 49 for (; s <= e; s += L1_CACHE_BYTES)
49 asm volatile ("ocbp %0, 0" : : "r" (s)); 50 asm volatile ("ocbp %0, 0" : : "r" (s));
diff --git a/include/asm-sh64/pci.h b/include/asm-sh64/pci.h
index 57a67cf7a5c..18055dbbb4b 100644
--- a/include/asm-sh64/pci.h
+++ b/include/asm-sh64/pci.h
@@ -72,15 +72,6 @@ static inline void pcibios_penalize_isa_irq(int irq, int active)
72#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) 72#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
73#endif 73#endif
74 74
75/* These macros should be used after a pci_map_sg call has been done
76 * to get bus addresses of each of the SG entries and their lengths.
77 * You should only work with the number of sg entries pci_map_sg
78 * returns, or alternatively stop on the first sg_dma_len(sg) which
79 * is 0.
80 */
81#define sg_dma_address(sg) ((sg)->dma_address)
82#define sg_dma_len(sg) ((sg)->length)
83
84#ifdef CONFIG_PCI 75#ifdef CONFIG_PCI
85static inline void pci_dma_burst_advice(struct pci_dev *pdev, 76static inline void pci_dma_burst_advice(struct pci_dev *pdev,
86 enum pci_dma_burst_strategy *strat, 77 enum pci_dma_burst_strategy *strat,
diff --git a/include/asm-sh64/scatterlist.h b/include/asm-sh64/scatterlist.h
index 5109251970e..7f729bbfce4 100644
--- a/include/asm-sh64/scatterlist.h
+++ b/include/asm-sh64/scatterlist.h
@@ -23,6 +23,15 @@ struct scatterlist {
23 unsigned int length; 23 unsigned int length;
24}; 24};
25 25
26/* These macros should be used after a pci_map_sg call has been done
27 * to get bus addresses of each of the SG entries and their lengths.
28 * You should only work with the number of sg entries pci_map_sg
29 * returns, or alternatively stop on the first sg_dma_len(sg) which
30 * is 0.
31 */
32#define sg_dma_address(sg) ((sg)->dma_address)
33#define sg_dma_len(sg) ((sg)->length)
34
26#define ISA_DMA_THRESHOLD (0xffffffff) 35#define ISA_DMA_THRESHOLD (0xffffffff)
27 36
28#endif /* !__ASM_SH64_SCATTERLIST_H */ 37#endif /* !__ASM_SH64_SCATTERLIST_H */
diff --git a/include/asm-x86/irqflags_32.h b/include/asm-x86/irqflags_32.h
index d058b04e008..4c7720089cb 100644
--- a/include/asm-x86/irqflags_32.h
+++ b/include/asm-x86/irqflags_32.h
@@ -129,6 +129,27 @@ static inline int raw_irqs_disabled(void)
129 129
130 return raw_irqs_disabled_flags(flags); 130 return raw_irqs_disabled_flags(flags);
131} 131}
132
133/*
134 * makes the traced hardirq state match with the machine state
135 *
136 * should be a rarely used function, only in places where its
137 * otherwise impossible to know the irq state, like in traps.
138 */
139static inline void trace_hardirqs_fixup_flags(unsigned long flags)
140{
141 if (raw_irqs_disabled_flags(flags))
142 trace_hardirqs_off();
143 else
144 trace_hardirqs_on();
145}
146
147static inline void trace_hardirqs_fixup(void)
148{
149 unsigned long flags = __raw_local_save_flags();
150
151 trace_hardirqs_fixup_flags(flags);
152}
132#endif /* __ASSEMBLY__ */ 153#endif /* __ASSEMBLY__ */
133 154
134/* 155/*
diff --git a/include/asm-x86/irqflags_64.h b/include/asm-x86/irqflags_64.h
index 5341ea1f815..bb9163bb29d 100644
--- a/include/asm-x86/irqflags_64.h
+++ b/include/asm-x86/irqflags_64.h
@@ -112,6 +112,26 @@ static inline int raw_irqs_disabled(void)
112} 112}
113 113
114/* 114/*
115 * makes the traced hardirq state match with the machine state
116 *
117 * should be a rarely used function, only in places where its
118 * otherwise impossible to know the irq state, like in traps.
119 */
120static inline void trace_hardirqs_fixup_flags(unsigned long flags)
121{
122 if (raw_irqs_disabled_flags(flags))
123 trace_hardirqs_off();
124 else
125 trace_hardirqs_on();
126}
127
128static inline void trace_hardirqs_fixup(void)
129{
130 unsigned long flags = __raw_local_save_flags();
131
132 trace_hardirqs_fixup_flags(flags);
133}
134/*
115 * Used in the idle loop; sti takes one instruction cycle 135 * Used in the idle loop; sti takes one instruction cycle
116 * to complete: 136 * to complete:
117 */ 137 */
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 128dc7ad490..61535e72834 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -43,6 +43,7 @@ enum {
43 ATA_MAX_SECTORS_128 = 128, 43 ATA_MAX_SECTORS_128 = 128,
44 ATA_MAX_SECTORS = 256, 44 ATA_MAX_SECTORS = 256,
45 ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ 45 ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */
46 ATA_MAX_SECTORS_TAPE = 65535,
46 47
47 ATA_ID_WORDS = 256, 48 ATA_ID_WORDS = 256,
48 ATA_ID_SERNO = 10, 49 ATA_ID_SERNO = 10,
@@ -544,6 +545,11 @@ static inline int atapi_cdb_len(const u16 *dev_id)
544 } 545 }
545} 546}
546 547
548static inline int atapi_command_packet_set(const u16 *dev_id)
549{
550 return (dev_id[0] >> 8) & 0x1f;
551}
552
547static inline int is_atapi_taskfile(const struct ata_taskfile *tf) 553static inline int is_atapi_taskfile(const struct ata_taskfile *tf)
548{ 554{
549 return (tf->protocol == ATA_PROT_ATAPI) || 555 return (tf->protocol == ATA_PROT_ATAPI) ||
diff --git a/include/linux/input.h b/include/linux/input.h
index 62268929856..b45f240a8c4 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -527,6 +527,9 @@ struct input_absinfo {
527#define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ 527#define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */
528#define KEY_LOGOFF 0x1b1 /* AL Logoff */ 528#define KEY_LOGOFF 0x1b1 /* AL Logoff */
529 529
530#define KEY_DOLLAR 0x1b2
531#define KEY_EURO 0x1b3
532
530#define KEY_DEL_EOL 0x1c0 533#define KEY_DEL_EOL 0x1c0
531#define KEY_DEL_EOS 0x1c1 534#define KEY_DEL_EOS 0x1c1
532#define KEY_INS_LINE 0x1c2 535#define KEY_INS_LINE 0x1c2
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index 32326c293d7..25973504414 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -188,43 +188,23 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
188 188
189/** 189/**
190 * sg_mark_end - Mark the end of the scatterlist 190 * sg_mark_end - Mark the end of the scatterlist
191 * @sgl: Scatterlist 191 * @sg: SG entryScatterlist
192 * @nents: Number of entries in sgl
193 * 192 *
194 * Description: 193 * Description:
195 * Marks the last entry as the termination point for sg_next() 194 * Marks the passed in sg entry as the termination point for the sg
195 * table. A call to sg_next() on this entry will return NULL.
196 * 196 *
197 **/ 197 **/
198static inline void sg_mark_end(struct scatterlist *sgl, unsigned int nents) 198static inline void sg_mark_end(struct scatterlist *sg)
199{ 199{
200 sgl[nents - 1].page_link = 0x02;
201}
202
203static inline void __sg_mark_end(struct scatterlist *sg)
204{
205 sg->page_link |= 0x02;
206}
207
208/**
209 * sg_init_one - Initialize a single entry sg list
210 * @sg: SG entry
211 * @buf: Virtual address for IO
212 * @buflen: IO length
213 *
214 * Notes:
215 * This should not be used on a single entry that is part of a larger
216 * table. Use sg_init_table() for that.
217 *
218 **/
219static inline void sg_init_one(struct scatterlist *sg, const void *buf,
220 unsigned int buflen)
221{
222 memset(sg, 0, sizeof(*sg));
223#ifdef CONFIG_DEBUG_SG 200#ifdef CONFIG_DEBUG_SG
224 sg->sg_magic = SG_MAGIC; 201 BUG_ON(sg->sg_magic != SG_MAGIC);
225#endif 202#endif
226 sg_mark_end(sg, 1); 203 /*
227 sg_set_buf(sg, buf, buflen); 204 * Set termination bit, clear potential chain bit
205 */
206 sg->page_link |= 0x02;
207 sg->page_link &= ~0x01;
228} 208}
229 209
230/** 210/**
@@ -240,7 +220,6 @@ static inline void sg_init_one(struct scatterlist *sg, const void *buf,
240static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) 220static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents)
241{ 221{
242 memset(sgl, 0, sizeof(*sgl) * nents); 222 memset(sgl, 0, sizeof(*sgl) * nents);
243 sg_mark_end(sgl, nents);
244#ifdef CONFIG_DEBUG_SG 223#ifdef CONFIG_DEBUG_SG
245 { 224 {
246 unsigned int i; 225 unsigned int i;
@@ -248,6 +227,25 @@ static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents)
248 sgl[i].sg_magic = SG_MAGIC; 227 sgl[i].sg_magic = SG_MAGIC;
249 } 228 }
250#endif 229#endif
230 sg_mark_end(&sgl[nents - 1]);
231}
232
233/**
234 * sg_init_one - Initialize a single entry sg list
235 * @sg: SG entry
236 * @buf: Virtual address for IO
237 * @buflen: IO length
238 *
239 * Notes:
240 * This should not be used on a single entry that is part of a larger
241 * table. Use sg_init_table() for that.
242 *
243 **/
244static inline void sg_init_one(struct scatterlist *sg, const void *buf,
245 unsigned int buflen)
246{
247 sg_init_table(sg, 1);
248 sg_set_buf(sg, buf, buflen);
251} 249}
252 250
253/** 251/**
diff --git a/include/net/esp.h b/include/net/esp.h
index c1bc529809d..c05f529bff2 100644
--- a/include/net/esp.h
+++ b/include/net/esp.h
@@ -3,7 +3,7 @@
3 3
4#include <linux/crypto.h> 4#include <linux/crypto.h>
5#include <net/xfrm.h> 5#include <net/xfrm.h>
6#include <asm/scatterlist.h> 6#include <linux/scatterlist.h>
7 7
8#define ESP_NUM_FAST_SG 4 8#define ESP_NUM_FAST_SG 4
9 9
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 4bea182d711..11f39606e7d 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -48,9 +48,9 @@
48#include <linux/kref.h> 48#include <linux/kref.h>
49#include <linux/list.h> 49#include <linux/list.h>
50#include <linux/rwsem.h> 50#include <linux/rwsem.h>
51#include <linux/scatterlist.h>
51 52
52#include <asm/atomic.h> 53#include <asm/atomic.h>
53#include <asm/scatterlist.h>
54#include <asm/uaccess.h> 54#include <asm/uaccess.h>
55 55
56union ib_gid { 56union ib_gid {
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 8dda2d66b5b..a466c2cb895 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -36,7 +36,7 @@
36#include <scsi/scsi_device.h> 36#include <scsi/scsi_device.h>
37#include <scsi/scsi_cmnd.h> 37#include <scsi/scsi_cmnd.h>
38#include <scsi/scsi_transport_sas.h> 38#include <scsi/scsi_transport_sas.h>
39#include <asm/scatterlist.h> 39#include <linux/scatterlist.h>
40 40
41struct block_device; 41struct block_device;
42 42
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 55fe0c7cd95..ed38bbfc48a 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2424,7 +2424,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
2424 return 0; 2424 return 0;
2425 2425
2426 /* 2426 /*
2427 * Calculate the chain hash: it's the combined has of all the 2427 * Calculate the chain hash: it's the combined hash of all the
2428 * lock keys along the dependency chain. We save the hash value 2428 * lock keys along the dependency chain. We save the hash value
2429 * at every step so that we can get the current hash easily 2429 * at every step so that we can get the current hash easily
2430 * after unlock. The chain hash is then used to cache dependency 2430 * after unlock. The chain hash is then used to cache dependency
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index e6fb392e516..415e5c38554 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -80,6 +80,7 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)
80static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu) 80static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
81{ 81{
82 struct task_struct *g, *p; 82 struct task_struct *g, *p;
83 unsigned long flags;
83 84
84 SEQ_printf(m, 85 SEQ_printf(m,
85 "\nrunnable tasks:\n" 86 "\nrunnable tasks:\n"
@@ -88,7 +89,7 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
88 "------------------------------------------------------" 89 "------------------------------------------------------"
89 "----------------------------------------------------\n"); 90 "----------------------------------------------------\n");
90 91
91 read_lock_irq(&tasklist_lock); 92 read_lock_irqsave(&tasklist_lock, flags);
92 93
93 do_each_thread(g, p) { 94 do_each_thread(g, p) {
94 if (!p->se.on_rq || task_cpu(p) != rq_cpu) 95 if (!p->se.on_rq || task_cpu(p) != rq_cpu)
@@ -97,7 +98,7 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
97 print_task(m, rq, p); 98 print_task(m, rq, p);
98 } while_each_thread(g, p); 99 } while_each_thread(g, p);
99 100
100 read_unlock_irq(&tasklist_lock); 101 read_unlock_irqrestore(&tasklist_lock, flags);
101} 102}
102 103
103void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) 104void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 64b50ff7a41..32d5826b717 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2095,7 +2095,7 @@ int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int le
2095{ 2095{
2096 int nsg = __skb_to_sgvec(skb, sg, offset, len); 2096 int nsg = __skb_to_sgvec(skb, sg, offset, len);
2097 2097
2098 __sg_mark_end(&sg[nsg - 1]); 2098 sg_mark_end(&sg[nsg - 1]);
2099 2099
2100 return nsg; 2100 return nsg;
2101} 2101}
diff --git a/net/ieee80211/ieee80211_crypt_ccmp.c b/net/ieee80211/ieee80211_crypt_ccmp.c
index 0936a3e0210..c6d760d9fbb 100644
--- a/net/ieee80211/ieee80211_crypt_ccmp.c
+++ b/net/ieee80211/ieee80211_crypt_ccmp.c
@@ -25,7 +25,6 @@
25#include <net/ieee80211.h> 25#include <net/ieee80211.h>
26 26
27#include <linux/crypto.h> 27#include <linux/crypto.h>
28#include <asm/scatterlist.h>
29 28
30MODULE_AUTHOR("Jouni Malinen"); 29MODULE_AUTHOR("Jouni Malinen");
31MODULE_DESCRIPTION("Host AP crypt: CCMP"); 30MODULE_DESCRIPTION("Host AP crypt: CCMP");
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c
index 4e8e3b079f5..5fc346d8b56 100644
--- a/net/ipv4/ah4.c
+++ b/net/ipv4/ah4.c
@@ -8,7 +8,6 @@
8#include <linux/spinlock.h> 8#include <linux/spinlock.h>
9#include <net/icmp.h> 9#include <net/icmp.h>
10#include <net/protocol.h> 10#include <net/protocol.h>
11#include <asm/scatterlist.h>
12 11
13 12
14/* Clear mutable options and find final destination to substitute 13/* Clear mutable options and find final destination to substitute
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index 0bfeb02a5f8..ca1b5fdb8d3 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -14,7 +14,6 @@
14 * - Adaptive compression. 14 * - Adaptive compression.
15 */ 15 */
16#include <linux/module.h> 16#include <linux/module.h>
17#include <asm/scatterlist.h>
18#include <asm/semaphore.h> 17#include <asm/semaphore.h>
19#include <linux/crypto.h> 18#include <linux/crypto.h>
20#include <linux/pfkeyv2.h> 19#include <linux/pfkeyv2.h>
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index eec02b29ffc..d438dfb0c8f 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/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,
1083 sg_set_buf(&sg[block++], key->key, key->keylen); 1083 sg_set_buf(&sg[block++], key->key, key->keylen);
1084 nbytes += key->keylen; 1084 nbytes += key->keylen;
1085 1085
1086 __sg_mark_end(&sg[block - 1]); 1086 sg_mark_end(&sg[block - 1]);
1087 1087
1088 /* Now store the Hash into the packet */ 1088 /* Now store the Hash into the packet */
1089 err = crypto_hash_init(desc); 1089 err = crypto_hash_init(desc);
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index 66a9139d46e..4eaf55072b1 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -35,7 +35,6 @@
35#include <net/ipv6.h> 35#include <net/ipv6.h>
36#include <net/protocol.h> 36#include <net/protocol.h>
37#include <net/xfrm.h> 37#include <net/xfrm.h>
38#include <asm/scatterlist.h>
39 38
40static int zero_out_mutable_opts(struct ipv6_opt_hdr *opthdr) 39static int zero_out_mutable_opts(struct ipv6_opt_hdr *opthdr)
41{ 40{
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index 80ef2a1d39f..85eb4798d8d 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -34,7 +34,6 @@
34#include <net/ip.h> 34#include <net/ip.h>
35#include <net/xfrm.h> 35#include <net/xfrm.h>
36#include <net/ipcomp.h> 36#include <net/ipcomp.h>
37#include <asm/scatterlist.h>
38#include <asm/semaphore.h> 37#include <asm/semaphore.h>
39#include <linux/crypto.h> 38#include <linux/crypto.h>
40#include <linux/pfkeyv2.h> 39#include <linux/pfkeyv2.h>
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 4b903288095..06be2a1f273 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/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,
781 sg_set_buf(&sg[block++], key->key, key->keylen); 781 sg_set_buf(&sg[block++], key->key, key->keylen);
782 nbytes += key->keylen; 782 nbytes += key->keylen;
783 783
784 __sg_mark_end(&sg[block - 1]); 784 sg_mark_end(&sg[block - 1]);
785 785
786 /* Now store the hash into the packet */ 786 /* Now store the hash into the packet */
787 err = crypto_hash_init(desc); 787 err = crypto_hash_init(desc);
diff --git a/net/mac80211/aes_ccm.c b/net/mac80211/aes_ccm.c
index bf7ba128b96..e62fe55944b 100644
--- a/net/mac80211/aes_ccm.c
+++ b/net/mac80211/aes_ccm.c
@@ -11,7 +11,6 @@
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/crypto.h> 12#include <linux/crypto.h>
13#include <linux/err.h> 13#include <linux/err.h>
14#include <asm/scatterlist.h>
15 14
16#include <net/mac80211.h> 15#include <net/mac80211.h>
17#include "ieee80211_key.h" 16#include "ieee80211_key.h"
diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c
index c387cf68a08..e09a95aa68f 100644
--- a/net/rxrpc/rxkad.c
+++ b/net/rxrpc/rxkad.c
@@ -702,7 +702,7 @@ static void rxkad_sg_set_buf2(struct scatterlist sg[2],
702 nsg++; 702 nsg++;
703 } 703 }
704 704
705 __sg_mark_end(&sg[nsg - 1]); 705 sg_mark_end(&sg[nsg - 1]);
706 706
707 ASSERTCMP(sg[0].length + sg[1].length, ==, buflen); 707 ASSERTCMP(sg[0].length + sg[1].length, ==, buflen);
708} 708}
diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c
index ab7cbd6575c..0dd792338fa 100644
--- a/net/sunrpc/auth_gss/gss_krb5_crypto.c
+++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c
@@ -211,8 +211,8 @@ encryptor(struct scatterlist *sg, void *data)
211 if (thislen == 0) 211 if (thislen == 0)
212 return 0; 212 return 0;
213 213
214 __sg_mark_end(&desc->infrags[desc->fragno - 1]); 214 sg_mark_end(&desc->infrags[desc->fragno - 1]);
215 __sg_mark_end(&desc->outfrags[desc->fragno - 1]); 215 sg_mark_end(&desc->outfrags[desc->fragno - 1]);
216 216
217 ret = crypto_blkcipher_encrypt_iv(&desc->desc, desc->outfrags, 217 ret = crypto_blkcipher_encrypt_iv(&desc->desc, desc->outfrags,
218 desc->infrags, thislen); 218 desc->infrags, thislen);
@@ -293,7 +293,7 @@ decryptor(struct scatterlist *sg, void *data)
293 if (thislen == 0) 293 if (thislen == 0)
294 return 0; 294 return 0;
295 295
296 __sg_mark_end(&desc->frags[desc->fragno - 1]); 296 sg_mark_end(&desc->frags[desc->fragno - 1]);
297 297
298 ret = crypto_blkcipher_decrypt_iv(&desc->desc, desc->frags, 298 ret = crypto_blkcipher_decrypt_iv(&desc->desc, desc->frags,
299 desc->frags, thislen); 299 desc->frags, thislen);
diff --git a/net/sunrpc/auth_gss/gss_krb5_seal.c b/net/sunrpc/auth_gss/gss_krb5_seal.c
index a0d9faa59cb..1c6eda5077c 100644
--- a/net/sunrpc/auth_gss/gss_krb5_seal.c
+++ b/net/sunrpc/auth_gss/gss_krb5_seal.c
@@ -63,7 +63,6 @@
63#include <linux/jiffies.h> 63#include <linux/jiffies.h>
64#include <linux/sunrpc/gss_krb5.h> 64#include <linux/sunrpc/gss_krb5.h>
65#include <linux/random.h> 65#include <linux/random.h>
66#include <asm/scatterlist.h>
67#include <linux/crypto.h> 66#include <linux/crypto.h>
68 67
69#ifdef RPC_DEBUG 68#ifdef RPC_DEBUG
diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c
index 8bd074df27d..3bdc527ee64 100644
--- a/net/sunrpc/auth_gss/gss_krb5_wrap.c
+++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c
@@ -4,7 +4,6 @@
4#include <linux/sunrpc/gss_krb5.h> 4#include <linux/sunrpc/gss_krb5.h>
5#include <linux/random.h> 5#include <linux/random.h>
6#include <linux/pagemap.h> 6#include <linux/pagemap.h>
7#include <asm/scatterlist.h>
8#include <linux/crypto.h> 7#include <linux/crypto.h>
9 8
10#ifdef RPC_DEBUG 9#ifdef RPC_DEBUG
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index 0426388d351..1686f64c435 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -21,7 +21,6 @@
21#if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE) 21#if defined(CONFIG_INET_ESP) || defined(CONFIG_INET_ESP_MODULE) || defined(CONFIG_INET6_ESP) || defined(CONFIG_INET6_ESP_MODULE)
22#include <net/esp.h> 22#include <net/esp.h>
23#endif 23#endif
24#include <asm/scatterlist.h>
25 24
26/* 25/*
27 * Algorithms supported by IPsec. These entries contain properties which 26 * Algorithms supported by IPsec. These entries contain properties which