[PATCH] arch: powerpc: kvm: book3s_32_mmu.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Remove the function sr_nx() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/kvm/book3s_32_mmu.c |5 - 1 file changed, 5 deletions(-)

[PATCH] arch: powerpc: kvm: book3s.c: Remove some unused functions

2014-12-07 Thread Rickard Strandqvist
Removes some functions that are not used anywhere: kvmppc_core_load_guest_debugstate() kvmppc_core_load_host_debugstate() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se ---

[PATCH] arch: powerpc: kernel: sys_ppc32.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Remove the function compat_sys_mmap2() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/kernel/sys_ppc32.c |8 1 file changed, 8

[PATCH] arch: powerpc: mm: slice.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Remove the function slice_set_psize() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/mm/slice.c | 29 - 1 file

[PATCH] arch: powerpc: kvm: book3s_pr.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Remove the function get_fpr_index() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/kvm/book3s_pr.c |5 - 1 file changed, 5

[PATCH] arch: powerpc: kernel: traps.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Remove the function vsx_assist_exception() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/kernel/traps.c | 15 --- 1 file

[PATCH] arch: powerpc: kernel: signal_32.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Remove the function sys_debug_setcontext() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/kernel/signal_32.c | 107

[PATCH] arch: powerpc: kernel: smp.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Remove the function generic_mach_cpu_die() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/include/asm/smp.h |1 -

Re: [PATCH] arch: powerpc: kernel: signal_32.c: Remove unused function

2014-12-07 Thread Richard Weinberger
Am 07.12.2014 um 23:07 schrieb Rickard Strandqvist: Remove the function sys_debug_setcontext() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Please don't blindly trust code analysis tools. The function you're removing *is* in

[PATCH] arch: powerpc: kvm: book3s_paired_singles.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Remove the function inst_set_field() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/kvm/book3s_paired_singles.c |8 1 file

[PATCH] arch: powerpc: kernel: vio.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Remove the function cmo_high_show() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/kernel/vio.c |5 - 1 file changed, 5 deletions(-)

Re: [PATCH] arch: powerpc: kernel: signal_32.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Hi Ok, sorry :-( But I really do not. I've hacked together a script that will scan all the code for the function, and test builds with some different config options turned on. Kind regards Rickard Strandqvist 2014-12-07 23:18 GMT+01:00 Richard Weinberger rich...@nod.at: Am 07.12.2014 um

Re: [PATCH] arch: powerpc: kernel: signal_32.c: Remove unused function

2014-12-07 Thread Richard Weinberger
Am 08.12.2014 um 00:11 schrieb Rickard Strandqvist: Hi Ok, sorry :-( But I really do not. I've hacked together a script that will scan all the code for the function, and test builds with some different config options turned on. Looks like you did not build a powerpc32 kernel. :-) FWIW,

Re: [PATCH] arch: powerpc: kernel: sys_ppc32.c: Remove unused function

2014-12-07 Thread Paul Mackerras
On Sun, Dec 07, 2014 at 06:56:54PM +0100, Rickard Strandqvist wrote: Remove the function compat_sys_mmap2() that is not used anywhere. It's referenced in 64-bit kernels from arch/powerpc/kernel/systbl.S, via the SYS32ONLY(mmap2) line in arch/powerpc/include/asm/systbl.h. Paul.

[PATCH RESEND 2/2] powerpc/via-pmu: fix OF node leak in Keylargo init

2014-12-07 Thread Aaro Koskinen
From: Phil Carmody pc+l...@asdf.org If we of_find_node_by_name() then we must of_node_put() too. Signed-off-by: Phil Carmody pc+l...@asdf.org Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi --- drivers/macintosh/via-pmu.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH RESEND 1/2] powerpc/via-pmu: fix error path in find_via_pmu()

2014-12-07 Thread Aaro Koskinen
From: Phil Carmody pc+l...@asdf.org Cleanup was not in the reverse order from the set-up, so not all the gotos made sense, and also it was being avoided completely upon failure of init_pmu(). Signed-off-by: Phil Carmody pc+l...@asdf.org Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi ---

[PATCH] kthread: kthread_bind fails to enforce CPU affinity (fixes kernel BUG at kernel/smpboot.c:134!)

2014-12-07 Thread Anton Blanchard
I have a busy ppc64le KVM box where guests sometimes hit the infamous kernel BUG at kernel/smpboot.c:134! issue during boot: BUG_ON(td-cpu != smp_processor_id()); Basically a per CPU hotplug thread scheduled on the wrong CPU. The oops output confirms it: CPU: 0 Comm: watchdog/130 The issue is

Re: [PATCH v3 2/4] powerpc/powernv: Enable Offline CPUs to enter deep idle states

2014-12-07 Thread Paul Mackerras
On Thu, Dec 04, 2014 at 12:58:21PM +0530, Shreyas B. Prabhu wrote: From: Preeti U. Murthy pre...@linux.vnet.ibm.com The secondary threads should enter deep idle states so as to gain maximum powersavings when the entire core is offline. To do so the offline path must be made aware of the

Re: [PATCH] kthread: kthread_bind fails to enforce CPU affinity (fixes kernel BUG at kernel/smpboot.c:134!)

2014-12-07 Thread Linus Torvalds
On Sun, Dec 7, 2014 at 7:27 PM, Anton Blanchard an...@samba.org wrote: Since we cannot call set_task_cpu (the task is in a sleeping state), just do an explicit set of task_thread_info(p)-cpu. Scheduler people: is this sufficient and ok? The __set_task_cpu() function does various other things

Re: [PATCH] kthread: kthread_bind fails to enforce CPU affinity (fixes kernel BUG at kernel/smpboot.c:134!)

2014-12-07 Thread Anton Blanchard
Hi Linus, The __set_task_cpu() function does various other things too: set_task_rq(p, cpu); #ifdef CONFIG_SMP /* * After -cpu is set up to a new value, task_rq_lock(p, ...) can be * successfuly executed on another CPU. We must ensure that updates of

Re: [PATCH v3 3/4] powernv: cpuidle: Redesign idle states management

2014-12-07 Thread Paul Mackerras
On Thu, Dec 04, 2014 at 12:58:22PM +0530, Shreyas B. Prabhu wrote: Deep idle states like sleep and winkle are per core idle states. A core enters these states only when all the threads enter either the particular idle state or a deeper one. There are tasks like fastsleep hardware bug

Re: [PATCH v3 3/4] powernv: cpuidle: Redesign idle states management

2014-12-07 Thread Shreyas B Prabhu
Hi Paul, On Monday 08 December 2014 10:31 AM, Paul Mackerras wrote: On Thu, Dec 04, 2014 at 12:58:22PM +0530, Shreyas B. Prabhu wrote: Deep idle states like sleep and winkle are per core idle states. A core enters these states only when all the threads enter either the particular idle state

Re: [PATCH] tick-broadcast: Register for hrtimer based broadcast as the default broadcast mode

2014-12-07 Thread Preeti U Murthy
On 12/05/2014 07:09 PM, Mark Rutland wrote: Hi Preeti, Moving this out of the architecture code looks good to me! I have a couple of minor comments below. snip diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index ec1791f..6044a51 100644 ---

Re: [PATCH v3 4/4] powernv: powerpc: Add winkle support for offline cpus

2014-12-07 Thread Paul Mackerras
On Thu, Dec 04, 2014 at 12:58:23PM +0530, Shreyas B. Prabhu wrote: Winkle is a deep idle state supported in power8 chips. A core enters winkle when all the threads of the core enter winkle. In this state power supply to the entire chiplet i.e core, private L2 and private L3 is turned off. As a

[PATCH 1/5] powerpc: Fix handling of DSCR related facility unavailable exception

2014-12-07 Thread Anshuman Khandual
Currently DSCR (Data Stream Control Register) can be accessed with mfspr or mtspr instructions inside a thread via two different SPR numbers. One being the user accessible problem state SPR number 0x03 and the other being the privilege state SPR number 0x11. All access through the privilege state

[PATCH 2/5] powerpc, process: Remove the unused extern dscr_default

2014-12-07 Thread Anshuman Khandual
The process context switch code no longer uses dscr_default variable from the sysfs.c file. The variable became unused when we started storing the CPU specific DSCR value in the PACA structure instead. This patch just removes this extern declaration. It was originally added by the following

[PATCH 4/5] powerpc, dscr: Added some in-code documentation

2014-12-07 Thread Anshuman Khandual
This patch adds some in-code documentation to the DSCR related code to make it more readable without having any functional change to it. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/processor.h | 8 arch/powerpc/kernel/sysfs.c | 13

[PATCH 3/5] powerpc, offset: Change PACA_DSCR to PACA_DSCR_DEFAULT

2014-12-07 Thread Anshuman Khandual
PACA_DSCR offset macro tracks dscr_default element in the paca structure. Better change the name of this macro to match that of the data element it tracks. Makes the code more readable. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/kernel/asm-offsets.c | 2

[PATCH 5/5] documentation, powerpc: Add documentation for DSCR support

2014-12-07 Thread Anshuman Khandual
This patch adds a new documentation file explaining the DSCR support on powerpc platforms. This explains DSCR related data structure, code paths and also available user interfaces. Any further functional changes to the DSCR support in the kernel should definitely update the documentation here.

[PATCH v3] i2c: Driver to expose PowerNV platform i2c busses

2014-12-07 Thread Neelesh Gupta
The patch exposes the available i2c busses on the PowerNV platform to the kernel and implements the bus driver to support i2c and smbus commands. The driver uses the platform device infrastructure to probe the busses on the platform and registers them with the i2c driver framework. Signed-off-by:

[PATCH V2] tick-broadcast: Register for hrtimer based broadcast as the fallback broadcast mode

2014-12-07 Thread Preeti U Murthy
Commit 5d1638acb9f6 ('tick: Introduce hrtimer based broadcast') added a hrtimer based broadcast mode for those platforms in which local timers stop when CPUs enter deep idle states. The commit expected the platforms to register for this mode explicitly when they lacked a better external device to