[PATCH 1/5] powerpc/mm: Conditional defines of pte bits are messy

2017-02-21 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/pgtable.h | 4 1 file changed, 4 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index 6a55bbe91556..8ae9e0be3a6f 100644 --- a/arch/powerpc/include/a

[PATCH 2/5] powerpc/mm: Express everything based on Radix page table defines

2017-02-21 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 4 ++-- arch/powerpc/include/asm/book3s/64/pgtable.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash

[PATCH 3/5] powerpc/mm: Lower the max real address to 51 bits

2017-02-21 Thread Aneesh Kumar K.V
Max value supported by hardware is 51 bits address. Radix page table define a slot of 57 bits for future expansion. We restrict the value supported in linux kernel 51 bits, so that we can use the bits between 57-51 for storing hash linux page table bits. This is done in the next patch. This will f

[PATCH 4/5] powerpc/mm/radix: Make max pfn bits a variable

2017-02-21 Thread Aneesh Kumar K.V
This makes max pysical address bits a variable so that hash and radix translation mode can choose what value to use. In this patch we also switch the radix translation mode to use 57 bits. This make it resilient to future changes to max pfn supported by platforms. Tis patch is split from the previ

[PATCH 5/5] powerpc/mm: Move hash specific pte bits to be top bits of RPN

2017-02-21 Thread Aneesh Kumar K.V
We don't support the full 57 bits of physical address and hence can overload the top bits of RPN as hash specific pte bits. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash.h| 18 ++ arch/powerpc/include/asm/book3s/64/pgtable.h | 19

Re: [PowerPC] 4.10.0 fails to build on BE config

2017-02-21 Thread Michael Ellerman
abdul writes: > Hi, > > Today's mainline build, breaks on Power6 and Power7 (all BE config) with > these build errors > > arch/powerpc/kernel/time.c: In function ‘running_clock’: > arch/powerpc/kernel/time.c:712:2: error: implicit declaration of > function ‘cputime_to_nsecs’ [-Werror=implicit-f

Re: [PowerPC] 4.10.0 fails to build on BE config

2017-02-21 Thread Oliver O'Halloran
On Tue, Feb 21, 2017 at 6:25 PM, abdul wrote: > Hi, > > Today's mainline build, breaks on Power6 and Power7 (all BE config) with > these build errors > > arch/powerpc/kernel/time.c: In function ‘running_clock’: > arch/powerpc/kernel/time.c:712:2: error: implicit declaration of function > ‘cputime_

[PATCH 0/9] QorIQ DPAA 1 updates

2017-02-21 Thread Madalin Bucur
This patch set introduces a series of fixes and features to the DPAA 1 drivers. Besides activating hardware Rx checksum offloading, four traffic classes are added for Tx traffic prioritisation. Camelia Groza (2): dpaa_eth: add four prioritised Tx traffic classes dpaa_eth: enable multiple Tx tr

[PATCH 1/9] fsl/fman: parse result data is big endian

2017-02-21 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/fman/fman.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/freescale/fman/fman.h b/drivers/net/ethernet/freescale/fman/fman.h index 57aae8d..f53e147 100644 --- a/drivers/net/ether

[PATCH 2/9] fsl/fman: set HW parser as BMI next engine

2017-02-21 Thread Madalin Bucur
Enable the HW parser for all DPAA interfaces. Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/fman/fman.c | 21 drivers/net/ethernet/freescale/fman/fman_port.c | 72 +++-- 2 files changed, 90 insertions(+), 3 deletions(-) diff --git a/drivers/ne

[PATCH 3/9] fsl/fman: remove wrong free

2017-02-21 Thread Madalin Bucur
Reported-by: Dan Carpenter Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/fman/fman_port.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/freescale/fman/fman_port.c b/drivers/net/ethernet/freescale/fman/fman_port.c index f314348..57

[PATCH 4/9] fsl/fman: enlarge FIFO to allow for the 5th port

2017-02-21 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/fman/fman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fman/fman.c b/drivers/net/ethernet/freescale/fman/fman.c index d755930..4aefe24 100644 --- a/drivers/net/ethernet/freesca

[PATCH 5/9] dpaa_eth: remove redundant initialization

2017-02-21 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index e2ca107..e19181f 100644 --- a/drivers/net/ethe

[PATCH 6/9] dpaa_eth: enable Rx checksum offload

2017-02-21 Thread Madalin Bucur
Use the FMan HW parser L4CV flag to offload Rx checksumming. Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 29 -- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/n

[PATCH 7/9] dpaa_eth: do not ignore port api return value

2017-02-21 Thread Madalin Bucur
Reported-by: Dan Carpenter Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 65 +- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_

[PATCH 8/9] dpaa_eth: add four prioritised Tx traffic classes

2017-02-21 Thread Madalin Bucur
From: Camelia Groza Each traffic class corresponds to a WQ priority level. The number of Tx netdev queues and frame queues is increased to NR_CPUS queues for each traffic class. In addition, the priority of the Rx, Error and Conf queues is lowered but their order is maintained. By default, only

[PATCH 9/9] dpaa_eth: enable multiple Tx traffic classes

2017-02-21 Thread Madalin Bucur
From: Camelia Groza Implement the setup_tc ndo to configure prioritised Tx traffic classes. Priorities range from 0 (lowest) to 3 (highest). The driver assigns NR_CPUS queues to each traffic class. Signed-off-by: Camelia Groza Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/dp

Re: [PowerPC] 4.10.0 fails to build on BE config

2017-02-21 Thread Sachin Sant
> On 21-Feb-2017, at 4:39 PM, Oliver O'Halloran wrote: > > On Tue, Feb 21, 2017 at 6:25 PM, abdul wrote: >> Hi, >> >> Today's mainline build, breaks on Power6 and Power7 (all BE config) with >> these build errors >> >> arch/powerpc/kernel/time.c: In function ‘running_clock’: >> arch/powerpc/k

Re: [PATCH 0/2] Allow configurable stack size (especially 32k on PPC64)

2017-02-21 Thread Gabriel Paubert
On Tue, Feb 21, 2017 at 09:24:38AM +1300, Hamish Martin wrote: > This patch series adds the ability to configure the THREAD_SHIFT value and > thereby alter the stack size on powerpc systems. We are particularly > interested > in configuring for a 32k stack on PPC64. > > Using an NXP T2081 (e6500

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-21 Thread Masami Hiramatsu
On Mon, 20 Feb 2017 17:13:05 +0530 "Naveen N. Rao" wrote: > On 2017/02/17 05:42PM, Arnaldo Carvalho de Melo wrote: > > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > > On Thu, 16 Feb 2017 13:47:37 +0530 > > > "Naveen N. Rao" wrote: > > > > > > > I am posting the powerp

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-21 Thread Masami Hiramatsu
On Mon, 20 Feb 2017 15:20:24 +0530 "Naveen N. Rao" wrote: > On 2017/02/19 01:42PM, Masami Hiramatsu wrote: > > On Fri, 17 Feb 2017 17:42:54 -0300 > > Arnaldo Carvalho de Melo wrote: > > > > > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > > > On Thu, 16 Feb 2017 13:47:

Re: [PATCH 2/3] powerpc/xmon: drop the nobt option from xmon plus minor fixes

2017-02-21 Thread Guilherme G. Piccoli
On 02/21/2017 02:16 AM, Michael Ellerman wrote: > "Guilherme G. Piccoli" writes: >> Subject: Re: [PATCH 2/3] powerpc/xmon: drop the nobt option from xmon plus >> minor fixes > > In future please use the same version number for all patches of a > series. > > ie. This should include a v2, like th

Re: [PATCH 2/3] powerpc/xmon: drop the nobt option from xmon plus minor fixes

2017-02-21 Thread Guilherme G. Piccoli
On 02/21/2017 02:33 AM, Michael Ellerman wrote: > Michael Ellerman writes: >> "Guilherme G. Piccoli" writes: > ... >> >> Imagine you're debugging a machine and you drop into xmon to check >> something, then drop out again. >> >> Then you go away and leave the box, and it crashes into xmon, but xm

Re: [PATCH 1/1] powerpc/xmon: Dump memory in native endian format.

2017-02-21 Thread Douglas Miller
On 02/20/2017 11:01 PM, Michael Ellerman wrote: Douglas Miller writes: diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 9c0e17c..6249975 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -2334,9 +2338,49 @@ static void dump_pacas(void) } #endif

Re: [PATCH v3 3/3] powerpc/xmon: add debugfs entry for xmon

2017-02-21 Thread Guilherme G. Piccoli
On 02/21/2017 03:35 AM, Pan Xinhui wrote: > > > 在 2017/2/21 09:58, Guilherme G. Piccoli 写道: >> Currently the xmon debugger is set only via kernel boot command-line. >> It's disabled by default, and can be enabled with "xmon=on" on the >> command-line. Also, xmon may be accessed via sysrq mechanis

[PATCH] powerpc: optprobes: fix TOC handling in optprobes trampoline

2017-02-21 Thread Naveen N. Rao
Optprobes on powerpc is limited to kernel text area. We decided to also optimize kretprobe_trampoline since that is also in kernel text area. However,we failed to take into consideration the fact that the same trampoline is also used to catch function returns from kernel modules. As an example:

[PATCH] powerpc: Remove leftover cputime_to_nsecs call causing build error

2017-02-21 Thread Frederic Weisbecker
This type conversion is a leftover that got ignored during the kcpustat conversion to nanosecs, resulting in build breakage with config having CONFIG_NO_HZ_FULL=y. arch/powerpc/kernel/time.c: In function 'running_clock': arch/powerpc/kernel/time.c:712:2: error: implicit declaration

Re: [PowerPC] 4.10.0 fails to build on BE config

2017-02-21 Thread Frederic Weisbecker
On Tue, Feb 21, 2017 at 12:55:35PM +0530, abdul wrote: > Hi, > > Today's mainline build, breaks on Power6 and Power7 (all BE config) with > these build errors > > arch/powerpc/kernel/time.c: In function ‘running_clock’: > arch/powerpc/kernel/time.c:712:2: error: implicit declaration of function >

Re: [PATCH] powerpc/pseries: advertise Hot Plug Event support to firmware

2017-02-21 Thread Nathan Fontenot
On 02/20/2017 07:12 PM, Michael Roth wrote: > With the inclusion of: > > powerpc/pseries: Implement indexed-count hotplug memory remove > powerpc/pseries: Implement indexed-count hotplug memory add > > we now have complete handling of the RTAS hotplug event format > as described by PAPR via A

[PATCH v2 1/5] powerpc: ftrace: minor cleanup

2017-02-21 Thread Naveen N. Rao
Move the stack setup and teardown code to the ftrace_graph_caller(). This way, we don't incur the cost of setting it up unless function graph is enabled for this function. Also, remove the extraneous LR restore code after the function graph stub. LR has previously been restored and neither livepat

[PATCH v2 2/5] powerpc: ftrace: restore LR from pt_regs

2017-02-21 Thread Naveen N. Rao
Pass the real LR to the ftrace handler. This is needed for KPROBES_ON_FTRACE for the pre handlers. Also, with KPROBES_ON_FTRACE, the link register may be updated by the pre handlers or by a registed kretprobe. Honor updated LR by restoring it from pt_regs, rather than from the stack save area. Li

[PATCH v2 3/5] kprobes: Skip preparing optprobe if the probe is ftrace-based

2017-02-21 Thread Naveen N. Rao
From: Masami Hiramatsu Skip preparing optprobe if the probe is ftrace-based, since anyway, it must not be optimized (or already optimized by ftrace). Tested-by: Naveen N. Rao Signed-off-by: Masami Hiramatsu --- kernel/kprobes.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-)

[PATCH v2 4/5] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-21 Thread Naveen N. Rao
Allow kprobes to be placed on ftrace _mcount() call sites. This optimization avoids the use of a trap, by riding on ftrace infrastructure. This depends on HAVE_DYNAMIC_FTRACE_WITH_REGS which depends on MPROFILE_KERNEL, which is only currently enabled on powerpc64le with newer toolchains. Based on

[PATCH v2 5/5] powerpc: kprobes: prefer ftrace when probing function entry

2017-02-21 Thread Naveen N. Rao
KPROBES_ON_FTRACE avoids much of the overhead with regular kprobes as it eliminates the need for a trap, as well as the need to emulate or single-step instructions. Though OPTPROBES provides us with similar performance, we have limited optprobes trampoline slots. As such, when asked to probe at a

Re: next-20170217 boot on POWER8 LPAR : WARNING @kernel/jump_label.c:287

2017-02-21 Thread Jason Baron
On 02/20/2017 10:05 PM, Sachin Sant wrote: On 20-Feb-2017, at 8:27 PM, Jason Baron mailto:jba...@akamai.com>> wrote: Hi, On 02/19/2017 09:07 AM, Sachin Sant wrote: While booting next-20170217 on a POWER8 LPAR following warning is displayed. Reverting the following commit helps boot cleanly.

Re: [PATCH v7 2/4] powerpc/pseries: Revert 'Auto-online hotplugged memory'

2017-02-21 Thread Nathan Fontenot
On 02/20/2017 07:02 PM, Michael Ellerman wrote: > Nathan Fontenot writes: > >> On 02/15/2017 10:34 PM, Michael Ellerman wrote: >>> Nathan Fontenot writes: >>> Revert the patch patch to auto-online hotplugged memory, commit id ec999072442a. Using the auto-online acpability does online a

[RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-21 Thread Nathan Fontenot
Commit 31bc3858e "add automatic onlining policy for the newly added memory" provides the capability to have added memory automatically onlined during add, but this appears to be slightly broken. The current implementation uses walk_memory_range() to call online_memory_block, which uses memory_bloc

Re: [PATCH] powerpc/fadump: set an upper limit for boot memory size

2017-02-21 Thread Hari Bathini
Hi Michael, On Friday 17 February 2017 11:54 AM, Michael Ellerman wrote: Hari Bathini writes: diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index de7d39a..d5107f4 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -222,6 +222,18 @@ stat

Re: [PATCH 0/9] QorIQ DPAA 1 updates

2017-02-21 Thread David Miller
From: Madalin Bucur Date: Tue, 21 Feb 2017 13:52:45 +0200 > This patch set introduces a series of fixes and features to the DPAA 1 > drivers. Besides activating hardware Rx checksum offloading, four traffic > classes are added for Tx traffic prioritisation. The net-next tree is closed, please re

[PATCH v3 0/2] powerpc: split ftrace bits into separate files

2017-02-21 Thread Naveen N. Rao
v2: https://patchwork.ozlabs.org/patch/697787/ Michael, Sorry this took as long as it did, but here's a take at v3. This series conflicts with the KPROBES_ON_FTRACE patchset, but I'm posting this so as to get feedback. I will rework these patches as needed. Thanks, Naveen Naveen N. Rao (2): po

[PATCH v3 1/2] powerpc: split ftrace bits into a separate file

2017-02-21 Thread Naveen N. Rao
entry_*.S now includes a lot more than just kernel entry/exit code. As a first step at cleaning this up, let's split out the ftrace bits into separate files. Also move all related tracing code into a new trace/ subdirectory. No functional changes. Suggested-by: Michael Ellerman Signed-off-by: Na

[PATCH v3 2/2] powerpc: ftrace_64: split further based on -mprofile-kernel

2017-02-21 Thread Naveen N. Rao
Split ftrace_64.S further retaining the core ftrace 64-bit aspects in ftrace_64.S and moving ftrace_caller() and ftrace_graph_caller() into separate files based on -mprofile-kernel. The livepatch routines are all now contained within the mprofile file. Signed-off-by: Naveen N. Rao --- arch/power

Re: [PATCH] cxl: Enable PCI device ID for future IBM CXL adapter

2017-02-21 Thread Uma Krishnan
On 2/19/2017 4:54 AM, Andrew Donnellan wrote: On 17/02/17 14:45, Uma Krishnan wrote: From: "Matthew R. Ochs" Add support for a future IBM Coherent Accelerator (CXL) device with an ID of 0x0623. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Is this a CAIA 1 or CAIA 2 device?

Re: [RFC PATCH 4/9] powerpc/4xx: Create 4xx pseudo-platform in platforms/4xx

2017-02-21 Thread Arnd Bergmann
On Mon, Feb 20, 2017 at 3:34 AM, Nicholas Piggin wrote: > On Fri, 17 Feb 2017 17:32:14 +1100 > Michael Ellerman wrote: > >> We have a lot of code in sysdev for supporting 4xx, ie. either 40x or >> 44x. Instead it would be cleaner if it was all in platforms/4xx. >> >> This is slightly odd in that

Re: [PATCH v5 13/15] livepatch: change to a per-task consistency model

2017-02-21 Thread Josh Poimboeuf
On Fri, Feb 17, 2017 at 09:51:29AM +0100, Miroslav Benes wrote: > On Thu, 16 Feb 2017, Josh Poimboeuf wrote: > > What do you think about the following? I tried to put the logic in > > klp_complete_transition(), so the module_put()'s would be in one place. > > But it was too messy, so I put it in k

Re: linux-next: manual merge of the tip tree with the powerpc tree

2017-02-21 Thread Stephen Rothwell
Hi all, On Fri, 17 Feb 2017 12:48:43 +1100 Stephen Rothwell wrote: > > Today's linux-next merge of the tip tree got a conflict in: > > arch/powerpc/kernel/asm-offsets.c > > between commit: > > 454656155110 ("powerpc/asm: Use OFFSET macro in asm-offsets.c") > > from the powerpc tree and c

Re: [PATCH kernel] powerpc/powernv: Fix it_ops::get() callback to return in cpu endian

2017-02-21 Thread Gavin Shan
On Tue, Feb 21, 2017 at 01:38:54PM +1100, Alexey Kardashevskiy wrote: >The iommu_table_ops callbacks are declared CPU endian as they take and >return "unsigned long"; underlying hardware tables are big-endian. > >However get() was missing be64_to_cpu(), this adds the missing conversion. > >The only

Re: [PATCH 0/2] Allow configurable stack size (especially 32k on PPC64)

2017-02-21 Thread Benjamin Herrenschmidt
On Tue, 2017-02-21 at 13:51 +0100, Gabriel Paubert wrote: > For now it has only been used for little-endian kernel and > applications, > but according to messages that I have seen on the list, switching the > kernel  > to Elf V2 should be possible. I don't think the toolchain "supports" ELFv2 on B

Re: [PATCH kernel] powerpc/powernv/npu: Remove dead iommu code

2017-02-21 Thread Gavin Shan
On Tue, Feb 21, 2017 at 01:40:20PM +1100, Alexey Kardashevskiy wrote: >PNV_IODA_PE_DEV is only used for NPU devices (emulated PCI bridges >representing NVLink). These are added to IOMMU groups with corresponding >NVIDIA devices after all non-NPU PEs are setup; a special helper - >pnv_pci_ioda_setup

Re: [PATCH kernel] powerpc/powernv/ioda2: Update iommu table base on ownership change

2017-02-21 Thread Gavin Shan
On Tue, Feb 21, 2017 at 01:41:31PM +1100, Alexey Kardashevskiy wrote: >On POWERNV platform, in order to do DMA via IOMMU (i.e. 32bit DMA in >our case), a device needs an iommu_table pointer set via >set_iommu_table_base(). > >The codeflow is: >- pnv_pci_ioda2_setup_dma_pe() > - pnv_pci_ioda2_

Re: [PATCH V3 04/10] powerpc/mm/hash: Support 68 bit VA

2017-02-21 Thread Balbir Singh
On Sun, Feb 19, 2017 at 03:37:11PM +0530, Aneesh Kumar K.V wrote: > Inorder to support large effective address range (512TB), we want to increase > the virtual address bits to 68. But we do have platforms like p4 and p5 that > can > only do 65 bit VA. We support those platforms by limiting context

Re: [PATCH V3 01/10] powerpc/mm/slice: Convert slice_mask high slice to a bitmap

2017-02-21 Thread Balbir Singh
On Tue, Feb 21, 2017 at 12:26:15PM +0530, Aneesh Kumar K.V wrote: > > > On Tuesday 21 February 2017 10:13 AM, Balbir Singh wrote: > > On Sun, Feb 19, 2017 at 03:37:08PM +0530, Aneesh Kumar K.V wrote: > > > In followup patch we want to increase the va range which will result > > > in us requiring

Re: [PATCH V3 06/10] powerpc/mm: Remove redundant TASK_SIZE_USER64 checks

2017-02-21 Thread Balbir Singh
On Sun, Feb 19, 2017 at 03:37:13PM +0530, Aneesh Kumar K.V wrote: > The check against VSID range is implied when we check task size against > hash and radix pgtable range[1], because we make sure page table range cannot > exceed vsid range. > > [1] BUILD_BUG_ON(TASK_SIZE_USER64 > H_PGTABLE_RANGE);

Re: [PATCH V3 10/10] powerpc/mm/slice: Update slice mask printing to use bitmap printing.

2017-02-21 Thread Balbir Singh
On Sun, Feb 19, 2017 at 03:37:17PM +0530, Aneesh Kumar K.V wrote: > We now get output like below which is much better. > > [0.935306] good_mask low_slice: 0-15 > [0.935360] good_mask high_slice: 0-511 > > Compared to > > [0.953414] good_mask: - 1...

Re: [PATCH] powerpc/mm: Add translation mode information in /proc/cpuinfo

2017-02-21 Thread Balbir Singh
On Sun, Feb 19, 2017 at 03:47:49PM +0530, Aneesh Kumar K.V wrote: > With this we have on powernv and pseries /proc/cpuinfo reporting > > timebase: 51200 > platform: PowerNV > model : 8247-22L > machine : PowerNV 8247-22L > firmware: OPAL > translation

Re: [PATCH] powerpc/pseries: advertise Hot Plug Event support to firmware

2017-02-21 Thread David Gibson
On Mon, Feb 20, 2017 at 07:12:18PM -0600, Michael Roth wrote: > With the inclusion of: > > powerpc/pseries: Implement indexed-count hotplug memory remove > powerpc/pseries: Implement indexed-count hotplug memory add > > we now have complete handling of the RTAS hotplug event format > as descr

Re: [PATCH kernel] powerpc/powernv/npu: Remove dead iommu code

2017-02-21 Thread David Gibson
On Tue, Feb 21, 2017 at 01:40:20PM +1100, Alexey Kardashevskiy wrote: > PNV_IODA_PE_DEV is only used for NPU devices (emulated PCI bridges > representing NVLink). These are added to IOMMU groups with corresponding > NVIDIA devices after all non-NPU PEs are setup; a special helper - > pnv_pci_ioda_s

PowerPC build fail

2017-02-21 Thread Tobin C. Harding
The current (2bfe01e) torvalds git tree fails to build on powerpc64. Build machine is virtualized. - Build error arch/powerpc/kernel/time.c: In function ‘running_clock’: arch/powerpc/kernel/time.c:712:25: error: implicit declaration of function ‘cputime_to_nsecs’ return local_clock() - cputi

Re: [PATCH] usercopy: Don't test 64-bit get/put_user() on 32-bit powerpc

2017-02-21 Thread Michael Ellerman
Kees Cook writes: > On Sat, Feb 18, 2017 at 1:33 AM, Michael Ellerman wrote: >> Add PPC32 to the opt-out list, otherwise it breaks the build. >> >> Signed-off-by: Michael Ellerman >> --- >> lib/test_user_copy.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/lib/test_user_copy.c b/

Re: PowerPC build fail

2017-02-21 Thread Andrew Donnellan
On 22/02/17 12:22, Tobin C. Harding wrote: The current (2bfe01e) torvalds git tree fails to build on powerpc64. Build machine is virtualized. - Build error arch/powerpc/kernel/time.c: In function ‘running_clock’: arch/powerpc/kernel/time.c:712:25: error: implicit declaration of function ‘cputi

Re: [PATCH kernel] powerpc/powernv/ioda2: Update iommu table base on ownership change

2017-02-21 Thread Alexey Kardashevskiy
On 22/02/17 10:28, Gavin Shan wrote: > On Tue, Feb 21, 2017 at 01:41:31PM +1100, Alexey Kardashevskiy wrote: >> On POWERNV platform, in order to do DMA via IOMMU (i.e. 32bit DMA in >> our case), a device needs an iommu_table pointer set via >> set_iommu_table_base(). >> >> The codeflow is: >> - pnv

Re: [PATCH kernel] powerpc/powernv/ioda2: Update iommu table base on ownership change

2017-02-21 Thread David Gibson
On Tue, Feb 21, 2017 at 01:41:31PM +1100, Alexey Kardashevskiy wrote: > On POWERNV platform, in order to do DMA via IOMMU (i.e. 32bit DMA in > our case), a device needs an iommu_table pointer set via > set_iommu_table_base(). > > The codeflow is: > - pnv_pci_ioda2_setup_dma_pe() > - pnv_pci_

Re: [PATCH kernel] powerpc/powernv/ioda2: Update iommu table base on ownership change

2017-02-21 Thread Gavin Shan
On Wed, Feb 22, 2017 at 02:05:15PM +1100, Alexey Kardashevskiy wrote: >On 22/02/17 10:28, Gavin Shan wrote: >> On Tue, Feb 21, 2017 at 01:41:31PM +1100, Alexey Kardashevskiy wrote: [The subsequent discussion isn't related to the patch itself anymore] >> One thing would be improved in future, whic

[PATCH kernel] powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested

2017-02-21 Thread Alexey Kardashevskiy
The IODA2 specification says that a 64 DMA address cannot use top 4 bits (3 are reserved and one is a "TVE select"); bottom page_shift bits cannot be used for multilevel table addressing either. The existing IODA2 table allocation code aligns the minimum TCE table size to PAGE_SIZE so in the case

[PATCH] powerpc/mm/hash: Always clear UPRT and Host Radix bits when setting up CPU

2017-02-21 Thread Aneesh Kumar K.V
We will set LPCR with correct value for radix during int. This make sure we start with a sanitized value of LPCR. In case of kexec, cpus can have LPCR value based on the previous translation mode we were running. Fixes: fe036a0605d60 ("powerpc/64/kexec: Fix MMU cleanup on radix") Cc: sta...@vger.k

Re: next-20170217 boot on POWER8 LPAR : WARNING @kernel/jump_label.c:287

2017-02-21 Thread Michael Ellerman
Jason Baron writes: > On 02/20/2017 10:05 PM, Sachin Sant wrote: >> >>> On 20-Feb-2017, at 8:27 PM, Jason Baron >> > wrote: >>> >>> Hi, >>> >>> On 02/19/2017 09:07 AM, Sachin Sant wrote: While booting next-20170217 on a POWER8 LPAR following warning is displaye

Re: [PATCH] powerpc/mm: Add translation mode information in /proc/cpuinfo

2017-02-21 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > With this we have on powernv and pseries /proc/cpuinfo reporting > > timebase: 51200 > platform: PowerNV > model : 8247-22L > machine : PowerNV 8247-22L > firmware: OPAL > translation : Hash > > Signed-off-by: Aneesh K

Re: [PATCH] powerpc/mm: Add translation mode information in /proc/cpuinfo

2017-02-21 Thread Aneesh Kumar K.V
On Wednesday 22 February 2017 11:15 AM, Michael Ellerman wrote: "Aneesh Kumar K.V" writes: With this we have on powernv and pseries /proc/cpuinfo reporting timebase: 51200 platform: PowerNV model : 8247-22L machine : PowerNV 8247-22L firmware: O

Re: [PATCH] powerpc/mm/hash: Always clear UPRT and Host Radix bits when setting up CPU

2017-02-21 Thread Balbir Singh
On Wed, Feb 22, 2017 at 10:42:02AM +0530, Aneesh Kumar K.V wrote: > We will set LPCR with correct value for radix during int. This make sure we > start with a sanitized value of LPCR. In case of kexec, cpus can have LPCR > value based on the previous translation mode we were running. > > Fixes: fe

Re: [PATCH] powerpc/mm/hash: Always clear UPRT and Host Radix bits when setting up CPU

2017-02-21 Thread Aneesh Kumar K.V
On Wednesday 22 February 2017 11:46 AM, Balbir Singh wrote: On Wed, Feb 22, 2017 at 10:42:02AM +0530, Aneesh Kumar K.V wrote: We will set LPCR with correct value for radix during int. This make sure we start with a sanitized value of LPCR. In case of kexec, cpus can have LPCR value based on th

Re: [PATCH] powerpc/mm/hash: Always clear UPRT and Host Radix bits when setting up CPU

2017-02-21 Thread Balbir Singh
On Wed, Feb 22, 2017 at 10:42:02AM +0530, Aneesh Kumar K.V wrote: > We will set LPCR with correct value for radix during int. This make sure we > start with a sanitized value of LPCR. In case of kexec, cpus can have LPCR > value based on the previous translation mode we were running. > > Fixes: fe

Re: [PATCH 0/2] Allow configurable stack size (especially 32k on PPC64)

2017-02-21 Thread Michael Ellerman
Hamish Martin writes: > This patch series adds the ability to configure the THREAD_SHIFT value and > thereby alter the stack size on powerpc systems. We are particularly > interested > in configuring for a 32k stack on PPC64. ... > > For instance for a 70 frame stack, the architecture overhead ju

Re: [PATCH] powerpc/mm/hash: Always clear UPRT and Host Radix bits when setting up CPU

2017-02-21 Thread Aneesh Kumar K.V
On Wednesday 22 February 2017 11:54 AM, Balbir Singh wrote: On Wed, Feb 22, 2017 at 10:42:02AM +0530, Aneesh Kumar K.V wrote: We will set LPCR with correct value for radix during int. This make sure we start with a sanitized value of LPCR. In case of kexec, cpus can have LPCR value based on th