From nobody Wed Aug 31 07:26:17 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MHbMF42lwz4bSfl; Wed, 31 Aug 2022 07:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MHbMF3TVrz3kKR; Wed, 31 Aug 2022 07:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661930777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SRMSTpnyaQL5pDZ8CWtHRecMIsVwOwapbgUvv4KFWNg=; b=UkrTrWt96QBs2Rm5icjO2FM2I2gT8PtqNfCjtanUqO+rIEk3u9V/x5wfc0ozuzMTZFE83c zJzOFA0g9u0QaXZbbDK581MYkkRuEC0aU+Og1DzUJ9EU0zSv5spzfFtxWTzmCfayhFBjRN iD/8mNxy8zstpEoRiNlOMFVjT2lIna7rVv0jbc0LK4c7AYNidYpqtW5QuCXkHdrqtDwA5x 4zIcuid9B+XouxaKluA75xRJmyRBeeR7GavkirlcRGd1PuZ92dzVHlmu0qL7DYvISdwpAO ikQQQiv2f8psDKWwzcPYVzykc0FPC85Q9NK1fzIUFC/n5dbrEfkCu+2kPjLVaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MHbMF2VBDz13X3; Wed, 31 Aug 2022 07:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27V7QH6G068856; Wed, 31 Aug 2022 07:26:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27V7QHes068855; Wed, 31 Aug 2022 07:26:17 GMT (envelope-from git) Date: Wed, 31 Aug 2022 07:26:17 GMT Message-Id: <202208310726.27V7QHes068855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 0a9a4d2cd609 - main - arm64: Fix hwpmc module for OPT_ACPI isn't selected List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a9a4d2cd60920d9f8c2dffb06b6b4186a5a2715 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661930777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SRMSTpnyaQL5pDZ8CWtHRecMIsVwOwapbgUvv4KFWNg=; b=XVsT4y03NOQaYjT2YID2LtriMZPQ9krOlVPvptq/S5MFONJzHHvPIB/z/rtpX8l5TlQbKH HN0LweFxKajDoDol4xRg1BFsQrgf5siVGZlILXpKaQk0ksRC/NT/fCfaoYLY/4lLy860CM 7QQ9k7DKJB5IVX3rMWWhzIvHjBruldWayBwJGKh+C2S3TIeGp3nyD1UD4GTbbRZ+THA1B6 nKD20yInhlvTFd3eNEyRQ1d7xAOxMJ2YVwB2BHoJo7c5z9IXJC3mmEgrqO6cEzAsaq49qD 773qIn63lliQEysjbmHNPZ8Tbkk/cI2MmfJJig1y/izDoqKrE89Ju/C90HyAug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661930777; a=rsa-sha256; cv=none; b=BYNTZ0ouXM6kJmmDJwDn8uMHjeNOiwvsMcG3YSjrZVGPpUQ1MW0lxBScte6ukDJjsKUcSx 0F5UaKo7wTMJtUc6roc9hqdYI+ZjD3GmlIr7YazEiJ5uWmccfEvaZVh/ESfKLj1gDvy4Sk w+be1/5c5j0uXMkRWz1cNlnmb1CEEZdEscUyCUrvKMmKq6IjLvm1DmhT6HbuuWqzFsSFzQ voxXSsZi5+YQtL0LRaH6MZY1A6V++S7lQMtnVagh5JQgFcc4/LJ2idVcoASCQn66CGOUTP 29aOcA1BBb/gHIGtZkDoCc/XFkGSaRntPZN3zQBzclKl6CH0WwEXnwmzaIPGjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=0a9a4d2cd60920d9f8c2dffb06b6b4186a5a2715 commit 0a9a4d2cd60920d9f8c2dffb06b6b4186a5a2715 Author: Emmanuel Vadot AuthorDate: 2022-08-29 09:50:52 +0000 Commit: Emmanuel Vadot CommitDate: 2022-08-31 07:25:39 +0000 arm64: Fix hwpmc module for OPT_ACPI isn't selected Fixes: 59191f3573f6 ("Add support of ARM CMN-600 controller ...") Sponsored by: Beckhoff Automation GmbH & Co. KG --- sys/dev/hwpmc/hwpmc_arm64.c | 6 ++++++ sys/modules/hwpmc/Makefile | 2 ++ 2 files changed, 8 insertions(+) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index ca346f2ac4df..ec796bcc8ff5 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_acpi.h" + static int arm64_npmcs; struct arm64_event_code_map { @@ -564,11 +566,13 @@ pmc_arm64_initialize(void) /* One AArch64 CPU class */ classes = 1; +#ifdef DEV_ACPI /* Query presence of optional classes and set max class. */ if (pmc_cmn600_nclasses() > 0) classes = MAX(classes, PMC_MDEP_CLASS_INDEX_CMN600); if (pmc_dmc620_nclasses() > 0) classes = MAX(classes, PMC_MDEP_CLASS_INDEX_DMC620_C); +#endif pmc_mdep = pmc_mdep_alloc(classes); @@ -619,12 +623,14 @@ pmc_arm64_initialize(void) pmc_mdep->pmd_npmc += arm64_npmcs; +#ifdef DEV_ACPI if (pmc_cmn600_nclasses() > 0) pmc_cmn600_initialize(pmc_mdep); if (pmc_dmc620_nclasses() > 0) { pmc_dmc620_initialize_cd2(pmc_mdep); pmc_dmc620_initialize_c(pmc_mdep); } +#endif return (pmc_mdep); } diff --git a/sys/modules/hwpmc/Makefile b/sys/modules/hwpmc/Makefile index 0db4c55e64f3..a72b3cf8d2fd 100644 --- a/sys/modules/hwpmc/Makefile +++ b/sys/modules/hwpmc/Makefile @@ -12,9 +12,11 @@ SRCS+= vnode_if.h .if ${MACHINE_CPUARCH} == "aarch64" SRCS+= hwpmc_arm64.c hwpmc_arm64_md.c +.if !empty(OPT_ACPI) SRCS+= cmn600.c hwpmc_cmn600.c SRCS+= hwpmc_dmc620.c pmu_dmc620.c .endif +.endif .if ${MACHINE_CPUARCH} == "amd64" SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_intel.c hwpmc_tsc.c