mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tigran Aivazian <tigran@veritas.com>
To: Keith Owens <kaos@melbourne.sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: [patch] fixes for kdb on 2.4.0-test11-pre5
Date: Wed, 15 Nov 2000 03:40:03 -0800 (PST)	[thread overview]
Message-ID: <Pine.GSO.4.21.0011150337390.19024-100000@megami.veritas.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0010260236110.29491-100000@megami.veritas.com>

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.

Regards,
Tigran

--- 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_MCE, &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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

       reply	other threads:[~2000-11-15 12:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.GSO.4.21.0010260236110.29491-100000@megami.veritas.com>
2000-11-15 11:40 ` Tigran Aivazian [this message]
2000-11-15 14:56   ` Tigran Aivazian
2000-11-15 15:18     ` Tigran Aivazian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.21.0011150337390.19024-100000@megami.veritas.com \
    --to=tigran@veritas.com \
    --cc=kaos@melbourne.sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®