Commit e11ea2a0 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Paul Walmsley

riscv: optimize send_ipi_single

Don't go through send_ipi_mask, but just set the op bit and then pass
a simple generated hartid mask directly to sbi_send_ipi.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
[paul.walmsley@sifive.com: minor patch description fixes]
Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
parent 1db7a7ca
...@@ -94,7 +94,13 @@ static void send_ipi_mask(const struct cpumask *mask, enum ipi_message_type op) ...@@ -94,7 +94,13 @@ static void send_ipi_mask(const struct cpumask *mask, enum ipi_message_type op)
static void send_ipi_single(int cpu, enum ipi_message_type op) static void send_ipi_single(int cpu, enum ipi_message_type op)
{ {
send_ipi_mask(cpumask_of(cpu), op); int hartid = cpuid_to_hartid_map(cpu);
smp_mb__before_atomic();
set_bit(op, &ipi_data[cpu].bits);
smp_mb__after_atomic();
sbi_send_ipi(cpumask_bits(cpumask_of(hartid)));
} }
static inline void clear_ipi(void) static inline void clear_ipi(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment