From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BF53C433FE for ; Thu, 20 Oct 2022 14:25:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HHhCwZLfEYczGvNm+g+EvEGs8KGrSefPt2TNwNh6B00=; b=T9BRKDyJ5BeiUYLKVne/Rqqm5S Ol3SckR1taMOzOlSymgLhLZzaKLx6eYzmbOJOjR6XpigmEYkR2MMsy8+TMccUTAvPXIel+hO6OHcW eM9LV3fEEgsVU15ISy3dBvS+NkCPj3xDuYT2ewFzTkm/dw6ZWjdQPV107pR2AOa2LSiM6CNfUZjU+ takpXZPtSP1emwNR+NN4EC2jN0nSrXTHQgmOEpa0uVhT2lus/M9+vYNU3lHpHmN1ij+nkHZFsqEJz /WbCTejKojYU0WWctl5gl4Do+a3wvAKWrnDqAwiZ1M4jpyrgGglZkH3I6hdB8t/kYQjTFy6GmsyXI yxWRFkhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olWSz-00G5ty-MA; Thu, 20 Oct 2022 14:24:14 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olWC8-00Fsiz-Vy for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 14:06:50 +0000 Received: by mail-ed1-x536.google.com with SMTP id u21so30065589edi.9 for ; Thu, 20 Oct 2022 07:06:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=EjifGQ4JE8DLKxsqx0+XuO/FFbQ1yrdr8HMQtyJ7Xe8=; b=FoBW2jJmQgdnEV7UaIIbo9+nGOt6W6p6e3xj3va03ld4y0dO1OU8nF+dcxDK6Dd0lE ovSo0SrOGe9cmsoclo1wEeud5p4pEvBrAqwEonwqw6Eqo4qRLI+ovvbQCHaVcypRhlb+ JQotANSxZ0oYXqU9hOhfEAS67WPsG2L3jQCGREwZzEcyq7m6Go/gcr6ugAaToc3v8eIq G8SQ8FC/KZDO8Olm/Qi9jBjPWupRKHYWl9re+g9btMHugcUam8JBMXp/jZ1Fy7oylf+e 8fB/IcCOFjaDA2CrfC/2nxwUN/crN6fzL8EGgAnxKYmL+BzRUMLvbSxJLrY0MXIO5ehM U3iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EjifGQ4JE8DLKxsqx0+XuO/FFbQ1yrdr8HMQtyJ7Xe8=; b=J2aKnrtGOPDddwMc2uN3Gv3G9+eNhfFe6od9lHGlPeZUU080lwu9epUx1x/GgbjBzU tsHWEnkBoAP5xclxJ9kzJjQ+E4uHQzq+S8lMDfOUgNksEAaM7/GNfqdEx1bltbRxRwcG H+ZZxiYjgXgKH1YWBWMe9eGIl4AkbdT/FntW3mP1PVs9W/cVP9+udNjZd+xTH04gEUuL RH93OQ4BUVx+4vlv9nGVgdYYQZYDZvpE7iCDytqgIz9QP4T6fqB/BlQlC0kWyTkMbteb 833S1IjrYCxOEuXxpnFxZ3quoUM8fwkOx+LJwnn7+ne6TsoOoin+6mO61iuhQBJq6yE/ auzA== X-Gm-Message-State: ACrzQf3CMPF0csCIOGZIEZ6zAAB6VwVQ7Bah7gUwDxaO/GjMlU8Ilcj0 ppxixHp9R2upvqKXpSserU1POPcY6wY= X-Google-Smtp-Source: AMsMyM532n48vLbQUX2qWMsiOiYga3di18Bp4/joWO8yyB5v81QapbyGSUyGDt3cVa1N1wlOrXKE3g== X-Received: by 2002:aa7:c6c8:0:b0:460:e19b:ec12 with SMTP id b8-20020aa7c6c8000000b00460e19bec12mr2014910eds.209.1666274805145; Thu, 20 Oct 2022 07:06:45 -0700 (PDT) Received: from orome (p200300e41f201d00f22f74fffe1f3a53.dip0.t-ipconnect.de. [2003:e4:1f20:1d00:f22f:74ff:fe1f:3a53]) by smtp.gmail.com with ESMTPSA id 15-20020a170906308f00b0078d4e39d87esm10316603ejv.225.2022.10.20.07.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 07:06:43 -0700 (PDT) Date: Thu, 20 Oct 2022 16:06:41 +0200 From: Thierry Reding To: Arnd Bergmann Cc: Olof Johansson , Kartik , Jon Hunter , windhl@126.com, sumitg@nvidia.com, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] soc/tegra: fuse: Export tegra_get_platform() & tegra_is_silicon() Message-ID: References: <1664186759-9821-1-git-send-email-kkartik@nvidia.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/2.2.7 (2022-08-07) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221020_070649_076467_9E916340 X-CRM114-Status: GOOD ( 33.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============4732750845673914412==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4732750845673914412== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UunOC0lUIQp7wYUv" Content-Disposition: inline --UunOC0lUIQp7wYUv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 20, 2022 at 11:57:39AM +0200, Arnd Bergmann wrote: > On Thu, Oct 20, 2022, at 11:54, Thierry Reding wrote: > > On Mon, Sep 26, 2022 at 03:35:59PM +0530, Kartik wrote: > >> Functions tegra_get_platform() and tegra_is_silicon() are required > >> for pre-silicon development to correctly identify the platform on > >> which the software is running. > >>=20 > >> Export tegra_get_platform() and tegra_is_silicon(), so they can be > >> used for pre-slicon development of device drivers and kernel space > >> tests. > >>=20 > >> Signed-off-by: Kartik > >> --- > >> drivers/soc/tegra/fuse/tegra-apbmisc.c | 2 ++ > >> 1 file changed, 2 insertions(+) > > > > Hi Arnd, Olof, > > > > can you take a quick look at this and provide some feedback regarding > > acceptance? It's slightly unorthodox because the only in-tree users of > > these functions are built-in drivers and early code, so they don't > > technically need to be exported for strictly in-kernel users. However, > > we do see these used quite frequently in pre-silicon development and > > having these available upstream would help with internal kernel > > transitions and so on. We may also see them used more commonly in > > upstream drivers in the future. >=20 > Hi Thierry and Kartik, >=20 > Have you looked at using soc_device_match() instead? >=20 > As long as the information is part of the soc_device_attribute > prvoided by the soc info driver, any other kernel driver should > be able to just use string matching to get what you need here. The values that we stash into the struct soc_device_attribute for Tegra are not very useful for this purpose. If there's no concern about back- wards compatibility, perhaps that could be changed. I could imagine that we could store some "simulation" string as a special case into the revision attribute. Any "revision" that doesn't match "simulation" could then be considered to be "silicon". We don't populate "machine" at all it seems, but I'm not sure it would be a good fit for this anyway. Kartik, Jon, I wonder if we're really also interested in the platform or if we export that primarily because it's needed by tegra_is_silicon(). I see derivatives used in certain cases, but perhaps they can be represented by other special "revision" strings? Thierry --UunOC0lUIQp7wYUv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmNRVe8ACgkQ3SOs138+ s6FuAg/+L3YAYp1XoHPsqbnFZ6WHBxgfIEHqtAu4oY4+BIVuDeWq0HsFYOdldaR1 p+Cg2ask628ZMbKhtAZZMj4luG2N+K+9YFM0SyftIwMTOEaN1YPVtIyHDrbKRotK YgV8jF8trxRzOhfxrnAau9SNv0TMAbmqGK3BUnUSl5XZIn7IKKTEhMbpIZo9Y5Ws WXD9xW+f0PEvms0x2iU/O1pxa6R+a6akYgIcoyaTLjY99UvmhMtc7X/DreXmDVA4 IOh9a8zCxLXGETo4u361TESQt0ai/KEVL/OG14sYjblTauvxomt1C382/VOalfsU SYBTwRy/6cpXO6fo5fu24hT33dN3PdpRK6soQ4edwdUSEHJJj7/IGI9IuT/Voyd8 VuLOKGxlJ5UPyK3M7A3paBLCw4no77fUtxn4Zpe33XiFr1cL8hgIdlbaik4udFO4 qEirhZ5xQdRJBEfWAcB1Oq7uK1omaJEaTTANPB1vdB4G8iS21VH3hSeU+0drOynY bQDabB6RBaZVMOIXy8xQxddfp8byX0bl0u9M0Ei8kPkIt+tgmESWZ/FZrcPrh0RJ KYAdoa17KXT9BF0M78UTRQaqUQfAo+t70SmSYMNrAkv6HjCa5nc4Xwg/c+PUNfWX TbV2WOtX99/VX+1oQuoFFwgS/9aPJt/M1fg1A2Obnrf0kQr6kcU= =nZQK -----END PGP SIGNATURE----- --UunOC0lUIQp7wYUv-- --===============4732750845673914412== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============4732750845673914412==--