Fix Thumb-2 undef handling for mixed-arch kernels
Get series with b4
b4 am 1313506694.2235.15.camel@computer2Versions newest first
- v1 Latest1 of 3 patches 0 repliesNew
1 of 3 patches is in this archive. The cover letter announces 3.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 3/3 | ARM: entry: Fix Thumb-2 undef handling for multi-CPU kernels | +0 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] Fix Thumb-2 undef handling for mixed-arch kernels
Quoted 30 lines · Dave Martin
In kernels which support v6 and v7 platforms in a single binary such as
omap2plus_defconfigfor example, undefined instruction exceptions taken on Thumb instructions are not processed correctly, because the kernel assumes at build-time that Thumb-2 won't be supported in userspace.This series implements a workaround, by allowing the
__und_usrhandler to check the CPU architecture at runtime, in affected kernels.Changes since RFC:
* Renamed the global variable to__cpu_architectureand providedcpu_architecture()as in inline function in <asm/system.h>. This brings back the old API, but more efficiently.
* Dropped all the patches required to handle the reverted API change.
*cpu_architectureis now declared__pure, which may lead to slightly more efficient code in some cases.
* AddedBUG_ON()tocpu_architecture()so that if__cpu_architectureis not set early enough, it gets noticed.Thanks to Tixy and Nicolas Pitre for their helpful feedback which helped slim down this series.
Dave Martin (3):
ARM: Makecpu_alignmentinto a global variable
ARM: entry: Remove unnecessary masking when decoding Thumb-2
instructions
ARM: entry: Fix Thumb-2 undef handling for multi-CPU kernels
Quoted 5 lines
arch/arm/include/asm/system.h | 11 +++++++++- arch/arm/kernel/entry-armv.S | 44 ++++++++++++++++++++++++++++++++++++---- arch/arm/kernel/setup.c | 5 +++- 3 files changed, 53 insertions(+), 7 deletions(-)
Looks good to me.
Signature · 1 line
Tixy