Subject: [PATCH 2/5] irq: Remove unsued flags argument from __handle_irq_event_percpu().

The __IRQF_TIMER bit from the flags argument was used in
add_interrupt_randomness() to distinguish the timer interrupt from other
interrupts. This is no longer the case.

Remove the flags argument from __handle_irq_event_percpu().

Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
---
kernel/irq/chip.c | 4 +---
kernel/irq/handle.c | 9 ++-------
kernel/irq/internals.h | 2 +-
3 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index f895265d75487..c093246630882 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -575,8 +575,6 @@ EXPORT_SYMBOL_GPL(handle_simple_irq);
*/
void handle_untracked_irq(struct irq_desc *desc)
{
- unsigned int flags = 0;
-
raw_spin_lock(&desc->lock);

if (!irq_may_run(desc))
@@ -593,7 +591,7 @@ void handle_untracked_irq(struct irq_desc *desc)
irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS);
raw_spin_unlock(&desc->lock);

- __handle_irq_event_percpu(desc, &flags);
+ __handle_irq_event_percpu(desc);

raw_spin_lock(&desc->lock);
irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS);
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 68c76c3caaf55..9489f93b3db34 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -136,7 +136,7 @@ void __irq_wake_thread(struct irq_desc *desc, struct irqaction *action)
wake_up_process(action->thread);
}

-irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc, unsigned int *flags)
+irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc)
{
irqreturn_t retval = IRQ_NONE;
unsigned int irq = desc->irq_data.irq;
@@ -174,10 +174,6 @@ irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc, unsigned int *flags
}

__irq_wake_thread(desc, action);
-
- fallthrough; /* to add to randomness */
- case IRQ_HANDLED:
- *flags |= action->flags;
break;

default:
@@ -193,9 +189,8 @@ irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc, unsigned int *flags
irqreturn_t handle_irq_event_percpu(struct irq_desc *desc)
{
irqreturn_t retval;
- unsigned int flags = 0;

- retval = __handle_irq_event_percpu(desc, &flags);
+ retval = __handle_irq_event_percpu(desc);

add_interrupt_randomness(desc->irq_data.irq);

diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index 54363527feea4..99cbdf55a8bda 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -103,7 +103,7 @@ extern int __irq_get_irqchip_state(struct irq_data *data,

extern void init_kstat_irqs(struct irq_desc *desc, int node, int nr);

-irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc, unsigned int *flags);
+irqreturn_t __handle_irq_event_percpu(struct irq_desc *desc);
irqreturn_t handle_irq_event_percpu(struct irq_desc *desc);
irqreturn_t handle_irq_event(struct irq_desc *desc);

--
2.34.1



2021-12-07 17:41:29

by Jason A. Donenfeld

[permalink] [raw]
Subject: Re: [PATCH 2/5] irq: Remove unsued flags argument from __handle_irq_event_percpu().

Applied to the crng/random.git tree, thanks.

2021-12-11 22:39:08

by Thomas Gleixner

[permalink] [raw]
Subject: Re: [PATCH 2/5] irq: Remove unsued flags argument from __handle_irq_event_percpu().

Jason,

On Tue, Dec 07 2021 at 18:41, Jason A. Donenfeld wrote:

> Applied to the crng/random.git tree, thanks.

I have no objections vs. that patch, but it is good practice to solicit
at least an ACK from the relevant maintainers before applying patches
which touch other subsystems.

Thanks,

tglx

2021-12-12 21:17:42

by Jason A. Donenfeld

[permalink] [raw]
Subject: Re: [PATCH 2/5] irq: Remove unsued flags argument from __handle_irq_event_percpu().

On Sat, Dec 11, 2021 at 11:39 PM Thomas Gleixner <[email protected]> wrote:
>
> Jason,
>
> On Tue, Dec 07 2021 at 18:41, Jason A. Donenfeld wrote:
>
> > Applied to the crng/random.git tree, thanks.
>
> I have no objections vs. that patch, but it is good practice to solicit
> at least an ACK from the relevant maintainers before applying patches
> which touch other subsystems.

Sorry about that. Thanks for letting me know, and well noted for next time.

Jason