aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorAndreas Herrmann <andreas.herrmann3@amd.com>2008-06-10 10:05:39 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-12 04:14:24 -0400
commitcd7a4e936d345ab4cb49d68192d90bd4e4c58458 (patch)
treed6f3157fef2cb268fee2bfbaa729d932fefaf470 /arch/x86/mm
parent97cfab6ac4ddfda0d722393bbf46cc40bc332107 (diff)
x86: PAT: fixed checkpatch errors (and whitespaces)
x86: PAT: fixed checkpatch errors (and whitespaces) Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/pat.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 65105b1195a3..a8b69bb26972 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -66,7 +66,7 @@ enum {
66 PAT_UC_MINUS = 7, /* UC, but can be overriden by MTRR */ 66 PAT_UC_MINUS = 7, /* UC, but can be overriden by MTRR */
67}; 67};
68 68
69#define PAT(x,y) ((u64)PAT_ ## y << ((x)*8)) 69#define PAT(x, y) ((u64)PAT_ ## y << ((x)*8))
70 70
71void pat_init(void) 71void pat_init(void)
72{ 72{
@@ -100,8 +100,8 @@ void pat_init(void)
100 * 011 UC _PAGE_CACHE_UC 100 * 011 UC _PAGE_CACHE_UC
101 * PAT bit unused 101 * PAT bit unused
102 */ 102 */
103 pat = PAT(0,WB) | PAT(1,WC) | PAT(2,UC_MINUS) | PAT(3,UC) | 103 pat = PAT(0, WB) | PAT(1, WC) | PAT(2, UC_MINUS) | PAT(3, UC) |
104 PAT(4,WB) | PAT(5,WC) | PAT(6,UC_MINUS) | PAT(7,UC); 104 PAT(4, WB) | PAT(5, WC) | PAT(6, UC_MINUS) | PAT(7, UC);
105 105
106 /* Boot CPU check */ 106 /* Boot CPU check */
107 if (!boot_pat_state) 107 if (!boot_pat_state)
@@ -117,11 +117,11 @@ void pat_init(void)
117static char *cattr_name(unsigned long flags) 117static char *cattr_name(unsigned long flags)
118{ 118{
119 switch (flags & _PAGE_CACHE_MASK) { 119 switch (flags & _PAGE_CACHE_MASK) {
120 case _PAGE_CACHE_UC: return "uncached"; 120 case _PAGE_CACHE_UC: return "uncached";
121 case _PAGE_CACHE_UC_MINUS: return "uncached-minus"; 121 case _PAGE_CACHE_UC_MINUS: return "uncached-minus";
122 case _PAGE_CACHE_WB: return "write-back"; 122 case _PAGE_CACHE_WB: return "write-back";
123 case _PAGE_CACHE_WC: return "write-combining"; 123 case _PAGE_CACHE_WC: return "write-combining";
124 default: return "broken"; 124 default: return "broken";
125 } 125 }
126} 126}
127 127
@@ -536,11 +536,11 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
536 * we maintain the tradition of paranoia in this code. 536 * we maintain the tradition of paranoia in this code.
537 */ 537 */
538 if (!pat_wc_enabled && 538 if (!pat_wc_enabled &&
539 ! ( boot_cpu_has(X86_FEATURE_MTRR) || 539 !(boot_cpu_has(X86_FEATURE_MTRR) ||
540 boot_cpu_has(X86_FEATURE_K6_MTRR) || 540 boot_cpu_has(X86_FEATURE_K6_MTRR) ||
541 boot_cpu_has(X86_FEATURE_CYRIX_ARR) || 541 boot_cpu_has(X86_FEATURE_CYRIX_ARR) ||
542 boot_cpu_has(X86_FEATURE_CENTAUR_MCR)) && 542 boot_cpu_has(X86_FEATURE_CENTAUR_MCR)) &&
543 (pfn << PAGE_SHIFT) >= __pa(high_memory)) { 543 (pfn << PAGE_SHIFT) >= __pa(high_memory)) {
544 flags = _PAGE_CACHE_UC; 544 flags = _PAGE_CACHE_UC;
545 } 545 }
546#endif 546#endif
@@ -562,7 +562,7 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
562 return 0; 562 return 0;
563 563
564 if (pfn <= max_pfn_mapped && 564 if (pfn <= max_pfn_mapped &&
565 ioremap_change_attr((unsigned long)__va(offset), size, flags) < 0) { 565 ioremap_change_attr((unsigned long)__va(offset), size, flags) < 0) {
566 free_memtype(offset, offset + size); 566 free_memtype(offset, offset + size);
567 printk(KERN_INFO 567 printk(KERN_INFO
568 "%s:%d /dev/mem ioremap_change_attr failed %s for %Lx-%Lx\n", 568 "%s:%d /dev/mem ioremap_change_attr failed %s for %Lx-%Lx\n",
@@ -600,4 +600,3 @@ void unmap_devmem(unsigned long pfn, unsigned long size, pgprot_t vma_prot)
600 600
601 free_memtype(addr, addr + size); 601 free_memtype(addr, addr + size);
602} 602}
603