aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/asm-offsets.c2
-rw-r--r--arch/arm/kernel/dma-isa.c23
-rw-r--r--arch/arm/kernel/process.c2
-rw-r--r--arch/arm/lib/backtrace.S4
-rw-r--r--arch/arm/lib/div64.S4
-rw-r--r--arch/arm/mach-realview/realview_eb.c5
-rw-r--r--arch/arm/mm/ioremap.c4
-rw-r--r--arch/i386/kernel/acpi/boot.c8
-rw-r--r--arch/powerpc/kernel/prom_init.c2
-rw-r--r--arch/powerpc/platforms/pseries/setup.c2
-rw-r--r--arch/x86_64/kernel/pci-nommu.c7
-rw-r--r--arch/x86_64/kernel/traps.c21
-rw-r--r--arch/x86_64/mm/srat.c15
13 files changed, 72 insertions, 27 deletions
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
index 45fdf4a51a2a..396efba9bacd 100644
--- a/arch/arm/kernel/asm-offsets.c
+++ b/arch/arm/kernel/asm-offsets.c
@@ -99,6 +99,8 @@ int main(void)
99 DEFINE(MACHINFO_NAME, offsetof(struct machine_desc, name)); 99 DEFINE(MACHINFO_NAME, offsetof(struct machine_desc, name));
100 DEFINE(MACHINFO_PHYSIO, offsetof(struct machine_desc, phys_io)); 100 DEFINE(MACHINFO_PHYSIO, offsetof(struct machine_desc, phys_io));
101 DEFINE(MACHINFO_PGOFFIO, offsetof(struct machine_desc, io_pg_offst)); 101 DEFINE(MACHINFO_PGOFFIO, offsetof(struct machine_desc, io_pg_offst));
102 BLANK();
103 DEFINE(PROC_INFO_SZ, sizeof(struct proc_info_list));
102 DEFINE(PROCINFO_INITFUNC, offsetof(struct proc_info_list, __cpu_flush)); 104 DEFINE(PROCINFO_INITFUNC, offsetof(struct proc_info_list, __cpu_flush));
103 DEFINE(PROCINFO_MMUFLAGS, offsetof(struct proc_info_list, __cpu_mmu_flags)); 105 DEFINE(PROCINFO_MMUFLAGS, offsetof(struct proc_info_list, __cpu_mmu_flags));
104 return 0; 106 return 0;
diff --git a/arch/arm/kernel/dma-isa.c b/arch/arm/kernel/dma-isa.c
index 03532769a97f..0a3e9ad297d8 100644
--- a/arch/arm/kernel/dma-isa.c
+++ b/arch/arm/kernel/dma-isa.c
@@ -143,12 +143,23 @@ static struct dma_ops isa_dma_ops = {
143 .residue = isa_get_dma_residue, 143 .residue = isa_get_dma_residue,
144}; 144};
145 145
146static struct resource dma_resources[] = { 146static struct resource dma_resources[] = { {
147 { "dma1", 0x0000, 0x000f }, 147 .name = "dma1",
148 { "dma low page", 0x0080, 0x008f }, 148 .start = 0x0000,
149 { "dma2", 0x00c0, 0x00df }, 149 .end = 0x000f
150 { "dma high page", 0x0480, 0x048f } 150}, {
151}; 151 .name = "dma low page",
152 .start = 0x0080,
153 .end = 0x008f
154}, {
155 .name = "dma2",
156 .start = 0x00c0,
157 .end = 0x00df
158}, {
159 .name = "dma high page",
160 .start = 0x0480,
161 .end = 0x048f
162} };
152 163
153void __init isa_init_dma(dma_t *dma) 164void __init isa_init_dma(dma_t *dma)
154{ 165{
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 1a1539e3a946..7df6e1aaa323 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -311,7 +311,7 @@ void free_thread_info(struct thread_info *thread)
311 struct thread_info_list *th = &get_cpu_var(thread_info_list); 311 struct thread_info_list *th = &get_cpu_var(thread_info_list);
312 if (th->nr < EXTRA_TASK_STRUCT) { 312 if (th->nr < EXTRA_TASK_STRUCT) {
313 unsigned long *p = (unsigned long *)thread; 313 unsigned long *p = (unsigned long *)thread;
314 p[0] = th->head; 314 p[0] = (unsigned long)th->head;
315 th->head = p; 315 th->head = p;
316 th->nr += 1; 316 th->nr += 1;
317 put_cpu_var(thread_info_list); 317 put_cpu_var(thread_info_list);
diff --git a/arch/arm/lib/backtrace.S b/arch/arm/lib/backtrace.S
index 3bdc8c6949c5..16153c86c3f8 100644
--- a/arch/arm/lib/backtrace.S
+++ b/arch/arm/lib/backtrace.S
@@ -122,7 +122,7 @@ ENTRY(c_backtrace)
122#define reg r5 122#define reg r5
123#define stack r6 123#define stack r6
124 124
125.Ldumpstm: stmfd sp!, {instr, reg, stack, r7, lr} 125.Ldumpstm: stmfd sp!, {instr, reg, stack, r7, r8, lr}
126 mov stack, r0 126 mov stack, r0
127 mov instr, r1 127 mov instr, r1
128 mov reg, #9 128 mov reg, #9
@@ -145,7 +145,7 @@ ENTRY(c_backtrace)
145 adrne r0, .Lcr 145 adrne r0, .Lcr
146 blne printk 146 blne printk
147 mov r0, stack 147 mov r0, stack
148 LOADREGS(fd, sp!, {instr, reg, stack, r7, pc}) 148 LOADREGS(fd, sp!, {instr, reg, stack, r7, r8, pc})
149 149
150.Lfp: .asciz " r%d = %08X%c" 150.Lfp: .asciz " r%d = %08X%c"
151.Lcr: .asciz "\n" 151.Lcr: .asciz "\n"
diff --git a/arch/arm/lib/div64.S b/arch/arm/lib/div64.S
index ec9a1cd6176f..58eef6607629 100644
--- a/arch/arm/lib/div64.S
+++ b/arch/arm/lib/div64.S
@@ -189,12 +189,12 @@ ENTRY(__do_div64)
189 moveq pc, lr 189 moveq pc, lr
190 190
191 @ Division by 0: 191 @ Division by 0:
192 str lr, [sp, #-4]! 192 str lr, [sp, #-8]!
193 bl __div0 193 bl __div0
194 194
195 @ as wrong as it could be... 195 @ as wrong as it could be...
196 mov yl, #0 196 mov yl, #0
197 mov yh, #0 197 mov yh, #0
198 mov xh, #0 198 mov xh, #0
199 ldr pc, [sp], #4 199 ldr pc, [sp], #8
200 200
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index d4a586e38d5b..693fb1e396e0 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -137,8 +137,11 @@ static struct amba_device *amba_devs[] __initdata = {
137static void __init gic_init_irq(void) 137static void __init gic_init_irq(void)
138{ 138{
139#ifdef CONFIG_REALVIEW_MPCORE 139#ifdef CONFIG_REALVIEW_MPCORE
140 unsigned int pldctrl;
140 writel(0x0000a05f, __io_address(REALVIEW_SYS_LOCK)); 141 writel(0x0000a05f, __io_address(REALVIEW_SYS_LOCK));
141 writel(0x008003c0, __io_address(REALVIEW_SYS_BASE) + 0xd8); 142 pldctrl = readl(__io_address(REALVIEW_SYS_BASE) + 0xd8);
143 pldctrl |= 0x00800000; /* New irq mode */
144 writel(pldctrl, __io_address(REALVIEW_SYS_BASE) + 0xd8);
142 writel(0x00000000, __io_address(REALVIEW_SYS_LOCK)); 145 writel(0x00000000, __io_address(REALVIEW_SYS_LOCK));
143#endif 146#endif
144 gic_dist_init(__io_address(REALVIEW_GIC_DIST_BASE)); 147 gic_dist_init(__io_address(REALVIEW_GIC_DIST_BASE));
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 25e0ca3e598c..c1f7180c7bed 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -141,7 +141,7 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
141 return NULL; 141 return NULL;
142 addr = (unsigned long)area->addr; 142 addr = (unsigned long)area->addr;
143 if (remap_area_pages(addr, pfn, size, flags)) { 143 if (remap_area_pages(addr, pfn, size, flags)) {
144 vfree((void *)addr); 144 vunmap((void *)addr);
145 return NULL; 145 return NULL;
146 } 146 }
147 return (void __iomem *) (offset + (char *)addr); 147 return (void __iomem *) (offset + (char *)addr);
@@ -173,7 +173,7 @@ EXPORT_SYMBOL(__ioremap);
173 173
174void __iounmap(void __iomem *addr) 174void __iounmap(void __iomem *addr)
175{ 175{
176 vfree((void *) (PAGE_MASK & (unsigned long) addr)); 176 vunmap((void *)(PAGE_MASK & (unsigned long)addr));
177} 177}
178EXPORT_SYMBOL(__iounmap); 178EXPORT_SYMBOL(__iounmap);
179 179
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index 40e5aba3ad3d..daee69579b1c 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -1066,6 +1066,14 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
1066 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"), 1066 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
1067 }, 1067 },
1068 }, 1068 },
1069 {
1070 .callback = disable_acpi_pci,
1071 .ident = "HP xw9300",
1072 .matches = {
1073 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
1074 DMI_MATCH(DMI_PRODUCT_NAME, "HP xw9300 Workstation"),
1075 },
1076 },
1069 {} 1077 {}
1070}; 1078};
1071 1079
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 078fb5533541..2d80653aa2af 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1636,7 +1636,7 @@ static int __init prom_find_machine_type(void)
1636 compat, sizeof(compat)-1); 1636 compat, sizeof(compat)-1);
1637 if (len <= 0) 1637 if (len <= 0)
1638 return PLATFORM_GENERIC; 1638 return PLATFORM_GENERIC;
1639 if (strncmp(compat, RELOC("chrp"), 4)) 1639 if (strcmp(compat, RELOC("chrp")))
1640 return PLATFORM_GENERIC; 1640 return PLATFORM_GENERIC;
1641 1641
1642 /* Default to pSeries. We need to know if we are running LPAR */ 1642 /* Default to pSeries. We need to know if we are running LPAR */
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 5eb55ef1c91c..5f79f01c44f2 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -255,7 +255,7 @@ static int __init pSeries_init_panel(void)
255{ 255{
256 /* Manually leave the kernel version on the panel. */ 256 /* Manually leave the kernel version on the panel. */
257 ppc_md.progress("Linux ppc64\n", 0); 257 ppc_md.progress("Linux ppc64\n", 0);
258 ppc_md.progress(system_utsname.version, 0); 258 ppc_md.progress(system_utsname.release, 0);
259 259
260 return 0; 260 return 0;
261} 261}
diff --git a/arch/x86_64/kernel/pci-nommu.c b/arch/x86_64/kernel/pci-nommu.c
index 44adcc2d5e5b..1f6ecc62061d 100644
--- a/arch/x86_64/kernel/pci-nommu.c
+++ b/arch/x86_64/kernel/pci-nommu.c
@@ -12,9 +12,10 @@ static int
12check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size) 12check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
13{ 13{
14 if (hwdev && bus + size > *hwdev->dma_mask) { 14 if (hwdev && bus + size > *hwdev->dma_mask) {
15 printk(KERN_ERR 15 if (*hwdev->dma_mask >= 0xffffffffULL)
16 "nommu_%s: overflow %Lx+%lu of device mask %Lx\n", 16 printk(KERN_ERR
17 name, (long long)bus, size, (long long)*hwdev->dma_mask); 17 "nommu_%s: overflow %Lx+%lu of device mask %Lx\n",
18 name, (long long)bus, size, (long long)*hwdev->dma_mask);
18 return 0; 19 return 0;
19 } 20 }
20 return 1; 21 return 1;
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index 6b87268c5c2e..cea335e8746c 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -102,6 +102,8 @@ static inline void preempt_conditional_cli(struct pt_regs *regs)
102{ 102{
103 if (regs->eflags & X86_EFLAGS_IF) 103 if (regs->eflags & X86_EFLAGS_IF)
104 local_irq_disable(); 104 local_irq_disable();
105 /* Make sure to not schedule here because we could be running
106 on an exception stack. */
105 preempt_enable_no_resched(); 107 preempt_enable_no_resched();
106} 108}
107 109
@@ -483,8 +485,6 @@ static void __kprobes do_trap(int trapnr, int signr, char *str,
483{ 485{
484 struct task_struct *tsk = current; 486 struct task_struct *tsk = current;
485 487
486 conditional_sti(regs);
487
488 tsk->thread.error_code = error_code; 488 tsk->thread.error_code = error_code;
489 tsk->thread.trap_no = trapnr; 489 tsk->thread.trap_no = trapnr;
490 490
@@ -521,6 +521,7 @@ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
521 if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ 521 if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \
522 == NOTIFY_STOP) \ 522 == NOTIFY_STOP) \
523 return; \ 523 return; \
524 conditional_sti(regs); \
524 do_trap(trapnr, signr, str, regs, error_code, NULL); \ 525 do_trap(trapnr, signr, str, regs, error_code, NULL); \
525} 526}
526 527
@@ -535,6 +536,7 @@ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
535 if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ 536 if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \
536 == NOTIFY_STOP) \ 537 == NOTIFY_STOP) \
537 return; \ 538 return; \
539 conditional_sti(regs); \
538 do_trap(trapnr, signr, str, regs, error_code, &info); \ 540 do_trap(trapnr, signr, str, regs, error_code, &info); \
539} 541}
540 542
@@ -548,7 +550,17 @@ DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
548DO_ERROR(11, SIGBUS, "segment not present", segment_not_present) 550DO_ERROR(11, SIGBUS, "segment not present", segment_not_present)
549DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0) 551DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0)
550DO_ERROR(18, SIGSEGV, "reserved", reserved) 552DO_ERROR(18, SIGSEGV, "reserved", reserved)
551DO_ERROR(12, SIGBUS, "stack segment", stack_segment) 553
554/* Runs on IST stack */
555asmlinkage void do_stack_segment(struct pt_regs *regs, long error_code)
556{
557 if (notify_die(DIE_TRAP, "stack segment", regs, error_code,
558 12, SIGBUS) == NOTIFY_STOP)
559 return;
560 preempt_conditional_sti(regs);
561 do_trap(12, SIGBUS, "stack segment", regs, error_code, NULL);
562 preempt_conditional_cli(regs);
563}
552 564
553asmlinkage void do_double_fault(struct pt_regs * regs, long error_code) 565asmlinkage void do_double_fault(struct pt_regs * regs, long error_code)
554{ 566{
@@ -682,8 +694,9 @@ asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code)
682 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) == NOTIFY_STOP) { 694 if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) == NOTIFY_STOP) {
683 return; 695 return;
684 } 696 }
697 preempt_conditional_sti(regs);
685 do_trap(3, SIGTRAP, "int3", regs, error_code, NULL); 698 do_trap(3, SIGTRAP, "int3", regs, error_code, NULL);
686 return; 699 preempt_conditional_cli(regs);
687} 700}
688 701
689/* Help handler running on IST stack to switch back to user stack 702/* Help handler running on IST stack to switch back to user stack
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c
index 15ae9fcd65a7..e1513532df29 100644
--- a/arch/x86_64/mm/srat.c
+++ b/arch/x86_64/mm/srat.c
@@ -34,7 +34,10 @@ static nodemask_t nodes_found __initdata;
34static struct bootnode nodes[MAX_NUMNODES] __initdata; 34static struct bootnode nodes[MAX_NUMNODES] __initdata;
35static struct bootnode nodes_add[MAX_NUMNODES] __initdata; 35static struct bootnode nodes_add[MAX_NUMNODES] __initdata;
36static int found_add_area __initdata; 36static int found_add_area __initdata;
37int hotadd_percent __initdata = 10; 37int hotadd_percent __initdata = 0;
38#ifndef RESERVE_HOTADD
39#define hotadd_percent 0 /* Ignore all settings */
40#endif
38static u8 pxm2node[256] = { [0 ... 255] = 0xff }; 41static u8 pxm2node[256] = { [0 ... 255] = 0xff };
39 42
40/* Too small nodes confuse the VM badly. Usually they result 43/* Too small nodes confuse the VM badly. Usually they result
@@ -103,6 +106,7 @@ static __init void bad_srat(void)
103 int i; 106 int i;
104 printk(KERN_ERR "SRAT: SRAT not used.\n"); 107 printk(KERN_ERR "SRAT: SRAT not used.\n");
105 acpi_numa = -1; 108 acpi_numa = -1;
109 found_add_area = 0;
106 for (i = 0; i < MAX_LOCAL_APIC; i++) 110 for (i = 0; i < MAX_LOCAL_APIC; i++)
107 apicid_to_node[i] = NUMA_NO_NODE; 111 apicid_to_node[i] = NUMA_NO_NODE;
108 for (i = 0; i < MAX_NUMNODES; i++) 112 for (i = 0; i < MAX_NUMNODES; i++)
@@ -154,7 +158,8 @@ acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa)
154 int pxm, node; 158 int pxm, node;
155 if (srat_disabled()) 159 if (srat_disabled())
156 return; 160 return;
157 if (pa->header.length != sizeof(struct acpi_table_processor_affinity)) { bad_srat(); 161 if (pa->header.length != sizeof(struct acpi_table_processor_affinity)) {
162 bad_srat();
158 return; 163 return;
159 } 164 }
160 if (pa->flags.enabled == 0) 165 if (pa->flags.enabled == 0)
@@ -191,15 +196,17 @@ static int hotadd_enough_memory(struct bootnode *nd)
191 allowed = (end_pfn - e820_hole_size(0, end_pfn)) * PAGE_SIZE; 196 allowed = (end_pfn - e820_hole_size(0, end_pfn)) * PAGE_SIZE;
192 allowed = (allowed / 100) * hotadd_percent; 197 allowed = (allowed / 100) * hotadd_percent;
193 if (allocated + mem > allowed) { 198 if (allocated + mem > allowed) {
199 unsigned long range;
194 /* Give them at least part of their hotadd memory upto hotadd_percent 200 /* Give them at least part of their hotadd memory upto hotadd_percent
195 It would be better to spread the limit out 201 It would be better to spread the limit out
196 over multiple hotplug areas, but that is too complicated 202 over multiple hotplug areas, but that is too complicated
197 right now */ 203 right now */
198 if (allocated >= allowed) 204 if (allocated >= allowed)
199 return 0; 205 return 0;
200 pages = (allowed - allocated + mem) / sizeof(struct page); 206 range = allowed - allocated;
207 pages = (range / PAGE_SIZE);
201 mem = pages * sizeof(struct page); 208 mem = pages * sizeof(struct page);
202 nd->end = nd->start + pages*PAGE_SIZE; 209 nd->end = nd->start + range;
203 } 210 }
204 /* Not completely fool proof, but a good sanity check */ 211 /* Not completely fool proof, but a good sanity check */
205 addr = find_e820_area(last_area_end, end_pfn<<PAGE_SHIFT, mem); 212 addr = find_e820_area(last_area_end, end_pfn<<PAGE_SHIFT, mem);