Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Karl Mehltretter" <kmehltretter@gmail.com>,
	"Vladimir Zapolskiy" <vz@mleia.com>,
	"Piotr Wojtaszczyk" <piotr.wojtaszczyk@timesys.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: lpc32xx: only run arch_initcalls on LPC32xx hardware
Date: Sun, 12 Jul 2026 23:04:51 +0200	[thread overview]
Message-ID: <b0202a09-af6d-4dda-ad9f-64e727cd9df0@app.fastmail.com> (raw)
In-Reply-To: <20260712205617.44944-1-kmehltretter@gmail.com>

On Sun, Jul 12, 2026, at 22:56, Karl Mehltretter wrote:
> lpc32xx_check_uid() and lpc32xx_pm_init() are arch_initcalls that poke
> LPC32xx-only registers (the CLKPWR unique-ID and the EMC control
> register). Since the multiplatform conversion they also run on other
> ARCH_MULTI_V5 boards, where the access faults, e.g. on versatile:
>
>   Unable to handle kernel paging request at virtual address f4004130
>   PC is at lpc32xx_check_uid+0x2c/0x9c
>
> Bail out of both unless we are running on an LPC32xx SoC, reusing the
> machine's DT_MACHINE compatible list so the guard can't drift from it.
>
> Fixes: 75bf1bd7d2f9 ("ARM: lpc32xx: allow multiplatform build")
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>

Hi Karl,

This fix looks correct to me, but I think it would be better
to replace the arch_initcall() entries with a direct function
call from lpc3250_machine_init(), which also runs at the
arch_initcall level and is already guarded properly.

The calls should be entered in link order, which would
mean common.c, pm.c, phy3250.c.

      Arnd


      reply	other threads:[~2026-07-12 21:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-12 20:56 [PATCH] ARM: lpc32xx: only run arch_initcalls on LPC32xx hardware Karl Mehltretter
2026-07-12 21:04 ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b0202a09-af6d-4dda-ad9f-64e727cd9df0@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=kmehltretter@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=piotr.wojtaszczyk@timesys.com \
    --cc=vz@mleia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox