1. 11 Jun, 2014 12 commits
    • Guo Chao's avatar
      powerpc/powernv: Fix endianness problems in EEH · ddf0322a
      Guo Chao authored
      EEH information fetched from OPAL need fix before using in LE environment.
      To be included in sparse's endian check, declare them as __beXX and
      access them by accessors.
      Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarGuo Chao <yan@linux.vnet.ibm.com>
      Acked-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Anton Blanchard's avatar
      crypto/nx: disable NX on little endian builds · 8b9f9269
      Anton Blanchard authored
      The NX driver has endian issues so disable it for now.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Anton Blanchard's avatar
      powernv: Fix permissions on sysparam sysfs entries · 1bd09890
      Anton Blanchard authored
      Everyone can write to these files, which is not what we want.
      Cc: stable@vger.kernel.org # 3.15
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Shreyas B. Prabhu's avatar
      powerpc/powernv : Disable subcore for UP configs · ad417330
      Shreyas B. Prabhu authored
      Build throws following errors when CONFIG_SMP=n
      arch/powerpc/platforms/powernv/subcore.c: In function ‘cpu_update_split_mode’:
      arch/powerpc/platforms/powernv/subcore.c:274:15: error: ‘setup_max_cpus’ undeclared (first use in this function)
      arch/powerpc/platforms/powernv/subcore.c:285:5: error: lvalue required as left operand of assignment
      'setup_max_cpus' variable is relevant only on SMP, so there is no point
      working around it for UP. Furthermore, subcore itself is relevant only
      on SMP and hence the better solution is to exclude subcore.o and
      subcore-asm.o for UP builds.
      Signed-off-by: default avatarShreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
      Reviewed-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Shreyas B. Prabhu's avatar
      powerpc/powernv: Include asm/smp.h to fix UP build failure · b2a80878
      Shreyas B. Prabhu authored
      Build throws following errors when CONFIG_SMP=n
      arch/powerpc/platforms/powernv/setup.c: In function ‘pnv_kexec_wait_secondaries_down’:
      arch/powerpc/platforms/powernv/setup.c:179:4: error: implicit declaration of function ‘get_hard_smp_processor_id’
          rc = opal_query_cpu_status(get_hard_smp_processor_id(i),
      The usage of get_hard_smp_processor_id() needs the declaration from
      <asm/smp.h>. The file setup.c includes <linux/sched.h>, which in-turn
      includes <linux/smp.h>. However, <linux/smp.h> includes <asm/smp.h>
      only on SMP configs and hence UP builds fail.
      Fix this by directly including <asm/smp.h> in setup.c unconditionally.
      Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Reviewed-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarShreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Michael Neuling's avatar
      powerpc: Don't setup CPUs with bad status · 59a53afe
      Michael Neuling authored
      OPAL will mark a CPU that is guarded as "bad" in the status property of the CPU
      Unfortunatley Linux doesn't check this property and will put the bad CPU in the
      present map.  This has caused hangs on booting when we try to unsplit the core.
      This patch checks the CPU is avaliable via this status property before putting
      it in the present map.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Tested-by: default avatarAnton Blanchard <anton@samba.org>
      cc: stable@vger.kernel.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Sam bobroff's avatar
      powerpc: Correct DSCR during TM context switch · 96d01610
      Sam bobroff authored
      Correct the DSCR SPR becoming temporarily corrupted if a task is
      context switched during a transaction.
      The problem occurs while suspending the task and is caused by saving
      the DSCR to thread.dscr after it has already been set to the CPU's
      default value:
      __switch_to() calls __switch_to_tm()
      	which calls tm_reclaim_task()
      	which calls tm_reclaim_thread()
      	which calls tm_reclaim()
      		where the DSCR is set to the CPU's default
      __switch_to() calls _switch()
      		where thread.dscr is set to the DSCR
      When the task is resumed, it's transaction will be doomed (as usual)
      and the DSCR SPR will be corrupted, although the checkpointed value
      will be correct. Therefore the DSCR will be immediately corrected by
      the transaction aborting, unless it has been suspended. In that case
      the incorrect value can be seen by the task until it resumes the
      The fix is to treat the DSCR similarly to the TAR and save it early
      in __switch_to().
      A program exposing the problem is added to the kernel self tests as:
      Signed-off-by: default avatarSam Bobroff <sam.bobroff@au1.ibm.com>
      CC: <stable@vger.kernel.org> [v3.10+]
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Michael Ellerman's avatar
      powerpc: Remove platforms/wsp and associated pieces · fb5a5157
      Michael Ellerman authored
      __attribute__ ((unused))
      WSP is the last user of CONFIG_PPC_A2, so we remove that as well.
      Although CONFIG_PPC_ICSWX still exists, it's no longer selectable for
      any Book3E platform, so we can remove the code in mmu-book3e.h that
      depended on it.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Paul Bolle's avatar
      powerpc: Remove check for CONFIG_SERIAL_TEXT_DEBUG · 94314290
      Paul Bolle authored
      The Kconfig symbol SERIAL_TEXT_DEBUG was removed from
      arch/powerpc/Kconfig.debug in v2.6.22. (In v2.6.27 it was also removed
      from arch/ppc/Kconfig.debug.) So the check for its macro has evaluated
      to false for over five years now. Remove that check and the few lines
      of code hidden behind it.
      Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Benjamin Herrenschmidt's avatar
      powerpc: Add AT_HWCAP2 to indicate V.CRYPTO category support · dd58a092
      Benjamin Herrenschmidt authored
      The Vector Crypto category instructions are supported by current POWER8
      chips, advertise them to userspace using a specific bit to properly
      differentiate with chips of the same architecture level that might not
      have them.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@vger.kernel.org> [v3.10+]
    • Linus Torvalds's avatar
      Merge git://www.linux-watchdog.org/linux-watchdog · dfb94547
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
       "This contains:
         - addition of the Intel MID watchdog
         - removal of W83697HF and W83697UG drivers (code was merged into
           w83627hf_wdt driver)
         - addition of Armada 375/380 SoC support
         - conversion of imx2_wdt to regmap API and to watchdog core API
         - lots of other small improvements and fixes"
      [ Wim was also tagged by gmail as a spammer, but not delayed by days
        unlike Ben ]
      * git://www.linux-watchdog.org/linux-watchdog: (25 commits)
        x86: intel-mid: add watchdog platform code for Merrifield
        watchdog: add Intel MID watchdog driver support
        watchdog: sp805: Set watchdog_device->timeout from ->set_timeout()
        booke/watchdog: refine and clean up the codes
        watchdog: iop_wdt only builds for mach-iop13xx
        watchdog: Remove drivers for W83697HF and W83697UG
        watchdog: w83627hf_wdt: Add early_disable module parameter
        ARM: mvebu: Add A375/A380 watchdog binding documentation
        watchdog: orion: Add Armada 375/380 SoC support
        watchdog: orion: Introduce per-SoC enabled() function
        watchdog: orion: Introduce per-SoC stop() function
        watchdog: orion: Remove unneeded atomic access
        watchdog: orion: Introduce a SoC-specific RSTOUT mapping
        watchdog: orion: Move the register ioremap'ing to its own function
        watchdog: xilinx: Make of_device_id array const
        watchdog: imx2_wdt: convert to watchdog core api
        watchdog: imx2_wdt: convert to use regmap API.
        watchdog: imx2_wdt: Sort the header files alphabetically
        watchdog: ath79_wdt: switch to clk_prepare/clk_disable
        watchdog: ath79_wdt: avoid spurious restarts on AR934x
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · c5aec4c7
      Linus Torvalds authored
      Pull powerpc updates from Ben Herrenschmidt:
       "Here is the bulk of the powerpc changes for this merge window.  It got
        a bit delayed in part because I wasn't paying attention, and in part
        because I discovered I had a core PCI change without a PCI maintainer
        ack in it.  Bjorn eventually agreed it was ok to merge it though we'll
        probably improve it later and I didn't want to rebase to add his ack.
        There is going to be a bit more next week, essentially fixes that I
        still want to sort through and test.
        The biggest item this time is the support to build the ppc64 LE kernel
        with our new v2 ABI.  We previously supported v2 userspace but the
        kernel itself was a tougher nut to crack.  This is now sorted mostly
        thanks to Anton and Rusty.
        We also have a fairly big series from Cedric that add support for
        64-bit LE zImage boot wrapper.  This was made harder by the fact that
        traditionally our zImage wrapper was always 32-bit, but our new LE
        toolchains don't really support 32-bit anymore (it's somewhat there
        but not really "supported") so we didn't want to rely on it.  This
        meant more churn that just endian fixes.
        This brings some more LE bits as well, such as the ability to run in
        LE mode without a hypervisor (ie. under OPAL firmware) by doing the
        right OPAL call to reinitialize the CPU to take HV interrupts in the
        right mode and the usual pile of endian fixes.
        There's another series from Gavin adding EEH improvements (one day we
        *will* have a release with less than 20 EEH patches, I promise!).
        Another highlight is the support for the "Split core" functionality on
        P8 by Michael.  This allows a P8 core to be split into "sub cores" of
        4 threads which allows the subcores to run different guests under KVM
        (the HW still doesn't support a partition per thread).
        And then the usual misc bits and fixes ..."
      [ Further delayed by gmail deciding that BenH is a dirty spammer.
        Google knows.  ]
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (155 commits)
        powerpc/powernv: Add missing include to LPC code
        selftests/powerpc: Test the THP bug we fixed in the previous commit
        powerpc/mm: Check paca psize is up to date for huge mappings
        powerpc/powernv: Pass buffer size to OPAL validate flash call
        powerpc/pseries: hcall functions are exported to modules, need _GLOBAL_TOC()
        powerpc: Exported functions __clear_user and copy_page use r2 so need _GLOBAL_TOC()
        powerpc/powernv: Set memory_block_size_bytes to 256MB
        powerpc: Allow ppc_md platform hook to override memory_block_size_bytes
        powerpc/powernv: Fix endian issues in memory error handling code
        powerpc/eeh: Skip eeh sysfs when eeh is disabled
        powerpc: 64bit sendfile is capped at 2GB
        powerpc/powernv: Provide debugfs access to the LPC bus via OPAL
        powerpc/serial: Use saner flags when creating legacy ports
        powerpc: Add cpu family documentation
        powerpc/xmon: Fix up xmon format strings
        powerpc/powernv: Add calls to support little endian host
        powerpc: Document sysfs DSCR interface
        powerpc: Fix regression of per-CPU DSCR setting
        powerpc: Split __SYSFS_SPRSETUP macro
        arch: powerpc/fadump: Cleaning up inconsistent NULL checks
  2. 10 Jun, 2014 28 commits