* [PATCH -tip] x86: apic_32.c - add lapic resource
@ 2008-07-01 17:43 Cyrill Gorcunov
2008-07-09 6:07 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2008-07-01 17:43 UTC (permalink / raw)
To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, Maciej W. Rozycki; +Cc: LKML
Add lapic resource into kernel resource map and mark it as busy
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
CC: Maciej W. Rozycki <macro@linux-mips.org>
---
I've started to unify apic code but it will require a huge
amount of time and will not be done soon but this patch is usefull
even now I think.
Any comments are _quite__welcome_.
The patch is on top of
commit ccbb46cbe2993e6b23244b53a5d2791c71d134f5
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Jun 27 19:55:22 2008 +0200
stacktrace: export print_stack_trace and save_stack_trace
Index: linux-2.6.git/arch/x86/kernel/apic_32.c
====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic_32.c 2008-07-01 20:30:10.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/apic_32.c 2008-07-01 21:27:35.000000000 +0400
@@ -81,6 +81,11 @@ int pic_mode;
/* Have we found an MP table */
int smp_found_config;
+static struct resource lapic_resource = {
+ .name = "Local APIC",
+ .flags = IORESOURCE_MEM | IORESOURCE_BUSY,
+};
+
static unsigned int calibration_result;
static int lapic_next_event(unsigned long delta,
@@ -1754,3 +1759,21 @@ static int __init apic_set_verbosity(cha
}
__setup("apic=", apic_set_verbosity);
+static int __init lapic_insert_resource(void)
+{
+ if (!apic_phys)
+ return -1;
+
+ /* Put local APIC into the resource map. */
+ lapic_resource.start = apic_phys;
+ lapic_resource.end = lapic_resource.start + PAGE_SIZE - 1;
+ insert_resource(&iomem_resource, &lapic_resource);
+
+ return 0;
+}
+
+/*
+ * need call insert after e820_reserve_resources()
+ * that is using request_resource
+ */
+late_initcall(lapic_insert_resource);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -tip] x86: apic_32.c - add lapic resource
2008-07-01 17:43 [PATCH -tip] x86: apic_32.c - add lapic resource Cyrill Gorcunov
@ 2008-07-09 6:07 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-07-09 6:07 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: H. Peter Anvin, Thomas Gleixner, Maciej W. Rozycki, LKML
* Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> Add lapic resource into kernel resource map and mark it as busy
applied to tip/x86/core, thanks Cyrill.
> I've started to unify apic code but it will require a huge amount of
> time and will not be done soon but this patch is usefull even now I
> think.
agreed, unifying the apic code is quite non-trivial.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-09 6:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-01 17:43 [PATCH -tip] x86: apic_32.c - add lapic resource Cyrill Gorcunov
2008-07-09 6:07 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome