Re: [alsa-devel] [PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
Hi Mark, Quoting Mark Brown : On Thu, Jul 13, 2017 at 09:32:41AM +0200, Takashi Iwai wrote: please stop posting in this style. It's really annoying to see spontaneously popping-up almost same patch for more than two hours long. If you have a series of the same fix

Re: [PATCH v3 0/2] [media] videobuf2-dc: Add support for cacheable MMAP

2017-07-13 Thread Christoph Hellwig
On Thu, Jul 13, 2017 at 02:21:53PM +0100, Russell King - ARM Linux wrote: > My conclusion of the dma_alloc_noncoherent() and dma_cache_sync() API > when it was introduced is that it's basically a completely broken > interface, and I've never seen any point to it. Maybe some of that is > because

Re: [RFC v5 34/38] procfs: display the protection-key number associated with a vma

2017-07-13 Thread Dave Hansen
On 07/13/2017 01:03 AM, Ram Pai wrote: > On Tue, Jul 11, 2017 at 11:13:56AM -0700, Dave Hansen wrote: >> On 07/05/2017 02:22 PM, Ram Pai wrote: >>> +#ifdef CONFIG_PPC64_MEMORY_PROTECTION_KEYS >>> +void arch_show_smap(struct seq_file *m, struct vm_area_struct *vma) >>> +{ >>> + seq_printf(m,

Re: [bug] KVM: Unrecoverable TM Unavailable Exception f60

2017-07-13 Thread Gustavo Romero
Hi Jan On 13-07-2017 09:07, Jan Stancek wrote: >> [ 181.328511] Unrecoverable TM Unavailable Exception f60 at d0001e7d9980 >> [ 181.328605] Oops: Unrecoverable TM Unavailable Exception, sig: 6 [#1] >> [ 181.328613] SMP NR_CPUS=2048 >> [ 181.328613] NUMA >> [ 181.328618] PowerNV >> [

Re: [RFC v5 14/38] powerpc: initial plumbing for key management

2017-07-13 Thread Ram Pai
On Thu, Jul 13, 2017 at 12:45:00AM -0700, Ram Pai wrote: > On Wed, Jul 12, 2017 at 01:28:25PM +1000, Balbir Singh wrote: > > On Wed, 5 Jul 2017 14:21:51 -0700 > > Ram Pai wrote: > > > > > Initial plumbing to manage all the keys supported by the > > > hardware. > > > > > >

Re: [alsa-devel] [PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Joe Perches
On Thu, 2017-07-13 at 10:18 -0500, Gustavo A. R. Silva wrote: > Hi Mark, > > Quoting Mark Brown : > > > On Thu, Jul 13, 2017 at 09:32:41AM +0200, Takashi Iwai wrote: > > > > > please stop posting in this style. It's really annoying to see > > > spontaneously popping-up

Re: [RFC v5 38/38] Documentation: PowerPC specific updates to memory protection keys

2017-07-13 Thread Ram Pai
On Tue, Jul 11, 2017 at 11:23:29AM -0700, Dave Hansen wrote: > On 07/05/2017 02:22 PM, Ram Pai wrote: > > Add documentation updates that capture PowerPC specific changes. > > > > Signed-off-by: Ram Pai > > --- > > Documentation/vm/protection-keys.txt | 85 > >

Re: [bug] KVM: Unrecoverable TM Unavailable Exception f60

2017-07-13 Thread Benjamin Herrenschmidt
On Thu, 2017-07-13 at 11:46 -0300, Gustavo Romero wrote: > Hi Jan > Looks like that TM unavailable exception will only able to recover > properly if it comes from problem state and since the trigger comes > from kernel space (kvm module) it does not match > "if (user_mode(regs))" in

Re: [alsa-devel] [PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
Hi Joe, Quoting Joe Perches : On Thu, 2017-07-13 at 10:18 -0500, Gustavo A. R. Silva wrote: Hi Mark, Quoting Mark Brown : > On Thu, Jul 13, 2017 at 09:32:41AM +0200, Takashi Iwai wrote: > > > please stop posting in this style. It's really annoying to

Re: [RFC v5 14/38] powerpc: initial plumbing for key management

2017-07-13 Thread Balbir Singh
On Fri, Jul 14, 2017 at 6:37 AM, Ram Pai wrote: > On Thu, Jul 13, 2017 at 12:45:00AM -0700, Ram Pai wrote: >> On Wed, Jul 12, 2017 at 01:28:25PM +1000, Balbir Singh wrote: >> > On Wed, 5 Jul 2017 14:21:51 -0700 >> > Ram Pai wrote: >> > >> > > Initial

Re: [PATCH] powerpc/time: use get_tb instead of get_vtb in running_clock

2017-07-13 Thread Benjamin Herrenschmidt
On Thu, 2017-07-13 at 14:55 +0800, hejianet wrote: > Hi Ben > I add some printk logs in watchdog_timer_fn in the guest > [   16.025222] get_vtb=8236291881, get_tb=13756711357, get_timestamp=4 > [   20.025624] get_vtb=9745285807, get_tb=15804711283, get_timestamp=7 > [   24.025042]

Re: [bug] KVM: Unrecoverable TM Unavailable Exception f60

2017-07-13 Thread Benjamin Herrenschmidt
On Thu, 2017-07-13 at 08:07 -0400, Jan Stancek wrote: (You may want to CC the patch author... Added Paul). > - Original Message - > > Hi, > > > > I'm running into Oops below on IBM PowerNV system (model 8247-22L) > > with 4.12 trees and qemu-kvm-2.9. It triggers quickly after I start >

Re: [RFC v5 34/38] procfs: display the protection-key number associated with a vma

2017-07-13 Thread Ram Pai
On Thu, Jul 13, 2017 at 07:07:48AM -0700, Dave Hansen wrote: > On 07/13/2017 01:03 AM, Ram Pai wrote: > > On Tue, Jul 11, 2017 at 11:13:56AM -0700, Dave Hansen wrote: > >> On 07/05/2017 02:22 PM, Ram Pai wrote: > >>> +#ifdef CONFIG_PPC64_MEMORY_PROTECTION_KEYS > >>> +void arch_show_smap(struct

Re: [PATCH 3/5] powerpc/lib/sstep: Add bpermd instruction emulation

2017-07-13 Thread Matt Brown
On Thu, Jul 13, 2017 at 5:28 PM, Segher Boessenkool wrote: > On Thu, Jul 13, 2017 at 01:25:46PM +1000, Matt Brown wrote: >> +static nokprobe_inline void do_bpermd(struct pt_regs *regs, unsigned long >> v1, >> + unsigned long v2, int ra) >>

Re: [PATCH 3/4] powerpc/mm/radix: Avoid flushing the PWC on every flush_tlb_range

2017-07-13 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > We do that because it's used by THP pmd collapsing, so use > instead a dedicated flush function. > > Signed-off-by: Benjamin Herrenschmidt > --- > .../powerpc/include/asm/book3s/64/tlbflush-radix.h | 1 + >

Re: [PATCH 1/4] powerpc/mm/radix: Don't iterate all sets when flushing the PWC

2017-07-13 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > The PWC flush only needs a single set call, just like the > full (RIC=2) flush. > > Signed-off-by: Benjamin Herrenschmidt > --- > arch/powerpc/mm/tlb-radix.c | 11 +++ > 1 file changed, 7

Re: [PATCH 4/4] powerpc/mm/radix: Workaround prefetch issue with KVM

2017-07-13 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > There's a somewhat architectural issue with Radix MMU and KVM. > > When coming out of a guest with AIL (ie, MMU enabled), we start > executing hypervisor code with the PID register still containing > whatever the guest has been using. >

Re: [PATCH 5/5] powerpc/lib/sstep: Add isel instruction emulation

2017-07-13 Thread Matt Brown
On Thu, Jul 13, 2017 at 5:47 PM, Segher Boessenkool wrote: > On Thu, Jul 13, 2017 at 01:25:48PM +1000, Matt Brown wrote: >> + case 585: /* isel */ > > The secondary opcode for isel is only 5 bits, not 10 like most other > insns have. Yet another

[PATCH 1/4] powerpc/mm/radix: Don't iterate all sets when flushing the PWC

2017-07-13 Thread Benjamin Herrenschmidt
The PWC flush only needs a single set call, just like the full (RIC=2) flush. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/mm/tlb-radix.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/mm/tlb-radix.c

Re: [RFC v5 15/38] powerpc: helper function to read,write AMR,IAMR,UAMOR registers

2017-07-13 Thread Ram Pai
On Thu, Jul 13, 2017 at 07:49:05PM +1000, Balbir Singh wrote: > On Thu, Jul 13, 2017 at 5:55 PM, Ram Pai wrote: > > On Wed, Jul 12, 2017 at 03:26:01PM +1000, Balbir Singh wrote: > >> On Wed, 5 Jul 2017 14:21:52 -0700 > >> Ram Pai wrote: > >> > >> >

Re: [PATCH 4/5] powerpc/lib/sstep: Add prty instruction emulation

2017-07-13 Thread Matt Brown
On Thu, Jul 13, 2017 at 5:37 PM, Segher Boessenkool wrote: > On Thu, Jul 13, 2017 at 01:25:47PM +1000, Matt Brown wrote: >> +static nokprobe_inline void do_prtyw(struct pt_regs *regs, unsigned long v, >> + int ra) >> +{ >> + unsigned

[PATCH 2/4] powerpc/mm/radix: Improve TLB/PWC flushes

2017-07-13 Thread Benjamin Herrenschmidt
At the moment we have to rather sub-optimal flushing behaviours: - flush_tlb_mm() will flush the PWC which is unnecessary (for example when doing a fork) - A large unmap will call flush_tlb_pwc() multiple times causing us to perform that fairly expensive operation repeatedly. This

[PATCH 4/4] powerpc/mm/radix: Workaround prefetch issue with KVM

2017-07-13 Thread Benjamin Herrenschmidt
There's a somewhat architectural issue with Radix MMU and KVM. When coming out of a guest with AIL (ie, MMU enabled), we start executing hypervisor code with the PID register still containing whatever the guest has been using. The problem is that the CPU can (and will) then start prefetching or

[PATCH 3/4] powerpc/mm/radix: Avoid flushing the PWC on every flush_tlb_range

2017-07-13 Thread Benjamin Herrenschmidt
We do that because it's used by THP pmd collapsing, so use instead a dedicated flush function. Signed-off-by: Benjamin Herrenschmidt --- .../powerpc/include/asm/book3s/64/tlbflush-radix.h | 1 + arch/powerpc/mm/pgtable-radix.c| 5 ++-

Re: [PATCH 3/5] powerpc/lib/sstep: Add bpermd instruction emulation

2017-07-13 Thread Segher Boessenkool
On Thu, Jul 13, 2017 at 01:25:46PM +1000, Matt Brown wrote: > +static nokprobe_inline void do_bpermd(struct pt_regs *regs, unsigned long v1, > + unsigned long v2, int ra) > +{ > + unsigned int idx, i; > + unsigned char perm; > + > + perm = 0x0; > + for

Re: [PATCH 4/5] powerpc/lib/sstep: Add prty instruction emulation

2017-07-13 Thread Segher Boessenkool
On Thu, Jul 13, 2017 at 01:25:47PM +1000, Matt Brown wrote: > +static nokprobe_inline void do_prtyw(struct pt_regs *regs, unsigned long v, > + int ra) > +{ > + unsigned long low, high, out; > + unsigned int i; > + > + high = 0; > + low = 0; > + out =

Re: [PATCH 1/5] powerpc/lib/sstep: Add cmpb instruction emulation

2017-07-13 Thread Segher Boessenkool
On Thu, Jul 13, 2017 at 01:51:30PM +1000, Andrew Donnellan wrote: > On 13/07/17 13:25, Matt Brown wrote: > >@@ -1049,6 +1066,13 @@ int analyse_instr(struct instruction_op *op, struct > >pt_regs *regs, > > do_cmp_unsigned(regs, val, val2, rd >> 2); > > goto

Re: [PATCH] powerpc/time: use get_tb instead of get_vtb in running_clock

2017-07-13 Thread hejianet
Hi Ben I add some printk logs in watchdog_timer_fn in the guest [ 16.025222] get_vtb=8236291881, get_tb=13756711357, get_timestamp=4 [ 20.025624] get_vtb=9745285807, get_tb=15804711283, get_timestamp=7 [ 24.025042] get_vtb=11518119641, get_tb=17852711085, get_timestamp=10 [ 28.024074]

[PATCH] ASoC: fsl_esai: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva --- sound/soc/fsl/fsl_esai.c | 2 +- 1

[PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva --- sound/soc/fsl/fsl_asrc.c | 2 +- 1

Re: [alsa-devel] [PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Takashi Iwai
Gustavo, please stop posting in this style. It's really annoying to see spontaneously popping-up almost same patch for more than two hours long. If you have a series of the same fix patches, send them as a patch set in a shot with a thread. git-send-email does it right. I don't mind a couple

Re: [RFC v5 34/38] procfs: display the protection-key number associated with a vma

2017-07-13 Thread Ram Pai
On Tue, Jul 11, 2017 at 11:13:56AM -0700, Dave Hansen wrote: > On 07/05/2017 02:22 PM, Ram Pai wrote: > > +#ifdef CONFIG_PPC64_MEMORY_PROTECTION_KEYS > > +void arch_show_smap(struct seq_file *m, struct vm_area_struct *vma) > > +{ > > + seq_printf(m, "ProtectionKey: %8u\n", vma_pkey(vma)); > >

[PATCH 2/2] KVM: PPC: e500mc: Fix a NULL dereference

2017-07-13 Thread Dan Carpenter
We should set "err = -ENOMEM;", otherwise it means we're returning ERR_PTR(0) which is NULL. It results in a NULL pointer dereference in the caller. Signed-off-by: Dan Carpenter diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c index

Re: [RFC v5 00/38] powerpc: Memory Protection Keys

2017-07-13 Thread Michal Hocko
On Thu 13-07-17 08:53:52, Benjamin Herrenschmidt wrote: > On Wed, 2017-07-12 at 09:23 +0200, Michal Hocko wrote: > > > > > > > > Ideally the MMU looks at the PTE for keys, in order to enforce > > > protection. This is the case with x86 and is the case with power9 Radix > > > page table. Hence

Re: [PATCH 1/5] powerpc/lib/sstep: Add cmpb instruction emulation

2017-07-13 Thread Segher Boessenkool
On Thu, Jul 13, 2017 at 01:43:53AM -0500, Segher Boessenkool wrote: > On Thu, Jul 13, 2017 at 01:51:30PM +1000, Andrew Donnellan wrote: > > On 13/07/17 13:25, Matt Brown wrote: > > >@@ -1049,6 +1066,13 @@ int analyse_instr(struct instruction_op *op, struct > > >pt_regs *regs, > > >

[PATCH] ASoC: fsl_spdif: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva --- sound/soc/fsl/fsl_spdif.c | 2 +-

Re: [PATCH 3/5] powerpc/lib/sstep: Add bpermd instruction emulation

2017-07-13 Thread Gabriel Paubert
On Thu, Jul 13, 2017 at 01:25:46PM +1000, Matt Brown wrote: > This adds emulation for the bpermd instruction. > > Signed-off-by: Matt Brown > --- > arch/powerpc/lib/sstep.c | 23 +++ > 1 file changed, 23 insertions(+) > > diff --git

Re: [PATCH 5/5] powerpc/lib/sstep: Add isel instruction emulation

2017-07-13 Thread Segher Boessenkool
On Thu, Jul 13, 2017 at 01:25:48PM +1000, Matt Brown wrote: > + case 585: /* isel */ The secondary opcode for isel is only 5 bits, not 10 like most other insns have. > + mb = (instr >> 6) & 0x1f; /* bc */ > + val = (regs->ccr >> (mb +

Re: [PATCH 1/5] powerpc/lib/sstep: Add cmpb instruction emulation

2017-07-13 Thread Segher Boessenkool
On Thu, Jul 13, 2017 at 01:25:44PM +1000, Matt Brown wrote: > +static nokprobe_inline void do_cmpb(struct pt_regs *regs, unsigned long v1, > + unsigned long v2, int rd) > +{ > + unsigned long out_val, mask; > + int i; > + > + out_val = 0; > + for (i = 0;

Re: [RFC v5 02/38] powerpc: Free up four 64K PTE bits in 64K backed HPTE pages

2017-07-13 Thread Ram Pai
On Wed, Jul 12, 2017 at 01:10:51PM +1000, Balbir Singh wrote: > On Tue, 11 Jul 2017 08:44:15 -0700 > Ram Pai wrote: > > > On Tue, Jul 11, 2017 at 03:59:59PM +1000, Balbir Singh wrote: > > > On Wed, 5 Jul 2017 14:21:39 -0700 > > > Ram Pai wrote: > > >

Re: [RFC v5 14/38] powerpc: initial plumbing for key management

2017-07-13 Thread Ram Pai
On Wed, Jul 12, 2017 at 01:28:25PM +1000, Balbir Singh wrote: > On Wed, 5 Jul 2017 14:21:51 -0700 > Ram Pai wrote: > > > Initial plumbing to manage all the keys supported by the > > hardware. > > > > Total 32 keys are supported on powerpc. However pkey 0,1 > > and 31 are

Re: [RFC v5 15/38] powerpc: helper function to read,write AMR,IAMR,UAMOR registers

2017-07-13 Thread Ram Pai
On Wed, Jul 12, 2017 at 03:26:01PM +1000, Balbir Singh wrote: > On Wed, 5 Jul 2017 14:21:52 -0700 > Ram Pai wrote: > > > Implements helper functions to read and write the key related > > registers; AMR, IAMR, UAMOR. > > > > AMR register tracks the read,write permission of

Re: [alsa-devel] [PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
Hi Takashi, Quoting Takashi Iwai : Gustavo, please stop posting in this style. It's really annoying to see spontaneously popping-up almost same patch for more than two hours long. If you have a series of the same fix patches, send them as a patch set in a shot with a thread.

Re: [GIT PULL] Please pull JSON files for Power9 PMU events

2017-07-13 Thread Jiri Olsa
On Thu, Jul 13, 2017 at 01:43:41PM +1000, Michael Ellerman wrote: > Sukadev Bhattiprolu writes: > ... > > > > tools/perf/pmu-events/arch/powerpc/mapfile.csv | 3 + > > .../perf/pmu-events/arch/powerpc/power9/cache.json | 176 + > >

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

2017-07-13 Thread Dan Carpenter
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: Dan Carpenter diff --git

[mainline][ext2] fsfuzzer triggered WARNING: CPU: 1 PID: 72688 at fs/super.c:1244 mount_fs+0x200/0x220

2017-07-13 Thread Abdul Haleem
Hi, WARN() is being triggered when running fsfuzzer for ext2 file system on powerpc machine running 4.12.0-rc1 kernel. Machine : Power 8 bare-metal Kernel : 4.12.0-rc1 gcc : 4.8.5 Test: fsfuzzer (https://github.com/stevegrubb/fsfuzzer) trace: - ./run_test ext2 10 ext2 set sb->s_maxbytes to

[bug] KVM: Unrecoverable TM Unavailable Exception f60

2017-07-13 Thread Jan Stancek
Hi, I'm running into Oops below on IBM PowerNV system (model 8247-22L) with 4.12 trees and qemu-kvm-2.9. It triggers quickly after I start KVM guest installation: virt-install --name ppc64le_kvm_1cpu --mac 52:56:00:00:00:06 --location nfs://XXX --ram=1024 --vcpus=1 --file-size=20 --hvm

Re: [RFC v5 15/38] powerpc: helper function to read,write AMR,IAMR,UAMOR registers

2017-07-13 Thread Balbir Singh
On Thu, Jul 13, 2017 at 5:55 PM, Ram Pai wrote: > On Wed, Jul 12, 2017 at 03:26:01PM +1000, Balbir Singh wrote: >> On Wed, 5 Jul 2017 14:21:52 -0700 >> Ram Pai wrote: >> >> > Implements helper functions to read and write the key related >> > registers;

Re: [GIT PULL] Please pull JSON files for Power9 PMU events

2017-07-13 Thread Michael Ellerman
Jiri Olsa writes: > On Thu, Jul 13, 2017 at 01:43:41PM +1000, Michael Ellerman wrote: >> Sukadev Bhattiprolu writes: >> ... >> > >> > tools/perf/pmu-events/arch/powerpc/mapfile.csv | 3 + >> >

[BUG][cramfs] Kernel Oops while fuzz testing cramfs on mainline kernel

2017-07-13 Thread Abdul Haleem
Hi, fsfuzzer triggers kernel Oops on powerpc machine Machine : Power 8 bare-metal Kernel : 4.12.0-rc1 gcc : 4.8.5 Test: fsfuzzer (https://github.com/stevegrubb/fsfuzzer) Issue is rare to hit, only reproduced once out of 5 retries. traces: --- cramfs: Error -3 while decompressing!

Re: issue with kernel 4.12.rc6 addnote -kernel dont build

2017-07-13 Thread luigi burdo
Hi Michael, sorry for late reply >Did it just stop working? That code is from 2014? exit without right kenel build with the error that add in the log last time. >> Host Machine BE Qoriq e5500 16GB ram >What userspace are you running? Is it 32-bit ? yes 32 bit OS Ubuntu Mate 16.10 , with 64

Re: [alsa-devel] [PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Mark Brown
On Thu, Jul 13, 2017 at 09:32:41AM +0200, Takashi Iwai wrote: > please stop posting in this style. It's really annoying to see > spontaneously popping-up almost same patch for more than two hours > long. > If you have a series of the same fix patches, send them as a patch > set in a shot with a

Re: [bug] KVM: Unrecoverable TM Unavailable Exception f60

2017-07-13 Thread Jan Stancek
- Original Message - > Hi, > > I'm running into Oops below on IBM PowerNV system (model 8247-22L) > with 4.12 trees and qemu-kvm-2.9. It triggers quickly after I start > KVM guest installation: > > virt-install --name ppc64le_kvm_1cpu --mac 52:56:00:00:00:06 --location > nfs://XXX

Re: [1/2] powerpc: Fix emulation of mcrf in emulate_step()

2017-07-13 Thread Michael Ellerman
On Wed, 2017-06-14 at 23:46:38 UTC, Anton Blanchard wrote: > From: Anton Blanchard > > The mcrf emulation code was looking at the CR fields in the reverse > order. It also relied on reserved fields being zero which is somewhat > fragile, so fix that too. > > Cc:

Re: [2/2] powerpc: Fix emulation of mfocrf in emulate_step()

2017-07-13 Thread Michael Ellerman
On Wed, 2017-06-14 at 23:46:39 UTC, Anton Blanchard wrote: > From: Anton Blanchard > > >From POWER4 onwards, mfocrf() only places the specified CR field into > the destination GPR, and the rest of it is set to 0. The PowerPC AS > from version 3.0 now requires this behaviour. >

Re: powerpc/perf: Add POWER9 alternate PM_RUN_CYC and PM_RUN_INST_CMPL events

2017-07-13 Thread Michael Ellerman
On Sun, 2017-06-18 at 23:51:28 UTC, Anton Blanchard wrote: > From: Anton Blanchard > > Similar to POWER8, POWER9 can count run cycles and run instructions > completed on more than one PMU. > > Signed-off-by: Anton Blanchard > Acked-by: Madhavan Srinivasan

Re: powerpc/perf: Fix SDAR_MODE value for continous sampling in power9

2017-07-13 Thread Michael Ellerman
On Tue, 2017-07-11 at 10:57:49 UTC, Madhavan Srinivasan wrote: > Incase of continous sampling, code currently defaults > MMCRA[SDAR_MODE] to 0b01 for power9 DD1 which is > 'Continous sampling mode update SDAR on TLB miss'. > And for the rest it copies the sdar_mode value from > the event code,

Re: powerpc/64: Fix atomic64_inc_not_zero() to return an int

2017-07-13 Thread Michael Ellerman
On Tue, 2017-07-11 at 12:10:54 UTC, Michael Ellerman wrote: > Although it's not documented anywhere, there is an expectation that > atomic64_inc_not_zero() returns a result which fits in an int. This is > the behaviour implemented on all arches except powerpc. > > This has caused at least one bug