<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/perf, branch linux-4.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.11.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.11.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-06-29T11:02:45Z</updated>
<entry>
<title>powerpc/perf: Fix oops when kthread execs user process</title>
<updated>2017-06-29T11:02:45Z</updated>
<author>
<name>Ravi Bangoria</name>
</author>
<published>2017-06-15T13:46:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a2063a20547005c2e345591642f5483da7ad9a2d'/>
<id>urn:sha1:a2063a20547005c2e345591642f5483da7ad9a2d</id>
<content type='text'>
commit bf05fc25f268cd62f147f368fe65ad3e5b04fe9f upstream.

When a kthread calls call_usermodehelper() the steps are:
  1. allocate current-&gt;mm
  2. load_elf_binary()
  3. populate current-&gt;thread.regs

While doing this, interrupts are not disabled. If there is a perf
interrupt in the middle of this process (i.e. step 1 has completed
but not yet reached to step 3) and if perf tries to read userspace
regs, kernel oops with following log:

  Unable to handle kernel paging request for data at address 0x00000000
  Faulting instruction address: 0xc0000000000da0fc
  ...
  Call Trace:
  perf_output_sample_regs+0x6c/0xd0
  perf_output_sample+0x4e4/0x830
  perf_event_output_forward+0x64/0x90
  __perf_event_overflow+0x8c/0x1e0
  record_and_restart+0x220/0x5c0
  perf_event_interrupt+0x2d8/0x4d0
  performance_monitor_exception+0x54/0x70
  performance_monitor_common+0x158/0x160
  --- interrupt: f01 at avtab_search_node+0x150/0x1a0
      LR = avtab_search_node+0x100/0x1a0
  ...
  load_elf_binary+0x6e8/0x15a0
  search_binary_handler+0xe8/0x290
  do_execveat_common.isra.14+0x5f4/0x840
  call_usermodehelper_exec_async+0x170/0x210
  ret_from_kernel_thread+0x5c/0x7c

Fix it by setting abi to PERF_SAMPLE_REGS_ABI_NONE when userspace
pt_regs are not set.

Fixes: ed4a4ef85cf5 ("powerpc/perf: Add support for sampling interrupt register state")
Signed-off-by: Ravi Bangoria &lt;ravi.bangoria@linux.vnet.ibm.com&gt;
Acked-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc/perf: Handle sdar_mode for marked event in power9</title>
<updated>2017-03-09T02:34:54Z</updated>
<author>
<name>Madhavan Srinivasan</name>
</author>
<published>2017-02-20T13:59:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=78b4416aa249365dd3c1b64da4d3a232014320b0'/>
<id>urn:sha1:78b4416aa249365dd3c1b64da4d3a232014320b0</id>
<content type='text'>
MMCRA[SDAR_MODE] specifices how the SDAR should be updated in
continous sampling mode. On P9 it must be set to 0b00 when
MMCRA[63] is set.

Fixes: c7c3f568beff2 ('powerpc/perf: macros for power9 format encoding')
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/perf: Fix perf_get_data_addr() for power9 DD1</title>
<updated>2017-03-09T02:34:53Z</updated>
<author>
<name>Madhavan Srinivasan</name>
</author>
<published>2017-02-20T13:56:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f04d108029063a8a67528a88449c412aecf4d3d8'/>
<id>urn:sha1:f04d108029063a8a67528a88449c412aecf4d3d8</id>
<content type='text'>
Power9 DD1 do not support PMU_HAS_SIER flag and sdsync in
perf_get_data_addr() defaults to MMCRA_SDSYNC which is wrong. Since
power9 MMCRA does not support SDSYNC bit, patch includes PPMU_NO_SIAR
flag to the check and set the sdsync with MMCRA_SAMPLE_ENABLE;

Fixes: 27593d72c4ad ("powerpc/perf: Use MSR to report privilege level on P9 DD1")
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>sched/headers: Prepare for new header dependencies before moving code to &lt;linux/sched/task_stack.h&gt;</title>
<updated>2017-03-02T07:42:36Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2017-02-08T17:51:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68db0cf10678630d286f4bbbbdfa102951a35faa'/>
<id>urn:sha1:68db0cf10678630d286f4bbbbdfa102951a35faa</id>
<content type='text'>
We are going to split &lt;linux/sched/task_stack.h&gt; out of &lt;linux/sched.h&gt;, which
will have to be picked up from other headers and a couple of .c files.

Create a trivial placeholder &lt;linux/sched/task_stack.h&gt; file that just
maps to &lt;linux/sched.h&gt; to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next</title>
<updated>2017-02-18T10:37:14Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2017-02-18T10:37:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c8f9ad566ddc63da5da84c3c9e6c1bb0434c64f'/>
<id>urn:sha1:6c8f9ad566ddc63da5da84c3c9e6c1bb0434c64f</id>
<content type='text'>
Freescale updates from Scott:

"Highlights include 8xx breakpoints and perf, t1042rdb display support,
and board updates."
</content>
</entry>
<entry>
<title>powerpc/perf: use is_kernel_addr macro in perf_get_misc_flags()</title>
<updated>2017-02-17T10:48:55Z</updated>
<author>
<name>Madhavan Srinivasan</name>
</author>
<published>2016-12-24T06:05:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a2391b35f1d9d5b51d43a9150c7239253565d5a6'/>
<id>urn:sha1:a2391b35f1d9d5b51d43a9150c7239253565d5a6</id>
<content type='text'>
Cleanup to use is_kernel_addr macro.

Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/perf: Avoid FAB_*_MATCH checks for power9</title>
<updated>2017-02-17T10:48:55Z</updated>
<author>
<name>Madhavan Srinivasan</name>
</author>
<published>2017-02-13T11:32:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=78a16d9fc1206e1a484b6ac96348756f3846bfea'/>
<id>urn:sha1:78a16d9fc1206e1a484b6ac96348756f3846bfea</id>
<content type='text'>
Since power9 does not support FAB_*_MATCH bits in MMCR1,
avoid these checks for power9. For this, patch factor out
code in isa207_get_constraint() to retain these checks
only for power8.

Patch also updates the comment in power9-pmu raw event
encode layout to remove FAB_*_MATCH.

Finally for power9, patch adds additional check for
threshold events when adding the thresh mask and value in
isa207_get_constraint().

fixes: 7ffd948fae4c ('powerpc/perf: factor out power8 pmu functions')
fixes: 18201b204286 ('powerpc/perf: power9 raw event format encoding')
Signed-off-by: Ravi Bangoria &lt;ravi.bangoria@linux.vnet.ibm.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/perf: Add restrictions to PMC5 in power9 DD1</title>
<updated>2017-02-17T10:48:54Z</updated>
<author>
<name>Madhavan Srinivasan</name>
</author>
<published>2017-02-12T17:03:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d911904f3ce412b20874a9c95f82009dcbb007c'/>
<id>urn:sha1:8d911904f3ce412b20874a9c95f82009dcbb007c</id>
<content type='text'>
PMC5 on POWER9 DD1 may not provide right counts in all
sampling scenarios, hence use PM_INST_DISP event instead
in PMC2 or PMC3 in preference.

Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/perf: Use Instruction Counter value</title>
<updated>2017-02-17T10:48:54Z</updated>
<author>
<name>Madhavan Srinivasan</name>
</author>
<published>2017-02-12T17:03:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=356d8ce3d0a4a1d7c8448c4d234121736ad3d471'/>
<id>urn:sha1:356d8ce3d0a4a1d7c8448c4d234121736ad3d471</id>
<content type='text'>
Since PM_INST_DISP include speculative instruction,
based on the workload the dispatch count could vary
considerably. Hence as an alternative, for completed
instruction counting, program the PM_INST_DISP event
to the MMCR* but use Instruction Counter register value.

Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/perf: Use PM_INST_DISP for generic instructions sample</title>
<updated>2017-02-17T10:48:53Z</updated>
<author>
<name>Madhavan Srinivasan</name>
</author>
<published>2017-02-12T17:03:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a088542c8f8d0bb458e4db2c01a2534f1adaf47'/>
<id>urn:sha1:8a088542c8f8d0bb458e4db2c01a2534f1adaf47</id>
<content type='text'>
Since PM_INST_CMPL may not provide right counts in all
sampling scenarios in power9 DD1, instead use PM_INST_DISP.
Patch also update generic instruction sampling with the same.

Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
</feed>
