diff options
author | Len Brown <len.brown@intel.com> | 2006-12-20 02:53:13 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-20 02:53:13 -0500 |
commit | 9774f3384125912eb491ca77f77907324db3ed05 (patch) | |
tree | 0bdc7486e911dd9e955b41283ee19ac74521f7bd /arch/i386 | |
parent | 3be11c8f4f2fa194834c2e83540f34da442b8977 (diff) | |
parent | f238085415c56618e042252894f2fcc971add645 (diff) |
merge linus into test branch
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/defconfig | 2 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | 33 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/longhaul.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/entry.S | 32 | ||||
-rw-r--r-- | arch/i386/kernel/traps.c | 83 |
5 files changed, 11 insertions, 143 deletions
diff --git a/arch/i386/defconfig b/arch/i386/defconfig index 3265208e5899..e075ff05c46d 100644 --- a/arch/i386/defconfig +++ b/arch/i386/defconfig | |||
@@ -1493,8 +1493,6 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
1493 | # CONFIG_DEBUG_VM is not set | 1493 | # CONFIG_DEBUG_VM is not set |
1494 | # CONFIG_DEBUG_LIST is not set | 1494 | # CONFIG_DEBUG_LIST is not set |
1495 | # CONFIG_FRAME_POINTER is not set | 1495 | # CONFIG_FRAME_POINTER is not set |
1496 | CONFIG_UNWIND_INFO=y | ||
1497 | CONFIG_STACK_UNWIND=y | ||
1498 | # CONFIG_FORCED_INLINING is not set | 1496 | # CONFIG_FORCED_INLINING is not set |
1499 | # CONFIG_HEADERS_CHECK is not set | 1497 | # CONFIG_HEADERS_CHECK is not set |
1500 | # CONFIG_RCU_TORTURE_TEST is not set | 1498 | # CONFIG_RCU_TORTURE_TEST is not set |
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index 18f4715c655d..b735458c6e3a 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -126,27 +126,6 @@ static unsigned extract_freq(u32 val, struct acpi_cpufreq_data *data) | |||
126 | } | 126 | } |
127 | } | 127 | } |
128 | 128 | ||
129 | static void wrport(u16 port, u8 bit_width, u32 value) | ||
130 | { | ||
131 | if (bit_width <= 8) | ||
132 | outb(value, port); | ||
133 | else if (bit_width <= 16) | ||
134 | outw(value, port); | ||
135 | else if (bit_width <= 32) | ||
136 | outl(value, port); | ||
137 | } | ||
138 | |||
139 | static void rdport(u16 port, u8 bit_width, u32 * ret) | ||
140 | { | ||
141 | *ret = 0; | ||
142 | if (bit_width <= 8) | ||
143 | *ret = inb(port); | ||
144 | else if (bit_width <= 16) | ||
145 | *ret = inw(port); | ||
146 | else if (bit_width <= 32) | ||
147 | *ret = inl(port); | ||
148 | } | ||
149 | |||
150 | struct msr_addr { | 129 | struct msr_addr { |
151 | u32 reg; | 130 | u32 reg; |
152 | }; | 131 | }; |
@@ -177,7 +156,9 @@ static void do_drv_read(struct drv_cmd *cmd) | |||
177 | rdmsr(cmd->addr.msr.reg, cmd->val, h); | 156 | rdmsr(cmd->addr.msr.reg, cmd->val, h); |
178 | break; | 157 | break; |
179 | case SYSTEM_IO_CAPABLE: | 158 | case SYSTEM_IO_CAPABLE: |
180 | rdport(cmd->addr.io.port, cmd->addr.io.bit_width, &cmd->val); | 159 | acpi_os_read_port((acpi_io_address)cmd->addr.io.port, |
160 | &cmd->val, | ||
161 | (u32)cmd->addr.io.bit_width); | ||
181 | break; | 162 | break; |
182 | default: | 163 | default: |
183 | break; | 164 | break; |
@@ -193,7 +174,9 @@ static void do_drv_write(struct drv_cmd *cmd) | |||
193 | wrmsr(cmd->addr.msr.reg, cmd->val, h); | 174 | wrmsr(cmd->addr.msr.reg, cmd->val, h); |
194 | break; | 175 | break; |
195 | case SYSTEM_IO_CAPABLE: | 176 | case SYSTEM_IO_CAPABLE: |
196 | wrport(cmd->addr.io.port, cmd->addr.io.bit_width, cmd->val); | 177 | acpi_os_write_port((acpi_io_address)cmd->addr.io.port, |
178 | cmd->val, | ||
179 | (u32)cmd->addr.io.bit_width); | ||
197 | break; | 180 | break; |
198 | default: | 181 | default: |
199 | break; | 182 | break; |
@@ -699,14 +682,14 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
699 | if (result) | 682 | if (result) |
700 | goto err_freqfree; | 683 | goto err_freqfree; |
701 | 684 | ||
702 | switch (data->cpu_feature) { | 685 | switch (perf->control_register.space_id) { |
703 | case ACPI_ADR_SPACE_SYSTEM_IO: | 686 | case ACPI_ADR_SPACE_SYSTEM_IO: |
704 | /* Current speed is unknown and not detectable by IO port */ | 687 | /* Current speed is unknown and not detectable by IO port */ |
705 | policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu); | 688 | policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu); |
706 | break; | 689 | break; |
707 | case ACPI_ADR_SPACE_FIXED_HARDWARE: | 690 | case ACPI_ADR_SPACE_FIXED_HARDWARE: |
708 | acpi_cpufreq_driver.get = get_cur_freq_on_cpu; | 691 | acpi_cpufreq_driver.get = get_cur_freq_on_cpu; |
709 | get_cur_freq_on_cpu(cpu); | 692 | policy->cur = get_cur_freq_on_cpu(cpu); |
710 | break; | 693 | break; |
711 | default: | 694 | default: |
712 | break; | 695 | break; |
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index c548daad3476..6d9c97a690fd 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c | |||
@@ -787,8 +787,10 @@ static int __init longhaul_init(void) | |||
787 | switch (c->x86_model) { | 787 | switch (c->x86_model) { |
788 | case 6 ... 9: | 788 | case 6 ... 9: |
789 | return cpufreq_register_driver(&longhaul_driver); | 789 | return cpufreq_register_driver(&longhaul_driver); |
790 | case 10: | ||
791 | printk(KERN_ERR PFX "Use acpi-cpufreq driver for VIA C7\n"); | ||
790 | default: | 792 | default: |
791 | printk (KERN_INFO PFX "Unknown VIA CPU. Contact davej@codemonkey.org.uk\n"); | 793 | ;; |
792 | } | 794 | } |
793 | 795 | ||
794 | return -ENODEV; | 796 | return -ENODEV; |
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index de34b7fed3c1..06461b8b715d 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S | |||
@@ -979,38 +979,6 @@ ENTRY(spurious_interrupt_bug) | |||
979 | jmp error_code | 979 | jmp error_code |
980 | CFI_ENDPROC | 980 | CFI_ENDPROC |
981 | 981 | ||
982 | #ifdef CONFIG_STACK_UNWIND | ||
983 | ENTRY(arch_unwind_init_running) | ||
984 | CFI_STARTPROC | ||
985 | movl 4(%esp), %edx | ||
986 | movl (%esp), %ecx | ||
987 | leal 4(%esp), %eax | ||
988 | movl %ebx, PT_EBX(%edx) | ||
989 | xorl %ebx, %ebx | ||
990 | movl %ebx, PT_ECX(%edx) | ||
991 | movl %ebx, PT_EDX(%edx) | ||
992 | movl %esi, PT_ESI(%edx) | ||
993 | movl %edi, PT_EDI(%edx) | ||
994 | movl %ebp, PT_EBP(%edx) | ||
995 | movl %ebx, PT_EAX(%edx) | ||
996 | movl $__USER_DS, PT_DS(%edx) | ||
997 | movl $__USER_DS, PT_ES(%edx) | ||
998 | movl $0, PT_GS(%edx) | ||
999 | movl %ebx, PT_ORIG_EAX(%edx) | ||
1000 | movl %ecx, PT_EIP(%edx) | ||
1001 | movl 12(%esp), %ecx | ||
1002 | movl $__KERNEL_CS, PT_CS(%edx) | ||
1003 | movl %ebx, PT_EFLAGS(%edx) | ||
1004 | movl %eax, PT_OLDESP(%edx) | ||
1005 | movl 8(%esp), %eax | ||
1006 | movl %ecx, 8(%esp) | ||
1007 | movl PT_EBX(%edx), %ebx | ||
1008 | movl $__KERNEL_DS, PT_OLDSS(%edx) | ||
1009 | jmpl *%eax | ||
1010 | CFI_ENDPROC | ||
1011 | ENDPROC(arch_unwind_init_running) | ||
1012 | #endif | ||
1013 | |||
1014 | ENTRY(kernel_thread_helper) | 982 | ENTRY(kernel_thread_helper) |
1015 | pushl $0 # fake return address for unwinder | 983 | pushl $0 # fake return address for unwinder |
1016 | CFI_STARTPROC | 984 | CFI_STARTPROC |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 2b30dbf8d117..0efad8aeb41a 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -94,11 +94,6 @@ asmlinkage void spurious_interrupt_bug(void); | |||
94 | asmlinkage void machine_check(void); | 94 | asmlinkage void machine_check(void); |
95 | 95 | ||
96 | int kstack_depth_to_print = 24; | 96 | int kstack_depth_to_print = 24; |
97 | #ifdef CONFIG_STACK_UNWIND | ||
98 | static int call_trace = 1; | ||
99 | #else | ||
100 | #define call_trace (-1) | ||
101 | #endif | ||
102 | ATOMIC_NOTIFIER_HEAD(i386die_chain); | 97 | ATOMIC_NOTIFIER_HEAD(i386die_chain); |
103 | 98 | ||
104 | int register_die_notifier(struct notifier_block *nb) | 99 | int register_die_notifier(struct notifier_block *nb) |
@@ -152,33 +147,6 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo, | |||
152 | return ebp; | 147 | return ebp; |
153 | } | 148 | } |
154 | 149 | ||
155 | struct ops_and_data { | ||
156 | struct stacktrace_ops *ops; | ||
157 | void *data; | ||
158 | }; | ||
159 | |||
160 | static asmlinkage int | ||
161 | dump_trace_unwind(struct unwind_frame_info *info, void *data) | ||
162 | { | ||
163 | struct ops_and_data *oad = (struct ops_and_data *)data; | ||
164 | int n = 0; | ||
165 | unsigned long sp = UNW_SP(info); | ||
166 | |||
167 | if (arch_unw_user_mode(info)) | ||
168 | return -1; | ||
169 | while (unwind(info) == 0 && UNW_PC(info)) { | ||
170 | n++; | ||
171 | oad->ops->address(oad->data, UNW_PC(info)); | ||
172 | if (arch_unw_user_mode(info)) | ||
173 | break; | ||
174 | if ((sp & ~(PAGE_SIZE - 1)) == (UNW_SP(info) & ~(PAGE_SIZE - 1)) | ||
175 | && sp > UNW_SP(info)) | ||
176 | break; | ||
177 | sp = UNW_SP(info); | ||
178 | } | ||
179 | return n; | ||
180 | } | ||
181 | |||
182 | #define MSG(msg) ops->warning(data, msg) | 150 | #define MSG(msg) ops->warning(data, msg) |
183 | 151 | ||
184 | void dump_trace(struct task_struct *task, struct pt_regs *regs, | 152 | void dump_trace(struct task_struct *task, struct pt_regs *regs, |
@@ -190,41 +158,6 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
190 | if (!task) | 158 | if (!task) |
191 | task = current; | 159 | task = current; |
192 | 160 | ||
193 | if (call_trace >= 0) { | ||
194 | int unw_ret = 0; | ||
195 | struct unwind_frame_info info; | ||
196 | struct ops_and_data oad = { .ops = ops, .data = data }; | ||
197 | |||
198 | if (regs) { | ||
199 | if (unwind_init_frame_info(&info, task, regs) == 0) | ||
200 | unw_ret = dump_trace_unwind(&info, &oad); | ||
201 | } else if (task == current) | ||
202 | unw_ret = unwind_init_running(&info, dump_trace_unwind, | ||
203 | &oad); | ||
204 | else { | ||
205 | if (unwind_init_blocked(&info, task) == 0) | ||
206 | unw_ret = dump_trace_unwind(&info, &oad); | ||
207 | } | ||
208 | if (unw_ret > 0) { | ||
209 | if (call_trace == 1 && !arch_unw_user_mode(&info)) { | ||
210 | ops->warning_symbol(data, | ||
211 | "DWARF2 unwinder stuck at %s", | ||
212 | UNW_PC(&info)); | ||
213 | if (UNW_SP(&info) >= PAGE_OFFSET) { | ||
214 | MSG("Leftover inexact backtrace:"); | ||
215 | stack = (void *)UNW_SP(&info); | ||
216 | if (!stack) | ||
217 | return; | ||
218 | ebp = UNW_FP(&info); | ||
219 | } else | ||
220 | MSG("Full inexact backtrace again:"); | ||
221 | } else if (call_trace >= 1) | ||
222 | return; | ||
223 | else | ||
224 | MSG("Full inexact backtrace again:"); | ||
225 | } else | ||
226 | MSG("Inexact backtrace:"); | ||
227 | } | ||
228 | if (!stack) { | 161 | if (!stack) { |
229 | unsigned long dummy; | 162 | unsigned long dummy; |
230 | stack = &dummy; | 163 | stack = &dummy; |
@@ -1258,19 +1191,3 @@ static int __init kstack_setup(char *s) | |||
1258 | return 1; | 1191 | return 1; |
1259 | } | 1192 | } |
1260 | __setup("kstack=", kstack_setup); | 1193 | __setup("kstack=", kstack_setup); |
1261 | |||
1262 | #ifdef CONFIG_STACK_UNWIND | ||
1263 | static int __init call_trace_setup(char *s) | ||
1264 | { | ||
1265 | if (strcmp(s, "old") == 0) | ||
1266 | call_trace = -1; | ||
1267 | else if (strcmp(s, "both") == 0) | ||
1268 | call_trace = 0; | ||
1269 | else if (strcmp(s, "newfallback") == 0) | ||
1270 | call_trace = 1; | ||
1271 | else if (strcmp(s, "new") == 2) | ||
1272 | call_trace = 2; | ||
1273 | return 1; | ||
1274 | } | ||
1275 | __setup("call_trace=", call_trace_setup); | ||
1276 | #endif | ||