* [PATCH] x86: boot: Remove ancient dead code
@ 2012-06-20 22:16 Paul Bolle
2012-06-20 22:23 ` Jesper Juhl
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Paul Bolle @ 2012-06-20 22:16 UTC (permalink / raw)
To: H. Peter Anvin, Thomas Gleixner, Ingo Molnar
Cc: Jeff Epler, x86, linux-kernel
Release v1.3.82 wrapped a few lines of code in an "#ifdef
SAFE_RESET_DISK_CONTROLLER" and "#endif" pair. Since
SAFE_RESET_DISK_CONTROLLER was never defined anywhere that was basically
a verbose "#ifdef 0" and "#endif" pair. These dead lines have been in
the tree for sixteen years but now the time has come to remove them.
I guess the main lesson here is that if you want your dead code in the
tree for a very long time you'd better be creative. A plain old "#ifdef
0" and "#endif" pair just doesn't cut it!
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Link: https://lkml.org/lkml/1996/3/30/38
Cc: Jeff Epler <jepler@inetnebr.com>
---
| 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
--git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index efe5acf..9b9c647 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -406,13 +406,6 @@ init_size: .long INIT_SIZE # kernel initialization size
.section ".entrytext", "ax"
start_of_setup:
-#ifdef SAFE_RESET_DISK_CONTROLLER
-# Reset the disk controller.
- movw $0x0000, %ax # Reset disk controller
- movb $0x80, %dl # All disks
- int $0x13
-#endif
-
# Force %es = %ds
movw %ds, %ax
movw %ax, %es
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] x86: boot: Remove ancient dead code
2012-06-20 22:16 [PATCH] x86: boot: Remove ancient dead code Paul Bolle
@ 2012-06-20 22:23 ` Jesper Juhl
2012-06-20 23:02 ` Jeff Epler
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jesper Juhl @ 2012-06-20 22:23 UTC (permalink / raw)
To: Paul Bolle
Cc: H. Peter Anvin, Thomas Gleixner, Ingo Molnar, Jeff Epler, x86,
linux-kernel
On Thu, 21 Jun 2012, Paul Bolle wrote:
> Release v1.3.82 wrapped a few lines of code in an "#ifdef
> SAFE_RESET_DISK_CONTROLLER" and "#endif" pair. Since
> SAFE_RESET_DISK_CONTROLLER was never defined anywhere that was basically
> a verbose "#ifdef 0" and "#endif" pair. These dead lines have been in
> the tree for sixteen years but now the time has come to remove them.
>
> I guess the main lesson here is that if you want your dead code in the
> tree for a very long time you'd better be creative. A plain old "#ifdef
> 0" and "#endif" pair just doesn't cut it!
>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> Link: https://lkml.org/lkml/1996/3/30/38
> Cc: Jeff Epler <jepler@inetnebr.com>
> ---
> arch/x86/boot/header.S | 7 -------
> 1 files changed, 0 insertions(+), 7 deletions(-)
>
> diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
> index efe5acf..9b9c647 100644
> --- a/arch/x86/boot/header.S
> +++ b/arch/x86/boot/header.S
> @@ -406,13 +406,6 @@ init_size: .long INIT_SIZE # kernel initialization size
>
> .section ".entrytext", "ax"
> start_of_setup:
> -#ifdef SAFE_RESET_DISK_CONTROLLER
> -# Reset the disk controller.
> - movw $0x0000, %ax # Reset disk controller
> - movb $0x80, %dl # All disks
> - int $0x13
> -#endif
> -
> # Force %es = %ds
> movw %ds, %ax
> movw %ax, %es
>
Looks good to me.
Not that I have much knowledge of the code, but I did dig the history a
bit and yes, this looks like long dead stuff that should just go away.
Acked-by: Jesper Juhl <jj@chaosbits.net>
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86: boot: Remove ancient dead code
2012-06-20 22:16 [PATCH] x86: boot: Remove ancient dead code Paul Bolle
2012-06-20 22:23 ` Jesper Juhl
@ 2012-06-20 23:02 ` Jeff Epler
2012-06-21 0:38 ` [tip:x86/cleanups] x86, boot: Remove ancient, unconditionally #ifdef'd out " tip-bot for Paul Bolle
2012-06-21 5:46 ` [PATCH] x86: boot: Remove ancient " Ingo Molnar
3 siblings, 0 replies; 5+ messages in thread
From: Jeff Epler @ 2012-06-20 23:02 UTC (permalink / raw)
To: Paul Bolle
Cc: H. Peter Anvin, Thomas Gleixner, Ingo Molnar, Jeff Epler, x86,
linux-kernel
I hope you didn't spend too much time tracking me down just to Cc me on
this proposed change.
Unfortunately, I no longer have access to the hardware that I reported
the problem on. :-P Anyway,
Acked-by: Jeff Epler <jepler@unpythonic.net>
Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:x86/cleanups] x86, boot: Remove ancient, unconditionally #ifdef'd out dead code
2012-06-20 22:16 [PATCH] x86: boot: Remove ancient dead code Paul Bolle
2012-06-20 22:23 ` Jesper Juhl
2012-06-20 23:02 ` Jeff Epler
@ 2012-06-21 0:38 ` tip-bot for Paul Bolle
2012-06-21 5:46 ` [PATCH] x86: boot: Remove ancient " Ingo Molnar
3 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Paul Bolle @ 2012-06-21 0:38 UTC (permalink / raw)
To: linux-tip-commits
Cc: jepler, linux-kernel, pebolle, hpa, mingo, jj, tglx, hpa
Commit-ID: e5a7286b5f1b0b5beb97275f2152bf10c4aa4204
Gitweb: http://git.kernel.org/tip/e5a7286b5f1b0b5beb97275f2152bf10c4aa4204
Author: Paul Bolle <pebolle@tiscali.nl>
AuthorDate: Thu, 21 Jun 2012 00:16:29 +0200
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Wed, 20 Jun 2012 17:28:56 -0700
x86, boot: Remove ancient, unconditionally #ifdef'd out dead code
Release v1.3.82 wrapped a few lines of code in an "#ifdef
SAFE_RESET_DISK_CONTROLLER" and "#endif" pair. Since
SAFE_RESET_DISK_CONTROLLER was never defined anywhere that was basically
a verbose "#ifdef 0" and "#endif" pair. These dead lines have been in
the tree for sixteen years but now the time has come to remove them.
I guess the main lesson here is that if you want your dead code in the
tree for a very long time you'd better be creative. A plain old "#ifdef
0" and "#endif" pair just doesn't cut it!
See: http://lkml.kernel.org/r/199603301718.LAA00178@craie.inetnebr.com
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Link: http://lkml.kernel.org/r/1340230589.1773.7.camel@x61.thuisdomein
Acked-by: Jeff Epler <jepler@unpythonic.net>
Acked-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
| 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
--git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index 8bbea6a..fde5bde 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -386,13 +386,6 @@ init_size: .long INIT_SIZE # kernel initialization size
.section ".entrytext", "ax"
start_of_setup:
-#ifdef SAFE_RESET_DISK_CONTROLLER
-# Reset the disk controller.
- movw $0x0000, %ax # Reset disk controller
- movb $0x80, %dl # All disks
- int $0x13
-#endif
-
# Force %es = %ds
movw %ds, %ax
movw %ax, %es
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] x86: boot: Remove ancient dead code
2012-06-20 22:16 [PATCH] x86: boot: Remove ancient dead code Paul Bolle
` (2 preceding siblings ...)
2012-06-21 0:38 ` [tip:x86/cleanups] x86, boot: Remove ancient, unconditionally #ifdef'd out " tip-bot for Paul Bolle
@ 2012-06-21 5:46 ` Ingo Molnar
3 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2012-06-21 5:46 UTC (permalink / raw)
To: Paul Bolle
Cc: H. Peter Anvin, Thomas Gleixner, Ingo Molnar, Jeff Epler, x86,
linux-kernel, Linus Torvalds
* Paul Bolle <pebolle@tiscali.nl> wrote:
> Release v1.3.82 wrapped a few lines of code in an "#ifdef
> SAFE_RESET_DISK_CONTROLLER" and "#endif" pair. Since
> SAFE_RESET_DISK_CONTROLLER was never defined anywhere that was basically
> a verbose "#ifdef 0" and "#endif" pair. These dead lines have been in
> the tree for sixteen years but now the time has come to remove them.
>
> I guess the main lesson here is that if you want your dead code in the
> tree for a very long time you'd better be creative. A plain old "#ifdef
> 0" and "#endif" pair just doesn't cut it!
and putting it into assembly code is also key to success!
Thanks,
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-21 5:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-20 22:16 [PATCH] x86: boot: Remove ancient dead code Paul Bolle
2012-06-20 22:23 ` Jesper Juhl
2012-06-20 23:02 ` Jeff Epler
2012-06-21 0:38 ` [tip:x86/cleanups] x86, boot: Remove ancient, unconditionally #ifdef'd out " tip-bot for Paul Bolle
2012-06-21 5:46 ` [PATCH] x86: boot: Remove ancient " Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).