aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/Kconfig3
-rw-r--r--arch/i386/Kconfig.debug3
-rw-r--r--arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c7
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k8.c43
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k8.h32
-rw-r--r--arch/i386/kernel/cpu/intel_cacheinfo.c20
-rw-r--r--arch/i386/kernel/cpu/transmeta.c6
-rw-r--r--arch/i386/kernel/machine_kexec.c22
-rw-r--r--arch/i386/kernel/mpparse.c10
-rw-r--r--arch/i386/kernel/numaq.c9
-rw-r--r--arch/i386/kernel/process.c2
-rw-r--r--arch/i386/kernel/syscall_table.S2
-rw-r--r--arch/i386/mach-visws/reboot.c11
-rw-r--r--arch/i386/mach-visws/setup.c2
-rw-r--r--arch/i386/mach-voyager/voyager_basic.c13
-rw-r--r--arch/i386/mm/discontig.c11
-rw-r--r--arch/i386/pci/acpi.c1
-rw-r--r--arch/i386/pci/common.c6
-rw-r--r--arch/i386/pci/irq.c8
-rw-r--r--arch/i386/pci/pci.h1
-rw-r--r--arch/i386/pci/visws.c2
21 files changed, 159 insertions, 55 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index a801d9d48606..619d843ba231 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -454,8 +454,9 @@ config HPET_TIMER
454 Choose N to continue using the legacy 8254 timer. 454 Choose N to continue using the legacy 8254 timer.
455 455
456config HPET_EMULATE_RTC 456config HPET_EMULATE_RTC
457 bool "Provide RTC interrupt" 457 bool
458 depends on HPET_TIMER && RTC=y 458 depends on HPET_TIMER && RTC=y
459 default y
459 460
460config SMP 461config SMP
461 bool "Symmetric multi-processing support" 462 bool "Symmetric multi-processing support"
diff --git a/arch/i386/Kconfig.debug b/arch/i386/Kconfig.debug
index bfb2064f7104..5228c40a6fb2 100644
--- a/arch/i386/Kconfig.debug
+++ b/arch/i386/Kconfig.debug
@@ -18,6 +18,9 @@ config EARLY_PRINTK
18config DEBUG_STACKOVERFLOW 18config DEBUG_STACKOVERFLOW
19 bool "Check for stack overflows" 19 bool "Check for stack overflows"
20 depends on DEBUG_KERNEL 20 depends on DEBUG_KERNEL
21 help
22 This option will cause messages to be printed if free stack space
23 drops below a certain limit.
21 24
22config KPROBES 25config KPROBES
23 bool "Kprobes" 26 bool "Kprobes"
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 963e17aa205d..60a9e54dd20e 100644
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -442,6 +442,13 @@ acpi_cpufreq_cpu_init (
442 (u32) data->acpi_data.states[i].transition_latency); 442 (u32) data->acpi_data.states[i].transition_latency);
443 443
444 cpufreq_frequency_table_get_attr(data->freq_table, policy->cpu); 444 cpufreq_frequency_table_get_attr(data->freq_table, policy->cpu);
445
446 /*
447 * the first call to ->target() should result in us actually
448 * writing something to the appropriate registers.
449 */
450 data->resume = 1;
451
445 return (result); 452 return (result);
446 453
447 err_freqfree: 454 err_freqfree:
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index 10cc096c0ade..ab6e0611303d 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * (c) 2003, 2004 Advanced Micro Devices, Inc. 2 * (c) 2003, 2004, 2005 Advanced Micro Devices, Inc.
3 * Your use of this code is subject to the terms and conditions of the 3 * Your use of this code is subject to the terms and conditions of the
4 * GNU general public license version 2. See "COPYING" or 4 * GNU general public license version 2. See "COPYING" or
5 * http://www.gnu.org/licenses/gpl.html 5 * http://www.gnu.org/licenses/gpl.html
@@ -44,7 +44,7 @@
44 44
45#define PFX "powernow-k8: " 45#define PFX "powernow-k8: "
46#define BFX PFX "BIOS error: " 46#define BFX PFX "BIOS error: "
47#define VERSION "version 1.40.2" 47#define VERSION "version 1.50.3"
48#include "powernow-k8.h" 48#include "powernow-k8.h"
49 49
50/* serialize freq changes */ 50/* serialize freq changes */
@@ -110,14 +110,13 @@ static int query_current_values_with_pending_wait(struct powernow_k8_data *data)
110 u32 lo, hi; 110 u32 lo, hi;
111 u32 i = 0; 111 u32 i = 0;
112 112
113 lo = MSR_S_LO_CHANGE_PENDING; 113 do {
114 while (lo & MSR_S_LO_CHANGE_PENDING) {
115 if (i++ > 0x1000000) { 114 if (i++ > 0x1000000) {
116 printk(KERN_ERR PFX "detected change pending stuck\n"); 115 printk(KERN_ERR PFX "detected change pending stuck\n");
117 return 1; 116 return 1;
118 } 117 }
119 rdmsr(MSR_FIDVID_STATUS, lo, hi); 118 rdmsr(MSR_FIDVID_STATUS, lo, hi);
120 } 119 } while (lo & MSR_S_LO_CHANGE_PENDING);
121 120
122 data->currvid = hi & MSR_S_HI_CURRENT_VID; 121 data->currvid = hi & MSR_S_HI_CURRENT_VID;
123 data->currfid = lo & MSR_S_LO_CURRENT_FID; 122 data->currfid = lo & MSR_S_LO_CURRENT_FID;
@@ -232,7 +231,7 @@ static int write_new_vid(struct powernow_k8_data *data, u32 vid)
232/* 231/*
233 * Reduce the vid by the max of step or reqvid. 232 * Reduce the vid by the max of step or reqvid.
234 * Decreasing vid codes represent increasing voltages: 233 * Decreasing vid codes represent increasing voltages:
235 * vid of 0 is 1.550V, vid of 0x1e is 0.800V, vid of 0x1f is off. 234 * vid of 0 is 1.550V, vid of 0x1e is 0.800V, vid of VID_OFF is off.
236 */ 235 */
237static int decrease_vid_code_by_step(struct powernow_k8_data *data, u32 reqvid, u32 step) 236static int decrease_vid_code_by_step(struct powernow_k8_data *data, u32 reqvid, u32 step)
238{ 237{
@@ -467,7 +466,7 @@ static int check_supported_cpu(unsigned int cpu)
467 eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE); 466 eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE);
468 if (((eax & CPUID_USE_XFAM_XMOD) != CPUID_USE_XFAM_XMOD) || 467 if (((eax & CPUID_USE_XFAM_XMOD) != CPUID_USE_XFAM_XMOD) ||
469 ((eax & CPUID_XFAM) != CPUID_XFAM_K8) || 468 ((eax & CPUID_XFAM) != CPUID_XFAM_K8) ||
470 ((eax & CPUID_XMOD) > CPUID_XMOD_REV_E)) { 469 ((eax & CPUID_XMOD) > CPUID_XMOD_REV_F)) {
471 printk(KERN_INFO PFX "Processor cpuid %x not supported\n", eax); 470 printk(KERN_INFO PFX "Processor cpuid %x not supported\n", eax);
472 goto out; 471 goto out;
473 } 472 }
@@ -696,6 +695,7 @@ static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned
696 695
697 data->irt = (data->acpi_data.states[index].control >> IRT_SHIFT) & IRT_MASK; 696 data->irt = (data->acpi_data.states[index].control >> IRT_SHIFT) & IRT_MASK;
698 data->rvo = (data->acpi_data.states[index].control >> RVO_SHIFT) & RVO_MASK; 697 data->rvo = (data->acpi_data.states[index].control >> RVO_SHIFT) & RVO_MASK;
698 data->exttype = (data->acpi_data.states[index].control >> EXT_TYPE_SHIFT) & EXT_TYPE_MASK;
699 data->plllock = (data->acpi_data.states[index].control >> PLL_L_SHIFT) & PLL_L_MASK; 699 data->plllock = (data->acpi_data.states[index].control >> PLL_L_SHIFT) & PLL_L_MASK;
700 data->vidmvs = 1 << ((data->acpi_data.states[index].control >> MVS_SHIFT) & MVS_MASK); 700 data->vidmvs = 1 << ((data->acpi_data.states[index].control >> MVS_SHIFT) & MVS_MASK);
701 data->vstable = (data->acpi_data.states[index].control >> VST_SHIFT) & VST_MASK; 701 data->vstable = (data->acpi_data.states[index].control >> VST_SHIFT) & VST_MASK;
@@ -735,8 +735,16 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
735 } 735 }
736 736
737 for (i = 0; i < data->acpi_data.state_count; i++) { 737 for (i = 0; i < data->acpi_data.state_count; i++) {
738 u32 fid = data->acpi_data.states[i].control & FID_MASK; 738 u32 fid;
739 u32 vid = (data->acpi_data.states[i].control >> VID_SHIFT) & VID_MASK; 739 u32 vid;
740
741 if (data->exttype) {
742 fid = data->acpi_data.states[i].status & FID_MASK;
743 vid = (data->acpi_data.states[i].status >> VID_SHIFT) & VID_MASK;
744 } else {
745 fid = data->acpi_data.states[i].control & FID_MASK;
746 vid = (data->acpi_data.states[i].control >> VID_SHIFT) & VID_MASK;
747 }
740 748
741 dprintk(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid); 749 dprintk(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid);
742 750
@@ -753,7 +761,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
753 } 761 }
754 762
755 /* verify voltage is OK - BIOSs are using "off" to indicate invalid */ 763 /* verify voltage is OK - BIOSs are using "off" to indicate invalid */
756 if (vid == 0x1f) { 764 if (vid == VID_OFF) {
757 dprintk("invalid vid %u, ignoring\n", vid); 765 dprintk("invalid vid %u, ignoring\n", vid);
758 powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID; 766 powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID;
759 continue; 767 continue;
@@ -930,15 +938,6 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
930 938
931 down(&fidvid_sem); 939 down(&fidvid_sem);
932 940
933 for_each_cpu_mask(i, cpu_core_map[pol->cpu]) {
934 /* make sure the sibling is initialized */
935 if (!powernow_data[i]) {
936 ret = 0;
937 up(&fidvid_sem);
938 goto err_out;
939 }
940 }
941
942 powernow_k8_acpi_pst_values(data, newstate); 941 powernow_k8_acpi_pst_values(data, newstate);
943 942
944 if (transition_frequency(data, newstate)) { 943 if (transition_frequency(data, newstate)) {
@@ -978,7 +977,7 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol)
978{ 977{
979 struct powernow_k8_data *data; 978 struct powernow_k8_data *data;
980 cpumask_t oldmask = CPU_MASK_ALL; 979 cpumask_t oldmask = CPU_MASK_ALL;
981 int rc; 980 int rc, i;
982 981
983 if (!check_supported_cpu(pol->cpu)) 982 if (!check_supported_cpu(pol->cpu))
984 return -ENODEV; 983 return -ENODEV;
@@ -1064,7 +1063,9 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol)
1064 printk("cpu_init done, current fid 0x%x, vid 0x%x\n", 1063 printk("cpu_init done, current fid 0x%x, vid 0x%x\n",
1065 data->currfid, data->currvid); 1064 data->currfid, data->currvid);
1066 1065
1067 powernow_data[pol->cpu] = data; 1066 for_each_cpu_mask(i, cpu_core_map[pol->cpu]) {
1067 powernow_data[i] = data;
1068 }
1068 1069
1069 return 0; 1070 return 0;
1070 1071
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h
index 9ed5bf221cb7..b1e85bb36396 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * (c) 2003, 2004 Advanced Micro Devices, Inc. 2 * (c) 2003, 2004, 2005 Advanced Micro Devices, Inc.
3 * Your use of this code is subject to the terms and conditions of the 3 * Your use of this code is subject to the terms and conditions of the
4 * GNU general public license version 2. See "COPYING" or 4 * GNU general public license version 2. See "COPYING" or
5 * http://www.gnu.org/licenses/gpl.html 5 * http://www.gnu.org/licenses/gpl.html
@@ -19,6 +19,7 @@ struct powernow_k8_data {
19 u32 vidmvs; /* usable value calculated from mvs */ 19 u32 vidmvs; /* usable value calculated from mvs */
20 u32 vstable; /* voltage stabilization time, units 20 us */ 20 u32 vstable; /* voltage stabilization time, units 20 us */
21 u32 plllock; /* pll lock time, units 1 us */ 21 u32 plllock; /* pll lock time, units 1 us */
22 u32 exttype; /* extended interface = 1 */
22 23
23 /* keep track of the current fid / vid */ 24 /* keep track of the current fid / vid */
24 u32 currvid, currfid; 25 u32 currvid, currfid;
@@ -41,7 +42,7 @@ struct powernow_k8_data {
41#define CPUID_XFAM 0x0ff00000 /* extended family */ 42#define CPUID_XFAM 0x0ff00000 /* extended family */
42#define CPUID_XFAM_K8 0 43#define CPUID_XFAM_K8 0
43#define CPUID_XMOD 0x000f0000 /* extended model */ 44#define CPUID_XMOD 0x000f0000 /* extended model */
44#define CPUID_XMOD_REV_E 0x00020000 45#define CPUID_XMOD_REV_F 0x00040000
45#define CPUID_USE_XFAM_XMOD 0x00000f00 46#define CPUID_USE_XFAM_XMOD 0x00000f00
46#define CPUID_GET_MAX_CAPABILITIES 0x80000000 47#define CPUID_GET_MAX_CAPABILITIES 0x80000000
47#define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007 48#define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007
@@ -57,25 +58,26 @@ struct powernow_k8_data {
57 58
58/* Field definitions within the FID VID Low Control MSR : */ 59/* Field definitions within the FID VID Low Control MSR : */
59#define MSR_C_LO_INIT_FID_VID 0x00010000 60#define MSR_C_LO_INIT_FID_VID 0x00010000
60#define MSR_C_LO_NEW_VID 0x00001f00 61#define MSR_C_LO_NEW_VID 0x00003f00
61#define MSR_C_LO_NEW_FID 0x0000002f 62#define MSR_C_LO_NEW_FID 0x0000003f
62#define MSR_C_LO_VID_SHIFT 8 63#define MSR_C_LO_VID_SHIFT 8
63 64
64/* Field definitions within the FID VID High Control MSR : */ 65/* Field definitions within the FID VID High Control MSR : */
65#define MSR_C_HI_STP_GNT_TO 0x000fffff 66#define MSR_C_HI_STP_GNT_TO 0x000fffff
66 67
67/* Field definitions within the FID VID Low Status MSR : */ 68/* Field definitions within the FID VID Low Status MSR : */
68#define MSR_S_LO_CHANGE_PENDING 0x80000000 /* cleared when completed */ 69#define MSR_S_LO_CHANGE_PENDING 0x80000000 /* cleared when completed */
69#define MSR_S_LO_MAX_RAMP_VID 0x1f000000 70#define MSR_S_LO_MAX_RAMP_VID 0x3f000000
70#define MSR_S_LO_MAX_FID 0x003f0000 71#define MSR_S_LO_MAX_FID 0x003f0000
71#define MSR_S_LO_START_FID 0x00003f00 72#define MSR_S_LO_START_FID 0x00003f00
72#define MSR_S_LO_CURRENT_FID 0x0000003f 73#define MSR_S_LO_CURRENT_FID 0x0000003f
73 74
74/* Field definitions within the FID VID High Status MSR : */ 75/* Field definitions within the FID VID High Status MSR : */
75#define MSR_S_HI_MAX_WORKING_VID 0x001f0000 76#define MSR_S_HI_MIN_WORKING_VID 0x3f000000
76#define MSR_S_HI_START_VID 0x00001f00 77#define MSR_S_HI_MAX_WORKING_VID 0x003f0000
77#define MSR_S_HI_CURRENT_VID 0x0000001f 78#define MSR_S_HI_START_VID 0x00003f00
78#define MSR_C_HI_STP_GNT_BENIGN 0x00000001 79#define MSR_S_HI_CURRENT_VID 0x0000003f
80#define MSR_C_HI_STP_GNT_BENIGN 0x00000001
79 81
80/* 82/*
81 * There are restrictions frequencies have to follow: 83 * There are restrictions frequencies have to follow:
@@ -99,13 +101,15 @@ struct powernow_k8_data {
99#define MIN_FREQ_RESOLUTION 200 /* fids jump by 2 matching freq jumps by 200 */ 101#define MIN_FREQ_RESOLUTION 200 /* fids jump by 2 matching freq jumps by 200 */
100 102
101#define MAX_FID 0x2a /* Spec only gives FID values as far as 5 GHz */ 103#define MAX_FID 0x2a /* Spec only gives FID values as far as 5 GHz */
102#define LEAST_VID 0x1e /* Lowest (numerically highest) useful vid value */ 104#define LEAST_VID 0x3e /* Lowest (numerically highest) useful vid value */
103 105
104#define MIN_FREQ 800 /* Min and max freqs, per spec */ 106#define MIN_FREQ 800 /* Min and max freqs, per spec */
105#define MAX_FREQ 5000 107#define MAX_FREQ 5000
106 108
107#define INVALID_FID_MASK 0xffffffc1 /* not a valid fid if these bits are set */ 109#define INVALID_FID_MASK 0xffffffc1 /* not a valid fid if these bits are set */
108#define INVALID_VID_MASK 0xffffffe0 /* not a valid vid if these bits are set */ 110#define INVALID_VID_MASK 0xffffffc0 /* not a valid vid if these bits are set */
111
112#define VID_OFF 0x3f
109 113
110#define STOP_GRANT_5NS 1 /* min poss memory access latency for voltage change */ 114#define STOP_GRANT_5NS 1 /* min poss memory access latency for voltage change */
111 115
@@ -121,12 +125,14 @@ struct powernow_k8_data {
121 125
122#define IRT_SHIFT 30 126#define IRT_SHIFT 30
123#define RVO_SHIFT 28 127#define RVO_SHIFT 28
128#define EXT_TYPE_SHIFT 27
124#define PLL_L_SHIFT 20 129#define PLL_L_SHIFT 20
125#define MVS_SHIFT 18 130#define MVS_SHIFT 18
126#define VST_SHIFT 11 131#define VST_SHIFT 11
127#define VID_SHIFT 6 132#define VID_SHIFT 6
128#define IRT_MASK 3 133#define IRT_MASK 3
129#define RVO_MASK 3 134#define RVO_MASK 3
135#define EXT_TYPE_MASK 1
130#define PLL_L_MASK 0x7f 136#define PLL_L_MASK 0x7f
131#define MVS_MASK 3 137#define MVS_MASK 3
132#define VST_MASK 0x7f 138#define VST_MASK 0x7f
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c
index 1d768b263269..6c55b50cf048 100644
--- a/arch/i386/kernel/cpu/intel_cacheinfo.c
+++ b/arch/i386/kernel/cpu/intel_cacheinfo.c
@@ -128,7 +128,7 @@ static int __devinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_le
128 cpuid_count(4, index, &eax, &ebx, &ecx, &edx); 128 cpuid_count(4, index, &eax, &ebx, &ecx, &edx);
129 cache_eax.full = eax; 129 cache_eax.full = eax;
130 if (cache_eax.split.type == CACHE_TYPE_NULL) 130 if (cache_eax.split.type == CACHE_TYPE_NULL)
131 return -1; 131 return -EIO; /* better error ? */
132 132
133 this_leaf->eax.full = eax; 133 this_leaf->eax.full = eax;
134 this_leaf->ebx.full = ebx; 134 this_leaf->ebx.full = ebx;
@@ -334,6 +334,7 @@ static int __devinit detect_cache_attributes(unsigned int cpu)
334 struct _cpuid4_info *this_leaf; 334 struct _cpuid4_info *this_leaf;
335 unsigned long j; 335 unsigned long j;
336 int retval; 336 int retval;
337 cpumask_t oldmask;
337 338
338 if (num_cache_leaves == 0) 339 if (num_cache_leaves == 0)
339 return -ENOENT; 340 return -ENOENT;
@@ -345,19 +346,26 @@ static int __devinit detect_cache_attributes(unsigned int cpu)
345 memset(cpuid4_info[cpu], 0, 346 memset(cpuid4_info[cpu], 0,
346 sizeof(struct _cpuid4_info) * num_cache_leaves); 347 sizeof(struct _cpuid4_info) * num_cache_leaves);
347 348
349 oldmask = current->cpus_allowed;
350 retval = set_cpus_allowed(current, cpumask_of_cpu(cpu));
351 if (retval)
352 goto out;
353
348 /* Do cpuid and store the results */ 354 /* Do cpuid and store the results */
355 retval = 0;
349 for (j = 0; j < num_cache_leaves; j++) { 356 for (j = 0; j < num_cache_leaves; j++) {
350 this_leaf = CPUID4_INFO_IDX(cpu, j); 357 this_leaf = CPUID4_INFO_IDX(cpu, j);
351 retval = cpuid4_cache_lookup(j, this_leaf); 358 retval = cpuid4_cache_lookup(j, this_leaf);
352 if (unlikely(retval < 0)) 359 if (unlikely(retval < 0))
353 goto err_out; 360 break;
354 cache_shared_cpu_map_setup(cpu, j); 361 cache_shared_cpu_map_setup(cpu, j);
355 } 362 }
356 return 0; 363 set_cpus_allowed(current, oldmask);
357 364
358err_out: 365out:
359 free_cache_attributes(cpu); 366 if (retval)
360 return -ENOMEM; 367 free_cache_attributes(cpu);
368 return retval;
361} 369}
362 370
363#ifdef CONFIG_SYSFS 371#ifdef CONFIG_SYSFS
diff --git a/arch/i386/kernel/cpu/transmeta.c b/arch/i386/kernel/cpu/transmeta.c
index f57e5ee94943..fc426380366b 100644
--- a/arch/i386/kernel/cpu/transmeta.c
+++ b/arch/i386/kernel/cpu/transmeta.c
@@ -76,6 +76,12 @@ static void __init init_transmeta(struct cpuinfo_x86 *c)
76#define USER686 (X86_FEATURE_TSC|X86_FEATURE_CX8|X86_FEATURE_CMOV) 76#define USER686 (X86_FEATURE_TSC|X86_FEATURE_CX8|X86_FEATURE_CMOV)
77 if ( c->x86 == 5 && (c->x86_capability[0] & USER686) == USER686 ) 77 if ( c->x86 == 5 && (c->x86_capability[0] & USER686) == USER686 )
78 c->x86 = 6; 78 c->x86 = 6;
79
80#ifdef CONFIG_SYSCTL
81 /* randomize_va_space slows us down enormously;
82 it probably triggers retranslation of x86->native bytecode */
83 randomize_va_space = 0;
84#endif
79} 85}
80 86
81static void transmeta_identify(struct cpuinfo_x86 * c) 87static void transmeta_identify(struct cpuinfo_x86 * c)
diff --git a/arch/i386/kernel/machine_kexec.c b/arch/i386/kernel/machine_kexec.c
index 52ed18d8b511..cb699a2aa1f8 100644
--- a/arch/i386/kernel/machine_kexec.c
+++ b/arch/i386/kernel/machine_kexec.c
@@ -16,6 +16,7 @@
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/apic.h> 17#include <asm/apic.h>
18#include <asm/cpufeature.h> 18#include <asm/cpufeature.h>
19#include <asm/desc.h>
19 20
20static inline unsigned long read_cr3(void) 21static inline unsigned long read_cr3(void)
21{ 22{
@@ -90,33 +91,32 @@ static void identity_map_page(unsigned long address)
90} 91}
91#endif 92#endif
92 93
93
94static void set_idt(void *newidt, __u16 limit) 94static void set_idt(void *newidt, __u16 limit)
95{ 95{
96 unsigned char curidt[6]; 96 struct Xgt_desc_struct curidt;
97 97
98 /* ia32 supports unaliged loads & stores */ 98 /* ia32 supports unaliged loads & stores */
99 (*(__u16 *)(curidt)) = limit; 99 curidt.size = limit;
100 (*(__u32 *)(curidt +2)) = (unsigned long)(newidt); 100 curidt.address = (unsigned long)newidt;
101 101
102 __asm__ __volatile__ ( 102 __asm__ __volatile__ (
103 "lidt %0\n" 103 "lidtl %0\n"
104 : "=m" (curidt) 104 : : "m" (curidt)
105 ); 105 );
106}; 106};
107 107
108 108
109static void set_gdt(void *newgdt, __u16 limit) 109static void set_gdt(void *newgdt, __u16 limit)
110{ 110{
111 unsigned char curgdt[6]; 111 struct Xgt_desc_struct curgdt;
112 112
113 /* ia32 supports unaligned loads & stores */ 113 /* ia32 supports unaligned loads & stores */
114 (*(__u16 *)(curgdt)) = limit; 114 curgdt.size = limit;
115 (*(__u32 *)(curgdt +2)) = (unsigned long)(newgdt); 115 curgdt.address = (unsigned long)newgdt;
116 116
117 __asm__ __volatile__ ( 117 __asm__ __volatile__ (
118 "lgdt %0\n" 118 "lgdtl %0\n"
119 : "=m" (curgdt) 119 : : "m" (curgdt)
120 ); 120 );
121}; 121};
122 122
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
index af917f609c7d..ce838abb27d8 100644
--- a/arch/i386/kernel/mpparse.c
+++ b/arch/i386/kernel/mpparse.c
@@ -1116,7 +1116,15 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
1116 */ 1116 */
1117 int irq = gsi; 1117 int irq = gsi;
1118 if (gsi < MAX_GSI_NUM) { 1118 if (gsi < MAX_GSI_NUM) {
1119 gsi = pci_irq++; 1119 if (gsi > 15)
1120 gsi = pci_irq++;
1121#ifdef CONFIG_ACPI_BUS
1122 /*
1123 * Don't assign IRQ used by ACPI SCI
1124 */
1125 if (gsi == acpi_fadt.sci_int)
1126 gsi = pci_irq++;
1127#endif
1120 gsi_to_irq[irq] = gsi; 1128 gsi_to_irq[irq] = gsi;
1121 } else { 1129 } else {
1122 printk(KERN_ERR "GSI %u is too high\n", gsi); 1130 printk(KERN_ERR "GSI %u is too high\n", gsi);
diff --git a/arch/i386/kernel/numaq.c b/arch/i386/kernel/numaq.c
index e51edf0a6564..5f5b075f860a 100644
--- a/arch/i386/kernel/numaq.c
+++ b/arch/i386/kernel/numaq.c
@@ -31,6 +31,7 @@
31#include <linux/nodemask.h> 31#include <linux/nodemask.h>
32#include <asm/numaq.h> 32#include <asm/numaq.h>
33#include <asm/topology.h> 33#include <asm/topology.h>
34#include <asm/processor.h>
34 35
35#define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT)) 36#define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT))
36 37
@@ -77,3 +78,11 @@ int __init get_memcfg_numaq(void)
77 smp_dump_qct(); 78 smp_dump_qct();
78 return 1; 79 return 1;
79} 80}
81
82static int __init numaq_dsc_disable(void)
83{
84 printk(KERN_DEBUG "NUMAQ: disabling TSC\n");
85 tsc_disable = 1;
86 return 0;
87}
88core_initcall(numaq_dsc_disable);
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index d9492058aaf3..e3f362e8af5b 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -917,6 +917,8 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *u_info)
917 if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX) 917 if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
918 return -EINVAL; 918 return -EINVAL;
919 919
920 memset(&info, 0, sizeof(info));
921
920 desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN; 922 desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
921 923
922 info.entry_number = idx; 924 info.entry_number = idx;
diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S
index 468500a7e894..9b21a31d4f4e 100644
--- a/arch/i386/kernel/syscall_table.S
+++ b/arch/i386/kernel/syscall_table.S
@@ -251,7 +251,7 @@ ENTRY(sys_call_table)
251 .long sys_io_submit 251 .long sys_io_submit
252 .long sys_io_cancel 252 .long sys_io_cancel
253 .long sys_fadvise64 /* 250 */ 253 .long sys_fadvise64 /* 250 */
254 .long sys_set_zone_reclaim 254 .long sys_ni_syscall
255 .long sys_exit_group 255 .long sys_exit_group
256 .long sys_lookup_dcookie 256 .long sys_lookup_dcookie
257 .long sys_epoll_create 257 .long sys_epoll_create
diff --git a/arch/i386/mach-visws/reboot.c b/arch/i386/mach-visws/reboot.c
index 9e9296676f93..5d73e042ed0a 100644
--- a/arch/i386/mach-visws/reboot.c
+++ b/arch/i386/mach-visws/reboot.c
@@ -9,12 +9,15 @@
9void (*pm_power_off)(void); 9void (*pm_power_off)(void);
10EXPORT_SYMBOL(pm_power_off); 10EXPORT_SYMBOL(pm_power_off);
11 11
12void machine_restart(char * __unused) 12void machine_shutdown(void)
13{ 13{
14#ifdef CONFIG_SMP 14#ifdef CONFIG_SMP
15 smp_send_stop(); 15 smp_send_stop();
16#endif 16#endif
17}
17 18
19void machine_emergency_restart(void)
20{
18 /* 21 /*
19 * Visual Workstations restart after this 22 * Visual Workstations restart after this
20 * register is poked on the PIIX4 23 * register is poked on the PIIX4
@@ -22,6 +25,12 @@ void machine_restart(char * __unused)
22 outb(PIIX4_RESET_VAL, PIIX4_RESET_PORT); 25 outb(PIIX4_RESET_VAL, PIIX4_RESET_PORT);
23} 26}
24 27
28void machine_restart(char * __unused)
29{
30 machine_shutdown();
31 machine_emergency_restart();
32}
33
25void machine_power_off(void) 34void machine_power_off(void)
26{ 35{
27 unsigned short pm_status; 36 unsigned short pm_status;
diff --git a/arch/i386/mach-visws/setup.c b/arch/i386/mach-visws/setup.c
index 9f6d2d9b1be7..26ada6fc0d77 100644
--- a/arch/i386/mach-visws/setup.c
+++ b/arch/i386/mach-visws/setup.c
@@ -14,6 +14,8 @@
14#include "cobalt.h" 14#include "cobalt.h"
15#include "piix4.h" 15#include "piix4.h"
16 16
17int no_broadcast;
18
17char visws_board_type = -1; 19char visws_board_type = -1;
18char visws_board_rev = -1; 20char visws_board_rev = -1;
19 21
diff --git a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c
index b3eda46e0fe9..c6384061328a 100644
--- a/arch/i386/mach-voyager/voyager_basic.c
+++ b/arch/i386/mach-voyager/voyager_basic.c
@@ -252,6 +252,12 @@ kb_wait(void)
252} 252}
253 253
254void 254void
255machine_shutdown(void)
256{
257 /* Architecture specific shutdown needed before a kexec */
258}
259
260void
255machine_restart(char *cmd) 261machine_restart(char *cmd)
256{ 262{
257 printk("Voyager Warm Restart\n"); 263 printk("Voyager Warm Restart\n");
@@ -279,6 +285,13 @@ machine_restart(char *cmd)
279} 285}
280 286
281void 287void
288machine_emergency_restart(void)
289{
290 /*for now, just hook this to a warm restart */
291 machine_restart(NULL);
292}
293
294void
282mca_nmi_hook(void) 295mca_nmi_hook(void)
283{ 296{
284 __u8 dumpval __attribute__((unused)) = inb(0xf823); 297 __u8 dumpval __attribute__((unused)) = inb(0xf823);
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c
index b358f0702a44..6711ce3f6916 100644
--- a/arch/i386/mm/discontig.c
+++ b/arch/i386/mm/discontig.c
@@ -262,6 +262,17 @@ static unsigned long calculate_numa_remap_pages(void)
262 reserve_pages += size; 262 reserve_pages += size;
263 printk("Shrinking node %d from %ld pages to %ld pages\n", 263 printk("Shrinking node %d from %ld pages to %ld pages\n",
264 nid, node_end_pfn[nid], node_end_pfn[nid] - size); 264 nid, node_end_pfn[nid], node_end_pfn[nid] - size);
265
266 if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) {
267 /*
268 * Align node_end_pfn[] and node_remap_start_pfn[] to
269 * pmd boundary. remap_numa_kva will barf otherwise.
270 */
271 printk("Shrinking node %d further by %ld pages for proper alignment\n",
272 nid, node_end_pfn[nid] & (PTRS_PER_PTE-1));
273 size += node_end_pfn[nid] & (PTRS_PER_PTE-1);
274 }
275
265 node_end_pfn[nid] -= size; 276 node_end_pfn[nid] -= size;
266 node_remap_start_pfn[nid] = node_end_pfn[nid]; 277 node_remap_start_pfn[nid] = node_end_pfn[nid];
267 } 278 }
diff --git a/arch/i386/pci/acpi.c b/arch/i386/pci/acpi.c
index 2db65ec45dc3..42913f43feb0 100644
--- a/arch/i386/pci/acpi.c
+++ b/arch/i386/pci/acpi.c
@@ -30,6 +30,7 @@ static int __init pci_acpi_init(void)
30 acpi_irq_penalty_init(); 30 acpi_irq_penalty_init();
31 pcibios_scanned++; 31 pcibios_scanned++;
32 pcibios_enable_irq = acpi_pci_irq_enable; 32 pcibios_enable_irq = acpi_pci_irq_enable;
33 pcibios_disable_irq = acpi_pci_irq_disable;
33 34
34 if (pci_routeirq) { 35 if (pci_routeirq) {
35 /* 36 /*
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c
index 70bcd53451f6..ade5bc57c34c 100644
--- a/arch/i386/pci/common.c
+++ b/arch/i386/pci/common.c
@@ -254,3 +254,9 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
254 254
255 return pcibios_enable_irq(dev); 255 return pcibios_enable_irq(dev);
256} 256}
257
258void pcibios_disable_device (struct pci_dev *dev)
259{
260 if (pcibios_disable_irq)
261 pcibios_disable_irq(dev);
262}
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
index 766b104ac1a1..86348b68fda1 100644
--- a/arch/i386/pci/irq.c
+++ b/arch/i386/pci/irq.c
@@ -56,6 +56,7 @@ struct irq_router_handler {
56}; 56};
57 57
58int (*pcibios_enable_irq)(struct pci_dev *dev) = NULL; 58int (*pcibios_enable_irq)(struct pci_dev *dev) = NULL;
59void (*pcibios_disable_irq)(struct pci_dev *dev) = NULL;
59 60
60/* 61/*
61 * Check passed address for the PCI IRQ Routing Table signature 62 * Check passed address for the PCI IRQ Routing Table signature
@@ -550,6 +551,13 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route
550static __init int via_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) 551static __init int via_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
551{ 552{
552 /* FIXME: We should move some of the quirk fixup stuff here */ 553 /* FIXME: We should move some of the quirk fixup stuff here */
554
555 if (router->device == PCI_DEVICE_ID_VIA_82C686 &&
556 device == PCI_DEVICE_ID_VIA_82C586_0) {
557 /* Asus k7m bios wrongly reports 82C686A as 586-compatible */
558 device = PCI_DEVICE_ID_VIA_82C686;
559 }
560
553 switch(device) 561 switch(device)
554 { 562 {
555 case PCI_DEVICE_ID_VIA_82C586_0: 563 case PCI_DEVICE_ID_VIA_82C586_0:
diff --git a/arch/i386/pci/pci.h b/arch/i386/pci/pci.h
index a80f0f55ff51..127d53ad16be 100644
--- a/arch/i386/pci/pci.h
+++ b/arch/i386/pci/pci.h
@@ -73,3 +73,4 @@ extern int pcibios_scanned;
73extern spinlock_t pci_config_lock; 73extern spinlock_t pci_config_lock;
74 74
75extern int (*pcibios_enable_irq)(struct pci_dev *dev); 75extern int (*pcibios_enable_irq)(struct pci_dev *dev);
76extern void (*pcibios_disable_irq)(struct pci_dev *dev);
diff --git a/arch/i386/pci/visws.c b/arch/i386/pci/visws.c
index 314c933b6b8e..6c17433fdf7d 100644
--- a/arch/i386/pci/visws.c
+++ b/arch/i386/pci/visws.c
@@ -18,8 +18,10 @@
18extern struct pci_raw_ops pci_direct_conf1; 18extern struct pci_raw_ops pci_direct_conf1;
19 19
20static int pci_visws_enable_irq(struct pci_dev *dev) { return 0; } 20static int pci_visws_enable_irq(struct pci_dev *dev) { return 0; }
21static void pci_visws_disable_irq(struct pci_dev *dev) { }
21 22
22int (*pcibios_enable_irq)(struct pci_dev *dev) = &pci_visws_enable_irq; 23int (*pcibios_enable_irq)(struct pci_dev *dev) = &pci_visws_enable_irq;
24void (*pcibios_disable_irq)(struct pci_dev *dev) = &pci_visws_disable_irq;
23 25
24void __init pcibios_penalize_isa_irq(int irq, int active) {} 26void __init pcibios_penalize_isa_irq(int irq, int active) {}
25 27