aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/Kconfig18
-rw-r--r--arch/i386/Makefile11
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k8.c4
-rw-r--r--arch/i386/kernel/traps.c57
-rw-r--r--arch/i386/kernel/vm86.c2
-rw-r--r--arch/i386/mm/init.c2
-rw-r--r--arch/i386/pci/fixup.c16
7 files changed, 72 insertions, 38 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index d5d0df7f04fc..cbde675bc95c 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -702,6 +702,15 @@ config PHYSICAL_START
702 702
703 Don't change this unless you know what you are doing. 703 Don't change this unless you know what you are doing.
704 704
705config HOTPLUG_CPU
706 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
707 depends on SMP && HOTPLUG && EXPERIMENTAL
708 ---help---
709 Say Y here to experiment with turning CPUs off and on. CPUs
710 can be controlled through /sys/devices/system/cpu.
711
712 Say N.
713
705endmenu 714endmenu
706 715
707 716
@@ -988,15 +997,6 @@ config SCx200
988 This support is also available as a module. If compiled as a 997 This support is also available as a module. If compiled as a
989 module, it will be called scx200. 998 module, it will be called scx200.
990 999
991config HOTPLUG_CPU
992 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
993 depends on SMP && HOTPLUG && EXPERIMENTAL
994 ---help---
995 Say Y here to experiment with turning CPUs off and on. CPUs
996 can be controlled through /sys/devices/system/cpu.
997
998 Say N.
999
1000source "drivers/pcmcia/Kconfig" 1000source "drivers/pcmcia/Kconfig"
1001 1001
1002source "drivers/pci/hotplug/Kconfig" 1002source "drivers/pci/hotplug/Kconfig"
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index d3c0409d201c..36bef6543ac1 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -37,14 +37,11 @@ CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
37# CPU-specific tuning. Anything which can be shared with UML should go here. 37# CPU-specific tuning. Anything which can be shared with UML should go here.
38include $(srctree)/arch/i386/Makefile.cpu 38include $(srctree)/arch/i386/Makefile.cpu
39 39
40# -mregparm=3 works ok on gcc-3.0 and later 40cflags-$(CONFIG_REGPARM) += -mregparm=3
41#
42cflags-$(CONFIG_REGPARM) += $(shell if [ $(call cc-version) -ge 0300 ] ; then \
43 echo "-mregparm=3"; fi ;)
44 41
45# Disable unit-at-a-time mode, it makes gcc use a lot more stack 42# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
46# due to the lack of sharing of stacklots. 43# a lot more stack due to the lack of sharing of stacklots:
47CFLAGS += $(call cc-option,-fno-unit-at-a-time) 44CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;)
48 45
49CFLAGS += $(cflags-y) 46CFLAGS += $(cflags-y)
50 47
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index 0fbbd4c1072e..e11a09207ec8 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -980,7 +980,7 @@ static int powernowk8_verify(struct cpufreq_policy *pol)
980} 980}
981 981
982/* per CPU init entry point to the driver */ 982/* per CPU init entry point to the driver */
983static int __init powernowk8_cpu_init(struct cpufreq_policy *pol) 983static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
984{ 984{
985 struct powernow_k8_data *data; 985 struct powernow_k8_data *data;
986 cpumask_t oldmask = CPU_MASK_ALL; 986 cpumask_t oldmask = CPU_MASK_ALL;
@@ -1141,7 +1141,7 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
1141}; 1141};
1142 1142
1143/* driver entry point for init */ 1143/* driver entry point for init */
1144static int __init powernowk8_init(void) 1144static int __cpuinit powernowk8_init(void)
1145{ 1145{
1146 unsigned int i, supported_cpus = 0; 1146 unsigned int i, supported_cpus = 0;
1147 1147
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index b9f0030a2ebb..0aaebf3e1cfa 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -112,33 +112,38 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
112 p < (void *)tinfo + THREAD_SIZE - 3; 112 p < (void *)tinfo + THREAD_SIZE - 3;
113} 113}
114 114
115static void print_addr_and_symbol(unsigned long addr, char *log_lvl)
116{
117 printk(log_lvl);
118 printk(" [<%08lx>] ", addr);
119 print_symbol("%s", addr);
120 printk("\n");
121}
122
115static inline unsigned long print_context_stack(struct thread_info *tinfo, 123static inline unsigned long print_context_stack(struct thread_info *tinfo,
116 unsigned long *stack, unsigned long ebp) 124 unsigned long *stack, unsigned long ebp,
125 char *log_lvl)
117{ 126{
118 unsigned long addr; 127 unsigned long addr;
119 128
120#ifdef CONFIG_FRAME_POINTER 129#ifdef CONFIG_FRAME_POINTER
121 while (valid_stack_ptr(tinfo, (void *)ebp)) { 130 while (valid_stack_ptr(tinfo, (void *)ebp)) {
122 addr = *(unsigned long *)(ebp + 4); 131 addr = *(unsigned long *)(ebp + 4);
123 printk(KERN_EMERG " [<%08lx>] ", addr); 132 print_addr_and_symbol(addr, log_lvl);
124 print_symbol("%s", addr);
125 printk("\n");
126 ebp = *(unsigned long *)ebp; 133 ebp = *(unsigned long *)ebp;
127 } 134 }
128#else 135#else
129 while (valid_stack_ptr(tinfo, stack)) { 136 while (valid_stack_ptr(tinfo, stack)) {
130 addr = *stack++; 137 addr = *stack++;
131 if (__kernel_text_address(addr)) { 138 if (__kernel_text_address(addr))
132 printk(KERN_EMERG " [<%08lx>]", addr); 139 print_addr_and_symbol(addr, log_lvl);
133 print_symbol(" %s", addr);
134 printk("\n");
135 }
136 } 140 }
137#endif 141#endif
138 return ebp; 142 return ebp;
139} 143}
140 144
141void show_trace(struct task_struct *task, unsigned long * stack) 145static void show_trace_log_lvl(struct task_struct *task,
146 unsigned long *stack, char *log_lvl)
142{ 147{
143 unsigned long ebp; 148 unsigned long ebp;
144 149
@@ -157,7 +162,7 @@ void show_trace(struct task_struct *task, unsigned long * stack)
157 struct thread_info *context; 162 struct thread_info *context;
158 context = (struct thread_info *) 163 context = (struct thread_info *)
159 ((unsigned long)stack & (~(THREAD_SIZE - 1))); 164 ((unsigned long)stack & (~(THREAD_SIZE - 1)));
160 ebp = print_context_stack(context, stack, ebp); 165 ebp = print_context_stack(context, stack, ebp, log_lvl);
161 stack = (unsigned long*)context->previous_esp; 166 stack = (unsigned long*)context->previous_esp;
162 if (!stack) 167 if (!stack)
163 break; 168 break;
@@ -165,7 +170,13 @@ void show_trace(struct task_struct *task, unsigned long * stack)
165 } 170 }
166} 171}
167 172
168void show_stack(struct task_struct *task, unsigned long *esp) 173void show_trace(struct task_struct *task, unsigned long * stack)
174{
175 show_trace_log_lvl(task, stack, "");
176}
177
178static void show_stack_log_lvl(struct task_struct *task, unsigned long *esp,
179 char *log_lvl)
169{ 180{
170 unsigned long *stack; 181 unsigned long *stack;
171 int i; 182 int i;
@@ -178,16 +189,26 @@ void show_stack(struct task_struct *task, unsigned long *esp)
178 } 189 }
179 190
180 stack = esp; 191 stack = esp;
181 printk(KERN_EMERG); 192 printk(log_lvl);
182 for(i = 0; i < kstack_depth_to_print; i++) { 193 for(i = 0; i < kstack_depth_to_print; i++) {
183 if (kstack_end(stack)) 194 if (kstack_end(stack))
184 break; 195 break;
185 if (i && ((i % 8) == 0)) 196 if (i && ((i % 8) == 0)) {
186 printk("\n" KERN_EMERG " "); 197 printk("\n");
198 printk(log_lvl);
199 printk(" ");
200 }
187 printk("%08lx ", *stack++); 201 printk("%08lx ", *stack++);
188 } 202 }
189 printk("\n" KERN_EMERG "Call Trace:\n"); 203 printk("\n");
190 show_trace(task, esp); 204 printk(log_lvl);
205 printk("Call Trace:\n");
206 show_trace_log_lvl(task, esp, log_lvl);
207}
208
209void show_stack(struct task_struct *task, unsigned long *esp)
210{
211 show_stack_log_lvl(task, esp, "");
191} 212}
192 213
193/* 214/*
@@ -238,7 +259,7 @@ void show_registers(struct pt_regs *regs)
238 u8 __user *eip; 259 u8 __user *eip;
239 260
240 printk("\n" KERN_EMERG "Stack: "); 261 printk("\n" KERN_EMERG "Stack: ");
241 show_stack(NULL, (unsigned long*)esp); 262 show_stack_log_lvl(NULL, (unsigned long *)esp, KERN_EMERG);
242 263
243 printk(KERN_EMERG "Code: "); 264 printk(KERN_EMERG "Code: ");
244 265
diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c
index 0c90ae54ddfa..f51c894a7da5 100644
--- a/arch/i386/kernel/vm86.c
+++ b/arch/i386/kernel/vm86.c
@@ -4,7 +4,7 @@
4 * Copyright (C) 1994 Linus Torvalds 4 * Copyright (C) 1994 Linus Torvalds
5 * 5 *
6 * 29 dec 2001 - Fixed oopses caused by unchecked access to the vm86 6 * 29 dec 2001 - Fixed oopses caused by unchecked access to the vm86
7 * stack - Manfred Spraul <manfreds@colorfullife.com> 7 * stack - Manfred Spraul <manfred@colorfullife.com>
8 * 8 *
9 * 22 mar 2002 - Manfred detected the stackfaults, but didn't handle 9 * 22 mar 2002 - Manfred detected the stackfaults, but didn't handle
10 * them correctly. Now the emulation will be in a 10 * them correctly. Now the emulation will be in a
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index 7df494b51a5b..2700f01994ba 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -268,7 +268,7 @@ static void __init permanent_kmaps_init(pgd_t *pgd_base)
268 pkmap_page_table = pte; 268 pkmap_page_table = pte;
269} 269}
270 270
271static void __devinit free_new_highpage(struct page *page) 271static void __meminit free_new_highpage(struct page *page)
272{ 272{
273 set_page_count(page, 1); 273 set_page_count(page, 1);
274 __free_page(page); 274 __free_page(page);
diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c
index 65f67070db64..83c3645ccc43 100644
--- a/arch/i386/pci/fixup.c
+++ b/arch/i386/pci/fixup.c
@@ -449,3 +449,19 @@ static void __devinit pci_post_fixup_toshiba_ohci1394(struct pci_dev *dev)
449} 449}
450DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_TI, 0x8032, 450DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_TI, 0x8032,
451 pci_post_fixup_toshiba_ohci1394); 451 pci_post_fixup_toshiba_ohci1394);
452
453
454/*
455 * Prevent the BIOS trapping accesses to the Cyrix CS5530A video device
456 * configuration space.
457 */
458static void __devinit pci_early_fixup_cyrix_5530(struct pci_dev *dev)
459{
460 u8 r;
461 /* clear 'F4 Video Configuration Trap' bit */
462 pci_read_config_byte(dev, 0x42, &r);
463 r &= 0xfd;
464 pci_write_config_byte(dev, 0x42, r);
465}
466DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY,
467 pci_early_fixup_cyrix_5530);