13 Jul, 2015

3 commits

  • Pull MIPS fixes from Ralf Baechle:
    "A fair number of 4.2 fixes also because Markos opened the flood gates.

    - Patch up the math used calculate the location for the page bitmap.

    - The FDC (Not what you think, FDC stands for Fast Debug Channel) IRQ
    around was causing issues on non-Malta platforms, so move the code
    to a Malta specific location.

    - A spelling fix replicated through several files.

    - Fix to the emulation of an R2 instruction for R6 cores.

    - Fix the JR emulation for R6.

    - Further patching of mindless 64 bit issues.

    - Ensure the kernel won't crash on CPUs with L2 caches with >= 8
    ways.

    - Use compat_sys_getsockopt for O32 ABI on 64 bit kernels.

    - Fix cache flushing for multithreaded cores.

    - A build fix"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: O32: Use compat_sys_getsockopt.
    MIPS: c-r4k: Extend way_string array
    MIPS: Pistachio: Support CDMM & Fast Debug Channel
    MIPS: Malta: Make GIC FDC IRQ workaround Malta specific
    MIPS: c-r4k: Fix cache flushing for MT cores
    Revert "MIPS: Kconfig: Disable SMP/CPS for 64-bit"
    MIPS: cps-vec: Use macros for various arithmetics and memory operations
    MIPS: kernel: cps-vec: Replace KSEG0 with CKSEG0
    MIPS: kernel: cps-vec: Use ta0-ta3 pseudo-registers for 64-bit
    MIPS: kernel: cps-vec: Replace mips32r2 ISA level with mips64r2
    MIPS: kernel: cps-vec: Replace 'la' macro with PTR_LA
    MIPS: kernel: smp-cps: Fix 64-bit compatibility errors due to pointer casting
    MIPS: Fix erroneous JR emulation for MIPS R6
    MIPS: Fix branch emulation for BLTC and BGEC instructions
    MIPS: kernel: traps: Fix broken indentation
    MIPS: bootmem: Don't use memory holes for page bitmap
    MIPS: O32: Do not handle require 32 bytes from the stack to be readable.
    MIPS, CPUFREQ: Fix spelling of Institute.
    MIPS: Lemote 2F: Fix build caused by recent mass rename.

    Linus Torvalds
     
  • Pull x86 fixes from Thomas Gleixner:

    - the high latency PIT detection fix, which slipped through the cracks
    for rc1

    - a regression fix for the early printk mechanism

    - the x86 part to plug irq/vector related hotplug races

    - move the allocation of the espfix pages on cpu hotplug to non atomic
    context. The current code triggers a might_sleep() warning.

    - a series of KASAN fixes addressing boot crashes and usability

    - a trivial typo fix for Kconfig help text

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/kconfig: Fix typo in the CONFIG_CMDLINE_BOOL help text
    x86/irq: Retrieve irq data after locking irq_desc
    x86/irq: Use proper locking in check_irq_vectors_for_cpu_disable()
    x86/irq: Plug irq vector hotplug race
    x86/earlyprintk: Allow early_printk() to use console style parameters like '115200n8'
    x86/espfix: Init espfix on the boot CPU side
    x86/espfix: Add 'cpu' parameter to init_espfix_ap()
    x86/kasan: Move KASAN_SHADOW_OFFSET to the arch Kconfig
    x86/kasan: Add message about KASAN being initialized
    x86/kasan: Fix boot crash on AMD processors
    x86/kasan: Flush TLBs after switching CR3
    x86/kasan: Fix KASAN shadow region page tables
    x86/init: Clear 'init_level4_pgt' earlier
    x86/tsc: Let high latency PIT fail fast in quick_pit_calibrate()

    Linus Torvalds
     
  • Pull timer fixes from Thomas Gleixner:
    "This update from the timer departement contains:

    - A series of patches which address a shortcoming in the tick
    broadcast code.

    If the broadcast device is not available or an hrtimer emulated
    broadcast device, some of the original assumptions lead to boot
    failures. I rather plugged all of the corner cases instead of only
    addressing the issue reported, so the change got a little larger.

    Has been extensivly tested on x86 and arm.

    - Get rid of the last holdouts using do_posix_clock_monotonic_gettime()

    - A regression fix for the imx clocksource driver

    - An update to the new state callbacks mechanism for clockevents.
    This is required to simplify the conversion, which will take place
    in 4.3"

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    tick/broadcast: Prevent NULL pointer dereference
    time: Get rid of do_posix_clock_monotonic_gettime
    cris: Replace do_posix_clock_monotonic_gettime()
    tick/broadcast: Unbreak CONFIG_GENERIC_CLOCKEVENTS=n build
    tick/broadcast: Handle spurious interrupts gracefully
    tick/broadcast: Check for hrtimer broadcast active early
    tick/broadcast: Return busy when IPI is pending
    tick/broadcast: Return busy if periodic mode and hrtimer broadcast
    tick/broadcast: Move the check for periodic mode inside state handling
    tick/broadcast: Prevent deep idle if no broadcast device available
    tick/broadcast: Make idle check independent from mode and config
    tick/broadcast: Sanity check the shutdown of the local clock_event
    tick/broadcast: Prevent hrtimer recursion
    clockevents: Allow set-state callbacks to be optional
    clocksource/imx: Define clocksource for mx27

    Linus Torvalds
     

12 Jul, 2015

1 commit

  • Pull ARM SoC fixes from Kevin Hilman:
    "A fairly random colletion of fixes based on -rc1 for OMAP, sunxi and
    prima2 as well as a few arm64-specific DT fixes.

    This series also includes a late to support a new Allwinner (sunxi)
    SoC, but since it's rather simple and isolated to the
    platform-specific code, it's included it for this -rc"

    * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    arm64: dts: add device tree for ARM SMM-A53x2 on LogicTile Express 20MG
    arm: dts: vexpress: add missing CCI PMU device node to TC2
    arm: dts: vexpress: describe all PMUs in TC2 dts
    GICv3: Add ITS entry to THUNDER dts
    arm64: dts: Add poweroff button device node for APM X-Gene platform
    ARM: dts: am4372.dtsi: disable rfbi
    ARM: dts: am57xx-beagle-x15: Provide supply for usb2_phy2
    ARM: dts: am4372: Add emif node
    Revert "ARM: dts: am335x-boneblack: disable RTC-only sleep"
    ARM: sunxi: Enable simplefb in the defconfig
    ARM: Remove deprecated symbol from defconfig files
    ARM: sunxi: Add Machine support for A33
    ARM: sunxi: Introduce Allwinner H3 support
    Documentation: sunxi: Update Allwinner SoC documentation
    ARM: prima2: move to use REGMAP APIs for rtciobrg
    ARM: dts: atlas7: add pinctrl and gpio descriptions
    ARM: OMAP2+: Remove unnessary return statement from the void function, omap2_show_dma_caps
    memory: omap-gpmc: Fix parsing of devices

    Linus Torvalds
     

11 Jul, 2015

4 commits

  • Pull parisc fixes from Helge Deller:
    "We have one important patch from Dave Anglin and myself which fixes
    PTE/TLB race conditions which caused random segmentation faults on our
    debian buildd servers, and one patch from Alex Ivanov which speeds up
    the graphical text console on the STI framebuffer driver"

    * 'parisc-4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Fix some PTE/TLB race conditions and optimize __flush_tlb_range based on timing results
    stifb: Implement hardware accelerated copyarea

    Linus Torvalds
     
  • Pull arm64 fixes and clean-up from Catalin Marinas:
    - ACPI fix when checking the validity of the GICC MADT subtable
    - handle debug exceptions in the el*_inv exception entries
    - remove pointless register assignment in two compat syscall wrappers
    - unnecessary include path
    - defconfig update

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: entry32: remove pointless register assignment
    arm64: entry: handle debug exceptions in el*_inv
    arm64: Keep the ARM64 Kconfig selects sorted
    ACPI / ARM64 : use the new BAD_MADT_GICC_ENTRY macro
    ACPI / ARM64: add BAD_MADT_GICC_ENTRY() macro
    arm64: defconfig: Add Ceva ahci to the defconfig
    arm64: remove another unnecessary libfdt include path

    Linus Torvalds
     
  • The increased use of pdtlb/pitlb instructions seemed to increase the
    frequency of random segmentation faults building packages. Further, we
    had a number of cases where TLB inserts would repeatedly fail and all
    forward progress would stop. The Haskell ghc package caused a lot of
    trouble in this area. The final indication of a race in pte handling was
    this syslog entry on sibaris (C8000):

    swap_free: Unused swap offset entry 00000004
    BUG: Bad page map in process mysqld pte:00000100 pmd:019bbec5
    addr:00000000ec464000 vm_flags:00100073 anon_vma:0000000221023828 mapping: (null) index:ec464
    CPU: 1 PID: 9176 Comm: mysqld Not tainted 4.0.0-2-parisc64-smp #1 Debian 4.0.5-1
    Backtrace:
    [] show_stack+0x20/0x38
    [] dump_stack+0x9c/0x110
    [] print_bad_pte+0x1a8/0x278
    [] unmap_single_vma+0x3d8/0x770
    [] zap_page_range+0xf0/0x198
    [] SyS_madvise+0x404/0x8c0

    Note that the pte value is 0 except for the accessed bit 0x100. This bit
    shouldn't be set without the present bit.

    It should be noted that the madvise system call is probably a trigger for many
    of the random segmentation faults.

    In looking at the kernel code, I found the following problems:

    1) The pte_clear define didn't take TLB lock when clearing a pte.
    2) We didn't test pte present bit inside lock in exception support.
    3) The pte and tlb locks needed to merged in order to ensure consistency
    between page table and TLB. This also has the effect of serializing TLB
    broadcasts on SMP systems.

    The attached change implements the above and a few other tweaks to try
    to improve performance. Based on the timing code, TLB purges are very
    slow (e.g., ~ 209 cycles per page on rp3440). Thus, I think it
    beneficial to test the split_tlb variable to avoid duplicate purges.
    Probably, all PA 2.0 machines have combined TLBs.

    I dropped using __flush_tlb_range in flush_tlb_mm as I realized all
    applications and most threads have a stack size that is too large to
    make this useful. I added some comments to this effect.

    Since implementing 1 through 3, I haven't had any random segmentation
    faults on mx3210 (rp3440) in about one week of building code and running
    as a Debian buildd.

    Signed-off-by: John David Anglin
    Cc: stable@vger.kernel.org # v3.18+
    Signed-off-by: Helge Deller

    John David Anglin
     
  • Pull powerpc fixes from Michael Ellerman:
    - opal-prd mmap fix from Vaidy
    - set kernel taint for MCEs from Daniel
    - alignment exception description from Anton
    - ppc4xx_hsta_msi build fix from Daniel
    - opal-elog interrupt fix from Alistair
    - core_idle_state race fix from Shreyas
    - hv-24x7 lockdep fix from Sukadev
    - multiple cxl fixes from Daniel, Ian, Mikey & Maninder
    - update MAINTAINERS to point at shared tree

    * tag 'powerpc-4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    cxl: Check if afu is not null in cxl_slbia
    powerpc: Update MAINTAINERS to point at shared tree
    powerpc/perf/24x7: Fix lockdep warning
    cxl: Fix off by one error allowing subsequent mmap page to be accessed
    cxl: Fail mmap if requested mapping is larger than assigned problem state area
    cxl: Fix refcounting in kernel API
    powerpc/powernv: Fix race in updating core_idle_state
    powerpc/powernv: Fix opal-elog interrupt handler
    powerpc/ppc4xx_hsta_msi: Include ppc-pci.h to fix reference to hose_list
    powerpc: Add plain English description for alignment exception oopses
    cxl: Test the correct mmio space before unmapping
    powerpc: Set the correct kernel taint on machine check errors
    cxl/vphb.c: Use phb pointer after NULL check
    powerpc/powernv: Fix vma page prot flags in opal-prd driver

    Linus Torvalds
     

10 Jul, 2015

8 commits

  • We currently set x27 in compat_sys_sigreturn_wrapper and
    compat_sys_rt_sigreturn_wrapper, similarly to what we do with r8/why on
    32-bit ARM, in an attempt to prevent sigreturns from being restarted.

    However, on arm64 we have always used pt_regs::syscallno for syscall
    restarting (for both native and compat tasks), and x27 is never
    inspected again before being overwritten in kernel_exit.

    This patch removes the pointless register assignments.

    Signed-off-by: Mark Rutland
    Cc: Will Deacon
    Signed-off-by: Catalin Marinas

    Mark Rutland
     
  • We were using the native syscall and that results in subtle breakage.

    This is the same issue as fixed in 077d0e65618f27b2199d622e12ada6d8f3dbd862
    (MIPS: N32: Use compat getsockopt syscall) but that commit did fix it only
    for N32.

    Signed-off-by: Ralf Baechle
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=100291

    Ralf Baechle
     
  • The L2 cache in the I6400 core has 16 ways, so extend the way_string
    array to take such caches into account.

    [ralf@linux-mips.org: Other already supported CPUs are free to support
    more than 8 ways of cache as well.]

    Signed-off-by: Paul Burton
    Signed-off-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/10640/
    Signed-off-by: Ralf Baechle

    Paul Burton
     
  • Implement the mips_cdmm_phys_base() platform callback to provide a
    default Common Device Memory Map (CDMM) physical base address for the
    Pistachio SoC. This allows the CDMM in each VPE to be configured and
    probed for devices, such as the Fast Debug Channel (FDC).

    The physical address chosen is just below the default CPC address, which
    appears to also be unallocated.

    The FDC IRQ is also usable on Pistachio, and is routed through the GIC,
    so implement the get_c0_fdc_int() platform callback using
    gic_get_c0_fdc_int(), so the FDC driver doesn't have to fall back to
    polling.

    Signed-off-by: James Hogan
    Cc: Ralf Baechle
    Cc: Andrew Bresticker
    Cc: James Hartley
    Cc: linux-mips@linux-mips.org
    Reviewed-by: Andrew Bresticker
    Patchwork: http://patchwork.linux-mips.org/patch/9749/
    Signed-off-by: Ralf Baechle

    James Hogan
     
  • Wider testing reveals that the Fast Debug Channel (FDC) interrupt is
    routed through the GIC just fine on Pistachio SoC, even though it
    contains interAptiv cores. Clearly the FDC interrupt routing problems
    previously observed on interAptiv and proAptiv cores are specific to the
    Malta FPGA bitstreams.

    Move the workaround for interAptiv and proAptiv out of
    gic_get_c0_fdc_int() in the GIC irqchip driver into Malta's
    get_c0_fdc_int() platform callback, to allow the Pistachio SoC to use
    the FDC interrupt.

    Signed-off-by: James Hogan
    Cc: Ralf Baechle
    Cc: Andrew Bresticker
    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Cc: linux-mips@linux-mips.org
    Reviewed-by: Andrew Bresticker
    Cc: James Hartley
    Patchwork: http://patchwork.linux-mips.org/patch/9748/
    Signed-off-by: Ralf Baechle

    James Hogan
     
  • MT_SMP is not the only SMP option for MT cores. The MT_SMP option
    allows more than one VPE per core to appear as a secondary CPU in the
    system. Because of how CM works, it propagates the address-based
    cache ops to the secondary cores but not the index-based ones.
    Because of that, the code does not use IPIs to flush the L1 caches on
    secondary cores because the CM would have done that already. However,
    the CM functionality is independent of the type of SMP kernel so even in
    non-MT kernels, IPIs are not necessary. As a result of which, we change
    the conditional to depend on the CM presence. Moreover, since VPEs on
    the same core share the same L1 caches, there is no need to send an
    IPI on all of them so we calculate a suitable cpumask with only one
    VPE per core.

    Signed-off-by: Markos Chandras
    Cc: # 3.15+
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/10654/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • …/git/tmlind/linux-omap into fixes

    Merge "omap fixes against v4.2-rc1" from Tony Lindgren:

    Minor fixes for omaps against v4.2-rc1. Mostly just minor dts changes
    except for a GPMC fix to not use names for probing devices. Also a
    one liner clean-up to remove unecessary return from a void function.

    The summary for the changes being:

    - Fix probe for GPMC devices by reoving limitations based on device
    name

    - Remove unnecessary return from a void function

    - Revert beaglebone RTC sleep fix, we now have a better fix merged

    - Add am4372 EMIF node to fix a warning

    - Add am57xx-beagle-x15 power supply to fix USB2 if USB1 is disabled

    - Disable rfbi for am4372 as it does not have a driver

    * tag 'omap-for-v4.2/fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
    ARM: dts: am4372.dtsi: disable rfbi
    ARM: dts: am57xx-beagle-x15: Provide supply for usb2_phy2
    ARM: dts: am4372: Add emif node
    Revert "ARM: dts: am335x-boneblack: disable RTC-only sleep"
    ARM: OMAP2+: Remove unnessary return statement from the void function, omap2_show_dma_caps
    memory: omap-gpmc: Fix parsing of devices

    Kevin Hilman
     
  • …t/mripard/linux into fixes

    Merge "Allwinner late changes for 4.2" from Maxime Ripard:

    Allwinner late changes for 4.2

    A bunch of defconfig changes, and some patches to make the Allwinner H3 and
    A33 boot properly.

    * tag 'sunxi-late-for-4.2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
    ARM: sunxi: Enable simplefb in the defconfig
    ARM: Remove deprecated symbol from defconfig files
    ARM: sunxi: Add Machine support for A33
    ARM: sunxi: Introduce Allwinner H3 support
    Documentation: sunxi: Update Allwinner SoC documentation

    Kevin Hilman
     

09 Jul, 2015

22 commits

  • This reverts commit 6ca716f2e5571d25a3899c6c5c91ff72ea6d6f5e.

    SMP/CPS is now supported on 64bit cores.

    Cc: # 4.1
    Reviewed-by: Paul Burton
    Signed-off-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Cc: stable@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/10592/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • Replace lw/sw and various arithmetic instructions with macros so the
    code can work on 64-bit kernels as well.

    Cc: # 3.16+
    Reviewed-by: Paul Burton
    Signed-off-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Cc: stable@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/10591/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • In preparation for 64-bit CPS support, we replace KSEG0 with CKSEG0
    so 64-bit kernels can be supported.

    Cc: # 3.16+
    Reviewed-by: Paul Burton
    Signed-off-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Cc: stable@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/10590/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • The cps-vec code assumes O32 ABI and uses t4-t7 in quite a few places. This
    breaks the build on 64-bit. As a result of which, use the pseudo-registers
    ta0-ta3 to make the code compatible with 64-bit.

    Cc: # 3.16+
    Reviewed-by: Paul Burton
    Signed-off-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Cc: stable@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/10589/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • mips32r2 is a subset of mips64r2, so we replace mips32r2 with mips64r2
    in preparation for 64-bit CPS support.

    Cc: # 3.16+
    Reviewed-by: Paul Burton
    Signed-off-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Cc: stable@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/10588/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • The PTR_LA macro will pick the correct "la" or "dla" macro to
    load an address to a register. This gets rids of the following
    warnings (and others) when building a 64-bit CPS kernel:

    arch/mips/kernel/cps-vec.S:63: Warning: la used to load 64-bit address
    arch/mips/kernel/cps-vec.S:159: Warning: la used to load 64-bit address
    arch/mips/kernel/cps-vec.S:220: Warning: la used to load 64-bit address
    arch/mips/kernel/cps-vec.S:240: Warning: la used to load 64-bit address
    [...]

    Cc: # 3.16+
    Reviewed-by: Paul Burton
    Signed-off-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Cc: stable@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/10587/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • Commit 1d8f1f5a780a ("MIPS: smp-cps: hotplug support") added hotplug
    support in the SMP/CPS implementation but it introduced a few build problems
    on 64-bit kernels due to pointer being casted to and from 'int' C types. We
    fix this problem by using 'unsigned long' instead which should match the size
    of the pointers in 32/64-bit kernels. Finally, we fix the comment since the
    CM base address is loaded to v1($3) instead of v0.

    Fixes the following build problems:

    arch/mips/kernel/smp-cps.c: In function 'wait_for_sibling_halt':
    arch/mips/kernel/smp-cps.c:366:17: error: cast from pointer to integer of
    different size [-Werror=pointer-to-int-cast]
    [...]
    arch/mips/kernel/smp-cps.c: In function 'cps_cpu_die':
    arch/mips/kernel/smp-cps.c:427:13: error: cast to pointer
    from integer of different size [-Werror=int-to-pointer-cast]

    cc1: all warnings being treated as errors

    Fixes: 1d8f1f5a780a ("MIPS: smp-cps: hotplug support")
    Cc: # 3.16+
    Reviewed-by: Paul Burton
    Signed-off-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Cc: stable@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/10586/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • Commit 5f9f41c474befb4ebbc40b27f65bb7d649241581 ("MIPS: kernel: Prepare
    the JR instruction for emulation on MIPS R6") added support for
    emulating the JR instruction on MIPS R6 cores but that introduced a bug
    which could be triggered when hitting a JALR opcode because the code used
    the wrong field in the 'r_format' struct to determine the instruction
    opcode. This lead to crashes because an emulated JALR instruction was
    treated as a JR one when the R6 emulator was turned off.

    Fixes: 5f9f41c474be ("MIPS: kernel: Prepare the JR instruction for emulation on MIPS R6")
    Cc: # 4.0+
    Signed-off-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Cc: stable@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/10583/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • Commits f1b44067c19258b7614e3cd09dfe8d8e12ff5895 ("MIPS: Emulate the
    new MIPS R6 B{L,G}T{Z,}{AL,}C instructions") and commit
    a8ff66f52d3f17b5ae793955270675c197f73d6c ("MIPS: Emulate the new MIPS
    R6 B{L,G}E{Z,}{AL,}C instructions") added support for emulating various
    branch compact instructions. However, it missed the case for those which
    use the old BLEZL and BGTZL opcodes leading to random crashes when the R6
    emulator is disabled. We fix this by ensuring that the 'rt' field is not
    zero which is always true for these branch compact instructions.

    Fixes: f1b44067c192 ("MIPS: Emulate the new MIPS R6 B{L,G}T{Z,}{AL,}C instructions")
    Fixes: a8ff66f52d3f ("MIPS: Emulate the new MIPS R6 B{L,G}E{Z,}{AL,}C instructions")
    Cc: # 4.0+
    Signed-off-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Cc: Markos Chandras
    Patchwork: https://patchwork.linux-mips.org/patch/10582/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • Fix broken indentation caused by the SMTC removal
    commit b633648c5ad3cfbda0b3daea50d2135d44899259
    ("MIPS: MT: Remove SMTC support")

    Signed-off-by: Markos Chandras
    Fixes: b633648c5ad3c ("MIPS: MT: Remove SMTC support")
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/10581/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • Commit f9a7febd leads to a fact that mapstart and therefore a page bitmap for
    bootmem allocator immediately follows initrd_end. This doesn't always work
    well on Octeon, where there are holes in PFN ranges (refer to 5b3b1688 and
    4MB-aligned PFN allocation). Depending on the inird location it could happen,
    that mapstart would be in an area not allocated by plat_mem_setup() in
    arch/mips/cavium-octeon/setup.c, but in the alignment hole between initrd and
    the next PFN area. Later on this memory will be unconditionally made available
    to buddy allocator at the end of free_all_bootmem_core() (mm/bootmem.c).
    All of this results in Linux using the memory not designated for Linux in
    Octeon's plat_mem_setup(), which in turn means corruption of the memory used
    by another OS/baremetal code on the same SoC.

    It doesn't look to me as a problem of Octeon platform code, but rather as an
    inability of f9a7febd to deal correctly with the fragmented memory-mappings.
    Proposed fix moves the check for initrd address to the same calculation-loop
    in bootmem_init() (arch/mips/kernel/setup.c), which also accounts for kernel
    code location. This should result in mapstart located starting from the first
    PFN area after kernel code AND initrd.

    Signed-off-by: Alexander Sverdlin
    Cc: linux-mips@linux-mips.org
    Cc: David Daney
    Cc: Zubair Lutfullah Kakakhel
    Cc: Huacai Chen
    Cc: Andreas Herrmann
    Cc: Joe Perches
    Cc: Steven J. Hill
    Cc: Yusuf Khan
    Cc: Michael Kreuzer
    Cc: Aaro Koskinen
    Patchwork: https://patchwork.linux-mips.org/patch/10594/
    Signed-off-by: Ralf Baechle

    Alexander Sverdlin
     
  • ktime_get_ts() is the proper interface today.

    Signed-off-by: Thomas Gleixner
    Cc: Jesper Nilsson

    Thomas Gleixner
     
  • Pull arch/tile fix from Chris Metcalf:
    "This fix eliminates a "section mismatch" warning caused by the new
    __ex_table checking code in modpost"

    * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    modpost: work correctly with tile coldtext sections

    Linus Torvalds
     
  • The tilegx and tilepro compilers use .coldtext for their unlikely
    executed text section name, so an __attribute__((cold)) function
    will (when compiled with higher optimization levels) land in
    the .coldtext section.

    Modify modpost to add .coldtext to the set of OTHER_TEXT_SECTIONS
    so we don't get warnings about referencing such a section in an
    __ex_table block, and then also modify arch/tile/lib/memcpy_user_64.c
    so that it uses plain ".coldtext" instead of ".coldtext.memcpy".
    The latter naming is a relic of an earlier use of -ffunction-sections,
    which we no longer use by default.

    Signed-off-by: Chris Metcalf
    Acked-by: Rusty Russell

    Chris Metcalf
     
  • Add a DTS file for the MP2 Cortex-A53 Soft Macrocell Model implemented
    on a LogicTile Express 20MG (V2F-1XV7) daughterboard. This is based on
    the version that's currently available from the ARM DTS repository [1].

    [1] git://linux-arm.org/arm-dts.git

    Signed-off-by: Kristina Martsenko
    Acked-by: Sudeep Holla
    Signed-off-by: Kevin Hilman

    Kristina Martsenko
     
  • The CCI device node was added to vexpress CA15_A7(i.e. TC2) much before
    the CCI PMU support and binding was added. This patch adds the missing
    PMU node so that CCI PMUs can be used on TC2.

    Cc: Liviu Dudau
    Cc: Lorenzo Pieralisi
    Acked-by: Punit Agrawal
    Signed-off-by: Sudeep Holla
    Signed-off-by: Kevin Hilman

    Sudeep Holla
     
  • The dts for the CoreTile Express A15x2 A7x3 (TC2) only describes the
    PMUs of the Cortex-A15 CPUs, and not the Cortex-A7 CPUs.

    Now that we have a mechanism for describing disparate PMUs and their
    interrupts in device tree, this patch makes use of these to describe the
    PMUs for all CPUs in the system. For consistency, the existing A15 PMU
    interrupt-affinity property is reflowed across two lines.

    Signed-off-by: Mark Rutland
    Acked-by: Will Deacon
    Acked-by: Sudeep Holla
    Cc: Liviu Dudau
    Cc: Lorenzo Pieralisi
    Signed-off-by: Kevin Hilman

    Mark Rutland
     
  • The PCIe host controller uses MSIs provided by GICv3 ITS. Enable it on
    Thunder SoCs by adding an entry to DT.

    Signed-off-by: Tirumalesh Chalamarla
    Acked-by: Marc Zyngier
    Signed-off-by: Kevin Hilman

    Tirumalesh Chalamarla
     
  • …el/git/baohua/linux into fixes

    Merge "CSR SiRFSoC rtc iobrg move to regmap for 4.2" from Barry Song:

    move CSR rtc iobrg read/write API to be regmap

    this moves to general APIs, and all drivers will be changed based
    on it.

    * tag 'sirf-iobrg2regmap-for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/baohua/linux:
    ARM: prima2: move to use REGMAP APIs for rtciobrg

    Kevin Hilman
     
  • …nel/git/baohua/linux into fixes

    Merge "CSR atlas7 pinctrl descriptions for 4.2" from Barry Song:

    add atlas7 pinctrl dts stuff

    add atlas7 pin groups and gpio/pin mapping descriptions

    * tag 'atlas7-pinctrl-dts-for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/baohua/linux:
    ARM: dts: atlas7: add pinctrl and gpio descriptions

    Kevin Hilman
     
  • This patch adds poweroff button device node to support poweroff feature
    on APM X-Gene Mustang platform.

    Signed-off-by: Y Vo
    Signed-off-by: Kevin Hilman

    Y Vo
     
  • Currently we enable debug exceptions before reading ESR_EL1 in both
    el0_inv and el1_inv. If a debug exception is taken before we read
    ESR_EL1, the value will have been corrupted.

    As el*_inv is typically fatal, an intervening debug exception results in
    misleading debug information being logged to the console, but is not
    otherwise harmful.

    As with the other entry paths, we can use the ESR_EL1 value stashed
    earlier in the exception entry (in x25 for el0_sync{,_compat}, and x1
    for el1_sync), giving us better error reporting in this case.

    Signed-off-by: Mark Rutland
    Acked-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Mark Rutland
     

08 Jul, 2015

2 commits

  • Signed-off-by: Sébastien Hinderer
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Samuel Thibault
    Cc: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Sébastien Hinderer
     
  • The sysfs attributes for the 24x7 counters are dynamically allocated.
    Initialize the attributes using sysfs_attr_init() to fix following
    warning which occurs when CONFIG_DEBUG_LOCK_VMALLOC=y.

    [ 0.346249] audit: initializing netlink subsys (disabled)
    [ 0.346284] audit: type=2000 audit(1436295254.340:1): initialized
    [ 0.346489] BUG: key c0000000efe90198 not in .data!
    [ 0.346491] DEBUG_LOCKS_WARN_ON(1)
    [ 0.346502] ------------[ cut here ]------------
    [ 0.346504] WARNING: at ../kernel/locking/lockdep.c:3002
    [ 0.346506] Modules linked in:

    Reported-by: Gustavo Luiz Duarte
    Signed-off-by: Sukadev Bhattiprolu
    Tested-by: Gustavo Luiz Duarte
    Signed-off-by: Michael Ellerman

    Sukadev Bhattiprolu