09 Jul, 2010

1 commit

  • MVFR0 and MVFR1 are only available starting with ARM1136 r1p0 release
    according to "B.5 VFP changes" in DDI0211F_arm1136_r1p0_trm.pdf. This is
    also when TLS register got added, so we can use HAS_TLS also to test for
    MVFR0 and MVFR1.

    Otherwise VFPFMRX and VFPFMXR access fails and we get:

    Internal error: Oops - undefined instruction: 0 [#1]
    PC is at no_old_VFP_process+0x8/0x3c
    LR is at __und_svc+0x48/0x80
    ...

    Signed-off-by: Tony Lindgren
    Acked-by: Catalin Marinas
    Signed-off-by: Russell King

    Tony Lindgren
     

27 May, 2010

1 commit


14 Apr, 2010

1 commit


28 Mar, 2010

1 commit


02 Mar, 2010

1 commit

  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (100 commits)
    ARM: Eliminate decompressor -Dstatic= PIC hack
    ARM: 5958/1: ARM: U300: fix inverted clk round rate
    ARM: 5956/1: misplaced parentheses
    ARM: 5955/1: ep93xx: move timer defines into core.c and document
    ARM: 5954/1: ep93xx: move gpio interrupt support to gpio.c
    ARM: 5953/1: ep93xx: fix broken build of clock.c
    ARM: 5952/1: ARM: MM: Add ARM_L1_CACHE_SHIFT_6 for handle inside each ARCH Kconfig
    ARM: 5949/1: NUC900 add gpio virtual memory map
    ARM: 5948/1: Enable timer0 to time4 clock support for nuc910
    ARM: 5940/2: ARM: MMCI: remove custom DBG macro and printk
    ARM: make_coherent(): fix problems with highpte, part 2
    MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself
    ARM: 5945/1: ep93xx: include correct irq.h in core.c
    ARM: 5933/1: amba-pl011: support hardware flow control
    ARM: 5930/1: Add PKMAP area description to memory.txt.
    ARM: 5929/1: Add checks to detect overlap of memory regions.
    ARM: 5928/1: Change type of VMALLOC_END to unsigned long.
    ARM: 5927/1: Make delimiters of DMA area globally visibly.
    ARM: 5926/1: Add "Virtual kernel memory..." printout.
    ARM: 5920/1: OMAP4: Enable L2 Cache
    ...

    Fix up trivial conflict in arch/arm/mach-mx25/clock.c

    Linus Torvalds
     

16 Feb, 2010

2 commits

  • If we're only reading the VFP context via the ptrace call, there's
    no need to invalidate the hardware context - we only need to do that
    on PTRACE_SETVFPREGS. This allows more efficient monitoring of a
    traced task.

    Signed-off-by: Russell King

    Russell King
     
  • The more I look at vfp_sync_state(), the more I believe it's trying
    to do its job in a really obscure way.

    Essentially, last_VFP_context[] tracks who owns the state in the VFP
    hardware. If last_VFP_context[] is the context for the thread which
    we're interested in, then the VFP hardware has context which is not
    saved in the software state - so we need to bring the software state
    up to date.

    If last_VFP_context[] is for some other thread, we really don't care
    what state the VFP hardware is in; it doesn't contain any information
    pertinent to the thread we're trying to deal with - so don't touch
    the hardware.

    Signed-off-by: Russell King

    Russell King
     

02 Feb, 2010

1 commit


18 Dec, 2009

1 commit

  • This avoids races in the VFP code where the dead thread may have
    state on another CPU. By moving this code to exit_thread(), we
    will be running as the thread, and therefore be running on the
    current CPU.

    This means that we can ensure that the only local state is accessed
    in the thread notifiers.

    Acked-by: Catalin Marinas
    Signed-off-by: Russell King

    Russell King
     

14 Dec, 2009

1 commit

  • When the VFP notifier is called for flush_thread(), we may be
    preemptible, meaning we might migrate to another CPU, which means
    referencing the current CPU number without some form of locking is
    invalid, and can cause data corruption.

    For the most cases, this isn't a problem since atomic notifiers are run
    under rcu lock, which for most configurations results in preemption
    being disabled - except when the preemptable tree-based rcu
    implementation is selected.

    Let's make it safe anyway.

    Signed-off-by: Russell King

    Russell King
     

24 Jul, 2009

2 commits


30 May, 2009

1 commit

  • This CPU generates synchronous VFP exceptions in a non-standard way -
    the FPEXC.EX bit set but without the FPSCR.IXE bit being set like in the
    VFP subarchitecture 1 or just the FPEXC.DEX bit like in VFP
    subarchitecture 2. The main problem is that the faulty instruction
    (which needs to be emulated in software) will be restarted several times
    (normally until a context switch disables the VFP). This patch ensures
    that the VFP exception is treated as synchronous.

    Signed-off-by: Catalin Marinas
    Cc: Nicolas Pitre

    Catalin Marinas
     

02 Apr, 2009

1 commit

  • We've observed that ARM VFP state can be corrupted during VFP exception
    handling when PREEMPT is enabled. The exact conditions are difficult
    to reproduce but appear to occur during VFP exception handling when a
    task causes a VFP exception which is handled via VFP_bounce and is then
    preempted by yet another task which in turn causes yet another VFP
    exception. Since the VFP_bounce code is not preempt safe, VFP state then
    becomes corrupt. In order to prevent preemption from occuring while
    handling a VFP exception, this patch disables preemption while handling
    VFP exceptions.

    Signed-off-by: George G. Davis
    Acked-by: Catalin Marinas
    Signed-off-by: Russell King

    George G. Davis
     

12 Feb, 2009

2 commits

  • The VFPv3D16 is a VFPv3 CPU configuration where only 16 double registers
    are present, as the VFPv2 configuration. This patch adds the
    corresponding hwcap bits so that applications or debuggers have more
    information about the supported features.

    Signed-off-by: Catalin Marinas
    Signed-off-by: Russell King

    Catalin Marinas
     
  • This patch adds ptrace support for setting and getting the VFP registers
    using PTRACE_SETVFPREGS and PTRACE_GETVFPREGS. The user_vfp structure
    defined in asm/user.h contains 32 double registers (to cover VFPv3 and
    Neon hardware) and the FPSCR register.

    Cc: Paul Brook
    Cc: Daniel Jacobowitz
    Signed-off-by: Catalin Marinas
    Signed-off-by: Russell King

    Catalin Marinas
     

19 Dec, 2008

1 commit

  • When CONFIG_PM is selected, the VFP code does not have any handler
    installed to deal with either saving the VFP state of the current
    task, nor does it do anything to try and restore the VFP after a
    resume.

    On resume, the VFP will have been reset and the co-processor access
    control registers are in an indeterminate state (very probably the
    CP10 and CP11 the VFP uses will have been disabled by the ARM core
    reset). When this happens, resume will break as soon as it tries to
    unfreeze the tasks and restart scheduling.

    Add a sys device to allow us to hook the suspend call to save the
    current thread state if the thread is using VFP and a resume hook
    which restores the CP10/CP11 access and ensures the VFP is disabled
    so that the lazy swapping will take place on next access.

    Signed-off-by: Ben Dooks
    Signed-off-by: Russell King

    Ben Dooks
     

06 Nov, 2008

2 commits


01 Sep, 2008

1 commit


26 Jun, 2008

1 commit


26 Jan, 2008

2 commits

  • This patch adds the support for VFPv3 (the kernel currently supports
    VFPv2). The main difference is 32 double registers (compared to 16).

    Signed-off-by: Catalin Marinas
    Signed-off-by: Russell King

    Catalin Marinas
     
  • This patch allows the VFP support code to run correctly on CPUs
    compatible with the common VFP subarchitecture specification (Appendix
    B in the ARM ARM v7-A and v7-R edition). It implements support for VFP
    subarchitecture 2 while being backwards compatible with
    subarchitecture 1.

    On VFP subarchitecture 1, the arithmetic exceptions are asynchronous
    (or imprecise as described in the old ARM ARM) unless the FPSCR.IXE
    bit is 1. The exceptional instructions can be read from FPINST and
    FPINST2 registers. With VFP subarchitecture 2, the arithmetic
    exceptions can also be synchronous and marked by the FPEXC.DEX bit
    (the FPEXC.EX bit is cleared). CPUs implementing the synchronous
    arithmetic exceptions don't have the FPINST and FPINST2 registers and
    accessing them would trigger and undefined exception.

    Note that FPEXC.EX bit has an additional meaning on subarchitecture 1
    - if it isn't set, there is no additional information in FPINST and
    FPINST2 that needs to be saved at context switch or when lazy-loading
    the VFP state of a different thread.

    The patch also removes the clearing of the cumulative exception flags in
    FPSCR when additional exceptions were raised. It is up to the user
    application to clear these bits.

    Signed-off-by: Catalin Marinas
    Signed-off-by: Russell King

    Catalin Marinas
     

11 Jan, 2008

1 commit

  • These two instructions exceptionally take a single precision register
    as their operand. This means we can't use vfp_get_dm() to read the
    register number - we need to use vfp_get_sm() instead. Add a flag to
    indicate this exception to the general rule.

    Signed-off-by: Russell King

    Russell King
     

21 Oct, 2007

2 commits


16 Oct, 2007

1 commit

  • The variable AFLAGS is a wellknown variable and the usage by
    kbuild may result in unexpected behaviour.
    On top of that several people over time has asked for a way to
    pass in additional flags to gcc.

    This patch replace use of AFLAGS with KBUILD_AFLAGS all over
    the tree.

    Patch was tested on following architectures:
    alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     

13 Sep, 2007

1 commit

  • vfp_init() takes care of the condition when CONFIG_VFP=y but no real VFP
    device exists. However, when this condition is true, a compiler might
    misplace code lines in a way that will break this support. (To be more
    specific - fmrx(FPSID) might be executed before vfp_testing_entry
    assignment, which will end up with Oops - undefined instruction).
    This patch adds a barrier() to guarantee the right execution ordering.

    Signed-off-by: Assaf Hoffman
    Signed-off-by: Russell King

    Tzachi Perelstein
     

20 Jul, 2007

1 commit


10 Jun, 2007

1 commit

  • Fix a real section mismatch issue; the test code is thrown away after
    initialisation, but if we do not detect the VFP hardware, it is left
    hooked into the exception handler. Any VFP instructions which are
    subsequently executed risk calling the discarded exception handler.

    Introduce a new "null" handler which returns to the "unrecognised
    fault" return address.

    Signed-off-by: Russell King

    Russell King
     

22 Apr, 2007

1 commit


26 Jan, 2007

1 commit


03 Jan, 2007

1 commit


09 Dec, 2006

1 commit

  • Don't set HWCAP_VFP in the processor support file; not only does it
    depend on the processor features, but it also depends on the support
    code being present. Therefore, only set it if the support code
    detects that we have a VFP coprocessor attached.

    Also, move the VFP handling of the coprocessor access register into
    the VFP support code.

    Signed-off-by: Russell King

    Russell King
     

28 Oct, 2006

2 commits


12 Oct, 2006

1 commit


03 Oct, 2006

1 commit

  • It looks like Zach Brown's patch pr_debug-check-pr_debug-arguments
    worked as inteded. That is, it doesn't "allow completely incorrect code
    to build." :).

    The arm build fails with the following message:
    CC arch/arm/vfp/vfpsingle.o
    arch/arm/vfp/vfpsingle.c: In function `__vfp_single_normaliseround':
    arch/arm/vfp/vfpsingle.c:201: error: `func' undeclared (first use in
    this function)
    arch/arm/vfp/vfpsingle.c:201: error: (Each undeclared identifier is
    reported only once
    arch/arm/vfp/vfpsingle.c:201: error: for each function it appears in.)
    make[1]: *** [arch/arm/vfp/vfpsingle.o] Error 1
    make: *** [arch/arm/vfp] Error 2

    The following patch fixes the issue by using func only when DEBUG is
    defined.

    Signed-off-by: Frederik Deweerdt
    Cc: Russell King
    Cc: Zach Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederik Deweerdt
     

25 Sep, 2006

2 commits