aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/Kconfig.debug9
-rw-r--r--arch/alpha/defconfig1
-rw-r--r--arch/alpha/kernel/osf_sys.c2
-rw-r--r--arch/alpha/kernel/smp.c4
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c1
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c1
-rw-r--r--arch/arm/mach-rpc/riscpc.c2
-rw-r--r--arch/avr32/lib/delay.c4
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c2
-rw-r--r--arch/blackfin/mach-bf533/boards/H8606.c2
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c2
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c2
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c2
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537.c2
-rw-r--r--arch/blackfin/mach-bf537/boards/generic_board.c2
-rw-r--r--arch/blackfin/mach-bf537/boards/minotaur.c2
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c2
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c2
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c2
-rw-r--r--arch/frv/kernel/setup.c2
-rw-r--r--arch/h8300/kernel/irq.c1
-rw-r--r--arch/ia64/kernel/smpboot.c3
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c6
-rw-r--r--arch/m68k/amiga/chipram.c2
-rw-r--r--arch/m68k/amiga/cia.c2
-rw-r--r--arch/m68knommu/lib/memcpy.c1
-rw-r--r--arch/mips/au1000/common/gpio.c1
-rw-r--r--arch/mips/kernel/smp.c1
-rw-r--r--arch/mips/kernel/sysirix.c2
-rw-r--r--arch/parisc/Kconfig.debug9
-rw-r--r--arch/parisc/configs/a500_defconfig1
-rw-r--r--arch/powerpc/kernel/time.c12
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_32.c2
-rw-r--r--arch/ppc/8260_io/enet.c2
-rw-r--r--arch/ppc/8260_io/fcc_enet.c2
-rw-r--r--arch/ppc/kernel/vmlinux.lds.S5
-rw-r--r--arch/ppc/platforms/prep_setup.c81
-rw-r--r--arch/sh/boards/landisk/setup.c2
-rw-r--r--arch/sh/boards/lboxre2/setup.c2
-rw-r--r--arch/sh/boards/renesas/r7780rp/setup.c2
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/setup.c2
-rw-r--r--arch/sh/boards/renesas/sdk7780/setup.c2
-rw-r--r--arch/sh/boards/se/7722/setup.c2
-rw-r--r--arch/sparc/kernel/sun4d_smp.c4
-rw-r--r--arch/sparc/kernel/sun4m_smp.c5
-rw-r--r--arch/sparc/kernel/systbls.S6
-rw-r--r--arch/sparc64/defconfig83
-rw-r--r--arch/sparc64/kernel/Makefile2
-rw-r--r--arch/sparc64/kernel/iommu.c142
-rw-r--r--arch/sparc64/kernel/iommu_common.c248
-rw-r--r--arch/sparc64/kernel/iommu_common.h26
-rw-r--r--arch/sparc64/kernel/pci_sun4v.c170
-rw-r--r--arch/sparc64/kernel/smp.c2
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c1
-rw-r--r--arch/sparc64/kernel/systbls.S9
-rw-r--r--arch/sparc64/kernel/time.c5
-rw-r--r--arch/sparc64/solaris/fs.c2
-rw-r--r--arch/sparc64/solaris/timod.c6
-rw-r--r--arch/x86/Kconfig2
-rw-r--r--arch/x86/kernel/cpu/common.c2
-rw-r--r--arch/x86/kernel/cpu/cyrix.c2
-rw-r--r--arch/x86/kernel/smpboot_32.c2
-rw-r--r--arch/x86/lib/delay_32.c4
-rw-r--r--arch/x86/lib/delay_64.c4
-rw-r--r--arch/x86/mach-voyager/voyager_smp.c2
-rw-r--r--arch/xtensa/kernel/time.c2
66 files changed, 218 insertions, 706 deletions
diff --git a/arch/alpha/Kconfig.debug b/arch/alpha/Kconfig.debug
index f45f28cc10da..3f6265f2d9d4 100644
--- a/arch/alpha/Kconfig.debug
+++ b/arch/alpha/Kconfig.debug
@@ -7,15 +7,6 @@ config EARLY_PRINTK
7 depends on ALPHA_GENERIC || ALPHA_SRM 7 depends on ALPHA_GENERIC || ALPHA_SRM
8 default y 8 default y
9 9
10config DEBUG_RWLOCK
11 bool "Read-write spinlock debugging"
12 depends on DEBUG_KERNEL
13 help
14 If you say Y here then read-write lock processing will count how many
15 times it has tried to get the lock and issue an error message after
16 too many attempts. If you suspect a rwlock problem or a kernel
17 hacker asks for this option then say Y. Otherwise say N.
18
19config ALPHA_LEGACY_START_ADDRESS 10config ALPHA_LEGACY_START_ADDRESS
20 bool "Legacy kernel start address" 11 bool "Legacy kernel start address"
21 depends on ALPHA_GENERIC 12 depends on ALPHA_GENERIC
diff --git a/arch/alpha/defconfig b/arch/alpha/defconfig
index 6da9c3dbde44..e43f68fd66b0 100644
--- a/arch/alpha/defconfig
+++ b/arch/alpha/defconfig
@@ -882,7 +882,6 @@ CONFIG_MAGIC_SYSRQ=y
882# CONFIG_DEBUG_SPINLOCK is not set 882# CONFIG_DEBUG_SPINLOCK is not set
883CONFIG_DEBUG_INFO=y 883CONFIG_DEBUG_INFO=y
884CONFIG_EARLY_PRINTK=y 884CONFIG_EARLY_PRINTK=y
885# CONFIG_DEBUG_RWLOCK is not set
886# CONFIG_DEBUG_SEMAPHORE is not set 885# CONFIG_DEBUG_SEMAPHORE is not set
887CONFIG_ALPHA_LEGACY_START_ADDRESS=y 886CONFIG_ALPHA_LEGACY_START_ADDRESS=y
888CONFIG_MATHEMU=y 887CONFIG_MATHEMU=y
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 6413c5f23226..72f9a619a66d 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -430,7 +430,7 @@ sys_getpagesize(void)
430asmlinkage unsigned long 430asmlinkage unsigned long
431sys_getdtablesize(void) 431sys_getdtablesize(void)
432{ 432{
433 return NR_OPEN; 433 return sysctl_nr_open;
434} 434}
435 435
436/* 436/*
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index f4ab233201b2..63c2073401ee 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -77,10 +77,6 @@ int smp_num_probed; /* Internal processor count */
77int smp_num_cpus = 1; /* Number that came online. */ 77int smp_num_cpus = 1; /* Number that came online. */
78EXPORT_SYMBOL(smp_num_cpus); 78EXPORT_SYMBOL(smp_num_cpus);
79 79
80extern void calibrate_delay(void);
81
82
83
84/* 80/*
85 * Called by both boot and secondaries to move global data into 81 * Called by both boot and secondaries to move global data into
86 * per-processor storage. 82 * per-processor storage.
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index aa29ea58ca09..0ce38dfa6ebe 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -383,6 +383,7 @@ static void at91_lcdc_tft_power_control(int on)
383} 383}
384 384
385static struct atmel_lcdfb_info __initdata ek_lcdc_data = { 385static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
386 .lcdcon_is_backlight = true,
386 .default_bpp = 16, 387 .default_bpp = 16,
387 .default_dmacon = ATMEL_LCDC_DMAEN, 388 .default_dmacon = ATMEL_LCDC_DMAEN,
388 .default_lcdcon2 = AT91SAM9261_DEFAULT_TFT_LCDCON2, 389 .default_lcdcon2 = AT91SAM9261_DEFAULT_TFT_LCDCON2,
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index f09347a86e71..38313abef657 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -253,6 +253,7 @@ static void at91_lcdc_power_control(int on)
253 253
254/* Driver datas */ 254/* Driver datas */
255static struct atmel_lcdfb_info __initdata ek_lcdc_data = { 255static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
256 .lcdcon_is_backlight = true,
256 .default_bpp = 16, 257 .default_bpp = 16,
257 .default_dmacon = ATMEL_LCDC_DMAEN, 258 .default_dmacon = ATMEL_LCDC_DMAEN,
258 .default_lcdcon2 = AT91SAM9263_DEFAULT_LCDCON2, 259 .default_lcdcon2 = AT91SAM9263_DEFAULT_LCDCON2,
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index a454451c97c3..eca558c6bf5d 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -17,7 +17,7 @@
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/device.h> 18#include <linux/device.h>
19#include <linux/serial_8250.h> 19#include <linux/serial_8250.h>
20#include <linux/pata_platform.h> 20#include <linux/ata_platform.h>
21 21
22#include <asm/elf.h> 22#include <asm/elf.h>
23#include <asm/io.h> 23#include <asm/io.h>
diff --git a/arch/avr32/lib/delay.c b/arch/avr32/lib/delay.c
index b3bc0b56e2c6..9aa8800830f3 100644
--- a/arch/avr32/lib/delay.c
+++ b/arch/avr32/lib/delay.c
@@ -12,13 +12,15 @@
12 12
13#include <linux/delay.h> 13#include <linux/delay.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/timex.h>
15#include <linux/param.h> 16#include <linux/param.h>
16#include <linux/types.h> 17#include <linux/types.h>
18#include <linux/init.h>
17 19
18#include <asm/processor.h> 20#include <asm/processor.h>
19#include <asm/sysreg.h> 21#include <asm/sysreg.h>
20 22
21int read_current_timer(unsigned long *timer_value) 23int __devinit read_current_timer(unsigned long *timer_value)
22{ 24{
23 *timer_value = sysreg_read(COUNT); 25 *timer_value = sysreg_read(COUNT);
24 return 0; 26 return 0;
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index f8c411a24af7..1795aab79064 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -37,7 +37,7 @@
37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 37#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb/isp1362.h> 38#include <linux/usb/isp1362.h>
39#endif 39#endif
40#include <linux/pata_platform.h> 40#include <linux/ata_platform.h>
41#include <linux/irq.h> 41#include <linux/irq.h>
42#include <linux/interrupt.h> 42#include <linux/interrupt.h>
43#include <linux/usb/sl811.h> 43#include <linux/usb/sl811.h>
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
index a72c7a620fa1..97378b0a9753 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -38,7 +38,7 @@
38#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 38#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
39#include <linux/usb/isp1362.h> 39#include <linux/usb/isp1362.h>
40#endif 40#endif
41#include <linux/pata_platform.h> 41#include <linux/ata_platform.h>
42#include <linux/irq.h> 42#include <linux/irq.h>
43 43
44#include <asm/dma.h> 44#include <asm/dma.h>
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index 21df2f375497..886f260d9359 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -34,7 +34,7 @@
34#include <linux/spi/spi.h> 34#include <linux/spi/spi.h>
35#include <linux/spi/flash.h> 35#include <linux/spi/flash.h>
36#include <linux/usb/isp1362.h> 36#include <linux/usb/isp1362.h>
37#include <linux/pata_platform.h> 37#include <linux/ata_platform.h>
38#include <linux/irq.h> 38#include <linux/irq.h>
39#include <asm/dma.h> 39#include <asm/dma.h>
40#include <asm/bfin5xx_spi.h> 40#include <asm/bfin5xx_spi.h>
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index c37dd45c8803..4026c2f3ab4e 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -35,7 +35,7 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/spi/flash.h> 36#include <linux/spi/flash.h>
37#include <linux/usb/isp1362.h> 37#include <linux/usb/isp1362.h>
38#include <linux/pata_platform.h> 38#include <linux/ata_platform.h>
39#include <linux/irq.h> 39#include <linux/irq.h>
40#include <asm/dma.h> 40#include <asm/dma.h>
41#include <asm/bfin5xx_spi.h> 41#include <asm/bfin5xx_spi.h>
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index ac52b040b336..0185350feacc 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -38,7 +38,7 @@
38#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 38#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
39#include <linux/usb/isp1362.h> 39#include <linux/usb/isp1362.h>
40#endif 40#endif
41#include <linux/pata_platform.h> 41#include <linux/ata_platform.h>
42#include <linux/irq.h> 42#include <linux/irq.h>
43#include <asm/dma.h> 43#include <asm/dma.h>
44#include <asm/bfin5xx_spi.h> 44#include <asm/bfin5xx_spi.h>
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c
index 8703b67d5ec6..f7c1f964f13b 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c
@@ -36,7 +36,7 @@
36#include <linux/spi/spi.h> 36#include <linux/spi/spi.h>
37#include <linux/spi/flash.h> 37#include <linux/spi/flash.h>
38#include <linux/usb/isp1362.h> 38#include <linux/usb/isp1362.h>
39#include <linux/pata_platform.h> 39#include <linux/ata_platform.h>
40#include <linux/irq.h> 40#include <linux/irq.h>
41#include <asm/dma.h> 41#include <asm/dma.h>
42#include <asm/bfin5xx_spi.h> 42#include <asm/bfin5xx_spi.h>
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c
index 3e52f3f5bd58..8a3397db1d21 100644
--- a/arch/blackfin/mach-bf537/boards/generic_board.c
+++ b/arch/blackfin/mach-bf537/boards/generic_board.c
@@ -38,7 +38,7 @@
38#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 38#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
39#include <linux/usb/isp1362.h> 39#include <linux/usb/isp1362.h>
40#endif 40#endif
41#include <linux/pata_platform.h> 41#include <linux/ata_platform.h>
42#include <linux/irq.h> 42#include <linux/irq.h>
43#include <linux/interrupt.h> 43#include <linux/interrupt.h>
44#include <linux/usb/sl811.h> 44#include <linux/usb/sl811.h>
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c
index b8bbba85af53..d71e0be33921 100644
--- a/arch/blackfin/mach-bf537/boards/minotaur.c
+++ b/arch/blackfin/mach-bf537/boards/minotaur.c
@@ -10,7 +10,7 @@
10#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 10#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
11#include <linux/usb_isp1362.h> 11#include <linux/usb_isp1362.h>
12#endif 12#endif
13#include <linux/pata_platform.h> 13#include <linux/ata_platform.h>
14#include <linux/irq.h> 14#include <linux/irq.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <linux/usb_sl811.h> 16#include <linux/usb_sl811.h>
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 772541548b76..119e6ea83384 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -38,7 +38,7 @@
38#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 38#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
39#include <linux/usb/isp1362.h> 39#include <linux/usb/isp1362.h>
40#endif 40#endif
41#include <linux/pata_platform.h> 41#include <linux/ata_platform.h>
42#include <linux/irq.h> 42#include <linux/irq.h>
43#include <linux/interrupt.h> 43#include <linux/interrupt.h>
44#include <linux/usb/sl811.h> 44#include <linux/usb/sl811.h>
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 3a79a9061bdc..bf9e738a7c64 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -34,7 +34,7 @@
34#include <linux/spi/spi.h> 34#include <linux/spi/spi.h>
35#include <linux/spi/flash.h> 35#include <linux/spi/flash.h>
36#include <linux/usb/isp1362.h> 36#include <linux/usb/isp1362.h>
37#include <linux/pata_platform.h> 37#include <linux/ata_platform.h>
38#include <linux/irq.h> 38#include <linux/irq.h>
39#include <asm/dma.h> 39#include <asm/dma.h>
40#include <asm/bfin5xx_spi.h> 40#include <asm/bfin5xx_spi.h>
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 7601c3be1b5c..ed863ce9a2d8 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -35,7 +35,7 @@
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/irq.h> 36#include <linux/irq.h>
37#include <linux/interrupt.h> 37#include <linux/interrupt.h>
38#include <linux/pata_platform.h> 38#include <linux/ata_platform.h>
39#include <asm/dma.h> 39#include <asm/dma.h>
40#include <asm/bfin5xx_spi.h> 40#include <asm/bfin5xx_spi.h>
41#include <asm/portmux.h> 41#include <asm/portmux.h>
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index a74c08786b21..b38ae1fc15fd 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -708,7 +708,7 @@ static void __init reserve_dma_coherent(void)
708/* 708/*
709 * calibrate the delay loop 709 * calibrate the delay loop
710 */ 710 */
711void __init calibrate_delay(void) 711void __cpuinit calibrate_delay(void)
712{ 712{
713 loops_per_jiffy = __delay_loops_MHz * (1000000 / HZ); 713 loops_per_jiffy = __delay_loops_MHz * (1000000 / HZ);
714 714
diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c
index 8dec4dd57b4e..5a1b4cfea05b 100644
--- a/arch/h8300/kernel/irq.c
+++ b/arch/h8300/kernel/irq.c
@@ -14,6 +14,7 @@
14#include <linux/random.h> 14#include <linux/random.h>
15#include <linux/bootmem.h> 15#include <linux/bootmem.h>
16#include <linux/irq.h> 16#include <linux/irq.h>
17#include <linux/interrupt.h>
17 18
18#include <asm/system.h> 19#include <asm/system.h>
19#include <asm/traps.h> 20#include <asm/traps.h>
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 480b1a5085d5..32ee5979a042 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -120,7 +120,6 @@ static volatile unsigned long go[SLAVE + 1];
120 120
121#define DEBUG_ITC_SYNC 0 121#define DEBUG_ITC_SYNC 0
122 122
123extern void __devinit calibrate_delay (void);
124extern void start_ap (void); 123extern void start_ap (void);
125extern unsigned long ia64_iobase; 124extern unsigned long ia64_iobase;
126 125
@@ -477,7 +476,7 @@ start_secondary (void *unused)
477 return 0; 476 return 0;
478} 477}
479 478
480struct pt_regs * __devinit idle_regs(struct pt_regs *regs) 479struct pt_regs * __cpuinit idle_regs(struct pt_regs *regs)
481{ 480{
482 return NULL; 481 return NULL;
483} 482}
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index ab3eaf85fe4d..2c676cc05418 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -100,11 +100,11 @@ u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus)
100static irqreturn_t 100static irqreturn_t
101pcibr_error_intr_handler(int irq, void *arg) 101pcibr_error_intr_handler(int irq, void *arg)
102{ 102{
103 struct pcibus_info *soft = (struct pcibus_info *)arg; 103 struct pcibus_info *soft = arg;
104 104
105 if (sal_pcibr_error_interrupt(soft) < 0) { 105 if (sal_pcibr_error_interrupt(soft) < 0)
106 panic("pcibr_error_intr_handler(): Fatal Bridge Error"); 106 panic("pcibr_error_intr_handler(): Fatal Bridge Error");
107 } 107
108 return IRQ_HANDLED; 108 return IRQ_HANDLED;
109} 109}
110 110
diff --git a/arch/m68k/amiga/chipram.c b/arch/m68k/amiga/chipram.c
index d10726f9038b..cbe36538af47 100644
--- a/arch/m68k/amiga/chipram.c
+++ b/arch/m68k/amiga/chipram.c
@@ -32,12 +32,10 @@ void __init amiga_chip_init(void)
32 if (!AMIGAHW_PRESENT(CHIP_RAM)) 32 if (!AMIGAHW_PRESENT(CHIP_RAM))
33 return; 33 return;
34 34
35#ifndef CONFIG_APUS_FAST_EXCEPT
36 /* 35 /*
37 * Remove the first 4 pages where PPC exception handlers will be located 36 * Remove the first 4 pages where PPC exception handlers will be located
38 */ 37 */
39 amiga_chip_size -= 0x4000; 38 amiga_chip_size -= 0x4000;
40#endif
41 chipram_res.end = amiga_chip_size-1; 39 chipram_res.end = amiga_chip_size-1;
42 request_resource(&iomem_resource, &chipram_res); 40 request_resource(&iomem_resource, &chipram_res);
43 41
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c
index c4a4ffd45bc0..343fab49bd9a 100644
--- a/arch/m68k/amiga/cia.c
+++ b/arch/m68k/amiga/cia.c
@@ -84,7 +84,7 @@ unsigned char cia_able_irq(struct ciabase *base, unsigned char mask)
84 84
85static irqreturn_t cia_handler(int irq, void *dev_id) 85static irqreturn_t cia_handler(int irq, void *dev_id)
86{ 86{
87 struct ciabase *base = (struct ciabase *)dev_id; 87 struct ciabase *base = dev_id;
88 int mach_irq; 88 int mach_irq;
89 unsigned char ints; 89 unsigned char ints;
90 90
diff --git a/arch/m68knommu/lib/memcpy.c b/arch/m68knommu/lib/memcpy.c
index 0d5577569e4c..b50dbcad4746 100644
--- a/arch/m68knommu/lib/memcpy.c
+++ b/arch/m68knommu/lib/memcpy.c
@@ -1,6 +1,5 @@
1 1
2#include <linux/types.h> 2#include <linux/types.h>
3#include <linux/autoconf.h>
4 3
5void * memcpy(void * to, const void * from, size_t n) 4void * memcpy(void * to, const void * from, size_t n)
6{ 5{
diff --git a/arch/mips/au1000/common/gpio.c b/arch/mips/au1000/common/gpio.c
index 8527856aec45..0b658f1db4ce 100644
--- a/arch/mips/au1000/common/gpio.c
+++ b/arch/mips/au1000/common/gpio.c
@@ -27,7 +27,6 @@
27 * others have a second one : GPIO2 27 * others have a second one : GPIO2
28 */ 28 */
29 29
30#include <linux/autoconf.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/io.h> 31#include <linux/io.h>
33#include <linux/types.h> 32#include <linux/types.h>
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 1e5dfc28294a..9d41dab90a80 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -52,7 +52,6 @@ int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */
52EXPORT_SYMBOL(phys_cpu_present_map); 52EXPORT_SYMBOL(phys_cpu_present_map);
53EXPORT_SYMBOL(cpu_online_map); 53EXPORT_SYMBOL(cpu_online_map);
54 54
55extern void __init calibrate_delay(void);
56extern void cpu_idle(void); 55extern void cpu_idle(void);
57 56
58/* Number of TCs (or siblings in Intel speak) per CPU core */ 57/* Number of TCs (or siblings in Intel speak) per CPU core */
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c
index 4c477c7ff74a..22fd41e946b2 100644
--- a/arch/mips/kernel/sysirix.c
+++ b/arch/mips/kernel/sysirix.c
@@ -356,7 +356,7 @@ asmlinkage int irix_syssgi(struct pt_regs *regs)
356 retval = NGROUPS_MAX; 356 retval = NGROUPS_MAX;
357 goto out; 357 goto out;
358 case 5: 358 case 5:
359 retval = NR_OPEN; 359 retval = sysctl_nr_open;
360 goto out; 360 goto out;
361 case 6: 361 case 6:
362 retval = 1; 362 retval = 1;
diff --git a/arch/parisc/Kconfig.debug b/arch/parisc/Kconfig.debug
index 9166bd117267..bc989e522a04 100644
--- a/arch/parisc/Kconfig.debug
+++ b/arch/parisc/Kconfig.debug
@@ -2,15 +2,6 @@ menu "Kernel hacking"
2 2
3source "lib/Kconfig.debug" 3source "lib/Kconfig.debug"
4 4
5config DEBUG_RWLOCK
6 bool "Read-write spinlock debugging"
7 depends on DEBUG_KERNEL && SMP
8 help
9 If you say Y here then read-write lock processing will count how many
10 times it has tried to get the lock and issue an error message after
11 too many attempts. If you suspect a rwlock problem or a kernel
12 hacker asks for this option then say Y. Otherwise say N.
13
14config DEBUG_RODATA 5config DEBUG_RODATA
15 bool "Write protect kernel read-only data structures" 6 bool "Write protect kernel read-only data structures"
16 depends on DEBUG_KERNEL 7 depends on DEBUG_KERNEL
diff --git a/arch/parisc/configs/a500_defconfig b/arch/parisc/configs/a500_defconfig
index ea071218a3ed..ddacc72e38fb 100644
--- a/arch/parisc/configs/a500_defconfig
+++ b/arch/parisc/configs/a500_defconfig
@@ -1050,7 +1050,6 @@ CONFIG_SCHED_DEBUG=y
1050CONFIG_FORCED_INLINING=y 1050CONFIG_FORCED_INLINING=y
1051# CONFIG_RCU_TORTURE_TEST is not set 1051# CONFIG_RCU_TORTURE_TEST is not set
1052# CONFIG_FAULT_INJECTION is not set 1052# CONFIG_FAULT_INJECTION is not set
1053# CONFIG_DEBUG_RWLOCK is not set
1054# CONFIG_DEBUG_RODATA is not set 1053# CONFIG_DEBUG_RODATA is not set
1055 1054
1056# 1055#
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 5cd3db5cae41..3b26fbd6bec9 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -66,6 +66,7 @@
66#include <asm/smp.h> 66#include <asm/smp.h>
67#include <asm/vdso_datapage.h> 67#include <asm/vdso_datapage.h>
68#include <asm/firmware.h> 68#include <asm/firmware.h>
69#include <asm/cputime.h>
69#ifdef CONFIG_PPC_ISERIES 70#ifdef CONFIG_PPC_ISERIES
70#include <asm/iseries/it_lp_queue.h> 71#include <asm/iseries/it_lp_queue.h>
71#include <asm/iseries/hv_call_xm.h> 72#include <asm/iseries/hv_call_xm.h>
@@ -189,6 +190,8 @@ u64 __cputime_sec_factor;
189EXPORT_SYMBOL(__cputime_sec_factor); 190EXPORT_SYMBOL(__cputime_sec_factor);
190u64 __cputime_clockt_factor; 191u64 __cputime_clockt_factor;
191EXPORT_SYMBOL(__cputime_clockt_factor); 192EXPORT_SYMBOL(__cputime_clockt_factor);
193DEFINE_PER_CPU(unsigned long, cputime_last_delta);
194DEFINE_PER_CPU(unsigned long, cputime_scaled_last_delta);
192 195
193static void calc_cputime_factors(void) 196static void calc_cputime_factors(void)
194{ 197{
@@ -257,8 +260,8 @@ void account_system_vtime(struct task_struct *tsk)
257 } 260 }
258 account_system_time(tsk, 0, delta); 261 account_system_time(tsk, 0, delta);
259 account_system_time_scaled(tsk, deltascaled); 262 account_system_time_scaled(tsk, deltascaled);
260 get_paca()->purrdelta = delta; 263 per_cpu(cputime_last_delta, smp_processor_id()) = delta;
261 get_paca()->spurrdelta = deltascaled; 264 per_cpu(cputime_scaled_last_delta, smp_processor_id()) = deltascaled;
262 local_irq_restore(flags); 265 local_irq_restore(flags);
263} 266}
264 267
@@ -276,10 +279,7 @@ void account_process_tick(struct task_struct *tsk, int user_tick)
276 get_paca()->user_time = 0; 279 get_paca()->user_time = 0;
277 account_user_time(tsk, utime); 280 account_user_time(tsk, utime);
278 281
279 /* Estimate the scaled utime by scaling the real utime based 282 utimescaled = cputime_to_scaled(utime);
280 * on the last spurr to purr ratio */
281 utimescaled = utime * get_paca()->spurrdelta / get_paca()->purrdelta;
282 get_paca()->spurrdelta = get_paca()->purrdelta = 0;
283 account_user_time_scaled(tsk, utimescaled); 283 account_user_time_scaled(tsk, utimescaled);
284} 284}
285 285
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c
index c04abcc28a7a..792d3ce8112e 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_32.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_32.c
@@ -113,8 +113,6 @@ static inline void debug_calc_bogomips(void)
113 * result. We backup/restore the value to avoid affecting the 113 * result. We backup/restore the value to avoid affecting the
114 * core cpufreq framework's own calculation. 114 * core cpufreq framework's own calculation.
115 */ 115 */
116 extern void calibrate_delay(void);
117
118 unsigned long save_lpj = loops_per_jiffy; 116 unsigned long save_lpj = loops_per_jiffy;
119 calibrate_delay(); 117 calibrate_delay();
120 loops_per_jiffy = save_lpj; 118 loops_per_jiffy = save_lpj;
diff --git a/arch/ppc/8260_io/enet.c b/arch/ppc/8260_io/enet.c
index 25ef55bacd99..ec1defea9c1e 100644
--- a/arch/ppc/8260_io/enet.c
+++ b/arch/ppc/8260_io/enet.c
@@ -418,7 +418,7 @@ scc_enet_rx(struct net_device *dev)
418 struct sk_buff *skb; 418 struct sk_buff *skb;
419 ushort pkt_len; 419 ushort pkt_len;
420 420
421 cep = (struct scc_enet_private *)dev->priv; 421 cep = dev->priv;
422 422
423 /* First, grab all of the stats for the incoming packet. 423 /* First, grab all of the stats for the incoming packet.
424 * These get messed up if we get called due to a busy condition. 424 * These get messed up if we get called due to a busy condition.
diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c
index a3a27dafff1f..bcc3aa9d04f3 100644
--- a/arch/ppc/8260_io/fcc_enet.c
+++ b/arch/ppc/8260_io/fcc_enet.c
@@ -682,7 +682,7 @@ fcc_enet_rx(struct net_device *dev)
682 struct sk_buff *skb; 682 struct sk_buff *skb;
683 ushort pkt_len; 683 ushort pkt_len;
684 684
685 cep = (struct fcc_enet_private *)dev->priv; 685 cep = dev->priv;
686 686
687 /* First, grab all of the stats for the incoming packet. 687 /* First, grab all of the stats for the incoming packet.
688 * These get messed up if we get called due to a busy condition. 688 * These get messed up if we get called due to a busy condition.
diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S
index 52b64fcbdfc5..8a24bc47eb6c 100644
--- a/arch/ppc/kernel/vmlinux.lds.S
+++ b/arch/ppc/kernel/vmlinux.lds.S
@@ -143,11 +143,6 @@ SECTIONS
143 143
144 . = ALIGN(4096); 144 . = ALIGN(4096);
145 __init_end = .; 145 __init_end = .;
146
147 . = ALIGN(4096);
148 _sextratext = .;
149 _eextratext = .;
150
151 __bss_start = .; 146 __bss_start = .;
152 .bss : 147 .bss :
153 { 148 {
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c
index 3c56654bfc6f..38449855d5ff 100644
--- a/arch/ppc/platforms/prep_setup.c
+++ b/arch/ppc/platforms/prep_setup.c
@@ -91,20 +91,11 @@ extern void prep_tiger1_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi
91#define cached_21 (((char *)(ppc_cached_irq_mask))[3]) 91#define cached_21 (((char *)(ppc_cached_irq_mask))[3])
92#define cached_A1 (((char *)(ppc_cached_irq_mask))[2]) 92#define cached_A1 (((char *)(ppc_cached_irq_mask))[2])
93 93
94#ifdef CONFIG_SOUND_CS4232
95long ppc_cs4232_dma, ppc_cs4232_dma2;
96#endif
97
98extern PTE *Hash, *Hash_end; 94extern PTE *Hash, *Hash_end;
99extern unsigned long Hash_size, Hash_mask; 95extern unsigned long Hash_size, Hash_mask;
100extern int probingmem; 96extern int probingmem;
101extern unsigned long loops_per_jiffy; 97extern unsigned long loops_per_jiffy;
102 98
103#ifdef CONFIG_SOUND_CS4232
104EXPORT_SYMBOL(ppc_cs4232_dma);
105EXPORT_SYMBOL(ppc_cs4232_dma2);
106#endif
107
108/* useful ISA ports */ 99/* useful ISA ports */
109#define PREP_SYSCTL 0x81c 100#define PREP_SYSCTL 0x81c
110/* present in the IBM reference design; possibly identical in Mot boxes: */ 101/* present in the IBM reference design; possibly identical in Mot boxes: */
@@ -569,74 +560,6 @@ prep_show_percpuinfo(struct seq_file *m, int i)
569 return 0; 560 return 0;
570} 561}
571 562
572#ifdef CONFIG_SOUND_CS4232
573static long __init masktoint(unsigned int i)
574{
575 int t = -1;
576 while (i >> ++t)
577 ;
578 return (t-1);
579}
580
581/*
582 * ppc_cs4232_dma and ppc_cs4232_dma2 are used in include/asm/dma.h
583 * to distinguish sound dma-channels from others. This is because
584 * blocksize on 16 bit dma-channels 5,6,7 is 128k, but
585 * the cs4232.c uses 64k like on 8 bit dma-channels 0,1,2,3
586 */
587
588static void __init prep_init_sound(void)
589{
590 PPC_DEVICE *audiodevice = NULL;
591
592 /*
593 * Get the needed resource information from residual data.
594 *
595 */
596 if (have_residual_data)
597 audiodevice = residual_find_device(~0, NULL,
598 MultimediaController, AudioController, -1, 0);
599
600 if (audiodevice != NULL) {
601 PnP_TAG_PACKET *pkt;
602
603 pkt = PnP_find_packet((unsigned char *)&res->DevicePnPHeap[audiodevice->AllocatedOffset],
604 S5_Packet, 0);
605 if (pkt != NULL)
606 ppc_cs4232_dma = masktoint(pkt->S5_Pack.DMAMask);
607 pkt = PnP_find_packet((unsigned char*)&res->DevicePnPHeap[audiodevice->AllocatedOffset],
608 S5_Packet, 1);
609 if (pkt != NULL)
610 ppc_cs4232_dma2 = masktoint(pkt->S5_Pack.DMAMask);
611 }
612
613 /*
614 * These are the PReP specs' defaults for the cs4231. We use these
615 * as fallback incase we don't have residual data.
616 * At least the IBM Thinkpad 850 with IDE DMA Channels at 6 and 7
617 * will use the other values.
618 */
619 if (audiodevice == NULL) {
620 switch (_prep_type) {
621 case _PREP_IBM:
622 ppc_cs4232_dma = 1;
623 ppc_cs4232_dma2 = -1;
624 break;
625 default:
626 ppc_cs4232_dma = 6;
627 ppc_cs4232_dma2 = 7;
628 }
629 }
630
631 /*
632 * Find a way to push this information to the cs4232 driver
633 * Give it out with printk, when not in cmd_line?
634 * Append it to cmd_line and boot_command_line?
635 * Format is cs4232=io,irq,dma,dma2
636 */
637}
638#endif /* CONFIG_SOUND_CS4232 */
639
640/* 563/*
641 * Fill out screen_info according to the residual data. This allows us to use 564 * Fill out screen_info according to the residual data. This allows us to use
642 * at least vesafb. 565 * at least vesafb.
@@ -898,10 +821,6 @@ prep_setup_arch(void)
898 } 821 }
899 } 822 }
900 823
901#ifdef CONFIG_SOUND_CS4232
902 prep_init_sound();
903#endif /* CONFIG_SOUND_CS4232 */
904
905 prep_init_vesa(); 824 prep_init_vesa();
906 825
907 switch (_prep_type) { 826 switch (_prep_type) {
diff --git a/arch/sh/boards/landisk/setup.c b/arch/sh/boards/landisk/setup.c
index eda71763ecc5..2b708ec72558 100644
--- a/arch/sh/boards/landisk/setup.c
+++ b/arch/sh/boards/landisk/setup.c
@@ -14,7 +14,7 @@
14 */ 14 */
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/pata_platform.h> 17#include <linux/ata_platform.h>
18#include <linux/pm.h> 18#include <linux/pm.h>
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <asm/machvec.h> 20#include <asm/machvec.h>
diff --git a/arch/sh/boards/lboxre2/setup.c b/arch/sh/boards/lboxre2/setup.c
index 9c830fdc411b..c74440d38ee9 100644
--- a/arch/sh/boards/lboxre2/setup.c
+++ b/arch/sh/boards/lboxre2/setup.c
@@ -13,7 +13,7 @@
13 13
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/pata_platform.h> 16#include <linux/ata_platform.h>
17#include <asm/machvec.h> 17#include <asm/machvec.h>
18#include <asm/addrspace.h> 18#include <asm/addrspace.h>
19#include <asm/lboxre2.h> 19#include <asm/lboxre2.h>
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index a43b47726f54..f7a8d5c9d510 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -15,7 +15,7 @@
15 */ 15 */
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/ata_platform.h>
19#include <linux/types.h> 19#include <linux/types.h>
20#include <net/ax88796.h> 20#include <net/ax88796.h>
21#include <asm/machvec.h> 21#include <asm/machvec.h>
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c
index 3452b072adde..a0ef81b7de37 100644
--- a/arch/sh/boards/renesas/rts7751r2d/setup.c
+++ b/arch/sh/boards/renesas/rts7751r2d/setup.c
@@ -10,7 +10,7 @@
10 */ 10 */
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/pata_platform.h> 13#include <linux/ata_platform.h>
14#include <linux/serial_8250.h> 14#include <linux/serial_8250.h>
15#include <linux/sm501.h> 15#include <linux/sm501.h>
16#include <linux/sm501-regs.h> 16#include <linux/sm501-regs.h>
diff --git a/arch/sh/boards/renesas/sdk7780/setup.c b/arch/sh/boards/renesas/sdk7780/setup.c
index 5df32f201870..acc5932587f1 100644
--- a/arch/sh/boards/renesas/sdk7780/setup.c
+++ b/arch/sh/boards/renesas/sdk7780/setup.c
@@ -11,7 +11,7 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/types.h> 12#include <linux/types.h>
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/pata_platform.h> 14#include <linux/ata_platform.h>
15#include <asm/machvec.h> 15#include <asm/machvec.h>
16#include <asm/sdk7780.h> 16#include <asm/sdk7780.h>
17#include <asm/heartbeat.h> 17#include <asm/heartbeat.h>
diff --git a/arch/sh/boards/se/7722/setup.c b/arch/sh/boards/se/7722/setup.c
index eb97dca5b736..b1a3d9d0172f 100644
--- a/arch/sh/boards/se/7722/setup.c
+++ b/arch/sh/boards/se/7722/setup.c
@@ -12,7 +12,7 @@
12 */ 12 */
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/pata_platform.h> 15#include <linux/ata_platform.h>
16#include <asm/machvec.h> 16#include <asm/machvec.h>
17#include <asm/se7722.h> 17#include <asm/se7722.h>
18#include <asm/io.h> 18#include <asm/io.h>
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
index 89a6de95070c..0def48158c7d 100644
--- a/arch/sparc/kernel/sun4d_smp.c
+++ b/arch/sparc/kernel/sun4d_smp.c
@@ -19,12 +19,12 @@
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <linux/swap.h> 20#include <linux/swap.h>
21#include <linux/profile.h> 21#include <linux/profile.h>
22#include <linux/delay.h>
22 23
23#include <asm/ptrace.h> 24#include <asm/ptrace.h>
24#include <asm/atomic.h> 25#include <asm/atomic.h>
25#include <asm/irq_regs.h> 26#include <asm/irq_regs.h>
26 27
27#include <asm/delay.h>
28#include <asm/irq.h> 28#include <asm/irq.h>
29#include <asm/page.h> 29#include <asm/page.h>
30#include <asm/pgalloc.h> 30#include <asm/pgalloc.h>
@@ -41,8 +41,6 @@
41 41
42extern ctxd_t *srmmu_ctx_table_phys; 42extern ctxd_t *srmmu_ctx_table_phys;
43 43
44extern void calibrate_delay(void);
45
46static volatile int smp_processors_ready = 0; 44static volatile int smp_processors_ready = 0;
47static int smp_highest_cpu; 45static int smp_highest_cpu;
48extern volatile unsigned long cpu_callin_map[NR_CPUS]; 46extern volatile unsigned long cpu_callin_map[NR_CPUS];
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c
index 730eb5796f8e..0b9407267162 100644
--- a/arch/sparc/kernel/sun4m_smp.c
+++ b/arch/sparc/kernel/sun4m_smp.c
@@ -16,6 +16,8 @@
16#include <linux/mm.h> 16#include <linux/mm.h>
17#include <linux/swap.h> 17#include <linux/swap.h>
18#include <linux/profile.h> 18#include <linux/profile.h>
19#include <linux/delay.h>
20
19#include <asm/cacheflush.h> 21#include <asm/cacheflush.h>
20#include <asm/tlbflush.h> 22#include <asm/tlbflush.h>
21#include <asm/irq_regs.h> 23#include <asm/irq_regs.h>
@@ -23,7 +25,6 @@
23#include <asm/ptrace.h> 25#include <asm/ptrace.h>
24#include <asm/atomic.h> 26#include <asm/atomic.h>
25 27
26#include <asm/delay.h>
27#include <asm/irq.h> 28#include <asm/irq.h>
28#include <asm/page.h> 29#include <asm/page.h>
29#include <asm/pgalloc.h> 30#include <asm/pgalloc.h>
@@ -39,8 +40,6 @@
39 40
40extern ctxd_t *srmmu_ctx_table_phys; 41extern ctxd_t *srmmu_ctx_table_phys;
41 42
42extern void calibrate_delay(void);
43
44extern volatile unsigned long cpu_callin_map[NR_CPUS]; 43extern volatile unsigned long cpu_callin_map[NR_CPUS];
45extern unsigned char boot_cpu_id; 44extern unsigned char boot_cpu_id;
46 45
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S
index ee010f4532a0..9064485dc40b 100644
--- a/arch/sparc/kernel/systbls.S
+++ b/arch/sparc/kernel/systbls.S
@@ -79,7 +79,8 @@ sys_call_table:
79/*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare 79/*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare
80/*300*/ .long sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy 80/*300*/ .long sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy
81/*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait 81/*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
82/*310*/ .long sys_utimensat, sys_signalfd, sys_ni_syscall, sys_eventfd, sys_fallocate 82/*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
83/*315*/ .long sys_timerfd_settime, sys_timerfd_gettime
83 84
84#ifdef CONFIG_SUNOS_EMUL 85#ifdef CONFIG_SUNOS_EMUL
85 /* Now the SunOS syscall table. */ 86 /* Now the SunOS syscall table. */
@@ -197,6 +198,7 @@ sunos_sys_table:
197 .long sunos_nosys, sunos_nosys, sunos_nosys 198 .long sunos_nosys, sunos_nosys, sunos_nosys
198 .long sunos_nosys 199 .long sunos_nosys
199/*310*/ .long sunos_nosys, sunos_nosys, sunos_nosys 200/*310*/ .long sunos_nosys, sunos_nosys, sunos_nosys
200 .long sunos_nosys, sunos_nosys 201 .long sunos_nosys, sunos_nosys, sunos_nosys
202 .long sunos_nosys
201 203
202#endif 204#endif
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index f62d9f6c5e2a..833d74b2b192 100644
--- a/arch/sparc64/defconfig
+++ b/arch/sparc64/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.24-rc4 3# Linux kernel version: 2.6.24
4# Tue Dec 4 00:37:59 2007 4# Tue Feb 5 17:28:19 2008
5# 5#
6CONFIG_SPARC=y 6CONFIG_SPARC=y
7CONFIG_SPARC64=y 7CONFIG_SPARC64=y
@@ -17,6 +17,7 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
17# CONFIG_ARCH_HAS_ILOG2_U32 is not set 17# CONFIG_ARCH_HAS_ILOG2_U32 is not set
18# CONFIG_ARCH_HAS_ILOG2_U64 is not set 18# CONFIG_ARCH_HAS_ILOG2_U64 is not set
19CONFIG_AUDIT_ARCH=y 19CONFIG_AUDIT_ARCH=y
20CONFIG_HAVE_SETUP_PER_CPU_AREA=y
20CONFIG_ARCH_NO_VIRT_TO_BUS=y 21CONFIG_ARCH_NO_VIRT_TO_BUS=y
21CONFIG_OF=y 22CONFIG_OF=y
22CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 23CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
@@ -30,13 +31,15 @@ CONFIG_HZ_100=y
30# CONFIG_HZ_300 is not set 31# CONFIG_HZ_300 is not set
31# CONFIG_HZ_1000 is not set 32# CONFIG_HZ_1000 is not set
32CONFIG_HZ=100 33CONFIG_HZ=100
34# CONFIG_SCHED_HRTICK is not set
35CONFIG_HOTPLUG_CPU=y
33CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 36CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
34 37
35# 38#
36# General setup 39# General setup
37# 40#
38CONFIG_EXPERIMENTAL=y 41CONFIG_EXPERIMENTAL=y
39CONFIG_BROKEN_ON_SMP=y 42CONFIG_LOCK_KERNEL=y
40CONFIG_INIT_ENV_ARG_LIMIT=32 43CONFIG_INIT_ENV_ARG_LIMIT=32
41CONFIG_LOCALVERSION="" 44CONFIG_LOCALVERSION=""
42# CONFIG_LOCALVERSION_AUTO is not set 45# CONFIG_LOCALVERSION_AUTO is not set
@@ -76,6 +79,7 @@ CONFIG_FUTEX=y
76CONFIG_ANON_INODES=y 79CONFIG_ANON_INODES=y
77CONFIG_EPOLL=y 80CONFIG_EPOLL=y
78CONFIG_SIGNALFD=y 81CONFIG_SIGNALFD=y
82CONFIG_TIMERFD=y
79CONFIG_EVENTFD=y 83CONFIG_EVENTFD=y
80CONFIG_SHMEM=y 84CONFIG_SHMEM=y
81CONFIG_VM_EVENT_COUNTERS=y 85CONFIG_VM_EVENT_COUNTERS=y
@@ -83,6 +87,14 @@ CONFIG_SLUB_DEBUG=y
83# CONFIG_SLAB is not set 87# CONFIG_SLAB is not set
84CONFIG_SLUB=y 88CONFIG_SLUB=y
85# CONFIG_SLOB is not set 89# CONFIG_SLOB is not set
90CONFIG_PROFILING=y
91# CONFIG_MARKERS is not set
92CONFIG_OPROFILE=m
93CONFIG_HAVE_OPROFILE=y
94CONFIG_KPROBES=y
95CONFIG_HAVE_KPROBES=y
96CONFIG_PROC_PAGE_MONITOR=y
97CONFIG_SLABINFO=y
86CONFIG_RT_MUTEXES=y 98CONFIG_RT_MUTEXES=y
87# CONFIG_TINY_SHMEM is not set 99# CONFIG_TINY_SHMEM is not set
88CONFIG_BASE_SMALL=0 100CONFIG_BASE_SMALL=0
@@ -92,6 +104,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
92CONFIG_MODVERSIONS=y 104CONFIG_MODVERSIONS=y
93CONFIG_MODULE_SRCVERSION_ALL=y 105CONFIG_MODULE_SRCVERSION_ALL=y
94CONFIG_KMOD=y 106CONFIG_KMOD=y
107CONFIG_STOP_MACHINE=y
95CONFIG_BLOCK=y 108CONFIG_BLOCK=y
96CONFIG_BLK_DEV_IO_TRACE=y 109CONFIG_BLK_DEV_IO_TRACE=y
97CONFIG_BLK_DEV_BSG=y 110CONFIG_BLK_DEV_BSG=y
@@ -109,6 +122,8 @@ CONFIG_DEFAULT_AS=y
109# CONFIG_DEFAULT_CFQ is not set 122# CONFIG_DEFAULT_CFQ is not set
110# CONFIG_DEFAULT_NOOP is not set 123# CONFIG_DEFAULT_NOOP is not set
111CONFIG_DEFAULT_IOSCHED="anticipatory" 124CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_CLASSIC_RCU=y
126# CONFIG_PREEMPT_RCU is not set
112CONFIG_SYSVIPC_COMPAT=y 127CONFIG_SYSVIPC_COMPAT=y
113CONFIG_GENERIC_HARDIRQS=y 128CONFIG_GENERIC_HARDIRQS=y
114 129
@@ -119,7 +134,8 @@ CONFIG_TICK_ONESHOT=y
119CONFIG_NO_HZ=y 134CONFIG_NO_HZ=y
120CONFIG_HIGH_RES_TIMERS=y 135CONFIG_HIGH_RES_TIMERS=y
121CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 136CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
122# CONFIG_SMP is not set 137CONFIG_SMP=y
138CONFIG_NR_CPUS=64
123# CONFIG_CPU_FREQ is not set 139# CONFIG_CPU_FREQ is not set
124CONFIG_RWSEM_XCHGADD_ALGORITHM=y 140CONFIG_RWSEM_XCHGADD_ALGORITHM=y
125CONFIG_GENERIC_FIND_NEXT_BIT=y 141CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -169,9 +185,12 @@ CONFIG_BINFMT_ELF32=y
169CONFIG_BINFMT_ELF=y 185CONFIG_BINFMT_ELF=y
170CONFIG_BINFMT_MISC=m 186CONFIG_BINFMT_MISC=m
171CONFIG_SOLARIS_EMUL=y 187CONFIG_SOLARIS_EMUL=y
188CONFIG_SCHED_SMT=y
189CONFIG_SCHED_MC=y
172# CONFIG_PREEMPT_NONE is not set 190# CONFIG_PREEMPT_NONE is not set
173CONFIG_PREEMPT_VOLUNTARY=y 191CONFIG_PREEMPT_VOLUNTARY=y
174# CONFIG_PREEMPT is not set 192# CONFIG_PREEMPT is not set
193# CONFIG_RCU_TRACE is not set
175# CONFIG_CMDLINE_BOOL is not set 194# CONFIG_CMDLINE_BOOL is not set
176 195
177# 196#
@@ -189,6 +208,7 @@ CONFIG_XFRM=y
189CONFIG_XFRM_USER=m 208CONFIG_XFRM_USER=m
190# CONFIG_XFRM_SUB_POLICY is not set 209# CONFIG_XFRM_SUB_POLICY is not set
191CONFIG_XFRM_MIGRATE=y 210CONFIG_XFRM_MIGRATE=y
211# CONFIG_XFRM_STATISTICS is not set
192CONFIG_NET_KEY=m 212CONFIG_NET_KEY=m
193CONFIG_NET_KEY_MIGRATE=y 213CONFIG_NET_KEY_MIGRATE=y
194CONFIG_INET=y 214CONFIG_INET=y
@@ -249,9 +269,9 @@ CONFIG_IP_DCCP_ACKVEC=y
249CONFIG_IP_DCCP_CCID2=m 269CONFIG_IP_DCCP_CCID2=m
250# CONFIG_IP_DCCP_CCID2_DEBUG is not set 270# CONFIG_IP_DCCP_CCID2_DEBUG is not set
251CONFIG_IP_DCCP_CCID3=m 271CONFIG_IP_DCCP_CCID3=m
252CONFIG_IP_DCCP_TFRC_LIB=m
253# CONFIG_IP_DCCP_CCID3_DEBUG is not set 272# CONFIG_IP_DCCP_CCID3_DEBUG is not set
254CONFIG_IP_DCCP_CCID3_RTO=100 273CONFIG_IP_DCCP_CCID3_RTO=100
274CONFIG_IP_DCCP_TFRC_LIB=m
255 275
256# 276#
257# DCCP Kernel Hacking 277# DCCP Kernel Hacking
@@ -279,6 +299,7 @@ CONFIG_VLAN_8021Q=m
279CONFIG_NET_PKTGEN=m 299CONFIG_NET_PKTGEN=m
280CONFIG_NET_TCPPROBE=m 300CONFIG_NET_TCPPROBE=m
281# CONFIG_HAMRADIO is not set 301# CONFIG_HAMRADIO is not set
302# CONFIG_CAN is not set
282# CONFIG_IRDA is not set 303# CONFIG_IRDA is not set
283# CONFIG_BT is not set 304# CONFIG_BT is not set
284# CONFIG_AF_RXRPC is not set 305# CONFIG_AF_RXRPC is not set
@@ -343,6 +364,7 @@ CONFIG_BLK_DEV_IDE=y
343CONFIG_BLK_DEV_IDEDISK=y 364CONFIG_BLK_DEV_IDEDISK=y
344# CONFIG_IDEDISK_MULTI_MODE is not set 365# CONFIG_IDEDISK_MULTI_MODE is not set
345CONFIG_BLK_DEV_IDECD=y 366CONFIG_BLK_DEV_IDECD=y
367CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
346# CONFIG_BLK_DEV_IDETAPE is not set 368# CONFIG_BLK_DEV_IDETAPE is not set
347# CONFIG_BLK_DEV_IDEFLOPPY is not set 369# CONFIG_BLK_DEV_IDEFLOPPY is not set
348# CONFIG_BLK_DEV_IDESCSI is not set 370# CONFIG_BLK_DEV_IDESCSI is not set
@@ -359,7 +381,6 @@ CONFIG_IDE_GENERIC=y
359# PCI IDE chipsets support 381# PCI IDE chipsets support
360# 382#
361CONFIG_BLK_DEV_IDEPCI=y 383CONFIG_BLK_DEV_IDEPCI=y
362# CONFIG_IDEPCI_SHARE_IRQ is not set
363CONFIG_IDEPCI_PCIBUS_ORDER=y 384CONFIG_IDEPCI_PCIBUS_ORDER=y
364# CONFIG_BLK_DEV_GENERIC is not set 385# CONFIG_BLK_DEV_GENERIC is not set
365# CONFIG_BLK_DEV_OPTI621 is not set 386# CONFIG_BLK_DEV_OPTI621 is not set
@@ -389,7 +410,6 @@ CONFIG_BLK_DEV_ALI15X3=y
389# CONFIG_BLK_DEV_TRM290 is not set 410# CONFIG_BLK_DEV_TRM290 is not set
390# CONFIG_BLK_DEV_VIA82CXXX is not set 411# CONFIG_BLK_DEV_VIA82CXXX is not set
391# CONFIG_BLK_DEV_TC86C001 is not set 412# CONFIG_BLK_DEV_TC86C001 is not set
392# CONFIG_IDE_ARM is not set
393CONFIG_BLK_DEV_IDEDMA=y 413CONFIG_BLK_DEV_IDEDMA=y
394CONFIG_IDE_ARCH_OBSOLETE_INIT=y 414CONFIG_IDE_ARCH_OBSOLETE_INIT=y
395# CONFIG_BLK_DEV_HD is not set 415# CONFIG_BLK_DEV_HD is not set
@@ -501,7 +521,6 @@ CONFIG_NETDEVICES=y
501# CONFIG_EQUALIZER is not set 521# CONFIG_EQUALIZER is not set
502# CONFIG_TUN is not set 522# CONFIG_TUN is not set
503# CONFIG_VETH is not set 523# CONFIG_VETH is not set
504# CONFIG_IP1000 is not set
505# CONFIG_ARCNET is not set 524# CONFIG_ARCNET is not set
506# CONFIG_PHYLIB is not set 525# CONFIG_PHYLIB is not set
507CONFIG_NET_ETHERNET=y 526CONFIG_NET_ETHERNET=y
@@ -533,6 +552,7 @@ CONFIG_NET_PCI=y
533# CONFIG_NE2K_PCI is not set 552# CONFIG_NE2K_PCI is not set
534# CONFIG_8139CP is not set 553# CONFIG_8139CP is not set
535# CONFIG_8139TOO is not set 554# CONFIG_8139TOO is not set
555# CONFIG_R6040 is not set
536# CONFIG_SIS900 is not set 556# CONFIG_SIS900 is not set
537# CONFIG_EPIC100 is not set 557# CONFIG_EPIC100 is not set
538# CONFIG_SUNDANCE is not set 558# CONFIG_SUNDANCE is not set
@@ -545,6 +565,9 @@ CONFIG_E1000=m
545CONFIG_E1000_NAPI=y 565CONFIG_E1000_NAPI=y
546# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set 566# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
547# CONFIG_E1000E is not set 567# CONFIG_E1000E is not set
568# CONFIG_E1000E_ENABLED is not set
569# CONFIG_IP1000 is not set
570# CONFIG_IGB is not set
548# CONFIG_MYRI_SBUS is not set 571# CONFIG_MYRI_SBUS is not set
549# CONFIG_NS83820 is not set 572# CONFIG_NS83820 is not set
550# CONFIG_HAMACHI is not set 573# CONFIG_HAMACHI is not set
@@ -570,6 +593,7 @@ CONFIG_NETDEV_10000=y
570CONFIG_NIU=m 593CONFIG_NIU=m
571# CONFIG_MLX4_CORE is not set 594# CONFIG_MLX4_CORE is not set
572# CONFIG_TEHUTI is not set 595# CONFIG_TEHUTI is not set
596# CONFIG_BNX2X is not set
573# CONFIG_TR is not set 597# CONFIG_TR is not set
574 598
575# 599#
@@ -602,7 +626,6 @@ CONFIG_PPPOE=m
602# CONFIG_SLIP is not set 626# CONFIG_SLIP is not set
603CONFIG_SLHC=m 627CONFIG_SLHC=m
604# CONFIG_NET_FC is not set 628# CONFIG_NET_FC is not set
605# CONFIG_SHAPER is not set
606# CONFIG_NETCONSOLE is not set 629# CONFIG_NETCONSOLE is not set
607# CONFIG_NETPOLL is not set 630# CONFIG_NETPOLL is not set
608# CONFIG_NET_POLL_CONTROLLER is not set 631# CONFIG_NET_POLL_CONTROLLER is not set
@@ -679,6 +702,7 @@ CONFIG_VT_CONSOLE=y
679CONFIG_HW_CONSOLE=y 702CONFIG_HW_CONSOLE=y
680# CONFIG_VT_HW_CONSOLE_BINDING is not set 703# CONFIG_VT_HW_CONSOLE_BINDING is not set
681# CONFIG_SERIAL_NONSTANDARD is not set 704# CONFIG_SERIAL_NONSTANDARD is not set
705# CONFIG_NOZOMI is not set
682 706
683# 707#
684# Serial drivers 708# Serial drivers
@@ -747,13 +771,13 @@ CONFIG_I2C_ALGOBIT=y
747# 771#
748# Miscellaneous I2C Chip support 772# Miscellaneous I2C Chip support
749# 773#
750# CONFIG_SENSORS_DS1337 is not set
751# CONFIG_SENSORS_DS1374 is not set
752# CONFIG_DS1682 is not set 774# CONFIG_DS1682 is not set
753# CONFIG_SENSORS_EEPROM is not set 775# CONFIG_SENSORS_EEPROM is not set
754# CONFIG_SENSORS_PCF8574 is not set 776# CONFIG_SENSORS_PCF8574 is not set
777# CONFIG_PCF8575 is not set
755# CONFIG_SENSORS_PCA9539 is not set 778# CONFIG_SENSORS_PCA9539 is not set
756# CONFIG_SENSORS_PCF8591 is not set 779# CONFIG_SENSORS_PCF8591 is not set
780# CONFIG_TPS65010 is not set
757# CONFIG_SENSORS_MAX6875 is not set 781# CONFIG_SENSORS_MAX6875 is not set
758# CONFIG_SENSORS_TSL2550 is not set 782# CONFIG_SENSORS_TSL2550 is not set
759# CONFIG_I2C_DEBUG_CORE is not set 783# CONFIG_I2C_DEBUG_CORE is not set
@@ -990,6 +1014,7 @@ CONFIG_SND_ALI5451=m
990# CONFIG_SND_BT87X is not set 1014# CONFIG_SND_BT87X is not set
991# CONFIG_SND_CA0106 is not set 1015# CONFIG_SND_CA0106 is not set
992# CONFIG_SND_CMIPCI is not set 1016# CONFIG_SND_CMIPCI is not set
1017# CONFIG_SND_OXYGEN is not set
993# CONFIG_SND_CS4281 is not set 1018# CONFIG_SND_CS4281 is not set
994# CONFIG_SND_CS46XX is not set 1019# CONFIG_SND_CS46XX is not set
995# CONFIG_SND_DARLA20 is not set 1020# CONFIG_SND_DARLA20 is not set
@@ -1014,6 +1039,7 @@ CONFIG_SND_ALI5451=m
1014# CONFIG_SND_HDA_INTEL is not set 1039# CONFIG_SND_HDA_INTEL is not set
1015# CONFIG_SND_HDSP is not set 1040# CONFIG_SND_HDSP is not set
1016# CONFIG_SND_HDSPM is not set 1041# CONFIG_SND_HDSPM is not set
1042# CONFIG_SND_HIFIER is not set
1017# CONFIG_SND_ICE1712 is not set 1043# CONFIG_SND_ICE1712 is not set
1018# CONFIG_SND_ICE1724 is not set 1044# CONFIG_SND_ICE1724 is not set
1019# CONFIG_SND_INTEL8X0 is not set 1045# CONFIG_SND_INTEL8X0 is not set
@@ -1031,6 +1057,7 @@ CONFIG_SND_ALI5451=m
1031# CONFIG_SND_TRIDENT is not set 1057# CONFIG_SND_TRIDENT is not set
1032# CONFIG_SND_VIA82XX is not set 1058# CONFIG_SND_VIA82XX is not set
1033# CONFIG_SND_VIA82XX_MODEM is not set 1059# CONFIG_SND_VIA82XX_MODEM is not set
1060# CONFIG_SND_VIRTUOSO is not set
1034# CONFIG_SND_VX222 is not set 1061# CONFIG_SND_VX222 is not set
1035# CONFIG_SND_YMFPCI is not set 1062# CONFIG_SND_YMFPCI is not set
1036# CONFIG_SND_AC97_POWER_SAVE is not set 1063# CONFIG_SND_AC97_POWER_SAVE is not set
@@ -1058,6 +1085,10 @@ CONFIG_SND_SUN_CS4231=m
1058# 1085#
1059 1086
1060# 1087#
1088# ALSA SoC audio for Freescale SOCs
1089#
1090
1091#
1061# Open Sound System 1092# Open Sound System
1062# 1093#
1063# CONFIG_SOUND_PRIME is not set 1094# CONFIG_SOUND_PRIME is not set
@@ -1080,6 +1111,7 @@ CONFIG_USB_ARCH_HAS_OHCI=y
1080CONFIG_USB_ARCH_HAS_EHCI=y 1111CONFIG_USB_ARCH_HAS_EHCI=y
1081CONFIG_USB=y 1112CONFIG_USB=y
1082# CONFIG_USB_DEBUG is not set 1113# CONFIG_USB_DEBUG is not set
1114# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
1083 1115
1084# 1116#
1085# Miscellaneous USB options 1117# Miscellaneous USB options
@@ -1093,7 +1125,6 @@ CONFIG_USB_DEVICEFS=y
1093# USB Host Controller Drivers 1125# USB Host Controller Drivers
1094# 1126#
1095CONFIG_USB_EHCI_HCD=m 1127CONFIG_USB_EHCI_HCD=m
1096# CONFIG_USB_EHCI_SPLIT_ISO is not set
1097# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1128# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1098# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1129# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1099# CONFIG_USB_ISP116X_HCD is not set 1130# CONFIG_USB_ISP116X_HCD is not set
@@ -1143,10 +1174,6 @@ CONFIG_USB_STORAGE=m
1143# 1174#
1144# USB port drivers 1175# USB port drivers
1145# 1176#
1146
1147#
1148# USB Serial Converter support
1149#
1150# CONFIG_USB_SERIAL is not set 1177# CONFIG_USB_SERIAL is not set
1151 1178
1152# 1179#
@@ -1172,14 +1199,6 @@ CONFIG_USB_STORAGE=m
1172# CONFIG_USB_TRANCEVIBRATOR is not set 1199# CONFIG_USB_TRANCEVIBRATOR is not set
1173# CONFIG_USB_IOWARRIOR is not set 1200# CONFIG_USB_IOWARRIOR is not set
1174# CONFIG_USB_TEST is not set 1201# CONFIG_USB_TEST is not set
1175
1176#
1177# USB DSL modem support
1178#
1179
1180#
1181# USB Gadget Support
1182#
1183# CONFIG_USB_GADGET is not set 1202# CONFIG_USB_GADGET is not set
1184# CONFIG_MMC is not set 1203# CONFIG_MMC is not set
1185# CONFIG_NEW_LEDS is not set 1204# CONFIG_NEW_LEDS is not set
@@ -1332,11 +1351,6 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1332# CONFIG_NLS_KOI8_U is not set 1351# CONFIG_NLS_KOI8_U is not set
1333# CONFIG_NLS_UTF8 is not set 1352# CONFIG_NLS_UTF8 is not set
1334# CONFIG_DLM is not set 1353# CONFIG_DLM is not set
1335CONFIG_INSTRUMENTATION=y
1336CONFIG_PROFILING=y
1337CONFIG_OPROFILE=m
1338CONFIG_KPROBES=y
1339# CONFIG_MARKERS is not set
1340 1354
1341# 1355#
1342# Kernel hacking 1356# Kernel hacking
@@ -1374,6 +1388,8 @@ CONFIG_DEBUG_BUGVERBOSE=y
1374CONFIG_FORCED_INLINING=y 1388CONFIG_FORCED_INLINING=y
1375# CONFIG_BOOT_PRINTK_DELAY is not set 1389# CONFIG_BOOT_PRINTK_DELAY is not set
1376# CONFIG_RCU_TORTURE_TEST is not set 1390# CONFIG_RCU_TORTURE_TEST is not set
1391# CONFIG_KPROBES_SANITY_TEST is not set
1392# CONFIG_BACKTRACE_SELF_TEST is not set
1377# CONFIG_LKDTM is not set 1393# CONFIG_LKDTM is not set
1378# CONFIG_FAULT_INJECTION is not set 1394# CONFIG_FAULT_INJECTION is not set
1379# CONFIG_SAMPLES is not set 1395# CONFIG_SAMPLES is not set
@@ -1396,8 +1412,9 @@ CONFIG_ASYNC_MEMCPY=m
1396CONFIG_ASYNC_XOR=m 1412CONFIG_ASYNC_XOR=m
1397CONFIG_CRYPTO=y 1413CONFIG_CRYPTO=y
1398CONFIG_CRYPTO_ALGAPI=y 1414CONFIG_CRYPTO_ALGAPI=y
1399CONFIG_CRYPTO_AEAD=m 1415CONFIG_CRYPTO_AEAD=y
1400CONFIG_CRYPTO_BLKCIPHER=y 1416CONFIG_CRYPTO_BLKCIPHER=y
1417# CONFIG_CRYPTO_SEQIV is not set
1401CONFIG_CRYPTO_HASH=y 1418CONFIG_CRYPTO_HASH=y
1402CONFIG_CRYPTO_MANAGER=y 1419CONFIG_CRYPTO_MANAGER=y
1403CONFIG_CRYPTO_HMAC=y 1420CONFIG_CRYPTO_HMAC=y
@@ -1416,6 +1433,9 @@ CONFIG_CRYPTO_CBC=y
1416CONFIG_CRYPTO_PCBC=m 1433CONFIG_CRYPTO_PCBC=m
1417CONFIG_CRYPTO_LRW=m 1434CONFIG_CRYPTO_LRW=m
1418CONFIG_CRYPTO_XTS=m 1435CONFIG_CRYPTO_XTS=m
1436# CONFIG_CRYPTO_CTR is not set
1437# CONFIG_CRYPTO_GCM is not set
1438# CONFIG_CRYPTO_CCM is not set
1419# CONFIG_CRYPTO_CRYPTD is not set 1439# CONFIG_CRYPTO_CRYPTD is not set
1420CONFIG_CRYPTO_DES=y 1440CONFIG_CRYPTO_DES=y
1421CONFIG_CRYPTO_FCRYPT=m 1441CONFIG_CRYPTO_FCRYPT=m
@@ -1431,13 +1451,16 @@ CONFIG_CRYPTO_ARC4=m
1431CONFIG_CRYPTO_KHAZAD=m 1451CONFIG_CRYPTO_KHAZAD=m
1432CONFIG_CRYPTO_ANUBIS=m 1452CONFIG_CRYPTO_ANUBIS=m
1433CONFIG_CRYPTO_SEED=m 1453CONFIG_CRYPTO_SEED=m
1454# CONFIG_CRYPTO_SALSA20 is not set
1434CONFIG_CRYPTO_DEFLATE=y 1455CONFIG_CRYPTO_DEFLATE=y
1435CONFIG_CRYPTO_MICHAEL_MIC=m 1456CONFIG_CRYPTO_MICHAEL_MIC=m
1436CONFIG_CRYPTO_CRC32C=m 1457CONFIG_CRYPTO_CRC32C=m
1437CONFIG_CRYPTO_CAMELLIA=m 1458CONFIG_CRYPTO_CAMELLIA=m
1438CONFIG_CRYPTO_TEST=m 1459CONFIG_CRYPTO_TEST=m
1439CONFIG_CRYPTO_AUTHENC=m 1460CONFIG_CRYPTO_AUTHENC=m
1461# CONFIG_CRYPTO_LZO is not set
1440CONFIG_CRYPTO_HW=y 1462CONFIG_CRYPTO_HW=y
1463# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1441 1464
1442# 1465#
1443# Library routines 1466# Library routines
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
index ef50d217432f..4b78b24ef413 100644
--- a/arch/sparc64/kernel/Makefile
+++ b/arch/sparc64/kernel/Makefile
@@ -11,7 +11,7 @@ obj-y := process.o setup.o cpu.o idprom.o \
11 traps.o auxio.o una_asm.o sysfs.o iommu.o \ 11 traps.o auxio.o una_asm.o sysfs.o iommu.o \
12 irq.o ptrace.o time.o sys_sparc.o signal.o \ 12 irq.o ptrace.o time.o sys_sparc.o signal.o \
13 unaligned.o central.o pci.o starfire.o semaphore.o \ 13 unaligned.o central.o pci.o starfire.o semaphore.o \
14 power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o \ 14 power.o sbus.o sparc64_ksyms.o chmc.o \
15 visemul.o prom.o of_device.o hvapi.o sstate.o mdesc.o 15 visemul.o prom.o of_device.o hvapi.o sstate.o mdesc.o
16 16
17obj-$(CONFIG_STACKTRACE) += stacktrace.o 17obj-$(CONFIG_STACKTRACE) += stacktrace.o
diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c
index 4b9115a4d92e..5623a4d59dff 100644
--- a/arch/sparc64/kernel/iommu.c
+++ b/arch/sparc64/kernel/iommu.c
@@ -472,94 +472,15 @@ static void dma_4u_unmap_single(struct device *dev, dma_addr_t bus_addr,
472 spin_unlock_irqrestore(&iommu->lock, flags); 472 spin_unlock_irqrestore(&iommu->lock, flags);
473} 473}
474 474
475#define SG_ENT_PHYS_ADDRESS(SG) (__pa(sg_virt((SG))))
476
477static void fill_sg(iopte_t *iopte, struct scatterlist *sg,
478 int nused, int nelems,
479 unsigned long iopte_protection)
480{
481 struct scatterlist *dma_sg = sg;
482 int i;
483
484 for (i = 0; i < nused; i++) {
485 unsigned long pteval = ~0UL;
486 u32 dma_npages;
487
488 dma_npages = ((dma_sg->dma_address & (IO_PAGE_SIZE - 1UL)) +
489 dma_sg->dma_length +
490 ((IO_PAGE_SIZE - 1UL))) >> IO_PAGE_SHIFT;
491 do {
492 unsigned long offset;
493 signed int len;
494
495 /* If we are here, we know we have at least one
496 * more page to map. So walk forward until we
497 * hit a page crossing, and begin creating new
498 * mappings from that spot.
499 */
500 for (;;) {
501 unsigned long tmp;
502
503 tmp = SG_ENT_PHYS_ADDRESS(sg);
504 len = sg->length;
505 if (((tmp ^ pteval) >> IO_PAGE_SHIFT) != 0UL) {
506 pteval = tmp & IO_PAGE_MASK;
507 offset = tmp & (IO_PAGE_SIZE - 1UL);
508 break;
509 }
510 if (((tmp ^ (tmp + len - 1UL)) >> IO_PAGE_SHIFT) != 0UL) {
511 pteval = (tmp + IO_PAGE_SIZE) & IO_PAGE_MASK;
512 offset = 0UL;
513 len -= (IO_PAGE_SIZE - (tmp & (IO_PAGE_SIZE - 1UL)));
514 break;
515 }
516 sg = sg_next(sg);
517 nelems--;
518 }
519
520 pteval = iopte_protection | (pteval & IOPTE_PAGE);
521 while (len > 0) {
522 *iopte++ = __iopte(pteval);
523 pteval += IO_PAGE_SIZE;
524 len -= (IO_PAGE_SIZE - offset);
525 offset = 0;
526 dma_npages--;
527 }
528
529 pteval = (pteval & IOPTE_PAGE) + len;
530 sg = sg_next(sg);
531 nelems--;
532
533 /* Skip over any tail mappings we've fully mapped,
534 * adjusting pteval along the way. Stop when we
535 * detect a page crossing event.
536 */
537 while (nelems &&
538 (pteval << (64 - IO_PAGE_SHIFT)) != 0UL &&
539 (pteval == SG_ENT_PHYS_ADDRESS(sg)) &&
540 ((pteval ^
541 (SG_ENT_PHYS_ADDRESS(sg) + sg->length - 1UL)) >> IO_PAGE_SHIFT) == 0UL) {
542 pteval += sg->length;
543 sg = sg_next(sg);
544 nelems--;
545 }
546 if ((pteval << (64 - IO_PAGE_SHIFT)) == 0UL)
547 pteval = ~0UL;
548 } while (dma_npages != 0);
549 dma_sg = sg_next(dma_sg);
550 }
551}
552
553static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist, 475static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist,
554 int nelems, enum dma_data_direction direction) 476 int nelems, enum dma_data_direction direction)
555{ 477{
556 struct iommu *iommu; 478 unsigned long flags, ctx, i, npages, iopte_protection;
479 struct scatterlist *sg;
557 struct strbuf *strbuf; 480 struct strbuf *strbuf;
558 unsigned long flags, ctx, npages, iopte_protection; 481 struct iommu *iommu;
559 iopte_t *base; 482 iopte_t *base;
560 u32 dma_base; 483 u32 dma_base;
561 struct scatterlist *sgtmp;
562 int used;
563 484
564 /* Fast path single entry scatterlists. */ 485 /* Fast path single entry scatterlists. */
565 if (nelems == 1) { 486 if (nelems == 1) {
@@ -578,11 +499,7 @@ static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist,
578 if (unlikely(direction == DMA_NONE)) 499 if (unlikely(direction == DMA_NONE))
579 goto bad_no_ctx; 500 goto bad_no_ctx;
580 501
581 /* Step 1: Prepare scatter list. */ 502 npages = calc_npages(sglist, nelems);
582
583 npages = prepare_sg(dev, sglist, nelems);
584
585 /* Step 2: Allocate a cluster and context, if necessary. */
586 503
587 spin_lock_irqsave(&iommu->lock, flags); 504 spin_lock_irqsave(&iommu->lock, flags);
588 505
@@ -599,18 +516,6 @@ static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist,
599 dma_base = iommu->page_table_map_base + 516 dma_base = iommu->page_table_map_base +
600 ((base - iommu->page_table) << IO_PAGE_SHIFT); 517 ((base - iommu->page_table) << IO_PAGE_SHIFT);
601 518
602 /* Step 3: Normalize DMA addresses. */
603 used = nelems;
604
605 sgtmp = sglist;
606 while (used && sgtmp->dma_length) {
607 sgtmp->dma_address += dma_base;
608 sgtmp = sg_next(sgtmp);
609 used--;
610 }
611 used = nelems - used;
612
613 /* Step 4: Create the mappings. */
614 if (strbuf->strbuf_enabled) 519 if (strbuf->strbuf_enabled)
615 iopte_protection = IOPTE_STREAMING(ctx); 520 iopte_protection = IOPTE_STREAMING(ctx);
616 else 521 else
@@ -618,13 +523,27 @@ static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist,
618 if (direction != DMA_TO_DEVICE) 523 if (direction != DMA_TO_DEVICE)
619 iopte_protection |= IOPTE_WRITE; 524 iopte_protection |= IOPTE_WRITE;
620 525
621 fill_sg(base, sglist, used, nelems, iopte_protection); 526 for_each_sg(sglist, sg, nelems, i) {
527 unsigned long paddr = SG_ENT_PHYS_ADDRESS(sg);
528 unsigned long slen = sg->length;
529 unsigned long this_npages;
622 530
623#ifdef VERIFY_SG 531 this_npages = iommu_num_pages(paddr, slen);
624 verify_sglist(sglist, nelems, base, npages);
625#endif
626 532
627 return used; 533 sg->dma_address = dma_base | (paddr & ~IO_PAGE_MASK);
534 sg->dma_length = slen;
535
536 paddr &= IO_PAGE_MASK;
537 while (this_npages--) {
538 iopte_val(*base) = iopte_protection | paddr;
539
540 base++;
541 paddr += IO_PAGE_SIZE;
542 dma_base += IO_PAGE_SIZE;
543 }
544 }
545
546 return nelems;
628 547
629bad: 548bad:
630 iommu_free_ctx(iommu, ctx); 549 iommu_free_ctx(iommu, ctx);
@@ -637,11 +556,10 @@ bad_no_ctx:
637static void dma_4u_unmap_sg(struct device *dev, struct scatterlist *sglist, 556static void dma_4u_unmap_sg(struct device *dev, struct scatterlist *sglist,
638 int nelems, enum dma_data_direction direction) 557 int nelems, enum dma_data_direction direction)
639{ 558{
640 struct iommu *iommu; 559 unsigned long flags, ctx, i, npages;
641 struct strbuf *strbuf; 560 struct strbuf *strbuf;
561 struct iommu *iommu;
642 iopte_t *base; 562 iopte_t *base;
643 unsigned long flags, ctx, i, npages;
644 struct scatterlist *sg, *sgprv;
645 u32 bus_addr; 563 u32 bus_addr;
646 564
647 if (unlikely(direction == DMA_NONE)) { 565 if (unlikely(direction == DMA_NONE)) {
@@ -654,15 +572,7 @@ static void dma_4u_unmap_sg(struct device *dev, struct scatterlist *sglist,
654 572
655 bus_addr = sglist->dma_address & IO_PAGE_MASK; 573 bus_addr = sglist->dma_address & IO_PAGE_MASK;
656 574
657 sgprv = NULL; 575 npages = calc_npages(sglist, nelems);
658 for_each_sg(sglist, sg, nelems, i) {
659 if (sg->dma_length == 0)
660 break;
661 sgprv = sg;
662 }
663
664 npages = (IO_PAGE_ALIGN(sgprv->dma_address + sgprv->dma_length) -
665 bus_addr) >> IO_PAGE_SHIFT;
666 576
667 base = iommu->page_table + 577 base = iommu->page_table +
668 ((bus_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT); 578 ((bus_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT);
diff --git a/arch/sparc64/kernel/iommu_common.c b/arch/sparc64/kernel/iommu_common.c
deleted file mode 100644
index 72a4acfe8c7b..000000000000
--- a/arch/sparc64/kernel/iommu_common.c
+++ /dev/null
@@ -1,248 +0,0 @@
1/* $Id: iommu_common.c,v 1.9 2001/12/17 07:05:09 davem Exp $
2 * iommu_common.c: UltraSparc SBUS/PCI common iommu code.
3 *
4 * Copyright (C) 1999 David S. Miller (davem@redhat.com)
5 */
6
7#include <linux/dma-mapping.h>
8#include "iommu_common.h"
9
10/* You are _strongly_ advised to enable the following debugging code
11 * any time you make changes to the sg code below, run it for a while
12 * with filesystems mounted read-only before buying the farm... -DaveM
13 */
14
15#ifdef VERIFY_SG
16static int verify_lengths(struct scatterlist *sglist, int nents, int npages)
17{
18 int sg_len, dma_len;
19 int i, pgcount;
20 struct scatterlist *sg;
21
22 sg_len = 0;
23 for_each_sg(sglist, sg, nents, i)
24 sg_len += sg->length;
25
26 dma_len = 0;
27 for_each_sg(sglist, sg, nents, i) {
28 if (!sg->dma_length)
29 break;
30 dma_len += sg->dma_length;
31 }
32
33 if (sg_len != dma_len) {
34 printk("verify_lengths: Error, different, sg[%d] dma[%d]\n",
35 sg_len, dma_len);
36 return -1;
37 }
38
39 pgcount = 0;
40 for_each_sg(sglist, sg, nents, i) {
41 unsigned long start, end;
42
43 if (!sg->dma_length)
44 break;
45
46 start = sg->dma_address;
47 start = start & IO_PAGE_MASK;
48
49 end = sg->dma_address + sg->dma_length;
50 end = (end + (IO_PAGE_SIZE - 1)) & IO_PAGE_MASK;
51
52 pgcount += ((end - start) >> IO_PAGE_SHIFT);
53 }
54
55 if (pgcount != npages) {
56 printk("verify_lengths: Error, page count wrong, "
57 "npages[%d] pgcount[%d]\n",
58 npages, pgcount);
59 return -1;
60 }
61
62 /* This test passes... */
63 return 0;
64}
65
66static int verify_one_map(struct scatterlist *dma_sg, struct scatterlist **__sg, int nents, iopte_t **__iopte)
67{
68 struct scatterlist *sg = *__sg;
69 iopte_t *iopte = *__iopte;
70 u32 dlen = dma_sg->dma_length;
71 u32 daddr;
72 unsigned int sglen;
73 unsigned long sgaddr;
74
75 daddr = dma_sg->dma_address;
76 sglen = sg->length;
77 sgaddr = (unsigned long) sg_virt(sg);
78 while (dlen > 0) {
79 unsigned long paddr;
80
81 /* SG and DMA_SG must begin at the same sub-page boundary. */
82 if ((sgaddr & ~IO_PAGE_MASK) != (daddr & ~IO_PAGE_MASK)) {
83 printk("verify_one_map: Wrong start offset "
84 "sg[%08lx] dma[%08x]\n",
85 sgaddr, daddr);
86 nents = -1;
87 goto out;
88 }
89
90 /* Verify the IOPTE points to the right page. */
91 paddr = iopte_val(*iopte) & IOPTE_PAGE;
92 if ((paddr + PAGE_OFFSET) != (sgaddr & IO_PAGE_MASK)) {
93 printk("verify_one_map: IOPTE[%08lx] maps the "
94 "wrong page, should be [%08lx]\n",
95 iopte_val(*iopte), (sgaddr & IO_PAGE_MASK) - PAGE_OFFSET);
96 nents = -1;
97 goto out;
98 }
99
100 /* If this SG crosses a page, adjust to that next page
101 * boundary and loop.
102 */
103 if ((sgaddr & IO_PAGE_MASK) ^ ((sgaddr + sglen - 1) & IO_PAGE_MASK)) {
104 unsigned long next_page, diff;
105
106 next_page = (sgaddr + IO_PAGE_SIZE) & IO_PAGE_MASK;
107 diff = next_page - sgaddr;
108 sgaddr += diff;
109 daddr += diff;
110 sglen -= diff;
111 dlen -= diff;
112 if (dlen > 0)
113 iopte++;
114 continue;
115 }
116
117 /* SG wholly consumed within this page. */
118 daddr += sglen;
119 dlen -= sglen;
120
121 if (dlen > 0 && ((daddr & ~IO_PAGE_MASK) == 0))
122 iopte++;
123
124 sg = sg_next(sg);
125 if (--nents <= 0)
126 break;
127 sgaddr = (unsigned long) sg_virt(sg);
128 sglen = sg->length;
129 }
130 if (dlen < 0) {
131 /* Transfer overrun, big problems. */
132 printk("verify_one_map: Transfer overrun by %d bytes.\n",
133 -dlen);
134 nents = -1;
135 } else {
136 /* Advance to next dma_sg implies that the next iopte will
137 * begin it.
138 */
139 iopte++;
140 }
141
142out:
143 *__sg = sg;
144 *__iopte = iopte;
145 return nents;
146}
147
148static int verify_maps(struct scatterlist *sg, int nents, iopte_t *iopte)
149{
150 struct scatterlist *dma_sg = sg;
151 struct scatterlist *orig_dma_sg = dma_sg;
152 int orig_nents = nents;
153
154 for (;;) {
155 nents = verify_one_map(dma_sg, &sg, nents, &iopte);
156 if (nents <= 0)
157 break;
158 dma_sg = sg_next(dma_sg);
159 if (dma_sg->dma_length == 0)
160 break;
161 }
162
163 if (nents > 0) {
164 printk("verify_maps: dma maps consumed by some sgs remain (%d)\n",
165 nents);
166 return -1;
167 }
168
169 if (nents < 0) {
170 printk("verify_maps: Error, messed up mappings, "
171 "at sg %d dma_sg %d\n",
172 (int) (orig_nents + nents), (int) (dma_sg - orig_dma_sg));
173 return -1;
174 }
175
176 /* This test passes... */
177 return 0;
178}
179
180void verify_sglist(struct scatterlist *sglist, int nents, iopte_t *iopte, int npages)
181{
182 struct scatterlist *sg;
183
184 if (verify_lengths(sglist, nents, npages) < 0 ||
185 verify_maps(sglist, nents, iopte) < 0) {
186 int i;
187
188 printk("verify_sglist: Crap, messed up mappings, dumping, iodma at ");
189 printk("%016lx.\n", sglist->dma_address & IO_PAGE_MASK);
190
191 for_each_sg(sglist, sg, nents, i) {
192 printk("sg(%d): page_addr(%p) off(%x) length(%x) "
193 "dma_address[%016x] dma_length[%016x]\n",
194 i,
195 page_address(sg_page(sg)), sg->offset,
196 sg->length,
197 sg->dma_address, sg->dma_length);
198 }
199 }
200
201 /* Seems to be ok */
202}
203#endif
204
205unsigned long prepare_sg(struct device *dev, struct scatterlist *sg, int nents)
206{
207 struct scatterlist *dma_sg = sg;
208 unsigned long prev;
209 u32 dent_addr, dent_len;
210 unsigned int max_seg_size;
211
212 prev = (unsigned long) sg_virt(sg);
213 prev += (unsigned long) (dent_len = sg->length);
214 dent_addr = (u32) ((unsigned long)(sg_virt(sg)) & (IO_PAGE_SIZE - 1UL));
215 max_seg_size = dma_get_max_seg_size(dev);
216 while (--nents) {
217 unsigned long addr;
218
219 sg = sg_next(sg);
220 addr = (unsigned long) sg_virt(sg);
221 if (! VCONTIG(prev, addr) ||
222 dent_len + sg->length > max_seg_size) {
223 dma_sg->dma_address = dent_addr;
224 dma_sg->dma_length = dent_len;
225 dma_sg = sg_next(dma_sg);
226
227 dent_addr = ((dent_addr +
228 dent_len +
229 (IO_PAGE_SIZE - 1UL)) >> IO_PAGE_SHIFT);
230 dent_addr <<= IO_PAGE_SHIFT;
231 dent_addr += addr & (IO_PAGE_SIZE - 1UL);
232 dent_len = 0;
233 }
234 dent_len += sg->length;
235 prev = addr + sg->length;
236 }
237 dma_sg->dma_address = dent_addr;
238 dma_sg->dma_length = dent_len;
239
240 if (dma_sg != sg) {
241 dma_sg = sg_next(dma_sg);
242 dma_sg->dma_length = 0;
243 }
244
245 return ((unsigned long) dent_addr +
246 (unsigned long) dent_len +
247 (IO_PAGE_SIZE - 1UL)) >> IO_PAGE_SHIFT;
248}
diff --git a/arch/sparc64/kernel/iommu_common.h b/arch/sparc64/kernel/iommu_common.h
index a90d046e8024..4b5cafa2877a 100644
--- a/arch/sparc64/kernel/iommu_common.h
+++ b/arch/sparc64/kernel/iommu_common.h
@@ -30,6 +30,32 @@
30 */ 30 */
31#define IOMMU_PAGE_SHIFT 13 31#define IOMMU_PAGE_SHIFT 13
32 32
33#define SG_ENT_PHYS_ADDRESS(SG) (__pa(sg_virt((SG))))
34
35static inline unsigned long iommu_num_pages(unsigned long vaddr,
36 unsigned long slen)
37{
38 unsigned long npages;
39
40 npages = IO_PAGE_ALIGN(vaddr + slen) - (vaddr & IO_PAGE_MASK);
41 npages >>= IO_PAGE_SHIFT;
42
43 return npages;
44}
45
46static inline unsigned long calc_npages(struct scatterlist *sglist, int nelems)
47{
48 unsigned long i, npages = 0;
49 struct scatterlist *sg;
50
51 for_each_sg(sglist, sg, nelems, i) {
52 unsigned long paddr = SG_ENT_PHYS_ADDRESS(sg);
53 npages += iommu_num_pages(paddr, sg->length);
54 }
55
56 return npages;
57}
58
33/* You are _strongly_ advised to enable the following debugging code 59/* You are _strongly_ advised to enable the following debugging code
34 * any time you make changes to the sg code below, run it for a while 60 * any time you make changes to the sg code below, run it for a while
35 * with filesystems mounted read-only before buying the farm... -DaveM 61 * with filesystems mounted read-only before buying the farm... -DaveM
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c
index 5ea2eab1ccda..61baf8dc095e 100644
--- a/arch/sparc64/kernel/pci_sun4v.c
+++ b/arch/sparc64/kernel/pci_sun4v.c
@@ -365,113 +365,14 @@ static void dma_4v_unmap_single(struct device *dev, dma_addr_t bus_addr,
365 spin_unlock_irqrestore(&iommu->lock, flags); 365 spin_unlock_irqrestore(&iommu->lock, flags);
366} 366}
367 367
368#define SG_ENT_PHYS_ADDRESS(SG) (__pa(sg_virt((SG))))
369
370static long fill_sg(long entry, struct device *dev,
371 struct scatterlist *sg,
372 int nused, int nelems, unsigned long prot)
373{
374 struct scatterlist *dma_sg = sg;
375 unsigned long flags;
376 int i;
377
378 local_irq_save(flags);
379
380 iommu_batch_start(dev, prot, entry);
381
382 for (i = 0; i < nused; i++) {
383 unsigned long pteval = ~0UL;
384 u32 dma_npages;
385
386 dma_npages = ((dma_sg->dma_address & (IO_PAGE_SIZE - 1UL)) +
387 dma_sg->dma_length +
388 ((IO_PAGE_SIZE - 1UL))) >> IO_PAGE_SHIFT;
389 do {
390 unsigned long offset;
391 signed int len;
392
393 /* If we are here, we know we have at least one
394 * more page to map. So walk forward until we
395 * hit a page crossing, and begin creating new
396 * mappings from that spot.
397 */
398 for (;;) {
399 unsigned long tmp;
400
401 tmp = SG_ENT_PHYS_ADDRESS(sg);
402 len = sg->length;
403 if (((tmp ^ pteval) >> IO_PAGE_SHIFT) != 0UL) {
404 pteval = tmp & IO_PAGE_MASK;
405 offset = tmp & (IO_PAGE_SIZE - 1UL);
406 break;
407 }
408 if (((tmp ^ (tmp + len - 1UL)) >> IO_PAGE_SHIFT) != 0UL) {
409 pteval = (tmp + IO_PAGE_SIZE) & IO_PAGE_MASK;
410 offset = 0UL;
411 len -= (IO_PAGE_SIZE - (tmp & (IO_PAGE_SIZE - 1UL)));
412 break;
413 }
414 sg = sg_next(sg);
415 nelems--;
416 }
417
418 pteval = (pteval & IOPTE_PAGE);
419 while (len > 0) {
420 long err;
421
422 err = iommu_batch_add(pteval);
423 if (unlikely(err < 0L))
424 goto iommu_map_failed;
425
426 pteval += IO_PAGE_SIZE;
427 len -= (IO_PAGE_SIZE - offset);
428 offset = 0;
429 dma_npages--;
430 }
431
432 pteval = (pteval & IOPTE_PAGE) + len;
433 sg = sg_next(sg);
434 nelems--;
435
436 /* Skip over any tail mappings we've fully mapped,
437 * adjusting pteval along the way. Stop when we
438 * detect a page crossing event.
439 */
440 while (nelems &&
441 (pteval << (64 - IO_PAGE_SHIFT)) != 0UL &&
442 (pteval == SG_ENT_PHYS_ADDRESS(sg)) &&
443 ((pteval ^
444 (SG_ENT_PHYS_ADDRESS(sg) + sg->length - 1UL)) >> IO_PAGE_SHIFT) == 0UL) {
445 pteval += sg->length;
446 sg = sg_next(sg);
447 nelems--;
448 }
449 if ((pteval << (64 - IO_PAGE_SHIFT)) == 0UL)
450 pteval = ~0UL;
451 } while (dma_npages != 0);
452 dma_sg = sg_next(dma_sg);
453 }
454
455 if (unlikely(iommu_batch_end() < 0L))
456 goto iommu_map_failed;
457
458 local_irq_restore(flags);
459 return 0;
460
461iommu_map_failed:
462 local_irq_restore(flags);
463 return -1L;
464}
465
466static int dma_4v_map_sg(struct device *dev, struct scatterlist *sglist, 368static int dma_4v_map_sg(struct device *dev, struct scatterlist *sglist,
467 int nelems, enum dma_data_direction direction) 369 int nelems, enum dma_data_direction direction)
468{ 370{
371 unsigned long flags, npages, i, prot;
372 struct scatterlist *sg;
469 struct iommu *iommu; 373 struct iommu *iommu;
470 unsigned long flags, npages, prot;
471 u32 dma_base;
472 struct scatterlist *sgtmp;
473 long entry, err; 374 long entry, err;
474 int used; 375 u32 dma_base;
475 376
476 /* Fast path single entry scatterlists. */ 377 /* Fast path single entry scatterlists. */
477 if (nelems == 1) { 378 if (nelems == 1) {
@@ -489,10 +390,8 @@ static int dma_4v_map_sg(struct device *dev, struct scatterlist *sglist,
489 if (unlikely(direction == DMA_NONE)) 390 if (unlikely(direction == DMA_NONE))
490 goto bad; 391 goto bad;
491 392
492 /* Step 1: Prepare scatter list. */ 393 npages = calc_npages(sglist, nelems);
493 npages = prepare_sg(dev, sglist, nelems);
494 394
495 /* Step 2: Allocate a cluster and context, if necessary. */
496 spin_lock_irqsave(&iommu->lock, flags); 395 spin_lock_irqsave(&iommu->lock, flags);
497 entry = arena_alloc(&iommu->arena, npages); 396 entry = arena_alloc(&iommu->arena, npages);
498 spin_unlock_irqrestore(&iommu->lock, flags); 397 spin_unlock_irqrestore(&iommu->lock, flags);
@@ -503,27 +402,45 @@ static int dma_4v_map_sg(struct device *dev, struct scatterlist *sglist,
503 dma_base = iommu->page_table_map_base + 402 dma_base = iommu->page_table_map_base +
504 (entry << IO_PAGE_SHIFT); 403 (entry << IO_PAGE_SHIFT);
505 404
506 /* Step 3: Normalize DMA addresses. */
507 used = nelems;
508
509 sgtmp = sglist;
510 while (used && sgtmp->dma_length) {
511 sgtmp->dma_address += dma_base;
512 sgtmp = sg_next(sgtmp);
513 used--;
514 }
515 used = nelems - used;
516
517 /* Step 4: Create the mappings. */
518 prot = HV_PCI_MAP_ATTR_READ; 405 prot = HV_PCI_MAP_ATTR_READ;
519 if (direction != DMA_TO_DEVICE) 406 if (direction != DMA_TO_DEVICE)
520 prot |= HV_PCI_MAP_ATTR_WRITE; 407 prot |= HV_PCI_MAP_ATTR_WRITE;
521 408
522 err = fill_sg(entry, dev, sglist, used, nelems, prot); 409 local_irq_save(flags);
410
411 iommu_batch_start(dev, prot, entry);
412
413 for_each_sg(sglist, sg, nelems, i) {
414 unsigned long paddr = SG_ENT_PHYS_ADDRESS(sg);
415 unsigned long slen = sg->length;
416 unsigned long this_npages;
417
418 this_npages = iommu_num_pages(paddr, slen);
419
420 sg->dma_address = dma_base | (paddr & ~IO_PAGE_MASK);
421 sg->dma_length = slen;
422
423 paddr &= IO_PAGE_MASK;
424 while (this_npages--) {
425 err = iommu_batch_add(paddr);
426 if (unlikely(err < 0L)) {
427 local_irq_restore(flags);
428 goto iommu_map_failed;
429 }
430
431 paddr += IO_PAGE_SIZE;
432 dma_base += IO_PAGE_SIZE;
433 }
434 }
435
436 err = iommu_batch_end();
437
438 local_irq_restore(flags);
439
523 if (unlikely(err < 0L)) 440 if (unlikely(err < 0L))
524 goto iommu_map_failed; 441 goto iommu_map_failed;
525 442
526 return used; 443 return nelems;
527 444
528bad: 445bad:
529 if (printk_ratelimit()) 446 if (printk_ratelimit())
@@ -541,12 +458,11 @@ iommu_map_failed:
541static void dma_4v_unmap_sg(struct device *dev, struct scatterlist *sglist, 458static void dma_4v_unmap_sg(struct device *dev, struct scatterlist *sglist,
542 int nelems, enum dma_data_direction direction) 459 int nelems, enum dma_data_direction direction)
543{ 460{
461 unsigned long flags, npages;
544 struct pci_pbm_info *pbm; 462 struct pci_pbm_info *pbm;
463 u32 devhandle, bus_addr;
545 struct iommu *iommu; 464 struct iommu *iommu;
546 unsigned long flags, i, npages;
547 struct scatterlist *sg, *sgprv;
548 long entry; 465 long entry;
549 u32 devhandle, bus_addr;
550 466
551 if (unlikely(direction == DMA_NONE)) { 467 if (unlikely(direction == DMA_NONE)) {
552 if (printk_ratelimit()) 468 if (printk_ratelimit())
@@ -558,16 +474,8 @@ static void dma_4v_unmap_sg(struct device *dev, struct scatterlist *sglist,
558 devhandle = pbm->devhandle; 474 devhandle = pbm->devhandle;
559 475
560 bus_addr = sglist->dma_address & IO_PAGE_MASK; 476 bus_addr = sglist->dma_address & IO_PAGE_MASK;
561 sgprv = NULL;
562 for_each_sg(sglist, sg, nelems, i) {
563 if (sg->dma_length == 0)
564 break;
565
566 sgprv = sg;
567 }
568 477
569 npages = (IO_PAGE_ALIGN(sgprv->dma_address + sgprv->dma_length) - 478 npages = calc_npages(sglist, nelems);
570 bus_addr) >> IO_PAGE_SHIFT;
571 479
572 entry = ((bus_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT); 480 entry = ((bus_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT);
573 481
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index c39944927f1a..a8052b76df41 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -46,8 +46,6 @@
46#include <asm/ldc.h> 46#include <asm/ldc.h>
47#include <asm/hypervisor.h> 47#include <asm/hypervisor.h>
48 48
49extern void calibrate_delay(void);
50
51int sparc64_multi_core __read_mostly; 49int sparc64_multi_core __read_mostly;
52 50
53cpumask_t cpu_possible_map __read_mostly = CPU_MASK_NONE; 51cpumask_t cpu_possible_map __read_mostly = CPU_MASK_NONE;
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index 60765e314bd8..8649635d6d74 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -277,6 +277,7 @@ EXPORT_SYMBOL(sys_getpid);
277EXPORT_SYMBOL(sys_geteuid); 277EXPORT_SYMBOL(sys_geteuid);
278EXPORT_SYMBOL(sys_getuid); 278EXPORT_SYMBOL(sys_getuid);
279EXPORT_SYMBOL(sys_getegid); 279EXPORT_SYMBOL(sys_getegid);
280EXPORT_SYMBOL(sysctl_nr_open);
280EXPORT_SYMBOL(sys_getgid); 281EXPORT_SYMBOL(sys_getgid);
281EXPORT_SYMBOL(svr4_getcontext); 282EXPORT_SYMBOL(svr4_getcontext);
282EXPORT_SYMBOL(svr4_setcontext); 283EXPORT_SYMBOL(svr4_setcontext);
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
index b8058906e727..adc62f490f36 100644
--- a/arch/sparc64/kernel/systbls.S
+++ b/arch/sparc64/kernel/systbls.S
@@ -80,7 +80,8 @@ sys_call_table32:
80 .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare 80 .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare
81/*300*/ .word compat_sys_set_robust_list, compat_sys_get_robust_list, compat_sys_migrate_pages, compat_sys_mbind, compat_sys_get_mempolicy 81/*300*/ .word compat_sys_set_robust_list, compat_sys_get_robust_list, compat_sys_migrate_pages, compat_sys_mbind, compat_sys_get_mempolicy
82 .word compat_sys_set_mempolicy, compat_sys_kexec_load, compat_sys_move_pages, sys_getcpu, compat_sys_epoll_pwait 82 .word compat_sys_set_mempolicy, compat_sys_kexec_load, compat_sys_move_pages, sys_getcpu, compat_sys_epoll_pwait
83/*310*/ .word compat_sys_utimensat, compat_sys_signalfd, sys_ni_syscall, sys_eventfd, compat_sys_fallocate 83/*310*/ .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate
84 .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime
84 85
85#endif /* CONFIG_COMPAT */ 86#endif /* CONFIG_COMPAT */
86 87
@@ -152,7 +153,8 @@ sys_call_table:
152 .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare 153 .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare
153/*300*/ .word sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy 154/*300*/ .word sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy
154 .word sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait 155 .word sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
155/*310*/ .word sys_utimensat, sys_signalfd, sys_ni_syscall, sys_eventfd, sys_fallocate 156/*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate
157 .word sys_timerfd_settime, sys_timerfd_gettime
156 158
157#if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ 159#if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \
158 defined(CONFIG_SOLARIS_EMUL_MODULE) 160 defined(CONFIG_SOLARIS_EMUL_MODULE)
@@ -271,6 +273,7 @@ sunos_sys_table:
271 .word sunos_nosys, sunos_nosys, sunos_nosys 273 .word sunos_nosys, sunos_nosys, sunos_nosys
272 .word sunos_nosys 274 .word sunos_nosys
273/*310*/ .word sunos_nosys, sunos_nosys, sunos_nosys 275/*310*/ .word sunos_nosys, sunos_nosys, sunos_nosys
274 .word sunos_nosys, sunos_nosys 276 .word sunos_nosys, sunos_nosys, sunos_nosys
277 .word sunos_nosys
275 278
276#endif 279#endif
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 4352ee4d8dac..d204f1ab1d4c 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -1707,6 +1707,11 @@ static void __exit rtc_mini_exit(void)
1707 misc_deregister(&rtc_mini_dev); 1707 misc_deregister(&rtc_mini_dev);
1708} 1708}
1709 1709
1710int __devinit read_current_timer(unsigned long *timer_val)
1711{
1712 *timer_val = tick_ops->get_tick();
1713 return 0;
1714}
1710 1715
1711module_init(rtc_mini_init); 1716module_init(rtc_mini_init);
1712module_exit(rtc_mini_exit); 1717module_exit(rtc_mini_exit);
diff --git a/arch/sparc64/solaris/fs.c b/arch/sparc64/solaris/fs.c
index 61be597bf430..9311bfe4f2f7 100644
--- a/arch/sparc64/solaris/fs.c
+++ b/arch/sparc64/solaris/fs.c
@@ -624,7 +624,7 @@ asmlinkage int solaris_ulimit(int cmd, int val)
624 case 3: /* UL_GMEMLIM */ 624 case 3: /* UL_GMEMLIM */
625 return current->signal->rlim[RLIMIT_DATA].rlim_cur; 625 return current->signal->rlim[RLIMIT_DATA].rlim_cur;
626 case 4: /* UL_GDESLIM */ 626 case 4: /* UL_GDESLIM */
627 return NR_OPEN; 627 return sysctl_nr_open;
628 } 628 }
629 return -EINVAL; 629 return -EINVAL;
630} 630}
diff --git a/arch/sparc64/solaris/timod.c b/arch/sparc64/solaris/timod.c
index a9d32ceabf26..f53123c02c2b 100644
--- a/arch/sparc64/solaris/timod.c
+++ b/arch/sparc64/solaris/timod.c
@@ -859,7 +859,8 @@ asmlinkage int solaris_getmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3)
859 859
860 SOLD("entry"); 860 SOLD("entry");
861 lock_kernel(); 861 lock_kernel();
862 if(fd >= NR_OPEN) goto out; 862 if (fd >= sysctl_nr_open)
863 goto out;
863 864
864 fdt = files_fdtable(current->files); 865 fdt = files_fdtable(current->files);
865 filp = fdt->fd[fd]; 866 filp = fdt->fd[fd];
@@ -927,7 +928,8 @@ asmlinkage int solaris_putmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3)
927 928
928 SOLD("entry"); 929 SOLD("entry");
929 lock_kernel(); 930 lock_kernel();
930 if(fd >= NR_OPEN) goto out; 931 if (fd >= sysctl_nr_open)
932 goto out;
931 933
932 fdt = files_fdtable(current->files); 934 fdt = files_fdtable(current->files);
933 filp = fdt->fd[fd]; 935 filp = fdt->fd[fd];
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 434821187cfc..e6728bd61cc1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -415,7 +415,7 @@ config HPET_TIMER
415 415
416config HPET_EMULATE_RTC 416config HPET_EMULATE_RTC
417 def_bool y 417 def_bool y
418 depends on HPET_TIMER && (RTC=y || RTC=m) 418 depends on HPET_TIMER && (RTC=y || RTC=m || RTC_DRV_CMOS=m || RTC_DRV_CMOS=y)
419 419
420# Mark as embedded because too many people got it wrong. 420# Mark as embedded because too many people got it wrong.
421# The code disables itself when not needed. 421# The code disables itself when not needed.
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index d9313d9adced..f86a3c4a2669 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -637,7 +637,7 @@ void __init early_cpu_init(void)
637} 637}
638 638
639/* Make sure %fs is initialized properly in idle threads */ 639/* Make sure %fs is initialized properly in idle threads */
640struct pt_regs * __devinit idle_regs(struct pt_regs *regs) 640struct pt_regs * __cpuinit idle_regs(struct pt_regs *regs)
641{ 641{
642 memset(regs, 0, sizeof(struct pt_regs)); 642 memset(regs, 0, sizeof(struct pt_regs));
643 regs->fs = __KERNEL_PERCPU; 643 regs->fs = __KERNEL_PERCPU;
diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c
index 404a6a2d4016..7139b0262703 100644
--- a/arch/x86/kernel/cpu/cyrix.c
+++ b/arch/x86/kernel/cpu/cyrix.c
@@ -83,8 +83,6 @@ static char cyrix_model_mult2[] __cpuinitdata = "12233445";
83 * FIXME: our newer udelay uses the tsc. We don't need to frob with SLOP 83 * FIXME: our newer udelay uses the tsc. We don't need to frob with SLOP
84 */ 84 */
85 85
86extern void calibrate_delay(void) __init;
87
88static void __cpuinit check_cx686_slop(struct cpuinfo_x86 *c) 86static void __cpuinit check_cx686_slop(struct cpuinfo_x86 *c)
89{ 87{
90 unsigned long flags; 88 unsigned long flags;
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c
index 5787a0c3e296..579b9b740c7c 100644
--- a/arch/x86/kernel/smpboot_32.c
+++ b/arch/x86/kernel/smpboot_32.c
@@ -202,8 +202,6 @@ valid_k7:
202 ; 202 ;
203} 203}
204 204
205extern void calibrate_delay(void);
206
207static atomic_t init_deasserted; 205static atomic_t init_deasserted;
208 206
209static void __cpuinit smp_callin(void) 207static void __cpuinit smp_callin(void)
diff --git a/arch/x86/lib/delay_32.c b/arch/x86/lib/delay_32.c
index aad9d95469dc..4535e6d147ad 100644
--- a/arch/x86/lib/delay_32.c
+++ b/arch/x86/lib/delay_32.c
@@ -12,8 +12,10 @@
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/sched.h> 14#include <linux/sched.h>
15#include <linux/timex.h>
15#include <linux/preempt.h> 16#include <linux/preempt.h>
16#include <linux/delay.h> 17#include <linux/delay.h>
18#include <linux/init.h>
17 19
18#include <asm/processor.h> 20#include <asm/processor.h>
19#include <asm/delay.h> 21#include <asm/delay.h>
@@ -63,7 +65,7 @@ void use_tsc_delay(void)
63 delay_fn = delay_tsc; 65 delay_fn = delay_tsc;
64} 66}
65 67
66int read_current_timer(unsigned long *timer_val) 68int __devinit read_current_timer(unsigned long *timer_val)
67{ 69{
68 if (delay_fn == delay_tsc) { 70 if (delay_fn == delay_tsc) {
69 rdtscl(*timer_val); 71 rdtscl(*timer_val);
diff --git a/arch/x86/lib/delay_64.c b/arch/x86/lib/delay_64.c
index 45cdd3fbd91c..bbc610518516 100644
--- a/arch/x86/lib/delay_64.c
+++ b/arch/x86/lib/delay_64.c
@@ -10,8 +10,10 @@
10 10
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/sched.h> 12#include <linux/sched.h>
13#include <linux/timex.h>
13#include <linux/preempt.h> 14#include <linux/preempt.h>
14#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/init.h>
15 17
16#include <asm/delay.h> 18#include <asm/delay.h>
17#include <asm/msr.h> 19#include <asm/msr.h>
@@ -20,7 +22,7 @@
20#include <asm/smp.h> 22#include <asm/smp.h>
21#endif 23#endif
22 24
23int read_current_timer(unsigned long *timer_value) 25int __devinit read_current_timer(unsigned long *timer_value)
24{ 26{
25 rdtscll(*timer_value); 27 rdtscll(*timer_value);
26 return 0; 28 return 0;
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c
index dffa786f61fe..3cc8eb2f36a9 100644
--- a/arch/x86/mach-voyager/voyager_smp.c
+++ b/arch/x86/mach-voyager/voyager_smp.c
@@ -444,8 +444,6 @@ static __u32 __init setup_trampoline(void)
444static void __init start_secondary(void *unused) 444static void __init start_secondary(void *unused)
445{ 445{
446 __u8 cpuid = hard_smp_processor_id(); 446 __u8 cpuid = hard_smp_processor_id();
447 /* external functions not defined in the headers */
448 extern void calibrate_delay(void);
449 447
450 cpu_init(); 448 cpu_init();
451 449
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c
index 60d29fe0b1bd..8df1e842f6d4 100644
--- a/arch/xtensa/kernel/time.c
+++ b/arch/xtensa/kernel/time.c
@@ -204,7 +204,7 @@ again:
204} 204}
205 205
206#ifndef CONFIG_GENERIC_CALIBRATE_DELAY 206#ifndef CONFIG_GENERIC_CALIBRATE_DELAY
207void __devinit calibrate_delay(void) 207void __cpuinit calibrate_delay(void)
208{ 208{
209 loops_per_jiffy = CCOUNT_PER_JIFFY; 209 loops_per_jiffy = CCOUNT_PER_JIFFY;
210 printk("Calibrating delay loop (skipped)... " 210 printk("Calibrating delay loop (skipped)... "