1. 30 Dec, 2013 1 commit
    • Michael Neuling's avatar
      powerpc: Fix bad stack check in exception entry · 90ff5d68
      Michael Neuling authored
      In EXCEPTION_PROLOG_COMMON() we check to see if the stack pointer (r1)
      is valid when coming from the kernel.  If it's not valid, we die but
      with a nice oops message.
      
      Currently we allocate a stack frame (subtract INT_FRAME_SIZE) before we
      check to see if the stack pointer is negative.  Unfortunately, this
      won't detect a bad stack where r1 is less than INT_FRAME_SIZE.
      
      This patch fixes the check to compare the modified r1 with
      -INT_FRAME_SIZE.  With this, bad kernel stack pointers (including NULL
      pointers) are correctly detected again.
      
      Kudos to Paulus for finding this.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      cc: stable@vger.kernel.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      90ff5d68
  2. 13 Dec, 2013 10 commits
  3. 10 Dec, 2013 10 commits
  4. 07 Dec, 2013 1 commit
    • Gerhard Sittig's avatar
      powerpc/512x: dts: remove misplaced IRQ spec from 'soc' node · c65ec135
      Gerhard Sittig authored
      the 'soc' node in the common .dtsi for MPC5121 has an '#interrupt-cells'
      property although this node is not an interrupt controller
      
      remove this erroneously placed property because starting with v3.13-rc1
      lookup and resolution of 'interrupts' specs for peripherals gets misled,
      emits 'no irq domain found' WARN() messages and breaks the boot process
      
        irq: no irq domain found for /soc@80000000 !
        ------------[ cut here ]------------
        WARNING: at drivers/of/platform.c:171
        Modules linked in:
        CPU: 0 PID: 1 Comm: swapper Tainted: G        W    3.13.0-rc1-00001-g8a66234 #8
        task: df823bb0 ti: df834000 task.ti: df834000
        NIP: c02b5190 LR: c02b5180 CTR: c01cf4e0
        REGS: df835c50 TRAP: 0700   Tainted: G        W     (3.13.0-rc1-00001-g8a66234)
        MSR: 00029032 <EE,ME,IR,DR,RI>  CR: 229a9d42  XER: 20000000
      
        GPR00: c02b5180 df835d00 df823bb0 00000000 00000000 df835b18 ffffffff 00000308
        GPR08: c0479cc0 c0480000 c0479cc0 00000308 00000308 00000000 c00040fc 00000000
        GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 df850880
        GPR24: df84d670 00000000 00000001 df8561a0 dffffccc df85089c 00000020 00000001
        NIP [c02b5190] of_device_alloc+0xf4/0x1a0
        LR [c02b5180] of_device_alloc+0xe4/0x1a0
        Call Trace:
        [df835d00] [c02b5180] of_device_alloc+0xe4/0x1a0 (unreliable)
        [df835d50] [c02b5278] of_platform_device_create_pdata+0x3c/0xc8
        [df835d70] [c02b53fc] of_platform_bus_create+0xf8/0x170
        [df835dc0] [c02b5448] of_platform_bus_create+0x144/0x170
        [df835e10] [c02b55a8] of_platform_bus_probe+0x98/0xe8
        [df835e30] [c0437508] mpc512x_init+0x28/0x1c4
        [df835e70] [c0435de8] ppc_init+0x4c/0x60
        [df835e80] [c0003b28] do_one_initcall+0x150/0x1a4
        [df835ef0] [c0432048] kernel_init_freeable+0x114/0x1c0
        [df835f30] [c0004114] kernel_init+0x18/0x124
        [df835f40] [c000e910] ret_from_kernel_thread+0x5c/0x64
        Instruction dump:
        409effd4 57c9103a 57de2834 7c89f050 7f83e378 7c972214 7f45d378 48001f55
        7c63d278 7c630034 5463d97e 687a0001 <0f1a0000> 2f990000 387b0010 939b0098
        ---[ end trace 2257f10e5a20cbdd ]---
      
        ...
        irq: no irq domain found for /soc@80000000 !
        fsl-diu-fb 80002100.display: could not get DIU IRQ
        fsl-diu-fb: probe of 80002100.display failed with error -22
        irq: no irq domain found for /soc@80000000 !
        mpc512x_dma 80014000.dma: Error mapping IRQ!
        mpc512x_dma: probe of 80014000.dma failed with error -22
        ...
        irq: no irq domain found for /soc@80000000 !
        fs_enet: probe of 80002800.ethernet failed with error -22
        ...
        irq: no irq domain found for /soc@80000000 !
        mpc5121-rtc 80000a00.rtc: mpc5121_rtc_probe: could not request irq: 0
        mpc5121-rtc: probe of 80000a00.rtc failed with error -22
        ...
      
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: devicetree@vger.kernel.org
      Signed-off-by: default avatarGerhard Sittig <gsi@denx.de>
      Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
      c65ec135
  5. 27 Nov, 2013 1 commit
  6. 25 Nov, 2013 5 commits
    • Chen Gang's avatar
      arch/powerpc/kernel: Use %12.12s instead of %12s to avoid memory overflow · e0513d9e
      Chen Gang authored
      for tmp_part->header.name:
          it is "Terminating null required only for names < 12 chars".
          so need to limit the %.12s for it in printk
      
        additional info:
      
          %12s  limit the width, not for the original string output length
                if name length is more than 12, it still can be fully displayed.
                if name length is less than 12, the ' ' will be filled before name.
      
          %.12s truly limit the original string output length (precision)
      Signed-off-by: default avatarChen Gang <gang.chen@asianux.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e0513d9e
    • Michael Neuling's avatar
      powerpc/signals: Improved mark VSX not saved with small contexts fix · ec67ad82
      Michael Neuling authored
      In a recent patch:
        commit c13f20ac
        Author: Michael Neuling <mikey@neuling.org>
        powerpc/signals: Mark VSX not saved with small contexts
      
      We fixed an issue but an improved solution was later discussed after the patch
      was merged.
      
      Firstly, this patch doesn't handle the 64bit signals case, which could also hit
      this issue (but has never been reported).
      
      Secondly, the original patch isn't clear what MSR VSX should be set to.  The
      new approach below always clears the MSR VSX bit (to indicate no VSX is in the
      context) and sets it only in the specific case where VSX is available (ie. when
      VSX has been used and the signal context passed has space to provide the
      state).
      
      This reverts the original patch and replaces it with the improved solution.  It
      also adds a 64 bit version.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ec67ad82
    • Hari Bathini's avatar
      powerpc/kdump: Adding symbols in vmcoreinfo to facilitate dump filtering · 8ff81271
      Hari Bathini authored
      When CONFIG_SPARSEMEM_VMEMMAP option is used in kernel, makedumpfile fails
      to filter vmcore dump as it fails to do vmemmap translations. So far
      dump filtering on ppc64 never had to deal with vmemmap addresses seperately
      as vmemmap regions where mapped in zone normal. But with the inclusion of
      CONFIG_SPARSEMEM_VMEMMAP config option in kernel, this vmemmap address
      translation support becomes necessary for dump filtering. For vmemmap adress
      translation, few kernel symbols are needed by dump filtering tool. This patch
      adds those symbols to vmcoreinfo, which a dump filtering tool can use for
      filtering the kernel dump. Tested this changes successfully with makedumpfile
      tool that supports vmemmap to physical address translation outside zone normal.
      
      [ Removed unneeded #ifdef as suggested by Michael Ellerman --BenH ]
      Signed-off-by: default avatarHari Bathini <hbathini@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8ff81271
    • Anton Blanchard's avatar
      powerpc: allyesconfig should not select CONFIG_CPU_LITTLE_ENDIAN · 962bc221
      Anton Blanchard authored
      Stephen reported a failure in an allyesconfig build.
      CONFIG_CPU_LITTLE_ENDIAN=y gets set but his toolchain is not
      new enough to support little endian. We really want to
      default to a big endian build; Ben suggested using a choice
      which defaults to CPU_BIG_ENDIAN.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      962bc221
    • Michael Neuling's avatar
      powerpc: Fix error when cross building TAGS & cscope · 924dd50b
      Michael Neuling authored
      Currently if I cross build TAGS or cscope from x86 I get this:
        % make ARCH=powerpc TAGS
        gcc-4.8.real: error: unrecognized command line option ‘-mbig-endian’
        GEN     TAGS
        %
      
      I'm not setting CROSS_COMPILE= as logically I shouldn't need to and I
      haven't needed to in the past when building TAGS or cscope.  Also, the
      above completess correct as the error is not fatal to the build.
      
      This was caused by:
          commit d72b0801
          Author: Ian Munsie <imunsie@au1.ibm.com>
          powerpc: Add ability to build little endian kernels
      
      The below fixes this by testing for the -mbig-endian option before
      adding it.
      
      I've not done the same thing in the little endian case as if
      -mlittle-endian doesn't exist, we probably want to fail quickly as you
      probably have an old big endian compiler.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      924dd50b
  7. 24 Nov, 2013 1 commit
  8. 22 Nov, 2013 11 commits
    • Scott Wood's avatar
      powerpc/booke: Only check for hugetlb in flush if vma != NULL · d742aa15
      Scott Wood authored
      And in flush_hugetlb_page(), don't check whether vma is NULL after
      we've already dereferenced it.
      
      This was found by Dan using static analysis as described here:
      https://lists.ozlabs.org/pipermail/linuxppc-dev/2013-November/113161.html
      
      We currently get away with this because the callers that currently pass
      NULL for vma seem to be 32-bit-only (e.g. highmem, and
      CONFIG_DEBUG_PGALLOC in pgtable_32.c)  Hugetlb is currently 64-bit only,
      so we never saw a NULL vma here.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      d742aa15
    • Adam Borowski's avatar
      powerpc/85xx: typo in dts: "interupt" (four devices) · 53567cf3
      Adam Borowski authored
      These lines were inoperative for four years, which puts some doubt into
      their importance, and it's possible the fixed version will regress, but
      at the very least they should be removed instead.
      Signed-off-by: default avatarAdam Borowski <kilobyte@angband.pl>
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      53567cf3
    • LEROY Christophe's avatar
      powerpc/8xx: mfspr SPRN_TBRx in lieu of mftb/mftbu is not supported · ae2163be
      LEROY Christophe authored
      Commit beb2dc0a breaks the MPC8xx which
      seems to not support using mfspr SPRN_TBRx instead of mftb/mftbu
      despite what is written in the reference manual.
      
      This patch reverts to the use of mftb/mftbu when CONFIG_8xx is
      selected.
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      ae2163be
    • Tiejun Chen's avatar
      powerpc/corenet64: compile with CONFIG_E{5,6}500_CPU well · cbf8a358
      Tiejun Chen authored
      If CONFIG_ALTIVEC is enabled for CoreNet64, and if we also
      select CONFIG_E{5,6}500_CPU this may introduce -mcpu=e500mc64
      into $CFLAGS. But Altivec option not allowed with e500mc64,
      then some compiling errors occur like this:
      
            CC      arch/powerpc/lib/xor_vmx.o
          arch/powerpc/lib/xor_vmx.c:1:0: error: AltiVec not supported in this target
          make[1]: *** [arch/powerpc/lib/xor_vmx.o] Error 1
          make: *** [arch/powerpc/lib] Error 2
      
      So we should restrict e500mc64 in altivec scenario.
      Signed-off-by: default avatarTiejun Chen <tiejun.chen@windriver.com>
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      cbf8a358
    • Linus Torvalds's avatar
      Linux 3.13-rc1 · 6ce4eac1
      Linus Torvalds authored
      6ce4eac1
    • Linus Torvalds's avatar
      Merge tag 'ecryptfs-3.13-rc1-quiet-checkers' of... · 57498f9c
      Linus Torvalds authored
      Merge tag 'ecryptfs-3.13-rc1-quiet-checkers' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs
      
      Pull minor eCryptfs fix from Tyler Hicks:
       "Quiet static checkers by removing unneeded conditionals"
      
      * tag 'ecryptfs-3.13-rc1-quiet-checkers' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
        eCryptfs: file->private_data is always valid
      57498f9c
    • Linus Torvalds's avatar
      Merge tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · e48f88a3
      Linus Torvalds authored
      Pull second set of sound fixes from Takashi Iwai:
       "A collection of small fixes in HD-audio quirks and runtime PM, ASoC
        rcar, abs8500 and other codecs.  Most of commits are for stable
        kernels, too"
      
      * tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Set current_headset_type to ALC_HEADSET_TYPE_ENUM (janitorial)
        ALSA: hda - Provide missing pin configs for VAIO with ALC260
        ALSA: hda - Add headset quirk for Dell Inspiron 3135
        ALSA: hda - Fix the headphone jack detection on Sony VAIO TX
        ALSA: hda - Fix missing bass speaker on ASUS N550
        ALSA: hda - Fix unbalanced runtime PM notification at resume
        ASoC: arizona: Set FLL to free-run before disabling
        ALSA: hda - A casual Dell Headset quirk
        ASoC: rcar: fixup dma_async_issue_pending() timing
        ASoC: rcar: off by one in rsnd_scu_set_route()
        ASoC: wm5110: Add post SYSCLK register patch for rev D chip
        ASoC: ab8500: Revert to using custom I/O functions
        ALSA: hda - Also enable mute/micmute LED control for "Lenovo dock" fixup
        ALSA: firewire-lib: include sound/asound.h to refer to snd_pcm_format_t
        ALSA: hda - Select FW_LOADER from CONFIG_SND_HDA_CODEC_CA0132_DSP
        ALSA: hda - Enable mute/mic-mute LEDs for more Thinkpads with Realtek codec
        ASoC: rcar: fixup mod access before checking
      e48f88a3
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · aecde27c
      Linus Torvalds authored
      Pull DRM fixes from Dave Airlie:
       "I was going to leave this until post -rc1 but sysfs fixes broke
        hotplug in userspace, so I had to fix it harder, otherwise a set of
        pulls from intel, radeon and vmware,
      
        The vmware/ttm changes are bit larger but since its early and they are
        unlikely to break anything else I put them in, it lets vmware work
        with dri3"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (36 commits)
        drm/sysfs: fix hotplug regression since lifetime changes
        drm/exynos: g2d: fix memory leak to userptr
        drm/i915: Fix gen3 self-refresh watermarks
        drm/ttm: Remove set_need_resched from the ttm fault handler
        drm/ttm: Don't move non-existing data
        drm/radeon: hook up backlight functions for CI and KV family.
        drm/i915: Replicate BIOS eDP bpp clamping hack for hsw
        drm/i915: Do not enable package C8 on unsupported hardware
        drm/i915: Hold pc8 lock around toggling pc8.gpu_idle
        drm/i915: encoder->get_config is no longer optional
        drm/i915/tv: add ->get_config callback
        drm/radeon/cik: Add macrotile mode array query
        drm/radeon/cik: Return backend map information to userspace
        drm/vmwgfx: Make vmwgfx dma buffers prime aware
        drm/vmwgfx: Make surfaces prime-aware
        drm/vmwgfx: Hook up the prime ioctls
        drm/ttm: Add a minimal prime implementation for ttm base objects
        drm/vmwgfx: Fix false lockdep warning
        drm/ttm: Allow execbuf util reserves without ticket
        drm/i915: restore the early forcewake cleanup
        ...
      aecde27c
    • Linus Torvalds's avatar
      Merge tag 'pci-v3.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · e3414786
      Linus Torvalds authored
      Pull PCI updates from Bjorn Helgaas:
       "Miscellaneous
         - Remove duplicate disable from pcie_portdrv_remove() (Yinghai Lu)
         - Fix whitespace, capitalization, and spelling errors (Bjorn Helgaas)"
      
      * tag 'pci-v3.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: Remove duplicate pci_disable_device() from pcie_portdrv_remove()
        PCI: Fix whitespace, capitalization, and spelling errors
      e3414786
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · b0e3636f
      Linus Torvalds authored
      Pull SCSI target updates from Nicholas Bellinger:
       "Things have been quiet this round with mostly bugfixes, percpu
        conversions, and other minor iscsi-target conformance testing changes.
      
        The highlights include:
      
         - Add demo_mode_discovery attribute for iscsi-target (Thomas)
         - Convert tcm_fc(FCoE) to use percpu-ida pre-allocation
         - Add send completion interrupt coalescing for ib_isert
         - Convert target-core to use percpu-refcounting for se_lun
         - Fix mutex_trylock usage bug in iscsit_increment_maxcmdsn
         - tcm_loop updates (Hannes)
         - target-core ALUA cleanups + prep for v3.14 SCSI Referrals support (Hannes)
      
        v3.14 is currently shaping to be a busy development cycle in target
        land, with initial support for T10 Referrals and T10 DIF currently on
        the roadmap"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (40 commits)
        iscsi-target: chap auth shouldn't match username with trailing garbage
        iscsi-target: fix extract_param to handle buffer length corner case
        iscsi-target: Expose default_erl as TPG attribute
        target_core_configfs: split up ALUA supported states
        target_core_alua: Make supported states configurable
        target_core_alua: Store supported ALUA states
        target_core_alua: Rename ALUA_ACCESS_STATE_OPTIMIZED
        target_core_alua: spellcheck
        target core: rename (ex,im)plict -> (ex,im)plicit
        percpu-refcount: Add percpu-refcount.o to obj-y
        iscsi-target: Do not reject non-immediate CmdSNs exceeding MaxCmdSN
        iscsi-target: Convert iscsi_session statistics to atomic_long_t
        target: Convert se_device statistics to atomic_long_t
        target: Fix delayed Task Aborted Status (TAS) handling bug
        iscsi-target: Reject unsupported multi PDU text command sequence
        ib_isert: Avoid duplicate iscsit_increment_maxcmdsn call
        iscsi-target: Fix mutex_trylock usage in iscsit_increment_maxcmdsn
        target: Core does not need blkdev.h
        target: Pass through I/O topology for block backstores
        iser-target: Avoid using FRMR for single dma entry requests
        ...
      b0e3636f
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 0032cdef
      Linus Torvalds authored
      Pull hwmon fixes from Guenter Roeck:
       - acpi_power_meter: Fix return value check from call to
         acpi_bus_get_device
       - nct6775: Fix/improve NCT6791 support
       - lm75: Add support for GMT G751
      
      * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (acpi_power_meter) Fix acpi_bus_get_device() return value check
        hwmon: (nct6775) NCT6791 supports weight control only for CPUFAN
        hwmon: (nct6775) Monitor additional temperature registers
        hwmon: (lm75) Add support for GMT G751 chip
      0032cdef