[PATCH] TTY: hvc_console, fix port reference count going to zero prematurely

2012-11-14 Thread Paul Mackerras
Commit bdb498c20040 "TTY: hvc_console, add tty install" took the port refcounting out of hvc_open()/hvc_close(), but failed to remove the kref_put() and tty_kref_put() calls in hvc_hangup() that were there to remove the extra references that hvc_open() had taken. The result was that doing a vhangu

Re: [PATCH] cpuidle: Measure idle state durations with monotonic clock

2012-11-14 Thread Deepthi Dharwar
On 11/14/2012 03:22 AM, Julius Werner wrote: > Many cpuidle drivers measure their time spent in an idle state by > reading the wallclock time before and after idling and calculating the > difference. This leads to erroneous results when the wallclock time gets > updated by another processor in the

[patch 4/4] mm, oom: remove statically defined arch functions of same name

2012-11-14 Thread David Rientjes
out_of_memory() is a globally defined function to call the oom killer. x86, sh, and powerpc all use a function of the same name within file scope in their respective fault.c unnecessarily. Inline the functions into the pagefault handlers to clean the code up. Cc: Ingo Molnar Cc: "H. Peter Anvin"

Re: [PATCH 0/1] powerpc/vdso: remove redundant locking in update_vsyscall_tz()

2012-11-14 Thread Shan Hai
On Fri, Nov 09, 2012 at 09:57:49AM +0800, Shan Hai wrote: > The locking in update_vsyscall_tz() is not only unnecessary because the vdso > code copies the data unproteced in __kernel_gettimeofday() but also > introduces a hard to reproduce race condition between update_vsyscall() > and update_vsysc

Re: [PATCH] TTY: hvc_console, fix port reference count going to zero prematurely

2012-11-14 Thread Jiri Slaby
On 11/14/2012 09:15 AM, Paul Mackerras wrote: > Commit bdb498c20040 "TTY: hvc_console, add tty install" took the port > refcounting out of hvc_open()/hvc_close(), but failed to remove the > kref_put() and tty_kref_put() calls in hvc_hangup() that were there to > remove the extra references that hvc

Re: [PATCH 3/4] perf/POWER7: Make event translations available in sysfs

2012-11-14 Thread Jiri Olsa
On Wed, Nov 07, 2012 at 11:19:28AM -0800, Sukadev Bhattiprolu wrote: SNIP > +struct perf_pmu_events_attr { > + struct device_attribute attr; > + u64 id; > +}; > + > +extern ssize_t power_events_sysfs_show(struct device *dev, > + struct device_attribute *attr, c

Re: [PATCH 4/4] perf: Create a sysfs entry for Power event format

2012-11-14 Thread Jiri Olsa
On Wed, Nov 07, 2012 at 11:19:52AM -0800, Sukadev Bhattiprolu wrote: > > From bafc551c31ce23c1cba0b75d23de6c46aba90f26 Mon Sep 17 00:00:00 2001 > From: Sukadev Bhattiprolu > Date: Tue, 6 Nov 2012 16:30:28 -0800 > Subject: [PATCH 4/4] perf: Create a sysfs entry for Power event format > > Create a

Re: [PATCH] cpuidle: Measure idle state durations with monotonic clock

2012-11-14 Thread Daniel Lezcano
On 11/14/2012 10:06 AM, Deepthi Dharwar wrote: > On 11/14/2012 03:22 AM, Julius Werner wrote: >> Many cpuidle drivers measure their time spent in an idle state by >> reading the wallclock time before and after idling and calculating the >> difference. This leads to erroneous results when the wallcl

Re: [PATCH] cpuidle: Measure idle state durations with monotonic clock

2012-11-14 Thread Daniel Lezcano
On 11/13/2012 10:52 PM, Julius Werner wrote: > Many cpuidle drivers measure their time spent in an idle state by > reading the wallclock time before and after idling and calculating the > difference. This leads to erroneous results when the wallclock time gets > updated by another processor in the

Re: [PATCH] Centralise CONFIG_ARCH_NO_VIRT_TO_BUS

2012-11-14 Thread Arnd Bergmann
On Monday 12 November 2012, Stephen Rothwell wrote: > Show Details > Make if easier for more architectures to select it and thus disable > drivers that use virt_to_bus(). > > Signed-off-by: Stephen Rothwell Very nice, I was recently looking into enabling this for ARM as well, at least for th

Re: [PATCH] TTY: hvc_console, fix port reference count going to zero prematurely

2012-11-14 Thread Benjamin Herrenschmidt
On Wed, 2012-11-14 at 10:45 +0100, Jiri Slaby wrote: > > This fixes it by removing the extra kref_put() and tty_kref_put() calls. > > Oh yeah. Thanks. > > Acked-by: Jiri Slaby So who's merging it ? Cheers, Ben. > > Signed-off-by: Paul Mackerras > > Cc: sta...@vger.kernel.org > > --- > > dr

Re: [PATCH 1/5] Add /proc device tree updating to of node add/remove

2012-11-14 Thread Grant Likely
On Tue, 02 Oct 2012 21:55:01 -0500, Nathan Fontenot wrote: > When adding or removing a device tree node we should also update > the device tree in /proc/device-tree. This action is already done in the > generic OF code for adding/removing properties of a node. This patch adds > this functionality

Re: [PATCH] Centralise CONFIG_ARCH_NO_VIRT_TO_BUS

2012-11-14 Thread Bjorn Helgaas
On Tue, Nov 13, 2012 at 3:32 AM, Geert Uytterhoeven wrote: > On Mon, Nov 12, 2012 at 10:26 PM, Stephen Rothwell > wrote: >> diff --git a/arch/Kconfig b/arch/Kconfig >> index 366ec06..9bc00e7 100644 >> --- a/arch/Kconfig >> +++ b/arch/Kconfig >> @@ -271,6 +271,13 @@ config ARCH_WANT_OLD_COMPAT_IP

Re: [PATCH] TTY: hvc_console, fix port reference count going to zero prematurely

2012-11-14 Thread Greg KH
On Wed, Nov 14, 2012 at 11:47:59PM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2012-11-14 at 10:45 +0100, Jiri Slaby wrote: > > > > This fixes it by removing the extra kref_put() and tty_kref_put() calls. > > > > Oh yeah. Thanks. > > > > Acked-by: Jiri Slaby > > So who's merging it ? Give

Re: [PATCH] cpuidle: Measure idle state durations with monotonic clock

2012-11-14 Thread Julius Werner
> Maybe you can remove all these computations and set the flag > en_core_tk_irqen for the driver ? That will be handled by the cpuidle > framework, no ? > > Same comment for the intel_idle driver. Yeah, I thought about that, too. I was a little too afraid of touching the sched_clock_idle_wakeup_ev

Re: [patch 4/4] mm, oom: remove statically defined arch functions of same name

2012-11-14 Thread Michal Hocko
On Wed 14-11-12 01:15:28, David Rientjes wrote: > out_of_memory() is a globally defined function to call the oom killer. > x86, sh, and powerpc all use a function of the same name within file > scope in their respective fault.c unnecessarily. Inline the functions > into the pagefault handlers to c

[PATCH 1/1] powerpc: dts: virtex440: add ethernet phy to virtex440-ml507

2012-11-14 Thread Gernot Vormayr
This adds the marvel phy which is present on the ml507 board. Without this ethtool causes kernel-oopses. Tested on ml507 board. Signed-off-by: Gernot Vormayr --- arch/powerpc/boot/dts/virtex440-ml507.dts |6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/boot/dts/virtex44

Re: [PATCH 3/4] perf/POWER7: Make event translations available in sysfs

2012-11-14 Thread Sukadev Bhattiprolu
Jiri Olsa [jo...@redhat.com] wrote: | On Wed, Nov 07, 2012 at 11:19:28AM -0800, Sukadev Bhattiprolu wrote: | | SNIP | | > +struct perf_pmu_events_attr { | > + struct device_attribute attr; | > + u64 id; | > +}; | > + | > +extern ssize_t power_events_sysfs_show(struct device *dev, | > +

Re: [PATCH] TTY: hvc_console, fix port reference count going to zero prematurely

2012-11-14 Thread Benjamin Herrenschmidt
On Wed, 2012-11-14 at 07:09 -0800, Greg KH wrote: > > So who's merging it ? > > Give me a chance to at least wake up please :) Sure ;-) Just asking since I'm about to cook up a powerpc batch :-) > I will. Thanks ! It should go into stable 3.6 as well. Cheers, Ben. ___

Re: [PATCH] TTY: hvc_console, fix port reference count going to zero prematurely

2012-11-14 Thread Greg KH
On Thu, Nov 15, 2012 at 07:48:17AM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2012-11-14 at 07:09 -0800, Greg KH wrote: > > > So who's merging it ? > > > > Give me a chance to at least wake up please :) > > Sure ;-) Just asking since I'm about to cook up a powerpc batch :-) It's now in my tr

Re: [PATCH] TTY: hvc_console, fix port reference count going to zero prematurely

2012-11-14 Thread Benjamin Herrenschmidt
On Wed, 2012-11-14 at 12:54 -0800, Greg KH wrote: > > Thanks ! It should go into stable 3.6 as well. > > Why? The offending patch didn't show up until 3.7-rc1. Ah, my bad, I though Paulus had observed the problem with 3.6 as well but it looks like you are right. So 3.7 then. Thanks. Cheers, Be

Re: [PATCH] TTY: hvc_console, fix port reference count going to zero prematurely

2012-11-14 Thread Paul Mackerras
On Wed, Nov 14, 2012 at 12:54:07PM -0800, Greg KH wrote: > On Thu, Nov 15, 2012 at 07:48:17AM +1100, Benjamin Herrenschmidt wrote: > > On Wed, 2012-11-14 at 07:09 -0800, Greg KH wrote: > > > > So who's merging it ? > > > > > > Give me a chance to at least wake up please :) > > > > Sure ;-) Just a

Re: [PATCH 1/6] powerpc: Move branch instruction from ACCOUNT_CPU_USER_ENTRY to caller

2012-11-14 Thread Benjamin Herrenschmidt
On Tue, 2012-10-30 at 23:51 -0700, Haren Myneni wrote: --- a/arch/powerpc/kernel/exceptions-64e.S +++ b/arch/powerpc/kernel/exceptions-64e.S @@ -159,8 +159,9 @@ exc_##n##_common: \ std r9,GPR9(r1);/* save r9 in stackfram

Re: [PATCH 1/6] powerpc: Move branch instruction from ACCOUNT_CPU_USER_ENTRY to caller

2012-11-14 Thread Benjamin Herrenschmidt
On Thu, 2012-11-15 at 11:40 +1100, Benjamin Herrenschmidt wrote: On Tue, 2012-10-30 at 23:51 -0700, Haren Myneni wrote: --- a/arch/powerpc/kernel/exceptions-64e.S +++ b/arch/powerpc/kernel/exceptions-64e.S @@ -159,8 +159,9 @@ exc_##n##_common:

[PATCH] cpuidle: Measure idle state durations with monotonic clock

2012-11-14 Thread Julius Werner
Many cpuidle drivers measure their time spent in an idle state by reading the wallclock time before and after idling and calculating the difference. This leads to erroneous results when the wallclock time gets updated by another processor in the meantime, adding that clock adjustment to the idle st

[PATCH] powerpc/pseries: Fix IBM_ARCH_VEC_NRCORES_OFFSET for POWER8 updates

2012-11-14 Thread Michael Neuling
In supporting POWER8 we added 16 bytes to the start of the ibm_architecture_vec, but forgot to add this to IBM_ARCH_VEC_NRCORES_OFFSET. This caused us to hit this warning in early boot: WARNING ! ibm_architecture_vec structure inconsistent: 805372128 This add this extra 16 bytes of offset. S

[PATCH 1/7] powerpc: Define differences between doorbells on book3e and book3s

2012-11-14 Thread Ian Munsie
From: Ian Munsie There are a few key differences between doorbells on server compared with embedded that we care about on Linux, namely: - We have a new msgsndp instruction for directed privileged doorbells. msgsnd is used for directed hypervisor doorbells. - The tag we use in the instruction

[PATCH 3/7] powerpc: Add book3s privileged doorbell exception vectors

2012-11-14 Thread Ian Munsie
From: Ian Munsie Directed Privileged Doorbell Interrupts come in at 0xa00 (or 0xc0004a00 if relocation on exception is enabled), so add exception vectors at these locations. If doorbell support is not compiled in we handle it as an unknown_exception. Signed-off-by: Ian Munsie Tested-by

powerpc: Add support for POWER8 directed doorbell interrupts

2012-11-14 Thread Ian Munsie
This patch series adds support for using directed doorbell interrupts for IPIs between threads within a core, which is supported by POWER8. This should avoid the overhead of using XICS to deliver an IPI within a core, though delivering IPIs between threads of different cores must still use XICS as

[PATCH 4/7] powerpc: Select either privileged or hypervisor doorbell when sending

2012-11-14 Thread Ian Munsie
From: Ian Munsie On book3s we have two msgsnd instructions with differing privilege levels. This patch selects the appropriate instruction to use whenever we send a doorbell interrupt. Signed-off-by: Ian Munsie Tested-by: Michael Neuling --- arch/powerpc/include/asm/dbell.h | 15 +++

[PATCH 7/7] powerpc: Hook up doorbells on server

2012-11-14 Thread Ian Munsie
From: Ian Munsie This patch actually hooks up doorbell interrupts on POWER8: - Select the PPC_DOORBELL Kconfig option from PPC_PSERIES - Add the doorbell CPU feature bit to POWER8 - We define a new pSeries_cause_ipi_mux() function that issues a doorbell interrupt if the recipient is another

[PATCH 2/7] powerpc: Add book3s hypervisor doorbell exception vectors

2012-11-14 Thread Ian Munsie
From: Ian Munsie Directed Hypervisor Doorbell Interrupts come in at 0xe80 (or 0xc0004e80 if relocation on exceptions is enabled), so add exception vectors at these locations. If doorbell support is not compiled in we handle it as an unknown_exception. Signed-off-by: Ian Munsie Tested-b

[PATCH 5/7] powerpc: Add code to handle soft-disabled doorbells on server

2012-11-14 Thread Ian Munsie
From: Ian Munsie This patch adds the logic to properly handle doorbells that come in when interrupts have been soft disabled and to replay them when interrupts are re-enabled: - masked_##_H##interrupt is modified to leave interrupts enabled when a doorbell has come in since doorbells are edge

[PATCH 6/7] powerpc: Update Kconfig + Makefile to prepare for server doorbells

2012-11-14 Thread Ian Munsie
From: Ian Munsie Move the rule to build doorbell support out of the Makefile and into a new Kconfig boolean that platforms can select. We will add doorbell support to pseries as well in the next patch. Signed-off-by: Ian Munsie Tested-by: Michael Neuling --- arch/powerpc/kernel/Makefile

[powerpc:dt 10/10] lib/pSeries-reconfig-notifier-error-inject.c:4:34: fatal error: asm/pSeries_reconfig.h: No such file or directory

2012-11-14 Thread kbuild test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git dt head: f459d63e1689b16a2f5a965557e19b25bad5dbdc commit: f459d63e1689b16a2f5a965557e19b25bad5dbdc [10/10] powerpc+of: Remove the pSeries_reconfig.h file config: make ARCH=powerpc allmodconfig All error/warnings: lib/pSerie

linux-next: manual merge of the powerpc tree with the signal tree

2012-11-14 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the powerpc tree got a conflict in arch/powerpc/kernel/entry_64.S between commits 40792104b255 ("powerpc: don't mess with r2 in copy_thread() and friends") and 53b50f9483cc ("powerpc: take dereferencing to ret_from_kernel_thread()") from the signal tree and comm

Re: hoo boy, interrupt Handling on BGQ

2012-11-14 Thread Segher Boessenkool
So interrupts need to go to FW before Linux, please let not talk about how silly that is. Lets talk about something far more silly... In order to get to the Linux exception handlers, we have to tell FW where the interrupt page is, and then it _copies_ it. IFAICT, this means that each vectors

linux-next: build failure after merge of the final tree (powercp tree related)

2012-11-14 Thread Stephen Rothwell
Hi all, After merging the final tree, today's linux-next build (powerpc allyesconfig) failed like this: lib/pSeries-reconfig-notifier-error-inject.c:4:34: fatal error: asm/pSeries_reconfig.h: No such file or directory Caused by commit f459d63e1689 ("powerpc+of: Remove the pSeries_reconfig.h fil

Re: linux-next: build failure after merge of the final tree (powercp tree related)

2012-11-14 Thread Benjamin Herrenschmidt
On Thu, 2012-11-15 at 18:06 +1100, Stephen Rothwell wrote: > Hi all, > > After merging the final tree, today's linux-next build (powerpc > allyesconfig) failed like this: > > lib/pSeries-reconfig-notifier-error-inject.c:4:34: fatal error: > asm/pSeries_reconfig.h: No such file or directory > >