Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114619
b: refs/heads/master
c: b496325
h: refs/heads/master
i:
  114617: 89e1633
  114615: a4fb564
v: v3
  • Loading branch information
Milton Miller authored and Benjamin Herrenschmidt committed Oct 13, 2008
1 parent 7c26721 commit 81416f2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 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: a244a957ab15ddbeccf4018ef4b3ac8f5fd1566d
refs/heads/master: b4963255ad5a426f04a0bb15c4315fa4bb40cde9
33 changes: 13 additions & 20 deletions trunk/arch/powerpc/platforms/pseries/xics.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,20 +727,19 @@ static void xics_set_cpu_priority(unsigned char cppr)
iosync();
}

/* Have the calling processor join or leave the specified global queue */
static void xics_set_cpu_giq(unsigned int gserver, unsigned int join)
{
int status = rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE,
(1UL << interrupt_server_size) - 1 - gserver, join);
WARN_ON(status < 0);
}

void xics_setup_cpu(void)
{
xics_set_cpu_priority(0xff);

/*
* Put the calling processor into the GIQ. This is really only
* necessary from a secondary thread as the OF start-cpu interface
* performs this function for us on primary threads.
*
* XXX: undo of teardown on kexec needs this too, as may hotplug
*/
rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE,
(1UL << interrupt_server_size) - 1 - default_distrib_server, 1);
xics_set_cpu_giq(default_distrib_server, 1);
}

void xics_teardown_cpu(void)
Expand All @@ -749,9 +748,7 @@ void xics_teardown_cpu(void)

xics_set_cpu_priority(0);

/*
* Clear IPI
*/
/* Clear any pending IPI request */
if (firmware_has_feature(FW_FEATURE_LPAR))
lpar_qirr_info(cpu, 0xff);
else
Expand Down Expand Up @@ -785,17 +782,14 @@ void xics_kexec_teardown_cpu(int secondary)
* so leave the master cpu in the group.
*/
if (secondary)
rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE,
(1UL << interrupt_server_size) - 1 -
default_distrib_server, 0);
xics_set_cpu_giq(default_distrib_server, 0);
}

#ifdef CONFIG_HOTPLUG_CPU

/* Interrupts are disabled. */
void xics_migrate_irqs_away(void)
{
int status;
int cpu = smp_processor_id(), hw_cpu = hard_smp_processor_id();
unsigned int irq, virq;

Expand All @@ -806,17 +800,16 @@ void xics_migrate_irqs_away(void)
/* Reject any interrupt that was queued to us... */
xics_set_cpu_priority(0);

/* remove ourselves from the global interrupt queue */
status = rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE,
(1UL << interrupt_server_size) - 1 - default_distrib_server, 0);
WARN_ON(status < 0);
/* Remove ourselves from the global interrupt queue */
xics_set_cpu_giq(default_distrib_server, 0);

/* Allow IPIs again... */
xics_set_cpu_priority(DEFAULT_PRIORITY);

for_each_irq(virq) {
struct irq_desc *desc;
int xics_status[2];
int status;
unsigned long flags;

/* We cant set affinity on ISA interrupts */
Expand Down

0 comments on commit 81416f2

Please sign in to comment.