diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-07-01 13:43:52 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-09 01:43:24 -0400 |
commit | 746f2eb790e75676ddc3b816ba18bac4179cc744 (patch) | |
tree | 744659e9b9d87f98f6461aa9f3f639a997bb56f5 /arch/x86/kernel/apic_32.c | |
parent | 5d061e397db1ee7a62783a881833f3f9b89f6dc8 (diff) |
x86: apic_32.c - add lapic resource
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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
CC: Maciej W. Rozycki <macro@linux-mips.org>
Diffstat (limited to 'arch/x86/kernel/apic_32.c')
-rw-r--r-- | arch/x86/kernel/apic_32.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index 6dea8306d8c0..3e947208b9d9 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c | |||
@@ -82,6 +82,11 @@ int pic_mode; | |||
82 | /* Have we found an MP table */ | 82 | /* Have we found an MP table */ |
83 | int smp_found_config; | 83 | int smp_found_config; |
84 | 84 | ||
85 | static struct resource lapic_resource = { | ||
86 | .name = "Local APIC", | ||
87 | .flags = IORESOURCE_MEM | IORESOURCE_BUSY, | ||
88 | }; | ||
89 | |||
85 | static unsigned int calibration_result; | 90 | static unsigned int calibration_result; |
86 | 91 | ||
87 | static int lapic_next_event(unsigned long delta, | 92 | static int lapic_next_event(unsigned long delta, |
@@ -1720,3 +1725,21 @@ static int __init apic_set_verbosity(char *str) | |||
1720 | } | 1725 | } |
1721 | __setup("apic=", apic_set_verbosity); | 1726 | __setup("apic=", apic_set_verbosity); |
1722 | 1727 | ||
1728 | static int __init lapic_insert_resource(void) | ||
1729 | { | ||
1730 | if (!apic_phys) | ||
1731 | return -1; | ||
1732 | |||
1733 | /* Put local APIC into the resource map. */ | ||
1734 | lapic_resource.start = apic_phys; | ||
1735 | lapic_resource.end = lapic_resource.start + PAGE_SIZE - 1; | ||
1736 | insert_resource(&iomem_resource, &lapic_resource); | ||
1737 | |||
1738 | return 0; | ||
1739 | } | ||
1740 | |||
1741 | /* | ||
1742 | * need call insert after e820_reserve_resources() | ||
1743 | * that is using request_resource | ||
1744 | */ | ||
1745 | late_initcall(lapic_insert_resource); | ||