Skip to content
  1. Mar 28, 2018
  2. Mar 27, 2018
  3. Mar 26, 2018
    • Dave Martin's avatar
      arm64/sve: Document firmware support requirements in Kconfig · 5043694e
      Dave Martin authored
      
      
      Use of SVE by EL2 and below requires explicit support in the
      firmware.  There is no means to hide the presence of SVE from EL2,
      so a kernel configured with CONFIG_ARM64_SVE=y will typically not
      work correctly on SVE capable hardware unless the firmware does
      include the appropriate support.
      
      This is not expected to pose a problem in the wild, since platform
      integrators are responsible for ensuring that they ship up-to-date
      firmware to support their hardware.  However, developers may hit
      the issue when using mismatched compoments.
      
      In order to draw attention to the issue and how to solve it, this
      patch adds some Kconfig text giving a brief explanation and details
      of compatible firmware versions.
      
      Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      5043694e
  4. Mar 20, 2018
    • Dave Martin's avatar
      arm64: fpsimd: Fix bad si_code for undiagnosed SIGFPE · af4a81b9
      Dave Martin authored
      
      
      Currently a SIGFPE delivered in response to a floating-point
      exception trap may have si_code set to 0 on arm64.  As reported by
      Eric, this is a bad idea since this is the value of SI_USER -- yet
      this signal is definitely not the result of kill(2), tgkill(2) etc.
      and si_uid and si_pid make limited sense whereas we do want to
      yield a value for si_addr (which doesn't exist for SI_USER).
      
      It's not entirely clear whether the architecure permits a
      "spurious" fp exception trap where none of the exception flag bits
      in ESR_ELx is set.  (IMHO the architectural intent is to forbid
      this.)  However, it does permit those bits to contain garbage if
      the TFV bit in ESR_ELx is 0.  That case isn't currently handled at
      all and may result in si_code == 0 or si_code containing a FPE_FLT*
      constant corresponding to an exception that did not in fact happen.
      
      There is nothing sensible we can return for si_code in such cases,
      but SI_USER is certainly not appropriate and will lead to violation
      of legitimate userspace assumptions.
      
      This patch allocates a new si_code value FPE_UNKNOWN that at least
      does not conflict with any existing SI_* or FPE_* code, and yields
      this in si_code for undiagnosable cases.  This is probably the best
      simplicity/incorrectness tradeoff achieveable without relying on
      implementation-dependent features or adding a lot of code.  In any
      case, there appears to be no perfect solution possible that would
      justify a lot of effort here.
      
      Yielding FPE_UNKNOWN when some well-defined fp exception caused the
      trap is a violation of POSIX, but this is forced by the
      architecture.  We have no realistic prospect of yielding the
      correct code in such cases.  At present I am not aware of any ARMv8
      implementation that supports trapped floating-point exceptions in
      any case.
      
      The new code may be applicable to other architectures for similar
      reasons.
      
      No attempt is made to provide ESR_ELx to userspace in the signal
      frame, since architectural limitations mean that it is unlikely to
      provide much diagnostic value, doesn't benefit existing software
      and would create ABI with no proven purpose.  The existing
      mechanism for passing it also has problems of its own which may
      result in the wrong value being passed to userspace due to
      interaction with mm faults.  The implied rework does not appear
      justified.
      
      Acked-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Reported-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      af4a81b9
    • Will Deacon's avatar
      Merge branch 'siginfo-next' of... · 4c0ca49e
      Will Deacon authored
      Merge branch 'siginfo-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace into aarch64/for-next/core
      
      Pull in pending siginfo changes from Eric Biederman as we depend on
      the definition of FPE_FLTUNK for cleaning up our floating-point exception
      signal delivery (which is currently broken and using FPE_FIXME).
      4c0ca49e
    • Suzuki K Poulose's avatar
      arm64: Expose Arm v8.4 features · 7206dc93
      Suzuki K Poulose authored
      
      
      Expose the new features introduced by Arm v8.4 extensions to
      Arm v8-A profile.
      
      These include :
      
       1) Data indpendent timing of instructions. (DIT, exposed as HWCAP_DIT)
       2) Unaligned atomic instructions and Single-copy atomicity of loads
          and stores. (AT, expose as HWCAP_USCAT)
       3) LDAPR and STLR instructions with immediate offsets (extension to
          LRCPC, exposed as HWCAP_ILRCPC)
       4) Flag manipulation instructions (TS, exposed as HWCAP_FLAGM).
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Reviewed-by: default avatarDave Martin <dave.martin@arm.com>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      7206dc93
    • Suzuki K Poulose's avatar
      arm64: Documentation: cpu-feature-registers: Remove RES0 fields · 847ecd3f
      Suzuki K Poulose authored
      
      
      Remove the invisible RES0 field entries from the table, listing
      fields in CPU ID feature registers, as :
       1) We are only interested in the user visible fields.
       2) The field description may not be up-to-date, as the
          field could be assigned a new meaning.
       3) We already explain the rules of the fields which are not
          visible.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Reviewed-by: default avatarDave Martin <dave.martin@arm.com>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      847ecd3f
    • Ard Biesheuvel's avatar
      arm64: asm: drop special versions of adr_l/ldr_l/str_l for modules · 350e1dad
      Ard Biesheuvel authored
      
      
      Now that we started keeping modules within 4 GB of the core kernel
      in all cases, we no longer need to special case the adr_l/ldr_l/str_l
      macros for modules to deal with them being loaded farther away.
      
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      350e1dad
    • Arnd Bergmann's avatar
      arm64: fix undefined reference to 'printk' · bd99f9a1
      Arnd Bergmann authored
      The printk symbol was intended as a generic address that is always
      exported, however that turned out to be false with CONFIG_PRINTK=n:
      
      ERROR: "printk" [arch/arm64/kernel/arm64-reloc-test.ko] undefined!
      
      This changes the references to memstart_addr, which should be there
      regardless of configuration.
      
      Fixes: a257e025
      
       ("arm64/kernel: don't ban ADRP to work around Cortex-A53 erratum #843419")
      Acked-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      bd99f9a1
  5. Mar 16, 2018