svn commit: r278652 - in stable/10/sys: arm/arm arm/include conf
Ian Lepore
ian at FreeBSD.org
Fri Feb 13 00:49:52 UTC 2015
Author: ian
Date: Fri Feb 13 00:49:47 2015
New Revision: 278652
URL: https://svnweb.freebsd.org/changeset/base/278652
Log:
MFC r276525, r276596:
Put in a workaround for bug 196407 (arm modules cause crashes & panics).
(Don't allow movw/movt insn in modules.)
Fix alignment directives in arm asm code after clang 3.5 import.
Modified:
stable/10/sys/arm/arm/bcopyinout.S
stable/10/sys/arm/arm/bcopyinout_xscale.S
stable/10/sys/arm/arm/copystr.S
stable/10/sys/arm/arm/cpufunc_asm.S
stable/10/sys/arm/arm/cpufunc_asm_arm10.S
stable/10/sys/arm/arm/cpufunc_asm_arm9.S
stable/10/sys/arm/arm/cpufunc_asm_armv5.S
stable/10/sys/arm/arm/exception.S
stable/10/sys/arm/arm/fusu.S
stable/10/sys/arm/arm/locore-v4.S
stable/10/sys/arm/arm/locore-v6.S
stable/10/sys/arm/include/asm.h
stable/10/sys/arm/include/profile.h
stable/10/sys/conf/kmod.mk
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/arm/arm/bcopyinout.S
==============================================================================
--- stable/10/sys/arm/arm/bcopyinout.S Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/arm/bcopyinout.S Fri Feb 13 00:49:47 2015 (r278652)
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
#else
.text
- .align 0
+ .align 2
#ifdef _ARM_ARCH_6
#define GET_PCB(tmp) \
Modified: stable/10/sys/arm/arm/bcopyinout_xscale.S
==============================================================================
--- stable/10/sys/arm/arm/bcopyinout_xscale.S Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/arm/bcopyinout_xscale.S Fri Feb 13 00:49:47 2015 (r278652)
@@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$");
.syntax unified
.text
- .align 0
+ .align 2
#ifdef _ARM_ARCH_6
#define GET_PCB(tmp) \
Modified: stable/10/sys/arm/arm/copystr.S
==============================================================================
--- stable/10/sys/arm/arm/copystr.S Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/arm/copystr.S Fri Feb 13 00:49:47 2015 (r278652)
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
#include <sys/errno.h>
.text
- .align 0
+ .align 2
#ifdef _ARM_ARCH_6
#define GET_PCB(tmp) \
@@ -210,5 +210,5 @@ END(copyoutstr)
Lcopystrpcbfaulttext:
.asciz "No valid PCB during copyinoutstr() addr1=%08x addr2=%08x\n"
- .align 0
+ .align 2
#endif
Modified: stable/10/sys/arm/arm/cpufunc_asm.S
==============================================================================
--- stable/10/sys/arm/arm/cpufunc_asm.S Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/arm/cpufunc_asm.S Fri Feb 13 00:49:47 2015 (r278652)
@@ -46,7 +46,7 @@
__FBSDID("$FreeBSD$");
.text
- .align 0
+ .align 2
ENTRY(cpufunc_nullop)
RET
@@ -138,7 +138,7 @@ ENTRY(cpufunc_control)
RET
.Lglou:
.asciz "plop %p\n"
- .align 0
+ .align 2
END(cpufunc_control)
/*
Modified: stable/10/sys/arm/arm/cpufunc_asm_arm10.S
==============================================================================
--- stable/10/sys/arm/arm/cpufunc_asm_arm10.S Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/arm/cpufunc_asm_arm10.S Fri Feb 13 00:49:47 2015 (r278652)
@@ -265,7 +265,7 @@ END(arm10_context_switch)
* four variables is assumed in the code above. Hence the reason for
* declaring them in the assembler file.
*/
- .align 0
+ .align 2
C_OBJECT(arm10_dcache_sets_max)
.space 4
C_OBJECT(arm10_dcache_index_max)
Modified: stable/10/sys/arm/arm/cpufunc_asm_arm9.S
==============================================================================
--- stable/10/sys/arm/arm/cpufunc_asm_arm9.S Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/arm/cpufunc_asm_arm9.S Fri Feb 13 00:49:47 2015 (r278652)
@@ -252,7 +252,7 @@ END(arm9_context_switch)
* four variables is assumed in the code above. Hence the reason for
* declaring them in the assembler file.
*/
- .align 0
+ .align 2
C_OBJECT(arm9_dcache_sets_max)
.space 4
C_OBJECT(arm9_dcache_index_max)
Modified: stable/10/sys/arm/arm/cpufunc_asm_armv5.S
==============================================================================
--- stable/10/sys/arm/arm/cpufunc_asm_armv5.S Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/arm/cpufunc_asm_armv5.S Fri Feb 13 00:49:47 2015 (r278652)
@@ -236,7 +236,7 @@ END(armv5_idcache_wbinv_all)
* four variables is assumed in the code above. Hence the reason for
* declaring them in the assembler file.
*/
- .align 0
+ .align 2
C_OBJECT(armv5_dcache_sets_max)
.space 4
C_OBJECT(armv5_dcache_index_max)
Modified: stable/10/sys/arm/arm/exception.S
==============================================================================
--- stable/10/sys/arm/arm/exception.S Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/arm/exception.S Fri Feb 13 00:49:47 2015 (r278652)
@@ -54,7 +54,7 @@
__FBSDID("$FreeBSD$");
.text
- .align 0
+ .align 2
/*
* ASM macros for pushing and pulling trapframes from the stack
Modified: stable/10/sys/arm/arm/fusu.S
==============================================================================
--- stable/10/sys/arm/arm/fusu.S Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/arm/fusu.S Fri Feb 13 00:49:47 2015 (r278652)
@@ -204,7 +204,7 @@ Lblock_userspace_access:
.word _C_LABEL(block_userspace_access)
.data
- .align 0
+ .align 2
.global _C_LABEL(block_userspace_access)
_C_LABEL(block_userspace_access):
.word 0
Modified: stable/10/sys/arm/arm/locore-v4.S
==============================================================================
--- stable/10/sys/arm/arm/locore-v4.S Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/arm/locore-v4.S Fri Feb 13 00:49:47 2015 (r278652)
@@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$");
* the running kernel.
*/
.text
- .align 0
+ .align 2
#ifdef PHYSADDR
.globl kernbase
.set kernbase,KERNBASE
@@ -373,7 +373,7 @@ Lend:
.Lmainreturned:
.asciz "main() returned"
- .align 0
+ .align 2
.bss
svcstk:
@@ -389,7 +389,7 @@ pagetable:
.space L1_TABLE_SIZE
.text
- .align 0
+ .align 2
.Lcpufuncs:
.word _C_LABEL(cpufuncs)
@@ -476,7 +476,7 @@ mpvirt_done:
.Lmpreturned:
.asciz "init_secondary() returned"
- .align 0
+ .align 2
END(mpentry)
#endif
@@ -584,7 +584,7 @@ END(sigcode)
.word SYS_sigreturn
.word SYS_exit
- .align 0
+ .align 2
.global _C_LABEL(esigcode)
_C_LABEL(esigcode):
Modified: stable/10/sys/arm/arm/locore-v6.S
==============================================================================
--- stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:49:47 2015 (r278652)
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
#define INIT_ARM_STACK_SIZE 2048
.text
- .align 0
+ .align 2
/*
* On entry for FreeBSD boot ABI:
@@ -373,7 +373,7 @@ VA_TO_PA_POINTER(Lpagetable, boot_pt1)
.Lmainreturned:
.asciz "main() returned"
- .align 0
+ .align 2
.bss
svcstk:
@@ -390,7 +390,7 @@ boot_pt1:
.space L1_TABLE_SIZE
.text
- .align 0
+ .align 2
.Lcpufuncs:
.word _C_LABEL(cpufuncs)
@@ -443,11 +443,11 @@ ASENTRY_NP(mpentry)
adr r0, .Lmpreturned
b _C_LABEL(panic)
/* NOTREACHED */
+END(mpentry)
.Lmpreturned:
.asciz "init_secondary() returned"
- .align 0
-END(mpentry)
+ .align 2
#endif
ENTRY_NP(cpu_halt)
@@ -525,7 +525,7 @@ END(sigcode)
.word SYS_sigreturn
.word SYS_exit
- .align 0
+ .align 2
.global _C_LABEL(esigcode)
_C_LABEL(esigcode):
Modified: stable/10/sys/arm/include/asm.h
==============================================================================
--- stable/10/sys/arm/include/asm.h Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/include/asm.h Fri Feb 13 00:49:47 2015 (r278652)
@@ -46,7 +46,7 @@
#define _ASM_LABEL(x) x
#ifndef _ALIGN_TEXT
-# define _ALIGN_TEXT .align 0
+# define _ALIGN_TEXT .align 2
#endif
#if defined(__ARM_EABI__) && !defined(_STANDALONE)
@@ -129,11 +129,11 @@
pclabel: add got, got, pc
#ifdef __thumb__
#define GOT_INITSYM(gotsym,pclabel) \
- .align 0; \
+ .align 2; \
gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+4)
#else
#define GOT_INITSYM(gotsym,pclabel) \
- .align 0; \
+ .align 2; \
gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+8)
#endif
Modified: stable/10/sys/arm/include/profile.h
==============================================================================
--- stable/10/sys/arm/include/profile.h Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/arm/include/profile.h Fri Feb 13 00:49:47 2015 (r278652)
@@ -60,7 +60,7 @@ typedef u_long fptrdiff_t;
#define MCOUNT \
__asm__(".text"); \
- __asm__(".align 0"); \
+ __asm__(".align 2"); \
__asm__(".type __mcount ,%function"); \
__asm__(".global __mcount"); \
__asm__("__mcount:"); \
Modified: stable/10/sys/conf/kmod.mk
==============================================================================
--- stable/10/sys/conf/kmod.mk Fri Feb 13 00:41:03 2015 (r278651)
+++ stable/10/sys/conf/kmod.mk Fri Feb 13 00:49:47 2015 (r278652)
@@ -125,6 +125,11 @@ CFLAGS+= ${DEBUG_FLAGS}
CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
.endif
+# Temporary workaround for PR 196407, which contains the fascinating details.
+.if ${MACHINE_CPUARCH} == arm
+CFLAGS.clang+= -mllvm -arm-use-movt=0
+.endif
+
.if ${MACHINE_CPUARCH} == powerpc
CFLAGS+= -mlongcall -fno-omit-frame-pointer
.endif
More information about the svn-src-stable-10
mailing list