21 Jan, 2016

2 commits

  • The SMD driver is reading and writing chunks of data to iomem, and
    there's an __iowrite32_copy() function for the writing part, but no
    __ioread32_copy() function for the reading part. This series adds
    __ioread32_copy() and uses it in two places.

    This patch (of 4):

    The frv port uses compiler builtins, __builtin_read*(), for the I/O read
    routines. Unfortunately, these don't accept const void pointers although
    the generic ASM implementations do, so generic code passing const pointers
    to these APIs cause compilers to emit warnings. Add wrapper functions
    that cast away the const to avoid the warnings.

    Signed-off-by: Stephen Boyd
    Cc: David Howells
    Cc:
    Cc: Bjorn Andersson
    Cc: Hauke Mehrtens
    Cc: Paul Walmsley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • Commits 21f55b018ba5 ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE
    have same value for all architectures") and ef58978f1eaa ("mm: define
    MADV_FREE for some arches") both defined MADV_FREE, but did not use the
    same values. This results in build errors such as

    ./arch/alpha/include/uapi/asm/mman.h:53:0: error: "MADV_FREE" redefined
    ./arch/alpha/include/uapi/asm/mman.h:50:0: note: this is the location of the previous definition

    for the affected architectures.

    Fixes: 21f55b018ba5 ("arch/*/include/uapi/asm/mman.h: : let MADV_FREE have same value for all architectures")
    Fixes: ef58978f1eaa ("mm: define MADV_FREE for some arches")
    Signed-off-by: Guenter Roeck
    Cc: Chen Gang
    Cc: Minchan Kim
    Acked-by: Helge Deller [parisc]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Guenter Roeck
     

20 Jan, 2016

3 commits

  • …linux-platform-drivers-x86

    Pull x86 platform driver updates from Darren Hart:
    "Add intel punit and telemetry driver for APL SoCs.
    Add intel-hid driver for various laptop hotkey support.
    Add asus-wireless radio control driver.
    Keyboard backlight support/improvements for ThinkPads, Vaio, and Toshiba.
    Several hotkey related fixes and improvements for dell and toshiba.
    Fix oops on dual GPU Macs in apple-gmux.
    A few new device IDs and quirks.
    Various minor config related build issues and cleanups.

    surface pro 4:
    - fix compare_const_fl.cocci warnings
    - Add support for Surface Pro 4 Buttons

    platform/x86:
    - Add Intel Telemetry Debugfs interfaces
    - Add Intel telemetry platform device
    - Add Intel telemetry platform driver
    - Add Intel Telemetry Core Driver
    - add NULL check for input parameters
    - add Intel P-Unit mailbox IPC driver
    - update acpi resource structure for Punit

    thinkpad_acpi:
    - Add support for keyboard backlight

    dell-wmi:
    - Process only one event on devices with interface version 0
    - Check if Dell WMI descriptor structure is valid
    - Improve unknown hotkey handling
    - Use a C99-style array for bios_to_linux_keycode

    tc1100-wmi:
    - fix build warning when CONFIG_PM not enabled

    asus-wireless:
    - Add ACPI HID ATK4001
    - Add Asus Wireless Radio Control driver

    asus-wmi:
    - drop to_platform_driver macro

    intel-hid:
    - new hid event driver for hotkeys

    sony-laptop:
    - Keyboard backlight control for some Vaio Fit models

    ideapad-laptop:
    - Add Lenovo ideapad Y700-17ISK to no_hw_rfkill dmi list

    apple-gmux:
    - Assign apple_gmux_data before registering

    toshiba_acpi:
    - Add rfkill dependency to ACPI_TOSHIBA entry
    - Fix keyboard backlight sysfs entries not being updated
    - Add WWAN RFKill support
    - Add support for WWAN devices
    - Fix blank screen at boot if transflective backlight is supported
    - Propagate the hotkey value via genetlink

    toshiba_bluetooth:
    - Add missing newline in toshiba_bluetooth_present function"

    * tag 'platform-drivers-x86-v4.5-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: (29 commits)
    surface pro 4: fix compare_const_fl.cocci warnings
    surface pro 4: Add support for Surface Pro 4 Buttons
    platform:x86: Add Intel Telemetry Debugfs interfaces
    platform:x86: Add Intel telemetry platform device
    platform:x86: Add Intel telemetry platform driver
    platform/x86: Add Intel Telemetry Core Driver
    intel_punit_ipc: add NULL check for input parameters
    thinkpad_acpi: Add support for keyboard backlight
    dell-wmi: Process only one event on devices with interface version 0
    dell-wmi: Check if Dell WMI descriptor structure is valid
    tc1100-wmi: fix build warning when CONFIG_PM not enabled
    asus-wireless: Add ACPI HID ATK4001
    platform/x86: Add Asus Wireless Radio Control driver
    asus-wmi: drop to_platform_driver macro
    intel-hid: new hid event driver for hotkeys
    Keyboard backlight control for some Vaio Fit models
    platform/x86: Add rfkill dependency to ACPI_TOSHIBA entry
    platform:x86: add Intel P-Unit mailbox IPC driver
    intel_pmc_ipc: update acpi resource structure for Punit
    ideapad-laptop: Add Lenovo ideapad Y700-17ISK to no_hw_rfkill dmi list
    ...

    Linus Torvalds
     
  • Intel PM Telemetry is a software mechanism via which various SoC
    PM and performance related parameters like PM counters, firmware
    trace verbosity, the status of different devices inside the SoC, etc.
    can be monitored and analyzed. The different samples that may be
    monitored can be configured at runtime via exported APIs.

    This patch adds the telemetry core driver that implements basic
    exported APIs.

    Signed-off-by: Souvik Kumar Chakravarty
    Signed-off-by: Darren Hart

    Souvik Kumar Chakravarty
     
  • This driver provides support for P-Unit mailbox IPC on Intel platforms.
    The heart of the P-Unit is the Foxton microcontroller and its firmware,
    which provide mailbox interface for power management usage.

    Signed-off-by: Qipeng Zha
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Darren Hart

    Qipeng Zha
     

19 Jan, 2016

11 commits

  • Pull virtio barrier rework+fixes from Michael Tsirkin:
    "This adds a new kind of barrier, and reworks virtio and xen to use it.

    Plus some fixes here and there"

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (44 commits)
    checkpatch: add virt barriers
    checkpatch: check for __smp outside barrier.h
    checkpatch.pl: add missing memory barriers
    virtio: make find_vqs() checkpatch.pl-friendly
    virtio_balloon: fix race between migration and ballooning
    virtio_balloon: fix race by fill and leak
    s390: more efficient smp barriers
    s390: use generic memory barriers
    xen/events: use virt_xxx barriers
    xen/io: use virt_xxx barriers
    xenbus: use virt_xxx barriers
    virtio_ring: use virt_store_mb
    sh: move xchg_cmpxchg to a header by itself
    sh: support 1 and 2 byte xchg
    virtio_ring: update weak barriers to use virt_xxx
    Revert "virtio_ring: Update weak barriers to use dma_wmb/rmb"
    asm-generic: implement virt_xxx memory barriers
    x86: define __smp_xxx
    xtensa: define __smp_xxx
    tile: define __smp_xxx
    ...

    Linus Torvalds
     
  • Pull arch/tile updates from Chris Metcalf:
    "This is a grab bag of changes that includes some NOHZ and
    context-tracking related changes, some debugging improvements,
    JUMP_LABEL support, and some fixes for tilepro allmodconfig support.

    We also remove the now-unused node_has_online_mem() definitions both
    for tile's asm/topology.h as well as in linux/topology.h itself"

    * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    numa: remove stale node_has_online_mem() define
    arch/tile: move user_exit() to early kernel entry sequence
    tile: fix bug in setting PT_FLAGS_DISABLE_IRQ on kernel entry
    tile: fix tilepro casts for readl, writel, etc
    tile: fix a -Wframe-larger-than warning
    tile: include the syscall number in the backtrace
    MAINTAINERS: add git URL for tile
    arch/tile: adopt prepare_exit_to_usermode() model from x86
    tile/jump_label: add jump label support for TILE-Gx
    tile: define a macro ktext_writable_addr to get writable kernel text address

    Linus Torvalds
     
  • Pull AVR32 updates from Hans-Christian Noren Egtvedt.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
    mmc: atmel: get rid of struct mci_dma_data
    mmc: atmel-mci: restore dma on AVR32
    avr32: wire up missing syscalls
    avr32: wire up accept4 syscall

    Linus Torvalds
     
  • Pull more networking fixes from David Miller:

    1) Fix brcmfmac build with older gcc, from Arend van Spriel.

    2) IRQ values unintentionally truncated to u8 in mlx5 driver, from
    Doron Tsur.

    3) Fix build warnings wrt tcp cgroup changes, from Geert Uytterhoeven.

    4) Limit deep recursion in ovs stack, from Hannes Frederic Sowa.

    5) at803x phy driver bug fixes from, Martin Blumenstingl.

    6) Fix TSO handling in hns driver, from Daode Huang

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (22 commits)
    ovs: limit ovs recursions in ovs_execute_actions to not corrupt stack
    team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid
    net: hns: bug fix about hisilicon TSO BD mode
    brcmfmac: fix BRCMF_FW_NVRAM_DEF macro for older gcc compilers
    net: phy: at803x: Add the interrupt register bit definitions
    net: phy: at803x: Clean up duplicate register definitions
    net: phy: at803x: Allow specifying the RGMII RX clock delay via phy mode
    net: phy: at803x: Don't set gbit features for the AR8030 phy
    arm64: bpf: add extra pass to handle faulty codegen
    arm64: insn: remove BUG_ON from codegen
    sctp: the temp asoc's transports should not be hashed/unhashed
    net/mlx5_core: Fix trimming down IRQ number
    tcp_memcontrol: Forward declare cgroup_subsys and mem_cgroup stucts
    batman-adv: Drop immediate orig_node free function
    batman-adv: Drop immediate batadv_hard_iface free function
    batman-adv: Drop immediate neigh_ifinfo free function
    batman-adv: Drop immediate batadv_hardif_neigh_node free function
    batman-adv: Drop immediate batadv_neigh_node free function
    batman-adv: Drop immediate batadv_orig_ifinfo free function
    batman-adv: Avoid recursive call_rcu for batadv_nc_node
    ...

    Linus Torvalds
     
  • This isn't used anywhere, so delete it.

    Looks like the last usage (in x86-specific code) was removed by Tejun
    in 2011 in commit bd6709a91a59 ("x86, NUMA: Make 32bit use common NUMA
    init path").

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • This ensures that we always notify context tracking that we
    have exited from user space no matter how we enter the kernel.
    It is similar to how arm64 handles context tracking, for example.

    This allows the removal of all the exception_enter() calls that
    were added in commit 49e4e15619cd ("tile: support CONTEXT_TRACKING and
    thus NOHZ_FULL").

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • This flag value is saved in ptregs and used to decide whether
    to disable irqs when returning from the kernel. Commit 1168df528fe4
    ("tile: don't assume user privilege is zero") performed a bad
    merge from some KVM-enabled code that had not yet been upstreamed.

    The only issue with the old code is that we will read the interrupt
    mask in more conditions than we need to (e.g., coming from user
    space when user space has the Interrupt Critical Section bit set, or
    coming from a guest kernel), which is a slow multi-cycle operation.
    This change saves those few cycles in the common case.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • Missing parentheses could cause an argument of the form
    "integer + pointer" to get cast to "(long)integer + pointer"
    and remain a pointer type, causing compiler warnings.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • The warning occurs in setup.c, where it is known that it can't be
    a problem, but it's still a good idea to silence the warning.
    The onstack array is converted from an s32 to a u8, which still
    is plenty of range for the values being managed there.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • This information is easily available in the backtrace data and can
    be helpful when trying to figure out the backtrace, particularly
    if we're early in kernel entry or late in kernel exit.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • This change is a prerequisite change for TASK_ISOLATION but also
    stands on its own for readability and maintainability. The existing
    tile do_work_pending() was called in a loop from assembly on
    the slow path; this change moves the loop into C code as well.
    For the x86 version see commit c5c46f59e4e7 ("x86/entry: Add new,
    comprehensible entry and exit handlers written in C").

    This change exposes a pre-existing bug on the older tilepro platform;
    the singlestep processing is done last, but on tilepro (unlike tilegx)
    we enable interrupts while doing that processing, so we could in
    theory miss a signal or other asynchronous event. A future change
    could fix this by breaking the singlestep work into a "prepare"
    step done in the main loop, and a "trigger" step done after exiting
    the loop. Since this change is intended as purely a restructuring
    change, we call out the bug explicitly now, but don't yet fix it.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     

18 Jan, 2016

7 commits

  • Code generation functions in arch/arm64/kernel/insn.c previously
    BUG_ON invalid parameters. Following change of that behavior, now we
    need to handle the error case where AARCH64_BREAK_FAULT is returned.

    Instead of error-handling on every emit() in JIT, we add a new
    validation pass at the end of JIT compilation. There's no point in
    running JITed code at run-time only to trap due to AARCH64_BREAK_FAULT.
    Instead, we drop this failed JIT compilation and allow the system to
    gracefully fallback on the BPF interpreter.

    Signed-off-by: Zi Shen Lim
    Suggested-by: Alexei Starovoitov
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Zi Shen Lim
     
  • During code generation, we used to BUG_ON unknown/unsupported encoding
    or invalid parameters.

    Instead, now we report these as errors and simply return the
    instruction AARCH64_BREAK_FAULT. Users of these codegen helpers should
    check for and handle this failure condition as appropriate.

    Otherwise, unhandled codegen failure will result in trapping at
    run-time due to AARCH64_BREAK_FAULT, which is arguably better than a
    BUG_ON.

    Signed-off-by: Zi Shen Lim
    Acked-by: Will Deacon
    Signed-off-by: David S. Miller

    Zi Shen Lim
     
  • Pull drm updates from Dave Airlie:
    "This is the main drm pull request for 4.5. I don't think I've missed
    anything too major, I'm mostly back at work now but I'll probably get
    some sleep in 5 years time.

    Summary:

    New drivers:
    - etnaviv:

    GPU driver for the 3D core on the Vivante core used in numerous
    ARM boards.

    Highlights:

    Core:
    - Atomic suspend/resume helpers
    - Move the headers to using userspace friendlier types.
    - Documentation updates
    - Lots of struct_mutex removal.
    - Bunch of DP MST fixes from AMD.

    Panel:
    - More DSI helpers
    - Support for some new basic panels

    i915:
    - Basic Kabylake support
    - DP link training and detect code refactoring
    - fbc/psr fixes
    - FIFO underrun fixes
    - SDE interrupt handling fixes
    - dma-buf/fence support in pageflip path.
    - GPU side for MST audio support

    radeon/amdgpu:
    - Drop UMS support
    - GPUVM/Scheduler optimisations
    - Initial Powerplay support for Tonga/Fiji/CZ/ST
    - ACP audio prerequisites

    nouveau:
    - GK20a instmem improvements
    - PCIE link speed change support

    msm:
    - DSI support for msm8960/apq8064

    tegra:
    - Host1X support for Tegra210 SoC

    vc4:
    - 3D acceleration support

    armada:
    - Get rid of struct mutex

    tda998x:
    - Atomic modesetting support
    - TMDS clock limitations

    omapdrm:
    - Atomic modesetting support
    - improved TILER performance

    rockchip:
    - RK3036 VOP support
    - Atomic modesetting support
    - Synopsys DW MIPI DSI support

    exynos:
    - Runtime PM support
    - of_graph binding for DP panels
    - Cleanup of IPP code
    - Configurable plane support
    - Kernel panic fixes at release time"

    * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (711 commits)
    drm/fb_cma_helper: Remove implicit call to disable_unused_functions
    drm/amdgpu: add missing irq.h include
    drm/vmwgfx: Fix a width / pitch mismatch on framebuffer updates
    drm/vmwgfx: Fix an incorrect lock check
    drm: nouveau: fix nouveau_debugfs_init prototype
    drm/nouveau/pci: fix check in nvkm_pcie_set_link
    drm/amdgpu: validate duplicates first
    drm/amdgpu: move VM page tables to the LRU end on CS v2
    drm/ttm: add ttm_bo_move_to_lru_tail function v2
    drm/ttm: fix adding foreign BOs to the swap LRU
    drm/ttm: fix adding foreign BOs to the LRU during init v2
    drm/radeon: use kobj_to_dev()
    drm/amdgpu: use kobj_to_dev()
    drm/amdgpu/cz: force vce clocks when sclks are forced
    drm/amdgpu/cz: force uvd clocks when sclks are forced
    drm/amdgpu/cz: add code to enable forcing VCE clocks
    drm/amdgpu/cz: add code to enable forcing UVD clocks
    drm/amdgpu: fix lost sync_to if scheduler is enabled.
    drm/amd/powerplay: fix static checker warning for return meaningless value.
    drm/sysfs: use kobj_to_dev()
    ...

    Linus Torvalds
     
  • Pull parsic updates from Helge Deller:
    "This patchset includes two major fixes which are both scheduled for
    stable:

    First, __ARCH_SI_PREAMBLE_SIZE was defined with a wrong value.
    Second, huge page pte and TLB changes needed protection with a
    spinlock. Other than that there are just some trivial optimizations
    and cleanups"

    * 'parisc-4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Protect huge page pte changes with spinlocks
    parisc: Imporove debug info about space registers and TLB configuration
    parisc: Drop parisc-specific NSIGTRAP define
    parisc: Fix __ARCH_SI_PREAMBLE_SIZE
    parisc: Reduce overhead of parisc_requires_coherency()
    parisc: Initialize PCI bridge cache line and default latency

    Linus Torvalds
     
  • Merge second patch-bomb from Andrew Morton:

    - more MM stuff:

    - Kirill's page-flags rework

    - Kirill's now-allegedly-fixed THP rework

    - MADV_FREE implementation

    - DAX feature work (msync/fsync). This isn't quite complete but DAX
    is new and it's good enough and the guys have a handle on what
    needs to be done - I expect this to be wrapped in the next week or
    two.

    - some vsprintf maintenance work

    - various other misc bits

    * emailed patches from Andrew Morton : (145 commits)
    printk: change recursion_bug type to bool
    lib/vsprintf: factor out %pN[F] handler as netdev_bits()
    lib/vsprintf: refactor duplicate code to special_hex_number()
    printk-formats.txt: remove unimplemented %pT
    printk: help pr_debug and pr_devel to optimize out arguments
    lib/test_printf.c: test dentry printing
    lib/test_printf.c: add test for large bitmaps
    lib/test_printf.c: account for kvasprintf tests
    lib/test_printf.c: add a few number() tests
    lib/test_printf.c: test precision quirks
    lib/test_printf.c: check for out-of-bound writes
    lib/test_printf.c: don't BUG
    lib/kasprintf.c: add sanity check to kvasprintf
    lib/vsprintf.c: warn about too large precisions and field widths
    lib/vsprintf.c: help gcc make number() smaller
    lib/vsprintf.c: expand field_width to 24 bits
    lib/vsprintf.c: eliminate potential race in string()
    lib/vsprintf.c: move string() below widen_string()
    lib/vsprintf.c: pull out padding code from dentry_name()
    printk: do cond_resched() between lines while outputting to consoles
    ...

    Linus Torvalds
     
  • Pull GPIO updates from Linus Walleij:
    "Here is the bulk of GPIO changes for v4.5.

    Notably there are big refactorings mostly by myself, aimed at getting
    the gpio_chip into a shape that makes me believe I can proceed to
    preserve state for a proper userspace ABI (character device) that has
    already been proposed once, but resulted in the feedback that I need
    to go back and restructure stuff. So I've been restructuring stuff.
    On the way I ran into brokenness (return code from the get_value()
    callback) and had to fix it. Also, refactored generic GPIO to be
    simpler.

    Some of that is still waiting to trickle down from the subsystems all
    over the kernel that provide random gpio_chips, I've touched every
    single GPIO driver in the kernel now, oh man I didn't know I was
    responsible for so much...

    Apart from that we're churning along as usual.

    I took some effort to test and retest so it should merge nicely and we
    shook out a couple of bugs in -next.

    Infrastructural changes:

    - In struct gpio_chip, rename the .dev node to .parent to better
    reflect the fact that this is not the GPIO struct device
    abstraction. We will add that soon so this would be totallt
    confusing.

    - It was noted that the driver .get_value() callbacks was sometimes
    reporting negative -ERR values to the gpiolib core, expecting them
    to be propagated to consumer gpiod_get_value() and gpio_get_value()
    calls. This was not happening, so as there was a mess of drivers
    returning negative errors and some returning "anything else than
    zero" to indicate that a line was active. As some would have bit
    31 set to indicate "line active" it clashed with negative error
    codes. This is fixed by the largeish series clamping values in all
    drivers with !!value to [0,1] and then augmenting the code to
    propagate error codes to consumers. (Includes some ACKed patches
    in other subsystems.)

    - Add a void *data pointer to struct gpio_chip. The container_of()
    design pattern is indeed very nice, but we want to reform the
    struct gpio_chip to be a non-volative, stateless business, and keep
    states internal to the gpiolib to be able to hold on to the state
    when adding a proper userspace ABI (character device) further down
    the road. To achieve this, drivers need a handle at the internal
    state that is not dependent on their struct gpio_chip() so we add
    gpiochip_add_data() and gpiochip_get_data() following the pattern
    of many other subsystems. All the "use gpiochip data pointer"
    patches transforms drivers to this scheme.

    - The Generic GPIO chip header has been merged into the general
    header, and the custom header for that
    removed. Instead of having a separate mm_gpio_chip struct for
    these generic drivers, merge that into struct gpio_chip,
    simplifying the code and removing the need for separate and
    confusing includes.

    Misc improvements:

    - Stabilize the way GPIOs are looked up from the ACPI legacy
    specification.

    - Incremental driver features for PXA, PCA953X, Lantiq (patches from
    the OpenWRT community), RCAR, Zynq, PL061, 104-idi-48

    New drivers:

    - Add a GPIO chip to the ALSA SoC AC97 driver.

    - Add a new Broadcom NSP SoC driver (this lands in the pinctrl dir,
    but the branch is merged here too to account for infrastructural
    changes).

    - The sx150x driver now supports the sx1502"

    * tag 'gpio-v4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (220 commits)
    gpio: generic: make bgpio_pdata always visible
    gpiolib: fix chip order in gpio list
    gpio: mpc8xxx: Do not use gpiochip_get_data() in mpc8xxx_gpio_save_regs()
    gpio: mm-lantiq: Do not use gpiochip_get_data() in ltq_mm_save_regs()
    gpio: brcmstb: Allow building driver for BMIPS_GENERIC
    gpio: brcmstb: Set endian flags for big-endian MIPS
    gpio: moxart: fix build regression
    gpio: xilinx: Do not use gpiochip_get_data() in xgpio_save_regs()
    leds: pca9532: use gpiochip data pointer
    leds: tca6507: use gpiochip data pointer
    hid: cp2112: use gpiochip data pointer
    bcma: gpio: use gpiochip data pointer
    avr32: gpio: use gpiochip data pointer
    video: fbdev: via: use gpiochip data pointer
    gpio: pch: Optimize pch_gpio_get()
    Revert "pinctrl: lantiq: Implement gpio_chip.to_irq"
    pinctrl: nsp-gpio: use gpiochip data pointer
    pinctrl: vt8500-wmt: use gpiochip data pointer
    pinctrl: exynos5440: use gpiochip data pointer
    pinctrl: at91-pio4: use gpiochip data pointer
    ...

    Linus Torvalds
     
  • Pull sound updates from Takashi Iwai:
    "We've had quite busy weeks in this cycle. Looking at ALSA core, the
    significant changes are a few fixes wrt timer and sequencer ioctls
    that have been revealed by fuzzer recently. Other than that, ASoC
    core got a few updates about DAI link handling, but these are rather
    straightforward refactoring.

    In drivers scene, ASoC received quite lots of new drivers in addition
    to bunch of updates for still ongoing Intel Skylake support and
    topology API. HD-audio gained a new HDMI/DP hotplug notification via
    component. FireWire got a pile of code refactoring/updates with
    SCS.1x driver integration.

    More highlights are shown below.

    [ NOTE: this contains also many commits for DRM. This is due to the
    pull of drm stable branch into sound tree, as the base of i915 audio
    component work for HD-audio. The highlights below don't contain
    these DRM changes, as these are supposed to be pulled via drm tree
    in anyway sooner or later. ]

    Core:
    - Handful fixes to harden ALSA timer and sequencer ioctls against
    races reported by syzkaller fuzzer
    - Irq description string can be unique to each card; only for
    HD-audio for now

    ASoC:
    - Conversion of the array of DAI links to a list for supporting
    dynamically adding and removing DAI links
    - Topology API enhancements to make everything more component based
    and being able to specify PCM links via topology
    - Some more fixes for the topology code, though it is still not final
    and ready for enabling in production; we really need to get to the
    point where that can be done
    - A pile of changes for Intel SkyLake drivers which hopefully deliver
    some useful initial functionality for systems with this chipset,
    though there is more work still to come
    - Lots of new features and cleanups for the Renesas drivers
    - ANC support for WM5110
    - New drivers: Imagination Technologies IPs, Atmel class D speaker,
    Cirrus CS47L24 and WM1831, Dialog DA7128, Realtek RT5659 and
    RT56156, Rockchip RK3036, TI PC3168A, and AMD ACP
    - Rename PCM1792a driver to be generic pcm179x

    HD-Audio:
    - Use audio component for i915 HDMI/DP hotplug handling
    - On-demand binding with i915 driver
    - bdl_pos_adj parameter adjustment for Baytrail controllers
    - Enable power_save_node for CX20722; this shouldn't lead to
    regression, hopefully
    - Kabylake HDMI/DP codec support
    - Quirks for Lenovo E50-80, Dell Latitude E-series, and other Dell
    machines
    - A few code refactoring

    FireWire:
    - Lots of code cleanup and refactoring
    - Integrate the support of SCS.1x devices into snd-oxfw driver;
    snd-scs1x driver is obsoleted

    USB-audio:
    - Fix possible NULL dereference at disconnection
    - A regression fix for Native Instruments devices

    Misc:
    - A few code cleanups of fm801 driver"

    * tag 'sound-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (722 commits)
    ALSA: timer: Code cleanup
    ALSA: timer: Harden slave timer list handling
    ALSA: hda - Add fixup for Dell Latitidue E6540
    ALSA: timer: Fix race among timer ioctls
    ALSA: hda - add codec support for Kabylake display audio codec
    ALSA: timer: Fix double unlink of active_list
    ALSA: usb-audio: Fix mixer ctl regression of Native Instrument devices
    ALSA: hda - fix the headset mic detection problem for a Dell laptop
    ALSA: hda - Fix white noise on Dell Latitude E5550
    ALSA: hda_intel: add card number to irq description
    ALSA: seq: Fix race at timer setup and close
    ALSA: seq: Fix missing NULL check at remove_events ioctl
    ALSA: usb-audio: Avoid calling usb_autopm_put_interface() at disconnect
    ASoC: hdac_hdmi: remove unused hdac_hdmi_query_pin_connlist
    ASoC: AMD: Add missing include file
    ALSA: hda - Fixup inverted internal mic for Lenovo E50-80
    ALSA: usb: Add native DSD support for Oppo HA-1
    ASoC: Make aux_dev more like a generic component
    ASoC: bcm2835: cleanup includes by ordering them alphabetically
    ASoC: AMD: Manage ACP 2.x SRAM banks power
    ...

    Linus Torvalds
     

17 Jan, 2016

2 commits

  • 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
     
  • PA-RISC doesn't have atomic instructions to modify page table entries, so it
    takes spinlock in the TLB handler and modifies the page table entry
    non-atomically. If you modify the page table entry without the spinlock, you
    may race with TLB handler on another CPU and your modification may be lost.
    Protect against that with usage of purge_tlb_start() and purge_tlb_end() which
    handles the TLB spinlock.

    Signed-off-by: Helge Deller
    Cc: stable@vger.kernel.org # v4.4

    Helge Deller
     

16 Jan, 2016

15 commits

  • Pull clk framework updates from Michael Turquette:
    "The clk framework and driver changes for 4.5 look pretty typical. The
    bulk of the changes are to clk controller drivers, though some
    improvements to the core and some re-usable blocks/templates also
    received some love.

    In this past cycle the clk maintainers developed a good workflow for
    handling the common case of patch submissions containing a new
    drivers, new shared Device Tree header and a new Device Tree binding
    description. This requires coordination with the Device Tree
    maintainers and with the architecture maintainers (typically the
    arm-soc tree in our case).

    This explains the increase in changes to include/dt-bindings/... and
    to Documentation/devicetree/bindings/clock/... coming from the clk
    tree. The same commits can be expected to come through those trees on
    occasion, through the use of shared, immutable branches"

    * tag 'clk-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (125 commits)
    clk: remove duplicated COMMON_CLK_NXP record from clk/Kconfig
    clk: fix clk-gpio.c with optional clock= DT property
    clk: rockchip: fix section mismatches with new child-clocks
    clk: gpio: handle error codes for of_clk_get_parent_count()
    clk: gpio: fix memory leak
    clk: shmobile: r8a7795: Add SATA0 clock
    clk: bcm2835: Add PWM clock support
    clk: bcm2835: Support for clock parent selection
    clk: bcm2835: add a round up ability to the clock divisor
    clk: lpc32xx: add common clock framework driver
    clk: lpc18xx: add NXP specific COMMON_CLK_NXP configuration symbol
    dt-bindings: clock: add NXP LPC32xx clock list for consumers
    dt-bindings: clock: add description of LPC32xx USB clock controller
    dt-bindings: clock: add description of LPC32xx clock controller
    clk: rockchip: rk3036: include downstream muxes into fractional dividers
    clk: add flag for clocks that need to be enabled on rate changes
    clk: rockchip: Allow the RK3288 SPDIF clocks to change their parent
    clk: rockchip: include downstream muxes into fractional dividers
    clk: rockchip: handle mux dependency of fractional dividers
    clk: bcm2835: Add a driver for the auxiliary peripheral clock gates.
    ...

    Linus Torvalds
     
  • By passing a non-null flag we allow fixup_user_fault to retry, which
    enables userfaultfd. As during these retries we might drop the mmap_sem
    we need to check if that happened and redo the complete chain of
    actions.

    Signed-off-by: Dominik Dingel
    Reviewed-by: Andrea Arcangeli
    Cc: "Kirill A. Shutemov"
    Cc: Martin Schwidefsky
    Cc: Christian Borntraeger
    Cc: "Jason J. Herne"
    Cc: David Rientjes
    Cc: Eric B Munson
    Cc: Naoya Horiguchi
    Cc: Mel Gorman
    Cc: Heiko Carstens
    Cc: Dominik Dingel
    Cc: Paolo Bonzini
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dominik Dingel
     
  • During Jason's work with postcopy migration support for s390 a problem
    regarding gmap faults was discovered.

    The gmap code will call fixup_user_fault which will end up always in
    handle_mm_fault. Till now we never cared about retries, but as the
    userfaultfd code kind of relies on it. this needs some fix.

    This patchset does not take care of the futex code. I will now look
    closer at this.

    This patch (of 2):

    With the introduction of userfaultfd, kvm on s390 needs fixup_user_fault
    to pass in FAULT_FLAG_ALLOW_RETRY and give feedback if during the
    faulting we ever unlocked mmap_sem.

    This patch brings in the logic to handle retries as well as it cleans up
    the current documentation. fixup_user_fault was not having the same
    semantics as filemap_fault. It never indicated if a retry happened and
    so a caller wasn't able to handle that case. So we now changed the
    behaviour to always retry a locked mmap_sem.

    Signed-off-by: Dominik Dingel
    Reviewed-by: Andrea Arcangeli
    Cc: "Kirill A. Shutemov"
    Cc: Martin Schwidefsky
    Cc: Christian Borntraeger
    Cc: "Jason J. Herne"
    Cc: David Rientjes
    Cc: Eric B Munson
    Cc: Naoya Horiguchi
    Cc: Mel Gorman
    Cc: Heiko Carstens
    Cc: Dominik Dingel
    Cc: Paolo Bonzini
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dominik Dingel
     
  • A dax mapping establishes a pte with _PAGE_DEVMAP set when the driver
    has established a devm_memremap_pages() mapping, i.e. when the pfn_t
    return from ->direct_access() has PFN_DEV and PFN_MAP set. Later, when
    encountering _PAGE_DEVMAP during a page table walk we lookup and pin a
    struct dev_pagemap instance to keep the result of pfn_to_page() valid
    until put_page().

    Signed-off-by: Dan Williams
    Tested-by: Logan Gunthorpe
    Cc: Dave Hansen
    Cc: Mel Gorman
    Cc: Peter Zijlstra
    Cc: Andrea Arcangeli
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • A dax-huge-page mapping while it uses some thp helpers is ultimately not
    a transparent huge page. The distinction is especially important in the
    get_user_pages() path. pmd_devmap() is used to distinguish dax-pmds
    from pmd_huge() and pmd_trans_huge() which have slightly different
    semantics.

    Explicitly mark the pmd_trans_huge() helpers that dax needs by adding
    pmd_devmap() checks.

    [kirill.shutemov@linux.intel.com: fix regression in handling mlocked pages in __split_huge_pmd()]
    Signed-off-by: Dan Williams
    Cc: Dave Hansen
    Cc: Mel Gorman
    Cc: Peter Zijlstra
    Cc: Andrea Arcangeli
    Cc: Matthew Wilcox
    Signed-off-by: Kirill A. Shutemov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • Similar to the conversion of vm_insert_mixed() use pfn_t in the
    vmf_insert_pfn_pmd() to tag the resulting pte with _PAGE_DEVICE when the
    pfn is backed by a devm_memremap_pages() mapping.

    Signed-off-by: Dan Williams
    Cc: Dave Hansen
    Cc: Matthew Wilcox
    Cc: Alexander Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • Convert the raw unsigned long 'pfn' argument to pfn_t for the purpose of
    evaluating the PFN_MAP and PFN_DEV flags. When both are set it triggers
    _PAGE_DEVMAP to be set in the resulting pte.

    There are no functional changes to the gpu drivers as a result of this
    conversion.

    Signed-off-by: Dan Williams
    Cc: Dave Hansen
    Cc: David Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • _PAGE_DEVMAP is a hardware-unused pte bit that will later be used in the
    get_user_pages() path to identify pfns backed by the dynamic allocation
    established by devm_memremap_pages. Upon seeing that bit the gup path
    will lookup and pin the allocation while the pages are in use.

    Since the _PAGE_DEVMAP bit is > 32 it must be cast to u64 instead of a
    pteval_t to allow pmd_flags() usage in the realmode boot code to build.

    Signed-off-by: Dan Williams
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • Take into account that the pmd_t type is a array inside a struct, so it
    needs two levels of brackets to initialize. Otherwise, a usage of __pmd
    generates a warning:

    include/linux/mm.h:986:2: warning: missing braces around initializer [-Wmissing-braces]

    Signed-off-by: Dan Williams
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • Switch avr32/include/asm/page.h to use the common defintions for
    pfn_to_page(), page_to_pfn(), and ARCH_PFN_OFFSET.

    Signed-off-by: Dan Williams
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • Use the new vmem_altmap capability to enable the pmem driver to arrange
    for a struct page memmap to be established in persistent memory.

    [linux@roeck-us.net: mn10300: declare __pfn_to_phys() to fix build error]
    Signed-off-by: Dan Williams
    Cc: Christoph Hellwig
    Cc: Dave Chinner
    Cc: Ross Zwisler
    Signed-off-by: Guenter Roeck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • In support of providing struct page for large persistent memory
    capacities, use struct vmem_altmap to change the default policy for
    allocating memory for the memmap array. The default vmemmap_populate()
    allocates page table storage area from the page allocator. Given
    persistent memory capacities relative to DRAM it may not be feasible to
    store the memmap in 'System Memory'. Instead vmem_altmap represents
    pre-allocated "device pages" to satisfy vmemmap_alloc_block_buf()
    requests.

    Signed-off-by: Dan Williams
    Reported-by: kbuild test robot
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • For the purpose of communicating the optional presence of a 'struct
    page' for the pfn returned from ->direct_access(), introduce a type that
    encapsulates a page-frame-number plus flags. These flags contain the
    historical "page_link" encoding for a scatterlist entry, but can also
    denote "device memory". Where "device memory" is a set of pfns that are
    not part of the kernel's linear mapping by default, but are accessed via
    the same memory controller as ram.

    The motivation for this new type is large capacity persistent memory
    that needs struct page entries in the 'memmap' to support 3rd party DMA
    (i.e. O_DIRECT I/O with a persistent memory source/target). However,
    we also need it in support of maintaining a list of mapped inodes which
    need to be unmapped at driver teardown or freeze_bdev() time.

    Signed-off-by: Dan Williams
    Cc: Christoph Hellwig
    Cc: Dave Hansen
    Cc: Ross Zwisler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • To date, we have implemented two I/O usage models for persistent memory,
    PMEM (a persistent "ram disk") and DAX (mmap persistent memory into
    userspace). This series adds a third, DAX-GUP, that allows DAX mappings
    to be the target of direct-i/o. It allows userspace to coordinate
    DMA/RDMA from/to persistent memory.

    The implementation leverages the ZONE_DEVICE mm-zone that went into
    4.3-rc1 (also discussed at kernel summit) to flag pages that are owned
    and dynamically mapped by a device driver. The pmem driver, after
    mapping a persistent memory range into the system memmap via
    devm_memremap_pages(), arranges for DAX to distinguish pfn-only versus
    page-backed pmem-pfns via flags in the new pfn_t type.

    The DAX code, upon seeing a PFN_DEV+PFN_MAP flagged pfn, flags the
    resulting pte(s) inserted into the process page tables with a new
    _PAGE_DEVMAP flag. Later, when get_user_pages() is walking ptes it keys
    off _PAGE_DEVMAP to pin the device hosting the page range active.
    Finally, get_page() and put_page() are modified to take references
    against the device driver established page mapping.

    Finally, this need for "struct page" for persistent memory requires
    memory capacity to store the memmap array. Given the memmap array for a
    large pool of persistent may exhaust available DRAM introduce a
    mechanism to allocate the memmap from persistent memory. The new
    "struct vmem_altmap *" parameter to devm_memremap_pages() enables
    arch_add_memory() to use reserved pmem capacity rather than the page
    allocator.

    This patch (of 18):

    The core has developed a need for a "pfn_t" type [1]. Move the existing
    pfn_t in KVM to kvm_pfn_t [2].

    [1]: https://lists.01.org/pipermail/linux-nvdimm/2015-September/002199.html
    [2]: https://lists.01.org/pipermail/linux-nvdimm/2015-September/002218.html

    Signed-off-by: Dan Williams
    Acked-by: Christoffer Dall
    Cc: Paolo Bonzini
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     
  • The core has developed a need for a "pfn_t" type [1]. Convert the usage
    of pfn_t by usermode-linux to an unsigned long, and update pfn_to_phys()
    to drop its expectation of a typed pfn.

    [1]: https://lists.01.org/pipermail/linux-nvdimm/2015-September/002199.html

    Signed-off-by: Dan Williams
    Cc: Dave Hansen
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams