diff options
Diffstat (limited to 'arch/i386')
| -rw-r--r-- | arch/i386/Kconfig.debug | 9 | ||||
| -rw-r--r-- | arch/i386/kernel/acpi/boot.c | 5 | ||||
| -rw-r--r-- | arch/i386/kernel/apm.c | 2 | ||||
| -rw-r--r-- | arch/i386/kernel/cpu/amd.c | 2 | ||||
| -rw-r--r-- | arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 10 | ||||
| -rw-r--r-- | arch/i386/kernel/cpuid.c | 2 | ||||
| -rw-r--r-- | arch/i386/kernel/kprobes.c | 18 | ||||
| -rw-r--r-- | arch/i386/kernel/msr.c | 2 | ||||
| -rw-r--r-- | arch/i386/mach-voyager/voyager_cat.c | 1 | 
9 files changed, 32 insertions, 19 deletions
| diff --git a/arch/i386/Kconfig.debug b/arch/i386/Kconfig.debug index 6e97df6979e8..c92191b1fb67 100644 --- a/arch/i386/Kconfig.debug +++ b/arch/i386/Kconfig.debug | |||
| @@ -81,4 +81,13 @@ config X86_MPPARSE | |||
| 81 | depends on X86_LOCAL_APIC && !X86_VISWS | 81 | depends on X86_LOCAL_APIC && !X86_VISWS | 
| 82 | default y | 82 | default y | 
| 83 | 83 | ||
| 84 | config DOUBLEFAULT | ||
| 85 | default y | ||
| 86 | bool "Enable doublefault exception handler" if EMBEDDED | ||
| 87 | help | ||
| 88 | This option allows trapping of rare doublefault exceptions that | ||
| 89 | would otherwise cause a system to silently reboot. Disabling this | ||
| 90 | option saves about 4k and might cause you much additional grey | ||
| 91 | hair. | ||
| 92 | |||
| 84 | endmenu | 93 | endmenu | 
| diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 030a0007a4e0..049a25583793 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
| @@ -168,7 +168,7 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) | |||
| 168 | unsigned long i; | 168 | unsigned long i; | 
| 169 | int config_size; | 169 | int config_size; | 
| 170 | 170 | ||
| 171 | if (!phys_addr || !size || !cpu_has_apic) | 171 | if (!phys_addr || !size) | 
| 172 | return -EINVAL; | 172 | return -EINVAL; | 
| 173 | 173 | ||
| 174 | mcfg = (struct acpi_table_mcfg *)__acpi_map_table(phys_addr, size); | 174 | mcfg = (struct acpi_table_mcfg *)__acpi_map_table(phys_addr, size); | 
| @@ -1102,6 +1102,9 @@ int __init acpi_boot_table_init(void) | |||
| 1102 | dmi_check_system(acpi_dmi_table); | 1102 | dmi_check_system(acpi_dmi_table); | 
| 1103 | #endif | 1103 | #endif | 
| 1104 | 1104 | ||
| 1105 | if (!cpu_has_apic) | ||
| 1106 | return -ENODEV; | ||
| 1107 | |||
| 1105 | /* | 1108 | /* | 
| 1106 | * If acpi_disabled, bail out | 1109 | * If acpi_disabled, bail out | 
| 1107 | * One exception: acpi=ht continues far enough to enumerate LAPICs | 1110 | * One exception: acpi=ht continues far enough to enumerate LAPICs | 
| diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index da30a374dd4e..df0e1745f189 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c | |||
| @@ -1079,7 +1079,7 @@ static int apm_console_blank(int blank) | |||
| 1079 | break; | 1079 | break; | 
| 1080 | } | 1080 | } | 
| 1081 | 1081 | ||
| 1082 | if (error == APM_NOT_ENGAGED && state != APM_STATE_READY) { | 1082 | if (error == APM_NOT_ENGAGED) { | 
| 1083 | static int tried; | 1083 | static int tried; | 
| 1084 | int eng_error; | 1084 | int eng_error; | 
| 1085 | if (tried++ == 0) { | 1085 | if (tried++ == 0) { | 
| diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index ff2b2154ac1b..786d1a57048b 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c | |||
| @@ -207,6 +207,8 @@ static void __init init_amd(struct cpuinfo_x86 *c) | |||
| 207 | set_bit(X86_FEATURE_K7, c->x86_capability); | 207 | set_bit(X86_FEATURE_K7, c->x86_capability); | 
| 208 | break; | 208 | break; | 
| 209 | } | 209 | } | 
| 210 | if (c->x86 >= 6) | ||
| 211 | set_bit(X86_FEATURE_FXSAVE_LEAK, c->x86_capability); | ||
| 210 | 212 | ||
| 211 | display_cacheinfo(c); | 213 | display_cacheinfo(c); | 
| 212 | 214 | ||
| diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 7c0e160a2145..71fffa174425 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c | |||
| @@ -905,14 +905,17 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi | |||
| 905 | { | 905 | { | 
| 906 | cpumask_t oldmask = CPU_MASK_ALL; | 906 | cpumask_t oldmask = CPU_MASK_ALL; | 
| 907 | struct powernow_k8_data *data = powernow_data[pol->cpu]; | 907 | struct powernow_k8_data *data = powernow_data[pol->cpu]; | 
| 908 | u32 checkfid = data->currfid; | 908 | u32 checkfid; | 
| 909 | u32 checkvid = data->currvid; | 909 | u32 checkvid; | 
| 910 | unsigned int newstate; | 910 | unsigned int newstate; | 
| 911 | int ret = -EIO; | 911 | int ret = -EIO; | 
| 912 | 912 | ||
| 913 | if (!data) | 913 | if (!data) | 
| 914 | return -EINVAL; | 914 | return -EINVAL; | 
| 915 | 915 | ||
| 916 | checkfid = data->currfid; | ||
| 917 | checkvid = data->currvid; | ||
| 918 | |||
| 916 | /* only run on specific CPU from here on */ | 919 | /* only run on specific CPU from here on */ | 
| 917 | oldmask = current->cpus_allowed; | 920 | oldmask = current->cpus_allowed; | 
| 918 | set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); | 921 | set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); | 
| @@ -1109,9 +1112,6 @@ static unsigned int powernowk8_get (unsigned int cpu) | |||
| 1109 | if (!data) | 1112 | if (!data) | 
| 1110 | return -EINVAL; | 1113 | return -EINVAL; | 
| 1111 | 1114 | ||
| 1112 | if (!data) | ||
| 1113 | return -EINVAL; | ||
| 1114 | |||
| 1115 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 1115 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 
| 1116 | if (smp_processor_id() != cpu) { | 1116 | if (smp_processor_id() != cpu) { | 
| 1117 | printk(KERN_ERR PFX "limiting to CPU %d failed in powernowk8_get\n", cpu); | 1117 | printk(KERN_ERR PFX "limiting to CPU %d failed in powernowk8_get\n", cpu); | 
| diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c index 006141d1c12a..1d9a4abcdfc7 100644 --- a/arch/i386/kernel/cpuid.c +++ b/arch/i386/kernel/cpuid.c | |||
| @@ -168,7 +168,7 @@ static int cpuid_class_device_create(int i) | |||
| 168 | return err; | 168 | return err; | 
| 169 | } | 169 | } | 
| 170 | 170 | ||
| 171 | static int __devinit cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | 171 | static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | 
| 172 | { | 172 | { | 
| 173 | unsigned int cpu = (unsigned long)hcpu; | 173 | unsigned int cpu = (unsigned long)hcpu; | 
| 174 | 174 | ||
| diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index f19768789e8a..043f5292e70a 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c | |||
| @@ -43,7 +43,7 @@ DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; | |||
| 43 | DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | 43 | DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | 
| 44 | 44 | ||
| 45 | /* insert a jmp code */ | 45 | /* insert a jmp code */ | 
| 46 | static inline void set_jmp_op(void *from, void *to) | 46 | static __always_inline void set_jmp_op(void *from, void *to) | 
| 47 | { | 47 | { | 
| 48 | struct __arch_jmp_op { | 48 | struct __arch_jmp_op { | 
| 49 | char op; | 49 | char op; | 
| @@ -57,7 +57,7 @@ static inline void set_jmp_op(void *from, void *to) | |||
| 57 | /* | 57 | /* | 
| 58 | * returns non-zero if opcodes can be boosted. | 58 | * returns non-zero if opcodes can be boosted. | 
| 59 | */ | 59 | */ | 
| 60 | static inline int can_boost(kprobe_opcode_t opcode) | 60 | static __always_inline int can_boost(kprobe_opcode_t opcode) | 
| 61 | { | 61 | { | 
| 62 | switch (opcode & 0xf0 ) { | 62 | switch (opcode & 0xf0 ) { | 
| 63 | case 0x70: | 63 | case 0x70: | 
| @@ -88,7 +88,7 @@ static inline int can_boost(kprobe_opcode_t opcode) | |||
| 88 | /* | 88 | /* | 
| 89 | * returns non-zero if opcode modifies the interrupt flag. | 89 | * returns non-zero if opcode modifies the interrupt flag. | 
| 90 | */ | 90 | */ | 
| 91 | static inline int is_IF_modifier(kprobe_opcode_t opcode) | 91 | static int __kprobes is_IF_modifier(kprobe_opcode_t opcode) | 
| 92 | { | 92 | { | 
| 93 | switch (opcode) { | 93 | switch (opcode) { | 
| 94 | case 0xfa: /* cli */ | 94 | case 0xfa: /* cli */ | 
| @@ -138,7 +138,7 @@ void __kprobes arch_remove_kprobe(struct kprobe *p) | |||
| 138 | mutex_unlock(&kprobe_mutex); | 138 | mutex_unlock(&kprobe_mutex); | 
| 139 | } | 139 | } | 
| 140 | 140 | ||
| 141 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) | 141 | static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb) | 
| 142 | { | 142 | { | 
| 143 | kcb->prev_kprobe.kp = kprobe_running(); | 143 | kcb->prev_kprobe.kp = kprobe_running(); | 
| 144 | kcb->prev_kprobe.status = kcb->kprobe_status; | 144 | kcb->prev_kprobe.status = kcb->kprobe_status; | 
| @@ -146,7 +146,7 @@ static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) | |||
| 146 | kcb->prev_kprobe.saved_eflags = kcb->kprobe_saved_eflags; | 146 | kcb->prev_kprobe.saved_eflags = kcb->kprobe_saved_eflags; | 
| 147 | } | 147 | } | 
| 148 | 148 | ||
| 149 | static inline void restore_previous_kprobe(struct kprobe_ctlblk *kcb) | 149 | static void __kprobes restore_previous_kprobe(struct kprobe_ctlblk *kcb) | 
| 150 | { | 150 | { | 
| 151 | __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp; | 151 | __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp; | 
| 152 | kcb->kprobe_status = kcb->prev_kprobe.status; | 152 | kcb->kprobe_status = kcb->prev_kprobe.status; | 
| @@ -154,7 +154,7 @@ static inline void restore_previous_kprobe(struct kprobe_ctlblk *kcb) | |||
| 154 | kcb->kprobe_saved_eflags = kcb->prev_kprobe.saved_eflags; | 154 | kcb->kprobe_saved_eflags = kcb->prev_kprobe.saved_eflags; | 
| 155 | } | 155 | } | 
| 156 | 156 | ||
| 157 | static inline void set_current_kprobe(struct kprobe *p, struct pt_regs *regs, | 157 | static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs, | 
| 158 | struct kprobe_ctlblk *kcb) | 158 | struct kprobe_ctlblk *kcb) | 
| 159 | { | 159 | { | 
| 160 | __get_cpu_var(current_kprobe) = p; | 160 | __get_cpu_var(current_kprobe) = p; | 
| @@ -164,7 +164,7 @@ static inline void set_current_kprobe(struct kprobe *p, struct pt_regs *regs, | |||
| 164 | kcb->kprobe_saved_eflags &= ~IF_MASK; | 164 | kcb->kprobe_saved_eflags &= ~IF_MASK; | 
| 165 | } | 165 | } | 
| 166 | 166 | ||
| 167 | static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | 167 | static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | 
| 168 | { | 168 | { | 
| 169 | regs->eflags |= TF_MASK; | 169 | regs->eflags |= TF_MASK; | 
| 170 | regs->eflags &= ~IF_MASK; | 170 | regs->eflags &= ~IF_MASK; | 
| @@ -507,7 +507,7 @@ no_change: | |||
| 507 | * Interrupts are disabled on entry as trap1 is an interrupt gate and they | 507 | * Interrupts are disabled on entry as trap1 is an interrupt gate and they | 
| 508 | * remain disabled thoroughout this function. | 508 | * remain disabled thoroughout this function. | 
| 509 | */ | 509 | */ | 
| 510 | static inline int post_kprobe_handler(struct pt_regs *regs) | 510 | static int __kprobes post_kprobe_handler(struct pt_regs *regs) | 
| 511 | { | 511 | { | 
| 512 | struct kprobe *cur = kprobe_running(); | 512 | struct kprobe *cur = kprobe_running(); | 
| 513 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 513 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 
| @@ -543,7 +543,7 @@ out: | |||
| 543 | return 1; | 543 | return 1; | 
| 544 | } | 544 | } | 
| 545 | 545 | ||
| 546 | static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr) | 546 | static int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) | 
| 547 | { | 547 | { | 
| 548 | struct kprobe *cur = kprobe_running(); | 548 | struct kprobe *cur = kprobe_running(); | 
| 549 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 549 | struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); | 
| diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index 1d0a55e68760..7a328230e540 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c | |||
| @@ -251,7 +251,7 @@ static int msr_class_device_create(int i) | |||
| 251 | return err; | 251 | return err; | 
| 252 | } | 252 | } | 
| 253 | 253 | ||
| 254 | static int __devinit msr_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | 254 | static int msr_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | 
| 255 | { | 255 | { | 
| 256 | unsigned int cpu = (unsigned long)hcpu; | 256 | unsigned int cpu = (unsigned long)hcpu; | 
| 257 | 257 | ||
| diff --git a/arch/i386/mach-voyager/voyager_cat.c b/arch/i386/mach-voyager/voyager_cat.c index 3039539de51e..10d21df14531 100644 --- a/arch/i386/mach-voyager/voyager_cat.c +++ b/arch/i386/mach-voyager/voyager_cat.c | |||
| @@ -120,7 +120,6 @@ static struct resource qic_res = { | |||
| 120 | * It writes num_bits of the data buffer in msg starting at start_bit. | 120 | * It writes num_bits of the data buffer in msg starting at start_bit. | 
| 121 | * Note: This function assumes that any unused bit in the data stream | 121 | * Note: This function assumes that any unused bit in the data stream | 
| 122 | * is set to zero so that the ors will work correctly */ | 122 | * is set to zero so that the ors will work correctly */ | 
| 123 | #define BITS_PER_BYTE 8 | ||
| 124 | static void | 123 | static void | 
| 125 | cat_pack(__u8 *msg, const __u16 start_bit, __u8 *data, const __u16 num_bits) | 124 | cat_pack(__u8 *msg, const __u16 start_bit, __u8 *data, const __u16 num_bits) | 
| 126 | { | 125 | { | 
