<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/perf/hisilicon, branch linux-6.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-07-11T17:39:24Z</updated>
<entry>
<title>drivers/perf: hisi: Don't migrate perf to the CPU going to teardown</title>
<updated>2023-07-11T17:39:24Z</updated>
<author>
<name>Junhao He</name>
</author>
<published>2023-06-08T11:43:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f564e543a43d0f1cabac791672c8a6fc78ce12d0'/>
<id>urn:sha1:f564e543a43d0f1cabac791672c8a6fc78ce12d0</id>
<content type='text'>
[ Upstream commit 7a6a9f1c5a0a875a421db798d4b2ee022dc1ee1a ]

The driver needs to migrate the perf context if the current using CPU going
to teardown. By the time calling the cpuhp::teardown() callback the
cpu_online_mask() hasn't updated yet and still includes the CPU going to
teardown. In current driver's implementation we may migrate the context
to the teardown CPU and leads to the below calltrace:

...
[  368.104662][  T932] task:cpuhp/0         state:D stack:    0 pid:   15 ppid:     2 flags:0x00000008
[  368.113699][  T932] Call trace:
[  368.116834][  T932]  __switch_to+0x7c/0xbc
[  368.120924][  T932]  __schedule+0x338/0x6f0
[  368.125098][  T932]  schedule+0x50/0xe0
[  368.128926][  T932]  schedule_preempt_disabled+0x18/0x24
[  368.134229][  T932]  __mutex_lock.constprop.0+0x1d4/0x5dc
[  368.139617][  T932]  __mutex_lock_slowpath+0x1c/0x30
[  368.144573][  T932]  mutex_lock+0x50/0x60
[  368.148579][  T932]  perf_pmu_migrate_context+0x84/0x2b0
[  368.153884][  T932]  hisi_pcie_pmu_offline_cpu+0x90/0xe0 [hisi_pcie_pmu]
[  368.160579][  T932]  cpuhp_invoke_callback+0x2a0/0x650
[  368.165707][  T932]  cpuhp_thread_fun+0xe4/0x190
[  368.170316][  T932]  smpboot_thread_fn+0x15c/0x1a0
[  368.175099][  T932]  kthread+0x108/0x13c
[  368.179012][  T932]  ret_from_fork+0x10/0x18
...

Use function cpumask_any_but() to find one correct active cpu to fixes
this issue.

Fixes: 8404b0fbc7fb ("drivers/perf: hisi: Add driver for HiSilicon PCIe PMU")
Signed-off-by: Junhao He &lt;hejunhao3@huawei.com&gt;
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Yicong Yang &lt;yangyicong@hisilicon.com&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Link: https://lore.kernel.org/r/20230608114326.27649-1-hejunhao3@huawei.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/perf: hisi: Extract initialization of "cpa_pmu-&gt;pmu"</title>
<updated>2023-01-19T18:30:21Z</updated>
<author>
<name>Junhao He</name>
</author>
<published>2023-01-19T10:03:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e126f6f42f89baee09e088ab6bc48f83ac3a0eae'/>
<id>urn:sha1:e126f6f42f89baee09e088ab6bc48f83ac3a0eae</id>
<content type='text'>
Use hisi_pmu_init() function to simplify initialization of "cpa_pmu-&gt;pmu".

Signed-off-by: Junhao He &lt;hejunhao3@huawei.com&gt;
Link: https://lore.kernel.org/r/20230119100307.3660-4-hejunhao3@huawei.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/perf: hisi: Simplify the parameters of hisi_pmu_init()</title>
<updated>2023-01-19T18:30:21Z</updated>
<author>
<name>Junhao He</name>
</author>
<published>2023-01-19T10:03:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=053b5579dacfc5763dda0c073ee14147421d32d7'/>
<id>urn:sha1:053b5579dacfc5763dda0c073ee14147421d32d7</id>
<content type='text'>
Use "hisi_pmu" to simplify the parameter list for the hisi_pmu_init()
function.

Signed-off-by: Junhao He &lt;hejunhao3@huawei.com&gt;
Link: https://lore.kernel.org/r/20230119100307.3660-3-hejunhao3@huawei.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/perf: hisi: Advertise the PERF_PMU_CAP_NO_EXCLUDE capability</title>
<updated>2023-01-19T18:30:20Z</updated>
<author>
<name>Junhao He</name>
</author>
<published>2023-01-19T10:03:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f95da9d2dc4c20bb374c281ceb8fa40b6208f4b'/>
<id>urn:sha1:7f95da9d2dc4c20bb374c281ceb8fa40b6208f4b</id>
<content type='text'>
Missed initialization the variable of pmu::capabilities when extract
the initialization code of hisi_pmu-&gt;pmu into a function.

HISI UNCORE PMU drivers counters that not support context exclusion.
So we have to advertise the PERF_PMU_CAP_NO_EXCLUDE capability.
This ensures that perf will prevent us from handling events where
any exclusion flags are set.

Signed-off-by: Junhao He &lt;hejunhao3@huawei.com&gt;
Link: https://lore.kernel.org/r/20230119100307.3660-2-hejunhao3@huawei.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/perf: hisi: Add TLP filter support</title>
<updated>2022-11-29T14:30:55Z</updated>
<author>
<name>Yicong Yang</name>
</author>
<published>2022-11-17T08:41:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17d573984d4d5ad73c7cb5edcf2024c585475b0c'/>
<id>urn:sha1:17d573984d4d5ad73c7cb5edcf2024c585475b0c</id>
<content type='text'>
The PMU support to filter the TLP when counting the bandwidth with below
options:

- only count the TLP headers
- only count the TLP payloads
- count both TLP headers and payloads

In the current driver it's default to count the TLP payloads only, which
will have an implicity side effects that on the traffic only have header
only TLPs, we'll get no data.

Make this user configuration through "len_mode" parameter and make it
default to count both TLP headers and payloads when user not specified.
Also update the documentation for it.

Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Yicong Yang &lt;yangyicong@hisilicon.com&gt;
Link: https://lore.kernel.org/r/20221117084136.53572-5-yangyicong@huawei.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/perf: hisi: Fix some event id for hisi-pcie-pmu</title>
<updated>2022-11-29T14:30:54Z</updated>
<author>
<name>Yicong Yang</name>
</author>
<published>2022-11-17T08:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b4bb4f38dbfe85247f006f06135ba46450d5bf0'/>
<id>urn:sha1:6b4bb4f38dbfe85247f006f06135ba46450d5bf0</id>
<content type='text'>
Some event id of hisi-pcie-pmu is incorrect, fix them.

Fixes: 8404b0fbc7fb ("drivers/perf: hisi: Add driver for HiSilicon PCIe PMU")
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Yicong Yang &lt;yangyicong@hisilicon.com&gt;
Link: https://lore.kernel.org/r/20221117084136.53572-2-yangyicong@huawei.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/perf: hisi: add driver for HNS3 PMU</title>
<updated>2022-07-06T10:25:53Z</updated>
<author>
<name>Guangbin Huang</name>
</author>
<published>2022-06-28T06:34:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=66637ab137b44914356a9dc7a9b3f8ebcf0b0695'/>
<id>urn:sha1:66637ab137b44914356a9dc7a9b3f8ebcf0b0695</id>
<content type='text'>
HNS3(HiSilicon Network System 3) PMU is RCiEP device in HiSilicon SoC NIC,
supports collection of performance statistics such as bandwidth, latency,
packet rate and interrupt rate.

NIC of each SICL has one PMU device for it. Driver registers each PMU
device to perf, and exports information of supported events, filter mode of
each event, bdf range, hardware clock frequency, identifier and so on via
sysfs.

Each PMU device has its own registers of control, counters and interrupt,
and it supports 8 hardware events, each hardward event has its own
registers for configuration, counters and interrupt.

Filter options contains:
config       - select event
port         - select physical port of nic
tc           - select tc(must be used with port)
func         - select PF/VF
queue        - select queue of PF/VF(must be used with func)
intr         - select interrupt number(must be used with func)
global       - select all functions of IO DIE

Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Reviewed-by: John Garry &lt;john.garry@huawei.com&gt;
Reviewed-by: Shaokun Zhang &lt;zhangshaokun@hisilicon.com&gt;
Link: https://lore.kernel.org/r/20220628063419.38514-3-huangguangbin2@huawei.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf: hisi: Extract hisi_pmu_init</title>
<updated>2022-06-27T10:14:54Z</updated>
<author>
<name>Chen Jun</name>
</author>
<published>2022-05-16T13:16:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e500405dd15d956790859fa532c64d8186445372'/>
<id>urn:sha1:e500405dd15d956790859fa532c64d8186445372</id>
<content type='text'>
Extract the initialization code of hisi_pmu-&gt;pmu into a function

Signed-off-by: Chen Jun &lt;chenjun102@huawei.com&gt;
Link: https://lore.kernel.org/r/20220516131601.48383-1-chenjun102@huawei.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/perf: hisi: Add Support for CPA PMU</title>
<updated>2022-05-06T14:14:31Z</updated>
<author>
<name>Qi Liu</name>
</author>
<published>2022-04-15T10:23:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b79738b6ed91a2d0fe958819469eeedac3bca81'/>
<id>urn:sha1:6b79738b6ed91a2d0fe958819469eeedac3bca81</id>
<content type='text'>
On HiSilicon Hip09 platform, there is a CPA (Coherency Protocol Agent) on
each SICL (Super IO Cluster) which implements packet format translation,
route parsing and traffic statistics.

CPA PMU has 8 PMU counters and interrupt is supported to handle counter
overflow. Let's support its driver under the framework of HiSilicon PMU
driver.

Signed-off-by: Qi Liu &lt;liuqi115@huawei.com&gt;
Reviewed-by: John Garry &lt;john.garry@huawei.com&gt;
Reviewed-by: Shaokun Zhang &lt;zhangshaokun@hisilicon.com&gt;
Link: https://lore.kernel.org/r/20220415102352.6665-3-liuqi115@huawei.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/perf: hisi: Associate PMUs in SICL with CPUs online</title>
<updated>2022-05-06T14:14:31Z</updated>
<author>
<name>Qi Liu</name>
</author>
<published>2022-04-15T10:23:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=807907dae9701c4b0593d5195d4839f17d103314'/>
<id>urn:sha1:807907dae9701c4b0593d5195d4839f17d103314</id>
<content type='text'>
If a PMU is in a SICL (Super IO cluster), it is not appropriate to
associate this PMU with a CPU die. So we associate it with all CPUs
online, rather than CPUs in the nearest SCCL.

As the firmware of Hip09 platform hasn't been published yet, change
of PMU driver will not influence backwards compatibility between
driver and firmware.

Signed-off-by: Qi Liu &lt;liuqi115@huawei.com&gt;
Reviewed-by: John Garry &lt;john.garry@huawei.com&gt;
Link: https://lore.kernel.org/r/20220415102352.6665-2-liuqi115@huawei.com
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
</feed>
