Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2519312pxb; Mon, 19 Apr 2021 07:36:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwl5OOU1oblmki8DX6qnmuZr7FeZXBk1AteXvba1O4S94Pqoj8ddpGDRGmTzG/QiED2hVZ6 X-Received: by 2002:a62:7c05:0:b029:25a:3f7c:2fe2 with SMTP id x5-20020a627c050000b029025a3f7c2fe2mr14401785pfc.59.1618843016481; Mon, 19 Apr 2021 07:36:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618843016; cv=none; d=google.com; s=arc-20160816; b=GQj/oNMOpF+nRyAJrAQ1N/kF41vakd8vmgvMztLaQPLYhOxhyOPNMhOncKCr4CB+bJ O4BnviNIvFGIG00ypYwH6vUiYbF1xyrAyplnycGUDlrF2ye+bBn/zTAclHTH6UFCv/xR HRLZ93K2LXBxugOwsWt7lAmlLngHopSpz1f2etvFd2841rqO1LQYEar0MUXpvmbLsFLo vmKhSk5oPZ/u6FiL8+bdRnMO2NxYDT3PMEQrqEA4Rq0jAK4rH4+4f/PL8d7xyjmgQ7US f1a/JiCur6VLbVo39c5rdtNcbYaD3mM9pEXVnnBhkAT9coBbjS3IwuD+qJ5faYZUqNou /BzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PMC3Ky6quHfBjDRqVHZpMZOosgTGk50JJvLHHQY3ICc=; b=w2RfsT2YzzhJBEbrZwDdTDnVtGvLiCvwsr+6CIGFsui58muLg4RsZJoohsEo3fbcjd nV+Pk3Sz7KZ9Eny5RPOxwdJrxr9kKzo8PwSNqXDAm+rgfNjdpFvGtAbqVzwQvKhDeT+x xl6XJLMb6i7KNRIhn4we04rMbRcff0zmJzjTagI8tAZPG43HA4No6VhyxNGadaPik/te CKR92wWcrd/DqLjOJ0RlKS+s82G1EupWZ9YvHjUtqXz4brn422rpsjwAWFXROKAqMAzk NOv4x9PkqIg9t8cLpBxZngt4piZayxewy34oGWifg5aVV5DTcvUKrESdAYDebT3go1sK j+XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LwuXlf1L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l64si14739128pge.326.2021.04.19.07.36.44; Mon, 19 Apr 2021 07:36:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LwuXlf1L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240660AbhDSNSN (ORCPT + 99 others); Mon, 19 Apr 2021 09:18:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:47840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239873AbhDSNOn (ORCPT ); Mon, 19 Apr 2021 09:14:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BC2FA613CE; Mon, 19 Apr 2021 13:13:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618837990; bh=mVTZ/DVql5tiNk6QWlIhCIbgFMKMkNE/J1DwN+CRZAs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LwuXlf1Lx1UB60kLBIMnmM0fLAJaJhSzpXDgtFRr73ECBa9sSndaD9NO6imG06P+c cj96cQ8n/PwkYyo9yagr3I1cQZ5NggyY6/4kMOvs9X/SsVWJahcAbx1/NpnBuuk5Yh PY9x6Ev7+md15znzJaCP2TPdSDBEsJrAtcwJvXTw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Russell King , Sasha Levin Subject: [PATCH 5.11 106/122] ARM: footbridge: fix PCI interrupt mapping Date: Mon, 19 Apr 2021 15:06:26 +0200 Message-Id: <20210419130533.755180339@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419130530.166331793@linuxfoundation.org> References: <20210419130530.166331793@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Russell King [ Upstream commit 30e3b4f256b4e366a61658c294f6a21b8626dda7 ] Since commit 30fdfb929e82 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()"), the PCI code will call the IRQ mapping function whenever a PCI driver is probed. If these are marked as __init, this causes an oops if a PCI driver is loaded or bound after the kernel has initialised. Fixes: 30fdfb929e82 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()") Signed-off-by: Russell King Signed-off-by: Sasha Levin --- arch/arm/mach-footbridge/cats-pci.c | 4 ++-- arch/arm/mach-footbridge/ebsa285-pci.c | 4 ++-- arch/arm/mach-footbridge/netwinder-pci.c | 2 +- arch/arm/mach-footbridge/personal-pci.c | 5 ++--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-footbridge/cats-pci.c b/arch/arm/mach-footbridge/cats-pci.c index 0b2fd7e2e9b4..90b1e9be430e 100644 --- a/arch/arm/mach-footbridge/cats-pci.c +++ b/arch/arm/mach-footbridge/cats-pci.c @@ -15,14 +15,14 @@ #include /* cats host-specific stuff */ -static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 }; +static int irqmap_cats[] = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 }; static u8 cats_no_swizzle(struct pci_dev *dev, u8 *pin) { return 0; } -static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) +static int cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) { if (dev->irq >= 255) return -1; /* not a valid interrupt. */ diff --git a/arch/arm/mach-footbridge/ebsa285-pci.c b/arch/arm/mach-footbridge/ebsa285-pci.c index 6f28aaa9ca79..c3f280d08fa7 100644 --- a/arch/arm/mach-footbridge/ebsa285-pci.c +++ b/arch/arm/mach-footbridge/ebsa285-pci.c @@ -14,9 +14,9 @@ #include #include -static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI }; +static int irqmap_ebsa285[] = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI }; -static int __init ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) +static int ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) { if (dev->vendor == PCI_VENDOR_ID_CONTAQ && dev->device == PCI_DEVICE_ID_CONTAQ_82C693) diff --git a/arch/arm/mach-footbridge/netwinder-pci.c b/arch/arm/mach-footbridge/netwinder-pci.c index 9473aa0305e5..e8304392074b 100644 --- a/arch/arm/mach-footbridge/netwinder-pci.c +++ b/arch/arm/mach-footbridge/netwinder-pci.c @@ -18,7 +18,7 @@ * We now use the slot ID instead of the device identifiers to select * which interrupt is routed where. */ -static int __init netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) +static int netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) { switch (slot) { case 0: /* host bridge */ diff --git a/arch/arm/mach-footbridge/personal-pci.c b/arch/arm/mach-footbridge/personal-pci.c index 4391e433a4b2..9d19aa98a663 100644 --- a/arch/arm/mach-footbridge/personal-pci.c +++ b/arch/arm/mach-footbridge/personal-pci.c @@ -14,13 +14,12 @@ #include #include -static int irqmap_personal_server[] __initdata = { +static int irqmap_personal_server[] = { IRQ_IN0, IRQ_IN1, IRQ_IN2, IRQ_IN3, 0, 0, 0, IRQ_DOORBELLHOST, IRQ_DMA1, IRQ_DMA2, IRQ_PCI }; -static int __init personal_server_map_irq(const struct pci_dev *dev, u8 slot, - u8 pin) +static int personal_server_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) { unsigned char line; -- 2.30.2