From patchwork Tue Mar 26 22:39:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 161234 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5766172jan; Tue, 26 Mar 2019 15:40:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPstG8yN1p90+q+G3SqaKWjmofTLsbpTkz4HgqaO38aL1sB0eYt5zm/T1POZ7rm+i/BOpB X-Received: by 2002:a62:1881:: with SMTP id 123mr31907228pfy.25.1553640007825; Tue, 26 Mar 2019 15:40:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553640007; cv=none; d=google.com; s=arc-20160816; b=JaLmvkRANHlbNTp3CQcKfWWp2rsv6Rf7q7JhhdmlCZ8RZsMT3CNHWHvSfG7w9qu89G zJNGW6GLhAt+kuf4GbxcZUtIcWylLFBYy/trmiJbXUo3ChjgcnreKxYqSeXtlEgguEnR Wqe2GEKRTOU0bwcOuvmMIrWUVU5HqkkkHxhRKUy1k/YETEoillyzH+02J4tRIoaikM2Q zUpYuZQGvDwadwOrInRoLucOSEC0eXwr4rhy1CZiTc7dUx6L+6qXkJFSRosQnaf0hGZO f1rmVDjW1xlAi7bpu0Jv7F3X/B43kTPJdBIiT5BUuSDHbDj/ebRaSAsJ0D6Herdjq7sz iYlQ== 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=tJYayjolUeY/f2xvJECwoZvWJY7Jnc6kgT76w6ge4sc=; b=z4z5KPWkdnRdKw6hPMzITfgs34Rc6OyhHxVur32zd7No+PBiUxTjooHloyox9T28j4 o4lhDh+yXfGnUCHIlNLGuVraRuiuSPjPoxMoLqRUkapYo7IFfWX1YF6oPwSXwWGGF28K GxZn7iAXLo77i/5nrwOH7/DvZNPXZxpLmWF0K1KBcJg2jCXJXtCWso8wWqjH7IwfJL8d r54v9XB750gZdnJuTOxz7PJFDjPVuohjLPIuMm7+PTQXYxx/Aa/16F7Ira0k8s0MyuYs MqflY3mfaJwDUzyavdZDOvDIQkZCKhonDKdsf0COKfqlRi7RXr+F9bOAzbQ2oOX9ulTk wMDw== 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 b9si16243084pfd.228.2019.03.26.15.40.07; Tue, 26 Mar 2019 15:40:07 -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 S1732316AbfCZWkE (ORCPT + 31 others); Tue, 26 Mar 2019 18:40:04 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:44520 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731912AbfCZWj6 (ORCPT ); Tue, 26 Mar 2019 18:39:58 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 36E68169E; Tue, 26 Mar 2019 15:39:58 -0700 (PDT) Received: from mammon-tx2.austin.arm.com (mammon-tx2.austin.arm.com [10.118.29.246]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8FB903F614; Tue, 26 Mar 2019 15:39:57 -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, sudeep.holla@arm.com, james.morse@arm.com, lorenzo.pieralisi@arm.com, linuxarm@huawei.com, Jeremy Linton Subject: [PATCH 4/4] perf: arm_spe: Enable ACPI/Platform automatic module loading Date: Tue, 26 Mar 2019 17:39:38 -0500 Message-Id: <20190326223938.5365-5-jeremy.linton@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190326223938.5365-1-jeremy.linton@arm.com> References: <20190326223938.5365-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. Signed-off-by: Jeremy Linton Reviewed-by: Sudeep Holla --- drivers/perf/arm_spe_pmu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c index 7cb766dafe85..ffa2c76c08bb 100644 --- a/drivers/perf/arm_spe_pmu.c +++ b/drivers/perf/arm_spe_pmu.c @@ -1176,7 +1176,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[] = { + { "arm,spe-v1", 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; @@ -1236,11 +1242,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, };