From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22EEDAD23 for ; Sun, 29 Dec 2024 15:09:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735484961; cv=none; b=ivjV3+uZPlONMNXim4Thx8yEJ4MToCfeIKb+WzQTakCePPCLiPfi6IbZbmDokkTAdfEGIsibp/kyrCExN0PoO9nV7cqnQybAoG2id787Q7lkE9IiKeMzoMnKoXKSuvwQs3FQG2m1pDZ3SxtFVq680XA73CYjvm99nNwMwMg2hLw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735484961; c=relaxed/simple; bh=qaakPx8PxtKG0H599xpxUqqP1tuvqAihNdErtlhgw84=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jLlS3ctHDiXNDtNqQaFx5ssUaplQY2Zm+pZKbC7wPHObSf6NAT18s05PIgDGkR88Qjs1qKVeHXTRUuDMMfA/bcvKV2sHBIpV4hXwWvgvS6vaxz7BczsBy9g9/kYMFnY1eqUNwAtjZBsY5ywyFWy3ZmlTL6sCPj1gBW5zAU7GY/s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=djeMJhqk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="djeMJhqk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE682C4CED1; Sun, 29 Dec 2024 15:09:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735484957; bh=qaakPx8PxtKG0H599xpxUqqP1tuvqAihNdErtlhgw84=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=djeMJhqk0V86Tbm4gCFALAfUz6Vgz+syBla4djR9rY3S2fdeLRRmCRu5X0c87OGUu BwwxXcljuuHxrmogEimRTX2oXDFCg5Pnc7gg30rBo4QdERhs3H5f8xyVLGWq2ID4N2 vTzO22z6AfKC1eMaP80raXc8aAyj2Y5CUnWJsgAsP8ThV02hZS4mLfqudLnlrRpn5h +5vOZFhEHvvwuLGWSIxvAoGmAztRZUQUXGgJ8FLu6Oa4rk/2Id+0TAFxrXBtgLRoFq SXqN095yYyr5w/3R0w0OxfPMIWvpvVfhaIJoH3a7xyGe/oYWrkVyhGuYwxs5Ekzana iiw4eBUV7vySQ== Date: Sun, 29 Dec 2024 15:09:13 +0000 From: Conor Dooley To: Aleksandar Rikalo Cc: linux-riscv@lists.infradead.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Daniel Lezcano , Thomas Gleixner , Djordje Todorovic , Dragan Mladjenovic , linux-kernel@vger.kernel.org Subject: Re: [PATCH] riscv: Access time mmio instead of rdtime. Message-ID: <20241229-cogwheel-kebab-3cc2b21096c8@spud> References: <20241227150056.191794-1-arikalo@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VX5rwSexmm3NwLN+" Content-Disposition: inline In-Reply-To: <20241227150056.191794-1-arikalo@gmail.com> --VX5rwSexmm3NwLN+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Dec 27, 2024 at 04:00:56PM +0100, Aleksandar Rikalo wrote: > +#if defined(CONFIG_RISCV_TIME_MMIO) > + if (!of_property_read_u64(n, "clock-reg", &mmio_addr)) { This is a non-standard, undocumented property. reg & reg-names are what you should be using here. Cheers, Conor. > + riscv_time_val = ioremap((long)mmio_addr, 8); > + if (riscv_time_val) { > + pr_info("Using mmio time register at 0x%llx\n", mmio_addr); > + static_branch_enable(&riscv_time_mmio_available); > + } else { > + pr_warn("Unable to use mmio time at 0x%llx\n", mmio_addr); > + } > + } > +#endif --VX5rwSexmm3NwLN+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZ3FmFQAKCRB4tDGHoIJi 0rtMAP4ykJ6JJzViF+eyeqj21DXap1/iQ8/uSA0TfW9+KenbFAD/UWIwaZCU/Wfs ZSxzFVVO3jd1kr+miQ5aP2v7VDQOEQE= =zw/P -----END PGP SIGNATURE----- --VX5rwSexmm3NwLN+--