tmp_suning_uos_patched/arch/powerpc/platforms/85xx
Milton Miller 23d72bfd8f powerpc: Consolidate ipi message mux and demux
Consolidate the mux and demux of ipi messages into smp.c and call
a new smp_ops callback to actually trigger the ipi.

The powerpc architecture code is optimised for having 4 distinct
ipi triggers, which are mapped to 4 distinct messages (ipi many, ipi
single, scheduler ipi, and enter debugger).  However, several interrupt
controllers only provide a single software triggered interrupt that
can be delivered to each cpu.  To resolve this limitation, each smp_ops
implementation created a per-cpu variable that is manipulated with atomic
bitops.  Since these lines will be contended they are optimialy marked as
shared_aligned and take a full cache line for each cpu.  Distro kernels
may have 2 or 3 of these in their config, each taking per-cpu space
even though at most one will be in use.

This consolidation removes smp_message_recv and replaces the single call
actions cases with direct calls from the common message recognition loop.
The complicated debugger ipi case with its muxed crash handling code is
moved to debug_ipi_action which is now called from the demux code (instead
of the multi-message action calling smp_message_recv).

I put a call to reschedule_action to increase the likelyhood of correctly
merging the anticipated scheduler_ipi() hook coming from the scheduler
tree; that single required call can be inlined later.

The actual message decode is a copy of the old pseries xics code with its
memory barriers and cache line spacing, augmented with a per-cpu unsigned
long based on the book-e doorbell code.  The optional data is set via a
callback from the implementation and is passed to the new cause-ipi hook
along with the logical cpu number.  While currently only the doorbell
implemntation uses this data it should be almost zero cost to retrieve and
pass it -- it adds a single register load for the argument from the same
cache line to which we just completed a store and the register is dead
on return from the call.  I extended the data element from unsigned int
to unsigned long in case some other code wanted to associate a pointer.

The doorbell check_self is replaced by a call to smp_muxed_ipi_resend,
conditioned on the CPU_DBELL feature.  The ifdef guard could be relaxed
to CONFIG_SMP but I left it with BOOKE for now.

Also, the doorbell interrupt vector for book-e was not calling irq_enter
and irq_exit, which throws off cpu accounting and causes code to not
realize it is running in interrupt context.  Add the missing calls.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-05-19 15:31:03 +10:00
..
corenet_ds.c lmb: rename to memblock 2010-07-14 17:14:00 +10:00
corenet_ds.h powerpc/p4080: Add basic support for p4080ds platform 2009-11-20 16:45:38 -06:00
Kconfig powerpc/fsl-booke: Add p5020 DS board support 2010-10-14 00:55:18 -05:00
ksi8560.c powerpc: Convert to new irq_* function names 2011-03-29 14:48:12 +02:00
Makefile powerpc/fsl-booke: Add p5020 DS board support 2010-10-14 00:55:18 -05:00
mpc85xx_ads.c powerpc: Convert to new irq_* function names 2011-03-29 14:48:12 +02:00
mpc85xx_cds.c powerpc: Convert to new irq_* function names 2011-03-29 14:48:12 +02:00
mpc85xx_ds.c powerpc: Convert to new irq_* function names 2011-03-29 14:48:12 +02:00
mpc85xx_mds.c ppc: fix comment typo singal -> signal 2011-01-03 16:10:41 +01:00
mpc85xx_rdb.c powerpc/85xx: Added P1020RDB Platform support. 2009-11-11 21:43:16 -06:00
mpc8536_ds.c lmb: rename to memblock 2010-07-14 17:14:00 +10:00
p1022_ds.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2010-10-25 08:32:05 -07:00
p3041_ds.c powerpc/fsl-booke: Add p3041 DS board support 2010-10-14 00:53:07 -05:00
p4080_ds.c powerpc/p4080: Add basic support for p4080ds platform 2009-11-20 16:45:38 -06:00
p5020_ds.c powerpc/fsl-booke: Add p5020 DS board support 2010-10-14 00:55:18 -05:00
sbc8548.c powerpc/85xx: Move gianfar mdio nodes under the ethernet nodes 2009-03-24 08:35:13 -05:00
sbc8560.c powerpc: Convert to new irq_* function names 2011-03-29 14:48:12 +02:00
smp.c powerpc: Consolidate ipi message mux and demux 2011-05-19 15:31:03 +10:00
socrates_fpga_pic.c powerpc/irq: Stop exporting irq_map 2011-05-04 15:02:15 +10:00
socrates_fpga_pic.h powerpc/85xx: Add support for the "socrates" board (MPC8544). 2009-03-27 06:42:08 -05:00
socrates.c powerpc/85xx: Stop using ppc_md.init on socrates 2009-06-23 08:09:55 -05:00
stx_gp3.c powerpc: Convert to new irq_* function names 2011-03-29 14:48:12 +02:00
tqm85xx.c powerpc: Convert to new irq_* function names 2011-03-29 14:48:12 +02:00
xes_mpc85xx.c of: add 'of_' prefix to machine_is_compatible() 2010-02-09 08:33:00 -07:00