summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorRyan Brue <ryanbrue.dev@gmail.com>2026-09-17 23:57:47 -0500
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2026-09-30 16:40:41 +0200
commit1aaaf94a61eeaab1ab1f872fc818f6f688c7dd7f (patch)
tree2717413c0a64acbb6ce65ebd89550ace3ece6511 /tools/perf/scripts/python/bin/stackcollapse-report
parent8423c476ab2a193e67d7f8db8621dbc02854dd9d (diff)
downloadlinux-next-1aaaf94a61eeaab1ab1f872fc818f6f688c7dd7f.tar.gz
linux-next-1aaaf94a61eeaab1ab1f872fc818f6f688c7dd7f.zip
rtc: mt6397: expose the spare bytes of the alarm registers as nvmem
Each alarm field lives in the low bits of its register and the driver masks its writes accordingly, so the high byte of four of them is storage the RTC never touches. MediaTek names these RTC_NEW_SPARE0 to RTC_NEW_SPARE3 and gives the first to a fuel gauge, which is how its PMIC battery drivers carry a state of charge over a reboot. Offer all four as a battery-backed nvmem provider, so that a consumer does not have to reach into this block behind the driver's back. Doing it here is what makes it safe: a write lands under the same lock the alarm paths take, so it can neither be lost inside mtk_rtc_set_alarm()'s read-modify-write nor fire the write trigger in the middle of one. The nvmem core does not range check a cell against the provider size, so the callbacks check the offset themselves. Tested on an MT6397; MediaTek's spare map for mt6323 matches, and the alarm field masks are common to every compatible this driver binds. Assisted-by: LLM Signed-off-by: Ryan Brue <ryanbrue.dev@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20260917-rbrue-suez-upstreaming-mt6397-rtc-nvmem-v1-2-558b8f95cfbc@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions