From patchwork Tue Aug 27 02:03:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dann frazier X-Patchwork-Id: 1153545 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46HXHS1Rklz9sBF; Tue, 27 Aug 2019 12:04:20 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1i2QqG-0005L8-CB; Tue, 27 Aug 2019 02:04:16 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1i2QqA-0005HC-IV for kernel-team@lists.ubuntu.com; Tue, 27 Aug 2019 02:04:10 +0000 Received: from mail-io1-f70.google.com ([209.85.166.70]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1i2Qq9-0003D1-Is for kernel-team@lists.ubuntu.com; Tue, 27 Aug 2019 02:04:09 +0000 Received: by mail-io1-f70.google.com with SMTP id t8so25034194iom.8 for ; Mon, 26 Aug 2019 19:04:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DIRRXyNjwoyVy2jtOMS92CpKHy3BfdJm/WaHiqEqGwI=; b=Bi8oJ6I3p4cB/ZzNcXixGXdQkhbltOwqoWe8dbq6JL1ARrL0iJpRaMhNNsCSBIpCan vR3JIJloDB8JEh+uJpkOD3qGC3Insdc8ulFxv9KYg16NzQLOU2uMqIhTjF3BIanrxFaV X75BcDddgMMScn5O+kq63t8dy8rL8Zq+lS/8GaahBCaA7MLCOSDfVn2pQb+zJ/Ey4wnU /rjnXJf3Yz6cCscGaum3FUGRTQsLRh0puyw9xXamnATY4DcNWO5bk7gD5nNkWwGv2moH oEzd0X1357opWBxERW8NyQZnlj/3hXGu+jMWjgAOBr1PXKHvNe0agvyedzVTB/haMOSh GfSQ== X-Gm-Message-State: APjAAAXnYjK/UJfrTV/Ff+f4eBlyzvXlVfG5EGk2Mj00IKP2WHqGB9od +7xPJWLy6k18n1tX3zU/W0s1kamO1f2Q8fyKMWCIuFu6FPiTOn4JofARShXfK1XllbAxj0ZulZT JFzSVF/Ls8r/VwDJgrzWToV/ImszDHVbn64wEJmaniw== X-Received: by 2002:a02:a595:: with SMTP id b21mr18160512jam.28.1566871448321; Mon, 26 Aug 2019 19:04:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxk058Ce8g0TK+aD+7YvhS93KypCz5QreTFobW/crdDClZgJs0NsigBCzbJgj/79UCA88/OGw== X-Received: by 2002:a02:a595:: with SMTP id b21mr18160494jam.28.1566871447989; Mon, 26 Aug 2019 19:04:07 -0700 (PDT) Received: from xps13.canonical.com (c-71-56-235-36.hsd1.co.comcast.net. [71.56.235.36]) by smtp.gmail.com with ESMTPSA id c3sm21552345iot.42.2019.08.26.19.04.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 19:04:07 -0700 (PDT) From: dann frazier To: kernel-team@lists.ubuntu.com Subject: [PATCH 6/6][SRU Disco] perf: arm_spe: Enable ACPI/Platform automatic module loading Date: Mon, 26 Aug 2019 20:03:51 -0600 Message-Id: <20190827020351.15443-7-dann.frazier@canonical.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190827020351.15443-1-dann.frazier@canonical.com> References: <20190827020219.15242-1-dann.frazier@canonical.com> <20190827020351.15443-1-dann.frazier@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Jeremy Linton BugLink: https://bugs.launchpad.net/bugs/1841490 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 Guo Reviewed-by: Sudeep Holla Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon (cherry picked from commit d482e575fbf0f7ec9319bded951f21bbc84312bf) Signed-off-by: dann frazier --- drivers/perf/arm_spe_pmu.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c index e120f933412a7..4fb65c61c8eab 100644 --- a/drivers/perf/arm_spe_pmu.c +++ b/drivers/perf/arm_spe_pmu.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -1168,7 +1169,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; @@ -1228,11 +1235,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, };