[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210324164647.ebqvb7ll3l2fbswr@e107158-lin>
Date: Wed, 24 Mar 2021 16:46:47 +0000
From: Qais Yousef <qais.yousef@....com>
To: Alexander Sverdlin <alexander.sverdlin@...ia.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
Russell King <linux@...linux.org.uk>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Ard Biesheuvel <ardb@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support
On 03/24/21 17:33, Alexander Sverdlin wrote:
> Hello Qais,
>
> On 24/03/2021 16:57, Qais Yousef wrote:
> >>> FWIW my main concern is about duplicating the range check in
> >>> ftrace_call_replace() and using magic values that already exist in
> >>> __arm_gen_branch_{arm, thumb2}() and better remain encapsulated there.
> >> could you please check the negative limits? I have an opinion, my limits are
> >> correct. I could add extra parameter to arm_gen_branch_link(), but for this
> >> I first need to fix its negative limits, which, I believe, well... Approximate :)
> > Can you elaborate please?
> >
> > If you look at Arm ARM [1] the ranges are defined in page 347
> >
> > Encoding T1 Even numbers in the range –16777216 to 16777214.
> > Encoding T2 Multiples of 4 in the range –16777216 to 16777212.
> > Encoding A1 Multiples of 4 in the range –33554432 to 33554428.
> > Encoding A2 Even numbers in the range –33554432 to 33554430.
> >
> > which matches what's in the code (T1 for thumb2 and A1 for arm).
> >
> > Why do you think it's wrong?
>
> thanks for checking this! I'll re-send v8 with your proposal.
If you felt some details need tweaking I don't mind, my proposal was an attempt
to help rather than impose.
Thanks!
--
Qais Yousef
Powered by blists - more mailing lists