Re: [PATCH v4] PCI: ixp4xx: Add a new driver for IXP4xx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +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



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux