09 Oct, 2012

5 commits

  • Introduce SYSCTL_EXCEPTION_TRACE config option and selec it in the
    architectures requiring support for the "exception-trace" debug_table
    entry in kernel/sysctl.c.

    Signed-off-by: Catalin Marinas
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Catalin Marinas
     
  • Introduce HAVE_DEBUG_BUGVERBOSE config option and select it in
    corresponding architecture Kconfig files. Architectures that already
    select GENERIC_BUG don't need to select HAVE_DEBUG_BUGVERBOSE.

    Signed-off-by: Catalin Marinas
    Acked-by: Geert Uytterhoeven
    Cc: David Howells
    Cc: Hirokazu Takata
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Catalin Marinas
     
  • Introduce HAVE_DEBUG_KMEMLEAK config option and select it in corresponding
    architecture Kconfig files. DEBUG_KMEMLEAK now only depends on
    HAVE_DEBUG_KMEMLEAK.

    Signed-off-by: Catalin Marinas
    Cc: Russell King
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Catalin Marinas
     
  • Introduce HAVE_UID16 config option and select it in corresponding
    architecture Kconfig files. UID16 now only depends on HAVE_UID16.

    Signed-off-by: Catalin Marinas
    Acked-by: Geert Uytterhoeven
    Cc: Russell King
    Cc: Mike Frysinger
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Catalin Marinas
     
  • task_work_run() implementation had the side effect of enabling
    interrupts. With commit ac3d0da8 (task_work: Make task_work_add()
    lockless), interrupts are no longer enabled revealing the bug in the
    arch code. This patch enables the interrupt explicitly before calling
    do_notify_resume().

    Signed-off-by: Catalin Marinas

    Catalin Marinas
     

08 Oct, 2012

2 commits


07 Oct, 2012

1 commit

  • Pull UAPI disintegration fixes from David Howells:
    "There are three main parts:

    (1) I found I needed some more fixups in the wake of testing Arm64
    (some asm/unistd.h files had weird guards that caused problems -
    mostly in arches for which I don't have a compiler) and some
    __KERNEL__ splitting needed to take place in Arm64.

    (2) I found that c6x was missing some __KERNEL__ guards in its
    asm/signal.h. Mark Salter pointed me at a tree with a patch to
    remove that file entirely and use the asm-generic variant instead.

    (3) Lastly, m68k turned out to have a header installation problem due
    to it lacking a kvm_para.h file.

    The conditional installation bits for linux/kvm_para.h, linux/kvm.h
    and linux/a.out.h weren't very well specified - and didn't work if
    an arch didn't have the asm/ version of that file, but there *was*
    an asm-generic/ version.

    It seems the "ifneq $((wildcard ...),)" for each of those three
    headers in include/kernel/Kbuild is invoked twice during header
    installation, and the second time it matches on the just installed
    asm-generic/kvm_para.h file and thus incorrectly installs
    linux/kvm_para.h as well.

    Most arches actually have an asm/kvm_para.h, so this wasn't
    detectable in those."

    * 'uapi-prep' of git://git.infradead.org/users/dhowells/linux-headers:
    UAPI: Fix conditional header installation handling (notably kvm_para.h on m68k)
    c6x: remove c6x signal.h
    UAPI: Split compound conditionals containing __KERNEL__ in Arm64
    UAPI: Fix the guards on various asm/unistd.h files
    c6x: make dsk6455 the default config

    Linus Torvalds
     

06 Oct, 2012

1 commit

  • This is a preparatory patch for the introduction of NT_SIGINFO elf note.

    Make the location of compat_siginfo_t uniform across eight architectures
    which have it. Now it can be pulled in by including asm/compat.h or
    linux/compat.h.

    Most of the copies are verbatim. compat_uid[32]_t had to be replaced by
    __compat_uid[32]_t. compat_uptr_t had to be moved up before
    compat_siginfo_t in asm/compat.h on a several architectures (tile already
    had it moved up). compat_sigval_t had to be relocated from linux/compat.h
    to asm/compat.h.

    Signed-off-by: Denys Vlasenko
    Cc: Oleg Nesterov
    Cc: Amerigo Wang
    Cc: "Jonathan M. Foote"
    Cc: Roland McGrath
    Cc: Pedro Alves
    Cc: Fengguang Wu
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denys Vlasenko
     

04 Oct, 2012

2 commits

  • Split compound conditionals containing __KERNEL__ in Arm64 where possible to
    make it easier for the UAPI disintegration scripts to handle them.

    Signed-off-by: David Howells
    Acked-by: Catalin Marinas

    David Howells
     
  • asm-generic/unistd.h and a number of asm/unistd.h files have been given
    reinclusion guards that allow the guard to be overridden if __SYSCALL is
    defined. Unfortunately, these files define __SYSCALL and don't undefine it
    when they've finished with it, thus rendering the guard ineffective.

    The reason for this override is to allow the file to be #included multiple
    times with different settings on __SYSCALL for purposes like generating syscall
    tables.

    The following guards are problematic:

    arch/arm64/include/asm/unistd.h:#if !defined(__ASM_UNISTD_H) || defined(__SYSCALL)
    arch/arm64/include/asm/unistd32.h:#if !defined(__ASM_UNISTD32_H) || defined(__SYSCALL)
    arch/c6x/include/asm/unistd.h:#if !defined(_ASM_C6X_UNISTD_H) || defined(__SYSCALL)
    arch/hexagon/include/asm/unistd.h:#if !defined(_ASM_HEXAGON_UNISTD_H) || defined(__SYSCALL)
    arch/openrisc/include/asm/unistd.h:#if !defined(__ASM_OPENRISC_UNISTD_H) || defined(__SYSCALL)
    arch/score/include/asm/unistd.h:#if !defined(_ASM_SCORE_UNISTD_H) || defined(__SYSCALL)
    arch/tile/include/asm/unistd.h:#if !defined(_ASM_TILE_UNISTD_H) || defined(__SYSCALL)
    arch/unicore32/include/asm/unistd.h:#if !defined(__UNICORE_UNISTD_H__) || defined(__SYSCALL)
    include/asm-generic/unistd.h:#if !defined(_ASM_GENERIC_UNISTD_H) || defined(__SYSCALL)

    On the assumption that the guards' ineffectiveness has passed unnoticed, just
    remove these guards entirely.

    Signed-off-by: David Howells
    Acked-by: Arnd Bergmann
    Acked-by: Catalin Marinas

    David Howells
     

03 Oct, 2012

1 commit


27 Sep, 2012

1 commit


25 Sep, 2012

1 commit


17 Sep, 2012

26 commits

  • This patch adds Makefile and Kconfig files required for building an
    AArch64 kernel.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • This patch introduces a few AArch64-specific header files together with
    Kbuild entries for generic headers.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • This patch adds support for the ARM generic timers with A64 instructions
    for accessing the timer registers. It uses the physical counter as the
    clock source and the virtual counter as sched_clock.

    The timer frequency can be specified via DT or read from the CNTFRQ_EL0
    register. The physical counter is also accessible from user space
    allowing fast gettimeofday() implementation.

    Signed-off-by: Marc Zyngier
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Marc Zyngier
     
  • This patch adds support for loadable modules. Loadable modules are
    loaded 64MB below the kernel image due to branch relocation restrictions
    (see Documentation/arm64/memory.txt).

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Will Deacon
     
  • This patch adds udelay, memory and bit operations together with the
    ksyms exports.

    Signed-off-by: Marc Zyngier
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar

    Marc Zyngier
     
  • This patch adds support for the AArch64 performance counters.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar

    Will Deacon
     
  • This patch adds ptrace, debug monitors and hardware breakpoints support.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Will Deacon
     
  • This patch adds support for FP/ASIMD register bank saving and restoring
    during context switch and FP exception handling to generate SIGFPE.
    There are 32 128-bit registers and the context switching is currently
    done non-lazily. Benchmarks on real hardware are required before
    implementing lazy FP state saving/restoring.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Arnd Bergmann
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar

    Catalin Marinas
     
  • This patch adds support for 32-bit applications. The vectors page is a
    binary blob mapped into the application user space at 0xffff0000 (the
    AArch64 toolchain does not support compilation of AArch32 code). Full
    compatibility with ARMv7 user space is supported. The use of deprecated
    ARMv7 functionality (SWP, CP15 barriers) has been disabled by default on
    AArch64 kernels and unaligned LDM/STM is not supported.

    Please note that only the ARM 32-bit EABI is supported, so no OABI
    compatibility.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar

    Will Deacon
     
  • This patch add support for various user access functions. These
    functions use the standard LDR/STR instructions and not the LDRT/STRT
    variants in order to allow kernel addresses (after set_fs(KERNEL_DS)).

    Signed-off-by: Will Deacon
    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • This patch adds support for signal handling. The sigreturn is done via
    VDSO, introduced by a previous patch. The SA_RESTORER is still defined
    as it is required for 32-bit (compat) support but it is not to be used
    for 64-bit applications.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar

    Catalin Marinas
     
  • This patch adds VDSO support for 64-bit applications. The VDSO code is
    currently used for sys_rt_sigreturn() and optimised gettimeofday()
    (using the user-accessible generic counter).

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Will Deacon
     
  • This patch adds support for system calls coming from 64-bit
    applications. It uses the asm-generic/unistd.h definitions with the
    canonical set of system calls. The private system calls are only used
    for 32-bit (compat) applications as 64-bit ones can set the TLS and
    flush the caches entirely from user space.

    The sys_call_table is just an array defined in a C file and it contains
    pointers to the syscall functions. The array is 4KB aligned to allow the
    use of the ADRP instruction (longer range ADR) in entry.S.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar

    Catalin Marinas
     
  • This patch adds definitions for the ELF format, including personality
    personality setting and EXEC_PAGESIZE. The are only two hwcap
    definitions for 64-bit applications - HWCAP_FP and HWCAP_ASIMD.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • This patch adds SMP initialisation and spinlocks implementation for
    AArch64. The spinlock support uses the new load-acquire/store-release
    instructions to avoid explicit barriers. The architecture also specifies
    that an event is automatically generated when clearing the exclusive
    monitor state to wake up processors in WFE, so there is no need for an
    explicit DSB/SEV instruction sequence. The SEVL instruction is used to
    set the exclusive monitor locally as there is no conditional WFE and a
    branch is more expensive.

    For the SMP booting protocol, see Documentation/arm64/booting.txt.

    Signed-off-by: Will Deacon
    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas
    Acked-by: Arnd Bergmann
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • This patch adds support for the DMA mapping API. It uses dma_map_ops for
    flexibility and it currently supports swiotlb. This patch could be
    simplified further if the DMA accesses are coherent (not mandated by the
    architecture) or if corresponding hooks are placed in the generic
    swiotlb code to deal with cache maintenance.

    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • This patch adds several definitions for device communication, including
    I/O accessors and ioremap(). The __raw_* accessors are implemented as
    inline asm to avoid compiler generation of post-indexed accesses (less
    efficient to emulate in a virtualised environment).

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Arnd Bergmann
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar

    Catalin Marinas
     
  • This patch introduces the atomic, mutex and futex operations. Many
    atomic operations use the load-acquire and store-release operations
    which imply barriers, avoiding the need for explicit DMB.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • This patch adds the support for IRQ handling. The actual interrupt
    controller will be part of a separate patch (going into
    drivers/irqchip/).

    Signed-off-by: Marc Zyngier
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar

    Marc Zyngier
     
  • This patch adds the TLB maintenance functions. There is no distinction
    made between the I and D TLBs. TLB maintenance operations are
    automatically broadcast between CPUs in hardware. The inner-shareable
    operations are always present, even on UP systems.

    NOTE: Large part of this patch to be dropped once Peter Z's generic
    mmu_gather patches are merged.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • The patch adds functionality required for cache maintenance. The AArch64
    architecture mandates non-aliasing VIPT or PIPT D-cache and VIPT (may
    have aliases) or ASID-tagged VIVT I-cache. Cache maintenance operations
    are automatically broadcast in hardware between CPUs.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • This patch adds AArch64 CPU specific functionality. It assumes that the
    implementation is generic to AArch64 and does not require specific
    identification. Different CPU implementations may require the setting of
    various ACTLR_EL1 bits but such information is not currently available
    and it should ideally be pushed to firmware.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar

    Catalin Marinas
     
  • The patch adds support for thread creation and context switching. The
    context switching CPU specific code is introduced with the CPU support
    patch (part of the arch/arm64/mm/proc.S file). AArch64 supports
    ASID-tagged TLBs and the ASID can be either 8 or 16-bit wide (detectable
    via the ID_AA64AFR0_EL1 register).

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • This patch adds support for the handling of the MMU faults (exception
    entry code introduced by a previous patch) and page table management.

    The user translation table is pointed to by TTBR0 and the kernel one
    (swapper_pg_dir) by TTBR1. There is no translation information shared or
    address space overlapping between user and kernel page tables.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • This patch contains the initialisation of the memory blocks, MMU
    attributes and the memory map. Only five memory types are defined:
    Device nGnRnE (equivalent to Strongly Ordered), Device nGnRE (classic
    Device memory), Device GRE, Normal Non-cacheable and Normal Cacheable.
    Cache policies are supported via the memory attributes register
    (MAIR_EL1) and only affect the Normal Cacheable mappings.

    This patch also adds the SPARSEMEM_VMEMMAP initialisation.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • The virtual memory layout is described in
    Documentation/arm64/memory.txt. This patch adds the MMU definitions for
    the 4KB and 64KB translation table configurations. The SECTION_SIZE is
    2MB with 4KB page and 512MB with 64KB page configuration.

    PHYS_OFFSET is calculated at run-time and stored in a variable (no
    run-time code patching at this stage).

    On the current implementation, both user and kernel address spaces are
    512G (39-bit) each with a maximum of 256G for the RAM linear mapping.
    Linux uses 3 levels of translation tables with the 4K page configuration
    and 2 levels with the 64K configuration. Extending the memory space
    beyond 39-bit with the 4K pages or 42-bit with 64K pages requires an
    additional level of translation tables.

    The SPARSEMEM configuration is global to all AArch64 platforms and
    allows for 1GB sections with SPARSEMEM_VMEMMAP enabled by default.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas