Josh Boyer dff0854
From 5c21b39ab123ada8ce248efc733420bd8c9ea255 Mon Sep 17 00:00:00 2001
Josh Boyer dff0854
From: Josh Boyer <jwboyer@redhat.com>
Josh Boyer dff0854
Date: Fri, 28 Oct 2011 15:38:06 -0400
Josh Boyer dff0854
Subject: [PATCH] floppy: Remove _hlt related functions
Josh Boyer dff0854
Josh Boyer dff0854
It's close enough to 2012 and the WARN_ONCE is causing things like abrt to
Josh Boyer dff0854
auto-file bugs that aren't really bugs.
Josh Boyer dff0854
Josh Boyer dff0854
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Josh Boyer dff0854
Josh Boyer dff0854
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
Josh Boyer dff0854
index d5ac362..df1e87c 100644
Josh Boyer dff0854
--- a/Documentation/feature-removal-schedule.txt
Josh Boyer dff0854
+++ b/Documentation/feature-removal-schedule.txt
Josh Boyer dff0854
@@ -6,14 +6,6 @@ be removed from this file.
Josh Boyer dff0854
 
Josh Boyer dff0854
 ---------------------------
Josh Boyer dff0854
 
Josh Boyer dff0854
-What:	x86 floppy disable_hlt
Josh Boyer dff0854
-When:	2012
Josh Boyer dff0854
-Why:	ancient workaround of dubious utility clutters the
Josh Boyer dff0854
-	code used by everybody else.
Josh Boyer dff0854
-Who:	Len Brown <len.brown@intel.com>
Josh Boyer dff0854
-
Josh Boyer dff0854
----------------------------
Josh Boyer dff0854
-
Josh Boyer dff0854
 What:	CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle
Josh Boyer dff0854
 When:	2012
Josh Boyer dff0854
 Why:	This optional sub-feature of APM is of dubious reliability,
Josh Boyer dff0854
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
Josh Boyer dff0854
index 9955a53..40bf4c2 100644
Josh Boyer dff0854
--- a/drivers/block/floppy.c
Josh Boyer dff0854
+++ b/drivers/block/floppy.c
Josh Boyer dff0854
@@ -1032,37 +1032,6 @@ static int fd_wait_for_completion(unsigned long delay, timeout_fn function)
Josh Boyer dff0854
 	return 0;
Josh Boyer dff0854
 }
Josh Boyer dff0854
 
Josh Boyer dff0854
-static DEFINE_SPINLOCK(floppy_hlt_lock);
Josh Boyer dff0854
-static int hlt_disabled;
Josh Boyer dff0854
-static void floppy_disable_hlt(void)
Josh Boyer dff0854
-{
Josh Boyer dff0854
-	unsigned long flags;
Josh Boyer dff0854
-
Josh Boyer dff0854
-	WARN_ONCE(1, "floppy_disable_hlt() scheduled for removal in 2012");
Josh Boyer dff0854
-	spin_lock_irqsave(&floppy_hlt_lock, flags);
Josh Boyer dff0854
-	if (!hlt_disabled) {
Josh Boyer dff0854
-		hlt_disabled = 1;
Josh Boyer dff0854
-#ifdef HAVE_DISABLE_HLT
Josh Boyer dff0854
-		disable_hlt();
Josh Boyer dff0854
-#endif
Josh Boyer dff0854
-	}
Josh Boyer dff0854
-	spin_unlock_irqrestore(&floppy_hlt_lock, flags);
Josh Boyer dff0854
-}
Josh Boyer dff0854
-
Josh Boyer dff0854
-static void floppy_enable_hlt(void)
Josh Boyer dff0854
-{
Josh Boyer dff0854
-	unsigned long flags;
Josh Boyer dff0854
-
Josh Boyer dff0854
-	spin_lock_irqsave(&floppy_hlt_lock, flags);
Josh Boyer dff0854
-	if (hlt_disabled) {
Josh Boyer dff0854
-		hlt_disabled = 0;
Josh Boyer dff0854
-#ifdef HAVE_DISABLE_HLT
Josh Boyer dff0854
-		enable_hlt();
Josh Boyer dff0854
-#endif
Josh Boyer dff0854
-	}
Josh Boyer dff0854
-	spin_unlock_irqrestore(&floppy_hlt_lock, flags);
Josh Boyer dff0854
-}
Josh Boyer dff0854
-
Josh Boyer dff0854
 static void setup_DMA(void)
Josh Boyer dff0854
 {
Josh Boyer dff0854
 	unsigned long f;
Josh Boyer dff0854
@@ -1107,7 +1076,6 @@ static void setup_DMA(void)
Josh Boyer dff0854
 	fd_enable_dma();
Josh Boyer dff0854
 	release_dma_lock(f);
Josh Boyer dff0854
 #endif
Josh Boyer dff0854
-	floppy_disable_hlt();
Josh Boyer dff0854
 }
Josh Boyer dff0854
 
Josh Boyer dff0854
 static void show_floppy(void);
Josh Boyer dff0854
@@ -1709,7 +1677,6 @@ irqreturn_t floppy_interrupt(int irq, void *dev_id)
Josh Boyer dff0854
 	fd_disable_dma();
Josh Boyer dff0854
 	release_dma_lock(f);
Josh Boyer dff0854
 
Josh Boyer dff0854
-	floppy_enable_hlt();
Josh Boyer dff0854
 	do_floppy = NULL;
Josh Boyer dff0854
 	if (fdc >= N_FDC || FDCS->address == -1) {
Josh Boyer dff0854
 		/* we don't even know which FDC is the culprit */
Josh Boyer dff0854
@@ -1858,8 +1825,6 @@ static void floppy_shutdown(unsigned long data)
Josh Boyer dff0854
 		show_floppy();
Josh Boyer dff0854
 	cancel_activity();
Josh Boyer dff0854
 
Josh Boyer dff0854
-	floppy_enable_hlt();
Josh Boyer dff0854
-
Josh Boyer dff0854
 	flags = claim_dma_lock();
Josh Boyer dff0854
 	fd_disable_dma();
Josh Boyer dff0854
 	release_dma_lock(flags);
Josh Boyer dff0854
@@ -4504,7 +4469,6 @@ static void floppy_release_irq_and_dma(void)
Josh Boyer dff0854
 #if N_FDC > 1
Josh Boyer dff0854
 	set_dor(1, ~8, 0);
Josh Boyer dff0854
 #endif
Josh Boyer dff0854
-	floppy_enable_hlt();
Josh Boyer dff0854
 
Josh Boyer dff0854
 	if (floppy_track_buffer && max_buffer_sectors) {
Josh Boyer dff0854
 		tmpsize = max_buffer_sectors * 1024;
Josh Boyer dff0854
-- 
Josh Boyer dff0854
1.7.6.4
Josh Boyer dff0854