Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279514
b: refs/heads/master
c: fac26ad
h: refs/heads/master
v: v3
  • Loading branch information
Jimi Xenidis authored and Benjamin Herrenschmidt committed Nov 25, 2011
1 parent 4276efa commit ea5be65
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d670280908013004f173b2b86414d9b6918511b
refs/heads/master: fac26ad4f9cb794c9d1032f55f40a31cb55be09a
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/include/asm/cputable.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ extern const char *powerpc_base_platform;
#define CPU_FTRS_COMPATIBLE (CPU_FTR_USE_TB | CPU_FTR_PPCAS_ARCH_V2)

#define CPU_FTRS_A2 (CPU_FTR_USE_TB | CPU_FTR_SMT | CPU_FTR_DBELL | \
CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN)
CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN | CPU_FTR_ICSWX)

#ifdef __powerpc64__
#ifdef CONFIG_PPC_BOOK3E
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/include/asm/mmu-book3e.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ typedef struct {
unsigned int id;
unsigned int active;
unsigned long vdso_base;
#ifdef CONFIG_PPC_ICSWX
struct spinlock *cop_lockp; /* guard cop related stuff */
unsigned long acop; /* mask of enabled coprocessor types */
#endif /* CONFIG_PPC_ICSWX */
#ifdef CONFIG_PPC_MM_SLICES
u64 low_slices_psize; /* SLB page size encodings */
u64 high_slices_psize; /* 4 bits per slice for now */
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/include/asm/reg_booke.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@
#define SPRN_CSRR1 SPRN_SRR3 /* Critical Save and Restore Register 1 */
#endif

#ifdef CONFIG_PPC_ICSWX
#define SPRN_HACOP 0x15F /* Hypervisor Available Coprocessor Register */
#endif

/* Bit definitions for CCR1. */
#define CCR1_DPC 0x00000100 /* Disable L1 I-Cache/D-Cache parity checking */
#define CCR1_TCS 0x00000080 /* Timer Clock Select */
Expand Down
10 changes: 8 additions & 2 deletions trunk/arch/powerpc/kernel/cpu_setup_a2.S
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,16 @@ _GLOBAL(__setup_cpu_a2)
* core local but doing it always won't hurt
*/

#ifdef CONFIG_PPC_WSP_COPRO
#ifdef CONFIG_PPC_ICSWX
/* Make sure ACOP starts out as zero */
li r3,0
mtspr SPRN_ACOP,r3

/* Skip the following if we are in Guest mode */
mfmsr r3
andis. r0,r3,MSR_GS@h
bne _icswx_skip_guest

/* Enable icswx instruction */
mfspr r3,SPRN_A2_CCR2
ori r3,r3,A2_CCR2_ENABLE_ICSWX
Expand All @@ -54,7 +59,8 @@ _GLOBAL(__setup_cpu_a2)
/* Unmask all CTs in HACOP */
li r3,-1
mtspr SPRN_HACOP,r3
#endif /* CONFIG_PPC_WSP_COPRO */
_icswx_skip_guest:
#endif /* CONFIG_PPC_ICSWX */

/* Enable doorbell */
mfspr r3,SPRN_A2_CCR2
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/Kconfig.cputype
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ config VSX

config PPC_ICSWX
bool "Support for PowerPC icswx coprocessor instruction"
depends on POWER4
depends on POWER4 || PPC_A2
default n
---help---

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/wsp/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
config PPC_WSP
bool
select PPC_A2
select PPC_ICSWX
select PPC_SCOM
select PPC_XICS
select PPC_ICP_NATIVE
Expand Down

0 comments on commit ea5be65

Please sign in to comment.