Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2026448ybd; Sun, 23 Jun 2019 22:45:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSQJimkpnRa09Fe3wVJatLO8VhcHEAzAi5PGKwlTWB2aR2b0UylOC7eGMiI26G/3983Pps X-Received: by 2002:a63:1243:: with SMTP id 3mr20182577pgs.235.1561355125044; Sun, 23 Jun 2019 22:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561355125; cv=none; d=google.com; s=arc-20160816; b=WGbFA8Lx7rTBCI9+Sd7f/zVaf7cWgE4bpHMZkWp7WBNSuINe575kiIPrzYC7/DCdFh Kufndirv7j6Zx8ahgoms+5ou8iV/VqPnXUIBkG3vDJ0bdvz3j1H345VYDDSlSMInRhig qjR8o8F861yh/jiB4nqz17Yf7JOgPBy02ZSkMmZ4ESN08R35Vmfk97IMDeazT7DCRGfn AFy/b8Nx5sTEtehBhaKg6Zvn1w7cNjm6N9VfR88Km8+sL+vP5nP4WE7jbmOPeNWFTppc uEf7X7jEPs793FKWKKKoNB5HcdsTr8bJMHXOoCr/l9kr6Cm1WplBbJGwlg3lLWvOuSfQ QuOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uHFTnl4vUjrNVYTFv2dDUy+7np+VKavI9He7Ga2MW2s=; b=lk3KbxTjMX3koryzVNIfYJe3DiqlzTjhdCkAwgLWyIUuIG/L8Sj2BzRdu/2uaMVuKx CA+0fW0iWX03WETrSg8vVGLtpmCTviVna25oOoCAsL6SjS6Ummz7Y+68KKzq1WtxGahs l7VMK6tjd9JM3V9gYLrj9l9Acsz5oeggsqlwzPvq4BrKRRx7iM4a1NhS8DSgYIhk4Z/U YbGGefuO8S1T+NWmJ92irfHsK8eBcyrxo2q7CSsO3SBXfKHlbRc6IjnAUE6Y6NFY+XlO G8q15Pr/i7Tzv7R4F82cCji5VvSmdys7MaCvmBxaCfjQmf1AGlPMGsYP3QsVviTQEm51 Bi8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=m8UBJ+0X; 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 19si10092073pfi.81.2019.06.23.22.45.08; Sun, 23 Jun 2019 22:45:25 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=m8UBJ+0X; 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 S1727126AbfFXFn0 (ORCPT + 99 others); Mon, 24 Jun 2019 01:43:26 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34868 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726223AbfFXFnZ (ORCPT ); Mon, 24 Jun 2019 01:43:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uHFTnl4vUjrNVYTFv2dDUy+7np+VKavI9He7Ga2MW2s=; b=m8UBJ+0XcFZ7O7trRjCFun/kpM ZZL9L8R5+7n1in9B7bBJFc+moU0JB6Hi14/as4UhSBatyUxxcjhzsdYC6kDe3REVcjNaNW5RX3Fza C7X9mCLwL3zA7GmD9WbrUJDOy6dtV3finn/OvuiwPpTghqZu7fQlcGpPZwA7yPEAuVDAm6/tHnW3I hX0KhA8ptgDt+HbonwtMMPc7CPE9Lo25J7clA4oa2UPWbkXTT8GAWx4HWmjFSd3S2S9AyvJatTWdx HcphWkJ03sWY5Z74c2jp+RNrCmbNpU9pJ91z9gGz1xiJzbkVWkQ1rEC/P9e68pcZCYm5ie7s48ZEu /Usxr9xQ==; Received: from 213-225-6-159.nat.highway.a1.net ([213.225.6.159] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hfHlC-00065N-AR; Mon, 24 Jun 2019 05:43:23 +0000 From: Christoph Hellwig To: Palmer Dabbelt , Paul Walmsley Cc: Damien Le Moal , linux-riscv@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/17] mm: stub out all of swapops.h for !CONFIG_MMU Date: Mon, 24 Jun 2019 07:42:56 +0200 Message-Id: <20190624054311.30256-3-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190624054311.30256-1-hch@lst.de> References: <20190624054311.30256-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The whole header file deals with swap entries and PTEs, none of which can exist for nommu builds. 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 */ -- 2.20.1