Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3785000yba; Tue, 23 Apr 2019 09:33:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5aOrk2BUl7nC2VwVZFWP3jBCzKx1XR7UFRDNE7Ir/LzRgSH/vCHxgFNPD+BcQA106J9CQ X-Received: by 2002:a62:6c6:: with SMTP id 189mr27556430pfg.36.1556037196535; Tue, 23 Apr 2019 09:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556037196; cv=none; d=google.com; s=arc-20160816; b=SHx7MAzGZoaF9HnxT7gzd4D/BY5bxJF54+g666p2E7AmA26hqsX7C50Rsy5cVSwEie Qc8ypAxwa4dqEFB2KlF7OwEEk7uFyTFistHV2xqQG+c3wzog9xQOEzs1faNg+Nz+1Zx9 9E+kLJTDQ4Jqy0o1/ftQQ0zLpTqUnTpcyg3ShTzyLHt4LiEOOcJkuYgjn0fS2bmwsnYC cEQKQOF57ZDUvrHDFEN6qReVBecr52Mb6pS4N0pjsntA/SHbEqao3xGaUvOw5mXEyt+y 62KECbvf2Fl1nKDLvWrYFG2Wej0oTI+Sn4MO2d0YVXdn5jrwH0VbsGiQOdSBI0se/Mxi ReRg== 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=VXr4BMEQitn0Xh8hTawXI2hov4BjYOR7PFOplS9+Ohkf0BHOaShotXW0FoxOPma3gX qGPAFCIl2O5JRmZrWGNmEWpHzBFdzR0mJnLBXnCbBbBxK79M6CFwn4yXZE1yrxO9VyLZ uhGbah1InBXVomHhMhgqDzvgQmIkcFsTHQObjJPX8/TZfQMtnR0esKSOkxj8Qk+kw56o 9FqDYfxiK7ovR8uS/09augeiihtLmRfP+HD+nhsbEZQlnU4KOFcetAc7XbogNxK1HEsB +YybbgYXAF99iWdswsDfF4ACj9XarUnRm09mgHk1dbQKol3X+bsqK56nqyYdjlpF3Ruj GTkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="MP9XJpD/"; 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 z2si14819644pgu.437.2019.04.23.09.33.01; Tue, 23 Apr 2019 09:33:16 -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="MP9XJpD/"; 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 S1728550AbfDWQbh (ORCPT + 99 others); Tue, 23 Apr 2019 12:31:37 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45640 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728497AbfDWQbb (ORCPT ); Tue, 23 Apr 2019 12:31:31 -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=MP9XJpD/YDBzhAaWL4T3dWWcc1 TPxn0IQP5ZtDi7WPcFcZFv5WwFUYahtTpxT7289UxxSBI6l9Iyl42Rm/9e0rs+uU1YymrfyH7z8Yv NsLEbkTbBin707y0toERTo5+I8BXuxN5I1F3MngkS/0XGC5v7INfjyC123nBirBr9tWBioJxo62Kx I5J4brPLZcirfF5tz/mK1mZ2tLW9W3zahmqrPCcW/NwijeAlhd35+cDe/EZYDBbjj3x74hnwcO6rn b23U81AyYKrUKyH4iCm73SUQP3/R2dtNDUQ0NepM7wB5qeXZvMzA32LMBhPpbh32ZKA/7aihMAnhQ tHbZ915g==; Received: from 213-225-37-80.nat.highway.a1.net ([213.225.37.80] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hIyKQ-00042x-E8; Tue, 23 Apr 2019 16:31:30 +0000 From: Christoph Hellwig To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/2] mm: stub out all of swapops.h for !CONFIG_MMU Date: Tue, 23 Apr 2019 18:30:59 +0200 Message-Id: <20190423163059.8820-3-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423163059.8820-1-hch@lst.de> References: <20190423163059.8820-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