RE: [PATCH] powerpc/config: Disable the 4KiB erase granularity of SPI flash

2016-04-06 Thread Zhiqiang Hou
Hi Scott, Thanks for your comments. > -Original Message- > From: Scott Wood [mailto:o...@buserror.net] > Sent: 2016年4月7日 6:01 > To: Zhiqiang Hou ; linuxppc-dev@lists.ozlabs.org; > b...@kernel.crashing.org; pau...@samba.org; m...@ellerman.id.au > Cc: Mingkai Hu

[PATCH 03/10] mm/hugetlb: Protect follow_huge_(pud|pgd) functions from race

2016-04-06 Thread Anshuman Khandual
follow_huge_(pmd|pud|pgd) functions are used to walk the page table and fetch the page struct during 'follow_page_mask' call. There are possible race conditions faced by these functions which arise out of simultaneous calls of move_pages() and freeing of huge pages. This was fixed partly by the

[PATCH 07/10] powerpc/hugetlb: Prepare arch functions for ARCH_WANT_GENERAL_HUGETLB

2016-04-06 Thread Anshuman Khandual
Arch override function 'follow_huge_addr' is called from 'follow_page_mask' looking out for the associated page struct. Right now, it does not support the FOLL_GET option. With ARCH_WANTS_GENERAL_HUGETLB, we will need function 'follow_page_mask' to use generic 'follow_huge_*' functions instead of

[PATCH 10/10] selfttest/powerpc: Add memory page migration tests

2016-04-06 Thread Anshuman Khandual
This adds two tests for memory page migration. One for normal page migration which works for both 4K or 64K base page size kernel and the other one is for huge page migration which works only on 64K base page sized 16MB huge page implemention at the PMD level. Signed-off-by: Anshuman Khandual

[PATCH 05/10] powerpc/hugetlb: Split the function 'huge_pte_alloc'

2016-04-06 Thread Anshuman Khandual
Currently the function 'huge_pte_alloc' has got two versions, one for the BOOK3S server and the other one for the BOOK3E embedded platforms. This change splits only the BOOK3S server version into two parts, one for the ARCH_WANT_GENERAL_HUGETLB config implementation and the other one for

[PATCH 08/10] powerpc/hugetlb: Selectively enable ARCH_WANT_GENERAL_HUGETLB

2016-04-06 Thread Anshuman Khandual
This enables ARCH_WANT_GENERAL_HUGETLB config option only for BOOK3S platforms with 64K page size implementation. Existing arch specific functions for ARCH_WANT_GENERAL_HUGETLB config like 'huge_pte_alloc' and 'huge_pte_offset' are no longer required and are removed with this change.

[PATCH 09/10] powerpc/hugetlb: Selectively enable ARCH_ENABLE_HUGEPAGE_MIGRATION

2016-04-06 Thread Anshuman Khandual
This change enables the config option ARCH_ENABLE_HUGEPAGE_MIGRATION depending on whether the platform has got ARCH_WANT_GENERAL_HUGETLB or not along with config option MIGRATION. In turn, it turns on the 'hugepage_migration_supported' function which is checked for feature presence during HugeTLB

[PATCH 06/10] powerpc/hugetlb: Split the function 'huge_pte_offset'

2016-04-06 Thread Anshuman Khandual
Currently the function 'huge_pte_offset' has just got one version for all possible configurations and platforms. This change splits that function into two versions, first one for ARCH_WANT_GENERAL_HUGETLB implementation and the other one for everything else. This change is again one of the

[PATCH 04/10] powerpc/hugetlb: Add ABI defines for MAP_HUGE_16MB and MAP_HUGE_16GB

2016-04-06 Thread Anshuman Khandual
This just adds user space exported ABI definitions for both 16MB and 16GB non default huge page sizes to be used with mmap() system call. Signed-off-by: Anshuman Khandual --- arch/powerpc/include/uapi/asm/mman.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 01/10] mm/mmap: Replace SHM_HUGE_MASK with MAP_HUGE_MASK inside mmap_pgoff

2016-04-06 Thread Anshuman Khandual
The commit 091d0d55b286 ("shm: fix null pointer deref when userspace specifies invalid hugepage size") had replaced MAP_HUGE_MASK with SHM_HUGE_MASK. Though both of them contain the same numeric value of 0x3f, MAP_HUGE_MASK flag sounds more appropriate than the other one in the context. Hence

[PATCH 02/10] mm/hugetlb: Add PGD based implementation awareness

2016-04-06 Thread Anshuman Khandual
Currently the config ARCH_WANT_GENERAL_HUGETLB enabled functions like 'huge_pte_alloc' and 'huge_pte_offset' dont take into account HugeTLB page implementation at the PGD level. This is also true for functions like 'follow_page_mask' which is called from move_pages() system call. This lack of PGD

[PATCH 00/10] Enable HugeTLB page migration on POWER

2016-04-06 Thread Anshuman Khandual
This patch series enables HugeTLB page migration on POWER platform. This series has some core VM changes (patch 1, 2, 3) and some powerpc specific changes (patch 4, 5, 6, 7, 8, 9, 10). Comments, suggestions and inputs are welcome. Anshuman Khandual (10): mm/mmap: Replace SHM_HUGE_MASK with

Re: [PATCH 1/2] perf/powerpc: Fix kprobe and kretprobe handling with kallsyms

2016-04-06 Thread Ananth N Mavinakayanahalli
On Wed, Apr 06, 2016 at 06:02:57PM +0530, Naveen N. Rao wrote: > + if (!pev->uprobes && map->dso->symtab_type == DSO_BINARY_TYPE__KALLSYMS) > tev->point.offset += PPC64LE_LEP_OFFSET; uprobes check against kallsysms? Am I missing something here? Ananth

Re: [PATCH v4] powerpc/pci: Assign fixed PHB number based on device-tree properties

2016-04-06 Thread Ian Munsie
Excerpts from Guilherme G. Piccoli's message of 2016-04-06 16:51:43 -0500: > And in the case a virtual PHB grabs the bitmap before, we just need to > add Michael's suggested check and fallback to bitmap PHB numbering in > this case. > > Do you think this is enough to avoid issues with cxl'a

Re: [PATCH 2/2 v2] powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism

2016-04-06 Thread Guilherme G. Piccoli
On 04/06/2016 09:48 PM, Gavin Shan wrote: On Wed, Apr 06, 2016 at 09:20:05PM -0300, Guilherme G. Piccoli wrote: Fixes: 39baadbf36ce ("powerpc/eeh: Remove eeh information from pci_dn") Signed-off-by: Guilherme G. Piccoli Reviewed-by: Gavin Shan

Re: [PATCH 2/2 v2] powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism

2016-04-06 Thread Gavin Shan
On Wed, Apr 06, 2016 at 09:20:05PM -0300, Guilherme G. Piccoli wrote: >Commit 39baadbf36ce ("powerpc/eeh: Remove eeh information from pci_dn") >changed the pci_dn struct by removing its EEH-related members. >As part of this clean-up, DDW mechanism was modified to read the device >configuration

Re: [PATCH 1/2 v2] Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell"

2016-04-06 Thread Gavin Shan
On Wed, Apr 06, 2016 at 09:20:04PM -0300, Guilherme G. Piccoli wrote: >This reverts commit 89a51df5ab1d38b257300b8ac940bbac3bb0eb9b. > >The function eeh_add_device_early() is used to perform EEH initialization in >devices added later on the system, like in hotplug/DLPAR scenarios. Since the

Re: [PATCH 2/2] powerpc/pseries: Check if EEH is enabled on DDW mechanism code

2016-04-06 Thread Guilherme G. Piccoli
On 02/04/2016 03:30 AM, Gavin Shan wrote: On Wed, Feb 03, 2016 at 10:26:36AM -0200, Guilherme G. Piccoli wrote: On 02/02/2016 09:48 PM, Gavin Shan wrote: Gavin, thanks very much for the clarification. So, we can interchange edev->config_addr with pdn->pci_ext_config_space ? This would solve

[PATCH 1/2 v2] Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell"

2016-04-06 Thread Guilherme G. Piccoli
This reverts commit 89a51df5ab1d38b257300b8ac940bbac3bb0eb9b. The function eeh_add_device_early() is used to perform EEH initialization in devices added later on the system, like in hotplug/DLPAR scenarios. Since the commit 89a51df5ab1d ("powerpc/eeh: Fix crash in eeh_add_device_early() on Cell")

[PATCH 2/2 v2] powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism

2016-04-06 Thread Guilherme G. Piccoli
Commit 39baadbf36ce ("powerpc/eeh: Remove eeh information from pci_dn") changed the pci_dn struct by removing its EEH-related members. As part of this clean-up, DDW mechanism was modified to read the device configuration address from eeh_dev struct. As a consequence, now if we disable EEH

Re: [PATCH v4] powerpc/pci: Assign fixed PHB number based on device-tree properties

2016-04-06 Thread Michael C Hollinger
Hey guys - our system test team opened a defect on this, since Ubuntu (as it stands) is broken now with CAPI Flash cards.   Dion opened bug https://bugzilla.linux.ibm.com/show_bug.cgi?id=140054 .   So - this is important. You need to tested to confirm that this is in-fact the root cause of Dion's

Re: [PATCH] powerpc/config: Disable the 4KiB erase granularity of SPI flash

2016-04-06 Thread Scott Wood
On Wed, 2016-04-06 at 18:14 +0800, Zhiqiang Hou wrote: > From: Hou Zhiqiang > > Disable the subsector (4KiB) erase granularity to speed up the erase > operation. > > Signed-off-by: Hou Zhiqiang > --- > arch/powerpc/configs/85xx-hw.config | 1 + > 1

Re: [PATCH v4] powerpc/pci: Assign fixed PHB number based on device-tree properties

2016-04-06 Thread Guilherme G. Piccoli
On 04/06/2016 04:38 PM, Ian Munsie wrote: +/* try fixed PHB numbering first, by checking archs and reading + * the respective device-tree property. */ +if (machine_is(pseries)) { +regs = of_get_property(dn, "reg", NULL); +if (regs) +return

Re: [PATCH] powerpc: define the fman node for the kmcoge4 DTS

2016-04-06 Thread Scott Wood
On Wed, 2016-04-06 at 15:37 +0200, Valentin Longchamp wrote: > Now that the FMAN mac driver has been merged the fman node is relevant. > > The kmcoge4 board implements 3 ethernet interfaces, 1 with a RGMII phy > and 2 with fixed 1 Giga SGMII links. > > Signed-off-by: Valentin Longchamp

RE: [PATCH][v3] mtd/ifc: Add support for IFC controller version 2.0

2016-04-06 Thread Yang-Leo Li
> -Original Message- > From: Brian Norris [mailto:computersforpe...@gmail.com] > Sent: Wednesday, April 06, 2016 12:53 PM > To: Li Yang > Cc: Scott Wood ; Raghav Dogra ; > linux-...@lists.infradead.org; linuxppc-dev

RE: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()

2016-04-06 Thread Zhao Lei
> -Original Message- > From: Srikar Dronamraju [mailto:sri...@linux.vnet.ibm.com] > Sent: Wednesday, April 06, 2016 9:27 PM > To: Anton Blanchard > Cc: Peter Zijlstra ; Ingo Molnar ; > t...@linutronix.de; efa...@gmx.de;

Re: [PATCH net 3/4] lib/test_bpf: Add test to check for result of 32-bit add that overflows

2016-04-06 Thread David Miller
From: "Naveen N. Rao" Date: Tue, 5 Apr 2016 15:32:55 +0530 > BPF_ALU32 and BPF_ALU64 tests for adding two 32-bit values that results in > 32-bit overflow. > > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > Cc: "David S.

Re: [PATCH v4] powerpc/pci: Assign fixed PHB number based on device-tree properties

2016-04-06 Thread Ian Munsie
Excerpts from Guilherme G. Piccoli's message of 2016-03-18 16:49:06 -0500: > +static int get_phb_number(struct device_node *dn) ... > +/* try fixed PHB numbering first, by checking archs and reading > + * the respective device-tree property. */ > +if (machine_is(pseries)) { > +

Re: [PATCH net 4/4] lib/test_bpf: Add additional BPF_ADD tests

2016-04-06 Thread David Miller
From: "Naveen N. Rao" Date: Tue, 5 Apr 2016 15:32:56 +0530 > Some of these tests proved useful with the powerpc eBPF JIT port due to > sign-extended 16-bit immediate loads. Though some of these aspects get > covered in other tests, it is better to have explicit

Re: [PATCH net 2/4] lib/test_bpf: Add tests for unsigned BPF_JGT

2016-04-06 Thread David Miller
From: "Naveen N. Rao" Date: Tue, 5 Apr 2016 15:32:54 +0530 > Unsigned Jump-if-Greater-Than. > > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > Cc: "David S. Miller" > Cc: Ananth N Mavinakayanahalli

Re: [PATCH net 1/4] lib/test_bpf: Fix JMP_JSET tests

2016-04-06 Thread David Miller
From: "Naveen N. Rao" Date: Tue, 5 Apr 2016 15:32:53 +0530 > JMP_JSET tests incorrectly used BPF_JNE. Fix the same. > > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > Cc: "David S. Miller" > Cc: Ananth

Re: [PATCHv2 net 3/3] samples/bpf: Enable powerpc support

2016-04-06 Thread David Miller
From: "Naveen N. Rao" Date: Mon, 4 Apr 2016 22:31:34 +0530 > Add the necessary definitions for building bpf samples on ppc. > > Since ppc doesn't store function return address on the stack, modify how > PT_REGS_RET() and PT_REGS_FP() work. > > Also, introduce

Re: [PATCHv2 net 2/3] samples/bpf: Use llc in PATH, rather than a hardcoded value

2016-04-06 Thread David Miller
From: "Naveen N. Rao" Date: Mon, 4 Apr 2016 22:31:33 +0530 > While at it, remove the generation of .s files and fix some typos in the > related comment. > > Cc: Alexei Starovoitov > Cc: David S. Miller > Cc: Daniel Borkmann

Re: [PATCHv2 net 1/3] samples/bpf: Fix build breakage with map_perf_test_user.c

2016-04-06 Thread David Miller
From: "Naveen N. Rao" Date: Mon, 4 Apr 2016 22:31:32 +0530 > Building BPF samples is failing with the below error: ... > Fix this by including the necessary header file. > > Cc: Alexei Starovoitov > Cc: Daniel Borkmann >

Re: [PATCH][v3] mtd/ifc: Add support for IFC controller version 2.0

2016-04-06 Thread Brian Norris
Hi, On Wed, Mar 30, 2016 at 03:43:40PM -0500, Li Yang wrote: > Hi Brian, > > Could you help to review and pull in this patch and the Kconfig update > after this patch(https://patchwork.ozlabs.org/patch/557389/)? It It's probably best for Boris to apply this now. > stated a dependency in the

[PATCH net-next] ibmvnic: Enable use of multiple tx/rx scrqs

2016-04-06 Thread John Allen
Enables the use of multiple transmit and receive scrqs allowing the ibmvnic driver to take advantage of multiqueue functionality. To achieve this, the driver must implement the process of negotiating the maximum number of queues allowed by the server. Initially, the driver will attempt to login

Re: [RFC v5 7/7] vfio-pci: Allow to mmap MSI-X table if interrupt remapping is supported

2016-04-06 Thread Alex Williamson
On Tue, 5 Apr 2016 21:46:44 +0800 Yongji Xie wrote: > This patch enables mmapping MSI-X tables if > hardware supports interrupt remapping which > can ensure that a given pci device can only > shoot the MSIs assigned for it. > > Signed-off-by: Yongji Xie

Re: [PATCH 2/2] tools/perf: Fix kallsyms perf test on ppc64le

2016-04-06 Thread Ananth N Mavinakayanahalli
On Wed, Apr 06, 2016 at 06:02:58PM +0530, Naveen N. Rao wrote: > ppc64le functions have a Global Entry Point (GEP) and a Local Entry > Point (LEP). While placing a probe, we always prefer the LEP since it > catches function calls through both the GEP and the LEP. In order to do > this, we fixup

[RFC PATCH 1/1] powerpc/fsl: Fix build of the dtb embedded kernel images

2016-04-06 Thread Alessio Igor Bogani
The commit dc37374 move a lot of device tree files into fsl directory fixing Makefile for cuImage target only. Unfortunately there are others target which require to embebbed device tree into the kernel image (i.e. dtbImage.%). So use a more generic approach. Signed-off-by: Alessio Igor Bogani

[PATCH] powerpc: define the fman node for the kmcoge4 DTS

2016-04-06 Thread Valentin Longchamp
Now that the FMAN mac driver has been merged the fman node is relevant. The kmcoge4 board implements 3 ethernet interfaces, 1 with a RGMII phy and 2 with fixed 1 Giga SGMII links. Signed-off-by: Valentin Longchamp --- arch/powerpc/boot/dts/fsl/kmcoge4.dts | 39

Re: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()

2016-04-06 Thread Srikar Dronamraju
* Anton Blanchard [2016-04-06 21:59:50]: > Looks good, and the patch below does fix the oops for me. > > Anton > -- > > task_pt_regs() can return NULL for kernel threads, so add a check. > This fixes an oops at boot on ppc64. > > Signed-off-by: Anton Blanchard

[PATCH 2/2] tools/perf: Fix kallsyms perf test on ppc64le

2016-04-06 Thread Naveen N. Rao
ppc64le functions have a Global Entry Point (GEP) and a Local Entry Point (LEP). While placing a probe, we always prefer the LEP since it catches function calls through both the GEP and the LEP. In order to do this, we fixup the function entry points during elf symbol table lookup to point to the

[PATCH 1/2] perf/powerpc: Fix kprobe and kretprobe handling with kallsyms

2016-04-06 Thread Naveen N. Rao
So far, we used to treat probe point offsets as being offset from the LEP. However, userspace applications (objdump/readelf) always show disassembly and offsets from the function GEP. This is confusing to the user as we will end up probing at an address different from what the user expects when

[PATCH 0/2] perf probe fixes for ppc64le

2016-04-06 Thread Naveen N. Rao
This patchset fixes three issues found with perf probe on ppc64le: 1. 'perf test kallsyms' failure on ppc64le (reported by Michael Ellerman). This was due to the symbols being fixed up during symbol table load. This is fixed in patch 2 by delaying symbol fixup until later. 2. perf probe function

[PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()

2016-04-06 Thread Anton Blanchard via Linuxppc-dev
Hi Peter, > Ah, so sometihng like: > > struct pt_regs *regs = task_pt_regs(); > int index = CPUACCT_USAGE_SYSTEM; > > if (regs && user_mode(regs)) > index = CPUACCT_USAGE_USER; > > should work, right? Looks good, and the patch below does fix the oops for me.

Re: [PATCH 1/1] powerpc/mm: Add memory barrier in __hugepte_alloc()

2016-04-06 Thread Michal Hocko
On Wed 06-04-16 15:39:17, Aneesh Kumar K.V wrote: > Michal Hocko writes: > > > [ text/plain ] > > On Tue 05-04-16 12:05:47, Sukadev Bhattiprolu wrote: > > [...] > >> diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c > >> index d991b9e..081f679 100644 >

[PATCH] powerpc/config: Disable the 4KiB erase granularity of SPI flash

2016-04-06 Thread Zhiqiang Hou
From: Hou Zhiqiang Disable the subsector (4KiB) erase granularity to speed up the erase operation. Signed-off-by: Hou Zhiqiang --- arch/powerpc/configs/85xx-hw.config | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH 1/1] powerpc/mm: Add memory barrier in __hugepte_alloc()

2016-04-06 Thread Aneesh Kumar K.V
Michal Hocko writes: > [ text/plain ] > On Tue 05-04-16 12:05:47, Sukadev Bhattiprolu wrote: > [...] >> diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c >> index d991b9e..081f679 100644 >> --- a/arch/powerpc/mm/hugetlbpage.c >> +++

[PATCH v2 07/30] Add powerpc-specific parity functions

2016-04-06 Thread zengzhaoxiu
From: Zhaoxiu Zeng Use runtime patching for ppc64, lifted from hweight_64 Signed-off-by: Zhaoxiu Zeng --- arch/powerpc/include/asm/bitops.h | 11 arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/parity_64.S | 107

Re: [PATCH 1/1] powerpc/mm: Add memory barrier in __hugepte_alloc()

2016-04-06 Thread Michal Hocko
On Tue 05-04-16 12:05:47, Sukadev Bhattiprolu wrote: [...] > diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c > index d991b9e..081f679 100644 > --- a/arch/powerpc/mm/hugetlbpage.c > +++ b/arch/powerpc/mm/hugetlbpage.c > @@ -81,6 +81,13 @@ static int __hugepte_alloc(struct

[RFC FIX PATCH v0] powerpc,numa: Fix memory_hotplug_max()

2016-04-06 Thread Bharata B Rao
memory_hotplug_max() uses hot_add_drconf_memory_max() to get maxmimum addressable memory by referring to ibm,dyanamic-memory property. There are three problems with the current approach: 1 hot_add_drconf_memory_max() assumes that ibm,dynamic-memory includes all the LMBs of the guest, but that

Re: [v7, 0/5] Fix eSDHC host version register bug

2016-04-06 Thread Ulf Hansson
>> >> I was about to queue this for next, when I noticed that checkpatch is >> complaining/warning lots about these patches. Can you please a round of >> checkpatch and fix what makes sense. >> >> Kind regards >> Uffe > > [Lu Yangbo-B47093] Sorry about this, Uffe... No worries! > Should I ignore

[RESEND][PATCH v2] powerpc: Export thread_struct.used_vr/used_vsr to user space

2016-04-06 Thread Simon Guo
These 2 fields track whether user process has used Altivec/VSX registers or not. They are used by kernel to setup signal frame on user stack correctly regarding vector part. CRIU(Checkpoint and Restore In User space) builds signal frame for restored process. It will need this export information

RE: [v7, 0/5] Fix eSDHC host version register bug

2016-04-06 Thread Yangbo Lu
> -Original Message- > From: Ulf Hansson [mailto:ulf.hans...@linaro.org] > Sent: Tuesday, April 05, 2016 7:28 PM > To: Yangbo Lu > Cc: devicet...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; > linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux- >

Re: [PATCH 14/65] powerpc/mm/power9: Add partition table format

2016-04-06 Thread Balbir Singh
On 27/03/16 19:23, Aneesh Kumar K.V wrote: > We also add mach dep call back for updating partition table entry. The changelog needs to be enhanced. > Signed-off-by: Aneesh Kumar K.V > --- > arch/powerpc/include/asm/book3s/64/mmu.h | 31