Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4479504ybi; Tue, 11 Jun 2019 07:19:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzl9BXWm+e7eIbuss1XiAaSOboBqkjZzq6ce9wS218CvTt3GwgVerBpkjAAnf3YCrPHLFKs X-Received: by 2002:a17:902:9b85:: with SMTP id y5mr75239507plp.313.1560262791822; Tue, 11 Jun 2019 07:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560262791; cv=none; d=google.com; s=arc-20160816; b=UuaKxHXaJ5id2Kmv4B2WLtjqIFrq2XB7MOdvhFXsIDO4c4QKyjeZFOz30fGyoo2+VR pTyEPLl4xfiz8P7KqB9T74FZoZXWRVuSKy3+b2dVblBQJsl87xCFrjuqgESDI8/EOrlV FoJiHC1uz9Mc/eZL5v8pCcnnYN4YEzXBNoc8dkfdvpkUCGwJOkNWFpZjbG0VRCFl4+Ux D/kSCARFfimrfUCFAiTQI78AobimxC1pt+Gotqy+ninAfvPDf0GERia4OTszhs2eZXR2 By3uZuVSw0HcjZHISgGeEO9+rHD0cIXfeV/vB0LAejhZ0BY5SZ9f6CuBHM8nffuo5JMf clFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=5c5fLTWuG7H0cAYW1nFOWqDzGLiH4vgxzMrE5FX75+I=; b=sWy4Ey1squYkCnhw0GyEILthBGKKpokawRSQ6i5K4lMqRxtadMOrQ4U70FYoZMXegF pNZCfrDLFLjBWLzAGI+bZhOcroV0Dv5vAwzbhWNzRUevk/FFo+LFFKGH8/T8oSr846Pq Nq5oJAnHfd+uDK0qY9W5//pWAPJWVBBxoRCEtev85LgiZXMuVRrSU+bGoHG5G4bWUpad SE/AbykGxzk61d8zRyZbFoIkApdi6/fmokdEQyw61AubG9fsynxewoDYeAC405FXJ7I7 mtXLz5zxn9GZ4LVu18GtVr3XFawUU7tfbILXORqIzH3nAS7u700dItpY05eARXhzSygu SxDg== 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 a3si12864222pff.117.2019.06.11.07.19.35; Tue, 11 Jun 2019 07:19:51 -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 S2388160AbfFKOTL (ORCPT + 99 others); Tue, 11 Jun 2019 10:19:11 -0400 Received: from verein.lst.de ([213.95.11.211]:51618 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387551AbfFKOTL (ORCPT ); Tue, 11 Jun 2019 10:19:11 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 3E91868B02; Tue, 11 Jun 2019 16:18:42 +0200 (CEST) Date: Tue, 11 Jun 2019 16:18:41 +0200 From: Christoph Hellwig To: Vladimir Murzin Cc: Christoph Hellwig , Palmer Dabbelt , Damien Le Moal , linux-riscv@lists.infradead.org, uclinux-dev@uclinux.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/17] mm: stub out all of swapops.h for !CONFIG_MMU Message-ID: <20190611141841.GA29151@lst.de> References: <20190610221621.10938-1-hch@lst.de> <20190610221621.10938-3-hch@lst.de> <516c8def-22db-027c-873d-a943454e33af@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <516c8def-22db-027c-873d-a943454e33af@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 11, 2019 at 11:15:44AM +0100, Vladimir Murzin wrote: > On 6/10/19 11:16 PM, Christoph Hellwig wrote: > > The whole header file deals with swap entries and PTEs, none of which > > can exist for nommu builds. > > Although I agree with the patch, I'm wondering how you get into it? Without that the RISC-V nommu blows up like this: In file included from mm/vmscan.c:58: ./include/linux/swapops.h: In function ‘pte_to_swp_entry’: ./include/linux/swapops.h:71:15: error: implicit declaration of function ‘__pte_to_swp_entry’; did you mean ‘pte_to_swp_entry’? [-Werror=implicit-function-declaration] arch_entry = __pte_to_swp_entry(pte); ^~~~~~~~~~~~~~~~~~ pte_to_swp_entry ./include/linux/swapops.h:71:13: error: incompatible types when assigning to type ‘swp_entry_t’ {aka ‘struct ’} from type ‘int’ arch_entry = __pte_to_swp_entry(pte); ^ ./include/linux/swapops.h:72:19: error: implicit declaration of function ‘__swp_type’; did you mean ‘swp_type’? [-Werror=implicit-function-declaration] return swp_entry(__swp_type(arch_entry), __swp_offset(arch_entry)); ^~~~~~~~~~ swp_type ./include/linux/swapops.h:72:43: error: implicit declaration of function ‘__swp_offset’; did you mean ‘swp_offset’? [-Werror=implicit-function-declaration] return swp_entry(__swp_type(arch_entry), __swp_offset(arch_entry)); ^~~~~~~~~~~~ swp_offset ./include/linux/swapops.h: In function ‘swp_entry_to_pte’: ./include/linux/swapops.h:83:15: error: implicit declaration of function ‘__swp_entry’; did you mean ‘swp_entry’? [-Werror=implicit-function-declaration] arch_entry = __swp_entry(swp_type(entry), swp_offset(entry)); ^~~~~~~~~~~ swp_entry ./include/linux/swapops.h:83:13: error: incompatible types when assigning to type ‘swp_entry_t’ {aka ‘struct ’} from type ‘int’ arch_entry = __swp_entry(swp_type(entry), swp_offset(entry)); ^ ./include/linux/swapops.h:84:9: error: implicit declaration of function ‘__swp_entry_to_pte’; did you mean ‘swp_entry_to_pte’? [-Werror=implicit-function-declaration] return __swp_entry_to_pte(arch_entry); ^~~~~~~~~~~~~~~~~~ swp_entry_to_pte ./include/linux/swapops.h:84:9: error: incompatible types when returning type ‘int’ but ‘pte_t’ {aka ‘struct ’} was expected return __swp_entry_to_pte(arch_entry); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[1]: *** [scripts/Makefile.build:278: mm/vmscan.o] Error 1 make: *** [Makefile:1071: mm] Error 2 make: *** Waiting for unfinished jobs....