Commit 13e8251f authored by Jing Li's avatar Jing Li Committed by guzitao
Browse files

sw64: irq: fix compile error when PINTC or LPC-INTC is not set

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IB73UR



--------------------------------

Fix compile error when CONFIG_SW64_PINTC=n or CONFIG_SW64_LPC_INTC=n.

Signed-off-by: default avatarJing Li <jingli@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent f1929cbf
Loading
Loading
Loading
Loading
+21 −2
Original line number Diff line number Diff line
@@ -37,11 +37,30 @@ struct acpi_madt_sw_lpc_intc;

extern int __init sw64_add_gsi_domain_map(u32 gsi_base, u32 gsi_count,
		struct fwnode_handle *handle);
extern int __init pintc_acpi_init(struct irq_domain *parent,
		struct acpi_madt_sw_pintc *pintc);

extern int __init msic_acpi_init(struct irq_domain *parent,
		struct acpi_madt_sw_msic *msic);

#ifdef CONFIG_SW64_PINTC
extern int __init pintc_acpi_init(struct irq_domain *parent,
		struct acpi_madt_sw_pintc *pintc);
#else
static inline int __init pintc_acpi_init(struct irq_domain *parent,
		struct acpi_madt_sw_pintc *pintc)
{
	return 0;
}
#endif

#ifdef CONFIG_SW64_LPC_INTC
extern int __init lpc_intc_acpi_init(struct irq_domain *parent,
		struct acpi_madt_sw_lpc_intc *lpc_intc);
#else
static inline int __init lpc_intc_acpi_init(struct irq_domain *parent,
		struct acpi_madt_sw_lpc_intc *lpc_intc)
{
	return 0;
}
#endif

#endif /* _ASM_SW64_IRQ_H */
+7 −0
Original line number Diff line number Diff line
@@ -133,6 +133,7 @@ static void handle_nmi_int(void)
	pr_info("enter nmi int\n");
}

#ifdef CONFIG_SW64_PINTC
static void handle_dev_int(struct pt_regs *regs)
{
	unsigned long config_val, val, stat;
@@ -152,6 +153,12 @@ static void handle_dev_int(struct pt_regs *regs)

	sw64_io_write(node, DEV_INT_CONFIG, config_val);
}
#else
static void handle_dev_int(struct pt_regs *regs)
{
	pr_crit(PREFIX "the child controller PINTC is not configured!\n");
}
#endif

int pme_state;