mbox series

[0/3] Cleanup MAY_HAVE_SPARSE_IRQ

Message ID 20210927081402.191717-1-wangkefeng.wang@huawei.com (mailing list archive)
Headers show
Series Cleanup MAY_HAVE_SPARSE_IRQ | expand

Message

Kefeng Wang Sept. 27, 2021, 8:13 a.m. UTC
Most ARCHs support SPARSE_IRQ, and MAY_HAVE_SPARSE_IRQ is useless, and
only sh and csky select it, but the could use SPARSE_IRQ too, let's
kill MAY_HAVE_SPARSE_IRQ, also cleanup the kernel/irq/Kconfig a little.

Kefeng Wang (3):
  sh: Cleanup about SPARSE_IRQ
  csky: Use SPARSE_IRQ
  genirq: Cleanup Kconfig

 arch/csky/Kconfig         |  2 +-
 arch/sh/Kconfig           |  1 -
 arch/sh/include/asm/irq.h |  9 -------
 kernel/irq/Kconfig        | 50 ++++++++++++++++-----------------------
 4 files changed, 21 insertions(+), 41 deletions(-)

Comments

Guo Ren Sept. 27, 2021, 12:09 p.m. UTC | #1
I didn't see the patch delete:
#else /* !CONFIG_SPARSE_IRQ */
struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = {
        [0 ... NR_IRQS-1] = {
                .handle_irq     = handle_bad_irq,
                .depth          = 1,
                .lock           = __RAW_SPIN_LOCK_UNLOCKED(irq_desc->lock),
        }
};
...

Flat irq_desc[] is simple and easy for debugging. We do want to del it?

On Mon, Sep 27, 2021 at 4:11 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
> Most ARCHs support SPARSE_IRQ, and MAY_HAVE_SPARSE_IRQ is useless, and
> only sh and csky select it, but the could use SPARSE_IRQ too, let's
> kill MAY_HAVE_SPARSE_IRQ, also cleanup the kernel/irq/Kconfig a little.
>
> Kefeng Wang (3):
>   sh: Cleanup about SPARSE_IRQ
>   csky: Use SPARSE_IRQ
>   genirq: Cleanup Kconfig
>
>  arch/csky/Kconfig         |  2 +-
>  arch/sh/Kconfig           |  1 -
>  arch/sh/include/asm/irq.h |  9 -------
>  kernel/irq/Kconfig        | 50 ++++++++++++++++-----------------------
>  4 files changed, 21 insertions(+), 41 deletions(-)
>
> --
> 2.26.2
>
Kefeng Wang Sept. 27, 2021, 12:35 p.m. UTC | #2
On 2021/9/27 20:09, Guo Ren wrote:
> I didn't see the patch delete:
> #else /* !CONFIG_SPARSE_IRQ */
> struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = {
>          [0 ... NR_IRQS-1] = {
>                  .handle_irq     = handle_bad_irq,
>                  .depth          = 1,
>                  .lock           = __RAW_SPIN_LOCK_UNLOCKED(irq_desc->lock),
>          }
> };
> ...
>
> Flat irq_desc[] is simple and easy for debugging. We do want to del it?

This patches want to kill MAY_HAVE_SPARSE_IRQ,  not !SPARSE_IRQ.

so I won't delete above parts(eg, ARM could use both SPARSE_IRQ and

!SPARSE_IRQ via different config,)

>
> On Mon, Sep 27, 2021 at 4:11 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> Most ARCHs support SPARSE_IRQ, and MAY_HAVE_SPARSE_IRQ is useless, and
>> only sh and csky select it, but the could use SPARSE_IRQ too, let's
>> kill MAY_HAVE_SPARSE_IRQ, also cleanup the kernel/irq/Kconfig a little.
>>
>> Kefeng Wang (3):
>>    sh: Cleanup about SPARSE_IRQ
>>    csky: Use SPARSE_IRQ
>>    genirq: Cleanup Kconfig
>>
>>   arch/csky/Kconfig         |  2 +-
>>   arch/sh/Kconfig           |  1 -
>>   arch/sh/include/asm/irq.h |  9 -------
>>   kernel/irq/Kconfig        | 50 ++++++++++++++++-----------------------
>>   4 files changed, 21 insertions(+), 41 deletions(-)
>>
>> --
>> 2.26.2
>>
>
Guo Ren Sept. 27, 2021, 2:08 p.m. UTC | #3
On Mon, Sep 27, 2021 at 8:35 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
>
> On 2021/9/27 20:09, Guo Ren wrote:
> > I didn't see the patch delete:
> > #else /* !CONFIG_SPARSE_IRQ */
> > struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = {
> >          [0 ... NR_IRQS-1] = {
> >                  .handle_irq     = handle_bad_irq,
> >                  .depth          = 1,
> >                  .lock           = __RAW_SPIN_LOCK_UNLOCKED(irq_desc->lock),
> >          }
> > };
> > ...
> >
> > Flat irq_desc[] is simple and easy for debugging. We do want to del it?
>
> This patches want to kill MAY_HAVE_SPARSE_IRQ,  not !SPARSE_IRQ.
>
> so I won't delete above parts(eg, ARM could use both SPARSE_IRQ and
>
> !SPARSE_IRQ via different config,)
>
> >
> > On Mon, Sep 27, 2021 at 4:11 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> >> Most ARCHs support SPARSE_IRQ, and MAY_HAVE_SPARSE_IRQ is useless, and
> >> only sh and csky select it, but the could use SPARSE_IRQ too, let's
> >> kill MAY_HAVE_SPARSE_IRQ, also cleanup the kernel/irq/Kconfig a little.
Why couldn't choice SPARSE in menuconfig?

> >>
> >> Kefeng Wang (3):
> >>    sh: Cleanup about SPARSE_IRQ
> >>    csky: Use SPARSE_IRQ
> >>    genirq: Cleanup Kconfig
> >>
> >>   arch/csky/Kconfig         |  2 +-
> >>   arch/sh/Kconfig           |  1 -
> >>   arch/sh/include/asm/irq.h |  9 -------
> >>   kernel/irq/Kconfig        | 50 ++++++++++++++++-----------------------
> >>   4 files changed, 21 insertions(+), 41 deletions(-)
> >>
> >> --
> >> 2.26.2
> >>
> >
Guo Ren Sept. 28, 2021, 5:08 a.m. UTC | #4
On Mon, Sep 27, 2021 at 4:11 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
> Most ARCHs support SPARSE_IRQ, and MAY_HAVE_SPARSE_IRQ is useless, and
> only sh and csky select it, but the could use SPARSE_IRQ too, let's
> kill MAY_HAVE_SPARSE_IRQ, also cleanup the kernel/irq/Kconfig a little.
Can you elaborate the reason on why we need to kill MAY_HAVE_SPARSE_IRQ?
What are the benefits after the patch? (As you know we couldn't drop
"!SPARSE_IRQ".)

>
> Kefeng Wang (3):
>   sh: Cleanup about SPARSE_IRQ
>   csky: Use SPARSE_IRQ
>   genirq: Cleanup Kconfig
>
>  arch/csky/Kconfig         |  2 +-
>  arch/sh/Kconfig           |  1 -
>  arch/sh/include/asm/irq.h |  9 -------
>  kernel/irq/Kconfig        | 50 ++++++++++++++++-----------------------
>  4 files changed, 21 insertions(+), 41 deletions(-)
>
> --
> 2.26.2
>
Kefeng Wang Sept. 28, 2021, 5:43 a.m. UTC | #5
On 2021/9/28 13:08, Guo Ren wrote:
> On Mon, Sep 27, 2021 at 4:11 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> Most ARCHs support SPARSE_IRQ, and MAY_HAVE_SPARSE_IRQ is useless, and
>> only sh and csky select it, but the could use SPARSE_IRQ too, let's
>> kill MAY_HAVE_SPARSE_IRQ, also cleanup the kernel/irq/Kconfig a little.
> Can you elaborate the reason on why we need to kill MAY_HAVE_SPARSE_IRQ?
> What are the benefits after the patch? (As you know we couldn't drop
> "!SPARSE_IRQ".)

If csky want to keep MAY_HAVE_SPARSE_IRQ, then I won't kill it, or no 
one use it,

then cleanup it.