Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Changes to head.S
@ 2002-03-03 17:50 Rani Assaf
  2002-03-03 21:56 ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Rani Assaf @ 2002-03-03 17:50 UTC (permalink / raw)
  To: linux-mips

Hi,

I'm  working  on  support  for  IDT  RC32355  CPU  on  a  board  we're
developping and  when trying to port  my code to a  recent snapshot of
the cvs  tree (up  to now,  I was using  a snapshot  dated of  dec 15,
2001),  the kernel  crashed at  boot  while starting  the init  thread
(unaligned access).

Looking at the diffs, I noticed  that putting back the following lines
at  the end  of head.S  (they've  been removed  in revision  1.29.2.4)
resolves the problem:

/*
 * Align to 8kb boundary for init_task_union which follows in the
 * .text segment.
 */
		.text
                .align  13

Any idea why they have been removed?

BTW,  print_memory_map()  (in  kernel.c)  now uses  long  long  format
without casting (which obviously gives wrong numbers on 32bits archs).

Regards,
Rani

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

* Re: Changes to head.S
  2002-03-03 17:50 Changes to head.S Rani Assaf
@ 2002-03-03 21:56 ` Ralf Baechle
  2002-03-03 22:04   ` Rani Assaf
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2002-03-03 21:56 UTC (permalink / raw)
  To: Rani Assaf; +Cc: linux-mips

On Sun, Mar 03, 2002 at 06:50:49PM +0100, Rani Assaf wrote:

> /*
>  * Align to 8kb boundary for init_task_union which follows in the
>  * .text segment.
>  */
> 		.text
>                 .align  13
> 
> Any idea why they have been removed?

init_task_union lives in it's own section which has 8kB alignment.  So if
you're observing an alignment problem I suspect you're using a too old
egcs 1.1.2 variant.

> BTW,  print_memory_map()  (in  kernel.c)  now uses  long  long  format
> without casting (which obviously gives wrong numbers on 32bits archs).

Yes and we preferably want to get rid of long long anyway.

  Ralf

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

* Re: Changes to head.S
  2002-03-03 21:56 ` Ralf Baechle
@ 2002-03-03 22:04   ` Rani Assaf
  2002-03-03 22:19     ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Rani Assaf @ 2002-03-03 22:04 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips



On Sun, Mar 03, 2002 at 10:56:31PM +0100, Ralf Baechle wrote:
> you're observing an alignment problem I suspect you're using a too old
> egcs 1.1.2 variant.

Hmm.. It's the redhat one on ftp://oss.sgi.com/pub/linux/mips/:

Reading specs from
/opt/Mipsel/bin/../lib/gcc-lib/mipsel-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-99.1)

Is there anything newer/better (I thought  that this is the place were
H.J. Lu binutils/gcc is stored)?

BTW, is there any interest in integrating the RC32355 support into the
main tree? (I can provide the code that runs on IDT eval boards though
we're not using them anymore).

Regards,
Rani

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

* Re: Changes to head.S
  2002-03-03 22:04   ` Rani Assaf
@ 2002-03-03 22:19     ` Ralf Baechle
  2002-03-03 22:54       ` Rani Assaf
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2002-03-03 22:19 UTC (permalink / raw)
  To: Rani Assaf; +Cc: linux-mips

On Sun, Mar 03, 2002 at 11:04:49PM +0100, Rani Assaf wrote:

> On Sun, Mar 03, 2002 at 10:56:31PM +0100, Ralf Baechle wrote:
> > you're observing an alignment problem I suspect you're using a too old
> > egcs 1.1.2 variant.
> 
> Hmm.. It's the redhat one on ftp://oss.sgi.com/pub/linux/mips/:
> 
> Reading specs from
> /opt/Mipsel/bin/../lib/gcc-lib/mipsel-linux/2.96/specs
> gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-99.1)

Just doublechecked it.  The way the alignment guarantee works is through
these two lines in the linker script arch/mips/ld.script.in:

  . = ALIGN(8192);
  .data.init_task : { *(.data.init_task) }

> Is there anything newer/better (I thought  that this is the place were
> H.J. Lu binutils/gcc is stored)?
> 
> BTW, is there any interest in integrating the RC32355 support into the
> main tree?

Sure, send patches to me.

> (I can provide the code that runs on IDT eval boards though
> we're not using them anymore).

I certainly would appreciate somebody to take care of maintaining support
for such eval boards.  By now the number of supported platforms means
that the code for platforms otherwise soon would start to bitrot.

  Ralf

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

* Re: Changes to head.S
  2002-03-03 22:19     ` Ralf Baechle
@ 2002-03-03 22:54       ` Rani Assaf
  2002-03-03 23:32         ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Rani Assaf @ 2002-03-03 22:54 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

On Sun, Mar 03, 2002 at 11:19:06PM +0100, Ralf Baechle wrote:
> these two lines in the linker script arch/mips/ld.script.in:
> 
>   . = ALIGN(8192);
>   .data.init_task : { *(.data.init_task) }

Yep, I was just  looking at it. So the problem  is in init_task.c. The
following line should be changed from:

        __attribute__((__section__(".text"))) =

to:
	__attribute__((__section__(".data.init_task"))) =

Right?

Regards,
Rani

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

* Re: Changes to head.S
  2002-03-03 22:54       ` Rani Assaf
@ 2002-03-03 23:32         ` Ralf Baechle
  0 siblings, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2002-03-03 23:32 UTC (permalink / raw)
  To: Rani Assaf; +Cc: linux-mips

On Sun, Mar 03, 2002 at 11:54:16PM +0100, Rani Assaf wrote:

> On Sun, Mar 03, 2002 at 11:19:06PM +0100, Ralf Baechle wrote:
> > these two lines in the linker script arch/mips/ld.script.in:
> > 
> >   . = ALIGN(8192);
> >   .data.init_task : { *(.data.init_task) }
> 
> Yep, I was just  looking at it. So the problem  is in init_task.c. The
> following line should be changed from:
> 
>         __attribute__((__section__(".text"))) =
> 
> to:
> 	__attribute__((__section__(".data.init_task"))) =
> 
> Right?

Yes, just as it already is in CVS for kernel 2.4.

  Ralf

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

end of thread, other threads:[~2002-03-04  0:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-03 17:50 Changes to head.S Rani Assaf
2002-03-03 21:56 ` Ralf Baechle
2002-03-03 22:04   ` Rani Assaf
2002-03-03 22:19     ` Ralf Baechle
2002-03-03 22:54       ` Rani Assaf
2002-03-03 23:32         ` Ralf Baechle

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