Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3707264ybi; Mon, 10 Jun 2019 15:19:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3HpE+usyNml9MO2ADbgzzuSm6xb324k4x1GwS4mxtB7Erv3fSYBfeFPkcEOm2m7qUX//j X-Received: by 2002:a17:90a:9a95:: with SMTP id e21mr22755451pjp.98.1560205147598; Mon, 10 Jun 2019 15:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560205147; cv=none; d=google.com; s=arc-20160816; b=FAtwMlctFrZyIRrnEH1y0cdp7NGQhyxQzXRebc1wlWOo6NapmeCbCmD80QsVSiUZKn o9CTB3C1GhqrhLjnct0BlTgPcyaMTr3laYutydN0Bk/UwJojCrhHFJe8ry9oMkMfVZYI X2ioKsnPEgefLe2Q7TuZrOprIL/6Cy48MXSd99meeu4HGLYptPoI2UrhmPunu62nJZgu qWbDiycFeVaIqvx0dCKeI/II43CRkk2tKBaIhvE4JNe9U14c9MdVGwMR32gWWXr/nlU6 cfAgbK9NA7xaD8B8nq9Lo1iVBsVggSDmVzSuZz8SQLylLM9E1NagwV/GQ7cvg72LgnFK TWsg== 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=L7PEx8dlQ3VtzTq1UPFHe5sqDn0wvHGqW5F5fqRYWKxrLWyv5v/PFpALTqdjU2kiJY PBZUEUFV3hJuYMjA/ztnnPbT1FFuF+zBE8FtetjSW5RJUKOANaSs6+jwarThi5gn4fXM Ak5mhwA44PW0QGLlZ0LOt8urYkCcgRsppaJ9XGtqiIUHchwga7Mo379+lmfbI97N+guM kjYM8nwXN0THgEnxgpjoZB46sqyoDNfRliy2K5FXmEjgWFq4/pE+/c52irCWw7htKe2E q3hwwOZ7HXw4CQO35+vIXoXL3hWh9XVFZlUFWnxy/0ZN092eadpq6L/q3DuveygwCJgD 4nlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=WoT5qfZO; 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 t4si11018067pfh.261.2019.06.10.15.18.52; Mon, 10 Jun 2019 15:19:07 -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=WoT5qfZO; 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 S2390152AbfFJWQc (ORCPT + 99 others); Mon, 10 Jun 2019 18:16:32 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:52846 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389989AbfFJWQb (ORCPT ); Mon, 10 Jun 2019 18:16: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=WoT5qfZOaCdlI5cjodJO96MTUa 0x0FTUYOBpRsHYygY/XLRcYru1xwfiTUOH/aiIMRbNiEB0rWP1GO4Xk2gH/26HqDQe+j2Ybm6u/Rv hupkRFH69Ysbq0FC3igQAwsbpJU618sqwSYdNRkyNM58whYGLdOuZJih7LYrSSzsRQCkMlyedKmp1 ApZeHTypJnTEPZDUphxKWpF2bD7O6bBM0bMcDdsTblUbbiQq7uHikPzv7wXg0izoJxUurD2y92zv1 LM0WfD9mxU80dyyv93OBxyEnVWpfoleq8QXyRkJoWLd4bGvAAP2qR00MhSEMk9xXdbgybODC2RYFM ypkZtJVA==; Received: from 089144193064.atnat0002.highway.a1.net ([89.144.193.64] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1haSaa-0002mM-Ql; Mon, 10 Jun 2019 22:16:29 +0000 From: Christoph Hellwig To: Palmer Dabbelt Cc: Damien Le Moal , linux-riscv@lists.infradead.org, uclinux-dev@uclinux.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: Tue, 11 Jun 2019 00:16:06 +0200 Message-Id: <20190610221621.10938-3-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190610221621.10938-1-hch@lst.de> References: <20190610221621.10938-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