linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci <linux-pci@vger.kernel.org>,
	Imre Kaloz <kaloz@openwrt.org>,
	Krzysztof Halasa <khalasa@piap.pl>,
	Zoltan HERPAI <wigyori@uid0.hu>,
	Raylynn Knight <rayknight@me.com>
Subject: Re: [PATCH v4] PCI: ixp4xx: Add a new driver for IXP4xx
Date: Tue, 1 Jun 2021 15:45:13 +0200	[thread overview]
Message-ID: <CAK8P3a26kU6W_JK6NmQtCPRWrv12-pYtTLUP3xcE5fNqK5oW3Q@mail.gmail.com> (raw)
In-Reply-To: <20210601114301.2685875-1-linus.walleij@linaro.org>

> +static int ixp4xx_pci_read(struct ixp4xx_pci *p, u32 addr, u32 cmd, u32 *data)
> +{
> +       unsigned long flags;
> +       int ret;
> +
> +       raw_spin_lock_irqsave(&p->lock, flags);

You should not need an extra spinlock on arm, as CONFIG_PCI_LOCKLESS_CONFIG
is not set here.

> +
> +/*
> + * This driver needs to be a builtin module with suppressed bind
> + * attributes since the probe() is initializing a hard exception
> + * handler and this can only be done from __init-tagged code
> + * sections. This module cannot be removed and inserted at all.
> + */
> +static struct platform_driver ixp4xx_pci_driver = {
> +       .driver = {
> +               .name = "ixp4xx-pci",
> +               .suppress_bind_attrs = true,
> +               .of_match_table = of_match_ptr(ixp4xx_pci_of_match),
> +       },
> +};
> +/*
> + * This is the only way to have an __init tagged probe that does
> + * not cause link errors.
> + */
> +builtin_platform_driver_probe(ixp4xx_pci_driver, ixp4xx_pci_probe);

I guess you could install the fault handler from a module init
function and at least allow unbind, or possibly forced module removal
(which would leave an invalid pointer in the fault handler until it
is loaded again).

         Arnd

  reply	other threads:[~2021-06-01 13:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 11:43 [PATCH v4] PCI: ixp4xx: Add a new driver for IXP4xx Linus Walleij
2021-06-01 13:45 ` Arnd Bergmann [this message]
2021-06-03 14:48 ` Lorenzo Pieralisi

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=CAK8P3a26kU6W_JK6NmQtCPRWrv12-pYtTLUP3xcE5fNqK5oW3Q@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=kaloz@openwrt.org \
    --cc=khalasa@piap.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rayknight@me.com \
    --cc=wigyori@uid0.hu \
    /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).