prom.c (1cf3d8b3d24cd383ddfd5442c83ec5c355ffc2f7) | prom.c (0dc3289c797ef9558af566802429212e0b58a5d9) |
---|---|
1/* 2 * Procedures for creating, accessing and interpreting the device tree. 3 * 4 * Paul Mackerras August 1996. 5 * Copyright (C) 1996-2005 Paul Mackerras. 6 * 7 * Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner. 8 * {engebret|bergner}@us.ibm.com --- 18 unchanged lines hidden (view full) --- 27#include <linux/delay.h> 28#include <linux/initrd.h> 29#include <linux/bitops.h> 30#include <linux/export.h> 31#include <linux/kexec.h> 32#include <linux/debugfs.h> 33#include <linux/irq.h> 34#include <linux/memblock.h> | 1/* 2 * Procedures for creating, accessing and interpreting the device tree. 3 * 4 * Paul Mackerras August 1996. 5 * Copyright (C) 1996-2005 Paul Mackerras. 6 * 7 * Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner. 8 * {engebret|bergner}@us.ibm.com --- 18 unchanged lines hidden (view full) --- 27#include <linux/delay.h> 28#include <linux/initrd.h> 29#include <linux/bitops.h> 30#include <linux/export.h> 31#include <linux/kexec.h> 32#include <linux/debugfs.h> 33#include <linux/irq.h> 34#include <linux/memblock.h> |
35#include <linux/of.h> | |
36 37#include <asm/prom.h> 38#include <asm/rtas.h> 39#include <asm/page.h> 40#include <asm/processor.h> 41#include <asm/irq.h> 42#include <asm/io.h> 43#include <asm/kdump.h> 44#include <asm/smp.h> 45#include <asm/mmu.h> 46#include <asm/paca.h> 47#include <asm/pgtable.h> 48#include <asm/pci.h> 49#include <asm/iommu.h> 50#include <asm/btext.h> 51#include <asm/sections.h> 52#include <asm/machdep.h> | 35 36#include <asm/prom.h> 37#include <asm/rtas.h> 38#include <asm/page.h> 39#include <asm/processor.h> 40#include <asm/irq.h> 41#include <asm/io.h> 42#include <asm/kdump.h> 43#include <asm/smp.h> 44#include <asm/mmu.h> 45#include <asm/paca.h> 46#include <asm/pgtable.h> 47#include <asm/pci.h> 48#include <asm/iommu.h> 49#include <asm/btext.h> 50#include <asm/sections.h> 51#include <asm/machdep.h> |
52#include <asm/pSeries_reconfig.h> |
|
53#include <asm/pci-bridge.h> 54#include <asm/kexec.h> 55#include <asm/opal.h> 56#include <asm/fadump.h> | 53#include <asm/pci-bridge.h> 54#include <asm/kexec.h> 55#include <asm/opal.h> 56#include <asm/fadump.h> |
57#include <asm/debug.h> |
|
57 58#include <mm/mmu_decl.h> 59 60#ifdef DEBUG 61#define DBG(fmt...) printk(KERN_ERR fmt) 62#else 63#define DBG(fmt...) 64#endif --- 732 unchanged lines hidden (view full) --- 797} 798 799static int prom_reconfig_notifier(struct notifier_block *nb, 800 unsigned long action, void *node) 801{ 802 int err; 803 804 switch (action) { | 58 59#include <mm/mmu_decl.h> 60 61#ifdef DEBUG 62#define DBG(fmt...) printk(KERN_ERR fmt) 63#else 64#define DBG(fmt...) 65#endif --- 732 unchanged lines hidden (view full) --- 798} 799 800static int prom_reconfig_notifier(struct notifier_block *nb, 801 unsigned long action, void *node) 802{ 803 int err; 804 805 switch (action) { |
805 case OF_RECONFIG_ATTACH_NODE: | 806 case PSERIES_RECONFIG_ADD: |
806 err = of_finish_dynamic_node(node); 807 if (err < 0) 808 printk(KERN_ERR "finish_node returned %d\n", err); 809 break; 810 default: 811 err = 0; 812 break; 813 } 814 return notifier_from_errno(err); 815} 816 817static struct notifier_block prom_reconfig_nb = { 818 .notifier_call = prom_reconfig_notifier, 819 .priority = 10, /* This one needs to run first */ 820}; 821 822static int __init prom_reconfig_setup(void) 823{ | 807 err = of_finish_dynamic_node(node); 808 if (err < 0) 809 printk(KERN_ERR "finish_node returned %d\n", err); 810 break; 811 default: 812 err = 0; 813 break; 814 } 815 return notifier_from_errno(err); 816} 817 818static struct notifier_block prom_reconfig_nb = { 819 .notifier_call = prom_reconfig_notifier, 820 .priority = 10, /* This one needs to run first */ 821}; 822 823static int __init prom_reconfig_setup(void) 824{ |
824 return of_reconfig_notifier_register(&prom_reconfig_nb); | 825 return pSeries_reconfig_notifier_register(&prom_reconfig_nb); |
825} 826__initcall(prom_reconfig_setup); 827#endif 828 829/* Find the device node for a given logical cpu number, also returns the cpu 830 * local thread number (index in ibm,interrupt-server#s) if relevant and 831 * asked for (non NULL) 832 */ --- 59 unchanged lines hidden --- | 826} 827__initcall(prom_reconfig_setup); 828#endif 829 830/* Find the device node for a given logical cpu number, also returns the cpu 831 * local thread number (index in ibm,interrupt-server#s) if relevant and 832 * asked for (non NULL) 833 */ --- 59 unchanged lines hidden --- |