Просмотр исходного кода

powerpc/8xx: Fix do_mtspr_cpu6() build on older compilers

GCC < 4.9 is unable to build this, saying:

  arch/powerpc/mm/8xx_mmu.c:139:2: error: memory input 1 is not directly addressable

Change the one-element array into a simple variable to avoid this.

Fixes: 1458dd951f7c ("powerpc/8xx: Handle CPU6 ERRATA directly in mtspr() macro")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Scott Wood <oss@buserror.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Christophe Leroy 9 лет назад
Родитель
Сommit
2e098dcee6
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      arch/powerpc/include/asm/reg_8xx.h

+ 1 - 1
arch/powerpc/include/asm/reg_8xx.h

@@ -53,7 +53,7 @@
 #ifdef CONFIG_8xx_CPU6
 #ifdef CONFIG_8xx_CPU6
 #define do_mtspr_cpu6(rn, rn_addr, v)	\
 #define do_mtspr_cpu6(rn, rn_addr, v)	\
 	do {								\
 	do {								\
-		int _reg_cpu6 = rn_addr, _tmp_cpu6[1];		\
+		int _reg_cpu6 = rn_addr, _tmp_cpu6;		\
 		asm volatile("stw %0, %1;"				\
 		asm volatile("stw %0, %1;"				\
 			     "lwz %0, %1;"				\
 			     "lwz %0, %1;"				\
 			     "mtspr " __stringify(rn) ",%2" :		\
 			     "mtspr " __stringify(rn) ",%2" :		\