linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: x86@kernel.org, Nadav Amit <namit@vmware.com>,
	Ricardo Neri <ricardo.neri-calderon@linux.intel.com>,
	Stephane Eranian <eranian@google.com>,
	Feng Tang <feng.tang@intel.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Subject: [patch V3 07/25] x86/apic: Move ipi header into apic directory
Date: Mon, 22 Jul 2019 20:47:12 +0200	[thread overview]
Message-ID: <20190722105219.434738036@linutronix.de> (raw)
In-Reply-To: 20190722104705.550071814@linutronix.de

Only used locally.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/include/asm/ipi.h           |   90 -----------------------------------
 arch/x86/kernel/apic/apic_flat_64.c  |    3 -
 arch/x86/kernel/apic/apic_numachip.c |    3 -
 arch/x86/kernel/apic/bigsmp_32.c     |    9 ---
 arch/x86/kernel/apic/ipi.c           |    3 -
 arch/x86/kernel/apic/ipi.h           |   90 +++++++++++++++++++++++++++++++++++
 arch/x86/kernel/apic/probe_32.c      |    3 -
 arch/x86/kernel/apic/probe_64.c      |    3 -
 arch/x86/kernel/apic/x2apic_phys.c   |    3 -
 9 files changed, 103 insertions(+), 104 deletions(-)

--- a/arch/x86/include/asm/ipi.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef _ASM_X86_IPI_H
-#define _ASM_X86_IPI_H
-
-#ifdef CONFIG_X86_LOCAL_APIC
-
-/*
- * Copyright 2004 James Cleverdon, IBM.
- *
- * Generic APIC InterProcessor Interrupt code.
- *
- * Moved to include file by James Cleverdon from
- * arch/x86-64/kernel/smp.c
- *
- * Copyrights from kernel/smp.c:
- *
- * (c) 1995 Alan Cox, Building #3 <alan@redhat.com>
- * (c) 1998-99, 2000 Ingo Molnar <mingo@redhat.com>
- * (c) 2002,2003 Andi Kleen, SuSE Labs.
- */
-
-#include <asm/hw_irq.h>
-#include <asm/apic.h>
-#include <asm/smp.h>
-
-/*
- * the following functions deal with sending IPIs between CPUs.
- *
- * We use 'broadcast', CPU->CPU IPIs and self-IPIs too.
- */
-
-static inline unsigned int __prepare_ICR(unsigned int shortcut, int vector,
-					 unsigned int dest)
-{
-	unsigned int icr = shortcut | dest;
-
-	switch (vector) {
-	default:
-		icr |= APIC_DM_FIXED | vector;
-		break;
-	case NMI_VECTOR:
-		icr |= APIC_DM_NMI;
-		break;
-	}
-	return icr;
-}
-
-static inline int __prepare_ICR2(unsigned int mask)
-{
-	return SET_APIC_DEST_FIELD(mask);
-}
-
-static inline void __xapic_wait_icr_idle(void)
-{
-	while (native_apic_mem_read(APIC_ICR) & APIC_ICR_BUSY)
-		cpu_relax();
-}
-
-void __default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int dest);
-
-/*
- * This is used to send an IPI with no shorthand notation (the destination is
- * specified in bits 56 to 63 of the ICR).
- */
-void __default_send_IPI_dest_field(unsigned int mask, int vector, unsigned int dest);
-
-extern void default_send_IPI_single(int cpu, int vector);
-extern void default_send_IPI_single_phys(int cpu, int vector);
-extern void default_send_IPI_mask_sequence_phys(const struct cpumask *mask,
-						 int vector);
-extern void default_send_IPI_mask_allbutself_phys(const struct cpumask *mask,
-							 int vector);
-
-extern int no_broadcast;
-
-#ifdef CONFIG_X86_32
-extern void default_send_IPI_mask_sequence_logical(const struct cpumask *mask,
-							 int vector);
-extern void default_send_IPI_mask_allbutself_logical(const struct cpumask *mask,
-							 int vector);
-extern void default_send_IPI_mask_logical(const struct cpumask *mask,
-						 int vector);
-extern void default_send_IPI_allbutself(int vector);
-extern void default_send_IPI_all(int vector);
-extern void default_send_IPI_self(int vector);
-#endif
-
-#endif
-
-#endif /* _ASM_X86_IPI_H */
--- a/arch/x86/kernel/apic/apic_flat_64.c
+++ b/arch/x86/kernel/apic/apic_flat_64.c
@@ -15,7 +15,8 @@
 #include <asm/jailhouse_para.h>
 #include <asm/apic_flat_64.h>
 #include <asm/apic.h>
-#include <asm/ipi.h>
+
+#include "ipi.h"
 
 static struct apic apic_physflat;
 static struct apic apic_flat;
--- a/arch/x86/kernel/apic/apic_numachip.c
+++ b/arch/x86/kernel/apic/apic_numachip.c
@@ -18,7 +18,8 @@
 
 #include <asm/apic_flat_64.h>
 #include <asm/pgtable.h>
-#include <asm/ipi.h>
+
+#include "ipi.h"
 
 u8 numachip_system __read_mostly;
 static const struct apic apic_numachip1;
--- a/arch/x86/kernel/apic/bigsmp_32.c
+++ b/arch/x86/kernel/apic/bigsmp_32.c
@@ -4,18 +4,13 @@
  *
  * Drives the local APIC in "clustered mode".
  */
-#include <linux/threads.h>
 #include <linux/cpumask.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/dmi.h>
 #include <linux/smp.h>
 
-#include <asm/apicdef.h>
-#include <asm/fixmap.h>
-#include <asm/mpspec.h>
 #include <asm/apic.h>
-#include <asm/ipi.h>
+
+#include "ipi.h"
 
 static unsigned bigsmp_get_apic_id(unsigned long x)
 {
--- a/arch/x86/kernel/apic/ipi.c
+++ b/arch/x86/kernel/apic/ipi.c
@@ -3,7 +3,8 @@
 #include <linux/cpumask.h>
 
 #include <asm/apic.h>
-#include <asm/ipi.h>
+
+#include "ipi.h"
 
 void __default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int dest)
 {
--- /dev/null
+++ b/arch/x86/kernel/apic/ipi.h
@@ -0,0 +1,90 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef _ASM_X86_IPI_H
+#define _ASM_X86_IPI_H
+
+#ifdef CONFIG_X86_LOCAL_APIC
+
+/*
+ * Copyright 2004 James Cleverdon, IBM.
+ *
+ * Generic APIC InterProcessor Interrupt code.
+ *
+ * Moved to include file by James Cleverdon from
+ * arch/x86-64/kernel/smp.c
+ *
+ * Copyrights from kernel/smp.c:
+ *
+ * (c) 1995 Alan Cox, Building #3 <alan@redhat.com>
+ * (c) 1998-99, 2000 Ingo Molnar <mingo@redhat.com>
+ * (c) 2002,2003 Andi Kleen, SuSE Labs.
+ */
+
+#include <asm/hw_irq.h>
+#include <asm/apic.h>
+#include <asm/smp.h>
+
+/*
+ * the following functions deal with sending IPIs between CPUs.
+ *
+ * We use 'broadcast', CPU->CPU IPIs and self-IPIs too.
+ */
+
+static inline unsigned int __prepare_ICR(unsigned int shortcut, int vector,
+					 unsigned int dest)
+{
+	unsigned int icr = shortcut | dest;
+
+	switch (vector) {
+	default:
+		icr |= APIC_DM_FIXED | vector;
+		break;
+	case NMI_VECTOR:
+		icr |= APIC_DM_NMI;
+		break;
+	}
+	return icr;
+}
+
+static inline int __prepare_ICR2(unsigned int mask)
+{
+	return SET_APIC_DEST_FIELD(mask);
+}
+
+static inline void __xapic_wait_icr_idle(void)
+{
+	while (native_apic_mem_read(APIC_ICR) & APIC_ICR_BUSY)
+		cpu_relax();
+}
+
+void __default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int dest);
+
+/*
+ * This is used to send an IPI with no shorthand notation (the destination is
+ * specified in bits 56 to 63 of the ICR).
+ */
+void __default_send_IPI_dest_field(unsigned int mask, int vector, unsigned int dest);
+
+extern void default_send_IPI_single(int cpu, int vector);
+extern void default_send_IPI_single_phys(int cpu, int vector);
+extern void default_send_IPI_mask_sequence_phys(const struct cpumask *mask,
+						 int vector);
+extern void default_send_IPI_mask_allbutself_phys(const struct cpumask *mask,
+							 int vector);
+
+extern int no_broadcast;
+
+#ifdef CONFIG_X86_32
+extern void default_send_IPI_mask_sequence_logical(const struct cpumask *mask,
+							 int vector);
+extern void default_send_IPI_mask_allbutself_logical(const struct cpumask *mask,
+							 int vector);
+extern void default_send_IPI_mask_logical(const struct cpumask *mask,
+						 int vector);
+extern void default_send_IPI_allbutself(int vector);
+extern void default_send_IPI_all(int vector);
+extern void default_send_IPI_self(int vector);
+#endif
+
+#endif
+
+#endif /* _ASM_X86_IPI_H */
--- a/arch/x86/kernel/apic/probe_32.c
+++ b/arch/x86/kernel/apic/probe_32.c
@@ -11,7 +11,8 @@
 
 #include <asm/apic.h>
 #include <asm/acpi.h>
-#include <asm/ipi.h>
+
+#include "ipi.h"
 
 #ifdef CONFIG_HOTPLUG_CPU
 #define DEFAULT_SEND_IPI	(1)
--- a/arch/x86/kernel/apic/probe_64.c
+++ b/arch/x86/kernel/apic/probe_64.c
@@ -9,7 +9,8 @@
  * James Cleverdon.
  */
 #include <asm/apic.h>
-#include <asm/ipi.h>
+
+#include "ipi.h"
 
 /*
  * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode.
--- a/arch/x86/kernel/apic/x2apic_phys.c
+++ b/arch/x86/kernel/apic/x2apic_phys.c
@@ -3,9 +3,8 @@
 #include <linux/cpumask.h>
 #include <linux/acpi.h>
 
-#include <asm/ipi.h>
-
 #include "x2apic.h"
+#include "ipi.h"
 
 int x2apic_phys;
 



  parent reply	other threads:[~2019-07-22 18:58 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 18:47 [patch V3 00/25] x86/apic: Support for IPI shorthands Thomas Gleixner
2019-07-22 18:47 ` [patch V3 01/25] x86/kgbd: Use NMI_VECTOR not APIC_DM_NMI Thomas Gleixner
2019-07-25 14:20   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 02/25] x86/apic: Invoke perf_events_lapic_init() after enabling APIC Thomas Gleixner
2019-07-25 14:21   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 03/25] x86/apic: Soft disable APIC before initializing it Thomas Gleixner
2019-07-25 14:22   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 04/25] x86/apic: Make apic_pending_intr_clear() more robust Thomas Gleixner
2019-07-25 14:22   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 05/25] x86/apic: Move IPI inlines into ipi.c Thomas Gleixner
2019-07-25 14:23   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 06/25] x86/apic: Cleanup the include maze Thomas Gleixner
2019-07-25 14:24   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` Thomas Gleixner [this message]
2019-07-25 14:25   ` [tip:x86/apic] x86/apic: Move ipi header into apic directory tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 08/25] x86/apic: Move apic_flat_64 " Thomas Gleixner
2019-07-25 14:25   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 09/25] x86/apic: Consolidate the apic local headers Thomas Gleixner
2019-07-25 14:26   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 10/25] x86/apic/uv: Make x2apic_extra_bits static Thomas Gleixner
2019-07-25 14:27   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 11/25] smp/hotplug: Track booted once CPUs in a cpumask Thomas Gleixner
2019-07-25 14:10   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 12/25] x86/cpu: Move arch_smt_update() to a neutral place Thomas Gleixner
2019-07-25 14:28   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 13/25] x86/hotplug: Silence APIC and NMI when CPU is dead Thomas Gleixner
2019-07-24 15:25   ` [patch V4 " Thomas Gleixner
2019-07-25 14:29     ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 14/25] x86/apic: Remove dest argument from __default_send_IPI_shortcut() Thomas Gleixner
2019-07-25 14:29   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 15/25] x86/apic: Add NMI_VECTOR wait to IPI shorthand Thomas Gleixner
2019-07-25 14:30   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 16/25] x86/apic: Move no_ipi_broadcast() out of 32bit Thomas Gleixner
2019-07-25 14:31   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 17/25] x86/apic: Add static key to Control IPI shorthands Thomas Gleixner
2019-07-25 14:31   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 18/25] x86/apic: Provide and use helper for send_IPI_allbutself() Thomas Gleixner
2019-07-25 14:32   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 19/25] cpumask: Implement cpumask_or_equal() Thomas Gleixner
2019-07-25 14:10   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 20/25] x86/smp: Move smp_function_call implementations into IPI code Thomas Gleixner
2019-07-25 14:33   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 21/25] x86/smp: Enhance native_send_call_func_ipi() Thomas Gleixner
2019-07-25 14:34   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 22/25] x86/apic: Remove the shorthand decision logic Thomas Gleixner
2019-07-25 14:34   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 23/25] x86/apic: Share common IPI helpers Thomas Gleixner
2019-07-25 14:35   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 24/25] x86/apic/flat64: Remove the IPI shorthand decision logic Thomas Gleixner
2019-07-25 14:36   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-22 18:47 ` [patch V3 25/25] x86/apic/x2apic: Implement IPI shorthands support Thomas Gleixner
2019-07-25 14:37   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2019-07-25 13:17 ` [patch V3 00/25] x86/apic: Support for IPI shorthands Peter Zijlstra

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=20190722105219.434738036@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=andrew.cooper3@citrix.com \
    --cc=eranian@google.com \
    --cc=feng.tang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namit@vmware.com \
    --cc=ricardo.neri-calderon@linux.intel.com \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).