From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Date: Tue, 22 Jan 2019 09:22:34 +0000 Subject: Re: [PATCH v9 00/22] Re-use nvram module Message-Id: <20190122092234.GA15813@kroah.com> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Finn Thain Cc: Michael Schmitz , linux-fbdev@vger.kernel.org, Arnd Bergmann , "Martin K. Petersen" , Bartlomiej Zolnierkiewicz , "James E.J. Bottomley" , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-scsi@vger.kernel.org, linux-m68k@lists.linux-m68k.org, Geert Uytterhoeven , Michael Ellerman , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Joshua Thompson On Tue, Jan 15, 2019 at 03:18:56PM +1100, Finn Thain wrote: > The "generic" NVRAM module, drivers/char/generic_nvram.c, implements a > /dev/nvram misc device. This module is used only by 32-bit PowerPC > platforms. > > The RTC "CMOS" NVRAM module, drivers/char/nvram.c, also implements a > /dev/nvram misc device. This module is now used only by x86 and m68k > thanks to commit 3ba9faedc180 ("char: nvram: disable on ARM"). > > The "generic" module cannot be used by x86 or m68k platforms because it > cannot co-exist with the "CMOS" module. One reason for that is the > CONFIG_GENERIC_NVRAM kludge in drivers/char/Makefile. Another reason is > that automatically loading the appropriate module would be impossible > because only one module can provide the char-major-10-144 alias. > > A multi-platform kernel binary needs a single, generic module. With this > patch series, drivers/char/nvram.c becomes more generic and some of the > arch-specific code gets moved under arch/. The nvram module is then > usable by all m68k, powerpc and x86 platforms. > > This allows for removal of drivers/char/generic_nvram.c as well as a > duplicate in arch/powerpc/kernel/nvram_64.c. By reducing the number of > /dev/nvram char misc device implementations, the number of bugs and > inconsistencies is also reduced. > > This approach reduces inconsistencies between PPC32 and PPC64 and also > between PPC_PMAC and MAC. A uniform API has benefits for userspace. > > For example, some error codes for some ioctl calls become consistent > across PowerPC platforms. The uniform API can potentially benefit any > bootloader that works across the various platforms having XPRAM > (e.g. Emile). > > This patch series was tested on Atari, Mac, PowerMac (both 32-bit and > 64-bit) and ThinkPad hardware. AFAIK, it has not yet been tested on > pSeries or CHRP. > > I think there are two possible merge strategies for this patch series. > The char misc maintainer could take the entire series. Alternatively, > the m68k maintainer could take patches 1 thru 16 (though some of these > have nothing to do with m68k) and after those patches reach mainline > the powerpc maintainer could take 17 thru 22. I just took the whole series, thanks for doing this, looks good. greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH v9 00/22] Re-use nvram module Date: Tue, 22 Jan 2019 10:22:34 +0100 Message-ID: <20190122092234.GA15813@kroah.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Finn Thain Cc: Michael Schmitz , linux-fbdev@vger.kernel.org, Arnd Bergmann , "Martin K. Petersen" , Bartlomiej Zolnierkiewicz , "James E.J. Bottomley" , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-scsi@vger.kernel.org, linux-m68k@lists.linux-m68k.org, Geert Uytterhoeven , Michael Ellerman , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Joshua Thompson List-Id: linux-scsi@vger.kernel.org T24gVHVlLCBKYW4gMTUsIDIwMTkgYXQgMDM6MTg6NTZQTSArMTEwMCwgRmlubiBUaGFpbiB3cm90 ZToKPiBUaGUgImdlbmVyaWMiIE5WUkFNIG1vZHVsZSwgZHJpdmVycy9jaGFyL2dlbmVyaWNfbnZy YW0uYywgaW1wbGVtZW50cyBhCj4gL2Rldi9udnJhbSBtaXNjIGRldmljZS4gVGhpcyBtb2R1bGUg aXMgdXNlZCBvbmx5IGJ5IDMyLWJpdCBQb3dlclBDCj4gcGxhdGZvcm1zLgo+IAo+IFRoZSBSVEMg I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BpdCBoYXMgbm90IHlldCBiZWVuIHRlc3RlZCBv bgo+IHBTZXJpZXMgb3IgQ0hSUC4KPiAKPiBJIHRoaW5rIHRoZXJlIGFyZSB0d28gcG9zc2libGUg bWVyZ2Ugc3RyYXRlZ2llcyBmb3IgdGhpcyBwYXRjaCBzZXJpZXMuCj4gVGhlIGNoYXIgbWlzYyBt YWludGFpbmVyIGNvdWxkIHRha2UgdGhlIGVudGlyZSBzZXJpZXMuIEFsdGVybmF0aXZlbHksCj4g dGhlIG02OGsgbWFpbnRhaW5lciBjb3VsZCB0YWtlIHBhdGNoZXMgMSB0aHJ1IDE2ICh0aG91Z2gg c29tZSBvZiB0aGVzZQo+IGhhdmUgbm90aGluZyB0byBkbyB3aXRoIG02OGspIGFuZCBhZnRlciB0 aG9zZSBwYXRjaGVzIHJlYWNoIG1haW5saW5lCj4gdGhlIHBvd2VycGMgbWFpbnRhaW5lciBjb3Vs ZCB0YWtlIDE3IHRocnUgMjIuCgpJIGp1c3QgdG9vayB0aGUgd2hvbGUgc2VyaWVzLCB0aGFua3Mg Zm9yIGRvaW5nIHRoaXMsIGxvb2tzIGdvb2QuCgpncmVnIGstaApfX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fXwpkcmktZGV2ZWwgbWFpbGluZyBsaXN0CmRyaS1k ZXZlbEBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5mcmVlZGVza3RvcC5vcmcv bWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 528B4C282C3 for ; Tue, 22 Jan 2019 09:26:30 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C8A5E218D9 for ; Tue, 22 Jan 2019 09:26:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="FiR3edAX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C8A5E218D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43kNMl6Tl2zDqNf for ; Tue, 22 Jan 2019 20:26:27 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=srs0=915k=p6=linuxfoundation.org=gregkh@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="FiR3edAX"; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43kNJD1jTGzDqN5 for ; Tue, 22 Jan 2019 20:23:24 +1100 (AEDT) Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E8847218D4; Tue, 22 Jan 2019 09:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548149002; bh=tvfSfixV9M/zFUAZ25eiE9ftJmocefhGyeG7bJ1p+wc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FiR3edAXBVFUN7hzroBaOdWPtGHJ4PvajGPuamdx3G45qsVh4pQCSBGYHxHhWCvGG UcxdFStjA+N+NgMGE/+jFBsRbGP+55MuNl0zqtSVFzpqWRf+oOcWl4sK+Qh8NEzL9d 5uAQ8uVHQZ3QkihfTDVeHr2RmnOHtQsEHcXatTxU= Date: Tue, 22 Jan 2019 10:22:34 +0100 From: Greg Kroah-Hartman To: Finn Thain Subject: Re: [PATCH v9 00/22] Re-use nvram module Message-ID: <20190122092234.GA15813@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.2 (2019-01-07) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Schmitz , linux-fbdev@vger.kernel.org, Arnd Bergmann , "Martin K. Petersen" , Bartlomiej Zolnierkiewicz , "James E.J. Bottomley" , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-scsi@vger.kernel.org, linux-m68k@lists.linux-m68k.org, Geert Uytterhoeven , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Joshua Thompson Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, Jan 15, 2019 at 03:18:56PM +1100, Finn Thain wrote: > The "generic" NVRAM module, drivers/char/generic_nvram.c, implements a > /dev/nvram misc device. This module is used only by 32-bit PowerPC > platforms. > > The RTC "CMOS" NVRAM module, drivers/char/nvram.c, also implements a > /dev/nvram misc device. This module is now used only by x86 and m68k > thanks to commit 3ba9faedc180 ("char: nvram: disable on ARM"). > > The "generic" module cannot be used by x86 or m68k platforms because it > cannot co-exist with the "CMOS" module. One reason for that is the > CONFIG_GENERIC_NVRAM kludge in drivers/char/Makefile. Another reason is > that automatically loading the appropriate module would be impossible > because only one module can provide the char-major-10-144 alias. > > A multi-platform kernel binary needs a single, generic module. With this > patch series, drivers/char/nvram.c becomes more generic and some of the > arch-specific code gets moved under arch/. The nvram module is then > usable by all m68k, powerpc and x86 platforms. > > This allows for removal of drivers/char/generic_nvram.c as well as a > duplicate in arch/powerpc/kernel/nvram_64.c. By reducing the number of > /dev/nvram char misc device implementations, the number of bugs and > inconsistencies is also reduced. > > This approach reduces inconsistencies between PPC32 and PPC64 and also > between PPC_PMAC and MAC. A uniform API has benefits for userspace. > > For example, some error codes for some ioctl calls become consistent > across PowerPC platforms. The uniform API can potentially benefit any > bootloader that works across the various platforms having XPRAM > (e.g. Emile). > > This patch series was tested on Atari, Mac, PowerMac (both 32-bit and > 64-bit) and ThinkPad hardware. AFAIK, it has not yet been tested on > pSeries or CHRP. > > I think there are two possible merge strategies for this patch series. > The char misc maintainer could take the entire series. Alternatively, > the m68k maintainer could take patches 1 thru 16 (though some of these > have nothing to do with m68k) and after those patches reach mainline > the powerpc maintainer could take 17 thru 22. I just took the whole series, thanks for doing this, looks good. greg k-h