From: Gavin Shan <shangw@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
Subject: [PATCH 2/8] powerpc/eeh: Export functions for hotplug
Date: Fri, 5 Jul 2013 10:57:28 +0800 [thread overview]
Message-ID: <1372993054-25730-3-git-send-email-shangw@linux.vnet.ibm.com> (raw)
In-Reply-To: <1372993054-25730-1-git-send-email-shangw@linux.vnet.ibm.com>
Make some functions public in order to support hotplug on either specific
PCI bus or PCI device in future.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/eeh.h | 9 +++++++++
arch/powerpc/kernel/eeh.c | 6 +++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index 09a8743..d9d35c2 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -209,9 +209,12 @@ unsigned long eeh_check_failure(const volatile void __iomem *token,
unsigned long val);
int eeh_dev_check_failure(struct eeh_dev *edev);
void eeh_addr_cache_build(void);
+void eeh_add_device_early(struct device_node *);
void eeh_add_device_tree_early(struct device_node *);
+void eeh_add_device_late(struct pci_dev *);
void eeh_add_device_tree_late(struct pci_bus *);
void eeh_add_sysfs_files(struct pci_bus *);
+void eeh_remove_device(struct pci_dev *, int);
void eeh_remove_bus_device(struct pci_dev *, int);
/**
@@ -252,12 +255,18 @@ static inline unsigned long eeh_check_failure(const volatile void __iomem *token
static inline void eeh_addr_cache_build(void) { }
+static inline void eeh_add_device_early(struct device_node *dn) { }
+
static inline void eeh_add_device_tree_early(struct device_node *dn) { }
+static inline void eeh_add_device_late(struct pci_dev *dev) { }
+
static inline void eeh_add_device_tree_late(struct pci_bus *bus) { }
static inline void eeh_add_sysfs_files(struct pci_bus *bus) { }
+static inline void eeh_remove_device(struct pci_dev *dev, int purge_pe) { }
+
static inline void eeh_remove_bus_device(struct pci_dev *dev, int purge_pe) { }
#define EEH_POSSIBLE_ERROR(val, type) (0)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 39954fe..a186de8 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -838,7 +838,7 @@ core_initcall_sync(eeh_init);
* on the CEC architecture, type of the device, on earlier boot
* command-line arguments & etc.
*/
-static void eeh_add_device_early(struct device_node *dn)
+void eeh_add_device_early(struct device_node *dn)
{
struct pci_controller *phb;
@@ -886,7 +886,7 @@ EXPORT_SYMBOL_GPL(eeh_add_device_tree_early);
* This routine must be used to complete EEH initialization for PCI
* devices that were added after system boot (e.g. hotplug, dlpar).
*/
-static void eeh_add_device_late(struct pci_dev *dev)
+void eeh_add_device_late(struct pci_dev *dev)
{
struct device_node *dn;
struct eeh_dev *edev;
@@ -975,7 +975,7 @@ EXPORT_SYMBOL_GPL(eeh_add_sysfs_files);
* this device will no longer be detected after this call; thus,
* i/o errors affecting this slot may leave this device unusable.
*/
-static void eeh_remove_device(struct pci_dev *dev, int purge_pe)
+void eeh_remove_device(struct pci_dev *dev, int purge_pe)
{
struct eeh_dev *edev;
--
1.7.5.4
next prev parent reply other threads:[~2013-07-05 2:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-05 2:57 [PATCH v1 0/8] EEH Followup Fixes (II) Gavin Shan
2013-07-05 2:57 ` [PATCH 1/8] PCI: Add pcibios_stop_dev() Gavin Shan
2013-07-05 3:08 ` Benjamin Herrenschmidt
2013-07-05 18:49 ` Bjorn Helgaas
2013-07-05 22:36 ` Benjamin Herrenschmidt
2013-07-05 22:49 ` Bjorn Helgaas
2013-07-05 23:05 ` Benjamin Herrenschmidt
2013-07-05 2:57 ` Gavin Shan [this message]
2013-07-05 2:57 ` [PATCH 3/8] powerpc/pci: Override pcibios_stop_dev() Gavin Shan
2013-07-05 2:57 ` [PATCH 4/8] PCI/hotplug: Needn't remove EEH cache again Gavin Shan
2013-07-05 18:51 ` Bjorn Helgaas
2013-07-05 2:57 ` [PATCH 5/8] powerpc/eeh: Keep PE during hotplug Gavin Shan
2013-07-05 2:57 ` [PATCH 6/8] powerpc/eeh: Tranverse EEH devices with safe mode Gavin Shan
2013-07-05 2:57 ` [PATCH 7/8] powerpc/pci: Partial hotplug support Gavin Shan
2013-07-05 2:57 ` [PATCH 8/8] powerpc/eeh: Support partial hotplug Gavin Shan
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=1372993054-25730-3-git-send-email-shangw@linux.vnet.ibm.com \
--to=shangw@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).