[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>
This commit is contained in:
Michael Ellerman
2005-06-30 15:07:09 +10:00
committed by Paul Mackerras
parent b1bdfbd0a2
commit bea248fb30
8 changed files with 19 additions and 28 deletions
+9 -7
View File
@@ -69,15 +69,17 @@ struct HvLpEvent * ItLpQueue_getNextLpEvent( struct ItLpQueue * lpQueue )
return nextLpEvent;
}
unsigned long spread_lpevents = 1;
int ItLpQueue_isLpIntPending( struct ItLpQueue * lpQueue )
{
int retval = 0;
struct HvLpEvent * nextLpEvent;
if ( lpQueue ) {
nextLpEvent = (struct HvLpEvent *)lpQueue->xSlicCurEventPtr;
retval = nextLpEvent->xFlags.xValid | lpQueue->xPlicOverflowIntPending;
}
return retval;
struct HvLpEvent *next_event;
if (smp_processor_id() >= spread_lpevents)
return 0;
next_event = (struct HvLpEvent *)lpQueue->xSlicCurEventPtr;
return next_event->xFlags.xValid | lpQueue->xPlicOverflowIntPending;
}
void ItLpQueue_clearValid( struct HvLpEvent * event )