From: Sam Edwards <cfsworks@gmail.com>
To: Andre Przywara <andre.przywara@arm.com>
Cc: u-boot@lists.denx.de, Jagan Teki <jagan@amarulasolutions.com>,
Samuel Holland <samuel@sholland.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Icenowy Zheng <uwu@icenowy.me>,
Maksim Kiselev <bigunclemax@gmail.com>
Subject: Re: [PATCH 3/3] sunxi: psci: implement PSCI on R528
Date: Fri, 18 Aug 2023 15:22:30 -0700 [thread overview]
Message-ID: <f3121fa3-d63d-d12a-d1af-4c727e480b00@gmail.com> (raw)
In-Reply-To: <20230818152728.49dd6e4f@donnerap.manchester.arm.com>
On 8/18/23 07:27, Andre Przywara wrote:
Hi Andre,
> So instead of trying to derive some pattern from where there is none, I'd
> rather do: config SUNXI_CPU_HOTPLUG_ADDRESS
> hex
> default 0x01c000bc if MACH_SUN8I_R40
But the hotplug flag register is at 0x01c000b8 for R40?
> ....
> default 0x01c25da4
> and then use that symbol in both places (v7 PSCI + v8 FEL).
> As mentioned, I can fix the pieces that break when naively doing so in the
> FEL code. That has also the rewarding property of allowing to remove both
> SUNXI_R_CPUCFG_BASE and SUNXI_RTC_BASE from the code base completely.
I might hold on to SUNXI_RTC_BASE for a bit, since the SPL may need it
for the various reset-to-FEL mechanisms. I still want a nice way of
getting mainline U-Boot to do this in the near term.
> What do you think?
I don't think this really solves your underlying grievance, since
various sunxis need distinct offsets to jump from the hotplug address
register to the secondary CPU soft entry point:
CONFIG_SUNXI_CPU_HOTPLUG_ADDRESS + 4 // for R40
CONFIG_SUNXI_CPU_HOTPLUG_ADDRESS + 8 // for R528
...at which point we're back to the "Kconfig symbol is really pointing
to a sort of control block" idea.
We could take advantage of the fact that ARMv7 psci.c and ARMv8
fel_utils.S are never both built and call it something horrible like
"SUNXI_CPU_HOTPLUG_OR_SOFT_ENTRY_ADDR" but then it wouldn't be clear
from a glance *which* it is. We could go with *two* (three, if we need
R528's CPU0 entry for a reset-to-FEL mechanism) Kconfig symbols, but
that's a lot for configuration symbols that are really only needed in
pretty much one place each.
>
> Cheers,
> Andre
Likewise,
Sam
next prev parent reply other threads:[~2023-08-18 22:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-12 0:30 [PATCH 0/3] Allwinner R528/T113s PSCI Sam Edwards
2023-08-12 0:30 ` [PATCH 1/3] sunxi: psci: clean away preprocessor macros Sam Edwards
2023-08-14 16:37 ` Andre Przywara
2023-08-14 18:10 ` Sam Edwards
2023-08-14 21:05 ` Andre Przywara
2023-08-14 21:23 ` Sam Edwards
2023-08-12 0:30 ` [PATCH 2/3] sunxi: psci: refactor register access to separate functions Sam Edwards
2023-08-12 0:30 ` [PATCH 3/3] sunxi: psci: implement PSCI on R528 Sam Edwards
2023-08-14 14:16 ` Andre Przywara
2023-08-15 19:17 ` Sam Edwards
2023-08-15 22:59 ` Andre Przywara
2023-08-16 1:48 ` Sam Edwards
2023-08-18 14:27 ` Andre Przywara
2023-08-18 22:22 ` Sam Edwards [this message]
2023-08-14 14:06 ` [PATCH 0/3] Allwinner R528/T113s PSCI Andre Przywara
2023-08-14 18:31 ` Sam Edwards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f3121fa3-d63d-d12a-d1af-4c727e480b00@gmail.com \
--to=cfsworks@gmail.com \
--cc=andre.przywara@arm.com \
--cc=bigunclemax@gmail.com \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=samuel@sholland.org \
--cc=u-boot@lists.denx.de \
--cc=uwu@icenowy.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox