public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* 64-bit support..what happened?
@ 2002-09-04 14:14 Allen Curtis
  2002-09-04 14:23 ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Allen Curtis @ 2002-09-04 14:14 UTC (permalink / raw)
  To: linux-mtd

I am trying to integrate a recent version of MTD from CVS with Linux 2.4.19
in order to gain 64-bit support. However there appears to be several things
wrong which indicates that this does not work.

1. The conditional CONFIG_CFI_64 is defined within cfi.h. However not all
the source modules that use this conditional include the proper header file.
(all the source modules under drivers/mtd/maps)

2. drivers/mtd/maps/physmap.c - attempts to reference __raw_readll() and
__raw_writell() when in 64-bit mode. These functions/macros do not exist.
They would appear in include/asm/io.h. Nothing exists in the MTD tree to
patch this file or otherwise provide these functions.

Any ideas where I can get the 64-bit implementation?

THX

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

* Re: 64-bit support..what happened?
  2002-09-04 14:14 64-bit support..what happened? Allen Curtis
@ 2002-09-04 14:23 ` David Woodhouse
  2002-09-04 14:41   ` Allen Curtis
  0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2002-09-04 14:23 UTC (permalink / raw)
  To: acurtis; +Cc: linux-mtd

acurtis@onz.com said:
>  1. The conditional CONFIG_CFI_64 is defined within cfi.h. However not
> all the source modules that use this conditional include the proper
> header file. (all the source modules under drivers/mtd/maps)

You presumably only need to include it for the map drivers on those 
platforms which can actually support 64-bit operation. So that's not 
necessarily a problem.

> 2. drivers/mtd/maps/physmap.c - attempts to reference __raw_readll()
> and __raw_writell() when in 64-bit mode. These functions/macros do not
> exist. They would appear in include/asm/io.h. Nothing exists in the
> MTD tree to patch this file or otherwise provide these functions. 

Correct. Again, this is platform-specific and you need to provide it. Some 
people have to play tricks with transferring all 64 bits into a FP register 
and storing form there, etc. It's probably best to take the stuff in 
physmap.c as merely an example, and provide your own map driver.

--
dwmw2

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

* RE: 64-bit support..what happened?
  2002-09-04 14:23 ` David Woodhouse
@ 2002-09-04 14:41   ` Allen Curtis
  2002-09-04 14:51     ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Allen Curtis @ 2002-09-04 14:41 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

> > 2. drivers/mtd/maps/physmap.c - attempts to reference __raw_readll()
> > and __raw_writell() when in 64-bit mode. These functions/macros do not
> > exist. They would appear in include/asm/io.h. Nothing exists in the
> > MTD tree to patch this file or otherwise provide these functions.
>
> Correct. Again, this is platform-specific and you need to provide
> it. Some
> people have to play tricks with transferring all 64 bits into a
> FP register
> and storing form there, etc. It's probably best to take the stuff in
> physmap.c as merely an example, and provide your own map driver.

As you mentioned, although my architecture has a 64-bit bus, the only way to
perform a 64-bit bus access is through the floating point processor. Do you
see any reason why I couldn't just perform 2 32-bit operations?

I will take physmap.c as an example and make our own version. However good
sample code would include the proper headers if they reference conditional
defines. (slight jab...sorry) I believe that there are 3 files under map
that include the conditional compile and none of them include the proper
header file. Perhaps this just indicates that the conditional should be
moved to another file or change to use the autoconfig defines?

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

* Re: 64-bit support..what happened?
  2002-09-04 14:41   ` Allen Curtis
@ 2002-09-04 14:51     ` David Woodhouse
  2002-09-04 15:06       ` Allen Curtis
  0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2002-09-04 14:51 UTC (permalink / raw)
  To: acurtis; +Cc: linux-mtd

acurtis@onz.com said:
>  As you mentioned, although my architecture has a 64-bit bus, the only
> way to perform a 64-bit bus access is through the floating point
> processor. Do you see any reason why I couldn't just perform 2 32-bit
> operations? 

Er, I suppose not. Defeats the whole point of interleaving, but I don't see 
a reason why it shouldn't _work_, offhand, hardware permitting.

> I will take physmap.c as an example and make our own version. However
> good sample code would include the proper headers if they reference
> conditional defines. (slight jab...sorry) 

You're right. It looks like the code snippet in physmap.c is in fact a 
_bad_ example and has been copied into two new map files.

> I believe that there are 3 files under map that include the conditional
> compile and none of them include the proper header file. Perhaps this 
> just indicates that the conditional should be moved to another file or
> change to use the autoconfig defines? 

I'm inclined to suggest that it should be removed from all three offending
map files and a new example for 64-bit operation be added; physmap64.c. And
you should only be able to enable physmap64.c in the config if you've
enabled 64-bit operation -- so it shouldn't need any conditionals at all.

Does that sound sane?

--
dwmw2

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

* RE: 64-bit support..what happened?
  2002-09-04 14:51     ` David Woodhouse
@ 2002-09-04 15:06       ` Allen Curtis
  2002-09-04 15:09         ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Allen Curtis @ 2002-09-04 15:06 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

> > I believe that there are 3 files under map that include the conditional
> > compile and none of them include the proper header file. Perhaps this
> > just indicates that the conditional should be moved to another file or
> > change to use the autoconfig defines?
>
> I'm inclined to suggest that it should be removed from all three offending
> map files and a new example for 64-bit operation be added;
> physmap64.c. And
> you should only be able to enable physmap64.c in the config if you've
> enabled 64-bit operation -- so it shouldn't need any conditionals at all.
>
> Does that sound sane?

Sounds good and just a Makefile change. Do you want me to do that?

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

* Re: 64-bit support..what happened?
  2002-09-04 15:06       ` Allen Curtis
@ 2002-09-04 15:09         ` David Woodhouse
  0 siblings, 0 replies; 6+ messages in thread
From: David Woodhouse @ 2002-09-04 15:09 UTC (permalink / raw)
  To: acurtis; +Cc: linux-mtd


acurtis@onz.com said:
>  Sounds good and just a Makefile change. Do you want me to do that? 

... and removing the offending #defines and the code they surround from 
those three map drivers, and adding physmap64.c. Yes please :)

--
dwmw2

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

end of thread, other threads:[~2002-09-04 15:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-04 14:14 64-bit support..what happened? Allen Curtis
2002-09-04 14:23 ` David Woodhouse
2002-09-04 14:41   ` Allen Curtis
2002-09-04 14:51     ` David Woodhouse
2002-09-04 15:06       ` Allen Curtis
2002-09-04 15:09         ` David Woodhouse

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