06 Jan, 2017

1 commit

  • commit 84d77d3f06e7e8dea057d10e8ec77ad71f721be3 upstream.

    It is the reasonable expectation that if an executable file is not
    readable there will be no way for a user without special privileges to
    read the file. This is enforced in ptrace_attach but if ptrace
    is already attached before exec there is no enforcement for read-only
    executables.

    As the only way to read such an mm is through access_process_vm
    spin a variant called ptrace_access_vm that will fail if the
    target process is not being ptraced by the current process, or
    the current process did not have sufficient privileges when ptracing
    began to read the target processes mm.

    In the ptrace implementations replace access_process_vm by
    ptrace_access_vm. There remain several ptrace sites that still use
    access_process_vm as they are reading the target executables
    instructions (for kernel consumption) or register stacks. As such it
    does not appear necessary to add a permission check to those calls.

    This bug has always existed in Linux.

    Fixes: v1.0
    Reported-by: Andy Lutomirski
    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     

12 Dec, 2016

1 commit

  • Pull MIPS fixes from Ralf Baechle:
    "Two more MIPS fixes for 4.9:

    - RTC: Return -ENODEV so an external RTC will be tried

    - Fix mask of GPE frequency

    These two have been tested on Imagination's automated test system and
    also both received positive reviews on the linux-mips mailing list"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: Lantiq: Fix mask of GPE frequency
    MIPS: Return -ENODEV from weak implementation of rtc_mips_set_time

    Linus Torvalds
     

11 Dec, 2016

2 commits

  • The hardware documentation says bit 11:10 are used for the GPE
    frequency selection. Fix the mask in the define to match these bits.

    Signed-off-by: Hauke Mehrtens
    Reported-by: Dan Carpenter
    Reviewed-by: Thomas Langer
    Cc: linux-mips@linux-mips.org
    Cc: john@phrozen.org
    Patchwork: https://patchwork.linux-mips.org/patch/14648/
    Signed-off-by: Ralf Baechle

    Hauke Mehrtens
     
  • The sync_cmos_clock function in kernel/time/ntp.c first tries to update
    the internal clock of the cpu by calling the "update_persistent_clock64"
    architecture specific function. If this returns -ENODEV, it then tries
    to update an external RTC using "rtc_set_ntp_time".

    On the mips architecture, the weak implementation of the underlying
    function would return 0 if it wasn't overridden. This meant that the
    sync_cmos_clock function would never try to update an external RTC
    (if both CONFIG_GENERIC_CMOS_UPDATE and CONFIG_RTC_SYSTOHC are
    configured)

    Returning -ENODEV instead, means that an external RTC will be tried.

    Signed-off-by: Luuk Paulussen
    Reviewed-by: Richard Laing
    Reviewed-by: Scott Parlane
    Reviewed-by: Chris Packham
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/14649/
    Signed-off-by: Ralf Baechle

    Luuk Paulussen
     

10 Dec, 2016

2 commits

  • Pull ARM SoC fixes from Olof Johansson:
    "Final batch of SoC fixes

    A few fixes that have trickled in over the last week, all fixing minor
    errors in devicetrees -- UART pin assignment on Allwinner H3,
    correcting number of SATA ports on a Marvell-based Linkstation
    platform and a display clock fix for Freescale/NXP i.MX7D that fixes a
    freeze when starting up X"

    * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: dts: orion5x: fix number of sata port for linkstation ls-gl
    ARM: dts: imx7d: fix LCDIF clock assignment
    dts: sun8i-h3: correct UART3 pin definitions

    Linus Torvalds
     
  • Pull m68k fixes from Geert Uytterhoeven:

    - build fix for drivers calling ndelay() in a conditional block without
    curly braces

    - defconfig updates

    * tag 'm68k-for-v4.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k: Fix ndelay() macro
    m68k/defconfig: Update defconfigs for v4.9-rc1

    Linus Torvalds
     

09 Dec, 2016

3 commits

  • Pull parisc fixes from Helge Deller:
    "Three important fixes for the parisc architecture.

    Dave provided two patches: One which purges the TLB before setting a
    PTE entry and a second one which drops unnecessary TLB flushes. Both
    patches have been tested for one week on the debian buildd servers and
    prevent random segmentation faults.

    The patch from me fixes a crash at boot inside the TLB measuring code
    on SMP machines with PA8000-PA8700 CPUs (specifically A500-44 and
    J5000 servers)"

    * 'parisc-4.9-5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Fix TLB related boot crash on SMP machines
    parisc: Remove unnecessary TLB purges from flush_dcache_page_asm and flush_icache_page_asm
    parisc: Purge TLB before setting PTE

    Linus Torvalds
     
  • At bootup we run measurements to calculate the best threshold for when we
    should be using full TLB flushes instead of just flushing a specific amount of
    TLB entries. This performance test is run over the kernel text segment.

    But running this TLB performance test on the kernel text segment turned out to
    crash some SMP machines when the kernel text pages were mapped as huge pages.

    To avoid those crashes this patch simply skips this test on some SMP machines
    and calculates an optimal threshold based on the maximum number of available
    TLB entries and number of online CPUs.

    On a technical side, this seems to happen:
    The TLB measurement code uses flush_tlb_kernel_range() to flush specific TLB
    entries with a page size of 4k (pdtlb 0(sr1,addr)). On UP systems this purge
    instruction seems to work without problems even if the pages were mapped as
    huge pages. But on SMP systems the TLB purge instruction is broadcasted to
    other CPUs. Those CPUs then crash the machine because the page size is not as
    expected. C8000 machines with PA8800/PA8900 CPUs were not affected by this
    problem, because the required cache coherency prohibits to use huge pages at
    all. Sadly I didn't found any documentation about this behaviour, so this
    finding is purely based on testing with phyiscal SMP machines (A500-44 and
    J5000, both were 2-way boxes).

    Cc: # v3.18+
    Signed-off-by: Helge Deller

    Helge Deller
     
  • Bug report from Debian [0] shows there's minor changed model of
    Linkstation LS-GL that uses the 2nd SATA port of the SoC.
    So it's necessary to enable two SATA ports, though for that specific
    model only the 2nd one is used.

    [0] https://bugs.debian.org/845611

    Fixes: b1742ffa9ddb ("ARM: dts: orion5x: add device tree for buffalo linkstation ls-gl")
    Reported-by: Ryan Tandy
    Tested-by: Ryan Tandy
    Signed-off-by: Roger Shimizu
    Signed-off-by: Gregory CLEMENT

    Roger Shimizu
     

08 Dec, 2016

3 commits

  • The eLCDIF IP of the i.MX 7 SoC knows multiple clocks and lists them
    separately:

    Clock Clock Root Description
    apb_clk MAIN_AXI_CLK_ROOT AXI clock
    pix_clk LCDIF_PIXEL_CLK_ROOT Pixel clock
    ipg_clk_s MAIN_AXI_CLK_ROOT Peripheral access clock

    All of them are switched by a single gate, which is part of the
    IMX7D_LCDIF_PIXEL_ROOT_CLK clock. Hence using that clock also for
    the AXI bus clock (clock-name "axi") makes sure the gate gets
    enabled when accessing registers.

    There seem to be no separate AXI display clock, and the clock is
    optional. Hence remove the dummy clock.

    This fixes kernel freezes when starting the X-Server (which
    disables/re-enables the display controller).

    Fixes: e8ed73f691bd ("ARM: dts: imx7d: add lcdif support")
    Signed-off-by: Stefan Agner
    Reviewed-by: Fabio Estevam
    Acked-by: Shawn Guo
    Signed-off-by: Olof Johansson

    Stefan Agner
     
  • In a previous commit, I made a copy/paste error in the pinmux
    definitions of UART3: PG{13,14} instead of PA{13,14}. This commit takes
    care of that. I have tested this commit on Orange Pi PC and Orange Pi
    Plus, and it works for these boards.

    Fixes: e3d11d3c45c5 ("dts: sun8i-h3: add pinmux definitions for
    UART2-3")

    Signed-off-by: Jorik Jonker
    Acked-by: Maxime Ripard
    Signed-off-by: Olof Johansson

    Jorik Jonker
     
  • Pull x86 fixes from Ingo Molnar:
    "Misc fixes: a core dumping crash fix, a guess-unwinder regression fix,
    plus three build warning fixes"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/unwind: Fix guess-unwinder regression
    x86/build: Annotate die() with noreturn to fix build warning on clang
    x86/platform/olpc: Fix resume handler build warning
    x86/apic/uv: Silence a shift wrapping warning
    x86/coredump: Always use user_regs_struct for compat_elf_gregset_t

    Linus Torvalds
     

07 Dec, 2016

2 commits

  • We have four routines in pacache.S that use temporary alias pages:
    copy_user_page_asm(), clear_user_page_asm(), flush_dcache_page_asm() and
    flush_icache_page_asm(). copy_user_page_asm() and clear_user_page_asm()
    don't purge the TLB entry used for the operation.
    flush_dcache_page_asm() and flush_icache_page_asm do purge the entry.

    Presumably, this was thought to optimize TLB use. However, the
    operation is quite heavy weight on PA 1.X processors as we need to take
    the TLB lock and a TLB broadcast is sent to all processors.

    This patch removes the purges from flush_dcache_page_asm() and
    flush_icache_page_asm.

    Signed-off-by: John David Anglin
    Cc: # v3.16+
    Signed-off-by: Helge Deller

    John David Anglin
     
  • The attached change interchanges the order of purging the TLB and
    setting the corresponding page table entry. TLB purges are strongly
    ordered. It occurred to me one night that setting the PTE first might
    have subtle ordering issues on SMP machines and cause random memory
    corruption.

    A TLB lock guards the insertion of user TLB entries. So after the TLB
    is purged, a new entry can't be inserted until the lock is released.
    This ensures that the new PTE value is used when the lock is released.

    Since making this change, no random segmentation faults have been
    observed on the Debian hppa buildd servers.

    Signed-off-by: John David Anglin
    Cc: # v3.16+
    Signed-off-by: Helge Deller

    John David Anglin
     

06 Dec, 2016

3 commits

  • Lukasz reported that perf stat counters overflow handling is broken on KNL/SLM.

    Both these parts have full_width_write set, and that does indeed have
    a problem. In order to deal with counter wrap, we must sample the
    counter at at least half the counter period (see also the sampling
    theorem) such that we can unambiguously reconstruct the count.

    However commit:

    069e0c3c4058 ("perf/x86/intel: Support full width counting")

    sets the sampling interval to the full period, not half.

    Fixing that exposes another issue, in that we must not sign extend the
    delta value when we shift it right; the counter cannot have
    decremented after all.

    With both these issues fixed, counter overflow functions correctly
    again.

    Reported-by: Lukasz Odzioba
    Tested-by: Liang, Kan
    Tested-by: Odzioba, Lukasz
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Alexander Shishkin
    Cc: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    Cc: Vince Weaver
    Cc: stable@vger.kernel.org
    Fixes: 069e0c3c4058 ("perf/x86/intel: Support full width counting")
    Signed-off-by: Ingo Molnar

    Peter Zijlstra (Intel)
     
  • The Knights Mill is enough close to Knights Landing so the path reuses
    C-state residency support of the latter.

    Signed-off-by: Piotr Luc
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Alexander Shishkin
    Cc: Arnaldo Carvalho de Melo
    Cc: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    Cc: Vince Weaver
    Link: http://lkml.kernel.org/r/20161201000853.18260-1-piotr.luc@intel.com
    Signed-off-by: Ingo Molnar

    Piotr Luc
     
  • Pull powerpc fixes from Michael Ellerman:
    "Four fixes, the first for code we merged this cycle and three that are
    also going to stable:

    - On 64-bit Book3E we were not placing the .text section where we
    said we would in the asm.

    - We broke building the boot wrapper on some 32-bit toolchains.

    - Lazy icache flushing was broken on pre-POWER5 machines.

    - One of the error paths in our EEH code would lead to a deadlock.

    Thanks to: Andrew Donnellan, Ben Hutchings, Benjamin Herrenschmidt,
    Nicholas Piggin"

    * tag 'powerpc-4.9-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    powerpc/64: Fix placement of .text to be immediately following .head.text
    powerpc/eeh: Fix deadlock when PE frozen state can't be cleared
    powerpc/mm: Fix lazy icache flush on pre-POWER5
    powerpc/boot: Fix build failure in 32-bit boot wrapper

    Linus Torvalds
     

03 Dec, 2016

2 commits

  • Pull ARM SoC fixes from Arnd Bergmann:
    "This should be the last set of bugfixes for arm-soc in v4.9. None of
    these are critical regressions, but it would be nice to still get them
    merged.

    - On the Juno platform, the idle latency was described wrong, leading
    to suboptimal cpuidle tuning.

    - Also on the same platform, PCI I/O space was set up incorrectly and
    could not work.

    - On the sti platform, a syntactically incorrect DT entry caused
    warnings.

    - The newly added 'gr8' platform has somewhat confusing file names,
    which we rename for consistency"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    arm64: dts: juno: fix cluster sleep state entry latency on all SoC versions
    arm64: dts: juno: Correct PCI IO window
    ARM: dts: STiH407-family: fix i2c nodes
    ARM: gr8: Rename the DTSI and relevant DTS

    Linus Torvalds
     
  • The core and the cluster sleep state entry latencies can't be same as
    cluster sleep involves more work compared to core level e.g. shared
    cache maintenance.

    Experiments have shown on an average about 100us more latency for the
    cluster sleep state compared to the core level sleep. This patch fixes
    the entry latency for the cluster sleep state.

    Fixes: 28e10a8f3a03 ("arm64: dts: juno: Add idle-states to device tree")
    Cc: Lorenzo Pieralisi
    Cc: "Jon Medhurst (Tixy)"
    Reviewed-by: Liviu Dudau
    Signed-off-by: Sudeep Holla
    Signed-off-by: Arnd Bergmann

    Sudeep Holla
     

01 Dec, 2016

3 commits

  • Do not introduce any additional alignment. Placement of text section
    will be set by fixed section macros. Without this, output section
    alignment defaults to 4096, which makes BookE text section start at
    0x1000 when it is expected to start at 0x100.

    This was introduced by commit 57f266497d81 ("powerpc: Use gas sections
    for arranging exception vectors") and was caught with the scripted head
    section checker (not yet merged).

    Fixes: 57f266497d81 ("powerpc: Use gas sections for arranging exception vectors")
    Signed-off-by: Nicholas Piggin
    Signed-off-by: Michael Ellerman

    Nicholas Piggin
     
  • In eeh_reset_device(), we take the pci_rescan_remove_lock immediately after
    after we call eeh_reset_pe() to reset the PCI controller. We then call
    eeh_clear_pe_frozen_state(), which can return an error. In this case, we
    bail out of eeh_reset_device() without calling pci_unlock_rescan_remove().

    Add a call to pci_unlock_rescan_remove() in the eeh_clear_pe_frozen_state()
    error path so that we don't cause a deadlock later on.

    Reported-by: Pradipta Ghosh
    Fixes: 78954700631f ("powerpc/eeh: Avoid I/O access during PE reset")
    Cc: stable@vger.kernel.org # v3.16+
    Signed-off-by: Andrew Donnellan
    Acked-by: Russell Currey
    Signed-off-by: Michael Ellerman

    Andrew Donnellan
     
  • The PCIe root complex on Juno translates the MMIO mapped
    at 0x5f800000 to the PIO address range starting at 0
    (which is common because PIO addresses are generally < 64k).
    Correct the DT to reflect this.

    Signed-off-by: Jeremy Linton
    Signed-off-by: Arnd Bergmann

    Jeremy Linton
     

30 Nov, 2016

1 commit

  • commit 1c3c90930392 broke PAE40. Macro pfn_pte(pfn, prot) creates paddr
    from pfn, but the page shift was getting truncated to 32 bits since we lost
    the proper cast to 64 bits (for PAE400

    Instead of reverting that commit, use a better helper which is 32/64 bits
    safe just like ARM implementation.

    Fixes: 1c3c90930392 ("ARC: mm: fix build breakage with STRICT_MM_TYPECHECKS")
    Cc: #4.4+
    Signed-off-by: Yuriy Kolerov
    [vgupta: massaged changelog]
    Signed-off-by: Vineet Gupta

    Yuriy Kolerov
     

29 Nov, 2016

3 commits

  • On 64-bit CPUs with no-execute support and non-snooping icache, such as
    970 or POWER4, we have a software mechanism to ensure coherency of the
    cache (using exec faults when needed).

    This was broken due to a logic error when the code was rewritten
    from assembly to C, previously the assembly code did:

    BEGIN_FTR_SECTION
    mr r4,r30
    mr r5,r7
    bl hash_page_do_lazy_icache
    END_FTR_SECTION(CPU_FTR_NOEXECUTE|CPU_FTR_COHERENT_ICACHE, CPU_FTR_NOEXECUTE)

    Which tests that:
    (cpu_features & (NOEXECUTE | COHERENT_ICACHE)) == NOEXECUTE

    Which says that the current cpu does have NOEXECUTE, but does not have
    COHERENT_ICACHE.

    Fixes: 91f1da99792a ("powerpc/mm: Convert 4k hash insert to C")
    Fixes: 89ff725051d1 ("powerpc/mm: Convert __hash_page_64K to C")
    Fixes: a43c0eb8364c ("powerpc/mm: Convert 4k insert from asm to C")
    Cc: stable@vger.kernel.org # v4.5+
    Signed-off-by: Benjamin Herrenschmidt
    Reviewed-by: Aneesh Kumar K.V
    [mpe: Change log verbosification]
    Signed-off-by: Michael Ellerman

    Benjamin Herrenschmidt
     
  • Signed-off-by: Vineet Gupta

    Vineet Gupta
     
  • Apparenty this is coming in the way of gcc fix which inhibits the usage
    of LP_COUNT as a gpr.

    Cc: stable@vger.kernel.org
    Signed-off-by: Vineet Gupta

    Vineet Gupta
     

28 Nov, 2016

5 commits

  • OPAL is not callable from 32-bit mode and the assembly code for it
    may not even build (depending on how binutils was configured).

    References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=powerpcspe&ver=4.8.7-1&stamp=1479203712
    Fixes: 656ad58ef19e ("powerpc/boot: Add OPAL console to epapr wrappers")
    Cc: stable@vger.kernel.org # v4.8+
    Signed-off-by: Ben Hutchings
    Signed-off-by: Michael Ellerman

    Ben Hutchings
     
  • My attempt at fixing some KASAN false positive warnings was rather brain
    dead, and it broke the guess unwinder. With frame pointers disabled,
    /proc//stack is broken:

    # cat /proc/1/stack
    [] 0xffffffffffffffff

    Restore the code flow to more closely resemble its previous state, while
    still using READ_ONCE_NOCHECK() macros to silence KASAN false positives.

    Signed-off-by: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Fixes: c2d75e03d630 ("x86/unwind: Prevent KASAN false positive warnings in guess unwinder")
    Link: http://lkml.kernel.org/r/b824f92c2c22eca5ec95ac56bd2a7c84cf0b9df9.1480309971.git.jpoimboe@redhat.com
    Signed-off-by: Ingo Molnar

    Josh Poimboeuf
     
  • Fixes below warning with clang:

    In file included from ../arch/x86/tools/relocs_64.c:17:
    ../arch/x86/tools/relocs.c:977:6: warning: variable 'do_reloc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]

    Signed-off-by: Peter Foley
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20161126222229.673-1-pefoley2@pefoley.com
    Signed-off-by: Ingo Molnar

    Peter Foley
     
  • Fix:

    arch/x86/platform/olpc/olpc-xo15-sci.c:199:12: warning: ‘xo15_sci_resume’
    defined but not used [-Wunused-function]
    static int xo15_sci_resume(struct device *dev)
    ^

    which I see in randconfig builds here.

    Signed-off-by: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20161126142706.13602-1-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Borislav Petkov
     
  • Pull MIPS fixes from Ralf Baechle:
    "Another round of MIPS fixes for 4.9:

    - Fix unreadable output in __do_page_fault due to the KERN_CONT
    patchset

    - Correctly handle MIPS R6 fixes to the c0_wired register"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: mm: Fix output of __do_page_fault
    MIPS: Mask out limit field when calculating wired entry count

    Linus Torvalds
     

27 Nov, 2016

3 commits

  • Pull ARM fix from Russell King:
    "This resolves the ksyms issues by reverting the commit which
    introduced the breakage"

    There was what I consider to be a better fix, but it's late in the rc
    game, so I'll take the revert.

    * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
    Revert "arm: move exports to definitions"

    Linus Torvalds
     
  • Pull KVM fixes from Radim Krčmář:
    "Four fixes for bugs found by syzkaller on x86, all for stable"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: x86: check for pic and ioapic presence before use
    KVM: x86: fix out-of-bounds accesses of rtc_eoi map
    KVM: x86: drop error recovery in em_jmp_far and em_ret_far
    KVM: x86: fix out-of-bounds access in lapic

    Linus Torvalds
     
  • Pull powerpc fixes from Michael Ellerman:
    "Fixes marked for stable:
    - Set missing wakeup bit in LPCR on POWER9
    - Fix the early OPAL console wrappers
    - Fixup kernel read only mapping

    Fixes for code merged this cycle:
    - Fix missing CRCs, add more asm-prototypes.h declarations"

    * tag 'powerpc-4.9-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    powerpc/mm: Fixup kernel read only mapping
    powerpc/boot: Fix the early OPAL console wrappers
    powerpc: Fix missing CRCs, add more asm-prototypes.h declarations
    powerpc: Set missing wakeup bit in LPCR on POWER9

    Linus Torvalds
     

26 Nov, 2016

3 commits

  • Pull parisc fixes from Helge Deller:
    "On parisc we were still seeing occasional random segmentation faults
    and memory corruption on SMP machines. Dave Anglin then looked again
    at the TLB related code and found two issues in the PCI DMA and
    generic TLB flush functions.

    Then, in our startup code we had some timing of the cache and TLB
    functions to calculate a threshold when to use a complete TLB/cache
    flush or just to flush a specific range. This code produced a race
    with newly started CPUs and thus lead to occasional kernel crashes
    (due to stale TLB/cache entries). The patch by Dave fixes this issue
    by flushing the local caches before starting secondary CPUs and by
    removing the race.

    The last problem fixed by this series is that we quite often suffered
    from hung tasks and self-detected stalls on the CPUs. It was somehow
    clear that this was related to the (in v4.7) newly introduced cr16
    clocksource and the own implementation of sched_clock(). I replaced
    the open-coded sched_clock() function and switched to the generic
    sched_clock() implementation which seems to have fixed this isse as
    well.

    All patches have been sucessfully tested on a variety of machines,
    including our debian buildd servers.

    All patches (beside the small pr_cont fix) are tagged for stable
    releases"

    * 'parisc-4.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Also flush data TLB in flush_icache_page_asm
    parisc: Fix race in pci-dma.c
    parisc: Switch to generic sched_clock implementation
    parisc: Fix races in parisc_setup_cache_timing()
    parisc: Fix printk continuations in system detection

    Linus Torvalds
     
  • …el/git/pchotard/sti into fixes

    Pull "STi DT fix" from Patrice Chotard:

    The I2C nodes are missing #address-cells and #size-cells.
    This is causing warning at device tree compilation when
    some I2C device sub-nodes are defined.

    * tag 'sti-dt-for-v4.9-rc-round2' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti:
    ARM: dts: STiH407-family: fix i2c nodes

    Arnd Bergmann
     
  • …/git/mripard/linux into fixes

    Pull "Allwinner fixes for 4.9, second iteration" from Maxime Ripard:

    A renaming of the GR8 DTSI and DTS to make it explicitly part of the sun5i
    family.

    * tag 'sunxi-fixes-for-4.9-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
    ARM: gr8: Rename the DTSI and relevant DTS

    Arnd Bergmann
     

25 Nov, 2016

3 commits

  • This is the second issue I noticed in reviewing the parisc TLB code.

    The fic instruction may use either the instruction or data TLB in
    flushing the instruction cache. Thus, on machines with a split TLB, we
    should also flush the data TLB after setting up the temporary alias
    registers.

    Although this has no functional impact, I changed the pdtlb and pitlb
    instructions to consistently use the index register %r0. These
    instructions do not support integer displacements.

    Tested on rp3440 and c8000.

    Signed-off-by: John David Anglin
    Cc: # v3.16+
    Signed-off-by: Helge Deller

    John David Anglin
     
  • We are still troubled by occasional random segmentation faults and
    memory memory corruption on SMP machines. The causes quite a few
    package builds to fail on the Debian buildd machines for parisc. When
    gcc-6 failed to build three times in a row, I looked again at the TLB
    related code. I found a couple of issues. This is the first.

    In general, we need to ensure page table updates and corresponding TLB
    purges are atomic. The attached patch fixes an instance in pci-dma.c
    where the page table update was not guarded by the TLB lock.

    Tested on rp3440 and c8000. So far, no further random segmentation
    faults have been observed.

    Signed-off-by: John David Anglin
    Cc: # v3.16+
    Signed-off-by: Helge Deller

    John David Anglin
     
  • Drop the open-coded sched_clock() function and replace it by the provided
    GENERIC_SCHED_CLOCK implementation. We have seen quite some hung tasks in the
    past, which seem to be fixed by this patch.

    Signed-off-by: Helge Deller
    Cc: # v4.7+
    Signed-off-by: Helge Deller

    Helge Deller