public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Adrian Bunk <bunk@kernel.org>
Cc: Alexey Starikovskiy <astarikovskiy@suse.de>,
	tglx@linutronix.de, hpa@zytor.com,
	James.Bottomley@HansenPartnership.com,
	linux-kernel@vger.kernel.org
Subject: Re: Voyager phys_cpu_present_map compile error
Date: Mon, 21 Apr 2008 22:14:34 +0200	[thread overview]
Message-ID: <20080421201434.GN8770@elte.hu> (raw)
In-Reply-To: <20080421132705.GG6011@cs181133002.pp.htv.fi>


* Adrian Bunk <bunk@kernel.org> wrote:

> > +#ifndef CONFIG_X86_VOYAGER
> >  /* Bitmask of physically existing CPUs */
> >  physid_mask_t phys_cpu_present_map;
> > +#endif
> >...
> 
> Alexey noted that phys_cpu_present_map for Voyager and !Voyager also 
> have different types and suggested to make the Voyager one static 
> instead (additional renaming of the Voyager one also makes sense).

yep, done by the patch below.

	Ingo

------------>
Subject: x86: make phys_cpu_present_map static in Voyager
From: Alexey Starikovskiy <astarikovskiy@suse.de>
Date: Tue, 22 Apr 2008 00:03:14 +0400

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/mach-voyager/voyager_smp.c |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Index: linux-x86.q/arch/x86/mach-voyager/voyager_smp.c
===================================================================
--- linux-x86.q.orig/arch/x86/mach-voyager/voyager_smp.c
+++ linux-x86.q/arch/x86/mach-voyager/voyager_smp.c
@@ -74,7 +74,7 @@ EXPORT_SYMBOL(cpu_online_map);
 
 /* Bitmask of CPUs present in the system - exported by i386_syms.c, used
  * by scheduler but indexed physically */
-cpumask_t phys_cpu_present_map = CPU_MASK_NONE;
+static cpumask_t voyager_phys_cpu_present_map = CPU_MASK_NONE;
 
 /* The internal functions */
 static void send_CPI(__u32 cpuset, __u8 cpi);
@@ -378,19 +378,19 @@ void __init find_smp_config(void)
 	/* set up everything for just this CPU, we can alter
 	 * this as we start the other CPUs later */
 	/* now get the CPU disposition from the extended CMOS */
-	cpus_addr(phys_cpu_present_map)[0] =
+	cpus_addr(voyager_phys_cpu_present_map)[0] =
 	    voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK);
-	cpus_addr(phys_cpu_present_map)[0] |=
+	cpus_addr(voyager_phys_cpu_present_map)[0] |=
 	    voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 1) << 8;
-	cpus_addr(phys_cpu_present_map)[0] |=
+	cpus_addr(voyager_phys_cpu_present_map)[0] |=
 	    voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK +
 				       2) << 16;
-	cpus_addr(phys_cpu_present_map)[0] |=
+	cpus_addr(voyager_phys_cpu_present_map)[0] |=
 	    voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK +
 				       3) << 24;
-	cpu_possible_map = phys_cpu_present_map;
-	printk("VOYAGER SMP: phys_cpu_present_map = 0x%lx\n",
-	       cpus_addr(phys_cpu_present_map)[0]);
+	cpu_possible_map = voyager_phys_cpu_present_map;
+	printk("VOYAGER SMP: voyager_phys_cpu_present_map = 0x%lx\n",
+	       cpus_addr(voyager_phys_cpu_present_map)[0]);
 	/* Here we set up the VIC to enable SMP */
 	/* enable the CPIs by writing the base vector to their register */
 	outb(VIC_DEFAULT_CPI_BASE, VIC_CPI_BASE_REGISTER);
@@ -649,15 +649,15 @@ void __init smp_boot_cpus(void)
 		/* now that the cat has probed the Voyager System Bus, sanity
 		 * check the cpu map */
 		if (((voyager_quad_processors | voyager_extended_vic_processors)
-		     & cpus_addr(phys_cpu_present_map)[0]) !=
-		    cpus_addr(phys_cpu_present_map)[0]) {
+		     & cpus_addr(voyager_phys_cpu_present_map)[0]) !=
+		    cpus_addr(voyager_phys_cpu_present_map)[0]) {
 			/* should panic */
 			printk("\n\n***WARNING*** "
 			       "Sanity check of CPU present map FAILED\n");
 		}
 	} else if (voyager_level == 4)
 		voyager_extended_vic_processors =
-		    cpus_addr(phys_cpu_present_map)[0];
+		    cpus_addr(voyager_phys_cpu_present_map)[0];
 
 	/* this sets up the idle task to run on the current cpu */
 	voyager_extended_cpus = 1;
@@ -689,7 +689,7 @@ void __init smp_boot_cpus(void)
 	/* loop over all the extended VIC CPUs and boot them.  The
 	 * Quad CPUs must be bootstrapped by their extended VIC cpu */
 	for (i = 0; i < NR_CPUS; i++) {
-		if (i == boot_cpu_id || !cpu_isset(i, phys_cpu_present_map))
+		if (i == boot_cpu_id || !cpu_isset(i, voyager_phys_cpu_present_map))
 			continue;
 		do_boot_cpu(i);
 		/* This udelay seems to be needed for the Quad boots

  reply	other threads:[~2008-04-21 20:15 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-21  0:02 Voyager phys_cpu_present_map compile error Adrian Bunk
2008-04-21  8:53 ` Adrian Bunk
2008-04-21 12:00   ` Ingo Molnar
2008-04-21 12:55     ` H. Peter Anvin
2008-04-21 14:10       ` Status of SGI 320/540 (Visual Workstation) support? Adrian Bunk
2008-04-22  6:19         ` Andrey Panin
2008-04-22 13:29       ` Voyager phys_cpu_present_map compile error Andrew Morton
2008-04-22 15:25         ` Andy Whitcroft
2008-04-21 13:00     ` H. Peter Anvin
2008-04-21 15:42       ` James Bottomley
2008-04-21 20:03         ` Ingo Molnar
2008-04-21 23:08           ` James Bottomley
2008-04-21 19:55       ` Ingo Molnar
2008-04-21 20:03         ` H. Peter Anvin
2008-04-21 20:11           ` Ingo Molnar
2008-04-21 20:10             ` H. Peter Anvin
2008-04-23  8:53             ` Pavel Machek
2008-04-21 13:27     ` Adrian Bunk
2008-04-21 20:14       ` Ingo Molnar [this message]
2008-04-21 21:57         ` James Bottomley
2008-04-25 14:50         ` James Bottomley
2008-04-25 16:17           ` Adrian Bunk
2008-04-25 16:33             ` James Bottomley
2008-04-28 17:59               ` Ingo Molnar
2008-04-28 19:09                 ` James Bottomley
2008-04-21 15:58     ` James Bottomley
2008-04-21 19:51       ` Ingo Molnar
2008-04-21 20:09         ` Adrian Bunk
2008-04-21 20:13           ` Ingo Molnar
2008-04-21 20:26             ` Adrian Bunk
2008-04-21 20:29               ` Ingo Molnar
2008-04-21 21:02                 ` Adrian Bunk
2008-04-21 22:31                   ` Ingo Molnar
2008-04-26  7:43                     ` Pavel Machek
2008-04-27  0:44                       ` H. Peter Anvin
2008-04-27  1:06                         ` Adrian Bunk
2008-04-27  1:45                           ` H. Peter Anvin

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=20080421201434.GN8770@elte.hu \
    --to=mingo@elte.hu \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=astarikovskiy@suse.de \
    --cc=bunk@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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