aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/process.c1
-rw-r--r--arch/arm/configs/at91sam9260ek_defconfig1
-rw-r--r--arch/arm/configs/at91sam9261ek_defconfig1
-rw-r--r--arch/arm/kernel/head.S7
-rw-r--r--arch/arm/mach-at91rm9200/at91rm9200_devices.c2
-rw-r--r--arch/arm/mach-at91rm9200/at91sam9260.c3
-rw-r--r--arch/arm/mach-at91rm9200/at91sam9261.c3
-rw-r--r--arch/arm/mach-at91rm9200/gpio.c39
-rw-r--r--arch/arm/mach-imx/cpufreq.c14
-rw-r--r--arch/arm/mach-s3c2410/gpio.c12
-rw-r--r--arch/arm/mach-s3c2410/pm.c7
-rw-r--r--arch/arm/mach-s3c2410/s3c2412-dma.c4
-rw-r--r--arch/arm/mm/init.c11
-rw-r--r--arch/arm/mm/ioremap.c3
-rw-r--r--arch/arm/mm/proc-xscale.S2
-rw-r--r--arch/arm/tools/mach-types25
-rw-r--r--arch/arm/vfp/entry.S1
-rw-r--r--arch/arm/vfp/vfp.h4
-rw-r--r--arch/arm/vfp/vfphw.S26
-rw-r--r--arch/arm/vfp/vfpmodule.c30
-rw-r--r--arch/avr32/configs/atstk1002_defconfig39
-rw-r--r--arch/avr32/kernel/avr32_ksyms.c1
-rw-r--r--arch/i386/boot/compressed/relocs.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/p4-clockmod.c9
-rw-r--r--arch/i386/kernel/cpu/cyrix.c2
-rw-r--r--arch/i386/kernel/efi.c89
-rw-r--r--arch/i386/kernel/entry.S4
-rw-r--r--arch/i386/kernel/io_apic.c32
-rw-r--r--arch/i386/kernel/nmi.c8
-rw-r--r--arch/i386/kernel/paravirt.c9
-rw-r--r--arch/i386/kernel/sysenter.c14
-rw-r--r--arch/i386/mach-default/setup.c2
-rw-r--r--arch/ia64/kernel/acpi.c3
-rw-r--r--arch/ia64/kernel/irq.c3
-rw-r--r--arch/mips/Kconfig14
-rw-r--r--arch/mips/Makefile2
-rw-r--r--arch/mips/dec/prom/memory.c2
-rw-r--r--arch/mips/kernel/smtc.c64
-rw-r--r--arch/mips/kernel/vpe.c9
-rw-r--r--arch/mips/mips-boards/malta/Makefile3
-rw-r--r--arch/mips/mips-boards/sim/sim_setup.c2
-rw-r--r--arch/mips/mm/init.c3
-rw-r--r--arch/mips/momentum/ocelot_g/prom.c4
-rw-r--r--arch/mips/momentum/ocelot_g/setup.c4
-rw-r--r--arch/mips/vr41xx/common/irq.c12
-rw-r--r--arch/powerpc/Kconfig6
-rw-r--r--arch/powerpc/kernel/pci_64.c2
-rw-r--r--arch/powerpc/kernel/vdso.c7
-rw-r--r--arch/sparc/kernel/process.c1
-rw-r--r--arch/sparc/kernel/smp.c8
-rw-r--r--arch/sparc/kernel/sun4d_smp.c2
-rw-r--r--arch/sparc64/kernel/sun4v_tlb_miss.S4
-rw-r--r--arch/um/Kconfig.i38658
-rw-r--r--arch/um/sys-i386/signal.c3
-rw-r--r--arch/um/sys-x86_64/signal.c5
-rw-r--r--arch/x86_64/ia32/ia32_binfmt.c49
-rw-r--r--arch/x86_64/ia32/syscall32.c15
-rw-r--r--arch/x86_64/kernel/nmi.c2
58 files changed, 442 insertions, 252 deletions
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index 3370e6faeae0..c15186390693 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -47,6 +47,7 @@
47 * Power off function, if any 47 * Power off function, if any
48 */ 48 */
49void (*pm_power_off)(void) = machine_power_off; 49void (*pm_power_off)(void) = machine_power_off;
50EXPORT_SYMBOL(pm_power_off);
50 51
51void 52void
52cpu_idle(void) 53cpu_idle(void)
diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260ek_defconfig
index 79049206dfa5..46b0c734aeb9 100644
--- a/arch/arm/configs/at91sam9260ek_defconfig
+++ b/arch/arm/configs/at91sam9260ek_defconfig
@@ -923,7 +923,6 @@ CONFIG_FORCED_INLINING=y
923# CONFIG_HEADERS_CHECK is not set 923# CONFIG_HEADERS_CHECK is not set
924# CONFIG_RCU_TORTURE_TEST is not set 924# CONFIG_RCU_TORTURE_TEST is not set
925CONFIG_DEBUG_USER=y 925CONFIG_DEBUG_USER=y
926# CONFIG_DEBUG_WAITQ is not set
927# CONFIG_DEBUG_ERRORS is not set 926# CONFIG_DEBUG_ERRORS is not set
928CONFIG_DEBUG_LL=y 927CONFIG_DEBUG_LL=y
929# CONFIG_DEBUG_ICEDCC is not set 928# CONFIG_DEBUG_ICEDCC is not set
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig
index 784ad7c0186d..fcd8fa091e9d 100644
--- a/arch/arm/configs/at91sam9261ek_defconfig
+++ b/arch/arm/configs/at91sam9261ek_defconfig
@@ -1079,7 +1079,6 @@ CONFIG_FORCED_INLINING=y
1079# CONFIG_HEADERS_CHECK is not set 1079# CONFIG_HEADERS_CHECK is not set
1080# CONFIG_RCU_TORTURE_TEST is not set 1080# CONFIG_RCU_TORTURE_TEST is not set
1081CONFIG_DEBUG_USER=y 1081CONFIG_DEBUG_USER=y
1082# CONFIG_DEBUG_WAITQ is not set
1083# CONFIG_DEBUG_ERRORS is not set 1082# CONFIG_DEBUG_ERRORS is not set
1084CONFIG_DEBUG_LL=y 1083CONFIG_DEBUG_LL=y
1085# CONFIG_DEBUG_ICEDCC is not set 1084# CONFIG_DEBUG_ICEDCC is not set
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index d994561816a1..cf495a3084b3 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -22,6 +22,10 @@
22#include <asm/thread_info.h> 22#include <asm/thread_info.h>
23#include <asm/system.h> 23#include <asm/system.h>
24 24
25#if (PHYS_OFFSET & 0x001fffff)
26#error "PHYS_OFFSET must be at an even 2MiB boundary!"
27#endif
28
25#define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) 29#define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET)
26#define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) 30#define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET)
27 31
@@ -251,7 +255,8 @@ __create_page_tables:
251 * Then map first 1MB of ram in case it contains our boot params. 255 * Then map first 1MB of ram in case it contains our boot params.
252 */ 256 */
253 add r0, r4, #PAGE_OFFSET >> 18 257 add r0, r4, #PAGE_OFFSET >> 18
254 orr r6, r7, #PHYS_OFFSET 258 orr r6, r7, #(PHYS_OFFSET & 0xff000000)
259 orr r6, r6, #(PHYS_OFFSET & 0x00e00000)
255 str r6, [r0] 260 str r6, [r0]
256 261
257#ifdef CONFIG_XIP_KERNEL 262#ifdef CONFIG_XIP_KERNEL
diff --git a/arch/arm/mach-at91rm9200/at91rm9200_devices.c b/arch/arm/mach-at91rm9200/at91rm9200_devices.c
index 4641b99db0ee..57fac7203fe4 100644
--- a/arch/arm/mach-at91rm9200/at91rm9200_devices.c
+++ b/arch/arm/mach-at91rm9200/at91rm9200_devices.c
@@ -272,7 +272,7 @@ void __init at91_add_device_cf(struct at91_cf_data *data)
272 at91_set_A_periph(AT91_PIN_PC12, 0); /* NCS6/CFCE2 */ 272 at91_set_A_periph(AT91_PIN_PC12, 0); /* NCS6/CFCE2 */
273 273
274 /* nWAIT is _not_ a default setting */ 274 /* nWAIT is _not_ a default setting */
275 at91_set_A_periph(AT91_PIN_PC6, 1); /* nWAIT */ 275 at91_set_A_periph(AT91_PIN_PC6, 1); /* nWAIT */
276 276
277 cf_data = *data; 277 cf_data = *data;
278 platform_device_register(&at91rm9200_cf_device); 278 platform_device_register(&at91rm9200_cf_device);
diff --git a/arch/arm/mach-at91rm9200/at91sam9260.c b/arch/arm/mach-at91rm9200/at91sam9260.c
index 203f073a53e6..b14871adc300 100644
--- a/arch/arm/mach-at91rm9200/at91sam9260.c
+++ b/arch/arm/mach-at91rm9200/at91sam9260.c
@@ -16,6 +16,7 @@
16#include <asm/mach/map.h> 16#include <asm/mach/map.h>
17#include <asm/arch/at91sam9260.h> 17#include <asm/arch/at91sam9260.h>
18#include <asm/arch/at91_pmc.h> 18#include <asm/arch/at91_pmc.h>
19#include <asm/arch/at91_rstc.h>
19 20
20#include "generic.h" 21#include "generic.h"
21#include "clock.h" 22#include "clock.h"
@@ -212,7 +213,7 @@ static struct at91_gpio_bank at91sam9260_gpio[] = {
212 213
213static void at91sam9260_reset(void) 214static void at91sam9260_reset(void)
214{ 215{
215#warning "Implement CPU reset" 216 at91_sys_write(AT91_RSTC_CR, (0xA5 << 24) | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
216} 217}
217 218
218 219
diff --git a/arch/arm/mach-at91rm9200/at91sam9261.c b/arch/arm/mach-at91rm9200/at91sam9261.c
index 5a82f35da2e9..d242bb885c6d 100644
--- a/arch/arm/mach-at91rm9200/at91sam9261.c
+++ b/arch/arm/mach-at91rm9200/at91sam9261.c
@@ -16,6 +16,7 @@
16#include <asm/mach/map.h> 16#include <asm/mach/map.h>
17#include <asm/arch/at91sam9261.h> 17#include <asm/arch/at91sam9261.h>
18#include <asm/arch/at91_pmc.h> 18#include <asm/arch/at91_pmc.h>
19#include <asm/arch/at91_rstc.h>
19 20
20#include "generic.h" 21#include "generic.h"
21#include "clock.h" 22#include "clock.h"
@@ -207,7 +208,7 @@ static struct at91_gpio_bank at91sam9261_gpio[] = {
207 208
208static void at91sam9261_reset(void) 209static void at91sam9261_reset(void)
209{ 210{
210#warning "Implement CPU reset" 211 at91_sys_write(AT91_RSTC_CR, (0xA5 << 24) | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
211} 212}
212 213
213 214
diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c
index 3f188508c391..af22659c8a28 100644
--- a/arch/arm/mach-at91rm9200/gpio.c
+++ b/arch/arm/mach-at91rm9200/gpio.c
@@ -20,7 +20,6 @@
20#include <asm/io.h> 20#include <asm/io.h>
21#include <asm/hardware.h> 21#include <asm/hardware.h>
22#include <asm/arch/at91_pio.h> 22#include <asm/arch/at91_pio.h>
23#include <asm/arch/at91_pmc.h>
24#include <asm/arch/gpio.h> 23#include <asm/arch/gpio.h>
25 24
26#include "generic.h" 25#include "generic.h"
@@ -224,17 +223,17 @@ static u32 backups[MAX_GPIO_BANKS];
224static int gpio_irq_set_wake(unsigned pin, unsigned state) 223static int gpio_irq_set_wake(unsigned pin, unsigned state)
225{ 224{
226 unsigned mask = pin_to_mask(pin); 225 unsigned mask = pin_to_mask(pin);
226 unsigned bank = (pin - PIN_BASE) / 32;
227 227
228 pin -= PIN_BASE; 228 if (unlikely(bank >= MAX_GPIO_BANKS))
229 pin /= 32;
230
231 if (unlikely(pin >= MAX_GPIO_BANKS))
232 return -EINVAL; 229 return -EINVAL;
233 230
234 if (state) 231 if (state)
235 wakeups[pin] |= mask; 232 wakeups[bank] |= mask;
236 else 233 else
237 wakeups[pin] &= ~mask; 234 wakeups[bank] &= ~mask;
235
236 set_irq_wake(gpio[bank].id, state);
238 237
239 return 0; 238 return 0;
240} 239}
@@ -246,29 +245,15 @@ void at91_gpio_suspend(void)
246 for (i = 0; i < gpio_banks; i++) { 245 for (i = 0; i < gpio_banks; i++) {
247 u32 pio = gpio[i].offset; 246 u32 pio = gpio[i].offset;
248 247
249 /*
250 * Note: drivers should have disabled GPIO interrupts that
251 * aren't supposed to be wakeup sources.
252 * But that is not much good on ARM..... disable_irq() does
253 * not update the hardware immediately, so the hardware mask
254 * (IMR) has the wrong value (not current, too much is
255 * permitted).
256 *
257 * Our workaround is to disable all non-wakeup IRQs ...
258 * which is exactly what correct drivers asked for in the
259 * first place!
260 */
261 backups[i] = at91_sys_read(pio + PIO_IMR); 248 backups[i] = at91_sys_read(pio + PIO_IMR);
262 at91_sys_write(pio + PIO_IDR, backups[i]); 249 at91_sys_write(pio + PIO_IDR, backups[i]);
263 at91_sys_write(pio + PIO_IER, wakeups[i]); 250 at91_sys_write(pio + PIO_IER, wakeups[i]);
264 251
265 if (!wakeups[i]) { 252 if (!wakeups[i])
266 disable_irq_wake(gpio[i].id); 253 clk_disable(gpio[i].clock);
267 at91_sys_write(AT91_PMC_PCDR, 1 << gpio[i].id); 254 else {
268 } else {
269 enable_irq_wake(gpio[i].id);
270#ifdef CONFIG_PM_DEBUG 255#ifdef CONFIG_PM_DEBUG
271 printk(KERN_DEBUG "GPIO-%c may wake for %08x\n", "ABCD"[i], wakeups[i]); 256 printk(KERN_DEBUG "GPIO-%c may wake for %08x\n", 'A'+i, wakeups[i]);
272#endif 257#endif
273 } 258 }
274 } 259 }
@@ -281,9 +266,11 @@ void at91_gpio_resume(void)
281 for (i = 0; i < gpio_banks; i++) { 266 for (i = 0; i < gpio_banks; i++) {
282 u32 pio = gpio[i].offset; 267 u32 pio = gpio[i].offset;
283 268
269 if (!wakeups[i])
270 clk_enable(gpio[i].clock);
271
284 at91_sys_write(pio + PIO_IDR, wakeups[i]); 272 at91_sys_write(pio + PIO_IDR, wakeups[i]);
285 at91_sys_write(pio + PIO_IER, backups[i]); 273 at91_sys_write(pio + PIO_IER, backups[i]);
286 at91_sys_write(AT91_PMC_PCER, 1 << gpio[i].id);
287 } 274 }
288} 275}
289 276
diff --git a/arch/arm/mach-imx/cpufreq.c b/arch/arm/mach-imx/cpufreq.c
index ac5f99895660..4f66e90db74f 100644
--- a/arch/arm/mach-imx/cpufreq.c
+++ b/arch/arm/mach-imx/cpufreq.c
@@ -184,6 +184,17 @@ static int imx_set_target(struct cpufreq_policy *policy,
184 long sysclk; 184 long sysclk;
185 unsigned int bclk_div = 1; 185 unsigned int bclk_div = 1;
186 186
187 /*
188 * Some governors do not respects CPU and policy lower limits
189 * which leads to bad things (division by zero etc), ensure
190 * that such things do not happen.
191 */
192 if(target_freq < policy->cpuinfo.min_freq)
193 target_freq = policy->cpuinfo.min_freq;
194
195 if(target_freq < policy->min)
196 target_freq = policy->min;
197
187 freq = target_freq * 1000; 198 freq = target_freq * 1000;
188 199
189 pr_debug(KERN_DEBUG "imx: requested frequency %ld Hz, mpctl0 at boot 0x%08x\n", 200 pr_debug(KERN_DEBUG "imx: requested frequency %ld Hz, mpctl0 at boot 0x%08x\n",
@@ -258,7 +269,8 @@ static int __init imx_cpufreq_driver_init(struct cpufreq_policy *policy)
258 policy->governor = CPUFREQ_DEFAULT_GOVERNOR; 269 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
259 policy->cpuinfo.min_freq = 8000; 270 policy->cpuinfo.min_freq = 8000;
260 policy->cpuinfo.max_freq = 200000; 271 policy->cpuinfo.max_freq = 200000;
261 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; 272 /* Manual states, that PLL stabilizes in two CLK32 periods */
273 policy->cpuinfo.transition_latency = 4 * 1000000000LL / CLK32;
262 return 0; 274 return 0;
263} 275}
264 276
diff --git a/arch/arm/mach-s3c2410/gpio.c b/arch/arm/mach-s3c2410/gpio.c
index ba346546150b..f6fb215bb48c 100644
--- a/arch/arm/mach-s3c2410/gpio.c
+++ b/arch/arm/mach-s3c2410/gpio.c
@@ -57,6 +57,7 @@ void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function)
57 case S3C2410_GPIO_SFN2: 57 case S3C2410_GPIO_SFN2:
58 case S3C2410_GPIO_SFN3: 58 case S3C2410_GPIO_SFN3:
59 if (pin < S3C2410_GPIO_BANKB) { 59 if (pin < S3C2410_GPIO_BANKB) {
60 function -= 1;
60 function &= 1; 61 function &= 1;
61 function <<= S3C2410_GPIO_OFFSET(pin); 62 function <<= S3C2410_GPIO_OFFSET(pin);
62 } else { 63 } else {
@@ -83,15 +84,18 @@ EXPORT_SYMBOL(s3c2410_gpio_cfgpin);
83unsigned int s3c2410_gpio_getcfg(unsigned int pin) 84unsigned int s3c2410_gpio_getcfg(unsigned int pin)
84{ 85{
85 void __iomem *base = S3C24XX_GPIO_BASE(pin); 86 void __iomem *base = S3C24XX_GPIO_BASE(pin);
86 unsigned long mask; 87 unsigned long val = __raw_readl(base);
87 88
88 if (pin < S3C2410_GPIO_BANKB) { 89 if (pin < S3C2410_GPIO_BANKB) {
89 mask = 1 << S3C2410_GPIO_OFFSET(pin); 90 val >>= S3C2410_GPIO_OFFSET(pin);
91 val &= 1;
92 val += 1;
90 } else { 93 } else {
91 mask = 3 << S3C2410_GPIO_OFFSET(pin)*2; 94 val >>= S3C2410_GPIO_OFFSET(pin)*2;
95 val &= 3;
92 } 96 }
93 97
94 return __raw_readl(base) & mask; 98 return val | S3C2410_GPIO_INPUT;
95} 99}
96 100
97EXPORT_SYMBOL(s3c2410_gpio_getcfg); 101EXPORT_SYMBOL(s3c2410_gpio_getcfg);
diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c
index 00834097eb82..ebf294dd31da 100644
--- a/arch/arm/mach-s3c2410/pm.c
+++ b/arch/arm/mach-s3c2410/pm.c
@@ -451,15 +451,14 @@ static void s3c2410_pm_check_resume_pin(unsigned int pin, unsigned int irqoffs)
451 irqstate = s3c_irqwake_eintmask & (1L<<irqoffs); 451 irqstate = s3c_irqwake_eintmask & (1L<<irqoffs);
452 452
453 pinstate = s3c2410_gpio_getcfg(pin); 453 pinstate = s3c2410_gpio_getcfg(pin);
454 pinstate >>= S3C2410_GPIO_OFFSET(pin)*2;
455 454
456 if (!irqstate) { 455 if (!irqstate) {
457 if (pinstate == 0x02) 456 if (pinstate == S3C2410_GPIO_IRQ)
458 DBG("Leaving IRQ %d (pin %d) enabled\n", irq, pin); 457 DBG("Leaving IRQ %d (pin %d) enabled\n", irq, pin);
459 } else { 458 } else {
460 if (pinstate == 0x02) { 459 if (pinstate == S3C2410_GPIO_IRQ) {
461 DBG("Disabling IRQ %d (pin %d)\n", irq, pin); 460 DBG("Disabling IRQ %d (pin %d)\n", irq, pin);
462 s3c2410_gpio_cfgpin(pin, 0x00); 461 s3c2410_gpio_cfgpin(pin, S3C2410_GPIO_INPUT);
463 } 462 }
464 } 463 }
465} 464}
diff --git a/arch/arm/mach-s3c2410/s3c2412-dma.c b/arch/arm/mach-s3c2410/s3c2412-dma.c
index fe71a8fdb87c..138f726ac6bf 100644
--- a/arch/arm/mach-s3c2410/s3c2412-dma.c
+++ b/arch/arm/mach-s3c2410/s3c2412-dma.c
@@ -133,8 +133,8 @@ static struct s3c24xx_dma_map __initdata s3c2412_dma_mappings[] = {
133static void s3c2412_dma_select(struct s3c2410_dma_chan *chan, 133static void s3c2412_dma_select(struct s3c2410_dma_chan *chan,
134 struct s3c24xx_dma_map *map) 134 struct s3c24xx_dma_map *map)
135{ 135{
136 writel(chan->regs + S3C2412_DMA_DMAREQSEL, 136 writel(map->channels[0] | S3C2412_DMAREQSEL_HW,
137 map->channels[0] | S3C2412_DMAREQSEL_HW); 137 chan->regs + S3C2412_DMA_DMAREQSEL);
138} 138}
139 139
140static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = { 140static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = {
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index b5814b4b6f35..7760193e74cc 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -52,15 +52,18 @@ void show_mem(void)
52 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); 52 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
53 53
54 for_each_online_node(node) { 54 for_each_online_node(node) {
55 pg_data_t *n = NODE_DATA(node);
56 struct page *map = n->node_mem_map - n->node_start_pfn;
57
55 for_each_nodebank (i,mi,node) { 58 for_each_nodebank (i,mi,node) {
56 unsigned int pfn1, pfn2; 59 unsigned int pfn1, pfn2;
57 struct page *page, *end; 60 struct page *page, *end;
58 61
59 pfn1 = mi->bank[i].start >> PAGE_SHIFT; 62 pfn1 = __phys_to_pfn(mi->bank[i].start);
60 pfn2 = (mi->bank[i].size + mi->bank[i].start) >> PAGE_SHIFT; 63 pfn2 = __phys_to_pfn(mi->bank[i].size + mi->bank[i].start);
61 64
62 page = NODE_MEM_MAP(node) + pfn1; 65 page = map + pfn1;
63 end = NODE_MEM_MAP(node) + pfn2; 66 end = map + pfn2;
64 67
65 do { 68 do {
66 total++; 69 total++;
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 251685fe73a8..0ac615c0f798 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -300,7 +300,8 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
300 addr = (unsigned long)area->addr; 300 addr = (unsigned long)area->addr;
301 301
302#ifndef CONFIG_SMP 302#ifndef CONFIG_SMP
303 if ((((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr() & CR_XP)) || 303 if (DOMAIN_IO == 0 &&
304 (((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr() & CR_XP)) ||
304 cpu_is_xsc3()) && 305 cpu_is_xsc3()) &&
305 !((__pfn_to_phys(pfn) | size | addr) & ~SUPERSECTION_MASK)) { 306 !((__pfn_to_phys(pfn) | size | addr) & ~SUPERSECTION_MASK)) {
306 area->flags |= VM_ARM_SECTION_MAPPING; 307 area->flags |= VM_ARM_SECTION_MAPPING;
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index 490e11b34231..d29fe927ee9e 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -708,7 +708,7 @@ __8032x_proc_info:
708 .type __8033x_proc_info,#object 708 .type __8033x_proc_info,#object
709__8033x_proc_info: 709__8033x_proc_info:
710 .long 0x69054010 710 .long 0x69054010
711 .long 0xffffff30 711 .long 0xfffffd30
712 .long PMD_TYPE_SECT | \ 712 .long PMD_TYPE_SECT | \
713 PMD_SECT_BUFFERABLE | \ 713 PMD_SECT_BUFFERABLE | \
714 PMD_SECT_CACHEABLE | \ 714 PMD_SECT_CACHEABLE | \
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 8bcb838e5444..bd78058b7178 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -12,7 +12,7 @@
12# 12#
13# http://www.arm.linux.org.uk/developer/machines/?action=new 13# http://www.arm.linux.org.uk/developer/machines/?action=new
14# 14#
15# Last update: Thu Dec 7 17:19:20 2006 15# Last update: Tue Jan 16 16:52:56 2007
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -1219,3 +1219,26 @@ zevio_1020 MACH_ZEVIO_1020 ZEVIO_1020 1207
1219hitrack MACH_HITRACK HITRACK 1208 1219hitrack MACH_HITRACK HITRACK 1208
1220syme1 MACH_SYME1 SYME1 1209 1220syme1 MACH_SYME1 SYME1 1209
1221syhl1 MACH_SYHL1 SYHL1 1210 1221syhl1 MACH_SYHL1 SYHL1 1210
1222empca400 MACH_EMPCA400 EMPCA400 1211
1223em7210 MACH_EM7210 EM7210 1212
1224htchermes MACH_HTCHERMES HTCHERMES 1213
1225eti_c1 MACH_ETI_C1 ETI_C1 1214
1226mach_dep2410 MACH_MACH_DEP2410 MACH_DEP2410 1215
1227ac100 MACH_AC100 AC100 1216
1228sneetch MACH_SNEETCH SNEETCH 1217
1229studentmate MACH_STUDENTMATE STUDENTMATE 1218
1230zir2410 MACH_ZIR2410 ZIR2410 1219
1231zir2413 MACH_ZIR2413 ZIR2413 1220
1232dlonip3 MACH_DLONIP3 DLONIP3 1221
1233instream MACH_INSTREAM INSTREAM 1222
1234ambarella MACH_AMBARELLA AMBARELLA 1223
1235nevis MACH_NEVIS NEVIS 1224
1236htc_trinity MACH_HTC_TRINITY HTC_TRINITY 1225
1237ql202b MACH_QL202B QL202B 1226
1238vpac270 MACH_VPAC270 VPAC270 1227
1239rd129 MACH_RD129 RD129 1228
1240htcwizard MACH_HTCWIZARD HTCWIZARD 1229
1241xscale_treo680 MACH_XSCALE_TREO680 XSCALE_TREO680 1230
1242tecon_tmezon MACH_TECON_TMEZON TECON_TMEZON 1231
1243zylonite MACH_ZYLONITE ZYLONITE 1233
1244gene1270 MACH_GENE1270 GENE1270 1234
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S
index 7b595547c1c8..ca2a5ad19ea6 100644
--- a/arch/arm/vfp/entry.S
+++ b/arch/arm/vfp/entry.S
@@ -25,6 +25,7 @@
25do_vfp: 25do_vfp:
26 enable_irq 26 enable_irq
27 ldr r4, .LCvfp 27 ldr r4, .LCvfp
28 ldr r11, [r10, #TI_CPU] @ CPU number
28 add r10, r10, #TI_VFPSTATE @ r10 = workspace 29 add r10, r10, #TI_VFPSTATE @ r10 = workspace
29 ldr pc, [r4] @ call VFP entry point 30 ldr pc, [r4] @ call VFP entry point
30 31
diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h
index f2797896e6d5..54a2ad6d9ca2 100644
--- a/arch/arm/vfp/vfp.h
+++ b/arch/arm/vfp/vfp.h
@@ -370,3 +370,7 @@ struct op {
370 u32 (* const fn)(int dd, int dn, int dm, u32 fpscr); 370 u32 (* const fn)(int dd, int dn, int dm, u32 fpscr);
371 u32 flags; 371 u32 flags;
372}; 372};
373
374#ifdef CONFIG_SMP
375extern void vfp_save_state(void *location, u32 fpexc);
376#endif
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
index e51e6679c402..d4b7b229631d 100644
--- a/arch/arm/vfp/vfphw.S
+++ b/arch/arm/vfp/vfphw.S
@@ -65,6 +65,7 @@
65@ r2 = faulted PC+4 65@ r2 = faulted PC+4
66@ r9 = successful return 66@ r9 = successful return
67@ r10 = vfp_state union 67@ r10 = vfp_state union
68@ r11 = CPU number
68@ lr = failure return 69@ lr = failure return
69 70
70 .globl vfp_support_entry 71 .globl vfp_support_entry
@@ -79,7 +80,7 @@ vfp_support_entry:
79 DBGSTR1 "enable %x", r10 80 DBGSTR1 "enable %x", r10
80 ldr r3, last_VFP_context_address 81 ldr r3, last_VFP_context_address
81 orr r1, r1, #FPEXC_ENABLE @ user FPEXC has the enable bit set 82 orr r1, r1, #FPEXC_ENABLE @ user FPEXC has the enable bit set
82 ldr r4, [r3] @ last_VFP_context pointer 83 ldr r4, [r3, r11, lsl #2] @ last_VFP_context pointer
83 bic r5, r1, #FPEXC_EXCEPTION @ make sure exceptions are disabled 84 bic r5, r1, #FPEXC_EXCEPTION @ make sure exceptions are disabled
84 cmp r4, r10 85 cmp r4, r10
85 beq check_for_exception @ we are returning to the same 86 beq check_for_exception @ we are returning to the same
@@ -91,7 +92,9 @@ vfp_support_entry:
91 @ exceptions, so we can get at the 92 @ exceptions, so we can get at the
92 @ rest of it 93 @ rest of it
93 94
95#ifndef CONFIG_SMP
94 @ Save out the current registers to the old thread state 96 @ Save out the current registers to the old thread state
97 @ No need for SMP since this is not done lazily
95 98
96 DBGSTR1 "save old state %p", r4 99 DBGSTR1 "save old state %p", r4
97 cmp r4, #0 100 cmp r4, #0
@@ -105,10 +108,11 @@ vfp_support_entry:
105 stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2 108 stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2
106 @ and point r4 at the word at the 109 @ and point r4 at the word at the
107 @ start of the register dump 110 @ start of the register dump
111#endif
108 112
109no_old_VFP_process: 113no_old_VFP_process:
110 DBGSTR1 "load state %p", r10 114 DBGSTR1 "load state %p", r10
111 str r10, [r3] @ update the last_VFP_context pointer 115 str r10, [r3, r11, lsl #2] @ update the last_VFP_context pointer
112 @ Load the saved state back into the VFP 116 @ Load the saved state back into the VFP
113 VFPFLDMIA r10 @ reload the working registers while 117 VFPFLDMIA r10 @ reload the working registers while
114 @ FPEXC is in a safe state 118 @ FPEXC is in a safe state
@@ -162,6 +166,24 @@ process_exception:
162 @ required. If not, the user code will 166 @ required. If not, the user code will
163 @ retry the faulted instruction 167 @ retry the faulted instruction
164 168
169#ifdef CONFIG_SMP
170 .globl vfp_save_state
171 .type vfp_save_state, %function
172vfp_save_state:
173 @ Save the current VFP state
174 @ r0 - save location
175 @ r1 - FPEXC
176 DBGSTR1 "save VFP state %p", r0
177 VFPFMRX r2, FPSCR @ current status
178 VFPFMRX r3, FPINST @ FPINST (always there, rev0 onwards)
179 tst r1, #FPEXC_FPV2 @ is there an FPINST2 to read?
180 VFPFMRX r12, FPINST2, NE @ FPINST2 if needed - avoids reading
181 @ nonexistant reg on rev0
182 VFPFSTMIA r0 @ save the working registers
183 stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2
184 mov pc, lr
185#endif
186
165last_VFP_context_address: 187last_VFP_context_address:
166 .word last_VFP_context 188 .word last_VFP_context
167 189
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 490d9d18a7d1..f1e5951dc721 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -28,7 +28,7 @@ void vfp_testing_entry(void);
28void vfp_support_entry(void); 28void vfp_support_entry(void);
29 29
30void (*vfp_vector)(void) = vfp_testing_entry; 30void (*vfp_vector)(void) = vfp_testing_entry;
31union vfp_state *last_VFP_context; 31union vfp_state *last_VFP_context[NR_CPUS];
32 32
33/* 33/*
34 * Dual-use variable. 34 * Dual-use variable.
@@ -41,13 +41,35 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v)
41{ 41{
42 struct thread_info *thread = v; 42 struct thread_info *thread = v;
43 union vfp_state *vfp; 43 union vfp_state *vfp;
44 __u32 cpu = thread->cpu;
44 45
45 if (likely(cmd == THREAD_NOTIFY_SWITCH)) { 46 if (likely(cmd == THREAD_NOTIFY_SWITCH)) {
47 u32 fpexc = fmrx(FPEXC);
48
49#ifdef CONFIG_SMP
50 /*
51 * On SMP, if VFP is enabled, save the old state in
52 * case the thread migrates to a different CPU. The
53 * restoring is done lazily.
54 */
55 if ((fpexc & FPEXC_ENABLE) && last_VFP_context[cpu]) {
56 vfp_save_state(last_VFP_context[cpu], fpexc);
57 last_VFP_context[cpu]->hard.cpu = cpu;
58 }
59 /*
60 * Thread migration, just force the reloading of the
61 * state on the new CPU in case the VFP registers
62 * contain stale data.
63 */
64 if (thread->vfpstate.hard.cpu != cpu)
65 last_VFP_context[cpu] = NULL;
66#endif
67
46 /* 68 /*
47 * Always disable VFP so we can lazily save/restore the 69 * Always disable VFP so we can lazily save/restore the
48 * old state. 70 * old state.
49 */ 71 */
50 fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_ENABLE); 72 fmxr(FPEXC, fpexc & ~FPEXC_ENABLE);
51 return NOTIFY_DONE; 73 return NOTIFY_DONE;
52 } 74 }
53 75
@@ -68,8 +90,8 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v)
68 } 90 }
69 91
70 /* flush and release case: Per-thread VFP cleanup. */ 92 /* flush and release case: Per-thread VFP cleanup. */
71 if (last_VFP_context == vfp) 93 if (last_VFP_context[cpu] == vfp)
72 last_VFP_context = NULL; 94 last_VFP_context[cpu] = NULL;
73 95
74 return NOTIFY_DONE; 96 return NOTIFY_DONE;
75} 97}
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig
index ae92a14ef9a0..77dace9d54bc 100644
--- a/arch/avr32/configs/atstk1002_defconfig
+++ b/arch/avr32/configs/atstk1002_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.19-rc2 3# Linux kernel version: 2.6.20-rc6
4# Fri Oct 20 11:52:37 2006 4# Fri Jan 26 13:12:59 2007
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_HARDIRQS=y 7CONFIG_GENERIC_HARDIRQS=y
@@ -9,6 +9,8 @@ CONFIG_HARDIRQS_SW_RESEND=y
9CONFIG_GENERIC_IRQ_PROBE=y 9CONFIG_GENERIC_IRQ_PROBE=y
10CONFIG_RWSEM_GENERIC_SPINLOCK=y 10CONFIG_RWSEM_GENERIC_SPINLOCK=y
11CONFIG_GENERIC_TIME=y 11CONFIG_GENERIC_TIME=y
12# CONFIG_ARCH_HAS_ILOG2_U32 is not set
13# CONFIG_ARCH_HAS_ILOG2_U64 is not set
12CONFIG_GENERIC_HWEIGHT=y 14CONFIG_GENERIC_HWEIGHT=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 15CONFIG_GENERIC_CALIBRATE_DELAY=y
14CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 16CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -36,6 +38,7 @@ CONFIG_TASK_DELAY_ACCT=y
36# CONFIG_UTS_NS is not set 38# CONFIG_UTS_NS is not set
37CONFIG_AUDIT=y 39CONFIG_AUDIT=y
38# CONFIG_IKCONFIG is not set 40# CONFIG_IKCONFIG is not set
41CONFIG_SYSFS_DEPRECATED=y
39CONFIG_RELAY=y 42CONFIG_RELAY=y
40CONFIG_INITRAMFS_SOURCE="" 43CONFIG_INITRAMFS_SOURCE=""
41CONFIG_CC_OPTIMIZE_FOR_SIZE=y 44CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -75,7 +78,9 @@ CONFIG_MODULE_UNLOAD=y
75# Block layer 78# Block layer
76# 79#
77CONFIG_BLOCK=y 80CONFIG_BLOCK=y
81# CONFIG_LBD is not set
78# CONFIG_BLK_DEV_IO_TRACE is not set 82# CONFIG_BLK_DEV_IO_TRACE is not set
83# CONFIG_LSF is not set
79 84
80# 85#
81# IO Schedulers 86# IO Schedulers
@@ -125,6 +130,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
125# CONFIG_OWNERSHIP_TRACE is not set 130# CONFIG_OWNERSHIP_TRACE is not set
126# CONFIG_HZ_100 is not set 131# CONFIG_HZ_100 is not set
127CONFIG_HZ_250=y 132CONFIG_HZ_250=y
133# CONFIG_HZ_300 is not set
128# CONFIG_HZ_1000 is not set 134# CONFIG_HZ_1000 is not set
129CONFIG_HZ=250 135CONFIG_HZ=250
130CONFIG_CMDLINE="" 136CONFIG_CMDLINE=""
@@ -182,6 +188,7 @@ CONFIG_INET_TCP_DIAG=y
182# CONFIG_TCP_CONG_ADVANCED is not set 188# CONFIG_TCP_CONG_ADVANCED is not set
183CONFIG_TCP_CONG_CUBIC=y 189CONFIG_TCP_CONG_CUBIC=y
184CONFIG_DEFAULT_TCP_CONG="cubic" 190CONFIG_DEFAULT_TCP_CONG="cubic"
191# CONFIG_TCP_MD5SIG is not set
185# CONFIG_IPV6 is not set 192# CONFIG_IPV6 is not set
186# CONFIG_INET6_XFRM_TUNNEL is not set 193# CONFIG_INET6_XFRM_TUNNEL is not set
187# CONFIG_INET6_TUNNEL is not set 194# CONFIG_INET6_TUNNEL is not set
@@ -260,6 +267,7 @@ CONFIG_MTD_CMDLINE_PARTS=y
260# User Modules And Translation Layers 267# User Modules And Translation Layers
261# 268#
262CONFIG_MTD_CHAR=y 269CONFIG_MTD_CHAR=y
270CONFIG_MTD_BLKDEVS=y
263CONFIG_MTD_BLOCK=y 271CONFIG_MTD_BLOCK=y
264# CONFIG_FTL is not set 272# CONFIG_FTL is not set
265# CONFIG_NFTL is not set 273# CONFIG_NFTL is not set
@@ -355,7 +363,6 @@ CONFIG_BLK_DEV_INITRD=y
355# 363#
356# Misc devices 364# Misc devices
357# 365#
358# CONFIG_SGI_IOC4 is not set
359# CONFIG_TIFM_CORE is not set 366# CONFIG_TIFM_CORE is not set
360 367
361# 368#
@@ -405,11 +412,14 @@ CONFIG_TUN=m
405# 412#
406# PHY device support 413# PHY device support
407# 414#
415# CONFIG_PHYLIB is not set
408 416
409# 417#
410# Ethernet (10 or 100Mbit) 418# Ethernet (10 or 100Mbit)
411# 419#
412# CONFIG_NET_ETHERNET is not set 420CONFIG_NET_ETHERNET=y
421CONFIG_MII=y
422CONFIG_MACB=y
413 423
414# 424#
415# Ethernet (1000 Mbit) 425# Ethernet (1000 Mbit)
@@ -505,10 +515,6 @@ CONFIG_UNIX98_PTYS=y
505# CONFIG_GEN_RTC is not set 515# CONFIG_GEN_RTC is not set
506# CONFIG_DTLK is not set 516# CONFIG_DTLK is not set
507# CONFIG_R3964 is not set 517# CONFIG_R3964 is not set
508
509#
510# Ftape, the floppy tape device driver
511#
512# CONFIG_RAW_DRIVER is not set 518# CONFIG_RAW_DRIVER is not set
513 519
514# 520#
@@ -621,6 +627,10 @@ CONFIG_UNIX98_PTYS=y
621# 627#
622 628
623# 629#
630# Virtualization
631#
632
633#
624# File systems 634# File systems
625# 635#
626CONFIG_EXT2_FS=m 636CONFIG_EXT2_FS=m
@@ -683,7 +693,6 @@ CONFIG_CONFIGFS_FS=m
683# CONFIG_BEFS_FS is not set 693# CONFIG_BEFS_FS is not set
684# CONFIG_BFS_FS is not set 694# CONFIG_BFS_FS is not set
685# CONFIG_EFS_FS is not set 695# CONFIG_EFS_FS is not set
686# CONFIG_JFFS_FS is not set
687CONFIG_JFFS2_FS=y 696CONFIG_JFFS2_FS=y
688CONFIG_JFFS2_FS_DEBUG=0 697CONFIG_JFFS2_FS_DEBUG=0
689CONFIG_JFFS2_FS_WRITEBUFFER=y 698CONFIG_JFFS2_FS_WRITEBUFFER=y
@@ -763,6 +772,11 @@ CONFIG_NLS_ISO8859_1=m
763CONFIG_NLS_UTF8=m 772CONFIG_NLS_UTF8=m
764 773
765# 774#
775# Distributed Lock Manager
776#
777# CONFIG_DLM is not set
778
779#
766# Kernel hacking 780# Kernel hacking
767# 781#
768CONFIG_TRACE_IRQFLAGS_SUPPORT=y 782CONFIG_TRACE_IRQFLAGS_SUPPORT=y
@@ -770,6 +784,8 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
770CONFIG_ENABLE_MUST_CHECK=y 784CONFIG_ENABLE_MUST_CHECK=y
771CONFIG_MAGIC_SYSRQ=y 785CONFIG_MAGIC_SYSRQ=y
772# CONFIG_UNUSED_SYMBOLS is not set 786# CONFIG_UNUSED_SYMBOLS is not set
787CONFIG_DEBUG_FS=y
788# CONFIG_HEADERS_CHECK is not set
773CONFIG_DEBUG_KERNEL=y 789CONFIG_DEBUG_KERNEL=y
774CONFIG_LOG_BUF_SHIFT=14 790CONFIG_LOG_BUF_SHIFT=14
775CONFIG_DETECT_SOFTLOCKUP=y 791CONFIG_DETECT_SOFTLOCKUP=y
@@ -785,13 +801,10 @@ CONFIG_DETECT_SOFTLOCKUP=y
785# CONFIG_DEBUG_KOBJECT is not set 801# CONFIG_DEBUG_KOBJECT is not set
786CONFIG_DEBUG_BUGVERBOSE=y 802CONFIG_DEBUG_BUGVERBOSE=y
787# CONFIG_DEBUG_INFO is not set 803# CONFIG_DEBUG_INFO is not set
788CONFIG_DEBUG_FS=y
789# CONFIG_DEBUG_VM is not set 804# CONFIG_DEBUG_VM is not set
790# CONFIG_DEBUG_LIST is not set 805# CONFIG_DEBUG_LIST is not set
791CONFIG_FRAME_POINTER=y 806CONFIG_FRAME_POINTER=y
792# CONFIG_UNWIND_INFO is not set
793CONFIG_FORCED_INLINING=y 807CONFIG_FORCED_INLINING=y
794# CONFIG_HEADERS_CHECK is not set
795# CONFIG_RCU_TORTURE_TEST is not set 808# CONFIG_RCU_TORTURE_TEST is not set
796# CONFIG_KPROBES is not set 809# CONFIG_KPROBES is not set
797 810
@@ -809,6 +822,7 @@ CONFIG_FORCED_INLINING=y
809# 822#
810# Library routines 823# Library routines
811# 824#
825CONFIG_BITREVERSE=y
812CONFIG_CRC_CCITT=m 826CONFIG_CRC_CCITT=m
813# CONFIG_CRC16 is not set 827# CONFIG_CRC16 is not set
814CONFIG_CRC32=y 828CONFIG_CRC32=y
@@ -817,3 +831,4 @@ CONFIG_AUDIT_GENERIC=y
817CONFIG_ZLIB_INFLATE=y 831CONFIG_ZLIB_INFLATE=y
818CONFIG_ZLIB_DEFLATE=y 832CONFIG_ZLIB_DEFLATE=y
819CONFIG_PLIST=y 833CONFIG_PLIST=y
834CONFIG_IOMAP_COPY=y
diff --git a/arch/avr32/kernel/avr32_ksyms.c b/arch/avr32/kernel/avr32_ksyms.c
index 7c4c76114bba..80f55f8dbf1c 100644
--- a/arch/avr32/kernel/avr32_ksyms.c
+++ b/arch/avr32/kernel/avr32_ksyms.c
@@ -29,6 +29,7 @@ EXPORT_SYMBOL(__avr32_asr64);
29 */ 29 */
30EXPORT_SYMBOL(memset); 30EXPORT_SYMBOL(memset);
31EXPORT_SYMBOL(memcpy); 31EXPORT_SYMBOL(memcpy);
32EXPORT_SYMBOL(clear_page);
32 33
33/* 34/*
34 * Userspace access stuff. 35 * Userspace access stuff.
diff --git a/arch/i386/boot/compressed/relocs.c b/arch/i386/boot/compressed/relocs.c
index 468da89153c4..881951ca03e1 100644
--- a/arch/i386/boot/compressed/relocs.c
+++ b/arch/i386/boot/compressed/relocs.c
@@ -43,6 +43,8 @@ static int is_safe_abs_reloc(const char* sym_name)
43 /* Match found */ 43 /* Match found */
44 return 1; 44 return 1;
45 } 45 }
46 if (strncmp(sym_name, "__crc_", 6) == 0)
47 return 1;
46 return 0; 48 return 0;
47} 49}
48 50
diff --git a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
index bec50170b75a..4786fedca6eb 100644
--- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
+++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
@@ -51,7 +51,6 @@ enum {
51 51
52 52
53static int has_N44_O17_errata[NR_CPUS]; 53static int has_N44_O17_errata[NR_CPUS];
54static int has_N60_errata[NR_CPUS];
55static unsigned int stock_freq; 54static unsigned int stock_freq;
56static struct cpufreq_driver p4clockmod_driver; 55static struct cpufreq_driver p4clockmod_driver;
57static unsigned int cpufreq_p4_get(unsigned int cpu); 56static unsigned int cpufreq_p4_get(unsigned int cpu);
@@ -224,12 +223,6 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
224 case 0x0f12: 223 case 0x0f12:
225 has_N44_O17_errata[policy->cpu] = 1; 224 has_N44_O17_errata[policy->cpu] = 1;
226 dprintk("has errata -- disabling low frequencies\n"); 225 dprintk("has errata -- disabling low frequencies\n");
227 break;
228
229 case 0x0f29:
230 has_N60_errata[policy->cpu] = 1;
231 dprintk("has errata -- disabling frequencies lower than 2ghz\n");
232 break;
233 } 226 }
234 227
235 /* get max frequency */ 228 /* get max frequency */
@@ -241,8 +234,6 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
241 for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { 234 for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) {
242 if ((i<2) && (has_N44_O17_errata[policy->cpu])) 235 if ((i<2) && (has_N44_O17_errata[policy->cpu]))
243 p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; 236 p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID;
244 else if (has_N60_errata[policy->cpu] && ((stock_freq * i)/8) < 2000000)
245 p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID;
246 else 237 else
247 p4clockmod_table[i].frequency = (stock_freq * i)/8; 238 p4clockmod_table[i].frequency = (stock_freq * i)/8;
248 } 239 }
diff --git a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c
index abcff92f994c..c0c3b59de32c 100644
--- a/arch/i386/kernel/cpu/cyrix.c
+++ b/arch/i386/kernel/cpu/cyrix.c
@@ -173,7 +173,7 @@ static void __cpuinit geode_configure(void)
173 ccr4 = getCx86(CX86_CCR4); 173 ccr4 = getCx86(CX86_CCR4);
174 ccr4 |= 0x38; /* FPU fast, DTE cache, Mem bypass */ 174 ccr4 |= 0x38; /* FPU fast, DTE cache, Mem bypass */
175 175
176 setCx86(CX86_CCR4, ccr4); 176 setCx86(CX86_CCR3, ccr3);
177 177
178 set_cx86_memwb(); 178 set_cx86_memwb();
179 set_cx86_reorder(); 179 set_cx86_reorder();
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index b92c7f0a358a..8f9c624ace6f 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -473,6 +473,70 @@ static inline void __init check_range_for_systab(efi_memory_desc_t *md)
473} 473}
474 474
475/* 475/*
476 * Wrap all the virtual calls in a way that forces the parameters on the stack.
477 */
478
479#define efi_call_virt(f, args...) \
480 ((efi_##f##_t __attribute__((regparm(0)))*)efi.systab->runtime->f)(args)
481
482static efi_status_t virt_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc)
483{
484 return efi_call_virt(get_time, tm, tc);
485}
486
487static efi_status_t virt_efi_set_time (efi_time_t *tm)
488{
489 return efi_call_virt(set_time, tm);
490}
491
492static efi_status_t virt_efi_get_wakeup_time (efi_bool_t *enabled,
493 efi_bool_t *pending,
494 efi_time_t *tm)
495{
496 return efi_call_virt(get_wakeup_time, enabled, pending, tm);
497}
498
499static efi_status_t virt_efi_set_wakeup_time (efi_bool_t enabled,
500 efi_time_t *tm)
501{
502 return efi_call_virt(set_wakeup_time, enabled, tm);
503}
504
505static efi_status_t virt_efi_get_variable (efi_char16_t *name,
506 efi_guid_t *vendor, u32 *attr,
507 unsigned long *data_size, void *data)
508{
509 return efi_call_virt(get_variable, name, vendor, attr, data_size, data);
510}
511
512static efi_status_t virt_efi_get_next_variable (unsigned long *name_size,
513 efi_char16_t *name,
514 efi_guid_t *vendor)
515{
516 return efi_call_virt(get_next_variable, name_size, name, vendor);
517}
518
519static efi_status_t virt_efi_set_variable (efi_char16_t *name,
520 efi_guid_t *vendor,
521 unsigned long attr,
522 unsigned long data_size, void *data)
523{
524 return efi_call_virt(set_variable, name, vendor, attr, data_size, data);
525}
526
527static efi_status_t virt_efi_get_next_high_mono_count (u32 *count)
528{
529 return efi_call_virt(get_next_high_mono_count, count);
530}
531
532static void virt_efi_reset_system (int reset_type, efi_status_t status,
533 unsigned long data_size,
534 efi_char16_t *data)
535{
536 efi_call_virt(reset_system, reset_type, status, data_size, data);
537}
538
539/*
476 * This function will switch the EFI runtime services to virtual mode. 540 * This function will switch the EFI runtime services to virtual mode.
477 * Essentially, look through the EFI memmap and map every region that 541 * Essentially, look through the EFI memmap and map every region that
478 * has the runtime attribute bit set in its memory descriptor and update 542 * has the runtime attribute bit set in its memory descriptor and update
@@ -525,22 +589,15 @@ void __init efi_enter_virtual_mode(void)
525 * pointers in the runtime service table to the new virtual addresses. 589 * pointers in the runtime service table to the new virtual addresses.
526 */ 590 */
527 591
528 efi.get_time = (efi_get_time_t *) efi.systab->runtime->get_time; 592 efi.get_time = virt_efi_get_time;
529 efi.set_time = (efi_set_time_t *) efi.systab->runtime->set_time; 593 efi.set_time = virt_efi_set_time;
530 efi.get_wakeup_time = (efi_get_wakeup_time_t *) 594 efi.get_wakeup_time = virt_efi_get_wakeup_time;
531 efi.systab->runtime->get_wakeup_time; 595 efi.set_wakeup_time = virt_efi_set_wakeup_time;
532 efi.set_wakeup_time = (efi_set_wakeup_time_t *) 596 efi.get_variable = virt_efi_get_variable;
533 efi.systab->runtime->set_wakeup_time; 597 efi.get_next_variable = virt_efi_get_next_variable;
534 efi.get_variable = (efi_get_variable_t *) 598 efi.set_variable = virt_efi_set_variable;
535 efi.systab->runtime->get_variable; 599 efi.get_next_high_mono_count = virt_efi_get_next_high_mono_count;
536 efi.get_next_variable = (efi_get_next_variable_t *) 600 efi.reset_system = virt_efi_reset_system;
537 efi.systab->runtime->get_next_variable;
538 efi.set_variable = (efi_set_variable_t *)
539 efi.systab->runtime->set_variable;
540 efi.get_next_high_mono_count = (efi_get_next_high_mono_count_t *)
541 efi.systab->runtime->get_next_high_mono_count;
542 efi.reset_system = (efi_reset_system_t *)
543 efi.systab->runtime->reset_system;
544} 601}
545 602
546void __init 603void __init
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index 06461b8b715d..5e47683fc63a 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -302,12 +302,16 @@ sysenter_past_esp:
302 pushl $(__USER_CS) 302 pushl $(__USER_CS)
303 CFI_ADJUST_CFA_OFFSET 4 303 CFI_ADJUST_CFA_OFFSET 4
304 /*CFI_REL_OFFSET cs, 0*/ 304 /*CFI_REL_OFFSET cs, 0*/
305#ifndef CONFIG_COMPAT_VDSO
305 /* 306 /*
306 * Push current_thread_info()->sysenter_return to the stack. 307 * Push current_thread_info()->sysenter_return to the stack.
307 * A tiny bit of offset fixup is necessary - 4*4 means the 4 words 308 * A tiny bit of offset fixup is necessary - 4*4 means the 4 words
308 * pushed above; +8 corresponds to copy_thread's esp0 setting. 309 * pushed above; +8 corresponds to copy_thread's esp0 setting.
309 */ 310 */
310 pushl (TI_sysenter_return-THREAD_SIZE+8+4*4)(%esp) 311 pushl (TI_sysenter_return-THREAD_SIZE+8+4*4)(%esp)
312#else
313 pushl $SYSENTER_RETURN
314#endif
311 CFI_ADJUST_CFA_OFFSET 4 315 CFI_ADJUST_CFA_OFFSET 4
312 CFI_REL_OFFSET eip, 0 316 CFI_REL_OFFSET eip, 0
313 317
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 2424cc9c7b3d..6a3875f81a0a 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -1227,26 +1227,32 @@ static u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 }
1227 1227
1228static int __assign_irq_vector(int irq) 1228static int __assign_irq_vector(int irq)
1229{ 1229{
1230 static int current_vector = FIRST_DEVICE_VECTOR, offset = 0; 1230 static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0;
1231 int vector; 1231 int vector, offset, i;
1232 1232
1233 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); 1233 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
1234 1234
1235 if (irq_vector[irq] > 0) 1235 if (irq_vector[irq] > 0)
1236 return irq_vector[irq]; 1236 return irq_vector[irq];
1237 1237
1238 current_vector += 8;
1239 if (current_vector == SYSCALL_VECTOR)
1240 current_vector += 8;
1241
1242 if (current_vector >= FIRST_SYSTEM_VECTOR) {
1243 offset++;
1244 if (!(offset % 8))
1245 return -ENOSPC;
1246 current_vector = FIRST_DEVICE_VECTOR + offset;
1247 }
1248
1249 vector = current_vector; 1238 vector = current_vector;
1239 offset = current_offset;
1240next:
1241 vector += 8;
1242 if (vector >= FIRST_SYSTEM_VECTOR) {
1243 offset = (offset + 1) % 8;
1244 vector = FIRST_DEVICE_VECTOR + offset;
1245 }
1246 if (vector == current_vector)
1247 return -ENOSPC;
1248 if (vector == SYSCALL_VECTOR)
1249 goto next;
1250 for (i = 0; i < NR_IRQ_VECTORS; i++)
1251 if (irq_vector[i] == vector)
1252 goto next;
1253
1254 current_vector = vector;
1255 current_offset = offset;
1250 irq_vector[irq] = vector; 1256 irq_vector[irq] = vector;
1251 1257
1252 return vector; 1258 return vector;
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index a5e34d655965..1a6f8bb8881c 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -310,13 +310,7 @@ static int __init setup_nmi_watchdog(char *str)
310 310
311 if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE)) 311 if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE))
312 return 0; 312 return 0;
313 /* 313
314 * If any other x86 CPU has a local APIC, then
315 * please test the NMI stuff there and send me the
316 * missing bits. Right now Intel P6/P4 and AMD K7 only.
317 */
318 if ((nmi == NMI_LOCAL_APIC) && (nmi_known_cpu() == 0))
319 return 0; /* no lapic support */
320 nmi_watchdog = nmi; 314 nmi_watchdog = nmi;
321 return 1; 315 return 1;
322} 316}
diff --git a/arch/i386/kernel/paravirt.c b/arch/i386/kernel/paravirt.c
index 3dceab5828f1..e55fd05da0f5 100644
--- a/arch/i386/kernel/paravirt.c
+++ b/arch/i386/kernel/paravirt.c
@@ -566,4 +566,11 @@ struct paravirt_ops paravirt_ops = {
566 .irq_enable_sysexit = native_irq_enable_sysexit, 566 .irq_enable_sysexit = native_irq_enable_sysexit,
567 .iret = native_iret, 567 .iret = native_iret,
568}; 568};
569EXPORT_SYMBOL(paravirt_ops); 569
570/*
571 * NOTE: CONFIG_PARAVIRT is experimental and the paravirt_ops
572 * semantics are subject to change. Hence we only do this
573 * internal-only export of this, until it gets sorted out and
574 * all lowlevel CPU ops used by modules are separately exported.
575 */
576EXPORT_SYMBOL_GPL(paravirt_ops);
diff --git a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c
index 7de9117b5a3a..5da744204d10 100644
--- a/arch/i386/kernel/sysenter.c
+++ b/arch/i386/kernel/sysenter.c
@@ -79,11 +79,6 @@ int __init sysenter_setup(void)
79#ifdef CONFIG_COMPAT_VDSO 79#ifdef CONFIG_COMPAT_VDSO
80 __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_READONLY); 80 __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_READONLY);
81 printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO)); 81 printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO));
82#else
83 /*
84 * In the non-compat case the ELF coredumping code needs the fixmap:
85 */
86 __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_KERNEL_RO);
87#endif 82#endif
88 83
89 if (!boot_cpu_has(X86_FEATURE_SEP)) { 84 if (!boot_cpu_has(X86_FEATURE_SEP)) {
@@ -100,6 +95,7 @@ int __init sysenter_setup(void)
100 return 0; 95 return 0;
101} 96}
102 97
98#ifndef CONFIG_COMPAT_VDSO
103static struct page *syscall_nopage(struct vm_area_struct *vma, 99static struct page *syscall_nopage(struct vm_area_struct *vma,
104 unsigned long adr, int *type) 100 unsigned long adr, int *type)
105{ 101{
@@ -146,6 +142,13 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
146 vma->vm_end = addr + PAGE_SIZE; 142 vma->vm_end = addr + PAGE_SIZE;
147 /* MAYWRITE to allow gdb to COW and set breakpoints */ 143 /* MAYWRITE to allow gdb to COW and set breakpoints */
148 vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE; 144 vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE;
145 /*
146 * Make sure the vDSO gets into every core dump.
147 * Dumping its contents makes post-mortem fully interpretable later
148 * without matching up the same kernel and hardware config to see
149 * what PC values meant.
150 */
151 vma->vm_flags |= VM_ALWAYSDUMP;
149 vma->vm_flags |= mm->def_flags; 152 vma->vm_flags |= mm->def_flags;
150 vma->vm_page_prot = protection_map[vma->vm_flags & 7]; 153 vma->vm_page_prot = protection_map[vma->vm_flags & 7];
151 vma->vm_ops = &syscall_vm_ops; 154 vma->vm_ops = &syscall_vm_ops;
@@ -187,3 +190,4 @@ int in_gate_area_no_task(unsigned long addr)
187{ 190{
188 return 0; 191 return 0;
189} 192}
193#endif
diff --git a/arch/i386/mach-default/setup.c b/arch/i386/mach-default/setup.c
index c511705c386c..cc2f519b2f7f 100644
--- a/arch/i386/mach-default/setup.c
+++ b/arch/i386/mach-default/setup.c
@@ -102,7 +102,7 @@ void __init time_init_hook(void)
102 * along the MCA bus. Use this to hook into that chain if you will need 102 * along the MCA bus. Use this to hook into that chain if you will need
103 * it. 103 * it.
104 **/ 104 **/
105void __init mca_nmi_hook(void) 105void mca_nmi_hook(void)
106{ 106{
107 /* If I recall correctly, there's a whole bunch of other things that 107 /* If I recall correctly, there's a whole bunch of other things that
108 * we can do to check for NMI problems, but that's all I know about 108 * we can do to check for NMI problems, but that's all I know about
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index ef2fe474f107..29f05d4b68cd 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -609,6 +609,9 @@ EXPORT_SYMBOL(acpi_register_gsi);
609 609
610void acpi_unregister_gsi(u32 gsi) 610void acpi_unregister_gsi(u32 gsi)
611{ 611{
612 if (acpi_irq_model == ACPI_IRQ_MODEL_PLATFORM)
613 return;
614
612 iosapic_unregister_intr(gsi); 615 iosapic_unregister_intr(gsi);
613} 616}
614 617
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index 54d55e4d64f7..ce49c85c928f 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -122,6 +122,9 @@ static void migrate_irqs(void)
122 for (irq=0; irq < NR_IRQS; irq++) { 122 for (irq=0; irq < NR_IRQS; irq++) {
123 desc = irq_desc + irq; 123 desc = irq_desc + irq;
124 124
125 if (desc->status == IRQ_DISABLED)
126 continue;
127
125 /* 128 /*
126 * No handling for now. 129 * No handling for now.
127 * TBD: Implement a disable function so we can now 130 * TBD: Implement a disable function so we can now
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index fd2ff0698a85..bbd386f572d9 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1568,6 +1568,20 @@ config MIPS_MT_FPAFF
1568 depends on MIPS_MT 1568 depends on MIPS_MT
1569 default y 1569 default y
1570 1570
1571config MIPS_MT_SMTC_INSTANT_REPLAY
1572 bool "Low-latency Dispatch of Deferred SMTC IPIs"
1573 depends on MIPS_MT_SMTC
1574 default y
1575 help
1576 SMTC pseudo-interrupts between TCs are deferred and queued
1577 if the target TC is interrupt-inhibited (IXMT). In the first
1578 SMTC prototypes, these queued IPIs were serviced on return
1579 to user mode, or on entry into the kernel idle loop. The
1580 INSTANT_REPLAY option dispatches them as part of local_irq_restore()
1581 processing, which adds runtime overhead (hence the option to turn
1582 it off), but ensures that IPIs are handled promptly even under
1583 heavy I/O interrupt load.
1584
1571config MIPS_VPE_LOADER_TOM 1585config MIPS_VPE_LOADER_TOM
1572 bool "Load VPE program into memory hidden from linux" 1586 bool "Load VPE program into memory hidden from linux"
1573 depends on MIPS_VPE_LOADER 1587 depends on MIPS_VPE_LOADER
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index d1b026a0337d..c68b5d3e5d18 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -623,7 +623,7 @@ LDFLAGS += -m $(ld-emul)
623 623
624ifdef CONFIG_MIPS 624ifdef CONFIG_MIPS
625CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \ 625CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \
626 egrep -vw '__GNUC_(MAJOR|MINOR|PATCHLEVEL)__' | \ 626 egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
627 sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/") 627 sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
628ifdef CONFIG_64BIT 628ifdef CONFIG_64BIT
629CHECKFLAGS += -m64 629CHECKFLAGS += -m64
diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c
index 3027ce782797..3aa01d268f2d 100644
--- a/arch/mips/dec/prom/memory.c
+++ b/arch/mips/dec/prom/memory.c
@@ -122,7 +122,7 @@ unsigned long __init prom_free_prom_memory(void)
122 addr += PAGE_SIZE; 122 addr += PAGE_SIZE;
123 } 123 }
124 124
125 printk("Freeing unused PROM memory: %ldk freed\n", 125 printk("Freeing unused PROM memory: %ldkb freed\n",
126 (end - PAGE_SIZE) >> 10); 126 (end - PAGE_SIZE) >> 10);
127 127
128 return end - PAGE_SIZE; 128 return end - PAGE_SIZE;
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index a8b387197d5b..6a857bf030b0 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -4,6 +4,7 @@
4#include <linux/sched.h> 4#include <linux/sched.h>
5#include <linux/cpumask.h> 5#include <linux/cpumask.h>
6#include <linux/interrupt.h> 6#include <linux/interrupt.h>
7#include <linux/module.h>
7 8
8#include <asm/cpu.h> 9#include <asm/cpu.h>
9#include <asm/processor.h> 10#include <asm/processor.h>
@@ -270,9 +271,12 @@ void smtc_configure_tlb(void)
270 * of their initialization in smtc_cpu_setup(). 271 * of their initialization in smtc_cpu_setup().
271 */ 272 */
272 273
273 tlbsiz = tlbsiz & 0x3f; /* MIPS32 limits TLB indices to 64 */ 274 /* MIPS32 limits TLB indices to 64 */
274 cpu_data[0].tlbsize = tlbsiz; 275 if (tlbsiz > 64)
276 tlbsiz = 64;
277 cpu_data[0].tlbsize = current_cpu_data.tlbsize = tlbsiz;
275 smtc_status |= SMTC_TLB_SHARED; 278 smtc_status |= SMTC_TLB_SHARED;
279 local_flush_tlb_all();
276 280
277 printk("TLB of %d entry pairs shared by %d VPEs\n", 281 printk("TLB of %d entry pairs shared by %d VPEs\n",
278 tlbsiz, vpes); 282 tlbsiz, vpes);
@@ -1017,6 +1021,35 @@ void setup_cross_vpe_interrupts(void)
1017 * SMTC-specific hacks invoked from elsewhere in the kernel. 1021 * SMTC-specific hacks invoked from elsewhere in the kernel.
1018 */ 1022 */
1019 1023
1024void smtc_ipi_replay(void)
1025{
1026 /*
1027 * To the extent that we've ever turned interrupts off,
1028 * we may have accumulated deferred IPIs. This is subtle.
1029 * If we use the smtc_ipi_qdepth() macro, we'll get an
1030 * exact number - but we'll also disable interrupts
1031 * and create a window of failure where a new IPI gets
1032 * queued after we test the depth but before we re-enable
1033 * interrupts. So long as IXMT never gets set, however,
1034 * we should be OK: If we pick up something and dispatch
1035 * it here, that's great. If we see nothing, but concurrent
1036 * with this operation, another TC sends us an IPI, IXMT
1037 * is clear, and we'll handle it as a real pseudo-interrupt
1038 * and not a pseudo-pseudo interrupt.
1039 */
1040 if (IPIQ[smp_processor_id()].depth > 0) {
1041 struct smtc_ipi *pipi;
1042 extern void self_ipi(struct smtc_ipi *);
1043
1044 while ((pipi = smtc_ipi_dq(&IPIQ[smp_processor_id()]))) {
1045 self_ipi(pipi);
1046 smtc_cpu_stats[smp_processor_id()].selfipis++;
1047 }
1048 }
1049}
1050
1051EXPORT_SYMBOL(smtc_ipi_replay);
1052
1020void smtc_idle_loop_hook(void) 1053void smtc_idle_loop_hook(void)
1021{ 1054{
1022#ifdef SMTC_IDLE_HOOK_DEBUG 1055#ifdef SMTC_IDLE_HOOK_DEBUG
@@ -1113,29 +1146,14 @@ void smtc_idle_loop_hook(void)
1113 if (pdb_msg != &id_ho_db_msg[0]) 1146 if (pdb_msg != &id_ho_db_msg[0])
1114 printk("CPU%d: %s", smp_processor_id(), id_ho_db_msg); 1147 printk("CPU%d: %s", smp_processor_id(), id_ho_db_msg);
1115#endif /* SMTC_IDLE_HOOK_DEBUG */ 1148#endif /* SMTC_IDLE_HOOK_DEBUG */
1149
1116 /* 1150 /*
1117 * To the extent that we've ever turned interrupts off, 1151 * Replay any accumulated deferred IPIs. If "Instant Replay"
1118 * we may have accumulated deferred IPIs. This is subtle. 1152 * is in use, there should never be any.
1119 * If we use the smtc_ipi_qdepth() macro, we'll get an
1120 * exact number - but we'll also disable interrupts
1121 * and create a window of failure where a new IPI gets
1122 * queued after we test the depth but before we re-enable
1123 * interrupts. So long as IXMT never gets set, however,
1124 * we should be OK: If we pick up something and dispatch
1125 * it here, that's great. If we see nothing, but concurrent
1126 * with this operation, another TC sends us an IPI, IXMT
1127 * is clear, and we'll handle it as a real pseudo-interrupt
1128 * and not a pseudo-pseudo interrupt.
1129 */ 1153 */
1130 if (IPIQ[smp_processor_id()].depth > 0) { 1154#ifndef CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY
1131 struct smtc_ipi *pipi; 1155 smtc_ipi_replay();
1132 extern void self_ipi(struct smtc_ipi *); 1156#endif /* CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY */
1133
1134 if ((pipi = smtc_ipi_dq(&IPIQ[smp_processor_id()])) != NULL) {
1135 self_ipi(pipi);
1136 smtc_cpu_stats[smp_processor_id()].selfipis++;
1137 }
1138 }
1139} 1157}
1140 1158
1141void smtc_soft_dump(void) 1159void smtc_soft_dump(void)
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index 666bef484dcb..458fccf87c54 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -139,13 +139,16 @@ struct tc {
139 struct list_head list; 139 struct list_head list;
140}; 140};
141 141
142struct vpecontrol_ { 142struct {
143 /* Virtual processing elements */ 143 /* Virtual processing elements */
144 struct list_head vpe_list; 144 struct list_head vpe_list;
145 145
146 /* Thread contexts */ 146 /* Thread contexts */
147 struct list_head tc_list; 147 struct list_head tc_list;
148} vpecontrol; 148} vpecontrol = {
149 .vpe_list = LIST_HEAD_INIT(vpecontrol.vpe_list),
150 .tc_list = LIST_HEAD_INIT(vpecontrol.tc_list)
151};
149 152
150static void release_progmem(void *ptr); 153static void release_progmem(void *ptr);
151/* static __attribute_used__ void dump_vpe(struct vpe * v); */ 154/* static __attribute_used__ void dump_vpe(struct vpe * v); */
@@ -1388,8 +1391,6 @@ static int __init vpe_module_init(void)
1388 1391
1389 /* dump_mtregs(); */ 1392 /* dump_mtregs(); */
1390 1393
1391 INIT_LIST_HEAD(&vpecontrol.vpe_list);
1392 INIT_LIST_HEAD(&vpecontrol.tc_list);
1393 1394
1394 val = read_c0_mvpconf0(); 1395 val = read_c0_mvpconf0();
1395 for (i = 0; i < ((val & MVPCONF0_PTC) + 1); i++) { 1396 for (i = 0; i < ((val & MVPCONF0_PTC) + 1); i++) {
diff --git a/arch/mips/mips-boards/malta/Makefile b/arch/mips/mips-boards/malta/Makefile
index b662c75fb28e..cb7f349b0514 100644
--- a/arch/mips/mips-boards/malta/Makefile
+++ b/arch/mips/mips-boards/malta/Makefile
@@ -19,5 +19,6 @@
19# under Linux. 19# under Linux.
20# 20#
21 21
22obj-y := malta_int.o malta_mtd.o malta_setup.o 22obj-y := malta_int.o malta_setup.o
23obj-$(CONFIG_MTD) += malta_mtd.o
23obj-$(CONFIG_SMP) += malta_smp.o 24obj-$(CONFIG_SMP) += malta_smp.o
diff --git a/arch/mips/mips-boards/sim/sim_setup.c b/arch/mips/mips-boards/sim/sim_setup.c
index 2659c1c3b78d..ea2066c3a1f7 100644
--- a/arch/mips/mips-boards/sim/sim_setup.c
+++ b/arch/mips/mips-boards/sim/sim_setup.c
@@ -57,7 +57,7 @@ void __init plat_mem_setup(void)
57 board_time_init = sim_time_init; 57 board_time_init = sim_time_init;
58 prom_printf("Linux started...\n"); 58 prom_printf("Linux started...\n");
59 59
60#ifdef CONFIG_MT_SMP 60#ifdef CONFIG_MIPS_MT_SMP
61 sanitize_tlb_entries(); 61 sanitize_tlb_entries();
62#endif 62#endif
63} 63}
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 30245c09d025..49065c133ebf 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -501,7 +501,8 @@ void free_initmem(void)
501 501
502 freed = prom_free_prom_memory(); 502 freed = prom_free_prom_memory();
503 if (freed) 503 if (freed)
504 printk(KERN_INFO "Freeing firmware memory: %ldk freed\n",freed); 504 printk(KERN_INFO "Freeing firmware memory: %ldkb freed\n",
505 freed >> 10);
505 506
506 free_init_pages("unused kernel memory", 507 free_init_pages("unused kernel memory",
507 __pa_symbol(&__init_begin), 508 __pa_symbol(&__init_begin),
diff --git a/arch/mips/momentum/ocelot_g/prom.c b/arch/mips/momentum/ocelot_g/prom.c
index 6509a9c9863c..2f75c6b91ec5 100644
--- a/arch/mips/momentum/ocelot_g/prom.c
+++ b/arch/mips/momentum/ocelot_g/prom.c
@@ -28,7 +28,7 @@ struct callvectors* debug_vectors;
28extern unsigned long marvell_base; 28extern unsigned long marvell_base;
29extern unsigned long bus_clock; 29extern unsigned long bus_clock;
30 30
31#ifdef CONFIG_GALILLEO_GT64240_ETH 31#ifdef CONFIG_GALILEO_GT64240_ETH
32extern unsigned char prom_mac_addr_base[6]; 32extern unsigned char prom_mac_addr_base[6];
33#endif 33#endif
34 34
@@ -61,7 +61,7 @@ void __init prom_init(void)
61 mips_machgroup = MACH_GROUP_MOMENCO; 61 mips_machgroup = MACH_GROUP_MOMENCO;
62 mips_machtype = MACH_MOMENCO_OCELOT_G; 62 mips_machtype = MACH_MOMENCO_OCELOT_G;
63 63
64#ifdef CONFIG_GALILLEO_GT64240_ETH 64#ifdef CONFIG_GALILEO_GT64240_ETH
65 /* get the base MAC address for on-board ethernet ports */ 65 /* get the base MAC address for on-board ethernet ports */
66 memcpy(prom_mac_addr_base, (void*)0xfc807cf2, 6); 66 memcpy(prom_mac_addr_base, (void*)0xfc807cf2, 6);
67#endif 67#endif
diff --git a/arch/mips/momentum/ocelot_g/setup.c b/arch/mips/momentum/ocelot_g/setup.c
index d288f7b01842..9db638a7982c 100644
--- a/arch/mips/momentum/ocelot_g/setup.c
+++ b/arch/mips/momentum/ocelot_g/setup.c
@@ -64,7 +64,7 @@
64 64
65#include "ocelot_pld.h" 65#include "ocelot_pld.h"
66 66
67#ifdef CONFIG_GALILLEO_GT64240_ETH 67#ifdef CONFIG_GALILEO_GT64240_ETH
68extern unsigned char prom_mac_addr_base[6]; 68extern unsigned char prom_mac_addr_base[6];
69#endif 69#endif
70 70
@@ -185,7 +185,7 @@ void __init plat_mem_setup(void)
185 /* do handoff reconfiguration */ 185 /* do handoff reconfiguration */
186 PMON_v2_setup(); 186 PMON_v2_setup();
187 187
188#ifdef CONFIG_GALILLEO_GT64240_ETH 188#ifdef CONFIG_GALILEO_GT64240_ETH
189 /* get the mac addr */ 189 /* get the mac addr */
190 memcpy(prom_mac_addr_base, (void*)0xfc807cf2, 6); 190 memcpy(prom_mac_addr_base, (void*)0xfc807cf2, 6);
191#endif 191#endif
diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c
index 397ba94cd7ec..16decf4ac2f4 100644
--- a/arch/mips/vr41xx/common/irq.c
+++ b/arch/mips/vr41xx/common/irq.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Interrupt handing routines for NEC VR4100 series. 2 * Interrupt handing routines for NEC VR4100 series.
3 * 3 *
4 * Copyright (C) 2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> 4 * Copyright (C) 2005-2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -73,13 +73,19 @@ static void irq_dispatch(unsigned int irq)
73 if (cascade->get_irq != NULL) { 73 if (cascade->get_irq != NULL) {
74 unsigned int source_irq = irq; 74 unsigned int source_irq = irq;
75 desc = irq_desc + source_irq; 75 desc = irq_desc + source_irq;
76 desc->chip->ack(source_irq); 76 if (desc->chip->mask_ack)
77 desc->chip->mask_ack(source_irq);
78 else {
79 desc->chip->mask(source_irq);
80 desc->chip->ack(source_irq);
81 }
77 irq = cascade->get_irq(irq); 82 irq = cascade->get_irq(irq);
78 if (irq < 0) 83 if (irq < 0)
79 atomic_inc(&irq_err_count); 84 atomic_inc(&irq_err_count);
80 else 85 else
81 irq_dispatch(irq); 86 irq_dispatch(irq);
82 desc->chip->end(source_irq); 87 if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
88 desc->chip->unmask(source_irq);
83 } else 89 } else
84 do_IRQ(irq); 90 do_IRQ(irq);
85} 91}
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 5f80f0b828f2..aeb53096acf7 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -492,6 +492,7 @@ config PPC_MAPLE
492 select PPC_NATIVE 492 select PPC_NATIVE
493 select PPC_RTAS 493 select PPC_RTAS
494 select MMIO_NVRAM 494 select MMIO_NVRAM
495 select ATA_NONSTANDARD if ATA
495 default n 496 default n
496 help 497 help
497 This option enables support for the Maple 970FX Evaluation Board. 498 This option enables support for the Maple 970FX Evaluation Board.
@@ -533,12 +534,15 @@ config PPC_IBM_CELL_BLADE
533 select UDBG_RTAS_CONSOLE 534 select UDBG_RTAS_CONSOLE
534 535
535config PPC_PS3 536config PPC_PS3
536 bool "Sony PS3" 537 bool "Sony PS3 (incomplete)"
537 depends on PPC_MULTIPLATFORM && PPC64 538 depends on PPC_MULTIPLATFORM && PPC64
538 select PPC_CELL 539 select PPC_CELL
539 help 540 help
540 This option enables support for the Sony PS3 game console 541 This option enables support for the Sony PS3 game console
541 and other platforms using the PS3 hypervisor. 542 and other platforms using the PS3 hypervisor.
543 Support for this platform is not yet complete, so
544 enabling this will not result in a bootable kernel on a
545 PS3 system.
542 546
543config PPC_CELLEB 547config PPC_CELLEB
544 bool "Toshiba's Cell Reference Set 'Celleb' Architecture" 548 bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index b6d08738180b..6828df4afd99 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -1429,7 +1429,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
1429 1429
1430 for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) { 1430 for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) {
1431 bus = pci_bus_b(ln); 1431 bus = pci_bus_b(ln);
1432 if (in_bus >= bus->number && in_bus < (bus->number + bus->subordinate)) 1432 if (in_bus >= bus->number && in_bus <= bus->subordinate)
1433 break; 1433 break;
1434 bus = NULL; 1434 bus = NULL;
1435 } 1435 }
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index a4b28c73bba0..ae0ede19879d 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -284,6 +284,13 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
284 * pages though 284 * pages though
285 */ 285 */
286 vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC; 286 vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC;
287 /*
288 * Make sure the vDSO gets into every core dump.
289 * Dumping its contents makes post-mortem fully interpretable later
290 * without matching up the same kernel and hardware config to see
291 * what PC values meant.
292 */
293 vma->vm_flags |= VM_ALWAYSDUMP;
287 vma->vm_flags |= mm->def_flags; 294 vma->vm_flags |= mm->def_flags;
288 vma->vm_page_prot = protection_map[vma->vm_flags & 0x7]; 295 vma->vm_page_prot = protection_map[vma->vm_flags & 0x7];
289 vma->vm_ops = &vdso_vmops; 296 vma->vm_ops = &vdso_vmops;
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
index 89a28cc018c9..113bd48a89bd 100644
--- a/arch/sparc/kernel/process.c
+++ b/arch/sparc/kernel/process.c
@@ -54,6 +54,7 @@ void (*pm_idle)(void);
54 * handler when auxio is not present-- unused for now... 54 * handler when auxio is not present-- unused for now...
55 */ 55 */
56void (*pm_power_off)(void) = machine_power_off; 56void (*pm_power_off)(void) = machine_power_off;
57EXPORT_SYMBOL(pm_power_off);
57 58
58/* 59/*
59 * sysctl - toggle power-off restriction for serial console 60 * sysctl - toggle power-off restriction for serial console
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c
index 276f22881d0f..6b5f26b0fb75 100644
--- a/arch/sparc/kernel/smp.c
+++ b/arch/sparc/kernel/smp.c
@@ -292,8 +292,8 @@ int setup_profiling_timer(unsigned int multiplier)
292 292
293void __init smp_prepare_cpus(unsigned int max_cpus) 293void __init smp_prepare_cpus(unsigned int max_cpus)
294{ 294{
295 extern void smp4m_boot_cpus(void); 295 extern void __init smp4m_boot_cpus(void);
296 extern void smp4d_boot_cpus(void); 296 extern void __init smp4d_boot_cpus(void);
297 int i, cpuid, extra; 297 int i, cpuid, extra;
298 298
299 printk("Entering SMP Mode...\n"); 299 printk("Entering SMP Mode...\n");
@@ -375,8 +375,8 @@ void __init smp_prepare_boot_cpu(void)
375 375
376int __cpuinit __cpu_up(unsigned int cpu) 376int __cpuinit __cpu_up(unsigned int cpu)
377{ 377{
378 extern int smp4m_boot_one_cpu(int); 378 extern int __cpuinit smp4m_boot_one_cpu(int);
379 extern int smp4d_boot_one_cpu(int); 379 extern int __cpuinit smp4d_boot_one_cpu(int);
380 int ret=0; 380 int ret=0;
381 381
382 switch(sparc_cpu_model) { 382 switch(sparc_cpu_model) {
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
index c80ea61e8ba0..c69de5d4863d 100644
--- a/arch/sparc/kernel/sun4d_smp.c
+++ b/arch/sparc/kernel/sun4d_smp.c
@@ -164,7 +164,7 @@ void __init smp4d_boot_cpus(void)
164 local_flush_cache_all(); 164 local_flush_cache_all();
165} 165}
166 166
167int smp4d_boot_one_cpu(int i) 167int __cpuinit smp4d_boot_one_cpu(int i)
168{ 168{
169 extern unsigned long sun4d_cpu_startup; 169 extern unsigned long sun4d_cpu_startup;
170 unsigned long *entry = &sun4d_cpu_startup; 170 unsigned long *entry = &sun4d_cpu_startup;
diff --git a/arch/sparc64/kernel/sun4v_tlb_miss.S b/arch/sparc64/kernel/sun4v_tlb_miss.S
index b731881224e8..9871dbb1ab42 100644
--- a/arch/sparc64/kernel/sun4v_tlb_miss.S
+++ b/arch/sparc64/kernel/sun4v_tlb_miss.S
@@ -142,9 +142,9 @@ sun4v_dtlb_prot:
142 rdpr %tl, %g1 142 rdpr %tl, %g1
143 cmp %g1, 1 143 cmp %g1, 1
144 bgu,pn %xcc, winfix_trampoline 144 bgu,pn %xcc, winfix_trampoline
145 nop
146 ba,pt %xcc, sparc64_realfault_common
147 mov FAULT_CODE_DTLB | FAULT_CODE_WRITE, %g4 145 mov FAULT_CODE_DTLB | FAULT_CODE_WRITE, %g4
146 ba,pt %xcc, sparc64_realfault_common
147 nop
148 148
149 /* Called from trap table: 149 /* Called from trap table:
150 * %g4: vaddr 150 * %g4: vaddr
diff --git a/arch/um/Kconfig.i386 b/arch/um/Kconfig.i386
index f191a550a079..d6cffb27fff8 100644
--- a/arch/um/Kconfig.i386
+++ b/arch/um/Kconfig.i386
@@ -19,31 +19,31 @@ config SEMAPHORE_SLEEPERS
19choice 19choice
20 prompt "Host memory split" 20 prompt "Host memory split"
21 default HOST_VMSPLIT_3G 21 default HOST_VMSPLIT_3G
22 ---help--- 22 help
23 This is needed when the host kernel on which you run has a non-default 23 This is needed when the host kernel on which you run has a non-default
24 (like 2G/2G) memory split, instead of the customary 3G/1G. If you did 24 (like 2G/2G) memory split, instead of the customary 3G/1G. If you did
25 not recompile your own kernel but use the default distro's one, you can 25 not recompile your own kernel but use the default distro's one, you can
26 safely accept the "Default split" option. 26 safely accept the "Default split" option.
27 27
28 It can be enabled on recent (>=2.6.16-rc2) vanilla kernels via 28 It can be enabled on recent (>=2.6.16-rc2) vanilla kernels via
29 CONFIG_VM_SPLIT_*, or on previous kernels with special patches (-ck 29 CONFIG_VM_SPLIT_*, or on previous kernels with special patches (-ck
30 patchset by Con Kolivas, or other ones) - option names match closely the 30 patchset by Con Kolivas, or other ones) - option names match closely the
31 host CONFIG_VM_SPLIT_* ones. 31 host CONFIG_VM_SPLIT_* ones.
32 32
33 A lower setting (where 1G/3G is lowest and 3G/1G is higher) will 33 A lower setting (where 1G/3G is lowest and 3G/1G is higher) will
34 tolerate even more "normal" host kernels, but an higher setting will be 34 tolerate even more "normal" host kernels, but an higher setting will be
35 stricter. 35 stricter.
36 36
37 So, if you do not know what to do here, say 'Default split'. 37 So, if you do not know what to do here, say 'Default split'.
38 38
39 config HOST_VMSPLIT_3G 39config HOST_VMSPLIT_3G
40 bool "Default split (3G/1G user/kernel host split)" 40 bool "Default split (3G/1G user/kernel host split)"
41 config HOST_VMSPLIT_3G_OPT 41config HOST_VMSPLIT_3G_OPT
42 bool "3G/1G user/kernel host split (for full 1G low memory)" 42 bool "3G/1G user/kernel host split (for full 1G low memory)"
43 config HOST_VMSPLIT_2G 43config HOST_VMSPLIT_2G
44 bool "2G/2G user/kernel host split" 44 bool "2G/2G user/kernel host split"
45 config HOST_VMSPLIT_1G 45config HOST_VMSPLIT_1G
46 bool "1G/3G user/kernel host split" 46 bool "1G/3G user/kernel host split"
47endchoice 47endchoice
48 48
49config TOP_ADDR 49config TOP_ADDR
@@ -67,13 +67,13 @@ config 3_LEVEL_PGTABLES
67 67
68config STUB_CODE 68config STUB_CODE
69 hex 69 hex
70 default 0xbfffe000 if !HOST_2G_2G 70 default 0xbfffe000 if !HOST_VMSPLIT_2G
71 default 0x7fffe000 if HOST_2G_2G 71 default 0x7fffe000 if HOST_VMSPLIT_2G
72 72
73config STUB_DATA 73config STUB_DATA
74 hex 74 hex
75 default 0xbffff000 if !HOST_2G_2G 75 default 0xbffff000 if !HOST_VMSPLIT_2G
76 default 0x7ffff000 if HOST_2G_2G 76 default 0x7ffff000 if HOST_VMSPLIT_2G
77 77
78config STUB_START 78config STUB_START
79 hex 79 hex
diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c
index 0709fc6670c2..3f6acd667717 100644
--- a/arch/um/sys-i386/signal.c
+++ b/arch/um/sys-i386/signal.c
@@ -219,7 +219,8 @@ int setup_signal_stack_sc(unsigned long stack_top, int sig,
219 unsigned long save_sp = PT_REGS_SP(regs); 219 unsigned long save_sp = PT_REGS_SP(regs);
220 int err = 0; 220 int err = 0;
221 221
222 stack_top &= -8UL; 222 /* This is the same calculation as i386 - ((sp + 4) & 15) == 0 */
223 stack_top = ((stack_top + 4) & -16UL) - 4;
223 frame = (struct sigframe __user *) stack_top - 1; 224 frame = (struct sigframe __user *) stack_top - 1;
224 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) 225 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
225 return 1; 226 return 1;
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c
index 9edf114faf79..af2f017617b4 100644
--- a/arch/um/sys-x86_64/signal.c
+++ b/arch/um/sys-x86_64/signal.c
@@ -191,8 +191,9 @@ int setup_signal_stack_si(unsigned long stack_top, int sig,
191 struct task_struct *me = current; 191 struct task_struct *me = current;
192 192
193 frame = (struct rt_sigframe __user *) 193 frame = (struct rt_sigframe __user *)
194 round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; 194 round_down(stack_top - sizeof(struct rt_sigframe), 16);
195 frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128); 195 /* Subtract 128 for a red zone and 8 for proper alignment */
196 frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128 - 8);
196 197
197 if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) 198 if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate)))
198 goto out; 199 goto out;
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c
index 543ef4f405e9..5ce0bd486bbf 100644
--- a/arch/x86_64/ia32/ia32_binfmt.c
+++ b/arch/x86_64/ia32/ia32_binfmt.c
@@ -64,55 +64,6 @@ typedef unsigned int elf_greg_t;
64#define ELF_NGREG (sizeof (struct user_regs_struct32) / sizeof(elf_greg_t)) 64#define ELF_NGREG (sizeof (struct user_regs_struct32) / sizeof(elf_greg_t))
65typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 65typedef elf_greg_t elf_gregset_t[ELF_NGREG];
66 66
67/*
68 * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out
69 * extra segments containing the vsyscall DSO contents. Dumping its
70 * contents makes post-mortem fully interpretable later without matching up
71 * the same kernel and hardware config to see what PC values meant.
72 * Dumping its extra ELF program headers includes all the other information
73 * a debugger needs to easily find how the vsyscall DSO was being used.
74 */
75#define ELF_CORE_EXTRA_PHDRS (find_vma(current->mm, VSYSCALL32_BASE) ? \
76 (VSYSCALL32_EHDR->e_phnum) : 0)
77#define ELF_CORE_WRITE_EXTRA_PHDRS \
78do { \
79 if (find_vma(current->mm, VSYSCALL32_BASE)) { \
80 const struct elf32_phdr *const vsyscall_phdrs = \
81 (const struct elf32_phdr *) (VSYSCALL32_BASE \
82 + VSYSCALL32_EHDR->e_phoff);\
83 int i; \
84 Elf32_Off ofs = 0; \
85 for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \
86 struct elf32_phdr phdr = vsyscall_phdrs[i]; \
87 if (phdr.p_type == PT_LOAD) { \
88 BUG_ON(ofs != 0); \
89 ofs = phdr.p_offset = offset; \
90 phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); \
91 phdr.p_filesz = phdr.p_memsz; \
92 offset += phdr.p_filesz; \
93 } \
94 else \
95 phdr.p_offset += ofs; \
96 phdr.p_paddr = 0; /* match other core phdrs */ \
97 DUMP_WRITE(&phdr, sizeof(phdr)); \
98 } \
99 } \
100} while (0)
101#define ELF_CORE_WRITE_EXTRA_DATA \
102do { \
103 if (find_vma(current->mm, VSYSCALL32_BASE)) { \
104 const struct elf32_phdr *const vsyscall_phdrs = \
105 (const struct elf32_phdr *) (VSYSCALL32_BASE \
106 + VSYSCALL32_EHDR->e_phoff); \
107 int i; \
108 for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \
109 if (vsyscall_phdrs[i].p_type == PT_LOAD) \
110 DUMP_WRITE((void *) (u64) vsyscall_phdrs[i].p_vaddr,\
111 PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \
112 } \
113 } \
114} while (0)
115
116struct elf_siginfo 67struct elf_siginfo
117{ 68{
118 int si_signo; /* signal number */ 69 int si_signo; /* signal number */
diff --git a/arch/x86_64/ia32/syscall32.c b/arch/x86_64/ia32/syscall32.c
index 3e5ed20cba45..59f1fa155915 100644
--- a/arch/x86_64/ia32/syscall32.c
+++ b/arch/x86_64/ia32/syscall32.c
@@ -59,6 +59,13 @@ int syscall32_setup_pages(struct linux_binprm *bprm, int exstack)
59 vma->vm_end = VSYSCALL32_END; 59 vma->vm_end = VSYSCALL32_END;
60 /* MAYWRITE to allow gdb to COW and set breakpoints */ 60 /* MAYWRITE to allow gdb to COW and set breakpoints */
61 vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE; 61 vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE;
62 /*
63 * Make sure the vDSO gets into every core dump.
64 * Dumping its contents makes post-mortem fully interpretable later
65 * without matching up the same kernel and hardware config to see
66 * what PC values meant.
67 */
68 vma->vm_flags |= VM_ALWAYSDUMP;
62 vma->vm_flags |= mm->def_flags; 69 vma->vm_flags |= mm->def_flags;
63 vma->vm_page_prot = protection_map[vma->vm_flags & 7]; 70 vma->vm_page_prot = protection_map[vma->vm_flags & 7];
64 vma->vm_ops = &syscall32_vm_ops; 71 vma->vm_ops = &syscall32_vm_ops;
@@ -75,6 +82,14 @@ int syscall32_setup_pages(struct linux_binprm *bprm, int exstack)
75 return 0; 82 return 0;
76} 83}
77 84
85const char *arch_vma_name(struct vm_area_struct *vma)
86{
87 if (vma->vm_start == VSYSCALL32_BASE &&
88 vma->vm_mm && vma->vm_mm->task_size == IA32_PAGE_OFFSET)
89 return "[vdso]";
90 return NULL;
91}
92
78static int __init init_syscall32(void) 93static int __init init_syscall32(void)
79{ 94{
80 syscall32_page = (void *)get_zeroed_page(GFP_KERNEL); 95 syscall32_page = (void *)get_zeroed_page(GFP_KERNEL);
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c
index 186aebbae32d..9cb42ecb7f89 100644
--- a/arch/x86_64/kernel/nmi.c
+++ b/arch/x86_64/kernel/nmi.c
@@ -302,8 +302,6 @@ int __init setup_nmi_watchdog(char *str)
302 if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE)) 302 if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE))
303 return 0; 303 return 0;
304 304
305 if ((nmi == NMI_LOCAL_APIC) && (nmi_known_cpu() == 0))
306 return 0; /* no lapic support */
307 nmi_watchdog = nmi; 305 nmi_watchdog = nmi;
308 return 1; 306 return 1;
309} 307}