Re: [PATCH v9 29/51] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface

2017-12-19 Thread Gabriel Paubert
On Mon, Dec 18, 2017 at 03:15:51PM -0800, Ram Pai wrote: > On Mon, Dec 18, 2017 at 02:28:14PM -0800, Dave Hansen wrote: > > On 12/18/2017 02:18 PM, Ram Pai wrote: > > > b) minimum number of keys available to the application. > > > if libraries consumes a few, they could provide a library > > >

Re: [PATCH] cpufreq: powernv: Add support of frequency domain

2017-12-19 Thread Gautham R Shenoy
Hi Viresh, On Mon, Dec 18, 2017 at 01:59:35PM +0530, Viresh Kumar wrote: > On 18-12-17, 10:41, Abhishek wrote: > > We need to do it in this way as the current implementation takes the max of > > the PMSR of the cores. Thus, when the frequency is required to be ramped up, > > it suffices to write to

Re: [PATCH] powerpc/perf: Dereference bhrb entries safely

2017-12-19 Thread Balbir Singh
On Tue, Dec 19, 2017 at 6:23 PM, Ravi Bangoria wrote: > Hi Balbir, > > Sorry was away for few days. > No problem at all > On 12/14/2017 05:54 PM, Balbir Singh wrote: >> On Tue, Dec 12, 2017 at 11:29 PM, Ravi Bangoria >> wrote: >>> It may very well happen that branch instructions recorded by >>>

Re: [PATCH] cpufreq: powernv: Add support of frequency domain

2017-12-19 Thread Balbir Singh
On Tue, Dec 19, 2017 at 8:20 PM, Gautham R Shenoy wrote: > Hi Viresh, > On Mon, Dec 18, 2017 at 01:59:35PM +0530, Viresh Kumar wrote: >> On 18-12-17, 10:41, Abhishek wrote: >> > We need to do it in this way as the current implementation takes the max of >> > the PMSR of the cores. Thus, when the f

Re: [PATCH] powerpc/perf: Dereference bhrb entries safely

2017-12-19 Thread Michael Ellerman
Ravi Bangoria writes: > Hi Balbir, > > Sorry was away for few days. > > On 12/14/2017 05:54 PM, Balbir Singh wrote: >> On Tue, Dec 12, 2017 at 11:29 PM, Ravi Bangoria >> wrote: >>> It may very well happen that branch instructions recorded by >>> bhrb entries already get unmapped before they get

Re: [PATCH V4 02/26] powerpc/PCI: deprecate pci_get_bus_and_slot()

2017-12-19 Thread Michael Ellerman
Sinan Kaya writes: > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as > where a PCI device is present. This restricts the device drivers to be > reused for other domain numbers. > > Getting ready to remove pci_get_bus_and_slot() function in favor of > pci_get_domain_bus_and_

Re: [PATCH v9 29/51] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface

2017-12-19 Thread Michael Ellerman
Dave Hansen writes: > On 11/06/2017 12:57 AM, Ram Pai wrote: >> Expose useful information for programs using memory protection keys. >> Provide implementation for powerpc and x86. >> >> On a powerpc system with pkeys support, here is what is shown: >> >> $ head /sys/kernel/mm/protection_keys/*

Applied "ASoC: fsl_ssi: Define ternary macros to simplify code" to the asoc tree

2017-12-19 Thread Mark Brown
The patch ASoC: fsl_ssi: Define ternary macros to simplify code has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and

Applied "ASoC: fsl_ssi: Rename i2smode to i2s_net" to the asoc tree

2017-12-19 Thread Mark Brown
The patch ASoC: fsl_ssi: Rename i2smode to i2s_net has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linu

Applied "ASoC: fsl_ssi: Replace fsl_ssi_rxtx_reg_val with fsl_ssi_regvals" to the asoc tree

2017-12-19 Thread Mark Brown
The patch ASoC: fsl_ssi: Replace fsl_ssi_rxtx_reg_val with fsl_ssi_regvals has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24

Applied "ASoC: fsl_ssi: Rename scr_val to scr" to the asoc tree

2017-12-19 Thread Mark Brown
The patch ASoC: fsl_ssi: Rename scr_val to scr has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus du

Applied "ASoC: fsl_ssi: Rename cpu_dai parameter to dai" to the asoc tree

2017-12-19 Thread Mark Brown
The patch ASoC: fsl_ssi: Rename cpu_dai parameter to dai has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent t

Applied "ASoC: fsl_ssi: Refine printk outputs" to the asoc tree

2017-12-19 Thread Mark Brown
The patch ASoC: fsl_ssi: Refine printk outputs has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus du

Applied "ASoC: fsl_ssi: Refine indentations and wrappings" to the asoc tree

2017-12-19 Thread Mark Brown
The patch ASoC: fsl_ssi: Refine indentations and wrappings has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent

Applied "ASoC: fsl_ssi: Rename registers and fields macros" to the asoc tree

2017-12-19 Thread Mark Brown
The patch ASoC: fsl_ssi: Rename registers and fields macros has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sen

Applied "ASoC: fsl_ssi: Refine all comments" to the asoc tree

2017-12-19 Thread Mark Brown
The patch ASoC: fsl_ssi: Refine all comments has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus duri

Applied "ASoC: fsl_ssi: Cache pdev->dev pointer" to the asoc tree

2017-12-19 Thread Mark Brown
The patch ASoC: fsl_ssi: Cache pdev->dev pointer has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus

Applied "ASoC: fsl_ssi: Rename fsl_ssi_private to fsl_ssi" to the asoc tree

2017-12-19 Thread Mark Brown
The patch ASoC: fsl_ssi: Rename fsl_ssi_private to fsl_ssi has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent

Re: [PATCH 38/45] arch/powerpc: remove duplicate includes

2017-12-19 Thread Michael Ellerman
Pravin Shedge writes: > These duplicate includes have been found with scripts/checkincludes.pl but > they have been removed manually to avoid removing false positives. > > Signed-off-by: Pravin Shedge > --- > arch/powerpc/kernel/time.c | 2 -- > arch/powerpc/lib/code-patching.c

Re: [PATCH] PCI: Add #defines for Completion Timeout Disable feature

2017-12-19 Thread Michael Ellerman
Bjorn Helgaas writes: > From: Bjorn Helgaas > > Add #defines for the Completion Timeout Disable feature and use them. No > functional change intended. > > Signed-off-by: Bjorn Helgaas > --- > arch/powerpc/platforms/powernv/eeh-powernv.c |6 +++--- > include/uapi/linux/pci_regs.h

Re: [PATCH] On ppc64le we HAVE_RELIABLE_STACKTRACE

2017-12-19 Thread Torsten Duwe
On Mon, Dec 18, 2017 at 12:56:22PM -0600, Josh Poimboeuf wrote: > On Mon, Dec 18, 2017 at 03:33:34PM +1000, Nicholas Piggin wrote: > > On Sun, 17 Dec 2017 20:58:54 -0600 > > Josh Poimboeuf wrote: > > > > > On Fri, Dec 15, 2017 at 07:40:09PM +1000, Nicholas Piggin wrote: > > > > On Tue, 12 Dec 201

Re: [PATCH V4 02/26] powerpc/PCI: deprecate pci_get_bus_and_slot()

2017-12-19 Thread Sinan Kaya
On 12/19/2017 5:29 AM, Michael Ellerman wrote: > Sinan Kaya writes: > >> pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as >> where a PCI device is present. This restricts the device drivers to be >> reused for other domain numbers. >> >> Getting ready to remove pci_get_bus_a

Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-19 Thread Mauro Carvalho Chehab
Em Sun, 17 Dec 2017 16:28:44 -0800 Joe Perches escreveu: > Some functions definitions have either the initial open brace and/or > the closing brace outside of column 1. > > Move those braces to column 1. > > This allows various function analyzers like gnu complexity to work > properly for these

Re: powerpc64 kernel panic if you disable CONFIG_PPC_TRANSACTIONAL_MEM?

2017-12-19 Thread Michael Ellerman
Rob Landley writes: > I just added a ppc64 target to https://github.com/landley/mkroot which > means I built 4.14 with the attached miniconfig and ran it with the > attached qemu command line, and it works fine as is but if you remove > the transactional mem line from the config the kernel panics

Re: [PATCH v2 2/2] powerpc/book3s: Fix TB corruption in guest exit path on HMI interrupt.

2017-12-19 Thread Alexander Graf
On 05/15/2016 06:14 AM, Mahesh J Salgaonkar wrote: From: Mahesh Salgaonkar When a guest is assigned to a core it converts the host Timebase (TB) into guest TB by adding guest timebase offset before entering into guest. During guest exit it restores the guest TB to host TB. This means under cert

Re: [PATCH 13/13] ocxl: add MAINTAINERS entry

2017-12-19 Thread Frederic Barrat
Le 18/12/2017 à 17:04, Joe Perches a écrit : +OCXL (Open Coherent Accelerator Processor Interface OpenCAPI) DRIVER +M: Frederic Barrat +M: Andrew Donnellan +L: linuxppc-dev@lists.ozlabs.org +S: Supported +F: arch/powerpc/platforms/powernv/ocxl.c +F: arch/powerpc/include/

[PATCH] KVM: PPC: Book3S HV: Remove vcpu->arch.dec usage

2017-12-19 Thread Alexander Graf
On Book3S in HV mode, we don't use the vcpu->arch.dec field at all. Instead, all logic is built around vcpu->arch.dec_expires. So let's remove the one remaining piece of code that was setting it. Signed-off-by: Alexander Graf --- Looking through the DEC logic, I fail to see any code that allow

Re: [PATCH 06/17] mm: pass the vmem_altmap to arch_remove_memory and __remove_pages

2017-12-19 Thread Christoph Hellwig
On Fri, Dec 15, 2017 at 06:04:37PM -0800, Dan Williams wrote: > On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > > We can just pass this on instead of having to do a radix tree lookup > > without proper locking 2 levels into the callchain. > > > > Signed-off-by: Christoph Hellwig wip >

Re: [PATCH 14/17] memremap: simplify duplicate region handling in devm_memremap_pages

2017-12-19 Thread Christoph Hellwig
On Sun, Dec 17, 2017 at 09:34:11AM -0800, Dan Williams wrote: > This is not racy, we'll catch the error on insert, and I think the > extra debug information is useful for debugging a broken memory map or > alignment math. We can check for -ЕEXIST and print the warning, but it's a weird pattern for

Re: [PATCH 16/17] memremap: change devm_memremap_pages interface to use struct dev_pagemap

2017-12-19 Thread Christoph Hellwig
On Sun, Dec 17, 2017 at 10:51:56AM -0800, Dan Williams wrote: > On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > > From: Logan Gunthorpe > > > > This new interface is similar to how struct device (and many others) > > work. The caller initializes a 'struct dev_pagemap' as required > >

Re: [PATCH v9 29/51] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface

2017-12-19 Thread Ram Pai
On Tue, Dec 19, 2017 at 09:31:22AM +0100, Gabriel Paubert wrote: > On Mon, Dec 18, 2017 at 03:15:51PM -0800, Ram Pai wrote: > > On Mon, Dec 18, 2017 at 02:28:14PM -0800, Dave Hansen wrote: > > > On 12/18/2017 02:18 PM, Ram Pai wrote: > > > snip... > > > > I think on x86 you look for some hardw

Re: [PATCH v9 29/51] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface

2017-12-19 Thread Ram Pai
On Tue, Dec 19, 2017 at 09:50:24PM +1100, Michael Ellerman wrote: > Dave Hansen writes: > > > On 11/06/2017 12:57 AM, Ram Pai wrote: > >> Expose useful information for programs using memory protection keys. > >> Provide implementation for powerpc and x86. > >> > >> On a powerpc system with pkeys

Re: [net] Revert "net: core: maybe return -EEXIST in __dev_alloc_name"

2017-12-19 Thread Johannes Berg
Hi, > This revert seems to have broken networking on one of my powerpc > machines, according to git bisect. Fun! TBH, I only looked at the immediate problem we ran into, and reverted what was causing it. I don't think we saw the follow-up problem you're seeing. > The symptom is DHCP fails and I

[PATCH v1 00/15] ASoC: fsl_ssi: Clean up - program flow level

2017-12-19 Thread Nicolin Chen
==Background== The fsl_ssi driver was designed for PPC originally and then it has been updated to support different modes for i.MX Series, including SDMA, I2S Master mode, AC97 and older i.MXs with FIQ, by different contributors for different use cases in different coding styles. Additionally, in

[PATCH v1 01/15] ASoC: fsl_ssi: Clean up set_dai_tdm_slot()

2017-12-19 Thread Nicolin Chen
This patch replaces the register read with ssi->i2s_net for simplification. It also removes masking SSIEN from scr value since it's handled later by regmap_update_bits() to set this scr value back. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_ssi.c | 7 ++- 1 file changed, 2 insertions(

[PATCH v1 02/15] ASoC: fsl_ssi: Maintain a mask of active streams

2017-12-19 Thread Nicolin Chen
Checking TE and RE bits in SCR register doesn't work for AC97 mode which enables SSIEN, TE and RE in the fsl_ssi_setup_ac97() that's called during probe(). So when running into the trigger(), it will always get the result of both TE and RE being enabled already, even if actually there is no active

[PATCH v1 03/15] ASoC: fsl_ssi: Rename fsl_ssi_disable_val macro

2017-12-19 Thread Nicolin Chen
The define of fsl_ssi_disable_val is not so clear as it mixes two steps of calculations together. And those parameter names are also a bit long to read. Since it just tries to exclude the shared bits from the regvals of current stream while the opposite stream is active, it's better to use somethi

[PATCH v1 04/15] ASoC: fsl_ssi: Clear FIFO directly in fsl_ssi_config()

2017-12-19 Thread Nicolin Chen
The FIFO clear helper function is just one line of code now. So it could be cleaned up by removing it and calling regmap directly. Meanwhile, FIFO clear could be applied to all use cases, not confined to AC97. So this patch also moves FIFO clear in the trigger() to fsl_ssi_config() and removes the

[PATCH v1 05/15] ASoC: fsl_ssi: Clean up helper functions of trigger()

2017-12-19 Thread Nicolin Chen
The trigger() calls fsl_ssi_tx_config() and fsl_ssi_rx_config(), and both of them jump to fsl_ssi_config(). And fsl_ssi_config() later calls another fsl_ssi_rxtx_config(). However, the whole routine, especially fsl_ssi_config() function, is too complicated because of the folowing reasons: 1) It ha

[PATCH v1 06/15] ASoC: fsl_ssi: Add DAIFMT define for AC97

2017-12-19 Thread Nicolin Chen
The _fsl_ssi_set_dai_fmt() bypasses an undefined format for AC97 mode. However, it's not really necessary if AC97 has its complete format defined. So this patch adds a DAIFMT macro of complete format including a clock direction and polarity. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_ssi

[PATCH v1 07/15] ASoC: fsl_ssi: Clean up fsl_ssi_setup_regvals()

2017-12-19 Thread Nicolin Chen
This patch cleans fsl_ssi_setup_regvals() by following changes: 1) Moving DBG bits to the first lines. 2) Setting SSIE, RE/TE as default and cleaning it for AC97 Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_ssi.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff

[PATCH v1 08/15] ASoC: fsl_ssi: Set xFEN0 and xFEN1 together

2017-12-19 Thread Nicolin Chen
It'd be safer to enable both FIFOs for TX or RX at the same time. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_ssi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 64a0d33..b51591e 100644 --- a/sound/s

[PATCH v1 09/15] ASoC: fsl_ssi: Use snd_soc_init_dma_data instead

2017-12-19 Thread Nicolin Chen
Since there is a helper function, use it to help readability. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_ssi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index b51591e..fd756dd 100644 --- a/sound/soc/fsl/fsl

[PATCH v1 10/15] ASoC: fsl_ssi: Move one-time configurations to dai_probe()

2017-12-19 Thread Nicolin Chen
The dai_probe() could handle some one-time configurations since they will not be changed once being configured. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_ssi.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/s

[PATCH v1 12/15] ASoC: fsl_ssi: Clean up _fsl_ssi_set_dai_fmt()

2017-12-19 Thread Nicolin Chen
The _fsl_ssi_set_dai_fmt() is a helper function being called from fsl_ssi_set_dai_fmt() as an ASoC operation and from dai_probe(), mainly for AC97 format initialization. This patch cleans the _fsl_ssi_set_dai_fmt() in following ways: * Removing *dev pointer in the parameters as it's included in th

[PATCH v1 11/15] ASoC: fsl_ssi: Setup AC97 in dai_probe()

2017-12-19 Thread Nicolin Chen
AC97 configures some registers earlier to start a communication with CODECs, so this patch moves those register settings to the dai_probe() as well, along with other register configurations. It also applies _fsl_ssi_set_dai_fmt() to AC97 only since other formats would be configured via fsl_ssi_set

[PATCH v1 13/15] ASoC: fsl_ssi: Remove cpu_dai_drv from fsl_ssi structure

2017-12-19 Thread Nicolin Chen
The cpu_dai_drv is only used for symmetric_rates. So this patch replaces it with a synchronous boolean flag. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_ssi.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/so

[PATCH v1 14/15] ASoC: fsl_ssi: Move DT related code to a separate probe()

2017-12-19 Thread Nicolin Chen
This patch cleans up probe() function by moving all Device Tree related code into a separate function. It allows the probe() to be Device Tree independent. This will be very useful for future integration of imx-ssi driver which has similar functionalities while exists only because it supports non-D

[PATCH v1 15/15] ASoC: fsl_ssi: Use ssi->streams instead of reading register

2017-12-19 Thread Nicolin Chen
Since ssi->streams is being updated along with SCR register and its SSIEN bit, it's simpler to use it instead. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_ssi.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index

[PATCH V4] cxl: Add support for ASB_Notify on POWER9

2017-12-19 Thread Christophe Lombard
The POWER9 core supports a new feature: ASB_Notify which requires the support of the Special Purpose Register: TIDR. The ASB_Notify command, generated by the AFU, will attempt to wake-up the host thread identified by the particular LPID:PID:TID. This patch assign a unique TIDR (thread id) for the

Re: [PATCH v1 00/15] ASoC: fsl_ssi: Clean up - program flow level

2017-12-19 Thread Timur Tabi
On 12/19/17 11:00 AM, Nicolin Chen wrote: This series of patches is the second set to clean up fsl_ssi driver in the program flow level. Any patch here may impact a fundamental test case like playback or record. With Christmas happening over the next two weeks, I don't think I'll be able to re

[-next PATCH 0/4] sysfs and DEVICE_ATTR_

2017-12-19 Thread Joe Perches
Joe Perches (4): sysfs.h: Use octal permissions treewide: Use DEVICE_ATTR_RW treewide: Use DEVICE_ATTR_RO treewide: Use DEVICE_ATTR_WO arch/arm/mach-pxa/sharpsl_pm.c | 4 +- arch/s390/kernel/smp.c | 2 +- arch/s390/kernel/topology.c

[-next PATCH 4/4] treewide: Use DEVICE_ATTR_WO

2017-12-19 Thread Joe Perches
Convert DEVICE_ATTR uses to DEVICE_ATTR_WO where possible. Done with perl script: $ git grep -w --name-only DEVICE_ATTR | \ xargs perl -i -e 'local $/; while (<>) { s/\bDEVICE_ATTR\s*\(\s*(\w+)\s*,\s*\(?(?:\s*S_IWUSR\s*|\s*0200\s*)\)?\s*,\s*NULL\s*,\s*\s_store\s*\)/DEVICE_ATTR_WO(\1)/g; print

Re: [-next PATCH 4/4] treewide: Use DEVICE_ATTR_WO

2017-12-19 Thread Joe Perches
On Tue, 2017-12-19 at 19:44 +0100, Borislav Petkov wrote: > On Tue, Dec 19, 2017 at 10:15:09AM -0800, Joe Perches wrote: > > Convert DEVICE_ATTR uses to DEVICE_ATTR_WO where possible. > > > > Done with perl script: > > > > $ git grep -w --name-only DEVICE_ATTR | \ > > xargs perl -i -e 'local $/

Re: [-next PATCH 4/4] treewide: Use DEVICE_ATTR_WO

2017-12-19 Thread Borislav Petkov
On Tue, Dec 19, 2017 at 10:15:09AM -0800, Joe Perches wrote: > Convert DEVICE_ATTR uses to DEVICE_ATTR_WO where possible. > > Done with perl script: > > $ git grep -w --name-only DEVICE_ATTR | \ > xargs perl -i -e 'local $/; while (<>) { > s/\bDEVICE_ATTR\s*\(\s*(\w+)\s*,\s*\(?(?:\s*S_IWUSR\s*

Re: [-next PATCH 4/4] treewide: Use DEVICE_ATTR_WO

2017-12-19 Thread Borislav Petkov
On Tue, Dec 19, 2017 at 10:51:14AM -0800, Joe Perches wrote: > > The reason for the code churn being? > > Consistency for easier grep by use-type. Please explain that in the commit message so that we know why it was changed. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid to

Re: [-next PATCH 0/4] sysfs and DEVICE_ATTR_

2017-12-19 Thread Corey Minyard
On 12/19/2017 12:15 PM, Joe Perches wrote: drivers/char/ipmi/ipmi_msghandler.c| 17 +++--- For ipmi: Acked-by: Corey Minyard

Re: [net] Revert "net: core: maybe return -EEXIST in __dev_alloc_name"

2017-12-19 Thread Michael Ellerman
Hi Johannes, > From: Johannes Berg > > This reverts commit d6f295e9def0; some userspace (in the case > we noticed it's wpa_supplicant), is relying on the current > error code to determine that a fixed name interface already > exists. > > Reported-by: Jouni Malinen > Signed-off-by: Johannes Ber

Re: [-next PATCH 0/4] sysfs and DEVICE_ATTR_

2017-12-19 Thread Jani Nikula
On Tue, 19 Dec 2017, Joe Perches wrote: > drivers/gpu/drm/i915/i915_sysfs.c | 12 ++-- For i915, Acked-by: Jani Nikula -- Jani Nikula, Intel Open Source Technology Center

Re: revamp vmem_altmap / dev_pagemap handling V2

2017-12-19 Thread Dan Williams
On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > > Hi all, > > this series started with two patches from Logan that now are in the > middle of the series to kill the memremap-internal pgmap structure > and to redo the dev_memreamp_pages interface to be better suitable > for future PCI P

Re: [PATCH v9 29/51] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface

2017-12-19 Thread Benjamin Herrenschmidt
On Mon, 2017-12-18 at 14:28 -0800, Dave Hansen wrote: > > We do not have generic support for something like that on ppc. > > The kernel looks at the device tree to determine what hardware features > > are available. But does not have mechanism to tell the hardware to track > > which of its features

Re: [PATCH] On ppc64le we HAVE_RELIABLE_STACKTRACE

2017-12-19 Thread Josh Poimboeuf
On Tue, Dec 19, 2017 at 12:28:33PM +0100, Torsten Duwe wrote: > On Mon, Dec 18, 2017 at 12:56:22PM -0600, Josh Poimboeuf wrote: > > On Mon, Dec 18, 2017 at 03:33:34PM +1000, Nicholas Piggin wrote: > > > On Sun, 17 Dec 2017 20:58:54 -0600 > > > Josh Poimboeuf wrote: > > > > > > > On Fri, Dec 15, 2

[PATCH 1/1] vas: vas_window_init_dbgdir: fix order of cleanup.

2017-12-19 Thread Sukadev Bhattiprolu
Fix the order of cleanup to ensure we free the name buffer in case of an error creating 'hvwc' or 'info' files. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/platforms/powernv/vas-debug.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/pow

[PATCH 1/1] powerpc: Emulate paste instruction

2017-12-19 Thread Sukadev Bhattiprolu
From: Michael Neuling On POWER9 DD2.1 and below there are issues when the paste instruction generates an error. If an error occurs when thread reconfiguration happens (ie another thread in the core goes into/out of powersave) the core may hang. To avoid this a special sequence is required which

[PATCH] powerpc: Add aacraid and nvme to powernv_defconfig

2017-12-19 Thread Benjamin Herrenschmidt
These adapters can be found in a number of our systems, so let's enable the corresponding drivers by default. Signed-off-by: Benjamin Herrenschmidt --- --- a/arch/powerpc/configs/powernv_defconfig2017-12-19 18:37:24.803470591 -0600 +++ b/arch/powerpc/configs/powernv_defconfig2017-12-19 1

Re: [PATCH] powerpc: Add aacraid and nvme to powernv_defconfig

2017-12-19 Thread Alexey Kardashevskiy
On 20/12/17 12:51, Benjamin Herrenschmidt wrote: > These adapters can be found in a number of our systems, so let's > enable the corresponding drivers by default. > > Signed-off-by: Benjamin Herrenschmidt > --- > --- a/arch/powerpc/configs/powernv_defconfig 2017-12-19 18:37:24.803470591 > -0600

Re: [PATCH] powerpc: Add aacraid and nvme to powernv_defconfig

2017-12-19 Thread Benjamin Herrenschmidt
On Wed, 2017-12-20 at 12:59 +1100, Alexey Kardashevskiy wrote: > On 20/12/17 12:51, Benjamin Herrenschmidt wrote: > > These adapters can be found in a number of our systems, so let's > > enable the corresponding drivers by default. > > > > Signed-off-by: Benjamin Herrenschmidt > > --- > > --- a/a

[PATCH v10 00/17] powerpc: "paca->soft_enabled" based local atomic operation implementation

2017-12-19 Thread Madhavan Srinivasan
Local atomic operations are fast and highly reentrant per CPU counters. Used for percpu variable updates. Local atomic operations only guarantee variable modification atomicity wrt the CPU which owns the data and these needs to be executed in a preemption safe way. Here is the design of the patchs

[PATCH v10 01/17] powerpc/64: do not trace irqs-off at interrupt return to soft-disabled context

2017-12-19 Thread Madhavan Srinivasan
From: Nicholas Piggin When an interrupt is returning to a soft-disabled context (which can happen for non-maskable interrupts or synchronous interrupts), it goes through the motions of soft-disabling again, including calling TRACE_DISABLE_INTS (i.e., trace_hardirqs_off()). This is not necessary,

[PATCH v10 02/17] powerpc/64: Add #defines for paca->soft_enabled flags

2017-12-19 Thread Madhavan Srinivasan
Two #defines, IRQ_ENABLED and IRQ_DISABLED, are added to be used when updating paca->soft_enabled. Replace the hardcoded values used when updating paca->soft_enabled with IRQ_[EN/DIS]ABLED. No logic change. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/exception-64s.h | 2 +-

[PATCH v10 03/17] powerpc/64: Improve inline asm in arch_local_irq_disable

2017-12-19 Thread Madhavan Srinivasan
From: Nicholas Piggin arch_local_irq_disable is implemented strangely, with a temporary output register being set to the desired soft_enabled value via an immediate input, which is then used to store to memory. This is not required, the immediate can be specified directly as a register input. Fo

[PATCH v10 04/17] powerpc/64: Fix arch_local_irq_disable() prototype

2017-12-19 Thread Madhavan Srinivasan
In powerpc/64, the arch_local_irq_disable() function returns unsigned long, which is not consistent with other architectures. Move that set-return asm implementation into arch_local_irq_save(), and make arch_local_irq_disable() return void, simplifying the assembly. Suggested-by: Nicholas Piggin

[PATCH v10 05/17] powerpc/64: move set_soft_enabled(), rename it, add memory clobber

2017-12-19 Thread Madhavan Srinivasan
Move set_soft_enabled() from powerpc/kernel/irq.c to asm/hw_irq.c, and have existing open-coded updates to paca->soft_enabled go via this access function. Add a "memory" clobber to tell the compiler that paca->soft_enabled has changed (gcc can't see the access through the r13 paca register). It i

[PATCH v10 06/17] powerpc/64: Implement and use soft_enabled_return API

2017-12-19 Thread Madhavan Srinivasan
Add a new wrapper function, soft_enabled_return(), added to return paca->soft_enabled value. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 21 + arch/powerpc/kernel/time.c| 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --g

[PATCH v10 07/17] powerpc/64: Implement and use soft_enabled_set_return API

2017-12-19 Thread Madhavan Srinivasan
Add a new wrapper function, soft_enabled_set_return(), added to do the paca->soft_enabled updates requiring a set-return. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/arch/

[PATCH v10 08/17] powerpc/64: Cleanup hard_irq_disable() macro

2017-12-19 Thread Madhavan Srinivasan
Minor cleanup to use helper function for manipulating paca->soft_enabled variable. Suggested-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/hw_irq.h

[PATCH v10 09/17] powerpc/64: Change soft_enabled from flag to bitmask

2017-12-19 Thread Madhavan Srinivasan
"paca->soft_enabled" is used as a flag to mask some of interrupts. Currently supported flags values and their details: soft_enabledMSR[EE] 0 0 Disabled (PMI and HMI not masked) 1 1 Enabled "paca->soft_enabled" is initialized to 1 to make the interripts

[PATCH v10 10/17] powerpc/64: Rename soft_enabled to irq_soft_mask

2017-12-19 Thread Madhavan Srinivasan
Rename the paca->soft_enabled to paca->irq_soft_mask as it is no longer used as a flag for interrupt state, but a mask. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/exception-64s.h | 6 +-- arch/powerpc/include/asm/hw_irq.h| 70 +--- arch/p

[PATCH v10 11/17] powerpc/64s: Avoid using EXCEPTION_PROLOG_1 macro in MASKABLE_*

2017-12-19 Thread Madhavan Srinivasan
Currently we use both EXCEPTION_PROLOG_1 and __EXCEPTION_PROLOG_1 in the MASKABLE_* macros. As a cleanup, this patch makes MASKABLE_* to use only __EXCEPTION_PROLOG_1. There is not logic change. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/exception-64s.h | 6 +++--- 1 file ch

[PATCH v10 12/17] powerpc/64s: Add support to take additional parameter in MASKABLE_* macro

2017-12-19 Thread Madhavan Srinivasan
To support addition of "bitmask" to MASKABLE_* macros, factor out the EXCPETION_PROLOG_1 macro. Make it explicit the interrupt masking supported by a gievn interrupt handler. Patch correspondingly extends the MASKABLE_* macros with an addition's parameter. "bitmask" parameter is passed to SOFTEN_T

[PATCH v10 13/17] powerpc/64s: Add support to mask perf interrupts and replay them

2017-12-19 Thread Madhavan Srinivasan
Two new bit mask field "IRQ_DISABLE_MASK_PMU" is introduced to support the masking of PMI and "IRQ_DISABLE_MASK_ALL" to aid interrupt masking checking. Couple of new irq #defs "PACA_IRQ_PMI" and "SOFTEN_VALUE_0xf0*" added to use in the exception code to check for PMI interrupts. In the masked_int

[PATCH v10 14/17] powerpc: Add new kconfig IRQ_DEBUG_SUPPORT

2017-12-19 Thread Madhavan Srinivasan
New Kconfig is added "CONFIG_IRQ_DEBUG_SUPPORT" to add warn_on to alert the invalid transitions. Also moved the code under the CONFIG_TRACE_IRQFLAGS in arch_local_irq_restore() to new Kconfig. Reviewed-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/Kconfig.debug

[PATCH v10 15/17] powerpc/64s: Add new set of irq_soft_mask_ functions for PMI masking

2017-12-19 Thread Madhavan Srinivasan
To support soft-masking of the performance monitor interrupt, a set of new powerpc_local_irq_pmu_save() and powerpc_local_irq_restore() functions are added. And powerpc_local_irq_save() implemented, by adding a new irq_soft_mask manipulation function irq_soft_mask_or_return(). Local_irq_pmu_* macr

[PATCH v10 16/17] powerpc: use generic atomic implementation for local_t

2017-12-19 Thread Madhavan Srinivasan
powerpc implements local_t with atomic operations. There is already an asm-generic implementation which does this using atomic_t. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/local.h | 171 +-- 1 file changed, 1 insertion(+), 170 deletions(-

[PATCH v10 17/17] powerpc/64s: Implement local_t using irq soft masking

2017-12-19 Thread Madhavan Srinivasan
local_t is used for atomic modifications for per-CPU data, versus re-entrant modifications via interrupts. local_t read-modify-write atomic operations are currently implemented with hardware atomics (larx/stcx), which are quite slow. This patch implements them by masking all types of interrupts th

[PATCH] powerpc/pseries: Increase memory block size to 1GB on radix

2017-12-19 Thread Michael Ellerman
When we're using the Radix MMU we map the kernel linear mapping with 1G pages. That means we must do memory hot remove in blocks of at least that size. Otherwise the linear mapping can end up not mapping all of memory because we've removed part of a 1G region but unmapped the entire 1G region from

Re: [PATCH v10 00/17] powerpc: "paca->soft_enabled" based local atomic operation implementation

2017-12-19 Thread Nicholas Piggin
On Wed, 20 Dec 2017 09:25:40 +0530 Madhavan Srinivasan wrote: > Local atomic operations are fast and highly reentrant per CPU counters. > Used for percpu variable updates. Local atomic operations only guarantee > variable modification atomicity wrt the CPU which owns the data and > these needs to

Re: [PATCH V4] cxl: Add support for ASB_Notify on POWER9

2017-12-19 Thread Vaibhav Jain
Hi Christophe, Thanks for the changes to the patch. Few minor review comments: Christophe Lombard writes: > @@ -362,3 +363,17 @@ void cxl_context_mm_count_put(struct cxl_context *ctx) > if (ctx->mm) > mmdrop(ctx->mm); > } > + > +int cxl_context_thread_tidr(struct cxl_contex

[PATCH v2] cpufreq: powernv: Add support of frequency domain

2017-12-19 Thread Abhishek Goel
Frequency-domain indicates group of CPUs that would share same frequency. It is detected using device-tree node "frequency-domain-indicator". frequency-domain-indicator is a bitmask which will have different value depending upon the generation of the processor. CPUs of the same chip for which the

Re: [PATCH v2] cpufreq: powernv: Add support of frequency domain

2017-12-19 Thread Viresh Kumar
On 20-12-17, 12:12, Abhishek Goel wrote: > diff --git a/drivers/cpufreq/powernv-cpufreq.c > b/drivers/cpufreq/powernv-cpufreq.c > index b6d7c4c..fd642bc 100644 > --- a/drivers/cpufreq/powernv-cpufreq.c > +++ b/drivers/cpufreq/powernv-cpufreq.c > @@ -37,6 +37,7 @@ > #include /* Required for cpu_s