mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@openvz.org>
To: linux-kernel@vger.kernel.org, "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Yinghai Lu <yinghai@kernel.org>, Don Zickus <dzickus@redhat.com>,
	Cyrill Gorcunov <gorcunov@openvz.org>
Subject: [rfc -tip 1/2] x86, apic: Get rid of some IPI wrappers
Date: Wed, 27 Oct 2010 23:53:54 +0400	[thread overview]
Message-ID: <20101027200806.496446571@openvz.org> (raw)
In-Reply-To: <20101027195352.996250316@openvz.org>

[-- Attachment #1: x86-apic-no-ipi-wrappers --]
[-- Type: text/plain, Size: 7557 bytes --]

They just hide the sameness of methods.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
CC: Don Zickus <dzickus@redhat.com>
---
 arch/x86/kernel/apic/apic_flat_64.c |   17 +++--------------
 arch/x86/kernel/apic/bigsmp_32.c    |    9 ++-------
 arch/x86/kernel/apic/es7000_32.c    |   11 +++--------
 arch/x86/kernel/apic/numaq_32.c     |    9 ++-------
 arch/x86/kernel/apic/summit_32.c    |    9 ++-------
 5 files changed, 12 insertions(+), 43 deletions(-)

Index: linux-2.6.git/arch/x86/kernel/apic/apic_flat_64.c
=====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic/apic_flat_64.c
+++ linux-2.6.git/arch/x86/kernel/apic/apic_flat_64.c
@@ -261,17 +261,6 @@ static void physflat_vector_allocation_d
 	cpumask_set_cpu(cpu, retmask);
 }
 
-static void physflat_send_IPI_mask(const struct cpumask *cpumask, int vector)
-{
-	default_send_IPI_mask_sequence_phys(cpumask, vector);
-}
-
-static void physflat_send_IPI_mask_allbutself(const struct cpumask *cpumask,
-					      int vector)
-{
-	default_send_IPI_mask_allbutself_phys(cpumask, vector);
-}
-
 static void physflat_send_IPI_allbutself(int vector)
 {
 	default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector);
@@ -279,7 +268,7 @@ static void physflat_send_IPI_allbutself
 
 static void physflat_send_IPI_all(int vector)
 {
-	physflat_send_IPI_mask(cpu_online_mask, vector);
+	default_send_IPI_mask_sequence_phys(cpu_online_mask, vector);
 }
 
 static unsigned int physflat_cpu_mask_to_apicid(const struct cpumask *cpumask)
@@ -354,8 +343,8 @@ struct apic apic_physflat =  {
 	.cpu_mask_to_apicid		= physflat_cpu_mask_to_apicid,
 	.cpu_mask_to_apicid_and		= physflat_cpu_mask_to_apicid_and,
 
-	.send_IPI_mask			= physflat_send_IPI_mask,
-	.send_IPI_mask_allbutself	= physflat_send_IPI_mask_allbutself,
+	.send_IPI_mask			= default_send_IPI_mask_sequence_phys,
+	.send_IPI_mask_allbutself	= default_send_IPI_mask_allbutself_phys,
 	.send_IPI_allbutself		= physflat_send_IPI_allbutself,
 	.send_IPI_all			= physflat_send_IPI_all,
 	.send_IPI_self			= apic_send_IPI_self,
Index: linux-2.6.git/arch/x86/kernel/apic/bigsmp_32.c
=====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic/bigsmp_32.c
+++ linux-2.6.git/arch/x86/kernel/apic/bigsmp_32.c
@@ -139,11 +139,6 @@ static int bigsmp_phys_pkg_id(int cpuid_
 	return cpuid_apic >> index_msb;
 }
 
-static inline void bigsmp_send_IPI_mask(const struct cpumask *mask, int vector)
-{
-	default_send_IPI_mask_sequence_phys(mask, vector);
-}
-
 static void bigsmp_send_IPI_allbutself(int vector)
 {
 	default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector);
@@ -151,7 +146,7 @@ static void bigsmp_send_IPI_allbutself(i
 
 static void bigsmp_send_IPI_all(int vector)
 {
-	bigsmp_send_IPI_mask(cpu_online_mask, vector);
+	default_send_IPI_mask_sequence_phys(cpu_online_mask, vector);
 }
 
 static int dmi_bigsmp; /* can be set by dmi scanners */
@@ -236,7 +231,7 @@ struct apic apic_bigsmp = {
 	.cpu_mask_to_apicid		= bigsmp_cpu_mask_to_apicid,
 	.cpu_mask_to_apicid_and		= bigsmp_cpu_mask_to_apicid_and,
 
-	.send_IPI_mask			= bigsmp_send_IPI_mask,
+	.send_IPI_mask			= default_send_IPI_mask_sequence_phys,
 	.send_IPI_mask_allbutself	= NULL,
 	.send_IPI_allbutself		= bigsmp_send_IPI_allbutself,
 	.send_IPI_all			= bigsmp_send_IPI_all,
Index: linux-2.6.git/arch/x86/kernel/apic/es7000_32.c
=====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic/es7000_32.c
+++ linux-2.6.git/arch/x86/kernel/apic/es7000_32.c
@@ -420,11 +420,6 @@ static unsigned int es7000_get_apic_id(u
 	return (x >> 24) & 0xFF;
 }
 
-static void es7000_send_IPI_mask(const struct cpumask *mask, int vector)
-{
-	default_send_IPI_mask_sequence_phys(mask, vector);
-}
-
 static void es7000_send_IPI_allbutself(int vector)
 {
 	default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector);
@@ -432,7 +427,7 @@ static void es7000_send_IPI_allbutself(i
 
 static void es7000_send_IPI_all(int vector)
 {
-	es7000_send_IPI_mask(cpu_online_mask, vector);
+	default_send_IPI_mask_sequence_phys(cpu_online_mask, vector);
 }
 
 static int es7000_apic_id_registered(void)
@@ -672,7 +667,7 @@ struct apic __refdata apic_es7000_cluste
 	.cpu_mask_to_apicid		= es7000_cpu_mask_to_apicid,
 	.cpu_mask_to_apicid_and		= es7000_cpu_mask_to_apicid_and,
 
-	.send_IPI_mask			= es7000_send_IPI_mask,
+	.send_IPI_mask			= default_send_IPI_mask_sequence_phys,
 	.send_IPI_mask_allbutself	= NULL,
 	.send_IPI_allbutself		= es7000_send_IPI_allbutself,
 	.send_IPI_all			= es7000_send_IPI_all,
@@ -737,7 +732,7 @@ struct apic __refdata apic_es7000 = {
 	.cpu_mask_to_apicid		= es7000_cpu_mask_to_apicid,
 	.cpu_mask_to_apicid_and		= es7000_cpu_mask_to_apicid_and,
 
-	.send_IPI_mask			= es7000_send_IPI_mask,
+	.send_IPI_mask			= default_send_IPI_mask_sequence_phys,
 	.send_IPI_mask_allbutself	= NULL,
 	.send_IPI_allbutself		= es7000_send_IPI_allbutself,
 	.send_IPI_all			= es7000_send_IPI_all,
Index: linux-2.6.git/arch/x86/kernel/apic/numaq_32.c
=====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic/numaq_32.c
+++ linux-2.6.git/arch/x86/kernel/apic/numaq_32.c
@@ -299,11 +299,6 @@ static inline unsigned int numaq_get_api
 	return (x >> 24) & 0x0F;
 }
 
-static inline void numaq_send_IPI_mask(const struct cpumask *mask, int vector)
-{
-	default_send_IPI_mask_sequence_logical(mask, vector);
-}
-
 static inline void numaq_send_IPI_allbutself(int vector)
 {
 	default_send_IPI_mask_allbutself_logical(cpu_online_mask, vector);
@@ -311,7 +306,7 @@ static inline void numaq_send_IPI_allbut
 
 static inline void numaq_send_IPI_all(int vector)
 {
-	numaq_send_IPI_mask(cpu_online_mask, vector);
+	default_send_IPI_mask_sequence_logical(cpu_online_mask, vector);
 }
 
 #define NUMAQ_TRAMPOLINE_PHYS_LOW	(0x8)
@@ -525,7 +520,7 @@ struct apic __refdata apic_numaq = {
 	.cpu_mask_to_apicid		= numaq_cpu_mask_to_apicid,
 	.cpu_mask_to_apicid_and		= numaq_cpu_mask_to_apicid_and,
 
-	.send_IPI_mask			= numaq_send_IPI_mask,
+	.send_IPI_mask			= default_send_IPI_mask_sequence_logical,
 	.send_IPI_mask_allbutself	= NULL,
 	.send_IPI_allbutself		= numaq_send_IPI_allbutself,
 	.send_IPI_all			= numaq_send_IPI_all,
Index: linux-2.6.git/arch/x86/kernel/apic/summit_32.c
=====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic/summit_32.c
+++ linux-2.6.git/arch/x86/kernel/apic/summit_32.c
@@ -52,11 +52,6 @@ static unsigned summit_get_apic_id(unsig
 	return (x >> 24) & 0xFF;
 }
 
-static inline void summit_send_IPI_mask(const struct cpumask *mask, int vector)
-{
-	default_send_IPI_mask_sequence_logical(mask, vector);
-}
-
 static void summit_send_IPI_allbutself(int vector)
 {
 	default_send_IPI_mask_allbutself_logical(cpu_online_mask, vector);
@@ -64,7 +59,7 @@ static void summit_send_IPI_allbutself(i
 
 static void summit_send_IPI_all(int vector)
 {
-	summit_send_IPI_mask(cpu_online_mask, vector);
+	default_send_IPI_mask_sequence_logical(cpu_online_mask, vector);
 }
 
 #include <asm/tsc.h>
@@ -545,7 +540,7 @@ struct apic apic_summit = {
 	.cpu_mask_to_apicid		= summit_cpu_mask_to_apicid,
 	.cpu_mask_to_apicid_and		= summit_cpu_mask_to_apicid_and,
 
-	.send_IPI_mask			= summit_send_IPI_mask,
+	.send_IPI_mask			= default_send_IPI_mask_sequence_logical,
 	.send_IPI_mask_allbutself	= NULL,
 	.send_IPI_allbutself		= summit_send_IPI_allbutself,
 	.send_IPI_all			= summit_send_IPI_all,


  reply	other threads:[~2010-10-27 20:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 19:53 [rfc -tip 0/2] Implementing self IPI with NMI destination Cyrill Gorcunov
2010-10-27 19:53 ` Cyrill Gorcunov [this message]
2010-10-27 19:53 ` [rfc -tip 2/2] x86, apic: Allow to send self NMI ipi Cyrill Gorcunov
2010-10-27 20:18 ` [rfc -tip 0/2] Implementing self IPI with NMI destination Maciej W. Rozycki
2010-10-27 20:22   ` Cyrill Gorcunov

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=20101027200806.496446571@openvz.org \
    --to=gorcunov@openvz.org \
    --cc=dzickus@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=mingo@elte.hu \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=yinghai@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

Powered by JetHome