All of lore.kernel.org
 help / color / mirror / Atom feed
* need help on unaligned loads,stores!
@ 2003-10-13  1:44 Liu Hongming (Alan)
  2003-10-13 18:27 ` Thomas Horsten
  0 siblings, 1 reply; 7+ messages in thread
From: Liu Hongming (Alan) @ 2003-10-13  1:44 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

Hi all,

I am porting linux for a cpu that doesnt support unaligned loads/stores
instructions.

when using memcpy in arch/mips/memcpy.S,it will not work on these
instructions.

Any one could help me to deal with this? Have you ever ported linux for this
kind cpu?

And anyone could tell me which cpu doesnt support these instructions
either,and has

been ported for linux?

 

Best Regards,

Alan


[-- Attachment #2: Type: text/html, Size: 1310 bytes --]

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

* Re: need help on unaligned loads,stores!
  2003-10-13  1:44 need help on unaligned loads,stores! Liu Hongming (Alan)
@ 2003-10-13 18:27 ` Thomas Horsten
  2003-10-13 19:34   ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Horsten @ 2003-10-13 18:27 UTC (permalink / raw)
  To: Liu Hongming (Alan), linux-mips

On Monday 13 October 2003 02:44, Liu Hongming (Alan) wrote:

> I am porting linux for a cpu that doesnt support unaligned loads/stores
> instructions.
>
> when using memcpy in arch/mips/memcpy.S,it will not work on these
> instructions.
>
> Any one could help me to deal with this? Have you ever ported linux for
> this kind cpu?
>
> And anyone could tell me which cpu doesnt support these instructions
> either,and has
>
> been ported for linux?

Almost all MIPS CPU's are like this, and don't support unaligned accesses.

The memcpy in arch/mips/lib/memcpy.S already handles this (by copying the end 
and beginning using byte-accesses if not aligned).

Best regards,

Thomas

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

* Re: need help on unaligned loads,stores!
  2003-10-13 18:27 ` Thomas Horsten
@ 2003-10-13 19:34   ` Geert Uytterhoeven
  2003-10-13 20:49     ` Ralf Baechle
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2003-10-13 19:34 UTC (permalink / raw)
  To: Thomas Horsten; +Cc: Liu Hongming (Alan), Linux/MIPS Development

On Mon, 13 Oct 2003, Thomas Horsten wrote:
> On Monday 13 October 2003 02:44, Liu Hongming (Alan) wrote:
> > I am porting linux for a cpu that doesnt support unaligned loads/stores
> > instructions.
> >
> > when using memcpy in arch/mips/memcpy.S,it will not work on these
> > instructions.
> >
> > Any one could help me to deal with this? Have you ever ported linux for
> > this kind cpu?
> >
> > And anyone could tell me which cpu doesnt support these instructions
> > either,and has
> >
> > been ported for linux?
> 
> Almost all MIPS CPU's are like this, and don't support unaligned accesses.

I guess Liu meant the (patented) instructions to do explicit unaligned
accesses.  Real MIPS CPUs do support these.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* Re: need help on unaligned loads,stores!
  2003-10-13 19:34   ` Geert Uytterhoeven
@ 2003-10-13 20:49     ` Ralf Baechle
  2003-10-13 21:15       ` Thomas Horsten
  0 siblings, 1 reply; 7+ messages in thread
From: Ralf Baechle @ 2003-10-13 20:49 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Thomas Horsten, Liu Hongming (Alan), Linux/MIPS Development

On Mon, Oct 13, 2003 at 09:34:07PM +0200, Geert Uytterhoeven wrote:

> I guess Liu meant the (patented) instructions to do explicit unaligned
> accesses.  Real MIPS CPUs do support these.

That correct.  Unfortunately emulating of these instructions in exception
handlers would also be covered by the patents, so rewriting which would
be rather easy in all cases I can think of is the way to go ...

  Ralf

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

* Re: need help on unaligned loads,stores!
  2003-10-13 20:49     ` Ralf Baechle
@ 2003-10-13 21:15       ` Thomas Horsten
  2003-10-13 21:37         ` Ralf Baechle
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Horsten @ 2003-10-13 21:15 UTC (permalink / raw)
  To: Ralf Baechle, Geert Uytterhoeven
  Cc: Liu Hongming (Alan), Linux/MIPS Development

On Monday 13 October 2003 21:49, Ralf Baechle wrote:

> That correct.  Unfortunately emulating of these instructions in exception
> handlers would also be covered by the patents, so rewriting which would
> be rather easy in all cases I can think of is the way to go ...

Surely not in Europe (yet), at least?

- Thomas

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

* Re: need help on unaligned loads,stores!
  2003-10-13 21:15       ` Thomas Horsten
@ 2003-10-13 21:37         ` Ralf Baechle
  0 siblings, 0 replies; 7+ messages in thread
From: Ralf Baechle @ 2003-10-13 21:37 UTC (permalink / raw)
  To: Thomas Horsten
  Cc: Geert Uytterhoeven, Liu Hongming (Alan), Linux/MIPS Development

On Mon, Oct 13, 2003 at 10:15:59PM +0100, Thomas Horsten wrote:

> > That correct.  Unfortunately emulating of these instructions in exception
> > handlers would also be covered by the patents, so rewriting which would
> > be rather easy in all cases I can think of is the way to go ...
> 
> Surely not in Europe (yet), at least?

The patent itself is a hardware patent and those also cover software
implementations by interpretation of US, European and various national
European patent offices.  Otoh the patent will expire in like a year or
two anyway :-)

  Ralf

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

* RE: need help on unaligned loads,stores!
@ 2003-10-14  1:18 Liu Hongming (Alan)
  0 siblings, 0 replies; 7+ messages in thread
From: Liu Hongming (Alan) @ 2003-10-14  1:18 UTC (permalink / raw)
  To: Ralf Baechle, Thomas Horsten
  Cc: Geert Uytterhoeven, Liu Hongming (Alan), Linux/MIPS Development

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

Hi All,

I have rewritten the codes,and now it really works.
Our cpu is bought from others,it really doesnt support unaligned access.

Thanks for you all.

Best Regards,
Alan

-----Original Message-----
From: Ralf Baechle [mailto:ralf@linux-mips.org]
Sent: Tuesday, October 14, 2003 5:37 AM
To: Thomas Horsten
Cc: Geert Uytterhoeven; Liu Hongming (Alan); Linux/MIPS Development
Subject: Re: need help on unaligned loads,stores!


On Mon, Oct 13, 2003 at 10:15:59PM +0100, Thomas Horsten wrote:

> > That correct.  Unfortunately emulating of these instructions in
exception
> > handlers would also be covered by the patents, so rewriting which would
> > be rather easy in all cases I can think of is the way to go ...
> 
> Surely not in Europe (yet), at least?

The patent itself is a hardware patent and those also cover software
implementations by interpretation of US, European and various national
European patent offices.  Otoh the patent will expire in like a year or
two anyway :-)

  Ralf

[-- Attachment #2: Type: text/html, Size: 1966 bytes --]

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

end of thread, other threads:[~2003-10-14  1:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-13  1:44 need help on unaligned loads,stores! Liu Hongming (Alan)
2003-10-13 18:27 ` Thomas Horsten
2003-10-13 19:34   ` Geert Uytterhoeven
2003-10-13 20:49     ` Ralf Baechle
2003-10-13 21:15       ` Thomas Horsten
2003-10-13 21:37         ` Ralf Baechle
2003-10-14  1:18 Liu Hongming (Alan)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.