Skip to content
Snippets Groups Projects
  1. Jun 07, 2019
  2. Jun 06, 2019
    • Dave Martin's avatar
      arm64: Silence gcc warnings about arch ABI drift · ebcc5928
      Dave Martin authored
      
      Since GCC 9, the compiler warns about evolution of the
      platform-specific ABI, in particular relating for the marshaling of
      certain structures involving bitfields.
      
      The kernel is a standalone binary, and of course nobody would be
      so stupid as to expose structs containing bitfields as function
      arguments in ABI.  (Passing a pointer to such a struct, however
      inadvisable, should be unaffected by this change.  perf and various
      drivers rely on that.)
      
      So these warnings do more harm than good: turn them off.
      
      We may miss warnings about future ABI drift, but that's too bad.
      Future ABI breaks of this class will have to be debugged and fixed
      the traditional way unless the compiler evolves finer-grained
      diagnostics.
      
      Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      ebcc5928
    • Helge Deller's avatar
      parisc: Fix crash due alternative coding for NP iopdir_fdc bit · 527a1d1e
      Helge Deller authored
      
      According to the found documentation, data cache flushes and sync
      instructions are needed on the PCX-U+ (PA8200, e.g. C200/C240)
      platforms, while PCX-W (PA8500, e.g. C360) platforms aparently don't
      need those flushes when changing the IO PDIR data structures.
      
      We have no documentation for PCX-W+ (PA8600) and PCX-W2 (PA8700) CPUs,
      but Carlo Pisani reported that his C3600 machine (PA8600, PCX-W+) fails
      when the fdc instructions were removed. His firmware didn't set the NIOP
      bit, so one may assume it's a firmware bug since other C3750 machines
      had the bit set.
      
      Even if documentation (as mentioned above) states that PCX-W (PA8500,
      e.g.  J5000) does not need fdc flushes, Sven could show that an Adaptec
      29320A PCI-X SCSI controller reliably failed on a dd command during the
      first five minutes in his J5000 when fdc flushes were missing.
      
      Going forward, we will now NOT replace the fdc and sync assembler
      instructions by NOPS if:
      a) the NP iopdir_fdc bit was set by firmware, or
      b) we find a CPU up to and including a PCX-W+ (PA8600).
      
      This fixes the HPMC crashes on a C240 and C36XX machines. For other
      machines we rely on the firmware to set the bit when needed.
      
      In case one finds HPMC issues, people could try to boot their machines
      with the "no-alternatives" kernel option to turn off any alternative
      patching.
      
      Reported-by: default avatarSven Schnelle <svens@stackframe.org>
      Reported-by: default avatarCarlo Pisani <carlojpisani@gmail.com>
      Tested-by: default avatarSven Schnelle <svens@stackframe.org>
      Fixes: 3847dab7 ("parisc: Add alternative coding infrastructure")
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Cc: stable@vger.kernel.org # 5.0+
      527a1d1e
    • John David Anglin's avatar
      parisc: Use lpa instruction to load physical addresses in driver code · 116d7533
      John David Anglin authored
      
      Most I/O in the kernel is done using the kernel offset mapping.
      However, there is one API that uses aliased kernel address ranges:
      
      > The final category of APIs is for I/O to deliberately aliased address
      > ranges inside the kernel.  Such aliases are set up by use of the
      > vmap/vmalloc API.  Since kernel I/O goes via physical pages, the I/O
      > subsystem assumes that the user mapping and kernel offset mapping are
      > the only aliases.  This isn't true for vmap aliases, so anything in
      > the kernel trying to do I/O to vmap areas must manually manage
      > coherency.  It must do this by flushing the vmap range before doing
      > I/O and invalidating it after the I/O returns.
      
      For this reason, we should use the hardware lpa instruction to load the
      physical address of kernel virtual addresses in the driver code.
      
      I believe we only use the vmap/vmalloc API with old PA 1.x processors
      which don't have a sba, so we don't hit this problem.
      
      Tested on c3750, c8000 and rp3440.
      
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      116d7533
    • Krzysztof Kozlowski's avatar
      parisc: configs: Remove useless UEVENT_HELPER_PATH · ec13c82d
      Krzysztof Kozlowski authored
      
      Remove the CONFIG_UEVENT_HELPER_PATH because:
      1. It is disabled since commit 1be01d4a ("driver: base: Disable
         CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was
         made default to 'n',
      2. It is not recommended (help message: "This should not be used today
         [...] creates a high system load") and was kept only for ancient
         userland,
      3. Certain userland specifically requests it to be disabled (systemd
         README: "Legacy hotplug slows down the system and confuses udev").
      
      Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
      Acked-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      ec13c82d
    • George G. Davis's avatar
      ARM64: trivial: s/TIF_SECOMP/TIF_SECCOMP/ comment typo fix · 2b55d83e
      George G. Davis authored
      
      Fix a s/TIF_SECOMP/TIF_SECCOMP/ comment typo
      
      Cc: Jiri Kosina <trivial@kernel.org>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarGeorge G. Davis <george_davis@mentor.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      2b55d83e
  3. Jun 05, 2019
Loading