From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: [patch 10/10] x86: use get_bios_ebda()
Date: Sat, 19 Apr 2008 23:55:20 +0900 [thread overview]
Message-ID: <480a0aaa.1e068e0a.1c13.ffff8669@mx.google.com> (raw)
In-Reply-To: 20080419145510.150338641@gmail.com
[-- Attachment #1: x86-use-get-bios-ebda-3.patch --]
[-- Type: text/plain, Size: 2569 bytes --]
Use get_bios_ebda().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
arch/x86/kernel/head64.c | 5 ++---
arch/x86/kernel/setup_32.c | 4 +---
arch/x86/kernel/summit_32.c | 5 +++--
3 files changed, 6 insertions(+), 8 deletions(-)
Index: 2.6-git/arch/x86/kernel/summit_32.c
===================================================================
--- 2.6-git.orig/arch/x86/kernel/summit_32.c
+++ 2.6-git/arch/x86/kernel/summit_32.c
@@ -29,6 +29,7 @@
#include <linux/mm.h>
#include <linux/init.h>
#include <asm/io.h>
+#include <asm/bios_ebda.h>
#include <asm/mach-summit/mach_mpparse.h>
static struct rio_table_hdr *rio_table_hdr __initdata;
@@ -140,8 +141,8 @@ void __init setup_summit(void)
int i, next_wpeg, next_bus = 0;
/* The pointer to the EBDA is stored in the word @ phys 0x40E(40:0E) */
- ptr = *(unsigned short *)phys_to_virt(0x40Eul);
- ptr = (unsigned long)phys_to_virt(ptr << 4);
+ ptr = get_bios_ebda();
+ ptr = (unsigned long)phys_to_virt(ptr);
rio_table_hdr = NULL;
offset = 0x180;
Index: 2.6-git/arch/x86/kernel/head64.c
===================================================================
--- 2.6-git.orig/arch/x86/kernel/head64.c
+++ 2.6-git/arch/x86/kernel/head64.c
@@ -22,6 +22,7 @@
#include <asm/sections.h>
#include <asm/kdebug.h>
#include <asm/e820.h>
+#include <asm/bios_ebda.h>
static void __init zap_identity_mappings(void)
{
@@ -49,7 +50,6 @@ static void __init copy_bootdata(char *r
}
}
-#define BIOS_EBDA_SEGMENT 0x40E
#define BIOS_LOWMEM_KILOBYTES 0x413
/*
@@ -80,8 +80,7 @@ static void __init reserve_ebda_region(v
lowmem <<= 10;
/* start of EBDA area */
- ebda_addr = *(unsigned short *)__va(BIOS_EBDA_SEGMENT);
- ebda_addr <<= 4;
+ ebda_addr = get_bios_ebda();
/* Fixup: bios puts an EBDA in the top 64K segment */
/* of conventional memory, but does not adjust lowmem. */
Index: 2.6-git/arch/x86/kernel/setup_32.c
===================================================================
--- 2.6-git.orig/arch/x86/kernel/setup_32.c
+++ 2.6-git/arch/x86/kernel/setup_32.c
@@ -388,7 +388,6 @@ unsigned long __init find_max_low_pfn(vo
return max_low_pfn;
}
-#define BIOS_EBDA_SEGMENT 0x40E
#define BIOS_LOWMEM_KILOBYTES 0x413
/*
@@ -419,8 +418,7 @@ static void __init reserve_ebda_region(v
lowmem <<= 10;
/* start of EBDA area */
- ebda_addr = *(unsigned short *)__va(BIOS_EBDA_SEGMENT);
- ebda_addr <<= 4;
+ ebda_addr = get_bios_ebda();
/* Fixup: bios puts an EBDA in the top 64K segment */
/* of conventional memory, but does not adjust lowmem. */
--
prev parent reply other threads:[~2008-04-19 15:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080419145510.150338641@gmail.com>
2008-04-19 14:55 ` [patch 01/10] x86: use BUILD_BUG_ON() for the size of struct intel_mp_floating Akinobu Mita
2008-04-19 14:55 ` [patch 02/10] x86: use MP_intsrc_info() Akinobu Mita
2008-04-19 14:55 ` [patch 03/10] x86: use bitmap library for pin_programmed Akinobu Mita
2008-04-19 14:55 ` [patch 04/10] x86: remove unnecessary memset and NULL check after alloc_bootmem() Akinobu Mita
2008-04-19 14:55 ` [patch 05/10] x86: cleanup clocksource_hz2mult usage Akinobu Mita
2008-04-19 14:55 ` [patch 06/10] x86: cleanup div_sc() usage Akinobu Mita
2008-04-19 14:55 ` [patch 07/10] x86: use cpumask function for present, possible, and online cpus Akinobu Mita
2008-04-19 14:55 ` [patch 08/10] x86: get_bios_ebda() requires asm/io.h Akinobu Mita
2008-04-19 14:55 ` [patch 09/10] x86: remove duplicate get_bios_ebda() from rio.h Akinobu Mita
2008-04-19 14:55 ` Akinobu Mita [this message]
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=480a0aaa.1e068e0a.1c13.ffff8669@mx.google.com \
--to=akinobu.mita@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.