[PATCH 35/35] sound/soc: Convert remaining uses of pr_warning to pr_warn

2017-02-16 Thread Joe Perches
To enable eventual removal of pr_warning This makes pr_warn use consistent for sound/soc Prior to this patch, there were 5 uses of pr_warning and 10 uses of pr_warn in sound/soc Signed-off-by: Joe Perches --- sound/soc/fsl/imx-audmux.c | 6 +++---

[PATCH 31/35] drivers/tty: Convert remaining uses of pr_warning to pr_warn

2017-02-16 Thread Joe Perches
To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/tty Prior to this patch, there were 2 uses of pr_warning and 23 uses of pr_warn in drivers/tty Signed-off-by: Joe Perches --- drivers/tty/hvc/hvcs.c | 2 +- drivers/tty/tty_io.c | 4 ++--

[PATCH 06/35] powerpc: Convert remaining uses of pr_warning to pr_warn

2017-02-16 Thread Joe Perches
To enable eventual removal of pr_warning This makes pr_warn use consistent for arch/powerpc Prior to this patch, there were 36 uses of pr_warning and 217 uses of pr_warn in arch/powerpc Signed-off-by: Joe Perches --- arch/powerpc/kernel/pci-common.c| 4 ++--

[PATCH 00/35] treewide trivial patches converting pr_warning to pr_warn

2017-02-16 Thread Joe Perches
There are ~4300 uses of pr_warn and ~250 uses of the older pr_warning in the kernel source tree. Make the use of pr_warn consistent across all kernel files. This excludes all files in tools/ as there is a separate define pr_warning for that directory tree and pr_warn is not used in tools/. Done

[PATCH 21/35] drivers/macintosh: Convert remaining uses of pr_warning to pr_warn

2017-02-16 Thread Joe Perches
To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/macintosh Prior to this patch, there were 10 uses of pr_warning and 1 use of pr_warn in drivers/macintosh Signed-off-by: Joe Perches --- drivers/macintosh/windfarm_fcu_controls.c | 5

Re: [PATCH v7 3/4] powerpc/pseries: Implement indexed-count hotplug memory add

2017-02-16 Thread Michael Ellerman
Nathan Fontenot writes: > diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c > b/arch/powerpc/platforms/pseries/hotplug-memory.c > index 9609a72..0d1aa77 100644 > --- a/arch/powerpc/platforms/pseries/hotplug-memory.c > +++

[PATCH] powerpc/powernv: Make PCI non-optional

2017-02-16 Thread Michael Ellerman
Bare metal systems without PCI don't exist, so there's no real point in making PCI optional, it just breaks the build from time to time. In fact the build is broken now if you turn off PCI_MSI but enable KVM. Using select for PCI is OK because we (powerpc) define config PCI, and it has no

[RFC PATCH 9/9] powerpc/traps: Use SRR1 defines for program check reasons

2017-02-16 Thread Michael Ellerman
Currently we open code the reason codes for program checks. Instead use the existing SRR1 defines. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/reg.h | 1 + arch/powerpc/kernel/traps.c| 10 +- 2 files changed, 6 insertions(+), 5 deletions(-)

[RFC PATCH 8/9] powerpc/mce: Move 64-bit machine check code into mce.c

2017-02-16 Thread Michael Ellerman
We already have mce.c which is built for 64bit and contains other parts of the machine check code, so move these bits in there too. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/mce.c | 35 +++ arch/powerpc/kernel/traps.c | 35

[RFC PATCH 7/9] powerpc/traps: machine_check_generic() is only used on 32-bit

2017-02-16 Thread Michael Ellerman
Make it clear that the fallback version of machine_check_generic() is only used on 32-bit configs. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/traps.c

[RFC PATCH 6/9] powerpc/traps: Inline get_mc_reason()

2017-02-16 Thread Michael Ellerman
get_mc_reason() no longer provides (if it ever really did) any meaningful abstraction, so remove it. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/traps.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git

[RFC PATCH 5/9] powerpc/4xx: Move machine_check_4xx() into platforms/4xx

2017-02-16 Thread Michael Ellerman
Now that we have 4xx platform directory we can move the 4xx machine check handler in there. Again we drop get_mc_reason() and replace it with regs->dsisr directly (which is actually SPRN_ESR). Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/traps.c|

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

2017-02-16 Thread Michael Ellerman
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 we don't actually define any machines in the 4xx platform, as is usual for a platform directory. But still it seems like a better

[RFC PATCH 3/9] powerpc/44x: Move 44x machine check handlers into platforms/44x

2017-02-16 Thread Michael Ellerman
We have several 44x machine check handlers defined in traps.c. It would be preferable if they were split out with the platforms that use them. Do that. In the process, drop get_mc_reason() and instead just open code the lookup of reason from regs->dsisr. This avoids a pointless layer of

[RFC PATCH 2/9] powerpc/44x: Simplify CONFIG_44x checks in Makefile

2017-02-16 Thread Michael Ellerman
The entire 44x directory is omitted if CONFIG_44x is not enabled, so within the 44x/Makefile CONFIG_44x is always y. So convert obj-$(CONFIG_44x) to the more obvious obj-y. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/44x/Makefile | 4 ++-- 1 file changed, 2

[RFC PATCH 1/9] powerpc/47x: Guard 47x cputable entries with CONFIG_PPC_47x

2017-02-16 Thread Michael Ellerman
Currently we build the 47x cputable entries even when CONFIG_PPC_47x is disabled. That means a kernel built without CONFIG_PPC_47x will claim to support a 47x CPU and start booting, only to break somewhere later because it doesn't have 47x support compiled in. So guard the 47x cputable entries

[PATCH] powerpc/mpc52xx: Don't select user-visible RTAS_PROC

2017-02-16 Thread Michael Ellerman
Otherwise we might select it when its dependenices aren't enabled, leading to a build break. It's default y anyway, so will be on unless someone disables it manually. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/52xx/Kconfig | 1 - 1 file changed, 1

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

2017-02-16 Thread Michael Ellerman
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 @@ static inline unsigned long >

Re: [PATCH] powerpc/xmon: Fix an unexpected xmon onoff state change

2017-02-16 Thread Michael Ellerman
Pan Xinhui writes: > diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c > index 9c0e17c..f6e5c3d 100644 > --- a/arch/powerpc/xmon/xmon.c > +++ b/arch/powerpc/xmon/xmon.c > @@ -76,6 +76,7 @@ static int xmon_gate; > #endif /* CONFIG_SMP */ > > static

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

2017-02-16 Thread Uma Krishnan
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 --- drivers/misc/cxl/pci.c | 1 + 1 file

[PATCH] cxlflash: Enable PCI device ID for future IBM CXL Flash AFU

2017-02-16 Thread Uma Krishnan
From: "Matthew R. Ochs" Add support for a future IBM Coherent Accelerator (CXL) flash AFU with an ID of 0x0624. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan --- drivers/scsi/cxlflash/main.c | 4

Re: [PATCH] powerpc: Detect POWER9 architected mode

2017-02-16 Thread Suraj Jitindar Singh
On Fri, 2017-02-17 at 10:59 +1100, Russell Currey wrote: > Signed-off-by: Russell Currey Tested-in-QEMU-by: Suraj Jitindar Singh > --- >  arch/powerpc/kernel/cputable.c | 19 +++ >  1 file changed, 19 insertions(+) > > diff --git

[PATCH v2] powerpc: Add POWER9 architected mode to cputable

2017-02-16 Thread Russell Currey
PVR value of 0x0F05 means we are arch v3.00 compliant (i.e. POWER9). Acked-by: Michael Neuling Signed-off-by: Russell Currey --- arch/powerpc/kernel/cputable.c | 19 +++ 1 file changed, 19 insertions(+) diff --git

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

2017-02-16 Thread Stephen Rothwell
Hi all, 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 commit: 8c8b73c4811f ("sched/cputime, powerpc: Prepare accounting structure

Re: [PATCH] powerpc: Detect POWER9 architected mode

2017-02-16 Thread Russell Currey
On Fri, 2017-02-17 at 11:57 +1100, Michael Neuling wrote: > Can you make the comment/title a bit more descriptive...  Have a look at > c674e703cb1028e468527163074810b4a17bf379 where we added the p8. > I had a look at that when I was making the commit but I didn't think it really added anything

Re: [PATCH] powerpc: Detect POWER9 architected mode

2017-02-16 Thread Michael Neuling
Can you make the comment/title a bit more descriptive... Have a look at c674e703cb1028e468527163074810b4a17bf379 where we added the p8. > Signed-off-by: Russell Currey Other than that, the code looks good.. Acked-By: Michael Neuling > --- >  

Re: [PATCH 4/4] powerpc/powernv: handle POWER9 machine checks

2017-02-16 Thread kbuild test robot
Hi Nicholas, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.10-rc8 next-20170216] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/POWER9-machine-check

[PATCH v2 1/3] powerpc/xmon: Fix an unexpected xmon on/off state change

2017-02-16 Thread Guilherme G. Piccoli
From: Pan Xinhui Once xmon is triggered by sysrq-x, it is enabled always afterwards even if it is disabled during boot. This will cause a system reset interrupt fail to dump. So keep xmon in its original state after exit. We have several ways to set xmon on or

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

2017-02-16 Thread 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 mechanism. But we cannot enable/disable xmon in runtime, it needs kernel reload. This patch introduces a

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

2017-02-16 Thread Guilherme G. Piccoli
The xmon parameter nobt was added long time ago, by commit 26c8af5f01df ("[POWERPC] print backtrace when entering xmon"). The problem that time was that during a crash in a machine with USB keyboard, xmon wouldn't respond to commands from the keyboard, so printing the backtrace wouldn't be

[PATCH 0/3] powerpc/xmon: improvements and fixes

2017-02-16 Thread Guilherme G. Piccoli
This series contains some improvements and fixes to xmon: 1) Pan Xinhui fixed a long-term bug, in which the xmon debugger got stuck enabled after user invoked it using sysrq, regardless of its state set in the kernel command-line. 2) A debugfs entry was added in order to allow user to

Re: [PATCH 3/4] powerpc/powernv: cope with non-synchronous machine checks

2017-02-16 Thread kbuild test robot
Hi Nicholas, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.10-rc8 next-20170216] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/POWER9-machine-check

[PATCH] powerpc: Detect POWER9 architected mode

2017-02-16 Thread Russell Currey
Signed-off-by: Russell Currey --- arch/powerpc/kernel/cputable.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 6a82ef039c50..d23a54b09436 100644 ---

Re: [PATCH 0/3] pci/hotplug/pnv-php: More bug fixes

2017-02-16 Thread Gavin Shan
On Thu, Feb 16, 2017 at 05:28:54PM -0600, Bjorn Helgaas wrote: >On Fri, Feb 17, 2017 at 09:38:08AM +1100, Gavin Shan wrote: >> On Thu, Feb 16, 2017 at 08:09:26AM -0600, Bjorn Helgaas wrote: >> >On Thu, Feb 16, 2017 at 10:22:31AM +1100, Gavin Shan wrote: >> >> This series bases on the series: >>

Re: [PATCH 0/3] pci/hotplug/pnv-php: More bug fixes

2017-02-16 Thread Bjorn Helgaas
On Fri, Feb 17, 2017 at 09:38:08AM +1100, Gavin Shan wrote: > On Thu, Feb 16, 2017 at 08:09:26AM -0600, Bjorn Helgaas wrote: > >On Thu, Feb 16, 2017 at 10:22:31AM +1100, Gavin Shan wrote: > >> This series bases on the series: https://patchwork.ozlabs.org/patch/713513. > >> This series fixes couple

Re: [PATCH 0/3] pci/hotplug/pnv-php: More bug fixes

2017-02-16 Thread Gavin Shan
On Thu, Feb 16, 2017 at 08:09:26AM -0600, Bjorn Helgaas wrote: >On Thu, Feb 16, 2017 at 10:22:31AM +1100, Gavin Shan wrote: >> This series bases on the series: https://patchwork.ozlabs.org/patch/713513. >> This series fixes couple of issues: >> >>* Remove WARN_ON() in pnv_php_put_slot(). The

linux-next: manual merge of the powerpc tree with Linus' tree

2017-02-16 Thread Stephen Rothwell
Hi all, FIXME: Add owner of second tree to To: Add author(s)/SOB of conflicting commits. Today's linux-next merge of the powerpc tree got a conflict in: arch/powerpc/kernel/asm-offsets.c between commit: f2574030b0e3 ("powerpc: Revert the initial stack protector support") from

Re: [PATCH 4/4] powerpc/powernv: handle POWER9 machine checks

2017-02-16 Thread kbuild test robot
Hi Nicholas, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.10-rc8 next-20170216] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/POWER9-machine-check

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

2017-02-16 Thread Josh Poimboeuf
On Thu, Feb 16, 2017 at 03:33:26PM +0100, Miroslav Benes wrote: > > > @@ -347,22 +356,36 @@ static int __klp_enable_patch(struct klp_patch *patch) > > > > pr_notice("enabling patch '%s'\n", patch->mod->name); > > > > + klp_init_transition(patch, KLP_PATCHED); > > + > > + /* > > +*

Re: [PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-16 Thread Naveen N. Rao
On 2017/02/15 04:11PM, Masami Hiramatsu wrote: > Hi Naveen, > > On Wed, 15 Feb 2017 00:28:34 +0530 > "Naveen N. Rao" wrote: > > > diff --git a/arch/powerpc/kernel/optprobes.c > > b/arch/powerpc/kernel/optprobes.c > > index e51a045f3d3b..a8f414a0b141 100644 > >

Re: [PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-16 Thread Naveen N. Rao
On 2017/02/15 09:58AM, Ananth N Mavinakayanahalli wrote: > On Wed, Feb 15, 2017 at 12:28:34AM +0530, Naveen N. Rao wrote: > > 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

[PATCH 5/5] powerpc/64s: fix POWER9 machine check handler from stop state

2017-02-16 Thread Nicholas Piggin
The ISA specifies power save wakeup can cause a machine check interrupt. The machine check handler currently has code to handle that for POWER8, but POWER9 crashes when trying to execute the P8 style sleep instructions. So queue up the machine check, then call into the idle code to wake up as the

[PATCH 4/5] powerpc/64s: consolidate pnv_restore_hyp_resource into pnv_powersave_wakeup

2017-02-16 Thread Nicholas Piggin
There is only one caller, so this reduces spaghetti of subsequent callees returning into the caller. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/idle_book3s.S | 66 +++ 1 file changed, 26 insertions(+), 40 deletions(-) diff

[PATCH 3/5] powerpc/64s: use alternative feature patching

2017-02-16 Thread Nicholas Piggin
This reduces the number of nops for POWER8 Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/idle_book3s.S | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S index

[PATCH 2/5] powerpc/64: stop using bit in HSPRG0 to test winkle

2017-02-16 Thread Nicholas Piggin
The POWER8 idle code has a neat trick of programming the power on engine to restore a low bit into HSPRG0, so idle wakeup code can test and see if it has been programmed this way and therefore lost all state. Restore time can be reduced if winkle has not been reached. However this messes with our

[PATCH 1/5] powerpc/64s: move remaining system reset idle code into idle_book3s.S

2017-02-16 Thread Nicholas Piggin
Should be no functional change. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 26 +--- arch/powerpc/kernel/idle_book3s.S| 39 +++- 2 files changed, 35 insertions(+), 30 deletions(-) diff

[RFC][PATCH 0/5] power saving wakeup changes for POWER9 MCE

2017-02-16 Thread Nicholas Piggin
Hi, This is not a bare minimum fix to get the MCE power saving wakeup working for POWER9, but I had a couple of other things it ended on top of which made things a bit simpler. RFC only at this stage because it needs a bit more testing. It seems to work in simulator though when constructing an

Re: [RFC[PATCH 0/4] POWER9 machine check handler

2017-02-16 Thread Nicholas Piggin
On Fri, 17 Feb 2017 03:01:10 +1000 Nicholas Piggin wrote: > So far I've only got this tested in mambo simulator, but > some recoverable and unrecoverable events seem to work. Ugh, I forgot to update before sending sorry. It's just a couple of small compiler bugs so I'll

[PATCH v2] KVM: PPC: Book3S: Ratelimit copy data failure error messages

2017-02-16 Thread Vipin K Parashar
kvm_ppc_mmu_book3s_32/64 xlat() logs "KVM can't copy data" error upon failing to copy user data to kernel space. This floods kernel log once such fails occur in short time period. Ratelimit this error to avoid flooding kernel logs upon copy data failures. Signed-off-by: Vipin K Parashar

[PATCH 4/4] powerpc/powernv: handle POWER9 machine checks

2017-02-16 Thread Nicholas Piggin
This creates several new error types, and includes non-synchronous exceptions. I don't know if that affects the API beyond there being some unknown types in older code. Some exceptions seem to be initiated by nest or remote/fabric, but reporting of these is not implemented yet. I started with

[PATCH 3/4] powerpc/powernv: cope with non-synchronous machine checks

2017-02-16 Thread Nicholas Piggin
Asynchronous machine checks don't correspond to the instruction or even task that is currently running. Therefore only synchronous machine checks should attempt to kill the currently running task to recover. Signed-off-by: Nicholas Piggin ---

[PATCH 2/4] powerpc/powernv: machine check rework recovery flushing

2017-02-16 Thread Nicholas Piggin
Put the ifdefs into a flush handler call, and have callers ask for particular type of flushes. Also add an ERAT flush. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/mce_power.c | 124 +++- 1 file changed, 59 insertions(+), 65

[PATCH 1/4] powerpc: machine check allow handler to set severity and initiator

2017-02-16 Thread Nicholas Piggin
Currently these are hardcoded values. mce_error_info should not have to be versioned because it's only used for passing data from within the MCE subsystem. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/mce.h | 3 ++- arch/powerpc/kernel/mce.c | 7 ---

[RFC[PATCH 0/4] POWER9 machine check handler

2017-02-16 Thread Nicholas Piggin
So far I've only got this tested in mambo simulator, but some recoverable and unrecoverable events seem to work. Thanks, Nick Nicholas Piggin (4): powerpc: machine check allow handler to set severity and initiator powerpc/powernv: machine check rework recovery flushing powerpc/powernv:

Re: [PATCHv3 4/4] MAINTAINERS: Remove powerpc's opal match

2017-02-16 Thread Jon Derrick
Thanks everyone. Sorry about the mess :) On 02/15/2017 10:23 PM, Michael Ellerman wrote: > Jon Derrick writes: > >> PPC's 'opal' match pattern also matches block/sed-opal.c, where it looks >> like the 'arch/powerpc' file pattern should be enough to match powerpc >>

[PATCH] powerpc: booke: fix boot crash due to null hugepd

2017-02-16 Thread laurentiu.tudor
From: Laurentiu Tudor On 32-bit book-e machines, hugepd_ok() does not take into account null hugepd values, causing this crash at boot: Unable to handle kernel paging request for data at address 0x8000 Faulting instruction address: 0xc00182a8 Oops: Kernel access of

Re: [PATCH 01/10] PCI: dwc: designware: Move the register defines to designware header file

2017-02-16 Thread Jingoo Han
Wednesday, February 15, 2017 8:18 AM, Kishon Vijay Abraham I wrote: > > No functional change. Move the register defines and other macros from > pcie-designware.c to pcie-designware.h. This is in preparation to > split the pcie-designware.c file into designware core file and host > specific file.

Re: [PATCHv4 1/4] block/sed: Use ssize_t on atom parsers to return errors

2017-02-16 Thread Christoph Hellwig
On Wed, Feb 15, 2017 at 02:45:54PM -0700, Jon Derrick wrote: > The short atom parser can return an errno from decoding but does not > currently return the error as a signed value. Convert all of the parsers > to ssize_t. > > Signed-off-by: Jon Derrick > Reviewed-by:

Re: [PATCHv4 3/4] block/sed: Check received header lengths

2017-02-16 Thread Christoph Hellwig
On Wed, Feb 15, 2017 at 02:45:56PM -0700, Jon Derrick wrote: > Add a buffer size check against discovery and response header lengths > before we loop over their buffers. > > Signed-off-by: Jon Derrick > Reviewed-by: Scott Bauer Looks fine,

Re: [PATCHv4 2/4] block/sed: Add helper to qualify response tokens

2017-02-16 Thread Christoph Hellwig
On Wed, Feb 15, 2017 at 02:45:55PM -0700, Jon Derrick wrote: > Add helper which verifies the response token is valid and matches the > expected value. Merges token_type and response_get_token. > > Signed-off-by: Jon Derrick > Reviewed-by: Scott Bauer

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

2017-02-16 Thread Miroslav Benes
> @@ -347,22 +356,36 @@ static int __klp_enable_patch(struct klp_patch *patch) > > pr_notice("enabling patch '%s'\n", patch->mod->name); > > + klp_init_transition(patch, KLP_PATCHED); > + > + /* > + * Enforce the order of the func->transition writes in > + *

Re: [PATCH 0/3] pci/hotplug/pnv-php: More bug fixes

2017-02-16 Thread Bjorn Helgaas
On Thu, Feb 16, 2017 at 10:22:31AM +1100, Gavin Shan wrote: > This series bases on the series: https://patchwork.ozlabs.org/patch/713513. > This series fixes couple of issues: > >* Remove WARN_ON() in pnv_php_put_slot(). The parent slot's refcount > is decreased when releasing PCI slot.

[PATCH 3/4] PCI: dwc: all: Modify dbi accessors to take dbi_base as argument

2017-02-16 Thread Kishon Vijay Abraham I
dwc has 2 dbi address space labeled dbics and dbics2. The existing helper to access dbi address space can access only dbics. However dbics2 has to be accessed for programming the BAR registers in the case of EP mode. This is in preparation for adding EP mode support to dwc driver. Cc: Jingoo Han

[PATCH 4/4] PCI: dwc: all: Modify dbi accessors to access data of 4/2/1 bytes

2017-02-16 Thread Kishon Vijay Abraham I
Previously dbi accessors can be used to access data of size 4 bytes. But there might be situations (like accessing MSI_MESSAGE_CONTROL in order to set/get the number of required MSI interrupts in EP mode) where dbi accessors must be used to access data of size 2. This is in preparation for adding

[PATCH 2/4] PCI: dwc: dra7xx: Populate cpu_addr_fixup ops

2017-02-16 Thread Kishon Vijay Abraham I
Populate cpu_addr_fixup ops to extract the least 28 bits of the corresponding cpu address. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/dwc/pci-dra7xx.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/pci/dwc/pci-dra7xx.c

[PATCH 1/4] PCI: dwc: designware: Add new *ops* for cpu addr fixup

2017-02-16 Thread Kishon Vijay Abraham I
Some platforms (like dra7xx) require only the least 28 bits of the corresponding 32 bit CPU address to be programmed in the address translation unit. This modified address is stored in io_base/mem_base/ cfg0_base/cfg1_base in dra7xx_pcie_host_init. While this is okay for host mode where the

[PATCH 0/4] PCI: dwc: cleanup designware driver

2017-02-16 Thread Kishon Vijay Abraham I
This series does additional cleanup on top of [1] in preparation for adding endpoint mode support to designware driver. This series was previously sent as part of endpoint support series [2]. Once this series is merged, PCI endpoint series can be merged. I'll wait for this series to be merged

Re: powerpc/64: Disable use of radix under a hypervisor

2017-02-16 Thread Michael Ellerman
On Thu, 2017-02-16 at 02:49:21 UTC, Paul Mackerras wrote: > Currently, if the kernel is running on a POWER9 processor under a > hypervisor, it may try to use the radix MMU even though it doesn't have > the necessary code to do so (it doesn't negotiate use of radix, and it > doesn't do the

Re: [PATCH] powerpc/xmon: Fix an unexpected xmon onoff state change

2017-02-16 Thread Pan Xinhui
在 2017/2/16 18:57, Guilherme G. Piccoli 写道: On 16/02/2017 03:09, Michael Ellerman wrote: Pan Xinhui writes: Once xmon is triggered by sysrq-x, it is enabled always afterwards even if it is disabled during boot. This will cause a system reset interrut fail to

BUG: using __this_cpu_read() in preemptible/iommu_range_alloc+0x98/0x3e0

2017-02-16 Thread Sachin Sant
While booting latest mainline kernel on a POWER8 PowerVM LPAR with CONFIG_PREEMPT=y, following messages are observed [7.834713] ibmveth 3002 ibmveth2: renamed from eth0 [7.850025] BUG: using __this_cpu_read() in preemptible [] code: systemd-udevd/266 [7.850068] caller is

Re: [PATCH] powerpc/xmon: Fix an unexpected xmon onoff state change

2017-02-16 Thread Guilherme G. Piccoli
On 16/02/2017 03:09, Michael Ellerman wrote: > Pan Xinhui writes: > >> Once xmon is triggered by sysrq-x, it is enabled always afterwards even >> if it is disabled during boot. This will cause a system reset interrut >> fail to dump. So keep xmon in its original

[PATCH 5/5] powerpc: kprobes: emulate instructions on kprobe handler re-entry

2017-02-16 Thread Naveen N. Rao
On kprobe handler re-entry, try to emulate the instruction rather than single stepping always. As a related change, remove the duplicate saving of msr as that is already done in set_current_kprobe() Acked-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao

[PATCH 4/5] powerpc: kprobes: factor out code to emulate instruction into a helper

2017-02-16 Thread Naveen N. Rao
This helper will be used in a subsequent patch to emulate instructions on re-entering the kprobe handler. No functional change. Acked-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 52

[PATCH 3/5] powerpc: kprobes: fix handling of function offsets on ABIv2

2017-02-16 Thread Naveen N. Rao
commit 239aeba76409 ("perf powerpc: Fix kprobe and kretprobe handling with kallsyms on ppc64le") changed how we use the offset field in struct kprobe on ABIv2. perf now offsets from the GEP (Global entry point) if an offset is specified and otherwise chooses the LEP (Local entry point). Fix the

[PATCH 2/5] kprobes: convert kprobe_lookup_name() to a function

2017-02-16 Thread Naveen N. Rao
The macro is now pretty long and ugly on powerpc. In the light of further changes needed here, convert it to a __weak variant to be over-ridden with a nicer looking function. Suggested-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao ---

[PATCH 1/5] powerpc: introduce a new helper to obtain function entry points

2017-02-16 Thread Naveen N. Rao
kprobe_lookup_name() is specific to the kprobe subsystem and may not always return the function entry point (in a subsequent patch for KPROBES_ON_FTRACE). For looking up function entry points, introduce a separate helper and use the same in optprobes.c Signed-off-by: Naveen N. Rao

Re: [PATCH 37/37] ARM: dts: DRA7: Add pcie1 dt node for EP mode

2017-02-16 Thread Kishon Vijay Abraham I
Hi Tony, On Saturday 21 January 2017 12:00 AM, Tony Lindgren wrote: > * Kishon Vijay Abraham I [170112 02:34]: >> Add pcie1 dt node in order for the controller to operate in >> endpoint mode. However since none of the dra7 based boards have >> slots configured to operate in

Re: [PATCH 30/37] dt-bindings: PCI: dra7xx: Add dt bindings to enable legacy mode

2017-02-16 Thread Kishon Vijay Abraham I
Hi, On Thursday 19 January 2017 03:16 AM, Rob Herring wrote: > On Thu, Jan 12, 2017 at 03:56:19PM +0530, Kishon Vijay Abraham I wrote: >> Update device tree binding documentation of TI's dra7xx PCI >> controller to include property for enabling legacy mode. >> >> Signed-off-by: Kishon Vijay

[PATCH 2/2] perf: powerpc: choose LEP with kretprobes

2017-02-16 Thread Naveen N. Rao
perf now uses an offset from _text/_stext for kretprobes, rather than the actual function name. As such, let's choose the LEP for powerpc ABIv2 so as to ensure the probe gets hit. Signed-off-by: Naveen N. Rao --- tools/perf/arch/powerpc/util/sym-handling.c | 5

[PATCH 1/2] powerpc: kretprobes: override default function entry offset

2017-02-16 Thread Naveen N. Rao
With ABIv2, we offset 8 bytes into a function to get at the local entry point. Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/kernel/kprobes.c

[PATCH 0/2] powerpc: kretprobe updates

2017-02-16 Thread Naveen N. Rao
I am posting the powerpc bits in the same thread so as to keep these changes together. I am not sure how this should be taken upstream as there are atleast three different trees involved: one for the core kprobes infrastructure, one for powerpc and one for perf. Thanks, Naveen Naveen N. Rao (2):