Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33381
b: refs/heads/master
c: 81b73dd
h: refs/heads/master
i:
  33379: 0c13f76
v: v3
  • Loading branch information
Haren Myneni authored and Paul Mackerras committed Aug 8, 2006
1 parent 663e07f commit 78ea8ba
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 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: dcc42f483d6808ba4d04af9da35e7e47b711f6c2
refs/heads/master: 81b73dd92b97423b8f5324a59044da478c04f4c4
21 changes: 21 additions & 0 deletions trunk/arch/powerpc/kernel/rtas.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,27 @@ int rtas_set_indicator(int indicator, int index, int new_value)
}
EXPORT_SYMBOL(rtas_set_indicator);

/*
* Ignoring RTAS extended delay
*/
int rtas_set_indicator_fast(int indicator, int index, int new_value)
{
int rc;
int token = rtas_token("set-indicator");

if (token == RTAS_UNKNOWN_SERVICE)
return -ENOENT;

rc = rtas_call(token, 3, 1, NULL, indicator, index, new_value);

WARN_ON(rc == -2 || (rc >= 9900 && rc <= 9905));

if (rc < 0)
return rtas_error_rc(rc);

return rc;
}

void rtas_restart(char *cmd)
{
if (rtas_flash_term_hook)
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/platforms/pseries/xics.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ void xics_setup_cpu(void)
*
* XXX: undo of teardown on kexec needs this too, as may hotplug
*/
rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE,
(1UL << interrupt_server_size) - 1 - default_distrib_server, 1);
}

Expand Down Expand Up @@ -796,7 +796,7 @@ void xics_teardown_cpu(int secondary)
* so leave the master cpu in the group.
*/
if (secondary)
rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE,
(1UL << interrupt_server_size) - 1 -
default_distrib_server, 0);
}
Expand All @@ -813,7 +813,7 @@ void xics_migrate_irqs_away(void)
xics_set_cpu_priority(cpu, 0);

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

Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-powerpc/rtas.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ extern int rtas_get_sensor(int sensor, int index, int *state);
extern int rtas_get_power_level(int powerdomain, int *level);
extern int rtas_set_power_level(int powerdomain, int level, int *setlevel);
extern int rtas_set_indicator(int indicator, int index, int new_value);
extern int rtas_set_indicator_fast(int indicator, int index, int new_value);
extern void rtas_progress(char *s, unsigned short hex);
extern void rtas_initialize(void);

Expand Down

0 comments on commit 78ea8ba

Please sign in to comment.