From: Christoph Hellwig <hch@lst.de>
To: x86@kernel.org
Cc: Mike Travis <mike.travis@hpe.com>, linux-kernel@vger.kernel.org
Subject: [PATCH 08/11] x86/uv: Simplify uv_send_IPI_one
Date: Mon, 4 May 2020 19:15:24 +0200 [thread overview]
Message-ID: <20200504171527.2845224-9-hch@lst.de> (raw)
In-Reply-To: <20200504171527.2845224-1-hch@lst.de>
Merge two helpers only used by uv_send_IPI_one into the main function.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/x86/include/asm/uv/uv_hub.h | 20 --------------------
arch/x86/kernel/apic/x2apic_uv_x.c | 19 ++++++++++++++-----
2 files changed, 14 insertions(+), 25 deletions(-)
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index a998e65e6a584..8a25d95cdf200 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -837,26 +837,6 @@ static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value)
}
extern unsigned int uv_apicid_hibits;
-static unsigned long uv_hub_ipi_value(int apicid, int vector, int mode)
-{
- apicid |= uv_apicid_hibits;
- return (1UL << UVH_IPI_INT_SEND_SHFT) |
- ((apicid) << UVH_IPI_INT_APIC_ID_SHFT) |
- (mode << UVH_IPI_INT_DELIVERY_MODE_SHFT) |
- (vector << UVH_IPI_INT_VECTOR_SHFT);
-}
-
-static inline void uv_hub_send_ipi(int pnode, int apicid, int vector)
-{
- unsigned long val;
- unsigned long dmode = dest_Fixed;
-
- if (vector == NMI_VECTOR)
- dmode = dest_NMI;
-
- val = uv_hub_ipi_value(apicid, vector, dmode);
- uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
-}
/*
* Get the minimum revision number of the hub chips within the partition.
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index f1a0142e27319..3830538095e6a 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -588,12 +588,21 @@ static int uv_wakeup_secondary(int phys_apicid, unsigned long start_rip)
static void uv_send_IPI_one(int cpu, int vector)
{
- unsigned long apicid;
- int pnode;
+ unsigned long apicid = per_cpu(x86_cpu_to_apicid, cpu);
+ int pnode = uv_apicid_to_pnode(apicid);
+ unsigned long dmode, val;
+
+ if (vector == NMI_VECTOR)
+ dmode = dest_NMI;
+ else
+ dmode = dest_Fixed;
- apicid = per_cpu(x86_cpu_to_apicid, cpu);
- pnode = uv_apicid_to_pnode(apicid);
- uv_hub_send_ipi(pnode, apicid, vector);
+ val = (1UL << UVH_IPI_INT_SEND_SHFT) |
+ ((apicid | uv_apicid_hibits) << UVH_IPI_INT_APIC_ID_SHFT) |
+ (dmode << UVH_IPI_INT_DELIVERY_MODE_SHFT) |
+ (vector << UVH_IPI_INT_VECTOR_SHFT);
+
+ uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
}
static void uv_send_IPI_mask(const struct cpumask *mask, int vector)
--
2.26.2
next prev parent reply other threads:[~2020-05-04 17:29 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-04 17:15 x86/uv cleanups Christoph Hellwig
2020-05-04 17:15 ` [PATCH 01/11] x86/uv: Mark uv_bios_call and uv_bios_call_irqsave static Christoph Hellwig
2020-05-07 14:07 ` [tip: x86/platform] x86/platform/uv: Mark uv_bios_call() and uv_bios_call_irqsave() static tip-bot2 for Christoph Hellwig
2020-05-04 17:15 ` [PATCH 02/11] x86/uv: Remove the uv_partition_coherence_id macro Christoph Hellwig
2020-05-07 14:07 ` [tip: x86/platform] x86/platform/uv: Remove the uv_partition_coherence_id() macro tip-bot2 for Christoph Hellwig
2020-05-04 17:15 ` [PATCH 03/11] x86/uv: Unexport sn_coherency_id Christoph Hellwig
2020-05-07 14:07 ` [tip: x86/platform] x86/platform/uv: " tip-bot2 for Christoph Hellwig
2020-05-04 17:15 ` [PATCH 04/11] x86/uv: Unexport symbols only used by x2apic_uv_x.c Christoph Hellwig
2020-05-07 14:07 ` [tip: x86/platform] x86/platform/uv: " tip-bot2 for Christoph Hellwig
2020-05-04 17:15 ` [PATCH 05/11] x86/uv: Remove the UV*_HUB_IS_SUPPORTED macros Christoph Hellwig
2020-05-07 14:07 ` [tip: x86/platform] x86/platform/uv: " tip-bot2 for Christoph Hellwig
2020-05-04 17:15 ` [PATCH 06/11] x86/uv: Mark is_uv_hubless static Christoph Hellwig
2020-05-07 14:07 ` [tip: x86/platform] x86/platform/uv: Mark is_uv_hubless() static tip-bot2 for Christoph Hellwig
2020-05-04 17:15 ` [PATCH 07/11] x86/uv: Mark uv_min_hub_revision_id static Christoph Hellwig
2020-05-07 14:07 ` [tip: x86/platform] x86/platform/uv: " tip-bot2 for Christoph Hellwig
2020-05-04 17:15 ` Christoph Hellwig [this message]
2020-05-07 14:07 ` [tip: x86/platform] x86/platform/uv: Simplify uv_send_IPI_one() tip-bot2 for Christoph Hellwig
2020-05-04 17:15 ` [PATCH 09/11] x86/uv: Remove _uv_hub_info_check Christoph Hellwig
2020-05-07 14:07 ` [tip: x86/platform] x86/platform/uv: Remove _uv_hub_info_check() tip-bot2 for Christoph Hellwig
2020-05-04 17:15 ` [PATCH 10/11] x86/uv: Unexport uv_apicid_hibits Christoph Hellwig
2020-05-07 14:07 ` [tip: x86/platform] x86/platform/uv: " tip-bot2 for Christoph Hellwig
2020-05-04 17:15 ` [PATCH 11/11] x86/uv: Remove the unused _uv_cpu_blade_processor_id macro Christoph Hellwig
2020-05-07 14:07 ` [tip: x86/platform] x86/platform/uv: Remove the unused _uv_cpu_blade_processor_id() macro tip-bot2 for Christoph Hellwig
2020-05-05 15:39 ` x86/uv cleanups Dimitri Sivanich
2020-05-05 16:36 ` Andy Lutomirski
2020-05-05 23:14 ` Thomas Gleixner
2020-05-06 21:36 ` Russ Anderson
2020-05-07 4:51 ` Christoph Hellwig
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=20200504171527.2845224-9-hch@lst.de \
--to=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.travis@hpe.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
all inboxes | Powered by JetHome®