1. 09 Apr, 2014 29 commits
    • Behan Webster's avatar
      x86: LLVMLinux: Fix "incomplete type const struct x86cpu_device_id" · c4586256
      Behan Webster authored
      Similar to the fix in 40413dcb
      
      MODULE_DEVICE_TABLE(x86cpu, ...) expects the struct to be called struct
      x86cpu_device_id, and not struct x86_cpu_id which is what is used in the rest
      of the kernel code.  Although gcc seems to ignore this error, clang fails
      without this define to fix the name.
      
      Code from drivers/thermal/x86_pkg_temp_thermal.c
      static const struct x86_cpu_id __initconst pkg_temp_thermal_ids[] = { ... };
      MODULE_DEVICE_TABLE(x86cpu, pkg_temp_thermal_ids);
      
      Error from clang:
      drivers/thermal/x86_pkg_temp_thermal.c:577:1: error: variable has
            incomplete type 'const struct x86cpu_device_id'
      MODULE_DEVICE_TABLE(x86cpu, pkg_temp_thermal_ids);
      ^
      include/linux/module.h:145:3: note: expanded from macro
            'MODULE_DEVICE_TABLE'
        MODULE_GENERIC_TABLE(type##_device, name)
        ^
      include/linux/module.h:87:32: note: expanded from macro
            'MODULE_GENERIC_TABLE'
      extern const struct gtype##_id __mod_##gtype##_table            \
                                     ^
      <scratch space>:143:1: note: expanded from here
      __mod_x86cpu_device_table
      ^
      drivers/thermal/x86_pkg_temp_thermal.c:577:1: note: forward declaration of
            'struct x86cpu_device_id'
      include/linux/module.h:145:3: note: expanded from macro
            'MODULE_DEVICE_TABLE'
        MODULE_GENERIC_TABLE(type##_device, name)
        ^
      include/linux/module.h:87:21: note: expanded from macro
            'MODULE_GENERIC_TABLE'
      extern const struct gtype##_id __mod_##gtype##_table            \
                          ^
      <scratch space>:141:1: note: expanded from here
      x86cpu_device_id
      ^
      1 error generated.
      Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
      Signed-off-by: default avatarJan-Simon Möller <dl9pf@gmx.de>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c4586256
    • Jan-Simon Möller's avatar
      x86 kbuild: LLVMLinux: More cc-options added for clang · fd2d0a19
      Jan-Simon Möller authored
      Protect more options for x86 with cc-option so that we don't get errors when
      using clang instead of gcc.  Add more or different options when using clang as
      well. Also need to enforce that SSE is off for clang and the stack is 8-byte
      aligned.
      Signed-off-by: default avatarJan-Simon Möller <dl9pf@gmx.de>
      Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
      Signed-off-by: default avatarMark Charlebois <charlebm@gmail.com>
      fd2d0a19
    • Behan Webster's avatar
      x86, acpi: LLVMLinux: Remove nested functions from Thinkpad ACPI · 3ddf5ce9
      Behan Webster authored
      The only real change is passing in event_mask to the formerly nested functions.
      Otherwise it's just moving around function and macro code.
      
      This is the only place in the Linux kernel where nested functions are still in
      use. Nested functions aren't part of the C standards, and complicate the
      generated code. Although the Linux Kernel has never set out to be entirely C
      standard compliant, it is increasingly compliant to the standard which is
      supported by other compilers such as Clang. The LLVMLinux project is working on
      being able to compile the Linux kernel with Clang. The use of nested functions
      blocks this effort.
      Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
      Signed-off-by: default avatarJan-Simon Möller <dl9pf@gmx.de>
      Acked-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      3ddf5ce9
    • Mark Charlebois's avatar
      LLVMLinux: Add support for clang to compiler.h and new compiler-clang.h · 565cbdc2
      Mark Charlebois authored
      Add a compiler-clang.h file to add specific macros needed for compiling the
      kernel with clang.
      
      Initially the only override required is the macro for silencing the
      compiler for a purposefully uninintialized variable.
      
      Author: Mark Charlebois <charlebm@gmail.com>
      Signed-off-by: default avatarMark Charlebois <charlebm@gmail.com>
      Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
      565cbdc2
    • Behan Webster's avatar
      LLVMLinux: Remove warning about returning an uninitialized variable · aa93685a
      Behan Webster authored
      Fix uninitialized return code in default case in cmpxchg-local.h
      
      This patch fixes the code to prevent an uninitialized return value that is detected
      when compiling with clang. The bug produces numerous warnings when compiling the
      Linux kernel with clang.
      Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
      Signed-off-by: default avatarMark Charlebois <charlebm@gmail.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      aa93685a
    • Jan-Simon Möller's avatar
      kbuild: LLVMLinux: Fix LINUX_COMPILER definition script for compilation with clang · db46293b
      Jan-Simon Möller authored
      When building the LINUX_COMPILER definition, instead of merely taking the last
      line from "$(CC) -v", grep for ' version ' in the output. This supports both
      gcc and clang.
      Signed-off-by: default avatarJan-Simon Möller <dl9pf@gmx.de>
      Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
      Signed-off-by: default avatarMark Charlebois <charlebm@gmail.com>
      Cc: PaX Team <pageexec@freemail.hu>
      db46293b
    • Jan-Simon Möller's avatar
      Documentation: LLVMLinux: Update Documentation/dontdiff · 8a260796
      Jan-Simon Möller authored
      Clang has a few other kinds of derived files which shouldn't be added to a
      patch. Add them to the Documentation/dontdiff file to prevent this.
      Signed-off-by: default avatarJan-Simon Möller <dl9pf@gmx.de>
      Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
      Cc: PaX Team <pageexec@freemail.hu>
      8a260796
    • Jan-Simon Möller's avatar
      kbuild: LLVMLinux: Adapt warnings for compilation with clang · 3d3d6b84
      Jan-Simon Möller authored
      When compiling kernel with clang, disable warnings which are too noisy, and
      add the clang flag catch-undefined-behavior.
      Signed-off-by: default avatarJan-Simon Möller <dl9pf@gmx.de>
      Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
      Signed-off-by: default avatarMark Charlebois <mcharleb@gmail.com>
      Cc: PaX Team <pageexec@freemail.hu>
      3d3d6b84
    • Behan Webster's avatar
      kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang · 61163efa
      Behan Webster authored
      Add support to toplevel Makefile for compiling with clang, both for
      HOSTCC and CC. Use cc-option to prevent gcc option from breaking clang, and
      from clang options from breaking gcc.
      
      Clang 3.4 semantics are the same as gcc semantics for unsupported flags. For
      unsupported warnings clang 3.4 returns true but shows a warning and gcc shows
      a warning and returns false.
      Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
      Signed-off-by: default avatarJan-Simon Möller <dl9pf@gmx.de>
      Signed-off-by: default avatarMark Charlebois <charlebm@gmail.com>
      Cc: PaX Team <pageexec@freemail.hu>
      61163efa
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 39de65aa
      Linus Torvalds authored
      Pull i2c updates from Wolfram Sang:
       "Here is the pull request from the i2c subsystem.  It got a little
        delayed because I needed to wait for a dependency to be included
        (commit b424080a: "reset: Add optional resets and stubs").  Plus,
        I had some email problems.  All done now, the highlights are:
      
         - drivers can now deprecate their use of i2c classes.  That shouldn't
           be used on embedded platforms anyhow and was often blindly
           copy&pasted.  This mechanism gives users time to switch away and
           ultimately boot faster once the use of classes for those drivers is
           gone for good.
      
         - new drivers for QUP, Cadence, efm32
      
         - tracepoint support for I2C and SMBus
      
         - bigger cleanups for the mv64xxx, nomadik, and designware drivers
      
        And the usual bugfixes, cleanups, feature additions.  Most stuff has
        been in linux-next for a while.  Just some hot fixes and new drivers
        were added a bit more recently."
      
      * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (63 commits)
        i2c: cadence: fix Kconfig dependency
        i2c: Add driver for Cadence I2C controller
        i2c: cadence: Document device tree bindings
        Documentation: i2c: improve section about flags mangling the protocol
        i2c: qup: use proper type fro clk_freq
        i2c: qup: off by ones in qup_i2c_probe()
        i2c: efm32: fix binding doc
        MAINTAINERS: update I2C web resources
        i2c: qup: New bus driver for the Qualcomm QUP I2C controller
        i2c: qup: Add device tree bindings information
        i2c: i2c-xiic: deprecate class based instantiation
        i2c: i2c-sirf: deprecate class based instantiation
        i2c: i2c-mv64xxx: deprecate class based instantiation
        i2c: i2c-designware-platdrv: deprecate class based instantiation
        i2c: i2c-davinci: deprecate class based instantiation
        i2c: i2c-bcm2835: deprecate class based instantiation
        i2c: mv64xxx: Fix reset controller handling
        i2c: omap: fix usage of IS_ERR_VALUE with pm_runtime_get_sync
        i2c: efm32: new bus driver
        i2c: exynos5: remove unnecessary cast of void pointer
        ...
      39de65aa
    • Linus Torvalds's avatar
      Merge tag 'mmc-updates-for-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc · 97e18dc0
      Linus Torvalds authored
      Pull MMC updates from Chris Ball:
       "MMC highlights for 3.15:
      
        Core:
         - CONFIG_MMC_UNSAFE_RESUME=y is now default behavior
         - DT bindings for SDHCI UHS, eMMC HS200, high-speed DDR, at 1.8/1.2V
         - Add GPIO descriptor based slot-gpio card detect API
      
        Drivers:
         - dw_mmc: Refactor SOCFPGA support as a variant inside dw_mmc-pltfm.c
         - mmci: Support HW busy detection on ux500
         - omap: Support MMC_ERASE
         - omap_hsmmc: Support MMC_PM_KEEP_POWER, MMC_PM_WAKE_SDIO_IRQ, (a)cmd23
         - rtsx: Support pre-req/post-req async
         - sdhci: Add support for Realtek RTS5250 controllers
         - sdhci-acpi: Add support for 80860F16, fix 80860F14/SDIO card detect
         - sdhci-msm: Add new driver for Qualcomm SDHCI chipset support
         - sdhci-pxav3: Add support for Marvell Armada 380 and 385 SoCs"
      
      * tag 'mmc-updates-for-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (102 commits)
        mmc: sdhci-acpi: Intel SDIO has broken card detect
        mmc: sdhci-pxav3: add support for the Armada 38x SDHCI controller
        mmc: sdhci-msm: Add platform_execute_tuning implementation
        mmc: sdhci-msm: Initial support for Qualcomm chipsets
        mmc: sdhci-msm: Qualcomm SDHCI binding documentation
        sdhci: only reprogram retuning timer when flag is set
        mmc: rename ARCH_BCM to ARCH_BCM_MOBILE
        mmc: sdhci: Allow for irq being shared
        mmc: sdhci-acpi: Add device id 80860F16
        mmc: sdhci-acpi: Fix broken card detect for ACPI HID 80860F14
        mmc: slot-gpio: Add GPIO descriptor based CD GPIO API
        mmc: slot-gpio: Split out CD IRQ request into a separate function
        mmc: slot-gpio: Record GPIO descriptors instead of GPIO numbers
        Revert "dts: socfpga: Add support for SD/MMC on the SOCFPGA platform"
        mmc: sdhci-spear: use generic card detection gpio support
        mmc: sdhci-spear: remove support for power gpio
        mmc: sdhci-spear: simplify resource handling
        mmc: sdhci-spear: fix platform_data usage
        mmc: sdhci-spear: fix error handling paths for DT
        mmc: sdhci-bcm-kona: fix build errors when built-in
        ...
      97e18dc0
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 042f7b7c
      Linus Torvalds authored
      Pull more powerpc updates from Ben Herrenschmidt:
       "Here are a few more powerpc things for you.
      
        So you'll find here the conversion of the two new firmware sysfs
        interfaces to the new API for self-removing files that Greg and Tejun
        introduced, so they can finally remove the old one.
      
        I'm also reverting the hwmon driver for powernv.  I shouldn't have
        merged it, I got a bit carried away here.  I hadn't realized it was
        never CCed to the relevant maintainer(s) and list(s), and happens to
        have some issues so I'm taking it out and it will come back via the
        proper channels.
      
        The rest is a bunch of LE fixes (argh, some of the new stuff was
        broken on LE, I really need to start testing LE myself !) and various
        random fixes here and there.
      
        Finally one bit that's not strictly a fix, which is the HVC OPAL
        change to "kick" the HVC thread when the firmware tells us there is
        new incoming data.  I don't feel like waiting for this one, it's
        simple enough, and it makes a big difference in console responsiveness
        which is good for my nerves"
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (26 commits)
        powerpc/powernv Adapt opal-elog and opal-dump to new sysfs_remove_file_self
        Revert "powerpc/powernv: hwmon driver for power values, fan rpm and temperature"
        power, sched: stop updating inside arch_update_cpu_topology() when nothing to be update
        powerpc/le: Avoid creatng R_PPC64_TOCSAVE relocations for modules.
        arch/powerpc: Use RCU_INIT_POINTER(x, NULL) in platforms/cell/spu_syscalls.c
        powerpc/opal: Add missing include
        powerpc: Convert last uses of __FUNCTION__ to __func__
        powerpc: Add lq/stq emulation
        powerpc/powernv: Add invalid OPAL call
        powerpc/powernv: Add OPAL message log interface
        powerpc/book3s: Fix mc_recoverable_range buffer overrun issue.
        powerpc: Remove dead code in sycall entry
        powerpc: Use of_node_init() for the fakenode in msi_bitmap.c
        powerpc/mm: NUMA pte should be handled via slow path in get_user_pages_fast()
        powerpc/powernv: Fix endian issues with sensor code
        powerpc/powernv: Fix endian issues with OPAL async code
        tty/hvc_opal: Kick the HVC thread on OPAL console events
        powerpc/powernv: Add opal_notifier_unregister() and export to modules
        powerpc/ppc64: Do not turn AIL (reloc-on interrupts) too early
        powerpc/ppc64: Gracefully handle early interrupts
        ...
      042f7b7c
    • Linus Torvalds's avatar
      futex: avoid race between requeue and wake · 69cd9eba
      Linus Torvalds authored
      Jan Stancek reported:
       "pthread_cond_broadcast/4-1.c testcase from openposix testsuite (LTP)
        occasionally fails, because some threads fail to wake up.
      
        Testcase creates 5 threads, which are all waiting on same condition.
        Main thread then calls pthread_cond_broadcast() without holding mutex,
        which calls:
      
            futex(uaddr1, FUTEX_CMP_REQUEUE_PRIVATE, 1, 2147483647, uaddr2, ..)
      
        This immediately wakes up single thread A, which unlocks mutex and
        tries to wake up another thread:
      
            futex(uaddr2, FUTEX_WAKE_PRIVATE, 1)
      
        If thread A manages to call futex_wake() before any waiters are
        requeued for uaddr2, no other thread is woken up"
      
      The ordering constraints for the hash bucket waiter counting are that
      the waiter counts have to be incremented _before_ getting the spinlock
      (because the spinlock acts as part of the memory barrier), but the
      "requeue" operation didn't honor those rules, and nobody had even
      thought about that case.
      
      This fairly simple patch just increments the waiter count for the target
      hash bucket (hb2) when requeing a futex before taking the locks.  It
      then decrements them again after releasing the lock - the code that
      actually moves the futex(es) between hash buckets will do the additional
      required waiter count housekeeping.
      Reported-and-tested-by: default avatarJan Stancek <jstancek@redhat.com>
      Acked-by: default avatarDavidlohr Bueso <davidlohr@hp.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: stable@vger.kernel.org # 3.14
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      69cd9eba
    • Stewart Smith's avatar
      powerpc/powernv Adapt opal-elog and opal-dump to new sysfs_remove_file_self · cc4f265a
      Stewart Smith authored
      We are currently using sysfs_schedule_callback() which is deprecated
      and about to be removed. Switch to the new interface instead.
      Signed-off-by: default avatarStewart Smith <stewart@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      cc4f265a
    • Benjamin Herrenschmidt's avatar
      Revert "powerpc/powernv: hwmon driver for power values, fan rpm and temperature" · 4952ef9a
      Benjamin Herrenschmidt authored
      This reverts commit 0de7f8a9.
      
      This driver wasn't merged via the proper maintainers (my fault ... ooops !)
      and has serious issues so let's take it out for now and have a new better
      one be merged the right way
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ---
      4952ef9a
    • Michael Wang's avatar
      power, sched: stop updating inside arch_update_cpu_topology() when nothing to be update · 9a013361
      Michael Wang authored
      Since v1:
      	Edited the comment according to Srivatsa's suggestion.
      
      During the testing, we encounter below WARN followed by Oops:
      
      	WARNING: at kernel/sched/core.c:6218
      	...
      	NIP [c000000000101660] .build_sched_domains+0x11d0/0x1200
      	LR [c000000000101358] .build_sched_domains+0xec8/0x1200
      	PACATMSCRATCH [800000000000f032]
      	Call Trace:
      	[c00000001b103850] [c000000000101358] .build_sched_domains+0xec8/0x1200
      	[c00000001b1039a0] [c00000000010aad4] .partition_sched_domains+0x484/0x510
      	[c00000001b103aa0] [c00000000016d0a8] .rebuild_sched_domains+0x68/0xa0
      	[c00000001b103b30] [c00000000005cbf0] .topology_work_fn+0x10/0x30
      	...
      	Oops: Kernel access of bad area, sig: 11 [#1]
      	...
      	NIP [c00000000045c000] .__bitmap_weight+0x60/0xf0
      	LR [c00000000010132c] .build_sched_domains+0xe9c/0x1200
      	PACATMSCRATCH [8000000000029032]
      	Call Trace:
      	[c00000001b1037a0] [c000000000288ff4] .kmem_cache_alloc_node_trace+0x184/0x3a0
      	[c00000001b103850] [c00000000010132c] .build_sched_domains+0xe9c/0x1200
      	[c00000001b1039a0] [c00000000010aad4] .partition_sched_domains+0x484/0x510
      	[c00000001b103aa0] [c00000000016d0a8] .rebuild_sched_domains+0x68/0xa0
      	[c00000001b103b30] [c00000000005cbf0] .topology_work_fn+0x10/0x30
      	...
      
      This was caused by that 'sd->groups == NULL' after building groups, which
      was caused by the empty 'sd->span'.
      
      The cpu's domain contained nothing because the cpu was assigned to a wrong
      node, due to the following unfortunate sequence of events:
      
      1. The hypervisor sent a topology update to the guest OS, to notify changes
         to the cpu-node mapping. However, the update was actually redundant - i.e.,
         the "new" mapping was exactly the same as the old one.
      
      2. Due to this, the 'updated_cpus' mask turned out to be empty after exiting
         the 'for-loop' in arch_update_cpu_topology().
      
      3. So we ended up calling stop-machine() with an empty cpumask list, which made
         stop-machine internally elect cpumask_first(cpu_online_mask), i.e., CPU0 as
         the cpu to run the payload (the update_cpu_topology() function).
      
      4. This causes update_cpu_topology() to be run by CPU0. And since 'updates'
         is kzalloc()'ed inside arch_update_cpu_topology(), update_cpu_topology()
         finds update->cpu as well as update->new_nid to be 0. In other words, we
         end up assigning CPU0 (and eventually its siblings) to node 0, incorrectly.
      
      Along with the following wrong updating, it causes the sched-domain rebuild
      code to break and crash the system.
      
      Fix this by skipping the topology update in cases where we find that
      the topology has not actually changed in reality (ie., spurious updates).
      
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Paul Mackerras <paulus@samba.org>
      CC: Nathan Fontenot <nfont@linux.vnet.ibm.com>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Robert Jennings <rcj@linux.vnet.ibm.com>
      CC: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
      CC: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
      CC: Alistair Popple <alistair@popple.id.au>
      Suggested-by: default avatar"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Wang <wangyun@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>
      9a013361
    • Tony Breeds's avatar
      powerpc/le: Avoid creatng R_PPC64_TOCSAVE relocations for modules. · d3d35d95
      Tony Breeds authored
      When building modules with a native le toolchain the linker will
      generate R_PPC64_TOCSAVE relocations when it's safe to omit saving r2 on
      a plt call.  This isn't helpful in the conext of a kernel module and the
      kernel will fail to load those modules with an error like:
      	nf_conntrack: Unknown ADD relocation: 109
      
      This patch tells the linker to avoid createing R_PPC64_TOCSAVE
      relocations allowing modules to load.
      Signed-off-by: default avatarTony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d3d35d95
    • Monam Agarwal's avatar
      arch/powerpc: Use RCU_INIT_POINTER(x, NULL) in platforms/cell/spu_syscalls.c · 282efb70
      Monam Agarwal authored
      Here rcu_assign_pointer() is ensuring that the
      initialization of a structure is carried out before storing a pointer
      to that structure.
      So, rcu_assign_pointer(p, NULL) can always safely be converted to
      RCU_INIT_POINTER(p, NULL).
      Signed-off-by: default avatarMonam Agarwal <monamagarwal123@gmail.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      282efb70
    • Michael Neuling's avatar
      powerpc/opal: Add missing include · bfd25d72
      Michael Neuling authored
      next-20140324 currently fails compiling celleb_defconfig with:
      
      arch/powerpc/include/asm/opal.h:894:42: error: 'struct notifier_block' declared inside parameter list [-Werror]
      arch/powerpc/include/asm/opal.h:894:42: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
      arch/powerpc/include/asm/opal.h:896:14: error: 'struct notifier_block' declared inside parameter list [-Werror]
      
      This is due to a missing include which is added here.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      bfd25d72
    • Joe Perches's avatar
      powerpc: Convert last uses of __FUNCTION__ to __func__ · aba6f4f2
      Joe Perches authored
      Just about all of these have been converted to __func__,
      so convert the last uses.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      aba6f4f2
    • Anton Blanchard's avatar
      powerpc: Add lq/stq emulation · f83319d7
      Anton Blanchard authored
      Recent CPUs support quad word load and store instructions. Add
      support to the alignment handler for them.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f83319d7
    • Joel Stanley's avatar
      powerpc/powernv: Add invalid OPAL call · e28b05e7
      Joel Stanley authored
      This call will not be understood by OPAL, and cause it to add an error
      to it's log. Among other things, this is useful for testing the
      behaviour of the log as it fills up.
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e28b05e7
    • Joel Stanley's avatar
      powerpc/powernv: Add OPAL message log interface · bfc36894
      Joel Stanley authored
      OPAL provides an in-memory circular buffer containing a message log
      populated with various runtime messages produced by the firmware.
      
      Provide a sysfs interface /sys/firmware/opal/msglog for userspace to
      view the messages.
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      bfc36894
    • Mahesh Salgaonkar's avatar
      powerpc/book3s: Fix mc_recoverable_range buffer overrun issue. · 6e556b47
      Mahesh Salgaonkar authored
      Currently we wrongly allocate mc_recoverable_range buffer (to hold
      recoverable ranges) based on size of the property "mcheck-recoverable-ranges".
      This results in allocating less memory to hold available recoverable range
      entries from /proc/device-tree/ibm,opal/mcheck-recoverable-ranges.
      
      This patch fixes this issue by allocating mc_recoverable_range buffer based
      on number of entries of recoverable ranges instead of device property size.
      Without this change we end up allocating less memory and run into memory
      corruption issue.
      Signed-off-by: default avatarMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6e556b47
    • Michael Neuling's avatar
      powerpc: Remove dead code in sycall entry · fa5c11b7
      Michael Neuling authored
      In:
        commit 742415d6
        Author: Michael Neuling <mikey@neuling.org>
        powerpc: Turn syscall handler into macros
      
      We converted the syscall entry code onto macros, but in doing this we
      introduced some cruft that's never run and should never have been added.
      
      This removes that code.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      fa5c11b7
    • Li Zhong's avatar
      powerpc: Use of_node_init() for the fakenode in msi_bitmap.c · e47ff70a
      Li Zhong authored
      This patch uses of_node_init() to initialize the kobject in the fake
      node used in test_of_node(), to avoid following kobject warning.
      
      [    0.897654] kobject: '(null)' (c0000007ca183a08): is not initialized, yet kobject_put() is being called.
      [    0.897682] ------------[ cut here ]------------
      [    0.897688] WARNING: at lib/kobject.c:670
      [    0.897692] Modules linked in:
      [    0.897701] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 3.14.0+ #1
      [    0.897708] task: c0000007ca100000 ti: c0000007ca180000 task.ti: c0000007ca180000
      [    0.897715] NIP: c00000000046a1f0 LR: c00000000046a1ec CTR: 0000000001704660
      [    0.897721] REGS: c0000007ca1835c0 TRAP: 0700   Not tainted  (3.14.0+)
      [    0.897727] MSR: 8000000000029032 <SF,EE,ME,IR,DR,RI>  CR: 28000024  XER: 0000000d
      [    0.897749] CFAR: c0000000008ef4ec SOFTE: 1
      GPR00: c00000000046a1ec c0000007ca183840 c0000000014c59b8 000000000000005c
      GPR04: 0000000000000001 c000000000129770 0000000000000000 0000000000000001
      GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000003fef
      GPR12: 0000000000000000 c00000000f221200 c00000000000c350 0000000000000000
      GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      GPR24: 0000000000000000 c00000000144e808 c000000000c56f20 00000000000000d8
      GPR28: c000000000cd5058 0000000000000000 c000000001454ca8 c0000007ca183a08
      [    0.897856] NIP [c00000000046a1f0] .kobject_put+0xa0/0xb0
      [    0.897863] LR [c00000000046a1ec] .kobject_put+0x9c/0xb0
      [    0.897868] Call Trace:
      [    0.897874] [c0000007ca183840] [c00000000046a1ec] .kobject_put+0x9c/0xb0 (unreliable)
      [    0.897885] [c0000007ca1838c0] [c000000000743f9c] .of_node_put+0x2c/0x50
      [    0.897894] [c0000007ca183940] [c000000000c83954] .test_of_node+0x1dc/0x208
      [    0.897902] [c0000007ca183b80] [c000000000c839a4] .msi_bitmap_selftest+0x24/0x38
      [    0.897913] [c0000007ca183bf0] [c00000000000bb34] .do_one_initcall+0x144/0x200
      [    0.897922] [c0000007ca183ce0] [c000000000c748e4] .kernel_init_freeable+0x2b4/0x394
      [    0.897931] [c0000007ca183db0] [c00000000000c374] .kernel_init+0x24/0x130
      [    0.897940] [c0000007ca183e30] [c00000000000a2f4] .ret_from_kernel_thread+0x5c/0x68
      [    0.897947] Instruction dump:
      [    0.897952] 7fe3fb78 38210080 e8010010 ebe1fff8 7c0803a6 4800014c e89f0000 3c62ff6e
      [    0.897971] 7fe5fb78 3863a950 48485279 60000000 <0fe00000> 39000000 393f0038 4bffff80
      [    0.897992] ---[ end trace 1eeffdb9f825a556 ]---
      Signed-off-by: default avatarLi Zhong <zhong@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e47ff70a
    • Aneesh Kumar K.V's avatar
      1dc954bd
    • Anton Blanchard's avatar
      powerpc/powernv: Fix endian issues with sensor code · 9000c17d
      Anton Blanchard authored
      One OPAL call and one device tree property needed byte swapping.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9000c17d
    • Linus Torvalds's avatar
      Merge branch 'for-3.15' of git://linux-nfs.org/~bfields/linux · 75ff24fa
      Linus Torvalds authored
      Pull nfsd updates from Bruce Fields:
       "Highlights:
         - server-side nfs/rdma fixes from Jeff Layton and Tom Tucker
         - xdr fixes (a larger xdr rewrite has been posted but I decided it
           would be better to queue it up for 3.16).
         - miscellaneous fixes and cleanup from all over (thanks especially to
           Kinglong Mee)"
      
      * 'for-3.15' of git://linux-nfs.org/~bfields/linux: (36 commits)
        nfsd4: don't create unnecessary mask acl
        nfsd: revert v2 half of "nfsd: don't return high mode bits"
        nfsd4: fix memory leak in nfsd4_encode_fattr()
        nfsd: check passed socket's net matches NFSd superblock's one
        SUNRPC: Clear xpt_bc_xprt if xs_setup_bc_tcp failed
        NFSD/SUNRPC: Check rpc_xprt out of xs_setup_bc_tcp
        SUNRPC: New helper for creating client with rpc_xprt
        NFSD: Free backchannel xprt in bc_destroy
        NFSD: Clear wcc data between compound ops
        nfsd: Don't return NFS4ERR_STALE_STATEID for NFSv4.1+
        nfsd4: fix nfs4err_resource in 4.1 case
        nfsd4: fix setclientid encode size
        nfsd4: remove redundant check from nfsd4_check_resp_size
        nfsd4: use more generous NFS4_ACL_MAX
        nfsd4: minor nfsd4_replay_cache_entry cleanup
        nfsd4: nfsd4_replay_cache_entry should be static
        nfsd4: update comments with obsolete function name
        rpc: Allow xdr_buf_subsegment to operate in-place
        NFSD: Using free_conn free connection
        SUNRPC: fix memory leak of peer addresses in XPRT
        ...
      75ff24fa
  2. 08 Apr, 2014 11 commits