Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Alexey Kardashevskiy
On 13/12/12 13:29, Benjamin Herrenschmidt wrote: On Wed, 2012-12-12 at 07:34 -0700, Alex Williamson wrote: But what would I put there?... IOMMU ID is more than enough at the moment and struct iommu_table does not have anything what would have made sense to show in the sysfs... I believe David

[PATCH] powerpc: added DSCR support to ptrace

2012-12-12 Thread Alexey Kardashevskiy
The DSCR (aka Data Stream Control Register) is supported on some server PowerPC chips and allow some control over the prefetch of data streams. The kernel already supports DSCR value per thread but there is also a need in a ability to change it from an external process for the specific pid. The p

RE: [PATCH] Revert "crypto: caam - Updated SEC-4.0 device tree binding for ERA information."

2012-12-12 Thread Garg Vakul-B16394
Hello Kumar This has been applied to: git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git. Regards Vakul > -Original Message- > From: Kumar Gala [mailto:ga...@kernel.crashing.org] > Sent: Thursday, December 13, 2012 3:00 AM > To: Garg Vakul-B16394 > Cc: linux-cry..

[PATCH] powerpc: added DSCR support to ptrace

2012-12-12 Thread Alexey Kardashevskiy
The DSCR (aka Data Stream Control Register) is supported on some server PowerPC chips and allow some control over the prefetch of data streams. The kernel already supports DSCR value per thread but there is also a need in a ability to change it from an external process for the specific pid. The p

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Alex Williamson
On Thu, 2012-12-13 at 13:57 +1100, Benjamin Herrenschmidt wrote: > On Wed, 2012-12-12 at 16:30 -0700, Alex Williamson wrote: > > Locked page accounting in this version is very, very broken. How do > > powerpc folks feel about seemingly generic kernel iommu interfaces > > messing with the current t

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Benjamin Herrenschmidt
On Wed, 2012-12-12 at 16:30 -0700, Alex Williamson wrote: > Locked page accounting in this version is very, very broken. How do > powerpc folks feel about seemingly generic kernel iommu interfaces > messing with the current task mm? Besides that, more problems > below... After a second look & th

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Benjamin Herrenschmidt
On Wed, 2012-12-12 at 16:30 -0700, Alex Williamson wrote: > Locked page accounting in this version is very, very broken. How do > powerpc folks feel about seemingly generic kernel iommu interfaces > messing with the current task mm? Besides that, more problems below... Not good at all :-) I do

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Benjamin Herrenschmidt
On Wed, 2012-12-12 at 07:34 -0700, Alex Williamson wrote: > > But what would I put there?... IOMMU ID is more than enough at the moment > > and struct iommu_table does not have anything what would have made sense to > > show in the sysfs... > > I believe David mentioned that PEs had user visible

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Alexey Kardashevskiy
On 13/12/12 10:30, Alex Williamson wrote: On Wed, 2012-12-12 at 23:34 +1100, Alexey Kardashevskiy wrote: This patch initializes IOMMU groups based on the IOMMU configuration discovered during the PCI scan on POWERNV (POWER non virtualized) platform. The IOMMU groups are to be used later by VFIO

Re: [PATCH v3] powerpc: fix wii_memory_fixups() compile error on 3.0.y tree

2012-12-12 Thread Ben Hutchings
On Wed, 2012-12-12 at 16:27 -0700, Shuah Khan wrote: > Fix wii_memory_fixups() the following compile error on 3.0.y tree with > wii_defconfig on 3.0.y tree. > > CC arch/powerpc/platforms/embedded6xx/wii.o > arch/powerpc/platforms/embedded6xx/wii.c: In function ‘wii_memory_fixups’: > arch/po

[PATCH] powerpc: Avoid load of static chain register when calling nested functions through a pointer on 64bit

2012-12-12 Thread Anton Blanchard
The ppc64 ABI has a static chain register (r11) which is only used when calling nested functions through a pointer. Considering that we take a dim view of nested functions in the kernel, we have a lot of unnecessary overhead here. gcc 4.7 has an option to disable loading of r11 so lets use it. I

[PATCH 3/3] powerpc: Enable devtmpfs, EFI partition support and tmpfs ACLs on pseries, ppc64 and ppc64e defconfig

2012-12-12 Thread Anton Blanchard
We need devtmpfs enabled to boot on recent versions of Fedora. EFI partitions will be useful for large block devices. tmpfs ACL support is used by some distros for managing access to devices. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/configs/pseries_defconfig ===

[PATCH 2/3] powerpc: Cleanup NLS config options on pseries, ppc64 and ppc64e defconfig

2012-12-12 Thread Anton Blanchard
Set CONFIG_NLS_DEFAULT to utf8. The distros do this (eg ppc64 FC17 and RHEL6) as well as the x86 defconfigs. Userspace these days is most likely to expect utf8 anyway. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/configs/ppc64_defconfig =

[PATCH 1/3] powerpc: Run savedefconfig over pseries, ppc64 and ppc64e defconfig

2012-12-12 Thread Anton Blanchard
No changes, just update the configs with savedefconfig. Signed-off-by: Anton Blanchard --- Index: b/arch/powerpc/configs/ppc64_defconfig === --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig @@

[PATCH] powerpc+of: Rename and fix OF reconfig notifier error inject module

2012-12-12 Thread Benjamin Herrenschmidt
This module used to inject errors in the pSeries specific dynamic reconfiguration notifiers. Those are gone however, replaced by generic notifiers for changes to the device-tree. So let's update the module to deal with these instead and rename it along the way. Signed-off-by: Benjamin Herrenschmid

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Alex Williamson
On Wed, 2012-12-12 at 23:34 +1100, Alexey Kardashevskiy wrote: > This patch initializes IOMMU groups based on the IOMMU > configuration discovered during the PCI scan on POWERNV > (POWER non virtualized) platform. The IOMMU groups are > to be used later by VFIO driver (PCI pass through). > > It al

[PATCH v3] powerpc: fix wii_memory_fixups() compile error on 3.0.y tree

2012-12-12 Thread Shuah Khan
Fix wii_memory_fixups() the following compile error on 3.0.y tree with wii_defconfig on 3.0.y tree. CC arch/powerpc/platforms/embedded6xx/wii.o arch/powerpc/platforms/embedded6xx/wii.c: In function ‘wii_memory_fixups’: arch/powerpc/platforms/embedded6xx/wii.c:88:2: error: format ‘%llx’ expe

Re: [PATCH] Revert "crypto: caam - Updated SEC-4.0 device tree binding for ERA information."

2012-12-12 Thread Kumar Gala
On Dec 7, 2012, at 2:57 AM, Vakul Garg wrote: > This reverts commit a2c0911c09190125f52c9941b9d187f601c2f7be. > > Signed-off-by: Vakul Garg > --- > Instead of adding SEC era information in crypto node's compatible, a new > property 'fsl,sec-era' is being introduced into crypto node. > > .../de

Re: pci and pcie device-tree binding - range No cells

2012-12-12 Thread Andrew Murray
On Wed, Dec 12, 2012 at 01:34:24PM +, Thierry Reding wrote: > On Wed, Dec 12, 2012 at 12:19:12PM +, Andrew Murray wrote: > > I've been working on a relatively architecture agnostic PCI host bridge > > driver > > and also wanted to avoid duplicating more generic DT parsing code for PCI > >

[PATCH] pci: Provide support for parsing PCI DT ranges property

2012-12-12 Thread Andrew Murray
DT bindings for PCI host bridges often use the ranges property to describe memory and IO ranges - this binding tends to be the same across architectures yet several parsing implementations exist, e.g. arch/mips/pci/pci.c, arch/powerpc/kernel/pci-common.c, arch/sparc/kernel/pci.c and arch/microblaze

Re: pci and pcie device-tree binding - range No cells

2012-12-12 Thread Thierry Reding
On Wed, Dec 12, 2012 at 12:19:12PM +, Andrew Murray wrote: > On Wed, Dec 12, 2012 at 10:49 AM, Grant Likely wrote: > > On Wed, Dec 12, 2012 at 10:37 AM, Michal Simek > > mailto:mon...@monstr.eu>> wrote: > > > On 12/10/2012 10:41 PM, Grant Likely wrote: > > >> drivers/pci/pci-of.c would be good

Re: pci and pcie device-tree binding - range No cells

2012-12-12 Thread Andrew Murray
On Wed, Dec 12, 2012 at 10:49 AM, Grant Likely wrote: > On Wed, Dec 12, 2012 at 10:37 AM, Michal Simek > mailto:mon...@monstr.eu>> wrote: > > On 12/10/2012 10:41 PM, Grant Likely wrote: > >> drivers/pci/pci-of.c would be good. I'd also accept drivers/of/pci.c > >> which might actually be a good id

[TRIVIAL PATCH 11/26] powerpc: Convert print_symbol to %pSR

2012-12-12 Thread Joe Perches
Use the new vsprintf extension to avoid any possible message interleaving. Convert the #ifdef DEBUG block to a single pr_debug. Signed-off-by: Joe Perches --- arch/powerpc/platforms/cell/spu_callbacks.c | 12 +--- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/pow

[TRIVIAL PATCH 00/26] treewide: Add and use vsprintf extension %pSR

2012-12-12 Thread Joe Perches
Remove the somewhat awkward uses of print_symbol and convert all the existing uses to a new vsprintf pointer type of %pSR. print_symbol can be interleaved when it is used in a sequence like: printk("something: ..."); print_symbol("%s", addr); printk("\n"); Instead use:

Re: pci and pcie device-tree binding - range No cells

2012-12-12 Thread Rob Herring
On 12/12/2012 10:16 AM, Thomas Petazzoni wrote: > Dear Rob Herring, > > On Mon, 10 Dec 2012 17:24:44 -0600, Rob Herring wrote: > >>> Marvell SoCs have up to 20 configurable address windows, which allow >>> you, at run time, to say "I would like the range from physical >>> address 0x to 0x

Re: pci and pcie device-tree binding - range No cells

2012-12-12 Thread Grant Likely
On Wed, Dec 12, 2012 at 4:16 PM, Thomas Petazzoni wrote: > Dear Rob Herring, > > On Mon, 10 Dec 2012 17:24:44 -0600, Rob Herring wrote: > >> > Marvell SoCs have up to 20 configurable address windows, which allow >> > you, at run time, to say "I would like the range from physical >> > address 0xYYY

Re: pci and pcie device-tree binding - range No cells

2012-12-12 Thread Michal Simek
On 12/12/2012 11:49 AM, Grant Likely wrote: On Wed, Dec 12, 2012 at 10:37 AM, Michal Simek wrote: On 12/10/2012 10:41 PM, Grant Likely wrote: drivers/pci/pci-of.c would be good. I'd also accept drivers/of/pci.c which might actually be a good idea in the short term so that it gets appropriate s

Re: pci and pcie device-tree binding - range No cells

2012-12-12 Thread Thomas Petazzoni
Dear Rob Herring, On Mon, 10 Dec 2012 17:24:44 -0600, Rob Herring wrote: > > Marvell SoCs have up to 20 configurable address windows, which allow > > you, at run time, to say "I would like the range from physical > > address 0x to 0x to correspond to the PCIe device > > in port 1,

Re: [PATCH] vfio powerpc: implemented IOMMU driver for VFIO

2012-12-12 Thread Alex Williamson
On Wed, 2012-12-12 at 17:59 +1100, Alexey Kardashevskiy wrote: > On 08/12/12 04:01, Alex Williamson wrote: > >> + case VFIO_IOMMU_MAP_DMA: { > >> + vfio_iommu_spapr_tce_dma_map param; > >> + struct iommu_table *tbl = container->tbl; > >> + enum dma_data_direction directi

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Alex Williamson
On Wed, 2012-12-12 at 17:14 +1100, Alexey Kardashevskiy wrote: > On 08/12/12 04:38, Alex Williamson wrote: > >> +static int __init tce_iommu_init(void) > >> +{ > >> + struct pci_dev *pdev = NULL; > >> + struct iommu_table *tbl; > >> + struct iommu_group *grp; > >> + > >> + /* Allocate and initi

Re: [PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Alexey Kardashevskiy
Hi Alex, I posted other pair of patches. While debugging and testing my stuff I implemented some rough hack to support IOMMU mappings without passing those hypercalls to the QEMU, this is why I moved pieces of code around - want to support both QEMU-VFIO and kernel optimized H_PUT_TCE handler.

[PATCH] vfio powerpc: implemented IOMMU driver for VFIO

2012-12-12 Thread Alexey Kardashevskiy
VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent part includes IOMMU initialization and handling. This patch implements an IOMMU driver for VFIO which does map

[PATCH] vfio powerpc: enabled on powernv platform

2012-12-12 Thread Alexey Kardashevskiy
This patch initializes IOMMU groups based on the IOMMU configuration discovered during the PCI scan on POWERNV (POWER non virtualized) platform. The IOMMU groups are to be used later by VFIO driver (PCI pass through). It also implements an API for mapping/unmapping pages for guest PCI drivers and

Re: pci and pcie device-tree binding - range No cells

2012-12-12 Thread Grant Likely
On Wed, Dec 12, 2012 at 10:37 AM, Michal Simek wrote: > On 12/10/2012 10:41 PM, Grant Likely wrote: >> drivers/pci/pci-of.c would be good. I'd also accept drivers/of/pci.c >> which might actually be a good idea in the short term so that it gets >> appropriate supervision while being generalized be

Re: pci and pcie device-tree binding - range No cells

2012-12-12 Thread Michal Simek
On 12/10/2012 10:41 PM, Grant Likely wrote: On Mon, 10 Dec 2012 09:21:51 -0600, Rob Herring wrote: On 12/10/2012 09:05 AM, Michal Simek wrote: On 12/10/2012 03:26 PM, Rob Herring wrote: On 12/10/2012 06:20 AM, Michal Simek wrote: Hi Grant and others, I have a question regarding number of ce