Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4724256img; Tue, 26 Mar 2019 15:40:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqz49ERXtr2ytNuBe0kaCHD8PFy0MkTS6aFQEYt5sYYy6cXA6aef/mcprAfKNuq/+3V0U0/a X-Received: by 2002:a63:cd10:: with SMTP id i16mr29901332pgg.90.1553640056924; Tue, 26 Mar 2019 15:40:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553640056; cv=none; d=google.com; s=arc-20160816; b=YIehF7Cw3imbgn0trl4O2G/7+jTp2W7CTcwekS82ToEhKtR2iGOUEIMXEJB0xbvHBG UuK7tz+fZKrJ/OaeAdKdTjFveuWm9k2FFSto549MV1rmhtxH/hG5TmL81Ro4f8FkmHFt daoTmhqgTfItFqHU4jf7y7WTUifuH08UTjRia5Ah9gUStBH6StDLrcV8Ihekhb5TpSvP OoKNcwqesgwFg/IsnBwCxpwy0hXMJS5VR8dKxaH7/2GfKr9Fqn7FvB4dd88TXOrOgDzC SEP3u3RpyOXhOC8zMeVnj2MRRRaHe2YPFj+/Gc9fr8Tgm8A+uuc+EmaX7qNZLxplwT/G 5Veg== 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 94si18284028plc.298.2019.03.26.15.40.41; Tue, 26 Mar 2019 15:40:56 -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 S1732243AbfCZWkD (ORCPT + 99 others); Tue, 26 Mar 2019 18:40:03 -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 Content-Transfer-Encoding: 8bit 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(-) 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, }; -- 2.20.1