aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/entry_32.S6
-rw-r--r--arch/ppc/kernel/entry.S6
-rw-r--r--include/asm-powerpc/cputable.h22
3 files changed, 24 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index a7572cf464bd..69a91bd46115 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -251,6 +251,9 @@ syscall_exit_cont:
251 bne- 2f 251 bne- 2f
2521: 2521:
253#endif /* CONFIG_44x */ 253#endif /* CONFIG_44x */
254BEGIN_FTR_SECTION
255 lwarx r7,0,r1
256END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
254 stwcx. r0,0,r1 /* to clear the reservation */ 257 stwcx. r0,0,r1 /* to clear the reservation */
255 lwz r4,_LINK(r1) 258 lwz r4,_LINK(r1)
256 lwz r5,_CCR(r1) 259 lwz r5,_CCR(r1)
@@ -717,6 +720,9 @@ restore:
717 mtctr r11 720 mtctr r11
718 721
719 PPC405_ERR77(0,r1) 722 PPC405_ERR77(0,r1)
723BEGIN_FTR_SECTION
724 lwarx r11,0,r1
725END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
720 stwcx. r0,0,r1 /* to clear the reservation */ 726 stwcx. r0,0,r1 /* to clear the reservation */
721 727
722#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE)) 728#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S
index b19bfef2034d..59e77eb63338 100644
--- a/arch/ppc/kernel/entry.S
+++ b/arch/ppc/kernel/entry.S
@@ -251,6 +251,9 @@ syscall_exit_cont:
251 bne- 2f 251 bne- 2f
2521: 2521:
253#endif /* CONFIG_44x */ 253#endif /* CONFIG_44x */
254BEGIN_FTR_SECTION
255 lwarx r7,0,r1
256END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
254 stwcx. r0,0,r1 /* to clear the reservation */ 257 stwcx. r0,0,r1 /* to clear the reservation */
255 lwz r4,_LINK(r1) 258 lwz r4,_LINK(r1)
256 lwz r5,_CCR(r1) 259 lwz r5,_CCR(r1)
@@ -713,6 +716,9 @@ restore:
713 mtctr r11 716 mtctr r11
714 717
715 PPC405_ERR77(0,r1) 718 PPC405_ERR77(0,r1)
719BEGIN_FTR_SECTION
720 lwarx r11,0,r1
721END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
716 stwcx. r0,0,r1 /* to clear the reservation */ 722 stwcx. r0,0,r1 /* to clear the reservation */
717 723
718#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE)) 724#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index 9d74338e3dec..4525c784dfd0 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -138,6 +138,7 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start,
138#define CPU_FTR_FPU_UNAVAILABLE ASM_CONST(0x0000000000800000) 138#define CPU_FTR_FPU_UNAVAILABLE ASM_CONST(0x0000000000800000)
139#define CPU_FTR_UNIFIED_ID_CACHE ASM_CONST(0x0000000001000000) 139#define CPU_FTR_UNIFIED_ID_CACHE ASM_CONST(0x0000000001000000)
140#define CPU_FTR_SPE ASM_CONST(0x0000000002000000) 140#define CPU_FTR_SPE ASM_CONST(0x0000000002000000)
141#define CPU_FTR_NEED_PAIRED_STWCX ASM_CONST(0x0000000004000000)
141 142
142/* 143/*
143 * Add the 64-bit processor unique features in the top half of the word; 144 * Add the 64-bit processor unique features in the top half of the word;
@@ -261,25 +262,25 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start,
261#define CPU_FTRS_7450_20 (CPU_FTR_COMMON | \ 262#define CPU_FTRS_7450_20 (CPU_FTR_COMMON | \
262 CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ 263 CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
263 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ 264 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
264 CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) 265 CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX)
265#define CPU_FTRS_7450_21 (CPU_FTR_COMMON | \ 266#define CPU_FTRS_7450_21 (CPU_FTR_COMMON | \
266 CPU_FTR_USE_TB | \ 267 CPU_FTR_USE_TB | \
267 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ 268 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
268 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ 269 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
269 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \ 270 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \
270 CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) 271 CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX)
271#define CPU_FTRS_7450_23 (CPU_FTR_COMMON | \ 272#define CPU_FTRS_7450_23 (CPU_FTR_COMMON | \
272 CPU_FTR_USE_TB | \ 273 CPU_FTR_USE_TB | CPU_FTR_NEED_PAIRED_STWCX | \
273 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ 274 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
274 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ 275 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
275 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) 276 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE)
276#define CPU_FTRS_7455_1 (CPU_FTR_COMMON | \ 277#define CPU_FTRS_7455_1 (CPU_FTR_COMMON | \
277 CPU_FTR_USE_TB | \ 278 CPU_FTR_USE_TB | CPU_FTR_NEED_PAIRED_STWCX | \
278 CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | \ 279 CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | \
279 CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_HAS_HIGH_BATS | \ 280 CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_HAS_HIGH_BATS | \
280 CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) 281 CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE)
281#define CPU_FTRS_7455_20 (CPU_FTR_COMMON | \ 282#define CPU_FTRS_7455_20 (CPU_FTR_COMMON | \
282 CPU_FTR_USE_TB | \ 283 CPU_FTR_USE_TB | CPU_FTR_NEED_PAIRED_STWCX | \
283 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ 284 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
284 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ 285 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
285 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \ 286 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \
@@ -289,31 +290,32 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start,
289 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ 290 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
290 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ 291 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
291 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ 292 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \
292 CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) 293 CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX)
293#define CPU_FTRS_7447_10 (CPU_FTR_COMMON | \ 294#define CPU_FTRS_7447_10 (CPU_FTR_COMMON | \
294 CPU_FTR_USE_TB | \ 295 CPU_FTR_USE_TB | \
295 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ 296 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
296 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ 297 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
297 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ 298 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \
298 CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC | CPU_FTR_PPC_LE) 299 CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC | CPU_FTR_PPC_LE | \
300 CPU_FTR_NEED_PAIRED_STWCX)
299#define CPU_FTRS_7447 (CPU_FTR_COMMON | \ 301#define CPU_FTRS_7447 (CPU_FTR_COMMON | \
300 CPU_FTR_USE_TB | \ 302 CPU_FTR_USE_TB | \
301 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ 303 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
302 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ 304 CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
303 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ 305 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \
304 CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) 306 CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX)
305#define CPU_FTRS_7447A (CPU_FTR_COMMON | \ 307#define CPU_FTRS_7447A (CPU_FTR_COMMON | \
306 CPU_FTR_USE_TB | \ 308 CPU_FTR_USE_TB | \
307 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ 309 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
308 CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ 310 CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
309 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ 311 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \
310 CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) 312 CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX)
311#define CPU_FTRS_7448 (CPU_FTR_COMMON | \ 313#define CPU_FTRS_7448 (CPU_FTR_COMMON | \
312 CPU_FTR_USE_TB | \ 314 CPU_FTR_USE_TB | \
313 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ 315 CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
314 CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ 316 CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \
315 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ 317 CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \
316 CPU_FTR_PPC_LE) 318 CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX)
317#define CPU_FTRS_82XX (CPU_FTR_COMMON | \ 319#define CPU_FTRS_82XX (CPU_FTR_COMMON | \
318 CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB) 320 CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB)
319#define CPU_FTRS_G2_LE (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | \ 321#define CPU_FTRS_G2_LE (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | \