lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230807122233.28563-1-yangyicong@huawei.com>
Date:   Mon, 7 Aug 2023 20:22:33 +0800
From:   Yicong Yang <yangyicong@...wei.com>
To:     <will@...nel.org>, <mark.rutland@....com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
CC:     <jonathan.cameron@...wei.com>, <linuxarm@...wei.com>,
        <yangyicong@...ilicon.com>
Subject: [PATCH] perf/smmuv3: Add platform id table for module auto loading

From: Yicong Yang <yangyicong@...ilicon.com>

On ACPI based system the device is probed by the name directly. If the
driver is configured as module it can only be loaded manually. Add the
platform id table as well as the module alias then the driver will be
loaded automatically by the udev or others once the device added.

Signed-off-by: Yicong Yang <yangyicong@...ilicon.com>
---
 drivers/perf/arm_smmuv3_pmu.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
index 25a269d431e4..f27c5f585524 100644
--- a/drivers/perf/arm_smmuv3_pmu.c
+++ b/drivers/perf/arm_smmuv3_pmu.c
@@ -946,7 +946,14 @@ static const struct of_device_id smmu_pmu_of_match[] = {
 MODULE_DEVICE_TABLE(of, smmu_pmu_of_match);
 #endif
 
+static const struct platform_device_id smmu_pmu_platform_match[] = {
+	{ "arm-smmu-v3-pmcg", 0 },
+	{}
+};
+MODULE_DEVICE_TABLE(platform, smmu_pmu_platform_match);
+
 static struct platform_driver smmu_pmu_driver = {
+	.id_table = smmu_pmu_platform_match,
 	.driver = {
 		.name = "arm-smmu-v3-pmcg",
 		.of_match_table = of_match_ptr(smmu_pmu_of_match),
-- 
2.24.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ