mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
irqdomain: Simple NUMA awareness.
While common irqdesc allocation is node aware, the irqdomain code is not. Presently we observe a number of regressions/inconsistencies on NUMA-capable platforms: - Platforms using irqdomains with legacy mappings, where the irq_descs are allocated node-local and the irqdomain data structure is not. - Drivers implementing irqdomains will lose node locality regardless of the underlying struct device's node id. This plugs in NUMA node id proliferation across the various allocation callsites by way of_node_to_nid() node lookup. While of_node_to_nid() does the right thing for OF-capable platforms it doesn't presently handle the non-DT case. This is trivially dealt with by simply wraping in to numa_node_id() unconditionally. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
parent
efd68e7254
commit
5ca4db61e8
2 changed files with 18 additions and 10 deletions
|
@ -21,6 +21,7 @@
|
|||
#include <linux/kref.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/topology.h>
|
||||
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/errno.h>
|
||||
|
@ -158,11 +159,6 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
|
|||
|
||||
#define OF_BAD_ADDR ((u64)-1)
|
||||
|
||||
#ifndef of_node_to_nid
|
||||
static inline int of_node_to_nid(struct device_node *np) { return -1; }
|
||||
#define of_node_to_nid of_node_to_nid
|
||||
#endif
|
||||
|
||||
static inline const char* of_node_full_name(struct device_node *np)
|
||||
{
|
||||
return np ? np->full_name : "<no-node>";
|
||||
|
@ -412,6 +408,15 @@ static inline int of_machine_is_compatible(const char *compat)
|
|||
while (0)
|
||||
#endif /* CONFIG_OF */
|
||||
|
||||
#ifndef of_node_to_nid
|
||||
static inline int of_node_to_nid(struct device_node *np)
|
||||
{
|
||||
return numa_node_id();
|
||||
}
|
||||
|
||||
#define of_node_to_nid of_node_to_nid
|
||||
#endif
|
||||
|
||||
/**
|
||||
* of_property_read_bool - Findfrom a property
|
||||
* @np: device node from which the property value is to be read.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue