aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel
diff options
context:
space:
mode:
authorAkinobu Mita <mita@miraclelinux.com>2006-03-24 06:15:11 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-24 10:33:15 -0500
commit3d1712c91df01d2573b934e972e231e8edb102c7 (patch)
tree71ed84ab8e8a59517ec1b7b1af082adc2beb1758 /arch/x86_64/kernel
parent9b04c997b1120feefa1e6ee8e2902270bc055cd2 (diff)
[PATCH] x86_64: {set,clear,test}_bit() related cleanup and pci_mmcfg_init() fix
While working on these patch set, I found several possible cleanup on x86-64 and ia64. akpm: I stole this from Andi's queue. Not only does it clean up bitops. It also unrelatedly changes the prototype of pci_mmcfg_init() and removes its arch_initcall(). It seems that the wrong two patches got joined together, but this is the one which has been tested. This patch fixes the current x86_64 build error (the pci_mmcfg_init() declaration in arch/i386/pci/pci.h disagrees with the definition in arch/x86_64/pci/mmconfig.c) This also means that x86_64's pci_mmcfg_init() gets called in the same (new) manner as x86's: from arch/i386/pci/init.c:pci_access_init(), rather than via initcall. The bitops cleanups came along for free. All this worked OK in -mm testing (since 2.6.16-rc4-mm1) because x86_64 was tested with both patches applied. Signed-off-by: Akinobu Mita <mita@miraclelinux.com> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Con Kolivas <kernel@kolivas.org> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel')
-rw-r--r--arch/x86_64/kernel/mce.c3
-rw-r--r--arch/x86_64/kernel/setup.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c
index b8b9529fa89e..04282ef9fbd4 100644
--- a/arch/x86_64/kernel/mce.c
+++ b/arch/x86_64/kernel/mce.c
@@ -139,8 +139,7 @@ static void mce_panic(char *msg, struct mce *backup, unsigned long start)
139 139
140static int mce_available(struct cpuinfo_x86 *c) 140static int mce_available(struct cpuinfo_x86 *c)
141{ 141{
142 return test_bit(X86_FEATURE_MCE, &c->x86_capability) && 142 return cpu_has(c, X86_FEATURE_MCE) && cpu_has(c, X86_FEATURE_MCA);
143 test_bit(X86_FEATURE_MCA, &c->x86_capability);
144} 143}
145 144
146static inline void mce_get_rip(struct mce *m, struct pt_regs *regs) 145static inline void mce_get_rip(struct mce *m, struct pt_regs *regs)
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index aa55e3cec665..f227d0c23dc6 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -1344,8 +1344,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
1344 { 1344 {
1345 int i; 1345 int i;
1346 for ( i = 0 ; i < 32*NCAPINTS ; i++ ) 1346 for ( i = 0 ; i < 32*NCAPINTS ; i++ )
1347 if ( test_bit(i, &c->x86_capability) && 1347 if (cpu_has(c, i) && x86_cap_flags[i] != NULL)
1348 x86_cap_flags[i] != NULL )
1349 seq_printf(m, " %s", x86_cap_flags[i]); 1348 seq_printf(m, " %s", x86_cap_flags[i]);
1350 } 1349 }
1351 1350