aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-01-30 07:33:43 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:43 -0500
commit718f94974d59f57a57480d2448beee05720ab237 (patch)
tree07540a15f039303ddac1412dbba15c5744dc217b /arch/x86
parent851339b1ffc2b215c7c4e448465e78a4c2f643f2 (diff)
x86: cleanup boot_ioremap_32.c
Coding style cleanup before modifying the file. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/mm/boot_ioremap_32.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/x86/mm/boot_ioremap_32.c b/arch/x86/mm/boot_ioremap_32.c
index b20f74a2770f..7ede1e3e1f42 100644
--- a/arch/x86/mm/boot_ioremap_32.c
+++ b/arch/x86/mm/boot_ioremap_32.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/i386/mm/boot_ioremap.c 2 * arch/i386/mm/boot_ioremap.c
3 * 3 *
4 * Re-map functions for early boot-time before paging_init() when the 4 * Re-map functions for early boot-time before paging_init() when the
5 * boot-time pagetables are still in use 5 * boot-time pagetables are still in use
6 * 6 *
7 * Written by Dave Hansen <haveblue@us.ibm.com> 7 * Written by Dave Hansen <haveblue@us.ibm.com>
@@ -23,15 +23,15 @@
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/stddef.h> 24#include <linux/stddef.h>
25 25
26/* 26/*
27 * I'm cheating here. It is known that the two boot PTE pages are 27 * I'm cheating here. It is known that the two boot PTE pages are
28 * allocated next to each other. I'm pretending that they're just 28 * allocated next to each other. I'm pretending that they're just
29 * one big array. 29 * one big array.
30 */ 30 */
31 31
32#define BOOT_PTE_PTRS (PTRS_PER_PTE*2) 32#define BOOT_PTE_PTRS (PTRS_PER_PTE*2)
33 33
34static unsigned long boot_pte_index(unsigned long vaddr) 34static unsigned long boot_pte_index(unsigned long vaddr)
35{ 35{
36 return __pa(vaddr) >> PAGE_SHIFT; 36 return __pa(vaddr) >> PAGE_SHIFT;
37} 37}
@@ -47,7 +47,7 @@ static inline boot_pte_t* boot_vaddr_to_pte(void *address)
47 * phys_addr and virtual_source, and who also has a preference 47 * phys_addr and virtual_source, and who also has a preference
48 * about which virtual address from which to steal ptes 48 * about which virtual address from which to steal ptes
49 */ 49 */
50static void __boot_ioremap(unsigned long phys_addr, unsigned long nrpages, 50static void __boot_ioremap(unsigned long phys_addr, unsigned long nrpages,
51 void* virtual_source) 51 void* virtual_source)
52{ 52{
53 boot_pte_t* pte; 53 boot_pte_t* pte;
@@ -70,7 +70,7 @@ static __initdata char boot_ioremap_space[BOOT_IOREMAP_SIZE]
70/* 70/*
71 * This only applies to things which need to ioremap before paging_init() 71 * This only applies to things which need to ioremap before paging_init()
72 * bt_ioremap() and plain ioremap() are both useless at this point. 72 * bt_ioremap() and plain ioremap() are both useless at this point.
73 * 73 *
74 * When used, we're still using the boot-time pagetables, which only 74 * When used, we're still using the boot-time pagetables, which only
75 * have 2 PTE pages mapping the first 8MB 75 * have 2 PTE pages mapping the first 8MB
76 * 76 *
@@ -82,18 +82,18 @@ __init void* boot_ioremap(unsigned long phys_addr, unsigned long size)
82{ 82{
83 unsigned long last_addr, offset; 83 unsigned long last_addr, offset;
84 unsigned int nrpages; 84 unsigned int nrpages;
85 85
86 last_addr = phys_addr + size - 1; 86 last_addr = phys_addr + size - 1;
87 87
88 /* page align the requested address */ 88 /* page align the requested address */
89 offset = phys_addr & ~PAGE_MASK; 89 offset = phys_addr & ~PAGE_MASK;
90 phys_addr &= PAGE_MASK; 90 phys_addr &= PAGE_MASK;
91 size = PAGE_ALIGN(last_addr) - phys_addr; 91 size = PAGE_ALIGN(last_addr) - phys_addr;
92 92
93 nrpages = size >> PAGE_SHIFT; 93 nrpages = size >> PAGE_SHIFT;
94 if (nrpages > BOOT_IOREMAP_PAGES) 94 if (nrpages > BOOT_IOREMAP_PAGES)
95 return NULL; 95 return NULL;
96 96
97 __boot_ioremap(phys_addr, nrpages, boot_ioremap_space); 97 __boot_ioremap(phys_addr, nrpages, boot_ioremap_space);
98 98
99 return &boot_ioremap_space[offset]; 99 return &boot_ioremap_space[offset];