[Skiboot] [PATCH v3 1/2] pci: Add a framework for quirks

Andrew Donnellan andrew.donnellan at au1.ibm.com
Fri Feb 24 16:45:47 AEDT 2017

On 24/02/17 16:36, Russell Currey wrote:
> In future we may want to be able to do fixups for specific PCI devices in
> skiboot, so add a small framework for doing this.
> This is not intended for the same purposes as quirks in the Linux kernel,
> as the PCI devices that quirks can match for in skiboot are not properly
> configured.  This is intended to enable having a custom path to make
> changes that don't directly interact with the PCI device, for example
> adding device tree entries.
> Signed-off-by: Russell Currey <ruscur at russell.cc>
> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> ---
> v2 [ruscur]: Drop dt_node from pci_handle_quirk() thanks to Gavin

Looks fairly sensible to me.

Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

> +#include <skiboot.h>
> +#include <pci.h>
> +#include <pci-quirk.h>
> +#include <ast.h>
> +
> +/* Quirks are: {fixup function, vendor ID, (device ID or PCI_ANY_ID)} */
> +static const struct pci_quirk quirk_table[] = {
> +	{0}

This adds a slightly silly sparse warning:

core/pci-quirk.c:71:10: warning: Using plain integer as NULL pointer

Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited

More information about the Skiboot mailing list