Re: [PATCH v3 02/24] vfio: powerpc/iommu: Check that TCE page size is equal to it_page_size

2015-02-02 Thread Alex Williamson
On Thu, 2015-01-29 at 20:21 +1100, Alexey Kardashevskiy wrote: This checks that the TCE table page size is not bigger that the size of a page we just pinned and going to put its physical address to the table. Otherwise the hardware gets unwanted access to physical memory between the end of

Re: [PATCH] powerpc/mm: Add trace point for tracking hash pte fault

2015-02-02 Thread Anton Blanchard
Hi Aneesh, yes. We do use jump label. I also verified that looking at .s #APP # 23 ./arch/powerpc/include/asm/jump_label.h 1 1: nop .pushsection __jump_table, aw .llong 1b, .L201, __tracepoint_hash_fault+8 #, .popsection # 0 2 So we

Re: [PATCH 01/15] PCI: introduce pci_device_to_OF_node() for !CONFIG_OF

2015-02-02 Thread Kevin Hao
On Mon, Feb 02, 2015 at 09:47:57AM -0600, Bjorn Helgaas wrote: I think it makes more sense to merge this along with the other 14 patches that remove the #ifdefs (at least, I assume that's what they do; I haven't seen them). Acked-by: Bjorn Helgaas bhelg...@google.com But please edit the

Re: [PATCH v3 14/24] vfio: powerpc/spapr: Register memory

2015-02-02 Thread Alex Williamson
On Thu, 2015-01-29 at 20:21 +1100, Alexey Kardashevskiy wrote: The existing implementation accounts the whole DMA window in the locked_vm counter which is going to be even worse with multiple containers and huge DMA windows. This introduces 2 ioctls to register/unregister DMA memory which

Re: [PATCH v3 05/24] vfio: powerpc/spapr: Move locked_vm accounting to helpers

2015-02-02 Thread Alex Williamson
On Thu, 2015-01-29 at 20:21 +1100, Alexey Kardashevskiy wrote: There moves locked pages accounting to helpers. Later they will be reused for Dynamic DMA windows (DDW). While we are here, update the comment explaining why RLIMIT_MEMLOCK might be required to be bigger than the guest RAM. This

[PATCH v2 01/15] PCI: Add pci_device_to_OF_node() stub for !CONFIG_OF

2015-02-02 Thread Kevin Hao
Add a stub for pci_device_to_OF_node() so drivers don't need to use #ifdef CONFIG_OF around calls to it. Signed-off-by: Kevin Hao haoke...@gmail.com Acked-by: Bjorn Helgaas bhelg...@google.com --- Hi Bjorn, Here is the revised version with the update of the subject and commit log in case that

Re: [PATCH v3 08/24] powerpc/spapr: vfio: Switch from iommu_table to new powerpc_iommu

2015-02-02 Thread Alex Williamson
On Thu, 2015-01-29 at 20:21 +1100, Alexey Kardashevskiy wrote: Modern IBM POWERPC systems support multiple (currently two) TCE tables per IOMMU group (a.k.a. PE). This adds a powerpc_iommu container for TCE tables. Right now just one table is supported. Signed-off-by: Alexey Kardashevskiy

Re: [PATCH 01/15] PCI: introduce pci_device_to_OF_node() for !CONFIG_OF

2015-02-02 Thread Michael Ellerman
On Mon, 2015-02-02 at 09:47 -0600, Bjorn Helgaas wrote: On Sun, Feb 1, 2015 at 8:28 PM, Michael Ellerman m...@ellerman.id.au wrote: On Sat, 2015-01-31 at 21:47 +0800, Kevin Hao wrote: So we can avoid the ugly #ifdef in some drivers. Signed-off-by: Kevin Hao haoke...@gmail.com ---

Re: [1/3] powerpc/pmac: Fix DT refcount imbalance in pmac_pic_probe_oldstyle

2015-02-02 Thread Michael Ellerman
On Fri, 2015-01-30 at 10:00 +0100, Geert Uytterhoeven wrote: Hi Michael, On Fri, Jan 30, 2015 at 5:09 AM, Michael Ellerman m...@ellerman.id.au wrote: On Wed, 2015-14-01 at 13:51:57 UTC, Geert Uytterhoeven wrote: of_find_node_by_name() calls of_node_put() on its from parameter, which must

Re: [PATCH V11 14/17] powerpc/powernv: Shift VF resource with an offset

2015-02-02 Thread Wei Yang
On Fri, Jan 30, 2015 at 05:08:03PM -0600, Bjorn Helgaas wrote: On Thu, Jan 15, 2015 at 10:28:04AM +0800, Wei Yang wrote: On PowrNV platform, resource position in M64 implies the PE# the resource belongs to. In some particular case, adjustment of a resource is necessary to locate it to a correct

Re: [PATCH] powerpc/mm: Add trace point for tracking hash pte fault

2015-02-02 Thread Anton Blanchard
Hi, ebizzy with -S 30 -t 1 -P gave 13627 records/s - Without patch 13546 records/s - With patch with tracepoint disabled OK. So that's about -0.6%. Are we happy with that? I'm not sure. Can you do a few more runs and see if that's a stable result. Surprisingly large. Is

Re: [PATCH 05/15] fbdev: imsttfb: remove the dependency on PPC_OF

2015-02-02 Thread Kevin Hao
On Sun, Feb 01, 2015 at 01:51:50PM +0800, Kevin Hao wrote: diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c index aae10ce74f14..91a80bb8f988 100644 --- a/drivers/video/fbdev/imsttfb.c +++ b/drivers/video/fbdev/imsttfb.c @@ -1470,7 +1470,6 @@ static int

[PATCH 4/5] powerpc: Cleanup KVM emulated load/store endian handling

2015-02-02 Thread David Gibson
Sometimes the KVM code on powerpc needs to emulate load or store instructions from the guest, which can include both normal and byte reversed forms. We currently (AFAICT) handle this correctly, but some variable names are very misleading. In particular we use is_bigendian in several places to

[PATCH 5/5] powerpc: Remove unused st_le*() and ld_le* functions

2015-02-02 Thread David Gibson
The powerpc specific st_le*() and ld_le*() functions in arch/powerpc/asm/swab.h no longer have any users. They are also misleadingly named, since they always byteswap, even on a little-endian host. This patch removes them. Signed-off-by: David Gibson da...@gibson.dropbear.id.au ---

Re: [PATCH v3 14/24] vfio: powerpc/spapr: Register memory

2015-02-02 Thread Alexey Kardashevskiy
On 02/03/2015 11:11 AM, Alex Williamson wrote: On Thu, 2015-01-29 at 20:21 +1100, Alexey Kardashevskiy wrote: The existing implementation accounts the whole DMA window in the locked_vm counter which is going to be even worse with multiple containers and huge DMA windows. This introduces 2

[PATCH 2/5] powerpc: Remove powerpc specific byteswap from bt8xx DVB driver

2015-02-02 Thread David Gibson
The bt8xx PCI DVB driver includes a powerpc specific hack, using one of the powerpc specific byteswapping functions in an IO helper macro. There's no reason to use the powerpc specific function instead of a generic byteswap, so this patch removes it. I'm not sure if the powerpc specific memory

[PATCH 3/5] powerpc: Remove arch specific byteswappers from the MXC MMC driver

2015-02-02 Thread David Gibson
When the MXC MMUC driver is used on a Freescale MPC512x machine, it contains some additional byteswapping code (I'm assuming this is a workaround for a hardware defect). This uses the ppc specific st_le32() function, but there's no reason not to use the generic swab32() function instead. gcc is

Re: [PATCH v2 0/4] VPHN parsing fixes

2015-02-02 Thread Michael Ellerman
On Thu, 2015-01-29 at 19:03 +0100, Greg Kurz wrote: On Wed, 17 Dec 2014 10:40:46 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: Hi, This series addresses remarks from Ben and Michael (see individual patches). The most notable changes are: - the parsing code being pull out into a

Re: [PATCH] powerpc/mm: Add trace point for tracking hash pte fault

2015-02-02 Thread Aneesh Kumar K.V
Anton Blanchard an...@samba.org writes: Hi Aneesh, yes. We do use jump label. I also verified that looking at .s #APP # 23 ./arch/powerpc/include/asm/jump_label.h 1 1: nop .pushsection __jump_table, aw .llong 1b, .L201, __tracepoint_hash_fault+8

Re: nvram and generic_nvram modules are problematic, was Re: [PATCH] arch: m68k: mac: misc.c: Remove some unused functions

2015-02-02 Thread Finn Thain
On Sun, 1 Feb 2015, Geert Uytterhoeven wrote: On Sun, Feb 1, 2015 at 4:39 AM, Finn Thain wrote: On Sun, 4 Jan 2015, Geert Uytterhoeven wrote: On Sun, Jan 4, 2015 at 8:21 AM, Finn Thain wrote: On Thu, 1 Jan 2015, Rickard Strandqvist wrote: Removes some functions that are not used

[PATCH] arch/cpuidle-powernv: Avoid endianness conversions while parsing DT

2015-02-02 Thread Preeti U Murthy
We currently read the information about idle states from the DT so as to find out the cpu idle states supported by the platform. Use those APIs to read from the DT that can avoid endianness conversions of the property values. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com ---

Re: [PATCH v3 24/24] vfio: powerpc/spapr: Support Dynamic DMA windows

2015-02-02 Thread Alex Williamson
On Thu, 2015-01-29 at 20:22 +1100, Alexey Kardashevskiy wrote: This adds create/remove window ioctls to create and remove DMA windows. This changes VFIO_IOMMU_SPAPR_TCE_GET_INFO handler to return additional information such as a number of supported windows and maximum number levels of TCE

[PATCH 1/5] powerpc: Move Power Macintosh drivers to generic byteswappers

2015-02-02 Thread David Gibson
ppc has special instruction forms to efficiently load and store values in non-native endianness. These can be accessed via the arch-specific {ld,st}_le{16,32}() inlines in arch/powerpc/include/asm/swab.h. However, gcc is perfectly capable of generating the byte-reversing load/store instructions

[PATCH 0/5] powerpc: Get rid of redundant arch specific swab functions

2015-02-02 Thread David Gibson
arch/powerpc/include/asm/swab.h includes some powerpc specific byteswapping functions, which are implemented in terms of powerpc's built in byte reversed load/store instructions. There are two problems with this: 1) They're not necessary - gcc is perfectly capable of generating the

Re: nvram and generic_nvram modules are problematic, was Re: [PATCH] arch: m68k: mac: misc.c: Remove some unused functions

2015-02-02 Thread Finn Thain
On Sun, 1 Feb 2015, Russell King - ARM Linux wrote: On Sun, Feb 01, 2015 at 02:39:42PM +1100, Finn Thain wrote: I find the ARM support in drivers/char/nvram to be surprising, not to say questionable. The /proc/driver/nvram implementation, given defined(__arm__), decodes the NVRAM

[PATCH V4] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-02-02 Thread Preeti U Murthy
The device tree now exposes the residency values for different idle states. Read these values instead of calculating residency from the latency values. The values exposed in the DT are validated for optimal power efficiency. However to maintain compatibility with the older firmware code which

Re: [PATCH 01/15] PCI: introduce pci_device_to_OF_node() for !CONFIG_OF

2015-02-02 Thread Bjorn Helgaas
On Sun, Feb 1, 2015 at 8:28 PM, Michael Ellerman m...@ellerman.id.au wrote: On Sat, 2015-01-31 at 21:47 +0800, Kevin Hao wrote: So we can avoid the ugly #ifdef in some drivers. Signed-off-by: Kevin Hao haoke...@gmail.com --- include/linux/pci.h | 2 ++ 1 file changed, 2 insertions(+) Hi

Re: [PATCH v2 0/4] VPHN parsing fixes

2015-02-02 Thread Greg Kurz
On Tue, 03 Feb 2015 13:47:35 +1100 Michael Ellerman m...@ellerman.id.au wrote: On Thu, 2015-01-29 at 19:03 +0100, Greg Kurz wrote: On Wed, 17 Dec 2014 10:40:46 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: Hi, This series addresses remarks from Ben and Michael (see individual

[PATCH] powerpc/powernv: make sure the IOV BAR will not exceed limit after shifting

2015-02-02 Thread Wei Yang
The actual IOV BAR range is determined by the start address and the actual size for vf_num VFs BAR. After shifting the IOV BAR, there would be a chance the actual end address exceed the limit and overlap with other devices. This patch adds a check to make sure after shifting, the range will not

Re: [PATCH] powerpc/mm: Add trace point for tracking hash pte fault

2015-02-02 Thread Aneesh Kumar K.V
Anton Blanchard an...@samba.org writes: Hi, ebizzy with -S 30 -t 1 -P gave 13627 records/s - Without patch 13546 records/s - With patch with tracepoint disabled OK. So that's about -0.6%. Are we happy with that? I'm not sure. Can you do a few more runs and see if that's a stable

Re: [PATCH] powerpc/mm: Add trace point for tracking hash pte fault

2015-02-02 Thread Aneesh Kumar K.V
Michael Ellerman m...@ellerman.id.au writes: On Wed, 2015-01-21 at 14:15 +0530, Aneesh Kumar K.V wrote: Michael Ellerman m...@ellerman.id.au writes: On Tue, 2015-01-20 at 17:05 +0530, Aneesh Kumar K.V wrote: This enables us to understand how many hash fault we are taking when running

[PATCH] net: fs_enet: Implement NETIF_F_SG feature

2015-02-02 Thread Christophe Leroy
Freescale ethernet controllers have the capability to re-assemble fragmented data into a single ethernet frame. This patch uses this capability and implements NETIP_F_SG feature into the fs_enet ethernet driver. On a MPC885, I get 53% performance improvement on a ftp transfer of a 15Mb file: *

Re: [PATCH 05/15] fbdev: imsttfb: remove the dependency on PPC_OF

2015-02-02 Thread Stephen Rothwell
Hi Kevin, On Sun, 1 Feb 2015 13:51:50 +0800 Kevin Hao haoke...@gmail.com wrote: That was my first thought, but the codes protected by the PPC_OF seem not ppc specific and should be safe for other archs which also support OF. So I drop the PPC_OF completely. Did I miss something? Ah, ok.

Re: [PATCH 05/15] fbdev: imsttfb: remove the dependency on PPC_OF

2015-02-02 Thread Stephen Rothwell
Hi Kevin, On Tue, 3 Feb 2015 10:20:02 +0800 Kevin Hao haoke...@gmail.com wrote: I took a second look at this. It seems that there is a declaration of struct device_node in linux/device.h and there is also no access to the member of device_node in this driver. So we are safe to not include

[PATCH] driver/cpuidle-powernv: Avoid endianness conversions while parsing DT

2015-02-02 Thread Preeti U Murthy
We currently read the information about idle states from the DT so as to populate the cpuidle table. Use those APIs to read from the DT that can avoid endianness conversions of the property values in the cpuidle driver. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- This patch is

Re: [PATCH V3] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-02-02 Thread Preeti U Murthy
On 02/02/2015 12:09 PM, Michael Ellerman wrote: On Mon, 2015-02-02 at 10:40 +0530, Preeti U Murthy wrote: The device tree now exposes the residency values for different idle states. Read these values instead of calculating residency from the latency values. The values exposed in the DT are