From patchwork Tue Aug 27 02:03:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dann frazier X-Patchwork-Id: 1153541 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 46HXHJ6zdHz9sDB; Tue, 27 Aug 2019 12:04:12 +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 1i2Qq9-0005Fw-6F; Tue, 27 Aug 2019 02:04:09 +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 1i2Qq2-0005Dd-PJ for kernel-team@lists.ubuntu.com; Tue, 27 Aug 2019 02:04:02 +0000 Received: from mail-io1-f71.google.com ([209.85.166.71]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1i2Qq2-0003Cg-Bh for kernel-team@lists.ubuntu.com; Tue, 27 Aug 2019 02:04:02 +0000 Received: by mail-io1-f71.google.com with SMTP id e17so25188281ioh.13 for ; Mon, 26 Aug 2019 19:04:02 -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=jPwHakGJBkoutMevjTCQHoQFEgRj4CzaXNfKZZn3VaI=; b=g0JAJBlRb5A/Sf1ot3AhJxAHt2EhgylboWH3UrgSdDZp7U9DuaLCzYgRaFUC9yko8A nDkse7zcEEl7FX07WdruP5HqDjMXZkbN86X+2dSku/IP3SoFT0WcXzzsidPyN9yZzofK MkOWolJvldxNvESKKa+M0Psce34Cc6SC5TAmjVFHhGMuVuQL9drrtY6SwNDAsMjCIJ0r nItBqx7H42NjwBru9qEAjwCHuttVNVc+hNPpNwgCVA/V5scqeG0UfQz2zWBqYXUSHOeX QEN6H7Wf7yz46u6U1Jv4pLRz1MNqj8I89rI7U2iDgL9KRXL2t1ktZhwmqMwgk7dsbtEn oqEg== X-Gm-Message-State: APjAAAVursbeVCZqoxWboyer4/e5cB+3zSuU2vYUA7La1PuH7klxDbme dUC3PE2Qh+w8MfbdOZbCRcp9bd0NzfE9vtl2dIdfvZm0CqxxctXqnPOw1hLolEfj6XHMLZoOde8 8X1kBocUzciImx/QjXDF+AGYcNIP3Fd2mk/VAVrB5mw== X-Received: by 2002:a6b:ac01:: with SMTP id v1mr266091ioe.87.1566871441177; Mon, 26 Aug 2019 19:04:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYRpIUFTftSvMToyhSUPGU+Jrc5C8mOF98O2hR+PC/3j7T89wTNmOivZRfXk9rzvwds7bFyw== X-Received: by 2002:a6b:ac01:: with SMTP id v1mr266074ioe.87.1566871440937; Mon, 26 Aug 2019 19:04:00 -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 q22sm10157899ioj.56.2019.08.26.19.04.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 19:04:00 -0700 (PDT) From: dann frazier To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/6][SRU Disco] ACPICA: ACPI 6.3: MADT: add support for statistical profiling in GICC Date: Mon, 26 Aug 2019 20:03:46 -0600 Message-Id: <20190827020351.15443-2-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: Erik Schmauss BugLink: https://bugs.launchpad.net/bugs/1841490 ACPICA commit 31b184052a986dc8d80c878edeca574d4ffa1cf5 Link: https://github.com/acpica/acpica/commit/31b18405 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki (cherry picked from commit e646e0a50cfadae315f2db05e07a2ec072ce8d9c) Signed-off-by: dann frazier --- include/acpi/actbl2.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index c50ef7e6b9425..03d924ec835f9 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -623,7 +623,7 @@ struct acpi_madt_local_x2apic_nmi { u8 reserved[3]; /* reserved - must be zero */ }; -/* 11: Generic Interrupt (ACPI 5.0 + ACPI 6.0 changes) */ +/* 11: Generic interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 changes) */ struct acpi_madt_generic_interrupt { struct acpi_subtable_header header; @@ -641,7 +641,8 @@ struct acpi_madt_generic_interrupt { u64 gicr_base_address; u64 arm_mpidr; u8 efficiency_class; - u8 reserved2[3]; + u8 reserved2[1]; + u16 spe_interrupt; /* ACPI 6.3 */ }; /* Masks for Flags field above */ From patchwork Tue Aug 27 02:03:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dann frazier X-Patchwork-Id: 1153540 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 46HXHF4pQVz9sBF; Tue, 27 Aug 2019 12:04:09 +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 1i2Qq6-0005Ed-1b; Tue, 27 Aug 2019 02:04:06 +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 1i2Qq4-0005EE-6w for kernel-team@lists.ubuntu.com; Tue, 27 Aug 2019 02:04:04 +0000 Received: from mail-io1-f69.google.com ([209.85.166.69]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1i2Qq3-0003Cl-Px for kernel-team@lists.ubuntu.com; Tue, 27 Aug 2019 02:04:03 +0000 Received: by mail-io1-f69.google.com with SMTP id p2so25209573iod.2 for ; Mon, 26 Aug 2019 19:04:03 -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=SFKK2BrF+3YLMZ17Qa/FCg9ETMBBxJAoMqqqL46I0k0=; b=bSQKI/JqODmUObKd0ioOtJe8cHFuHFzwXDjcvI+JqvWzf4Djw5Xkx29zkNPWE6Nx8d ro+ItRqN+ifkIL3ISPhVC1ZsAfWf6ZhwE/aIXPdrDwTXfGi3/ir8MxtsFqrWuQ/qvPP/ bFLO1hQEdAYuJNDy9Kr17A9OYxao4IfV8HDlVWPfXyhRhpfOfxSFXUbbvUtW3SPvT/G+ IvcmjMzDPspiPzTEb4pI3D2sbtMo4JOmKQyJVxhqWO9Rk3ne8E8RdsVcQw1rMyq4wkYq PhMOMfNNwFYGwNc77sQer1RsTEc6cb24UGPiczxDeymnxnH19Jvm9lT1Dmgxe4fP/rr9 fxjQ== X-Gm-Message-State: APjAAAVedS2B3IMg3XR8asutzQMWBPyfVvgD2kAKMVUywKv+mUHLV7hD LlHYGR5sdnGkkO8KIIoT0FUd4xa30aBUf1kJhhDzdnvh3/dRYK6tPKZdYM+sxPPVIsx2z1ixeIh QPqWJA5LYsm4vALOnRbBYRSRFzn5xgxWDUDC/TjxSOw== X-Received: by 2002:a05:6602:2413:: with SMTP id s19mr4701567ioa.161.1566871442508; Mon, 26 Aug 2019 19:04:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZRgnzrQ+lSz5nA64fkdIbPI6gibY5TnNwFEuI/xqHm6chDatC6AE0tMrlIhRov91HAFL7iA== X-Received: by 2002:a05:6602:2413:: with SMTP id s19mr4701555ioa.161.1566871442258; Mon, 26 Aug 2019 19:04:02 -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 199sm18339839iob.44.2019.08.26.19.04.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 19:04:01 -0700 (PDT) From: dann frazier To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/6][SRU Disco] ACPICA: ACPI 6.3: PPTT add additional fields in Processor Structure Flags Date: Mon, 26 Aug 2019 20:03:47 -0600 Message-Id: <20190827020351.15443-3-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: Erik Schmauss BugLink: https://bugs.launchpad.net/bugs/1841490 ACPICA commit c736ea34add19a3a07e0e398711847cd6b95affd Link: https://github.com/acpica/acpica/commit/c736ea34 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki (cherry picked from commit b5eab512e7cffb2bb37c4b342b5594e9e75fd486) Signed-off-by: dann frazier --- include/acpi/actbl2.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 03d924ec835f9..6ec86ca859c8f 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -1473,8 +1473,11 @@ struct acpi_pptt_processor { /* Flags */ -#define ACPI_PPTT_PHYSICAL_PACKAGE (1) /* Physical package */ -#define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (2) /* ACPI Processor ID valid */ +#define ACPI_PPTT_PHYSICAL_PACKAGE (1) +#define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (1<<1) +#define ACPI_PPTT_ACPI_PROCESSOR_IS_THREAD (1<<2) /* ACPI 6.3 */ +#define ACPI_PPTT_ACPI_LEAF_NODE (1<<3) /* ACPI 6.3 */ +#define ACPI_PPTT_ACPI_IDENTICAL (1<<4) /* ACPI 6.3 */ /* 1: Cache Type Structure */ From patchwork Tue Aug 27 02:03:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dann frazier X-Patchwork-Id: 1153542 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 46HXHK4PM1z9s00; Tue, 27 Aug 2019 12:04:13 +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 1i2Qq9-0005GF-Aj; Tue, 27 Aug 2019 02:04:09 +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 1i2Qq5-0005EU-MX for kernel-team@lists.ubuntu.com; Tue, 27 Aug 2019 02:04:05 +0000 Received: from mail-io1-f69.google.com ([209.85.166.69]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1i2Qq5-0003Cp-9J for kernel-team@lists.ubuntu.com; Tue, 27 Aug 2019 02:04:05 +0000 Received: by mail-io1-f69.google.com with SMTP id i6so25245954ioi.3 for ; Mon, 26 Aug 2019 19:04:05 -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=H2gDfoqrVctlw9vv8h9vAyvZV2ffzeY34qNkrPPckPA=; b=VKOLbqdeDglVoqWxpbqUAlFRjdVyYb4ReI/zB+EbqkczANj/kYQ/KOF8kE1kA8tawK ChiVOWiQrV7DTNvpXuIGBTUQTLlxMrh+3iUm7OhYzcPGGCCQYhRofM50GAJnDTFyYt6s 19TsptFkZ8XUdNmSeLm2D1BFzyePQcRVI3XrYYXsnJoLghmNTg51f0+rJopoqLb3XdR2 TulsNIo82waSo6w4/pLIFCyKtGkjxv1fIquloOcDqmRZwHxPL5Les3D373FQk2BV1si8 aPANIcRroLI5v3k2DMFRHh+BBTtZGNQRbl4KGEsFI7HIq4Uz6wNWqQ+rOdQ5eFERQSj6 0fZA== X-Gm-Message-State: APjAAAWIsnqDMpVVPalmZuNfvDM7PVQTIrQQkAPJOh6s6qXlKhHlIR3y Q3RGEvWA/T6l6c1PFWK3013UJRUlKmzjSQJhq4TZ2S5ZvJs9AKWyHP7EiWcv2R5Rxau85P2somX cR/b0TesTEhXlmwPNVRyV6B5uTLKNH/vxt7z20hb8XQ== X-Received: by 2002:a5d:93c4:: with SMTP id j4mr18267957ioo.80.1566871444060; Mon, 26 Aug 2019 19:04:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwaXhV8FSmgN6bVamPq7PvfVvrOVcKzEnlVWiUVmlsgeqvy3JfuXCQyTw7Vg/gmstQ5ER08xA== X-Received: by 2002:a5d:93c4:: with SMTP id j4mr18267932ioo.80.1566871443803; Mon, 26 Aug 2019 19:04:03 -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 l26sm12249271ioj.24.2019.08.26.19.04.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 19:04:03 -0700 (PDT) From: dann frazier To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/6][SRU Disco] ACPI/PPTT: Modify node flag detection to find last IDENTICAL Date: Mon, 26 Aug 2019 20:03:48 -0600 Message-Id: <20190827020351.15443-4-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 The ACPI specification implies that the IDENTICAL flag should be set on all non leaf nodes where the children are identical. This means that we need to be searching for the last node with the identical flag set rather than the first one. Since this flag is also dependent on the table revision, we need to add a bit of extra code to verify the table revision, and the next node's state in the traversal. Since we want to avoid function pointers here, lets just special case the IDENTICAL flag. Acked-by: Rafael J. Wysocki Tested-by: Hanjun Guo Reviewed-by: Sudeep Holla Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon (cherry picked from commit ed2b664fcc8073c09394393756df3fc86977bbac) Signed-off-by: dann frazier --- drivers/acpi/pptt.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c index da031b1df6f5c..068dc5bdc7ab2 100644 --- a/drivers/acpi/pptt.c +++ b/drivers/acpi/pptt.c @@ -429,17 +429,40 @@ static void cache_setup_acpi_cpu(struct acpi_table_header *table, } } +static bool flag_identical(struct acpi_table_header *table_hdr, + struct acpi_pptt_processor *cpu) +{ + struct acpi_pptt_processor *next; + + /* heterogeneous machines must use PPTT revision > 1 */ + if (table_hdr->revision < 2) + return false; + + /* Locate the last node in the tree with IDENTICAL set */ + if (cpu->flags & ACPI_PPTT_ACPI_IDENTICAL) { + next = fetch_pptt_node(table_hdr, cpu->parent); + if (!(next && next->flags & ACPI_PPTT_ACPI_IDENTICAL)) + return true; + } + + return false; +} + /* Passing level values greater than this will result in search termination */ #define PPTT_ABORT_PACKAGE 0xFF -static struct acpi_pptt_processor *acpi_find_processor_package_id(struct acpi_table_header *table_hdr, - struct acpi_pptt_processor *cpu, - int level, int flag) +static struct acpi_pptt_processor *acpi_find_processor_tag(struct acpi_table_header *table_hdr, + struct acpi_pptt_processor *cpu, + int level, int flag) { struct acpi_pptt_processor *prev_node; while (cpu && level) { - if (cpu->flags & flag) + /* special case the identical flag to find last identical */ + if (flag == ACPI_PPTT_ACPI_IDENTICAL) { + if (flag_identical(table_hdr, cpu)) + break; + } else if (cpu->flags & flag) break; pr_debug("level %d\n", level); prev_node = fetch_pptt_node(table_hdr, cpu->parent); @@ -472,8 +495,8 @@ static int topology_get_acpi_cpu_tag(struct acpi_table_header *table, cpu_node = acpi_find_processor_node(table, acpi_cpu_id); if (cpu_node) { - cpu_node = acpi_find_processor_package_id(table, cpu_node, - level, flag); + cpu_node = acpi_find_processor_tag(table, cpu_node, + level, flag); /* * As per specification if the processor structure represents * an actual processor, then ACPI processor ID must be valid. From patchwork Tue Aug 27 02:03:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dann frazier X-Patchwork-Id: 1153543 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 46HXHM34dWz9sDB; Tue, 27 Aug 2019 12:04:15 +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 1i2QqA-0005Ho-TV; Tue, 27 Aug 2019 02:04:10 +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 1i2Qq7-0005FE-4S for kernel-team@lists.ubuntu.com; Tue, 27 Aug 2019 02:04:07 +0000 Received: from mail-io1-f72.google.com ([209.85.166.72]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1i2Qq6-0003Cs-ML for kernel-team@lists.ubuntu.com; Tue, 27 Aug 2019 02:04:06 +0000 Received: by mail-io1-f72.google.com with SMTP id a13so25025934ioh.18 for ; Mon, 26 Aug 2019 19:04:06 -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=w6SkJaY34ngmKr7F2bZYQXXknkmSjNSLZqogwlJU+FY=; b=b2ViLC2GrenQ1xJ9UHzDOyTLZ71R3E5XL8qAMFWUzLUcsG6B0wmBOCJgjaKcGCkSju urF+79ahu+WHn1q64e58sr2svh6+X7PUbEfx0kjwB4+2FbDQKHYzKJVhE1+yDV9w0X+E /U+qjnODggTcGAEJ6wO7NnnYPfSX8L7cwwBdCbeXrDRohvaOQF9bTvs2QU0kVyDbG9Ae Ov85ol8WH+olEaClGhk7s2jBl/EOanDhzYz4MNXTE8uHHq0X7aICCvKcA/IuJOkTD4RC NiQksj9+v6RnlPi32eBBYI+adhpdxY9mG/ym3Wq3+5H2/mYtzmWLj9Hl/bhG3jId8VkR Wz2w== X-Gm-Message-State: APjAAAVhLy7lir6Sq29dd6JY4cF86244veugm9H8UwiHlTiheSKnJcmI Vm5Tt3aBRmNZ2YFHBHjhJgtZOHxGnEENG/Kcf3IDN+6UTWYjZdrR3C+WZhozx39NBd76VfhEtq3 0+lqTKJRG8mdM/cpqrnzG3NdXXk6JmbHSCK8osfiMDg== X-Received: by 2002:a6b:6f06:: with SMTP id k6mr29735743ioc.232.1566871445485; Mon, 26 Aug 2019 19:04:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+GAv1EC0tWtZypaBtKjQAyFX73moBzo+I9mKhy2ZpNjaRbxf3isYeivNcDKOetqiSFWQ/Ww== X-Received: by 2002:a6b:6f06:: with SMTP id k6mr29735731ioc.232.1566871445220; Mon, 26 Aug 2019 19:04:05 -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 k7sm12913721iop.88.2019.08.26.19.04.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 19:04:04 -0700 (PDT) From: dann frazier To: kernel-team@lists.ubuntu.com Subject: [PATCH 4/6][SRU Disco] ACPI/PPTT: Add function to return ACPI 6.3 Identical tokens Date: Mon, 26 Aug 2019 20:03:49 -0600 Message-Id: <20190827020351.15443-5-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 ACPI 6.3 adds a flag to indicate that child nodes are all identical cores. This is useful to authoritatively determine if a set of (possibly offline) cores are identical or not. Since the flag doesn't give us a unique id we can generate one and use it to create bitmaps of sibling nodes, or simply in a loop to determine if a subset of cores are identical. Acked-by: Rafael J. Wysocki Tested-by: Hanjun Guo Reviewed-by: Sudeep Holla Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon (cherry picked from commit 56855a99f3d0d1e9f1f4e24f5851f9bf14c83296) Signed-off-by: dann frazier --- drivers/acpi/pptt.c | 26 ++++++++++++++++++++++++++ include/linux/acpi.h | 5 +++++ 2 files changed, 31 insertions(+) diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c index 068dc5bdc7ab2..08cacb155c08e 100644 --- a/drivers/acpi/pptt.c +++ b/drivers/acpi/pptt.c @@ -675,3 +675,29 @@ int find_acpi_cpu_topology_package(unsigned int cpu) return find_acpi_cpu_topology_tag(cpu, PPTT_ABORT_PACKAGE, ACPI_PPTT_PHYSICAL_PACKAGE); } + +/** + * find_acpi_cpu_topology_hetero_id() - Get a core architecture tag + * @cpu: Kernel logical CPU number + * + * Determine a unique heterogeneous tag for the given CPU. CPUs with the same + * implementation should have matching tags. + * + * The returned tag can be used to group peers with identical implementation. + * + * The search terminates when a level is found with the identical implementation + * flag set or we reach a root node. + * + * Due to limitations in the PPTT data structure, there may be rare situations + * where two cores in a heterogeneous machine may be identical, but won't have + * the same tag. + * + * Return: -ENOENT if the PPTT doesn't exist, or the CPU cannot be found. + * Otherwise returns a value which represents a group of identical cores + * similar to this CPU. + */ +int find_acpi_cpu_topology_hetero_id(unsigned int cpu) +{ + return find_acpi_cpu_topology_tag(cpu, PPTT_ABORT_PACKAGE, + ACPI_PPTT_ACPI_IDENTICAL); +} diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 87715f20b69a0..d4a6b6e2b3edb 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1315,6 +1315,7 @@ static inline int lpit_read_residency_count_address(u64 *address) #ifdef CONFIG_ACPI_PPTT int find_acpi_cpu_topology(unsigned int cpu, int level); int find_acpi_cpu_topology_package(unsigned int cpu); +int find_acpi_cpu_topology_hetero_id(unsigned int cpu); int find_acpi_cpu_cache_topology(unsigned int cpu, int level); #else static inline int find_acpi_cpu_topology(unsigned int cpu, int level) @@ -1325,6 +1326,10 @@ static inline int find_acpi_cpu_topology_package(unsigned int cpu) { return -EINVAL; } +static inline int find_acpi_cpu_topology_hetero_id(unsigned int cpu) +{ + return -EINVAL; +} static inline int find_acpi_cpu_cache_topology(unsigned int cpu, int level) { return -EINVAL; From patchwork Tue Aug 27 02:03:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dann frazier X-Patchwork-Id: 1153544 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 46HXHN1Jwdz9sML; Tue, 27 Aug 2019 12:04:16 +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 1i2QqB-0005IP-P7; Tue, 27 Aug 2019 02:04:11 +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 1i2Qq8-0005Fh-JA for kernel-team@lists.ubuntu.com; Tue, 27 Aug 2019 02:04:08 +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 1i2Qq8-0003Cx-3v for kernel-team@lists.ubuntu.com; Tue, 27 Aug 2019 02:04:08 +0000 Received: by mail-io1-f70.google.com with SMTP id k13so25125893ioh.16 for ; Mon, 26 Aug 2019 19:04:08 -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=EE6oa91bLMCgMHYZSAnq/4JDnkZlnfr1YAAU7EMn0hc=; b=kEdM+YjAsFnilFbEELntwLz8ES0EMsaCpvw69RQar03mKtF6aKnPwuCpMv32HdIs91 Xx3jqdLnLrWi5gGE3M05t9/RhwROmgpez0lfMIppkmQuXHQ49dgfXVczPYSNBb+374s4 A6vaaPPnXuAzuSq0FLDJKaQumQZyHgDCJ4SQdNXkNmuJKThJDWuC43k3ygRj7n+O1DXj SfsAIRDol5wjM2bigBQ/4+OX3pwm6MWcnfplWl84eD2MoLi9lmkiw3EvMCfg31bVJfHW 6UfKvsQE8J77NT+X4wQn2aW88Kpur7L9U/Z8weXljEuGCuWLeVmcgeQISX87JFz9CS/r RR4g== X-Gm-Message-State: APjAAAXpFBtuNBhOkF+1Cbhhv/f2U9WGchbvSxxWUD5K7nIv2T4USVAw 49TjEhqyu/iIz0WeHwA0e6oyQKA2biGVh3YPiBdcNPt2a0uvRqDr27m3wlOAIGLjDVUdopv5aDr jB7gcPEPhPRyBu1CFIUae0fLPjO/fji8+Qt7CWXYmZQ== X-Received: by 2002:a02:3745:: with SMTP id r66mr20730523jar.23.1566871446921; Mon, 26 Aug 2019 19:04:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8Hyb7QZrh+P4zGNxIrKt1zKvgd8EZCJu6awMTFP6zttTrLLzsDhO9pLTS8ZxkrwZuZtemxQ== X-Received: by 2002:a02:3745:: with SMTP id r66mr20730509jar.23.1566871446581; Mon, 26 Aug 2019 19:04:06 -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 v12sm12695903ios.16.2019.08.26.19.04.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 19:04:06 -0700 (PDT) From: dann frazier To: kernel-team@lists.ubuntu.com Subject: [PATCH 5/6][SRU Disco] arm_pmu: acpi: spe: Add initial MADT/SPE probing Date: Mon, 26 Aug 2019 20:03:50 -0600 Message-Id: <20190827020351.15443-6-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 ACPI 6.3 adds additional fields to the MADT GICC structure to describe SPE PPI's. We pick these out of the cached reference to the madt_gicc structure similarly to the core PMU code. We then create a platform device referring to the IRQ and let the user/module loader decide whether to load the SPE driver. Tested-by: Hanjun Guo Reviewed-by: Sudeep Holla Reviewed-by: Lorenzo Pieralisi Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon (cherry picked from commit d24a0c7099b32b6981d7f126c45348e381718350) Signed-off-by: dann frazier --- arch/arm64/include/asm/acpi.h | 3 ++ drivers/perf/arm_pmu_acpi.c | 72 +++++++++++++++++++++++++++++++++++ include/linux/perf/arm_pmu.h | 2 + 3 files changed, 77 insertions(+) diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index 7628efbe6c125..d10399b9f9981 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -41,6 +41,9 @@ (!(entry) || (entry)->header.length < ACPI_MADT_GICC_MIN_LENGTH || \ (unsigned long)(entry) + (entry)->header.length > (end)) +#define ACPI_MADT_GICC_SPE (ACPI_OFFSET(struct acpi_madt_generic_interrupt, \ + spe_interrupt) + sizeof(u16)) + /* Basic configuration for ACPI */ #ifdef CONFIG_ACPI pgprot_t __acpi_get_mem_attribute(phys_addr_t addr); diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c index 0f197516d7089..864d7ebe45e92 100644 --- a/drivers/perf/arm_pmu_acpi.c +++ b/drivers/perf/arm_pmu_acpi.c @@ -74,6 +74,76 @@ static void arm_pmu_acpi_unregister_irq(int cpu) acpi_unregister_gsi(gsi); } +#if IS_ENABLED(CONFIG_ARM_SPE_PMU) +static struct resource spe_resources[] = { + { + /* irq */ + .flags = IORESOURCE_IRQ, + } +}; + +static struct platform_device spe_dev = { + .name = ARMV8_SPE_PDEV_NAME, + .id = -1, + .resource = spe_resources, + .num_resources = ARRAY_SIZE(spe_resources) +}; + +/* + * For lack of a better place, hook the normal PMU MADT walk + * and create a SPE device if we detect a recent MADT with + * a homogeneous PPI mapping. + */ +static void arm_spe_acpi_register_device(void) +{ + int cpu, hetid, irq, ret; + bool first = true; + u16 gsi = 0; + + /* + * Sanity check all the GICC tables for the same interrupt number. + * For now, we only support homogeneous ACPI/SPE machines. + */ + for_each_possible_cpu(cpu) { + struct acpi_madt_generic_interrupt *gicc; + + gicc = acpi_cpu_get_madt_gicc(cpu); + if (gicc->header.length < ACPI_MADT_GICC_SPE) + return; + + if (first) { + gsi = gicc->spe_interrupt; + if (!gsi) + return; + hetid = find_acpi_cpu_topology_hetero_id(cpu); + first = false; + } else if ((gsi != gicc->spe_interrupt) || + (hetid != find_acpi_cpu_topology_hetero_id(cpu))) { + pr_warn("ACPI: SPE must be homogeneous\n"); + return; + } + } + + irq = acpi_register_gsi(NULL, gsi, ACPI_LEVEL_SENSITIVE, + ACPI_ACTIVE_HIGH); + if (irq < 0) { + pr_warn("ACPI: SPE Unable to register interrupt: %d\n", gsi); + return; + } + + spe_resources[0].start = irq; + ret = platform_device_register(&spe_dev); + if (ret < 0) { + pr_warn("ACPI: SPE: Unable to register device\n"); + acpi_unregister_gsi(gsi); + } +} +#else +static inline void arm_spe_acpi_register_device(void) +{ +} +#endif /* CONFIG_ARM_SPE_PMU */ + static int arm_pmu_acpi_parse_irqs(void) { int irq, cpu, irq_cpu, err; @@ -279,6 +349,8 @@ static int arm_pmu_acpi_init(void) if (acpi_disabled) return 0; + arm_spe_acpi_register_device(); + ret = arm_pmu_acpi_parse_irqs(); if (ret) return ret; diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h index 4641e850b2046..784bc58f165aa 100644 --- a/include/linux/perf/arm_pmu.h +++ b/include/linux/perf/arm_pmu.h @@ -175,4 +175,6 @@ void armpmu_free_irq(int irq, int cpu); #endif /* CONFIG_ARM_PMU */ +#define ARMV8_SPE_PDEV_NAME "arm,spe-v1" + #endif /* __ARM_PMU_H__ */ 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, };