12 Oct, 2016

1 commit

  • Currently, all callers to randomize_range() set the length to 0 and
    calculate end by adding a constant to the start address. We can simplify
    the API to remove a bunch of needless checks and variables.

    Use the new randomize_addr(start, range) call to set the requested
    address.

    Link: http://lkml.kernel.org/r/20160803233913.32511-7-jason@lakedaemon.net
    Signed-off-by: Jason Cooper
    Acked-by: Kees Cook
    Cc: "Theodore Ts'o"
    Cc: Guan Xuetao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Cooper
     

08 Oct, 2016

1 commit

  • When doing an nmi backtrace of many cores, most of which are idle, the
    output is a little overwhelming and very uninformative. Suppress
    messages for cpus that are idling when they are interrupted and just
    emit one line, "NMI backtrace for N skipped: idling at pc 0xNNN".

    We do this by grouping all the cpuidle code together into a new
    .cpuidle.text section, and then checking the address of the interrupted
    PC to see if it lies within that section.

    This commit suitably tags x86 and tile idle routines, and only adds in
    the minimal framework for other architectures.

    Link: http://lkml.kernel.org/r/1472487169-14923-5-git-send-email-cmetcalf@mellanox.com
    Signed-off-by: Chris Metcalf
    Acked-by: Peter Zijlstra (Intel)
    Tested-by: Peter Zijlstra (Intel)
    Tested-by: Daniel Thompson [arm]
    Tested-by: Petr Mladek
    Cc: Aaron Tomlin
    Cc: Peter Zijlstra (Intel)
    Cc: "Rafael J. Wysocki"
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     

13 Aug, 2016

1 commit

  • unicore32 fails to compile with the following errors.

    mm/memory.c: In function ‘__handle_mm_fault’:
    mm/memory.c:3381: error:
    too many arguments to function ‘arch_vma_access_permitted’
    mm/gup.c: In function ‘check_vma_flags’:
    mm/gup.c:456: error:
    too many arguments to function ‘arch_vma_access_permitted’
    mm/gup.c: In function ‘vma_permits_fault’:
    mm/gup.c:640: error:
    too many arguments to function ‘arch_vma_access_permitted’

    Fixes: d61172b4b695b ("mm/core, x86/mm/pkeys: Differentiate instruction fetches")
    Cc: Dave Hansen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Guenter Roeck
    Acked-by: Guan Xuetao

    Guenter Roeck
     

04 Aug, 2016

1 commit

  • The dma-mapping core and the implementations do not change the DMA
    attributes passed by pointer. Thus the pointer can point to const data.
    However the attributes do not have to be a bitfield. Instead unsigned
    long will do fine:

    1. This is just simpler. Both in terms of reading the code and setting
    attributes. Instead of initializing local attributes on the stack
    and passing pointer to it to dma_set_attr(), just set the bits.

    2. It brings safeness and checking for const correctness because the
    attributes are passed by value.

    Semantic patches for this change (at least most of them):

    virtual patch
    virtual context

    @r@
    identifier f, attrs;

    @@
    f(...,
    - struct dma_attrs *attrs
    + unsigned long attrs
    , ...)
    {
    ...
    }

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
    )

    and

    // Options: --all-includes
    virtual patch
    virtual context

    @r@
    identifier f, attrs;
    type t;

    @@
    t f(..., struct dma_attrs *attrs);

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
    )

    Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.com
    Signed-off-by: Krzysztof Kozlowski
    Acked-by: Vineet Gupta
    Acked-by: Robin Murphy
    Acked-by: Hans-Christian Noren Egtvedt
    Acked-by: Mark Salter [c6x]
    Acked-by: Jesper Nilsson [cris]
    Acked-by: Daniel Vetter [drm]
    Reviewed-by: Bart Van Assche
    Acked-by: Joerg Roedel [iommu]
    Acked-by: Fabien Dessenne [bdisp]
    Reviewed-by: Marek Szyprowski [vb2-core]
    Acked-by: David Vrabel [xen]
    Acked-by: Konrad Rzeszutek Wilk [xen swiotlb]
    Acked-by: Joerg Roedel [iommu]
    Acked-by: Richard Kuo [hexagon]
    Acked-by: Geert Uytterhoeven [m68k]
    Acked-by: Gerald Schaefer [s390]
    Acked-by: Bjorn Andersson
    Acked-by: Hans-Christian Noren Egtvedt [avr32]
    Acked-by: Vineet Gupta [arc]
    Acked-by: Robin Murphy [arm64 and dma-iommu]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Kozlowski
     

03 Aug, 2016

1 commit

  • Pull PCI updates from Bjorn Helgaas:
    "Highlights:

    - ARM64 support for ACPI host bridges

    - new drivers for Axis ARTPEC-6 and Marvell Aardvark

    - new pci_alloc_irq_vectors() interface for MSI-X, MSI, legacy INTx

    - pci_resource_to_user() cleanup (more to come)

    Detailed summary:

    Enumeration:
    - Move ecam.h to linux/include/pci-ecam.h (Jayachandran C)
    - Add parent device field to ECAM struct pci_config_window (Jayachandran C)
    - Add generic MCFG table handling (Tomasz Nowicki)
    - Refactor pci_bus_assign_domain_nr() for CONFIG_PCI_DOMAINS_GENERIC (Tomasz Nowicki)
    - Factor DT-specific pci_bus_find_domain_nr() code out (Tomasz Nowicki)

    Resource management:
    - Add devm_request_pci_bus_resources() (Bjorn Helgaas)
    - Unify pci_resource_to_user() declarations (Bjorn Helgaas)
    - Implement pci_resource_to_user() with pcibios_resource_to_bus() (microblaze, powerpc, sparc) (Bjorn Helgaas)
    - Request host bridge window resources (designware, iproc, rcar, xgene, xilinx, xilinx-nwl) (Bjorn Helgaas)
    - Make PCI I/O space optional on ARM32 (Bjorn Helgaas)
    - Ignore write combining when mapping I/O port space (Bjorn Helgaas)
    - Claim bus resources on MIPS PCI_PROBE_ONLY set-ups (Bjorn Helgaas)
    - Remove unicore32 pci=firmware command line parameter handling (Bjorn Helgaas)
    - Support I/O resources when parsing host bridge resources (Jayachandran C)
    - Add helpers to request/release memory and I/O regions (Johannes Thumshirn)
    - Use pci_(request|release)_mem_regions (NVMe, lpfc, GenWQE, ethernet/intel, alx) (Johannes Thumshirn)
    - Extend pci=resource_alignment to specify device/vendor IDs (Koehrer Mathias (ETAS/ESW5))
    - Add generic pci_bus_claim_resources() (Lorenzo Pieralisi)
    - Claim bus resources on ARM32 PCI_PROBE_ONLY set-ups (Lorenzo Pieralisi)
    - Remove ARM32 and ARM64 arch-specific pcibios_enable_device() (Lorenzo Pieralisi)
    - Add pci_unmap_iospace() to unmap I/O resources (Sinan Kaya)
    - Remove powerpc __pci_mmap_set_pgprot() (Yinghai Lu)

    PCI device hotplug:
    - Allow additional bus numbers for hotplug bridges (Keith Busch)
    - Ignore interrupts during D3cold (Lukas Wunner)

    Power management:
    - Enforce type casting for pci_power_t (Andy Shevchenko)
    - Don't clear d3cold_allowed for PCIe ports (Mika Westerberg)
    - Put PCIe ports into D3 during suspend (Mika Westerberg)
    - Power on bridges before scanning new devices (Mika Westerberg)
    - Runtime resume bridge before rescan (Mika Westerberg)
    - Add runtime PM support for PCIe ports (Mika Westerberg)
    - Remove redundant check of pcie_set_clkpm (Shawn Lin)

    Virtualization:
    - Add function 1 DMA alias quirk for Marvell 88SE9182 (Aaron Sierra)
    - Add DMA alias quirk for Adaptec 3805 (Alex Williamson)
    - Mark Atheros AR9485 and QCA9882 to avoid bus reset (Chris Blake)
    - Add ACS quirk for Solarflare SFC9220 (Edward Cree)

    MSI:
    - Fix PCI_MSI dependencies (Arnd Bergmann)
    - Add pci_msix_desc_addr() helper (Christoph Hellwig)
    - Switch msix_program_entries() to use pci_msix_desc_addr() (Christoph Hellwig)
    - Make the "entries" argument to pci_enable_msix() optional (Christoph Hellwig)
    - Provide sensible IRQ vector alloc/free routines (Christoph Hellwig)
    - Spread interrupt vectors in pci_alloc_irq_vectors() (Christoph Hellwig)

    Error Handling:
    - Bind DPC to Root Ports as well as Downstream Ports (Keith Busch)
    - Remove DPC tristate module option (Keith Busch)
    - Convert Downstream Port Containment driver to use devm_* functions (Mika Westerberg)

    Generic host bridge driver:
    - Select IRQ_DOMAIN (Arnd Bergmann)
    - Claim bus resources on PCI_PROBE_ONLY set-ups (Lorenzo Pieralisi)

    ACPI host bridge driver:
    - Add ARM64 acpi_pci_bus_find_domain_nr() (Tomasz Nowicki)
    - Add ARM64 ACPI support for legacy IRQs parsing and consolidation with DT code (Tomasz Nowicki)
    - Implement ARM64 AML accessors for PCI_Config region (Tomasz Nowicki)
    - Support ARM64 ACPI-based PCI host controller (Tomasz Nowicki)

    Altera host bridge driver:
    - Check link status before retrain link (Ley Foon Tan)
    - Poll for link up status after retraining the link (Ley Foon Tan)

    Axis ARTPEC-6 host bridge driver:
    - Add PCI_MSI_IRQ_DOMAIN dependency (Arnd Bergmann)
    - Add DT binding for Axis ARTPEC-6 PCIe controller (Niklas Cassel)
    - Add Axis ARTPEC-6 PCIe controller driver (Niklas Cassel)

    Intel VMD host bridge driver:
    - Use lock save/restore in interrupt enable path (Jon Derrick)
    - Select device dma ops to override (Keith Busch)
    - Initialize list item in IRQ disable (Keith Busch)
    - Use x86_vector_domain as parent domain (Keith Busch)
    - Separate MSI and MSI-X vector sharing (Keith Busch)

    Marvell Aardvark host bridge driver:
    - Add DT binding for the Aardvark PCIe controller (Thomas Petazzoni)
    - Add Aardvark PCI host controller driver (Thomas Petazzoni)
    - Add Aardvark PCIe support for Armada 3700 (Thomas Petazzoni)

    Microsoft Hyper-V host bridge driver:
    - Fix interrupt cleanup path (Cathy Avery)
    - Don't leak buffer in hv_pci_onchannelcallback() (Vitaly Kuznetsov)
    - Handle all pending messages in hv_pci_onchannelcallback() (Vitaly Kuznetsov)

    NVIDIA Tegra host bridge driver:
    - Program PADS_REFCLK_CFG* always, not just on legacy SoCs (Stephen Warren)
    - Program PADS_REFCLK_CFG* registers with per-SoC values (Stephen Warren)
    - Use lower-case hex consistently for register definitions (Thierry Reding)
    - Use generic pci_remap_iospace() rather than ARM32-specific one (Thierry Reding)
    - Stop setting pcibios_min_mem (Thierry Reding)

    Renesas R-Car host bridge driver:
    - Drop gen2 dummy I/O port region (Bjorn Helgaas)

    TI DRA7xx host bridge driver:
    - Fix return value in case of error (Christophe JAILLET)

    Xilinx AXI host bridge driver:
    - Fix return value in case of error (Christophe JAILLET)

    Miscellaneous:
    - Make bus_attr_resource_alignment static (Ben Dooks)
    - Include for isa_dma_bridge_buggy (Ben Dooks)
    - MAINTAINERS: Add file patterns for PCI device tree bindings (Geert Uytterhoeven)
    - Make host bridge drivers explicitly non-modular (Paul Gortmaker)"

    * tag 'pci-v4.8-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (125 commits)
    PCI: xgene: Make explicitly non-modular
    PCI: thunder-pem: Make explicitly non-modular
    PCI: thunder-ecam: Make explicitly non-modular
    PCI: tegra: Make explicitly non-modular
    PCI: rcar-gen2: Make explicitly non-modular
    PCI: rcar: Make explicitly non-modular
    PCI: mvebu: Make explicitly non-modular
    PCI: layerscape: Make explicitly non-modular
    PCI: keystone: Make explicitly non-modular
    PCI: hisi: Make explicitly non-modular
    PCI: generic: Make explicitly non-modular
    PCI: designware-plat: Make it explicitly non-modular
    PCI: artpec6: Make explicitly non-modular
    PCI: armada8k: Make explicitly non-modular
    PCI: artpec: Add PCI_MSI_IRQ_DOMAIN dependency
    PCI: Add ACS quirk for Solarflare SFC9220
    arm64: dts: marvell: Add Aardvark PCIe support for Armada 3700
    PCI: aardvark: Add Aardvark PCI host controller driver
    dt-bindings: add DT binding for the Aardvark PCIe controller
    PCI: tegra: Program PADS_REFCLK_CFG* registers with per-SoC values
    ...

    Linus Torvalds
     

02 Aug, 2016

1 commit


28 Jul, 2016

1 commit

  • Pull LED updates from Jacek Anaszewski:
    "New LED class driver:
    - LED driver for TI LP3952 6-Channel Color LED

    LED core improvements:
    - Only descend into leds directory when CONFIG_NEW_LEDS is set
    - Add no-op gpio_led_register_device when LED subsystem is disabled
    - MAINTAINERS: Add file patterns for led device tree bindings

    LED Trigger core improvements:
    - return error if invalid trigger name is provided via sysfs

    LED class drivers improvements
    - is31fl32xx: define complete i2c_device_id table
    - is31fl32xx: fix typo in id and match table names
    - leds-gpio: Set of_node for created LED devices
    - pca9532: Add device tree support

    Conversion of IDE trigger to common disk trigger:
    - leds: convert IDE trigger to common disk trigger
    - leds: documentation: 'ide-disk' to 'disk-activity'
    - unicore32: use the new LED disk activity trigger
    - parisc: use the new LED disk activity trigger
    - mips: use the new LED disk activity trigger
    - arm: use the new LED disk activity trigger
    - powerpc: use the new LED disk activity trigger"

    * tag 'leds_for_4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
    leds: is31fl32xx: define complete i2c_device_id table
    leds: is31fl32xx: fix typo in id and match table names
    leds: LED driver for TI LP3952 6-Channel Color LED
    leds: leds-gpio: Set of_node for created LED devices
    leds: triggers: return error if invalid trigger name is provided via sysfs
    leds: Only descend into leds directory when CONFIG_NEW_LEDS is set
    leds: Add no-op gpio_led_register_device when LED subsystem is disabled
    unicore32: use the new LED disk activity trigger
    parisc: use the new LED disk activity trigger
    mips: use the new LED disk activity trigger
    arm: use the new LED disk activity trigger
    powerpc: use the new LED disk activity trigger
    leds: documentation: 'ide-disk' to 'disk-activity'
    leds: convert IDE trigger to common disk trigger
    leds: pca9532: Add device tree support
    MAINTAINERS: Add file patterns for led device tree bindings

    Linus Torvalds
     

27 Jul, 2016

3 commits

  • Merge updates from Andrew Morton:

    - a few misc bits

    - ocfs2

    - most(?) of MM

    * emailed patches from Andrew Morton : (125 commits)
    thp: fix comments of __pmd_trans_huge_lock()
    cgroup: remove unnecessary 0 check from css_from_id()
    cgroup: fix idr leak for the first cgroup root
    mm: memcontrol: fix documentation for compound parameter
    mm: memcontrol: remove BUG_ON in uncharge_list
    mm: fix build warnings in
    mm, thp: convert from optimistic swapin collapsing to conservative
    mm, thp: fix comment inconsistency for swapin readahead functions
    thp: update Documentation/{vm/transhuge,filesystems/proc}.txt
    shmem: split huge pages beyond i_size under memory pressure
    thp: introduce CONFIG_TRANSPARENT_HUGE_PAGECACHE
    khugepaged: add support of collapse for tmpfs/shmem pages
    shmem: make shmem_inode_info::lock irq-safe
    khugepaged: move up_read(mmap_sem) out of khugepaged_alloc_page()
    thp: extract khugepaged from mm/huge_memory.c
    shmem, thp: respect MADV_{NO,}HUGEPAGE for file mappings
    shmem: add huge pages support
    shmem: get_unmapped_area align huge page
    shmem: prepare huge= mount option and sysfs knob
    mm, rmap: account shmem thp pages
    ...

    Linus Torvalds
     
  • Pull GPIO updates from Linus Walleij:
    "This is the bulk of GPIO changes for the v4.8 kernel cycle. The big
    news is the completion of the chardev ABI which I'm very happy about
    and apart from that it's an ordinary, quite busy cycle. The details
    are below.

    The patches are tested in linux-next for some time, patches to other
    subsystem mostly have ACKs.

    I got overly ambitious with configureing lines as input for IRQ lines
    but it turns out that some controllers have their interrupt-enable and
    input-enabling in orthogonal settings so the assumption that all IRQ
    lines are input lines does not hold. Oh well, revert and back to the
    drawing board with that.

    Core changes:

    - The big item is of course the completion of the character device
    ABI. It has now replaced and surpassed the former unmaintainable
    sysfs ABI: we can now hammer (bitbang) individual lines or sets of
    lines and read individual lines or sets of lines from userspace,
    and we can also register to listen to GPIO events from userspace.

    As a tie-in we have two new tools in tools/gpio: gpio-hammer and
    gpio-event-mon that illustrate the proper use of the new ABI. As
    someone said: the wild west days of GPIO are now over.

    - Continued to remove the pointless ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB
    Kconfig symbols. I'm patching hexagon, openrisc, powerpc, sh,
    unicore, ia64 and microblaze. These are either ACKed by their
    maintainers or patched anyways after a grace period and no response
    from maintainers.

    Some archs (ARM) come in from their trees, and others (x86) are
    still not fixed, so I might send a second pull request to root it
    out later in this merge window, or just defer to v4.9.

    - The GPIO tools are moved to the tools build system.

    New drivers:

    - New driver for the MAX77620/MAX20024.

    - New driver for the Intel Merrifield.

    - Enabled PCA953x for the TI PCA9536.

    - Enabled PCA953x for the Intel Edison.

    - Enabled R8A7792 in the RCAR driver.

    Driver improvements:

    - The STMPE and F7188x now supports the .get_direction() callback.

    - The Xilinx driver supports setting multiple lines at once.

    - ACPI support for the Vulcan GPIO controller.

    - The MMIO GPIO driver supports device tree probing.

    - The Acer One 10 is supported through the _DEP ACPI attribute.

    Cleanups:

    - A major cleanup of the OF/DT support code. It is way easier to
    read and understand now, probably this improves performance too.

    - Drop a few redundant .owner assignments.

    - Remove CLPS711x boardfile support: we are 100% DT"

    * tag 'gpio-v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (67 commits)
    MAINTAINERS: Add INTEL MERRIFIELD GPIO entry
    gpio: dwapb: add missing fwnode_handle_put() in dwapb_gpio_get_pdata()
    gpio: merrifield: Protect irq_ack() and gpio_set() by lock
    gpio: merrifield: Introduce GPIO driver to support Merrifield
    gpio: intel-mid: Make it depend to X86_INTEL_MID
    gpio: intel-mid: Sort header block alphabetically
    gpio: intel-mid: Remove potentially harmful code
    gpio: rcar: add R8A7792 support
    gpiolib: remove duplicated include from gpiolib.c
    Revert "gpio: convince line to become input in irq helper"
    gpiolib: of_find_gpio(): Don't discard errors
    gpio: of: Allow overriding the device node
    gpio: free handles in fringe cases
    gpio: tps65218: Add platform_device_id table
    gpio: max77620: get gpio value based on direction
    gpio: lynxpoint: avoid potential warning on error path
    tools/gpio: add install section
    tools/gpio: move to tools buildsystem
    gpio: intel-mid: switch to devm_gpiochip_add_data()
    gpio: 74x164: Use spi_write() helper instead of open coding
    ...

    Linus Torvalds
     
  • We always have vma->vm_mm around.

    Link: http://lkml.kernel.org/r/1466021202-61880-8-git-send-email-kirill.shutemov@linux.intel.com
    Signed-off-by: Kirill A. Shutemov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

27 Jun, 2016

1 commit


25 Jun, 2016

1 commit

  • __GFP_REPEAT has a rather weak semantic but since it has been introduced
    around 2.6.12 it has been ignored for low order allocations.

    PGALLOC_GFP uses __GFP_REPEAT but it is only used in pte_alloc_one,
    pte_alloc_one_kernel which does order-0 request. This means that this
    flag has never been actually useful here because it has always been used
    only for PAGE_ALLOC_COSTLY requests.

    Link: http://lkml.kernel.org/r/1464599699-30131-17-git-send-email-mhocko@kernel.org
    Signed-off-by: Michal Hocko
    Cc: Guan Xuetao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Hocko
     

24 Jun, 2016

1 commit

  • Remove support for the "pci=firmware" command line parameter, which was
    way to keep the kernel from changing any PCI BAR assignments. This was
    copied from ARM, but is not actually needed on unicore32.

    The corresponding ARM support was removed by 903589ca7165 ("ARM: 8554/1:
    kernel: pci: remove pci=firmware command line parameter handling").

    Signed-off-by: Bjorn Helgaas

    Bjorn Helgaas
     

08 Jun, 2016

1 commit


27 May, 2016

1 commit

  • Pull kbuild updates from Michal Marek:

    - new option CONFIG_TRIM_UNUSED_KSYMS which does a two-pass build and
    unexports symbols which are not used in the current config [Nicolas
    Pitre]

    - several kbuild rule cleanups [Masahiro Yamada]

    - warning option adjustments for gcov etc [Arnd Bergmann]

    - a few more small fixes

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (31 commits)
    kbuild: move -Wunused-const-variable to W=1 warning level
    kbuild: fix if_change and friends to consider argument order
    kbuild: fix adjust_autoksyms.sh for modules that need only one symbol
    kbuild: fix ksym_dep_filter when multiple EXPORT_SYMBOL() on the same line
    gcov: disable -Wmaybe-uninitialized warning
    gcov: disable tree-loop-im to reduce stack usage
    gcov: disable for COMPILE_TEST
    Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES
    Kbuild: change CC_OPTIMIZE_FOR_SIZE definition
    kbuild: forbid kernel directory to contain spaces and colons
    kbuild: adjust ksym_dep_filter for some cmd_* renames
    kbuild: Fix dependencies for final vmlinux link
    kbuild: better abstract vmlinux sequential prerequisites
    kbuild: fix call to adjust_autoksyms.sh when output directory specified
    kbuild: Get rid of KBUILD_STR
    kbuild: rename cmd_as_s_S to cmd_cpp_s_S
    kbuild: rename cmd_cc_i_c to cmd_cpp_i_c
    kbuild: drop redundant "PHONY += FORCE"
    kbuild: delete unnecessary "@:"
    kbuild: mark help target as PHONY
    ...

    Linus Torvalds
     

25 May, 2016

1 commit


21 May, 2016

1 commit

  • Define HAVE_EXIT_THREAD for archs which want to do something in
    exit_thread. For others, let's define exit_thread as an empty inline.

    This is a cleanup before we change the prototype of exit_thread to
    accept a task parameter.

    [akpm@linux-foundation.org: fix mips]
    Signed-off-by: Jiri Slaby
    Cc: "David S. Miller"
    Cc: "H. Peter Anvin"
    Cc: "James E.J. Bottomley"
    Cc: Aurelien Jacquiot
    Cc: Benjamin Herrenschmidt
    Cc: Catalin Marinas
    Cc: Chen Liqin
    Cc: Chris Metcalf
    Cc: Chris Zankel
    Cc: David Howells
    Cc: Fenghua Yu
    Cc: Geert Uytterhoeven
    Cc: Guan Xuetao
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: Ingo Molnar
    Cc: Ivan Kokshaysky
    Cc: James Hogan
    Cc: Jeff Dike
    Cc: Jesper Nilsson
    Cc: Jiri Slaby
    Cc: Jonas Bonn
    Cc: Koichi Yasutake
    Cc: Lennox Wu
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Mikael Starvik
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Ralf Baechle
    Cc: Rich Felker
    Cc: Richard Henderson
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Russell King
    Cc: Steven Miao
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

05 May, 2016

1 commit

  • The newer renameat2 syscall provides all the functionality provided by
    the renameat syscall and adds flags, so future architectures won't need
    to include renameat.

    Therefore drop the renameat syscall from the generic syscall list unless
    __ARCH_WANT_RENAMEAT is defined by the architecture's unistd.h prior to
    including asm-generic/unistd.h, and adjust all architectures using the
    generic syscall list to define it so that no in-tree architectures are
    affected.

    Signed-off-by: James Hogan
    Acked-by: Vineet Gupta
    Cc: linux-arch@vger.kernel.org
    Cc: linux-snps-arc@lists.infradead.org
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: linux-c6x-dev@linux-c6x.org
    Cc: Richard Kuo
    Cc: linux-hexagon@vger.kernel.org
    Cc: linux-metag@vger.kernel.org
    Cc: Jonas Bonn
    Cc: linux@lists.openrisc.net
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Chris Metcalf
    Cc: Guan Xuetao
    Cc: Ley Foon Tan
    Cc: nios2-dev@lists.rocketboards.org
    Cc: Yoshinori Sato
    Cc: uclinux-h8-devel@lists.sourceforge.jp
    Signed-off-by: Arnd Bergmann

    James Hogan
     

20 Apr, 2016

2 commits

  • "PHONY += FORCE" is already cared by scripts/Makefile.build,
    which these files are included from.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Marek

    Masahiro Yamada
     
  • Since commit 2aedcd098a94 ('kbuild: suppress annoying "... is up to
    date." message'), $(call if_changed,...) is evaluated to "@:"
    when there is nothing to do.

    We no longer need to add "@:" after $(call if_changed,...) to
    suppress "... is up to date." message.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Marek

    Masahiro Yamada
     

30 Mar, 2016

1 commit


21 Mar, 2016

1 commit

  • Pull x86 protection key support from Ingo Molnar:
    "This tree adds support for a new memory protection hardware feature
    that is available in upcoming Intel CPUs: 'protection keys' (pkeys).

    There's a background article at LWN.net:

    https://lwn.net/Articles/643797/

    The gist is that protection keys allow the encoding of
    user-controllable permission masks in the pte. So instead of having a
    fixed protection mask in the pte (which needs a system call to change
    and works on a per page basis), the user can map a (handful of)
    protection mask variants and can change the masks runtime relatively
    cheaply, without having to change every single page in the affected
    virtual memory range.

    This allows the dynamic switching of the protection bits of large
    amounts of virtual memory, via user-space instructions. It also
    allows more precise control of MMU permission bits: for example the
    executable bit is separate from the read bit (see more about that
    below).

    This tree adds the MM infrastructure and low level x86 glue needed for
    that, plus it adds a high level API to make use of protection keys -
    if a user-space application calls:

    mmap(..., PROT_EXEC);

    or

    mprotect(ptr, sz, PROT_EXEC);

    (note PROT_EXEC-only, without PROT_READ/WRITE), the kernel will notice
    this special case, and will set a special protection key on this
    memory range. It also sets the appropriate bits in the Protection
    Keys User Rights (PKRU) register so that the memory becomes unreadable
    and unwritable.

    So using protection keys the kernel is able to implement 'true'
    PROT_EXEC on x86 CPUs: without protection keys PROT_EXEC implies
    PROT_READ as well. Unreadable executable mappings have security
    advantages: they cannot be read via information leaks to figure out
    ASLR details, nor can they be scanned for ROP gadgets - and they
    cannot be used by exploits for data purposes either.

    We know about no user-space code that relies on pure PROT_EXEC
    mappings today, but binary loaders could start making use of this new
    feature to map binaries and libraries in a more secure fashion.

    There is other pending pkeys work that offers more high level system
    call APIs to manage protection keys - but those are not part of this
    pull request.

    Right now there's a Kconfig that controls this feature
    (CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS) that is default enabled
    (like most x86 CPU feature enablement code that has no runtime
    overhead), but it's not user-configurable at the moment. If there's
    any serious problem with this then we can make it configurable and/or
    flip the default"

    * 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (38 commits)
    x86/mm/pkeys: Fix mismerge of protection keys CPUID bits
    mm/pkeys: Fix siginfo ABI breakage caused by new u64 field
    x86/mm/pkeys: Fix access_error() denial of writes to write-only VMA
    mm/core, x86/mm/pkeys: Add execute-only protection keys support
    x86/mm/pkeys: Create an x86 arch_calc_vm_prot_bits() for VMA flags
    x86/mm/pkeys: Allow kernel to modify user pkey rights register
    x86/fpu: Allow setting of XSAVE state
    x86/mm: Factor out LDT init from context init
    mm/core, x86/mm/pkeys: Add arch_validate_pkey()
    mm/core, arch, powerpc: Pass a protection key in to calc_vm_flag_bits()
    x86/mm/pkeys: Actually enable Memory Protection Keys in the CPU
    x86/mm/pkeys: Add Kconfig prompt to existing config option
    x86/mm/pkeys: Dump pkey from VMA in /proc/pid/smaps
    x86/mm/pkeys: Dump PKRU with other kernel registers
    mm/core, x86/mm/pkeys: Differentiate instruction fetches
    x86/mm/pkeys: Optimize fault handling in access_error()
    mm/core: Do not enforce PKEY permissions on remote mm access
    um, pkeys: Add UML arch_*_access_permitted() methods
    mm/gup, x86/mm/pkeys: Check VMAs and PTEs for protection keys
    x86/mm/gup: Simplify get_user_pages() PTE bit handling
    ...

    Linus Torvalds
     

20 Mar, 2016

1 commit

  • Pull networking updates from David Miller:
    "Highlights:

    1) Support more Realtek wireless chips, from Jes Sorenson.

    2) New BPF types for per-cpu hash and arrap maps, from Alexei
    Starovoitov.

    3) Make several TCP sysctls per-namespace, from Nikolay Borisov.

    4) Allow the use of SO_REUSEPORT in order to do per-thread processing
    of incoming TCP/UDP connections. The muxing can be done using a
    BPF program which hashes the incoming packet. From Craig Gallek.

    5) Add a multiplexer for TCP streams, to provide a messaged based
    interface. BPF programs can be used to determine the message
    boundaries. From Tom Herbert.

    6) Add 802.1AE MACSEC support, from Sabrina Dubroca.

    7) Avoid factorial complexity when taking down an inetdev interface
    with lots of configured addresses. We were doing things like
    traversing the entire address less for each address removed, and
    flushing the entire netfilter conntrack table for every address as
    well.

    8) Add and use SKB bulk free infrastructure, from Jesper Brouer.

    9) Allow offloading u32 classifiers to hardware, and implement for
    ixgbe, from John Fastabend.

    10) Allow configuring IRQ coalescing parameters on a per-queue basis,
    from Kan Liang.

    11) Extend ethtool so that larger link mode masks can be supported.
    From David Decotigny.

    12) Introduce devlink, which can be used to configure port link types
    (ethernet vs Infiniband, etc.), port splitting, and switch device
    level attributes as a whole. From Jiri Pirko.

    13) Hardware offload support for flower classifiers, from Amir Vadai.

    14) Add "Local Checksum Offload". Basically, for a tunneled packet
    the checksum of the outer header is 'constant' (because with the
    checksum field filled into the inner protocol header, the payload
    of the outer frame checksums to 'zero'), and we can take advantage
    of that in various ways. From Edward Cree"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1548 commits)
    bonding: fix bond_get_stats()
    net: bcmgenet: fix dma api length mismatch
    net/mlx4_core: Fix backward compatibility on VFs
    phy: mdio-thunder: Fix some Kconfig typos
    lan78xx: add ndo_get_stats64
    lan78xx: handle statistics counter rollover
    RDS: TCP: Remove unused constant
    RDS: TCP: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket
    net: smc911x: convert pxa dma to dmaengine
    team: remove duplicate set of flag IFF_MULTICAST
    bonding: remove duplicate set of flag IFF_MULTICAST
    net: fix a comment typo
    ethernet: micrel: fix some error codes
    ip_tunnels, bpf: define IP_TUNNEL_OPTS_MAX and use it
    bpf, dst: add and use dst_tclassid helper
    bpf: make skb->tc_classid also readable
    net: mvneta: bm: clarify dependencies
    cls_bpf: reset class and reuse major in da
    ldmvsw: Checkpatch sunvnet.c and sunvnet_common.c
    ldmvsw: Add ldmvsw.c driver code
    ...

    Linus Torvalds
     

19 Mar, 2016

1 commit

  • Merge second patch-bomb from Andrew Morton:

    - a couple of hotfixes

    - the rest of MM

    - a new timer slack control in procfs

    - a couple of procfs fixes

    - a few misc things

    - some printk tweaks

    - lib/ updates, notably to radix-tree.

    - add my and Nick Piggin's old userspace radix-tree test harness to
    tools/testing/radix-tree/. Matthew said it was a godsend during the
    radix-tree work he did.

    - a few code-size improvements, switching to __always_inline where gcc
    screwed up.

    - partially implement character sets in sscanf

    * emailed patches from Andrew Morton : (118 commits)
    sscanf: implement basic character sets
    lib/bug.c: use common WARN helper
    param: convert some "on"/"off" users to strtobool
    lib: add "on"/"off" support to kstrtobool
    lib: update single-char callers of strtobool()
    lib: move strtobool() to kstrtobool()
    include/linux/unaligned: force inlining of byteswap operations
    include/uapi/linux/byteorder, swab: force inlining of some byteswap operations
    include/asm-generic/atomic-long.h: force inlining of some atomic_long operations
    usb: common: convert to use match_string() helper
    ide: hpt366: convert to use match_string() helper
    ata: hpt366: convert to use match_string() helper
    power: ab8500: convert to use match_string() helper
    power: charger_manager: convert to use match_string() helper
    drm/edid: convert to use match_string() helper
    pinctrl: convert to use match_string() helper
    device property: convert to use match_string() helper
    lib/string: introduce match_string() helper
    radix-tree tests: add test for radix_tree_iter_next
    radix-tree tests: add regression3 test
    ...

    Linus Torvalds
     

18 Mar, 2016

3 commits

  • Pull GPIO updates from Linus Walleij:
    "This is the bulk of GPIO changes for kernel v4.6. There is quite a
    lot of interesting stuff going on.

    The patches to other subsystems and arch-wide are ACKed as far as
    possible, though I consider things like per-arch as
    essentially a part of the GPIO subsystem so it should not be needed.

    Core changes:

    - The gpio_chip is now a *real device*. Until now the gpio chips
    were just piggybacking the parent device or (gasp) floating in
    space outside of the device model.

    We now finally make GPIO chips devices. The gpio_chip will create
    a gpio_device which contains a struct device, and this gpio_device
    struct is kept private. Anything that needs to be kept private
    from the rest of the kernel will gradually be moved over to the
    gpio_device.

    - As a result of making the gpio_device a real device, we have added
    resource management, so devm_gpiochip_add_data() will cut down on
    overhead and reduce code lines. A huge slew of patches convert
    almost all drivers in the subsystem to use this.

    - Building on making the GPIO a real device, we add the first step of
    a new userspace ABI: the GPIO character device. We take small
    steps here, so we first add a pure *information* ABI and the tool
    "lsgpio" that will list all GPIO devices on the system and all
    lines on these devices.

    We can now discover GPIOs properly from userspace. We still have
    not come up with a way to actually *use* GPIOs from userspace.

    - To encourage people to use the character device for the future, we
    have it always-enabled when using GPIO. The old sysfs ABI is still
    opt-in (and can be used in parallel), but is marked as deprecated.

    We will keep it around for the foreseeable future, but it will not
    be extended to cover ever more use cases.

    Cleanup:

    - Bjorn Helgaas removed a whole slew of per-architecture
    includes.

    This dates back to when GPIO was an opt-in feature and no shared
    library even existed: just a header file with proper prototypes was
    provided and all semantics were up to the arch to implement. These
    patches make the GPIO chip even more a proper device and cleans out
    leftovers of the old in-kernel API here and there.

    Still some cruft is left but it's very little now.

    - There is still some clamping of return values for .get() going on,
    but we now return sane values in the vast majority of drivers and
    the errorpath is sanitized. Some patches for powerpc, blackfin and
    unicore still drop in.

    - We continue to switch the ARM, MIPS, blackfin, m68k local GPIO
    implementations to use gpiochip_add_data() and cut down on code
    lines.

    - MPC8xxx is converted to use the generic GPIO helpers.

    - ATH79 is converted to use the generic GPIO helpers.

    New drivers:

    - WinSystems WS16C48

    - Acces 104-DIO-48E

    - F81866 (a F7188x variant)

    - Qoric (a MPC8xxx variant)

    - TS-4800

    - SPI serializers (pisosr): simple 74xx shift registers connected to
    SPI to obtain a dirt-cheap output-only GPIO expander.

    - Texas Instruments TPIC2810

    - Texas Instruments TPS65218

    - Texas Instruments TPS65912

    - X-Gene (ARM64) standby GPIO controller"

    * tag 'gpio-v4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (194 commits)
    Revert "Share upstreaming patches"
    gpio: mcp23s08: Fix clearing of interrupt.
    gpiolib: Fix comment referring to gpio_*() in gpiod_*()
    gpio: pca953x: Fix pca953x_gpio_set_multiple() on 64-bit
    gpio: xgene: Fix kconfig for standby GIPO contoller
    gpio: Add generic serializer DT binding
    gpio: uapi: use 0xB4 as ioctl() major
    gpio: tps65912: fix bad merge
    Revert "gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free"
    gpio: omap: drop dev field from gpio_bank structure
    gpio: mpc8xxx: Slightly update the code for better readability
    gpio: mpc8xxx: Remove *read_reg and *write_reg from struct mpc8xxx_gpio_chip
    gpio: mpc8xxx: Fixup setting gpio direction output
    gpio: mcp23s08: Add support for mcp23s18
    dt-bindings: gpio: altera: Fix altr,interrupt-type property
    gpio: add driver for MEN 16Z127 GPIO controller
    gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free
    gpio: timberdale: Switch to devm_ioremap_resource()
    gpio: ts4800: Add IMX51 dependency
    gpiolib: rewrite gpiodev_add_to_list
    ...

    Linus Torvalds
     
  • The define has a comment from Nick Piggin from 2007:

    /* For backwards compat. Remove me quickly. */

    I guess 9 years should not be too hurried sense of 'quickly' even for
    kernel measures.

    Signed-off-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • There are few things about *pte_alloc*() helpers worth cleaning up:

    - 'vma' argument is unused, let's drop it;

    - most __pte_alloc() callers do speculative check for pmd_none(),
    before taking ptl: let's introduce pte_alloc() macro which does
    the check.

    The only direct user of __pte_alloc left is userfaultfd, which has
    different expectation about atomicity wrt pmd.

    - pte_alloc_map() and pte_alloc_map_lock() are redefined using
    pte_alloc().

    [sudeep.holla@arm.com: fix build for arm64 hugetlbpage]
    [sfr@canb.auug.org.au: fix arch/arm/mm/mmu.c some more]
    Signed-off-by: Kirill A. Shutemov
    Cc: Dave Hansen
    Signed-off-by: Sudeep Holla
    Acked-by: Kirill A. Shutemov
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

17 Mar, 2016

1 commit

  • Pull PCI updates from Bjorn Helgaas:
    "PCI changes for v4.6:

    Enumeration:
    - Disable IO/MEM decoding for devices with non-compliant BARs (Bjorn Helgaas)
    - Mark Broadwell-EP Home Agent & PCU as having non-compliant BARs (Bjorn Helgaas

    Resource management:
    - Mark shadow copy of VGA ROM as IORESOURCE_PCI_FIXED (Bjorn Helgaas)
    - Don't assign or reassign immutable resources (Bjorn Helgaas)
    - Don't enable/disable ROM BAR if we're using a RAM shadow copy (Bjorn Helgaas)
    - Set ROM shadow location in arch code, not in PCI core (Bjorn Helgaas)
    - Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs (Bjorn Helgaas)
    - ia64: Use ioremap() instead of open-coded equivalent (Bjorn Helgaas)
    - ia64: Keep CPU physical (not virtual) addresses in shadow ROM resource (Bjorn Helgaas)
    - MIPS: Keep CPU physical (not virtual) addresses in shadow ROM resource (Bjorn Helgaas)
    - Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY (Bjorn Helgaas)
    - Don't leak memory if sysfs_create_bin_file() fails (Bjorn Helgaas)
    - rcar: Remove PCI_PROBE_ONLY handling (Lorenzo Pieralisi)
    - designware: Remove PCI_PROBE_ONLY handling (Lorenzo Pieralisi)

    Virtualization:
    - Wait for up to 1000ms after FLR reset (Alex Williamson)
    - Support SR-IOV on any function type (Kelly Zytaruk)
    - Add ACS quirk for all Cavium devices (Manish Jaggi)

    AER:
    - Rename pci_ops_aer to aer_inj_pci_ops (Bjorn Helgaas)
    - Restore pci_ops pointer while calling original pci_ops (David Daney)
    - Fix aer_inject error codes (Jean Delvare)
    - Use dev_warn() in aer_inject (Jean Delvare)
    - Log actual error causes in aer_inject (Jean Delvare)
    - Log aer_inject error injections (Jean Delvare)

    VPD:
    - Prevent VPD access for buggy devices (Babu Moger)
    - Move pci_read_vpd() and pci_write_vpd() close to other VPD code (Bjorn Helgaas)
    - Move pci_vpd_release() from header file to pci/access.c (Bjorn Helgaas)
    - Remove struct pci_vpd_ops.release function pointer (Bjorn Helgaas)
    - Rename VPD symbols to remove unnecessary "pci22" (Bjorn Helgaas)
    - Fold struct pci_vpd_pci22 into struct pci_vpd (Bjorn Helgaas)
    - Sleep rather than busy-wait for VPD access completion (Bjorn Helgaas)
    - Update VPD definitions (Hannes Reinecke)
    - Allow access to VPD attributes with size 0 (Hannes Reinecke)
    - Determine actual VPD size on first access (Hannes Reinecke)

    Generic host bridge driver:
    - Move structure definitions to separate header file (David Daney)
    - Add pci_host_common_probe(), based on gen_pci_probe() (David Daney)
    - Expose pci_host_common_probe() for use by other drivers (David Daney)

    Altera host bridge driver:
    - Fix altera_pcie_link_is_up() (Ley Foon Tan)

    Cavium ThunderX host bridge driver:
    - Add PCIe host driver for ThunderX processors (David Daney)
    - Add driver for ThunderX-pass{1,2} on-chip devices (David Daney)

    Freescale i.MX6 host bridge driver:
    - Add DT bindings to configure PHY Tx driver settings (Justin Waters)
    - Move imx6_pcie_reset_phy() near other PHY handling functions (Lucas Stach)
    - Move PHY reset into imx6_pcie_establish_link() (Lucas Stach)
    - Remove broken Gen2 workaround (Lucas Stach)
    - Move link up check into imx6_pcie_wait_for_link() (Lucas Stach)

    Freescale Layerscape host bridge driver:
    - Add "fsl,ls2085a-pcie" compatible ID (Yang Shi)

    Intel VMD host bridge driver:
    - Attach VMD resources to parent domain's resource tree (Jon Derrick)
    - Set bus resource start to 0 (Keith Busch)

    Microsoft Hyper-V host bridge driver:
    - Add fwnode_handle to x86 pci_sysdata (Jake Oshins)
    - Look up IRQ domain by fwnode_handle (Jake Oshins)
    - Add paravirtual PCI front-end for Microsoft Hyper-V VMs (Jake Oshins)

    NVIDIA Tegra host bridge driver:
    - Add pci_ops.{add,remove}_bus() callbacks (Thierry Reding)
    - Implement ->{add,remove}_bus() callbacks (Thierry Reding)
    - Remove unused struct tegra_pcie.num_ports field (Thierry Reding)
    - Track bus -> CPU mapping (Thierry Reding)
    - Remove misleading PHYS_OFFSET (Thierry Reding)

    Renesas R-Car host bridge driver:
    - Depend on ARCH_RENESAS, not ARCH_SHMOBILE (Simon Horman)

    Synopsys DesignWare host bridge driver:
    - ARC: Add PCI support (Joao Pinto)
    - Add generic dw_pcie_wait_for_link() (Joao Pinto)
    - Add default link up check if sub-driver doesn't override (Joao Pinto)
    - Add driver for prototyping kits based on ARC SDP (Joao Pinto)

    TI Keystone host bridge driver:
    - Defer probing if devm_phy_get() returns -EPROBE_DEFER (Shawn Lin)

    Xilinx AXI host bridge driver:
    - Use of_pci_get_host_bridge_resources() to parse DT (Bharat Kumar Gogada)
    - Remove dependency on ARM-specific struct hw_pci (Bharat Kumar Gogada)
    - Don't call pci_fixup_irqs() on Microblaze (Bharat Kumar Gogada)
    - Update Zynq binding with Microblaze node (Bharat Kumar Gogada)
    - microblaze: Support generic Xilinx AXI PCIe Host Bridge IP driver (Bharat Kumar Gogada)

    Xilinx NWL host bridge driver:
    - Add support for Xilinx NWL PCIe Host Controller (Bharat Kumar Gogada)

    Miscellaneous:
    - Check device_attach() return value always (Bjorn Helgaas)
    - Move pci_set_flags() from asm-generic/pci-bridge.h to linux/pci.h (Bjorn Helgaas)
    - Remove includes of empty asm-generic/pci-bridge.h (Bjorn Helgaas)
    - ARM64: Remove generated include of asm-generic/pci-bridge.h (Bjorn Helgaas)
    - Remove empty asm-generic/pci-bridge.h (Bjorn Helgaas)
    - Remove includes of asm/pci-bridge.h (Bjorn Helgaas)
    - Consolidate PCI DMA constants and interfaces in linux/pci-dma-compat.h (Bjorn Helgaas)
    - unicore32: Remove unused HAVE_ARCH_PCI_SET_DMA_MASK definition (Bjorn Helgaas)
    - Cleanup pci/pcie/Kconfig whitespace (Andreas Ziegler)
    - Include pci/hotplug Kconfig directly from pci/Kconfig (Bjorn Helgaas)
    - Include pci/pcie/Kconfig directly from pci/Kconfig (Bogicevic Sasa)
    - frv: Remove stray pci_{alloc,free}_consistent() declaration (Christoph Hellwig)
    - Move pci_dma_* helpers to common code (Christoph Hellwig)
    - Add PCI_CLASS_SERIAL_USB_DEVICE definition (Heikki Krogerus)
    - Add QEMU top-level IDs for (sub)vendor & device (Robin H. Johnson)
    - Fix broken URL for Dell biosdevname (Naga Venkata Sai Indubhaskar Jupudi)"

    * tag 'pci-v4.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (94 commits)
    PCI: Add PCI_CLASS_SERIAL_USB_DEVICE definition
    PCI: designware: Add driver for prototyping kits based on ARC SDP
    PCI: designware: Add default link up check if sub-driver doesn't override
    PCI: designware: Add generic dw_pcie_wait_for_link()
    PCI: Cleanup pci/pcie/Kconfig whitespace
    PCI: Simplify pci_create_attr() control flow
    PCI: Don't leak memory if sysfs_create_bin_file() fails
    PCI: Simplify sysfs ROM cleanup
    PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY
    MIPS: Loongson 3: Keep CPU physical (not virtual) addresses in shadow ROM resource
    MIPS: Loongson 3: Use temporary struct resource * to avoid repetition
    ia64/PCI: Keep CPU physical (not virtual) addresses in shadow ROM resource
    ia64/PCI: Use ioremap() instead of open-coded equivalent
    ia64/PCI: Use temporary struct resource * to avoid repetition
    PCI: Clean up pci_map_rom() whitespace
    PCI: Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs
    PCI: thunder: Add driver for ThunderX-pass{1,2} on-chip devices
    PCI: thunder: Add PCIe host driver for ThunderX processors
    PCI: generic: Expose pci_host_common_probe() for use by other drivers
    PCI: generic: Add pci_host_common_probe(), based on gen_pci_probe()
    ...

    Linus Torvalds
     

14 Mar, 2016

1 commit

  • This patch updates all instances of csum_tcpudp_magic and
    csum_tcpudp_nofold to reflect the types that are usually used as the source
    inputs. For example the protocol field is populated based on nexthdr which
    is actually an unsigned 8 bit value. The length is usually populated based
    on skb->len which is an unsigned integer.

    This addresses an issue in which the IPv6 function csum_ipv6_magic was
    generating a checksum using the full 32b of skb->len while
    csum_tcpudp_magic was only using the lower 16 bits. As a result we could
    run into issues when attempting to adjust the checksum as there was no
    protocol agnostic way to update it.

    With this change the value is still truncated as many architectures use
    "(len + proto) << 8", however this truncation only occurs for values
    greater than 16776960 in length and as such is unlikely to occur as we stop
    the inner headers at ~64K in size.

    I did have to make a few minor changes in the arm, mn10300, nios2, and
    score versions of the function in order to support these changes as they
    were either using things such as an OR to combine the protocol and length,
    or were using ntohs to convert the length which would have truncated the
    value.

    I also updated a few spots in terms of whitespace and type differences for
    the addresses. Most of this was just to make sure all of the definitions
    were in sync going forward.

    Signed-off-by: Alexander Duyck
    Signed-off-by: David S. Miller

    Alexander Duyck
     

09 Mar, 2016

1 commit


08 Mar, 2016

1 commit

  • For a long time all architectures implement the pci_dma_* functions using
    the generic DMA API, and they all use the same header to do so.

    Move this header, pci-dma-compat.h, to include/linux and include it from
    the generic pci.h instead of having each arch duplicate this include.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Bjorn Helgaas

    Christoph Hellwig
     

19 Feb, 2016

1 commit

  • We try to enforce protection keys in software the same way that we
    do in hardware. (See long example below).

    But, we only want to do this when accessing our *own* process's
    memory. If GDB set PKRU[6].AD=1 (disable access to PKEY 6), then
    tried to PTRACE_POKE a target process which just happened to have
    some mprotect_pkey(pkey=6) memory, we do *not* want to deny the
    debugger access to that memory. PKRU is fundamentally a
    thread-local structure and we do not want to enforce it on access
    to _another_ thread's data.

    This gets especially tricky when we have workqueues or other
    delayed-work mechanisms that might run in a random process's context.
    We can check that we only enforce pkeys when operating on our *own* mm,
    but delayed work gets performed when a random user context is active.
    We might end up with a situation where a delayed-work gup fails when
    running randomly under its "own" task but succeeds when running under
    another process. We want to avoid that.

    To avoid that, we use the new GUP flag: FOLL_REMOTE and add a
    fault flag: FAULT_FLAG_REMOTE. They indicate that we are
    walking an mm which is not guranteed to be the same as
    current->mm and should not be subject to protection key
    enforcement.

    Thanks to Jerome Glisse for pointing out this scenario.

    Signed-off-by: Dave Hansen
    Reviewed-by: Thomas Gleixner
    Cc: Alexey Kardashevskiy
    Cc: Andrea Arcangeli
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Andy Lutomirski
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Boaz Harrosh
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Dan Williams
    Cc: Dave Chinner
    Cc: Dave Hansen
    Cc: David Gibson
    Cc: Denys Vlasenko
    Cc: Dominik Dingel
    Cc: Dominik Vogt
    Cc: Eric B Munson
    Cc: Geliang Tang
    Cc: Guan Xuetao
    Cc: H. Peter Anvin
    Cc: Heiko Carstens
    Cc: Hugh Dickins
    Cc: Jan Kara
    Cc: Jason Low
    Cc: Jerome Marchand
    Cc: Joerg Roedel
    Cc: Kirill A. Shutemov
    Cc: Konstantin Khlebnikov
    Cc: Laurent Dufour
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Matthew Wilcox
    Cc: Mel Gorman
    Cc: Michael Ellerman
    Cc: Michal Hocko
    Cc: Mikulas Patocka
    Cc: Minchan Kim
    Cc: Oleg Nesterov
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: Sasha Levin
    Cc: Shachar Raindel
    Cc: Vlastimil Babka
    Cc: Xie XiuQi
    Cc: iommu@lists.linux-foundation.org
    Cc: linux-arch@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mm@kvack.org
    Cc: linux-s390@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Ingo Molnar

    Dave Hansen
     

18 Feb, 2016

1 commit

  • Today, for normal faults and page table walks, we check the VMA
    and/or PTE to ensure that it is compatible with the action. For
    instance, if we get a write fault on a non-writeable VMA, we
    SIGSEGV.

    We try to do the same thing for protection keys. Basically, we
    try to make sure that if a user does this:

    mprotect(ptr, size, PROT_NONE);
    *ptr = foo;

    they see the same effects with protection keys when they do this:

    mprotect(ptr, size, PROT_READ|PROT_WRITE);
    set_pkey(ptr, size, 4);
    wrpkru(0xffffff3f); // access disable pkey 4
    *ptr = foo;

    The state to do that checking is in the VMA, but we also
    sometimes have to do it on the page tables only, like when doing
    a get_user_pages_fast() where we have no VMA.

    We add two functions and expose them to generic code:

    arch_pte_access_permitted(pte_flags, write)
    arch_vma_access_permitted(vma, write)

    These are, of course, backed up in x86 arch code with checks
    against the PTE or VMA's protection key.

    But, there are also cases where we do not want to respect
    protection keys. When we ptrace(), for instance, we do not want
    to apply the tracer's PKRU permissions to the PTEs from the
    process being traced.

    Signed-off-by: Dave Hansen
    Reviewed-by: Thomas Gleixner
    Cc: Alexey Kardashevskiy
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Andy Lutomirski
    Cc: Aneesh Kumar K.V
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Boaz Harrosh
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Dan Williams
    Cc: Dave Hansen
    Cc: David Gibson
    Cc: David Hildenbrand
    Cc: David Vrabel
    Cc: Denys Vlasenko
    Cc: Dominik Dingel
    Cc: Dominik Vogt
    Cc: Guan Xuetao
    Cc: H. Peter Anvin
    Cc: Heiko Carstens
    Cc: Hugh Dickins
    Cc: Jason Low
    Cc: Jerome Marchand
    Cc: Juergen Gross
    Cc: Kirill A. Shutemov
    Cc: Laurent Dufour
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Matthew Wilcox
    Cc: Mel Gorman
    Cc: Michael Ellerman
    Cc: Michal Hocko
    Cc: Mikulas Patocka
    Cc: Minchan Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: Sasha Levin
    Cc: Shachar Raindel
    Cc: Stephen Smalley
    Cc: Toshi Kani
    Cc: Vlastimil Babka
    Cc: linux-arch@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mm@kvack.org
    Cc: linux-s390@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Link: http://lkml.kernel.org/r/20160212210219.14D5D715@viggo.jf.intel.com
    Signed-off-by: Ingo Molnar

    Dave Hansen
     

06 Feb, 2016

1 commit


30 Jan, 2016

1 commit

  • Set IORESOURCE_SYSTEM_RAM in flags of resource ranges with
    "System RAM", "Kernel code", "Kernel data", and "Kernel bss".

    Note that:

    - IORESOURCE_SYSRAM (i.e. modifier bit) is set in flags when
    IORESOURCE_MEM is already set. IORESOURCE_SYSTEM_RAM is defined
    as (IORESOURCE_MEM|IORESOURCE_SYSRAM).

    - Some archs do not set 'flags' for children nodes, such as
    "Kernel code". This patch does not change 'flags' in this
    case.

    Signed-off-by: Toshi Kani
    Signed-off-by: Borislav Petkov
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Luis R. Rodriguez
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Toshi Kani
    Cc: linux-arch@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-mm
    Cc: linux-parisc@vger.kernel.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: sparclinux@vger.kernel.org
    Link: http://lkml.kernel.org/r/1453841853-11383-7-git-send-email-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Toshi Kani
     

26 Jan, 2016

1 commit

  • As we want gpio_chip .get() calls to be able to return negative
    error codes and propagate to drivers, we need to go over all
    drivers and make sure their return values are clamped to [0,1].
    We do this by using the ret = !!(val) design pattern.

    Cc: Guan Xuetao
    Signed-off-by: Linus Walleij

    Linus Walleij
     

21 Jan, 2016

1 commit

  • Move the generic implementation to now that all
    architectures support it and remove the HAVE_DMA_ATTR Kconfig symbol now
    that everyone supports them.

    [valentinrothberg@gmail.com: remove leftovers in Kconfig]
    Signed-off-by: Christoph Hellwig
    Cc: "David S. Miller"
    Cc: Aurelien Jacquiot
    Cc: Chris Metcalf
    Cc: David Howells
    Cc: Geert Uytterhoeven
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Helge Deller
    Cc: James Hogan
    Cc: Jesper Nilsson
    Cc: Koichi Yasutake
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Mikael Starvik
    Cc: Steven Miao
    Cc: Vineet Gupta
    Cc: Christian Borntraeger
    Cc: Joerg Roedel
    Cc: Sebastian Ott
    Signed-off-by: Valentin Rothberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

17 Jan, 2016

1 commit

  • As illustrated by commit a3afe70b83fd ("[S390] latencytop s390
    support."), HAVE_LATENCYTOP_SUPPORT is defined by an architecture to
    advertise an implementation of save_stack_trace_tsk.

    However, as of 9212ddb5eada ("stacktrace: provide save_stack_trace_tsk()
    weak alias") a dummy implementation is provided if STACKTRACE=y. Given
    that LATENCYTOP already depends on STACKTRACE_SUPPORT and selects
    STACKTRACE, we can remove HAVE_LATENCYTOP_SUPPORT altogether.

    Signed-off-by: Will Deacon
    Acked-by: Heiko Carstens
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: James Hogan
    Cc: Michal Simek
    Cc: Helge Deller
    Acked-by: Michael Ellerman
    Cc: "David S. Miller"
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Deacon
     

09 Jan, 2016

1 commit

  • Let all the archs that implement devmem_is_allowed() opt-in to a common
    definition of CONFIG_STRICT_DEVM in lib/Kconfig.debug.

    Cc: Kees Cook
    Cc: Russell King
    Cc: Will Deacon
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Andrew Morton
    Cc: Greg Kroah-Hartman
    Cc: "David S. Miller"
    Acked-by: Catalin Marinas
    Acked-by: Heiko Carstens
    [heiko: drop 'default y' for s390]
    Acked-by: Ingo Molnar
    Suggested-by: Arnd Bergmann
    Signed-off-by: Dan Williams

    Dan Williams
     

12 Nov, 2015

1 commit

  • …erry.reding/linux-pwm

    Pull pwm updates from Thierry Reding:
    "This round contains a couple of new drivers for the Marvell Berlin
    family of SoCs, various SoCs from Renesas and Broadcom as well as the
    backlight PWM present on MediaTek SoCs.

    Further existing drivers are extended to support a wider range of
    hardware.

    The remaining patches are minor fixes and cleanups across the board.

    Note that one of the patches included in this pull request is against
    arch/unicore32. I've included it here because I couldn't get a
    response from Guan Xuetao and I consider the change low-risk.
    Equivalent patches have been merged and tested in Samsung and PXA
    trees. The goal is to finally get rid of legacy code paths that have
    repeatedly been causing headaches"

    * tag 'pwm/for-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (24 commits)
    pwm: sunxi: Fix whitespace issue
    pwm: sysfs: Make use of the DEVICE_ATTR_[RW][WO] macro's
    pwm: sysfs: Remove unnecessary temporary variable
    unicore32: nb0916: Use PWM lookup table
    pwm: pwm-rcar: Revise the device tree binding document about compatible
    pwm: Return -ENODEV if no PWM lookup match is found
    pwm: sun4i: Add support for PWM controller on sun5i SoCs
    pwm: Set enable state properly on failed call to enable
    pwm: lpss: Add support for runtime PM
    pwm: lpss: Add more Intel Broxton IDs
    pwm: lpss: Support all four PWMs on Intel Broxton
    pwm: lpss: Add support for multiple PWMs
    pwm-pca9685: enable ACPI device found on Galileo Gen2
    pwm: Add MediaTek display PWM driver support
    dt-bindings: pwm: Add MediaTek display PWM bindings
    pwm: tipwmss: Enable on TI DRA7x and AM437x
    pwm: atmel-hlcdc: add sama5d2 SoC support.
    pwm: Add Broadcom BCM7038 PWM controller support
    Documentation: dt: add Broadcom BCM7038 PWM controller binding
    pwm: Add support for R-Car PWM Timer
    ...

    Linus Torvalds