<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/perf, branch v4.12.9</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.12.9</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.12.9'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-05-30T11:40:03Z</updated>
<entry>
<title>drivers/perf: arm_pmu_acpi: avoid perf IRQ init when guest PMU is off</title>
<updated>2017-05-30T11:40:03Z</updated>
<author>
<name>Wei Huang</name>
<email>wei@redhat.com</email>
</author>
<published>2017-05-30T10:56:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=477c50e8dc1c7b5004e099b8b74ca8b70be2f4fd'/>
<id>urn:sha1:477c50e8dc1c7b5004e099b8b74ca8b70be2f4fd</id>
<content type='text'>
We saw perf IRQ init failures when running Linux kernel in an ACPI
guest without PMU (i.e. pmu=off). This is because perf IRQ is not
present when pmu=off, but arm_pmu_acpi still tries to register
or unregister GSI. This patch addresses the problem by checking
gicc-&gt;performance_interrupt. If it is 0, which is the value set
by qemu when pmu=off, we skip the IRQ register/unregister process.

[    4.069470] bc00: 0000000000040b00 ffff0000089db190
[    4.070267] [&lt;ffff000008134f80&gt;] enable_percpu_irq+0xdc/0xe4
[    4.071192] [&lt;ffff000008667cc4&gt;] arm_perf_starting_cpu+0x108/0x10c
[    4.072200] [&lt;ffff0000080cbdd4&gt;] cpuhp_invoke_callback+0x14c/0x4ac
[    4.073210] [&lt;ffff0000080ccd3c&gt;] cpuhp_thread_fun+0xd4/0x11c
[    4.074132] [&lt;ffff0000080f1394&gt;] smpboot_thread_fn+0x1b4/0x1c4
[    4.075081] [&lt;ffff0000080ec90c&gt;] kthread+0x10c/0x138
[    4.075921] [&lt;ffff0000080833c0&gt;] ret_from_fork+0x10/0x50
[    4.076947] genirq: Setting trigger mode 4 for irq 43 failed
(gic_set_type+0x0/0x74)

Signed-off-by: Wei Huang &lt;wei@redhat.com&gt;
[will: add comment justifying deviation from ACPI spec, removed redundant hunk]
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>drivers/perf: arm_pmu: add ACPI framework</title>
<updated>2017-04-11T15:29:54Z</updated>
<author>
<name>Mark Rutland</name>
<email>mark.rutland@arm.com</email>
</author>
<published>2017-04-11T08:39:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=45736a72fb79b204c1fbdb08a1e1a2aa52c7281a'/>
<id>urn:sha1:45736a72fb79b204c1fbdb08a1e1a2aa52c7281a</id>
<content type='text'>
This patch adds framework code to handle parsing PMU data out of the
MADT, sanity checking this, and managing the association of CPUs (and
their interrupts) with appropriate logical PMUs.

For the time being, we expect that only one PMU driver (PMUv3) will make
use of this, and we simply pass in a single probe function.

This is based on an earlier patch from Jeremy Linton.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Tested-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>drivers/perf: arm_pmu: split out platform device probe logic</title>
<updated>2017-04-11T15:29:54Z</updated>
<author>
<name>Mark Rutland</name>
<email>mark.rutland@arm.com</email>
</author>
<published>2017-04-11T08:39:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=18bfcfe51b8f60b69ab012888dea8061a9cd3381'/>
<id>urn:sha1:18bfcfe51b8f60b69ab012888dea8061a9cd3381</id>
<content type='text'>
Now that we've split the pdev and DT probing logic from the runtime
management, let's move the former into its own file. We gain a few lines
due to the copyright header and includes, but this should keep the logic
clearly separated, and paves the way for adding ACPI support in a
similar fashion.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Tested-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
[will: rename nr_irqs to avoid conflict with global variable]
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>drivers/perf: arm_pmu: move irq request/free into probe</title>
<updated>2017-04-11T15:29:53Z</updated>
<author>
<name>Mark Rutland</name>
<email>mark.rutland@arm.com</email>
</author>
<published>2017-04-11T08:39:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3cf7ee98b8489fd2ff58374e3882a666f81d629f'/>
<id>urn:sha1:3cf7ee98b8489fd2ff58374e3882a666f81d629f</id>
<content type='text'>
Currently we request (and potentially free) all IRQs for a given PMU in
cpu_pmu_init(). This works for platform/DT probing today, but it doesn't
fit ACPI well as we don't have all our affinity data up-front.

In preparation for ACPI support, fold the IRQ request/free into
arm_pmu_device_probe(), which will remain specific to platform/DT
probing.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Tested-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>drivers/perf: arm_pmu: split cpu-local irq request/free</title>
<updated>2017-04-11T15:29:53Z</updated>
<author>
<name>Mark Rutland</name>
<email>mark.rutland@arm.com</email>
</author>
<published>2017-04-11T08:39:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0e2663d921ea1861540cd7f331d8e2c7668aa31f'/>
<id>urn:sha1:0e2663d921ea1861540cd7f331d8e2c7668aa31f</id>
<content type='text'>
Currently we have functions to request/free all IRQs for a given PMU.
While this works today, this won't work for ACPI, where we don't know
the full set of IRQs up front, and need to request them separately.

To enable supporting ACPI, this patch splits out the cpu-local
request/free into new functions, allowing us to request/free individual
IRQs.

As this makes it possible/necessary to request a PPI once per cpu, an
additional check is added to detect mismatched PPIs. This shouldn't
matter for the DT / platform case, as we check this when parsing.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Tested-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>drivers/perf: arm_pmu: rename irq request/free functions</title>
<updated>2017-04-11T15:29:53Z</updated>
<author>
<name>Mark Rutland</name>
<email>mark.rutland@arm.com</email>
</author>
<published>2017-04-11T08:39:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3cf6111025cb3346be43856e4c5e9b795b447832'/>
<id>urn:sha1:3cf6111025cb3346be43856e4c5e9b795b447832</id>
<content type='text'>
For historical reasons, portions of the arm_pmu code use a cpu_pmu_
prefix rather than an armpmu_ prefix. While a minor annoyance, this
hasn't been a problem thusfar.

However, to enable ACPI support, we'll need to expose a few things in
header files, and we should aim to keep those consistently namespaced.
In preparation for exporting our IRQ request/free functions, rename
these to have an armpmu_ prefix. For consistency, the 'cpu_pmu'
parameter is also renamed to 'armpmu'.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Tested-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>drivers/perf: arm_pmu: handle no platform_device</title>
<updated>2017-04-11T15:29:53Z</updated>
<author>
<name>Mark Rutland</name>
<email>mark.rutland@arm.com</email>
</author>
<published>2017-04-11T08:39:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7654137071fa706e5c91f4f27bc2a5cd7e435a9b'/>
<id>urn:sha1:7654137071fa706e5c91f4f27bc2a5cd7e435a9b</id>
<content type='text'>
In armpmu_dispatch_irq() we look at arm_pmu::plat_device to acquire
platdata, so that we can defer to platform-specific IRQ handling,
required on some 32-bit parts. With the advent of ACPI we won't always
have a platform_device, and so we must avoid trying to dereference
fields from it.

This patch fixes up armpmu_dispatch_irq() to avoid doing so, introducing
a new armpmu_get_platdata() helper.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Tested-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>drivers/perf: arm_pmu: simplify cpu_pmu_request_irqs()</title>
<updated>2017-04-11T15:29:53Z</updated>
<author>
<name>Mark Rutland</name>
<email>mark.rutland@arm.com</email>
</author>
<published>2017-04-11T08:39:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3a5a89d30ee3d5d8b55490e3c63bf533b196e1c8'/>
<id>urn:sha1:3a5a89d30ee3d5d8b55490e3c63bf533b196e1c8</id>
<content type='text'>
The ARM PMU framework code always uses armpmu_dispatch_irq as its common
IRQ handler. Passing this down from cpu_pmu_init() is somewhat
pointless, and gets in the way of refactoring.

This patch makes cpu_pmu_request_irqs() always use armpmu_dispatch_irq
as the handler when requesting IRQs, and removes the handler parameter
from its prototype.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Tested-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>drivers/perf: arm_pmu: factor out pmu registration</title>
<updated>2017-04-11T15:29:53Z</updated>
<author>
<name>Mark Rutland</name>
<email>mark.rutland@arm.com</email>
</author>
<published>2017-04-11T08:39:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=74a2b3ea2d8c6c1f73103a0fcb50b5c214c0d864'/>
<id>urn:sha1:74a2b3ea2d8c6c1f73103a0fcb50b5c214c0d864</id>
<content type='text'>
Currently arm_pmu_device_probe contains probing logic specific to the
platform_device infrastructure, and some logic required to safely
register the PMU with various systems.

This patch factors out the logic relating to the registration of the
PMU. This makes arm_pmu_device_probe a little easier to read, and will
make it easier to reuse the logic for an ACPI-specific probing
mechanism.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Tested-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>drivers/perf: arm_pmu: fold init into alloc</title>
<updated>2017-04-11T15:29:53Z</updated>
<author>
<name>Mark Rutland</name>
<email>mark.rutland@arm.com</email>
</author>
<published>2017-04-11T08:39:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=70cd908a18f618577c449ad47988f4d442c9bc84'/>
<id>urn:sha1:70cd908a18f618577c449ad47988f4d442c9bc84</id>
<content type='text'>
Given we always want to initialise common fields on an allocated PMU,
this patch folds this common initialisation into armpmu_alloc(). This
will make it simpler to reuse this code for an ACPI-specific probe path.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Tested-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
</feed>
