public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin J. Bligh" <mbligh@aracnet.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] (4/7) move one more to subarch, general tidy up
Date: Tue, 07 Jan 2003 12:24:52 -0800	[thread overview]
Message-ID: <597900000.1041971092@titus> (raw)

Moves check_phys_apicid_present() into subarch, and cleans up a
couple of stupid errors, and some bracketing issues in the macros.

diff -urpN -X /home/fletch/.diff.exclude 03-boot_error/arch/i386/kernel/smpboot.c 04-more_numaq1/arch/i386/kernel/smpboot.c
--- 03-boot_error/arch/i386/kernel/smpboot.c	Tue Jan  7 09:25:53 2003
+++ 04-more_numaq1/arch/i386/kernel/smpboot.c	Tue Jan  7 09:26:53 2003
@@ -821,7 +821,7 @@ static int __init do_boot_cpu(int apicid
 	unsigned long boot_error;
 	int timeout, cpu;
 	unsigned long start_eip;
-	unsigned short nmi_high, nmi_low;
+	unsigned short nmi_high = 0, nmi_low = 0;

 	cpu = ++cpucount;
 	/*
@@ -1052,10 +1052,9 @@ static void __init smp_boot_cpus(unsigne
 	 * CPU too, but we do it for the sake of robustness anyway.
 	 * Makes no sense to do this check in clustered apic mode, so skip it
 	 */
-	if (!clustered_apic_mode &&
-	    !test_bit(boot_cpu_physical_apicid, &phys_cpu_present_map)) {
+	if (!check_phys_apicid_present(boot_cpu_physical_apicid)) {
 		printk("weird, boot CPU (#%d) not listed by the BIOS.\n",
-							boot_cpu_physical_apicid);
+				boot_cpu_physical_apicid);
 		phys_cpu_present_map |= (1 << hard_smp_processor_id());
 	}

diff -urpN -X /home/fletch/.diff.exclude 03-boot_error/include/asm-i386/mach-default/mach_apic.h 04-more_numaq1/include/asm-i386/mach-default/mach_apic.h
--- 03-boot_error/include/asm-i386/mach-default/mach_apic.h	Tue Jan  7 09:24:35 2003
+++ 04-more_numaq1/include/asm-i386/mach-default/mach_apic.h	Tue Jan  7 09:26:53 2003
@@ -84,4 +84,9 @@ static inline void setup_portio_remap(vo
 {
 }

+static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
+{
+	return test_bit(boot_cpu_physical_apicid, &phys_cpu_present_map);
+}
+
 #endif /* __ASM_MACH_APIC_H */
diff -urpN -X /home/fletch/.diff.exclude 03-boot_error/include/asm-i386/mach-numaq/mach_apic.h 04-more_numaq1/include/asm-i386/mach-numaq/mach_apic.h
--- 03-boot_error/include/asm-i386/mach-numaq/mach_apic.h	Tue Jan  7 09:24:35 2003
+++ 04-more_numaq1/include/asm-i386/mach-numaq/mach_apic.h	Tue Jan  7 09:26:53 2003
@@ -1,14 +1,14 @@
 #ifndef __ASM_MACH_APIC_H
 #define __ASM_MACH_APIC_H

-#define APIC_DFR_VALUE	(APIC_DFR_FLAT)
+#define APIC_DFR_VALUE	(APIC_DFR_CLUSTER)

 #define TARGET_CPUS (0xf)

 #define no_balance_irq (1)

 #define APIC_BROADCAST_ID      0x0F
-#define check_apicid_used(bitmap, apicid) (bitmap & (1 << apicid))
+#define check_apicid_used(bitmap, apicid) ((bitmap) & (1 << (apicid)))

 static inline int apic_id_registered(void)
 {
@@ -26,6 +26,10 @@ static inline void clustered_apic_check(
 		"NUMA-Q", nr_ioapics);
 }

+/*
+ * Skip adding the timer int on secondary nodes, which causes
+ * a small but painful rift in the time-space continuum.
+ */
 static inline int multi_timer_check(int apic, int irq)
 {
 	return (apic != 0 && irq == 0);
@@ -80,6 +84,11 @@ static inline void setup_portio_remap(vo
 	xquad_portio = ioremap (XQUAD_PORTIO_BASE, numnodes*XQUAD_PORTIO_QUAD);
 	printk("xquad_portio vaddr 0x%08lx, len %08lx\n",
 		(u_long) xquad_portio, (u_long) numnodes*XQUAD_PORTIO_QUAD);
+}
+
+static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
+{
+	return (1);
 }

 #endif /* __ASM_MACH_APIC_H */
diff -urpN -X /home/fletch/.diff.exclude 03-boot_error/include/asm-i386/mach-summit/mach_apic.h 04-more_numaq1/include/asm-i386/mach-summit/mach_apic.h
--- 03-boot_error/include/asm-i386/mach-summit/mach_apic.h	Tue Jan  7 09:24:35 2003
+++ 04-more_numaq1/include/asm-i386/mach-summit/mach_apic.h	Tue Jan  7 09:26:53 2003
@@ -65,4 +65,9 @@ static inline void setup_portio_remap(vo
 {
 }

+static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
+{
+	return (1);
+}
+
 #endif /* __ASM_MACH_APIC_H */
diff -urpN -X /home/fletch/.diff.exclude 03-boot_error/include/asm-i386/smp.h 04-more_numaq1/include/asm-i386/smp.h
--- 03-boot_error/include/asm-i386/smp.h	Thu Jan  2 22:05:15 2003
+++ 04-more_numaq1/include/asm-i386/smp.h	Tue Jan  7 09:26:53 2003
@@ -22,7 +22,7 @@
 #endif
 #endif

-#ifdef CONFIG_CLUSTERED_APIC
+#ifdef CONFIG_X86_NUMAQ
  #define INT_DELIVERY_MODE 0     /* physical delivery on LOCAL quad */
 #else
  #define INT_DELIVERY_MODE 1     /* logical delivery broadcast to all procs */


                 reply	other threads:[~2003-01-07 20:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=597900000.1041971092@titus \
    --to=mbligh@aracnet.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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