powerpc: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Anatolij Gustschin <agust@denx.de> Cc: Scott Wood <oss@buserror.net> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
bcf21e3a97
commit
b7c670d673
@@ -253,7 +253,7 @@ int __init btext_find_display(int allow_nonstdout)
|
||||
|
||||
for_each_node_by_type(np, "display") {
|
||||
if (of_get_property(np, "linux,opened", NULL)) {
|
||||
printk("trying %s ...\n", np->full_name);
|
||||
printk("trying %pOF ...\n", np);
|
||||
rc = btext_initialize(np);
|
||||
printk("result: %d\n", rc);
|
||||
}
|
||||
|
@@ -167,10 +167,10 @@ static void release_cache_debugcheck(struct cache *cache)
|
||||
|
||||
list_for_each_entry(iter, &cache_list, list)
|
||||
WARN_ONCE(iter->next_local == cache,
|
||||
"cache for %s(%s) refers to cache for %s(%s)\n",
|
||||
iter->ofnode->full_name,
|
||||
"cache for %pOF(%s) refers to cache for %pOF(%s)\n",
|
||||
iter->ofnode,
|
||||
cache_type_string(iter),
|
||||
cache->ofnode->full_name,
|
||||
cache->ofnode,
|
||||
cache_type_string(cache));
|
||||
}
|
||||
|
||||
@@ -179,8 +179,8 @@ static void release_cache(struct cache *cache)
|
||||
if (!cache)
|
||||
return;
|
||||
|
||||
pr_debug("freeing L%d %s cache for %s\n", cache->level,
|
||||
cache_type_string(cache), cache->ofnode->full_name);
|
||||
pr_debug("freeing L%d %s cache for %pOF\n", cache->level,
|
||||
cache_type_string(cache), cache->ofnode);
|
||||
|
||||
release_cache_debugcheck(cache);
|
||||
list_del(&cache->list);
|
||||
@@ -194,8 +194,8 @@ static void cache_cpu_set(struct cache *cache, int cpu)
|
||||
|
||||
while (next) {
|
||||
WARN_ONCE(cpumask_test_cpu(cpu, &next->shared_cpu_map),
|
||||
"CPU %i already accounted in %s(%s)\n",
|
||||
cpu, next->ofnode->full_name,
|
||||
"CPU %i already accounted in %pOF(%s)\n",
|
||||
cpu, next->ofnode,
|
||||
cache_type_string(next));
|
||||
cpumask_set_cpu(cpu, &next->shared_cpu_map);
|
||||
next = next->next_local;
|
||||
@@ -355,7 +355,7 @@ static int cache_is_unified_d(const struct device_node *np)
|
||||
*/
|
||||
static struct cache *cache_do_one_devnode_unified(struct device_node *node, int level)
|
||||
{
|
||||
pr_debug("creating L%d ucache for %s\n", level, node->full_name);
|
||||
pr_debug("creating L%d ucache for %pOF\n", level, node);
|
||||
|
||||
return new_cache(cache_is_unified_d(node), level, node);
|
||||
}
|
||||
@@ -365,8 +365,8 @@ static struct cache *cache_do_one_devnode_split(struct device_node *node,
|
||||
{
|
||||
struct cache *dcache, *icache;
|
||||
|
||||
pr_debug("creating L%d dcache and icache for %s\n", level,
|
||||
node->full_name);
|
||||
pr_debug("creating L%d dcache and icache for %pOF\n", level,
|
||||
node);
|
||||
|
||||
dcache = new_cache(CACHE_TYPE_DATA, level, node);
|
||||
icache = new_cache(CACHE_TYPE_INSTRUCTION, level, node);
|
||||
@@ -679,7 +679,6 @@ static struct kobj_type cache_index_type = {
|
||||
|
||||
static void cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir)
|
||||
{
|
||||
const char *cache_name;
|
||||
const char *cache_type;
|
||||
struct cache *cache;
|
||||
char *buf;
|
||||
@@ -690,7 +689,6 @@ static void cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir)
|
||||
return;
|
||||
|
||||
cache = dir->cache;
|
||||
cache_name = cache->ofnode->full_name;
|
||||
cache_type = cache_type_string(cache);
|
||||
|
||||
/* We don't want to create an attribute that can't provide a
|
||||
@@ -707,14 +705,14 @@ static void cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir)
|
||||
rc = attr->show(&dir->kobj, attr, buf);
|
||||
if (rc <= 0) {
|
||||
pr_debug("not creating %s attribute for "
|
||||
"%s(%s) (rc = %zd)\n",
|
||||
attr->attr.name, cache_name,
|
||||
"%pOF(%s) (rc = %zd)\n",
|
||||
attr->attr.name, cache->ofnode,
|
||||
cache_type, rc);
|
||||
continue;
|
||||
}
|
||||
if (sysfs_create_file(&dir->kobj, &attr->attr))
|
||||
pr_debug("could not create %s attribute for %s(%s)\n",
|
||||
attr->attr.name, cache_name, cache_type);
|
||||
pr_debug("could not create %s attribute for %pOF(%s)\n",
|
||||
attr->attr.name, cache->ofnode, cache_type);
|
||||
}
|
||||
|
||||
kfree(buf);
|
||||
@@ -831,8 +829,8 @@ static void cache_cpu_clear(struct cache *cache, int cpu)
|
||||
struct cache *next = cache->next_local;
|
||||
|
||||
WARN_ONCE(!cpumask_test_cpu(cpu, &cache->shared_cpu_map),
|
||||
"CPU %i not accounted in %s(%s)\n",
|
||||
cpu, cache->ofnode->full_name,
|
||||
"CPU %i not accounted in %pOF(%s)\n",
|
||||
cpu, cache->ofnode,
|
||||
cache_type_string(cache));
|
||||
|
||||
cpumask_clear_cpu(cpu, &cache->shared_cpu_map);
|
||||
|
@@ -193,7 +193,7 @@ void iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops,
|
||||
|
||||
if (iowa_bus_count >= IOWA_MAX_BUS) {
|
||||
pr_err("IOWA:Too many pci bridges, "
|
||||
"workarounds disabled for %s\n", np->full_name);
|
||||
"workarounds disabled for %pOF\n", np);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -208,6 +208,6 @@ void iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops,
|
||||
|
||||
iowa_bus_count++;
|
||||
|
||||
pr_debug("IOWA:[%d]Add bus, %s.\n", iowa_bus_count-1, np->full_name);
|
||||
pr_debug("IOWA:[%d]Add bus, %pOF.\n", iowa_bus_count-1, np);
|
||||
}
|
||||
|
||||
|
@@ -164,7 +164,7 @@ void __init isa_bridge_find_early(struct pci_controller *hose)
|
||||
/* Set the global ISA io base to indicate we have an ISA bridge */
|
||||
isa_io_base = ISA_IO_BASE;
|
||||
|
||||
pr_debug("ISA bridge (early) is %s\n", np->full_name);
|
||||
pr_debug("ISA bridge (early) is %pOF\n", np);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -187,15 +187,15 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
|
||||
pna = of_n_addr_cells(np);
|
||||
if (of_property_read_u32(np, "#address-cells", &na) ||
|
||||
of_property_read_u32(np, "#size-cells", &ns)) {
|
||||
pr_warn("ISA: Non-PCI bridge %s is missing address format\n",
|
||||
np->full_name);
|
||||
pr_warn("ISA: Non-PCI bridge %pOF is missing address format\n",
|
||||
np);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check it's a supported address format */
|
||||
if (na != 2 || ns != 1) {
|
||||
pr_warn("ISA: Non-PCI bridge %s has unsupported address format\n",
|
||||
np->full_name);
|
||||
pr_warn("ISA: Non-PCI bridge %pOF has unsupported address format\n",
|
||||
np);
|
||||
return;
|
||||
}
|
||||
rs = na + ns + pna;
|
||||
@@ -203,8 +203,8 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
|
||||
/* Grab the ranges property */
|
||||
ranges = of_get_property(np, "ranges", &rlen);
|
||||
if (ranges == NULL || rlen < rs) {
|
||||
pr_warn("ISA: Non-PCI bridge %s has absent or invalid ranges\n",
|
||||
np->full_name);
|
||||
pr_warn("ISA: Non-PCI bridge %pOF has absent or invalid ranges\n",
|
||||
np);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -220,8 +220,8 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
|
||||
|
||||
/* Got something ? */
|
||||
if (!size || !pbasep) {
|
||||
pr_warn("ISA: Non-PCI bridge %s has no usable IO range\n",
|
||||
np->full_name);
|
||||
pr_warn("ISA: Non-PCI bridge %pOF has no usable IO range\n",
|
||||
np);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -233,15 +233,15 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
|
||||
/* Map pbase */
|
||||
pbase = of_translate_address(np, pbasep);
|
||||
if (pbase == OF_BAD_ADDR) {
|
||||
pr_warn("ISA: Non-PCI bridge %s failed to translate IO base\n",
|
||||
np->full_name);
|
||||
pr_warn("ISA: Non-PCI bridge %pOF failed to translate IO base\n",
|
||||
np);
|
||||
return;
|
||||
}
|
||||
|
||||
/* We need page alignment */
|
||||
if ((cbase & ~PAGE_MASK) || (pbase & ~PAGE_MASK)) {
|
||||
pr_warn("ISA: Non-PCI bridge %s has non aligned IO range\n",
|
||||
np->full_name);
|
||||
pr_warn("ISA: Non-PCI bridge %pOF has non aligned IO range\n",
|
||||
np);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ void __init isa_bridge_init_non_pci(struct device_node *np)
|
||||
__ioremap_at(pbase, (void *)ISA_IO_BASE,
|
||||
size, pgprot_val(pgprot_noncached(__pgprot(0))));
|
||||
|
||||
pr_debug("ISA: Non-PCI bridge is %s\n", np->full_name);
|
||||
pr_debug("ISA: Non-PCI bridge is %pOF\n", np);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -277,8 +277,8 @@ static void isa_bridge_find_late(struct pci_dev *pdev,
|
||||
/* Set the global ISA io base to indicate we have an ISA bridge */
|
||||
isa_io_base = ISA_IO_BASE;
|
||||
|
||||
pr_debug("ISA bridge (late) is %s on %s\n",
|
||||
devnode->full_name, pci_name(pdev));
|
||||
pr_debug("ISA bridge (late) is %pOF on %s\n",
|
||||
devnode, pci_name(pdev));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -147,8 +147,8 @@ static int __init add_legacy_port(struct device_node *np, int want_index,
|
||||
legacy_serial_ports[index].serial_out = tsi_serial_out;
|
||||
}
|
||||
|
||||
printk(KERN_DEBUG "Found legacy serial port %d for %s\n",
|
||||
index, np->full_name);
|
||||
printk(KERN_DEBUG "Found legacy serial port %d for %pOF\n",
|
||||
index, np);
|
||||
printk(KERN_DEBUG " %s=%llx, taddr=%llx, irq=%lx, clk=%d, speed=%d\n",
|
||||
(iotype == UPIO_PORT) ? "port" : "mem",
|
||||
(unsigned long long)base, (unsigned long long)taddr, irq,
|
||||
@@ -207,7 +207,7 @@ static int __init add_legacy_isa_port(struct device_node *np,
|
||||
int index = -1;
|
||||
u64 taddr;
|
||||
|
||||
DBG(" -> add_legacy_isa_port(%s)\n", np->full_name);
|
||||
DBG(" -> add_legacy_isa_port(%pOF)\n", np);
|
||||
|
||||
/* Get the ISA port number */
|
||||
reg = of_get_property(np, "reg", NULL);
|
||||
@@ -256,7 +256,7 @@ static int __init add_legacy_pci_port(struct device_node *np,
|
||||
unsigned int flags;
|
||||
int iotype, index = -1, lindex = 0;
|
||||
|
||||
DBG(" -> add_legacy_pci_port(%s)\n", np->full_name);
|
||||
DBG(" -> add_legacy_pci_port(%pOF)\n", np);
|
||||
|
||||
/* We only support ports that have a clock frequency properly
|
||||
* encoded in the device-tree (that is have an fcode). Anything
|
||||
@@ -374,7 +374,7 @@ void __init find_legacy_serial_ports(void)
|
||||
if (path != NULL) {
|
||||
stdout = of_find_node_by_path(path);
|
||||
if (stdout)
|
||||
DBG("stdout is %s\n", stdout->full_name);
|
||||
DBG("stdout is %pOF\n", stdout);
|
||||
} else {
|
||||
DBG(" no linux,stdout-path !\n");
|
||||
}
|
||||
@@ -603,7 +603,7 @@ static int __init check_legacy_serial_console(void)
|
||||
DBG(" can't find stdout package %s !\n", name);
|
||||
return -ENODEV;
|
||||
}
|
||||
DBG("stdout is %s\n", prom_stdout->full_name);
|
||||
DBG("stdout is %pOF\n", prom_stdout);
|
||||
|
||||
name = of_get_property(prom_stdout, "name", NULL);
|
||||
if (!name) {
|
||||
|
@@ -45,7 +45,7 @@ static int of_pci_phb_probe(struct platform_device *dev)
|
||||
if (ppc_md.pci_setup_phb == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
pr_info("Setting up PCI bus %s\n", dev->dev.of_node->full_name);
|
||||
pr_info("Setting up PCI bus %pOF\n", dev->dev.of_node);
|
||||
|
||||
/* Alloc and setup PHB data structure */
|
||||
phb = pcibios_alloc_controller(dev->dev.of_node);
|
||||
|
@@ -373,9 +373,8 @@ static int pci_read_irq_line(struct pci_dev *pci_dev)
|
||||
if (virq)
|
||||
irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
|
||||
} else {
|
||||
pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
|
||||
oirq.args_count, oirq.args[0], oirq.args[1],
|
||||
of_node_full_name(oirq.np));
|
||||
pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %pOF\n",
|
||||
oirq.args_count, oirq.args[0], oirq.args[1], oirq.np);
|
||||
|
||||
virq = irq_create_of_mapping(&oirq);
|
||||
}
|
||||
@@ -741,8 +740,8 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose,
|
||||
struct of_pci_range range;
|
||||
struct of_pci_range_parser parser;
|
||||
|
||||
printk(KERN_INFO "PCI host bridge %s %s ranges:\n",
|
||||
dev->full_name, primary ? "(primary)" : "");
|
||||
printk(KERN_INFO "PCI host bridge %pOF %s ranges:\n",
|
||||
dev, primary ? "(primary)" : "");
|
||||
|
||||
/* Check for ranges property */
|
||||
if (of_pci_range_parser_init(&parser, dev))
|
||||
@@ -1556,8 +1555,8 @@ static void pcibios_setup_phb_resources(struct pci_controller *hose,
|
||||
|
||||
if (!res->flags) {
|
||||
pr_debug("PCI: I/O resource not set for host"
|
||||
" bridge %s (domain %d)\n",
|
||||
hose->dn->full_name, hose->global_number);
|
||||
" bridge %pOF (domain %d)\n",
|
||||
hose->dn, hose->global_number);
|
||||
} else {
|
||||
offset = pcibios_io_space_offset(hose);
|
||||
|
||||
@@ -1668,7 +1667,7 @@ void pcibios_scan_phb(struct pci_controller *hose)
|
||||
struct device_node *node = hose->dn;
|
||||
int mode;
|
||||
|
||||
pr_debug("PCI: Scanning PHB %s\n", of_node_full_name(node));
|
||||
pr_debug("PCI: Scanning PHB %pOF\n", node);
|
||||
|
||||
/* Get some IO space for the new PHB */
|
||||
pcibios_setup_phb_io_space(hose);
|
||||
|
@@ -79,8 +79,8 @@ make_one_node_map(struct device_node* node, u8 pci_bus)
|
||||
return;
|
||||
bus_range = of_get_property(node, "bus-range", &len);
|
||||
if (bus_range == NULL || len < 2 * sizeof(int)) {
|
||||
printk(KERN_WARNING "Can't get bus-range for %s, "
|
||||
"assuming it starts at 0\n", node->full_name);
|
||||
printk(KERN_WARNING "Can't get bus-range for %pOF, "
|
||||
"assuming it starts at 0\n", node);
|
||||
pci_to_OF_bus_map[pci_bus] = 0;
|
||||
} else
|
||||
pci_to_OF_bus_map[pci_bus] = bus_range[0];
|
||||
|
@@ -111,7 +111,7 @@ int pcibios_unmap_io_space(struct pci_bus *bus)
|
||||
if (hose->io_base_alloc == NULL)
|
||||
return 0;
|
||||
|
||||
pr_debug("IO unmapping for PHB %s\n", hose->dn->full_name);
|
||||
pr_debug("IO unmapping for PHB %pOF\n", hose->dn);
|
||||
pr_debug(" alloc=0x%p\n", hose->io_base_alloc);
|
||||
|
||||
/* This is a PHB, we fully unmap the IO area */
|
||||
@@ -151,7 +151,7 @@ static int pcibios_map_phb_io_space(struct pci_controller *hose)
|
||||
hose->io_base_virt = (void __iomem *)(area->addr +
|
||||
hose->io_base_phys - phys_page);
|
||||
|
||||
pr_debug("IO mapping for PHB %s\n", hose->dn->full_name);
|
||||
pr_debug("IO mapping for PHB %pOF\n", hose->dn);
|
||||
pr_debug(" phys=0x%016llx, virt=0x%p (alloc=0x%p)\n",
|
||||
hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc);
|
||||
pr_debug(" size=0x%016llx (alloc=0x%016lx)\n",
|
||||
|
@@ -211,19 +211,19 @@ void of_scan_pci_bridge(struct pci_dev *dev)
|
||||
unsigned int flags;
|
||||
u64 size;
|
||||
|
||||
pr_debug("of_scan_pci_bridge(%s)\n", node->full_name);
|
||||
pr_debug("of_scan_pci_bridge(%pOF)\n", node);
|
||||
|
||||
/* parse bus-range property */
|
||||
busrange = of_get_property(node, "bus-range", &len);
|
||||
if (busrange == NULL || len != 8) {
|
||||
printk(KERN_DEBUG "Can't get bus-range for PCI-PCI bridge %s\n",
|
||||
node->full_name);
|
||||
printk(KERN_DEBUG "Can't get bus-range for PCI-PCI bridge %pOF\n",
|
||||
node);
|
||||
return;
|
||||
}
|
||||
ranges = of_get_property(node, "ranges", &len);
|
||||
if (ranges == NULL) {
|
||||
printk(KERN_DEBUG "Can't get ranges for PCI-PCI bridge %s\n",
|
||||
node->full_name);
|
||||
printk(KERN_DEBUG "Can't get ranges for PCI-PCI bridge %pOF\n",
|
||||
node);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -233,8 +233,8 @@ void of_scan_pci_bridge(struct pci_dev *dev)
|
||||
bus = pci_add_new_bus(dev->bus, dev,
|
||||
of_read_number(busrange, 1));
|
||||
if (!bus) {
|
||||
printk(KERN_ERR "Failed to create pci bus for %s\n",
|
||||
node->full_name);
|
||||
printk(KERN_ERR "Failed to create pci bus for %pOF\n",
|
||||
node);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -262,13 +262,13 @@ void of_scan_pci_bridge(struct pci_dev *dev)
|
||||
res = bus->resource[0];
|
||||
if (res->flags) {
|
||||
printk(KERN_ERR "PCI: ignoring extra I/O range"
|
||||
" for bridge %s\n", node->full_name);
|
||||
" for bridge %pOF\n", node);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (i >= PCI_NUM_RESOURCES - PCI_BRIDGE_RESOURCES) {
|
||||
printk(KERN_ERR "PCI: too many memory ranges"
|
||||
" for bridge %s\n", node->full_name);
|
||||
" for bridge %pOF\n", node);
|
||||
continue;
|
||||
}
|
||||
res = bus->resource[i];
|
||||
@@ -307,7 +307,7 @@ static struct pci_dev *of_scan_pci_dev(struct pci_bus *bus,
|
||||
struct eeh_dev *edev = pdn_to_eeh_dev(PCI_DN(dn));
|
||||
#endif
|
||||
|
||||
pr_debug(" * %s\n", dn->full_name);
|
||||
pr_debug(" * %pOF\n", dn);
|
||||
if (!of_device_is_available(dn))
|
||||
return NULL;
|
||||
|
||||
@@ -350,8 +350,8 @@ static void __of_scan_bus(struct device_node *node, struct pci_bus *bus,
|
||||
struct device_node *child;
|
||||
struct pci_dev *dev;
|
||||
|
||||
pr_debug("of_scan_bus(%s) bus no %d...\n",
|
||||
node->full_name, bus->number);
|
||||
pr_debug("of_scan_bus(%pOF) bus no %d...\n",
|
||||
node, bus->number);
|
||||
|
||||
/* Scan direct children */
|
||||
for_each_child_of_node(node, child) {
|
||||
|
@@ -481,7 +481,7 @@ void __init smp_setup_cpu_maps(void)
|
||||
__be32 cpu_be;
|
||||
int j, len;
|
||||
|
||||
DBG(" * %s...\n", dn->full_name);
|
||||
DBG(" * %pOF...\n", dn);
|
||||
|
||||
intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s",
|
||||
&len);
|
||||
|
Reference in New Issue
Block a user