Commit 2387ce57 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: make 64bit hpet_set_mapping to use ioremap too, v2

keep the one for VSYSCALL_HPET
Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 87a1c441
...@@ -36,26 +36,15 @@ static inline void hpet_writel(unsigned long d, unsigned long a) ...@@ -36,26 +36,15 @@ static inline void hpet_writel(unsigned long d, unsigned long a)
} }
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
#include <asm/pgtable.h> #include <asm/pgtable.h>
#endif
static inline void hpet_set_mapping(void)
{
set_fixmap_nocache(FIX_HPET_BASE, hpet_address);
__set_fixmap(VSYSCALL_HPET, hpet_address, PAGE_KERNEL_VSYSCALL_NOCACHE);
hpet_virt_address = (void __iomem *)fix_to_virt(FIX_HPET_BASE);
}
static inline void hpet_clear_mapping(void)
{
hpet_virt_address = NULL;
}
#else
static inline void hpet_set_mapping(void) static inline void hpet_set_mapping(void)
{ {
hpet_virt_address = ioremap_nocache(hpet_address, HPET_MMAP_SIZE); hpet_virt_address = ioremap_nocache(hpet_address, HPET_MMAP_SIZE);
#ifdef CONFIG_X86_64
__set_fixmap(VSYSCALL_HPET, hpet_address, PAGE_KERNEL_VSYSCALL_NOCACHE);
#endif
} }
static inline void hpet_clear_mapping(void) static inline void hpet_clear_mapping(void)
...@@ -63,7 +52,6 @@ static inline void hpet_clear_mapping(void) ...@@ -63,7 +52,6 @@ static inline void hpet_clear_mapping(void)
iounmap(hpet_virt_address); iounmap(hpet_virt_address);
hpet_virt_address = NULL; hpet_virt_address = NULL;
} }
#endif
/* /*
* HPET command line enable / disable * HPET command line enable / disable
......
...@@ -40,7 +40,6 @@ enum fixed_addresses { ...@@ -40,7 +40,6 @@ enum fixed_addresses {
VSYSCALL_HPET, VSYSCALL_HPET,
FIX_DBGP_BASE, FIX_DBGP_BASE,
FIX_EARLYCON_MEM_BASE, FIX_EARLYCON_MEM_BASE,
FIX_HPET_BASE,
FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */
FIX_IO_APIC_BASE_0, FIX_IO_APIC_BASE_0,
FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS - 1, FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS - 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment