Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4233214ybi; Tue, 11 Jun 2019 03:16:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGkFcueO5JYYpiECbcAi5VOj3/EIuNa5mSRDqpKI/dKghmIFsWmXJDOv9Tpvci6Nl4ujs5 X-Received: by 2002:a17:902:6a4:: with SMTP id 33mr73805931plh.338.1560248174949; Tue, 11 Jun 2019 03:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560248174; cv=none; d=google.com; s=arc-20160816; b=ZFhlZg6MRj2W1gdpB5DDyJLa+ea0FK9BSXihS9HKf/2ABM11TdWaZlNV5N8lTjMsAi BrMJBUQLRE/WuJWfc/1ewxSjvIRTZUCblLHcZBHnilFR144rcJdydRTZKdLPtlrtzTXp 89DaAqxAwV7eExuU+Ckkv8PwYt39L69ty0kLFhdbd8M82RtYB7bjBcdhCtgt2GKYb6ur X4NjqJi2cCDUwt8hWZ5xJ3yqt0GDrTc4bLm9PoxJmA1kkvdHcZJ3fLikC/5OhSEqgSas +J1O/1WHF53hUQxZ/bvr+cUGE/KeHxDJFj+hBASzJVUpEpfHpXlkJfi6JkkF1DSGEEca 3lhg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=iOF1SAPRBnEPEbZ+SxJke6JWECYMQk69+WplrF3r10Q=; b=NtYinQhbSQ6u+dAuSht/GdJs07MJA5w56LeiEWJxqsAAh4HV9DenOY5Ls4Cx9vFkgE XpIQu5QP7UeXB6t8Y/ieHBPGZV6yX1cQUMeYBwRqYnCxCkQQsWiqkyHYjJF1+Uv/Ygmw MfqdfWwoNn8YrumC7pedhCcM3TISMhhDfkjCYtqEXMCpnl7IxZTRLdMWcBG2oWdiyiWW QzzMYp6R2UBURxah9nzDBQb+iEJCpESm7LkbmK+haG4daIk+3sELwGAGK/JQsvGlMlUi xjFBrci+xrayQlTXGLtO1rCsyuomebyzvLJIkSaSNi4BfCmYQz/DUGDTlQsbGLWT3ZSP YfdA== 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 g145si12759580pfb.173.2019.06.11.03.15.59; Tue, 11 Jun 2019 03:16:14 -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 S2405258AbfFKKPr (ORCPT + 99 others); Tue, 11 Jun 2019 06:15:47 -0400 Received: from foss.arm.com ([217.140.110.172]:57630 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404521AbfFKKPr (ORCPT ); Tue, 11 Jun 2019 06:15:47 -0400 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 Cc: Damien Le Moal , linux-riscv@lists.infradead.org, uclinux-dev@uclinux.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org 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-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 */ >