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

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 >

[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

[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

[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

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

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

[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

[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

[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

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

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

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

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:

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"

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 >> > ---

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

[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

[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

[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)

[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

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

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

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

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

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 >>

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

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

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

[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

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

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

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

[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

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

[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

[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 ---

[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 ---

[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

[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

[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 ---

[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 ---

[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

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 >

Re: powerpc/smp: Call smp_ops->setup_cpu() directly on the boot CPU

2017-07-31 Thread Michael Ellerman
On Thu, 2017-07-27 at 13:23:37 UTC, Michael Ellerman wrote: > In smp_cpus_done() we need to call smp_ops->setup_cpu() for the boot > CPU, which means it has to run *on* the boot CPU. > > In the past we ensured it ran on the boot CPU by changing the CPU > affinity mask of current directly. That

Re: powerpc/boot: Fix 64-bit boot wrapper build with non-biarch compiler

2017-07-31 Thread Michael Ellerman
On Wed, 2017-07-26 at 13:19:04 UTC, Michael Ellerman wrote: > Historically the boot wrapper was always built 32-bit big endian, even > for 64-bit kernels. That was because old firmwares didn't necessarily > support booting a 64-bit image. Because of that arch/powerpc/boot/Makefile > uses CROSS32CC

Re: powerpc/powernv/pci: Return failure for some uses of dma_set_mask()

2017-07-31 Thread Michael Ellerman
On Wed, 2017-07-26 at 05:26:40 UTC, Alistair Popple wrote: > Commit 8e3f1b1d8255 ("powerpc/powernv/pci: Enable 64-bit devices to access > >4GB DMA space") introduced the ability for PCI device drivers to request a > DMA mask between 64 and 32 bits and actually get a mask greater than > 32-bits.

Re: powerpc/tm: fix TM SPRs in code dump file

2017-07-31 Thread Michael Ellerman
On Wed, 2017-07-19 at 05:44:13 UTC, Gustavo Romero wrote: > Currently flush_tmregs_to_thread() does not update accordingly the thread > structures from live state before a core dump rendering wrong values of > THFAR, TFIAR, and TEXASR in core dump files. > > That commit fixes it by copying from

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

2017-07-31 Thread Paul Mackerras
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 results in a NULL pointer dereference in the caller. > > Signed-off-by: