[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <83c04cc2-a170-4d4d-82e3-23aec9749352@arm.com>
Date: Thu, 13 Mar 2025 18:17:02 +0000
From: Ryan Roberts <ryan.roberts@....com>
To: Mikołaj Lenczewski <miko.lenczewski@....com>,
Yang Shi <yang@...amperecomputing.com>
Cc: suzuki.poulose@....com, corbet@....net, catalin.marinas@....com,
will@...nel.org, jean-philippe@...aro.org, robin.murphy@....com,
joro@...tes.org, akpm@...ux-foundation.org, mark.rutland@....com,
joey.gouly@....com, maz@...nel.org, james.morse@....com, broonie@...nel.org,
anshuman.khandual@....com, oliver.upton@...ux.dev, ioworker0@...il.com,
baohua@...nel.org, david@...hat.com, jgg@...pe.ca,
shameerali.kolothum.thodi@...wei.com, nicolinc@...dia.com,
mshavit@...gle.com, jsnitsel@...hat.com, smostafa@...gle.com,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, iommu@...ts.linux.dev
Subject: Re: [PATCH v3 1/3] arm64: Add BBM Level 2 cpu feature
On 13/03/2025 18:13, Mikołaj Lenczewski wrote:
> On Thu, Mar 13, 2025 at 10:21:51AM -0700, Yang Shi wrote:
>> On 3/13/25 3:41 AM, Mikołaj Lenczewski wrote:
>>> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
>>> index fb8752b42ec8..3e4cc917a07e 100644
>>> --- a/Documentation/admin-guide/kernel-parameters.txt
>>> +++ b/Documentation/admin-guide/kernel-parameters.txt
>>> @@ -453,6 +453,9 @@
>>> arm64.no32bit_el0 [ARM64] Unconditionally disable the execution of
>>> 32 bit applications.
>>>
>>> + arm64.nobbml2 [ARM64] Unconditionally disable Break-Before-Make Level
>>> + 2 support
>>
>> Hi Miko,
>>
>> A question about the kernel boot parameter. Can this parameter be used
>> in early boot stage? A quick look at the code shows it should be ok, for
>> example, cpu_has_bti() is called in map_kernel(). But I'd like to double
>> check because my patchset needs to check this parameter in map_mem() to
>> determine whether large block mapping can be used or not.
>>
>> And a nit below.
>
> I will need to double check exactly when the arm64 software overrides
> are finalised, but as long as those values are finalised in / before (?)
> the early boot stage then it should be fine? Will reply again once I
> check and have an answer.
This will work fine. The override is setup in the PI code before start_kernel().
>
>>> +static inline bool bbml2_possible(void)
>>> +{
>>> + return !arm64_test_sw_feature_override(ARM64_SW_FEATURE_OVERRIDE_NOBBML2);
>>> +}
>>
>> Can this be moved to cpufeature.h? My patch will use this, anyway I can
>> do it in my patchset.
I'd prefer to do the moving as part of the series that needs it moved.
Thanks,
Ryan
>>
>> Thanks,
>> Yang
>
> I can do so. In fact, on second thought, I will probably extend this to
> also include the `IS_ENABLED(CONFIG_ARM64_BBML2_NOABORT)` check as well,
> and then move it to cpufeature.h, instead of folding said check into
> has_bbml2_noabort().
>
Powered by blists - more mailing lists