LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Shawn Anastasio <shawn@anastas.io>
To: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Cc: bhelgaas@google.com, benh@kernel.crashing.org, paulus@samba.org,
mpe@ellerman.id.au, sbobroff@linux.ibm.com,
xyjxie@linux.vnet.ibm.com, rppt@linux.ibm.com,
linux-kernel@vger.kernel.org
Subject: [PATCH v3 2/3] powerpc/64: Enable pcibios_after_init hook on ppc64
Date: Mon, 27 May 2019 23:03:12 -0500 [thread overview]
Message-ID: <20190528040313.35582-3-shawn@anastas.io> (raw)
In-Reply-To: <20190528040313.35582-1-shawn@anastas.io>
Enable the pcibios_after_init hook on all powerpc platforms.
This hook is executed at the end of pcibios_init and was previously
only available on CONFIG_PPC32.
Since it is useful and not inherently limited to 32-bit mode,
remove the limitation and allow it on all powerpc platforms.
Signed-off-by: Shawn Anastasio <shawn@anastas.io>
---
arch/powerpc/include/asm/machdep.h | 3 +--
arch/powerpc/kernel/pci_64.c | 4 ++++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index 2f0ca6560e47..2fbfaa9176ed 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -150,6 +150,7 @@ struct machdep_calls {
void (*init)(void);
void (*kgdb_map_scc)(void);
+#endif /* CONFIG_PPC32 */
/*
* optional PCI "hooks"
@@ -157,8 +158,6 @@ struct machdep_calls {
/* Called at then very end of pcibios_init() */
void (*pcibios_after_init)(void);
-#endif /* CONFIG_PPC32 */
-
/* Called in indirect_* to avoid touching devices */
int (*pci_exclude_device)(struct pci_controller *, unsigned char, unsigned char);
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 9d8c10d55407..fba7fe6e4a50 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -68,6 +68,10 @@ static int __init pcibios_init(void)
printk(KERN_DEBUG "PCI: Probing PCI hardware done\n");
+ /* Call machine dependent post-init code */
+ if (ppc_md.pcibios_after_init)
+ ppc_md.pcibios_after_init();
+
return 0;
}
--
2.20.1
next prev parent reply other threads:[~2019-05-28 4:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 4:03 [PATCH v3 0/3] Allow custom PCI resource alignment on pseries Shawn Anastasio
2019-05-28 4:03 ` [PATCH v3 1/3] PCI: Introduce pcibios_ignore_alignment_request Shawn Anastasio
2019-05-28 5:36 ` Oliver
2019-05-28 5:50 ` Shawn Anastasio
2019-05-28 6:27 ` Alexey Kardashevskiy
2019-05-28 7:39 ` Shawn Anastasio
2019-05-30 3:39 ` Alexey Kardashevskiy
2019-05-30 22:49 ` Shawn Anastasio
2019-05-31 3:56 ` Alexey Kardashevskiy
2019-06-03 2:23 ` Shawn Anastasio
2019-06-03 5:02 ` Alexey Kardashevskiy
2019-06-03 8:35 ` Alexey Kardashevskiy
2019-06-03 9:12 ` Shawn Anastasio
2019-05-29 14:00 ` Bjorn Helgaas
2019-05-30 6:55 ` [EXTERNAL] " Sam Bobroff
2019-05-30 22:33 ` Shawn Anastasio
2019-05-28 4:03 ` Shawn Anastasio [this message]
2019-05-28 4:03 ` [PATCH v3 3/3] powerpc/pseries: Allow user-specified PCI resource alignment after init Shawn Anastasio
2019-05-29 14:02 ` Bjorn Helgaas
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=20190528040313.35582-3-shawn@anastas.io \
--to=shawn@anastas.io \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=rppt@linux.ibm.com \
--cc=sbobroff@linux.ibm.com \
--cc=xyjxie@linux.vnet.ibm.com \
--subject='Re: [PATCH v3 2/3] powerpc/64: Enable pcibios_after_init hook on ppc64' \
/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
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).