Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp88951ybg; Tue, 22 Oct 2019 16:39:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVPWx0uTTej3VWfe8hqOVF1rAUgGuudsVhmX+ADU04qGYv4ZgVaoSJRupdvyaxWAz3ScVT X-Received: by 2002:a50:970e:: with SMTP id c14mr17064356edb.20.1571787572278; Tue, 22 Oct 2019 16:39:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571787572; cv=none; d=google.com; s=arc-20160816; b=o47ablGZRcfTb8OkDMSldlyzu4nTWgL8BXfh2mPNHyDlFfpWp5Jmxdw5hS/Z1wFAIM P7y3VRTVYpqaEc5KxExs98XlS0d/igkKisdP6mwvk2PZyQEH/G8YIQ9JdUUo1ZaZUNlO jSLfOrSPLtZqYIL/QcTDIY066Y8HKjRe4Q9GUuWS/onSU6cUXBuYw0AEpRnE92A/8B1k zovV8bqpNZ0sjSEzLdhxfJ2uMl36HLQ9wHrkY3jRfav/SbrW/gPxI2XoRiyKC+ow3sM/ n3zhQL+dreGdIzuWc9OhLkfTINkh6Xh5gaX/i8YK2Zfi/c6Sj8nvRTlNsraBpbqR2b65 ohqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to; bh=XhxMOd8Z66/nuYQ+wqHkmNIKw3UEuRdkSVWOb3F5Hgs=; b=Olfzp8wYLE47UE9aLQZ7+/NzQyUhiZuGjSaf7allwx8JxvEqt02oIQDwRQNsV+3Jun myRJlfyaaHBBAkKFObHgJmDFlk5/5PRRM6o/nCRfLw6QsSzZebFcxYmDC0fUIuiZpLJT 0u2/eoAFCHCuAXHbyvDFSxdIW8IRkJfHuWnE3YFCMSyvUoz9ZikevL+PMBmiZKQZG212 TTEgiIwqKATnMk1e2WiR9vfgXi0UkHBPQ5laxaHDiuOkFIC0JY9wN/cgzt4kboY6M1UB 0CgMP9R6zOnbS5kpfUT/tm2HMPhbWEQpPMNpfm611gUSkbuqvHLsvHlLiI/GG9lV7lBl gLQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dt26si2943237ejb.38.2019.10.22.16.39.06; Tue, 22 Oct 2019 16:39:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732969AbfJVTw2 (ORCPT + 99 others); Tue, 22 Oct 2019 15:52:28 -0400 Received: from ale.deltatee.com ([207.54.116.67]:59478 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727851AbfJVTw2 (ORCPT ); Tue, 22 Oct 2019 15:52:28 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1iN0Cf-0001zY-SH; Tue, 22 Oct 2019 13:52:26 -0600 To: David Abdurachmanov , Paul Walmsley , Palmer Dabbelt , Albert Ou , Anup Patel , Mike Rapoport , Greentime Hu , Stefan O'Rear , David Abdurachmanov , Alexandre Ghiti , Thomas Gleixner , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20191022162136.19076-1-david.abdurachmanov@sifive.com> From: Logan Gunthorpe Message-ID: Date: Tue, 22 Oct 2019 13:52:23 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191022162136.19076-1-david.abdurachmanov@sifive.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, tglx@linutronix.de, alex@ghiti.fr, david.abdurachmanov@sifive.com, sorear2@gmail.com, greentime.hu@sifive.com, rppt@linux.ibm.com, Anup.Patel@wdc.com, aou@eecs.berkeley.edu, palmer@sifive.com, paul.walmsley@sifive.com, david.abdurachmanov@gmail.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [PATCH] riscv: fix fs/proc/kcore.c compilation with sparsemem enabled X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-10-22 10:21 a.m., David Abdurachmanov wrote: > Failed to compile Fedora/RISCV kernel (5.4-rc3+) with sparsemem enabled: > > fs/proc/kcore.c: In function 'read_kcore': > fs/proc/kcore.c:510:8: error: implicit declaration of function 'kern_addr_valid'; did you mean 'virt_addr_valid'? [-Werror=implicit-function-declaration] > 510 | if (kern_addr_valid(start)) { > | ^~~~~~~~~~~~~~~ > | virt_addr_valid > > Looking at other architectures I don't see kern_addr_valid being guarded by > CONFIG_FLATMEM. > > Fixes: d95f1a542c3d ("RISC-V: Implement sparsemem") > Signed-off-by: David Abdurachmanov > Tested-by: David Abdurachmanov Makes sense to me. Reviewed-by: Logan Gunthorpe > --- > arch/riscv/include/asm/pgtable.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h > index 42292d99cc74..7110879358b8 100644 > --- a/arch/riscv/include/asm/pgtable.h > +++ b/arch/riscv/include/asm/pgtable.h > @@ -428,9 +428,7 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma, > #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) > #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) > > -#ifdef CONFIG_FLATMEM > #define kern_addr_valid(addr) (1) /* FIXME */ > -#endif > > extern void *dtb_early_va; > extern void setup_bootmem(void); >