From nobody Fri Jan 10 19:18:29 2025 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 4YVBJk2Snpz5kNWF; Fri, 10 Jan 2025 19:18:30 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YVBJk0FJNz4Mx6; Fri, 10 Jan 2025 19:18:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736536710; 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=33YuJnW9yXsjMNmMGE4NjgJVe3v2IiZAq+iCMs0C82w=; b=YvyeGP8Va2OHoO6a4lt8dSwfxYHuzTwnM1Wp3a4SNK9UOY2PJ2fKaqWqZiVO8tXgPpl2Kj a4h3257p71XYmN/POjeQN03tOJzmjgCEZ3IZGeLtKM1BVqqyx4ShRznlxmU3Yxc/lsFljr 0PebGFRtwzW3RpDm/4PSnbGE+xm308d2tQABa9gaLiK2HhTniOElFsydGTYqFo8Qv+3ATb SZAlh7d6rj8ae7P4InLsWa4s24562ZKi7xee3JA7usUwokFYzsq6xjcOTtXJwWlC+Yvm4U IUOP0j70MA05CrRHmu2LBkcL5NQ/ogknMPImT6FawmWL9mCOPxOfeVAFXXnmkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736536710; 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=33YuJnW9yXsjMNmMGE4NjgJVe3v2IiZAq+iCMs0C82w=; b=sJMJr/4CvndcSm8yxgfCAGlGJ8vKaCS594RNe1qolZDfHwhKp0cq965HufEZJDwo4Aa1Vw FGRQgrPa34OnizggirS+rhjp8/kUN/H9W1C2q6nQCQ+kGzGCzXVcwUNM9Br7qFPP1G9uWF 0/oVi32KyVk+lbq2aV1rR0vQkcep3MnL8HWcKwACowzcf1sHbQF5hj16tmfgZixrk0IS7d x1vtDsCPEtwoR+VQecYe0lMpklUSDYp3RctFcg+U0XDJ6uZSoEbiEQXoLYt4LF1pyUWOT4 shUDbK1IKeSV4/1Vefo2631oTKbs7TBZBJlkHClDf+RonDiXlGndfgGP6GER+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736536710; a=rsa-sha256; cv=none; b=d6SIp4c8UCG2rT0pyB16M2k9bH+zilMBHkmOuCtwXhbbFBirDSls/GCRYmaKwPV6thU+Jf yeIfqHmxStsxBacYzgW1IhTozlYbysXlyxx7G9oh6NaRO/zZAh2tUJoTwteeousqpG/0oZ dieGUNONOp7dOMHg0SGBCtZsfvv1Yp7NVn653bmhx13BCfCOZVmEJEuJMMDvcSTPukVkaW Qh5NckDyreoGUwXovnYxcmmj8VlvBo+dfMbQjuIBdLmLhA009DdpF6xXRjGHS1qTPmwMvz PIYNET/V/xcpx8v8d3OlioBPT5tKEP/YWZwGBCwiszQHNpVRoko55sRn7O42UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YVBJj6fMYz9BS; Fri, 10 Jan 2025 19:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50AJITOs026432; Fri, 10 Jan 2025 19:18:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50AJITJK026429; Fri, 10 Jan 2025 19:18:29 GMT (envelope-from git) Date: Fri, 10 Jan 2025 19:18:29 GMT Message-Id: <202501101918.50AJITJK026429@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: aa766e2a03f0 - main - ofw_cpu: fix __riscv preprocessor check 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa766e2a03f0eb2fb6272828865c83a807b81cf1 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=aa766e2a03f0eb2fb6272828865c83a807b81cf1 commit aa766e2a03f0eb2fb6272828865c83a807b81cf1 Author: Mitchell Horne AuthorDate: 2025-01-10 18:46:01 +0000 Commit: Mitchell Horne CommitDate: 2025-01-10 18:46:01 +0000 ofw_cpu: fix __riscv preprocessor check The canonical name is __riscv, not __riscv__. Newer compilers no longer emit the latter. This re-enables finding the nominal frequency from the CPU's clock. I checked, and there are no remaining mistakes like this in the tree. Reviewed by: jrtc27, imp, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48122 --- sys/dev/ofw/ofw_cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ofw/ofw_cpu.c b/sys/dev/ofw/ofw_cpu.c index ad0fd670421a..cbca8caee186 100644 --- a/sys/dev/ofw/ofw_cpu.c +++ b/sys/dev/ofw/ofw_cpu.c @@ -42,7 +42,7 @@ #include #include -#if defined(__arm__) || defined(__arm64__) || defined(__riscv__) +#if defined(__arm__) || defined(__arm64__) || defined(__riscv) #include #endif @@ -206,7 +206,7 @@ ofw_cpu_attach(device_t dev) phandle_t node; pcell_t cell; int rv; -#if defined(__arm__) || defined(__arm64__) || defined(__riscv__) +#if defined(__arm__) || defined(__arm64__) || defined(__riscv) clk_t cpuclk; uint64_t freq; #endif @@ -276,7 +276,7 @@ ofw_cpu_attach(device_t dev) sc->sc_cpu_pcpu = pcpu_find(device_get_unit(dev)); if (OF_getencprop(node, "clock-frequency", &cell, sizeof(cell)) < 0) { -#if defined(__arm__) || defined(__arm64__) || defined(__riscv__) +#if defined(__arm__) || defined(__arm64__) || defined(__riscv) rv = clk_get_by_ofw_index(dev, 0, 0, &cpuclk); if (rv == 0) { rv = clk_get_freq(cpuclk, &freq);