linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Fix Thumb-2 undef handling for mixed-arch kernels
@ 2011-08-18 17:01 Dave Martin
  2011-08-18 17:01 ` [PATCH v2 1/3] ARM: Make cpu_architecture into a global variable Dave Martin
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Dave Martin @ 2011-08-18 17:01 UTC (permalink / raw)
  To: linux-arm-kernel

In kernels which support v6 and v7 platforms in a single binary
such as omap2plus_defconfig for 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_usr
handler to check the CPU architecture at runtime, in affected
kernels.

Changes since v1:
  * Because cpu_architecture() is no longer trivial, it has been
    moveed back out of line, into setup.c.

Changes since RFC:
  * Renamed the global variable to __cpu_architecture and provided
    cpu_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_architecture is now declared __pure, which may lead to
    slightly more efficient code in some cases.
  * Added BUG_ON() to cpu_architecture() so that if
    __cpu_architecture is 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: Make cpu_architecture into a global variable
  ARM: entry: Remove unnecessary masking when decoding Thumb-2
    instructions
  ARM: entry: Fix Thumb-2 undef handling for multi-CPU kernels

 arch/arm/include/asm/system.h |    3 +-
 arch/arm/kernel/entry-armv.S  |   44 ++++++++++++++++++++++++++++++++++++----
 arch/arm/kernel/setup.c       |   20 +++++++++++++++++-
 3 files changed, 60 insertions(+), 7 deletions(-)

-- 
1.7.4.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-08-19  9:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-18 17:01 [PATCH v2 0/3] Fix Thumb-2 undef handling for mixed-arch kernels Dave Martin
2011-08-18 17:01 ` [PATCH v2 1/3] ARM: Make cpu_architecture into a global variable Dave Martin
2011-08-18 17:01 ` [PATCH v2 2/3] ARM: entry: Remove unnecessary masking when decoding Thumb-2 instructions Dave Martin
2011-08-18 17:01 ` [PATCH v2 3/3] ARM: entry: Fix Thumb-2 undef handling for multi-CPU kernels Dave Martin
2011-08-18 22:29 ` [PATCH v2 0/3] Fix Thumb-2 undef handling for mixed-arch kernels Russell King - ARM Linux
2011-08-19  8:44   ` Tixy
2011-08-19  9:10     ` Dave Martin
2011-08-19  9:22       ` Tixy
2011-08-19  9:00   ` Dave Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).