1. 14 Feb, 2017 5 commits
    • Marcin Nowakowski's avatar
      Kbuild: Add cpp_its_S in ksym_dep_filter · 0d070d2b
      Marcin Nowakowski authored
      Add a new command cpp_its_S introduced in commit cf2a5e0b ("MIPS:
      Support generating Flattened Image Trees (.itb)") to ksym_dep_filter
      handler - otherwise a warning is produced during the build of MIPS
      platforms (when vmlinux.*.itb target is chosen).
      Signed-off-by: default avatarMarcin Nowakowski <marcin.nowakowski@imgtec.com>
      Cc: Michal Marek <mmarek@suse.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15278/Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      0d070d2b
    • Paul Gortmaker's avatar
      MIPS: Audit and remove any unnecessary uses of module.h · 26dd3e4f
      Paul Gortmaker authored
      Historically a lot of these existed because we did not have
      a distinction between what was modular code and what was providing
      support to modules via EXPORT_SYMBOL and friends.  That changed
      when we forked out support for the latter into the export.h file.
      
      This means we should be able to reduce the usage of module.h
      in code that is obj-y Makefile or bool Kconfig.  In the case of
      some code where it is modular, we can extend that to also include
      files that are building basic support functionality but not related
      to loading or registering the final module; such files also have
      no need whatsoever for module.h
      
      The advantage in removing such instances is that module.h itself
      sources about 15 other headers; adding significantly to what we feed
      cpp, and it can obscure what headers we are effectively using.
      
      Since module.h might have been the implicit source for init.h
      (for __init) and for export.h (for EXPORT_SYMBOL) we consider each
      instance for the presence of either and replace/add as needed.
      
      Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
      
      Build coverage of all the mips defconfigs revealed the module.h
      header was masking a couple of implicit include instances, so
      we add the appropriate headers there.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Cc: David Daney <david.daney@cavium.com>
      Cc: John Crispin <john@phrozen.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "Steven J. Hill" <steven.hill@cavium.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/15131/
      [james.hogan@imgtec.com: Preserve sort order where it already exists]
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      26dd3e4f
    • James Hogan's avatar
      MIPS: Unify perf counter register definitions · 2654294b
      James Hogan authored
      Unify definitions for MIPS performance counter register fields in
      mipsregs.h rather than duplicating them in perf_events and oprofile.
      This will allow future patches to use them to expose performance
      counters to KVM guests.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      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: Robert Richter <rric@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: oprofile-list@lists.sf.net
      Patchwork: https://patchwork.linux-mips.org/patch/15212/Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      2654294b
    • Joshua Kinard's avatar
      MIPS: Disable stack checks on MIPS kernels · 573deec0
      Joshua Kinard authored
      Disable stack checking on MIPS kernels.  Some distribution toolchains
      might pass the -fstack-check option to gcc.  This results in a
      store-doubleword instruction being emitted at the top of all
      functions that checks the available stack space.  E.g.,
      
        a80000000001d740 <per_cpu_init>:
        a80000000001d740:       ffa0bfc0        sd      zero,-16448(sp)
        a80000000001d744:       2405ffc9        li      a1,-55
        a80000000001d748:       67bdffc0        daddiu  sp,sp,-64
      
      Generally, this is undesirable, and especially on the SGI IP27
      platform, it will trigger a NULL pointer dereference in
      '_raw_spin_lock_irq' during early init.
      Signed-off-by: default avatarJoshua Kinard <kumba@gentoo.org>
      Suggested-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/15132/Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      573deec0
    • Steven J. Hill's avatar
      MIPS: OCTEON: Platform support for OCTEON III USB controller · 93e502b3
      Steven J. Hill authored
      Add all the necessary platform code to initialize the dwc3
      USB host controller. This code initializes the clocks and
      performs a reset on the USB core and PHYs. The driver code
      in 'drivers/usb/dwc3' is where the real driver lives.
      Signed-off-by: default avatarSteven J. Hill <steven.hill@cavium.com>
      Acked-by: default avatarDavid Daney <david.daney@cavium.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/15108/Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      93e502b3
  2. 13 Feb, 2017 7 commits
  3. 03 Feb, 2017 4 commits
    • James Hogan's avatar
      MIPS: Add return errors to protected cache ops · 7170bdc7
      James Hogan authored
      The protected cache ops contain no out of line fixup code to return an
      error code in the event of a fault, with the cache op being skipped in
      that case. For KVM however we'd like to detect this case as page
      faulting will be disabled so it could happen during normal operation if
      the GVA page tables were flushed, and need to be handled by the caller.
      
      Add the out-of-line fixup code to load the error value -EFAULT into the
      return variable, and adapt the protected cache line functions to pass
      the error back to the caller.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Radim Krčmář" <rkrcmar@redhat.com>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      7170bdc7
    • James Hogan's avatar
      MIPS: Export some tlbex internals for KVM to use · 722b4544
      James Hogan authored
      Export to TLB exception code generating functions so that KVM can
      construct a fast TLB refill handler for guest context without
      reinventing the wheel quite so much.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Radim Krčmář" <rkrcmar@redhat.com>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      722b4544
    • James Hogan's avatar
      MIPS: uasm: Add include guards in asm/uasm.h · 93a93c24
      James Hogan authored
      Add include guards in asm/uasm.h to allow it to be safely used by a new
      header asm/tlbex.h in the next patch to expose TLB exception building
      functions for KVM to use.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Radim Krčmář" <rkrcmar@redhat.com>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      93a93c24
    • James Hogan's avatar
      MIPS: Export pgd/pmd symbols for KVM · ccf01516
      James Hogan authored
      Export pmd_init(), invalid_pmd_table and tlbmiss_handler_setup_pgd to
      GPL kernel modules so that MIPS KVM can use the inline page table
      management functions and switch between page tables:
      
      - pmd_init() will be used directly by KVM to initialise newly allocated
        pmd tables with invalid lower level table pointers.
      
      - invalid_pmd_table is used by pud_present(), pud_none(), and
        pud_clear(), which KVM will use to test and clear pud entries.
      
      - tlbmiss_handler_setup_pgd() will be called by KVM entry code to switch
        to the appropriate GVA page tables.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Radim Krčmář" <rkrcmar@redhat.com>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      ccf01516
  4. 02 Feb, 2017 1 commit
    • James Hogan's avatar
      MIPS: Move pgd_alloc() out of header · 814f91bf
      James Hogan authored
      pgd_alloc() references init_mm which is not exported to modules. In
      order for KVM to be able to use pgd_alloc() to allocate GVA page tables,
      move pgd_alloc() into a new pgtable.c file and export it to modules.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Radim Krčmář" <rkrcmar@redhat.com>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      814f91bf
  5. 25 Jan, 2017 18 commits
  6. 24 Jan, 2017 5 commits
    • Arnd Bergmann's avatar
      MIPS: Fix modversions · b668970e
      Arnd Bergmann authored
      kernelci.org reports tons of build warnings for linux-next:
      
      35	WARNING: "memcpy" [fs/fat/msdos.ko] has no CRC!
      35	WARNING: "__copy_user" [fs/fat/fat.ko] has no CRC!
      32	WARNING: EXPORT symbol "memset" [vmlinux] version generation failed, symbol will not be versioned.
      32	WARNING: EXPORT symbol "copy_page" [vmlinux] version generation failed, symbol will not be versioned.
      32	WARNING: EXPORT symbol "clear_page" [vmlinux] version generation failed, symbol will not be versioned.
      32	WARNING: EXPORT symbol "__strncpy_from_user_nocheck_asm" [vmlinux] version generation failed, symbol will not be versioned.
      
      The problem here is mainly the missing asm/asm-prototypes.h header file
      that is supposed to include the prototypes for each symbol that is exported
      from an assembler file.
      
      A second problem is that the asm/uaccess.h header contains some but not
      all the necessary declarations for the user access helpers.
      
      Finally, the vdso build is broken once we add asm/asm-prototypes.h, so
      we have to fix this at the same time by changing the vdso header. My
      approach here is to just not look for exported symbols in the VDSO
      assembler files, as the symbols cannot be exported anyway.
      
      Fixes: 576a2f0c ("MIPS: Export memcpy & memset functions alongside their definitions")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15038/
      Patchwork: https://patchwork.linux-mips.org/patch/15069/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      b668970e
    • Arnd Bergmann's avatar
      MIPS: Update ip27_defconfig for SCSI_DH change · ea58fca1
      Arnd Bergmann authored
      Since linux-4.3, SCSI_DH is a bool symbol, causing a warning in
      kernelci.org:
      
      arch/mips/configs/ip27_defconfig:136:warning: symbol value 'm' invalid for SCSI_DH
      
      This updates the defconfig to have the feature built-in.
      
      Fixes: 086b91d0 ("scsi_dh: integrate into the core SCSI code")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15001/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      ea58fca1
    • Arnd Bergmann's avatar
      MIPS: Update lemote2f_defconfig for CPU_FREQ_STAT change · b3f60461
      Arnd Bergmann authored
      Since linux-4.8, CPU_FREQ_STAT is a bool symbol, causing a warning in
      kernelci.org:
      
      arch/mips/configs/lemote2f_defconfig:42:warning: symbol value 'm' invalid for CPU_FREQ_STAT
      
      This updates the defconfig to have the feature built-in.
      
      Fixes: 1aefc75b ("cpufreq: stats: Make the stats code non-modular")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15000/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      b3f60461
    • Arnd Bergmann's avatar
      MIPS: Update defconfigs for NF_CT_PROTO_DCCP/UDPLITE change · 9ddc16ad
      Arnd Bergmann authored
      In linux-4.10-rc, NF_CT_PROTO_UDPLITE and NF_CT_PROTO_DCCP are bool
      symbols instead of tristate, and kernelci.org reports a bunch of
      warnings for this, like:
      
      arch/mips/configs/malta_kvm_guest_defconfig:63:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE
      arch/mips/configs/malta_defconfig:62:warning: symbol value 'm' invalid for NF_CT_PROTO_DCCP
      arch/mips/configs/malta_defconfig:63:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE
      arch/mips/configs/ip22_defconfig:70:warning: symbol value 'm' invalid for NF_CT_PROTO_DCCP
      arch/mips/configs/ip22_defconfig:71:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE
      
      This changes all the MIPS defconfigs with these symbols to have them
      built-in.
      
      Fixes: 9b91c96c ("netfilter: conntrack: built-in support for UDPlite")
      Fixes: c51d3901 ("netfilter: conntrack: built-in support for DCCP")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14999/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      9ddc16ad
    • Jaedon Shin's avatar
      MIPS: BMIPS: Add support SPI device nodes · d783738c
      Jaedon Shin authored
      Adds SPI device nodes to BCM7xxx MIPS based SoCs.
      Signed-off-by: default avatarJaedon Shin <jaedon.shin@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Cc: Kevin Cernekee <cernekee@gmail.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14990/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      d783738c