Re: [PATCH 2/4] soc: qcom: stats: don't crash if DDR offset contains invalid data

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

 





On 12/14/23 01:59, Doug Anderson wrote:
Hi,

On Mon, Dec 11, 2023 at 1:11 AM Konrad Dybcio <konrad.dybcio@xxxxxxxxxx> wrote:

On 9.12.2023 22:55, Dmitry Baryshkov wrote:
The stats ram on sm8150 platform contains invalid data at the
DDR_DYNAMIC_OFFSET. Most likely this is because the platform didn't
support DDR sleep stats.
Interesting. Can you read back DDR_DYNAMIC_OFFSET on 8350/8280 and
see if 8150 has correct data in there?

However this platform uses generic
"qcom,rpmh-stats" compatible, which implies presense of the DDR data.
Add safety net to prevent old DTB files from crashing the
qcom,rpmh-stats driver.
Yeah I'dve never thought there would be garbage in there..

I'd advocate for simply not doing anything wrt sleep stats if DDR
stats are unavailable though. The QMP handle can stay, as there
may (I don't know) be more data available that we want to export
through this driver.

FWIW, I'm getting a crash on sc7180-trogdor like this too. In kgdb it
says I'm on line:

key = readl(ddrd->base);

...and

(gdb) print ddrd->base
$1 = (void *) 0xffffffc0833a3149
(gdb) print reg
$2 = (void *) 0xffffffc0833a3000

...so I guess my "stats_offset" must have been 0x149.

Can we get a fix landed or a revert? Thanks! :-)
Right, I guess we may want to revert it and I'll try to get more
info from Qualcomm folks..

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