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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH autolearn=ham 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 E7B71C43218 for ; Tue, 11 Jun 2019 10:15:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BE57A208E3 for ; Tue, 11 Jun 2019 10:15:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IyzYWD+q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE57A208E3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=44pqVFt8HfXc6ij+aMT1r/mn3uTqN4Iyi1twLB5YmRs=; b=IyzYWD+qCMuZng BzW6qyL2Ejq1xCBNqUepj8fy5AynZv2BGjbXU3rS0Rwe3IJrzCmaRUzZZAyEjSMY9dWx8EEPR7pUB FxNFBDaiA/cASnYgmM3G4ecK3sCOB8REHXuiEZ9PvP36fpBGCQa0ZI5oVBcuBEXR3+2UdtOGQhuvq eML7C0s2Dy5ZBXWTk60KgCBrY670kk2GVk4x2kvqdH+Hc0TfcKsRn/miy9ryoRGlXfYA2m4SB2SQM VAX4RFu/6M9ORkbcfb9YF8DFBT3blqR3J3Ri5Bg2TwXVb6di4tDvFlnQxd1Z5ToQQhCGK6MmEXZMF Hiwp0tdrIJYsOpH7tjJA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hadoj-0001Id-Un; Tue, 11 Jun 2019 10:15:49 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hadoh-0001Hp-36 for linux-riscv@lists.infradead.org; Tue, 11 Jun 2019 10:15:48 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6714B337; Tue, 11 Jun 2019 03:15:46 -0700 (PDT) Received: from [10.1.29.141] (e121487-lin.cambridge.arm.com [10.1.29.141]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C8DCD3F557; Tue, 11 Jun 2019 03:17:27 -0700 (PDT) Subject: Re: [PATCH 02/17] mm: stub out all of swapops.h for !CONFIG_MMU To: Christoph Hellwig , Palmer Dabbelt References: <20190610221621.10938-1-hch@lst.de> <20190610221621.10938-3-hch@lst.de> From: Vladimir Murzin Message-ID: <516c8def-22db-027c-873d-a943454e33af@arm.com> Date: Tue, 11 Jun 2019 11:15:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190610221621.10938-3-hch@lst.de> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190611_031547_183325_42CD60A3 X-CRM114-Status: GOOD ( 17.06 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mm@kvack.org, Damien Le Moal , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, uclinux-dev@uclinux.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org 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? Cheers Vladimir > > Signed-off-by: Christoph Hellwig > --- > include/linux/swapops.h | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/include/linux/swapops.h b/include/linux/swapops.h > index 4d961668e5fc..b02922556846 100644 > --- a/include/linux/swapops.h > +++ b/include/linux/swapops.h > @@ -6,6 +6,8 @@ > #include > #include > > +#ifdef CONFIG_MMU > + > /* > * swapcache pages are stored in the swapper_space radix tree. We want to > * get good packing density in that tree, so the index should be dense in > @@ -50,13 +52,11 @@ static inline pgoff_t swp_offset(swp_entry_t entry) > return entry.val & SWP_OFFSET_MASK; > } > > -#ifdef CONFIG_MMU > /* check whether a pte points to a swap entry */ > static inline int is_swap_pte(pte_t pte) > { > return !pte_none(pte) && !pte_present(pte); > } > -#endif > > /* > * Convert the arch-dependent pte representation of a swp_entry_t into an > @@ -375,4 +375,5 @@ static inline int non_swap_entry(swp_entry_t entry) > } > #endif > > +#endif /* CONFIG_MMU */ > #endif /* _LINUX_SWAPOPS_H */ > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv