[PATCH v6 4/5] powernv: Pass PSSCR value and mask to power9_idle_stop

2017-01-25 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The power9_idle_stop method currently takes only the requested stop level as a parameter and picks up the rest of the PSSCR bits from a hand-coded macro. This is not a very flexible design, especially when the firmware has the capability to

[PATCH v6 5/5] Documentation:powerpc: Add device-tree bindings for power-mgt

2017-01-25 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Document the device-tree bindings defining the the properties under the @power-mgt node in the device tree that describe the idle states for Linux running on baremetal POWER servers. These bindings are documented separately instead of using the

[PATCH v6 2/5] powernv:stop: Rename pnv_arch300_idle_init to pnv_power9_idle_init

2017-01-25 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Balbir pointed out that the name of the function pnv_arch300_idle_init was inconsistent with the names of the variables and functions pertaining to POWER9 features in book3s_idle.S. This patch renames pnv_arch300_idle_init to

Re: [PATCH v5 5/5] Documentation:powerpc: Add device-tree bindings for power-mgt

2017-01-25 Thread Gautham R Shenoy
Hello Rob, Thank you very much for your review. I had missed this mail and found it while looking at the lkml thread while preparing for the next iteration. On Fri, Jan 13, 2017 at 10:57:43AM -0600, Rob Herring wrote: > On Tue, Jan 10, 2017 at 02:37:04PM +0530, Gautham R. Shenoy wrote: > > From:

[PATCH v6 1/5] powernv:idle: Add IDLE_STATE_ENTER_SEQ_NORET macro

2017-01-25 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently all the low-power idle states are expected to wake up at reset vector 0x100. Which is why the macro IDLE_STATE_ENTER_SEQ that puts the CPU to an idle state and never returns. On ISA v3.0, when the ESL and EC bits in the PSSCR are

Re: [PATCH] powerpc: opal-msglog: Report size of memcons log

2017-01-25 Thread Joel Stanley
On Wed, Jan 25, 2017 at 1:33 PM, Michael Ellerman wrote: > Michael Ellerman writes: > >> Joel Stanley writes: >> >>> The OPAL memory console is reported to be size zero, as we do not >>> initialise the struct attr with any size

[PATCH v6 0/5] powernv:stop: Use psscr_val,mask provided by firmware

2017-01-25 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" This is the sixth iteration of the patchset to use the psscr_val and psscr_mask provided by the firmware for each of the stop states. The previous versions can be found here: [v5]: https://lkml.org/lkml/2017/1/10/147 [v4]:

[PATCH v6 3/5] cpuidle:powernv: Add helper function to populate powernv idle states.

2017-01-25 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" In the current code for powernv_add_idle_states, there is a lot of code duplication while initializing an idle state in powernv_states table. Add an inline helper function to populate the powernv_states[] table for a given idle state. Invoke

[PowerPC] [next-20170125] WARNING at kernel/sched/sched.h:804 set_next_entity+0xb88/0xca0

2017-01-25 Thread abdul
Hi, Today's next tree has warning messages in dmesg when running rcutorture tests. Machine : Power8 PowerVM LPAR Build kernel : 4.10.0-rc5-next-20170125 Steps to recreate: 1.modprobe rcutorture 2.32 CPUS; offline 0-15 CPUS keeping 16-31 CPUs online and vice versa in a loop 3. modprobe -r

[PowerPC] [next-20170125] WARNING at kernel/sched/sched.h:804 set_next_entity+0xb88/0xca0

2017-01-25 Thread abdul
Hi, Today's next tree has warning messages in dmesg when running rcutorture tests. Machine : Power8 PowerVM LPAR Build kernel : 4.10.0-rc5-next-20170125 Steps to recreate: 1.modprobe rcutorture 2.32 CPUS; offline 0-15 CPUS keeping 16-31 CPUs online and vice versa in a loop 3. modprobe -r

RE: BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool

2017-01-25 Thread David Laight
From: Michael Ellerman > Sent: 24 January 2017 06:16 > Anton Blanchard writes: > >> We added: > >> > >> BUILD_BUG_ON(!__builtin_constant_p(feature)) > >> > >> to cpu_has_feature() and mmu_has_feature() in order to catch usage > >> issues (such as

[PATCH] KVM: PPC: Book3S PR: Refactor program interrupt related code into separate function

2017-01-25 Thread Thomas Huth
The function kvmppc_handle_exit_pr() is quite huge and thus hard to read, and even contains a "spaghetti-code"-like goto between the different case labels of the big switch statement. This can be made much more readable by moving the code related to injecting program interrupts / instruction

"Unable to handle kernel paging request for instruction fetch" on P4080

2017-01-25 Thread Thomas De Schampheleire
Hi, We are experiencing kernel panics of the type "Unable to handle kernel paging request for instruction fetch" but are stuck in our analysis. We would appreciate any help you can give. The problem occurs from time to time on different instances of a particular embedded systems. The kernel is

[PATCH] powerpc/mm: use the correct pointer when setting a 2M pte

2017-01-25 Thread Reza Arbab
When setting a 2M pte, radix__map_kernel_page() is using the address ptep = (pte_t *)pudp; Fix this conversion to use pmdp instead. Use pmdp_ptep() to do this instead of casting the pointer. Signed-off-by: Reza Arbab --- arch/powerpc/mm/pgtable-radix.c | 4

Re: BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool

2017-01-25 Thread Arnd Bergmann
On Wed, Jan 25, 2017 at 11:35 AM, David Laight wrote: > From: Michael Ellerman >> #define inlineinline __attribute__((always_inline)) >> notrace >> >> So in fact every inline function is marked always_inline all the time, >> which seems dubious.

gcc trunk fails to build kernel on PowerPC64 due to oprofile warnings

2017-01-25 Thread Anton Blanchard
Hi, gcc trunk has failed to build PowerPC64 kernels for a month or so. The issue is in oprofile, which is common code but ends up being sucked into arch/powerpc and therefore subject to the -Werror applied to arch/powerpc: linux/arch/powerpc/oprofile/../../../drivers/oprofile/oprofile_stats.c:

Re: [bug] stack protector panics on v4.10-rc1+

2017-01-25 Thread Benjamin Herrenschmidt
On Wed, 2017-01-25 at 09:24 +0530, Balbir Singh wrote: > That makes sense. We then wait for the right gcc version? I guess we > also > push for per-task gaurd value as opposed to a global one? I'm thinking per-cpu will be easier as r13 is readily available as PACA. Cheers, Ben.

Re: [bug] stack protector panics on v4.10-rc1+

2017-01-25 Thread Benjamin Herrenschmidt
On Thu, 2017-01-26 at 18:05 +1100, Benjamin Herrenschmidt wrote: > On Wed, 2017-01-25 at 09:24 +0530, Balbir Singh wrote: > > That makes sense. We then wait for the right gcc version? I guess > > we > > also > > push for per-task gaurd value as opposed to a global one? > > I'm thinking per-cpu

[patch added to 3.12-stable] powerpc: Fix build warning on 32-bit PPC

2017-01-25 Thread Jiri Slaby
From: Larry Finger This patch has been added to the 3.12 stable tree. If you have any objections, please let us know. === commit 8ae679c4bc2ea2d16d92620da8e3e9332fa4039f upstream. I am getting the following warning when I build kernel 4.9-git on my

[PATCH v2 03/10] VAS: Define vas_init() and vas_exit()

2017-01-25 Thread Sukadev Bhattiprolu
Implement vas_init() and vas_exit() functions for a new VAS module. This VAS module is essentially a library for other device drivers and kernel users of the NX coprocessors like NX-842 and NX-GZIP. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v2]: - Get

[PATCH v2 02/10] Move GET_FIELD/SET_FIELD to vas.h

2017-01-25 Thread Sukadev Bhattiprolu
Move the GET_FIELD and SET_FIELD macros to vas.h as VAS and other users of VAS, including NX-842 can use those macros. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/include/asm/vas.h | 8 drivers/crypto/nx/nx-842-powernv.c | 1 +

[PATCH v2 01/10] VAS: Define macros, register fields and structures

2017-01-25 Thread Sukadev Bhattiprolu
Define macros for the VAS hardware registers and bit-fields as well as couple of data structures needed by the VAS driver. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v2] - Add an overview of VAS in vas-internal.h - Get window context parameters

Re: Query regarding randomization bits for a ASLR elf on PPC64

2017-01-25 Thread Kees Cook
On Sun, Jan 22, 2017 at 9:34 PM, Bhupesh Sharma wrote: > I was recently looking at ways to extend the randomization range for a > ASLR elf on a PPC64LE system. > > I basically have been using 28-bits of randomization on x86_64 for an > ASLR elf using appropriate

[PATCH v2 05/10] VAS: Define helpers to init window context

2017-01-25 Thread Sukadev Bhattiprolu
Define helpers to initialize window context registers of the VAS hardware. These will be used in follow-on patches when opening/closing VAS windows. Signed-off-by: Sukadev Bhattiprolu --- drivers/misc/vas/vas-internal.h | 56 +++ drivers/misc/vas/vas-window.c

[PATCH v2 08/10] VAS: Define vas_win_close() interface

2017-01-25 Thread Sukadev Bhattiprolu
Define the vas_win_close() interface which should be used to close a send or receive windows. While the hardware configurations required to open send and receive windows differ, the configuration to close a window is the same for both. So we use a single interface to close the window.

[PATCH v2 00/10] Enable VAS

2017-01-25 Thread Sukadev Bhattiprolu
Power9 introduces a hardware subsystem referred to as the Virtual Accelerator Switchboard (VAS). VAS allows kernel subsystems and user space processes to directly access the Nest Accelerator (NX) engines which implement compression and encryption algorithms in the hardware. NX has been in Power

[PATCH v2 09/10] VAS: Define vas_tx_win_open()

2017-01-25 Thread Sukadev Bhattiprolu
Define an interface to open a VAS send window. This interface is intended to be used the Nest Accelerator (NX) driver(s) to open a send window and use it to submit compression/encryption requests to a VAS receive window. The receive window, identified by the [node, chip, cop] parameters, must

[PATCH v2 10/10] VAS: Define copy/paste interfaces

2017-01-25 Thread Sukadev Bhattiprolu
Define interfaces (wrappers) to the 'copy' and 'paste' instructions (which are new in PowerISA 3.0). These are intended to be used to by NX driver(s) to submit Coprocessor Request Blocks (CRBs) to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu ---

Re: [PATCH net 1/5] ibmvnic: harden interrupt handler

2017-01-25 Thread David Miller
From: Thomas Falcon Date: Wed, 25 Jan 2017 15:02:19 -0600 > Move most interrupt handler processing into a tasklet, and > introduce a delay after re-enabling interrupts to fix timing > issues encountered in hardware testing. > > Signed-off-by: Thomas Falcon

[PATCH v2 04/10] VAS: Define helpers for access MMIO regions

2017-01-25 Thread Sukadev Bhattiprolu
Define some helper functions to access the MMIO regions. We use these in a follow-on patches to read/write VAS hardware registers. These helpers are also used to later issue 'paste' instructions to submit requests to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu

[PATCH v2 07/10] VAS: Define vas_rx_win_open() interface

2017-01-25 Thread Sukadev Bhattiprolu
Define the vas_rx_win_open() interface. This interface is intended to be used by the Nest Accelerator (NX) driver(s) to setup receive windows for one or more NX engines (which implement compression/encryption algorithms in the hardware). Follow-on patches will provide an interface to close the

[PATCH v2 06/10] VAS: Define helpers to alloc/free windows

2017-01-25 Thread Sukadev Bhattiprolu
Define helpers to allocate/free VAS window objects. These will be used in follow-on patches when opening/closing windows. Signed-off-by: Sukadev Bhattiprolu --- drivers/misc/vas/vas-window.c | 72 ++- 1 file changed, 71

Re: [PATCH net 2/5] ibmvnic: Fix MTU settings

2017-01-25 Thread David Miller
From: Thomas Falcon Date: Wed, 25 Jan 2017 15:02:20 -0600 > In the current driver, the MTU is set to the maximum value > capable for the backing device. This patch sets the MTU to the > default value for a Linux net device. Why are you doing this? What happens to

[PATCH] tty: serial: constify uart_ops structures

2017-01-25 Thread Bhumika Goyal
Declare uart_ops structures as const as they are only stored in the ops field of an uart_port structure. This field is of type const, so uart_ops structures having this property can be made const too. File size details before and after patching. First line of every .o file shows the file size

Re: [PATCH v4 2/5] ia64: reuse append_elf_note() and final_note() functions

2017-01-25 Thread Hari Bathini
On Tuesday 24 January 2017 11:53 PM, Tony Luck wrote: On Tue, Jan 24, 2017 at 10:11 AM, Hari Bathini wrote: Hello IA64 folks, Could you please review this patch..? It looks OK in principal. My lab is in partial disarray at the moment (just got back from a

[PATCH net 3/5] ibmvnic: Fix endian error when requesting device capabilites

2017-01-25 Thread Thomas Falcon
When a IBM VNIC client driver requests a faulty device setting, the server returns an acceptable value for the client to request. This 64 bit value was incorrectly being swapped as a 32 bit value, resulting in loss of data. This patch corrects that by using the 64 bit swap function.

[PATCH net 1/5] ibmvnic: harden interrupt handler

2017-01-25 Thread Thomas Falcon
Move most interrupt handler processing into a tasklet, and introduce a delay after re-enabling interrupts to fix timing issues encountered in hardware testing. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 21 +++--

[PATCH net 2/5] ibmvnic: Fix MTU settings

2017-01-25 Thread Thomas Falcon
In the current driver, the MTU is set to the maximum value capable for the backing device. This patch sets the MTU to the default value for a Linux net device. It also corrects a discrepancy between MTU values received from firmware, which includes the ethernet header length, and net device MTU

[PATCH net 4/5] ibmvnic: Fix endian errors in error reporting output

2017-01-25 Thread Thomas Falcon
Error reports received from firmware were not being converted from big endian values, leading to bogus error codes reported on little endian systems. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 8 1 file changed, 4 insertions(+), 4

[PATCH net 5/5] ibmvnic: init completion struct before requesting long term mapped buffers

2017-01-25 Thread Thomas Falcon
Initialize this completion structure before requesting that a buffer be long-term mapped . This fix resolves a bug where firmware sends a response before the structure is initialized. Signed-off-by: John Allen Signed-off-by: Nathan Fontenot