From nobody Thu Sep 11 19:36:26 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE05FC001DB for ; Mon, 7 Aug 2023 12:24:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233418AbjHGMYv (ORCPT ); Mon, 7 Aug 2023 08:24:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231252AbjHGMYt (ORCPT ); Mon, 7 Aug 2023 08:24:49 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1D63E41 for ; Mon, 7 Aug 2023 05:24:47 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RKFpw280wzfbnT; Mon, 7 Aug 2023 20:23:36 +0800 (CST) Received: from localhost.localdomain (10.50.163.32) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 7 Aug 2023 20:24:45 +0800 From: Yicong Yang To: , , , CC: , , Subject: [PATCH] perf/smmuv3: Add platform id table for module auto loading Date: Mon, 7 Aug 2023 20:22:33 +0800 Message-ID: <20230807122233.28563-1-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yicong Yang 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 --- 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[] = =3D { MODULE_DEVICE_TABLE(of, smmu_pmu_of_match); #endif =20 +static const struct platform_device_id smmu_pmu_platform_match[] =3D { + { "arm-smmu-v3-pmcg", 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, smmu_pmu_platform_match); + static struct platform_driver smmu_pmu_driver =3D { + .id_table =3D smmu_pmu_platform_match, .driver =3D { .name =3D "arm-smmu-v3-pmcg", .of_match_table =3D of_match_ptr(smmu_pmu_of_match), --=20 2.24.0