1. 05 May, 2014 6 commits
  2. 30 Apr, 2014 8 commits
    • Dave Airlie's avatar
      Merge branch 'drm-init-cleanup' of git://people.freedesktop.org/~danvet/drm into drm-next · 444c9a08
      Dave Airlie authored
      Next pull request, this time more of the drm de-midlayering work. The big
      thing is that his patch series here removes everything from drm_bus except
      the set_busid callback. Thierry has a few more patches on top of this to
      make that one optional to.
      
      With that we can ditch all the non-pci drm_bus implementations, which
      Thierry has already done for the fake tegra host1x drm_bus.
      
      Reviewed by Thierry, Laurent and David and now also survived some testing
      on my intel boxes to make sure the irq fumble is fixed correctly ;-) The
      last minute rebase was just to add the r-b tags from Thierry for the 2
      patches I've redone.
      
      * 'drm-init-cleanup' of git://people.freedesktop.org/~danvet/drm:
        drm/<drivers>: don't set driver->dev_priv_size to 0
        drm: Remove dev->kdriver
        drm: remove drm_bus->get_name
        drm: rip out dev->devname
        drm: inline drm_pci_set_unique
        drm: remove bus->get_irq implementations
        drm: pass the irq explicitly to drm_irq_install
        drm/irq: Look up the pci irq directly in the drm_control ioctl
        drm/irq: track the irq installed in drm_irq_install in dev->irq
        drm: rename dev->count_lock to dev->buf_lock
        drm: Rip out totally bogus vga_switcheroo->can_switch locking
        drm: kill drm_bus->bus_type
        drm: remove drm_dev_to_irq from drivers
        drm/irq: remove cargo-culted locking from irq_install/uninstall
        drm/irq: drm_control is a legacy ioctl, so pci devices only
        drm/pci: fold in irq_by_busid support
        drm/irq: simplify irq checks in drm_wait_vblank
      444c9a08
    • Dave Airlie's avatar
      Merge branch 'drm-coverity-fixes' of git://people.freedesktop.org/~danvet/drm into drm-next · 7e9ab408
      Dave Airlie authored
      bunch of coverity fixes all minor.
      
      * 'drm-coverity-fixes' of git://people.freedesktop.org/~danvet/drm:
        drm: Fix error handling in drm_master_create
        drm/i2c/tda998x: Fix signed overflow issue
        drm/bochs: Remove unecessary NULL check in gem_free
        drm/bochs: Remove unnecessary NULL check in bo_unref
        drm/udl: Initialize ret in udl_driver_load
        drm/via: Remove unecessary NULL check
        drm/ast: Remove unecessary NULL check in gem_free
        drm/ast: Remove unnecessary NULL check in bo_unref
        drm/cirrus: Remove unecessary NULL check in gem_free
        drm/cirrus: Remove unnecessary NULL check in bo_unref
        drm/mgag200: Remove unecessary NULL check in gem_free
        drm/mgag200: Remove unecessary NULL check in bo_unref
      7e9ab408
    • Christian Engelmayer's avatar
      drm: qxl: Remove unused device pointer · 2c9b25c5
      Christian Engelmayer authored
      Remove occurrences of unused struct qxl_device pointer in functions
      qxl_ttm_fault() and qxl_init_mem_type().
      
      Detected by Coverity: CID 1019128, CID 1019129.
      Signed-off-by: default avatarChristian Engelmayer <cengelma@gmx.at>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      2c9b25c5
    • Dave Airlie's avatar
      drm: try harder to avoid regression when merging mode bits · b87577b7
      Dave Airlie authored
      For QXL hw we really want the bits to be replaced as we change
      the preferred mode on the fly, and the same goes for virgl when
      I get to it, however the original fix for this seems to have caused
      a wierd regression on Intel G33 that in a stunning display of failure
      at opposition to his normal self, Daniel failed to diagnose.
      
      So we are left doing this, ugly ugly ugly ugly, Daniel you fixed
      that G33 yet?, ugly, ugly.
      Tested-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      b87577b7
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-2014-04-16' of git://anongit.freedesktop.org/drm-intel into drm-next · 885ac04a
      Dave Airlie authored
      drm-intel-next-2014-04-16:
      - vlv infoframe fixes from Jesse
      - dsi/mipi fixes from Shobhit
      - gen8 pageflip fixes for LRI/SRM from Damien
      - cmd parser fixes from Brad Volkin
      - some prep patches for CHV, DRRS, ...
      - and tons of little things all over
      drm-intel-next-2014-04-04:
      - cmd parser for gen7 but only in enforcing and not yet granting mode - the
        batch copying stuff is still missing. Also performance is a bit ... rough
        (Brad Volkin + OACONTROL fix from Ken).
      - deprecate UMS harder (i.e. CONFIG_BROKEN)
      - interrupt rework from Paulo Zanoni
      - runtime PM support for bdw and snb, again from Paulo
      - a pile of refactorings from various people all over the place to prep for new
        stuff (irq reworks, power domain polish, ...)
      
      drm-intel-next-2014-04-04:
      - cmd parser for gen7 but only in enforcing and not yet granting mode - the
        batch copying stuff is still missing. Also performance is a bit ... rough
        (Brad Volkin + OACONTROL fix from Ken).
      - deprecate UMS harder (i.e. CONFIG_BROKEN)
      - interrupt rework from Paulo Zanoni
      - runtime PM support for bdw and snb, again from Paulo
      - a pile of refactorings from various people all over the place to prep for new
        stuff (irq reworks, power domain polish, ...)
      
      Conflicts:
      	drivers/gpu/drm/i915/i915_gem_context.c
      885ac04a
    • Vineet Gupta's avatar
      ARC: !PREEMPT: Ensure Return to kernel mode is IRQ safe · 8aa9e85a
      Vineet Gupta authored
      There was a very small race window where resume to kernel mode from a
      Exception Path (or pure kernel mode which is true for most of ARC
      exceptions anyways), was not disabling interrupts in restore_regs,
      clobbering the exception regs
      
      Anton found the culprit call flow (after many sleepless nights)
      
      | 1. we got a Trap from user land
      | 2. started to service it.
      | 3. While doing some stuff on user-land memory (I think it is padzero()),
      |     we got a DataTlbMiss
      | 4. On return from it we are taking "resume_kernel_mode" path
      | 5. NEED_RESHED is not set, so we go to "return from exception" path in
      |     restore regs.
      | 6. there seems to be IRQ happening
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Cc: <stable@vger.kernel.org>   #3.10, 3.12, 3.13, 3.14
      Cc: Anton Kolesov <Anton.Kolesov@synopsys.com>
      Cc: Francois Bedard <Francois.Bedard@synopsys.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8aa9e85a
    • Linus Torvalds's avatar
      Merge tag 'sound-3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 71dc96e3
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A few collections of small eggs that have been gathered during the
        Easter holidays.  Mostly small ASoC fixes, with a HD-audio quirk and a
        workaround for Nvidia controller"
      
      * tag 'sound-3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Suppress CORBRP clear on Nvidia controller chips
        ALSA: hda - add headset mic detect quirk for a Dell laptop
        ASoC: jz4740: Remove Makefile entry for removed file
        ASoC: Intel: Fix audio crash due to negative address offset
        ASoC: dapm: Fix widget double free with auto-disable DAPM kcontrol
        ASoC: Intel: Fix incorrect sizeof() in sst_hsw_stream_get_volume()
        ASoC: Intel: some incorrect sizeof() usages
        ASoC: cs42l73: Convert to use devm_gpio_request_one
        ASoC: cs42l52: Convert to use devm_gpio_request_one
        ASoC: tlv320aic31xx: document that the regulators are mandatory
        ASoC: fsl_spdif: Fix wrong OFFSET of STC_SYSCLK_DIV
        ASoC: alc5623: Fix regmap endianness
        ASoC: tlv320aic3x: fix shared reset pin for DT
        ASoC: rsnd: fix clock prepare/unprepare
      71dc96e3
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · ed8c37e1
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Smattering of fixes, i915, exynos, tegra, msm, vmwgfx.
      
        A bit of framebuffer reference counting fallout fixes, i915 GM45
        regression fix, DVI regression fix, vmware info leak between processes
        fix"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/exynos: use %pad for dma_addr_t
        drm/exynos: dsi: use IS_ERR() to check devm_ioremap_resource() results
        MAINTAINERS: update maintainer entry for Exynos DP driver
        drm/exynos: balance framebuffer refcount
        drm/i915: Move all ring resets before setting the HWS page
        drm/i915: Don't WARN nor handle unexpected hpd interrupts on gmch platforms
        drm/msm/mdp4: cure for the cursor blues (v2)
        drm/msm: default to XR24 rather than AR24
        drm/msm: fix memory leak
        drm/tegra: restrict plane loops to legacy planes
        drm/i915: Allow full PPGTT with param override
        drm/i915: Discard BIOS framebuffers too small to accommodate chosen mode
        drm/vmwgfx: Make sure user-space can't DMA across buffer object boundaries v2
        drm/i915: get power domain in case the BIOS enabled eDP VDD
        drm/i915: Don't check gmch state on inherited configs
        drm/i915: Allow user modes to exceed DVI 165MHz limit
      ed8c37e1
  3. 29 Apr, 2014 6 commits
  4. 28 Apr, 2014 20 commits
    • Linus Torvalds's avatar
      Merge tag 'trace-fixes-v3.15-rc2' of... · 2aafe1a4
      Linus Torvalds authored
      Merge tag 'trace-fixes-v3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull ftrace bugfix from Steven Rostedt:
       "Takao Indoh reported that he was able to cause a ftrace bug while
        loading a module and enabling function tracing at the same time.
      
        He uncovered a race where the module when loaded will convert the
        calls to mcount into nops, and expects the module's text to be RW.
        But when function tracing is enabled, it will convert all kernel text
        (core and module) from RO to RW to convert the nops to calls to ftrace
        to record the function.  After the convertion, it will convert all the
        text back from RW to RO.
      
        The issue is, it will also convert the module's text that is loading.
        If it converts it to RO before ftrace does its conversion, it will
        cause ftrace to fail and require a reboot to fix it again.
      
        This patch moves the ftrace module update that converts calls to
        mcount into nops to be done when the module state is still
        MODULE_STATE_UNFORMED.  This will ignore the module when the text is
        being converted from RW back to RO"
      
      * tag 'trace-fixes-v3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace/module: Hardcode ftrace_module_init() call into load_module()
      2aafe1a4
    • Linus Torvalds's avatar
      Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux · 87c7662b
      Linus Torvalds authored
      Pull devicetree bug fixes from Grant Likely:
       "These are some important bug fixes that need to get into v3.15.
      
        This branch contains a pair of important bug fixes for the DT code:
      
         - Fix some incorrect binding property names before they enter common
           usage
      
         - Fix bug where some platform devices will be unable to get their
           interrupt number when they depend on an interrupt controller that
           is not available at device creation time.  This is a problem
           causing mainline to fail on a number of ARM platforms"
      
      * tag 'dt-for-linus' of git://git.secretlab.ca/git/linux:
        of/irq: do irq resolution in platform_get_irq
        of: selftest: add deferred probe interrupt test
        dt: Fix binding typos in clock-names and interrupt-names
      87c7662b
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 838b4c02
      Linus Torvalds authored
      Pull powerpc fixes from Ben Herrenschmidt:
       "Here is a bunch of post-merge window fixes that have been accumulating
        in patchwork while I was on vacation or buried under other stuff last
        week.
      
        We have the now usual batch of LE fixes from Anton (sadly some new
        stuff that went into this merge window had endian issues, we'll try to
        make sure we do better next time)
      
        Some fixes and cleanups to the new 24x7 performance monitoring stuff
        (mostly typos and cleaning up printk's)
      
        A series of fixes for an issue with our runlatch bit, which wasn't set
        properly for offlined threads/cores and under KVM, causing potentially
        some counters to misbehave along with possible power management
        issues.
      
        A fix for kexec nasty race where the new kernel wouldn't "see" the
        secondary processors having reached back into firmware in time.
      
        And finally a few other misc (and pretty simple) bug fixes"
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (33 commits)
        powerpc/4xx: Fix section mismatch in ppc4xx_pci.c
        ppc/kvm: Clear the runlatch bit of a vcpu before napping
        ppc/kvm: Set the runlatch bit of a CPU just before starting guest
        ppc/powernv: Set the runlatch bits correctly for offline cpus
        powerpc/pseries: Protect remove_memory() with device hotplug lock
        powerpc: Fix error return in rtas_flash module init
        powerpc: Bump BOOT_COMMAND_LINE_SIZE to 2048
        powerpc: Bump COMMAND_LINE_SIZE to 2048
        powerpc: Rename duplicate COMMAND_LINE_SIZE define
        powerpc/perf/hv-24x7: Catalog version number is be64, not be32
        powerpc/perf/hv-24x7: Remove [static 4096], sparse chokes on it
        powerpc/perf/hv-24x7: Use (unsigned long) not (u32) values when calling plpar_hcall_norets()
        powerpc/perf/hv-gpci: Make device attr static
        powerpc/perf/hv_gpci: Probe failures use pr_debug(), and padding reduced
        powerpc/perf/hv_24x7: Probe errors changed to pr_debug(), padding fixed
        powerpc/mm: Fix tlbie to add AVAL fields for 64K pages
        powerpc/powernv: Fix little endian issues in OPAL dump code
        powerpc/powernv: Create OPAL sglist helper functions and fix endian issues
        powerpc/powernv: Fix little endian issues in OPAL error log code
        powerpc/powernv: Fix little endian issues with opal_do_notifier calls
        ...
      838b4c02
    • Linus Torvalds's avatar
      mm: don't pointlessly use BUG_ON() for sanity check · 50f5aa8a
      Linus Torvalds authored
      BUG_ON() is a big hammer, and should be used _only_ if there is some
      major corruption that you cannot possibly recover from, making it
      imperative that the current process (and possibly the whole machine) be
      terminated with extreme prejudice.
      
      The trivial sanity check in the vmacache code is *not* such a fatal
      error.  Recovering from it is absolutely trivial, and using BUG_ON()
      just makes it harder to debug for no actual advantage.
      
      To make matters worse, the placement of the BUG_ON() (only if the range
      check matched) actually makes it harder to hit the sanity check to begin
      with, so _if_ there is a bug (and we just got a report from Srivatsa
      Bhat that this can indeed trigger), it is harder to debug not just
      because the machine is possibly dead, but because we don't have better
      coverage.
      
      BUG_ON() must *die*.  Maybe we should add a checkpatch warning for it,
      because it is simply just about the worst thing you can ever do if you
      hit some "this cannot happen" situation.
      Reported-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Cc: Davidlohr Bueso <davidlohr@hp.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      50f5aa8a
    • Steven Rostedt (Red Hat)'s avatar
      ftrace/module: Hardcode ftrace_module_init() call into load_module() · a949ae56
      Steven Rostedt (Red Hat) authored
      A race exists between module loading and enabling of function tracer.
      
      	CPU 1				CPU 2
      	-----				-----
        load_module()
         module->state = MODULE_STATE_COMING
      
      				register_ftrace_function()
      				 mutex_lock(&ftrace_lock);
      				 ftrace_startup()
      				  update_ftrace_function();
      				   ftrace_arch_code_modify_prepare()
      				    set_all_module_text_rw();
      				   <enables-ftrace>
      				    ftrace_arch_code_modify_post_process()
      				     set_all_module_text_ro();
      
      				[ here all module text is set to RO,
      				  including the module that is
      				  loading!! ]
      
         blocking_notifier_call_chain(MODULE_STATE_COMING);
          ftrace_init_module()
      
           [ tries to modify code, but it's RO, and fails!
             ftrace_bug() is called]
      
      When this race happens, ftrace_bug() will produces a nasty warning and
      all of the function tracing features will be disabled until reboot.
      
      The simple solution is to treate module load the same way the core
      kernel is treated at boot. To hardcode the ftrace function modification
      of converting calls to mcount into nops. This is done in init/main.c
      there's no reason it could not be done in load_module(). This gives
      a better control of the changes and doesn't tie the state of the
      module to its notifiers as much. Ftrace is special, it needs to be
      treated as such.
      
      The reason this would work, is that the ftrace_module_init() would be
      called while the module is in MODULE_STATE_UNFORMED, which is ignored
      by the set_all_module_text_ro() call.
      
      Link: http://lkml.kernel.org/r/1395637826-3312-1-git-send-email-indou.takao@jp.fujitsu.comReported-by: default avatarTakao Indoh <indou.takao@jp.fujitsu.com>
      Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: stable@vger.kernel.org # 2.6.38+
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      a949ae56
    • Hui Wang's avatar
      ALSA: hda - add headset mic detect quirk for a Dell laptop · e32dfbed
      Hui Wang authored
      When we plug a 3-ring headset on the Dell machine (VID: 0x10ec0255,
      SID: 0x10280674), the headset mic can't be detected, after apply this
      patch, the headset mic can work well.
      
      BugLink: https://bugs.launchpad.net/bugs/1297581
      Cc: David Henningsson <david.henningsson@canonical.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarHui Wang <hui.wang@canonical.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e32dfbed
    • Takashi Iwai's avatar
      Merge tag 'asoc-v3.15-rc2' of... · 474a5961
      Takashi Iwai authored
      Merge tag 'asoc-v3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Fixes for v3.15
      
      A smattering of driver-specific fixes here, nothing generic.  The Cirrus
      CODEC conversions to devm_ are leak fixes - the conversion adds missing
      error handling code.
      474a5961
    • Alistair Popple's avatar
      powerpc/4xx: Fix section mismatch in ppc4xx_pci.c · e4565362
      Alistair Popple authored
      This patch fixes this section mismatch:
      
      WARNING: vmlinux.o(.text+0x1efc4): Section mismatch in reference from
      the function apm821xx_pciex_init_port_hw() to the function
      .init.text:ppc4xx_pciex_wait_on_sdr.isra.9()
      
      The function apm821xx_pciex_init_port_hw() references the function
      __init ppc4xx_pciex_wait_on_sdr.isra.9().  This is often because
      apm821xx_pciex_init_port_hw lacks a __init annotation or the
      annotation of ppc4xx_pciex_wait_on_sdr.isra.9 is wrong.
      
      apm821xx_pciex_init_port_hw is only referenced by a struct in
      __initdata, so it should be safe to add __init to
      apm821xx_pciex_init_port_hw.
      Signed-off-by: default avatarAlistair Popple <alistair@popple.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e4565362
    • Preeti U Murthy's avatar
      ppc/kvm: Clear the runlatch bit of a vcpu before napping · 582b910e
      Preeti U Murthy authored
      When the guest cedes the vcpu or the vcpu has no guest to
      run it naps. Clear the runlatch bit of the vcpu before
      napping to indicate an idle cpu.
      Signed-off-by: default avatarPreeti U Murthy <preeti@linux.vnet.ibm.com>
      Acked-by: default avatarPaul Mackerras <paulus@samba.org>
      Reviewed-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      582b910e
    • Preeti U Murthy's avatar
      ppc/kvm: Set the runlatch bit of a CPU just before starting guest · fd17dc7b
      Preeti U Murthy authored
      The secondary threads in the core are kept offline before launching guests
      in kvm on powerpc: "371fefd6:KVM: PPC: Allow book3s_hv guests to use
      SMT processor modes."
      
      Hence their runlatch bits are cleared. When the secondary threads are called
      in to start a guest, their runlatch bits need to be set to indicate that they
      are busy. The primary thread has its runlatch bit set though, but there is no
      harm in setting this bit once again. Hence set the runlatch bit for all
      threads before they start guest.
      Signed-off-by: default avatarPreeti U Murthy <preeti@linux.vnet.ibm.com>
      Acked-by: default avatarPaul Mackerras <paulus@samba.org>
      Reviewed-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      fd17dc7b
    • Preeti U Murthy's avatar
      ppc/powernv: Set the runlatch bits correctly for offline cpus · f2038911
      Preeti U Murthy authored
      Up until now we have been setting the runlatch bits for a busy CPU and
      clearing it when a CPU enters idle state. The runlatch bit has thus
      been consistent with the utilization of a CPU as long as the CPU is online.
      
      However when a CPU is hotplugged out the runlatch bit is not cleared. It
      needs to be cleared to indicate an unused CPU. Hence this patch has the
      runlatch bit cleared for an offline CPU just before entering an idle state
      and sets it immediately after it exits the idle state.
      Signed-off-by: default avatarPreeti U Murthy <preeti@linux.vnet.ibm.com>
      Acked-by: default avatarPaul Mackerras <paulus@samba.org>
      Reviewed-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f2038911
    • Li Zhong's avatar
      powerpc/pseries: Protect remove_memory() with device hotplug lock · 42dbfc86
      Li Zhong authored
      While testing memory hot-remove, I found following dead lock:
      
      Process #1141 is drmgr, trying to remove some memory, i.e. memory499.
      It holds the memory_hotplug_mutex, and blocks when trying to remove file
      "online" under dir memory499, in kernfs_drain(), at
              wait_event(root->deactivate_waitq,
                         atomic_read(&kn->active) == KN_DEACTIVATED_BIAS);
      
      Process #1120 is trying to online memory499 by
         echo 1 > memory499/online
      
      In .kernfs_fop_write, it uses kernfs_get_active() to increase
      &kn->active, thus blocking process #1141. While itself is blocked later
      when trying to acquire memory_hotplug_mutex, which is held by process
      
      The backtrace of both processes are shown below:
      
      [<c000000001b18600>] 0xc000000001b18600
      [<c000000000015044>] .__switch_to+0x144/0x200
      [<c000000000263ca4>] .online_pages+0x74/0x7b0
      [<c00000000055b40c>] .memory_subsys_online+0x9c/0x150
      [<c00000000053cbe8>] .device_online+0xb8/0x120
      [<c00000000053cd04>] .online_store+0xb4/0xc0
      [<c000000000538ce4>] .dev_attr_store+0x64/0xa0
      [<c00000000030f4ec>] .sysfs_kf_write+0x7c/0xb0
      [<c00000000030e574>] .kernfs_fop_write+0x154/0x1e0
      [<c000000000268450>] .vfs_write+0xe0/0x260
      [<c000000000269144>] .SyS_write+0x64/0x110
      [<c000000000009ffc>] syscall_exit+0x0/0x7c
      
      [<c000000001b18600>] 0xc000000001b18600
      [<c000000000015044>] .__switch_to+0x144/0x200
      [<c00000000030be14>] .__kernfs_remove+0x204/0x300
      [<c00000000030d428>] .kernfs_remove_by_name_ns+0x68/0xf0
      [<c00000000030fb38>] .sysfs_remove_file_ns+0x38/0x60
      [<c000000000539354>] .device_remove_attrs+0x54/0xc0
      [<c000000000539fd8>] .device_del+0x158/0x250
      [<c00000000053a104>] .device_unregister+0x34/0xa0
      [<c00000000055bc14>] .unregister_memory_section+0x164/0x170
      [<c00000000024ee18>] .__remove_pages+0x108/0x4c0
      [<c00000000004b590>] .arch_remove_memory+0x60/0xc0
      [<c00000000026446c>] .remove_memory+0x8c/0xe0
      [<c00000000007f9f4>] .pseries_remove_memblock+0xd4/0x160
      [<c00000000007fcfc>] .pseries_memory_notifier+0x27c/0x290
      [<c0000000008ae6cc>] .notifier_call_chain+0x8c/0x100
      [<c0000000000d858c>] .__blocking_notifier_call_chain+0x6c/0xe0
      [<c00000000071ddec>] .of_property_notify+0x7c/0xc0
      [<c00000000071ed3c>] .of_update_property+0x3c/0x1b0
      [<c0000000000756cc>] .ofdt_write+0x3dc/0x740
      [<c0000000002f60fc>] .proc_reg_write+0xac/0x110
      [<c000000000268450>] .vfs_write+0xe0/0x260
      [<c000000000269144>] .SyS_write+0x64/0x110
      [<c000000000009ffc>] syscall_exit+0x0/0x7c
      
      This patch uses lock_device_hotplug() to protect remove_memory() called
      in pseries_remove_memblock(), which is also stated before function
      remove_memory():
      
       * NOTE: The caller must call lock_device_hotplug() to serialize hotplug
       * and online/offline operations before this call, as required by
       * try_offline_node().
       */
      void __ref remove_memory(int nid, u64 start, u64 size)
      
      With this lock held, the other process(#1120 above) trying to online the
      memory block will retry the system call when calling
      lock_device_hotplug_sysfs(), and finally find No such device error.
      Signed-off-by: default avatarLi Zhong <zhong@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      42dbfc86
    • Anton Blanchard's avatar
      powerpc: Fix error return in rtas_flash module init · 0c930692
      Anton Blanchard authored
      module_init should return 0 or a negative errno.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      0c930692
    • Anton Blanchard's avatar
      powerpc: Bump BOOT_COMMAND_LINE_SIZE to 2048 · 579a53ca
      Anton Blanchard authored
      Bump the boot wrapper BOOT_COMMAND_LINE_SIZE to match the
      kernel.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      579a53ca
    • Anton Blanchard's avatar
      powerpc: Bump COMMAND_LINE_SIZE to 2048 · a5980d06
      Anton Blanchard authored
      I've had a report that the current limit is too small for
      an automated network based installer. Bump it.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a5980d06
    • Anton Blanchard's avatar
      powerpc: Rename duplicate COMMAND_LINE_SIZE define · a2dd5da7
      Anton Blanchard authored
      We have two definitions of COMMAND_LINE_SIZE, one for the kernel
      and one for the boot wrapper. I assume this is so the boot
      wrapper can be self sufficient and not rely on kernel headers.
      
      Having two defines with the same name is confusing, I just
      updated the wrong one when trying to bump it.
      
      Make the boot wrapper define unique by calling it
      BOOT_COMMAND_LINE_SIZE.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a2dd5da7
    • Cody P Schafer's avatar
      powerpc/perf/hv-24x7: Catalog version number is be64, not be32 · bbad3e50
      Cody P Schafer authored
      The catalog version number was changed from a be32 (with proceeding
      32bits of padding) to a be64, update the code to treat it as a be64
      Signed-off-by: default avatarCody P Schafer <cody@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      bbad3e50
    • Cody P Schafer's avatar
    • Cody P Schafer's avatar
    • Cody P Schafer's avatar