[PATCH] x86: make 64bit hpet_set_mapping to use ioremap too v2

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Yinghai Lu
Date: Sunday, July 13, 2008 - 2:50 pm

need to apply after
	[PATCH] x86: get x86_phys_bits early

keep the one for VSYSCALL_HPET

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>

---
 arch/x86/kernel/hpet.c      |   20 ++++----------------
 include/asm-x86/fixmap_64.h |    1 -
 2 files changed, 4 insertions(+), 17 deletions(-)

Index: linux-2.6/arch/x86/kernel/hpet.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/hpet.c
+++ linux-2.6/arch/x86/kernel/hpet.c
@@ -36,26 +36,15 @@ static inline void hpet_writel(unsigned
 }
 
 #ifdef CONFIG_X86_64
-
 #include <asm/pgtable.h>
-
-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
+#endif
 
 static inline void hpet_set_mapping(void)
 {
 	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)
@@ -63,7 +52,6 @@ static inline void hpet_clear_mapping(vo
 	iounmap(hpet_virt_address);
 	hpet_virt_address = NULL;
 }
-#endif
 
 /*
  * HPET command line enable / disable
Index: linux-2.6/include/asm-x86/fixmap_64.h
===================================================================
--- linux-2.6.orig/include/asm-x86/fixmap_64.h
+++ linux-2.6/include/asm-x86/fixmap_64.h
@@ -40,7 +40,6 @@ enum fixed_addresses {
 	VSYSCALL_HPET,
 	FIX_DBGP_BASE,
 	FIX_EARLYCON_MEM_BASE,
-	FIX_HPET_BASE,
 	FIX_APIC_BASE,	/* local (CPU) APIC) -- required for SMP or not */
 	FIX_IO_APIC_BASE_0,
 	FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS - 1,
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86: introduce page_size_mask for 64bit, Yinghai Lu, (Tue Jul 8, 1:41 am)
Re: [PATCH] x86: introduce page_size_mask for 64bit, Ingo Molnar, (Wed Jul 9, 12:38 am)
[PATCH] x86: merge __acpi_map_table, Yinghai Lu, (Wed Jul 9, 8:16 pm)
Re: [PATCH] x86: merge __acpi_map_table, Ingo Molnar, (Wed Jul 9, 11:54 pm)
Re: [PATCh] x86: overmapped fix when 4K pages on tail - 64bit, Arjan van de Ven, (Thu Jul 10, 7:16 am)
[PATCH] x86: save slit, Yinghai Lu, (Thu Jul 10, 8:36 pm)
[PATCH] x86: introduce max_low_pfn_mapped for 64bit, Yinghai Lu, (Thu Jul 10, 8:38 pm)
Re: [PATCH] x86: save slit, Ingo Molnar, (Fri Jul 11, 1:22 am)
[PATCH] x86: let 32bit use apic_ops too, Yinghai Lu, (Fri Jul 11, 6:41 pm)
[PATCH] x86: make read_apic_id return final apicid, Yinghai Lu, (Fri Jul 11, 6:44 pm)
[PATCH] x86: make 64bit have get_apic_id, Yinghai Lu, (Sat Jul 12, 1:01 am)
[PATCH] x86: max_low_pfn_mapped fix #1, Yinghai Lu, (Sat Jul 12, 2:30 pm)
[PATCH] x86: max_low_pfn_mapped fix #2, Yinghai Lu, (Sat Jul 12, 2:31 pm)
[PATCH] x86: max_low_pfn_mapped fix #3, Yinghai Lu, (Sat Jul 12, 2:32 pm)
Re: [PATCH] x86: let 32bit use apic_ops too, Suresh Siddha, (Sat Jul 12, 6:08 pm)
Re: [PATCH] x86: make read_apic_id return final apicid, Suresh Siddha, (Sat Jul 12, 6:19 pm)
Re: [PATCH] x86: let 32bit use apic_ops too, Maciej W. Rozycki, (Sat Jul 12, 6:43 pm)
Re: [PATCH] x86: let 32bit use apic_ops too, Yinghai Lu, (Sat Jul 12, 6:45 pm)
Re: [PATCH] x86: let 32bit use apic_ops too, Maciej W. Rozycki, (Sat Jul 12, 6:54 pm)
Re: [PATCH] x86: let 32bit use apic_ops too, Yinghai Lu, (Sat Jul 12, 7:04 pm)
Re: [PATCH] x86: make 64bit have get_apic_id, Ingo Molnar, (Sat Jul 12, 11:28 pm)
Re: [PATCH] x86: make 64bit have get_apic_id, Ingo Molnar, (Sat Jul 12, 11:59 pm)
Re: [PATCH] x86: make 64bit have get_apic_id, Yinghai Lu, (Sun Jul 13, 12:05 am)
Re: [PATCH] x86: make 64bit have get_apic_id, Ingo Molnar, (Sun Jul 13, 2:23 am)
Re: [PATCH] x86: make 64bit have get_apic_id, Ingo Molnar, (Sun Jul 13, 2:28 am)
Re: [PATCH] x86: max_low_pfn_mapped fix #1, Ingo Molnar, (Sun Jul 13, 2:45 am)
Re: [PATCh] x86: overmapped fix when 4K pages on tail - 64bit, Arjan van de Ven, (Sun Jul 13, 8:33 am)
Re: [PATCH] x86: make 64bit have get_apic_id, Suresh Siddha, (Sun Jul 13, 9:15 am)
Re: [PATCH] x86: let 32bit use apic_ops too, Suresh Siddha, (Sun Jul 13, 9:28 am)
Re: [PATCH] x86: let 32bit use apic_ops too, Suresh Siddha, (Sun Jul 13, 9:43 am)
Re: [PATCH] x86: let 32bit use apic_ops too, Maciej W. Rozycki, (Sun Jul 13, 9:51 am)
Re: [PATCH] x86: let 32bit use apic_ops too, Maciej W. Rozycki, (Sun Jul 13, 10:05 am)
Re: [PATCH] x86: let 32bit use apic_ops too, Cyrill Gorcunov, (Sun Jul 13, 10:16 am)
[PATCH] x86: max_low_pfn_mapped fix #4, Yinghai Lu, (Sun Jul 13, 2:29 pm)
[PATCH] x86: get x86_phys_bits early, Yinghai Lu, (Sun Jul 13, 2:30 pm)
[PATCH] x86: make 64bit hpet_set_mapping to use ioremap too v2, Yinghai Lu, (Sun Jul 13, 2:50 pm)
Re: [PATCH] x86: let 32bit use apic_ops too, Maciej W. Rozycki, (Sun Jul 13, 4:46 pm)
[PATCH] x86: let 32bit use apic_ops too - fix, Yinghai Lu, (Sun Jul 13, 10:19 pm)
Re: [PATCH] x86: let 32bit use apic_ops too - fix, Ingo Molnar, (Mon Jul 14, 12:12 am)
Re: [PATCH] x86: let 32bit use apic_ops too, Cyrill Gorcunov, (Mon Jul 14, 9:48 am)
Re: [PATCH] x86: let 32bit use apic_ops too - fix, Suresh Siddha, (Mon Jul 14, 9:49 am)
Re: [PATCH] x86: let 32bit use apic_ops too - fix, Yinghai Lu, (Mon Jul 14, 10:00 am)
Re: [PATCH] x86: let 32bit use apic_ops too, Maciej W. Rozycki, (Mon Jul 14, 10:20 am)
Re: [PATCH] x86: let 32bit use apic_ops too - fix, Suresh Siddha, (Mon Jul 14, 11:03 am)
Re: [PATCH] x86: let 32bit use apic_ops too, Cyrill Gorcunov, (Mon Jul 14, 11:09 am)
Re: [PATCH] x86: let 32bit use apic_ops too, Maciej W. Rozycki, (Mon Jul 14, 11:24 am)
Re: [PATCH] x86: let 32bit use apic_ops too, Cyrill Gorcunov, (Mon Jul 14, 11:32 am)
Re: [PATCH] x86: let 32bit use apic_ops too - fix, Suresh Siddha, (Tue Jul 15, 10:33 am)
Re: [PATCH] x86: let 32bit use apic_ops too - fix, Yinghai Lu, (Tue Jul 15, 11:10 am)
Re: [PATCH] x86: let 32bit use apic_ops too - fix, Suresh Siddha, (Tue Jul 15, 11:27 am)
Re: [PATCH] x86: let 32bit use apic_ops too - fix, Ingo Molnar, (Fri Jul 18, 10:06 am)
Re: [PATCH] x86: let 32bit use apic_ops too - fix, Ingo Molnar, (Fri Jul 18, 10:07 am)