aboutsummaryrefslogtreecommitdiffstats
path: root/kernel (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2014-06-11selftests/powerpc: Fix instruction loop for ABIv2 (LE)Michael Ellerman1-38/+35
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powerpc/perf: Ensure all EBB register state is cleared on fork()Michael Ellerman1-0/+2
In commit 330a1eb "Core EBB support for 64-bit book3s" I messed up clear_task_ebb(). It clears some but not all of the task's Event Based Branch (EBB) registers when we duplicate a task struct. That allows a child task to observe the EBBHR & EBBRR of its parent, which it should not be able to do. Fix it by clearing EBBHR & EBBRR. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Cc: stable@vger.kernel.org [v3.11+] Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powerpc/powernv: Fix reading of OPAL msglogJoel Stanley1-1/+5
memory_return_from_buffer returns a signed value, so ret should be ssize_t. Fixes the following issue reported by David Binderman: [linux-3.15/arch/powerpc/platforms/powernv/opal-msglog.c:65]: (style) Checking if unsigned variable 'ret' is less than zero. [linux-3.15/arch/powerpc/platforms/powernv/opal-msglog.c:82]: (style) Checking if unsigned variable 'ret' is less than zero. Local variable "ret" is of type size_t. This is always unsigned, so it is pointless to check if it is less than zero. https://bugzilla.kernel.org/show_bug.cgi?id=77551 Fixing this exposes a real bug for the case where the entire count bytes is successfully read from the POS_WRAP case. The second memory_read_from_buffer will return EINVAL, causing the entire read to return EINVAL to userspace, despite the data being copied correctly. The fix is to test for the case where the data has been read and return early. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powerpc/spufs: Remove duplicate SPUFS_CNTL_MAP_SIZE defineDan Carpenter1-1/+0
The SPUFS_CNTL_MAP_SIZE define is cut and pasted twice so we can delete the second instance. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jeremy Kerr <jk@ozlabs.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powerpc/cpm: Remove duplicate FCC_GFMR_TTX defineDan Carpenter1-1/+0
The FCC_GFMR_TTX define is cut and pasted twice so we can remove the second instance. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powerpc/powernv: Fix endianness problems in EEHGuo Chao3-99/+120
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: Guo Chao <yan@linux.vnet.ibm.com> Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11crypto/nx: disable NX on little endian buildsAnton Blanchard1-1/+1
The NX driver has endian issues so disable it for now. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powernv: Fix permissions on sysparam sysfs entriesAnton Blanchard1-2/+2
Everyone can write to these files, which is not what we want. Cc: stable@vger.kernel.org # 3.15 Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powerpc/powernv : Disable subcore for UP configsShreyas B. Prabhu1-2/+2
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: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com> Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powerpc/powernv: Include asm/smp.h to fix UP build failureShreyas B. Prabhu1-0/+1
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: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powerpc: Don't setup CPUs with bad statusMichael Neuling1-1/+1
OPAL will mark a CPU that is guarded as "bad" in the status property of the CPU node. 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: Michael Neuling <mikey@neuling.org> Tested-by: Anton Blanchard <anton@samba.org> cc: stable@vger.kernel.org Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powerpc: Correct DSCR during TM context switchSam bobroff6-13/+114
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 transaction. 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: tools/testing/selftests/powerpc/tm/tm-resched-dscr. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> CC: <stable@vger.kernel.org> [v3.10+] Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powerpc: Remove platforms/wsp and associated piecesMichael Ellerman32-4250/+1
__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: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powerpc: Remove check for CONFIG_SERIAL_TEXT_DEBUGPaul Bolle1-19/+0
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: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-06-11powerpc: Add AT_HWCAP2 to indicate V.CRYPTO category supportBenjamin Herrenschmidt2-1/+3
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: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: <stable@vger.kernel.org> [v3.10+]
2014-06-10hp-wmi: Enable hotkeys on some systemsKyle Evans1-0/+18
This is a third attempt to enable these buttons. The new variable being commit 997daa1bd9aca412ab97955a35b26c460c0ec7a4 (i.e. hp-wmi: detect "2009 BIOS or later"). Older systems that do not have the 2009 BIOS query method respond with a dummy value, in this case 4. Using that, we can target a fairly narrow group of systems. i.e. old enough to not have HPWMI_FEATURE_QUERY 0xd, but new enough to have HPWMI_BIOS_QUERY 0x9. This group may be further limited if some systems respond with something other than 4 to non-existant feature queries. Signed-off-by: Kyle Evans <kvans32@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10thinkpad_acpi: Add mappings for F9 - F12 hotkeys on X240 / T440 / T540Hans de Goede1-1/+3
The T440s user guide says that when Fn-lock is not active, the *40s' F9 - F12 keys should be mapped to: control-panel, search, show-all-windows and Computer. These keys generate the sofar unused 28 - 31 hotkey scancodes. For the first 2 this nicely matches the icons on the keys, for the latter 2 the icons are somewhat creative, which is why I ended up looking them up in the user manual. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10platform: x86: dell-smo8800: Dell Latitude freefall driver (ACPI SMO8800/SMO8810)Pali Rohár3-0/+244
This acpi driver provide supports for freefall sensors SMO8800/SMO8810 which can be found on Dell Latitude laptops. Driver register /dev/freefall misc device which has same interface as driver hp_accel freefall driver. So any existing applications for HP freefall sensor /dev/freefall will work for with this new driver for Dell Latitude laptops too. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Cc: Sonal Santan <sonal.santan@gmail.com> Tested-By: Valdis Kletnieks <valdis.kletnieks@vt.edu> Acked-By: Valdis Kletnieks <valdis.kletnieks@vt.edu> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10ideapad_laptop: Introduce the use of the managed version of kzallocHimangi Saraogi1-5/+3
This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. The label sysfs_failed is removed as it is no longer required. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. The following Coccinelle semantic patch was used for making the change: @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e, e1, e2; @@ probefn(struct platform_device *pdev, ...) { <+... - e = kzalloc(e1, e2) + e = devm_kzalloc(&pdev->dev, e1, e2) ... ?-kfree(e); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10platform/x86: Fix run-time dependencies of OLPC driversJean Delvare1-1/+2
Let the xo15-ebook driver depend on OLPC as all other OLPC drivers already do. Add COMPILE_TEST as an alternative for both xo1-rfkill and xo15-ebook, to increase the build testing coverage. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10platform: x86: asus-wmi.c: Cleaning up uninitialized variablesRickard Strandqvist1-3/+1
There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10ix86/mid/thermal: Introduce the use of the managed version of kzallocHimangi Saraogi1-5/+2
This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. The following Coccinelle semantic patch was used for making the change: @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e, e1, e2; @@ probefn(struct platform_device *pdev, ...) { <+... - e = kzalloc(e1, e2) + e = devm_kzalloc(&pdev->dev, e1, e2) ... ?-kfree(e); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
2014-06-10platform x86 Kconfig: Refer to the laptop list in the Compal driver helpIsmael Luceno1-10/+8
Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>