diff options
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r-- | arch/i386/kernel/acpi/wakeup.S | 6 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/common.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/head.S | 2 | ||||
-rw-r--r-- | arch/i386/kernel/io_apic.c | 7 | ||||
-rw-r--r-- | arch/i386/kernel/mpparse.c | 24 | ||||
-rw-r--r-- | arch/i386/kernel/ptrace.c | 22 | ||||
-rw-r--r-- | arch/i386/kernel/setup.c | 17 | ||||
-rw-r--r-- | arch/i386/kernel/sigframe.h | 8 | ||||
-rw-r--r-- | arch/i386/kernel/smpboot.c | 3 | ||||
-rw-r--r-- | arch/i386/kernel/time.c | 3 | ||||
-rw-r--r-- | arch/i386/kernel/vsyscall-sigreturn.S | 2 | ||||
-rw-r--r-- | arch/i386/kernel/vsyscall.lds.S | 2 |
12 files changed, 46 insertions, 52 deletions
diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S index 44d886c745ec..7c74fe0dc93c 100644 --- a/arch/i386/kernel/acpi/wakeup.S +++ b/arch/i386/kernel/acpi/wakeup.S | |||
@@ -304,12 +304,6 @@ ret_point: | |||
304 | call restore_processor_state | 304 | call restore_processor_state |
305 | ret | 305 | ret |
306 | 306 | ||
307 | ENTRY(do_suspend_lowlevel_s4bios) | ||
308 | call save_processor_state | ||
309 | call save_registers | ||
310 | call acpi_enter_sleep_state_s4bios | ||
311 | ret | ||
312 | |||
313 | ALIGN | 307 | ALIGN |
314 | # saved registers | 308 | # saved registers |
315 | saved_gdt: .long 0,0 | 309 | saved_gdt: .long 0,0 |
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 46ce9b248f55..9ad43be9a01f 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
@@ -151,7 +151,7 @@ static char __devinit *table_lookup_model(struct cpuinfo_x86 *c) | |||
151 | } | 151 | } |
152 | 152 | ||
153 | 153 | ||
154 | void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) | 154 | static void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) |
155 | { | 155 | { |
156 | char *v = c->x86_vendor_id; | 156 | char *v = c->x86_vendor_id; |
157 | int i; | 157 | int i; |
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index 0480ca9e9e57..e437fb367498 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <asm/desc.h> | 17 | #include <asm/desc.h> |
18 | #include <asm/cache.h> | 18 | #include <asm/cache.h> |
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | #include <asm/asm_offsets.h> | 20 | #include <asm/asm-offsets.h> |
21 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
22 | 22 | ||
23 | /* | 23 | /* |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 889eda2d7b17..35d3ce26a544 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -573,8 +573,7 @@ static int balanced_irq(void *unused) | |||
573 | } | 573 | } |
574 | 574 | ||
575 | for ( ; ; ) { | 575 | for ( ; ; ) { |
576 | set_current_state(TASK_INTERRUPTIBLE); | 576 | time_remaining = schedule_timeout_interruptible(time_remaining); |
577 | time_remaining = schedule_timeout(time_remaining); | ||
578 | try_to_freeze(); | 577 | try_to_freeze(); |
579 | if (time_after(jiffies, | 578 | if (time_after(jiffies, |
580 | prev_balance_time+balanced_irq_interval)) { | 579 | prev_balance_time+balanced_irq_interval)) { |
@@ -1634,9 +1633,9 @@ void disable_IO_APIC(void) | |||
1634 | clear_IO_APIC(); | 1633 | clear_IO_APIC(); |
1635 | 1634 | ||
1636 | /* | 1635 | /* |
1637 | * If the i82559 is routed through an IOAPIC | 1636 | * If the i8259 is routed through an IOAPIC |
1638 | * Put that IOAPIC in virtual wire mode | 1637 | * Put that IOAPIC in virtual wire mode |
1639 | * so legacy interrups can be delivered. | 1638 | * so legacy interrupts can be delivered. |
1640 | */ | 1639 | */ |
1641 | pin = find_isa_irq_pin(0, mp_ExtINT); | 1640 | pin = find_isa_irq_pin(0, mp_ExtINT); |
1642 | if (pin != -1) { | 1641 | if (pin != -1) { |
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index cafaeffe3818..15949fd08109 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -122,8 +122,8 @@ static int MP_valid_apicid(int apicid, int version) | |||
122 | 122 | ||
123 | static void __init MP_processor_info (struct mpc_config_processor *m) | 123 | static void __init MP_processor_info (struct mpc_config_processor *m) |
124 | { | 124 | { |
125 | int ver, apicid, cpu, found_bsp = 0; | 125 | int ver, apicid; |
126 | physid_mask_t tmp; | 126 | physid_mask_t phys_cpu; |
127 | 127 | ||
128 | if (!(m->mpc_cpuflag & CPU_ENABLED)) | 128 | if (!(m->mpc_cpuflag & CPU_ENABLED)) |
129 | return; | 129 | return; |
@@ -181,7 +181,6 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
181 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { | 181 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { |
182 | Dprintk(" Bootup CPU\n"); | 182 | Dprintk(" Bootup CPU\n"); |
183 | boot_cpu_physical_apicid = m->mpc_apicid; | 183 | boot_cpu_physical_apicid = m->mpc_apicid; |
184 | found_bsp = 1; | ||
185 | } | 184 | } |
186 | 185 | ||
187 | if (num_processors >= NR_CPUS) { | 186 | if (num_processors >= NR_CPUS) { |
@@ -195,29 +194,26 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
195 | " Processor ignored.\n", maxcpus); | 194 | " Processor ignored.\n", maxcpus); |
196 | return; | 195 | return; |
197 | } | 196 | } |
198 | num_processors++; | ||
199 | ver = m->mpc_apicver; | 197 | ver = m->mpc_apicver; |
200 | 198 | ||
201 | if (!MP_valid_apicid(apicid, ver)) { | 199 | if (!MP_valid_apicid(apicid, ver)) { |
202 | printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n", | 200 | printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n", |
203 | m->mpc_apicid, MAX_APICS); | 201 | m->mpc_apicid, MAX_APICS); |
204 | --num_processors; | ||
205 | return; | 202 | return; |
206 | } | 203 | } |
207 | 204 | ||
208 | if (found_bsp) | 205 | cpu_set(num_processors, cpu_possible_map); |
209 | cpu = 0; | 206 | num_processors++; |
210 | else | 207 | phys_cpu = apicid_to_cpu_present(apicid); |
211 | cpu = num_processors - 1; | 208 | physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu); |
212 | cpu_set(cpu, cpu_possible_map); | 209 | |
213 | tmp = apicid_to_cpu_present(apicid); | ||
214 | physids_or(phys_cpu_present_map, phys_cpu_present_map, tmp); | ||
215 | |||
216 | /* | 210 | /* |
217 | * Validate version | 211 | * Validate version |
218 | */ | 212 | */ |
219 | if (ver == 0x0) { | 213 | if (ver == 0x0) { |
220 | printk(KERN_WARNING "BIOS bug, APIC version is 0 for CPU#%d! fixing up to 0x10. (tell your hw vendor)\n", m->mpc_apicid); | 214 | printk(KERN_WARNING "BIOS bug, APIC version is 0 for CPU#%d! " |
215 | "fixing up to 0x10. (tell your hw vendor)\n", | ||
216 | m->mpc_apicid); | ||
221 | ver = 0x10; | 217 | ver = 0x10; |
222 | } | 218 | } |
223 | apic_version[m->mpc_apicid] = ver; | 219 | apic_version[m->mpc_apicid] = ver; |
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index 340980203b09..7b6368bf8974 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c | |||
@@ -694,17 +694,22 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code) | |||
694 | __attribute__((regparm(3))) | 694 | __attribute__((regparm(3))) |
695 | int do_syscall_trace(struct pt_regs *regs, int entryexit) | 695 | int do_syscall_trace(struct pt_regs *regs, int entryexit) |
696 | { | 696 | { |
697 | int is_sysemu = test_thread_flag(TIF_SYSCALL_EMU), ret = 0; | 697 | int is_sysemu = test_thread_flag(TIF_SYSCALL_EMU); |
698 | /* With TIF_SYSCALL_EMU set we want to ignore TIF_SINGLESTEP for syscall | 698 | /* |
699 | * interception. */ | 699 | * With TIF_SYSCALL_EMU set we want to ignore TIF_SINGLESTEP for syscall |
700 | * interception | ||
701 | */ | ||
700 | int is_singlestep = !is_sysemu && test_thread_flag(TIF_SINGLESTEP); | 702 | int is_singlestep = !is_sysemu && test_thread_flag(TIF_SINGLESTEP); |
703 | int ret = 0; | ||
701 | 704 | ||
702 | /* do the secure computing check first */ | 705 | /* do the secure computing check first */ |
703 | secure_computing(regs->orig_eax); | 706 | if (!entryexit) |
707 | secure_computing(regs->orig_eax); | ||
704 | 708 | ||
705 | if (unlikely(current->audit_context)) { | 709 | if (unlikely(current->audit_context)) { |
706 | if (entryexit) | 710 | if (entryexit) |
707 | audit_syscall_exit(current, AUDITSC_RESULT(regs->eax), regs->eax); | 711 | audit_syscall_exit(current, AUDITSC_RESULT(regs->eax), |
712 | regs->eax); | ||
708 | /* Debug traps, when using PTRACE_SINGLESTEP, must be sent only | 713 | /* Debug traps, when using PTRACE_SINGLESTEP, must be sent only |
709 | * on the syscall exit path. Normally, when TIF_SYSCALL_AUDIT is | 714 | * on the syscall exit path. Normally, when TIF_SYSCALL_AUDIT is |
710 | * not used, entry.S will call us only on syscall exit, not | 715 | * not used, entry.S will call us only on syscall exit, not |
@@ -738,7 +743,7 @@ int do_syscall_trace(struct pt_regs *regs, int entryexit) | |||
738 | /* the 0x80 provides a way for the tracing parent to distinguish | 743 | /* the 0x80 provides a way for the tracing parent to distinguish |
739 | between a syscall stop and SIGTRAP delivery */ | 744 | between a syscall stop and SIGTRAP delivery */ |
740 | /* Note that the debugger could change the result of test_thread_flag!*/ | 745 | /* Note that the debugger could change the result of test_thread_flag!*/ |
741 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); | 746 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80:0)); |
742 | 747 | ||
743 | /* | 748 | /* |
744 | * this isn't the same as continuing with a signal, but it will do | 749 | * this isn't the same as continuing with a signal, but it will do |
@@ -750,7 +755,7 @@ int do_syscall_trace(struct pt_regs *regs, int entryexit) | |||
750 | current->exit_code = 0; | 755 | current->exit_code = 0; |
751 | } | 756 | } |
752 | ret = is_sysemu; | 757 | ret = is_sysemu; |
753 | out: | 758 | out: |
754 | if (unlikely(current->audit_context) && !entryexit) | 759 | if (unlikely(current->audit_context) && !entryexit) |
755 | audit_syscall_entry(current, AUDIT_ARCH_I386, regs->orig_eax, | 760 | audit_syscall_entry(current, AUDIT_ARCH_I386, regs->orig_eax, |
756 | regs->ebx, regs->ecx, regs->edx, regs->esi); | 761 | regs->ebx, regs->ecx, regs->edx, regs->esi); |
@@ -759,6 +764,7 @@ int do_syscall_trace(struct pt_regs *regs, int entryexit) | |||
759 | 764 | ||
760 | regs->orig_eax = -1; /* force skip of syscall restarting */ | 765 | regs->orig_eax = -1; /* force skip of syscall restarting */ |
761 | if (unlikely(current->audit_context)) | 766 | if (unlikely(current->audit_context)) |
762 | audit_syscall_exit(current, AUDITSC_RESULT(regs->eax), regs->eax); | 767 | audit_syscall_exit(current, AUDITSC_RESULT(regs->eax), |
768 | regs->eax); | ||
763 | return 1; | 769 | return 1; |
764 | } | 770 | } |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index a659d274914c..f3d808451d25 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -139,6 +139,7 @@ struct sys_desc_table_struct { | |||
139 | unsigned char table[0]; | 139 | unsigned char table[0]; |
140 | }; | 140 | }; |
141 | struct edid_info edid_info; | 141 | struct edid_info edid_info; |
142 | EXPORT_SYMBOL_GPL(edid_info); | ||
142 | struct ist_info ist_info; | 143 | struct ist_info ist_info; |
143 | #if defined(CONFIG_X86_SPEEDSTEP_SMI) || \ | 144 | #if defined(CONFIG_X86_SPEEDSTEP_SMI) || \ |
144 | defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE) | 145 | defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE) |
@@ -1299,7 +1300,7 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat | |||
1299 | */ | 1300 | */ |
1300 | static void __init register_memory(void) | 1301 | static void __init register_memory(void) |
1301 | { | 1302 | { |
1302 | unsigned long gapstart, gapsize; | 1303 | unsigned long gapstart, gapsize, round; |
1303 | unsigned long long last; | 1304 | unsigned long long last; |
1304 | int i; | 1305 | int i; |
1305 | 1306 | ||
@@ -1344,14 +1345,14 @@ static void __init register_memory(void) | |||
1344 | } | 1345 | } |
1345 | 1346 | ||
1346 | /* | 1347 | /* |
1347 | * Start allocating dynamic PCI memory a bit into the gap, | 1348 | * See how much we want to round up: start off with |
1348 | * aligned up to the nearest megabyte. | 1349 | * rounding to the next 1MB area. |
1349 | * | ||
1350 | * Question: should we try to pad it up a bit (do something | ||
1351 | * like " + (gapsize >> 3)" in there too?). We now have the | ||
1352 | * technology. | ||
1353 | */ | 1350 | */ |
1354 | pci_mem_start = (gapstart + 0xfffff) & ~0xfffff; | 1351 | round = 0x100000; |
1352 | while ((gapsize >> 4) > round) | ||
1353 | round += round; | ||
1354 | /* Fun with two's complement */ | ||
1355 | pci_mem_start = (gapstart + round) & -round; | ||
1355 | 1356 | ||
1356 | printk("Allocating PCI resources starting at %08lx (gap: %08lx:%08lx)\n", | 1357 | printk("Allocating PCI resources starting at %08lx (gap: %08lx:%08lx)\n", |
1357 | pci_mem_start, gapstart, gapsize); | 1358 | pci_mem_start, gapstart, gapsize); |
diff --git a/arch/i386/kernel/sigframe.h b/arch/i386/kernel/sigframe.h index d21b14f5c25c..0b2221711dad 100644 --- a/arch/i386/kernel/sigframe.h +++ b/arch/i386/kernel/sigframe.h | |||
@@ -1,6 +1,6 @@ | |||
1 | struct sigframe | 1 | struct sigframe |
2 | { | 2 | { |
3 | char *pretcode; | 3 | char __user *pretcode; |
4 | int sig; | 4 | int sig; |
5 | struct sigcontext sc; | 5 | struct sigcontext sc; |
6 | struct _fpstate fpstate; | 6 | struct _fpstate fpstate; |
@@ -10,10 +10,10 @@ struct sigframe | |||
10 | 10 | ||
11 | struct rt_sigframe | 11 | struct rt_sigframe |
12 | { | 12 | { |
13 | char *pretcode; | 13 | char __user *pretcode; |
14 | int sig; | 14 | int sig; |
15 | struct siginfo *pinfo; | 15 | struct siginfo __user *pinfo; |
16 | void *puc; | 16 | void __user *puc; |
17 | struct siginfo info; | 17 | struct siginfo info; |
18 | struct ucontext uc; | 18 | struct ucontext uc; |
19 | struct _fpstate fpstate; | 19 | struct _fpstate fpstate; |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 5e4893d2b9f2..c70cd2a08304 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -1330,8 +1330,7 @@ void __cpu_die(unsigned int cpu) | |||
1330 | printk ("CPU %d is now offline\n", cpu); | 1330 | printk ("CPU %d is now offline\n", cpu); |
1331 | return; | 1331 | return; |
1332 | } | 1332 | } |
1333 | current->state = TASK_UNINTERRUPTIBLE; | 1333 | msleep(100); |
1334 | schedule_timeout(HZ/10); | ||
1335 | } | 1334 | } |
1336 | printk(KERN_ERR "CPU %u didn't die...\n", cpu); | 1335 | printk(KERN_ERR "CPU %u didn't die...\n", cpu); |
1337 | } | 1336 | } |
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index eefea7c55008..2883a4d4f01f 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c | |||
@@ -329,8 +329,7 @@ EXPORT_SYMBOL(get_cmos_time); | |||
329 | 329 | ||
330 | static void sync_cmos_clock(unsigned long dummy); | 330 | static void sync_cmos_clock(unsigned long dummy); |
331 | 331 | ||
332 | static struct timer_list sync_cmos_timer = | 332 | static DEFINE_TIMER(sync_cmos_timer, sync_cmos_clock, 0, 0); |
333 | TIMER_INITIALIZER(sync_cmos_clock, 0, 0); | ||
334 | 333 | ||
335 | static void sync_cmos_clock(unsigned long dummy) | 334 | static void sync_cmos_clock(unsigned long dummy) |
336 | { | 335 | { |
diff --git a/arch/i386/kernel/vsyscall-sigreturn.S b/arch/i386/kernel/vsyscall-sigreturn.S index 68afa50dd7cf..fadb5bc3c374 100644 --- a/arch/i386/kernel/vsyscall-sigreturn.S +++ b/arch/i386/kernel/vsyscall-sigreturn.S | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <asm/unistd.h> | 9 | #include <asm/unistd.h> |
10 | #include <asm/asm_offsets.h> | 10 | #include <asm/asm-offsets.h> |
11 | 11 | ||
12 | 12 | ||
13 | /* XXX | 13 | /* XXX |
diff --git a/arch/i386/kernel/vsyscall.lds.S b/arch/i386/kernel/vsyscall.lds.S index a7977707c8e5..98699ca6e52d 100644 --- a/arch/i386/kernel/vsyscall.lds.S +++ b/arch/i386/kernel/vsyscall.lds.S | |||
@@ -3,7 +3,7 @@ | |||
3 | * object prelinked to its virtual address, and with only one read-only | 3 | * object prelinked to its virtual address, and with only one read-only |
4 | * segment (that fits in one page). This script controls its layout. | 4 | * segment (that fits in one page). This script controls its layout. |
5 | */ | 5 | */ |
6 | #include <asm/asm_offsets.h> | 6 | #include <asm/asm-offsets.h> |
7 | 7 | ||
8 | SECTIONS | 8 | SECTIONS |
9 | { | 9 | { |