From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Anderson Date: Tue, 13 Apr 2021 00:17:15 -0400 Subject: [RFC PATCH v4 1/2] arch: riscv: cpu: Add callback to init each core In-Reply-To: References: <20210330052659.180818-1-green.wan@sifive.com> <20210330052659.180818-2-green.wan@sifive.com> <129db0ea-55a2-7ed2-ecd8-7d94230bcdea@gmail.com> <752D002CFF5D0F4FA35C0100F1D73F3FE5E931A0@ATCPCS12.andestech.com> <4561c951-d4ce-3ca3-fa5a-dc0b909a8591@gmail.com> <9fe5d096-332d-eccb-da4f-31099776dd18@gmail.com> <752D002CFF5D0F4FA35C0100F1D73F3FE5E95C00@ATCPCS12.andestech.com> <851fe767-2891-210c-d42d-ce3f89ddea29@gmail.com> Message-ID: <17842260-088a-7e20-bcae-3e0ee9fac9fc@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 4/13/21 12:12 AM, Rick Chen wrote: > Hi Sean > >> On 4/12/21 10:39 PM, Rick Chen wrote: >>> Hi Green, >>> >>>> From: Green Wan [mailto:green.wan at sifive.com] >>>> Sent: Monday, April 12, 2021 10:33 AM >>>> To: Sean Anderson >>>> Cc: Rick Chen; Rick Jian-Zhi Chen(???); Bin Meng; U-Boot Mailing List; Paul Walmsley; Pragnesh Patel; Simon Glass; Atish Patra; Leo Yu-Chi Liang(???); Brad Kim >>>> Subject: Re: [RFC PATCH v4 1/2] arch: riscv: cpu: Add callback to init each core >>>> >>>> Hi Bin and Sean, >>>> >>>> While we keep the consistency of cache control discussion going, later >>>> today I'd like to send the v5 patch which is not directly relevant to >>>> cache control. >>> >>> I will prefer not to mix cache control issue into this patch. >>> Like I said, this callback is a init for all harts before lottery. >> >> Yes, but enabling caches is a very similar thing (this proposal even >> uses it to turn on caches, among other things). At the moment we have >> two calls to enable caches at almost the same time as what Green >> proposes. These calls only translate into work done on one platform. I >> think having one call (or perhaps two) for this purpose would help >> reduce codepaths across different platforms going forward. >> > > Maybe we can add two callbacks (early_lottery_init and > late_lottery_init) before and after lottery individually for all > scenarios. Yes, that is a possibility. But do we actually need that flexibility? This comes back around to my original question: why does ax25 disable cache on all harts before jumping to Linux? And of course, does this actually need to be done before the lottery? --Sean