aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/ItLpQueue.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-06-30 01:07:09 -0400
committerPaul Mackerras <paulus@samba.org>2005-06-30 01:07:09 -0400
commitbea248fb30c3122ece8c34798527fac431c1d7b0 (patch)
tree9158d7a089312f92abcb6c8d5a8d942d543be24b /arch/ppc64/kernel/ItLpQueue.c
parentb1bdfbd0a29d6da4dbe42736faac02c43a9afe76 (diff)
[PATCH] ppc64: Remove lpqueue pointer from the paca on iSeries
The iSeries code keeps a pointer to the ItLpQueue in its paca struct. But all these pointers end up pointing to the one place, ie. xItLpQueue. So remove the pointer from the paca struct and just refer to xItLpQueue directly where needed. The only complication is that the spread_lpevents logic was implemented by having a NULL lpqueue pointer in the paca on CPUs that weren't supposed to process events. Instead we just compare the spread_lpevents value to the processor id to get the same behaviour. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/kernel/ItLpQueue.c')
-rw-r--r--arch/ppc64/kernel/ItLpQueue.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/ppc64/kernel/ItLpQueue.c b/arch/ppc64/kernel/ItLpQueue.c
index cdea00d7707f..e90dca8bd136 100644
--- a/arch/ppc64/kernel/ItLpQueue.c
+++ b/arch/ppc64/kernel/ItLpQueue.c
@@ -69,15 +69,17 @@ struct HvLpEvent * ItLpQueue_getNextLpEvent( struct ItLpQueue * lpQueue )
69 return nextLpEvent; 69 return nextLpEvent;
70} 70}
71 71
72unsigned long spread_lpevents = 1;
73
72int ItLpQueue_isLpIntPending( struct ItLpQueue * lpQueue ) 74int ItLpQueue_isLpIntPending( struct ItLpQueue * lpQueue )
73{ 75{
74 int retval = 0; 76 struct HvLpEvent *next_event;
75 struct HvLpEvent * nextLpEvent; 77
76 if ( lpQueue ) { 78 if (smp_processor_id() >= spread_lpevents)
77 nextLpEvent = (struct HvLpEvent *)lpQueue->xSlicCurEventPtr; 79 return 0;
78 retval = nextLpEvent->xFlags.xValid | lpQueue->xPlicOverflowIntPending; 80
79 } 81 next_event = (struct HvLpEvent *)lpQueue->xSlicCurEventPtr;
80 return retval; 82 return next_event->xFlags.xValid | lpQueue->xPlicOverflowIntPending;
81} 83}
82 84
83void ItLpQueue_clearValid( struct HvLpEvent * event ) 85void ItLpQueue_clearValid( struct HvLpEvent * event )