Re: [PATCH kernel] powerpc/iommu: Set default DMA offset in dma_dev_setup

2015-08-27 Thread Alexey Kardashevskiy
On 08/27/2015 04:16 PM, Gavin Shan wrote: On Thu, Aug 27, 2015 at 04:01:16PM +1000, Alexey Kardashevskiy wrote: "powerpc/iommu: Cleanup setting of DMA base/offset" expects that the default DMA offset is set from pnv_ioda_setup_bus_dma() which is correct unless it is SRIOV where the code flow is

[PATCH] cpufreq: powernv: Increase the verbosity of OCC console messages

2015-08-27 Thread Shilpasri G Bhat
Modify the OCC reset/load/active event message to make it clearer for the user to understand the event and effect of the event. Suggested-by: Stewart Smith Signed-off-by: Shilpasri G Bhat --- This patch is based on top of linux-next/master drivers/cpufreq/powernv-cpufreq.c | 9 + 1 fil

[PATCH] cpufreq: powernv: Export frequency throttle state of the chip through sysfs

2015-08-27 Thread Shilpasri G Bhat
Create a sysfs 'throttle' attribute per-chip(per-numa-node) to reflect the throttle state of the chip. The usersapce programs can poll on this attribute to keep an eye on the throttle state. Currently we print a log message to notify the user of throttling event. The performance-sensitive applicati

Re: [PATCH] cpufreq: powernv: Export frequency throttle state of the chip through sysfs

2015-08-27 Thread Michael Ellerman
On Thu, 2015-08-27 at 14:43 +0530, Shilpasri G Bhat wrote: > Create a sysfs 'throttle' attribute per-chip(per-numa-node) to reflect > the throttle state of the chip. The usersapce programs can poll on > this attribute to keep an eye on the throttle state. Currently we > print a log message to notif

Re: [kernel] powerpc/iommu: Set default DMA offset in dma_dev_setup

2015-08-27 Thread Michael Ellerman
On Thu, 2015-27-08 at 06:01:16 UTC, Alexey Kardashevskiy wrote: > "powerpc/iommu: Cleanup setting of DMA base/offset" expects that This should be: Commit e91c25111aa3 "powerpc/iommu: Cleanup setting of DMA base/offset" ... > the default DMA offset is set from pnv_ioda_setup_bus_dma() which > is

Re: [PATCH V2 04/10] kasan: Don't use kasan shadow pointer in generic functions

2015-08-27 Thread Andrey Ryabinin
2015-08-26 11:54 GMT+03:00 Aneesh Kumar K.V : > > Missed to cherry-pick the updated version of this patch, before sending > the series out. > > commit aeb324e09d95c189eda4ce03790da94b535d1dfc > Author: Aneesh Kumar K.V > Date: Fri Aug 14 12:28:58 2015 +0530 > > kasan: Don't use kasan shadow

Re: [PATCH V2 05/10] kasan: Enable arch to hook into kasan callbacks.

2015-08-27 Thread Andrey Ryabinin
2015-08-26 11:26 GMT+03:00 Aneesh Kumar K.V : > We add enable/disable callbacks in this patch which architecture > can implemement. We will use this in the later patches for architecture > like ppc64, that cannot have early zero page kasan shadow region for the > entire virtual address space. Such

Re: [PATCH V2 06/10] kasan: Allow arch to overrride kasan shadow offsets

2015-08-27 Thread Andrey Ryabinin
2015-08-26 11:26 GMT+03:00 Aneesh Kumar K.V : > Some archs may want to provide kasan shadow memory as a constant > offset from the address. Such arch even though cannot use inline kasan > support, they can work with outofline kasan support. > > Signed-off-by: Aneesh Kumar K.V > --- > include/linu

[PATCH 1/2] cxl: Fix + cleanup error paths in cxl_dev_context_init

2015-08-27 Thread Ian Munsie
From: Ian Munsie If the cxl_context_alloc() call fails, we return immediately without releasing the reference on the AFU device, allowing it to leak. This patch switches to using goto style error handling so that the device is released in common code for both error paths, and will also simplify

[PATCH 2/2] cxl: Fix force unmapping mmaps of contexts allocated through the kernel api

2015-08-27 Thread Ian Munsie
From: Ian Munsie The cxl user api uses the address_space associated with the file when we need to force unmap all cxl mmap regions (e.g. on eeh, driver detach, etc). Currently, contexts allocated through the kernel api do not do this and instead skip the mmap invalidation, potentially allowing th

Re: [PATCH] cpufreq: powernv: Export frequency throttle state of the chip through sysfs

2015-08-27 Thread Shilpasri G Bhat
On 08/27/2015 03:01 PM, Michael Ellerman wrote: > On Thu, 2015-08-27 at 14:43 +0530, Shilpasri G Bhat wrote: >> Create a sysfs 'throttle' attribute per-chip(per-numa-node) to reflect >> the throttle state of the chip. The usersapce programs can poll on >> this attribute to keep an eye on the thro

Re: [v2] powerpc/configs: Enable LEDS support

2015-08-27 Thread Michael Ellerman
On Thu, 2015-27-08 at 06:04:10 UTC, Vasant Hegde wrote: > Commit 84ad6e5c added LEDS support for PowerNV platform. Lets > update ppc64_defconfig to pick LEDS driver. > > PowerNV LEDS driver looks for "/ibm,opal/leds" node in device > tree and loads if this node exists. Hence added it as 'm'. > >

Re: Ping Re: [PATCH 0/8] math-emu: Update kernel math-emu code from current glibc soft-fp

2015-08-27 Thread Martin Schwidefsky
On Thu, 27 Aug 2015 13:12:05 +1000 Michael Ellerman wrote: > On Wed, 2015-08-26 at 14:44 +, Joseph Myers wrote: > > On Thu, 20 Aug 2015, Michael Ellerman wrote: > > > > > On Wed, 2015-08-19 at 14:39 +, Joseph Myers wrote: > > > > I'd like to ping this patch series, not having seen any co

Re: [v2] powerpc/configs: Enable LEDS support

2015-08-27 Thread Vasant Hegde
On 08/27/2015 03:56 PM, Michael Ellerman wrote: > On Thu, 2015-27-08 at 06:04:10 UTC, Vasant Hegde wrote: >> Commit 84ad6e5c added LEDS support for PowerNV platform. Lets >> update ppc64_defconfig to pick LEDS driver. >> >> PowerNV LEDS driver looks for "/ibm,opal/leds" node in device >> tree and l

Re: [PATCH V2 07/10] kasan: Make INLINE KASan support arch selectable

2015-08-27 Thread Andrey Ryabinin
2015-08-26 11:26 GMT+03:00 Aneesh Kumar K.V : > Some of the archs, may find it difficult to support inline KASan > mode. Add HAVE_ARCH_KASAN_INLINE so that we can disable inline > support at config time. > > Signed-off-by: Aneesh Kumar K.V > --- > arch/x86/Kconfig | 1 + > lib/Kconfig.kasa

Re: [PATCH V2 09/10] kasan: Prevent deadlock in kasan reporting

2015-08-27 Thread Andrey Ryabinin
2015-08-26 11:26 GMT+03:00 Aneesh Kumar K.V : > We we end up calling kasan_report in real mode, our shadow mapping > for even spinlock variable will show poisoned. Generally I agree with this patch. We should disable reports when we print report as early as possible to prevent recursion in case of

Re: [PATCH V2 10/10] powerpc/mm: kasan: Add kasan support for ppc64

2015-08-27 Thread Andrey Ryabinin
2015-08-26 11:26 GMT+03:00 Aneesh Kumar K.V : > + k_start = (unsigned long)kasan_mem_to_shadow(start); > + k_end = (unsigned long)kasan_mem_to_shadow(end); > + for (; k_start < k_end; k_start += page_size) { > + p = vmemmap_alloc_block

Re: [PATCH] cpufreq: powernv: Increase the verbosity of OCC console messages

2015-08-27 Thread Viresh Kumar
On 27-08-15, 14:41, Shilpasri G Bhat wrote: > Modify the OCC reset/load/active event message to make it clearer for > the user to understand the event and effect of the event. > > Suggested-by: Stewart Smith > Signed-off-by: Shilpasri G Bhat > --- > This patch is based on top of linux-next/maste

Re: [kernel] powerpc/iommu: Set default DMA offset in dma_dev_setup

2015-08-27 Thread Alexey Kardashevskiy
On 08/27/2015 07:37 PM, Michael Ellerman wrote: On Thu, 2015-27-08 at 06:01:16 UTC, Alexey Kardashevskiy wrote: "powerpc/iommu: Cleanup setting of DMA base/offset" expects that This should be: Commit e91c25111aa3 "powerpc/iommu: Cleanup setting of DMA base/offset" ... Is not this format for

Re: [PATCH 3/5] dma-mapping: cosolidate dma_mapping_error

2015-08-27 Thread Andy Shevchenko
On Mon, Aug 17, 2015 at 10:06 AM, Christoph Hellwig wrote: > Currently there are three valid implementations of dma_mapping_error: > > (1) call ->mapping_error > (2) check for a hardcoded error code > (3) always return 0 > > This patch provides a common implementation that calls ->mapping_error

Strange reports of perf events on powerpc 83xx

2015-08-27 Thread leroy christophe
Hi, Has anybody already used 'perf' tool on powerpc MPC83xx ? I have been succesfully using perf on MPC8xx, but on MPC83xx I get something strange. perf record/report reports addresses on user stack, as if it was mixing up D accesses and I accesses. Any idea of what the problem can be ? #

Kernel access of bad area on kernel 4.1.6

2015-08-27 Thread Ilia Mirkin
I've recently come into the possession of a PowerMac7,3 and have been cross-compiling a chroot for it on my (x86_64) desktop. However elfutils doesn't cross-compile for ppc64 due to its biarch m4 script which tries to execute a built program, so I kicked off a build locally and left for a few minut

[RFC PATCH 1/9] powerpc: allocate sys_membarrier system call number

2015-08-27 Thread Mathieu Desnoyers
Allow it to be used from SPU, since it should not have unwanted side-effects. [ Untested on this architecture. To try it out: fetch linux-next/akpm, apply this patch, build/run a membarrier-enabled kernel, and do make kselftest. ] Signed-off-by: Mathieu Desnoyers CC: Andrew Morton CC: linux

Re: [kernel] powerpc/iommu: Set default DMA offset in dma_dev_setup

2015-08-27 Thread Michael Ellerman
On Thu, 2015-27-08 at 06:01:16 UTC, Alexey Kardashevskiy wrote: > "powerpc/iommu: Cleanup setting of DMA base/offset" expects that > the default DMA offset is set from pnv_ioda_setup_bus_dma() which > is correct unless it is SRIOV where the code flow is different - at > the moment when pnv_ioda_set

Re: cxl: Remove racy attempt to force EEH invocation in reset

2015-08-27 Thread Michael Ellerman
On Fri, 2015-21-08 at 07:25:15 UTC, Daniel Axtens wrote: > cxl_reset currently PERSTs the slot, and then repeatedly tries to > read MMIO space in order to kick off EEH. > > There are 2 problems with this: it's unnecessary, and it's racy. > > It's unnecessary because the PERST will bring down the

Re: cxl: Release irqs if memory allocation fails

2015-08-27 Thread Michael Ellerman
On Tue, 2015-25-08 at 05:34:48 UTC, Vaibhav Jain wrote: > This minor patch plugs a potential irq leak in case of a memory > allocation failure inside function the afu_allocate_irqs. Presently the > irqs allocated to the context gets leaked if allocation of either > one of context irq_bitmap or irq_

Re: [v2] powerpc/configs: Enable LEDS support

2015-08-27 Thread Michael Ellerman
On Thu, 2015-27-08 at 06:04:10 UTC, Vasant Hegde wrote: > Commit 84ad6e5c added LEDS support for PowerNV platform. Lets > update ppc64_defconfig to pick LEDS driver. > > PowerNV LEDS driver looks for "/ibm,opal/leds" node in device > tree and loads if this node exists. Hence added it as 'm'. > >

Re: cxl: Remove use of macro DEFINE_PCI_DEVICE_TABLE

2015-08-27 Thread Michael Ellerman
On Sun, 2015-19-07 at 17:23:52 UTC, Vaishali Thakkar wrote: > Macro DEFINE_PCI_DEVICE_TABLE is deprecated. So, here use > struct pci_device_id instead of DEFINE_PCI_DEVICE_TABLE with > the goal of getting rid of this macro completely. > > The Coccinelle semantic patch that performs this transforma

Re: [PATCH][RESEND] cxl: Set up and enable PSL Timebase

2015-08-27 Thread Ian Munsie
Still just as acked as it was when it was first posted ;-) Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2,2/5] powerpc/rcpm: add RCPM driver

2015-08-27 Thread Scott Wood
On Thu, Aug 27, 2015 at 4:35 AM, Scott Wood wrote: On Wed, Aug 26, 2015 at 08:09:45PM +0800, Chenhui Zhao wrote: +#ifdef CONFIG_PPC_BOOK3E +static void qoriq_disable_thread(int cpu) +{ + int hw_cpu = get_hard_smp_processor_id(cpu); + int thread = cpu_thread_in_core(hw_cpu); +

[git pull] Please pull powerpc/linux.git powerpc-4.2-4 tag

2015-08-27 Thread Michael Ellerman
Hi Linus, Please pull one fix for powerpc for 4.2: The following changes since commit c13dcf9f2d6f5f06ef1bf79ec456df614c5e058b: Linux 4.2-rc8 (2015-08-23 20:52:59 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git tags/powerpc-4.

Re: [1/2] powerpc/pseries: Fix corrupted pdn list

2015-08-27 Thread Michael Ellerman
On Thu, 2015-27-08 at 04:12:36 UTC, Gavin Shan wrote: > Commit cca87d30 ("powerpc/pci: Refactor pci_dn") introduced pdn > list for SRIOV VFs. It means the pdn is be put into the child list > of its parent pdn when the pdn is created. When doing PCI hot > unplugging on pSeries, the PCI device node a

Re: [PATCH v2,4/5] PowerPC/mpc85xx: Add hotplug support on E5500 and E500MC cores

2015-08-27 Thread Chenhui Zhao
On Thu, Aug 27, 2015 at 4:55 AM, Scott Wood wrote: On Wed, Aug 26, 2015 at 08:09:47PM +0800, Chenhui Zhao wrote: +int check_cpu_dead(unsigned int cpu) +{ + return per_cpu(cpu_state, cpu) == CPU_DEAD; +} I'm not sure this needs to be a function versus open-coded, but if you do wan

Re: [1/2] powerpc/pseries: Fix corrupted pdn list

2015-08-27 Thread Gavin Shan
On Fri, Aug 28, 2015 at 10:55:35AM +1000, Michael Ellerman wrote: >On Thu, 2015-27-08 at 04:12:36 UTC, Gavin Shan wrote: >> Commit cca87d30 ("powerpc/pci: Refactor pci_dn") introduced pdn >> list for SRIOV VFs. It means the pdn is be put into the child list >> of its parent pdn when the pdn is crea

Re: [1/2] powerpc/pseries: Fix corrupted pdn list

2015-08-27 Thread Michael Ellerman
On Fri, 2015-08-28 at 11:09 +1000, Gavin Shan wrote: > On Fri, Aug 28, 2015 at 10:55:35AM +1000, Michael Ellerman wrote: > >On Thu, 2015-27-08 at 04:12:36 UTC, Gavin Shan wrote: > >> Commit cca87d30 ("powerpc/pci: Refactor pci_dn") introduced pdn > >> list for SRIOV VFs. It means the pdn is be put

Re: [PATCH v2,5/5] PowerPC/mpc85xx: Add CPU hotplug support for E6500

2015-08-27 Thread Chenhui Zhao
On Thu, Aug 27, 2015 at 6:42 AM, Scott Wood wrote: On Wed, Aug 26, 2015 at 08:09:48PM +0800, Chenhui Zhao wrote: + .globl booting_thread_hwid +booting_thread_hwid: + .long INVALID_THREAD_HWID + .align 3 The commit message goes into no detail about the changes you're m

Re: [1/2] powerpc/pseries: Fix corrupted pdn list

2015-08-27 Thread Gavin Shan
On Fri, Aug 28, 2015 at 11:32:40AM +1000, Michael Ellerman wrote: >On Fri, 2015-08-28 at 11:09 +1000, Gavin Shan wrote: >> On Fri, Aug 28, 2015 at 10:55:35AM +1000, Michael Ellerman wrote: >> >On Thu, 2015-27-08 at 04:12:36 UTC, Gavin Shan wrote: >> >> Commit cca87d30 ("powerpc/pci: Refactor pci_dn

Re: Kernel access of bad area on kernel 4.1.6

2015-08-27 Thread Michael Ellerman
On Thu, 2015-08-27 at 11:31 -0400, Ilia Mirkin wrote: > I've recently come into the possession of a PowerMac7,3 and have been > cross-compiling a chroot for it on my (x86_64) desktop. However > elfutils doesn't cross-compile for ppc64 due to its biarch m4 script > which tries to execute a built pro

[PATCH] powerpc/eeh: Fix fenced PHB caused by eeh_slot_error_detail()

2015-08-27 Thread Gavin Shan
The config space of some PCI devices can't be accessed when their PEs are in frozen state. Otherwise, fenced PHB might be seen. Those PEs are identified with flag EEH_PE_CFG_RESTRICTED, meaing EEH_PE_CFG_BLOCKED is set automatically when the PE is put to frozen state (EEH_PE_ISOLATED). eeh_slot_err

Re: [kernel] powerpc/iommu: Set default DMA offset in dma_dev_setup

2015-08-27 Thread Michael Ellerman
On Thu, 2015-08-27 at 23:07 +1000, Alexey Kardashevskiy wrote: > On 08/27/2015 07:37 PM, Michael Ellerman wrote: > > On Thu, 2015-27-08 at 06:01:16 UTC, Alexey Kardashevskiy wrote: > >> "powerpc/iommu: Cleanup setting of DMA base/offset" expects that > > > > This should be: > > > > Commit e91c25111

Re: Ping Re: [PATCH 0/8] math-emu: Update kernel math-emu code from current glibc soft-fp

2015-08-27 Thread Michael Ellerman
On Thu, 2015-08-27 at 13:31 +0200, Martin Schwidefsky wrote: > On Thu, 27 Aug 2015 13:12:05 +1000 > Michael Ellerman wrote: > > On Wed, 2015-08-26 at 14:44 +, Joseph Myers wrote: > > > On Thu, 20 Aug 2015, Michael Ellerman wrote: > > > > I'm reluctant to proceed with merging them though until

Re: [PATCH v2,5/5] PowerPC/mpc85xx: Add CPU hotplug support for E6500

2015-08-27 Thread Scott Wood
On Fri, 2015-08-28 at 09:42 +0800, Chenhui Zhao wrote: > On Thu, Aug 27, 2015 at 6:42 AM, Scott Wood > wrote: > > On Wed, Aug 26, 2015 at 08:09:48PM +0800, Chenhui Zhao wrote: > > > +.globl booting_thread_hwid > > > +booting_thread_hwid: > > > +.long INVALID_THREAD_HWID > > >

Re: [PATCH v2,2/5] powerpc/rcpm: add RCPM driver

2015-08-27 Thread Scott Wood
On Fri, 2015-08-28 at 08:40 +0800, Scott Wood wrote: > On Thu, Aug 27, 2015 at 4:35 AM, Scott Wood > wrote: > > On Wed, Aug 26, 2015 at 08:09:45PM +0800, Chenhui Zhao wrote: I didn't write this e-mail. Please fix your mail client. > > > +static void rcpm_v1_cpu_up_prepare(int cpu) > > > +{ >

Re: Kernel access of bad area on kernel 4.1.6

2015-08-27 Thread Ilia Mirkin
On Thu, Aug 27, 2015 at 9:56 PM, Michael Ellerman wrote: > On Thu, 2015-08-27 at 11:31 -0400, Ilia Mirkin wrote: >> I've recently come into the possession of a PowerMac7,3 and have been >> cross-compiling a chroot for it on my (x86_64) desktop. However >> elfutils doesn't cross-compile for ppc64 d

[RFC 0/5] atomics: powerpc: implement relaxed/acquire/release variants of some atomics

2015-08-27 Thread Boqun Feng
Relaxed/acquire/release variants of atomic operations {add,sub}_return and {cmp,}xchg are introduced by commit: "atomics: add acquire/release/relaxed variants of some atomic operations" which is now on locking/core branch of tip tree. By default, the generic code will implement relaxed variants

[RFC 1/5] atomics: add test for atomic operations with _relaxed variants

2015-08-27 Thread Boqun Feng
Some atomic operations now have _{relaxed, acquire, release} variants, this patch then adds some trivial tests for two purpose: 1. test the behavior of these new operations in single-CPU environment. 2. make their code generated before we actually use them somewhere, so t

[RFC 2/5] atomics: introduce arch_atomic_op_{acquire, release, fence} helpers

2015-08-27 Thread Boqun Feng
Some architectures may have their special barriers for acquire, release and fence semantics, general memory barriers(smp_mb__*_atomic()) in __atomic_op_*() may be too strong, so arch_atomic_op_*() helpers are introduced for architectures to provide their own version helpers to build different varia

[RFC 3/5] powerpc: atomic: implement atomic{, 64}_{add, sub}_return_* variants

2015-08-27 Thread Boqun Feng
On powerpc, we don't need a general memory barrier to achieve acquire and release semantics, so arch_atomic_op_{acquire,release} can be implemented using "lwsync" and "isync". For release semantics, since we only need to ensure all memory accesses that issue before must take effects before the -st

[RFC 4/5] powerpc: atomic: implement xchg_* and atomic{, 64}_xchg_* variants

2015-08-27 Thread Boqun Feng
Implement xchg_relaxed and define atomic{,64}_xchg_* as xchg_relaxed, based on these _relaxed variants, release/acquire variants can be built. Note that xchg_relaxed and atomic_{,64}_xchg_relaxed are not compiler barriers. Signed-off-by: Boqun Feng --- arch/powerpc/include/asm/atomic.h | 2 ++

[RFC 5/5] powerpc: atomic: implement cmpxchg{, 64}_* and atomic{, 64}_cmpxchg_* variants

2015-08-27 Thread Boqun Feng
Unlike other atomic operation variants, cmpxchg{,64}_acquire and atomic{,64}_cmpxchg_acquire don't have acquire semantics if the cmp part fails, so we need to implement these using assembly. Note cmpxchg{,64}_relaxed and atomic{,64}_cmpxchg_relaxed are not compiler barriers. Signed-off-by: Boqun