diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 20:44:03 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-31 20:44:03 -0700 |
commit | 2d534926205db9ffce4bbbde67cb9b2cee4b835c (patch) | |
tree | b906e41009b54d9a286df3454a841fd2b3f170cc /include/linux/of.h | |
parent | ac694dbdbc403c00e2c14d10bc7b8412cc378259 (diff) | |
parent | f5a1ad057e6da5d0fc9c5677ff44797d193d3e62 (diff) | |
download | blackbird-op-linux-2d534926205db9ffce4bbbde67cb9b2cee4b835c.tar.gz blackbird-op-linux-2d534926205db9ffce4bbbde67cb9b2cee4b835c.zip |
Merge tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6
Pull irqdomain changes from Grant Likely:
"Round of refactoring and enhancements to irq_domain infrastructure.
This series starts the process of simplifying irqdomain. The ultimate
goal is to merge LEGACY, LINEAR and TREE mappings into a single
system, but had to back off from that after some last minute bugs.
Instead it mainly reorganizes the code and ensures that the reverse
map gets populated when the irq is mapped instead of the first time it
is looked up.
Merging of the irq_domain types is deferred to v3.7
In other news, this series adds helpers for creating static mappings
on a linear or tree mapping."
* tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6:
irqdomain: Improve diagnostics when a domain mapping fails
irqdomain: eliminate slow-path revmap lookups
irqdomain: Fix irq_create_direct_mapping() to test irq_domain type.
irqdomain: Eliminate dedicated radix lookup functions
irqdomain: Support for static IRQ mapping and association.
irqdomain: Always update revmap when setting up a virq
irqdomain: Split disassociating code into separate function
irq_domain: correct a minor wrong comment for linear revmap
irq_domain: Standardise legacy/linear domain selection
irqdomain: Make ops->map hook optional
irqdomain: Remove unnecessary test for IRQ_DOMAIN_MAP_LEGACY
irqdomain: Simple NUMA awareness.
devicetree: add helper inline for retrieving a node's full name
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 42c2a58328c1..5919ee33f2b7 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -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>"; @@ -427,6 +423,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. |