diff options
| author | David S. Miller <davem@davemloft.net> | 2012-08-16 23:19:32 -0700 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-08-18 23:26:14 -0700 | 
| commit | 09d053c797f4a559af0647e4283b9b9ec0682d10 (patch) | |
| tree | a24ba2d57b40d251ede54f6358f79456bfcb855c /arch/sparc/include/asm/perfctr.h | |
| parent | 0bab20ba4c95f56355c24a0b9f03eb486c2a267d (diff) | |
| download | olio-linux-3.10-09d053c797f4a559af0647e4283b9b9ec0682d10.tar.xz olio-linux-3.10-09d053c797f4a559af0647e4283b9b9ec0682d10.zip  | |
sparc64: Abstract away PIC register accesses.
And, like for the PCR, allow indexing of different PIC register
numbers.
This also removes all of the non-__KERNEL__ bits from asm/perfctr.h,
nothing kernel side should include it any more.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/perfctr.h')
| -rw-r--r-- | arch/sparc/include/asm/perfctr.h | 30 | 
1 files changed, 0 insertions, 30 deletions
diff --git a/arch/sparc/include/asm/perfctr.h b/arch/sparc/include/asm/perfctr.h index 3332d2cba6c..214feefa577 100644 --- a/arch/sparc/include/asm/perfctr.h +++ b/arch/sparc/include/asm/perfctr.h @@ -54,11 +54,6 @@ enum perfctr_opcode {  	PERFCTR_GETPCR  }; -/* I don't want the kernel's namespace to be polluted with this - * stuff when this file is included.  --DaveM - */ -#ifndef __KERNEL__ -  #define  PRIV 0x00000001  #define  SYS  0x00000002  #define  USR  0x00000004 @@ -168,29 +163,4 @@ struct vcounter_struct {    unsigned long long vcnt1;  }; -#else /* !(__KERNEL__) */ - -#ifndef CONFIG_SPARC32 - -/* Performance counter register access. */ -#define read_pcr(__p)  __asm__ __volatile__("rd	%%pcr, %0" : "=r" (__p)) -#define write_pcr(__p) __asm__ __volatile__("wr	%0, 0x0, %%pcr" : : "r" (__p)) -#define read_pic(__p)  __asm__ __volatile__("rd %%pic, %0" : "=r" (__p)) - -/* Blackbird errata workaround.  See commentary in - * arch/sparc64/kernel/smp.c:smp_percpu_timer_interrupt() - * for more information. - */ -#define write_pic(__p)  					\ -	__asm__ __volatile__("ba,pt	%%xcc, 99f\n\t"		\ -			     " nop\n\t"				\ -			     ".align	64\n"			\ -			  "99:wr	%0, 0x0, %%pic\n\t"	\ -			     "rd	%%pic, %%g0" : : "r" (__p)) -#define reset_pic()	write_pic(0) - -#endif /* !CONFIG_SPARC32 */ - -#endif /* !(__KERNEL__) */ -  #endif /* !(PERF_COUNTER_API) */  |