Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Can PYSMAP_COMPAT go?
@ 2010-04-20  6:35 Wolfram Sang
  2010-04-20  7:35 ` Lennert Buytenhek
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2010-04-20  6:35 UTC (permalink / raw)
  To: linux-mtd; +Cc: David Woodhouse

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

Hi,

triggered by bug-report #15729 (thread at [1]), I wondered where default "0"
for MTD_PHYSMAP_LEN came from and found
73566edf9b91dd085ddb12033d0ea7288979dd10. Its description says:

    Once all physmap users have been converted to instantiate their own
    platform devices, the compat code can go.  (Or we decide that we can
    change all the in-tree users at the same time, and never merge the
    compat code.)

Grepping for current users:

~/Kernel/linux-2.6/arch$ grep -r 'MAP_COMPAT' * | grep -v 'is not set'
sh/configs/polaris_defconfig:CONFIG_MTD_PHYSMAP_COMPAT=y

This one could be fixed and then the compat code could be removed. I'd pick up
the job, if I get a sign that this has a chance to go in. Or shall compat stay
for a reason?

Regards,

   Wolfram

[1] http://marc.info/?l=linux-kernel&m=127024096210230&w=2

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: Can PYSMAP_COMPAT go?
  2010-04-20  6:35 Can PYSMAP_COMPAT go? Wolfram Sang
@ 2010-04-20  7:35 ` Lennert Buytenhek
  2010-04-20  8:05   ` David Woodhouse
  0 siblings, 1 reply; 8+ messages in thread
From: Lennert Buytenhek @ 2010-04-20  7:35 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: David Woodhouse, linux-mtd

On Tue, Apr 20, 2010 at 08:35:47AM +0200, Wolfram Sang wrote:

> triggered by bug-report #15729 (thread at [1]), I wondered where default "0"
> for MTD_PHYSMAP_LEN came from and found
> 73566edf9b91dd085ddb12033d0ea7288979dd10. Its description says:
> 
>     Once all physmap users have been converted to instantiate their own
>     platform devices, the compat code can go.  (Or we decide that we can
>     change all the in-tree users at the same time, and never merge the
>     compat code.)
> 
> Grepping for current users:
> 
> ~/Kernel/linux-2.6/arch$ grep -r 'MAP_COMPAT' * | grep -v 'is not set'
> sh/configs/polaris_defconfig:CONFIG_MTD_PHYSMAP_COMPAT=y
> 
> This one could be fixed and then the compat code could be removed. I'd pick up
> the job, if I get a sign that this has a chance to go in. Or shall compat stay
> for a reason?

COMPAT needs to die.  There are at least two other ways of specifying
the same info (device tree or manual instantiation of a platform device
from your platform code), and we really shouldn't allow specifying this
in the .config as that will just give people other crazy ideas.

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

* Re: Can PYSMAP_COMPAT go?
  2010-04-20  7:35 ` Lennert Buytenhek
@ 2010-04-20  8:05   ` David Woodhouse
  2010-04-20  9:04     ` Wolfram Sang
  0 siblings, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2010-04-20  8:05 UTC (permalink / raw)
  To: Lennert Buytenhek; +Cc: linux-mtd, Wolfram Sang

On Tue, 2010-04-20 at 09:35 +0200, Lennert Buytenhek wrote:
> COMPAT needs to die.  There are at least two other ways of specifying
> the same info (device tree or manual instantiation of a platform device
> from your platform code), and we really shouldn't allow specifying this
> in the .config as that will just give people other crazy ideas. 

If we take it away, they'll get crazier ideas. I've seen a fully-fledged
driver for a new board, including a bizarrely hacked-up copy of all the
CFI code and a special char device interface of its own, which could
have been supported by a simple PHYSMAP setup.

And this was i386, which unfortunately doesn't use the device-tree yet,
although on these embedded SoC devices it really _should_ be doing so.
And it doesn't have 'platform code' either.

If you explicitly configure your kernel to tell it that there is a flash
device at a certain address, then it's reasonable for the kernel to look
there for it. Aunt Tillie can go screw herself.

-- 
dwmw2

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

* Re: Can PYSMAP_COMPAT go?
  2010-04-20  8:05   ` David Woodhouse
@ 2010-04-20  9:04     ` Wolfram Sang
  2010-04-20  9:20       ` David Woodhouse
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2010-04-20  9:04 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd, Lennert Buytenhek

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


> And this was i386, which unfortunately doesn't use the device-tree yet,
> although on these embedded SoC devices it really _should_ be doing so.
> And it doesn't have 'platform code' either.

Okay, so unless i386 gets device-tree support ;), how about at least this?

From: Wolfram Sang <w.sang@pengutronix.de>
Subject: [PATCH] mtd/physmap: Use sensible default value for MTD_PHYSMAP_LEN

Commit 73566edf9b91dd085ddb12033d0ea7288979dd10 made it necessary to be
0, but commit dcb3e137ce9be1dfc86e306182b23e3ae5e239c4 obsoleted that
requirement. Restore the old value to get a meaningful default.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
 drivers/mtd/maps/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index aa2807d..213c615 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -47,7 +47,7 @@ config MTD_PHYSMAP_START
 config MTD_PHYSMAP_LEN
 	hex "Physical length of flash mapping"
 	depends on MTD_PHYSMAP_COMPAT
-	default "0"
+	default "0x4000000"
 	help
 	  This is the total length of the mapping of the flash chips on
 	  your particular board. If there is space, or aliases, in the
-- 
1.7.0


-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: Can PYSMAP_COMPAT go?
  2010-04-20  9:04     ` Wolfram Sang
@ 2010-04-20  9:20       ` David Woodhouse
  2010-04-20  9:48         ` Wolfram Sang
  2010-04-21  9:19         ` Wolfram Sang
  0 siblings, 2 replies; 8+ messages in thread
From: David Woodhouse @ 2010-04-20  9:20 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-mtd, Lennert Buytenhek

On Tue, 2010-04-20 at 11:04 +0200, Wolfram Sang wrote:
> Okay, so unless i386 gets device-tree support ;), how about at least
> this?

I'd love to see i386 get device-tree support. OLPC could benefit from it
immediately, and we could start using it on the embedded toys which are
coming out now.

I really don't think 0x4000000 is a 'sensible' default. Zero was better
-- at least the user has to set it to something else. With Hartley's
patch applied, the kernel will no longer crash if it tries to register a
device with zero length (and perhaps it could bail out even sooner if
the length is zero, rather than waiting and noticing the error?).

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

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

* Re: Can PYSMAP_COMPAT go?
  2010-04-20  9:20       ` David Woodhouse
@ 2010-04-20  9:48         ` Wolfram Sang
  2010-04-21  9:19         ` Wolfram Sang
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2010-04-20  9:48 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd, Lennert Buytenhek

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

On Tue, Apr 20, 2010 at 10:20:56AM +0100, David Woodhouse wrote:
> On Tue, 2010-04-20 at 11:04 +0200, Wolfram Sang wrote:
> > Okay, so unless i386 gets device-tree support ;), how about at least
> > this?
> 
> I'd love to see i386 get device-tree support. OLPC could benefit from it
> immediately, and we could start using it on the embedded toys which are
> coming out now.

True. It was the "unless" I was pointing for. I'd think it will take a long
while...

> I really don't think 0x4000000 is a 'sensible' default. Zero was better

Okay. I just wanted to remove the inconsistency (all these options could be 0
then). But it's probably now worth the fuss.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: Can PYSMAP_COMPAT go?
  2010-04-20  9:20       ` David Woodhouse
  2010-04-20  9:48         ` Wolfram Sang
@ 2010-04-21  9:19         ` Wolfram Sang
  2010-04-21  9:25           ` David Woodhouse
  1 sibling, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2010-04-21  9:19 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd, Lennert Buytenhek

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

> -- at least the user has to set it to something else. With Hartley's
> patch applied, the kernel will no longer crash if it tries to register a

BTW will you pick it up or who should do?

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: Can PYSMAP_COMPAT go?
  2010-04-21  9:19         ` Wolfram Sang
@ 2010-04-21  9:25           ` David Woodhouse
  0 siblings, 0 replies; 8+ messages in thread
From: David Woodhouse @ 2010-04-21  9:25 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-mtd, Lennert Buytenhek

On Wed, 2010-04-21 at 11:19 +0200, Wolfram Sang wrote:
> > -- at least the user has to set it to something else. With Hartley's
> > patch applied, the kernel will no longer crash if it tries to register a
> 
> BTW will you pick it up or who should do?

I already did. Although it looks like I forgot to push.... fixed.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

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

end of thread, other threads:[~2010-04-21  9:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20  6:35 Can PYSMAP_COMPAT go? Wolfram Sang
2010-04-20  7:35 ` Lennert Buytenhek
2010-04-20  8:05   ` David Woodhouse
2010-04-20  9:04     ` Wolfram Sang
2010-04-20  9:20       ` David Woodhouse
2010-04-20  9:48         ` Wolfram Sang
2010-04-21  9:19         ` Wolfram Sang
2010-04-21  9:25           ` David Woodhouse

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