From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751997AbbCZKEV (ORCPT ); Thu, 26 Mar 2015 06:04:21 -0400 Received: from mail-wg0-f54.google.com ([74.125.82.54]:35816 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567AbbCZKER (ORCPT ); Thu, 26 Mar 2015 06:04:17 -0400 Date: Thu, 26 Mar 2015 11:04:13 +0100 From: Ingo Molnar To: Christoph Hellwig Cc: linux-nvdimm@ml01.01.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, ross.zwisler@linux.intel.com, axboe@kernel.dk, boaz@plexistor.com Subject: Re: [PATCH 2/3] x86: add a is_e820_ram() helper Message-ID: <20150326100413.GA19739@gmail.com> References: <1427358764-6126-1-git-send-email-hch@lst.de> <1427358764-6126-3-git-send-email-hch@lst.de> <20150326090215.GA11520@gmail.com> <20150326093424.GA28217@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150326093424.GA28217@lst.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Christoph Hellwig wrote: > On Thu, Mar 26, 2015 at 10:02:15AM +0100, Ingo Molnar wrote: > > This is_e820_ram() factoring out becomes really messy in patch #3. > > > > So you left out a bunch of places making comparisons with E820_RAM, > > notably e820_reserve_resources_late() and memblock_x86_fill() - and of > > course those have to be left out, otherwise NVRAM might be registered > > and used as real kernel RAM! > > > > And this shows the weakness and confusion caused by the factoring out > > of is_e820_ram() and then adding E820_PMEM to its definition... > > > > I'd rather you add explicit checks to E820_PMEM (why not E820_PRAM, to > > keep in line with the E820_RAM name?), and not lie about > > is_e820_ram(). It should result in the exact same end result, with > > less confusion. > > > > I have no fundamental objections to the driver otherwise. > > Does this patch (replaces patches 2 and 3) look better to you? Yeah, the code is much clearer now: Acked-by: Ingo Molnar What tree is this intended for? Should I pick up the x86 bits? Thanks, Ingo