Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp39812lqn; Thu, 11 Apr 2024 13:05:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4zvh8yrMeSfTWnUysU0U5eVOT6HbW8oC/JQb84/dkuqfF+7v0O83Dkfoj8ihogR4RpYKK1UFyr5RzvVdPVDpuckbMDD0IUzk862DJaQ== X-Google-Smtp-Source: AGHT+IHE+Y1mDoqzZnxoJlKmrVNe1Oikxv3qEblv7y9Lp5ZorQpanWzkWVpKS3TExrNOg5rceqZ+ X-Received: by 2002:a05:6102:45:b0:47a:3a9:c123 with SMTP id k5-20020a056102004500b0047a03a9c123mr913251vsp.28.1712865944804; Thu, 11 Apr 2024 13:05:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712865944; cv=pass; d=google.com; s=arc-20160816; b=fe2LRWf9wc+zoMURoJfpo5cqX5OwPuYkjEirYXe8BgWL2Ca6PEfz0Ti1ccI0UpGpL3 0yCQw8oN9TXMJ0NGR40JTy83i04s7aJebWAMzZJu45gc/vsRgY2nfQwAwkl/qmq/cQkR xHst4oDaBe9+A14k5xu543ePkMhOBDhIbdaX/JIMsGRxSeRDoqgY40lWuahDQ1D/Jopw naHxexZtVlWge7msthyZgfKFokvT7r30LCgZEbVt9PQVIVd0R/1F6JRjhFGNsSBY0WRT 4pEkKu5LfvB2fSh2klBZ8jwheb5S5LEAaUIzdnOqE87fiGOuqw6KtNBPETD1t40cjzSl X1Yw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=23X31wBk3BfhcWEk6ltxZSp3rP6W6hNoB7vDkcBeLnU=; fh=VG3bPpxx7Jl3OOCym0ECsZLthtcPGD0t0tnWI6vEEIA=; b=fgaee7yHOYZDFGmDQNkAqgvYGU1is/kpRch1hYCplCp1U8JwwZvBdIYoCirliaGIJb dhceiLiS24lVBn9//cvyb/wnroeplzuwquxb1t7uoEm7Fm+bNkrA5q+Z2ms3t6cYKqpJ h6z3zQA+w1KD8DTzkq9PegjmZDK7HPM4fs3lbRHALg89uZlUjhmIpXAuyxTB831dW6c7 AxaEICTMDtG88nShSS4S5ekMHDnURT5sco/ykM+6sfSFIOMEajV65EyGrk3wl9nSZkD5 3UrJ1DZPYHpg85ebHd8gmgZp6jlmKcd1REzoDdMY3UeZcU9uaL0IFvjv7BdUEpHdq9zL Q9Vg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OoXgGN05; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-141556-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141556-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g20-20020a05610209d400b00474d2384b82si355529vsi.491.2024.04.11.13.05.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 13:05:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141556-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OoXgGN05; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-141556-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141556-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 556E81C23581 for ; Thu, 11 Apr 2024 20:05:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A95517C61; Thu, 11 Apr 2024 20:05:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="OoXgGN05" Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E695917BB6 for ; Thu, 11 Apr 2024 20:05:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712865937; cv=none; b=Ldd8CBNSxVoMQNew75DHQaFRrIvhSdAMweAy/wzJur5XDsKqdlPFH6ICmtwc7QCj7QUlruTD2kvaRwdGYB/SgcgVR4njcEpKaefmRYNnHro5NNYJK+dLozG17ilUuZ3+lqsbkBqnsha4KOnkjsnsAwX6FfOA7iIiyiyWNukqeAY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712865937; c=relaxed/simple; bh=AwzRCjPDc91MDoHSUS4611CZaA7Epw9DmMTbScEHcOQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=s54sxWBP/cL/+0kpxMmYj8fzC11DrcI87ZoX30tz64S47l9p3MOHgDotxtG/+Yi9TI3DaWj36Z6m9cAOjCsPDJfY10qamAe7LRIw8bSuUEeELcPLX29pOwYF5nMbXg/e8clpiO4Wr9dmPEjhaupi4dUE/WfW8VZ6/p8FscHs/s8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=OoXgGN05; arc=none smtp.client-ip=209.85.167.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-516d3a470d5so224201e87.3 for ; Thu, 11 Apr 2024 13:05:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712865934; x=1713470734; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=23X31wBk3BfhcWEk6ltxZSp3rP6W6hNoB7vDkcBeLnU=; b=OoXgGN05bK0YJK35duMTJd4NInfkPfMmhfw2dNbrpE7BdmDCpsCiwRIOLQi9TMeCu0 Jvt5c4VfS0jwSRezJxYw5q3cQhCvZqS4j0xth35dvQqn4Wvf2fcBJU8iSMW8f3I9wSg7 FXCGfoJBEvFfkC8boOdugRzacofH8FQnHZLz71FuTELI5nEkHjKrDsKg9svI9ERy7qGI XnQkCQXF8GMoZsqm1cyFrRGt6EfS6Csgc1fTLoww5qk3vyf122obYCfufES68FXiRZ+g sumHln7bVn0CRythrd/BXxxxDXrlag8H0S8AaeybSsoskAv4skSrhs1SyMVt7BONuucP 5ULg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712865934; x=1713470734; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=23X31wBk3BfhcWEk6ltxZSp3rP6W6hNoB7vDkcBeLnU=; b=jwnksE0FoiRkrIVhs4kHsdgh4Zz8FeiGDZ0WkIqx25O7KynEoynBCHFjLle3v2pWja AMPI6obhDkjWJUBnFsc6TaRJf4NeUCNeqVuSkQA5lu0yqdLX2CK8fOlguFxyT+1gHL+W Fg9UmD5VWNfM4Eo1VlLUyXqyEVLsbNbTwzNIqWtUUD/zDQmHB+/5xcwzdFrl6z0wJ9ZR nNiUrsAYBvg6alKXiLbnh+DKjmMlotZYpOm7R4QhsphvCd6gmJL2PptUyJHGvXw5QvwN 2y48LYAEWA0V6Ug/NMj701quP4+hL+STfWuLUtQyhydM1OtTOdxfDCOr5J9uxS8FqT9d 2MQQ== X-Forwarded-Encrypted: i=1; AJvYcCW8Zg2eh3a2NnGrZIIhKG5NQRpAtyePJ6mvBjyy/zebJVWxw86tz8QXH/HXohhA7I3CnTE8SAY4omAOl1UQO0CwWLy9MJUaUiLlXJnr X-Gm-Message-State: AOJu0Yxju/N0AmizKnNCs9Z8y+t+XsVniSHtif9wEQ9eJ2Dxc4o/fbK6 R3wVLv/L+TeTAafREqB6pdgPBm+yjy1F+jXGUEzkxC8LYzhRdhQCWFANs4Ijr00= X-Received: by 2002:ac2:47ee:0:b0:513:ca65:8c58 with SMTP id b14-20020ac247ee000000b00513ca658c58mr456382lfp.43.1712865933904; Thu, 11 Apr 2024 13:05:33 -0700 (PDT) Received: from [172.30.204.35] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id r16-20020ac25f90000000b00516bfd7e856sm292837lfe.57.2024.04.11.13.05.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Apr 2024 13:05:33 -0700 (PDT) Message-ID: <2c2bca6c-b429-4cef-b63a-ee3bd6c9eecb@linaro.org> Date: Thu, 11 Apr 2024 22:05:30 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/6] soc: qcom: Move some socinfo defines to the header, expand them To: Elliot Berman Cc: Bjorn Andersson , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, Neil Armstrong References: <20240405-topic-smem_speedbin-v1-0-ce2b864251b1@linaro.org> <20240405-topic-smem_speedbin-v1-1-ce2b864251b1@linaro.org> <20240410132510649-0700.eberman@hu-eberman-lv.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20240410132510649-0700.eberman@hu-eberman-lv.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/11/24 20:55, Elliot Berman wrote: > On Fri, Apr 05, 2024 at 10:41:29AM +0200, Konrad Dybcio wrote: >> In preparation for parsing the chip "feature code" (FC) and "product >> code" (PC) (essentially the parameters that let us conclusively >> characterize the sillicon we're running on, including various speed >> bins), move the socinfo version defines to the public header and >> include some more FC/PC defines. >> >> Signed-off-by: Konrad Dybcio >> --- [...] >> + SOCINFO_FC_EXT_RESERVE, >> +}; > > SOCINFO_FC_EXT_RESERVE was a convenient limit since we mapped > SOCINFO_FC_AA -> string "AA" via an array, and we've only needed the 8 > feature codes so far. > > We should remove the EXT_RESERVE and test for the Y0-YF (internal > feature code) values instead. OK > >> + >> +/* Internal feature codes */ >> +/* Valid values: 0 <= n <= 0xf */ >> +#define SOCINFO_FC_Yn(n) (0xf1 + n) >> +#define SOCINFO_FC_INT_RESERVE SOCINFO_FC_Yn(0x10) > > We probably should've named this SOCINFO_FC_INT_MAX. Reserve implies > it's reserved for some future use, but it's really the max value it > could be. So, should SOCINFO_FC_Yn(0x10) also be considered valid, or is (0xf) the last one? > >> + >> +/* Product codes */ >> +#define SOCINFO_PC_UNKNOWN 0 >> +/* Valid values: 0 <= n <= 8, the rest is reserved */ >> +#define SOCINFO_PCn(n) (n + 1) >> +#define SOCINFO_PC_RESERVE (BIT(31) - 1) > > Similar comments here as the SOCINFO_FC_EXT_*. It's more like known > values are [0,8], but more values could come in future chipsets. Ok, sounds good, I'll remove the comment then Konrad