public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* Clarification on necessary barriers before generating IPI
@ 2020-05-20  8:08 Linu Cherian
  2020-05-20  8:28 ` Will Deacon
  0 siblings, 1 reply; 5+ messages in thread
From: Linu Cherian @ 2020-05-20  8:08 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: maz, will, Linu Cherian

Hi,

How is it ensured that system register write using msr instruction(gic_send_sgi)
doesnt get reordered before the stores to IPI call processing
list(call_single_queue in kernel/smp.c), so that IPI is guaranteed to
be generated after the stores get completed.

CMIIW, Dont we need an isb() in addition to to the wmb() in the below code ?

Thanks.

static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
{
int cpu;

if (WARN_ON(irq >= 16))
return;

/*
* Ensure that stores to Normal memory are visible to the
* other CPUs before issuing the IPI.
*/
wmb();

for_each_cpu(cpu, mask) {
u64 cluster_id = MPIDR_TO_SGI_CLUSTER_ID(cpu_logical_map(cpu));
u16 tlist;

tlist = gic_compute_target_list(&cpu, mask, cluster_id);
gic_send_sgi(cluster_id, tlist, irq);
}

/* Force the above writes to ICC_SGI1R_EL1 to be executed */
isb();
}

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-20 17:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-20  8:08 Clarification on necessary barriers before generating IPI Linu Cherian
2020-05-20  8:28 ` Will Deacon
2020-05-20  8:53   ` Linu Cherian
2020-05-20  9:03     ` Will Deacon
2020-05-20 17:37       ` Linu Cherian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox