public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.9-ac12 ppc ftr_fixup
@ 2001-08-27  0:27 Keith Owens
  2001-08-27  2:15 ` Tom Rini
  2001-08-27  7:39 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 6+ messages in thread
From: Keith Owens @ 2001-08-27  0:27 UTC (permalink / raw)
  To: Alan Cox; +Cc: linuxppc-dev, linux-kernel

2.4.9-ac12 has new ppc code for CPU feature fixups.  The ftr_fixup code
only handles entries that are built into the kernel.  timex.h defines
get_cycles() using ftr_fixup and get_cycles() is used all over the
place, including in modules.  AFAICT we need to add modutils support
for ftr_fixup.

Don't write any code yet, Maciej W. Rozycki has some patches for a
similar problem in mips and his fix is nicely extensible.  I just need
confirmation that ftr_fixup needs modutils support.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.4.9-ac12 ppc ftr_fixup
  2001-08-27  0:27 2.4.9-ac12 ppc ftr_fixup Keith Owens
@ 2001-08-27  2:15 ` Tom Rini
  2001-08-27  2:47   ` Keith Owens
  2001-08-27  7:39 ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 6+ messages in thread
From: Tom Rini @ 2001-08-27  2:15 UTC (permalink / raw)
  To: Keith Owens; +Cc: Alan Cox, linuxppc-dev, linux-kernel

On Mon, Aug 27, 2001 at 10:27:22AM +1000, Keith Owens wrote:

> 2.4.9-ac12 has new ppc code for CPU feature fixups.  The ftr_fixup code
> only handles entries that are built into the kernel.  timex.h defines
> get_cycles() using ftr_fixup and get_cycles() is used all over the
> place, including in modules.  AFAICT we need to add modutils support
> for ftr_fixup.

Er, eh?  Excuse me if I'm being obtuse, but where is the problem?  The fixup
stuff is closely tied to bootup and what processor we happen to be on
at the time.  So we won't be trying to fixup any code in a module...

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.4.9-ac12 ppc ftr_fixup
  2001-08-27  2:15 ` Tom Rini
@ 2001-08-27  2:47   ` Keith Owens
  2001-08-27  2:54     ` Tom Rini
  0 siblings, 1 reply; 6+ messages in thread
From: Keith Owens @ 2001-08-27  2:47 UTC (permalink / raw)
  To: Tom Rini; +Cc: Alan Cox, linuxppc-dev, linux-kernel

On Sun, 26 Aug 2001 19:15:36 -0700, 
Tom Rini <trini@kernel.crashing.org> wrote:
>On Mon, Aug 27, 2001 at 10:27:22AM +1000, Keith Owens wrote:
>
>> 2.4.9-ac12 has new ppc code for CPU feature fixups.  The ftr_fixup code
>> only handles entries that are built into the kernel.  timex.h defines
>> get_cycles() using ftr_fixup and get_cycles() is used all over the
>> place, including in modules.  AFAICT we need to add modutils support
>> for ftr_fixup.
>
>Er, eh?  Excuse me if I'm being obtuse, but where is the problem?  The fixup
>stuff is closely tied to bootup and what processor we happen to be on
>at the time.  So we won't be trying to fixup any code in a module...

do_cpu_ftr_fixups() replaces unsupported code with NOP, based on the
table from __start___ftr_fixup to __stop___ftr_fixup which contains all
the data marked as section(__ftr_fixup).  Fine, but it only handles
section __ftr_fixup data in the kernel, it does not write NOP over
__ftr_fixup data in modules.  So any code marked as section __ftr_fixup
in a module executes unchanged.  Unless I am missing something, that is
a problem.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.4.9-ac12 ppc ftr_fixup
  2001-08-27  2:47   ` Keith Owens
@ 2001-08-27  2:54     ` Tom Rini
  2001-08-27  3:07       ` Keith Owens
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2001-08-27  2:54 UTC (permalink / raw)
  To: Keith Owens; +Cc: Alan Cox, linuxppc-dev, linux-kernel

On Mon, Aug 27, 2001 at 12:47:57PM +1000, Keith Owens wrote:
> 
> On Sun, 26 Aug 2001 19:15:36 -0700,
> Tom Rini <trini@kernel.crashing.org> wrote:
> >On Mon, Aug 27, 2001 at 10:27:22AM +1000, Keith Owens wrote:
> >
> >> 2.4.9-ac12 has new ppc code for CPU feature fixups.  The ftr_fixup code
> >> only handles entries that are built into the kernel.  timex.h defines
> >> get_cycles() using ftr_fixup and get_cycles() is used all over the
> >> place, including in modules.  AFAICT we need to add modutils support
> >> for ftr_fixup.
> >
> >Er, eh?  Excuse me if I'm being obtuse, but where is the problem?  The fixup
> >stuff is closely tied to bootup and what processor we happen to be on
> >at the time.  So we won't be trying to fixup any code in a module...
> 
> do_cpu_ftr_fixups() replaces unsupported code with NOP, based on the
> table from __start___ftr_fixup to __stop___ftr_fixup which contains all
> the data marked as section(__ftr_fixup).  Fine, but it only handles
> section __ftr_fixup data in the kernel, it does not write NOP over
> __ftr_fixup data in modules.  So any code marked as section __ftr_fixup
> in a module executes unchanged.  Unless I am missing something, that is
> a problem.

Hmm..  I'm guessing no one's tried get_cycles from a module on a 601 in
ages...

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.4.9-ac12 ppc ftr_fixup
  2001-08-27  2:54     ` Tom Rini
@ 2001-08-27  3:07       ` Keith Owens
  0 siblings, 0 replies; 6+ messages in thread
From: Keith Owens @ 2001-08-27  3:07 UTC (permalink / raw)
  To: Tom Rini; +Cc: Alan Cox, linuxppc-dev, linux-kernel

On Sun, 26 Aug 2001 19:54:58 -0700, 
Tom Rini <trini@kernel.crashing.org> wrote:
>> >On Mon, Aug 27, 2001 at 10:27:22AM +1000, Keith Owens wrote:
>> >
>> >> 2.4.9-ac12 has new ppc code for CPU feature fixups.  The ftr_fixup code
>> >> only handles entries that are built into the kernel.  timex.h defines
>> >> get_cycles() using ftr_fixup and get_cycles() is used all over the
>> >> place, including in modules.  AFAICT we need to add modutils support
>> >> for ftr_fixup.
>Hmm..  I'm guessing no one's tried get_cycles from a module on a 601 in
>ages...

OK, so insmod needs to pass the ftr_fixup data for modules into the
kernel, I will add the ftp_fixup section as archdata in insmod.  Do not
code any kernel change to use ftr_fixup in modules until Maciej W.
Rozycki's patch for module archdata handling is in.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.4.9-ac12 ppc ftr_fixup
  2001-08-27  0:27 2.4.9-ac12 ppc ftr_fixup Keith Owens
  2001-08-27  2:15 ` Tom Rini
@ 2001-08-27  7:39 ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2001-08-27  7:39 UTC (permalink / raw)
  To: Keith Owens; +Cc: Alan Cox, linuxppc-dev, linux-kernel

>Don't write any code yet, Maciej W. Rozycki has some patches for a
>similar problem in mips and his fix is nicely extensible.  I just need
>confirmation that ftr_fixup needs modutils support.

Right. The feature fixup was originally intended for altivec-specific
cruft in arch/ppc/kernel/*.S, and was only later extended to a few
more things like get_cycles(). It doesn't handle modules, and that
can ideed be an issue. 

I'm looking forward to your modutils. The kernel's do_cpu_ftr_fixups
function has to be modified to take the pointer & size of the fixup
section so that it can be called for modules as well.

Ben.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-08-27  7:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-27  0:27 2.4.9-ac12 ppc ftr_fixup Keith Owens
2001-08-27  2:15 ` Tom Rini
2001-08-27  2:47   ` Keith Owens
2001-08-27  2:54     ` Tom Rini
2001-08-27  3:07       ` Keith Owens
2001-08-27  7:39 ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox