Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4016
b: refs/heads/master
c: bea248f
h: refs/heads/master
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Jun 30, 2005
1 parent d1628a2 commit 2b7e8c2
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1bdfbd0a29d6da4dbe42736faac02c43a9afe76
refs/heads/master: bea248fb30c3122ece8c34798527fac431c1d7b0
16 changes: 9 additions & 7 deletions trunk/arch/ppc64/kernel/ItLpQueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/ppc64/kernel/iSeries_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,17 +855,15 @@ late_initcall(iSeries_src_init);

static int set_spread_lpevents(char *str)
{
unsigned long i;
unsigned long val = simple_strtoul(str, NULL, 0);
extern unsigned long spread_lpevents;

/*
* The parameter is the number of processors to share in processing
* lp events.
*/
if (( val > 0) && (val <= NR_CPUS)) {
for (i = 1; i < val; ++i)
paca[i].lpqueue_ptr = paca[0].lpqueue_ptr;

spread_lpevents = val;
printk("lpevent processing spread over %ld processors\n", val);
} else {
printk("invalid spread_lpevents %ld\n", val);
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/ppc64/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static int iSeries_idle(void)

while (1) {
if (lpaca->lppaca.shared_proc) {
if (ItLpQueue_isLpIntPending(lpaca->lpqueue_ptr))
if (ItLpQueue_isLpIntPending(&xItLpQueue))
process_iSeries_events();
if (!need_resched())
yield_shared_processor();
Expand All @@ -100,7 +100,7 @@ static int iSeries_idle(void)

while (!need_resched()) {
HMT_medium();
if (ItLpQueue_isLpIntPending(lpaca->lpqueue_ptr))
if (ItLpQueue_isLpIntPending(&xItLpQueue))
process_iSeries_events();
HMT_low();
}
Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/ppc64/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq)
void do_IRQ(struct pt_regs *regs)
{
struct paca_struct *lpaca;
struct ItLpQueue *lpq;

irq_enter();

Expand All @@ -295,9 +294,8 @@ void do_IRQ(struct pt_regs *regs)
iSeries_smp_message_recv(regs);
}
#endif /* CONFIG_SMP */
lpq = lpaca->lpqueue_ptr;
if (lpq && ItLpQueue_isLpIntPending(lpq))
lpevent_count += ItLpQueue_process(lpq, regs);
if (ItLpQueue_isLpIntPending(&xItLpQueue))
lpevent_count += ItLpQueue_process(&xItLpQueue, regs);

irq_exit();

Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/ppc64/kernel/mf.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,9 +802,8 @@ int mf_get_boot_rtc(struct rtc_time *tm)
/* We need to poll here as we are not yet taking interrupts */
while (rtc_data.busy) {
extern unsigned long lpevent_count;
struct ItLpQueue *lpq = get_paca()->lpqueue_ptr;
if (lpq && ItLpQueue_isLpIntPending(lpq))
lpevent_count += ItLpQueue_process(lpq, NULL);
if (ItLpQueue_isLpIntPending(&xItLpQueue))
lpevent_count += ItLpQueue_process(&xItLpQueue, NULL);
}
return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm);
}
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/ppc64/kernel/pacaData.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ extern unsigned long __toc_start;
#ifdef CONFIG_PPC_ISERIES
#define EXTRA_INITS(number, lpq) \
.lppaca_ptr = &paca[number].lppaca, \
.lpqueue_ptr = (lpq), /* &xItLpQueue, */ \
.reg_save_ptr = &paca[number].reg_save, \
.reg_save = { \
.xDesc = 0xd397d9e2, /* "LpRS" */ \
Expand Down
7 changes: 2 additions & 5 deletions trunk/arch/ppc64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,8 @@ int timer_interrupt(struct pt_regs * regs)
set_dec(next_dec);

#ifdef CONFIG_PPC_ISERIES
{
struct ItLpQueue *lpq = lpaca->lpqueue_ptr;
if (lpq && ItLpQueue_isLpIntPending(lpq))
lpevent_count += ItLpQueue_process(lpq, regs);
}
if (ItLpQueue_isLpIntPending(&xItLpQueue))
lpevent_count += ItLpQueue_process(&xItLpQueue, regs);
#endif

/* collect purr register values often, for accurate calculations */
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/asm-ppc64/paca.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <asm/types.h>
#include <asm/lppaca.h>
#include <asm/iSeries/ItLpRegSave.h>
#include <asm/iSeries/ItLpQueue.h>
#include <asm/mmu.h>

register struct paca_struct *local_paca asm("r13");
Expand Down Expand Up @@ -62,7 +61,6 @@ struct paca_struct {
u16 paca_index; /* Logical processor number */

u32 default_decr; /* Default decrementer value */
struct ItLpQueue *lpqueue_ptr; /* LpQueue handled by this CPU */
u64 kernel_toc; /* Kernel TOC address */
u64 stab_real; /* Absolute address of segment table */
u64 stab_addr; /* Virtual address of segment table */
Expand Down

0 comments on commit 2b7e8c2

Please sign in to comment.