[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250313181319.GB40525@mazurka.cambridge.arm.com>
Date: Thu, 13 Mar 2025 18:13:19 +0000
From: Mikołaj Lenczewski <miko.lenczewski@....com>
To: Yang Shi <yang@...amperecomputing.com>, ryan.roberts@....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 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.
> > +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.
>
> 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().
--
Kind regards,
Mikołaj Lenczewski
Powered by blists - more mailing lists