linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] Fix Thumb-2 undef handling for mixed-arch kernels
@ 2011-08-10 10:13 Dave Martin
  2011-08-10 10:13 ` [RFC PATCH 1/5] ARM: Make cpu_alignment into a global variable Dave Martin
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Dave Martin @ 2011-08-10 10:13 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.

As a side-effect, this also changes cpu_architecture from a
function into a global variable initialised at boot-time, which is
probably a sensible idea anyway.

While I think the approach in this series is roughly correct, it's
not very pretty -- in anyone was a cleaner solution to suggest, I'm
open to ideas.

Note that much of the actual diffstat comes from changing
references to cpu_architecture().

Dave Martin (5):
  ARM: Make cpu_alignment into a global variable
  ARM: s3c24xx: Reference cpu_architecture as a global variable
  ARM: kprobes: Reference cpu_architecture as 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    |    2 +-
 arch/arm/kernel/elf.c            |    4 ++-
 arch/arm/kernel/entry-armv.S     |   44 +++++++++++++++++++++++++++++++++----
 arch/arm/kernel/kprobes-common.c |   11 ++++-----
 arch/arm/kernel/setup.c          |   12 ++++++----
 arch/arm/kernel/thumbee.c        |    4 +-
 arch/arm/mm/alignment.c          |    9 ++++---
 arch/arm/mm/fault.c              |    4 +-
 arch/arm/mm/idmap.c              |    3 +-
 arch/arm/mm/ioremap.c            |    3 +-
 arch/arm/mm/mmu.c                |   31 ++++++++++++++------------
 arch/arm/plat-s3c24xx/cpu.c      |    3 +-
 arch/arm/vfp/vfpmodule.c         |    4 +-
 13 files changed, 89 insertions(+), 45 deletions(-)

-- 
1.7.4.1

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

end of thread, other threads:[~2011-09-12 10:33 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-10 10:13 [RFC PATCH 0/5] Fix Thumb-2 undef handling for mixed-arch kernels Dave Martin
2011-08-10 10:13 ` [RFC PATCH 1/5] ARM: Make cpu_alignment into a global variable Dave Martin
2011-08-10 11:38   ` Tixy
2011-08-10 10:13 ` [RFC PATCH 2/5] ARM: s3c24xx: Reference cpu_architecture as " Dave Martin
2011-08-10 10:13 ` [RFC PATCH 3/5] ARM: kprobes: " Dave Martin
2011-08-10 11:43   ` Tixy
2011-08-10 10:13 ` [RFC PATCH 4/5] ARM: entry: Remove unnecessary masking when decoding Thumb-2 instructions Dave Martin
2011-08-10 10:13 ` [RFC PATCH 5/5] ARM: entry: Fix Thumb-2 undef handling for multi-CPU kernels Dave Martin
2011-08-10 11:55   ` Tixy
2011-08-11 13:04     ` Dave Martin
2011-09-01 14:52   ` Arnd Bergmann
2011-09-07 10:54     ` Dave Martin
2011-09-12 10:33     ` Dave Martin
2011-08-10 11:31 ` [RFC PATCH 0/5] Fix Thumb-2 undef handling for mixed-arch kernels Tixy
2011-08-11 13:10   ` Dave Martin
2011-08-15 23:13     ` Nicolas Pitre
2011-08-16  9:04       ` 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).