[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d1554d1f-de23-95a5-07ee-4c18f187cdf1@c-s.fr>
Date: Thu, 20 Apr 2017 13:43:54 +0200
From: Christophe LEROY <christophe.leroy@....fr>
To: Michael Ellerman <mpe@...erman.id.au>,
David Laight <David.Laight@...LAB.COM>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Scott Wood <oss@...error.net>
Cc: "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] powerpc/32: Move entry_32 functions just after HEAD
functions.
Le 20/04/2017 à 13:25, Michael Ellerman a écrit :
> David Laight <David.Laight@...LAB.COM> writes:
>
>> From: Christophe Leroy
>>> By default, PPC8xx PINs an ITLB on the first 8M of memory in order
>>> to avoid any ITLB miss on kernel code.
>>> However, with some debug functions like DEBUG_PAGEALLOC and
>>> (soon to come) DEBUG_RODATA, the PINned TLB is invalidated soon
>>> after startup so ITLB missed start to happen also on the kernel code.
>>>
>>> In order to avoid any ITLB miss in a critical section, we have to
>>> ensure that their is no page boundary crossed between the setup of
>>> a new value in SRR0/SRR1 and the associated RFI. This cannot be done
>>> easily if entry_32 functions sits in the middle of other .text
>>> functions. By placing entry_32 just after the .head section (as already
>>> done for entry_64 on PPC64), we can more easily ensure the issue
>>> doesn't happen.
>>
>> Shouldn't this be done by putting all the functions that 'matter'
>> into a named section instead of relying on the order of the input files?
>> (Which is what I think this is doing.)
>
> Yeah that is fragile if there's nothing more to it.
>
> I'm not sure if we need a special section. If the functions that must
> not cross a page boundary are aligned to a page boundary (with .align)
> then that would also work wouldn't it?
Yes it would work, but we would also 'loose' some space (up to one page
?), as I don't think 'ld' would fill the blanks with other functions.
Maybe we can find a lower alignment than a page boundary, I'll
investigate that.
Christophe
Powered by blists - more mailing lists