linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Bjorn Helgaas" <helgaas@kernel.org>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Bjorn Helgaas" <bhelgaas@google.com>
Subject: Re: [PATCH] PCI: ixp4xx: Guard ARM32-specific hook_fault_code()
Date: Tue, 30 Sep 2025 21:50:40 +0100	[thread overview]
Message-ID: <aNxCoN2fP4aEAH2i@shell.armlinux.org.uk> (raw)
In-Reply-To: <CACRpkdZFy2Kb0BaEkMiTi3j89H-6G=chuZSijtRRg7QCCktLDA@mail.gmail.com>

On Tue, Sep 30, 2025 at 08:59:36PM +0200, Linus Walleij wrote:
> On Thu, Sep 25, 2025 at 10:27 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> 
> > From: Bjorn Helgaas <bhelgaas@google.com>
> >
> > hook_fault_code() is an ARM32-specific API.  Guard it and related code with
> > CONFIG_ARM #ifdefs so the driver can be compile tested on other
> > architectures.
> >
> > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> 
> It looks OK to me
> Acked-by: Linus Walleij <linus.walleij@linar.org>
> 
> I see some other ARM32 drivers use it too, but we surely do
> not have a arch-agnostic way of handling bus errors so perhaps it
> need to be like this.
> 
> I think Russell created the fault hooks originally so CC:ing him
> in.

I wonder what the point of compile testing if it needs code to be
#ifdef'd out.

Wouldn't it be better to add something like:

#ifndef CONFIG_ARM
static inline void hook_fault_code(int n, int (*fn)(unsigned long, unsigned int,
						    struct pt_regs *),
				   int sig, int code, const char *name)
{
}
#endif

maybe to a local header that pci-imx6, pci-keystone, pcie-rcar-host
and pci-ixp4xx can all share?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2025-09-30 20:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-25 20:26 [PATCH] PCI: ixp4xx: Guard ARM32-specific hook_fault_code() Bjorn Helgaas
2025-09-30 18:59 ` Linus Walleij
2025-09-30 20:50   ` Russell King (Oracle) [this message]
2025-10-06 19:42     ` Bjorn Helgaas
2025-10-19  7:42 ` Manivannan Sadhasivam

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=aNxCoN2fP4aEAH2i@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=robh@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).