Re: [PATCH] POWER: perf_event: Skip updating kernel counters if register value shrinks

2011-03-28 Thread Benjamin Herrenschmidt
On Fri, 2011-03-25 at 09:28 -0400, Eric B Munson wrote: > It is possible on POWER7 for some perf events to have values decrease. This > causes a problem with the way the kernel counters are updated. Deltas are > computed and then stored in a 64 bit value while the registers are 32 bits > wide so

Re: [PATCH 15/18] powerpc/smp: Don't expose per-cpu "cpu_state" array

2011-03-28 Thread Michael Ellerman
On Tue, 2011-03-08 at 17:37 +1100, Benjamin Herrenschmidt wrote: > Instead, keep it static, expose an accessor and use that from > the PowerMac code. Avoids easy namespace collisions and will > make it easier to consolidate with other implementations. > > Signed-off-by: Benjamin Herrenschmidt > -

[PATCH v3 4/4] xhci: Remove recursive call to xhci_handle_event

2011-03-28 Thread Matt Evans
Make the caller loop while there are events to handle, instead. Signed-off-by: Matt Evans --- Added a comment on the return value, defining <0 to be 'bad'. drivers/usb/host/xhci-ring.c | 18 +++--- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/x

[PATCH v3 3/4] xhci: Add an assertion to check for virt_dev=0 bug.

2011-03-28 Thread Matt Evans
During a "plug-unplug" stress test on an NEC xHCI card, a null pointer dereference was observed. xhci_address_device() dereferenced a null virt_dev (possibly an erroneous udev->slot_id?); this patch adds a WARN_ON & message to aid debug if it can be recreated. Signed-off-by: Matt Evans --- driv

[PATCH v3 2/4] xhci: Add rmb() between reading event validity & event data access.

2011-03-28 Thread Matt Evans
On weakly-ordered systems, the reading of an event's content must occur after reading the event's validity. Signed-off-by: Matt Evans --- drivers/usb/host/xhci-ring.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci

[PATCH v3 0/4] xhci: Make xHCI driver endian-safe

2011-03-28 Thread Matt Evans
Hi Sarah, Reposting the whole set, since there're 4 instead of 5 having dropped the 'add debug' patch in the middle and I thought differing 'vN a/b' subjects may get confusing otherwise. (Two of the patches haven't changed. :/ ) These remove the scratty temp variables and comment the return val

Re: [PATCH 2/5] xhci: Extend debug messages

2011-03-28 Thread Matt Evans
Hi, On 29/03/11 09:19, Sarah Sharp wrote: > On Fri, Mar 25, 2011 at 06:43:59PM +1100, Matt Evans wrote: >> Add more debug to print queued transfers, show control intentions and >> modify an existing message to hexify address output. > > Are these new debug messages really necessary? I feel like

Re: [PATCH 0/5] Make xHCI driver endian-safe, add a barrier, some debug

2011-03-28 Thread Matt Evans
On 29/03/11 09:16, Sarah Sharp wrote: > On Fri, Mar 25, 2011 at 06:43:44PM +1100, Matt Evans wrote: >> Hi Sarah, >> >> >> This series addresses the endian issues with the xHCI driver, and has brought >> lovely USB 3 to PPC. :-) I've tested various types of traffic on ppc4xx and >> POWER7 and (some

Re: minimum guaranteed alignment of dma_alloc_coherent?

2011-03-28 Thread Benjamin Herrenschmidt
On Mon, 2011-02-07 at 09:13 -0600, Timur Tabi wrote: > > This behavior is modified if you specify a restricted DMA > > mask for the device. In this case, dma_alloc_coherent > > will force GFP_DMA on your behalf (on PowerPC). > > Isn't it required for all callers of dma_alloc_coherent to specify a

Re: [PATCH] powerpc: Implement dma_mmap_coherent()

2011-03-28 Thread Benjamin Herrenschmidt
On Fri, 2011-03-25 at 17:50 +1100, Benjamin Herrenschmidt wrote: > This is used by Alsa to mmap buffers allocated with dma_alloc_coherent() > into userspace. We need a special variant to handle machines with > non-coherent DMAs as those buffers have "special" virt addresses and > require non-cachab

Re: [PATCH v2 5/5] xhci: Remove recursive call to xhci_handle_event

2011-03-28 Thread Benjamin Herrenschmidt
On Mon, 2011-03-28 at 15:34 -0700, Sarah Sharp wrote: > > What I'd like to do is take out the read of the status register out of > the interrupt handler (which is killing performance), and make it only > check the status register when xhci_handle_event() returns a negative > error status. If the

Re: [PATCH v2 5/5] xhci: Remove recursive call to xhci_handle_event

2011-03-28 Thread Sarah Sharp
On Mon, Mar 28, 2011 at 03:53:00PM +1100, Matt Evans wrote: > Make the caller loop while there are events to handle, instead. > > Signed-off-by: Matt Evans > --- > 1 byte smaller after Sergei's suggestion. > > drivers/usb/host/xhci-ring.c | 16 +--- > 1 files changed, 9 insertions

Re: [PATCH 0/5] Make xHCI driver endian-safe, add a barrier, some debug

2011-03-28 Thread Sarah Sharp
On Fri, Mar 25, 2011 at 06:43:44PM +1100, Matt Evans wrote: > Hi Sarah, > > > This series addresses the endian issues with the xHCI driver, and has brought > lovely USB 3 to PPC. :-) I've tested various types of traffic on ppc4xx and > POWER7 and (some sound driver bugs notwithstanding) all seem

Re: [PATCH 4/5] xhci: Add an assertion to check for virt_dev=0 bug.

2011-03-28 Thread Sarah Sharp
On Fri, Mar 25, 2011 at 06:44:18PM +1100, Matt Evans wrote: > During a "plug-unplug" stress test on an NEC xHCI card, a null pointer > dereference was observed. xhci_address_device() dereferenced a null > virt_dev (possibly an erroneous udev->slot_id?); this patch adds a WARN_ON & > message to aid

Re: [PATCH 2/5] xhci: Extend debug messages

2011-03-28 Thread Sarah Sharp
On Fri, Mar 25, 2011 at 06:43:59PM +1100, Matt Evans wrote: > Add more debug to print queued transfers, show control intentions and > modify an existing message to hexify address output. Are these new debug messages really necessary? I feel like the xHCI driver has way too many debugging messages

Re: [PATCH v2 3/5] xhci: Add rmb() between reading event validity & event data access.

2011-03-28 Thread Sarah Sharp
This patch looks fine, thanks! Sarah Sharp On Mon, Mar 28, 2011 at 03:52:57PM +1100, Matt Evans wrote: > On weakly-ordered systems, the reading of an event's content must occur > after reading the event's validity. > > Signed-off-by: Matt Evans > --- > Segher, thanks for the comment; explanatio

[PATCH v2 3/4] KVM: PPC: e500: Introduce msr_block for e500v2

2011-03-28 Thread Scott Wood
From: yu liu In order to use lazy SPE register save/restore, we need to know when the guest is using MSR[SPE]. In order to do that, we need to control the actual MSR[SPE] separately from the guest's notion of MSR[SPE]. Only bits set in msr_block can be changed by the guest in the real MSR. Sig

[PATCH v2 2/4] KVM: PPC: booke: Wrap __kvmppc_vcpu_run()

2011-03-28 Thread Scott Wood
From: yu liu We need to save/restore SPE environment on e500 core. Wrap __kvmppc_vcpu_run() so that we can put the SPE code in e500.c. Signed-off-by: Liu Yu Signed-off-by: Scott Wood --- v2: added kvm-ppc (sorry for the resend) arch/powerpc/include/asm/kvm_ppc.h |1 + arch/powerpc/kvm/4

[PATCH v2 4/4] KVM: PPC: e500: SPE switch between guest and host

2011-03-28 Thread Scott Wood
From: yu liu This patch provide a lazy way to do SPE switch. The SPE save/restore will be done only if it's needed. Linux already switches SPEFSCR on context switch (non-lazily), so the only remaining bit is to save it between qemu and the guest. Signed-off-by: Liu Yu Signed-off-by: Scott Wood

[PATCH v2 1/4] powerpc/e500v2: Save SPEFCSR in flush_spe_to_thread()

2011-03-28 Thread Scott Wood
From: yu liu giveup_spe() saves the SPE state which is protected by MSR[SPE]. However, modifying SPEFSCR does not trap when MSR[SPE]=0. And since SPEFSCR is already saved/restored in _switch(), not all the callers want to save SPEFSCR again. Thus, saving SPEFSCR should not belong to giveup_spe().

Re: [PATCH v10 09/10] USB/ppc4xx:Synopsys DWC OTG driver enable gadget support

2011-03-28 Thread Randy Dunlap
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig > index bc5123c..61aca75 100644 > --- a/drivers/usb/gadget/Kconfig > +++ b/drivers/usb/gadget/Kconfig > @@ -365,6 +365,28 @@ config USB_GADGET_MUSB_HDRC > This OTG-capable silicon IP is used in dual designs including >

[PATCH 2/4] KVM: PPC: booke: Wrap __kvmppc_vcpu_run()

2011-03-28 Thread Scott Wood
From: yu liu We need to save/restore SPE environment on e500 core. Wrap __kvmppc_vcpu_run() so that we can put the SPE code in e500.c. Signed-off-by: Liu Yu Signed-off-by: Scott Wood --- arch/powerpc/include/asm/kvm_ppc.h |1 + arch/powerpc/kvm/44x.c |5 + arch/power

[PATCH 3/4] KVM: PPC: e500: Introduce msr_block for e500v2

2011-03-28 Thread Scott Wood
From: yu liu In order to use lazy SPE register save/restore, we need to know when the guest is using MSR[SPE]. In order to do that, we need to control the actual MSR[SPE] separately from the guest's notion of MSR[SPE]. Only bits set in msr_block can be changed by the guest in the real MSR. Sig

[PATCH 4/4] KVM: PPC: e500: SPE switch between guest and host

2011-03-28 Thread Scott Wood
From: yu liu This patch provide a lazy way to do SPE switch. The SPE save/restore will be done only if it's needed. Linux already switches SPEFSCR on context switch (non-lazily), so the only remaining bit is to save it between qemu and the guest. Signed-off-by: Liu Yu Signed-off-by: Scott Wood

[PATCH 1/4] powerpc/e500v2: Save SPEFCSR in flush_spe_to_thread()

2011-03-28 Thread Scott Wood
From: yu liu giveup_spe() saves the SPE state which is protected by MSR[SPE]. However, modifying SPEFSCR does not trap when MSR[SPE]=0. And since SPEFSCR is already saved/restored in _switch(), not all the callers want to save SPEFSCR again. Thus, saving SPEFSCR should not belong to giveup_spe().

Re: [PATCH V9 10/10] USB ppc4xx: Add Synopsys DWC OTG driver kernel configuration and Makefile

2011-03-28 Thread Sergei Shtylyov
Hello. Greg KH wrote: +config DWC_DEVICE_ONLY + bool "DWC Device Only Mode" + select USB_GADGET_SELECTED + +endchoice So this is tri-modal driver after all... how come we place it in drivers/usb/otg/dwc/, while the same tri-modal MUSB driver was placed in drivers/usb/musb/?

[PATCH] powerpc: Add Initiate Coprocessor Store Word (icswx) support

2011-03-28 Thread Anton Blanchard
From: Tseng-Hui (Frank) Lin Icswx is a PowerPC instruction to send data to a co-processor. On Book-S processors the LPAR_ID and process ID (PID) of the owning process are registered in the window context of the co-processor at initialization time. When the icswx instruction is executed the L2 gen

[PATCH v10 01/10] USB/ppc4xx: Add Synopsys DWC OTG Register definitions

2011-03-28 Thread tmarri
From: Tirumala Marri Add Synopsys Design Ware core register definitions. Signed-off-by: Tirumala R Marri Signed-off-by: Fushen Chen Signed-off-by: Mark Miesfeld --- drivers/usb/otg/dwc/regs.h | 1326 1 files changed, 1326 insertions(+), 0 deletion

[PATCH v10 07/10] USB/ppc4xx: Add Synopsys DWC OTG PCD function

2011-03-28 Thread tmarri
From: Tirumala Marri The PCD is responsible for translating requests from the gadget driver to appropriate actions on the DWC OTG controller. Signed-off-by: Tirumala R Marri Signed-off-by: Fushen Chen Signed-off-by: Mark Miesfeld --- drivers/usb/otg/dwc/pcd.c | 1766 +

[PATCH v10 05/10] USB/ppc4xx: Add Synopsys DWC OTG HCD interrupt function

2011-03-28 Thread tmarri
From: Tirumala Marri Implements DWC OTG USB HCD interrupt service routine. Signed-off-by: Tirumala R Marri Signed-off-by: Fushen Chen Signed-off-by: Mark Miesfeld --- drivers/usb/otg/dwc/hcd_intr.c | 1477 1 files changed, 1477 insertions(+), 0 deleti

[PATCH v10 02/10] USB/ppc4xx: Add Synopsys DWC OTG driver framework

2011-03-28 Thread tmarri
From: Tirumala Marri Platform probing is in dwc_otg_apmppc.c. Driver parameter and parameter checking are in dwc_otg_param.c. Signed-off-by: Tirumala R Marri Signed-off-by: Fushen Chen Signed-off-by: Mark Miesfeld --- drivers/usb/otg/dwc/apmppc.c | 414 ++

[PATCH v10 06/10] USB/ppc4xx: Add Synopsys DWC OTG HCD queue function

2011-03-28 Thread tmarri
From: Tirumala Marri Implements functions to manage Queue Heads and Queue Transfer Descriptors of DWC USB OTG Controller. Signed-off-by: Tirumala R Marri Signed-off-by: Fushen Chen Signed-off-by: Mark Miesfeld --- drivers/usb/otg/dwc/hcd_queue.c | 696 +++

[PATCH v10 10/10] USB ppc4xx: Add Synopsys DWC OTG driver kernel configuration and Makefile

2011-03-28 Thread tmarri
From: Tirumala Marri Add Synopsys DesignWare HS USB OTG driver kernel configuration. Synopsys OTG driver may operate in host only, device only, or OTG mode. The driver also allows user configure the core to use its internal DMA or Slave (PIO) mode. Signed-off-by: Tirumala R Marri Signed-off-by

[PATCH v10 09/10] USB/ppc4xx:Synopsys DWC OTG driver enable gadget support

2011-03-28 Thread tmarri
From: Tirumala Marri Enable gadget support Signed-off-by: Tirumala R Marri Signed-off-by: Fushen Chen Signed-off-by: Mark Miesfeld --- drivers/usb/gadget/Kconfig| 22 ++ drivers/usb/gadget/gadget_chips.h |9 + 2 files changed, 31 insertions(+), 0 del

[PATCH v10 00/10] Add-Synopsys-DesignWare-HS-USB-OTG-driver

2011-03-28 Thread tmarri
From: Tirumala Marri v10: 1. Change address argument type from u32 to ulong to make it arch independent. 2. Cleaning un-necasary changes from Kconfig. v9: 1. Move the source under usb/otg/dwc. 2. Rename the source files with out dwc_otg prefix. 3. Remove unused read/write modify functi

Re: [PATCH V9 10/10] USB ppc4xx: Add Synopsys DWC OTG driver kernel configuration and Makefile

2011-03-28 Thread Greg KH
On Mon, Mar 28, 2011 at 09:38:20PM +0400, Sergei Shtylyov wrote: > Hello. > > Tirumala Marri wrote: > > >>>+config DWC_DEVICE_ONLY > >>>+ bool "DWC Device Only Mode" > >>>+ select USB_GADGET_SELECTED > >>>+ > >>>+endchoice > > >>So this is tri-modal driver after all... how come we place it

Re: [PATCH V13 4/4] ptp: Added a clock driver for the National Semiconductor PHYTER.

2011-03-28 Thread John Stultz
On Sun, 2011-03-27 at 08:39 +0200, Richard Cochran wrote: > This patch adds support for the PTP clock found on the DP83640. > The basic clock operations and one external time stamp have > been implemented. > > Signed-off-by: Richard Cochran Acked-by: John Stultz _

Re: [PATCH V13 3/4] ptp: Added a clock driver for the IXP46x.

2011-03-28 Thread John Stultz
On Sun, 2011-03-27 at 08:39 +0200, Richard Cochran wrote: > This patch adds a driver for the hardware time stamping unit found on the > IXP465. The basic clock operations and an external trigger are implemented. > > Signed-off-by: Richard Cochran Acked-by: John Stultz _

Re: [PATCH V13 2/4] ptp: Added a clock that uses the eTSEC found on the MPC85xx.

2011-03-28 Thread John Stultz
On Sun, 2011-03-27 at 08:38 +0200, Richard Cochran wrote: > The eTSEC includes a PTP clock with quite a few features. This patch adds > support for the basic clock adjustment functions, plus two external time > stamps, one alarm, and the PPS callback. > > Signed-off-by: Richard Cochran Acked-by:

Re: [PATCH V13 1/4] ptp: Added a brand new class driver for ptp clocks.

2011-03-28 Thread John Stultz
On Sun, 2011-03-27 at 08:38 +0200, Richard Cochran wrote: > This patch adds an infrastructure for hardware clocks that implement > IEEE 1588, the Precision Time Protocol (PTP). A class driver offers a > registration method to particular hardware clock drivers. Each clock is > presented as a standar

Re: hvc_console: Don't access hvc_task if not initialised

2011-03-28 Thread Milton Miller
On Fri, 25 Mar 2011 about 14:17:14 +0530, Amit Shah wrote: > On (Thu) 24 Mar 2011 [08:58:04], Milton Miller wrote: > > On Thu, 24 Mar 2011 07:29:58 -, Amit Shah wrote: > > > hvc_open() can be called without having any backing device. This > > > results in a call to hvc_kick() which calls wake_

Re: [PATCH V9 10/10] USB ppc4xx: Add Synopsys DWC OTG driver kernel configuration and Makefile

2011-03-28 Thread Sergei Shtylyov
Hello. Tirumala Marri wrote: +config DWC_DEVICE_ONLY + bool "DWC Device Only Mode" + select USB_GADGET_SELECTED + +endchoice So this is tri-modal driver after all... how come we place it in drivers/usb/otg/dwc/, while the same tri-modal MUSB driver was placed in drivers/usb/m

RE: [PATCH V9 10/10] USB ppc4xx: Add Synopsys DWC OTG driver kernel configuration and Makefile

2011-03-28 Thread Tirumala Marri
> +config DWC_DEVICE_ONLY > + bool "DWC Device Only Mode" > + select USB_GADGET_SELECTED > + > +endchoice So this is tri-modal driver after all... how come we place it in drivers/usb/otg/dwc/, while the same tri-modal MUSB driver was placed in drivers/usb/musb/? [Marri] Initially this

runtime reconfigure FPGA through powerpc linux

2011-03-28 Thread SACHIN SOLANKI
hello sir, i am very new in linuxppc field i just want know that.is it possible to reconfigure FPGA at runtime by powerpc linux.i want to put reconfigure bit file in CF and also put linux file system in CF then how is it possible to instruct the linux to take bit file from CF and reconfigure FPGA a

Re: [PATCH] powerpc: Add Initiate Coprocessor Store Word (icswx) support

2011-03-28 Thread Kumar Gala
On Mar 25, 2011, at 4:32 PM, Anton Blanchard wrote: > From: Tseng-Hui (Frank) Lin > > Icswx is a PowerPC instruction to send data to a co-processor. On Book-S > processors the LPAR_ID and process ID (PID) of the owning process are > registered in the window context of the co-processor at initia

Linux MCC driver in SS7 mode for MPC8270

2011-03-28 Thread 张洪建
Hi All, I am trying to develop Linux MCC driver in SS7 mode for MPC8270. In the driver,I want to config MCC as SS7 controller,and execute SS7 ROM microcode in the CPM. I have taken the 8260 MCC driver in HDLC mode published in the sourceforge.net as reference and trying to d