1. 03 Apr, 2018 9 commits
    • Linus Torvalds's avatar
      Merge tag 'pm-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · f2d28566
      Linus Torvalds authored
      Pull power management updates from Rafael Wysocki:
       "These update the cpuidle poll state definition to reduce excessive
        energy usage related to it, add new CPU ID to the RAPL power capping
        driver, update the ACPI system suspend code to handle some special
        cases better, extend the PM core's device links code slightly, add new
        sysfs attribute for better suspend-to-idle diagnostics and easier
        hibernation handling, update power management tools and clean up
        cpufreq quite a bit.
      
        Specifics:
      
         - Modify the cpuidle poll state implementation to prevent CPUs from
           staying in the loop in there for excessive times (Rafael Wysocki).
      
         - Add Intel Cannon Lake chips support to the RAPL power capping
           driver (Joe Konno).
      
         - Add reference counting to the device links handling code in the PM
           core (Lukas Wunner).
      
         - Avoid reconfiguring GPEs on suspend-to-idle in the ACPI system
           suspend code (Rafael Wysocki).
      
         - Allow devices to be put into deeper low-power states via ACPI if
           both _SxD and _SxW are missing (Daniel Drake).
      
         - Reorganize the core ACPI suspend-to-idle wakeup code to avoid a
           keyboard wakeup issue on Asus UX331UA (Chris Chiu).
      
         - Prevent the PCMCIA library code from aborting suspend-to-idle due
           to noirq suspend failures resulting from incorrect assumptions
           (Rafael Wysocki).
      
         - Add coupled cpuidle supprt to the Exynos3250 platform (Marek
           Szyprowski).
      
         - Add new sysfs file to make it easier to specify the image storage
           location during hibernation (Mario Limonciello).
      
         - Add sysfs files for collecting suspend-to-idle usage and time
           statistics for CPU idle states (Rafael Wysocki).
      
         - Update the pm-graph utilities (Todd Brandt).
      
         - Reduce the kernel log noise related to reporting Low-power Idle
           constraings by the ACPI system suspend code (Rafael Wysocki).
      
         - Make it easier to distinguish dedicated wakeup IRQs in the
           /proc/interrupts output (Tony Lindgren).
      
         - Add the frequency table validation in cpufreq to the core and drop
           it from a number of cpufreq drivers (Viresh Kumar).
      
         - Drop "cooling-{min|max}-level" for CPU nodes from a couple of DT
           bindings (Viresh Kumar).
      
         - Clean up the CPU online error code path in the cpufreq core (Viresh
           Kumar).
      
         - Fix assorted issues in the SCPI, CPPC, mediatek and tegra186
           cpufreq drivers (Arnd Bergmann, Chunyu Hu, George Cherian, Viresh
           Kumar).
      
         - Drop memory allocation error messages from a few places in cpufreq
           and cpuildle drivers (Markus Elfring)"
      
      * tag 'pm-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (56 commits)
        ACPI / PM: Fix keyboard wakeup from suspend-to-idle on ASUS UX331UA
        cpufreq: CPPC: Use transition_delay_us depending transition_latency
        PM / hibernate: Change message when writing to /sys/power/resume
        PM / hibernate: Make passing hibernate offsets more friendly
        cpuidle: poll_state: Avoid invoking local_clock() too often
        PM: cpuidle/suspend: Add s2idle usage and time state attributes
        cpuidle: Enable coupled cpuidle support on Exynos3250 platform
        cpuidle: poll_state: Add time limit to poll_idle()
        cpufreq: tegra186: Don't validate the frequency table twice
        cpufreq: speedstep: Don't validate the frequency table twice
        cpufreq: sparc: Don't validate the frequency table twice
        cpufreq: sh: Don't validate the frequency table twice
        cpufreq: sfi: Don't validate the frequency table twice
        cpufreq: scpi: Don't validate the frequency table twice
        cpufreq: sc520: Don't validate the frequency table twice
        cpufreq: s3c24xx: Don't validate the frequency table twice
        cpufreq: qoirq: Don't validate the frequency table twice
        cpufreq: pxa: Don't validate the frequency table twice
        cpufreq: ppc_cbe: Don't validate the frequency table twice
        cpufreq: powernow: Don't validate the frequency table twice
        ...
      f2d28566
    • Linus Torvalds's avatar
      Merge tag 'acpi-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · be553754
      Linus Torvalds authored
      Pull ACPI updates from Rafael Wysocki:
       "These update the ACPICA code in the kernel to follow upstream revision
        20180313 which includes fixes related to the so-called module-level
        AML (mostly "if" type of statements outside of any methods) that
        should improve the handling of systems that load alternative SSDTs
        depending on the current configuration, for example, and event
        handling fixes related to disabling and enabling GPEs on system
        startup and on suspend/resume.
      
        Moreover, the ACPICA license boilerplate is replaced with SPDX license
        IDs which alone reduces the number of lines of ACPICA code in the
        kernel quite a bit.
      
        Also added is a new driver for the generic ACPI Time and Alarm Device
        (TAD). At the moment it only handles the most basic capabilities of
        the TAD, however.
      
        In addition to that the ACPI battery driver is improved to handle
        battery thresholds on ThinkPads, among other things, some bugs are
        fixed, a new backlight quirk is added and some documentation is
        updated.
      
        Specifics:
      
         - Update the in-kernel ACPICA code to upstream revision 20180313
           including:
            * Module-level AML code handling fixes and simplifications (Bob
              Moore, Erik Schmauss).
            * Fixes and cleanups related to messaging (Bob Moore).
            * Events handling fixes related to disabling and enabling GPEs
              (Erik Schmauss).
            * Introduction of SPDX license identifiers and removal of license
              boilerplate in multiple files (Erik Schmauss).
            * Assorted fixes and cleanups (Bob Moore, Erik Schmauss, Hans de
              Goede, Seunghun Han).
      
         - Add new basic driver for the ACPI Time and Alarm Device (Rafael
           Wysocki).
      
         - Modify the ACPI battery driver to support battery thresholds on
           Lenovo ThinkPads (Ognjen Galic, Colin Ian King).
      
         - Avoid reporting battery capacity over 100 in the ACPI battery
           driver in some cases (Laszlo Toth).
      
         - Make the kernel recognize an OEM _OSI string from Dell to avoid
           power management issues with NVidia GPUs in Dell platforms (Alex
           Hung).
      
         - Make the PCI IRQ management code handle missing _PRS cleanly (Alex
           Hung).
      
         - Fix uevent notifications related to device hotplut (Lee, Chun-Yi).
      
         - Prevent the ACPI PAD driver from leaking memory (Lenny Szubowicz).
      
         - Update the ACPI CPPC library code to include subspace IDs in the
           kernel messages logged by it (George Cherian).
      
         - Add backlight quirk for Samsung 670Z5E (Hans de Goede).
      
         - Add the NFIT and HMAT tables to the list of ACPI tables that can be
           overridden via initrd (Dan Williams).
      
         - Fix and clean up some ACPI documentation and Kconfig help language
           (Aishwarya Pant, Randy Dunlap).
      
         - Replace license boilerplate with an SPDX license ID in the ACPI
           PMIC operation region handling code (Rajmohan Mani)"
      
      * tag 'acpi-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (39 commits)
        ACPI: acpi_pad: Fix memory leak in power saving threads
        ACPI / video: Add quirk to force acpi-video backlight on Samsung 670Z5E
        ACPI: Add Time and Alarm Device (TAD) driver
        ACPI / scan: Send change uevent with offine environmental data
        ACPI / Kconfig: Update ACPI_PROCFS_POWER help text
        ACPI / OSI: Add OEM _OSI strings to disable NVidia RTD3
        ACPICA: Update version to 20180313
        ACPICA: Cleanup/simplify module-level code support
        ACPICA: Events: add a return on failure from acpi_hw_register_read
        ACPICA: adding SPDX headers
        ACPICA: Rename a global for clarity, no functional change
        ACPICA: macros: fix ACPI_ERROR_NAMESPACE macro
        ACPICA: Change a compile-time option to a runtime option
        ACPICA: Remove calling of _STA from acpi_get_object_info()
        ACPICA: AML Debug Object: Don't ignore output of zero-length strings
        ACPICA: Fix memory leak on unusual memory leak
        ACPICA: Events: Dispatch GPEs after enabling for the first time
        ACPICA: Events: Add parallel GPE handling support to fix potential redundant _Exx evaluations
        ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume
        ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c
        ...
      be553754
    • Linus Torvalds's avatar
      Merge branch 'syscalls-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux · 642e7fd2
      Linus Torvalds authored
      Pull removal of in-kernel calls to syscalls from Dominik Brodowski:
       "System calls are interaction points between userspace and the kernel.
        Therefore, system call functions such as sys_xyzzy() or
        compat_sys_xyzzy() should only be called from userspace via the
        syscall table, but not from elsewhere in the kernel.
      
        At least on 64-bit x86, it will likely be a hard requirement from
        v4.17 onwards to not call system call functions in the kernel: It is
        better to use use a different calling convention for system calls
        there, where struct pt_regs is decoded on-the-fly in a syscall wrapper
        which then hands processing over to the actual syscall function. This
        means that only those parameters which are actually needed for a
        specific syscall are passed on during syscall entry, instead of
        filling in six CPU registers with random user space content all the
        time (which may cause serious trouble down the call chain). Those
        x86-specific patches will be pushed through the x86 tree in the near
        future.
      
        Moreover, rules on how data may be accessed may differ between kernel
        data and user data. This is another reason why calling sys_xyzzy() is
        generally a bad idea, and -- at most -- acceptable in arch-specific
        code.
      
        This patchset removes all in-kernel calls to syscall functions in the
        kernel with the exception of arch/. On top of this, it cleans up the
        three places where many syscalls are referenced or prototyped, namely
        kernel/sys_ni.c, include/linux/syscalls.h and include/linux/compat.h"
      
      * 'syscalls-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: (109 commits)
        bpf: whitelist all syscalls for error injection
        kernel/sys_ni: remove {sys_,sys_compat} from cond_syscall definitions
        kernel/sys_ni: sort cond_syscall() entries
        syscalls/x86: auto-create compat_sys_*() prototypes
        syscalls: sort syscall prototypes in include/linux/compat.h
        net: remove compat_sys_*() prototypes from net/compat.h
        syscalls: sort syscall prototypes in include/linux/syscalls.h
        kexec: move sys_kexec_load() prototype to syscalls.h
        x86/sigreturn: use SYSCALL_DEFINE0
        x86: fix sys_sigreturn() return type to be long, not unsigned long
        x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm()
        mm: add ksys_readahead() helper; remove in-kernel calls to sys_readahead()
        mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff()
        mm: add ksys_fadvise64_64() helper; remove in-kernel call to sys_fadvise64_64()
        fs: add ksys_fallocate() wrapper; remove in-kernel calls to sys_fallocate()
        fs: add ksys_p{read,write}64() helpers; remove in-kernel calls to syscalls
        fs: add ksys_truncate() wrapper; remove in-kernel calls to sys_truncate()
        fs: add ksys_sync_file_range helper(); remove in-kernel calls to syscall
        kernel: add ksys_setsid() helper; remove in-kernel call to sys_setsid()
        kernel: add ksys_unshare() helper; remove in-kernel calls to sys_unshare()
        ...
      642e7fd2
    • Omar Sandoval's avatar
      bitmap: fix memset optimization on big-endian systems · 21035965
      Omar Sandoval authored
      Commit 2a98dc02 ("include/linux/bitmap.h: turn bitmap_set and
      bitmap_clear into memset when possible") introduced an optimization to
      bitmap_{set,clear}() which uses memset() when the start and length are
      constants aligned to a byte.
      
      This is wrong on big-endian systems; our bitmaps are arrays of unsigned
      long, so bit n is not at byte n / 8 in memory.  This was caught by the
      Btrfs selftests, but the bitmap selftests also fail when run on a
      big-endian machine.
      
      We can still use memset if the start and length are aligned to an
      unsigned long, so do that on big-endian.  The same problem applies to
      the memcmp in bitmap_equal(), so fix it there, too.
      
      Fixes: 2a98dc02 ("include/linux/bitmap.h: turn bitmap_set and bitmap_clear into memset when possible")
      Fixes: 2c6deb01 ("bitmap: use memcmp optimisation in more situations")
      Cc: stable@kernel.org
      Reported-by: default avatar"Erhard F." <erhard_f@mailbox.org>
      Cc: Matthew Wilcox <mawilcox@microsoft.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      21035965
    • Linus Torvalds's avatar
      Merge tag 'arch-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic · f5a8eb63
      Linus Torvalds authored
      Pul removal of obsolete architecture ports from Arnd Bergmann:
       "This removes the entire architecture code for blackfin, cris, frv,
        m32r, metag, mn10300, score, and tile, including the associated device
        drivers.
      
        I have been working with the (former) maintainers for each one to
        ensure that my interpretation was right and the code is definitely
        unused in mainline kernels. Many had fond memories of working on the
        respective ports to start with and getting them included in upstream,
        but also saw no point in keeping the port alive without any users.
      
        In the end, it seems that while the eight architectures are extremely
        different, they all suffered the same fate: There was one company in
        charge of an SoC line, a CPU microarchitecture and a software
        ecosystem, which was more costly than licensing newer off-the-shelf
        CPU cores from a third party (typically ARM, MIPS, or RISC-V). It
        seems that all the SoC product lines are still around, but have not
        used the custom CPU architectures for several years at this point. In
        contrast, CPU instruction sets that remain popular and have actively
        maintained kernel ports tend to all be used across multiple licensees.
      
        [ See the new nds32 port merged in the previous commit for the next
          generation of "one company in charge of an SoC line, a CPU
          microarchitecture and a software ecosystem"   - Linus ]
      
        The removal came out of a discussion that is now documented at
        https://lwn.net/Articles/748074/. Unlike the original plans, I'm not
        marking any ports as deprecated but remove them all at once after I
        made sure that they are all unused. Some architectures (notably tile,
        mn10300, and blackfin) are still being shipped in products with old
        kernels, but those products will never be updated to newer kernel
        releases.
      
        After this series, we still have a few architectures without mainline
        gcc support:
      
         - unicore32 and hexagon both have very outdated gcc releases, but the
           maintainers promised to work on providing something newer. At least
           in case of hexagon, this will only be llvm, not gcc.
      
         - openrisc, risc-v and nds32 are still in the process of finishing
           their support or getting it added to mainline gcc in the first
           place. They all have patched gcc-7.3 ports that work to some
           degree, but complete upstream support won't happen before gcc-8.1.
           Csky posted their first kernel patch set last week, their situation
           will be similar
      
        [ Palmer Dabbelt points out that RISC-V support is in mainline gcc
          since gcc-7, although gcc-7.3.0 is the recommended minimum  - Linus ]"
      
      This really says it all:
      
       2498 files changed, 95 insertions(+), 467668 deletions(-)
      
      * tag 'arch-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (74 commits)
        MAINTAINERS: UNICORE32: Change email account
        staging: iio: remove iio-trig-bfin-timer driver
        tty: hvc: remove tile driver
        tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers
        serial: remove tile uart driver
        serial: remove m32r_sio driver
        serial: remove blackfin drivers
        serial: remove cris/etrax uart drivers
        usb: Remove Blackfin references in USB support
        usb: isp1362: remove blackfin arch glue
        usb: musb: remove blackfin port
        usb: host: remove tilegx platform glue
        pwm: remove pwm-bfin driver
        i2c: remove bfin-twi driver
        spi: remove blackfin related host drivers
        watchdog: remove bfin_wdt driver
        can: remove bfin_can driver
        mmc: remove bfin_sdh driver
        input: misc: remove blackfin rotary driver
        input: keyboard: remove bf54x driver
        ...
      f5a8eb63
    • Linus Torvalds's avatar
      Merge tag 'nds32-for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux · c9297d28
      Linus Torvalds authored
      Pull nds32 architecture support from Greentime Hu:
       "This contains the core nds32 Linux port (including interrupt
        controller driver and timer driver), which has been through seven
        rounds of review on mailing list.
      
        It is able to boot to shell and passes most LTP-2017 testsuites in
        nds32 AE3XX platform:
      
          Total Tests: 1901
          Total Skipped Tests: 618
          Total Failures: 78"
      Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
      
      * tag 'nds32-for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux: (44 commits)
        nds32: To use the generic dump_stack()
        nds32: fix building failed if using elf toolchain.
        nios2: add ioremap_nocache declaration before include asm-generic/io.h.
        nds32: fix building failed if using older version gcc.
        dt-bindings: timer: Add andestech atcpit100 timer binding doc
        clocksource/drivers/atcpit100: VDSO support
        clocksource/drivers/atcpit100: Add andestech atcpit100 timer
        net: faraday add nds32 support.
        irqchip: Andestech Internal Vector Interrupt Controller driver
        dt-bindings: interrupt-controller: Andestech Internal Vector Interrupt Controller
        dt-bindings: nds32 SoC Bindings
        dt-bindings: nds32 L2 cache controller Bindings
        dt-bindings: nds32 CPU Bindings
        MAINTAINERS: Add nds32
        nds32: Build infrastructure
        nds32: defconfig
        nds32: Miscellaneous header files
        nds32: Device tree support
        nds32: Generic timers support
        nds32: Loadable modules
        ...
      c9297d28
    • Linus Torvalds's avatar
      Merge tag 'm68k-for-v4.17-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · 17e3cd22
      Linus Torvalds authored
      Pull m68k updates from Geert Uytterhoeven:
      
       - Macintosh enhancements and fixes
      
       - Remove useless memory layout printing using hashed pointers
      
       - Add missing Amiga Zorro bus DMA mask
      
       - Small fixes and cleanups
      
       - Defconfig updates
      
      * tag 'm68k-for-v4.17-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k/mac: Remove bogus "FIXME" comment
        m68k/mac: Enable RTC for 100-series PowerBooks
        m68k/mac: Clean up whitespace and remove redundant parentheses
        m68k/defconfig: Update defconfigs for v4.16-rc5
        zorro: Set up z->dev.dma_mask for the DMA API
        m68k/time: Stop validating rtc_time in .read_time
        m68k/mm: Stop printing the virtual memory layout
        macintosh/via-pmu68k: Initialize PMU driver with setup_arch and arch_initcall
        m68k/mac: Fix apparent race condition in Baboon interrupt dispatch
        m68k/mac: Enable PDMA support for PowerBook 190
      17e3cd22
    • Linus Torvalds's avatar
      Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bc16d405
      Linus Torvalds authored
      Pull EFI updates from Ingo Molnar:
       "The main EFI changes in this cycle were:
      
         - Fix the apple-properties code (Andy Shevchenko)
      
         - Add WARN() on arm64 if UEFI Runtime Services corrupt the reserved
           x18 register (Ard Biesheuvel)
      
         - Use efi_switch_mm() on x86 instead of manipulating %cr3 directly
           (Sai Praneeth)
      
         - Fix early memremap leak in ESRT code (Ard Biesheuvel)
      
         - Switch to L"xxx" notation for wide string literals (Ard Biesheuvel)
      
         - ... plus misc other cleanups and bugfixes"
      
      * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/efi: Use efi_switch_mm() rather than manually twiddling with %cr3
        x86/efi: Replace efi_pgd with efi_mm.pgd
        efi: Use string literals for efi_char16_t variable initializers
        efi/esrt: Fix handling of early ESRT table mapping
        efi: Use efi_mm in x86 as well as ARM
        efi: Make const array 'apple' static
        efi/apple-properties: Use memremap() instead of ioremap()
        efi: Reorder pr_notice() with add_device_randomness() call
        x86/efi: Replace GFP_ATOMIC with GFP_KERNEL in efi_query_variable_store()
        efi/arm64: Check whether x18 is preserved by runtime services calls
        efi/arm*: Stop printing addresses of virtual mappings
        efi/apple-properties: Remove redundant attribute initialization from unmarshal_key_value_pairs()
        efi/arm*: Only register page tables when they exist
      bc16d405
    • Linus Torvalds's avatar
      Merge branch 'x86-dma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2fcd2b30
      Linus Torvalds authored
      Pull x86 dma mapping updates from Ingo Molnar:
       "This tree, by Christoph Hellwig, switches over the x86 architecture to
        the generic dma-direct and swiotlb code, and also unifies more of the
        dma-direct code between architectures. The now unused x86-only
        primitives are removed"
      
      * 'x86-dma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        dma-mapping: Don't clear GFP_ZERO in dma_alloc_attrs
        swiotlb: Make swiotlb_{alloc,free}_buffer depend on CONFIG_DMA_DIRECT_OPS
        dma/swiotlb: Remove swiotlb_{alloc,free}_coherent()
        dma/direct: Handle force decryption for DMA coherent buffers in common code
        dma/direct: Handle the memory encryption bit in common code
        dma/swiotlb: Remove swiotlb_set_mem_attributes()
        set_memory.h: Provide set_memory_{en,de}crypted() stubs
        x86/dma: Remove dma_alloc_coherent_gfp_flags()
        iommu/intel-iommu: Enable CONFIG_DMA_DIRECT_OPS=y and clean up intel_{alloc,free}_coherent()
        iommu/amd_iommu: Use CONFIG_DMA_DIRECT_OPS=y and dma_direct_{alloc,free}()
        x86/dma/amd_gart: Use dma_direct_{alloc,free}()
        x86/dma/amd_gart: Look at dev->coherent_dma_mask instead of GFP_DMA
        x86/dma: Use generic swiotlb_ops
        x86/dma: Use DMA-direct (CONFIG_DMA_DIRECT_OPS=y)
        x86/dma: Remove dma_alloc_coherent_mask()
      2fcd2b30
  2. 02 Apr, 2018 31 commits