LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Chandramouli Narayanan <mouli@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, ak@suse.de, akpm@linux-foundation.org
Subject: Re: [PATCH 2.6.21 2/3] x86_64: EFI64 support
Date: Fri, 01 Jun 2007 12:50:33 -0600 [thread overview]
Message-ID: <m13b1b1pc6.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20070501190110.958988000@em64tdvp.jf.intel.com> (Chandramouli Narayanan's message of "Tue, 01 May 2007 11:59:47 -0700")
Chandramouli Narayanan <mouli@linux.intel.com> writes:
> diff -uprN -X linux-2.6.21rc7-git2-orig/Documentation/dontdiff
> linux-2.6.21rc7-git2-orig/arch/x86_64/kernel/reboot.c
> linux-2.6.21rc7-git2-uefi-finaltest/arch/x86_64/kernel/reboot.c
> --- linux-2.6.21rc7-git2-orig/arch/x86_64/kernel/reboot.c 2007-02-04
> 10:44:54.000000000 -0800
> +++ linux-2.6.21rc7-git2-uefi-finaltest/arch/x86_64/kernel/reboot.c 2007-04-19
> 13:01:02.000000000 -0700
> @@ -7,6 +7,7 @@
> #include <linux/ctype.h>
> #include <linux/string.h>
> #include <linux/pm.h>
> +#include <linux/efi.h>
> #include <asm/io.h>
> #include <asm/kdebug.h>
> #include <asm/delay.h>
> @@ -116,9 +117,15 @@ void machine_emergency_restart(void)
> {
> int i;
>
> + /* If EFI enabled, reset system through EFI protocol. */
> + if (efi_enabled) {
> + efi.reset_system(EFI_RESET_WARM, EFI_SUCCESS, 0, NULL);
> + return;
> + }
> +
> /* Tell the BIOS if we want cold or warm reboot */
> *((unsigned short *)__va(0x472)) = reboot_mode;
> -
> +
Don't do this.
Instead add an architecture specific pointer that the EFI
initialization code can override. That should be a lot less
intrusive and more maintainable.
> for (;;) {
> /* Could also try the reset bit in the Hammer NB */
> switch (reboot_type) {
> diff -uprN -X linux-2.6.21rc7-git2-orig/Documentation/dontdiff
> linux-2.6.21rc7-git2-orig/arch/x86_64/kernel/setup.c
> linux-2.6.21rc7-git2-uefi-finaltest/arch/x86_64/kernel/setup.c
> --- linux-2.6.21rc7-git2-orig/arch/x86_64/kernel/setup.c 2007-04-19
> 12:39:39.000000000 -0700
> +++ linux-2.6.21rc7-git2-uefi-finaltest/arch/x86_64/kernel/setup.c 2007-04-19
> 13:01:02.000000000 -0700
> @@ -44,6 +44,7 @@
> #include <linux/dmi.h>
> #include <linux/dma-mapping.h>
> #include <linux/ctype.h>
> +#include <linux/efi.h>
>
> #include <asm/mtrr.h>
> #include <asm/uaccess.h>
> @@ -69,6 +70,10 @@
> * Machine setup..
> */
>
> +#ifdef CONFIG_EFI
> +int efi_enabled = 0;
> +EXPORT_SYMBOL(efi_enabled);
> +#endif
Please remove this variable.
I didn't see a single use where it appears to be actually needed.
Eric
next prev parent reply other threads:[~2007-06-01 18:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-01 18:59 [PATCH 2.6.21 0/3] " Chandramouli Narayanan
2007-05-01 18:59 ` [PATCH 2.6.21 1/3] " Chandramouli Narayanan
2007-05-03 2:56 ` Randy Dunlap
2007-05-03 19:20 ` chandramouli narayanan
2007-05-03 20:15 ` Randy Dunlap
2007-06-01 16:47 ` Yinghai Lu
2007-05-04 13:01 ` Andi Kleen
2007-05-25 22:46 ` chandramouli narayanan
2007-06-01 18:39 ` Eric W. Biederman
2007-06-01 18:44 ` Eric W. Biederman
2007-05-01 18:59 ` [PATCH 2.6.21 2/3] " Chandramouli Narayanan
2007-05-02 20:55 ` Andi Kleen
2007-05-02 22:43 ` chandramouli narayanan
2007-06-01 18:50 ` Eric W. Biederman [this message]
2007-05-01 18:59 ` [PATCH 2.6.21 3/3] " Chandramouli Narayanan
2007-06-01 18:52 ` Eric W. Biederman
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=m13b1b1pc6.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mouli@linux.intel.com \
--subject='Re: [PATCH 2.6.21 2/3] x86_64: EFI64 support' \
/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
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).