On Wed, 15 Nov 2000, Tigran Aivazian wrote:

> Hi Keith,
> 
> Here is some fixes related to x86 capabilities changes in test11-pre5.
> Against your latest patch (test11-pre5) from oss.sgi. Tested under
> test11-pre5 on SMP.
> 

small (but important!) typo fixed, thanks to George
<[EMAIL PROTECTED]>. Here is updated patch:

--- arch/i386/kernel/traps.c.0  Wed Nov 15 11:20:34 2000
+++ arch/i386/kernel/traps.c    Wed Nov 15 11:28:20 2000
@@ -1213,8 +1213,8 @@
        set_trap_gate(12,&stack_segment);
        set_trap_gate(13,&general_protection);
 #if defined(CONFIG_KDB)
-       if ((boot_cpu_data.x86_capability & X86_FEATURE_MCE) &&
-           (boot_cpu_data.x86_capability & X86_FEATURE_MCA)) {
+       if (test_bit(X86_FEATURE_MCE, &boot_cpu_data.x86_capability) &&
+           test_bit(X86_FEATURE_MCA, &boot_cpu_data.x86_capability)) {
                set_trap_gate(14,&page_fault_mca);
        }
        else {
--- arch/i386/kernel/apic.c.0   Wed Nov 15 11:26:27 2000
+++ arch/i386/kernel/apic.c     Wed Nov 15 11:28:12 2000
@@ -210,7 +210,8 @@
 int set_nmi_counter_local(void)
 {
        extern unsigned long cpu_khz;
-       if (!(boot_cpu_data.x86_capability & X86_FEATURE_APIC))
+
+       if (test_bit(X86_FEATURE_APIC, &boot_cpu_data.x86_capability))
                return(-EIO);
        if (nmi_watchdog_source && nmi_watchdog_source != 1)
                return(0);      /* Not using local APIC */
@@ -224,7 +225,8 @@
 int setup_apic_nmi_watchdog(int value)
 {
        int ret, eax;
-       if (!(boot_cpu_data.x86_capability & X86_FEATURE_APIC))
+
+       if (!test_bit(X86_FEATURE_APIC, &boot_cpu_data.x86_capability))
                return(-EIO);
        if (nmi_watchdog_source && nmi_watchdog_source != 1)
                return(0);      /* Not using local APIC */
--- arch/i386/kdb/kdbasupport.c.0       Wed Nov 15 11:29:16 2000
+++ arch/i386/kdb/kdbasupport.c Wed Nov 15 11:33:37 2000
@@ -1081,11 +1081,8 @@
        /*
         * Enable Machine Check Exceptions
         */
-       u32 x86_capability;
-
-       x86_capability = boot_cpu_data.x86_capability;
-       if ((x86_capability & X86_FEATURE_MCE) &&
-           (x86_capability & X86_FEATURE_MCA)) {
+       if (test_bit(X86_FEATURE_MCE, &boot_cpu_data.x86_capability) &&
+           test_bit(X86_FEATURE_MCA, &boot_cpu_data.x86_capability)) {
                u32 i, lv, hv, count;
                rdmsr(MCG_CAP, lv, hv);
                count = lv&0xff;
@@ -1141,7 +1138,7 @@
 {
        u32  lv, hv;
 
-       if (!(boot_cpu_data.x86_capability & X86_FEATURE_MCA)) {
+       if (!test_bit(X86_FEATURE_MCA, &boot_cpu_data.x86_capability)) {
                if (lbr_warned) {
                        kdb_printf("kdb: machine does not support last branch 
recording\n");
                        lbr_warned = 1;
@@ -1173,7 +1170,7 @@
 {
        u32  lv, hv;
 
-       if (!(boot_cpu_data.x86_capability & X86_FEATURE_MCA)) {
+       if (!test_bit(X86_FEATURE_MCA, &boot_cpu_data.x86_capability)) {
                if (lbr_warned) {
                        kdb_printf("kdb: machine does not support last branch 
recording\n");
                        lbr_warned = 1;
@@ -1205,9 +1202,8 @@
 {
        u32  from, to, dummy;
 
-       if (!(boot_cpu_data.x86_capability & X86_FEATURE_MCA)) {
+       if (!test_bit(X86_FEATURE_MCA, &boot_cpu_data.x86_capability))
                return;
-       }
 
        rdmsr(LASTBRANCHFROMIP, from, dummy);
        rdmsr(LASTBRANCHTOIP, to, dummy);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to