From: "H. Peter Anvin" <hpa@zytor.com>
To: Andrew Brukhov <pingved@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] boot: small change of halt method
Date: Thu, 24 Aug 2006 12:08:19 -0700 [thread overview]
Message-ID: <44EDF923.4030607@zytor.com> (raw)
In-Reply-To: <20060824184447.GA3346@windows95>
Andrew Brukhov wrote:
> I'm new here.
> After reading boot code i'm immidiatly change this string:
>
> --- ./linux-2.6.17.11/arch/i386/boot/compressed/misc.c 2006-08-24 01:16:33.000000000 +0400
> +++ /usr/src/linux-2.6.17.11/arch/i386/boot/compressed/misc.c 2006-08-24 22:36:10.000000000 +0400
> @@ -7,6 +7,7 @@
> * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
> * puts by Nick Holloway 1993, better puts by Martin Mares 1995
> * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
> + * Small fix of halt method Andrew Brukhov, Aug. 2006
> */
>
> #include <linux/linkage.h>
> @@ -289,8 +290,7 @@ static void error(char *x)
> putstr("\n\n");
> putstr(x);
> putstr("\n\n -- System halted");
> -
> - while(1); /* Halt */
> + asm( "hlt" );
> }
>
> It's becouse this code is platform depended and therefore there is no resons to write infinity cycle.
>
Wrong.
You need to:
while (1)
asm volatile("hlt");
... since HLT only pauses until interrupt.
-hpa
next prev parent reply other threads:[~2006-08-24 19:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-24 18:44 [PATCH] boot: small change of halt method Andrew Brukhov
2006-08-24 19:08 ` H. Peter Anvin [this message]
2006-08-24 22:03 ` Oleg Verych
2006-08-24 21:14 ` Grzegorz Kulewski
2006-08-24 21:25 ` H. Peter Anvin
2006-08-24 22:56 ` Oleg Verych
2006-08-24 22:20 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44EDF923.4030607@zytor.com \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pingved@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox