[Skiboot] [PATCH 5/5] Force noinline for pci_add_(one_)device_node(s)()
Stewart Smith
stewart at linux.ibm.com
Fri Mar 29 14:25:08 AEDT 2019
We call all of these things recursively, so don't use excess stack.
Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
core/pci.c | 20 ++++++++++----------
include/compiler.h | 1 +
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/core/pci.c b/core/pci.c
index 7dbe6aace69e..57154b07474d 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -1524,11 +1524,11 @@ static void pci_print_summary_line(struct phb *phb, struct pci_device *pd,
rev_class & 0xff, rev_class >> 8, cname, slotstr);
}
-static void pci_add_one_device_node(struct phb *phb,
- struct pci_device *pd,
- struct dt_node *parent_node,
- struct pci_lsi_state *lstate,
- uint8_t swizzle)
+static void __noinline pci_add_one_device_node(struct phb *phb,
+ struct pci_device *pd,
+ struct dt_node *parent_node,
+ struct pci_lsi_state *lstate,
+ uint8_t swizzle)
{
struct dt_node *np;
const char *cname;
@@ -1653,11 +1653,11 @@ static void pci_add_one_device_node(struct phb *phb,
dt_add_property(np, "ranges", ranges_direct, sizeof(ranges_direct));
}
-void pci_add_device_nodes(struct phb *phb,
- struct list_head *list,
- struct dt_node *parent_node,
- struct pci_lsi_state *lstate,
- uint8_t swizzle)
+void __noinline pci_add_device_nodes(struct phb *phb,
+ struct list_head *list,
+ struct dt_node *parent_node,
+ struct pci_lsi_state *lstate,
+ uint8_t swizzle)
{
struct pci_device *pd;
diff --git a/include/compiler.h b/include/compiler.h
index 35bf16525761..9a4602e7377f 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -31,6 +31,7 @@
/* not __const as this has a different meaning (const) */
#define __attrconst __attribute__((const))
#define __warn_unused_result __attribute__((warn_unused_result))
+#define __noinline __attribute__((noinline))
#if 0 /* Provided by gcc stddef.h */
#define offsetof(type,m) __builtin_offsetof(type,m)
--
2.20.1
More information about the Skiboot
mailing list