Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756433Ab0LPPZl (ORCPT ); Thu, 16 Dec 2010 10:25:41 -0500 Received: from mail-bw0-f45.google.com ([209.85.214.45]:43883 "EHLO mail-bw0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756276Ab0LPPZj (ORCPT ); Thu, 16 Dec 2010 10:25:39 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; b=KmN0p5IF8WdbuMy9uyhjSlssVloU8LWKSC2jEgG3ZERvWxo/D3lmWgitFWJOtcwwM4 qXss8iCw3qcMwYx/1gS0lrfhoihEdfc0Ox8GjIMldLt4l57jBfO7du21XpaOff4EsBLK GPhwvQ4FYifXnF1ic+bUCdT2dItlpaTHDc+WU= Subject: Re: [PATCH] mtd: allow mtd and jffs2 when ARCH=um From: Artem Bityutskiy Reply-To: dedekind1@gmail.com To: Jason Lunz Cc: richard -rw- weinberger , Sam Ravnborg , David Woodhouse , atom ota , user-mode-linux-devel@lists.sourceforge.net, Jeff Dike , lkml , linux-mtd@lists.infradead.org, Rob Landley In-Reply-To: <20101214195124.GA6010@falooley.org> References: <22c797d00709272118i33d32b9dy93d5f5ec8f8edd30@mail.gmail.com> <20071024011712.GA3762@falooley.org> <1193208689.26096.48.camel@pmac.infradead.org> <20071227181524.GA19051@falooley.org> <20071228174853.GA4252@uranus.ravnborg.org> <20101207072919.GA8511@falooley.org> <20101207182012.GA10546@falooley.org> <1292343878.2538.80.camel@localhost> <20101214195124.GA6010@falooley.org> Content-Type: text/plain; charset="UTF-8" Date: Thu, 16 Dec 2010 17:25:06 +0200 Message-ID: <1292513106.2364.86.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 (2.32.1-1.fc14) Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2021 Lines: 42 On Tue, 2010-12-14 at 11:51 -0800, Jason Lunz wrote: > On Tue, Dec 14, 2010 at 06:24:38PM +0200, Artem Bityutskiy wrote: > > But I think your solution is a bit dirty, because it adds a great deal > > of little 'if HAS_IOMEM' and '#ifdef CONFIG_HAS_IOMEM' to many places. > > This is error-prone. > > The intent of that patch was to allow as much of the mtd subsystem to > compile as possible. My thinking was to try and rectify the fact that > uml has gone without mtd (and hence jffs2) support for years even though > much of it works just fine. I think the entire subsystem being marked > BROKEN in kconfig kept anyone from experimenting with it. > > The patch I sent was actually a reaction to feedback I got from Sam > Ravnborg on my last attempt (um, three years ago :/ ) in which he > suggested pushing down the ifdefs closer to their points of use. But I > agree, the minimal version has a much smaller footprint. > > The version below still meets the goal of allowing jffs2-on-block2mtd > usage under uml but is much smaller because only the mtd core is > included. Compile-tested on i386, x86_64, um/i386, and um/x86_64. > > > Instead, you should solve this problem in UML code. I do not know how, > > but may be you can add readb/writeb there which actually do nothing or > > print a scary warning, or do BUG(), and let things which use them just > > fail run-time. > > Something like this could work, but it would be error-prone for anyone > else who attempts using iomem-requiring drivers on uml. Instead of > getting obvious compile failures we'd have broken drivers that BUG() or > emit scary warnings. That doesn't seem to me like an improvement. OK, pushed this patch to l2-mtd-2.6.git. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/