mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Jason Lunz <lunz@falooley.org>
Cc: David Woodhouse <dwmw2@infradead.org>,
	atom ota <atomota@sleepyhammer.com>,
	user-mode-linux-devel@lists.sourceforge.net,
	Jeff Dike <jdike@addtoit.com>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-mtd@lists.infradead.org, Rob Landley <rob@landley.net>
Subject: Re: [PATCH] allow use of mtd and jffs2 on uml
Date: Fri, 28 Dec 2007 18:48:53 +0100	[thread overview]
Message-ID: <20071228174853.GA4252@uranus.ravnborg.org> (raw)
In-Reply-To: <20071227181524.GA19051@falooley.org>

On Thu, Dec 27, 2007 at 01:15:25PM -0500, Jason Lunz wrote:
> 
> Allow parts of drivers/mtd to compile on uml by pushing the HAS_IOMEM
> dependencies down closer to the parts of mtd that actually need it. This
> allows enough of mtd to build to let jffs2 be used on uml.
> 
> Signed-off-by: Jason Lunz <lunz@falooley.org>
> 
> ---
> 
>  arch/um/Kconfig             |    4 +---
>  drivers/mtd/Kconfig         |   12 +++++++-----
>  drivers/mtd/chips/Kconfig   |   11 ++++++++---
>  drivers/mtd/devices/Kconfig |    7 +++++++
>  4 files changed, 23 insertions(+), 11 deletions(-)
> 
> Index: linux-2.6.23.1-uml/arch/um/Kconfig
> ===================================================================
> --- linux-2.6.23.1-uml.orig/arch/um/Kconfig
> +++ linux-2.6.23.1-uml/arch/um/Kconfig
> @@ -326,9 +326,7 @@
>  
>  source "drivers/md/Kconfig"
>  
> -if BROKEN
> -	source "drivers/mtd/Kconfig"
> -endif
> +source "drivers/mtd/Kconfig"
>  
>  #This is just to shut up some Kconfig warnings, so no prompt.
>  config INPUT
> Index: linux-2.6.23.1-uml/drivers/mtd/devices/Kconfig
> ===================================================================
> --- linux-2.6.23.1-uml.orig/drivers/mtd/devices/Kconfig
> +++ linux-2.6.23.1-uml/drivers/mtd/devices/Kconfig
> @@ -78,6 +78,7 @@
>  
>  config MTD_SLRAM
>  	tristate "Uncached system RAM"
> + 	depends on HAS_IOMEM
>  	help
>  	  If your CPU cannot cache all of the physical memory in your machine,
>  	  you can still use it for storage or swap by using this driver to
> @@ -85,6 +86,7 @@
>  
>  config MTD_PHRAM
>  	tristate "Physical system RAM"
> + 	depends on HAS_IOMEM
>  	help
>  	  This is a re-implementation of the slram driver above.
>  
> @@ -151,10 +153,13 @@
>  	  Testing MTD users (eg JFFS2) on large media and media that might
>  	  be removed during a write (using the floppy drive).
>  
> +if HAS_IOMEM
>  comment "Disk-On-Chip Device Drivers"
> +endif

You can expand the if above to include the config symols..
>  
>  config MTD_DOC2000
>  	tristate "M-Systems Disk-On-Chip 2000 and Millennium (DEPRECATED)"
> + 	depends on HAS_IOMEM
>  	select MTD_DOCPROBE
>  	select MTD_NAND_IDS
>  	---help---
> @@ -177,6 +182,7 @@
>  
>  config MTD_DOC2001
>  	tristate "M-Systems Disk-On-Chip Millennium-only alternative driver (DEPRECATED)"
> + 	depends on HAS_IOMEM
>  	select MTD_DOCPROBE
>  	select MTD_NAND_IDS
>  	---help---
> @@ -198,6 +204,7 @@
>  
>  config MTD_DOC2001PLUS
>  	tristate "M-Systems Disk-On-Chip Millennium Plus"
> + 	depends on HAS_IOMEM
>  	select MTD_DOCPROBE
>  	select MTD_NAND_IDS
>  	---help---
.. so if the endif was placed here you did not have to specify
the "depends on". Assumng btw that no other symbols inbetween
exists.

> Index: linux-2.6.23.1-uml/drivers/mtd/Kconfig
> ===================================================================
> --- linux-2.6.23.1-uml.orig/drivers/mtd/Kconfig
> +++ linux-2.6.23.1-uml/drivers/mtd/Kconfig
> @@ -2,7 +2,6 @@
>  
>  menuconfig MTD
>  	tristate "Memory Technology Device (MTD) support"
> -	depends on HAS_IOMEM
>  	help
>  	  Memory Technology Devices are flash, RAM and similar chips, often
>  	  used for solid state file systems on embedded devices. This option
> @@ -278,15 +277,18 @@
>  	  This enables read only access to SmartMedia formatted NAND
>  	  flash. You can mount it with FAT file system.
>  
> -source "drivers/mtd/chips/Kconfig"
>  
> -source "drivers/mtd/maps/Kconfig"
> +if HAS_IOMEM
> +	source "drivers/mtd/chips/Kconfig"
> +	source "drivers/mtd/maps/Kconfig"
> +endif

This "if" should be pushed down in the kconfig file
so it is obvoious we have this dependency.
>  
>  source "drivers/mtd/devices/Kconfig"
>  
> -source "drivers/mtd/nand/Kconfig"
> -
> -source "drivers/mtd/onenand/Kconfig"
> +if HAS_IOMEM
> +	source "drivers/mtd/nand/Kconfig"
> +	source "drivers/mtd/onenand/Kconfig"
> +endif
Same for this one - let it be explicit in the Kconfig file.

>  
>  source "drivers/mtd/ubi/Kconfig"
>  
> Index: linux-2.6.23.1-uml/drivers/mtd/Makefile
> ===================================================================
> --- linux-2.6.23.1-uml.orig/drivers/mtd/Makefile
> +++ linux-2.6.23.1-uml/drivers/mtd/Makefile
> @@ -26,6 +26,9 @@
>  nftl-objs		:= nftlcore.o nftlmount.o
>  inftl-objs		:= inftlcore.o inftlmount.o
>  
> -obj-y		+= chips/ maps/ devices/ nand/ onenand/
> +obj-y		+= devices/
> +ifdef CONFIG_HAS_IOMEM
> +obj-y		+= chips/ maps/ nand/ onenand/
> +endif

The ifdef for CONFIG_HAS_IOMEM looks strange.
Let kbuild visit the directories and then figure out nothing
needs to be done.
If you insist on the HAS_IOMEM dependency then use:
obj-$(CONFIG_HAS_IOMEM) += chips/ maps/ nand/ o


	Sam

  reply	other threads:[~2007-12-28 17:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <22c797d00709272118i33d32b9dy93d5f5ec8f8edd30@mail.gmail.com>
     [not found] ` <20071024011712.GA3762@falooley.org>
     [not found]   ` <1193208689.26096.48.camel@pmac.infradead.org>
2007-10-24 15:54     ` Jason Lunz
2007-10-24 16:24       ` atom ota
2007-12-27 18:15     ` Jason Lunz
2007-12-28 17:48       ` Sam Ravnborg [this message]
2010-12-07  7:29         ` [PATCH] mtd: allow mtd and jffs2 when ARCH=um Jason Lunz
2010-12-07  9:39           ` richard -rw- weinberger
2010-12-07 18:20             ` Jason Lunz
2010-12-14 16:24               ` Artem Bityutskiy
2010-12-14 19:51                 ` Jason Lunz
2010-12-14 20:01                   ` Artem Bityutskiy
2010-12-14 21:12                     ` Geert Uytterhoeven
2010-12-14 21:23                     ` Jason Lunz
2010-12-15  0:40                       ` Rob Landley
2010-12-15  0:49                     ` Rob Landley
2010-12-15  1:19                       ` Jason Lunz
2010-12-15  6:31                         ` Rob Landley
2010-12-16 15:18                           ` Artem Bityutskiy
2010-12-18  4:08                             ` Rob Landley
2010-12-19 17:08                               ` Artem Bityutskiy
2010-12-15  8:18                         ` Geert Uytterhoeven
2010-12-16 15:25                   ` Artem Bityutskiy
2010-12-16 22:01                   ` Anatolij Gustschin
2010-12-17  4:27                     ` mtd: fix CONFIG_MTD_COMPLEX_MAPPINGS=n compile Jason Lunz
2010-12-19 16:47                       ` Artem Bityutskiy
2010-12-19 19:07                         ` Jason Lunz
2010-12-20 11:23                           ` Artem Bityutskiy
2010-12-20 14:04                             ` [PATCH] mtd: allow mtd and jffs2 when ARCH=um Jason Lunz
2010-12-22 14:40                               ` Artem Bityutskiy
2011-01-06 15:45                   ` David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071228174853.GA4252@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=atomota@sleepyhammer.com \
    --cc=dwmw2@infradead.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=lunz@falooley.org \
    --cc=rob@landley.net \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome