Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage

2017-07-31 Thread Michael Ellerman
Jens Axboe writes: ... > > Can you try the below fix? Should be more palatable than the previous > one. Brian, maybe you can take a look at the IRQ issue mentioned above? Given the patch from Brian fixed the lockdep warning, do you still want me to try and test this one? cheers > diff --git a/d

Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage

2017-07-31 Thread Michael Ellerman
Michael Ellerman writes: > Brian King writes: > >> On 07/28/2017 10:17 AM, Brian J King wrote: >>> Jens Axboe wrote on 07/28/2017 09:25:48 AM: >>> Can you try the below fix? Should be more palatable than the previous one. Brian, maybe you can take a look at the IRQ issue mentioned ab

Re: [RFC v6 21/62] powerpc: introduce execute-only pkey

2017-07-31 Thread Michael Ellerman
Thiago Jung Bauermann writes: > Ram Pai writes: ... >> + >> +/* We got one, store it and use it from here on out */ >> +if (need_to_set_mm_pkey) >> +mm->context.execute_only_pkey = execute_only_pkey; >> +return execute_only_pkey; >> +} > > If you follow the code flow in __

Re: [PATCH v3] powerpc/powernv: Enable PCI peer-to-peer

2017-07-31 Thread Michael Ellerman
Brian King writes: > Michael, > > What do we need on this one before we can pull into your -next branch? This skiboot side to be merged. cheers

Re: [PATCH 2/3] powerpc/xmon: Disable and enable tracing command

2017-07-31 Thread Naveen N. Rao
On 2017/07/31 02:22PM, Breno Leitao wrote: > If tracing is enabled and you get into xmon, the tracing buffer > continues to be updated, causing possible loss of data due to buffer > overflow and unnecessary tracing information coming from xmon functions. > > This patch adds a new option that allow

Re: [RFC Part1 PATCH v3 10/17] resource: Provide resource struct in resource walk callback

2017-07-31 Thread Kees Cook
On Mon, Jul 24, 2017 at 12:07 PM, Brijesh Singh wrote: > From: Tom Lendacky > > In prep for a new function that will need additional resource information > during the resource walk, update the resource walk callback to pass the > resource structure. Since the current callback start and end argum

Re: [Jfs-discussion] [PATCH] fs: convert a pile of fsync routines to errseq_t based reporting

2017-07-31 Thread Dave Kleikamp
On 07/28/2017 09:23 AM, Jeff Layton wrote: > From: Jeff Layton > > This patch converts most of the in-kernel filesystems that do writeback > out of the pagecache to report errors using the errseq_t-based > infrastructure that was recently added. This allows them to report > errors once for each o

[RFC PATCH 3/3] powerpc/mm: Separate LMB information from device tree format

2017-07-31 Thread Nathan Fontenot
With the upcoming introduction of a new device tree property format for memory (ibm,dynamic-memory-v2), we should separate the data for the LMBs on a system from the device tree format used to represent them. Witout doing this we face the task of having to update each piece of the kernel that wants

[RFC PATCH 2/3] powerpc/numa: Get device node whenn retreiving usm memory

2017-07-31 Thread Nathan Fontenot
When we move to using the kernel lmb structs instead of accessing the device tree directly for LMB information we will no longer have a pointer to the device node for memory to pass to of_get_usable_memory(). This patch updates of_get_usable_memory() to no longer take a device node pointer and doe

[RFC PATCH 1/3] powerpc/numa: Get device node whenn retreiving associativity arrays

2017-07-31 Thread Nathan Fontenot
When we move to using the kernel lmb structs instead of accessing the device tree directly for LMB information we will no longer have a pointer to the device node for memory to pass to of_get_assoc_arrays(). This patch updates of_get_assoc_arrays() to no longer take a device node pointer and does

[RFC PATCH 0/3] Separate LMB data from device tree format

2017-07-31 Thread Nathan Fontenot
With the upcoming introduction of a new device tree property format for memory (ibm,dynamic-memory-v2), we should separate LMB data from the device tree format used to represent them. Doing this allows any consumer of LMB information, currently the mm/numa and pseries/hotplug-memory code, to access

Re: [PATCH v3] powerpc/powernv: Enable PCI peer-to-peer

2017-07-31 Thread Brian King
Michael, What do we need on this one before we can pull into your -next branch? Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center

[RFC PATCH] powerpc: Disabling MEMORY_HOTPLUG_DEFAULT_ONLINE option for PPC64 arch

2017-07-31 Thread Daniel Henrique Barboza
Commit 943db62c316c ("powerpc/pseries: Revert 'Auto-online hotplugged memory'") reverted the auto-online feature for pseries due to problems with LMB removals not updating the device struct properly. Among other things, this commit made the following change in arch/powerpc/configs/pseries_defconfig

Re: [RFC v6 13/62] powerpc: track allocation status of all pkeys

2017-07-31 Thread Thiago Jung Bauermann
Ram Pai writes: > static inline int mm_pkey_free(struct mm_struct *mm, int pkey) > { > - return -EINVAL; > + if (!pkey_inited) > + return -1; Sorry, I missed this earlier but the pkey_free syscall will pass this value to userspace so it needs to be an errno as well (-EINVAL

[PATCH 3/3] powerpc/xmon: Disable tracing on xmon by default

2017-07-31 Thread Breno Leitao
Currently tracing is enabled from inside xmon, which may cause some noise into the tracing buffer, and makes it harder to find what, in the tracing buffer, are kernel non-xmon functions and what is xmon 'noise' (as printk()s and terminal functions tracing). This patch simple disables it by default

[PATCH 2/3] powerpc/xmon: Disable and enable tracing command

2017-07-31 Thread Breno Leitao
If tracing is enabled and you get into xmon, the tracing buffer continues to be updated, causing possible loss of data due to buffer overflow and unnecessary tracing information coming from xmon functions. This patch adds a new option that allows the tracing to be disabled and re-enabled from insi

[PATCH 1/3] powerpc/xmon: Dump ftrace buffers for the current CPU

2017-07-31 Thread Breno Leitao
Current xmon 'dt' command dumps the tracing buffer for all the CPUs, which makes it possibly hard to read the logs due to the fact that most of powerpc machines currently have many CPUs. Other than that, the CPU lines are interleaved in the ftrace log. This new option just dumps the ftrace buffer

Re: [RFC v6 21/62] powerpc: introduce execute-only pkey

2017-07-31 Thread Thiago Jung Bauermann
Ram Pai writes: > On Fri, Jul 28, 2017 at 07:17:13PM -0300, Thiago Jung Bauermann wrote: >> >> Ram Pai writes: >> > --- a/arch/powerpc/mm/pkeys.c >> > +++ b/arch/powerpc/mm/pkeys.c >> > @@ -97,3 +97,60 @@ int __arch_set_user_pkey_access(struct task_struct >> > *tsk, int pkey, >> >init_iam

Re: [RESEND PATCH v5 00/16] eeprom: at24: Add OF device ID table

2017-07-31 Thread Javier Martinez Canillas
Hello Wolfram, On Mon, Jul 31, 2017 at 5:30 PM, Wolfram Sang wrote: > >> Patches can be applied independently since the DTS changes without driver >> changes are no-op and the OF table won't be used without the DTS changes. > > But there is a dependency, no? If I apply the driver patch, > non-con

Re: [RESEND PATCH v5 00/16] eeprom: at24: Add OF device ID table

2017-07-31 Thread Wolfram Sang
> Patches can be applied independently since the DTS changes without driver > changes are no-op and the OF table won't be used without the DTS changes. But there is a dependency, no? If I apply the driver patch, non-converted device trees will not find their eeproms anymore. So, I need to wait un

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-07-31 Thread Jonathan Cameron
On Mon, 31 Jul 2017 08:04:11 -0700 "Paul E. McKenney" wrote: > On Mon, Jul 31, 2017 at 12:08:47PM +0100, Jonathan Cameron wrote: > > On Fri, 28 Jul 2017 12:03:50 -0700 > > "Paul E. McKenney" wrote: > > > > > On Fri, Jul 28, 2017 at 06:27:05PM +0100, Jonathan Cameron wrote: > > > > On Fri, 2

Re: [PATCH] i2c: Convert to using %pOF instead of full_name

2017-07-31 Thread Wolfram Sang
On Tue, Jul 18, 2017 at 04:43:06PM -0500, Rob Herring wrote: > Now that we have a custom printf format specifier, convert users of > full_name to use %pOF instead. This is preparation to remove storing > of the full path string for each node. > > Signed-off-by: Rob Herring > Cc: Haavard Skinnemoe

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-07-31 Thread Paul E. McKenney
On Mon, Jul 31, 2017 at 12:08:47PM +0100, Jonathan Cameron wrote: > On Fri, 28 Jul 2017 12:03:50 -0700 > "Paul E. McKenney" wrote: > > > On Fri, Jul 28, 2017 at 06:27:05PM +0100, Jonathan Cameron wrote: > > > On Fri, 28 Jul 2017 09:55:29 -0700 > > > "Paul E. McKenney" wrote: > > > > > > > On

RE: [PATCH 1/5] Fix packed and aligned attribute warnings.

2017-07-31 Thread David Laight
From: SZ Lin > Sent: 29 July 2017 08:24 ... > diff --git a/drivers/char/tpm/tpm_ibmvtpm.h b/drivers/char/tpm/tpm_ibmvtpm.h > index 91dfe766d080..9f708ca3dc84 100644 > --- a/drivers/char/tpm/tpm_ibmvtpm.h > +++ b/drivers/char/tpm/tpm_ibmvtpm.h > @@ -25,7 +25,7 @@ struct ibmvtpm_crq { > __be16

Re: [RFC v6 20/62] powerpc: store and restore the pkey state across context switches

2017-07-31 Thread Michael Ellerman
Ram Pai writes: > On Thu, Jul 27, 2017 at 02:32:59PM -0300, Thiago Jung Bauermann wrote: >> Ram Pai writes: >> > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c >> > index 2ad725e..9429361 100644 >> > --- a/arch/powerpc/kernel/process.c >> > +++ b/arch/powerpc/kernel/pr

Re: [RFC v6 19/62] powerpc: ability to create execute-disabled pkeys

2017-07-31 Thread Michael Ellerman
Ram Pai writes: > On Thu, Jul 27, 2017 at 11:54:31AM -0300, Thiago Jung Bauermann wrote: >> >> Ram Pai writes: >> >> > --- a/arch/powerpc/include/asm/pkeys.h >> > +++ b/arch/powerpc/include/asm/pkeys.h >> > @@ -2,6 +2,18 @@ >> > #define _ASM_PPC64_PKEYS_H >> > >> > extern bool pkey_inited; >

[PATCH v2 3/3] powerpc/strict_kernel_rwx: Don't depend on !RELOCATABLE

2017-07-31 Thread Balbir Singh
The concerns with extra permissions and overlap have been address, remove the dependency on !RELOCTABLE Signed-off-by: Balbir Singh --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 36f858c..b5b8ba8 1006

[PATCH v2 1/3] powerpc/mm/radix: Fix relocatable radix mappings for STRICT_RWX

2017-07-31 Thread Balbir Singh
The mappings now do perfect kernel pte mappings even when the kernel is relocated. This patch refactors create_physical_mapping() and mark_rodata_ro(). create_physical_mapping() is now largely done with a helper called __create_physical_mapping(), which is defined differently for when CONFIG_STRICT

[PATCH v2 2/3] powerpc/mm/hash: WARN if relocation is enabled and CONFIG_STRICT_KERNEL_RWX

2017-07-31 Thread Balbir Singh
For radix we split the mapping into smaller page sizes (at the cost of additional TLB overhead), but for hash its best to print a warning. In the case of hash and no-relocation, the kernel should be well aligned to provide the least overhead with the current linear mapping size (16M) Signed-off-by

[PATCH v2 0/3] Have CONFIG_STRICT_KERNEL_RWX work with CONFIG_RELOCATABLE

2017-07-31 Thread Balbir Singh
These patches make CONFIG_STRICT_KERNEL_RWX work with CONFIG_RELOCATABLE The first patch splits up the radix linear mapping nicely on relocation to support granular read-only and execution bits. The second patch warns if relocation is actually done (PHYSICAL_START > MEMORY_START), we do best effort

Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage

2017-07-31 Thread Michael Ellerman
Brian King writes: > On 07/28/2017 10:17 AM, Brian J King wrote: >> Jens Axboe wrote on 07/28/2017 09:25:48 AM: >> >>> Can you try the below fix? Should be more palatable than the previous >>> one. Brian, maybe you can take a look at the IRQ issue mentioned above? > > Michael, > > Does this add

Re: [PATCH 23/24] powerpc/mm: Cleanup check for stack expansion

2017-07-31 Thread Christophe LEROY
Le 25/07/2017 à 13:19, Michael Ellerman a écrit : LEROY Christophe writes: Michael Ellerman a écrit : LEROY Christophe writes: Benjamin Herrenschmidt a écrit : When hitting below a VM_GROWSDOWN vma (typically growing the stack), we check whether it's a valid stack-growing instructio

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-07-31 Thread Jonathan Cameron
On Wed, 26 Jul 2017 16:15:05 -0700 "Paul E. McKenney" wrote: > On Wed, Jul 26, 2017 at 03:45:40PM -0700, David Miller wrote: > > From: "Paul E. McKenney" > > Date: Wed, 26 Jul 2017 15:36:58 -0700 > > > > > And without CONFIG_SOFTLOCKUP_DETECTOR, I see five runs of 24 with RCU > > > CPU stall

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-07-31 Thread Jonathan Cameron
On Fri, 28 Jul 2017 12:03:50 -0700 "Paul E. McKenney" wrote: > On Fri, Jul 28, 2017 at 06:27:05PM +0100, Jonathan Cameron wrote: > > On Fri, 28 Jul 2017 09:55:29 -0700 > > "Paul E. McKenney" wrote: > > > > > On Fri, Jul 28, 2017 at 02:24:03PM +0100, Jonathan Cameron wrote: > > > > On Fri, 2

RE: [PATCH v2] qe: fix compile issue for arm64

2017-07-31 Thread Michael Ellerman
Qiang Zhao writes: > Fri 7/28/2017 2:14 PM, Michael Ellerman wrote: > >> -Original Message- >> From: Michael Ellerman [mailto:m...@ellerman.id.au] >> Sent: Friday, July 28, 2017 2:14 PM >> To: Qiang Zhao ; o...@buserror.net >> Cc: valentin.longch...@keymile.com; linuxppc-dev@lists.ozlabs

Re: [PATCH 2/5] Fix "ERROR: code indent should use tabs where possible"

2017-07-31 Thread Michael Ellerman
SZ Lin writes: > ERROR: code indent should use tabs where possible > +^I^I "Need to wait for TPM to finish\n");$ > > Signed-off-by: SZ Lin > --- > drivers/char/tpm/tpm_ibmvtpm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/dri

Re: [RFC PATCH] powerpc: improve accounting of non maskable interrupts

2017-07-31 Thread Michael Ellerman
Nicholas Piggin writes: > This fixes a case of double counting MCEs on PowerNV. > > Adds a counter for the system reset interrupt, which will > see more use as a debugging NMI. > > Adds a soft-NMI counter for the 64s watchdog. Although this could cause > confusion because it only fires when inter

Re: [PATCH] mpc832x_rdb: fix of_irq_to_resource() error check

2017-07-31 Thread Michael Ellerman
Scott Wood writes: > On Sat, 2017-07-29 at 22:52 +0300, Sergei Shtylyov wrote: >> of_irq_to_resource() has recently been  fixed to return negative error #'s >> along with 0 in case of failure,  however the Freescale MPC832x RDB board >> code still only regards 0 as as failure indication -- fix it

[PATCH] powerpc/perf: Add PM_LD_MISS_L1 and PM_BR_2PATH to power9 event list

2017-07-31 Thread Madhavan Srinivasan
Add couple of more events (PM_LD_MISS_L1 and PM_BR_2PATH) to power9 event list and power9_event_alternatives array (these events can be counted in more than one PMC). Signed-off-by: Madhavan Srinivasan --- arch/powerpc/perf/power9-events-list.h | 8 arch/powerpc/perf/power9-pmu.c

Re: [PATCH v2] powerpc/powernv: Use darn instr for random_seed on p9

2017-07-31 Thread Michael Ellerman
Hi Matt, A few comments inline ... Matt Brown writes: > Currently ppc_md.get_random_seed uses the powernv_get_random_long function. > A guest calling this function would have to go through the hypervisor. The This is not quite right. The powernv routine is only ever used on bare metal. In a gue

Re: [PATCH] powerpc/asm/cacheflush: Cleanup cacheflush function params

2017-07-31 Thread Christophe LEROY
Le 20/07/2017 à 08:28, Matt Brown a écrit : The cacheflush prototypes currently use start and stop values and each call requires typecasting the address to an unsigned long. This patch changes the cacheflush prototypes to follow the x86 style of using a base and size values, with base being a v

Re: [RFC Part1 PATCH v3 10/17] resource: Provide resource struct in resource walk callback

2017-07-31 Thread Borislav Petkov
On Mon, Jul 24, 2017 at 02:07:50PM -0500, Brijesh Singh wrote: > From: Tom Lendacky > > In prep for a new function that will need additional resource information > during the resource walk, update the resource walk callback to pass the > resource structure. Since the current callback start and e

[PATCH] powerpc/perf: Factor out PPMU_ONLY_COUNT_RUN check code from power8

2017-07-31 Thread Madhavan Srinivasan
There are some hardware events on Power systems which only count when the processor is not idle, and there are some fixed-function counters which count such events. For example, the "run cycles" event counts cycles when the processor is not idle. If the user asks to count cycles, we can use "run cy

Re: [PATCH 1/2] KVM: PPC: e500: fix some NULL dereferences on error

2017-07-31 Thread Dan Carpenter
On Mon, Jul 31, 2017 at 04:03:40PM +1000, Paul Mackerras wrote: > On Thu, Jul 13, 2017 at 10:38:29AM +0300, Dan Carpenter wrote: > > There are some error paths in kvmppc_core_vcpu_create_e500() where we > > forget to set the error code. It means that we return ERR_PTR(0) which > > is NULL and it r

[RESEND][PATCH V10 0/3] powernv : Add support for OPAL-OCC command/response interface

2017-07-31 Thread Shilpasri G Bhat
In P9, OCC (On-Chip-Controller) supports shared memory based commad-response interface. Within the shared memory there is an OPAL command buffer and OCC response buffer that can be used to send inband commands to OCC. The following commands are supported: 1) Set system powercap 2) Set CPU-GPU powe

[RESEND][PATCH V10 3/3] powernv: Add support to clear sensor groups data

2017-07-31 Thread Shilpasri G Bhat
Adds support for clearing different sensor groups. OCC inband sensor groups like CSM, Profiler, Job Scheduler can be cleared using this driver. The min/max of all sensors belonging to these sensor groups will be cleared. Signed-off-by: Shilpasri G Bhat --- .../bindings/powerpc/opal/sensor-groups

[RESEND][PATCH V10 2/3] powernv: Add support to set power-shifting-ratio

2017-07-31 Thread Shilpasri G Bhat
This patch adds support to set power-shifting-ratio which hints the firmware how to distribute/throttle power between different entities in a system (e.g CPU v/s GPU). This ratio is used by OCC for power capping algorithm. Signed-off-by: Shilpasri G Bhat --- Documentation/ABI/testing/sysfs-firmw

[RESEND][PATCH V10 1/3] powernv: powercap: Add support for powercap framework

2017-07-31 Thread Shilpasri G Bhat
Adds a generic powercap framework to change the system powercap inband through OPAL-OCC command/response interface. Signed-off-by: Shilpasri G Bhat --- .../ABI/testing/sysfs-firmware-opal-powercap | 31 +++ arch/powerpc/include/asm/opal-api.h| 5 +- arch/powerpc/include/

[PATCH V9 1/3] powernv: powercap: Add support for powercap framework

2017-07-31 Thread Shilpasri G Bhat
Adds a generic powercap framework to change the system powercap inband through OPAL-OCC command/response interface. Signed-off-by: Shilpasri G Bhat --- .../ABI/testing/sysfs-firmware-opal-powercap | 31 +++ arch/powerpc/include/asm/opal-api.h| 5 +- arch/powerpc/include/

[PATCH V9 3/3] powernv: Add support to clear sensor groups data

2017-07-31 Thread Shilpasri G Bhat
Adds support for clearing different sensor groups. OCC inband sensor groups like CSM, Profiler, Job Scheduler can be cleared using this driver. The min/max of all sensors belonging to these sensor groups will be cleared. Signed-off-by: Shilpasri G Bhat --- .../bindings/powerpc/opal/sensor-groups

[PATCH V9 2/3] powernv: Add support to set power-shifting-ratio

2017-07-31 Thread Shilpasri G Bhat
This patch adds support to set power-shifting-ratio which hints the firmware how to distribute/throttle power between different entities in a system (e.g CPU v/s GPU). This ratio is used by OCC for power capping algorithm. Signed-off-by: Shilpasri G Bhat --- Documentation/ABI/testing/sysfs-firmw

[PATCH V9 0/3] powernv : Add support for OPAL-OCC command/response interface

2017-07-31 Thread Shilpasri G Bhat
In P9, OCC (On-Chip-Controller) supports shared memory based commad-response interface. Within the shared memory there is an OPAL command buffer and OCC response buffer that can be used to send inband commands to OCC. The following commands are supported: 1) Set system powercap 2) Set CPU-GPU powe

Re: [PATCH] fs: convert a pile of fsync routines to errseq_t based reporting

2017-07-31 Thread Jan Kara
On Fri 28-07-17 10:23:21, Jeff Layton wrote: > From: Jeff Layton > > This patch converts most of the in-kernel filesystems that do writeback > out of the pagecache to report errors using the errseq_t-based > infrastructure that was recently added. This allows them to report > errors once for each