hw/ppc/spapr: Inline few SPAPR_IRQ_* uses
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Chinmay Rath <rathc@linux.ibm.com> Link: https://lore.kernel.org/qemu-devel/20251021084346.73671-6-philmd@linaro.org Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
This commit is contained in:
parent
5c1e7eb37d
commit
3d8939da6f
1 changed files with 4 additions and 8 deletions
|
|
@ -1041,16 +1041,14 @@ void spapr_clear_pending_hotplug_events(SpaprMachineState *spapr)
|
|||
|
||||
void spapr_events_init(SpaprMachineState *spapr)
|
||||
{
|
||||
int epow_irq = SPAPR_IRQ_EPOW;
|
||||
|
||||
spapr_irq_claim(spapr, epow_irq, false, &error_fatal);
|
||||
spapr_irq_claim(spapr, SPAPR_IRQ_EPOW, false, &error_fatal);
|
||||
|
||||
QTAILQ_INIT(&spapr->pending_events);
|
||||
|
||||
spapr->event_sources = spapr_event_sources_new();
|
||||
|
||||
spapr_event_sources_register(spapr->event_sources, EVENT_CLASS_EPOW,
|
||||
epow_irq);
|
||||
SPAPR_IRQ_EPOW);
|
||||
|
||||
/* NOTE: if machine supports modern/dedicated hotplug event source,
|
||||
* we add it to the device-tree unconditionally. This means we may
|
||||
|
|
@ -1061,12 +1059,10 @@ void spapr_events_init(SpaprMachineState *spapr)
|
|||
* checking that it's enabled.
|
||||
*/
|
||||
if (spapr->use_hotplug_event_source) {
|
||||
int hp_irq = SPAPR_IRQ_HOTPLUG;
|
||||
|
||||
spapr_irq_claim(spapr, hp_irq, false, &error_fatal);
|
||||
spapr_irq_claim(spapr, SPAPR_IRQ_HOTPLUG, false, &error_fatal);
|
||||
|
||||
spapr_event_sources_register(spapr->event_sources, EVENT_CLASS_HOT_PLUG,
|
||||
hp_irq);
|
||||
SPAPR_IRQ_HOTPLUG);
|
||||
}
|
||||
|
||||
spapr->epow_notifier.notify = spapr_powerdown_req;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue