From patchwork Wed Jun 26 21:37:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 167863 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1463664ilk; Wed, 26 Jun 2019 14:37:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtb+ZMul9iHc4NcjoewUTsBDTJ5N9TUnTcCpE8/nD+vgLBfkrh9MauBrbGyjjdJdbXErrX X-Received: by 2002:a65:5888:: with SMTP id d8mr141743pgu.124.1561585060873; Wed, 26 Jun 2019 14:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561585060; cv=none; d=google.com; s=arc-20160816; b=z9TVMDqpZiV4WpK1lGRUd8+yeUIhRkNrcdV+3c40SHn7eODj9VNLbZSenHJdmUAVBH Gvi7DqYjWKQHLwpUBMf73qfP4LsZdG98DQpUGiKAXU/Ri099kuoh5+bNn6PkNGwsBq2a NNBi0gI01D/HMKNp4o2eKBg7UXpVCd6l8kbcO/TvX1PZIr26LV99lvCmzmCC7s3+CCys wzYtp9eq/ZEXXlTk7lye848dPePaer+13+CMpGxN657i5OeCM/NTAl3ParYM8pfEMU7f rc/H+YqHj3FLMaW0cFV7R3h+0noD7+EhYtJCWA1E7odXJUajoF37NIFZ0fwJ5w0Fnt2K jv+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=dswm6Gx0NYea3sAmbefewPbe/w+DxWYzQ6yc7lC8UGU=; b=Vng9spkORC5KpYtbCze8wSZYFi9L4Qp5Z94cuxQ8PD3gT3UyGhIdz3mYLB4er5+5F9 C3m+u6k2ZEiVoDpWTtwEF6gea1Z0FFPUUkLxrCGPHfkjKyO1IlvDsrkSd1+RtktHPSza 81mZdLWWKwTyDD+FTmIO4spRDKmRlKzzV5v4EMz79dSzlWne3eHotNnJrOh9WNjlm/T/ jcUYl5L47bCkYfT1KHXXtGgTf/w+vrG2J1zWMdIE3+X6/kxI5Gxj8rimHwODF9QU5dB8 YVjJams/Skc16tfJKXlGvcx4aXqQuSPPhq/rVPPw7SxnepZq5MENnkQABPNoVcT61dLC mvVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1si178178pgv.169.2019.06.26.14.37.40; Wed, 26 Jun 2019 14:37:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726407AbfFZVhj (ORCPT + 30 others); Wed, 26 Jun 2019 17:37:39 -0400 Received: from foss.arm.com ([217.140.110.172]:41466 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726223AbfFZVhf (ORCPT ); Wed, 26 Jun 2019 17:37:35 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5E853142F; Wed, 26 Jun 2019 14:37:35 -0700 (PDT) Received: from mammon-tx2.austin.arm.com (mammon-tx2.austin.arm.com [10.118.30.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 563073F246; Wed, 26 Jun 2019 14:37:35 -0700 (PDT) From: Jeremy Linton To: linux-arm-kernel@lists.infradead.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, rjw@rjwysocki.net, lenb@kernel.org, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, sudeep.holla@arm.com, Jeremy Linton , Hanjun Gou Subject: [PATCH v5 4/4] perf: arm_spe: Enable ACPI/Platform automatic module loading Date: Wed, 26 Jun 2019 16:37:18 -0500 Message-Id: <20190626213718.39423-5-jeremy.linton@arm.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190626213718.39423-1-jeremy.linton@arm.com> References: <20190626213718.39423-1-jeremy.linton@arm.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Lets add the MODULE_TABLE and platform id_table entries so that the SPE driver can attach to the ACPI platform device created by the core pmu code. Tested-by: Hanjun Gou Reviewed-by: Sudeep Holla Signed-off-by: Jeremy Linton --- drivers/perf/arm_spe_pmu.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -- 2.21.0 diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c index 49b490925255..4e4984a55cd1 100644 --- a/drivers/perf/arm_spe_pmu.c +++ b/drivers/perf/arm_spe_pmu.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -1157,7 +1158,13 @@ static const struct of_device_id arm_spe_pmu_of_match[] = { }; MODULE_DEVICE_TABLE(of, arm_spe_pmu_of_match); -static int arm_spe_pmu_device_dt_probe(struct platform_device *pdev) +static const struct platform_device_id arm_spe_match[] = { + { ARMV8_SPE_PDEV_NAME, 0}, + { } +}; +MODULE_DEVICE_TABLE(platform, arm_spe_match); + +static int arm_spe_pmu_device_probe(struct platform_device *pdev) { int ret; struct arm_spe_pmu *spe_pmu; @@ -1217,11 +1224,12 @@ static int arm_spe_pmu_device_remove(struct platform_device *pdev) } static struct platform_driver arm_spe_pmu_driver = { + .id_table = arm_spe_match, .driver = { .name = DRVNAME, .of_match_table = of_match_ptr(arm_spe_pmu_of_match), }, - .probe = arm_spe_pmu_device_dt_probe, + .probe = arm_spe_pmu_device_probe, .remove = arm_spe_pmu_device_remove, };