09 Nov, 2012

3 commits

  • Commit 149c24151e85 ("ARM: SMP: use a timing out completion for cpu
    hotplug") modified arm's CPU up path to use completions. It seems that
    we only got half of this patch for arm64, so add the missing call to
    complete.

    Reported-by: Jon Brawn
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     
  • struct user_fp does not exist for arm64, so use struct user_fpsimd_state
    instead for the ELF core dumping definitions. Furthermore, since we use
    regset-based core dumping, we do not need definitions for dump_task_regs
    and dump_fpu.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     
  • We currently use a fake event encoding (0xFF) to indicate CPU cycles so
    that we don't waste an event counter and can target the hardware cycle
    counter instead.

    The problem with this approach is that the event space defined by the
    architecture permits an implementation to allocate 0xFF for some other
    event.

    This patch uses the architected cycle counter encoding (0x11) so that
    we avoid potentially clashing with event encodings on future CPU
    implementations.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     

19 Oct, 2012

4 commits

  • If a debugger tries to zero a hardware debug control register, the
    kernel will try to infer both the type and length of the breakpoint
    in order to sanity-check against the requested regset type. This will
    fail because the encoding will appear as a zero-length breakpoint.

    This patch changes the control register setting so that disabled
    breakpoints are treated as HW_BREAKPOINT_EMPTY and no further
    sanity-checking is required.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     
  • The user_hwdebug_state structure contains implicit padding to conform to
    the alignment requirements of the AArch64 ABI (namely that aggregates
    must be aligned to their most aligned member).

    This patch fixes the ptrace functions operating on struct
    user_hwdebug_state so that the padding is handled correctly.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     
  • According to Documentation/arm64/booting.txt, the kernel image must be
    loaded at a pre-defined offset from the start of RAM so that the kernel
    can calculate PHYS_OFFSET based on this address. If the DT contains
    memory blocks below this PHYS_OFFSET, report them and ignore the
    corresponding memory range.

    Signed-off-by: Catalin Marinas

    Catalin Marinas
     
  • With commit 576094b7 (time: Introduce new GENERIC_TIME_VSYSCALL) the old
    update_vsyscall() prototype is no longer available. This patch updates
    the arm64 port.

    Signed-off-by: Catalin Marinas
    Acked-by: Will Deacon
    Cc: John Stultz

    Catalin Marinas
     

17 Oct, 2012

1 commit


13 Oct, 2012

2 commits

  • Pull arm64 uapi disintegration from Catalin Marinas:
    "UAPI headers for arm64 together with some clean-up to make it
    possible:
    - Do not export the COMPAT_* definitions to user
    - Simplify the compat unistd32.h definitions and remove the
    __SYSCALL_COMPAT guard
    - Disintegrate the arch/arm64/include/asm/* headers"

    * tag 'arm64-uapi' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
    UAPI: (Scripted) Disintegrate arch/arm64/include/asm
    arm64: Do not export the compat-specific definitions to the user
    arm64: Do not include asm/unistd32.h in asm/unistd.h
    arm64: Remove unused definitions from asm/unistd32.h

    Linus Torvalds
     
  • getname() is intended to copy pathname strings from userspace into a
    kernel buffer. The result is just a string in kernel space. It would
    however be quite helpful to be able to attach some ancillary info to
    the string.

    For instance, we could attach some audit-related info to reduce the
    amount of audit-related processing needed. When auditing is enabled,
    we could also call getname() on the string more than once and not
    need to recopy it from userspace.

    This patchset converts the getname()/putname() interfaces to return
    a struct instead of a string. For now, the struct just tracks the
    string in kernel space and the original userland pointer for it.

    Later, we'll add other information to the struct as it becomes
    convenient.

    Signed-off-by: Jeff Layton
    Signed-off-by: Al Viro

    Jeff Layton
     

11 Oct, 2012

3 commits


09 Oct, 2012

1 commit


08 Oct, 2012

1 commit


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
     

27 Sep, 2012

1 commit


17 Sep, 2012

19 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 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 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 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 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 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 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
     
  • The patch contains the exception entry code (kernel/entry.S), pt_regs
    structure and related accessors, undefined instruction trapping and
    stack tracing.

    AArch64 Linux kernel (including kernel threads) runs in EL1 mode using
    the SP1 stack. The vectors don't have a fixed address, only alignment
    (2^11) requirements.

    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 the kernel booting and the initial setup code.
    Documentation/arm64/booting.txt describes the booting protocol on the
    AArch64 Linux kernel. This is subject to change following the work on
    boot standardisation, ACPI.

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

    Catalin Marinas
     
  • This patch introduces several assembly macros and definitions used in
    the .S files across arch/arm64/ like IRQ disabling/enabling, together
    with asm-offsets.c.

    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