aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/rtas.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/rtas.c')
-rw-r--r--arch/powerpc/kernel/rtas.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index bf90361bb70f..74367841615a 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -23,6 +23,7 @@
23#include <linux/completion.h> 23#include <linux/completion.h>
24#include <linux/cpumask.h> 24#include <linux/cpumask.h>
25#include <linux/lmb.h> 25#include <linux/lmb.h>
26#include <linux/slab.h>
26 27
27#include <asm/prom.h> 28#include <asm/prom.h>
28#include <asm/rtas.h> 29#include <asm/rtas.h>
@@ -42,7 +43,7 @@
42#include <asm/mmu.h> 43#include <asm/mmu.h>
43 44
44struct rtas_t rtas = { 45struct rtas_t rtas = {
45 .lock = __RAW_SPIN_LOCK_UNLOCKED 46 .lock = __ARCH_SPIN_LOCK_UNLOCKED
46}; 47};
47EXPORT_SYMBOL(rtas); 48EXPORT_SYMBOL(rtas);
48 49
@@ -80,13 +81,13 @@ static unsigned long lock_rtas(void)
80 81
81 local_irq_save(flags); 82 local_irq_save(flags);
82 preempt_disable(); 83 preempt_disable();
83 __raw_spin_lock_flags(&rtas.lock, flags); 84 arch_spin_lock_flags(&rtas.lock, flags);
84 return flags; 85 return flags;
85} 86}
86 87
87static void unlock_rtas(unsigned long flags) 88static void unlock_rtas(unsigned long flags)
88{ 89{
89 __raw_spin_unlock(&rtas.lock); 90 arch_spin_unlock(&rtas.lock);
90 local_irq_restore(flags); 91 local_irq_restore(flags);
91 preempt_enable(); 92 preempt_enable();
92} 93}
@@ -978,7 +979,7 @@ int __init early_init_dt_scan_rtas(unsigned long node,
978 return 1; 979 return 1;
979} 980}
980 981
981static raw_spinlock_t timebase_lock; 982static arch_spinlock_t timebase_lock;
982static u64 timebase = 0; 983static u64 timebase = 0;
983 984
984void __cpuinit rtas_give_timebase(void) 985void __cpuinit rtas_give_timebase(void)
@@ -987,10 +988,10 @@ void __cpuinit rtas_give_timebase(void)
987 988
988 local_irq_save(flags); 989 local_irq_save(flags);
989 hard_irq_disable(); 990 hard_irq_disable();
990 __raw_spin_lock(&timebase_lock); 991 arch_spin_lock(&timebase_lock);
991 rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL); 992 rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL);
992 timebase = get_tb(); 993 timebase = get_tb();
993 __raw_spin_unlock(&timebase_lock); 994 arch_spin_unlock(&timebase_lock);
994 995
995 while (timebase) 996 while (timebase)
996 barrier(); 997 barrier();
@@ -1002,8 +1003,8 @@ void __cpuinit rtas_take_timebase(void)
1002{ 1003{
1003 while (!timebase) 1004 while (!timebase)
1004 barrier(); 1005 barrier();
1005 __raw_spin_lock(&timebase_lock); 1006 arch_spin_lock(&timebase_lock);
1006 set_tb(timebase >> 32, timebase & 0xffffffff); 1007 set_tb(timebase >> 32, timebase & 0xffffffff);
1007 timebase = 0; 1008 timebase = 0;
1008 __raw_spin_unlock(&timebase_lock); 1009 arch_spin_unlock(&timebase_lock);
1009} 1010}