From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "David Witbrodt" <dawitbro@sbcglobal.net>, "Ingo Molnar" <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, netdev <netdev@vger.kernel.org>
Subject: Re: HPET regression in 2.6.26 versus 2.6.25 -- experimental revert for 2.6.27 failed
Date: Tue, 12 Aug 2008 20:40:19 -0700 [thread overview]
Message-ID: <86802c440808122040h61c44469ia685ad9607cd975b@mail.gmail.com> (raw)
In-Reply-To: <305173.54014.qm@web82101.mail.mud.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 62 bytes --]
please try attached patch with 2.6.27-rc3
Thanks
Yinghai Lu
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: revert_back_to_request.patch --]
[-- Type: text/x-patch; name=revert_back_to_request.patch, Size: 3716 bytes --]
[PATCH] x86: revert back to use request_resource to reserve kernel res
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
---
arch/x86/kernel/e820.c | 17 +++++++++++++++--
arch/x86/kernel/setup.c | 22 +++++++++++++++-------
include/asm-x86/e820.h | 3 ++-
3 files changed, 32 insertions(+), 10 deletions(-)
Index: linux-2.6/arch/x86/kernel/e820.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/e820.c
+++ linux-2.6/arch/x86/kernel/e820.c
@@ -1267,7 +1267,7 @@ static inline const char *e820_type_to_s
/*
* Mark e820 reserved areas as busy for the resource manager.
*/
-void __init e820_reserve_resources(void)
+void __init e820_reserve_resources(struct resource **res_kernel, int nr_res_k)
{
int i;
struct resource *res;
@@ -1287,7 +1287,20 @@ void __init e820_reserve_resources(void)
res->end = end;
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
- insert_resource(&iomem_resource, res);
+ request_resource(&iomem_resource, res);
+ if (e820.map[i].type == E820_RAM) {
+ int j;
+ /*
+ * We don't know which RAM region contains kernel data,
+ * so we try it repeatedly and let the resource manager
+ * test it.
+ */
+ for (j = 0; j < nr_res_k; j++) {
+ if (!res_kernel[j])
+ continue;
+ request_resource(res, res_kernel[j]);
+ }
+ }
res++;
}
Index: linux-2.6/arch/x86/kernel/setup.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup.c
+++ linux-2.6/arch/x86/kernel/setup.c
@@ -437,6 +437,7 @@ static void __init reserve_early_setup_d
* --------- Crashkernel reservation ------------------------------
*/
+static struct resource *crashk_res_ptr;
#ifdef CONFIG_KEXEC
/**
@@ -517,7 +518,7 @@ static void __init reserve_crashkernel(v
crashk_res.start = crash_base;
crashk_res.end = crash_base + crash_size - 1;
- insert_resource(&iomem_resource, &crashk_res);
+ crashk_res_ptr = &crashk_res;
}
#else
static void __init reserve_crashkernel(void)
@@ -593,6 +594,9 @@ struct x86_quirks *x86_quirks __initdata
void __init setup_arch(char **cmdline_p)
{
+ struct resource *res_kernel[4];
+ int num_res;
+
#ifdef CONFIG_X86_32
memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
visws_early_detect();
@@ -699,11 +703,6 @@ void __init setup_arch(char **cmdline_p)
probe_roms();
#endif
- /* after parse_early_param, so could debug it */
- insert_resource(&iomem_resource, &code_resource);
- insert_resource(&iomem_resource, &data_resource);
- insert_resource(&iomem_resource, &bss_resource);
-
if (efi_enabled)
efi_init();
@@ -865,7 +864,16 @@ void __init setup_arch(char **cmdline_p)
kvm_guest_init();
- e820_reserve_resources();
+ res_kernel[0] = &code_resource;
+ res_kernel[1] = &data_resource;
+ res_kernel[2] = &bss_resource;
+ num_res = 3;
+ if (crashk_res_ptr) {
+ res_kernel[num_res] = crashk_res_ptr;
+ num_res++;
+ }
+ e820_reserve_resources(res_kernel, num_res);
+
e820_mark_nosave_regions(max_low_pfn);
#ifdef CONFIG_X86_32
Index: linux-2.6/include/asm-x86/e820.h
===================================================================
--- linux-2.6.orig/include/asm-x86/e820.h
+++ linux-2.6/include/asm-x86/e820.h
@@ -120,7 +120,8 @@ extern void e820_register_active_regions
unsigned long end_pfn);
extern u64 e820_hole_size(u64 start, u64 end);
extern void finish_e820_parsing(void);
-extern void e820_reserve_resources(void);
+struct resource;
+extern void e820_reserve_resources(struct resource **res, int num);
extern void setup_memory_map(void);
extern char *default_machine_specific_memory_setup(void);
extern char *machine_specific_memory_setup(void);
next prev parent reply other threads:[~2008-08-13 3:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 1:17 David Witbrodt
2008-08-13 3:40 ` Yinghai Lu [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-08-13 17:06 David Witbrodt
2008-08-13 12:03 David Witbrodt
2008-08-13 16:03 ` Yinghai Lu
2008-08-13 16:05 ` Yinghai Lu
2008-08-13 0:00 David Witbrodt
2008-08-13 0:31 ` Yinghai Lu
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=86802c440808122040h61c44469ia685ad9607cd975b@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=dawitbro@sbcglobal.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®