1. 28 7月, 2018 1 次提交
    • R
      Revert "MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum" · d5ea019f
      Rafał Miłecki 提交于
      This reverts commit 2a027b47 ("MIPS: BCM47XX: Enable 74K Core
      ExternalSync for PCIe erratum").
      
      Enabling ExternalSync caused a regression for BCM4718A1 (used e.g. in
      Netgear E3000 and ASUS RT-N16): it simply hangs during PCIe
      initialization. It's likely that BCM4717A1 is also affected.
      
      I didn't notice that earlier as the only BCM47XX devices with PCIe I
      own are:
      1) BCM4706 with 2 x 14e4:4331
      2) BCM4706 with 14e4:4360 and 14e4:4331
      it appears that BCM4706 is unaffected.
      
      While BCM5300X-ES300-RDS.pdf seems to document that erratum and its
      workarounds (according to quotes provided by Tokunori) it seems not even
      Broadcom follows them.
      
      According to the provided info Broadcom should define CONF7_ES in their
      SDK's mipsinc.h and implement workaround in the si_mips_init(). Checking
      both didn't reveal such code. It *could* mean Broadcom also had some
      problems with the given workaround.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Reported-by: NMichael Marley <michael@michaelmarley.com>
      Patchwork: https://patchwork.linux-mips.org/patch/20032/
      URL: https://bugs.openwrt.org/index.php?do=details&task_id=1688
      Cc: Tokunori Ikegami <ikegami@allied-telesis.co.jp>
      Cc: Hauke Mehrtens <hauke@hauke-m.de>
      Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      d5ea019f
  2. 20 6月, 2018 1 次提交
    • H
      MIPS: io: Add barrier after register read in inX() · 18f3e95b
      Huacai Chen 提交于
      While a barrier is present in the outX() functions before the register
      write, a similar barrier is missing in the inX() functions after the
      register read. This could allow memory accesses following inX() to
      observe stale data.
      
      This patch is very similar to commit a1cc7034 ("MIPS: io: Add
      barrier after register read in readX()"). Because war_io_reorder_wmb()
      is both used by writeX() and outX(), if readX() need a barrier then so
      does inX().
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NHuacai Chen <chenhc@lemote.com>
      Patchwork: https://patchwork.linux-mips.org/patch/19516/Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Cc: James Hogan <james.hogan@mips.com>
      Cc: linux-mips@linux-mips.org
      Cc: Fuxin Zhang <zhangfx@lemote.com>
      Cc: Zhangjin Wu <wuzhangjin@gmail.com>
      Cc: Huacai Chen <chenhuacai@gmail.com>
      18f3e95b
  3. 19 6月, 2018 1 次提交
    • T
      MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum · 2a027b47
      Tokunori Ikegami 提交于
      The erratum and workaround are described by BCM5300X-ES300-RDS.pdf as
      below.
      
        R10: PCIe Transactions Periodically Fail
      
          Description: The BCM5300X PCIe does not maintain transaction ordering.
                       This may cause PCIe transaction failure.
          Fix Comment: Add a dummy PCIe configuration read after a PCIe
                       configuration write to ensure PCIe configuration access
                       ordering. Set ES bit of CP0 configu7 register to enable
                       sync function so that the sync instruction is functional.
          Resolution:  hndpci.c: extpci_write_config()
                       hndmips.c: si_mips_init()
                       mipsinc.h CONF7_ES
      
      This is fixed by the CFE MIPS bcmsi chipset driver also for BCM47XX.
      Also the dummy PCIe configuration read is already implemented in the
      Linux BCMA driver.
      
      Enable ExternalSync in Config7 when CONFIG_BCMA_DRIVER_PCI_HOSTMODE=y
      too so that the sync instruction is externalised.
      Signed-off-by: NTokunori Ikegami <ikegami@allied-telesis.co.jp>
      Reviewed-by: NPaul Burton <paul.burton@mips.com>
      Acked-by: NHauke Mehrtens <hauke@hauke-m.de>
      Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
      Cc: Rafał Miłecki <zajec5@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: stable@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/19461/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      2a027b47
  4. 15 5月, 2018 5 次提交
    • M
      MIPS: perf: More robustly probe for the presence of per-tc counters · 800fb712
      Matt Redfearn 提交于
      The presence of per TC performance counters is now detected by
      cpu-probe.c and indicated by MIPS_CPU_MT_PER_TC_PERF_COUNTERS in
      cpu_data. Switch detection of the feature to use this new flag rather
      than blindly testing the implementation specific config7 register with a
      magic number.
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Maciej W. Rozycki <macro@mips.com>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Robert Richter <rric@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: oprofile-list@lists.sf.net
      Patchwork: https://patchwork.linux-mips.org/patch/19142/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      800fb712
    • M
      MIPS: Probe for MIPS MT perf counters per TC · 8270ab48
      Matt Redfearn 提交于
      Processors implementing the MIPS MT ASE may have performance counters
      implemented per core or per TC. Processors implemented by MIPS
      Technologies signify presence per TC through a bit in the implementation
      specific Config7 register. Currently the code which probes for their
      presence blindly reads a magic number corresponding to this bit, despite
      it potentially having a different meaning in the CPU implementation.
      
      Since CPU features are generally detected by cpu-probe.c, perform the
      detection here instead. Introduce cpu_set_mt_per_tc_perf which checks
      the bit in config7 and call it from MIPS CPUs known to implement this
      bit and the MT ASE, specifically, the 34K, 1004K and interAptiv.
      
      Once the presence of the per-tc counter is indicated in cpu_data, tests
      for it can be updated to use this flag.
      Suggested-by: NJames Hogan <jhogan@kernel.org>
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Matt Redfearn <matt.redfearn@mips.com>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Maciej W. Rozycki <macro@mips.com>
      Cc: linux-mips@linux-mips.org>
      Patchwork: https://patchwork.linux-mips.org/patch/19136/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      8270ab48
    • P
      MIPS: JZ4740: dts: Add bindings for the jz4740-wdt driver · fbc23c71
      Paul Cercueil 提交于
      Also remove the watchdog platform_device from platform.c, since it
      wasn't used anywhere anyway.
      Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Malaterre <malat@debian.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-watchdog@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      [jhogan@kernel.org: Drop jz4740_wdt_device declaration from header]
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      fbc23c71
    • B
      MIPS: Convert update_persistent_clock() to update_persistent_clock64() · f06e7aa4
      Baolin Wang 提交于
      Since struct timespec is not y2038 safe on 32bit machines, this patch
      converts update_persistent_clock() to update_persistent_clock64() using
      struct timespec64.
      
      The rtc_mips_set_time() and rtc_mips_set_mmss() interfaces were using
      'unsigned long' type that is not y2038 safe on 32bit machines, moreover
      there is only one platform implementing rtc_mips_set_time() and two
      platforms implementing rtc_mips_set_mmss(), so we can just make them each
      implement update_persistent_clock64() directly, to get that helper out
      of the common mips code by removing rtc_mips_set_time() and
      rtc_mips_set_mmss() interfaces.
      Signed-off-by: NBaolin Wang <baolin.wang@linaro.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      f06e7aa4
    • B
      MIPS: Convert read_persistent_clock() to read_persistent_clock64() · 09adad17
      Baolin Wang 提交于
      Since struct timespec is not y2038 safe on 32bit machines, this patch
      converts read_persistent_clock() to read_persistent_clock64() using
      struct timespec64, as well as converting mktime() to mktime64().
      Signed-off-by: NBaolin Wang <baolin.wang@linaro.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      09adad17
  5. 07 5月, 2018 1 次提交
    • C
      PCI: remove PCI_DMA_BUS_IS_PHYS · 325ef185
      Christoph Hellwig 提交于
      This was used by the ide, scsi and networking code in the past to
      determine if they should bounce payloads.  Now that the dma mapping
      always have to support dma to all physical memory (thanks to swiotlb
      for non-iommu systems) there is no need to this crude hack any more.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Acked-by: Palmer Dabbelt <palmer@sifive.com> (for riscv)
      Reviewed-by: NJens Axboe <axboe@kernel.dk>
      325ef185
  6. 23 4月, 2018 1 次提交
    • R
      MIPS: BCM47XX: Add support for Netgear WNR1000 V3 · 425f1e62
      Rafał Miłecki 提交于
      This adds support for detecting this model board and registers some LEDs
      and buttons.
      
      There are two uncommon things regarding this device:
      1) It can use two different "board_id" ID values.
         Unit I have uses "U12H139T00_NETGEAR" value. This magic is also used
         in firmware file header. There are two reports (one from an OpenWrt
         user) of a different "U12H139T50_NETGEAR" magic though.
      2) Power LEDs share GPIOs with buttons.
         Amber one seems to share GPIO 2 with WPS button and green one seems
         to share GPIO 3 with reset button. It remains unknown how to support
         them and handle buttons at the same time. For that reason they aren't
         added to the list of supported LEDs.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Hauke Mehrtens <hauke@hauke-m.de>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/19004/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      425f1e62
  7. 20 4月, 2018 1 次提交
    • A
      y2038: mips: Extend sysvipc data structures · 3f3a4b3f
      Arnd Bergmann 提交于
      MIPS is the weirdest case for sysvipc, because each of the
      three data structures is done differently:
      
      * msqid64_ds has padding in the right place so we could in theory
        extend this one to just have 64-bit values instead of time_t.
        As this does not work for most of the other combinations,
        we just handle it in the common manner though.
      
      * semid64_ds has no padding for 64-bit time_t, but has two reserved
        'long' fields, which are sufficient to extend the sem_otime
        and sem_ctime fields to 64 bit. In order to do this, the libc
        implementation will have to copy the data into another structure
        that has the fields in a different order. MIPS is the only
        architecture with this problem, so this is best done in MIPS
        specific libc code.
      
      * shmid64_ds is slightly worse than that, because it has three
        time_t fields but only two unused 32-bit words. As a workaround,
        we extend each field only by 16 bits, ending up with 48-bit
        timestamps that user space again has to work around by itself.
      
      The compat versions of the data structures are changed in the
      same way.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      3f3a4b3f
  8. 19 4月, 2018 2 次提交
    • D
      compat: Move compat_timespec/ timeval to compat_time.h · 0d55303c
      Deepa Dinamani 提交于
      All the current architecture specific defines for these
      are the same. Refactor these common defines to a common
      header file.
      
      The new common linux/compat_time.h is also useful as it
      will eventually be used to hold all the defines that
      are needed for compat time types that support non y2038
      safe types. New architectures need not have to define these
      new types as they will only use new y2038 safe syscalls.
      This file can be deleted after y2038 when we stop supporting
      non y2038 safe syscalls.
      
      The patch also requires an operation similar to:
      
      git grep "asm/compat\.h" | cut -d ":" -f 1 |  xargs -n 1 sed -i -e "s%asm/compat.h%linux/compat.h%g"
      
      Cc: acme@kernel.org
      Cc: benh@kernel.crashing.org
      Cc: borntraeger@de.ibm.com
      Cc: catalin.marinas@arm.com
      Cc: cmetcalf@mellanox.com
      Cc: cohuck@redhat.com
      Cc: davem@davemloft.net
      Cc: deller@gmx.de
      Cc: devel@driverdev.osuosl.org
      Cc: gerald.schaefer@de.ibm.com
      Cc: gregkh@linuxfoundation.org
      Cc: heiko.carstens@de.ibm.com
      Cc: hoeppner@linux.vnet.ibm.com
      Cc: hpa@zytor.com
      Cc: jejb@parisc-linux.org
      Cc: jwi@linux.vnet.ibm.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Cc: linux-parisc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-s390@vger.kernel.org
      Cc: mark.rutland@arm.com
      Cc: mingo@redhat.com
      Cc: mpe@ellerman.id.au
      Cc: oberpar@linux.vnet.ibm.com
      Cc: oprofile-list@lists.sf.net
      Cc: paulus@samba.org
      Cc: peterz@infradead.org
      Cc: ralf@linux-mips.org
      Cc: rostedt@goodmis.org
      Cc: rric@kernel.org
      Cc: schwidefsky@de.ibm.com
      Cc: sebott@linux.vnet.ibm.com
      Cc: sparclinux@vger.kernel.org
      Cc: sth@linux.vnet.ibm.com
      Cc: ubraun@linux.vnet.ibm.com
      Cc: will.deacon@arm.com
      Cc: x86@kernel.org
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDeepa Dinamani <deepa.kernel@gmail.com>
      Acked-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: NJames Hogan <jhogan@kernel.org>
      Acked-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      0d55303c
    • M
      MIPS: uaccess: Add micromips clobbers to bzero invocation · b3d7e55c
      Matt Redfearn 提交于
      The micromips implementation of bzero additionally clobbers registers t7
      & t8. Specify this in the clobbers list when invoking bzero.
      
      Fixes: 26c5e07d ("MIPS: microMIPS: Optimise 'memset' core library function.")
      Reported-by: NJames Hogan <jhogan@kernel.org>
      Signed-off-by: NMatt Redfearn <matt.redfearn@mips.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: <stable@vger.kernel.org> # 3.10+
      Patchwork: https://patchwork.linux-mips.org/patch/19110/Signed-off-by: NJames Hogan <jhogan@kernel.org>
      b3d7e55c
  9. 14 4月, 2018 1 次提交
  10. 13 4月, 2018 1 次提交
  11. 20 3月, 2018 1 次提交
  12. 14 3月, 2018 1 次提交
  13. 09 3月, 2018 2 次提交
  14. 07 3月, 2018 1 次提交
  15. 20 2月, 2018 2 次提交
  16. 05 2月, 2018 1 次提交
  17. 01 2月, 2018 1 次提交
  18. 24 1月, 2018 2 次提交
  19. 23 1月, 2018 7 次提交
    • J
      MIPS: MSA: Update helpers to use new asm macros · 93738d48
      James Hogan 提交于
      Update MSA control register access helpers to use the new helpers for
      parsing register names and creating custom assembly macro instructions.
      
      This allows the move via $at to be dropped (saving a total of about 20
      bytes of kernel code).
      
      Note, this does not alter the equivalent code in .S files, which still
      uses the $at trick.
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17776/
      93738d48
    • J
      MIPS: XPA: Standardise readx/writex accessors · abbd52fd
      James Hogan 提交于
      Now that we are using assembler macros to implement XPA instructions on
      toolchains which don't support them, pass Cop0 register names to the
      __{readx,writex}_32bit_c0_register macros in $n format rather than
      register numbers. Also pass a register select which may be useful in
      future (for example for MemoryMapID field of WatchHi registers on
      I6500).
      
      This is to make them consistent with the normal Cop0 register access
      macros which they were originally based on.
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17777/
      abbd52fd
    • J
      MIPS: XPA: Allow use of $0 (zero) to MTHC0 · 3478ba99
      James Hogan 提交于
      Tweak __writex_32bit_c0_register() to allow the compiler to use $0 (the
      zero register) as an input to the mthc0 instruction.
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17774/
      3478ba99
    • J
      MIPS: XPA: Use XPA instructions in assembly · 8e4789d2
      James Hogan 提交于
      Utilise XPA instructions MFHC0 & MTHC0 in inline assembly instead of
      directly encoding them with the _ASM_INSN* macros, and transparently
      implement these instructions as assembler macros if the toolchain
      doesn't support them natively, using the recently introduced assembler
      macro helpers.
      
      The old direct encodings were restricted to using the register $at, so
      this allows the extra register moves to go away (saving a grand total of
      24 bytes).
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17775/
      8e4789d2
    • J
      MIPS: VZ: Pass GC0 register names in $n format · ed21e007
      James Hogan 提交于
      Now that we are using assembler macros to implement VZ instructions on
      toolchains which don't support them, pass VZ guest Cop0 register names
      to the __{read,write}_{32bit,ulong,64bit}_gc0_register macros in $n
      format rather than register numbers. This is to make them consistent
      with the normal root Cop0 register access macros which they were
      originally based on.
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17773/
      ed21e007
    • J
      MIPS: VZ: Update helpers to use new asm macros · 00b4eb40
      James Hogan 提交于
      Update VZ guest register & guest TLB access helpers to use the new
      assembly macros for parsing register names and creating custom assembly
      macro instructions, which has a number of advantages:
      
       - Better code can be generated on toolchains which don't support VZ,
         more closely matching those which do, since there is no need to
         bounce values via the $at register. Some differences still remain due
         to the inability to safely fill branch delay slots and R6 compact
         branch forbidden slots with explicitly encoded instructions,
         resulting in some extra NOPs added by the assembler.
      
       - Some code duplication between toolchains which do and don't support
         VZ instructions is removed, since the helpers are only implemented
         once. When the toolchain doesn't implement the instruction an
         assembly macro implements it instead.
      
       - Instruction encodings are kept together in the source.
      
      On a generic kernel with KVM VZ support enabled this change saves about
      2.5KiB of kernel code when TOOLCHAIN_SUPPORTS_VIRT=n, bringing it down
      to about 0.5KiB more than when TOOLCHAIN_SUPPORTS_VIRT=y on r6, and just
      68 bytes more on r2.
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17772/
      00b4eb40
    • J
      MIPS: Add helpers for assembler macro instructions · fc62f53b
      James Hogan 提交于
      Implement a parse_r assembler macro in asm/mipsregs.h to parse a
      register in $n form, and a few C macros for defining assembler macro
      instructions. These can be used to more transparently support older
      binutils versions which don't support for example the msa, virt, xpa, or
      crc instructions.
      
      In particular they overcome the difficulty of turning a register name in
      $n form into an instruction encoding suitable for giving to .word /
      .hword, which is particularly problematic when needed from inline
      assembly where the compiler is responsible for register allocation.
      Traditionally this had required the use of $at and an extra MOV
      instruction, but for CRC instructions with multiple GP register operands
      that approach becomes more difficult.
      
      Three assembler macro creation helpers are added:
      
       - _ASM_MACRO_0(OP, ENC)
         This is to define an assembler macro for an instruction which has no
         operands, for example the VZ TLBGR instruction.
      
       - _ASM_MACRO_2R(OP, R1, R2, ENC)
         This is to define an assembler macro for an instruction which has 2
         register operands, for example the CFCMSA instruction.
      
       - _ASM_MACRO_3R(OP, R1, R2, R3, ENC)
         This is to define an assembler macro for an instruction which has 3
         register operands, for example the crc32 instructions.
      
       - _ASM_MACRO_2R_1S(OP, R1, R2, SEL3, ENC)
         This is to define an assembler macro for a Cop0 move instruction,
         with 2 register operands and an optional register select operand
         which defaults to 0, for example the VZ MFGC0 instruction.
      Suggested-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NJames Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Marcin Nowakowski <marcin.nowakowski@mips.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/17770/
      fc62f53b
  20. 19 1月, 2018 1 次提交
  21. 16 1月, 2018 2 次提交
    • E
      signal: Unify and correct copy_siginfo_to_user32 · ea64d5ac
      Eric W. Biederman 提交于
      Among the existing architecture specific versions of
      copy_siginfo_to_user32 there are several different implementation
      problems.  Some architectures fail to handle all of the cases in in
      the siginfo union.  Some architectures perform a blind copy of the
      siginfo union when the si_code is negative.  A blind copy suggests the
      data is expected to be in 32bit siginfo format, which means that
      receiving such a signal via signalfd won't work, or that the data is
      in 64bit siginfo and the code is copying nonsense to userspace.
      
      Create a single instance of copy_siginfo_to_user32 that all of the
      architectures can share, and teach it to handle all of the cases in
      the siginfo union correctly, with the assumption that siginfo is
      stored internally to the kernel is 64bit siginfo format.
      
      A special case is made for x86 x32 format.  This is needed as presence
      of both x32 and ia32 on x86_64 results in two different 32bit signal
      formats.  By allowing this small special case there winds up being
      exactly one code base that needs to be maintained between all of the
      architectures.  Vastly increasing the testing base and the chances of
      finding bugs.
      
      As the x86 copy of copy_siginfo_to_user32 the call of the x86
      signal_compat_build_tests were moved into sigaction_compat_abi, so
      that they will keep running.
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      ea64d5ac
    • A
      signal: unify compat_siginfo_t · b713da69
      Al Viro 提交于
      --EWB Added #ifdef CONFIG_X86_X32_ABI to arch/x86/kernel/signal_compat.c
            Changed #ifdef CONFIG_X86_X32 to #ifdef CONFIG_X86_X32_ABI in
            linux/compat.h
      
            CONFIG_X86_X32 is set when the user requests X32 support.
      
            CONFIG_X86_X32_ABI is set when the user requests X32 support
            and the tool-chain has X32 allowing X32 support to be built.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      b713da69
  22. 15 1月, 2018 1 次提交
  23. 10 1月, 2018 3 次提交