diff options
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 8 | ||||
-rw-r--r-- | arch/x86/Makefile | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/processor.h | 10 | ||||
-rw-r--r-- | arch/x86/kernel/irq.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/process.c | 24 | ||||
-rw-r--r-- | arch/x86/power/cpu.c | 2 | ||||
-rw-r--r-- | drivers/block/floppy.c | 36 |
7 files changed, 8 insertions, 80 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index c1be8066ea59..709e08e9a222 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -6,14 +6,6 @@ be removed from this file. | |||
6 | 6 | ||
7 | --------------------------- | 7 | --------------------------- |
8 | 8 | ||
9 | What: x86 floppy disable_hlt | ||
10 | When: 2012 | ||
11 | Why: ancient workaround of dubious utility clutters the | ||
12 | code used by everybody else. | ||
13 | Who: Len Brown <len.brown@intel.com> | ||
14 | |||
15 | --------------------------- | ||
16 | |||
17 | What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle | 9 | What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle |
18 | When: 2012 | 10 | When: 2012 |
19 | Why: This optional sub-feature of APM is of dubious reliability, | 11 | Why: This optional sub-feature of APM is of dubious reliability, |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 968dbe24a255..41a7237606a3 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
@@ -129,6 +129,7 @@ KBUILD_CFLAGS += -Wno-sign-compare | |||
129 | KBUILD_CFLAGS += -fno-asynchronous-unwind-tables | 129 | KBUILD_CFLAGS += -fno-asynchronous-unwind-tables |
130 | # prevent gcc from generating any FP code by mistake | 130 | # prevent gcc from generating any FP code by mistake |
131 | KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) | 131 | KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) |
132 | KBUILD_CFLAGS += $(call cc-option,-mno-avx,) | ||
132 | 133 | ||
133 | KBUILD_CFLAGS += $(mflags-y) | 134 | KBUILD_CFLAGS += $(mflags-y) |
134 | KBUILD_AFLAGS += $(mflags-y) | 135 | KBUILD_AFLAGS += $(mflags-y) |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 7284c9a6a0b5..4fa7dcceb6c0 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -974,16 +974,6 @@ extern bool cpu_has_amd_erratum(const int *); | |||
974 | #define cpu_has_amd_erratum(x) (false) | 974 | #define cpu_has_amd_erratum(x) (false) |
975 | #endif /* CONFIG_CPU_SUP_AMD */ | 975 | #endif /* CONFIG_CPU_SUP_AMD */ |
976 | 976 | ||
977 | #ifdef CONFIG_X86_32 | ||
978 | /* | ||
979 | * disable hlt during certain critical i/o operations | ||
980 | */ | ||
981 | #define HAVE_DISABLE_HLT | ||
982 | #endif | ||
983 | |||
984 | void disable_hlt(void); | ||
985 | void enable_hlt(void); | ||
986 | |||
987 | void cpu_idle_wait(void); | 977 | void cpu_idle_wait(void); |
988 | 978 | ||
989 | extern unsigned long arch_align_stack(unsigned long sp); | 979 | extern unsigned long arch_align_stack(unsigned long sp); |
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 7943e0c21bde..3dafc6003b7c 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -282,8 +282,13 @@ void fixup_irqs(void) | |||
282 | else if (!(warned++)) | 282 | else if (!(warned++)) |
283 | set_affinity = 0; | 283 | set_affinity = 0; |
284 | 284 | ||
285 | /* | ||
286 | * We unmask if the irq was not marked masked by the | ||
287 | * core code. That respects the lazy irq disable | ||
288 | * behaviour. | ||
289 | */ | ||
285 | if (!irqd_can_move_in_process_context(data) && | 290 | if (!irqd_can_move_in_process_context(data) && |
286 | !irqd_irq_disabled(data) && chip->irq_unmask) | 291 | !irqd_irq_masked(data) && chip->irq_unmask) |
287 | chip->irq_unmask(data); | 292 | chip->irq_unmask(data); |
288 | 293 | ||
289 | raw_spin_unlock(&desc->lock); | 294 | raw_spin_unlock(&desc->lock); |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index a33afaa5ddb7..1d92a5ab6e8b 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -362,34 +362,10 @@ void (*pm_idle)(void); | |||
362 | EXPORT_SYMBOL(pm_idle); | 362 | EXPORT_SYMBOL(pm_idle); |
363 | #endif | 363 | #endif |
364 | 364 | ||
365 | #ifdef CONFIG_X86_32 | ||
366 | /* | ||
367 | * This halt magic was a workaround for ancient floppy DMA | ||
368 | * wreckage. It should be safe to remove. | ||
369 | */ | ||
370 | static int hlt_counter; | ||
371 | void disable_hlt(void) | ||
372 | { | ||
373 | hlt_counter++; | ||
374 | } | ||
375 | EXPORT_SYMBOL(disable_hlt); | ||
376 | |||
377 | void enable_hlt(void) | ||
378 | { | ||
379 | hlt_counter--; | ||
380 | } | ||
381 | EXPORT_SYMBOL(enable_hlt); | ||
382 | |||
383 | static inline int hlt_use_halt(void) | ||
384 | { | ||
385 | return (!hlt_counter && boot_cpu_data.hlt_works_ok); | ||
386 | } | ||
387 | #else | ||
388 | static inline int hlt_use_halt(void) | 365 | static inline int hlt_use_halt(void) |
389 | { | 366 | { |
390 | return 1; | 367 | return 1; |
391 | } | 368 | } |
392 | #endif | ||
393 | 369 | ||
394 | #ifndef CONFIG_SMP | 370 | #ifndef CONFIG_SMP |
395 | static inline void play_dead(void) | 371 | static inline void play_dead(void) |
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c index 47936830968c..218cdb16163c 100644 --- a/arch/x86/power/cpu.c +++ b/arch/x86/power/cpu.c | |||
@@ -225,13 +225,13 @@ static void __restore_processor_state(struct saved_context *ctxt) | |||
225 | fix_processor_context(); | 225 | fix_processor_context(); |
226 | 226 | ||
227 | do_fpu_end(); | 227 | do_fpu_end(); |
228 | x86_platform.restore_sched_clock_state(); | ||
228 | mtrr_bp_restore(); | 229 | mtrr_bp_restore(); |
229 | } | 230 | } |
230 | 231 | ||
231 | /* Needed by apm.c */ | 232 | /* Needed by apm.c */ |
232 | void restore_processor_state(void) | 233 | void restore_processor_state(void) |
233 | { | 234 | { |
234 | x86_platform.restore_sched_clock_state(); | ||
235 | __restore_processor_state(&saved_context); | 235 | __restore_processor_state(&saved_context); |
236 | } | 236 | } |
237 | #ifdef CONFIG_X86_32 | 237 | #ifdef CONFIG_X86_32 |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 76a08236430a..b0b00d70c166 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -1030,37 +1030,6 @@ static int fd_wait_for_completion(unsigned long delay, timeout_fn function) | |||
1030 | return 0; | 1030 | return 0; |
1031 | } | 1031 | } |
1032 | 1032 | ||
1033 | static DEFINE_SPINLOCK(floppy_hlt_lock); | ||
1034 | static int hlt_disabled; | ||
1035 | static void floppy_disable_hlt(void) | ||
1036 | { | ||
1037 | unsigned long flags; | ||
1038 | |||
1039 | WARN_ONCE(1, "floppy_disable_hlt() scheduled for removal in 2012"); | ||
1040 | spin_lock_irqsave(&floppy_hlt_lock, flags); | ||
1041 | if (!hlt_disabled) { | ||
1042 | hlt_disabled = 1; | ||
1043 | #ifdef HAVE_DISABLE_HLT | ||
1044 | disable_hlt(); | ||
1045 | #endif | ||
1046 | } | ||
1047 | spin_unlock_irqrestore(&floppy_hlt_lock, flags); | ||
1048 | } | ||
1049 | |||
1050 | static void floppy_enable_hlt(void) | ||
1051 | { | ||
1052 | unsigned long flags; | ||
1053 | |||
1054 | spin_lock_irqsave(&floppy_hlt_lock, flags); | ||
1055 | if (hlt_disabled) { | ||
1056 | hlt_disabled = 0; | ||
1057 | #ifdef HAVE_DISABLE_HLT | ||
1058 | enable_hlt(); | ||
1059 | #endif | ||
1060 | } | ||
1061 | spin_unlock_irqrestore(&floppy_hlt_lock, flags); | ||
1062 | } | ||
1063 | |||
1064 | static void setup_DMA(void) | 1033 | static void setup_DMA(void) |
1065 | { | 1034 | { |
1066 | unsigned long f; | 1035 | unsigned long f; |
@@ -1105,7 +1074,6 @@ static void setup_DMA(void) | |||
1105 | fd_enable_dma(); | 1074 | fd_enable_dma(); |
1106 | release_dma_lock(f); | 1075 | release_dma_lock(f); |
1107 | #endif | 1076 | #endif |
1108 | floppy_disable_hlt(); | ||
1109 | } | 1077 | } |
1110 | 1078 | ||
1111 | static void show_floppy(void); | 1079 | static void show_floppy(void); |
@@ -1707,7 +1675,6 @@ irqreturn_t floppy_interrupt(int irq, void *dev_id) | |||
1707 | fd_disable_dma(); | 1675 | fd_disable_dma(); |
1708 | release_dma_lock(f); | 1676 | release_dma_lock(f); |
1709 | 1677 | ||
1710 | floppy_enable_hlt(); | ||
1711 | do_floppy = NULL; | 1678 | do_floppy = NULL; |
1712 | if (fdc >= N_FDC || FDCS->address == -1) { | 1679 | if (fdc >= N_FDC || FDCS->address == -1) { |
1713 | /* we don't even know which FDC is the culprit */ | 1680 | /* we don't even know which FDC is the culprit */ |
@@ -1856,8 +1823,6 @@ static void floppy_shutdown(unsigned long data) | |||
1856 | show_floppy(); | 1823 | show_floppy(); |
1857 | cancel_activity(); | 1824 | cancel_activity(); |
1858 | 1825 | ||
1859 | floppy_enable_hlt(); | ||
1860 | |||
1861 | flags = claim_dma_lock(); | 1826 | flags = claim_dma_lock(); |
1862 | fd_disable_dma(); | 1827 | fd_disable_dma(); |
1863 | release_dma_lock(flags); | 1828 | release_dma_lock(flags); |
@@ -4508,7 +4473,6 @@ static void floppy_release_irq_and_dma(void) | |||
4508 | #if N_FDC > 1 | 4473 | #if N_FDC > 1 |
4509 | set_dor(1, ~8, 0); | 4474 | set_dor(1, ~8, 0); |
4510 | #endif | 4475 | #endif |
4511 | floppy_enable_hlt(); | ||
4512 | 4476 | ||
4513 | if (floppy_track_buffer && max_buffer_sectors) { | 4477 | if (floppy_track_buffer && max_buffer_sectors) { |
4514 | tmpsize = max_buffer_sectors * 1024; | 4478 | tmpsize = max_buffer_sectors * 1024; |