aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-09-24 00:25:02 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-24 00:25:02 -0400
commitc1d9728ecc5b560465df3c0c0d3b3825c2710b40 (patch)
treed0abb5c923a7a3eca2d4b2c3e1964bf484870909 /arch/i386
parent165415f700b0c77fa1f8db6198f48582639adf78 (diff)
parent87e807b6c461bbd449496a4c3ab78ab164a4ba97 (diff)
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/Kconfig5
-rw-r--r--arch/i386/kernel/acpi/earlyquirk.c10
-rw-r--r--arch/i386/kernel/reboot.c7
-rw-r--r--arch/i386/kernel/setup.c4
-rw-r--r--arch/i386/kernel/smpboot.c2
-rw-r--r--arch/i386/kernel/traps.c5
-rw-r--r--arch/i386/lib/Makefile1
-rw-r--r--arch/i386/lib/dec_and_lock.c42
8 files changed, 8 insertions, 68 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index b22f003eaa6d..d2703cda61ea 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -908,11 +908,6 @@ config IRQBALANCE
908 The default yes will allow the kernel to do irq load balancing. 908 The default yes will allow the kernel to do irq load balancing.
909 Saying no will keep the kernel from doing irq load balancing. 909 Saying no will keep the kernel from doing irq load balancing.
910 910
911config HAVE_DEC_LOCK
912 bool
913 depends on (SMP || PREEMPT) && X86_CMPXCHG
914 default y
915
916# turning this on wastes a bunch of space. 911# turning this on wastes a bunch of space.
917# Summit needs it only when NUMA is on 912# Summit needs it only when NUMA is on
918config BOOT_IOREMAP 913config BOOT_IOREMAP
diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c
index 1ae2aeeda18b..f1b9d2a46dab 100644
--- a/arch/i386/kernel/acpi/earlyquirk.c
+++ b/arch/i386/kernel/acpi/earlyquirk.c
@@ -7,7 +7,6 @@
7#include <linux/pci.h> 7#include <linux/pci.h>
8#include <asm/pci-direct.h> 8#include <asm/pci-direct.h>
9#include <asm/acpi.h> 9#include <asm/acpi.h>
10#include <asm/apic.h>
11 10
12static int __init check_bridge(int vendor, int device) 11static int __init check_bridge(int vendor, int device)
13{ 12{
@@ -16,15 +15,6 @@ static int __init check_bridge(int vendor, int device)
16 if (vendor == PCI_VENDOR_ID_NVIDIA) { 15 if (vendor == PCI_VENDOR_ID_NVIDIA) {
17 acpi_skip_timer_override = 1; 16 acpi_skip_timer_override = 1;
18 } 17 }
19#ifdef CONFIG_X86_LOCAL_APIC
20 /*
21 * ATI IXP chipsets get double timer interrupts.
22 * For now just do this for all ATI chipsets.
23 * FIXME: this needs to be checked for the non ACPI case too.
24 */
25 if (vendor == PCI_VENDOR_ID_ATI)
26 disable_timer_pin_1 = 1;
27#endif
28 return 0; 18 return 0;
29} 19}
30 20
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c
index 1cbb9c0f4704..350ea6680f63 100644
--- a/arch/i386/kernel/reboot.c
+++ b/arch/i386/kernel/reboot.c
@@ -11,6 +11,7 @@
11#include <linux/mc146818rtc.h> 11#include <linux/mc146818rtc.h>
12#include <linux/efi.h> 12#include <linux/efi.h>
13#include <linux/dmi.h> 13#include <linux/dmi.h>
14#include <linux/ctype.h>
14#include <asm/uaccess.h> 15#include <asm/uaccess.h>
15#include <asm/apic.h> 16#include <asm/apic.h>
16#include <asm/desc.h> 17#include <asm/desc.h>
@@ -28,8 +29,6 @@ static int reboot_thru_bios;
28 29
29#ifdef CONFIG_SMP 30#ifdef CONFIG_SMP
30static int reboot_cpu = -1; 31static int reboot_cpu = -1;
31/* shamelessly grabbed from lib/vsprintf.c for readability */
32#define is_digit(c) ((c) >= '0' && (c) <= '9')
33#endif 32#endif
34static int __init reboot_setup(char *str) 33static int __init reboot_setup(char *str)
35{ 34{
@@ -49,9 +48,9 @@ static int __init reboot_setup(char *str)
49 break; 48 break;
50#ifdef CONFIG_SMP 49#ifdef CONFIG_SMP
51 case 's': /* "smp" reboot by executing reset on BSP or other CPU*/ 50 case 's': /* "smp" reboot by executing reset on BSP or other CPU*/
52 if (is_digit(*(str+1))) { 51 if (isdigit(*(str+1))) {
53 reboot_cpu = (int) (*(str+1) - '0'); 52 reboot_cpu = (int) (*(str+1) - '0');
54 if (is_digit(*(str+2))) 53 if (isdigit(*(str+2)))
55 reboot_cpu = reboot_cpu*10 + (int)(*(str+2) - '0'); 54 reboot_cpu = reboot_cpu*10 + (int)(*(str+2) - '0');
56 } 55 }
57 /* we will leave sorting out the final value 56 /* we will leave sorting out the final value
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index dc39ca6a7eca..9b8c8a19824d 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -848,9 +848,7 @@ static void __init parse_cmdline_early (char ** cmdline_p)
848#ifdef CONFIG_X86_IO_APIC 848#ifdef CONFIG_X86_IO_APIC
849 else if (!memcmp(from, "acpi_skip_timer_override", 24)) 849 else if (!memcmp(from, "acpi_skip_timer_override", 24))
850 acpi_skip_timer_override = 1; 850 acpi_skip_timer_override = 1;
851#endif
852 851
853#ifdef CONFIG_X86_LOCAL_APIC
854 if (!memcmp(from, "disable_timer_pin_1", 19)) 852 if (!memcmp(from, "disable_timer_pin_1", 19))
855 disable_timer_pin_1 = 1; 853 disable_timer_pin_1 = 1;
856 if (!memcmp(from, "enable_timer_pin_1", 18)) 854 if (!memcmp(from, "enable_timer_pin_1", 18))
@@ -859,7 +857,7 @@ static void __init parse_cmdline_early (char ** cmdline_p)
859 /* disable IO-APIC */ 857 /* disable IO-APIC */
860 else if (!memcmp(from, "noapic", 6)) 858 else if (!memcmp(from, "noapic", 6))
861 disable_ioapic_setup(); 859 disable_ioapic_setup();
862#endif /* CONFIG_X86_LOCAL_APIC */ 860#endif /* CONFIG_X86_IO_APIC */
863#endif /* CONFIG_ACPI */ 861#endif /* CONFIG_ACPI */
864 862
865#ifdef CONFIG_X86_LOCAL_APIC 863#ifdef CONFIG_X86_LOCAL_APIC
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index c70cd2a08304..5f0a95d76a4f 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -202,7 +202,7 @@ static void __devinit smp_store_cpu_info(int id)
202 goto valid_k7; 202 goto valid_k7;
203 203
204 /* If we get here, it's not a certified SMP capable AMD system. */ 204 /* If we get here, it's not a certified SMP capable AMD system. */
205 tainted |= TAINT_UNSAFE_SMP; 205 add_taint(TAINT_UNSAFE_SMP);
206 } 206 }
207 207
208valid_k7: 208valid_k7:
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 09a58cb6daa7..431a551e46ea 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -807,8 +807,9 @@ void math_error(void __user *eip)
807 cwd = get_fpu_cwd(task); 807 cwd = get_fpu_cwd(task);
808 swd = get_fpu_swd(task); 808 swd = get_fpu_swd(task);
809 switch (swd & ~cwd & 0x3f) { 809 switch (swd & ~cwd & 0x3f) {
810 case 0x000: 810 case 0x000: /* No unmasked exception */
811 default: 811 return;
812 default: /* Multiple exceptions */
812 break; 813 break;
813 case 0x001: /* Invalid Op */ 814 case 0x001: /* Invalid Op */
814 /* 815 /*
diff --git a/arch/i386/lib/Makefile b/arch/i386/lib/Makefile
index 7b1932d20f96..914933e9ec3d 100644
--- a/arch/i386/lib/Makefile
+++ b/arch/i386/lib/Makefile
@@ -7,4 +7,3 @@ lib-y = checksum.o delay.o usercopy.o getuser.o putuser.o memcpy.o strstr.o \
7 bitops.o 7 bitops.o
8 8
9lib-$(CONFIG_X86_USE_3DNOW) += mmx.o 9lib-$(CONFIG_X86_USE_3DNOW) += mmx.o
10lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
diff --git a/arch/i386/lib/dec_and_lock.c b/arch/i386/lib/dec_and_lock.c
deleted file mode 100644
index 8b81b2524fa6..000000000000
--- a/arch/i386/lib/dec_and_lock.c
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * x86 version of "atomic_dec_and_lock()" using
3 * the atomic "cmpxchg" instruction.
4 *
5 * (For CPU's lacking cmpxchg, we use the slow
6 * generic version, and this one never even gets
7 * compiled).
8 */
9
10#include <linux/spinlock.h>
11#include <linux/module.h>
12#include <asm/atomic.h>
13
14int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock)
15{
16 int counter;
17 int newcount;
18
19repeat:
20 counter = atomic_read(atomic);
21 newcount = counter-1;
22
23 if (!newcount)
24 goto slow_path;
25
26 asm volatile("lock; cmpxchgl %1,%2"
27 :"=a" (newcount)
28 :"r" (newcount), "m" (atomic->counter), "0" (counter));
29
30 /* If the above failed, "eax" will have changed */
31 if (newcount != counter)
32 goto repeat;
33 return 0;
34
35slow_path:
36 spin_lock(lock);
37 if (atomic_dec_and_test(atomic))
38 return 1;
39 spin_unlock(lock);
40 return 0;
41}
42EXPORT_SYMBOL(_atomic_dec_and_lock);