aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-at91/gpio.c3
-rw-r--r--arch/arm/mach-sa1100/generic.c4
-rw-r--r--arch/avr32/mach-at32ap/pio.c4
-rw-r--r--arch/i386/defconfig43
-rw-r--r--arch/i386/kernel/apic.c143
-rw-r--r--arch/i386/kernel/i386_ksyms.c2
-rw-r--r--arch/i386/kernel/i8253.c10
-rw-r--r--arch/i386/kernel/nmi.c8
-rw-r--r--arch/i386/kernel/tsc.c9
-rw-r--r--arch/i386/kernel/vmi.c17
-rw-r--r--arch/ia64/Kconfig1
-rw-r--r--arch/ia64/kernel/crash.c2
-rw-r--r--arch/ia64/kernel/setup.c22
-rw-r--r--arch/ia64/mm/contig.c30
-rw-r--r--arch/ia64/mm/discontig.c4
-rw-r--r--arch/ia64/mm/init.c16
-rw-r--r--arch/ia64/sn/kernel/io_init.c12
-rw-r--r--arch/ia64/sn/kernel/setup.c6
-rw-r--r--arch/mips/Kconfig24
-rw-r--r--arch/mips/configs/atlas_defconfig1
-rw-r--r--arch/mips/configs/bigsur_defconfig1
-rw-r--r--arch/mips/configs/capcella_defconfig1
-rw-r--r--arch/mips/configs/cobalt_defconfig1
-rw-r--r--arch/mips/configs/db1000_defconfig1
-rw-r--r--arch/mips/configs/db1100_defconfig1
-rw-r--r--arch/mips/configs/db1200_defconfig1
-rw-r--r--arch/mips/configs/db1500_defconfig1
-rw-r--r--arch/mips/configs/db1550_defconfig1
-rw-r--r--arch/mips/configs/ddb5477_defconfig1
-rw-r--r--arch/mips/configs/decstation_defconfig1
-rw-r--r--arch/mips/configs/e55_defconfig1
-rw-r--r--arch/mips/configs/emma2rh_defconfig1
-rw-r--r--arch/mips/configs/ev64120_defconfig1
-rw-r--r--arch/mips/configs/excite_defconfig1
-rw-r--r--arch/mips/configs/ip22_defconfig1
-rw-r--r--arch/mips/configs/ip27_defconfig1
-rw-r--r--arch/mips/configs/ip32_defconfig1
-rw-r--r--arch/mips/configs/jaguar-atx_defconfig1
-rw-r--r--arch/mips/configs/jazz_defconfig1
-rw-r--r--arch/mips/configs/jmr3927_defconfig1
-rw-r--r--arch/mips/configs/lasat200_defconfig1
-rw-r--r--arch/mips/configs/malta_defconfig1
-rw-r--r--arch/mips/configs/mipssim_defconfig1
-rw-r--r--arch/mips/configs/mpc30x_defconfig1
-rw-r--r--arch/mips/configs/ocelot_3_defconfig1
-rw-r--r--arch/mips/configs/ocelot_c_defconfig1
-rw-r--r--arch/mips/configs/ocelot_defconfig1
-rw-r--r--arch/mips/configs/ocelot_g_defconfig1
-rw-r--r--arch/mips/configs/pb1100_defconfig1
-rw-r--r--arch/mips/configs/pb1500_defconfig1
-rw-r--r--arch/mips/configs/pb1550_defconfig1
-rw-r--r--arch/mips/configs/pnx8550-jbs_defconfig1
-rw-r--r--arch/mips/configs/pnx8550-stb810_defconfig1
-rw-r--r--arch/mips/configs/pnx8550-v2pci_defconfig1
-rw-r--r--arch/mips/configs/qemu_defconfig1
-rw-r--r--arch/mips/configs/rbhma4500_defconfig1
-rw-r--r--arch/mips/configs/rm200_defconfig1
-rw-r--r--arch/mips/configs/sb1250-swarm_defconfig1
-rw-r--r--arch/mips/configs/sead_defconfig1
-rw-r--r--arch/mips/configs/tb0226_defconfig1
-rw-r--r--arch/mips/configs/tb0229_defconfig1
-rw-r--r--arch/mips/configs/tb0287_defconfig1
-rw-r--r--arch/mips/configs/workpad_defconfig1
-rw-r--r--arch/mips/configs/wrppmc_defconfig1
-rw-r--r--arch/mips/configs/yosemite_defconfig1
-rw-r--r--arch/mips/ddb5xxx/ddb5477/irq.c2
-rw-r--r--arch/mips/defconfig1
-rw-r--r--arch/mips/emma2rh/markeins/irq.c2
-rw-r--r--arch/mips/gt64120/ev64120/irq.c2
-rw-r--r--arch/mips/gt64120/wrppmc/irq.c2
-rw-r--r--arch/mips/jazz/irq.c2
-rw-r--r--arch/mips/jazz/jazzdma.c3
-rw-r--r--arch/mips/kernel/genex.S16
-rw-r--r--arch/mips/kernel/kspd.c22
-rw-r--r--arch/mips/kernel/linux32.c12
-rw-r--r--arch/mips/kernel/r2300_switch.S10
-rw-r--r--arch/mips/kernel/r4k_fpu.S16
-rw-r--r--arch/mips/kernel/r4k_switch.S10
-rw-r--r--arch/mips/kernel/rtlx.c104
-rw-r--r--arch/mips/kernel/signal-common.h3
-rw-r--r--arch/mips/kernel/signal.c75
-rw-r--r--arch/mips/kernel/signal32.c56
-rw-r--r--arch/mips/kernel/signal_n32.c6
-rw-r--r--arch/mips/kernel/traps.c84
-rw-r--r--arch/mips/math-emu/kernel_linkage.c8
-rw-r--r--arch/mips/mips-boards/generic/init.c2
-rw-r--r--arch/mips/mm/c-r3k.c2
-rw-r--r--arch/mips/mm/cache.c16
-rw-r--r--arch/mips/mm/cerr-sb1.c9
-rw-r--r--arch/mips/mm/dma-default.c17
-rw-r--r--arch/mips/mm/init.c6
-rw-r--r--arch/mips/mm/pg-sb1.c3
-rw-r--r--arch/mips/momentum/ocelot_c/irq.c2
-rw-r--r--arch/mips/oprofile/op_model_mipsxx.c22
-rw-r--r--arch/mips/pci/pci-bcm1480.c2
-rw-r--r--arch/mips/pci/pci-sb1250.c2
-rw-r--r--arch/mips/philips/pnx8550/common/int.c21
-rw-r--r--arch/mips/qemu/q-smp.c7
-rw-r--r--arch/mips/sgi-ip22/ip22-int.c2
-rw-r--r--arch/mips/sgi-ip32/ip32-irq.c2
-rw-r--r--arch/mips/sibyte/bcm1480/smp.c6
-rw-r--r--arch/mips/sibyte/sb1250/irq.c2
-rw-r--r--arch/mips/sibyte/swarm/setup.c18
-rw-r--r--arch/mips/sni/pcimt.c2
-rw-r--r--arch/mips/sni/pcit.c4
-rw-r--r--arch/mips/tx4927/common/tx4927_irq.c2
-rw-r--r--arch/powerpc/kernel/process.c9
-rw-r--r--arch/powerpc/kernel/udbg_16550.c2
-rw-r--r--arch/powerpc/platforms/pasemi/iommu.c2
-rw-r--r--arch/powerpc/platforms/pseries/hvCall.S41
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c2
-rw-r--r--arch/powerpc/platforms/pseries/plpar_wrappers.h16
-rw-r--r--arch/s390/appldata/appldata_mem.c5
-rw-r--r--arch/s390/kernel/compat_wrapper.S17
-rw-r--r--arch/s390/kernel/debug.c2
-rw-r--r--arch/s390/kernel/early.c10
-rw-r--r--arch/s390/kernel/ipl.c9
-rw-r--r--arch/s390/kernel/syscalls.S3
-rw-r--r--arch/sh/drivers/pci/pci-auto.c6
-rw-r--r--arch/sh/kernel/cpu/init.c20
-rw-r--r--arch/sh/kernel/cpu/sh2/entry.S1
-rw-r--r--arch/sh/kernel/cpu/sh3/entry.S5
-rw-r--r--arch/sh/kernel/cpu/sh4/probe.c13
-rw-r--r--arch/sh/kernel/irq.c15
-rw-r--r--arch/sparc/kernel/systbls.S6
-rw-r--r--arch/sparc/mm/init.c2
-rw-r--r--arch/sparc64/Kconfig14
-rw-r--r--arch/sparc64/defconfig10
-rw-r--r--arch/sparc64/kernel/ktlb.S8
-rw-r--r--arch/sparc64/kernel/systbls.S9
-rw-r--r--arch/sparc64/kernel/tsb.S1
-rw-r--r--arch/sparc64/lib/NGbzero.S1
-rw-r--r--arch/sparc64/lib/NGmemcpy.S2
-rw-r--r--arch/sparc64/lib/NGpage.S2
-rw-r--r--arch/sparc64/mm/hugetlbpage.c3
-rw-r--r--arch/sparc64/mm/init.c30
-rw-r--r--arch/um/Kconfig2
-rw-r--r--arch/um/scripts/Makefile.rules4
-rw-r--r--arch/x86_64/defconfig53
-rw-r--r--arch/x86_64/ia32/ia32entry.S2
-rw-r--r--arch/x86_64/kernel/apic.c19
-rw-r--r--arch/x86_64/kernel/cpufreq/Kconfig1
-rw-r--r--arch/x86_64/kernel/e820.c2
-rw-r--r--arch/x86_64/kernel/early-quirks.c8
-rw-r--r--arch/x86_64/kernel/mpparse.c4
-rw-r--r--arch/x86_64/kernel/nmi.c5
-rw-r--r--arch/x86_64/kernel/pci-gart.c2
-rw-r--r--arch/x86_64/kernel/process.c13
-rw-r--r--arch/x86_64/kernel/vsyscall.c2
-rw-r--r--arch/x86_64/kernel/x8664_ksyms.c1
150 files changed, 851 insertions, 524 deletions
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index 44211a0af19a..ba4a1bb3ee40 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -215,13 +215,14 @@ int gpio_direction_input(unsigned pin)
215} 215}
216EXPORT_SYMBOL(gpio_direction_input); 216EXPORT_SYMBOL(gpio_direction_input);
217 217
218int gpio_direction_output(unsigned pin) 218int gpio_direction_output(unsigned pin, int value)
219{ 219{
220 void __iomem *pio = pin_to_controller(pin); 220 void __iomem *pio = pin_to_controller(pin);
221 unsigned mask = pin_to_mask(pin); 221 unsigned mask = pin_to_mask(pin);
222 222
223 if (!pio || !(__raw_readl(pio + PIO_PSR) & mask)) 223 if (!pio || !(__raw_readl(pio + PIO_PSR) & mask))
224 return -EINVAL; 224 return -EINVAL;
225 __raw_writel(mask, pio + (value ? PIO_SODR : PIO_CODR));
225 __raw_writel(mask, pio + PIO_OER); 226 __raw_writel(mask, pio + PIO_OER);
226 return 0; 227 return 0;
227} 228}
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 192a5a26cf2b..9e13c8358ea7 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -27,6 +27,7 @@
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28#include <asm/mach/flash.h> 28#include <asm/mach/flash.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/gpio.h>
30 31
31#include "generic.h" 32#include "generic.h"
32 33
@@ -153,7 +154,7 @@ int gpio_direction_input(unsigned gpio)
153 154
154EXPORT_SYMBOL(gpio_direction_input); 155EXPORT_SYMBOL(gpio_direction_input);
155 156
156int gpio_direction_output(unsigned gpio) 157int gpio_direction_output(unsigned gpio, int value)
157{ 158{
158 unsigned long flags; 159 unsigned long flags;
159 160
@@ -161,6 +162,7 @@ int gpio_direction_output(unsigned gpio)
161 return -EINVAL; 162 return -EINVAL;
162 163
163 local_irq_save(flags); 164 local_irq_save(flags);
165 gpio_set_value(gpio, value);
164 GPDR |= GPIO_GPIO(gpio); 166 GPDR |= GPIO_GPIO(gpio);
165 local_irq_restore(flags); 167 local_irq_restore(flags);
166 return 0; 168 return 0;
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c
index 9ba5654cde11..1eb99b814f5b 100644
--- a/arch/avr32/mach-at32ap/pio.c
+++ b/arch/avr32/mach-at32ap/pio.c
@@ -214,7 +214,7 @@ int gpio_direction_input(unsigned int gpio)
214} 214}
215EXPORT_SYMBOL(gpio_direction_input); 215EXPORT_SYMBOL(gpio_direction_input);
216 216
217int gpio_direction_output(unsigned int gpio) 217int gpio_direction_output(unsigned int gpio, int value)
218{ 218{
219 struct pio_device *pio; 219 struct pio_device *pio;
220 unsigned int pin; 220 unsigned int pin;
@@ -223,6 +223,8 @@ int gpio_direction_output(unsigned int gpio)
223 if (!pio) 223 if (!pio)
224 return -ENODEV; 224 return -ENODEV;
225 225
226 gpio_set_value(gpio, value);
227
226 pin = gpio & 0x1f; 228 pin = gpio & 0x1f;
227 pio_writel(pio, OER, 1 << pin); 229 pio_writel(pio, OER, 1 << pin);
228 230
diff --git a/arch/i386/defconfig b/arch/i386/defconfig
index 5ae1e0bc8fd7..f4efd66e1ee5 100644
--- a/arch/i386/defconfig
+++ b/arch/i386/defconfig
@@ -1,10 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-git8 3# Linux kernel version: 2.6.21-rc3
4# Tue Feb 13 11:25:18 2007 4# Wed Mar 7 15:29:47 2007
5# 5#
6CONFIG_X86_32=y 6CONFIG_X86_32=y
7CONFIG_GENERIC_TIME=y 7CONFIG_GENERIC_TIME=y
8CONFIG_CLOCKSOURCE_WATCHDOG=y
9CONFIG_GENERIC_CLOCKEVENTS=y
10CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
8CONFIG_LOCKDEP_SUPPORT=y 11CONFIG_LOCKDEP_SUPPORT=y
9CONFIG_STACKTRACE_SUPPORT=y 12CONFIG_STACKTRACE_SUPPORT=y
10CONFIG_SEMAPHORE_SLEEPERS=y 13CONFIG_SEMAPHORE_SLEEPERS=y
@@ -34,6 +37,7 @@ CONFIG_LOCALVERSION_AUTO=y
34CONFIG_SWAP=y 37CONFIG_SWAP=y
35CONFIG_SYSVIPC=y 38CONFIG_SYSVIPC=y
36# CONFIG_IPC_NS is not set 39# CONFIG_IPC_NS is not set
40CONFIG_SYSVIPC_SYSCTL=y
37CONFIG_POSIX_MQUEUE=y 41CONFIG_POSIX_MQUEUE=y
38# CONFIG_BSD_PROCESS_ACCT is not set 42# CONFIG_BSD_PROCESS_ACCT is not set
39# CONFIG_TASKSTATS is not set 43# CONFIG_TASKSTATS is not set
@@ -44,6 +48,7 @@ CONFIG_IKCONFIG_PROC=y
44# CONFIG_CPUSETS is not set 48# CONFIG_CPUSETS is not set
45CONFIG_SYSFS_DEPRECATED=y 49CONFIG_SYSFS_DEPRECATED=y
46# CONFIG_RELAY is not set 50# CONFIG_RELAY is not set
51CONFIG_BLK_DEV_INITRD=y
47CONFIG_INITRAMFS_SOURCE="" 52CONFIG_INITRAMFS_SOURCE=""
48CONFIG_CC_OPTIMIZE_FOR_SIZE=y 53CONFIG_CC_OPTIMIZE_FOR_SIZE=y
49CONFIG_SYSCTL=y 54CONFIG_SYSCTL=y
@@ -103,6 +108,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
103# 108#
104# Processor type and features 109# Processor type and features
105# 110#
111# CONFIG_TICK_ONESHOT is not set
112# CONFIG_NO_HZ is not set
113# CONFIG_HIGH_RES_TIMERS is not set
106CONFIG_SMP=y 114CONFIG_SMP=y
107# CONFIG_X86_PC is not set 115# CONFIG_X86_PC is not set
108# CONFIG_X86_ELAN is not set 116# CONFIG_X86_ELAN is not set
@@ -235,10 +243,8 @@ CONFIG_ACPI_PROCFS=y
235CONFIG_ACPI_AC=y 243CONFIG_ACPI_AC=y
236CONFIG_ACPI_BATTERY=y 244CONFIG_ACPI_BATTERY=y
237CONFIG_ACPI_BUTTON=y 245CONFIG_ACPI_BUTTON=y
238# CONFIG_ACPI_HOTKEY is not set
239CONFIG_ACPI_FAN=y 246CONFIG_ACPI_FAN=y
240# CONFIG_ACPI_DOCK is not set 247# CONFIG_ACPI_DOCK is not set
241# CONFIG_ACPI_BAY is not set
242CONFIG_ACPI_PROCESSOR=y 248CONFIG_ACPI_PROCESSOR=y
243CONFIG_ACPI_THERMAL=y 249CONFIG_ACPI_THERMAL=y
244# CONFIG_ACPI_ASUS is not set 250# CONFIG_ACPI_ASUS is not set
@@ -289,6 +295,7 @@ CONFIG_X86_POWERNOW_K8_ACPI=y
289# CONFIG_X86_CPUFREQ_NFORCE2 is not set 295# CONFIG_X86_CPUFREQ_NFORCE2 is not set
290# CONFIG_X86_LONGRUN is not set 296# CONFIG_X86_LONGRUN is not set
291# CONFIG_X86_LONGHAUL is not set 297# CONFIG_X86_LONGHAUL is not set
298# CONFIG_X86_E_POWERSAVER is not set
292 299
293# 300#
294# shared options 301# shared options
@@ -368,7 +375,7 @@ CONFIG_IP_PNP_DHCP=y
368# CONFIG_INET_ESP is not set 375# CONFIG_INET_ESP is not set
369# CONFIG_INET_IPCOMP is not set 376# CONFIG_INET_IPCOMP is not set
370# CONFIG_INET_XFRM_TUNNEL is not set 377# CONFIG_INET_XFRM_TUNNEL is not set
371# CONFIG_INET_TUNNEL is not set 378CONFIG_INET_TUNNEL=y
372CONFIG_INET_XFRM_MODE_TRANSPORT=y 379CONFIG_INET_XFRM_MODE_TRANSPORT=y
373CONFIG_INET_XFRM_MODE_TUNNEL=y 380CONFIG_INET_XFRM_MODE_TUNNEL=y
374# CONFIG_INET_XFRM_MODE_BEET is not set 381# CONFIG_INET_XFRM_MODE_BEET is not set
@@ -470,7 +477,13 @@ CONFIG_FW_LOADER=y
470# 477#
471# Plug and Play support 478# Plug and Play support
472# 479#
473# CONFIG_PNP is not set 480CONFIG_PNP=y
481# CONFIG_PNP_DEBUG is not set
482
483#
484# Protocols
485#
486CONFIG_PNPACPI=y
474 487
475# 488#
476# Block devices 489# Block devices
@@ -490,7 +503,6 @@ CONFIG_BLK_DEV_RAM=y
490CONFIG_BLK_DEV_RAM_COUNT=16 503CONFIG_BLK_DEV_RAM_COUNT=16
491CONFIG_BLK_DEV_RAM_SIZE=4096 504CONFIG_BLK_DEV_RAM_SIZE=4096
492CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 505CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
493CONFIG_BLK_DEV_INITRD=y
494# CONFIG_CDROM_PKTCDVD is not set 506# CONFIG_CDROM_PKTCDVD is not set
495# CONFIG_ATA_OVER_ETH is not set 507# CONFIG_ATA_OVER_ETH is not set
496 508
@@ -500,6 +512,7 @@ CONFIG_BLK_DEV_INITRD=y
500# CONFIG_IBM_ASM is not set 512# CONFIG_IBM_ASM is not set
501# CONFIG_SGI_IOC4 is not set 513# CONFIG_SGI_IOC4 is not set
502# CONFIG_TIFM_CORE is not set 514# CONFIG_TIFM_CORE is not set
515# CONFIG_SONY_LAPTOP is not set
503 516
504# 517#
505# ATA/ATAPI/MFM/RLL support 518# ATA/ATAPI/MFM/RLL support
@@ -526,6 +539,7 @@ CONFIG_BLK_DEV_IDEACPI=y
526# 539#
527CONFIG_IDE_GENERIC=y 540CONFIG_IDE_GENERIC=y
528# CONFIG_BLK_DEV_CMD640 is not set 541# CONFIG_BLK_DEV_CMD640 is not set
542# CONFIG_BLK_DEV_IDEPNP is not set
529CONFIG_BLK_DEV_IDEPCI=y 543CONFIG_BLK_DEV_IDEPCI=y
530# CONFIG_IDEPCI_SHARE_IRQ is not set 544# CONFIG_IDEPCI_SHARE_IRQ is not set
531# CONFIG_BLK_DEV_OFFBOARD is not set 545# CONFIG_BLK_DEV_OFFBOARD is not set
@@ -679,6 +693,7 @@ CONFIG_SATA_VIA=y
679# CONFIG_SATA_VITESSE is not set 693# CONFIG_SATA_VITESSE is not set
680# CONFIG_SATA_INIC162X is not set 694# CONFIG_SATA_INIC162X is not set
681CONFIG_SATA_INTEL_COMBINED=y 695CONFIG_SATA_INTEL_COMBINED=y
696CONFIG_SATA_ACPI=y
682# CONFIG_PATA_ALI is not set 697# CONFIG_PATA_ALI is not set
683# CONFIG_PATA_AMD is not set 698# CONFIG_PATA_AMD is not set
684# CONFIG_PATA_ARTOP is not set 699# CONFIG_PATA_ARTOP is not set
@@ -786,6 +801,7 @@ CONFIG_NETDEVICES=y
786# CONFIG_BONDING is not set 801# CONFIG_BONDING is not set
787# CONFIG_EQUALIZER is not set 802# CONFIG_EQUALIZER is not set
788# CONFIG_TUN is not set 803# CONFIG_TUN is not set
804# CONFIG_NET_SB1000 is not set
789 805
790# 806#
791# ARCnet devices 807# ARCnet devices
@@ -979,6 +995,7 @@ CONFIG_HW_CONSOLE=y
979CONFIG_SERIAL_8250=y 995CONFIG_SERIAL_8250=y
980CONFIG_SERIAL_8250_CONSOLE=y 996CONFIG_SERIAL_8250_CONSOLE=y
981CONFIG_SERIAL_8250_PCI=y 997CONFIG_SERIAL_8250_PCI=y
998CONFIG_SERIAL_8250_PNP=y
982CONFIG_SERIAL_8250_NR_UARTS=4 999CONFIG_SERIAL_8250_NR_UARTS=4
983CONFIG_SERIAL_8250_RUNTIME_UARTS=4 1000CONFIG_SERIAL_8250_RUNTIME_UARTS=4
984# CONFIG_SERIAL_8250_EXTENDED is not set 1001# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -1065,6 +1082,11 @@ CONFIG_HANGCHECK_TIMER=y
1065# CONFIG_HWMON_VID is not set 1082# CONFIG_HWMON_VID is not set
1066 1083
1067# 1084#
1085# Multifunction device drivers
1086#
1087# CONFIG_MFD_SM501 is not set
1088
1089#
1068# Multimedia devices 1090# Multimedia devices
1069# 1091#
1070# CONFIG_VIDEO_DEV is not set 1092# CONFIG_VIDEO_DEV is not set
@@ -1078,7 +1100,7 @@ CONFIG_HANGCHECK_TIMER=y
1078# 1100#
1079# Graphics support 1101# Graphics support
1080# 1102#
1081CONFIG_FIRMWARE_EDID=y 1103# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1082# CONFIG_FB is not set 1104# CONFIG_FB is not set
1083 1105
1084# 1106#
@@ -1089,7 +1111,6 @@ CONFIG_VGACON_SOFT_SCROLLBACK=y
1089CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=128 1111CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=128
1090CONFIG_VIDEO_SELECT=y 1112CONFIG_VIDEO_SELECT=y
1091CONFIG_DUMMY_CONSOLE=y 1113CONFIG_DUMMY_CONSOLE=y
1092# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1093 1114
1094# 1115#
1095# Sound 1116# Sound
@@ -1238,6 +1259,7 @@ CONFIG_USB_MON=y
1238# CONFIG_USB_RIO500 is not set 1259# CONFIG_USB_RIO500 is not set
1239# CONFIG_USB_LEGOTOWER is not set 1260# CONFIG_USB_LEGOTOWER is not set
1240# CONFIG_USB_LCD is not set 1261# CONFIG_USB_LCD is not set
1262# CONFIG_USB_BERRY_CHARGE is not set
1241# CONFIG_USB_LED is not set 1263# CONFIG_USB_LED is not set
1242# CONFIG_USB_CYPRESS_CY7C63 is not set 1264# CONFIG_USB_CYPRESS_CY7C63 is not set
1243# CONFIG_USB_CYTHERM is not set 1265# CONFIG_USB_CYTHERM is not set
@@ -1248,6 +1270,7 @@ CONFIG_USB_MON=y
1248# CONFIG_USB_SISUSBVGA is not set 1270# CONFIG_USB_SISUSBVGA is not set
1249# CONFIG_USB_LD is not set 1271# CONFIG_USB_LD is not set
1250# CONFIG_USB_TRANCEVIBRATOR is not set 1272# CONFIG_USB_TRANCEVIBRATOR is not set
1273# CONFIG_USB_IOWARRIOR is not set
1251# CONFIG_USB_TEST is not set 1274# CONFIG_USB_TEST is not set
1252 1275
1253# 1276#
@@ -1506,6 +1529,7 @@ CONFIG_DEBUG_KERNEL=y
1506CONFIG_LOG_BUF_SHIFT=18 1529CONFIG_LOG_BUF_SHIFT=18
1507CONFIG_DETECT_SOFTLOCKUP=y 1530CONFIG_DETECT_SOFTLOCKUP=y
1508# CONFIG_SCHEDSTATS is not set 1531# CONFIG_SCHEDSTATS is not set
1532# CONFIG_TIMER_STATS is not set
1509# CONFIG_DEBUG_SLAB is not set 1533# CONFIG_DEBUG_SLAB is not set
1510# CONFIG_DEBUG_RT_MUTEXES is not set 1534# CONFIG_DEBUG_RT_MUTEXES is not set
1511# CONFIG_RT_MUTEX_TESTER is not set 1535# CONFIG_RT_MUTEX_TESTER is not set
@@ -1525,6 +1549,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
1525# CONFIG_FORCED_INLINING is not set 1549# CONFIG_FORCED_INLINING is not set
1526# CONFIG_RCU_TORTURE_TEST is not set 1550# CONFIG_RCU_TORTURE_TEST is not set
1527# CONFIG_LKDTM is not set 1551# CONFIG_LKDTM is not set
1552# CONFIG_FAULT_INJECTION is not set
1528CONFIG_EARLY_PRINTK=y 1553CONFIG_EARLY_PRINTK=y
1529CONFIG_DEBUG_STACKOVERFLOW=y 1554CONFIG_DEBUG_STACKOVERFLOW=y
1530# CONFIG_DEBUG_STACK_USAGE is not set 1555# CONFIG_DEBUG_STACK_USAGE is not set
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 2383bcf18c5d..e88415282a6f 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -28,6 +28,7 @@
28#include <linux/clockchips.h> 28#include <linux/clockchips.h>
29#include <linux/acpi_pmtmr.h> 29#include <linux/acpi_pmtmr.h>
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/dmi.h>
31 32
32#include <asm/atomic.h> 33#include <asm/atomic.h>
33#include <asm/smp.h> 34#include <asm/smp.h>
@@ -61,6 +62,11 @@ static int enable_local_apic __initdata = 0;
61 62
62/* Local APIC timer verification ok */ 63/* Local APIC timer verification ok */
63static int local_apic_timer_verify_ok; 64static int local_apic_timer_verify_ok;
65/* Disable local APIC timer from the kernel commandline or via dmi quirk */
66static int local_apic_timer_disabled;
67/* Local APIC timer works in C2 */
68int local_apic_timer_c2_ok;
69EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok);
64 70
65/* 71/*
66 * Debug level, exported for io_apic.c 72 * Debug level, exported for io_apic.c
@@ -266,6 +272,32 @@ static void __devinit setup_APIC_timer(void)
266} 272}
267 273
268/* 274/*
275 * Detect systems with known broken BIOS implementations
276 */
277static int __init lapic_check_broken_bios(struct dmi_system_id *d)
278{
279 printk(KERN_NOTICE "%s detected: disabling lapic timer.\n",
280 d->ident);
281 local_apic_timer_disabled = 1;
282 return 0;
283}
284
285static struct dmi_system_id __initdata broken_bios_dmi_table[] = {
286 {
287 /*
288 * BIOS exports only C1 state, but uses deeper power
289 * modes behind the kernels back.
290 */
291 .callback = lapic_check_broken_bios,
292 .ident = "HP nx6325",
293 .matches = {
294 DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nx6325"),
295 },
296 },
297 {}
298};
299
300/*
269 * In this functions we calibrate APIC bus clocks to the external timer. 301 * In this functions we calibrate APIC bus clocks to the external timer.
270 * 302 *
271 * We want to do the calibration only once since we want to have local timer 303 * We want to do the calibration only once since we want to have local timer
@@ -338,6 +370,23 @@ void __init setup_boot_APIC_clock(void)
338 void (*real_handler)(struct clock_event_device *dev); 370 void (*real_handler)(struct clock_event_device *dev);
339 unsigned long deltaj; 371 unsigned long deltaj;
340 long delta, deltapm; 372 long delta, deltapm;
373 int pm_referenced = 0;
374
375 /* Detect know broken systems */
376 dmi_check_system(broken_bios_dmi_table);
377
378 /*
379 * The local apic timer can be disabled via the kernel
380 * commandline or from the dmi quirk above. Register the lapic
381 * timer as a dummy clock event source on SMP systems, so the
382 * broadcast mechanism is used. On UP systems simply ignore it.
383 */
384 if (local_apic_timer_disabled) {
385 /* No broadcast on UP ! */
386 if (num_possible_cpus() > 1)
387 setup_APIC_timer();
388 return;
389 }
341 390
342 apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n" 391 apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n"
343 "calibrating APIC timer ...\n"); 392 "calibrating APIC timer ...\n");
@@ -357,7 +406,8 @@ void __init setup_boot_APIC_clock(void)
357 /* Let the interrupts run */ 406 /* Let the interrupts run */
358 local_irq_enable(); 407 local_irq_enable();
359 408
360 while(lapic_cal_loops <= LAPIC_CAL_LOOPS); 409 while (lapic_cal_loops <= LAPIC_CAL_LOOPS)
410 cpu_relax();
361 411
362 local_irq_disable(); 412 local_irq_disable();
363 413
@@ -394,6 +444,7 @@ void __init setup_boot_APIC_clock(void)
394 "%lu (%ld)\n", (unsigned long) res, delta); 444 "%lu (%ld)\n", (unsigned long) res, delta);
395 delta = (long) res; 445 delta = (long) res;
396 } 446 }
447 pm_referenced = 1;
397 } 448 }
398 449
399 /* Calculate the scaled math multiplication factor */ 450 /* Calculate the scaled math multiplication factor */
@@ -423,69 +474,43 @@ void __init setup_boot_APIC_clock(void)
423 calibration_result / (1000000 / HZ), 474 calibration_result / (1000000 / HZ),
424 calibration_result % (1000000 / HZ)); 475 calibration_result % (1000000 / HZ));
425 476
426
427 apic_printk(APIC_VERBOSE, "... verify APIC timer\n");
428
429 /*
430 * Setup the apic timer manually
431 */
432 local_apic_timer_verify_ok = 1; 477 local_apic_timer_verify_ok = 1;
433 levt->event_handler = lapic_cal_handler;
434 lapic_timer_setup(CLOCK_EVT_MODE_PERIODIC, levt);
435 lapic_cal_loops = -1;
436 478
437 /* Let the interrupts run */ 479 /* We trust the pm timer based calibration */
438 local_irq_enable(); 480 if (!pm_referenced) {
481 apic_printk(APIC_VERBOSE, "... verify APIC timer\n");
439 482
440 while(lapic_cal_loops <= LAPIC_CAL_LOOPS); 483 /*
484 * Setup the apic timer manually
485 */
486 levt->event_handler = lapic_cal_handler;
487 lapic_timer_setup(CLOCK_EVT_MODE_PERIODIC, levt);
488 lapic_cal_loops = -1;
441 489
442 local_irq_disable(); 490 /* Let the interrupts run */
491 local_irq_enable();
443 492
444 /* Stop the lapic timer */ 493 while(lapic_cal_loops <= LAPIC_CAL_LOOPS)
445 lapic_timer_setup(CLOCK_EVT_MODE_SHUTDOWN, levt); 494 cpu_relax();
446 495
447 local_irq_enable(); 496 local_irq_disable();
448 497
449 /* Jiffies delta */ 498 /* Stop the lapic timer */
450 deltaj = lapic_cal_j2 - lapic_cal_j1; 499 lapic_timer_setup(CLOCK_EVT_MODE_SHUTDOWN, levt);
451 apic_printk(APIC_VERBOSE, "... jiffies delta = %lu\n", deltaj);
452 500
453 /* Check, if the PM timer is available */ 501 local_irq_enable();
454 deltapm = lapic_cal_pm2 - lapic_cal_pm1;
455 apic_printk(APIC_VERBOSE, "... PM timer delta = %ld\n", deltapm);
456 502
457 local_apic_timer_verify_ok = 0; 503 /* Jiffies delta */
504 deltaj = lapic_cal_j2 - lapic_cal_j1;
505 apic_printk(APIC_VERBOSE, "... jiffies delta = %lu\n", deltaj);
458 506
459 if (deltapm) {
460 if (deltapm > (pm_100ms - pm_thresh) &&
461 deltapm < (pm_100ms + pm_thresh)) {
462 apic_printk(APIC_VERBOSE, "... PM timer result ok\n");
463 /* Check, if the jiffies result is consistent */
464 if (deltaj < LAPIC_CAL_LOOPS-2 ||
465 deltaj > LAPIC_CAL_LOOPS+2) {
466 /*
467 * Not sure, what we can do about this one.
468 * When high resultion timers are active
469 * and the lapic timer does not stop in C3
470 * we are fine. Otherwise more trouble might
471 * be waiting. -- tglx
472 */
473 printk(KERN_WARNING "Global event device %s "
474 "has wrong frequency "
475 "(%lu ticks instead of %d)\n",
476 global_clock_event->name, deltaj,
477 LAPIC_CAL_LOOPS);
478 }
479 local_apic_timer_verify_ok = 1;
480 }
481 } else {
482 /* Check, if the jiffies result is consistent */ 507 /* Check, if the jiffies result is consistent */
483 if (deltaj >= LAPIC_CAL_LOOPS-2 && 508 if (deltaj >= LAPIC_CAL_LOOPS-2 && deltaj <= LAPIC_CAL_LOOPS+2)
484 deltaj <= LAPIC_CAL_LOOPS+2) {
485 apic_printk(APIC_VERBOSE, "... jiffies result ok\n"); 509 apic_printk(APIC_VERBOSE, "... jiffies result ok\n");
486 local_apic_timer_verify_ok = 1; 510 else
487 } 511 local_apic_timer_verify_ok = 0;
488 } 512 } else
513 local_irq_enable();
489 514
490 if (!local_apic_timer_verify_ok) { 515 if (!local_apic_timer_verify_ok) {
491 printk(KERN_WARNING 516 printk(KERN_WARNING
@@ -1203,6 +1228,20 @@ static int __init parse_nolapic(char *arg)
1203} 1228}
1204early_param("nolapic", parse_nolapic); 1229early_param("nolapic", parse_nolapic);
1205 1230
1231static int __init parse_disable_lapic_timer(char *arg)
1232{
1233 local_apic_timer_disabled = 1;
1234 return 0;
1235}
1236early_param("nolapic_timer", parse_disable_lapic_timer);
1237
1238static int __init parse_lapic_timer_c2_ok(char *arg)
1239{
1240 local_apic_timer_c2_ok = 1;
1241 return 0;
1242}
1243early_param("lapic_timer_c2_ok", parse_lapic_timer_c2_ok);
1244
1206static int __init apic_set_verbosity(char *str) 1245static int __init apic_set_verbosity(char *str)
1207{ 1246{
1208 if (strcmp("debug", str) == 0) 1247 if (strcmp("debug", str) == 0)
diff --git a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c
index e3d4b73bfdb0..4afe26e86260 100644
--- a/arch/i386/kernel/i386_ksyms.c
+++ b/arch/i386/kernel/i386_ksyms.c
@@ -28,3 +28,5 @@ EXPORT_SYMBOL(__read_lock_failed);
28#endif 28#endif
29 29
30EXPORT_SYMBOL(csum_partial); 30EXPORT_SYMBOL(csum_partial);
31
32EXPORT_SYMBOL(_proxy_pda);
diff --git a/arch/i386/kernel/i8253.c b/arch/i386/kernel/i8253.c
index 5cbb776b3089..10cef5ca8a5b 100644
--- a/arch/i386/kernel/i8253.c
+++ b/arch/i386/kernel/i8253.c
@@ -47,9 +47,17 @@ static void init_pit_timer(enum clock_event_mode mode,
47 outb(LATCH >> 8 , PIT_CH0); /* MSB */ 47 outb(LATCH >> 8 , PIT_CH0); /* MSB */
48 break; 48 break;
49 49
50 case CLOCK_EVT_MODE_ONESHOT: 50 /*
51 * Avoid unnecessary state transitions, as it confuses
52 * Geode / Cyrix based boxen.
53 */
51 case CLOCK_EVT_MODE_SHUTDOWN: 54 case CLOCK_EVT_MODE_SHUTDOWN:
55 if (evt->mode == CLOCK_EVT_MODE_UNUSED)
56 break;
52 case CLOCK_EVT_MODE_UNUSED: 57 case CLOCK_EVT_MODE_UNUSED:
58 if (evt->mode == CLOCK_EVT_MODE_SHUTDOWN)
59 break;
60 case CLOCK_EVT_MODE_ONESHOT:
53 /* One shot setup */ 61 /* One shot setup */
54 outb_p(0x38, PIT_MODE); 62 outb_p(0x38, PIT_MODE);
55 udelay(10); 63 udelay(10);
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index 821df34d2b3a..14702427b104 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -245,14 +245,6 @@ static int __init check_nmi_watchdog(void)
245 unsigned int *prev_nmi_count; 245 unsigned int *prev_nmi_count;
246 int cpu; 246 int cpu;
247 247
248 /* Enable NMI watchdog for newer systems.
249 Probably safe on most older systems too, but let's be careful.
250 IBM ThinkPads use INT10 inside SMM and that allows early NMI inside SMM
251 which hangs the system. Disable watchdog for all thinkpads */
252 if (nmi_watchdog == NMI_DEFAULT && dmi_get_year(DMI_BIOS_DATE) >= 2004 &&
253 !dmi_name_in_vendors("ThinkPad"))
254 nmi_watchdog = NMI_LOCAL_APIC;
255
256 if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT)) 248 if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT))
257 return 0; 249 return 0;
258 250
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index 602660df455c..6cb8f5336732 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -18,6 +18,8 @@
18 18
19#include "mach_timer.h" 19#include "mach_timer.h"
20 20
21static int tsc_enabled;
22
21/* 23/*
22 * On some systems the TSC frequency does not 24 * On some systems the TSC frequency does not
23 * change with the cpu frequency. So we need 25 * change with the cpu frequency. So we need
@@ -105,7 +107,7 @@ unsigned long long sched_clock(void)
105 /* 107 /*
106 * Fall back to jiffies if there's no TSC available: 108 * Fall back to jiffies if there's no TSC available:
107 */ 109 */
108 if (unlikely(tsc_disable)) 110 if (unlikely(!tsc_enabled))
109 /* No locking but a rare wrong value is not a big deal: */ 111 /* No locking but a rare wrong value is not a big deal: */
110 return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); 112 return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ);
111 113
@@ -283,6 +285,7 @@ void mark_tsc_unstable(void)
283{ 285{
284 if (!tsc_unstable) { 286 if (!tsc_unstable) {
285 tsc_unstable = 1; 287 tsc_unstable = 1;
288 tsc_enabled = 0;
286 /* Can be called before registration */ 289 /* Can be called before registration */
287 if (clocksource_tsc.mult) 290 if (clocksource_tsc.mult)
288 clocksource_change_rating(&clocksource_tsc, 0); 291 clocksource_change_rating(&clocksource_tsc, 0);
@@ -383,7 +386,9 @@ void __init tsc_init(void)
383 if (check_tsc_unstable()) { 386 if (check_tsc_unstable()) {
384 clocksource_tsc.rating = 0; 387 clocksource_tsc.rating = 0;
385 clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS; 388 clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS;
386 } 389 } else
390 tsc_enabled = 1;
391
387 clocksource_register(&clocksource_tsc); 392 clocksource_register(&clocksource_tsc);
388 393
389 return; 394 return;
diff --git a/arch/i386/kernel/vmi.c b/arch/i386/kernel/vmi.c
index fbf45fa08320..fb07a1aad225 100644
--- a/arch/i386/kernel/vmi.c
+++ b/arch/i386/kernel/vmi.c
@@ -23,7 +23,6 @@
23 */ 23 */
24 24
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/license.h>
27#include <linux/cpu.h> 26#include <linux/cpu.h>
28#include <linux/bootmem.h> 27#include <linux/bootmem.h>
29#include <linux/mm.h> 28#include <linux/mm.h>
@@ -48,7 +47,6 @@ typedef u64 __attribute__((regparm(2))) (VROMLONGFUNC)(int);
48 (((VROMLONGFUNC *)(rom->func)) (arg)) 47 (((VROMLONGFUNC *)(rom->func)) (arg))
49 48
50static struct vrom_header *vmi_rom; 49static struct vrom_header *vmi_rom;
51static int license_gplok;
52static int disable_pge; 50static int disable_pge;
53static int disable_pse; 51static int disable_pse;
54static int disable_sep; 52static int disable_sep;
@@ -629,13 +627,14 @@ static inline int __init check_vmi_rom(struct vrom_header *rom)
629 rom->api_version_maj, rom->api_version_min, 627 rom->api_version_maj, rom->api_version_min,
630 pci->rom_version_maj, pci->rom_version_min); 628 pci->rom_version_maj, pci->rom_version_min);
631 629
632 license_gplok = license_is_gpl_compatible(license); 630 /* Don't allow BSD/MIT here for now because we don't want to end up
633 if (!license_gplok) { 631 with any binary only shim layers */
634 printk(KERN_WARNING "VMI: ROM license '%s' taints kernel... " 632 if (strcmp(license, "GPL") && strcmp(license, "GPL v2")) {
635 "inlining disabled\n", 633 printk(KERN_WARNING "VMI: Non GPL license `%s' found for ROM. Not used.\n",
636 license); 634 license);
637 add_taint(TAINT_PROPRIETARY_MODULE); 635 return 0;
638 } 636 }
637
639 return 1; 638 return 1;
640} 639}
641 640
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index d51f0f11f7f9..e19185d26554 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -13,6 +13,7 @@ config IA64
13 bool 13 bool
14 select PCI if (!IA64_HP_SIM) 14 select PCI if (!IA64_HP_SIM)
15 select ACPI if (!IA64_HP_SIM) 15 select ACPI if (!IA64_HP_SIM)
16 select PM if (!IA64_HP_SIM)
16 default y 17 default y
17 help 18 help
18 The Itanium Processor Family is Intel's 64-bit successor to 19 The Itanium Processor Family is Intel's 64-bit successor to
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index 7d1bbb4403ba..80a94e707827 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -164,7 +164,7 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)
164 164
165 nd = (struct ia64_mca_notify_die *)args->err; 165 nd = (struct ia64_mca_notify_die *)args->err;
166 /* Reason code 1 means machine check rendezous*/ 166 /* Reason code 1 means machine check rendezous*/
167 if ((val == DIE_INIT_MONARCH_ENTER || DIE_INIT_SLAVE_ENTER) && 167 if ((val == DIE_INIT_MONARCH_ENTER || val == DIE_INIT_SLAVE_ENTER) &&
168 nd->sos->rv_rc == 1) 168 nd->sos->rv_rc == 1)
169 return NOTIFY_DONE; 169 return NOTIFY_DONE;
170 170
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 339e8a54c2f1..69b9bb3fd7c5 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -692,12 +692,15 @@ struct seq_operations cpuinfo_op = {
692 .show = show_cpuinfo 692 .show = show_cpuinfo
693}; 693};
694 694
695static char brandname[128]; 695#define MAX_BRANDS 8
696static char brandname[MAX_BRANDS][128];
696 697
697static char * __cpuinit 698static char * __cpuinit
698get_model_name(__u8 family, __u8 model) 699get_model_name(__u8 family, __u8 model)
699{ 700{
701 static int overflow;
700 char brand[128]; 702 char brand[128];
703 int i;
701 704
702 memcpy(brand, "Unknown", 8); 705 memcpy(brand, "Unknown", 8);
703 if (ia64_pal_get_brand_info(brand)) { 706 if (ia64_pal_get_brand_info(brand)) {
@@ -709,12 +712,17 @@ get_model_name(__u8 family, __u8 model)
709 case 2: memcpy(brand, "Madison up to 9M cache", 23); break; 712 case 2: memcpy(brand, "Madison up to 9M cache", 23); break;
710 } 713 }
711 } 714 }
712 if (brandname[0] == '\0') 715 for (i = 0; i < MAX_BRANDS; i++)
713 return strcpy(brandname, brand); 716 if (strcmp(brandname[i], brand) == 0)
714 else if (strcmp(brandname, brand) == 0) 717 return brandname[i];
715 return brandname; 718 for (i = 0; i < MAX_BRANDS; i++)
716 else 719 if (brandname[i][0] == '\0')
717 return kstrdup(brand, GFP_KERNEL); 720 return strcpy(brandname[i], brand);
721 if (overflow++ == 0)
722 printk(KERN_ERR
723 "%s: Table overflow. Some processor model information will be missing\n",
724 __FUNCTION__);
725 return "Unknown";
718} 726}
719 727
720static void __cpuinit 728static void __cpuinit
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index fb0f4698f5d0..44ce5ed9444c 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -97,26 +97,6 @@ void show_mem(void)
97unsigned long bootmap_start; 97unsigned long bootmap_start;
98 98
99/** 99/**
100 * find_max_pfn - adjust the maximum page number callback
101 * @start: start of range
102 * @end: end of range
103 * @arg: address of pointer to global max_pfn variable
104 *
105 * Passed as a callback function to efi_memmap_walk() to determine the highest
106 * available page frame number in the system.
107 */
108int
109find_max_pfn (unsigned long start, unsigned long end, void *arg)
110{
111 unsigned long *max_pfnp = arg, pfn;
112
113 pfn = (PAGE_ALIGN(end - 1) - PAGE_OFFSET) >> PAGE_SHIFT;
114 if (pfn > *max_pfnp)
115 *max_pfnp = pfn;
116 return 0;
117}
118
119/**
120 * find_bootmap_location - callback to find a memory area for the bootmap 100 * find_bootmap_location - callback to find a memory area for the bootmap
121 * @start: start of region 101 * @start: start of region
122 * @end: end of region 102 * @end: end of region
@@ -177,9 +157,10 @@ find_memory (void)
177 reserve_memory(); 157 reserve_memory();
178 158
179 /* first find highest page frame number */ 159 /* first find highest page frame number */
180 max_pfn = 0; 160 min_low_pfn = ~0UL;
181 efi_memmap_walk(find_max_pfn, &max_pfn); 161 max_low_pfn = 0;
182 162 efi_memmap_walk(find_max_min_low_pfn, NULL);
163 max_pfn = max_low_pfn;
183 /* how many bytes to cover all the pages */ 164 /* how many bytes to cover all the pages */
184 bootmap_size = bootmem_bootmap_pages(max_pfn) << PAGE_SHIFT; 165 bootmap_size = bootmem_bootmap_pages(max_pfn) << PAGE_SHIFT;
185 166
@@ -189,7 +170,8 @@ find_memory (void)
189 if (bootmap_start == ~0UL) 170 if (bootmap_start == ~0UL)
190 panic("Cannot find %ld bytes for bootmap\n", bootmap_size); 171 panic("Cannot find %ld bytes for bootmap\n", bootmap_size);
191 172
192 bootmap_size = init_bootmem(bootmap_start >> PAGE_SHIFT, max_pfn); 173 bootmap_size = init_bootmem_node(NODE_DATA(0),
174 (bootmap_start >> PAGE_SHIFT), 0, max_pfn);
193 175
194 /* Free all available memory, then mark bootmem-map as being in use. */ 176 /* Free all available memory, then mark bootmem-map as being in use. */
195 efi_memmap_walk(filter_rsvd_memory, free_bootmem); 177 efi_memmap_walk(filter_rsvd_memory, free_bootmem);
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 11a2d8825d89..872da7a2accd 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -88,9 +88,6 @@ static int __init build_node_maps(unsigned long start, unsigned long len,
88 bdp->node_low_pfn = max(epfn, bdp->node_low_pfn); 88 bdp->node_low_pfn = max(epfn, bdp->node_low_pfn);
89 } 89 }
90 90
91 min_low_pfn = min(min_low_pfn, bdp->node_boot_start>>PAGE_SHIFT);
92 max_low_pfn = max(max_low_pfn, bdp->node_low_pfn);
93
94 return 0; 91 return 0;
95} 92}
96 93
@@ -438,6 +435,7 @@ void __init find_memory(void)
438 /* These actually end up getting called by call_pernode_memory() */ 435 /* These actually end up getting called by call_pernode_memory() */
439 efi_memmap_walk(filter_rsvd_memory, build_node_maps); 436 efi_memmap_walk(filter_rsvd_memory, build_node_maps);
440 efi_memmap_walk(filter_rsvd_memory, find_pernode_space); 437 efi_memmap_walk(filter_rsvd_memory, find_pernode_space);
438 efi_memmap_walk(find_max_min_low_pfn, NULL);
441 439
442 for_each_online_node(node) 440 for_each_online_node(node)
443 if (mem_data[node].bootmem_data.node_low_pfn) { 441 if (mem_data[node].bootmem_data.node_low_pfn) {
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index f225dd72968b..c8da621aab17 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -648,6 +648,22 @@ count_reserved_pages (u64 start, u64 end, void *arg)
648 return 0; 648 return 0;
649} 649}
650 650
651int
652find_max_min_low_pfn (unsigned long start, unsigned long end, void *arg)
653{
654 unsigned long pfn_start, pfn_end;
655#ifdef CONFIG_FLATMEM
656 pfn_start = (PAGE_ALIGN(__pa(start))) >> PAGE_SHIFT;
657 pfn_end = (PAGE_ALIGN(__pa(end - 1))) >> PAGE_SHIFT;
658#else
659 pfn_start = GRANULEROUNDDOWN(__pa(start)) >> PAGE_SHIFT;
660 pfn_end = GRANULEROUNDUP(__pa(end - 1)) >> PAGE_SHIFT;
661#endif
662 min_low_pfn = min(min_low_pfn, pfn_start);
663 max_low_pfn = max(max_low_pfn, pfn_end);
664 return 0;
665}
666
651/* 667/*
652 * Boot command-line option "nolwsys" can be used to disable the use of any light-weight 668 * Boot command-line option "nolwsys" can be used to disable the use of any light-weight
653 * system call handler. When this option is in effect, all fsyscalls will end up bubbling 669 * system call handler. When this option is in effect, all fsyscalls will end up bubbling
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
index 600be3ebae05..6b10e5d28488 100644
--- a/arch/ia64/sn/kernel/io_init.c
+++ b/arch/ia64/sn/kernel/io_init.c
@@ -247,10 +247,18 @@ sn_io_slot_fixup(struct pci_dev *dev)
247 addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET; 247 addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET;
248 dev->resource[idx].start = addr; 248 dev->resource[idx].start = addr;
249 dev->resource[idx].end = addr + size; 249 dev->resource[idx].end = addr + size;
250
251 /*
252 * if it's already in the device structure, remove it before
253 * inserting
254 */
255 if (dev->resource[idx].parent && dev->resource[idx].parent->child)
256 release_resource(&dev->resource[idx]);
257
250 if (dev->resource[idx].flags & IORESOURCE_IO) 258 if (dev->resource[idx].flags & IORESOURCE_IO)
251 dev->resource[idx].parent = &ioport_resource; 259 insert_resource(&ioport_resource, &dev->resource[idx]);
252 else 260 else
253 dev->resource[idx].parent = &iomem_resource; 261 insert_resource(&iomem_resource, &dev->resource[idx]);
254 /* If ROM, mark as shadowed in PROM */ 262 /* If ROM, mark as shadowed in PROM */
255 if (idx == PCI_ROM_RESOURCE) 263 if (idx == PCI_ROM_RESOURCE)
256 dev->resource[idx].flags |= IORESOURCE_ROM_BIOS_COPY; 264 dev->resource[idx].flags |= IORESOURCE_ROM_BIOS_COPY;
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index bd5373d593e1..a9bed5ca2ed8 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -348,8 +348,7 @@ sn_scan_pcdp(void)
348 continue; /* not PCI interconnect */ 348 continue; /* not PCI interconnect */
349 349
350 if (if_pci.translation & PCDP_PCI_TRANS_IOPORT) 350 if (if_pci.translation & PCDP_PCI_TRANS_IOPORT)
351 vga_console_iobase = 351 vga_console_iobase = if_pci.ioport_tra;
352 if_pci.ioport_tra | __IA64_UNCACHED_OFFSET;
353 352
354 if (if_pci.translation & PCDP_PCI_TRANS_MMIO) 353 if (if_pci.translation & PCDP_PCI_TRANS_MMIO)
355 vga_console_membase = 354 vga_console_membase =
@@ -429,7 +428,8 @@ void __init sn_setup(char **cmdline_p)
429 * bus containing the VGA console. 428 * bus containing the VGA console.
430 */ 429 */
431 if (vga_console_iobase) { 430 if (vga_console_iobase) {
432 io_space[0].mmio_base = vga_console_iobase; 431 io_space[0].mmio_base =
432 (unsigned long) ioremap(vga_console_iobase, 0);
433 io_space[0].sparse = 0; 433 io_space[0].sparse = 0;
434 } 434 }
435 435
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index a1cd84f9b3bc..656f0ca52782 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -250,7 +250,7 @@ config LASAT
250 select R5000_CPU_SCACHE 250 select R5000_CPU_SCACHE
251 select SYS_HAS_CPU_R5000 251 select SYS_HAS_CPU_R5000
252 select SYS_SUPPORTS_32BIT_KERNEL 252 select SYS_SUPPORTS_32BIT_KERNEL
253 select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL 253 select SYS_SUPPORTS_64BIT_KERNEL if BROKEN
254 select SYS_SUPPORTS_LITTLE_ENDIAN 254 select SYS_SUPPORTS_LITTLE_ENDIAN
255 select GENERIC_HARDIRQS_NO__DO_IRQ 255 select GENERIC_HARDIRQS_NO__DO_IRQ
256 256
@@ -470,11 +470,6 @@ config MIPS_XXS1500
470 select SOC_AU1500 470 select SOC_AU1500
471 select SYS_SUPPORTS_LITTLE_ENDIAN 471 select SYS_SUPPORTS_LITTLE_ENDIAN
472 472
473config PNX8550_V2PCI
474 bool "Philips PNX8550 based Viper2-PCI board"
475 select PNX8550
476 select SYS_SUPPORTS_LITTLE_ENDIAN
477
478config PNX8550_JBS 473config PNX8550_JBS
479 bool "Philips PNX8550 based JBS board" 474 bool "Philips PNX8550 based JBS board"
480 select PNX8550 475 select PNX8550
@@ -547,6 +542,8 @@ config QEMU
547 select SYS_SUPPORTS_LITTLE_ENDIAN 542 select SYS_SUPPORTS_LITTLE_ENDIAN
548 select ARCH_SPARSEMEM_ENABLE 543 select ARCH_SPARSEMEM_ENABLE
549 select GENERIC_HARDIRQS_NO__DO_IRQ 544 select GENERIC_HARDIRQS_NO__DO_IRQ
545 select NR_CPUS_DEFAULT_1
546 select SYS_SUPPORTS_SMP
550 help 547 help
551 Qemu is a software emulator which among other architectures also 548 Qemu is a software emulator which among other architectures also
552 can simulate a MIPS32 4Kc system. This patch adds support for the 549 can simulate a MIPS32 4Kc system. This patch adds support for the
@@ -1564,6 +1561,7 @@ config MIPS_MT_SMP
1564 select CPU_MIPSR2_IRQ_VI 1561 select CPU_MIPSR2_IRQ_VI
1565 select CPU_MIPSR2_SRS 1562 select CPU_MIPSR2_SRS
1566 select MIPS_MT 1563 select MIPS_MT
1564 select NR_CPUS_DEFAULT_2
1567 select SMP 1565 select SMP
1568 select SYS_SUPPORTS_SMP 1566 select SYS_SUPPORTS_SMP
1569 help 1567 help
@@ -1578,7 +1576,6 @@ config MIPS_MT_SMTC
1578 select CPU_MIPSR2_IRQ_VI 1576 select CPU_MIPSR2_IRQ_VI
1579 select CPU_MIPSR2_SRS 1577 select CPU_MIPSR2_SRS
1580 select MIPS_MT 1578 select MIPS_MT
1581 select NR_CPUS_DEFAULT_2
1582 select NR_CPUS_DEFAULT_8 1579 select NR_CPUS_DEFAULT_8
1583 select SMP 1580 select SMP
1584 select SYS_SUPPORTS_SMP 1581 select SYS_SUPPORTS_SMP
@@ -1810,6 +1807,9 @@ config SMP
1810config SYS_SUPPORTS_SMP 1807config SYS_SUPPORTS_SMP
1811 bool 1808 bool
1812 1809
1810config NR_CPUS_DEFAULT_1
1811 bool
1812
1813config NR_CPUS_DEFAULT_2 1813config NR_CPUS_DEFAULT_2
1814 bool 1814 bool
1815 1815
@@ -1830,8 +1830,9 @@ config NR_CPUS_DEFAULT_64
1830 1830
1831config NR_CPUS 1831config NR_CPUS
1832 int "Maximum number of CPUs (2-64)" 1832 int "Maximum number of CPUs (2-64)"
1833 range 2 64 1833 range 1 64 if NR_CPUS_DEFAULT_1
1834 depends on SMP 1834 depends on SMP
1835 default "1" if NR_CPUS_DEFAULT_1
1835 default "2" if NR_CPUS_DEFAULT_2 1836 default "2" if NR_CPUS_DEFAULT_2
1836 default "4" if NR_CPUS_DEFAULT_4 1837 default "4" if NR_CPUS_DEFAULT_4
1837 default "8" if NR_CPUS_DEFAULT_8 1838 default "8" if NR_CPUS_DEFAULT_8
@@ -1842,10 +1843,13 @@ config NR_CPUS
1842 This allows you to specify the maximum number of CPUs which this 1843 This allows you to specify the maximum number of CPUs which this
1843 kernel will support. The maximum supported value is 32 for 32-bit 1844 kernel will support. The maximum supported value is 32 for 32-bit
1844 kernel and 64 for 64-bit kernels; the minimum value which makes 1845 kernel and 64 for 64-bit kernels; the minimum value which makes
1845 sense is 2. 1846 sense is 1 for Qemu (useful only for kernel debugging purposes)
1847 and 2 for all others.
1846 1848
1847 This is purely to save memory - each supported CPU adds 1849 This is purely to save memory - each supported CPU adds
1848 approximately eight kilobytes to the kernel image. 1850 approximately eight kilobytes to the kernel image. For best
1851 performance should round up your number of processors to the next
1852 power of two.
1849 1853
1850# 1854#
1851# Timer Interrupt Frequency Configuration 1855# Timer Interrupt Frequency Configuration
diff --git a/arch/mips/configs/atlas_defconfig b/arch/mips/configs/atlas_defconfig
index 458894933a4c..39e251300c64 100644
--- a/arch/mips/configs/atlas_defconfig
+++ b/arch/mips/configs/atlas_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_ATLAS=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig
index aa05e294ea62..4713a13211ce 100644
--- a/arch/mips/configs/bigsur_defconfig
+++ b/arch/mips/configs/bigsur_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig
index b2594fa556f3..5e7ae56b1f3c 100644
--- a/arch/mips/configs/capcella_defconfig
+++ b/arch/mips/configs/capcella_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig
index 9090a7aba6c1..ba593b510b76 100644
--- a/arch/mips/configs/cobalt_defconfig
+++ b/arch/mips/configs/cobalt_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_COBALT=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig
index 4cb8cf4255a2..0db6a8b37301 100644
--- a/arch/mips/configs/db1000_defconfig
+++ b/arch/mips/configs/db1000_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_DB1000=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig
index d86dedf27fc4..162add97c5ef 100644
--- a/arch/mips/configs/db1100_defconfig
+++ b/arch/mips/configs/db1100_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_DB1100=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/db1200_defconfig b/arch/mips/configs/db1200_defconfig
index c24b6008345e..82801ec43e6a 100644
--- a/arch/mips/configs/db1200_defconfig
+++ b/arch/mips/configs/db1200_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_DB1200=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig
index baad2c5223ba..545f23094e13 100644
--- a/arch/mips/configs/db1500_defconfig
+++ b/arch/mips/configs/db1500_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_DB1500=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig
index c29fdab0423a..5bd3b4328e57 100644
--- a/arch/mips/configs/db1550_defconfig
+++ b/arch/mips/configs/db1550_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_DB1550=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/ddb5477_defconfig b/arch/mips/configs/ddb5477_defconfig
index f4b316d2cd70..5b502a2013fb 100644
--- a/arch/mips/configs/ddb5477_defconfig
+++ b/arch/mips/configs/ddb5477_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45CONFIG_DDB5477=y 44CONFIG_DDB5477=y
diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/decstation_defconfig
index 9c38e5c77761..4bbdab078ff1 100644
--- a/arch/mips/configs/decstation_defconfig
+++ b/arch/mips/configs/decstation_defconfig
@@ -39,7 +39,6 @@ CONFIG_MACH_DECSTATION=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig
index 922af379aa41..b5714a6a5398 100644
--- a/arch/mips/configs/e55_defconfig
+++ b/arch/mips/configs/e55_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/emma2rh_defconfig b/arch/mips/configs/emma2rh_defconfig
index c0db8f14713d..3044579f171a 100644
--- a/arch/mips/configs/emma2rh_defconfig
+++ b/arch/mips/configs/emma2rh_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/ev64120_defconfig b/arch/mips/configs/ev64120_defconfig
index ce088b36291d..c10e4e063226 100644
--- a/arch/mips/configs/ev64120_defconfig
+++ b/arch/mips/configs/ev64120_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_EV64120=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/excite_defconfig b/arch/mips/configs/excite_defconfig
index 82f204d080b7..460d7a26a8ba 100644
--- a/arch/mips/configs/excite_defconfig
+++ b/arch/mips/configs/excite_defconfig
@@ -40,7 +40,6 @@ CONFIG_BASLER_EXCITE=y
40# CONFIG_MOMENCO_OCELOT_C is not set 40# CONFIG_MOMENCO_OCELOT_C is not set
41# CONFIG_MOMENCO_OCELOT_G is not set 41# CONFIG_MOMENCO_OCELOT_G is not set
42# CONFIG_MIPS_XXS1500 is not set 42# CONFIG_MIPS_XXS1500 is not set
43# CONFIG_PNX8550_V2PCI is not set
44# CONFIG_PNX8550_JBS is not set 43# CONFIG_PNX8550_JBS is not set
45# CONFIG_PNX8550_STB810 is not set 44# CONFIG_PNX8550_STB810 is not set
46# CONFIG_DDB5477 is not set 45# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig
index cb81f13bd45a..7ec618f3c8b9 100644
--- a/arch/mips/configs/ip22_defconfig
+++ b/arch/mips/configs/ip22_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig
index 46f6ac4083b9..9ddc3eff4793 100644
--- a/arch/mips/configs/ip27_defconfig
+++ b/arch/mips/configs/ip27_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig
index d9e5000d5329..8fc18809d5ff 100644
--- a/arch/mips/configs/ip32_defconfig
+++ b/arch/mips/configs/ip32_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/jaguar-atx_defconfig b/arch/mips/configs/jaguar-atx_defconfig
index 57ef0c45a62b..083104daa2ca 100644
--- a/arch/mips/configs/jaguar-atx_defconfig
+++ b/arch/mips/configs/jaguar-atx_defconfig
@@ -39,7 +39,6 @@ CONFIG_MOMENCO_JAGUAR_ATX=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig
index 21d979f8326c..9331cb0a19b1 100644
--- a/arch/mips/configs/jazz_defconfig
+++ b/arch/mips/configs/jazz_defconfig
@@ -39,7 +39,6 @@ CONFIG_MACH_JAZZ=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig
index 98b9fbc042f4..21a094752dab 100644
--- a/arch/mips/configs/jmr3927_defconfig
+++ b/arch/mips/configs/jmr3927_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/lasat200_defconfig b/arch/mips/configs/lasat200_defconfig
index b3f767ff1c5a..fd4272c1458a 100644
--- a/arch/mips/configs/lasat200_defconfig
+++ b/arch/mips/configs/lasat200_defconfig
@@ -39,7 +39,6 @@ CONFIG_LASAT=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index a5f379d626d6..1f64d7632a03 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_MALTA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/mipssim_defconfig b/arch/mips/configs/mipssim_defconfig
index 5ff53e184912..a2db5c201216 100644
--- a/arch/mips/configs/mipssim_defconfig
+++ b/arch/mips/configs/mipssim_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_SIM=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig
index 750e6445c613..ad5c0bf87b2b 100644
--- a/arch/mips/configs/mpc30x_defconfig
+++ b/arch/mips/configs/mpc30x_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/ocelot_3_defconfig b/arch/mips/configs/ocelot_3_defconfig
index 2febd0a7fba2..28547313ce13 100644
--- a/arch/mips/configs/ocelot_3_defconfig
+++ b/arch/mips/configs/ocelot_3_defconfig
@@ -39,7 +39,6 @@ CONFIG_MOMENCO_OCELOT_3=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/ocelot_c_defconfig b/arch/mips/configs/ocelot_c_defconfig
index b8f457300bbf..82ff6fc0cd41 100644
--- a/arch/mips/configs/ocelot_c_defconfig
+++ b/arch/mips/configs/ocelot_c_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39CONFIG_MOMENCO_OCELOT_C=y 39CONFIG_MOMENCO_OCELOT_C=y
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/ocelot_defconfig b/arch/mips/configs/ocelot_defconfig
index 8ade072271cd..15a027e00eec 100644
--- a/arch/mips/configs/ocelot_defconfig
+++ b/arch/mips/configs/ocelot_defconfig
@@ -39,7 +39,6 @@ CONFIG_MOMENCO_OCELOT=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/ocelot_g_defconfig b/arch/mips/configs/ocelot_g_defconfig
index d20a2216c11d..7078e6b3ea11 100644
--- a/arch/mips/configs/ocelot_g_defconfig
+++ b/arch/mips/configs/ocelot_g_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40CONFIG_MOMENCO_OCELOT_G=y 40CONFIG_MOMENCO_OCELOT_G=y
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig
index 33fcc8133bc0..69678d99ae61 100644
--- a/arch/mips/configs/pb1100_defconfig
+++ b/arch/mips/configs/pb1100_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_PB1100=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig
index e07c55dc8dc1..070672799dac 100644
--- a/arch/mips/configs/pb1500_defconfig
+++ b/arch/mips/configs/pb1500_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_PB1500=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig
index df210dd22476..354e49b7a5f1 100644
--- a/arch/mips/configs/pb1550_defconfig
+++ b/arch/mips/configs/pb1550_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_PB1550=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/pnx8550-jbs_defconfig b/arch/mips/configs/pnx8550-jbs_defconfig
index 106a1641c0b5..fae16c5ec521 100644
--- a/arch/mips/configs/pnx8550-jbs_defconfig
+++ b/arch/mips/configs/pnx8550-jbs_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43CONFIG_PNX8550_JBS=y 42CONFIG_PNX8550_JBS=y
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/pnx8550-stb810_defconfig b/arch/mips/configs/pnx8550-stb810_defconfig
index 8caa2cd1aa7c..cd821e52181d 100644
--- a/arch/mips/configs/pnx8550-stb810_defconfig
+++ b/arch/mips/configs/pnx8550-stb810_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44CONFIG_PNX8550_STB810=y 43CONFIG_PNX8550_STB810=y
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/pnx8550-v2pci_defconfig b/arch/mips/configs/pnx8550-v2pci_defconfig
index 43f1becec2a4..3d6c2d743502 100644
--- a/arch/mips/configs/pnx8550-v2pci_defconfig
+++ b/arch/mips/configs/pnx8550-v2pci_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42CONFIG_PNX8550_V2PCI=y
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/qemu_defconfig b/arch/mips/configs/qemu_defconfig
index f68396d19f9a..8e8d03157954 100644
--- a/arch/mips/configs/qemu_defconfig
+++ b/arch/mips/configs/qemu_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/rbhma4500_defconfig b/arch/mips/configs/rbhma4500_defconfig
index a6a824fcc874..29e0df9f4be0 100644
--- a/arch/mips/configs/rbhma4500_defconfig
+++ b/arch/mips/configs/rbhma4500_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig
index bee3702d501d..5593cde9f74c 100644
--- a/arch/mips/configs/rm200_defconfig
+++ b/arch/mips/configs/rm200_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig
index 3c891ed10141..6c4f09a381e2 100644
--- a/arch/mips/configs/sb1250-swarm_defconfig
+++ b/arch/mips/configs/sb1250-swarm_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/sead_defconfig b/arch/mips/configs/sead_defconfig
index e31d964a053b..988b9cdef01f 100644
--- a/arch/mips/configs/sead_defconfig
+++ b/arch/mips/configs/sead_defconfig
@@ -39,7 +39,6 @@ CONFIG_MIPS_SEAD=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig
index 5771c1aee76a..b5be8b74d896 100644
--- a/arch/mips/configs/tb0226_defconfig
+++ b/arch/mips/configs/tb0226_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/tb0229_defconfig b/arch/mips/configs/tb0229_defconfig
index a8eb4b182d34..1756d2bdf6b8 100644
--- a/arch/mips/configs/tb0229_defconfig
+++ b/arch/mips/configs/tb0229_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/tb0287_defconfig b/arch/mips/configs/tb0287_defconfig
index c58afa2eac6b..8bb6be4342b6 100644
--- a/arch/mips/configs/tb0287_defconfig
+++ b/arch/mips/configs/tb0287_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig
index 2abbd6827720..8f019ffcc71b 100644
--- a/arch/mips/configs/workpad_defconfig
+++ b/arch/mips/configs/workpad_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/wrppmc_defconfig b/arch/mips/configs/wrppmc_defconfig
index 44b6b7c1fdb6..52b48c0715d3 100644
--- a/arch/mips/configs/wrppmc_defconfig
+++ b/arch/mips/configs/wrppmc_defconfig
@@ -39,7 +39,6 @@ CONFIG_WR_PPMC=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig
index f24e1c6fc484..6824606309e5 100644
--- a/arch/mips/configs/yosemite_defconfig
+++ b/arch/mips/configs/yosemite_defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/ddb5xxx/ddb5477/irq.c b/arch/mips/ddb5xxx/ddb5477/irq.c
index 2b23234a5b95..faa4a506bf82 100644
--- a/arch/mips/ddb5xxx/ddb5477/irq.c
+++ b/arch/mips/ddb5xxx/ddb5477/irq.c
@@ -194,7 +194,7 @@ static void vrc5477_irq_dispatch(void)
194 194
195asmlinkage void plat_irq_dispatch(void) 195asmlinkage void plat_irq_dispatch(void)
196{ 196{
197 unsigned int pending = read_c0_cause() & read_c0_status(); 197 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
198 198
199 if (pending & STATUSF_IP7) 199 if (pending & STATUSF_IP7)
200 do_IRQ(CPU_IRQ_BASE + 7); 200 do_IRQ(CPU_IRQ_BASE + 7);
diff --git a/arch/mips/defconfig b/arch/mips/defconfig
index 8cb8f5919194..41211f8b7738 100644
--- a/arch/mips/defconfig
+++ b/arch/mips/defconfig
@@ -39,7 +39,6 @@ CONFIG_ZONE_DMA=y
39# CONFIG_MOMENCO_OCELOT_C is not set 39# CONFIG_MOMENCO_OCELOT_C is not set
40# CONFIG_MOMENCO_OCELOT_G is not set 40# CONFIG_MOMENCO_OCELOT_G is not set
41# CONFIG_MIPS_XXS1500 is not set 41# CONFIG_MIPS_XXS1500 is not set
42# CONFIG_PNX8550_V2PCI is not set
43# CONFIG_PNX8550_JBS is not set 42# CONFIG_PNX8550_JBS is not set
44# CONFIG_PNX8550_STB810 is not set 43# CONFIG_PNX8550_STB810 is not set
45# CONFIG_DDB5477 is not set 44# CONFIG_DDB5477 is not set
diff --git a/arch/mips/emma2rh/markeins/irq.c b/arch/mips/emma2rh/markeins/irq.c
index e26630026375..6bcf6a06367a 100644
--- a/arch/mips/emma2rh/markeins/irq.c
+++ b/arch/mips/emma2rh/markeins/irq.c
@@ -115,7 +115,7 @@ void __init arch_init_irq(void)
115 115
116asmlinkage void plat_irq_dispatch(void) 116asmlinkage void plat_irq_dispatch(void)
117{ 117{
118 unsigned int pending = read_c0_status() & read_c0_cause(); 118 unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
119 119
120 if (pending & STATUSF_IP7) 120 if (pending & STATUSF_IP7)
121 do_IRQ(CPU_IRQ_BASE + 7); 121 do_IRQ(CPU_IRQ_BASE + 7);
diff --git a/arch/mips/gt64120/ev64120/irq.c b/arch/mips/gt64120/ev64120/irq.c
index 04572b9c9642..64e4c80b6139 100644
--- a/arch/mips/gt64120/ev64120/irq.c
+++ b/arch/mips/gt64120/ev64120/irq.c
@@ -48,7 +48,7 @@
48 48
49asmlinkage void plat_irq_dispatch(void) 49asmlinkage void plat_irq_dispatch(void)
50{ 50{
51 unsigned int pending = read_c0_status() & read_c0_cause(); 51 unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
52 52
53 if (pending & STATUSF_IP4) /* int2 hardware line (timer) */ 53 if (pending & STATUSF_IP4) /* int2 hardware line (timer) */
54 do_IRQ(4); 54 do_IRQ(4);
diff --git a/arch/mips/gt64120/wrppmc/irq.c b/arch/mips/gt64120/wrppmc/irq.c
index d3d96591780e..06177bf5b1d6 100644
--- a/arch/mips/gt64120/wrppmc/irq.c
+++ b/arch/mips/gt64120/wrppmc/irq.c
@@ -32,7 +32,7 @@
32 32
33asmlinkage void plat_irq_dispatch(void) 33asmlinkage void plat_irq_dispatch(void)
34{ 34{
35 unsigned int pending = read_c0_status() & read_c0_cause(); 35 unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
36 36
37 if (pending & STATUSF_IP7) 37 if (pending & STATUSF_IP7)
38 do_IRQ(WRPPMC_MIPS_TIMER_IRQ); /* CPU Compare/Count internal timer */ 38 do_IRQ(WRPPMC_MIPS_TIMER_IRQ); /* CPU Compare/Count internal timer */
diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c
index 295892e4ce53..015cf4bb51dd 100644
--- a/arch/mips/jazz/irq.c
+++ b/arch/mips/jazz/irq.c
@@ -122,7 +122,7 @@ static void ll_local_dev(void)
122 122
123asmlinkage void plat_irq_dispatch(void) 123asmlinkage void plat_irq_dispatch(void)
124{ 124{
125 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; 125 unsigned int pending = read_c0_cause() & read_c0_status();
126 126
127 if (pending & IE_IRQ5) 127 if (pending & IE_IRQ5)
128 write_c0_compare(0); 128 write_c0_compare(0);
diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c
index 46e421e14348..e8e0ffb9354d 100644
--- a/arch/mips/jazz/jazzdma.c
+++ b/arch/mips/jazz/jazzdma.c
@@ -67,7 +67,8 @@ void __init vdma_init(void)
67 * aligned and should be uncached to avoid cache flushing after every 67 * aligned and should be uncached to avoid cache flushing after every
68 * update. 68 * update.
69 */ 69 */
70 vdma_pagetable_start = alloc_bootmem_low_pages(VDMA_PGTBL_SIZE); 70 vdma_pagetable_start =
71 (unsigned long) alloc_bootmem_low_pages(VDMA_PGTBL_SIZE);
71 if (!vdma_pagetable_start) 72 if (!vdma_pagetable_start)
72 BUG(); 73 BUG();
73 dma_cache_wback_inv(vdma_pagetable_start, VDMA_PGTBL_SIZE); 74 dma_cache_wback_inv(vdma_pagetable_start, VDMA_PGTBL_SIZE);
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index aacd4a005c5f..83843a229be7 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -181,13 +181,13 @@ NESTED(except_vec_vi, 0, sp)
181 * during service by SMTC kernel, we also want to 181 * during service by SMTC kernel, we also want to
182 * pass the IM value to be cleared. 182 * pass the IM value to be cleared.
183 */ 183 */
184EXPORT(except_vec_vi_mori) 184FEXPORT(except_vec_vi_mori)
185 ori a0, $0, 0 185 ori a0, $0, 0
186#endif /* CONFIG_MIPS_MT_SMTC */ 186#endif /* CONFIG_MIPS_MT_SMTC */
187EXPORT(except_vec_vi_lui) 187FEXPORT(except_vec_vi_lui)
188 lui v0, 0 /* Patched */ 188 lui v0, 0 /* Patched */
189 j except_vec_vi_handler 189 j except_vec_vi_handler
190EXPORT(except_vec_vi_ori) 190FEXPORT(except_vec_vi_ori)
191 ori v0, 0 /* Patched */ 191 ori v0, 0 /* Patched */
192 .set pop 192 .set pop
193 END(except_vec_vi) 193 END(except_vec_vi)
@@ -220,7 +220,17 @@ NESTED(except_vec_vi_handler, 0, sp)
220 _ehb 220 _ehb
221#endif /* CONFIG_MIPS_MT_SMTC */ 221#endif /* CONFIG_MIPS_MT_SMTC */
222 CLI 222 CLI
223#ifdef CONFIG_TRACE_IRQFLAGS
224 move s0, v0
225#ifdef CONFIG_MIPS_MT_SMTC
226 move s1, a0
227#endif
223 TRACE_IRQS_OFF 228 TRACE_IRQS_OFF
229#ifdef CONFIG_MIPS_MT_SMTC
230 move a0, s1
231#endif
232 move v0, s0
233#endif
224 234
225 LONG_L s0, TI_REGS($28) 235 LONG_L s0, TI_REGS($28)
226 LONG_S sp, TI_REGS($28) 236 LONG_S sp, TI_REGS($28)
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c
index 5929f883e46b..29eadd404fa5 100644
--- a/arch/mips/kernel/kspd.c
+++ b/arch/mips/kernel/kspd.c
@@ -70,6 +70,7 @@ static int sp_stopping = 0;
70#define MTSP_SYSCALL_GETTIME (MTSP_SYSCALL_BASE + 7) 70#define MTSP_SYSCALL_GETTIME (MTSP_SYSCALL_BASE + 7)
71#define MTSP_SYSCALL_PIPEFREQ (MTSP_SYSCALL_BASE + 8) 71#define MTSP_SYSCALL_PIPEFREQ (MTSP_SYSCALL_BASE + 8)
72#define MTSP_SYSCALL_GETTOD (MTSP_SYSCALL_BASE + 9) 72#define MTSP_SYSCALL_GETTOD (MTSP_SYSCALL_BASE + 9)
73#define MTSP_SYSCALL_IOCTL (MTSP_SYSCALL_BASE + 10)
73 74
74#define MTSP_O_RDONLY 0x0000 75#define MTSP_O_RDONLY 0x0000
75#define MTSP_O_WRONLY 0x0001 76#define MTSP_O_WRONLY 0x0001
@@ -110,7 +111,8 @@ struct apsp_table syscall_command_table[] = {
110 { MTSP_SYSCALL_CLOSE, __NR_close }, 111 { MTSP_SYSCALL_CLOSE, __NR_close },
111 { MTSP_SYSCALL_READ, __NR_read }, 112 { MTSP_SYSCALL_READ, __NR_read },
112 { MTSP_SYSCALL_WRITE, __NR_write }, 113 { MTSP_SYSCALL_WRITE, __NR_write },
113 { MTSP_SYSCALL_LSEEK32, __NR_lseek } 114 { MTSP_SYSCALL_LSEEK32, __NR_lseek },
115 { MTSP_SYSCALL_IOCTL, __NR_ioctl }
114}; 116};
115 117
116static int sp_syscall(int num, int arg0, int arg1, int arg2, int arg3) 118static int sp_syscall(int num, int arg0, int arg1, int arg2, int arg3)
@@ -189,6 +191,8 @@ void sp_work_handle_request(void)
189 struct mtsp_syscall_generic generic; 191 struct mtsp_syscall_generic generic;
190 struct mtsp_syscall_ret ret; 192 struct mtsp_syscall_ret ret;
191 struct kspd_notifications *n; 193 struct kspd_notifications *n;
194 unsigned long written;
195 mm_segment_t old_fs;
192 struct timeval tv; 196 struct timeval tv;
193 struct timezone tz; 197 struct timezone tz;
194 int cmd; 198 int cmd;
@@ -199,7 +203,11 @@ void sp_work_handle_request(void)
199 203
200 ret.retval = -1; 204 ret.retval = -1;
201 205
202 if (!rtlx_read(RTLX_CHANNEL_SYSIO, &sc, sizeof(struct mtsp_syscall), 0)) { 206 old_fs = get_fs();
207 set_fs(KERNEL_DS);
208
209 if (!rtlx_read(RTLX_CHANNEL_SYSIO, &sc, sizeof(struct mtsp_syscall))) {
210 set_fs(old_fs);
203 printk(KERN_ERR "Expected request but nothing to read\n"); 211 printk(KERN_ERR "Expected request but nothing to read\n");
204 return; 212 return;
205 } 213 }
@@ -207,7 +215,8 @@ void sp_work_handle_request(void)
207 size = sc.size; 215 size = sc.size;
208 216
209 if (size) { 217 if (size) {
210 if (!rtlx_read(RTLX_CHANNEL_SYSIO, &generic, size, 0)) { 218 if (!rtlx_read(RTLX_CHANNEL_SYSIO, &generic, size)) {
219 set_fs(old_fs);
211 printk(KERN_ERR "Expected request but nothing to read\n"); 220 printk(KERN_ERR "Expected request but nothing to read\n");
212 return; 221 return;
213 } 222 }
@@ -280,8 +289,11 @@ void sp_work_handle_request(void)
280 if (vpe_getuid(SP_VPE)) 289 if (vpe_getuid(SP_VPE))
281 sp_setfsuidgid( 0, 0); 290 sp_setfsuidgid( 0, 0);
282 291
283 if ((rtlx_write(RTLX_CHANNEL_SYSIO, &ret, sizeof(struct mtsp_syscall_ret), 0)) 292 old_fs = get_fs();
284 < sizeof(struct mtsp_syscall_ret)) 293 set_fs(KERNEL_DS);
294 written = rtlx_write(RTLX_CHANNEL_SYSIO, &ret, sizeof(ret));
295 set_fs(old_fs);
296 if (written < sizeof(ret))
285 printk("KSPD: sp_work_handle_request failed to send to SP\n"); 297 printk("KSPD: sp_work_handle_request failed to send to SP\n");
286} 298}
287 299
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index 1df544c1f966..37849edd0645 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -311,6 +311,8 @@ asmlinkage int sys32_sched_rr_get_interval(compat_pid_t pid,
311 return ret; 311 return ret;
312} 312}
313 313
314#ifdef CONFIG_SYSVIPC
315
314asmlinkage long 316asmlinkage long
315sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u32 fifth) 317sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u32 fifth)
316{ 318{
@@ -368,6 +370,16 @@ sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u32 fifth)
368 return err; 370 return err;
369} 371}
370 372
373#else
374
375asmlinkage long
376sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u32 fifth)
377{
378 return -ENOSYS;
379}
380
381#endif /* CONFIG_SYSVIPC */
382
371#ifdef CONFIG_MIPS32_N32 383#ifdef CONFIG_MIPS32_N32
372asmlinkage long sysn32_semctl(int semid, int semnum, int cmd, u32 arg) 384asmlinkage long sysn32_semctl(int semid, int semnum, int cmd, u32 arg)
373{ 385{
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S
index 656bde2e11b1..28c2e2e6af73 100644
--- a/arch/mips/kernel/r2300_switch.S
+++ b/arch/mips/kernel/r2300_switch.S
@@ -49,8 +49,7 @@ LEAF(resume)
49#ifndef CONFIG_CPU_HAS_LLSC 49#ifndef CONFIG_CPU_HAS_LLSC
50 sw zero, ll_bit 50 sw zero, ll_bit
51#endif 51#endif
52 mfc0 t1, CP0_STATUS 52 mfc0 t2, CP0_STATUS
53 sw t1, THREAD_STATUS(a0)
54 cpu_save_nonscratch a0 53 cpu_save_nonscratch a0
55 sw ra, THREAD_REG31(a0) 54 sw ra, THREAD_REG31(a0)
56 55
@@ -60,8 +59,8 @@ LEAF(resume)
60 lw t3, TASK_THREAD_INFO(a0) 59 lw t3, TASK_THREAD_INFO(a0)
61 lw t0, TI_FLAGS(t3) 60 lw t0, TI_FLAGS(t3)
62 li t1, _TIF_USEDFPU 61 li t1, _TIF_USEDFPU
63 and t2, t0, t1 62 and t1, t0
64 beqz t2, 1f 63 beqz t1, 1f
65 nor t1, zero, t1 64 nor t1, zero, t1
66 65
67 and t0, t0, t1 66 and t0, t0, t1
@@ -74,10 +73,13 @@ LEAF(resume)
74 li t1, ~ST0_CU1 73 li t1, ~ST0_CU1
75 and t0, t0, t1 74 and t0, t0, t1
76 sw t0, ST_OFF(t3) 75 sw t0, ST_OFF(t3)
76 /* clear thread_struct CU1 bit */
77 and t2, t1
77 78
78 fpu_save_single a0, t0 # clobbers t0 79 fpu_save_single a0, t0 # clobbers t0
79 80
801: 811:
82 sw t2, THREAD_STATUS(a0)
81 /* 83 /*
82 * The order of restoring the registers takes care of the race 84 * The order of restoring the registers takes care of the race
83 * updating $28, $29 and kernelsp without disabling ints. 85 * updating $28, $29 and kernelsp without disabling ints.
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S
index 59c1577ecbb3..dbd42adc52ed 100644
--- a/arch/mips/kernel/r4k_fpu.S
+++ b/arch/mips/kernel/r4k_fpu.S
@@ -114,14 +114,6 @@ LEAF(_save_fp_context32)
114 */ 114 */
115LEAF(_restore_fp_context) 115LEAF(_restore_fp_context)
116 EX lw t0, SC_FPC_CSR(a0) 116 EX lw t0, SC_FPC_CSR(a0)
117
118 /* Fail if the CSR has exceptions pending */
119 srl t1, t0, 5
120 and t1, t0
121 andi t1, 0x1f << 7
122 bnez t1, fault
123 nop
124
125#ifdef CONFIG_64BIT 117#ifdef CONFIG_64BIT
126 EX ldc1 $f1, SC_FPREGS+8(a0) 118 EX ldc1 $f1, SC_FPREGS+8(a0)
127 EX ldc1 $f3, SC_FPREGS+24(a0) 119 EX ldc1 $f3, SC_FPREGS+24(a0)
@@ -165,14 +157,6 @@ LEAF(_restore_fp_context)
165LEAF(_restore_fp_context32) 157LEAF(_restore_fp_context32)
166 /* Restore an o32 sigcontext. */ 158 /* Restore an o32 sigcontext. */
167 EX lw t0, SC32_FPC_CSR(a0) 159 EX lw t0, SC32_FPC_CSR(a0)
168
169 /* Fail if the CSR has exceptions pending */
170 srl t1, t0, 5
171 and t1, t0
172 andi t1, 0x1f << 7
173 bnez t1, fault
174 nop
175
176 EX ldc1 $f0, SC32_FPREGS+0(a0) 160 EX ldc1 $f0, SC32_FPREGS+0(a0)
177 EX ldc1 $f2, SC32_FPREGS+16(a0) 161 EX ldc1 $f2, SC32_FPREGS+16(a0)
178 EX ldc1 $f4, SC32_FPREGS+32(a0) 162 EX ldc1 $f4, SC32_FPREGS+32(a0)
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S
index cc566cf12246..c7698fd9955c 100644
--- a/arch/mips/kernel/r4k_switch.S
+++ b/arch/mips/kernel/r4k_switch.S
@@ -48,8 +48,7 @@
48#ifndef CONFIG_CPU_HAS_LLSC 48#ifndef CONFIG_CPU_HAS_LLSC
49 sw zero, ll_bit 49 sw zero, ll_bit
50#endif 50#endif
51 mfc0 t1, CP0_STATUS 51 mfc0 t2, CP0_STATUS
52 LONG_S t1, THREAD_STATUS(a0)
53 cpu_save_nonscratch a0 52 cpu_save_nonscratch a0
54 LONG_S ra, THREAD_REG31(a0) 53 LONG_S ra, THREAD_REG31(a0)
55 54
@@ -59,8 +58,8 @@
59 PTR_L t3, TASK_THREAD_INFO(a0) 58 PTR_L t3, TASK_THREAD_INFO(a0)
60 LONG_L t0, TI_FLAGS(t3) 59 LONG_L t0, TI_FLAGS(t3)
61 li t1, _TIF_USEDFPU 60 li t1, _TIF_USEDFPU
62 and t2, t0, t1 61 and t1, t0
63 beqz t2, 1f 62 beqz t1, 1f
64 nor t1, zero, t1 63 nor t1, zero, t1
65 64
66 and t0, t0, t1 65 and t0, t0, t1
@@ -73,10 +72,13 @@
73 li t1, ~ST0_CU1 72 li t1, ~ST0_CU1
74 and t0, t0, t1 73 and t0, t0, t1
75 LONG_S t0, ST_OFF(t3) 74 LONG_S t0, ST_OFF(t3)
75 /* clear thread_struct CU1 bit */
76 and t2, t1
76 77
77 fpu_save_double a0 t0 t1 # c0_status passed in t0 78 fpu_save_double a0 t0 t1 # c0_status passed in t0
78 # clobbers t1 79 # clobbers t1
791: 801:
81 LONG_S t2, THREAD_STATUS(a0)
80 82
81 /* 83 /*
82 * The order of restoring the registers takes care of the race 84 * The order of restoring the registers takes care of the race
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index e14ae09eda2b..e6e3047151a6 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -54,6 +54,7 @@ static struct chan_waitqueues {
54 wait_queue_head_t rt_queue; 54 wait_queue_head_t rt_queue;
55 wait_queue_head_t lx_queue; 55 wait_queue_head_t lx_queue;
56 atomic_t in_open; 56 atomic_t in_open;
57 struct mutex mutex;
57} channel_wqs[RTLX_CHANNELS]; 58} channel_wqs[RTLX_CHANNELS];
58 59
59static struct irqaction irq; 60static struct irqaction irq;
@@ -146,7 +147,7 @@ static void stopping(int vpe)
146 147
147int rtlx_open(int index, int can_sleep) 148int rtlx_open(int index, int can_sleep)
148{ 149{
149 volatile struct rtlx_info **p; 150 struct rtlx_info **p;
150 struct rtlx_channel *chan; 151 struct rtlx_channel *chan;
151 enum rtlx_state state; 152 enum rtlx_state state;
152 int ret = 0; 153 int ret = 0;
@@ -179,13 +180,24 @@ int rtlx_open(int index, int can_sleep)
179 } 180 }
180 } 181 }
181 182
183 smp_rmb();
182 if (*p == NULL) { 184 if (*p == NULL) {
183 if (can_sleep) { 185 if (can_sleep) {
184 __wait_event_interruptible(channel_wqs[index].lx_queue, 186 DEFINE_WAIT(wait);
185 *p != NULL, 187
186 ret); 188 for (;;) {
187 if (ret) 189 prepare_to_wait(&channel_wqs[index].lx_queue, &wait, TASK_INTERRUPTIBLE);
190 smp_rmb();
191 if (*p != NULL)
192 break;
193 if (!signal_pending(current)) {
194 schedule();
195 continue;
196 }
197 ret = -ERESTARTSYS;
188 goto out_fail; 198 goto out_fail;
199 }
200 finish_wait(&channel_wqs[index].lx_queue, &wait);
189 } else { 201 } else {
190 printk(" *vpe_get_shared is NULL. " 202 printk(" *vpe_get_shared is NULL. "
191 "Has an SP program been loaded?\n"); 203 "Has an SP program been loaded?\n");
@@ -277,56 +289,52 @@ unsigned int rtlx_write_poll(int index)
277 return write_spacefree(chan->rt_read, chan->rt_write, chan->buffer_size); 289 return write_spacefree(chan->rt_read, chan->rt_write, chan->buffer_size);
278} 290}
279 291
280static inline void copy_to(void *dst, void *src, size_t count, int user) 292ssize_t rtlx_read(int index, void __user *buff, size_t count, int user)
281{
282 if (user)
283 copy_to_user(dst, src, count);
284 else
285 memcpy(dst, src, count);
286}
287
288static inline void copy_from(void *dst, void *src, size_t count, int user)
289{ 293{
290 if (user) 294 size_t lx_write, fl = 0L;
291 copy_from_user(dst, src, count);
292 else
293 memcpy(dst, src, count);
294}
295
296ssize_t rtlx_read(int index, void *buff, size_t count, int user)
297{
298 size_t fl = 0L;
299 struct rtlx_channel *lx; 295 struct rtlx_channel *lx;
296 unsigned long failed;
300 297
301 if (rtlx == NULL) 298 if (rtlx == NULL)
302 return -ENOSYS; 299 return -ENOSYS;
303 300
304 lx = &rtlx->channel[index]; 301 lx = &rtlx->channel[index];
305 302
303 mutex_lock(&channel_wqs[index].mutex);
304 smp_rmb();
305 lx_write = lx->lx_write;
306
306 /* find out how much in total */ 307 /* find out how much in total */
307 count = min(count, 308 count = min(count,
308 (size_t)(lx->lx_write + lx->buffer_size - lx->lx_read) 309 (size_t)(lx_write + lx->buffer_size - lx->lx_read)
309 % lx->buffer_size); 310 % lx->buffer_size);
310 311
311 /* then how much from the read pointer onwards */ 312 /* then how much from the read pointer onwards */
312 fl = min( count, (size_t)lx->buffer_size - lx->lx_read); 313 fl = min(count, (size_t)lx->buffer_size - lx->lx_read);
313 314
314 copy_to(buff, &lx->lx_buffer[lx->lx_read], fl, user); 315 failed = copy_to_user(buff, lx->lx_buffer + lx->lx_read, fl);
316 if (failed)
317 goto out;
315 318
316 /* and if there is anything left at the beginning of the buffer */ 319 /* and if there is anything left at the beginning of the buffer */
317 if ( count - fl ) 320 if (count - fl)
318 copy_to (buff + fl, lx->lx_buffer, count - fl, user); 321 failed = copy_to_user(buff + fl, lx->lx_buffer, count - fl);
319 322
320 /* update the index */ 323out:
321 lx->lx_read += count; 324 count -= failed;
322 lx->lx_read %= lx->buffer_size; 325
326 smp_wmb();
327 lx->lx_read = (lx->lx_read + count) % lx->buffer_size;
328 smp_wmb();
329 mutex_unlock(&channel_wqs[index].mutex);
323 330
324 return count; 331 return count;
325} 332}
326 333
327ssize_t rtlx_write(int index, void *buffer, size_t count, int user) 334ssize_t rtlx_write(int index, const void __user *buffer, size_t count, int user)
328{ 335{
329 struct rtlx_channel *rt; 336 struct rtlx_channel *rt;
337 size_t rt_read;
330 size_t fl; 338 size_t fl;
331 339
332 if (rtlx == NULL) 340 if (rtlx == NULL)
@@ -334,24 +342,35 @@ ssize_t rtlx_write(int index, void *buffer, size_t count, int user)
334 342
335 rt = &rtlx->channel[index]; 343 rt = &rtlx->channel[index];
336 344
345 mutex_lock(&channel_wqs[index].mutex);
346 smp_rmb();
347 rt_read = rt->rt_read;
348
337 /* total number of bytes to copy */ 349 /* total number of bytes to copy */
338 count = min(count, 350 count = min(count,
339 (size_t)write_spacefree(rt->rt_read, rt->rt_write, 351 (size_t)write_spacefree(rt_read, rt->rt_write, rt->buffer_size));
340 rt->buffer_size));
341 352
342 /* first bit from write pointer to the end of the buffer, or count */ 353 /* first bit from write pointer to the end of the buffer, or count */
343 fl = min(count, (size_t) rt->buffer_size - rt->rt_write); 354 fl = min(count, (size_t) rt->buffer_size - rt->rt_write);
344 355
345 copy_from (&rt->rt_buffer[rt->rt_write], buffer, fl, user); 356 failed = copy_from_user(rt->rt_buffer + rt->rt_write, buffer, fl);
357 if (failed)
358 goto out;
346 359
347 /* if there's any left copy to the beginning of the buffer */ 360 /* if there's any left copy to the beginning of the buffer */
348 if( count - fl ) 361 if (count - fl) {
349 copy_from (rt->rt_buffer, buffer + fl, count - fl, user); 362 failed = copy_from_user(rt->rt_buffer, buffer + fl, count - fl);
363 }
364
365out:
366 count -= cailed;
350 367
351 rt->rt_write += count; 368 smp_wmb();
352 rt->rt_write %= rt->buffer_size; 369 rt->rt_write = (rt->rt_write + count) % rt->buffer_size;
370 smp_wmb();
371 mutex_unlock(&channel_wqs[index].mutex);
353 372
354 return(count); 373 return count;
355} 374}
356 375
357 376
@@ -403,7 +422,7 @@ static ssize_t file_read(struct file *file, char __user * buffer, size_t count,
403 return 0; // -EAGAIN makes cat whinge 422 return 0; // -EAGAIN makes cat whinge
404 } 423 }
405 424
406 return rtlx_read(minor, buffer, count, 1); 425 return rtlx_read(minor, buffer, count);
407} 426}
408 427
409static ssize_t file_write(struct file *file, const char __user * buffer, 428static ssize_t file_write(struct file *file, const char __user * buffer,
@@ -429,7 +448,7 @@ static ssize_t file_write(struct file *file, const char __user * buffer,
429 return ret; 448 return ret;
430 } 449 }
431 450
432 return rtlx_write(minor, (void *)buffer, count, 1); 451 return rtlx_write(minor, buffer, count);
433} 452}
434 453
435static const struct file_operations rtlx_fops = { 454static const struct file_operations rtlx_fops = {
@@ -468,6 +487,7 @@ static int rtlx_module_init(void)
468 init_waitqueue_head(&channel_wqs[i].rt_queue); 487 init_waitqueue_head(&channel_wqs[i].rt_queue);
469 init_waitqueue_head(&channel_wqs[i].lx_queue); 488 init_waitqueue_head(&channel_wqs[i].lx_queue);
470 atomic_set(&channel_wqs[i].in_open, 0); 489 atomic_set(&channel_wqs[i].in_open, 0);
490 mutex_init(&channel_wqs[i].mutex);
471 491
472 dev = device_create(mt_class, NULL, MKDEV(major, i), 492 dev = device_create(mt_class, NULL, MKDEV(major, i),
473 "%s%d", module_name, i); 493 "%s%d", module_name, i);
diff --git a/arch/mips/kernel/signal-common.h b/arch/mips/kernel/signal-common.h
index fdbdbdc65b54..297dfcb97524 100644
--- a/arch/mips/kernel/signal-common.h
+++ b/arch/mips/kernel/signal-common.h
@@ -31,4 +31,7 @@ extern void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
31 */ 31 */
32extern int install_sigtramp(unsigned int __user *tramp, unsigned int syscall); 32extern int install_sigtramp(unsigned int __user *tramp, unsigned int syscall);
33 33
34/* Check and clear pending FPU exceptions in saved CSR */
35extern int fpcsr_pending(unsigned int __user *fpcsr);
36
34#endif /* __SIGNAL_COMMON_H */ 37#endif /* __SIGNAL_COMMON_H */
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index f091786187a6..8c3c5a5789b0 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -82,6 +82,7 @@ int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
82{ 82{
83 int err = 0; 83 int err = 0;
84 int i; 84 int i;
85 unsigned int used_math;
85 86
86 err |= __put_user(regs->cp0_epc, &sc->sc_pc); 87 err |= __put_user(regs->cp0_epc, &sc->sc_pc);
87 88
@@ -104,26 +105,53 @@ int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
104 err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp); 105 err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp);
105 } 106 }
106 107
107 err |= __put_user(!!used_math(), &sc->sc_used_math); 108 used_math = !!used_math();
109 err |= __put_user(used_math, &sc->sc_used_math);
108 110
109 if (used_math()) { 111 if (used_math) {
110 /* 112 /*
111 * Save FPU state to signal context. Signal handler 113 * Save FPU state to signal context. Signal handler
112 * will "inherit" current FPU state. 114 * will "inherit" current FPU state.
113 */ 115 */
114 preempt_disable(); 116 own_fpu(1);
115 117 enable_fp_in_kernel();
116 if (!is_fpu_owner()) {
117 own_fpu();
118 restore_fp(current);
119 }
120 err |= save_fp_context(sc); 118 err |= save_fp_context(sc);
121 119 disable_fp_in_kernel();
122 preempt_enable();
123 } 120 }
124 return err; 121 return err;
125} 122}
126 123
124int fpcsr_pending(unsigned int __user *fpcsr)
125{
126 int err, sig = 0;
127 unsigned int csr, enabled;
128
129 err = __get_user(csr, fpcsr);
130 enabled = FPU_CSR_UNI_X | ((csr & FPU_CSR_ALL_E) << 5);
131 /*
132 * If the signal handler set some FPU exceptions, clear it and
133 * send SIGFPE.
134 */
135 if (csr & enabled) {
136 csr &= ~enabled;
137 err |= __put_user(csr, fpcsr);
138 sig = SIGFPE;
139 }
140 return err ?: sig;
141}
142
143static int
144check_and_restore_fp_context(struct sigcontext __user *sc)
145{
146 int err, sig;
147
148 err = sig = fpcsr_pending(&sc->sc_fpc_csr);
149 if (err > 0)
150 err = 0;
151 err |= restore_fp_context(sc);
152 return err ?: sig;
153}
154
127int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) 155int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
128{ 156{
129 unsigned int used_math; 157 unsigned int used_math;
@@ -157,19 +185,18 @@ int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
157 err |= __get_user(used_math, &sc->sc_used_math); 185 err |= __get_user(used_math, &sc->sc_used_math);
158 conditional_used_math(used_math); 186 conditional_used_math(used_math);
159 187
160 preempt_disable(); 188 if (used_math) {
161
162 if (used_math()) {
163 /* restore fpu context if we have used it before */ 189 /* restore fpu context if we have used it before */
164 own_fpu(); 190 own_fpu(0);
165 err |= restore_fp_context(sc); 191 enable_fp_in_kernel();
192 if (!err)
193 err = check_and_restore_fp_context(sc);
194 disable_fp_in_kernel();
166 } else { 195 } else {
167 /* signal handler may have used FPU. Give it up. */ 196 /* signal handler may have used FPU. Give it up. */
168 lose_fpu(); 197 lose_fpu(0);
169 } 198 }
170 199
171 preempt_enable();
172
173 return err; 200 return err;
174} 201}
175 202
@@ -332,6 +359,7 @@ asmlinkage void sys_sigreturn(nabi_no_regargs struct pt_regs regs)
332{ 359{
333 struct sigframe __user *frame; 360 struct sigframe __user *frame;
334 sigset_t blocked; 361 sigset_t blocked;
362 int sig;
335 363
336 frame = (struct sigframe __user *) regs.regs[29]; 364 frame = (struct sigframe __user *) regs.regs[29];
337 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 365 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
@@ -345,8 +373,11 @@ asmlinkage void sys_sigreturn(nabi_no_regargs struct pt_regs regs)
345 recalc_sigpending(); 373 recalc_sigpending();
346 spin_unlock_irq(&current->sighand->siglock); 374 spin_unlock_irq(&current->sighand->siglock);
347 375
348 if (restore_sigcontext(&regs, &frame->sf_sc)) 376 sig = restore_sigcontext(&regs, &frame->sf_sc);
377 if (sig < 0)
349 goto badframe; 378 goto badframe;
379 else if (sig)
380 force_sig(sig, current);
350 381
351 /* 382 /*
352 * Don't let your children do this ... 383 * Don't let your children do this ...
@@ -368,6 +399,7 @@ asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
368 struct rt_sigframe __user *frame; 399 struct rt_sigframe __user *frame;
369 sigset_t set; 400 sigset_t set;
370 stack_t st; 401 stack_t st;
402 int sig;
371 403
372 frame = (struct rt_sigframe __user *) regs.regs[29]; 404 frame = (struct rt_sigframe __user *) regs.regs[29];
373 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 405 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
@@ -381,8 +413,11 @@ asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
381 recalc_sigpending(); 413 recalc_sigpending();
382 spin_unlock_irq(&current->sighand->siglock); 414 spin_unlock_irq(&current->sighand->siglock);
383 415
384 if (restore_sigcontext(&regs, &frame->rs_uc.uc_mcontext)) 416 sig = restore_sigcontext(&regs, &frame->rs_uc.uc_mcontext);
417 if (sig < 0)
385 goto badframe; 418 goto badframe;
419 else if (sig)
420 force_sig(sig, current);
386 421
387 if (__copy_from_user(&st, &frame->rs_uc.uc_stack, sizeof(st))) 422 if (__copy_from_user(&st, &frame->rs_uc.uc_stack, sizeof(st)))
388 goto badframe; 423 goto badframe;
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index 19bbef001959..151fd2f0893a 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -181,6 +181,7 @@ static int setup_sigcontext32(struct pt_regs *regs,
181{ 181{
182 int err = 0; 182 int err = 0;
183 int i; 183 int i;
184 u32 used_math;
184 185
185 err |= __put_user(regs->cp0_epc, &sc->sc_pc); 186 err |= __put_user(regs->cp0_epc, &sc->sc_pc);
186 187
@@ -200,26 +201,34 @@ static int setup_sigcontext32(struct pt_regs *regs,
200 err |= __put_user(mflo3(), &sc->sc_lo3); 201 err |= __put_user(mflo3(), &sc->sc_lo3);
201 } 202 }
202 203
203 err |= __put_user(!!used_math(), &sc->sc_used_math); 204 used_math = !!used_math();
205 err |= __put_user(used_math, &sc->sc_used_math);
204 206
205 if (used_math()) { 207 if (used_math) {
206 /* 208 /*
207 * Save FPU state to signal context. Signal handler 209 * Save FPU state to signal context. Signal handler
208 * will "inherit" current FPU state. 210 * will "inherit" current FPU state.
209 */ 211 */
210 preempt_disable(); 212 own_fpu(1);
211 213 enable_fp_in_kernel();
212 if (!is_fpu_owner()) {
213 own_fpu();
214 restore_fp(current);
215 }
216 err |= save_fp_context32(sc); 214 err |= save_fp_context32(sc);
217 215 disable_fp_in_kernel();
218 preempt_enable();
219 } 216 }
220 return err; 217 return err;
221} 218}
222 219
220static int
221check_and_restore_fp_context32(struct sigcontext32 __user *sc)
222{
223 int err, sig;
224
225 err = sig = fpcsr_pending(&sc->sc_fpc_csr);
226 if (err > 0)
227 err = 0;
228 err |= restore_fp_context32(sc);
229 return err ?: sig;
230}
231
223static int restore_sigcontext32(struct pt_regs *regs, 232static int restore_sigcontext32(struct pt_regs *regs,
224 struct sigcontext32 __user *sc) 233 struct sigcontext32 __user *sc)
225{ 234{
@@ -250,19 +259,18 @@ static int restore_sigcontext32(struct pt_regs *regs,
250 err |= __get_user(used_math, &sc->sc_used_math); 259 err |= __get_user(used_math, &sc->sc_used_math);
251 conditional_used_math(used_math); 260 conditional_used_math(used_math);
252 261
253 preempt_disable(); 262 if (used_math) {
254
255 if (used_math()) {
256 /* restore fpu context if we have used it before */ 263 /* restore fpu context if we have used it before */
257 own_fpu(); 264 own_fpu(0);
258 err |= restore_fp_context32(sc); 265 enable_fp_in_kernel();
266 if (!err)
267 err = check_and_restore_fp_context32(sc);
268 disable_fp_in_kernel();
259 } else { 269 } else {
260 /* signal handler may have used FPU. Give it up. */ 270 /* signal handler may have used FPU. Give it up. */
261 lose_fpu(); 271 lose_fpu(0);
262 } 272 }
263 273
264 preempt_enable();
265
266 return err; 274 return err;
267} 275}
268 276
@@ -508,6 +516,7 @@ asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs)
508{ 516{
509 struct sigframe32 __user *frame; 517 struct sigframe32 __user *frame;
510 sigset_t blocked; 518 sigset_t blocked;
519 int sig;
511 520
512 frame = (struct sigframe32 __user *) regs.regs[29]; 521 frame = (struct sigframe32 __user *) regs.regs[29];
513 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 522 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
@@ -521,8 +530,11 @@ asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs)
521 recalc_sigpending(); 530 recalc_sigpending();
522 spin_unlock_irq(&current->sighand->siglock); 531 spin_unlock_irq(&current->sighand->siglock);
523 532
524 if (restore_sigcontext32(&regs, &frame->sf_sc)) 533 sig = restore_sigcontext32(&regs, &frame->sf_sc);
534 if (sig < 0)
525 goto badframe; 535 goto badframe;
536 else if (sig)
537 force_sig(sig, current);
526 538
527 /* 539 /*
528 * Don't let your children do this ... 540 * Don't let your children do this ...
@@ -545,6 +557,7 @@ asmlinkage void sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
545 sigset_t set; 557 sigset_t set;
546 stack_t st; 558 stack_t st;
547 s32 sp; 559 s32 sp;
560 int sig;
548 561
549 frame = (struct rt_sigframe32 __user *) regs.regs[29]; 562 frame = (struct rt_sigframe32 __user *) regs.regs[29];
550 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 563 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
@@ -558,8 +571,11 @@ asmlinkage void sys32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
558 recalc_sigpending(); 571 recalc_sigpending();
559 spin_unlock_irq(&current->sighand->siglock); 572 spin_unlock_irq(&current->sighand->siglock);
560 573
561 if (restore_sigcontext32(&regs, &frame->rs_uc.uc_mcontext)) 574 sig = restore_sigcontext32(&regs, &frame->rs_uc.uc_mcontext);
575 if (sig < 0)
562 goto badframe; 576 goto badframe;
577 else if (sig)
578 force_sig(sig, current);
563 579
564 /* The ucontext contains a stack32_t, so we must convert! */ 580 /* The ucontext contains a stack32_t, so we must convert! */
565 if (__get_user(sp, &frame->rs_uc.uc_stack.ss_sp)) 581 if (__get_user(sp, &frame->rs_uc.uc_stack.ss_sp))
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c
index ecf1f7ecaad9..a9202fa95987 100644
--- a/arch/mips/kernel/signal_n32.c
+++ b/arch/mips/kernel/signal_n32.c
@@ -127,6 +127,7 @@ asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
127 sigset_t set; 127 sigset_t set;
128 stack_t st; 128 stack_t st;
129 s32 sp; 129 s32 sp;
130 int sig;
130 131
131 frame = (struct rt_sigframe_n32 __user *) regs.regs[29]; 132 frame = (struct rt_sigframe_n32 __user *) regs.regs[29];
132 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 133 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
@@ -140,8 +141,11 @@ asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
140 recalc_sigpending(); 141 recalc_sigpending();
141 spin_unlock_irq(&current->sighand->siglock); 142 spin_unlock_irq(&current->sighand->siglock);
142 143
143 if (restore_sigcontext(&regs, &frame->rs_uc.uc_mcontext)) 144 sig = restore_sigcontext(&regs, &frame->rs_uc.uc_mcontext);
145 if (sig < 0)
144 goto badframe; 146 goto badframe;
147 else if (sig)
148 force_sig(sig, current);
145 149
146 /* The ucontext contains a stack32_t, so we must convert! */ 150 /* The ucontext contains a stack32_t, so we must convert! */
147 if (__get_user(sp, &frame->rs_uc.uc_stack.ss_sp)) 151 if (__get_user(sp, &frame->rs_uc.uc_stack.ss_sp))
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 18f56a9dbcfa..7d76a85422b2 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -610,16 +610,6 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31)
610 if (fcr31 & FPU_CSR_UNI_X) { 610 if (fcr31 & FPU_CSR_UNI_X) {
611 int sig; 611 int sig;
612 612
613 preempt_disable();
614
615#ifdef CONFIG_PREEMPT
616 if (!is_fpu_owner()) {
617 /* We might lose fpu before disabling preempt... */
618 own_fpu();
619 BUG_ON(!used_math());
620 restore_fp(current);
621 }
622#endif
623 /* 613 /*
624 * Unimplemented operation exception. If we've got the full 614 * Unimplemented operation exception. If we've got the full
625 * software emulator on-board, let's use it... 615 * software emulator on-board, let's use it...
@@ -630,18 +620,12 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31)
630 * register operands before invoking the emulator, which seems 620 * register operands before invoking the emulator, which seems
631 * a bit extreme for what should be an infrequent event. 621 * a bit extreme for what should be an infrequent event.
632 */ 622 */
633 save_fp(current);
634 /* Ensure 'resume' not overwrite saved fp context again. */ 623 /* Ensure 'resume' not overwrite saved fp context again. */
635 lose_fpu(); 624 lose_fpu(1);
636
637 preempt_enable();
638 625
639 /* Run the emulator */ 626 /* Run the emulator */
640 sig = fpu_emulator_cop1Handler (regs, &current->thread.fpu, 1); 627 sig = fpu_emulator_cop1Handler (regs, &current->thread.fpu, 1);
641 628
642 preempt_disable();
643
644 own_fpu(); /* Using the FPU again. */
645 /* 629 /*
646 * We can't allow the emulated instruction to leave any of 630 * We can't allow the emulated instruction to leave any of
647 * the cause bit set in $fcr31. 631 * the cause bit set in $fcr31.
@@ -649,9 +633,7 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31)
649 current->thread.fpu.fcr31 &= ~FPU_CSR_ALL_X; 633 current->thread.fpu.fcr31 &= ~FPU_CSR_ALL_X;
650 634
651 /* Restore the hardware register state */ 635 /* Restore the hardware register state */
652 restore_fp(current); 636 own_fpu(1); /* Using the FPU again. */
653
654 preempt_enable();
655 637
656 /* If something went wrong, signal */ 638 /* If something went wrong, signal */
657 if (sig) 639 if (sig)
@@ -775,12 +757,11 @@ asmlinkage void do_cpu(struct pt_regs *regs)
775{ 757{
776 unsigned int cpid; 758 unsigned int cpid;
777 759
778 die_if_kernel("do_cpu invoked from kernel context!", regs);
779
780 cpid = (regs->cp0_cause >> CAUSEB_CE) & 3; 760 cpid = (regs->cp0_cause >> CAUSEB_CE) & 3;
781 761
782 switch (cpid) { 762 switch (cpid) {
783 case 0: 763 case 0:
764 die_if_kernel("do_cpu invoked from kernel context!", regs);
784 if (!cpu_has_llsc) 765 if (!cpu_has_llsc)
785 if (!simulate_llsc(regs)) 766 if (!simulate_llsc(regs))
786 return; 767 return;
@@ -791,21 +772,30 @@ asmlinkage void do_cpu(struct pt_regs *regs)
791 break; 772 break;
792 773
793 case 1: 774 case 1:
794 preempt_disable(); 775 if (!test_thread_flag(TIF_ALLOW_FP_IN_KERNEL))
795 776 die_if_kernel("do_cpu invoked from kernel context!",
796 own_fpu(); 777 regs);
797 if (used_math()) { /* Using the FPU again. */ 778 if (used_math()) /* Using the FPU again. */
798 restore_fp(current); 779 own_fpu(1);
799 } else { /* First time FPU user. */ 780 else { /* First time FPU user. */
800 init_fpu(); 781 init_fpu();
801 set_used_math(); 782 set_used_math();
802 } 783 }
803 784
804 if (cpu_has_fpu) { 785 if (raw_cpu_has_fpu) {
805 preempt_enable(); 786 if (test_thread_flag(TIF_ALLOW_FP_IN_KERNEL)) {
787 local_irq_disable();
788 if (cpu_has_fpu)
789 regs->cp0_status |= ST0_CU1;
790 /*
791 * We must return without enabling
792 * interrupts to ensure keep FPU
793 * ownership until resume.
794 */
795 return;
796 }
806 } else { 797 } else {
807 int sig; 798 int sig;
808 preempt_enable();
809 sig = fpu_emulator_cop1Handler(regs, 799 sig = fpu_emulator_cop1Handler(regs,
810 &current->thread.fpu, 0); 800 &current->thread.fpu, 0);
811 if (sig) 801 if (sig)
@@ -1259,26 +1249,26 @@ static inline void mips_srs_init(void)
1259/* 1249/*
1260 * This is used by native signal handling 1250 * This is used by native signal handling
1261 */ 1251 */
1262asmlinkage int (*save_fp_context)(struct sigcontext *sc); 1252asmlinkage int (*save_fp_context)(struct sigcontext __user *sc);
1263asmlinkage int (*restore_fp_context)(struct sigcontext *sc); 1253asmlinkage int (*restore_fp_context)(struct sigcontext __user *sc);
1264 1254
1265extern asmlinkage int _save_fp_context(struct sigcontext *sc); 1255extern asmlinkage int _save_fp_context(struct sigcontext __user *sc);
1266extern asmlinkage int _restore_fp_context(struct sigcontext *sc); 1256extern asmlinkage int _restore_fp_context(struct sigcontext __user *sc);
1267 1257
1268extern asmlinkage int fpu_emulator_save_context(struct sigcontext *sc); 1258extern asmlinkage int fpu_emulator_save_context(struct sigcontext __user *sc);
1269extern asmlinkage int fpu_emulator_restore_context(struct sigcontext *sc); 1259extern asmlinkage int fpu_emulator_restore_context(struct sigcontext __user *sc);
1270 1260
1271#ifdef CONFIG_SMP 1261#ifdef CONFIG_SMP
1272static int smp_save_fp_context(struct sigcontext *sc) 1262static int smp_save_fp_context(struct sigcontext __user *sc)
1273{ 1263{
1274 return cpu_has_fpu 1264 return raw_cpu_has_fpu
1275 ? _save_fp_context(sc) 1265 ? _save_fp_context(sc)
1276 : fpu_emulator_save_context(sc); 1266 : fpu_emulator_save_context(sc);
1277} 1267}
1278 1268
1279static int smp_restore_fp_context(struct sigcontext *sc) 1269static int smp_restore_fp_context(struct sigcontext __user *sc)
1280{ 1270{
1281 return cpu_has_fpu 1271 return raw_cpu_has_fpu
1282 ? _restore_fp_context(sc) 1272 ? _restore_fp_context(sc)
1283 : fpu_emulator_restore_context(sc); 1273 : fpu_emulator_restore_context(sc);
1284} 1274}
@@ -1306,14 +1296,14 @@ static inline void signal_init(void)
1306/* 1296/*
1307 * This is used by 32-bit signal stuff on the 64-bit kernel 1297 * This is used by 32-bit signal stuff on the 64-bit kernel
1308 */ 1298 */
1309asmlinkage int (*save_fp_context32)(struct sigcontext32 *sc); 1299asmlinkage int (*save_fp_context32)(struct sigcontext32 __user *sc);
1310asmlinkage int (*restore_fp_context32)(struct sigcontext32 *sc); 1300asmlinkage int (*restore_fp_context32)(struct sigcontext32 __user *sc);
1311 1301
1312extern asmlinkage int _save_fp_context32(struct sigcontext32 *sc); 1302extern asmlinkage int _save_fp_context32(struct sigcontext32 __user *sc);
1313extern asmlinkage int _restore_fp_context32(struct sigcontext32 *sc); 1303extern asmlinkage int _restore_fp_context32(struct sigcontext32 __user *sc);
1314 1304
1315extern asmlinkage int fpu_emulator_save_context32(struct sigcontext32 *sc); 1305extern asmlinkage int fpu_emulator_save_context32(struct sigcontext32 __user *sc);
1316extern asmlinkage int fpu_emulator_restore_context32(struct sigcontext32 *sc); 1306extern asmlinkage int fpu_emulator_restore_context32(struct sigcontext32 __user *sc);
1317 1307
1318static inline void signal32_init(void) 1308static inline void signal32_init(void)
1319{ 1309{
diff --git a/arch/mips/math-emu/kernel_linkage.c b/arch/mips/math-emu/kernel_linkage.c
index 5b3390f64917..ed49ef01ac53 100644
--- a/arch/mips/math-emu/kernel_linkage.c
+++ b/arch/mips/math-emu/kernel_linkage.c
@@ -51,7 +51,7 @@ void fpu_emulator_init_fpu(void)
51 * with appropriate macros from uaccess.h 51 * with appropriate macros from uaccess.h
52 */ 52 */
53 53
54int fpu_emulator_save_context(struct sigcontext *sc) 54int fpu_emulator_save_context(struct sigcontext __user *sc)
55{ 55{
56 int i; 56 int i;
57 int err = 0; 57 int err = 0;
@@ -65,7 +65,7 @@ int fpu_emulator_save_context(struct sigcontext *sc)
65 return err; 65 return err;
66} 66}
67 67
68int fpu_emulator_restore_context(struct sigcontext *sc) 68int fpu_emulator_restore_context(struct sigcontext __user *sc)
69{ 69{
70 int i; 70 int i;
71 int err = 0; 71 int err = 0;
@@ -84,7 +84,7 @@ int fpu_emulator_restore_context(struct sigcontext *sc)
84 * This is the o32 version 84 * This is the o32 version
85 */ 85 */
86 86
87int fpu_emulator_save_context32(struct sigcontext32 *sc) 87int fpu_emulator_save_context32(struct sigcontext32 __user *sc)
88{ 88{
89 int i; 89 int i;
90 int err = 0; 90 int err = 0;
@@ -98,7 +98,7 @@ int fpu_emulator_save_context32(struct sigcontext32 *sc)
98 return err; 98 return err;
99} 99}
100 100
101int fpu_emulator_restore_context32(struct sigcontext32 *sc) 101int fpu_emulator_restore_context32(struct sigcontext32 __user *sc)
102{ 102{
103 int i; 103 int i;
104 int err = 0; 104 int err = 0;
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c
index 1acdf091c258..88e9c2a7a2f9 100644
--- a/arch/mips/mips-boards/generic/init.c
+++ b/arch/mips/mips-boards/generic/init.c
@@ -145,7 +145,7 @@ static void __init console_config(void)
145 char parity = '\0', bits = '\0', flow = '\0'; 145 char parity = '\0', bits = '\0', flow = '\0';
146 char *s; 146 char *s;
147 147
148 if ((strstr(prom_getcmdline(), "console=ttyS")) == NULL) { 148 if ((strstr(prom_getcmdline(), "console=")) == NULL) {
149 s = prom_getenv("modetty0"); 149 s = prom_getenv("modetty0");
150 if (s) { 150 if (s) {
151 while (*s >= '0' && *s <= '9') 151 while (*s >= '0' && *s <= '9')
diff --git a/arch/mips/mm/c-r3k.c b/arch/mips/mm/c-r3k.c
index d1af42c2a52e..59868a1edf66 100644
--- a/arch/mips/mm/c-r3k.c
+++ b/arch/mips/mm/c-r3k.c
@@ -260,7 +260,7 @@ static void r3k_flush_cache_page(struct vm_area_struct *vma, unsigned long page,
260{ 260{
261} 261}
262 262
263static void local_r3k_flush_data_cache_page(unsigned long addr) 263static void local_r3k_flush_data_cache_page(void *addr)
264{ 264{
265} 265}
266 266
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index 31819c58bffa..4e8f1b683376 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -3,7 +3,8 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 1994 - 2003 by Ralf Baechle 6 * Copyright (C) 1994 - 2003, 07 by Ralf Baechle (ralf@linux-mips.org)
7 * Copyright (C) 2007 MIPS Technologies, Inc.
7 */ 8 */
8#include <linux/init.h> 9#include <linux/init.h>
9#include <linux/kernel.h> 10#include <linux/kernel.h>
@@ -88,6 +89,19 @@ void __flush_dcache_page(struct page *page)
88 89
89EXPORT_SYMBOL(__flush_dcache_page); 90EXPORT_SYMBOL(__flush_dcache_page);
90 91
92void __flush_anon_page(struct page *page, unsigned long vmaddr)
93{
94 if (pages_do_alias((unsigned long)page_address(page), vmaddr)) {
95 void *kaddr;
96
97 kaddr = kmap_coherent(page, vmaddr);
98 flush_data_cache_page((unsigned long)kaddr);
99 kunmap_coherent(kaddr);
100 }
101}
102
103EXPORT_SYMBOL(__flush_anon_page);
104
91void __update_cache(struct vm_area_struct *vma, unsigned long address, 105void __update_cache(struct vm_area_struct *vma, unsigned long address,
92 pte_t pte) 106 pte_t pte)
93{ 107{
diff --git a/arch/mips/mm/cerr-sb1.c b/arch/mips/mm/cerr-sb1.c
index 11a916629d3b..4c72e650f9b6 100644
--- a/arch/mips/mm/cerr-sb1.c
+++ b/arch/mips/mm/cerr-sb1.c
@@ -177,8 +177,8 @@ extern void check_bus_watcher(void);
177 177
178asmlinkage void sb1_cache_error(void) 178asmlinkage void sb1_cache_error(void)
179{ 179{
180 uint64_t cerr_dpa;
181 uint32_t errctl, cerr_i, cerr_d, dpalo, dpahi, eepc, res; 180 uint32_t errctl, cerr_i, cerr_d, dpalo, dpahi, eepc, res;
181 unsigned long long cerr_dpa;
182 182
183#ifdef CONFIG_SIBYTE_BW_TRACE 183#ifdef CONFIG_SIBYTE_BW_TRACE
184 /* Freeze the trace buffer now */ 184 /* Freeze the trace buffer now */
@@ -329,8 +329,9 @@ static uint32_t extract_ic(unsigned short addr, int data)
329{ 329{
330 unsigned short way; 330 unsigned short way;
331 int valid; 331 int valid;
332 uint64_t taglo, va, tlo_tmp;
333 uint32_t taghi, taglolo, taglohi; 332 uint32_t taghi, taglolo, taglohi;
333 unsigned long long taglo, va;
334 uint64_t tlo_tmp;
334 uint8_t lru; 335 uint8_t lru;
335 int res = 0; 336 int res = 0;
336 337
@@ -484,8 +485,8 @@ static uint32_t extract_dc(unsigned short addr, int data)
484{ 485{
485 int valid, way; 486 int valid, way;
486 unsigned char state; 487 unsigned char state;
487 uint64_t taglo, pa;
488 uint32_t taghi, taglolo, taglohi; 488 uint32_t taghi, taglolo, taglohi;
489 unsigned long long taglo, pa;
489 uint8_t ecc, lru; 490 uint8_t ecc, lru;
490 int res = 0; 491 int res = 0;
491 492
@@ -535,8 +536,8 @@ static uint32_t extract_dc(unsigned short addr, int data)
535 } 536 }
536 537
537 if (data) { 538 if (data) {
538 uint64_t datalo;
539 uint32_t datalohi, datalolo, datahi; 539 uint32_t datalohi, datalolo, datahi;
540 unsigned long long datalo;
540 int offset; 541 int offset;
541 char bad_ecc = 0; 542 char bad_ecc = 0;
542 543
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index f503d02e403b..f0eb29917d9a 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -19,6 +19,13 @@
19 19
20#include <dma-coherence.h> 20#include <dma-coherence.h>
21 21
22static inline unsigned long dma_addr_to_virt(dma_addr_t dma_addr)
23{
24 unsigned long addr = plat_dma_addr_to_phys(dma_addr);
25
26 return (unsigned long)phys_to_virt(addr);
27}
28
22/* 29/*
23 * Warning on the terminology - Linux calls an uncached area coherent; 30 * Warning on the terminology - Linux calls an uncached area coherent;
24 * MIPS terminology calls memory areas with hardware maintained coherency 31 * MIPS terminology calls memory areas with hardware maintained coherency
@@ -140,7 +147,7 @@ void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
140 enum dma_data_direction direction) 147 enum dma_data_direction direction)
141{ 148{
142 if (cpu_is_noncoherent_r10000(dev)) 149 if (cpu_is_noncoherent_r10000(dev))
143 __dma_sync(plat_dma_addr_to_phys(dma_addr) + PAGE_OFFSET, size, 150 __dma_sync(dma_addr_to_virt(dma_addr), size,
144 direction); 151 direction);
145 152
146 plat_unmap_dma_mem(dma_addr); 153 plat_unmap_dma_mem(dma_addr);
@@ -234,7 +241,7 @@ void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
234 if (cpu_is_noncoherent_r10000(dev)) { 241 if (cpu_is_noncoherent_r10000(dev)) {
235 unsigned long addr; 242 unsigned long addr;
236 243
237 addr = PAGE_OFFSET + plat_dma_addr_to_phys(dma_handle); 244 addr = dma_addr_to_virt(dma_handle);
238 __dma_sync(addr, size, direction); 245 __dma_sync(addr, size, direction);
239 } 246 }
240} 247}
@@ -249,7 +256,7 @@ void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
249 if (!plat_device_is_coherent(dev)) { 256 if (!plat_device_is_coherent(dev)) {
250 unsigned long addr; 257 unsigned long addr;
251 258
252 addr = PAGE_OFFSET + plat_dma_addr_to_phys(dma_handle); 259 addr = dma_addr_to_virt(dma_handle);
253 __dma_sync(addr, size, direction); 260 __dma_sync(addr, size, direction);
254 } 261 }
255} 262}
@@ -264,7 +271,7 @@ void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
264 if (cpu_is_noncoherent_r10000(dev)) { 271 if (cpu_is_noncoherent_r10000(dev)) {
265 unsigned long addr; 272 unsigned long addr;
266 273
267 addr = PAGE_OFFSET + plat_dma_addr_to_phys(dma_handle); 274 addr = dma_addr_to_virt(dma_handle);
268 __dma_sync(addr + offset, size, direction); 275 __dma_sync(addr + offset, size, direction);
269 } 276 }
270} 277}
@@ -279,7 +286,7 @@ void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
279 if (!plat_device_is_coherent(dev)) { 286 if (!plat_device_is_coherent(dev)) {
280 unsigned long addr; 287 unsigned long addr;
281 288
282 addr = PAGE_OFFSET + plat_dma_addr_to_phys(dma_handle); 289 addr = dma_addr_to_virt(dma_handle);
283 __dma_sync(addr + offset, size, direction); 290 __dma_sync(addr + offset, size, direction);
284 } 291 }
285} 292}
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index f08ae71c46ff..e9951c0e689f 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -123,7 +123,7 @@ static void __init kmap_coherent_init(void)
123static inline void kmap_coherent_init(void) {} 123static inline void kmap_coherent_init(void) {}
124#endif 124#endif
125 125
126static inline void *kmap_coherent(struct page *page, unsigned long addr) 126void *kmap_coherent(struct page *page, unsigned long addr)
127{ 127{
128 enum fixed_addresses idx; 128 enum fixed_addresses idx;
129 unsigned long vaddr, flags, entrylo; 129 unsigned long vaddr, flags, entrylo;
@@ -177,7 +177,7 @@ static inline void *kmap_coherent(struct page *page, unsigned long addr)
177 177
178#define UNIQUE_ENTRYHI(idx) (CKSEG0 + ((idx) << (PAGE_SHIFT + 1))) 178#define UNIQUE_ENTRYHI(idx) (CKSEG0 + ((idx) << (PAGE_SHIFT + 1)))
179 179
180static inline void kunmap_coherent(struct page *page) 180void kunmap_coherent(struct page *page)
181{ 181{
182#ifndef CONFIG_MIPS_MT_SMTC 182#ifndef CONFIG_MIPS_MT_SMTC
183 unsigned int wired; 183 unsigned int wired;
@@ -377,7 +377,7 @@ void __init paging_init(void)
377#ifdef CONFIG_FLATMEM 377#ifdef CONFIG_FLATMEM
378 free_area_init(zones_size); 378 free_area_init(zones_size);
379#else 379#else
380 pfn = 0; 380 pfn = min_low_pfn;
381 for (i = 0; i < MAX_NR_ZONES; i++) 381 for (i = 0; i < MAX_NR_ZONES; i++)
382 for (j = 0; j < zones_size[i]; j++, pfn++) 382 for (j = 0; j < zones_size[i]; j++, pfn++)
383 if (!page_is_ram(pfn)) 383 if (!page_is_ram(pfn))
diff --git a/arch/mips/mm/pg-sb1.c b/arch/mips/mm/pg-sb1.c
index fc3c7878fb45..adb37d0a30ea 100644
--- a/arch/mips/mm/pg-sb1.c
+++ b/arch/mips/mm/pg-sb1.c
@@ -218,8 +218,7 @@ void sb1_dma_init(void)
218 for (i = 0; i < DM_NUM_CHANNELS; i++) { 218 for (i = 0; i < DM_NUM_CHANNELS; i++) {
219 const u64 base_val = CPHYSADDR(&page_descr[i]) | 219 const u64 base_val = CPHYSADDR(&page_descr[i]) |
220 V_DM_DSCR_BASE_RINGSZ(1); 220 V_DM_DSCR_BASE_RINGSZ(1);
221 volatile void *base_reg = 221 void *base_reg = IOADDR(A_DM_REGISTER(i, R_DM_DSCR_BASE));
222 IOADDR(A_DM_REGISTER(i, R_DM_DSCR_BASE));
223 222
224 __raw_writeq(base_val, base_reg); 223 __raw_writeq(base_val, base_reg);
225 __raw_writeq(base_val | M_DM_DSCR_BASE_RESET, base_reg); 224 __raw_writeq(base_val | M_DM_DSCR_BASE_RESET, base_reg);
diff --git a/arch/mips/momentum/ocelot_c/irq.c b/arch/mips/momentum/ocelot_c/irq.c
index 40472f7944d7..844d566c9de3 100644
--- a/arch/mips/momentum/ocelot_c/irq.c
+++ b/arch/mips/momentum/ocelot_c/irq.c
@@ -64,7 +64,7 @@ extern void ll_cpci_irq(void);
64 64
65asmlinkage void plat_irq_dispatch(void) 65asmlinkage void plat_irq_dispatch(void)
66{ 66{
67 unsigned int pending = read_c0_cause() & read_c0_status(); 67 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
68 68
69 if (pending & STATUSF_IP0) 69 if (pending & STATUSF_IP0)
70 do_IRQ(0); 70 do_IRQ(0);
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c
index 9d08608aaa51..69a8bcfe72b2 100644
--- a/arch/mips/oprofile/op_model_mipsxx.c
+++ b/arch/mips/oprofile/op_model_mipsxx.c
@@ -74,13 +74,13 @@ static inline void w_c0_ ## r ## n(unsigned int value) \
74 74
75__define_perf_accessors(perfcntr, 0, 2) 75__define_perf_accessors(perfcntr, 0, 2)
76__define_perf_accessors(perfcntr, 1, 3) 76__define_perf_accessors(perfcntr, 1, 3)
77__define_perf_accessors(perfcntr, 2, 2) 77__define_perf_accessors(perfcntr, 2, 0)
78__define_perf_accessors(perfcntr, 3, 2) 78__define_perf_accessors(perfcntr, 3, 1)
79 79
80__define_perf_accessors(perfctrl, 0, 2) 80__define_perf_accessors(perfctrl, 0, 2)
81__define_perf_accessors(perfctrl, 1, 3) 81__define_perf_accessors(perfctrl, 1, 3)
82__define_perf_accessors(perfctrl, 2, 2) 82__define_perf_accessors(perfctrl, 2, 0)
83__define_perf_accessors(perfctrl, 3, 2) 83__define_perf_accessors(perfctrl, 3, 1)
84 84
85struct op_mips_model op_model_mipsxx_ops; 85struct op_mips_model op_model_mipsxx_ops;
86 86
@@ -97,7 +97,6 @@ static void mipsxx_reg_setup(struct op_counter_config *ctr)
97 int i; 97 int i;
98 98
99 /* Compute the performance counter control word. */ 99 /* Compute the performance counter control word. */
100 /* For now count kernel and user mode */
101 for (i = 0; i < counters; i++) { 100 for (i = 0; i < counters; i++) {
102 reg.control[i] = 0; 101 reg.control[i] = 0;
103 reg.counter[i] = 0; 102 reg.counter[i] = 0;
@@ -234,9 +233,6 @@ static inline int n_counters(void)
234 counters = __n_counters(); 233 counters = __n_counters();
235 } 234 }
236 235
237#ifdef CONFIG_MIPS_MT_SMP
238 counters >> 1;
239#endif
240 return counters; 236 return counters;
241} 237}
242 238
@@ -270,6 +266,10 @@ static int __init mipsxx_init(void)
270 266
271 reset_counters(counters); 267 reset_counters(counters);
272 268
269#ifdef CONFIG_MIPS_MT_SMP
270 counters >>= 1;
271#endif
272
273 op_model_mipsxx_ops.num_counters = counters; 273 op_model_mipsxx_ops.num_counters = counters;
274 switch (current_cpu_data.cputype) { 274 switch (current_cpu_data.cputype) {
275 case CPU_20KC: 275 case CPU_20KC:
@@ -326,7 +326,11 @@ static int __init mipsxx_init(void)
326 326
327static void mipsxx_exit(void) 327static void mipsxx_exit(void)
328{ 328{
329 reset_counters(op_model_mipsxx_ops.num_counters); 329 int counters = op_model_mipsxx_ops.num_counters;
330#ifdef CONFIG_MIPS_MT_SMP
331 counters <<= 1;
332#endif
333 reset_counters(counters);
330 334
331 perf_irq = null_perf_irq; 335 perf_irq = null_perf_irq;
332} 336}
diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c
index f6774f54cd3c..d7b9e1349f6d 100644
--- a/arch/mips/pci/pci-bcm1480.c
+++ b/arch/mips/pci/pci-bcm1480.c
@@ -216,7 +216,7 @@ static int __init bcm1480_pcibios_init(void)
216 /* 216 /*
217 * See if the PCI bus has been configured by the firmware. 217 * See if the PCI bus has been configured by the firmware.
218 */ 218 */
219 reg = *((volatile uint64_t *) IOADDR(A_SCD_SYSTEM_CFG)); 219 reg = __raw_readq(IOADDR(A_SCD_SYSTEM_CFG));
220 if (!(reg & M_BCM1480_SYS_PCI_HOST)) { 220 if (!(reg & M_BCM1480_SYS_PCI_HOST)) {
221 bcm1480_bus_status |= PCI_DEVICE_MODE; 221 bcm1480_bus_status |= PCI_DEVICE_MODE;
222 } else { 222 } else {
diff --git a/arch/mips/pci/pci-sb1250.c b/arch/mips/pci/pci-sb1250.c
index 80f5e8c4bcd4..75c1246ced5f 100644
--- a/arch/mips/pci/pci-sb1250.c
+++ b/arch/mips/pci/pci-sb1250.c
@@ -228,7 +228,7 @@ static int __init sb1250_pcibios_init(void)
228 /* 228 /*
229 * See if the PCI bus has been configured by the firmware. 229 * See if the PCI bus has been configured by the firmware.
230 */ 230 */
231 reg = *((volatile uint64_t *) IOADDR(A_SCD_SYSTEM_CFG)); 231 reg = __raw_readq(IOADDR(A_SCD_SYSTEM_CFG));
232 if (!(reg & M_SYS_PCI_HOST)) { 232 if (!(reg & M_SYS_PCI_HOST)) {
233 sb1250_bus_status |= PCI_DEVICE_MODE; 233 sb1250_bus_status |= PCI_DEVICE_MODE;
234 } else { 234 } else {
diff --git a/arch/mips/philips/pnx8550/common/int.c b/arch/mips/philips/pnx8550/common/int.c
index d48665ebd33c..aad03429a5e3 100644
--- a/arch/mips/philips/pnx8550/common/int.c
+++ b/arch/mips/philips/pnx8550/common/int.c
@@ -83,16 +83,15 @@ static void timer_irqdispatch(int irq)
83 83
84asmlinkage void plat_irq_dispatch(void) 84asmlinkage void plat_irq_dispatch(void)
85{ 85{
86 unsigned int pending = read_c0_status() & read_c0_cause(); 86 unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
87 87
88 if (pending & STATUSF_IP2) 88 if (pending & STATUSF_IP2)
89 hw0_irqdispatch(2); 89 hw0_irqdispatch(2);
90 else if (pending & STATUSF_IP7) { 90 else if (pending & STATUSF_IP7) {
91 if (read_c0_config7() & 0x01c0) 91 if (read_c0_config7() & 0x01c0)
92 timer_irqdispatch(7); 92 timer_irqdispatch(7);
93 } 93 } else
94 94 spurious_interrupt();
95 spurious_interrupt();
96} 95}
97 96
98static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask) 97static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask)
@@ -204,19 +203,7 @@ void __init arch_init_irq(void)
204 * Note, PCI INTA is active low on the bus, but inverted 203 * Note, PCI INTA is active low on the bus, but inverted
205 * in the GIC, so to us it's active high. 204 * in the GIC, so to us it's active high.
206 */ 205 */
207#ifdef CONFIG_PNX8550_V2PCI 206 PNX8550_GIC_REQ(i - PNX8550_INT_GIC_MIN) = 0x1E000000;
208 if (gic_int_line == (PNX8550_INT_GPIO0 - PNX8550_INT_GIC_MIN)) {
209 /* PCI INT through gpio 8, which is setup in
210 * pnx8550_setup.c and routed to GPIO
211 * Interrupt Level 0 (GPIO Connection 58).
212 * Set it active low. */
213
214 PNX8550_GIC_REQ(gic_int_line) = 0x1E020000;
215 } else
216#endif
217 {
218 PNX8550_GIC_REQ(i - PNX8550_INT_GIC_MIN) = 0x1E000000;
219 }
220 207
221 /* mask/priority is still 0 so we will not get any 208 /* mask/priority is still 0 so we will not get any
222 * interrupts until it is unmasked */ 209 * interrupts until it is unmasked */
diff --git a/arch/mips/qemu/q-smp.c b/arch/mips/qemu/q-smp.c
index 5a12354cd576..786bbfa214d1 100644
--- a/arch/mips/qemu/q-smp.c
+++ b/arch/mips/qemu/q-smp.c
@@ -46,3 +46,10 @@ void __init prom_prepare_cpus(unsigned int max_cpus)
46void prom_boot_secondary(int cpu, struct task_struct *idle) 46void prom_boot_secondary(int cpu, struct task_struct *idle)
47{ 47{
48} 48}
49
50void __init plat_smp_setup(void)
51{
52}
53void __init plat_prepare_cpus(unsigned int max_cpus)
54{
55}
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c
index b454924aeb56..18348321795d 100644
--- a/arch/mips/sgi-ip22/ip22-int.c
+++ b/arch/mips/sgi-ip22/ip22-int.c
@@ -237,7 +237,7 @@ extern void indy_8254timer_irq(void);
237 237
238asmlinkage void plat_irq_dispatch(void) 238asmlinkage void plat_irq_dispatch(void)
239{ 239{
240 unsigned int pending = read_c0_cause(); 240 unsigned int pending = read_c0_status() & read_c0_cause();
241 241
242 /* 242 /*
243 * First we check for r4k counter/timer IRQ. 243 * First we check for r4k counter/timer IRQ.
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c
index 8c450d9e8696..fb9da9acf53f 100644
--- a/arch/mips/sgi-ip32/ip32-irq.c
+++ b/arch/mips/sgi-ip32/ip32-irq.c
@@ -454,7 +454,7 @@ static void ip32_irq5(void)
454 454
455asmlinkage void plat_irq_dispatch(void) 455asmlinkage void plat_irq_dispatch(void)
456{ 456{
457 unsigned int pending = read_c0_cause(); 457 unsigned int pending = read_c0_status() & read_c0_cause();
458 458
459 if (likely(pending & IE_IRQ0)) 459 if (likely(pending & IE_IRQ0))
460 ip32_irq0(); 460 ip32_irq0();
diff --git a/arch/mips/sibyte/bcm1480/smp.c b/arch/mips/sibyte/bcm1480/smp.c
index bf328277c775..6eac36d1b8c8 100644
--- a/arch/mips/sibyte/bcm1480/smp.c
+++ b/arch/mips/sibyte/bcm1480/smp.c
@@ -34,21 +34,21 @@ extern void smp_call_function_interrupt(void);
34 * independent of board/firmware 34 * independent of board/firmware
35 */ 35 */
36 36
37static volatile void *mailbox_0_set_regs[] = { 37static void *mailbox_0_set_regs[] = {
38 IOADDR(A_BCM1480_IMR_CPU0_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU), 38 IOADDR(A_BCM1480_IMR_CPU0_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU),
39 IOADDR(A_BCM1480_IMR_CPU1_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU), 39 IOADDR(A_BCM1480_IMR_CPU1_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU),
40 IOADDR(A_BCM1480_IMR_CPU2_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU), 40 IOADDR(A_BCM1480_IMR_CPU2_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU),
41 IOADDR(A_BCM1480_IMR_CPU3_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU), 41 IOADDR(A_BCM1480_IMR_CPU3_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU),
42}; 42};
43 43
44static volatile void *mailbox_0_clear_regs[] = { 44static void *mailbox_0_clear_regs[] = {
45 IOADDR(A_BCM1480_IMR_CPU0_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU), 45 IOADDR(A_BCM1480_IMR_CPU0_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU),
46 IOADDR(A_BCM1480_IMR_CPU1_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU), 46 IOADDR(A_BCM1480_IMR_CPU1_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU),
47 IOADDR(A_BCM1480_IMR_CPU2_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU), 47 IOADDR(A_BCM1480_IMR_CPU2_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU),
48 IOADDR(A_BCM1480_IMR_CPU3_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU), 48 IOADDR(A_BCM1480_IMR_CPU3_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU),
49}; 49};
50 50
51static volatile void *mailbox_0_regs[] = { 51static void *mailbox_0_regs[] = {
52 IOADDR(A_BCM1480_IMR_CPU0_BASE + R_BCM1480_IMR_MAILBOX_0_CPU), 52 IOADDR(A_BCM1480_IMR_CPU0_BASE + R_BCM1480_IMR_MAILBOX_0_CPU),
53 IOADDR(A_BCM1480_IMR_CPU1_BASE + R_BCM1480_IMR_MAILBOX_0_CPU), 53 IOADDR(A_BCM1480_IMR_CPU1_BASE + R_BCM1480_IMR_MAILBOX_0_CPU),
54 IOADDR(A_BCM1480_IMR_CPU2_BASE + R_BCM1480_IMR_MAILBOX_0_CPU), 54 IOADDR(A_BCM1480_IMR_CPU2_BASE + R_BCM1480_IMR_MAILBOX_0_CPU),
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c
index 148239446e6e..0e6a13c0bd0e 100644
--- a/arch/mips/sibyte/sb1250/irq.c
+++ b/arch/mips/sibyte/sb1250/irq.c
@@ -421,7 +421,7 @@ asmlinkage void plat_irq_dispatch(void)
421 * blasting the high 32 bits. 421 * blasting the high 32 bits.
422 */ 422 */
423 423
424 pending = read_c0_cause() & read_c0_status(); 424 pending = read_c0_cause() & read_c0_status() & ST0_IM;
425 425
426#ifdef CONFIG_SIBYTE_SB1250_PROF 426#ifdef CONFIG_SIBYTE_SB1250_PROF
427 if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ 427 if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c
index defa1f1452ad..83572d8f3e14 100644
--- a/arch/mips/sibyte/swarm/setup.c
+++ b/arch/mips/sibyte/swarm/setup.c
@@ -169,17 +169,19 @@ void __init plat_mem_setup(void)
169#define LEDS_PHYS MLEDS_PHYS 169#define LEDS_PHYS MLEDS_PHYS
170#endif 170#endif
171 171
172#define setled(index, c) \
173 ((unsigned char *)(IOADDR(LEDS_PHYS)+0x20))[(3-(index))<<3] = (c)
174void setleds(char *str) 172void setleds(char *str)
175{ 173{
174 void *reg;
176 int i; 175 int i;
176
177 for (i = 0; i < 4; i++) { 177 for (i = 0; i < 4; i++) {
178 if (!str[i]) { 178 reg = IOADDR(LEDS_PHYS) + 0x20 + ((3 - i) << 3);
179 setled(i, ' '); 179
180 } else { 180 if (!str[i])
181 setled(i, str[i]); 181 writeb(' ', reg);
182 } 182 else
183 writeb(str[i], reg);
183 } 184 }
184} 185}
185#endif 186
187#endif /* LEDS_PHYS */
diff --git a/arch/mips/sni/pcimt.c b/arch/mips/sni/pcimt.c
index 39e5b4abc555..8e8593b64f6a 100644
--- a/arch/mips/sni/pcimt.c
+++ b/arch/mips/sni/pcimt.c
@@ -333,7 +333,7 @@ static void pcimt_hwint3(void)
333 333
334static void sni_pcimt_hwint(void) 334static void sni_pcimt_hwint(void)
335{ 335{
336 u32 pending = (read_c0_cause() & read_c0_status()); 336 u32 pending = read_c0_cause() & read_c0_status();
337 337
338 if (pending & C_IRQ5) 338 if (pending & C_IRQ5)
339 do_IRQ (MIPS_CPU_IRQ_BASE + 7); 339 do_IRQ (MIPS_CPU_IRQ_BASE + 7);
diff --git a/arch/mips/sni/pcit.c b/arch/mips/sni/pcit.c
index 8d6b3d5b13a1..1dfc3f00bbd3 100644
--- a/arch/mips/sni/pcit.c
+++ b/arch/mips/sni/pcit.c
@@ -271,7 +271,7 @@ static void pcit_hwint0(void)
271 271
272static void sni_pcit_hwint(void) 272static void sni_pcit_hwint(void)
273{ 273{
274 u32 pending = (read_c0_cause() & read_c0_status()); 274 u32 pending = read_c0_cause() & read_c0_status();
275 275
276 if (pending & C_IRQ1) 276 if (pending & C_IRQ1)
277 pcit_hwint1(); 277 pcit_hwint1();
@@ -285,7 +285,7 @@ static void sni_pcit_hwint(void)
285 285
286static void sni_pcit_hwint_cplus(void) 286static void sni_pcit_hwint_cplus(void)
287{ 287{
288 u32 pending = (read_c0_cause() & read_c0_status()); 288 u32 pending = read_c0_cause() & read_c0_status();
289 289
290 if (pending & C_IRQ0) 290 if (pending & C_IRQ0)
291 pcit_hwint0(); 291 pcit_hwint0();
diff --git a/arch/mips/tx4927/common/tx4927_irq.c b/arch/mips/tx4927/common/tx4927_irq.c
index e7f3e5b84dcf..3d25d010f3d5 100644
--- a/arch/mips/tx4927/common/tx4927_irq.c
+++ b/arch/mips/tx4927/common/tx4927_irq.c
@@ -416,7 +416,7 @@ static int tx4927_irq_nested(void)
416 416
417asmlinkage void plat_irq_dispatch(void) 417asmlinkage void plat_irq_dispatch(void)
418{ 418{
419 unsigned int pending = read_c0_status() & read_c0_cause(); 419 unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
420 420
421 if (pending & STATUSF_IP7) /* cpu timer */ 421 if (pending & STATUSF_IP7) /* cpu timer */
422 do_IRQ(TX4927_IRQ_CPU_TIMER); 422 do_IRQ(TX4927_IRQ_CPU_TIMER);
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index f3d4dd580dd6..e53b2988d1bf 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -465,8 +465,13 @@ void flush_thread(void)
465#ifdef CONFIG_PPC64 465#ifdef CONFIG_PPC64
466 struct thread_info *t = current_thread_info(); 466 struct thread_info *t = current_thread_info();
467 467
468 if (t->flags & _TIF_ABI_PENDING) 468 if (test_ti_thread_flag(t, TIF_ABI_PENDING)) {
469 t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT); 469 clear_ti_thread_flag(t, TIF_ABI_PENDING);
470 if (test_ti_thread_flag(t, TIF_32BIT))
471 clear_ti_thread_flag(t, TIF_32BIT);
472 else
473 set_ti_thread_flag(t, TIF_32BIT);
474 }
470#endif 475#endif
471 476
472 discard_lazy_cpu_state(); 477 discard_lazy_cpu_state();
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index e738f93b42fe..a963f657222b 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -184,7 +184,7 @@ void udbg_pas_real_putc(char c)
184 184
185void udbg_init_pas_realmode(void) 185void udbg_init_pas_realmode(void)
186{ 186{
187 udbg_comport = (volatile struct NS16550 __iomem *)0xfcff03f8; 187 udbg_comport = (volatile struct NS16550 __iomem *)0xfcff03f8UL;
188 188
189 udbg_putc = udbg_pas_real_putc; 189 udbg_putc = udbg_pas_real_putc;
190 udbg_getc = NULL; 190 udbg_getc = NULL;
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index 459a53b7d24d..71dbf1a56e13 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -77,7 +77,7 @@
77#define IOBMAP_L2E_V 0x80000000 77#define IOBMAP_L2E_V 0x80000000
78#define IOBMAP_L2E_V_CACHED 0xc0000000 78#define IOBMAP_L2E_V_CACHED 0xc0000000
79 79
80static u32 *iob; 80static u32 __iomem *iob;
81static u32 iob_l1_emptyval; 81static u32 iob_l1_emptyval;
82static u32 iob_l2_emptyval; 82static u32 iob_l2_emptyval;
83static u32 *iob_l2_base; 83static u32 *iob_l2_base;
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S
index 5c7e38789897..c1427b3634ec 100644
--- a/arch/powerpc/platforms/pseries/hvCall.S
+++ b/arch/powerpc/platforms/pseries/hvCall.S
@@ -30,9 +30,14 @@ END_FTR_SECTION_IFSET(CPU_FTR_PURR);
30 30
31/* 31/*
32 * postcall is performed immediately before function return which 32 * postcall is performed immediately before function return which
33 * allows liberal use of volatile registers. 33 * allows liberal use of volatile registers. We branch around this
34 * in early init (eg when populating the MMU hashtable) by using an
35 * unconditional cpu feature.
34 */ 36 */
35#define HCALL_INST_POSTCALL \ 37#define HCALL_INST_POSTCALL \
38BEGIN_FTR_SECTION; \
39 b 1f; \
40END_FTR_SECTION(0, 1); \
36 ld r4,STK_PARM(r3)(r1); /* validate opcode */ \ 41 ld r4,STK_PARM(r3)(r1); /* validate opcode */ \
37 cmpldi cr7,r4,MAX_HCALL_OPCODE; \ 42 cmpldi cr7,r4,MAX_HCALL_OPCODE; \
38 bgt- cr7,1f; \ 43 bgt- cr7,1f; \
@@ -123,6 +128,40 @@ _GLOBAL(plpar_hcall)
123 128
124 blr /* return r3 = status */ 129 blr /* return r3 = status */
125 130
131/*
132 * plpar_hcall_raw can be called in real mode. kexec/kdump need some
133 * hypervisor calls to be executed in real mode. So plpar_hcall_raw
134 * does not access the per cpu hypervisor call statistics variables,
135 * since these variables may not be present in the RMO region.
136 */
137_GLOBAL(plpar_hcall_raw)
138 HMT_MEDIUM
139
140 mfcr r0
141 stw r0,8(r1)
142
143 std r4,STK_PARM(r4)(r1) /* Save ret buffer */
144
145 mr r4,r5
146 mr r5,r6
147 mr r6,r7
148 mr r7,r8
149 mr r8,r9
150 mr r9,r10
151
152 HVSC /* invoke the hypervisor */
153
154 ld r12,STK_PARM(r4)(r1)
155 std r4, 0(r12)
156 std r5, 8(r12)
157 std r6, 16(r12)
158 std r7, 24(r12)
159
160 lwz r0,8(r1)
161 mtcrf 0xff,r0
162
163 blr /* return r3 = status */
164
126_GLOBAL(plpar_hcall9) 165_GLOBAL(plpar_hcall9)
127 HMT_MEDIUM 166 HMT_MEDIUM
128 167
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 7496005566ef..843ee9643211 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -378,7 +378,7 @@ static void pSeries_lpar_hptab_clear(void)
378 378
379 /* TODO: Use bulk call */ 379 /* TODO: Use bulk call */
380 for (i = 0; i < hpte_count; i++) 380 for (i = 0; i < hpte_count; i++)
381 plpar_pte_remove(0, i, 0, &dummy1, &dummy2); 381 plpar_pte_remove_raw(0, i, 0, &dummy1, &dummy2);
382} 382}
383 383
384/* 384/*
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h
index 3eb7b294d92f..2e4d10c9eea8 100644
--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
+++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
@@ -78,6 +78,22 @@ static inline long plpar_pte_remove(unsigned long flags, unsigned long ptex,
78 return rc; 78 return rc;
79} 79}
80 80
81/* plpar_pte_remove_raw can be called in real mode. It calls plpar_hcall_raw */
82static inline long plpar_pte_remove_raw(unsigned long flags, unsigned long ptex,
83 unsigned long avpn, unsigned long *old_pteh_ret,
84 unsigned long *old_ptel_ret)
85{
86 long rc;
87 unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
88
89 rc = plpar_hcall_raw(H_REMOVE, retbuf, flags, ptex, avpn);
90
91 *old_pteh_ret = retbuf[0];
92 *old_ptel_ret = retbuf[1];
93
94 return rc;
95}
96
81static inline long plpar_pte_read(unsigned long flags, unsigned long ptex, 97static inline long plpar_pte_read(unsigned long flags, unsigned long ptex,
82 unsigned long *old_pteh_ret, unsigned long *old_ptel_ret) 98 unsigned long *old_pteh_ret, unsigned long *old_ptel_ret)
83{ 99{
diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c
index 4ca615788702..697eb30a68a3 100644
--- a/arch/s390/appldata/appldata_mem.c
+++ b/arch/s390/appldata/appldata_mem.c
@@ -117,7 +117,10 @@ static void appldata_get_mem_data(void *data)
117 mem_data->pgpgout = ev[PGPGOUT] >> 1; 117 mem_data->pgpgout = ev[PGPGOUT] >> 1;
118 mem_data->pswpin = ev[PSWPIN]; 118 mem_data->pswpin = ev[PSWPIN];
119 mem_data->pswpout = ev[PSWPOUT]; 119 mem_data->pswpout = ev[PSWPOUT];
120 mem_data->pgalloc = ev[PGALLOC_NORMAL] + ev[PGALLOC_DMA]; 120 mem_data->pgalloc = ev[PGALLOC_NORMAL];
121#ifdef CONFIG_ZONE_DMA
122 mem_data->pgalloc += ev[PGALLOC_DMA];
123#endif
121 mem_data->pgfault = ev[PGFAULT]; 124 mem_data->pgfault = ev[PGFAULT];
122 mem_data->pgmajfault = ev[PGMAJFAULT]; 125 mem_data->pgmajfault = ev[PGMAJFAULT];
123 126
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 97901296894e..32a69a18a796 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -1665,3 +1665,20 @@ sys_getcpu_wrapper:
1665 llgtr %r3,%r3 # unsigned * 1665 llgtr %r3,%r3 # unsigned *
1666 llgtr %r4,%r4 # struct getcpu_cache * 1666 llgtr %r4,%r4 # struct getcpu_cache *
1667 jg sys_getcpu 1667 jg sys_getcpu
1668
1669 .globl compat_sys_epoll_pwait_wrapper
1670compat_sys_epoll_pwait_wrapper:
1671 lgfr %r2,%r2 # int
1672 llgtr %r3,%r3 # struct compat_epoll_event *
1673 lgfr %r4,%r4 # int
1674 lgfr %r5,%r5 # int
1675 llgtr %r6,%r6 # compat_sigset_t *
1676 llgf %r0,164(%r15) # compat_size_t
1677 stg %r0,160(%r15)
1678 jg compat_sys_epoll_pwait
1679
1680 .globl compat_sys_utimes_wrapper
1681compat_sys_utimes_wrapper:
1682 llgtr %r2,%r2 # char *
1683 llgtr %r3,%r3 # struct compat_timeval *
1684 jg compat_sys_utimes
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index eca3fe595ff4..dca6eaf82c80 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -268,7 +268,7 @@ debug_info_alloc(char *name, int pages_per_area, int nr_areas, int buf_size,
268 rc->level = level; 268 rc->level = level;
269 rc->buf_size = buf_size; 269 rc->buf_size = buf_size;
270 rc->entry_size = sizeof(debug_entry_t) + buf_size; 270 rc->entry_size = sizeof(debug_entry_t) + buf_size;
271 strlcpy(rc->name, name, sizeof(rc->name)-1); 271 strlcpy(rc->name, name, sizeof(rc->name));
272 memset(rc->views, 0, DEBUG_MAX_VIEWS * sizeof(struct debug_view *)); 272 memset(rc->views, 0, DEBUG_MAX_VIEWS * sizeof(struct debug_view *));
273 memset(rc->debugfs_entries, 0 ,DEBUG_MAX_VIEWS * 273 memset(rc->debugfs_entries, 0 ,DEBUG_MAX_VIEWS *
274 sizeof(struct dentry*)); 274 sizeof(struct dentry*));
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index afca1c6f4d21..5e47936573f2 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -141,9 +141,9 @@ static noinline __init void detect_machine_type(void)
141 machine_flags |= 4; 141 machine_flags |= 4;
142} 142}
143 143
144#ifdef CONFIG_64BIT
144static noinline __init int memory_fast_detect(void) 145static noinline __init int memory_fast_detect(void)
145{ 146{
146
147 unsigned long val0 = 0; 147 unsigned long val0 = 0;
148 unsigned long val1 = 0xc; 148 unsigned long val1 = 0xc;
149 int ret = -ENOSYS; 149 int ret = -ENOSYS;
@@ -161,9 +161,15 @@ static noinline __init int memory_fast_detect(void)
161 if (ret || val0 != val1) 161 if (ret || val0 != val1)
162 return -ENOSYS; 162 return -ENOSYS;
163 163
164 memory_chunk[0].size = val0; 164 memory_chunk[0].size = val0 + 1;
165 return 0; 165 return 0;
166} 166}
167#else
168static inline int memory_fast_detect(void)
169{
170 return -ENOSYS;
171}
172#endif
167 173
168#define ADDR2G (1UL << 31) 174#define ADDR2G (1UL << 31)
169 175
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index d125a4ead08d..f731185bf2bd 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -839,7 +839,7 @@ static int __init reipl_ccw_init(void)
839 } 839 }
840 reipl_block_ccw->hdr.len = IPL_PARM_BLK_CCW_LEN; 840 reipl_block_ccw->hdr.len = IPL_PARM_BLK_CCW_LEN;
841 reipl_block_ccw->hdr.version = IPL_PARM_BLOCK_VERSION; 841 reipl_block_ccw->hdr.version = IPL_PARM_BLOCK_VERSION;
842 reipl_block_ccw->hdr.blk0_len = sizeof(reipl_block_ccw->ipl_info.ccw); 842 reipl_block_ccw->hdr.blk0_len = IPL_PARM_BLK0_CCW_LEN;
843 reipl_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW; 843 reipl_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW;
844 /* check if read scp info worked and set loadparm */ 844 /* check if read scp info worked and set loadparm */
845 if (SCCB_VALID) 845 if (SCCB_VALID)
@@ -880,8 +880,7 @@ static int __init reipl_fcp_init(void)
880 } else { 880 } else {
881 reipl_block_fcp->hdr.len = IPL_PARM_BLK_FCP_LEN; 881 reipl_block_fcp->hdr.len = IPL_PARM_BLK_FCP_LEN;
882 reipl_block_fcp->hdr.version = IPL_PARM_BLOCK_VERSION; 882 reipl_block_fcp->hdr.version = IPL_PARM_BLOCK_VERSION;
883 reipl_block_fcp->hdr.blk0_len = 883 reipl_block_fcp->hdr.blk0_len = IPL_PARM_BLK0_FCP_LEN;
884 sizeof(reipl_block_fcp->ipl_info.fcp);
885 reipl_block_fcp->hdr.pbt = DIAG308_IPL_TYPE_FCP; 884 reipl_block_fcp->hdr.pbt = DIAG308_IPL_TYPE_FCP;
886 reipl_block_fcp->ipl_info.fcp.opt = DIAG308_IPL_OPT_IPL; 885 reipl_block_fcp->ipl_info.fcp.opt = DIAG308_IPL_OPT_IPL;
887 } 886 }
@@ -930,7 +929,7 @@ static int __init dump_ccw_init(void)
930 } 929 }
931 dump_block_ccw->hdr.len = IPL_PARM_BLK_CCW_LEN; 930 dump_block_ccw->hdr.len = IPL_PARM_BLK_CCW_LEN;
932 dump_block_ccw->hdr.version = IPL_PARM_BLOCK_VERSION; 931 dump_block_ccw->hdr.version = IPL_PARM_BLOCK_VERSION;
933 dump_block_ccw->hdr.blk0_len = sizeof(reipl_block_ccw->ipl_info.ccw); 932 dump_block_ccw->hdr.blk0_len = IPL_PARM_BLK0_CCW_LEN;
934 dump_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW; 933 dump_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW;
935 dump_capabilities |= IPL_TYPE_CCW; 934 dump_capabilities |= IPL_TYPE_CCW;
936 return 0; 935 return 0;
@@ -954,7 +953,7 @@ static int __init dump_fcp_init(void)
954 } 953 }
955 dump_block_fcp->hdr.len = IPL_PARM_BLK_FCP_LEN; 954 dump_block_fcp->hdr.len = IPL_PARM_BLK_FCP_LEN;
956 dump_block_fcp->hdr.version = IPL_PARM_BLOCK_VERSION; 955 dump_block_fcp->hdr.version = IPL_PARM_BLOCK_VERSION;
957 dump_block_fcp->hdr.blk0_len = sizeof(dump_block_fcp->ipl_info.fcp); 956 dump_block_fcp->hdr.blk0_len = IPL_PARM_BLK0_FCP_LEN;
958 dump_block_fcp->hdr.pbt = DIAG308_IPL_TYPE_FCP; 957 dump_block_fcp->hdr.pbt = DIAG308_IPL_TYPE_FCP;
959 dump_block_fcp->ipl_info.fcp.opt = DIAG308_IPL_OPT_DUMP; 958 dump_block_fcp->ipl_info.fcp.opt = DIAG308_IPL_OPT_DUMP;
960 dump_capabilities |= IPL_TYPE_FCP; 959 dump_capabilities |= IPL_TYPE_FCP;
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index a52c44455bf0..c774f1069e10 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -320,4 +320,5 @@ SYSCALL(sys_tee,sys_tee,sys_tee_wrapper)
320SYSCALL(sys_vmsplice,sys_vmsplice,compat_sys_vmsplice_wrapper) 320SYSCALL(sys_vmsplice,sys_vmsplice,compat_sys_vmsplice_wrapper)
321NI_SYSCALL /* 310 sys_move_pages */ 321NI_SYSCALL /* 310 sys_move_pages */
322SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper) 322SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper)
323SYSCALL(sys_epoll_pwait,sys_epoll_pwait,sys_ni_syscall) 323SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper)
324SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper)
diff --git a/arch/sh/drivers/pci/pci-auto.c b/arch/sh/drivers/pci/pci-auto.c
index ecf16344f94a..224e007736fb 100644
--- a/arch/sh/drivers/pci/pci-auto.c
+++ b/arch/sh/drivers/pci/pci-auto.c
@@ -214,6 +214,12 @@ retry:
214 continue; 214 continue;
215 } 215 }
216 216
217 if (bar_value < *lower_limit || (bar_value + bar_size) >= *upper_limit) {
218 DBG(" unavailable -- skipping, value %x size %x\n",
219 bar_value, bar_size);
220 continue;
221 }
222
217#ifdef CONFIG_PCI_AUTO_UPDATE_RESOURCES 223#ifdef CONFIG_PCI_AUTO_UPDATE_RESOURCES
218 /* Write it out and update our limit */ 224 /* Write it out and update our limit */
219 early_write_config_dword(hose, top_bus, current_bus, pci_devfn, 225 early_write_config_dword(hose, top_bus, current_bus, pci_devfn,
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c
index 4b339a640b13..726acfcb9b77 100644
--- a/arch/sh/kernel/cpu/init.c
+++ b/arch/sh/kernel/cpu/init.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * CPU init code 4 * CPU init code
5 * 5 *
6 * Copyright (C) 2002 - 2006 Paul Mundt 6 * Copyright (C) 2002 - 2007 Paul Mundt
7 * Copyright (C) 2003 Richard Curnow 7 * Copyright (C) 2003 Richard Curnow
8 * 8 *
9 * This file is subject to the terms and conditions of the GNU General Public 9 * This file is subject to the terms and conditions of the GNU General Public
@@ -48,8 +48,19 @@ static void __init cache_init(void)
48{ 48{
49 unsigned long ccr, flags; 49 unsigned long ccr, flags;
50 50
51 if (current_cpu_data.type == CPU_SH_NONE) 51 /* First setup the rest of the I-cache info */
52 panic("Unknown CPU"); 52 current_cpu_data.icache.entry_mask = current_cpu_data.icache.way_incr -
53 current_cpu_data.icache.linesz;
54
55 current_cpu_data.icache.way_size = current_cpu_data.icache.sets *
56 current_cpu_data.icache.linesz;
57
58 /* And the D-cache too */
59 current_cpu_data.dcache.entry_mask = current_cpu_data.dcache.way_incr -
60 current_cpu_data.dcache.linesz;
61
62 current_cpu_data.dcache.way_size = current_cpu_data.dcache.sets *
63 current_cpu_data.dcache.linesz;
53 64
54 jump_to_P2(); 65 jump_to_P2();
55 ccr = ctrl_inl(CCR); 66 ccr = ctrl_inl(CCR);
@@ -200,6 +211,9 @@ asmlinkage void __init sh_cpu_init(void)
200 /* First, probe the CPU */ 211 /* First, probe the CPU */
201 detect_cpu_and_cache_system(); 212 detect_cpu_and_cache_system();
202 213
214 if (current_cpu_data.type == CPU_SH_NONE)
215 panic("Unknown CPU");
216
203 /* Init the cache */ 217 /* Init the cache */
204 cache_init(); 218 cache_init();
205 219
diff --git a/arch/sh/kernel/cpu/sh2/entry.S b/arch/sh/kernel/cpu/sh2/entry.S
index 7f7d292f36ec..c16dc8fec489 100644
--- a/arch/sh/kernel/cpu/sh2/entry.S
+++ b/arch/sh/kernel/cpu/sh2/entry.S
@@ -165,6 +165,7 @@ ENTRY(exception_handler)
165 165
166interrupt_entry: 166interrupt_entry:
167 mov r9,r4 167 mov r9,r4
168 mov r15,r5
168 mov.l 6f,r9 169 mov.l 6f,r9
169 mov.l 7f,r8 170 mov.l 7f,r8
170 jmp @r8 171 jmp @r8
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S
index c19205b0f2c0..f3e827f29a46 100644
--- a/arch/sh/kernel/cpu/sh3/entry.S
+++ b/arch/sh/kernel/cpu/sh3/entry.S
@@ -514,13 +514,16 @@ skip_save:
514 514
515interrupt_exception: 515interrupt_exception:
516 mov.l 1f, r9 516 mov.l 1f, r9
517 mov.l 2f, r4
518 mov.l @r4, r4
517 jmp @r9 519 jmp @r9
518 nop 520 mov r15, r5
519 rts 521 rts
520 nop 522 nop
521 523
522 .align 2 524 .align 2
5231: .long do_IRQ 5251: .long do_IRQ
5262: .long INTEVT
524 527
525 .align 2 528 .align 2
526ENTRY(exception_none) 529ENTRY(exception_none)
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index 9d28c88d2f9d..58950de2696d 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -195,13 +195,6 @@ int __init detect_cpu_and_cache_system(void)
195 195
196 } 196 }
197 197
198 /* Setup the rest of the I-cache info */
199 current_cpu_data.icache.entry_mask = current_cpu_data.icache.way_incr -
200 current_cpu_data.icache.linesz;
201
202 current_cpu_data.icache.way_size = current_cpu_data.icache.sets *
203 current_cpu_data.icache.linesz;
204
205 /* And the rest of the D-cache */ 198 /* And the rest of the D-cache */
206 if (current_cpu_data.dcache.ways > 1) { 199 if (current_cpu_data.dcache.ways > 1) {
207 size = sizes[(cvr >> 16) & 0xf]; 200 size = sizes[(cvr >> 16) & 0xf];
@@ -209,12 +202,6 @@ int __init detect_cpu_and_cache_system(void)
209 current_cpu_data.dcache.sets = (size >> 6); 202 current_cpu_data.dcache.sets = (size >> 6);
210 } 203 }
211 204
212 current_cpu_data.dcache.entry_mask = current_cpu_data.dcache.way_incr -
213 current_cpu_data.dcache.linesz;
214
215 current_cpu_data.dcache.way_size = current_cpu_data.dcache.sets *
216 current_cpu_data.dcache.linesz;
217
218 /* 205 /*
219 * Setup the L2 cache desc 206 * Setup the L2 cache desc
220 * 207 *
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 67be2b6e8cd1..9bdd8a00cd4a 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -11,7 +11,6 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/kernel_stat.h> 12#include <linux/kernel_stat.h>
13#include <linux/seq_file.h> 13#include <linux/seq_file.h>
14#include <linux/io.h>
15#include <linux/irq.h> 14#include <linux/irq.h>
16#include <asm/processor.h> 15#include <asm/processor.h>
17#include <asm/uaccess.h> 16#include <asm/uaccess.h>
@@ -82,13 +81,9 @@ static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly;
82static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; 81static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
83#endif 82#endif
84 83
85asmlinkage int do_IRQ(unsigned long r4, unsigned long r5, 84asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
86 unsigned long r6, unsigned long r7,
87 struct pt_regs __regs)
88{ 85{
89 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
90 struct pt_regs *old_regs = set_irq_regs(regs); 86 struct pt_regs *old_regs = set_irq_regs(regs);
91 int irq;
92#ifdef CONFIG_4KSTACKS 87#ifdef CONFIG_4KSTACKS
93 union irq_ctx *curctx, *irqctx; 88 union irq_ctx *curctx, *irqctx;
94#endif 89#endif
@@ -111,13 +106,7 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5,
111 } 106 }
112#endif 107#endif
113 108
114#ifdef CONFIG_CPU_HAS_INTEVT 109 irq = irq_demux(evt2irq(irq));
115 irq = evt2irq(ctrl_inl(INTEVT));
116#else
117 irq = r4;
118#endif
119
120 irq = irq_demux(irq);
121 110
122#ifdef CONFIG_4KSTACKS 111#ifdef CONFIG_4KSTACKS
123 curctx = (union irq_ctx *)current_thread_info(); 112 curctx = (union irq_ctx *)current_thread_info();
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S
index ea75ca569052..3a69778c8366 100644
--- a/arch/sparc/kernel/systbls.S
+++ b/arch/sparc/kernel/systbls.S
@@ -78,7 +78,8 @@ sys_call_table:
78/*285*/ .long sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 78/*285*/ .long sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64
79/*290*/ .long sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat 79/*290*/ .long sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat
80/*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare 80/*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare
81/*300*/ .long sys_set_robust_list, sys_get_robust_list, sys_migrate_pages 81/*300*/ .long sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy
82/*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait
82 83
83#ifdef CONFIG_SUNOS_EMUL 84#ifdef CONFIG_SUNOS_EMUL
84 /* Now the SunOS syscall table. */ 85 /* Now the SunOS syscall table. */
@@ -192,5 +193,8 @@ sunos_sys_table:
192 .long sunos_nosys, sunos_nosys, sunos_nosys 193 .long sunos_nosys, sunos_nosys, sunos_nosys
193 .long sunos_nosys 194 .long sunos_nosys
194/*300*/ .long sunos_nosys, sunos_nosys, sunos_nosys 195/*300*/ .long sunos_nosys, sunos_nosys, sunos_nosys
196 .long sunos_nosys, sunos_nosys, sunos_nosys
197 .long sunos_nosys, sunos_nosys, sunos_nosys
198 .long sunos_nosys
195 199
196#endif 200#endif
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c
index c85ddf312747..a532922e2e35 100644
--- a/arch/sparc/mm/init.c
+++ b/arch/sparc/mm/init.c
@@ -75,7 +75,7 @@ void show_mem(void)
75 printk("Free swap: %6ldkB\n", 75 printk("Free swap: %6ldkB\n",
76 nr_swap_pages << (PAGE_SHIFT-10)); 76 nr_swap_pages << (PAGE_SHIFT-10));
77 printk("%ld pages of RAM\n", totalram_pages); 77 printk("%ld pages of RAM\n", totalram_pages);
78 printk("%d free pages\n", nr_free_pages()); 78 printk("%ld free pages\n", nr_free_pages());
79#if 0 /* undefined pgtable_cache_size, pgd_cache_size */ 79#if 0 /* undefined pgtable_cache_size, pgd_cache_size */
80 printk("%ld pages in page table cache\n",pgtable_cache_size); 80 printk("%ld pages in page table cache\n",pgtable_cache_size);
81#ifndef CONFIG_SMP 81#ifndef CONFIG_SMP
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index f75a686ba644..1a6348b565fb 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -136,18 +136,6 @@ config SMP
136 136
137 If you don't know what to do here, say N. 137 If you don't know what to do here, say N.
138 138
139config PREEMPT
140 bool "Preemptible Kernel"
141 help
142 This option reduces the latency of the kernel when reacting to
143 real-time or interactive events by allowing a low priority process to
144 be preempted even if it is in kernel mode executing a system call.
145 This allows applications to run more reliably even when the system is
146 under load.
147
148 Say Y here if you are building a kernel for a desktop, embedded
149 or real-time system. Say N if you are unsure.
150
151config NR_CPUS 139config NR_CPUS
152 int "Maximum number of CPUs (2-64)" 140 int "Maximum number of CPUs (2-64)"
153 range 2 64 141 range 2 64
@@ -399,6 +387,8 @@ config SCHED_SMT
399 when dealing with UltraSPARC cpus at a cost of slightly increased 387 when dealing with UltraSPARC cpus at a cost of slightly increased
400 overhead in some places. If unsure say N here. 388 overhead in some places. If unsure say N here.
401 389
390source "kernel/Kconfig.preempt"
391
402config CMDLINE_BOOL 392config CMDLINE_BOOL
403 bool "Default bootloader kernel arguments" 393 bool "Default bootloader kernel arguments"
404 394
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index 860b8b60526c..120c9c33b7a6 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.21-rc2 3# Linux kernel version: 2.6.21-rc4
4# Wed Feb 28 09:50:51 2007 4# Sat Mar 17 14:18:44 2007
5# 5#
6CONFIG_SPARC=y 6CONFIG_SPARC=y
7CONFIG_SPARC64=y 7CONFIG_SPARC64=y
@@ -50,6 +50,7 @@ CONFIG_POSIX_MQUEUE=y
50# CONFIG_IKCONFIG is not set 50# CONFIG_IKCONFIG is not set
51CONFIG_SYSFS_DEPRECATED=y 51CONFIG_SYSFS_DEPRECATED=y
52CONFIG_RELAY=y 52CONFIG_RELAY=y
53# CONFIG_BLK_DEV_INITRD is not set
53CONFIG_CC_OPTIMIZE_FOR_SIZE=y 54CONFIG_CC_OPTIMIZE_FOR_SIZE=y
54CONFIG_SYSCTL=y 55CONFIG_SYSCTL=y
55# CONFIG_EMBEDDED is not set 56# CONFIG_EMBEDDED is not set
@@ -108,7 +109,6 @@ CONFIG_GENERIC_HARDIRQS=y
108# General machine setup 109# General machine setup
109# 110#
110# CONFIG_SMP is not set 111# CONFIG_SMP is not set
111# CONFIG_PREEMPT is not set
112CONFIG_CPU_FREQ=y 112CONFIG_CPU_FREQ=y
113CONFIG_CPU_FREQ_TABLE=m 113CONFIG_CPU_FREQ_TABLE=m
114# CONFIG_CPU_FREQ_DEBUG is not set 114# CONFIG_CPU_FREQ_DEBUG is not set
@@ -165,6 +165,9 @@ CONFIG_BINFMT_ELF32=y
165CONFIG_BINFMT_ELF=y 165CONFIG_BINFMT_ELF=y
166CONFIG_BINFMT_MISC=m 166CONFIG_BINFMT_MISC=m
167CONFIG_SOLARIS_EMUL=y 167CONFIG_SOLARIS_EMUL=y
168# CONFIG_PREEMPT_NONE is not set
169CONFIG_PREEMPT_VOLUNTARY=y
170# CONFIG_PREEMPT is not set
168# CONFIG_CMDLINE_BOOL is not set 171# CONFIG_CMDLINE_BOOL is not set
169 172
170# 173#
@@ -340,7 +343,6 @@ CONFIG_BLK_DEV_NBD=m
340# CONFIG_BLK_DEV_SX8 is not set 343# CONFIG_BLK_DEV_SX8 is not set
341# CONFIG_BLK_DEV_UB is not set 344# CONFIG_BLK_DEV_UB is not set
342# CONFIG_BLK_DEV_RAM is not set 345# CONFIG_BLK_DEV_RAM is not set
343# CONFIG_BLK_DEV_INITRD is not set
344CONFIG_CDROM_PKTCDVD=m 346CONFIG_CDROM_PKTCDVD=m
345CONFIG_CDROM_PKTCDVD_BUFFERS=8 347CONFIG_CDROM_PKTCDVD_BUFFERS=8
346CONFIG_CDROM_PKTCDVD_WCACHE=y 348CONFIG_CDROM_PKTCDVD_WCACHE=y
diff --git a/arch/sparc64/kernel/ktlb.S b/arch/sparc64/kernel/ktlb.S
index e492db845ea3..d4024ac0d619 100644
--- a/arch/sparc64/kernel/ktlb.S
+++ b/arch/sparc64/kernel/ktlb.S
@@ -138,9 +138,15 @@ kvmap_dtlb_4v:
138 brgez,pn %g4, kvmap_dtlb_nonlinear 138 brgez,pn %g4, kvmap_dtlb_nonlinear
139 nop 139 nop
140 140
141#ifdef CONFIG_DEBUG_PAGEALLOC
142 /* Index through the base page size TSB even for linear
143 * mappings when using page allocation debugging.
144 */
145 KERN_TSB_LOOKUP_TL1(%g4, %g6, %g5, %g1, %g2, %g3, kvmap_dtlb_load)
146#else
141 /* Correct TAG_TARGET is already in %g6, check 4mb TSB. */ 147 /* Correct TAG_TARGET is already in %g6, check 4mb TSB. */
142 KERN_TSB4M_LOOKUP_TL1(%g6, %g5, %g1, %g2, %g3, kvmap_dtlb_load) 148 KERN_TSB4M_LOOKUP_TL1(%g6, %g5, %g1, %g2, %g3, kvmap_dtlb_load)
143 149#endif
144 /* TSB entry address left in %g1, lookup linear PTE. 150 /* TSB entry address left in %g1, lookup linear PTE.
145 * Must preserve %g1 and %g6 (TAG). 151 * Must preserve %g1 and %g6 (TAG).
146 */ 152 */
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
index 948b7d2d5874..aaeb5e06735c 100644
--- a/arch/sparc64/kernel/systbls.S
+++ b/arch/sparc64/kernel/systbls.S
@@ -79,7 +79,8 @@ sys_call_table32:
79 .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_fstatat64 79 .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_fstatat64
80/*290*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat 80/*290*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat
81 .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare 81 .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll, sys_unshare
82/*300*/ .word compat_sys_set_robust_list, compat_sys_get_robust_list, compat_sys_migrate_pages 82/*300*/ .word compat_sys_set_robust_list, compat_sys_get_robust_list, compat_sys_migrate_pages, compat_sys_mbind, compat_sys_get_mempolicy
83 .word compat_sys_set_mempolicy, compat_sys_kexec_load, compat_sys_move_pages, sys_getcpu, compat_sys_epoll_pwait
83 84
84#endif /* CONFIG_COMPAT */ 85#endif /* CONFIG_COMPAT */
85 86
@@ -149,7 +150,8 @@ sys_call_table:
149 .word sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 150 .word sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64
150/*290*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat 151/*290*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat
151 .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare 152 .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare
152/*300*/ .word sys_set_robust_list, sys_get_robust_list, sys_migrate_pages 153/*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
153 155
154#if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ 156#if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \
155 defined(CONFIG_SOLARIS_EMUL_MODULE) 157 defined(CONFIG_SOLARIS_EMUL_MODULE)
@@ -264,5 +266,8 @@ sunos_sys_table:
264 .word sunos_nosys, sunos_nosys, sunos_nosys 266 .word sunos_nosys, sunos_nosys, sunos_nosys
265 .word sunos_nosys 267 .word sunos_nosys
266/*300*/ .word sunos_nosys, sunos_nosys, sunos_nosys 268/*300*/ .word sunos_nosys, sunos_nosys, sunos_nosys
269 .word sunos_nosys, sunos_nosys, sunos_nosys
270 .word sunos_nosys, sunos_nosys, sunos_nosys
271 .word sunos_nosys
267 272
268#endif 273#endif
diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S
index eedf94fa5664..10adb2fb8ffe 100644
--- a/arch/sparc64/kernel/tsb.S
+++ b/arch/sparc64/kernel/tsb.S
@@ -546,6 +546,7 @@ NGtsb_init:
546 subcc %o1, 0x100, %o1 546 subcc %o1, 0x100, %o1
547 bne,pt %xcc, 1b 547 bne,pt %xcc, 1b
548 add %o0, 0x100, %o0 548 add %o0, 0x100, %o0
549 membar #Sync
549 retl 550 retl
550 wr %g2, 0x0, %asi 551 wr %g2, 0x0, %asi
551 .size NGtsb_init, .-NGtsb_init 552 .size NGtsb_init, .-NGtsb_init
diff --git a/arch/sparc64/lib/NGbzero.S b/arch/sparc64/lib/NGbzero.S
index e86baece5cc8..f10e4529ee37 100644
--- a/arch/sparc64/lib/NGbzero.S
+++ b/arch/sparc64/lib/NGbzero.S
@@ -88,6 +88,7 @@ NGbzero_loop:
88 bne,pt %xcc, NGbzero_loop 88 bne,pt %xcc, NGbzero_loop
89 add %o0, 64, %o0 89 add %o0, 64, %o0
90 90
91 membar #Sync
91 wr %o4, 0x0, %asi 92 wr %o4, 0x0, %asi
92 brz,pn %o1, NGbzero_done 93 brz,pn %o1, NGbzero_done
93NGbzero_medium: 94NGbzero_medium:
diff --git a/arch/sparc64/lib/NGmemcpy.S b/arch/sparc64/lib/NGmemcpy.S
index 8e522b3dc095..66063a9a66b8 100644
--- a/arch/sparc64/lib/NGmemcpy.S
+++ b/arch/sparc64/lib/NGmemcpy.S
@@ -247,6 +247,8 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
247 /* fall through */ 247 /* fall through */
248 248
24960: 24960:
250 membar #Sync
251
250 /* %o2 contains any final bytes still needed to be copied 252 /* %o2 contains any final bytes still needed to be copied
251 * over. If anything is left, we copy it one byte at a time. 253 * over. If anything is left, we copy it one byte at a time.
252 */ 254 */
diff --git a/arch/sparc64/lib/NGpage.S b/arch/sparc64/lib/NGpage.S
index 7d7c3bb8dcbf..8ce3a0c9c537 100644
--- a/arch/sparc64/lib/NGpage.S
+++ b/arch/sparc64/lib/NGpage.S
@@ -41,6 +41,7 @@ NGcopy_user_page: /* %o0=dest, %o1=src, %o2=vaddr */
41 subcc %g7, 64, %g7 41 subcc %g7, 64, %g7
42 bne,pt %xcc, 1b 42 bne,pt %xcc, 1b
43 add %o0, 32, %o0 43 add %o0, 32, %o0
44 membar #Sync
44 retl 45 retl
45 nop 46 nop
46 47
@@ -63,6 +64,7 @@ NGclear_user_page: /* %o0=dest, %o1=vaddr */
63 subcc %g7, 64, %g7 64 subcc %g7, 64, %g7
64 bne,pt %xcc, 1b 65 bne,pt %xcc, 1b
65 add %o0, 32, %o0 66 add %o0, 32, %o0
67 membar #Sync
66 retl 68 retl
67 nop 69 nop
68 70
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c
index 33fd0b265e70..00677b5e1d7d 100644
--- a/arch/sparc64/mm/hugetlbpage.c
+++ b/arch/sparc64/mm/hugetlbpage.c
@@ -248,6 +248,7 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
248 if (!pte_present(*ptep) && pte_present(entry)) 248 if (!pte_present(*ptep) && pte_present(entry))
249 mm->context.huge_pte_count++; 249 mm->context.huge_pte_count++;
250 250
251 addr &= HPAGE_MASK;
251 for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { 252 for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) {
252 set_pte_at(mm, addr, ptep, entry); 253 set_pte_at(mm, addr, ptep, entry);
253 ptep++; 254 ptep++;
@@ -266,6 +267,8 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
266 if (pte_present(entry)) 267 if (pte_present(entry))
267 mm->context.huge_pte_count--; 268 mm->context.huge_pte_count--;
268 269
270 addr &= HPAGE_MASK;
271
269 for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { 272 for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) {
270 pte_clear(mm, addr, ptep); 273 pte_clear(mm, addr, ptep);
271 addr += PAGE_SIZE; 274 addr += PAGE_SIZE;
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index b1a1ee0cc6bd..f146071a4b2a 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -59,8 +59,10 @@ unsigned long kern_linear_pte_xor[2] __read_mostly;
59 */ 59 */
60unsigned long kpte_linear_bitmap[KPTE_BITMAP_BYTES / sizeof(unsigned long)]; 60unsigned long kpte_linear_bitmap[KPTE_BITMAP_BYTES / sizeof(unsigned long)];
61 61
62#ifndef CONFIG_DEBUG_PAGEALLOC
62/* A special kernel TSB for 4MB and 256MB linear mappings. */ 63/* A special kernel TSB for 4MB and 256MB linear mappings. */
63struct tsb swapper_4m_tsb[KERNEL_TSB4M_NENTRIES]; 64struct tsb swapper_4m_tsb[KERNEL_TSB4M_NENTRIES];
65#endif
64 66
65#define MAX_BANKS 32 67#define MAX_BANKS 32
66 68
@@ -1301,7 +1303,12 @@ static void __init tsb_phys_patch(void)
1301} 1303}
1302 1304
1303/* Don't mark as init, we give this to the Hypervisor. */ 1305/* Don't mark as init, we give this to the Hypervisor. */
1304static struct hv_tsb_descr ktsb_descr[2]; 1306#ifndef CONFIG_DEBUG_PAGEALLOC
1307#define NUM_KTSB_DESCR 2
1308#else
1309#define NUM_KTSB_DESCR 1
1310#endif
1311static struct hv_tsb_descr ktsb_descr[NUM_KTSB_DESCR];
1305extern struct tsb swapper_tsb[KERNEL_TSB_NENTRIES]; 1312extern struct tsb swapper_tsb[KERNEL_TSB_NENTRIES];
1306 1313
1307static void __init sun4v_ktsb_init(void) 1314static void __init sun4v_ktsb_init(void)
@@ -1340,6 +1347,7 @@ static void __init sun4v_ktsb_init(void)
1340 ktsb_descr[0].tsb_base = ktsb_pa; 1347 ktsb_descr[0].tsb_base = ktsb_pa;
1341 ktsb_descr[0].resv = 0; 1348 ktsb_descr[0].resv = 0;
1342 1349
1350#ifndef CONFIG_DEBUG_PAGEALLOC
1343 /* Second KTSB for 4MB/256MB mappings. */ 1351 /* Second KTSB for 4MB/256MB mappings. */
1344 ktsb_pa = (kern_base + 1352 ktsb_pa = (kern_base +
1345 ((unsigned long)&swapper_4m_tsb[0] - KERNBASE)); 1353 ((unsigned long)&swapper_4m_tsb[0] - KERNBASE));
@@ -1352,6 +1360,7 @@ static void __init sun4v_ktsb_init(void)
1352 ktsb_descr[1].ctx_idx = 0; 1360 ktsb_descr[1].ctx_idx = 0;
1353 ktsb_descr[1].tsb_base = ktsb_pa; 1361 ktsb_descr[1].tsb_base = ktsb_pa;
1354 ktsb_descr[1].resv = 0; 1362 ktsb_descr[1].resv = 0;
1363#endif
1355} 1364}
1356 1365
1357void __cpuinit sun4v_ktsb_register(void) 1366void __cpuinit sun4v_ktsb_register(void)
@@ -1364,7 +1373,7 @@ void __cpuinit sun4v_ktsb_register(void)
1364 pa = kern_base + ((unsigned long)&ktsb_descr[0] - KERNBASE); 1373 pa = kern_base + ((unsigned long)&ktsb_descr[0] - KERNBASE);
1365 1374
1366 func = HV_FAST_MMU_TSB_CTX0; 1375 func = HV_FAST_MMU_TSB_CTX0;
1367 arg0 = 2; 1376 arg0 = NUM_KTSB_DESCR;
1368 arg1 = pa; 1377 arg1 = pa;
1369 __asm__ __volatile__("ta %6" 1378 __asm__ __volatile__("ta %6"
1370 : "=&r" (func), "=&r" (arg0), "=&r" (arg1) 1379 : "=&r" (func), "=&r" (arg0), "=&r" (arg1)
@@ -1393,7 +1402,9 @@ void __init paging_init(void)
1393 1402
1394 /* Invalidate both kernel TSBs. */ 1403 /* Invalidate both kernel TSBs. */
1395 memset(swapper_tsb, 0x40, sizeof(swapper_tsb)); 1404 memset(swapper_tsb, 0x40, sizeof(swapper_tsb));
1405#ifndef CONFIG_DEBUG_PAGEALLOC
1396 memset(swapper_4m_tsb, 0x40, sizeof(swapper_4m_tsb)); 1406 memset(swapper_4m_tsb, 0x40, sizeof(swapper_4m_tsb));
1407#endif
1397 1408
1398 if (tlb_type == hypervisor) 1409 if (tlb_type == hypervisor)
1399 sun4v_pgprot_init(); 1410 sun4v_pgprot_init();
@@ -1725,8 +1736,13 @@ static void __init sun4u_pgprot_init(void)
1725 pg_iobits = (_PAGE_VALID | _PAGE_PRESENT_4U | __DIRTY_BITS_4U | 1736 pg_iobits = (_PAGE_VALID | _PAGE_PRESENT_4U | __DIRTY_BITS_4U |
1726 __ACCESS_BITS_4U | _PAGE_E_4U); 1737 __ACCESS_BITS_4U | _PAGE_E_4U);
1727 1738
1739#ifdef CONFIG_DEBUG_PAGEALLOC
1740 kern_linear_pte_xor[0] = (_PAGE_VALID | _PAGE_SZBITS_4U) ^
1741 0xfffff80000000000;
1742#else
1728 kern_linear_pte_xor[0] = (_PAGE_VALID | _PAGE_SZ4MB_4U) ^ 1743 kern_linear_pte_xor[0] = (_PAGE_VALID | _PAGE_SZ4MB_4U) ^
1729 0xfffff80000000000; 1744 0xfffff80000000000;
1745#endif
1730 kern_linear_pte_xor[0] |= (_PAGE_CP_4U | _PAGE_CV_4U | 1746 kern_linear_pte_xor[0] |= (_PAGE_CP_4U | _PAGE_CV_4U |
1731 _PAGE_P_4U | _PAGE_W_4U); 1747 _PAGE_P_4U | _PAGE_W_4U);
1732 1748
@@ -1769,13 +1785,23 @@ static void __init sun4v_pgprot_init(void)
1769 _PAGE_E = _PAGE_E_4V; 1785 _PAGE_E = _PAGE_E_4V;
1770 _PAGE_CACHE = _PAGE_CACHE_4V; 1786 _PAGE_CACHE = _PAGE_CACHE_4V;
1771 1787
1788#ifdef CONFIG_DEBUG_PAGEALLOC
1789 kern_linear_pte_xor[0] = (_PAGE_VALID | _PAGE_SZBITS_4V) ^
1790 0xfffff80000000000;
1791#else
1772 kern_linear_pte_xor[0] = (_PAGE_VALID | _PAGE_SZ4MB_4V) ^ 1792 kern_linear_pte_xor[0] = (_PAGE_VALID | _PAGE_SZ4MB_4V) ^
1773 0xfffff80000000000; 1793 0xfffff80000000000;
1794#endif
1774 kern_linear_pte_xor[0] |= (_PAGE_CP_4V | _PAGE_CV_4V | 1795 kern_linear_pte_xor[0] |= (_PAGE_CP_4V | _PAGE_CV_4V |
1775 _PAGE_P_4V | _PAGE_W_4V); 1796 _PAGE_P_4V | _PAGE_W_4V);
1776 1797
1798#ifdef CONFIG_DEBUG_PAGEALLOC
1799 kern_linear_pte_xor[1] = (_PAGE_VALID | _PAGE_SZBITS_4V) ^
1800 0xfffff80000000000;
1801#else
1777 kern_linear_pte_xor[1] = (_PAGE_VALID | _PAGE_SZ256MB_4V) ^ 1802 kern_linear_pte_xor[1] = (_PAGE_VALID | _PAGE_SZ256MB_4V) ^
1778 0xfffff80000000000; 1803 0xfffff80000000000;
1804#endif
1779 kern_linear_pte_xor[1] |= (_PAGE_CP_4V | _PAGE_CV_4V | 1805 kern_linear_pte_xor[1] |= (_PAGE_CP_4V | _PAGE_CV_4V |
1780 _PAGE_P_4V | _PAGE_W_4V); 1806 _PAGE_P_4V | _PAGE_W_4V);
1781 1807
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index b3a21ba77cd2..354cc6b70530 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -44,7 +44,7 @@ config LOCKDEP_SUPPORT
44 44
45config STACKTRACE_SUPPORT 45config STACKTRACE_SUPPORT
46 bool 46 bool
47 default y 47 default n
48 48
49config GENERIC_CALIBRATE_DELAY 49config GENERIC_CALIBRATE_DELAY
50 bool 50 bool
diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules
index 813077fb1e5b..a9a4b85ca516 100644
--- a/arch/um/scripts/Makefile.rules
+++ b/arch/um/scripts/Makefile.rules
@@ -10,7 +10,7 @@ USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
10$(USER_OBJS:.o=.%): \ 10$(USER_OBJS:.o=.%): \
11 c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(basetarget).o) 11 c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(basetarget).o)
12$(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ 12$(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
13 -Dunix -D__unix__ -D__$(SUBARCH)__ 13 -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF)
14 14
15# These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of 15# These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of
16# using it directly. 16# using it directly.
@@ -19,7 +19,7 @@ UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file))
19$(UNPROFILE_OBJS:.o=.%): \ 19$(UNPROFILE_OBJS:.o=.%): \
20 c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o) 20 c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o)
21$(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ 21$(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
22 -Dunix -D__unix__ -D__$(SUBARCH)__ 22 -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF)
23 23
24# The stubs and unmap.o can't try to call mcount or update basic block data 24# The stubs and unmap.o can't try to call mcount or update basic block data
25define unprofile 25define unprofile
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig
index 293a4a4c609e..7a1e251e333d 100644
--- a/arch/x86_64/defconfig
+++ b/arch/x86_64/defconfig
@@ -1,11 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-git8 3# Linux kernel version: 2.6.21-rc3
4# Tue Feb 13 11:25:16 2007 4# Wed Mar 7 15:29:47 2007
5# 5#
6CONFIG_X86_64=y 6CONFIG_X86_64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
8CONFIG_X86=y 8CONFIG_X86=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_TIME_VSYSCALL=y
9CONFIG_ZONE_DMA32=y 11CONFIG_ZONE_DMA32=y
10CONFIG_LOCKDEP_SUPPORT=y 12CONFIG_LOCKDEP_SUPPORT=y
11CONFIG_STACKTRACE_SUPPORT=y 13CONFIG_STACKTRACE_SUPPORT=y
@@ -43,6 +45,7 @@ CONFIG_LOCALVERSION_AUTO=y
43CONFIG_SWAP=y 45CONFIG_SWAP=y
44CONFIG_SYSVIPC=y 46CONFIG_SYSVIPC=y
45# CONFIG_IPC_NS is not set 47# CONFIG_IPC_NS is not set
48CONFIG_SYSVIPC_SYSCTL=y
46CONFIG_POSIX_MQUEUE=y 49CONFIG_POSIX_MQUEUE=y
47# CONFIG_BSD_PROCESS_ACCT is not set 50# CONFIG_BSD_PROCESS_ACCT is not set
48# CONFIG_TASKSTATS is not set 51# CONFIG_TASKSTATS is not set
@@ -53,6 +56,7 @@ CONFIG_IKCONFIG_PROC=y
53# CONFIG_CPUSETS is not set 56# CONFIG_CPUSETS is not set
54CONFIG_SYSFS_DEPRECATED=y 57CONFIG_SYSFS_DEPRECATED=y
55# CONFIG_RELAY is not set 58# CONFIG_RELAY is not set
59CONFIG_BLK_DEV_INITRD=y
56CONFIG_INITRAMFS_SOURCE="" 60CONFIG_INITRAMFS_SOURCE=""
57CONFIG_CC_OPTIMIZE_FOR_SIZE=y 61CONFIG_CC_OPTIMIZE_FOR_SIZE=y
58CONFIG_SYSCTL=y 62CONFIG_SYSCTL=y
@@ -114,11 +118,11 @@ CONFIG_X86_PC=y
114# CONFIG_X86_VSMP is not set 118# CONFIG_X86_VSMP is not set
115# CONFIG_MK8 is not set 119# CONFIG_MK8 is not set
116# CONFIG_MPSC is not set 120# CONFIG_MPSC is not set
117CONFIG_MCORE2=y 121# CONFIG_MCORE2 is not set
118# CONFIG_GENERIC_CPU is not set 122CONFIG_GENERIC_CPU=y
119CONFIG_X86_L1_CACHE_BYTES=64 123CONFIG_X86_L1_CACHE_BYTES=128
120CONFIG_X86_L1_CACHE_SHIFT=6 124CONFIG_X86_L1_CACHE_SHIFT=7
121CONFIG_X86_INTERNODE_CACHE_BYTES=64 125CONFIG_X86_INTERNODE_CACHE_BYTES=128
122CONFIG_X86_TSC=y 126CONFIG_X86_TSC=y
123CONFIG_X86_GOOD_APIC=y 127CONFIG_X86_GOOD_APIC=y
124# CONFIG_MICROCODE is not set 128# CONFIG_MICROCODE is not set
@@ -207,10 +211,8 @@ CONFIG_ACPI_PROCFS=y
207CONFIG_ACPI_AC=y 211CONFIG_ACPI_AC=y
208CONFIG_ACPI_BATTERY=y 212CONFIG_ACPI_BATTERY=y
209CONFIG_ACPI_BUTTON=y 213CONFIG_ACPI_BUTTON=y
210# CONFIG_ACPI_HOTKEY is not set
211CONFIG_ACPI_FAN=y 214CONFIG_ACPI_FAN=y
212# CONFIG_ACPI_DOCK is not set 215# CONFIG_ACPI_DOCK is not set
213# CONFIG_ACPI_BAY is not set
214CONFIG_ACPI_PROCESSOR=y 216CONFIG_ACPI_PROCESSOR=y
215CONFIG_ACPI_HOTPLUG_CPU=y 217CONFIG_ACPI_HOTPLUG_CPU=y
216CONFIG_ACPI_THERMAL=y 218CONFIG_ACPI_THERMAL=y
@@ -319,7 +321,7 @@ CONFIG_IP_PNP_DHCP=y
319# CONFIG_INET_ESP is not set 321# CONFIG_INET_ESP is not set
320# CONFIG_INET_IPCOMP is not set 322# CONFIG_INET_IPCOMP is not set
321# CONFIG_INET_XFRM_TUNNEL is not set 323# CONFIG_INET_XFRM_TUNNEL is not set
322# CONFIG_INET_TUNNEL is not set 324CONFIG_INET_TUNNEL=y
323# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 325# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
324# CONFIG_INET_XFRM_MODE_TUNNEL is not set 326# CONFIG_INET_XFRM_MODE_TUNNEL is not set
325# CONFIG_INET_XFRM_MODE_BEET is not set 327# CONFIG_INET_XFRM_MODE_BEET is not set
@@ -421,7 +423,13 @@ CONFIG_FW_LOADER=y
421# 423#
422# Plug and Play support 424# Plug and Play support
423# 425#
424# CONFIG_PNP is not set 426CONFIG_PNP=y
427# CONFIG_PNP_DEBUG is not set
428
429#
430# Protocols
431#
432CONFIG_PNPACPI=y
425 433
426# 434#
427# Block devices 435# Block devices
@@ -441,7 +449,6 @@ CONFIG_BLK_DEV_RAM=y
441CONFIG_BLK_DEV_RAM_COUNT=16 449CONFIG_BLK_DEV_RAM_COUNT=16
442CONFIG_BLK_DEV_RAM_SIZE=4096 450CONFIG_BLK_DEV_RAM_SIZE=4096
443CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 451CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
444CONFIG_BLK_DEV_INITRD=y
445# CONFIG_CDROM_PKTCDVD is not set 452# CONFIG_CDROM_PKTCDVD is not set
446# CONFIG_ATA_OVER_ETH is not set 453# CONFIG_ATA_OVER_ETH is not set
447 454
@@ -451,6 +458,7 @@ CONFIG_BLK_DEV_INITRD=y
451# CONFIG_IBM_ASM is not set 458# CONFIG_IBM_ASM is not set
452# CONFIG_SGI_IOC4 is not set 459# CONFIG_SGI_IOC4 is not set
453# CONFIG_TIFM_CORE is not set 460# CONFIG_TIFM_CORE is not set
461# CONFIG_SONY_LAPTOP is not set
454 462
455# 463#
456# ATA/ATAPI/MFM/RLL support 464# ATA/ATAPI/MFM/RLL support
@@ -477,6 +485,7 @@ CONFIG_BLK_DEV_IDEACPI=y
477# 485#
478CONFIG_IDE_GENERIC=y 486CONFIG_IDE_GENERIC=y
479# CONFIG_BLK_DEV_CMD640 is not set 487# CONFIG_BLK_DEV_CMD640 is not set
488# CONFIG_BLK_DEV_IDEPNP is not set
480CONFIG_BLK_DEV_IDEPCI=y 489CONFIG_BLK_DEV_IDEPCI=y
481# CONFIG_IDEPCI_SHARE_IRQ is not set 490# CONFIG_IDEPCI_SHARE_IRQ is not set
482# CONFIG_BLK_DEV_OFFBOARD is not set 491# CONFIG_BLK_DEV_OFFBOARD is not set
@@ -623,6 +632,7 @@ CONFIG_SATA_VIA=y
623# CONFIG_SATA_VITESSE is not set 632# CONFIG_SATA_VITESSE is not set
624# CONFIG_SATA_INIC162X is not set 633# CONFIG_SATA_INIC162X is not set
625CONFIG_SATA_INTEL_COMBINED=y 634CONFIG_SATA_INTEL_COMBINED=y
635CONFIG_SATA_ACPI=y
626# CONFIG_PATA_ALI is not set 636# CONFIG_PATA_ALI is not set
627# CONFIG_PATA_AMD is not set 637# CONFIG_PATA_AMD is not set
628# CONFIG_PATA_ARTOP is not set 638# CONFIG_PATA_ARTOP is not set
@@ -726,6 +736,7 @@ CONFIG_NETDEVICES=y
726# CONFIG_BONDING is not set 736# CONFIG_BONDING is not set
727# CONFIG_EQUALIZER is not set 737# CONFIG_EQUALIZER is not set
728CONFIG_TUN=y 738CONFIG_TUN=y
739# CONFIG_NET_SB1000 is not set
729 740
730# 741#
731# ARCnet devices 742# ARCnet devices
@@ -920,6 +931,7 @@ CONFIG_HW_CONSOLE=y
920CONFIG_SERIAL_8250=y 931CONFIG_SERIAL_8250=y
921CONFIG_SERIAL_8250_CONSOLE=y 932CONFIG_SERIAL_8250_CONSOLE=y
922CONFIG_SERIAL_8250_PCI=y 933CONFIG_SERIAL_8250_PCI=y
934CONFIG_SERIAL_8250_PNP=y
923CONFIG_SERIAL_8250_NR_UARTS=4 935CONFIG_SERIAL_8250_NR_UARTS=4
924CONFIG_SERIAL_8250_RUNTIME_UARTS=4 936CONFIG_SERIAL_8250_RUNTIME_UARTS=4
925# CONFIG_SERIAL_8250_EXTENDED is not set 937# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -1001,6 +1013,7 @@ CONFIG_I2C_ISA=m
1001# CONFIG_I2C_NFORCE2 is not set 1013# CONFIG_I2C_NFORCE2 is not set
1002# CONFIG_I2C_OCORES is not set 1014# CONFIG_I2C_OCORES is not set
1003# CONFIG_I2C_PARPORT_LIGHT is not set 1015# CONFIG_I2C_PARPORT_LIGHT is not set
1016# CONFIG_I2C_PASEMI is not set
1004# CONFIG_I2C_PROSAVAGE is not set 1017# CONFIG_I2C_PROSAVAGE is not set
1005# CONFIG_I2C_SAVAGE4 is not set 1018# CONFIG_I2C_SAVAGE4 is not set
1006# CONFIG_I2C_SIS5595 is not set 1019# CONFIG_I2C_SIS5595 is not set
@@ -1047,6 +1060,7 @@ CONFIG_HWMON=y
1047# CONFIG_SENSORS_ADM1021 is not set 1060# CONFIG_SENSORS_ADM1021 is not set
1048# CONFIG_SENSORS_ADM1025 is not set 1061# CONFIG_SENSORS_ADM1025 is not set
1049# CONFIG_SENSORS_ADM1026 is not set 1062# CONFIG_SENSORS_ADM1026 is not set
1063# CONFIG_SENSORS_ADM1029 is not set
1050# CONFIG_SENSORS_ADM1031 is not set 1064# CONFIG_SENSORS_ADM1031 is not set
1051# CONFIG_SENSORS_ADM9240 is not set 1065# CONFIG_SENSORS_ADM9240 is not set
1052# CONFIG_SENSORS_K8TEMP is not set 1066# CONFIG_SENSORS_K8TEMP is not set
@@ -1090,6 +1104,11 @@ CONFIG_SENSORS_SMSC47B397=m
1090# CONFIG_HWMON_DEBUG_CHIP is not set 1104# CONFIG_HWMON_DEBUG_CHIP is not set
1091 1105
1092# 1106#
1107# Multifunction device drivers
1108#
1109# CONFIG_MFD_SM501 is not set
1110
1111#
1093# Multimedia devices 1112# Multimedia devices
1094# 1113#
1095# CONFIG_VIDEO_DEV is not set 1114# CONFIG_VIDEO_DEV is not set
@@ -1103,7 +1122,7 @@ CONFIG_SENSORS_SMSC47B397=m
1103# 1122#
1104# Graphics support 1123# Graphics support
1105# 1124#
1106# CONFIG_FIRMWARE_EDID is not set 1125# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1107# CONFIG_FB is not set 1126# CONFIG_FB is not set
1108 1127
1109# 1128#
@@ -1114,7 +1133,6 @@ CONFIG_VGACON_SOFT_SCROLLBACK=y
1114CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 1133CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256
1115CONFIG_VIDEO_SELECT=y 1134CONFIG_VIDEO_SELECT=y
1116CONFIG_DUMMY_CONSOLE=y 1135CONFIG_DUMMY_CONSOLE=y
1117# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1118 1136
1119# 1137#
1120# Sound 1138# Sound
@@ -1130,9 +1148,8 @@ CONFIG_SOUND=y
1130# Open Sound System 1148# Open Sound System
1131# 1149#
1132CONFIG_SOUND_PRIME=y 1150CONFIG_SOUND_PRIME=y
1133CONFIG_OBSOLETE_OSS=y 1151# CONFIG_OBSOLETE_OSS is not set
1134# CONFIG_SOUND_BT878 is not set 1152# CONFIG_SOUND_BT878 is not set
1135# CONFIG_SOUND_ES1371 is not set
1136CONFIG_SOUND_ICH=y 1153CONFIG_SOUND_ICH=y
1137# CONFIG_SOUND_TRIDENT is not set 1154# CONFIG_SOUND_TRIDENT is not set
1138# CONFIG_SOUND_MSNDCLAS is not set 1155# CONFIG_SOUND_MSNDCLAS is not set
@@ -1263,6 +1280,7 @@ CONFIG_USB_MON=y
1263# CONFIG_USB_RIO500 is not set 1280# CONFIG_USB_RIO500 is not set
1264# CONFIG_USB_LEGOTOWER is not set 1281# CONFIG_USB_LEGOTOWER is not set
1265# CONFIG_USB_LCD is not set 1282# CONFIG_USB_LCD is not set
1283# CONFIG_USB_BERRY_CHARGE is not set
1266# CONFIG_USB_LED is not set 1284# CONFIG_USB_LED is not set
1267# CONFIG_USB_CYPRESS_CY7C63 is not set 1285# CONFIG_USB_CYPRESS_CY7C63 is not set
1268# CONFIG_USB_CYTHERM is not set 1286# CONFIG_USB_CYTHERM is not set
@@ -1273,6 +1291,7 @@ CONFIG_USB_MON=y
1273# CONFIG_USB_SISUSBVGA is not set 1291# CONFIG_USB_SISUSBVGA is not set
1274# CONFIG_USB_LD is not set 1292# CONFIG_USB_LD is not set
1275# CONFIG_USB_TRANCEVIBRATOR is not set 1293# CONFIG_USB_TRANCEVIBRATOR is not set
1294# CONFIG_USB_IOWARRIOR is not set
1276# CONFIG_USB_TEST is not set 1295# CONFIG_USB_TEST is not set
1277 1296
1278# 1297#
@@ -1538,6 +1557,7 @@ CONFIG_DEBUG_KERNEL=y
1538CONFIG_LOG_BUF_SHIFT=18 1557CONFIG_LOG_BUF_SHIFT=18
1539CONFIG_DETECT_SOFTLOCKUP=y 1558CONFIG_DETECT_SOFTLOCKUP=y
1540# CONFIG_SCHEDSTATS is not set 1559# CONFIG_SCHEDSTATS is not set
1560# CONFIG_TIMER_STATS is not set
1541# CONFIG_DEBUG_SLAB is not set 1561# CONFIG_DEBUG_SLAB is not set
1542# CONFIG_DEBUG_RT_MUTEXES is not set 1562# CONFIG_DEBUG_RT_MUTEXES is not set
1543# CONFIG_RT_MUTEX_TESTER is not set 1563# CONFIG_RT_MUTEX_TESTER is not set
@@ -1556,6 +1576,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
1556# CONFIG_FORCED_INLINING is not set 1576# CONFIG_FORCED_INLINING is not set
1557# CONFIG_RCU_TORTURE_TEST is not set 1577# CONFIG_RCU_TORTURE_TEST is not set
1558# CONFIG_LKDTM is not set 1578# CONFIG_LKDTM is not set
1579# CONFIG_FAULT_INJECTION is not set
1559# CONFIG_DEBUG_RODATA is not set 1580# CONFIG_DEBUG_RODATA is not set
1560# CONFIG_IOMMU_DEBUG is not set 1581# CONFIG_IOMMU_DEBUG is not set
1561CONFIG_DEBUG_STACKOVERFLOW=y 1582CONFIG_DEBUG_STACKOVERFLOW=y
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
index eda7a0d4dc15..796df6992f62 100644
--- a/arch/x86_64/ia32/ia32entry.S
+++ b/arch/x86_64/ia32/ia32entry.S
@@ -560,7 +560,7 @@ ia32_sys_call_table:
560 .quad sys_sched_yield 560 .quad sys_sched_yield
561 .quad sys_sched_get_priority_max 561 .quad sys_sched_get_priority_max
562 .quad sys_sched_get_priority_min /* 160 */ 562 .quad sys_sched_get_priority_min /* 160 */
563 .quad sys_sched_rr_get_interval 563 .quad sys32_sched_rr_get_interval
564 .quad compat_sys_nanosleep 564 .quad compat_sys_nanosleep
565 .quad sys_mremap 565 .quad sys_mremap
566 .quad sys_setresuid16 566 .quad sys_setresuid16
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
index 723417d924c0..bd3e45d47c37 100644
--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -47,6 +47,10 @@ int apic_calibrate_pmtmr __initdata;
47 47
48int disable_apic_timer __initdata; 48int disable_apic_timer __initdata;
49 49
50/* Local APIC timer works in C2? */
51int local_apic_timer_c2_ok;
52EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok);
53
50static struct resource *ioapic_resources; 54static struct resource *ioapic_resources;
51static struct resource lapic_resource = { 55static struct resource lapic_resource = {
52 .name = "Local APIC", 56 .name = "Local APIC",
@@ -930,9 +934,17 @@ EXPORT_SYMBOL(switch_APIC_timer_to_ipi);
930 934
931void smp_send_timer_broadcast_ipi(void) 935void smp_send_timer_broadcast_ipi(void)
932{ 936{
937 int cpu = smp_processor_id();
933 cpumask_t mask; 938 cpumask_t mask;
934 939
935 cpus_and(mask, cpu_online_map, timer_interrupt_broadcast_ipi_mask); 940 cpus_and(mask, cpu_online_map, timer_interrupt_broadcast_ipi_mask);
941
942 if (cpu_isset(cpu, mask)) {
943 cpu_clear(cpu, mask);
944 add_pda(apic_timer_irqs, 1);
945 smp_local_timer_interrupt();
946 }
947
936 if (!cpus_empty(mask)) { 948 if (!cpus_empty(mask)) {
937 send_IPI_mask(mask, LOCAL_TIMER_VECTOR); 949 send_IPI_mask(mask, LOCAL_TIMER_VECTOR);
938 } 950 }
@@ -1192,6 +1204,13 @@ static __init int setup_nolapic(char *str)
1192} 1204}
1193early_param("nolapic", setup_nolapic); 1205early_param("nolapic", setup_nolapic);
1194 1206
1207static int __init parse_lapic_timer_c2_ok(char *arg)
1208{
1209 local_apic_timer_c2_ok = 1;
1210 return 0;
1211}
1212early_param("lapic_timer_c2_ok", parse_lapic_timer_c2_ok);
1213
1195static __init int setup_noapictimer(char *str) 1214static __init int setup_noapictimer(char *str)
1196{ 1215{
1197 if (str[0] != ' ' && str[0] != 0) 1216 if (str[0] != ' ' && str[0] != 0)
diff --git a/arch/x86_64/kernel/cpufreq/Kconfig b/arch/x86_64/kernel/cpufreq/Kconfig
index ced15d06f0f3..40acb67fb882 100644
--- a/arch/x86_64/kernel/cpufreq/Kconfig
+++ b/arch/x86_64/kernel/cpufreq/Kconfig
@@ -75,6 +75,7 @@ config X86_ACPI_CPUFREQ_PROC_INTF
75config X86_P4_CLOCKMOD 75config X86_P4_CLOCKMOD
76 tristate "Intel Pentium 4 clock modulation" 76 tristate "Intel Pentium 4 clock modulation"
77 depends on EMBEDDED 77 depends on EMBEDDED
78 select CPU_FREQ_TABLE
78 help 79 help
79 This adds the clock modulation driver for Intel Pentium 4 / XEON 80 This adds the clock modulation driver for Intel Pentium 4 / XEON
80 processors. When enabled it will lower CPU temperature by skipping 81 processors. When enabled it will lower CPU temperature by skipping
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index 4651fd22b213..a490fabfcf47 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -662,7 +662,7 @@ static int __init parse_memmap_opt(char *p)
662} 662}
663early_param("memmap", parse_memmap_opt); 663early_param("memmap", parse_memmap_opt);
664 664
665void finish_e820_parsing(void) 665void __init finish_e820_parsing(void)
666{ 666{
667 if (userdef) { 667 if (userdef) {
668 printk(KERN_INFO "user-defined physical RAM map:\n"); 668 printk(KERN_INFO "user-defined physical RAM map:\n");
diff --git a/arch/x86_64/kernel/early-quirks.c b/arch/x86_64/kernel/early-quirks.c
index dec587b293bf..148c6bcf5bb4 100644
--- a/arch/x86_64/kernel/early-quirks.c
+++ b/arch/x86_64/kernel/early-quirks.c
@@ -16,7 +16,7 @@
16#include <asm/proto.h> 16#include <asm/proto.h>
17#include <asm/dma.h> 17#include <asm/dma.h>
18 18
19static void via_bugs(void) 19static void __init via_bugs(void)
20{ 20{
21#ifdef CONFIG_IOMMU 21#ifdef CONFIG_IOMMU
22 if ((end_pfn > MAX_DMA32_PFN || force_iommu) && 22 if ((end_pfn > MAX_DMA32_PFN || force_iommu) &&
@@ -36,7 +36,7 @@ static int __init nvidia_hpet_check(struct acpi_table_header *header)
36} 36}
37#endif 37#endif
38 38
39static void nvidia_bugs(void) 39static void __init nvidia_bugs(void)
40{ 40{
41#ifdef CONFIG_ACPI 41#ifdef CONFIG_ACPI
42 /* 42 /*
@@ -62,7 +62,7 @@ static void nvidia_bugs(void)
62 62
63} 63}
64 64
65static void ati_bugs(void) 65static void __init ati_bugs(void)
66{ 66{
67 if (timer_over_8254 == 1) { 67 if (timer_over_8254 == 1) {
68 timer_over_8254 = 0; 68 timer_over_8254 = 0;
@@ -88,7 +88,7 @@ struct chipset {
88 void (*f)(void); 88 void (*f)(void);
89}; 89};
90 90
91static struct chipset early_qrk[] = { 91static struct __initdata chipset early_qrk[] = {
92 { PCI_VENDOR_ID_NVIDIA, nvidia_bugs }, 92 { PCI_VENDOR_ID_NVIDIA, nvidia_bugs },
93 { PCI_VENDOR_ID_VIA, via_bugs }, 93 { PCI_VENDOR_ID_VIA, via_bugs },
94 { PCI_VENDOR_ID_ATI, ati_bugs }, 94 { PCI_VENDOR_ID_ATI, ati_bugs },
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c
index 50dd8bef850e..455aa0b932f0 100644
--- a/arch/x86_64/kernel/mpparse.c
+++ b/arch/x86_64/kernel/mpparse.c
@@ -60,9 +60,9 @@ unsigned long mp_lapic_addr = 0;
60/* Processor that is doing the boot up */ 60/* Processor that is doing the boot up */
61unsigned int boot_cpu_id = -1U; 61unsigned int boot_cpu_id = -1U;
62/* Internal processor count */ 62/* Internal processor count */
63unsigned int num_processors __initdata = 0; 63unsigned int num_processors __cpuinitdata = 0;
64 64
65unsigned disabled_cpus __initdata; 65unsigned disabled_cpus __cpuinitdata;
66 66
67/* Bitmask of physically existing CPUs */ 67/* Bitmask of physically existing CPUs */
68physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE; 68physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE;
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c
index 486f4c61a948..82d9d85d5270 100644
--- a/arch/x86_64/kernel/nmi.c
+++ b/arch/x86_64/kernel/nmi.c
@@ -187,10 +187,7 @@ void nmi_watchdog_default(void)
187{ 187{
188 if (nmi_watchdog != NMI_DEFAULT) 188 if (nmi_watchdog != NMI_DEFAULT)
189 return; 189 return;
190 if (nmi_known_cpu()) 190 nmi_watchdog = NMI_NONE;
191 nmi_watchdog = NMI_LOCAL_APIC;
192 else
193 nmi_watchdog = NMI_IO_APIC;
194} 191}
195 192
196static int endflag __initdata = 0; 193static int endflag __initdata = 0;
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
index 030eb3753358..2bac8c60ad61 100644
--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -675,7 +675,7 @@ void __init gart_iommu_init(void)
675 dma_ops = &gart_dma_ops; 675 dma_ops = &gart_dma_ops;
676} 676}
677 677
678void gart_parse_options(char *p) 678void __init gart_parse_options(char *p)
679{ 679{
680 int arg; 680 int arg;
681 681
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
index cbbc6adc1a92..d8d5ccc245c8 100644
--- a/arch/x86_64/kernel/process.c
+++ b/arch/x86_64/kernel/process.c
@@ -382,14 +382,17 @@ void exit_thread(void)
382void flush_thread(void) 382void flush_thread(void)
383{ 383{
384 struct task_struct *tsk = current; 384 struct task_struct *tsk = current;
385 struct thread_info *t = current_thread_info();
386 385
387 if (t->flags & _TIF_ABI_PENDING) { 386 if (test_tsk_thread_flag(tsk, TIF_ABI_PENDING)) {
388 t->flags ^= (_TIF_ABI_PENDING | _TIF_IA32); 387 clear_tsk_thread_flag(tsk, TIF_ABI_PENDING);
389 if (t->flags & _TIF_IA32) 388 if (test_tsk_thread_flag(tsk, TIF_IA32)) {
389 clear_tsk_thread_flag(tsk, TIF_IA32);
390 } else {
391 set_tsk_thread_flag(tsk, TIF_IA32);
390 current_thread_info()->status |= TS_COMPAT; 392 current_thread_info()->status |= TS_COMPAT;
393 }
391 } 394 }
392 t->flags &= ~_TIF_DEBUG; 395 clear_tsk_thread_flag(tsk, TIF_DEBUG);
393 396
394 tsk->thread.debugreg0 = 0; 397 tsk->thread.debugreg0 = 0;
395 tsk->thread.debugreg1 = 0; 398 tsk->thread.debugreg1 = 0;
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c
index 180ff919eaf9..b43c698cf7d3 100644
--- a/arch/x86_64/kernel/vsyscall.c
+++ b/arch/x86_64/kernel/vsyscall.c
@@ -112,7 +112,7 @@ static __always_inline void do_vgettimeofday(struct timeval * tv)
112 112
113 vread = __vsyscall_gtod_data.clock.vread; 113 vread = __vsyscall_gtod_data.clock.vread;
114 if (unlikely(!__vsyscall_gtod_data.sysctl_enabled || !vread)) { 114 if (unlikely(!__vsyscall_gtod_data.sysctl_enabled || !vread)) {
115 gettimeofday(tv,0); 115 gettimeofday(tv,NULL);
116 return; 116 return;
117 } 117 }
118 now = vread(); 118 now = vread();
diff --git a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c
index 0dffae69f4ad..77c25b307635 100644
--- a/arch/x86_64/kernel/x8664_ksyms.c
+++ b/arch/x86_64/kernel/x8664_ksyms.c
@@ -59,3 +59,4 @@ EXPORT_SYMBOL(empty_zero_page);
59EXPORT_SYMBOL(init_level4_pgt); 59EXPORT_SYMBOL(init_level4_pgt);
60EXPORT_SYMBOL(load_gs_index); 60EXPORT_SYMBOL(load_gs_index);
61 61
62EXPORT_SYMBOL(_proxy_pda);