1. 12 Dec, 2016 4 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/hotplug' into next · 4617aedb
      Bjorn Helgaas authored
      * pci/hotplug:
        PCI: pciehp: Leave power indicator on when enabling already-enabled slot
        PCI: pciehp: Prioritize data-link event over presence detect
        PCI: cpqphp: Add missing call to pci_disable_device()
      4617aedb
    • Bjorn Helgaas's avatar
      Merge branch 'pci/enumeration' into next · 2f0f3733
      Bjorn Helgaas authored
      * pci/enumeration:
        PCI: Warn on possible RW1C corruption for sub-32 bit config writes
        PCI: Create revision file in sysfs
      2f0f3733
    • Bjorn Helgaas's avatar
      Merge branch 'pci/ecam' into next · 5e0ad9f6
      Bjorn Helgaas authored
      * pci/ecam:
        PCI: Explain ARM64 ACPI/MCFG quirk Kconfig and build strategy
        PCI: Add MCFG quirks for X-Gene host controller
        PCI: Add MCFG quirks for Cavium ThunderX pass1.x host controller
        PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller
        PCI: thunder-pem: Factor out resource lookup
        PCI: Add MCFG quirks for HiSilicon Hip05/06/07 host controllers
        PCI: Add MCFG quirks for Qualcomm QDF2432 host controller
        PCI/ACPI: Provide acpi_get_rc_resources() for ARM64 platform
        PCI/ACPI: Check for platform-specific MCFG quirks
        PCI/ACPI: Extend pci_mcfg_lookup() to return ECAM config accessors
        arm64: PCI: Exclude ACPI "consumer" resources from host bridge windows
        arm64: PCI: Manage controller-specific data on per-controller basis
        arm64: PCI: Search ACPI namespace to ensure ECAM space is reserved
        arm64: PCI: Add local struct device pointers
        ACPI: Add acpi_resource_consumer() to find device that claims a resource
      5e0ad9f6
    • Bjorn Helgaas's avatar
      Merge branch 'pci/aspm' into next · a7d51491
      Bjorn Helgaas authored
      * pci/aspm:
        PCI/ASPM: Don't retrain link if ASPM not possible
        PCI/ASPM: Use permission-specific DEVICE_ATTR variants
      a7d51491
  2. 08 Dec, 2016 2 commits
  3. 07 Dec, 2016 2 commits
  4. 06 Dec, 2016 13 commits
    • Duc Dang's avatar
      PCI: Add MCFG quirks for X-Gene host controller · c5d46039
      Duc Dang authored
      PCIe controllers in X-Gene SoCs are not ECAM compliant: software needs to
      configure additional controller's register to address device at
      bus:dev:function.
      
      Add a quirk to discover controller MMIO register space and configure
      controller registers to select and address the target secondary device.
      
      The quirk will only be applied for X-Gene PCIe MCFG table with
      OEM revison 1, 2, 3 or 4 (PCIe controller v1 and v2 on X-Gene SoCs).
      Tested-by: default avatarJon Masters <jcm@redhat.com>
      Signed-off-by: default avatarDuc Dang <dhdang@apm.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      c5d46039
    • Tomasz Nowicki's avatar
      PCI: Add MCFG quirks for Cavium ThunderX pass1.x host controller · 648d93fc
      Tomasz Nowicki authored
      ThunderX pass1.x requires to emulate the EA headers for on-chip devices
      hence it has to use custom pci_thunder_ecam_ops for accessing PCI config
      space (pci-thunder-ecam.c). Add new entries to MCFG quirk array where it
      can be applied while probing ACPI based PCI host controller.
      
      ThunderX pass1.x is using the same way for accessing off-chip devices
      (so-called PEM) as silicon pass-2.x so we need to add PEM quirk entries
      too.
      
      Quirk is considered for ThunderX silicon pass1.x only which is identified
      via MCFG revision 2.
      
      ThunderX pass 1.x requires the following accessors:
      
        NUMA node 0 PCI segments  0- 3: pci_thunder_ecam_ops (MCFG quirk)
        NUMA node 0 PCI segments  4- 9: thunder_pem_ecam_ops (MCFG quirk)
        NUMA node 1 PCI segments 10-13: pci_thunder_ecam_ops (MCFG quirk)
        NUMA node 1 PCI segments 14-19: thunder_pem_ecam_ops (MCFG quirk)
      
      [bhelgaas: change Makefile/ifdefs so quirk doesn't depend on
      CONFIG_PCI_HOST_THUNDER_ECAM]
      Signed-off-by: default avatarTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      648d93fc
    • Tomasz Nowicki's avatar
      PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller · 44f22bd9
      Tomasz Nowicki authored
      ThunderX PCIe controller to off-chip devices (so-called PEM) is not fully
      compliant with ECAM standard. It uses non-standard configuration space
      accessors (see thunder_pem_ecam_ops) and custom configuration space
      granulation (see bus_shift = 24). In order to access configuration space
      and probe PEM as ACPI-based PCI host controller we need to add MCFG quirk
      infrastructure. This involves:
      1. A new thunder_pem_acpi_init() init function to locate PEM-specific
         register ranges using ACPI.
      2. Export PEM thunder_pem_ecam_ops structure so it is visible to MCFG quirk
         code.
      3. New quirk entries for each PEM segment. Each contains platform IDs,
         mentioned thunder_pem_ecam_ops and CFG resources.
      
      Quirk is considered for ThunderX silicon pass2.x only which is identified
      via MCFG revision 1.
      
      ThunderX pass 2.x requires the following accessors:
      
        NUMA Node 0 PCI segments  0- 3: pci_generic_ecam_ops (ECAM-compliant)
        NUMA Node 0 PCI segments  4- 9: thunder_pem_ecam_ops (MCFG quirk)
        NUMA Node 1 PCI segments 10-13: pci_generic_ecam_ops (ECAM-compliant)
        NUMA Node 1 PCI segments 14-19: thunder_pem_ecam_ops (MCFG quirk)
      
      [bhelgaas: adapt to use acpi_get_rc_resources(), update Makefile/ifdefs so
      quirk doesn't depend on CONFIG_PCI_HOST_THUNDER_PEM]
      Signed-off-by: default avatarTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      44f22bd9
    • Bjorn Helgaas's avatar
      PCI: thunder-pem: Factor out resource lookup · 0d414268
      Bjorn Helgaas authored
      Pull the register resource lookup out of thunder_pem_init() so we can
      easily add a corresponding lookup using ACPI.  No functional change
      intended.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      0d414268
    • Dongdong Liu's avatar
      PCI: Add MCFG quirks for HiSilicon Hip05/06/07 host controllers · 5f00f1a0
      Dongdong Liu authored
      The PCIe controller in Hip05/Hip06/Hip07 SoCs is not completely
      ECAM-compliant.  It is non-ECAM only for the RC bus config space; for any
      other bus underneath the root bus it does support ECAM access.
      
      Add specific quirks for PCI config space accessors.  This involves:
      1. New initialization call hisi_pcie_init() to obtain RC base
      addresses from PNP0C02 at the root of the ACPI namespace (under \_SB).
      2. New entry in common quirk array.
      
      [bhelgaas: move to pcie-hisi.c and change Makefile/ifdefs so quirk doesn't
      depend on CONFIG_PCI_HISI]
      Signed-off-by: default avatarDongdong Liu <liudongdong3@huawei.com>
      Signed-off-by: default avatarGabriele Paoloni <gabriele.paoloni@huawei.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      5f00f1a0
    • Christopher Covington's avatar
      PCI: Add MCFG quirks for Qualcomm QDF2432 host controller · 2ca5b8dd
      Christopher Covington authored
      The Qualcomm Technologies QDF2432 SoC does not support accesses smaller
      than 32 bits to the PCI configuration space.  Register the appropriate
      quirk.
      
      [bhelgaas: add QCOM_ECAM32 macro, ifdef for ACPI and PCI_QUIRKS]
      Signed-off-by: default avatarChristopher Covington <cov@codeaurora.org>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      2ca5b8dd
    • Dongdong Liu's avatar
      PCI/ACPI: Provide acpi_get_rc_resources() for ARM64 platform · 169de969
      Dongdong Liu authored
      The acpi_get_rc_resources() is used to get the RC register address that can
      not be described in MCFG.  It takes the _HID & segment to look for and
      outputs the RC address resource.  Use PNP0C02 devices to describe such RC
      address resource.  Use _UID to match segment to tell which root bus the
      PNP0C02 resource belongs to.
      
      [bhelgaas: add dev argument, wrap in #ifdef CONFIG_PCI_QUIRKS]
      Signed-off-by: default avatarDongdong Liu <liudongdong3@huawei.com>
      Signed-off-by: default avatarTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      169de969
    • Tomasz Nowicki's avatar
      PCI/ACPI: Check for platform-specific MCFG quirks · 5b69b85b
      Tomasz Nowicki authored
      The PCIe spec (r3.0, sec 7.2.2) specifies an "Enhanced Configuration Access
      Mechanism" (ECAM) for memory-mapped access to configuration space.  ECAM is
      required for PCIe systems unless there's a standard firmware interface for
      config access.
      
      In the absence of a firmware interface, we use pci_generic_ecam_ops, and on
      ACPI systems, we discover the ECAM space via the MCFG table and/or the _CBA
      method.
      
      Unfortunately some systems provide MCFG but don't implement ECAM according
      to spec, so we need a mechanism for quirks to make those systems work.
      
      Add an MCFG quirk mechanism to override the config accessor functions
      and/or the memory-mapped address space.
      
      A quirk is selected if it matches all of the following:
      
        - OEM ID
        - OEM Table ID
        - OEM Revision
        - PCI segment (from _SEG)
        - PCI bus number range (from _CRS, wildcard allowed)
      
      If the quirk specifies config accessor functions or a memory-mapped address
      range, these override the defaults.
      
      [bhelgaas: changelog, reorder quirk matching, fix oem_revision typo per
      Duc, add under #ifdef CONFIG_PCI_QUIRKS]
      Signed-off-by: default avatarTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: default avatarDongdong Liu <liudongdong3@huawei.com>
      Signed-off-by: default avatarChristopher Covington <cov@codeaurora.org>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      5b69b85b
    • Tomasz Nowicki's avatar
      PCI/ACPI: Extend pci_mcfg_lookup() to return ECAM config accessors · 13983eb8
      Tomasz Nowicki authored
      pci_mcfg_lookup() is the external interface to the generic MCFG code.
      Previously it merely looked up the ECAM base address for a given domain and
      bus range.  We want a way to add MCFG quirks, some of which may require
      special config accessors and adjustments to the ECAM address range.
      
      Extend pci_mcfg_lookup() so it can return a pointer to a pci_ecam_ops
      structure and a struct resource for the ECAM address space.  For now, it
      always returns &pci_generic_ecam_ops (the standard accessor) and the
      resource described by the MCFG.
      
      No functional changes intended.
      
      [bhelgaas: changelog]
      Signed-off-by: default avatarTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      13983eb8
    • Bjorn Helgaas's avatar
      arm64: PCI: Exclude ACPI "consumer" resources from host bridge windows · 8fd4391e
      Bjorn Helgaas authored
      On x86 and ia64, we have treated all ACPI _CRS resources of PNP0A03 host
      bridge devices as "producers", i.e., as host bridge windows.  That's partly
      because some x86 BIOSes improperly used "consumer" descriptors to describe
      windows and partly because Linux didn't have good support for handling
      consumer and producer descriptors differently.
      
      One result is that x86 BIOSes describe host bridge "consumer" resources in
      the _CRS of a PNP0C02 device, not the PNP0A03 device itself.  On arm64 we
      don't have a legacy of firmware that has this consumer/producer confusion,
      so we can handle PNP0A03 "consumer" descriptors as host bridge registers
      instead of windows.
      
      Exclude non-window ("consumer") resources from the list of host bridge
      windows.  This allows the use of "consumer" PNP0A03 descriptors for bridge
      register space.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      8fd4391e
    • Tomasz Nowicki's avatar
      arm64: PCI: Manage controller-specific data on per-controller basis · 093d24a2
      Tomasz Nowicki authored
      Currently we use one shared global acpi_pci_root_ops structure to keep
      controller-specific ops. We pass its pointer to acpi_pci_root_create() and
      associate it with a host bridge instance for good.  Such a design implies
      serious drawback. Any potential manipulation on the single system-wide
      acpi_pci_root_ops leads to kernel crash. The structure content is not
      really changing even across multiple host bridges creation; thus it was not
      an issue so far.
      
      In preparation for adding ECAM quirks mechanism (where controller-specific
      PCI ops may be different for each host bridge) allocate new
      acpi_pci_root_ops and fill in with data for each bridge. Now it is safe to
      have different controller-specific info. As a consequence free
      acpi_pci_root_ops when host bridge is released.
      
      No functional changes in this patch.
      Signed-off-by: default avatarTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      093d24a2
    • Bjorn Helgaas's avatar
      arm64: PCI: Search ACPI namespace to ensure ECAM space is reserved · 08b1c196
      Bjorn Helgaas authored
      The static MCFG table tells us the base of ECAM space, but it does not
      reserve the space -- the reservation should be done via a device in the
      ACPI namespace whose _CRS includes the ECAM region.
      
      Use acpi_resource_consumer() to check whether the ECAM space is reserved by
      an ACPI namespace device.  If it is, emit a message showing which device
      reserves it.  If not, emit a "[Firmware Bug]" warning.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      08b1c196
    • Bjorn Helgaas's avatar
      arm64: PCI: Add local struct device pointers · dfd1972c
      Bjorn Helgaas authored
      Use a local "struct device *dev" for brevity.  No functional change
      intended.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      dfd1972c
  5. 01 Dec, 2016 1 commit
  6. 23 Nov, 2016 1 commit
  7. 21 Nov, 2016 2 commits
  8. 14 Nov, 2016 1 commit
    • Julia Lawall's avatar
      PCI/ASPM: Use permission-specific DEVICE_ATTR variants · fc4f57fa
      Julia Lawall authored
      Use DEVICE_ATTR_RW for read-write attributes.  This simplifies the source
      code, improves readability, and reduces the chance of inconsistencies.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @rw@
      declarer name DEVICE_ATTR;
      identifier x,x_show,x_store;
      @@
      
      DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store);
      
      @script:ocaml@
      x << rw.x;
      x_show << rw.x_show;
      x_store << rw.x_store;
      @@
      
      if not (x^"_show" = x_show && x^"_store" = x_store)
      then Coccilib.include_match false
      
      @@
      declarer name DEVICE_ATTR_RW;
      identifier rw.x,rw.x_show,rw.x_store;
      @@
      
      - DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store);
      + DEVICE_ATTR_RW(x);
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      fc4f57fa
  9. 15 Oct, 2016 14 commits
    • Linus Torvalds's avatar
      Linux 4.9-rc1 · 1001354c
      Linus Torvalds authored
      1001354c
    • Linus Torvalds's avatar
      Merge tag 'befs-v4.9-rc1' of git://github.com/luisbg/linux-befs · df34d04a
      Linus Torvalds authored
      Pull befs fixes from Luis de Bethencourt:
       "I recently took maintainership of the befs file system [0]. This is
        the first time I send you a git pull request, so please let me know if
        all the below is OK.
      
        Salah Triki and myself have been cleaning the code and fixing a few
        small bugs.
      
        Sorry I couldn't send this sooner in the merge window, I was waiting
        to have my GPG key signed by kernel members at ELCE in Berlin a few
        days ago."
      
      [0] https://lkml.org/lkml/2016/7/27/502
      
      * tag 'befs-v4.9-rc1' of git://github.com/luisbg/linux-befs: (39 commits)
        befs: befs: fix style issues in datastream.c
        befs: improve documentation in datastream.c
        befs: fix typos in datastream.c
        befs: fix typos in btree.c
        befs: fix style issues in super.c
        befs: fix comment style
        befs: add check for ag_shift in superblock
        befs: dump inode_size superblock information
        befs: remove unnecessary initialization
        befs: fix typo in befs_sb_info
        befs: add flags field to validate superblock state
        befs: fix typo in befs_find_key
        befs: remove unused BEFS_BT_PARMATCH
        fs: befs: remove ret variable
        fs: befs: remove in vain variable assignment
        fs: befs: remove unnecessary *befs_sb variable
        fs: befs: remove useless initialization to zero
        fs: befs: remove in vain variable assignment
        fs: befs: Insert NULL inode to dentry
        fs: befs: Remove useless calls to brelse in befs_find_brun_dblindirect
        ...
      df34d04a
    • Linus Torvalds's avatar
      Merge tag 'gcc-plugins-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 9ffc6694
      Linus Torvalds authored
      Pull gcc plugins update from Kees Cook:
       "This adds a new gcc plugin named "latent_entropy". It is designed to
        extract as much possible uncertainty from a running system at boot
        time as possible, hoping to capitalize on any possible variation in
        CPU operation (due to runtime data differences, hardware differences,
        SMP ordering, thermal timing variation, cache behavior, etc).
      
        At the very least, this plugin is a much more comprehensive example
        for how to manipulate kernel code using the gcc plugin internals"
      
      * tag 'gcc-plugins-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        latent_entropy: Mark functions with __latent_entropy
        gcc-plugins: Add latent_entropy plugin
      9ffc6694
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 133d970e
      Linus Torvalds authored
      Pull MIPS updates from Ralf Baechle:
       "This is the main MIPS pull request for 4.9:
      
        MIPS core arch code:
         - traps: 64bit kernels should read CP0_EBase 64bit
         - traps: Convert ebase to KSEG0
         - c-r4k: Drop bc_wback_inv() from icache flush
         - c-r4k: Split user/kernel flush_icache_range()
         - cacheflush: Use __flush_icache_user_range()
         - uprobes: Flush icache via kernel address
         - KVM: Use __local_flush_icache_user_range()
         - c-r4k: Fix flush_icache_range() for EVA
         - Fix -mabi=64 build of vdso.lds
         - VDSO: Drop duplicated -I*/-E* aflags
         - tracing: move insn_has_delay_slot to a shared header
         - tracing: disable uprobe/kprobe on compact branch instructions
         - ptrace: Fix regs_return_value for kernel context
         - Squash lines for simple wrapper functions
         - Move identification of VP(E) into proc.c from smp-mt.c
         - Add definitions of SYNC barrierstype values
         - traps: Ensure full EBase is written
         - tlb-r4k: If there are wired entries, don't use TLBINVF
         - Sanitise coherentio semantics
         - dma-default: Don't check hw_coherentio if device is non-coherent
         - Support per-device DMA coherence
         - Adjust MIPS64 CAC_BASE to reflect Config.K0
         - Support generating Flattened Image Trees (.itb)
         - generic: Introduce generic DT-based board support
         - generic: Convert SEAD-3 to a generic board
         - Enable hardened usercopy
         - Don't specify STACKPROTECTOR in defconfigs
      
        Octeon:
         - Delete dead code and files across the platform.
         - Change to use all memory into use by default.
         - Rename upper case variables in setup code to lowercase.
         - Delete legacy hack for broken bootloaders.
         - Leave maintaining the link state to the actual ethernet/PHY drivers.
         - Add DTS for D-Link DSR-500N.
         - Fix PCI interrupt routing on D-Link DSR-500N.
      
        Pistachio:
         - Remove ANDROID_TIMED_OUTPUT from defconfig
      
        TX39xx:
         - Move GPIO setup from .mem_setup() to .arch_init()
         - Convert to Common Clock Framework
      
        TX49xx:
         - Move GPIO setup from .mem_setup() to .arch_init()
         - Convert to Common Clock Framework
      
        txx9wdt:
         - Add missing clock (un)prepare calls for CCF
      
        BMIPS:
         - Add PW, GPIO SDHCI and NAND device node names
         - Support APPENDED_DTB
         - Add missing bcm97435svmb to DT_NONE
         - Rename bcm96358nb4ser to bcm6358-neufbox4-sercom
         - Add DT examples for BCM63268, BCM3368 and BCM6362
         - Add support for BCM3368 and BCM6362
      
        PCI
         - Reduce stack frame usage
         - Use struct list_head lists
         - Support for CONFIG_PCI_DOMAINS_GENERIC
         - Make pcibios_set_cache_line_size an initcall
         - Inline pcibios_assign_all_busses
         - Split pci.c into pci.c & pci-legacy.c
         - Introduce CONFIG_PCI_DRIVERS_LEGACY
         - Support generic drivers
      
        CPC
         - Convert bare 'unsigned' to 'unsigned int'
         - Avoid lock when MIPS CM >= 3 is present
      
        GIC:
         - Delete unused file smp-gic.c
      
        mt7620:
         - Delete unnecessary assignment for the field "owner" from PCI
      
        BCM63xx:
         - Let clk_disable() return immediately if clk is NULL
      
        pm-cps:
         - Change FSB workaround to CPU blacklist
         - Update comments on barrier instructions
         - Use MIPS standard lightweight ordering barrier
         - Use MIPS standard completion barrier
         - Remove selection of sync types
         - Add MIPSr6 CPU support
         - Support CM3 changes to Coherence Enable Register
      
        SMP:
         - Wrap call to mips_cpc_lock_other in mips_cm_lock_other
         - Introduce mechanism for freeing and allocating IPIs
      
        cpuidle:
         - cpuidle-cps: Enable use with MIPSr6 CPUs.
      
        SEAD3:
         - Rewrite to use DT and generic kernel feature.
      
        USB:
         - host: ehci-sead3: Remove SEAD-3 EHCI code
      
        FBDEV:
         - cobalt_lcdfb: Drop SEAD3 support
      
        dt-bindings:
         -  Document a binding for simple ASCII LCDs
      
        auxdisplay:
         - img-ascii-lcd: driver for simple ASCII LCD displays
      
        irqchip i8259:
         - i8259: Add domain before mapping parent irq
         - i8259: Allow platforms to override poll function
         - i8259: Remove unused i8259A_irq_pending
      
        Malta:
         - Rewrite to use DT
      
        of/platform:
         - Probe "isa" busses by default
      
        CM:
         - Print CM error reports upon bus errors
      
        Module:
         - Migrate exception table users off module.h and onto extable.h
         - Make various drivers explicitly non-modular:
         - Audit and remove any unnecessary uses of module.h
      
        mailmap:
         - Canonicalize to Qais' current email address.
      
        Documentation:
         - MIPS supports HAVE_REGS_AND_STACK_ACCESS_API
      
        Loongson1C:
         - Add CPU support for Loongson1C
         - Add board support
         - Add defconfig
         - Add RTC support for Loongson1C board
      
        All this except one Documentation fix has sat in linux-next and has
        survived Imagination's automated build test system"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (127 commits)
        Documentation: MIPS supports HAVE_REGS_AND_STACK_ACCESS_API
        MIPS: ptrace: Fix regs_return_value for kernel context
        MIPS: VDSO: Drop duplicated -I*/-E* aflags
        MIPS: Fix -mabi=64 build of vdso.lds
        MIPS: Enable hardened usercopy
        MIPS: generic: Convert SEAD-3 to a generic board
        MIPS: generic: Introduce generic DT-based board support
        MIPS: Support generating Flattened Image Trees (.itb)
        MIPS: Adjust MIPS64 CAC_BASE to reflect Config.K0
        MIPS: Print CM error reports upon bus errors
        MIPS: Support per-device DMA coherence
        MIPS: dma-default: Don't check hw_coherentio if device is non-coherent
        MIPS: Sanitise coherentio semantics
        MIPS: PCI: Support generic drivers
        MIPS: PCI: Introduce CONFIG_PCI_DRIVERS_LEGACY
        MIPS: PCI: Split pci.c into pci.c & pci-legacy.c
        MIPS: PCI: Inline pcibios_assign_all_busses
        MIPS: PCI: Make pcibios_set_cache_line_size an initcall
        MIPS: PCI: Support for CONFIG_PCI_DOMAINS_GENERIC
        MIPS: PCI: Use struct list_head lists
        ...
      133d970e
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 050aaeab
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Just a few trivial small fixes"
      
      * tag 'sound-fix-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: line6: fix a crash in line6_hwdep_write()
        ALSA: seq: fix passing wrong pointer in function call of compatibility layer
        ALSA: hda - Fix a failure of micmute led when having multi adcs
        ALSA: line6: Fix POD X3 Live audio input
      050aaeab
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · b26b5ef5
      Linus Torvalds authored
      Pull more misc uaccess and vfs updates from Al Viro:
       "The rest of the stuff from -next (more uaccess work) + assorted fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        score: traps: Add missing include file to fix build error
        fs/super.c: don't fool lockdep in freeze_super() and thaw_super() paths
        fs/super.c: fix race between freeze_super() and thaw_super()
        overlayfs: Fix setting IOP_XATTR flag
        iov_iter: kernel-doc import_iovec() and rw_copy_check_uvector()
        blackfin: no access_ok() for __copy_{to,from}_user()
        arm64: don't zero in __copy_from_user{,_inatomic}
        arm: don't zero in __copy_from_user_inatomic()/__copy_from_user()
        arc: don't leak bits of kernel stack into coredump
        alpha: get rid of tail-zeroing in __copy_user()
      b26b5ef5
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · 87dbe42a
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Including:
      
         - nine bug fixes for stable. Some of these we found at the recent two
           weeks of SMB3 test events/plugfests.
      
         - significant improvements in reconnection (e.g. if server or network
           crashes) especially when mounted with "persistenthandles" or to
           server which advertises Continuous Availability on the share.
      
         - a new mount option "idsfromsid" which improves POSIX compatibility
           in some cases (when winbind not configured e.g.) by better (and
           faster) fetching uid/gid from acl (when "cifsacl" mount option is
           enabled). NB: we are almost complete work on "cifsacl" (querying
           mode/uid/gid from ACL) for SMB3, but SMB3 support for cifsacl is
           not included in this set.
      
         - improved handling for SMB3 "credits" (even if server is buggy)
      
        Still working on two sets of changes:
      
         - cifsacl enablement for SMB3
      
         - cleanup of RFC1001 length calculation (so we can handle encryption
           and multichannel and RDMA)
      
        And a couple of new bugs were reported recently (unrelated to above)
        so will probably have another merge request next week"
      
      * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: (21 commits)
        CIFS: Retrieve uid and gid from special sid if enabled
        CIFS: Add new mount option to set owner uid and gid from special sids in acl
        CIFS: Reset read oplock to NONE if we have mandatory locks after reopen
        CIFS: Fix persistent handles re-opening on reconnect
        SMB2: Separate RawNTLMSSP authentication from SMB2_sess_setup
        SMB2: Separate Kerberos authentication from SMB2_sess_setup
        Expose cifs module parameters in sysfs
        Cleanup missing frees on some ioctls
        Enable previous version support
        Do not send SMB3 SET_INFO request if nothing is changing
        SMB3: Add mount parameter to allow user to override max credits
        fs/cifs: reopen persistent handles on reconnect
        Clarify locking of cifs file and tcon structures and make more granular
        Fix regression which breaks DFS mounting
        fs/cifs: keep guid when assigning fid to fileinfo
        SMB3: GUIDs should be constructed as random but valid uuids
        Set previous session id correctly on SMB3 reconnect
        cifs: Limit the overall credit acquired
        Display number of credits available
        Add way to query creation time of file via cifs xattr
        ...
      87dbe42a
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · d3304cad
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "Some fixes from Omar and Dave Sterba for our new free space tree.
      
        This isn't heavily used yet, but as we move toward making it the new
        default we wanted to nail down an endian bug"
      
      * 'for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        btrfs: tests: uninline member definitions in free_space_extent
        btrfs: tests: constify free space extent specs
        Btrfs: expand free space tree sanity tests to catch endianness bug
        Btrfs: fix extent buffer bitmap tests on big-endian systems
        Btrfs: catch invalid free space trees
        Btrfs: fix mount -o clear_cache,space_cache=v2
        Btrfs: fix free space tree bitmaps on big-endian systems
      d3304cad
    • Al Viro's avatar
      Merge branch 'work.uaccess' into for-linus · 2692a71b
      Al Viro authored
      2692a71b
    • Guenter Roeck's avatar
      score: traps: Add missing include file to fix build error · 7041c577
      Guenter Roeck authored
      score images fail to build as follows.
      
      arch/score/kernel/traps.c: In function 'show_stack':
      arch/score/kernel/traps.c:55:3: error:
      	implicit declaration of function '__get_user'
      
      __get_user() is declared in asm/uaccess.h, which was previously included
      through asm/module.h.
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Fixes: 88dd4a74 ("score: separate extable.h, switch module.h to it")
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      7041c577
    • Oleg Nesterov's avatar
      fs/super.c: don't fool lockdep in freeze_super() and thaw_super() paths · f1a96220
      Oleg Nesterov authored
      sb_wait_write()->percpu_rwsem_release() fools lockdep to avoid the
      false-positives. Now that xfs was fixed by Dave's commit dbad7c99
      ("xfs: stop holding ILOCK over filldir callbacks") we can remove it and
      change freeze_super() and thaw_super() to run with s_writers.rw_sem locks
      held; we add two trivial helpers for that, lockdep_sb_freeze_release()
      and lockdep_sb_freeze_acquire().
      
      xfstests-dev/check `grep -il freeze tests/*/???` does not trigger any
      warning from lockdep.
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      f1a96220
    • Linus Torvalds's avatar
      Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · 1a892b48
      Linus Torvalds authored
      Pull overlayfs updates from Miklos Szeredi:
       "This update contains fixes to the "use mounter's permission to access
        underlying layers" area, and miscellaneous other fixes and cleanups.
      
        No new features this time"
      
      * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
        ovl: use vfs_get_link()
        vfs: add vfs_get_link() helper
        ovl: use generic_readlink
        ovl: explain error values when removing acl from workdir
        ovl: Fix info leak in ovl_lookup_temp()
        ovl: during copy up, switch to mounter's creds early
        ovl: lookup: do getxattr with mounter's permission
        ovl: copy_up_xattr(): use strnlen
      1a892b48
    • Oleg Nesterov's avatar
      fs/super.c: fix race between freeze_super() and thaw_super() · 89f39af1
      Oleg Nesterov authored
      Change thaw_super() to check frozen != SB_FREEZE_COMPLETE rather than
      frozen == SB_UNFROZEN, otherwise it can race with freeze_super() which
      drops sb->s_umount after SB_FREEZE_WRITE to preserve the lock ordering.
      
      In this case thaw_super() will wrongly call s_op->unfreeze_fs() before
      it was actually frozen, and call sb_freeze_unlock() which leads to the
      unbalanced percpu_up_write(). Unfortunately lockdep can't detect this,
      so this triggers misc BUG_ON()'s in kernel/rcu/sync.c.
      Reported-and-tested-by: default avatarNikolay Borisov <kernel@kyup.com>
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      89f39af1
    • Vivek Goyal's avatar
      overlayfs: Fix setting IOP_XATTR flag · 655042cc
      Vivek Goyal authored
      ovl_fill_super calls ovl_new_inode to create a root inode for the new
      superblock before initializing sb->s_xattr.  This wrongly causes
      IOP_XATTR to be cleared in i_opflags of the new inode, causing SELinux
      to log the following message:
      
        SELinux: (dev overlay, type overlay) has no xattr support
      
      Fix this by initializing sb->s_xattr and similar fields before calling
      ovl_new_inode.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      655042cc