diff mbox series

[v2,099/169] Correct SPL uses of I8259_PIC

Message ID 20230205224118.233425-100-sjg@chromium.org
State Changes Requested
Delegated to: Tom Rini
Headers show
Series Kconfig: More cleanup of CONFIG options | expand

Commit Message

Simon Glass Feb. 5, 2023, 10:40 p.m. UTC
This converts 4 usages of this option to the non-SPL form, since there is
no SPL_I8259_PIC defined in Kconfig

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 arch/x86/lib/interrupts.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Tom Rini Feb. 10, 2023, 12:41 p.m. UTC | #1
On Sun, Feb 05, 2023 at 03:40:08PM -0700, Simon Glass wrote:

> This converts 4 usages of this option to the non-SPL form, since there is
> no SPL_I8259_PIC defined in Kconfig
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

This is used to avoid code in SPL.
Simon Glass Feb. 12, 2023, 11:14 p.m. UTC | #2
Hi Tom,

On Fri, 10 Feb 2023 at 05:41, Tom Rini <trini@konsulko.com> wrote:
>
> On Sun, Feb 05, 2023 at 03:40:08PM -0700, Simon Glass wrote:
>
> > This converts 4 usages of this option to the non-SPL form, since there is
> > no SPL_I8259_PIC defined in Kconfig
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
>
> This is used to avoid code in SPL.
>
I'll add this to config_nospl

Regards,
diff mbox series

Patch

diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c
index ff52959ed28..33d6eb49d75 100644
--- a/arch/x86/lib/interrupts.c
+++ b/arch/x86/lib/interrupts.c
@@ -66,7 +66,7 @@  void irq_install_handler(int irq, interrupt_handler_t *handler, void *arg)
 	irq_handlers[irq].arg = arg;
 	irq_handlers[irq].count = 0;
 
-	if (CONFIG_IS_ENABLED(I8259_PIC))
+	if (IS_ENABLED(CONFIG_I8259_PIC))
 		unmask_irq(irq);
 
 	if (status)
@@ -86,7 +86,7 @@  void irq_free_handler(int irq)
 
 	status = disable_interrupts();
 
-	if (CONFIG_IS_ENABLED(I8259_PIC))
+	if (IS_ENABLED(CONFIG_I8259_PIC))
 		mask_irq(irq);
 
 	irq_handlers[irq].handler = NULL;
@@ -108,13 +108,13 @@  void do_irq(int hw_irq)
 	}
 
 	if (irq_handlers[irq].handler) {
-		if (CONFIG_IS_ENABLED(I8259_PIC))
+		if (IS_ENABLED(CONFIG_I8259_PIC))
 			mask_irq(irq);
 
 		irq_handlers[irq].handler(irq_handlers[irq].arg);
 		irq_handlers[irq].count++;
 
-		if (CONFIG_IS_ENABLED(I8259_PIC)) {
+		if (IS_ENABLED(CONFIG_I8259_PIC)) {
 			unmask_irq(irq);
 			specific_eoi(irq);
 		}