Skip to content

Commit

Permalink
xive/p9: minor cleanup of the interface
Browse files Browse the repository at this point in the history
The XIVE driver exposes an API to the core OPAL layer and to other
OPAL drivers. This is a minor cleanup preparing ground for future XIVE
logic.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
legoater authored and oohal committed Nov 3, 2019
1 parent 9955722 commit 7582901
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/fast-reboot.c
Expand Up @@ -325,7 +325,7 @@ void __noreturn fast_reboot_entry(void)
prlog(PR_DEBUG, "RESET: CPU 0x%04x reset in\n", this_cpu()->pir);

if (proc_gen == proc_gen_p9) {
reset_cpu_xive();
xive_cpu_reset();
} else if (proc_gen == proc_gen_p8) {
/* We reset our ICP first ! Otherwise we might get stray
* interrupts when unsplitting
Expand Down
1 change: 1 addition & 0 deletions hw/slw.c
Expand Up @@ -22,6 +22,7 @@
#include <opal-api.h>
#include <nvram.h>
#include <sbe-p8.h>
#include <xive.h>

#include <p9_stop_api.H>
#include <p8_pore_table_gen_api.H>
Expand Down
4 changes: 2 additions & 2 deletions hw/xive.c
Expand Up @@ -2637,7 +2637,7 @@ static int64_t xive_source_set_xive(struct irq_source *is,
return __xive_set_irq_config(is, isn, server, prio, isn, true, true);
}

void __xive_source_eoi(struct irq_source *is, uint32_t isn)
static void __xive_source_eoi(struct irq_source *is, uint32_t isn)
{
struct xive_src *s = container_of(is, struct xive_src, is);
uint32_t idx = isn - s->esb_base;
Expand Down Expand Up @@ -4819,7 +4819,7 @@ static void xive_reset_mask_source_cb(struct irq_source *is,
}
}

void reset_cpu_xive(void)
void xive_cpu_reset(void)
{
struct cpu_thread *c = this_cpu();
struct xive_cpu_state *xs = c->xstate;
Expand Down
1 change: 0 additions & 1 deletion include/interrupts.h
Expand Up @@ -184,7 +184,6 @@ extern uint32_t get_ics_phandle(void);
struct cpu_thread;

extern void reset_cpu_icp(void);
extern void reset_cpu_xive(void);
extern void icp_send_eoi(uint32_t interrupt);
extern void icp_prep_for_pm(void);
extern void icp_kick_cpu(struct cpu_thread *cpu);
Expand Down
1 change: 0 additions & 1 deletion include/skiboot.h
Expand Up @@ -300,7 +300,6 @@ enum wakeup_engine_states {
extern enum wakeup_engine_states wakeup_engine_state;
extern bool has_deep_states;
extern void nx_p9_rng_late_init(void);
extern void xive_late_init(void);



Expand Down
7 changes: 4 additions & 3 deletions include/xive.h
Expand Up @@ -57,10 +57,11 @@ void xive_cpu_callin(struct cpu_thread *cpu);
*/
void *xive_get_trigger_port(uint32_t girq);

/* To be used by special EOI override in PSI */
/* To be used by PSI to prevent asserted LSI to constantly re-fire */
struct irq_source;
void __xive_source_eoi(struct irq_source *is, uint32_t isn);

void xive_source_mask(struct irq_source *is, uint32_t isn);

void xive_cpu_reset(void);
void xive_late_init(void);

#endif /* XIVE_H */

0 comments on commit 7582901

Please sign in to comment.