From f1cd73674ff19e62c69c942f23abb061c0a26072 Mon Sep 17 00:00:00 2001 From: Christophe Leroy Date: Thu, 13 Jul 2017 15:09:52 +0200 Subject: powerpc: move set_msr() and get_msr() into .h set_msr() and get_msr() are defined and used twice. This patch moves them into ppc.h Signed-off-by: Christophe Leroy --- arch/powerpc/lib/interrupts.c | 14 -------------- arch/powerpc/lib/kgdb.c | 14 -------------- 2 files changed, 28 deletions(-) (limited to 'arch/powerpc/lib') diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c index 5031357..ccba829 100644 --- a/arch/powerpc/lib/interrupts.c +++ b/arch/powerpc/lib/interrupts.c @@ -33,20 +33,6 @@ extern void timer_interrupt_cpu (struct pt_regs *); static unsigned decrementer_count; /* count value for 1e6/HZ microseconds */ -static __inline__ unsigned long get_msr (void) -{ - unsigned long msr; - - asm volatile ("mfmsr %0":"=r" (msr):); - - return msr; -} - -static __inline__ void set_msr (unsigned long msr) -{ - asm volatile ("mtmsr %0"::"r" (msr)); -} - static __inline__ unsigned long get_dec (void) { unsigned long val; diff --git a/arch/powerpc/lib/kgdb.c b/arch/powerpc/lib/kgdb.c index 88c2af2..aa16a00 100644 --- a/arch/powerpc/lib/kgdb.c +++ b/arch/powerpc/lib/kgdb.c @@ -38,20 +38,6 @@ kgdb_longjmp(long *buf, int val) : "=&r"(temp) : "r" (buf), "r" (val)); } -static inline unsigned long -get_msr(void) -{ - unsigned long msr; - asm volatile("mfmsr %0" : "=r" (msr):); - return msr; -} - -static inline void -set_msr(unsigned long msr) -{ - asm volatile("mtmsr %0" : : "r" (msr)); -} - /* Convert the SPARC hardware trap type code to a unix signal number. */ /* * This table contains the mapping between PowerPC hardware trap types, and -- cgit v1.1