aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/setup_64.c3
-rw-r--r--arch/powerpc/kernel/traps.c16
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c10
3 files changed, 15 insertions, 14 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 2f3fdad35594..e20c1fae3423 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -579,7 +579,8 @@ void __init setup_arch(char **cmdline_p)
579 panic_timeout = 180; 579 panic_timeout = 180;
580 580
581 if (ppc_md.panic) 581 if (ppc_md.panic)
582 notifier_chain_register(&panic_notifier_list, &ppc64_panic_block); 582 atomic_notifier_chain_register(&panic_notifier_list,
583 &ppc64_panic_block);
583 584
584 init_mm.start_code = PAGE_OFFSET; 585 init_mm.start_code = PAGE_OFFSET;
585 init_mm.end_code = (unsigned long) _etext; 586 init_mm.end_code = (unsigned long) _etext;
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 98660aedeeb7..9763faab6739 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -74,19 +74,19 @@ EXPORT_SYMBOL(__debugger_dabr_match);
74EXPORT_SYMBOL(__debugger_fault_handler); 74EXPORT_SYMBOL(__debugger_fault_handler);
75#endif 75#endif
76 76
77struct notifier_block *powerpc_die_chain; 77ATOMIC_NOTIFIER_HEAD(powerpc_die_chain);
78static DEFINE_SPINLOCK(die_notifier_lock);
79 78
80int register_die_notifier(struct notifier_block *nb) 79int register_die_notifier(struct notifier_block *nb)
81{ 80{
82 int err = 0; 81 return atomic_notifier_chain_register(&powerpc_die_chain, nb);
83 unsigned long flags; 82}
83EXPORT_SYMBOL(register_die_notifier);
84 84
85 spin_lock_irqsave(&die_notifier_lock, flags); 85int unregister_die_notifier(struct notifier_block *nb)
86 err = notifier_chain_register(&powerpc_die_chain, nb); 86{
87 spin_unlock_irqrestore(&die_notifier_lock, flags); 87 return atomic_notifier_chain_unregister(&powerpc_die_chain, nb);
88 return err;
89} 88}
89EXPORT_SYMBOL(unregister_die_notifier);
90 90
91/* 91/*
92 * Trap & Exception support 92 * Trap & Exception support
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 86cfa6ecdcf3..5ad90676567a 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -94,16 +94,16 @@ static struct device_node *derive_parent(const char *path)
94 return parent; 94 return parent;
95} 95}
96 96
97static struct notifier_block *pSeries_reconfig_chain; 97static BLOCKING_NOTIFIER_HEAD(pSeries_reconfig_chain);
98 98
99int pSeries_reconfig_notifier_register(struct notifier_block *nb) 99int pSeries_reconfig_notifier_register(struct notifier_block *nb)
100{ 100{
101 return notifier_chain_register(&pSeries_reconfig_chain, nb); 101 return blocking_notifier_chain_register(&pSeries_reconfig_chain, nb);
102} 102}
103 103
104void pSeries_reconfig_notifier_unregister(struct notifier_block *nb) 104void pSeries_reconfig_notifier_unregister(struct notifier_block *nb)
105{ 105{
106 notifier_chain_unregister(&pSeries_reconfig_chain, nb); 106 blocking_notifier_chain_unregister(&pSeries_reconfig_chain, nb);
107} 107}
108 108
109static int pSeries_reconfig_add_node(const char *path, struct property *proplist) 109static int pSeries_reconfig_add_node(const char *path, struct property *proplist)
@@ -131,7 +131,7 @@ static int pSeries_reconfig_add_node(const char *path, struct property *proplist
131 goto out_err; 131 goto out_err;
132 } 132 }
133 133
134 err = notifier_call_chain(&pSeries_reconfig_chain, 134 err = blocking_notifier_call_chain(&pSeries_reconfig_chain,
135 PSERIES_RECONFIG_ADD, np); 135 PSERIES_RECONFIG_ADD, np);
136 if (err == NOTIFY_BAD) { 136 if (err == NOTIFY_BAD) {
137 printk(KERN_ERR "Failed to add device node %s\n", path); 137 printk(KERN_ERR "Failed to add device node %s\n", path);
@@ -171,7 +171,7 @@ static int pSeries_reconfig_remove_node(struct device_node *np)
171 171
172 remove_node_proc_entries(np); 172 remove_node_proc_entries(np);
173 173
174 notifier_call_chain(&pSeries_reconfig_chain, 174 blocking_notifier_call_chain(&pSeries_reconfig_chain,
175 PSERIES_RECONFIG_REMOVE, np); 175 PSERIES_RECONFIG_REMOVE, np);
176 of_detach_node(np); 176 of_detach_node(np);
177 177