21 Sep, 2018

1 commit

  • Major changes are I2C and SPI bus checks, YAML output format (for
    future validation), some new libfdt functions, and more libfdt
    validation of dtbs.

    The YAML addition adds an optional dependency on libyaml. pkg-config is
    used to test for it and pkg-config became a kconfig dependency in 4.18.

    This adds the following commits from upstream:

    c86da84d30e4 Add support for YAML encoded output
    361b5e7d8067 Make type_marker_length helper public
    bfbfab047e45 pylibfdt: Add a means to add and delete notes
    9005f4108e7c pylibfdt: Allow delprop() to return errors
    b94c056b137e Make valgrind optional
    fd06c54d4711 tests: Better testing of dtc -I fs mode
    c3f50c9a86d9 tests: Allow dtbs_equal_unordered to ignore mem reserves
    0ac9fdee37c7 dtc: trivial '-I fs -O dts' test
    0fd1c8c783f3 pylibfdt: fdt_get_mem_rsv returns 2 uint64_t values
    04853cad18f4 pylibfdt: Don't incorrectly / unnecessarily override uint64_t typemap
    9619c8619c37 Kill bogus TYPE_BLOB marker type
    ac68ff92ae20 parser: add TYPE_STRING marker to path references
    90a190eb04d9 checks: add SPI bus checks
    53a1bd546905 checks: add I2C bus checks
    88f18909db73 dtc: Bump version to v1.4.7
    85bce8b2f06d tests: Correction to vg_prepare_blob()
    57f7f9e7bc7c tests: Don't call memcmp() with NULL arguments
    c12b2b0c20eb libfdt: fdt_address_cells() and fdt_size_cells()
    3fe0eeda0b7f livetree: Set phandle properties type to uint32
    853649acceba pylibfdt: Support the sequential-write interface
    9b0e4fe26093 tests: Improve fdt_resize() tests
    1087504bb3e8 libfdt: Add necessary header padding in fdt_create()
    c72fa777e613 libfdt: Copy the struct region in fdt_resize()
    32b9c6130762 Preserve datatype markers when emitting dts format
    6dcb8ba408ec libfdt: Add helpers for accessing unaligned words
    42607f21d43e tests: Fix incorrect check name 'prop_name_chars'
    9d78c33bf8a1 tests: fix grep for checks error messages
    b770f3d1c13f pylibfdt: Support setting the name of a node
    2f0d07e678e0 pylibfdt: Add functions to set and get properties as strings
    354d3dc55939 pylibfdt: Update the bytearray size with pack()
    3c374d46acce pylibfdt: Allow reading integer values from properties
    49d32ce40bb4 pylibfdt: Use an unsigned type for fdt32_t
    481246a0c13a pylibfdt: Avoid accessing the internal _fdt member in tests
    9aafa33d99ed pylibfdt: Add functions to update properties
    5a598671fdbf pylibfdt: Support device-tree creation/expansion
    483e170625e1 pylibfdt: Add support for reading the memory reserve map
    29bb05aa4200 pylibfdt: Add support for the rest of the header functions
    582a7159a5d0 pylibfdt: Add support for fdt_next_node()
    f0f8c9169819 pylibfdt: Reorder functions to match libfdt.h
    64a69d123935 pylibfdt: Return string instead of bytearray from getprop()
    4d09a83420df fdtput: Add documentation
    e617cbe1bd67 fdtget: Add documentation
    180a93924014 Use format specifiers in a bunch of places we should
    b9af3b396576 scripts/dtc: Fixed format mismatch in fprintf
    4b8fcc3d015c libfdt: Add fdt_check_full() function
    c14223fb2292 tests: Use valgrind client requests for better checking
    5b67d2b955a3 tests: Better handling of valgrind errors saving blobs
    e2556aaeb506 tests: Remove unused #define
    fb9c6abddaa8 Use size_t for blob lengths in utilfdt_read*
    0112fda03bf6 libfdt: Add fdt_header_size()
    6473a21d8bfe Consolidate utilfdt_read_len() variants
    d5db5382c5e5 libfdt: Safer access to memory reservations
    719d582e98ec libfdt: Propagate name errors in fdt_getprop_by_offset()
    70166d62a27f libfdt: Safer access to strings section
    eb890c0f77dc libfdt: Make fdt_check_header() more thorough
    899d6fad93f3 libfdt: Improve sequential write state checking
    04b5b4062ccd libfdt: Clean up header checking functions
    44d3efedc816 Preserve datatype information when parsing dts
    f0be81bd8de0 Make Property a subclass of bytearray
    24b1f3f064d4 pylibfdt: Add a method to access the device tree directly

    Signed-off-by: Rob Herring

    Rob Herring
     

20 Sep, 2018

4 commits

  • dtc has a new source file, yamltree.c, that needs to be copied when
    syncing dtc sources.

    Signed-off-by: Rob Herring

    Rob Herring
     
  • The next update of libfdt has a new dependency on INT_MAX. Update the
    instances of libfdt_env.h in the kernel to either include the necessary
    header with the definition or define it locally.

    Cc: Russell King
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Rob Herring

    Rob Herring
     
  • dtc has new checks for I2C buses. Fix the warnings in unit-addresses in
    the unittests.

    drivers/of/unittest-data/testcases.dtb: Warning (i2c_bus_reg): /testcase-data/overlay-node/test-bus/i2c-test-bus/test-unittest14/i2c@0/test-mux-dev: I2C bus unit address format error, expected "20"
    drivers/of/unittest-data/overlay_15.dtb: Warning (i2c_bus_reg): /fragment@0/__overlay__/test-unittest15/i2c@0/test-mux-dev: I2C bus unit address format error, expected "20"

    Cc: Frank Rowand
    Signed-off-by: Rob Herring

    Rob Herring
     
  • Rob Herring
     

12 Sep, 2018

1 commit

  • With commit 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of
    of_find_node_by_phandle()"), a G3 PowerMac fails to boot. The root cause
    is the DT for this system has no phandle properties when booted with
    BootX. of_populate_phandle_cache() does not handle the case of no
    phandles correctly. The problem is roundup_pow_of_two() for 0 is
    undefined. The implementation subtracts 1 underflowing and then things
    are in the weeds.

    Fixes: 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of of_find_node_by_phandle()")
    Cc: stable@vger.kernel.org # 4.17+
    Reported-by: Finn Thain
    Tested-by: Stan Johnson
    Reviewed-by: Frank Rowand
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Rob Herring

    Rob Herring
     

08 Sep, 2018

4 commits


04 Sep, 2018

2 commits

  • Add some printf test for printing the node name (without the
    unit-address).

    Reviewed-by: Frank Rowand
    Signed-off-by: Rob Herring

    Rob Herring
     
  • In preparation for removing the node name pointer, it needs to be
    removed from of_unittest_overlay_high_level. However, it's not really
    correct to use the node name without the unit-address and we should use
    the full node name. This most easily done by iterating over the child
    nodes with for_each_child_of_node() which is what of_get_child_by_name()
    does internally. While at it, we might as well convert the outer loop to
    use for_each_child_of_node() too instead of open coding it.

    Reviewed-by: Frank Rowand
    Signed-off-by: Rob Herring

    Rob Herring
     

03 Sep, 2018

6 commits

  • Linus Torvalds
     
  • Pull devicetree updates from Rob Herring:
    "A couple of new helper functions in preparation for some tree wide
    clean-ups.

    I'm sending these new helpers now for rc2 in order to simplify the
    dependencies on subsequent cleanups across the tree in 4.20"

    * tag 'devicetree-fixes-for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    of: Add device_type access helper functions
    of: add node name compare helper functions
    of: add helper to lookup compatible child node

    Linus Torvalds
     
  • Pull ARM SoC fixes from Olof Johansson:
    "First batch of fixes post-merge window:

    - A handful of devicetree changes for i.MX2{3,8} to change over to
    new panel bindings. The platforms were moved from legacy
    framebuffers to DRM and some development board panels hadn't yet
    been converted.

    - OMAP fixes related to ti-sysc driver conversion fallout, fixing
    some register offsets, no_console_suspend fixes, etc.

    - Droid4 changes to fix flaky eMMC probing and vibrator DTS mismerge.

    - Fixed 0755->0644 permissions on a newly added file.

    - Defconfig changes to make ARM Versatile more useful with QEMU
    (helps testing).

    - Enable defconfig options for new TI SoC platform that was merged
    this window (AM6)"

    * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    arm64: defconfig: Enable TI's AM6 SoC platform
    ARM: defconfig: Update the ARM Versatile defconfig
    ARM: dts: omap4-droid4: Fix emmc errors seen on some devices
    ARM: dts: Fix file permission for am335x-osd3358-sm-red.dts
    ARM: imx_v6_v7_defconfig: Select CONFIG_DRM_PANEL_SEIKO_43WVF1G
    ARM: mxs_defconfig: Select CONFIG_DRM_PANEL_SEIKO_43WVF1G
    ARM: dts: imx23-evk: Convert to the new display bindings
    ARM: dts: imx23-evk: Move regulators outside simple-bus
    ARM: dts: imx28-evk: Convert to the new display bindings
    ARM: dts: imx28-evk: Move regulators outside simple-bus
    Revert "ARM: dts: imx7d: Invert legacy PCI irq mapping"
    arm: dts: am4372: setup rtc as system-power-controller
    ARM: dts: omap4-droid4: fix vibrations on Droid 4
    bus: ti-sysc: Fix no_console_suspend handling
    bus: ti-sysc: Fix module register ioremap for larger offsets
    ARM: OMAP2+: Fix module address for modules using mpu_rt_idx
    ARM: OMAP2+: Fix null hwmod for ti-sysc debug

    Linus Torvalds
     
  • Pull x86 fixes from Thomas Gleixner:
    "Speculation:

    - Make the microcode check more robust

    - Make the L1TF memory limit depend on the internal cache physical
    address space and not on the CPUID advertised physical address
    space, which might be significantly smaller. This avoids disabling
    L1TF on machines which utilize the full physical address space.

    - Fix the GDT mapping for EFI calls on 32bit PTI

    - Fix the MCE nospec implementation to prevent #GP

    Fixes and robustness:

    - Use the proper operand order for LSL in the VDSO

    - Prevent NMI uaccess race against CR3 switching

    - Add a lockdep check to verify that text_mutex is held in
    text_poke() functions

    - Repair the fallout of giving native_restore_fl() a prototype

    - Prevent kernel memory dumps based on usermode RIP

    - Wipe KASAN shadow stack before rewinding the stack to prevent false
    positives

    - Move the AMS GOTO enforcement to the actual build stage to allow
    user API header extraction without a compiler

    - Fix a section mismatch introduced by the on demand VDSO mapping
    change

    Miscellaneous:

    - Trivial typo, GCC quirk removal and CC_SET/OUT() cleanups"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/pti: Fix section mismatch warning/error
    x86/vdso: Fix lsl operand order
    x86/mce: Fix set_mce_nospec() to avoid #GP fault
    x86/efi: Load fixmap GDT in efi_call_phys_epilog()
    x86/nmi: Fix NMI uaccess race against CR3 switching
    x86: Allow generating user-space headers without a compiler
    x86/dumpstack: Don't dump kernel memory based on usermode RIP
    x86/asm: Use CC_SET()/CC_OUT() in __gen_sigismember()
    x86/alternatives: Lockdep-enforce text_mutex in text_poke*()
    x86/entry/64: Wipe KASAN stack shadow before rewind_stack_do_exit()
    x86/irqflags: Mark native_restore_fl extern inline
    x86/build: Remove jump label quirk for GCC older than 4.5.2
    x86/Kconfig: Fix trivial typo
    x86/speculation/l1tf: Increase l1tf memory limit for Nehalem+
    x86/spectre: Add missing family 6 check to microcode check

    Linus Torvalds
     
  • Pull CPU hotplug fix from Thomas Gleixner:
    "Remove the stale skip_onerr member from the hotplug states"

    * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    cpu/hotplug: Remove skip_onerr field from cpuhp_step structure

    Linus Torvalds
     
  • Pull core fixes from Thomas Gleixner:
    "A small set of updates for core code:

    - Prevent tracing in functions which are called from trace patching
    via stop_machine() to prevent executing half patched function trace
    entries.

    - Remove old GCC workarounds

    - Remove pointless includes of notifier.h"

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    objtool: Remove workaround for unreachable warnings from old GCC
    notifier: Remove notifier header file wherever not used
    watchdog: Mark watchdog touch functions as notrace

    Linus Torvalds
     

02 Sep, 2018

5 commits

  • Fix the section mismatch warning in arch/x86/mm/pti.c:

    WARNING: vmlinux.o(.text+0x6972a): Section mismatch in reference from the function pti_clone_pgtable() to the function .init.text:pti_user_pagetable_walk_pte()
    The function pti_clone_pgtable() references
    the function __init pti_user_pagetable_walk_pte().
    This is often because pti_clone_pgtable lacks a __init
    annotation or the annotation of pti_user_pagetable_walk_pte is wrong.
    FATAL: modpost: Section mismatches detected.

    Fixes: 85900ea51577 ("x86/pti: Map the vsyscall page if needed")
    Reported-by: kbuild test robot
    Signed-off-by: Randy Dunlap
    Signed-off-by: Thomas Gleixner
    Cc: Andy Lutomirski
    Link: https://lkml.kernel.org/r/43a6d6a3-d69d-5eda-da09-0b1c88215a2a@infradead.org

    Randy Dunlap
     
  • …/kernel/git/tmlind/linux-omap into fixes

    Fixes for omap variants against v4.19-rc1

    These are mostly fixes related to using ti-sysc interconnect target module
    driver for accessing right register offsets for sgx and cpsw and for
    no_console_suspend regression.

    There is also a droid4 emmc fix where emmc may not get detected for some
    models, and vibrator dts mismerge fix.

    And we have a file permission fix for am335x-osd3358-sm-red.dts that
    just got added. And we must tag RTC as system-power-controller for
    am437x for PMIC to shut down during poweroff.

    * tag 'omap-for-v4.19/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
    ARM: dts: omap4-droid4: Fix emmc errors seen on some devices
    ARM: dts: Fix file permission for am335x-osd3358-sm-red.dts
    arm: dts: am4372: setup rtc as system-power-controller
    ARM: dts: omap4-droid4: fix vibrations on Droid 4
    bus: ti-sysc: Fix no_console_suspend handling
    bus: ti-sysc: Fix module register ioremap for larger offsets
    ARM: OMAP2+: Fix module address for modules using mpu_rt_idx
    ARM: OMAP2+: Fix null hwmod for ti-sysc debug

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     
  • In the __getcpu function, lsl is using the wrong target and destination
    registers. Luckily, the compiler tends to choose %eax for both variables,
    so it has been working so far.

    Fixes: a582c540ac1b ("x86/vdso: Use RDPID in preference to LSL when available")
    Signed-off-by: Samuel Neves
    Signed-off-by: Thomas Gleixner
    Acked-by: Andy Lutomirski
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/20180901201452.27828-1-sneves@dei.uc.pt

    Samuel Neves
     
  • Pull watchdog fixlet from Wim Van Sebroeck:
    "Document support for r8a774a1"

    * tag 'linux-watchdog-4.19-rc2' of git://www.linux-watchdog.org/linux-watchdog:
    dt-bindings: watchdog: renesas-wdt: Document r8a774a1 support

    Linus Torvalds
     
  • Pull clk fixes from Stephen Boyd:
    "Two small fixes, one for the x86 Stoney SoC to get a more accurate clk
    frequency and the other to fix a bad allocation in the Nuvoton NPCM7XX
    driver"

    * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
    clk: x86: Set default parent to 48Mhz
    clk: npcm7xx: fix memory allocation

    Linus Torvalds
     

01 Sep, 2018

2 commits

  • The trick with flipping bit 63 to avoid loading the address of the 1:1
    mapping of the poisoned page while the 1:1 map is updated used to work when
    unmapping the page. But it falls down horribly when attempting to directly
    set the page as uncacheable.

    The problem is that when the cache mode is changed to uncachable, the pages
    needs to be flushed from the cache first. But the decoy address is
    non-canonical due to bit 63 flipped, and the CLFLUSH instruction throws a
    #GP fault.

    Add code to change_page_attr_set_clr() to fix the address before calling
    flush.

    Fixes: 284ce4011ba6 ("x86/memory_failure: Introduce {set, clear}_mce_nospec()")
    Suggested-by: Linus Torvalds
    Signed-off-by: Tony Luck
    Signed-off-by: Thomas Gleixner
    Acked-by: Linus Torvalds
    Cc: Peter Anvin
    Cc: Borislav Petkov
    Cc: linux-edac
    Cc: Dan Williams
    Cc: Dave Jiang
    Link: https://lkml.kernel.org/r/20180831165506.GA9605@agluck-desk

    LuckTony
     
  • Pull arm64 fixes from Will Deacon:
    "A few arm64 fixes came in this week, specifically fixing some nasty
    truncation of return values from firmware calls and resolving a
    VM_BUG_ON due to accessing uninitialised struct pages corresponding to
    NOMAP pages.

    Summary:

    - Fix typos in SVE documentation

    - Fix type-checking and implicit truncation for SMCCC calls

    - Force CONFIG_HOLES_IN_ZONE=y so that SLAB doesn't fall over NOMAP
    regions"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: mm: always enable CONFIG_HOLES_IN_ZONE
    arm/arm64: smccc-1.1: Handle function result as parameters
    arm/arm64: smccc-1.1: Make return values unsigned long
    Documentation/arm64/sve: Couple of improvements and typos

    Linus Torvalds
     

31 Aug, 2018

15 commits

  • When PTI is enabled on x86-32 the kernel uses the GDT mapped in the fixmap
    for the simple reason that this address is also mapped for user-space.

    The efi_call_phys_prolog()/efi_call_phys_epilog() wrappers change the GDT
    to call EFI runtime services and switch back to the kernel GDT when they
    return. But the switch-back uses the writable GDT, not the fixmap GDT.

    When that happened and and the CPU returns to user-space it switches to the
    user %cr3 and tries to restore user segment registers. This fails because
    the writable GDT is not mapped in the user page-table, and without a GDT
    the fault handlers also can't be launched. The result is a triple fault and
    reboot of the machine.

    Fix that by restoring the GDT back to the fixmap GDT which is also mapped
    in the user page-table.

    Fixes: 7757d607c6b3 x86/pti: ('Allow CONFIG_PAGE_TABLE_ISOLATION for x86_32')
    Reported-by: Guenter Roeck
    Signed-off-by: Joerg Roedel
    Signed-off-by: Thomas Gleixner
    Tested-by: Guenter Roeck
    Cc: Ard Biesheuvel
    Cc: Michal Hocko
    Cc: Andi Kleen
    Cc: Linus Torvalds
    Cc: Dave Hansen
    Cc: Pavel Machek
    Cc: hpa@zytor.com
    Cc: linux-efi@vger.kernel.org
    Link: https://lkml.kernel.org/r/1535702738-10971-1-git-send-email-joro@8bytes.org

    Joerg Roedel
     
  • Pull xen fixes from Juergen Gross:

    - minor cleanup avoiding a warning when building with new gcc

    - a patch to add a new sysfs node for Xen frontend/backend drivers to
    make it easier to obtain the state of a pv device

    - two fixes for 32-bit pv-guests to avoid intermediate L1TF vulnerable
    PTEs

    * tag 'for-linus-4.19b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    x86/xen: remove redundant variable save_pud
    xen: export device state to sysfs
    x86/pae: use 64 bit atomic xchg function in native_ptep_get_and_clear
    x86/xen: don't write ptes directly in 32-bit PV guests

    Linus Torvalds
     
  • Pull m68k fix from Geert Uytterhoeven:
    "Just a single fix for a bug introduced during the merge window: fix
    wrong date and time on PMU-based Macs"

    * tag 'm68k-for-v4.19-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k/mac: Use correct PMU response format

    Linus Torvalds
     
  • Pull i2c fixes from Wolfram Sang:

    - regression fixes for i801 and designware

    - better API and leak fix for releasing DMA safe buffers

    - better greppable strings for the bitbang algorithm

    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
    i2c: sh_mobile: fix leak when using DMA bounce buffer
    i2c: sh_mobile: define start_ch() void as it only returns 0 anyhow
    i2c: refactor function to release a DMA safe buffer
    i2c: algos: bit: make the error messages grepable
    i2c: designware: Re-init controllers with pm_disabled set on resume
    i2c: i801: Allow ACPI AML access I/O ports not reserved for SMBus

    Linus Torvalds
     
  • A NMI can hit in the middle of context switching or in the middle of
    switch_mm_irqs_off(). In either case, CR3 might not match current->mm,
    which could cause copy_from_user_nmi() and friends to read the wrong
    memory.

    Fix it by adding a new nmi_uaccess_okay() helper and checking it in
    copy_from_user_nmi() and in __copy_from_user_nmi()'s callers.

    Signed-off-by: Andy Lutomirski
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Rik van Riel
    Cc: Nadav Amit
    Cc: Borislav Petkov
    Cc: Jann Horn
    Cc: Peter Zijlstra
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/dd956eba16646fd0b15c3c0741269dfd84452dac.1535557289.git.luto@kernel.org

    Andy Lutomirski
     
  • When bootstrapping an architecture, it's usual to generate the kernel's
    user-space headers (make headers_install) before building a compiler. Move
    the compiler check (for asm goto support) to the archprepare target so that
    it is only done when building code for the target.

    Fixes: e501ce957a78 ("x86: Force asm-goto")
    Reported-by: Helmut Grohne
    Signed-off-by: Ben Hutchings
    Signed-off-by: Thomas Gleixner
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/20180829194317.GA4765@decadent.org.uk

    Ben Hutchings
     
  • show_opcodes() is used both for dumping kernel instructions and for dumping
    user instructions. If userspace causes #PF by jumping to a kernel address,
    show_opcodes() can be reached with regs->ip controlled by the user,
    pointing to kernel code. Make sure that userspace can't trick us into
    dumping kernel memory into dmesg.

    Fixes: 7cccf0725cf7 ("x86/dumpstack: Add a show_ip() function")
    Signed-off-by: Jann Horn
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Kees Cook
    Reviewed-by: Borislav Petkov
    Cc: "H. Peter Anvin"
    Cc: Andy Lutomirski
    Cc: security@kernel.org
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/20180828154901.112726-1-jannh@google.com

    Jann Horn
     
  • In preparation to remove direct access to device_node.type, add
    of_node_is_type() and of_node_get_device_type() helpers to check and
    retrieve the device type.

    Cc: Frank Rowand
    Signed-off-by: Rob Herring

    Rob Herring
     
  • When notifiers were there, `skip_onerr` was used to avoid calling
    particular step startup/teardown callbacks in the CPU up/down rollback
    path, which made the hotplug asymmetric.

    As notifiers are gone now after the full state machine conversion, the
    `skip_onerr` field is no longer required.

    Remove it from the structure and its usage.

    Signed-off-by: Mukesh Ojha
    Signed-off-by: Thomas Gleixner
    Acked-by: Peter Zijlstra (Intel)
    Link: https://lkml.kernel.org/r/1535439294-31426-1-git-send-email-mojha@codeaurora.org

    Mukesh Ojha
     
  • Commit 6d526ee26ccd ("arm64: mm: enable CONFIG_HOLES_IN_ZONE for NUMA")
    only enabled HOLES_IN_ZONE for NUMA systems because the NUMA code was
    choking on the missing zone for nomap pages. This problem doesn't just
    apply to NUMA systems.

    If the architecture doesn't set HAVE_ARCH_PFN_VALID, pfn_valid() will
    return true if the pfn is part of a valid sparsemem section.

    When working with multiple pages, the mm code uses pfn_valid_within()
    to test each page it uses within the sparsemem section is valid. On
    most systems memory comes in MAX_ORDER_NR_PAGES chunks which all
    have valid/initialised struct pages. In this case pfn_valid_within()
    is optimised out.

    Systems where this isn't true (e.g. due to nomap) should set
    HOLES_IN_ZONE and provide HAVE_ARCH_PFN_VALID so that mm tests each
    page as it works with it.

    Currently non-NUMA arm64 systems can't enable HOLES_IN_ZONE, leading to
    a VM_BUG_ON():

    | page:fffffdff802e1780 is uninitialized and poisoned
    | raw: ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff
    | raw: ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff
    | page dumped because: VM_BUG_ON_PAGE(PagePoisoned(p))
    | ------------[ cut here ]------------
    | kernel BUG at include/linux/mm.h:978!
    | Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
    [...]
    | CPU: 1 PID: 25236 Comm: dd Not tainted 4.18.0 #7
    | Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
    | pstate: 40000085 (nZcv daIf -PAN -UAO)
    | pc : move_freepages_block+0x144/0x248
    | lr : move_freepages_block+0x144/0x248
    | sp : fffffe0071177680
    [...]
    | Process dd (pid: 25236, stack limit = 0x0000000094cc07fb)
    | Call trace:
    | move_freepages_block+0x144/0x248
    | steal_suitable_fallback+0x100/0x16c
    | get_page_from_freelist+0x440/0xb20
    | __alloc_pages_nodemask+0xe8/0x838
    | new_slab+0xd4/0x418
    | ___slab_alloc.constprop.27+0x380/0x4a8
    | __slab_alloc.isra.21.constprop.26+0x24/0x34
    | kmem_cache_alloc+0xa8/0x180
    | alloc_buffer_head+0x1c/0x90
    | alloc_page_buffers+0x68/0xb0
    | create_empty_buffers+0x20/0x1ec
    | create_page_buffers+0xb0/0xf0
    | __block_write_begin_int+0xc4/0x564
    | __block_write_begin+0x10/0x18
    | block_write_begin+0x48/0xd0
    | blkdev_write_begin+0x28/0x30
    | generic_perform_write+0x98/0x16c
    | __generic_file_write_iter+0x138/0x168
    | blkdev_write_iter+0x80/0xf0
    | __vfs_write+0xe4/0x10c
    | vfs_write+0xb4/0x168
    | ksys_write+0x44/0x88
    | sys_write+0xc/0x14
    | el0_svc_naked+0x30/0x34
    | Code: aa1303e0 90001a01 91296421 94008902 (d4210000)
    | ---[ end trace 1601ba47f6e883fe ]---

    Remove the NUMA dependency.

    Link: https://www.spinics.net/lists/arm-kernel/msg671851.html
    Cc:
    Cc: Ard Biesheuvel
    Reported-by: Mikulas Patocka
    Reviewed-by: Pavel Tatashin
    Tested-by: Mikulas Patocka
    Signed-off-by: James Morse
    Signed-off-by: Will Deacon

    James Morse
     
  • Now that the 68k Mac port has adopted the via-pmu driver, it must decode
    the PMU response accordingly otherwise the date and time will be wrong.

    Fixes: ebd722275f9cfc67 ("macintosh/via-pmu: Replace via-pmu68k driver with via-pmu driver")
    Signed-off-by: Finn Thain
    Signed-off-by: Geert Uytterhoeven

    Finn Thain
     
  • Pull drm fixes from Dave Airlie:
    "Regular fixes pull:

    - Mediatek has a bunch of fixes to their RDMA and Overlay engines.

    - i915 has some Cannonlake/Geminilake watermark workarounds, LSPCON
    fix, HDCP free fix, audio fix and a ppgtt reference counting fix.

    - amdgpu has some SRIOV, Kasan, memory leaks and other misc fixes"

    * tag 'drm-fixes-2018-08-31' of git://anongit.freedesktop.org/drm/drm: (35 commits)
    drm/i915/audio: Hook up component bindings even if displays are disabled
    drm/i915: Increase LSPCON timeout
    drm/i915: Stop holding a ref to the ppgtt from each vma
    drm/i915: Free write_buf that we allocated with kzalloc.
    drm/i915: Fix glk/cnl display w/a #1175
    drm/amdgpu: Need to set moved to true when evict bo
    drm/amdgpu: Remove duplicated power source update
    drm/amd/display: Fix memory leak caused by missed dc_sink_release
    drm/amdgpu: fix holding mn_lock while allocating memory
    drm/amdgpu: Power on uvd block when hw_fini
    drm/amdgpu: Update power state at the end of smu hw_init.
    drm/amdgpu: Fix vce initialize failed on Kaveri/Mullins
    drm/amdgpu: Enable/disable gfx PG feature in rlc safe mode
    drm/amdgpu: Adjust the VM size based on system memory size v2
    drm/mediatek: fix connection from RDMA2 to DSI1
    drm/mediatek: update some variable name from ovl to comp
    drm/mediatek: use layer_nr function to get layer number to init plane
    drm/mediatek: add function to return RDMA layer number
    drm/mediatek: add function to return OVL layer number
    drm/mediatek: add function to get layer number for component
    ...

    Linus Torvalds
     
  • They are too noisy

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • Pull power management fixes from Rafael Wysocki:
    "These address a corner case in the menu cpuidle governor and fix error
    handling in the PM core's generic clock management code.

    Specifics:

    - Make the menu cpuidle governor avoid stopping the scheduler tick if
    the predicted idle duration exceeds the tick period length, but the
    selected idle state is shallow and deeper idle states with high
    target residencies are available (Rafael Wysocki).

    - Make the PM core's generic clock management code use a proper data
    type for one variable to make error handling work (Dan Carpenter)"

    * tag 'pm-4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    cpuidle: menu: Retain tick when shallow state is selected
    PM / clk: signedness bug in of_pm_clk_add_clks()

    Linus Torvalds
     
  • Merge a generic clock management fix for 4.19-rc2.

    * pm-core:
    PM / clk: signedness bug in of_pm_clk_add_clks()

    Rafael J. Wysocki