lkml.org 
[lkml]   [2017]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] MIPS: Fix PCI host bridge map_irq() hook section mismatches
On Tue, Sep 19, 2017 at 12:49 PM, Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
> Commit 04c81c7293df ("MIPS: PCI: Replace pci_fixup_irqs() call with host
> bridge IRQ mapping hooks") allowed to move the PCI irq fixup to the new
> host bridge map/swizzle_irq() hooks mechanism. Those hooks can also be
> called after boot completed - with all __init/__initdata/__initconst
> sections freed by the kernel - therefore functions called by them (and
> the data they refer to) must not be marked as
> __init/__initdata/__initconst lest compilation triggers section
> mismatches warnings.
>
> Fix all the boards files map_irq() hooks by simply removing the
> respective __init/__initdata/__initconst section markers and by
> adding another persistent hook IRQ map for the txx9 board files.
>
> Fixes: 04c81c7293df ("MIPS: PCI: Replace pci_fixup_irqs() call with host
> bridge IRQ mapping hooks")
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>

Aside from one typo

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

> diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c
> index 0bd2a1e..499da2d 100644
> --- a/arch/mips/txx9/generic/pci.c
> +++ b/arch/mips/txx9/generic/pci.c
> @@ -386,9 +386,10 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
> return 0;
> }
>
> -int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
> +static int (*txx9_pci_map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
> +int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
> {
> - return txx9_board_vec->pci_map_irq(dev, slot, pin);
> + return txx9_map_irq(dev, slot, pin);
> }
>
> char * (*txx9_board_pcibios_setup)(char *str) __initdata;

s/pcibios_map_irq/txx9_pci_map_irq/

Arnd

\
 
 \ /
  Last update: 2017-09-19 14:29    [W:0.056 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site