Re: [PATCH 3/4] soc: qcom: stats: support SM8150 platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11.12.2023 10:43, Dmitry Baryshkov wrote:
> On Mon, 11 Dec 2023 at 11:11, Konrad Dybcio <konrad.dybcio@xxxxxxxxxx> wrote:
>>
>> On 9.12.2023 22:56, Dmitry Baryshkov wrote:
>>> On SM8150 the RPMh stats have 3 data records, but no DDR sleep stats,
>>> which demands platform-specific compatible and data.
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
>>> ---
>> I don't think it makes sense considering the driver could detect the
>> presence (or possibility of presence) of DDR stats at runtime.
> 
> No, it can not really. We have safety nets for checking the offset
> value and then checking the magic number. But I'd prefer to be
> explicit here. It's not that the 'invalid' data at this offset is 0 or
> ~0.
> So, I'd prefer to be explicit here.
I'd say we're quite covered:

if (ddr_stats_offset)
	if (offset is within the range) // your latest patchset
		if (ddr_stats_magic)
			if (entries)
				"show stats"
			else
				"show nothing"
		else
			"no ddr stats"
	else
		"no ddr stats"
else
	"no ddr stats"

Konrad






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux