[PATCH v2 00/22] alpha: catch up on architecture Kconfig options

Matt Turner posted 22 patches 2 weeks, 6 days ago
Documentation/admin-guide/kernel-parameters.txt    |  2 +-
.../debug/debug-vm-pgtable/arch-support.txt        |  2 +-
.../debug/gcov-profile-all/arch-support.txt        |  2 +-
.../features/debug/kmemleak/arch-support.txt       |  2 +-
.../features/vm/pte_special/arch-support.txt       |  2 +-
arch/alpha/Kconfig                                 | 21 ++++++
arch/alpha/include/asm/perf_regs.h                 |  7 ++
arch/alpha/include/asm/pgtable.h                   | 24 +++++-
arch/alpha/include/asm/processor.h                 |  7 ++
arch/alpha/include/uapi/asm/perf_regs.h            | 34 +++++++++
arch/alpha/kernel/Makefile                         |  1 +
arch/alpha/kernel/irq.c                            |  9 ++-
arch/alpha/kernel/irq_alpha.c                      | 13 ++++
arch/alpha/kernel/perf_regs.c                      | 86 ++++++++++++++++++++++
arch/alpha/kernel/vmlinux.lds.S                    | 11 +++
arch/alpha/mm/fault.c                              | 29 ++++++++
arch/alpha/mm/init.c                               |  5 ++
17 files changed, 248 insertions(+), 9 deletions(-)
[PATCH v2 00/22] alpha: catch up on architecture Kconfig options
Posted by Matt Turner 2 weeks, 6 days ago
This is v2 of "alpha: catch up on architecture Kconfig options"
(https://lore.kernel.org/linux-alpha/CAEdQ38FoUPzftf9vDcJK8L38j+cDzTyxdL+Fj-3oAQHmmOxaOA@mail.gmail.com/T/#t),
addressing Magnus Lindholm's review and rebased onto v7.3-rc1 plus his
GENERIC_ENTRY v5
(https://lore.kernel.org/linux-alpha/20260902184058.198679-1-linmag7@gmail.com/T/#t),
per his request.

Changes since v1:

 - Dropped "fix arch_irqs_disabled_flags() to treat any raised IPL as
   disabled".  Magnus's objection was right: per the Architecture
   Reference Manual an intermediate IPL only masks interrupts at or
   below that level, and do_entInt() already drives PS.IPL to IPL_MAX
   itself before reporting hardirq state to lockdep, so the original
   arch_irqs_disabled_flags() was correct as it stood.

 - Dropped "add TRACE_IRQFLAGS_SUPPORT".  It conflicted with
   GENERIC_ENTRY exactly where Magnus expected: the entInt, entSys, and
   restore_all instrumentation it added is now redundant with the
   hardirq-state transitions GENERIC_ENTRY performs on those paths
   itself.  I want to work out separately, and with real testing,
   whether the remaining synchronous-exception entry points need
   anything at all here, rather than resend a patch I can't fully
   justify.

 - Fixed "add ARCH_SUPPORTS_PAGE_TABLE_CHECK support", which no longer
   built against v7.3-rc1: commit cf8771ca4cdb ("mm/page_table_check:
   Pass mm_struct to pxx_user_accessible_page()") changed the callback
   signature, and Alpha's copy is now updated to match.

 - Added the Signed-off-by that was missing from "select SPARSE_IRQ".

 - Folded the corresponding arch-support.txt updates into "select
   ARCH_HAS_GCOV_PROFILE_ALL", "select HAVE_DEBUG_KMEMLEAK", "add
   ARCH_HAS_PTE_SPECIAL support", and "select ARCH_HAS_DEBUG_VM_PGTABLE",
   and added ALPHA to the memtest= parameter list in
   kernel-parameters.txt.

 - Did not touch "add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP
   support" beyond rebasing it.  Magnus found real gaps there
   (tools/perf has no Alpha register mask, and regs->usp isn't
   snapshotted on the interrupt path), so I've left the corresponding
   feature matrices alone rather than claim it's done.

 - Picked up Tested-by/Reviewed-by from Magnus on the patches he gave
   them for.

Not yet addressed: whether do_entInt() should own hardirq context for
both interrupt paths and drop the irq_enter()/irq_exit() pair from
handle_irq(), which Magnus asked about on "enter hardirq context before
looking up the irq descriptor". No code change there yet; I'll follow up
on that thread separately.

Tested by cross-building with alpha-unknown-linux-gnu-gcc against
defconfig and, for the page-table-check fix, against a config with
CONFIG_PAGE_TABLE_CHECK=y. Boot tested on an AlphaServer ES47.

Also available at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha.git arch-kconfig-options-v2

Signed-off-by: Matt Turner <mattst88@gmail.com>
---
Matt Turner (22):
      alpha: enter hardirq context before looking up the irq descriptor
      alpha: select ARCH_HAS_UBSAN
      alpha: select ARCH_HAS_GCOV_PROFILE_ALL
      alpha: select HAVE_DEBUG_KMEMLEAK
      alpha: select EDAC_SUPPORT
      alpha: select ARCH_SUPPORTS_ATOMIC_RMW
      alpha: select ARCH_HAS_FAST_MULTIPLIER
      alpha: select ARCH_SUPPORTS_INT128
      alpha: select HAVE_ARCH_COMPILER_H
      alpha: select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
      alpha: add HAVE_ARCH_THREAD_STRUCT_WHITELIST support
      alpha: add ARCH_HAS_PTE_SPECIAL support
      alpha: add ARCH_SUPPORTS_PAGE_TABLE_CHECK support
      alpha: select ARCH_HAS_DEBUG_VM_PGTABLE
      alpha: select HAVE_GUP_FAST
      alpha: select ARCH_USE_MEMTEST
      alpha: select SYSCTL_EXCEPTION_TRACE
      alpha: discard .eh_frame and the relocation sections
      alpha: select ARCH_WANT_LD_ORPHAN_WARN
      alpha: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
      alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support
      alpha: select SPARSE_IRQ

 Documentation/admin-guide/kernel-parameters.txt    |  2 +-
 .../debug/debug-vm-pgtable/arch-support.txt        |  2 +-
 .../debug/gcov-profile-all/arch-support.txt        |  2 +-
 .../features/debug/kmemleak/arch-support.txt       |  2 +-
 .../features/vm/pte_special/arch-support.txt       |  2 +-
 arch/alpha/Kconfig                                 | 21 ++++++
 arch/alpha/include/asm/perf_regs.h                 |  7 ++
 arch/alpha/include/asm/pgtable.h                   | 24 +++++-
 arch/alpha/include/asm/processor.h                 |  7 ++
 arch/alpha/include/uapi/asm/perf_regs.h            | 34 +++++++++
 arch/alpha/kernel/Makefile                         |  1 +
 arch/alpha/kernel/irq.c                            |  9 ++-
 arch/alpha/kernel/irq_alpha.c                      | 13 ++++
 arch/alpha/kernel/perf_regs.c                      | 86 ++++++++++++++++++++++
 arch/alpha/kernel/vmlinux.lds.S                    | 11 +++
 arch/alpha/mm/fault.c                              | 29 ++++++++
 arch/alpha/mm/init.c                               |  5 ++
 17 files changed, 248 insertions(+), 9 deletions(-)
---
base-commit: f321329c1b70835e6b0807fddac6d4117e5604fc
change-id: 20260904-arch-kconfig-options-v2-8efa959ffcbd

Best regards,
-- 
Matt Turner <mattst88@gmail.com>
Re: [PATCH v2 00/22] alpha: catch up on architecture Kconfig options
Posted by Magnus Lindholm 2 weeks, 5 days ago
Hi Matt,

On Sat, Sep 5, 2026 at 9:29 PM Matt Turner <mattst88@gmail.com> wrote:
>
> This is v2 of "alpha: catch up on architecture Kconfig options"
> (https://lore.kernel.org/linux-alpha/CAEdQ38FoUPzftf9vDcJK8L38j+cDzTyxdL+Fj-3oAQHmmOxaOA@mail.gmail.com/T/#t),
> addressing Magnus Lindholm's review and rebased onto v7.3-rc1 plus his
> GENERIC_ENTRY v5
> (https://lore.kernel.org/linux-alpha/20260902184058.198679-1-linmag7@gmail.com/T/#t),
> per his request.
>
> Changes since v1:
>
>  - Dropped "fix arch_irqs_disabled_flags() to treat any raised IPL as
>    disabled".  Magnus's objection was right: per the Architecture
>    Reference Manual an intermediate IPL only masks interrupts at or
>    below that level, and do_entInt() already drives PS.IPL to IPL_MAX
>    itself before reporting hardirq state to lockdep, so the original
>    arch_irqs_disabled_flags() was correct as it stood.
>
>  - Dropped "add TRACE_IRQFLAGS_SUPPORT".  It conflicted with
>    GENERIC_ENTRY exactly where Magnus expected: the entInt, entSys, and
>    restore_all instrumentation it added is now redundant with the
>    hardirq-state transitions GENERIC_ENTRY performs on those paths
>    itself.  I want to work out separately, and with real testing,
>    whether the remaining synchronous-exception entry points need
>    anything at all here, rather than resend a patch I can't fully
>    justify.
>
>  - Fixed "add ARCH_SUPPORTS_PAGE_TABLE_CHECK support", which no longer
>    built against v7.3-rc1: commit cf8771ca4cdb ("mm/page_table_check:
>    Pass mm_struct to pxx_user_accessible_page()") changed the callback
>    signature, and Alpha's copy is now updated to match.
>
>  - Added the Signed-off-by that was missing from "select SPARSE_IRQ".
>
>  - Folded the corresponding arch-support.txt updates into "select
>    ARCH_HAS_GCOV_PROFILE_ALL", "select HAVE_DEBUG_KMEMLEAK", "add
>    ARCH_HAS_PTE_SPECIAL support", and "select ARCH_HAS_DEBUG_VM_PGTABLE",
>    and added ALPHA to the memtest= parameter list in
>    kernel-parameters.txt.
>
>  - Did not touch "add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP
>    support" beyond rebasing it.  Magnus found real gaps there
>    (tools/perf has no Alpha register mask, and regs->usp isn't
>    snapshotted on the interrupt path), so I've left the corresponding
>    feature matrices alone rather than claim it's done.
>
>  - Picked up Tested-by/Reviewed-by from Magnus on the patches he gave
>    them for.
>
> Not yet addressed: whether do_entInt() should own hardirq context for
> both interrupt paths and drop the irq_enter()/irq_exit() pair from
> handle_irq(), which Magnus asked about on "enter hardirq context before
> looking up the irq descriptor". No code change there yet; I'll follow up
> on that thread separately.
>
> Tested by cross-building with alpha-unknown-linux-gnu-gcc against
> defconfig and, for the page-table-check fix, against a config with
> CONFIG_PAGE_TABLE_CHECK=y. Boot tested on an AlphaServer ES47.
>
> Also available at:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha.git arch-kconfig-options-v2
>
> Signed-off-by: Matt Turner <mattst88@gmail.com>
> ---
> Matt Turner (22):
>       alpha: enter hardirq context before looking up the irq descriptor
>       alpha: select ARCH_HAS_UBSAN
>       alpha: select ARCH_HAS_GCOV_PROFILE_ALL
>       alpha: select HAVE_DEBUG_KMEMLEAK
>       alpha: select EDAC_SUPPORT
>       alpha: select ARCH_SUPPORTS_ATOMIC_RMW
>       alpha: select ARCH_HAS_FAST_MULTIPLIER
>       alpha: select ARCH_SUPPORTS_INT128
>       alpha: select HAVE_ARCH_COMPILER_H
>       alpha: select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
>       alpha: add HAVE_ARCH_THREAD_STRUCT_WHITELIST support
>       alpha: add ARCH_HAS_PTE_SPECIAL support
>       alpha: add ARCH_SUPPORTS_PAGE_TABLE_CHECK support
>       alpha: select ARCH_HAS_DEBUG_VM_PGTABLE
>       alpha: select HAVE_GUP_FAST
>       alpha: select ARCH_USE_MEMTEST
>       alpha: select SYSCTL_EXCEPTION_TRACE
>       alpha: discard .eh_frame and the relocation sections
>       alpha: select ARCH_WANT_LD_ORPHAN_WARN
>       alpha: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
>       alpha: add HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support
>       alpha: select SPARSE_IRQ
>
>  Documentation/admin-guide/kernel-parameters.txt    |  2 +-
>  .../debug/debug-vm-pgtable/arch-support.txt        |  2 +-
>  .../debug/gcov-profile-all/arch-support.txt        |  2 +-
>  .../features/debug/kmemleak/arch-support.txt       |  2 +-
>  .../features/vm/pte_special/arch-support.txt       |  2 +-
>  arch/alpha/Kconfig                                 | 21 ++++++
>  arch/alpha/include/asm/perf_regs.h                 |  7 ++
>  arch/alpha/include/asm/pgtable.h                   | 24 +++++-
>  arch/alpha/include/asm/processor.h                 |  7 ++
>  arch/alpha/include/uapi/asm/perf_regs.h            | 34 +++++++++
>  arch/alpha/kernel/Makefile                         |  1 +
>  arch/alpha/kernel/irq.c                            |  9 ++-
>  arch/alpha/kernel/irq_alpha.c                      | 13 ++++
>  arch/alpha/kernel/perf_regs.c                      | 86 ++++++++++++++++++++++
>  arch/alpha/kernel/vmlinux.lds.S                    | 11 +++
>  arch/alpha/mm/fault.c                              | 29 ++++++++
>  arch/alpha/mm/init.c                               |  5 ++
>  17 files changed, 248 insertions(+), 9 deletions(-)
> ---
> base-commit: f321329c1b70835e6b0807fddac6d4117e5604fc
> change-id: 20260904-arch-kconfig-options-v2-8efa959ffcbd
>
> Best regards,
> --
> Matt Turner <mattst88@gmail.com>
>

Overall, nice work with this series!

I noticed that patches 3, 4, 12, 13, 14, and 16 contain additional
prose between your Signed-off-by and the `---` separator. git mailinfo
includes this prose in the commit message, so it separates your
sign-off from the final trailer block.

These changes are already documented in the cover letter's
changes-since-v1 section, so I think the extra paragraphs can simply
be removed. If any are intended to remain in the permanent commit
message, they should be moved above the trailer block instead.

Regards,
Magnus