From: "Martin J. Bligh" <mbligh@aracnet.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] 7/8 Move NUMA-Q support into subarch
Date: Sun, 22 Dec 2002 23:00:45 -0800 [thread overview]
Message-ID: <66950000.1040626845@titus> (raw)
This one fixes up the IPI code to do something more sensible.
Sorry, was just too ugly to leave it alone ... but I did keep
it seperated out ;-) Though this is not an equivalent transform
it will only affect NUMA-Q & summit - same op twice because some
twit just split it out in the last patch for both NUMA-Q & Summit.
Because clustered apic logical mode can't do arbitrary broadcasts
of addressing (it's not just a bitmap), I have to do send IPI
instructions as a sequence of unicasts. However, there's already
a loop in the generic send_IPI_mask code to do that ... there's
no need to call send_IPI_mask once for each CPU. The comment I
wrote at the time even noted that this was silly.
diff -urpN -X /home/fletch/.diff.exclude 15-numaq5/include/asm-i386/mach-numaq/mach_ipi.h 16-numaq6/include/asm-i386/mach-numaq/mach_ipi.h
--- 15-numaq5/include/asm-i386/mach-numaq/mach_ipi.h Sun Dec 22 12:11:09 2002
+++ 16-numaq6/include/asm-i386/mach-numaq/mach_ipi.h Sun Dec 22 12:11:34 2002
@@ -10,30 +10,15 @@ static inline void send_IPI_mask(int mas
static inline void send_IPI_allbutself(int vector)
{
- int cpu;
- /*
- * if there are no other CPUs in the system then we get an APIC send
- * error if we try to broadcast, thus avoid sending IPIs in this case.
- */
- if (!(num_online_cpus() > 1))
- return;
+ unsigned long mask = cpu_online_map & ~(1 << smp_processor_id());
- /* Pointless. Use send_IPI_mask to do this instead */
- for (cpu = 0; cpu < NR_CPUS; ++cpu)
- if (cpu_online(cpu) && cpu != smp_processor_id())
- send_IPI_mask(1 << cpu, vector);
-
- return;
+ if (mask)
+ send_IPI_mask(mask, vector);
}
static inline void send_IPI_all(int vector)
{
- int cpu;
-
- /* Pointless. Use send_IPI_mask to do this instead */
- for (cpu = 0; cpu < NR_CPUS; ++cpu)
- if (cpu_online(cpu))
- send_IPI_mask(1 << cpu, vector);
+ send_IPI_mask(cpu_online_map, vector);
}
#endif /* __ASM_MACH_IPI_H */
diff -urpN -X /home/fletch/.diff.exclude 15-numaq5/include/asm-i386/mach-summit/mach_ipi.h 16-numaq6/include/asm-i386/mach-summit/mach_ipi.h
--- 15-numaq5/include/asm-i386/mach-summit/mach_ipi.h Sun Dec 22 12:11:09 2002
+++ 16-numaq6/include/asm-i386/mach-summit/mach_ipi.h Sun Dec 22 12:11:34 2002
@@ -10,30 +10,15 @@ static inline void send_IPI_mask(int mas
static inline void send_IPI_allbutself(int vector)
{
- int cpu;
- /*
- * if there are no other CPUs in the system then we get an APIC send
- * error if we try to broadcast, thus avoid sending IPIs in this case.
- */
- if (!(num_online_cpus() > 1))
- return;
+ unsigned long mask = cpu_online_map & ~(1 << smp_processor_id());
- /* Pointless. Use send_IPI_mask to do this instead */
- for (cpu = 0; cpu < NR_CPUS; ++cpu)
- if (cpu_online(cpu) && cpu != smp_processor_id())
- send_IPI_mask(1 << cpu, vector);
-
- return;
+ if (mask)
+ send_IPI_mask(mask, vector);
}
static inline void send_IPI_all(int vector)
{
- int cpu;
-
- /* Pointless. Use send_IPI_mask to do this instead */
- for (cpu = 0; cpu < NR_CPUS; ++cpu)
- if (cpu_online(cpu))
- send_IPI_mask(1 << cpu, vector);
+ send_IPI_mask(cpu_online_map, vector);
}
#endif /* __ASM_MACH_IPI_H */
reply other threads:[~2002-12-23 6:52 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=66950000.1040626845@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