Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp754792ybi; Fri, 14 Jun 2019 02:50:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMF7aAJ/YQxmFgAveMHjJbNdMaSxLB9L2MsC8h851+SFs4UL1SmmMFisV61IwmGN/LNoA8 X-Received: by 2002:a62:834d:: with SMTP id h74mr53960372pfe.254.1560505805551; Fri, 14 Jun 2019 02:50:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560505805; cv=none; d=google.com; s=arc-20160816; b=koSokBFlUDlxUNfIOktnAxzqgLw5XYrovo3mAIFHzHRPNim6zG65GDeJz2KXVR6cqr 03l9NfjdWfjvOKIAf9T29w6UJ/5AAEp1XhCg5iyOcnoO0kvOJ1SI1vZqPhcAl28dI4F7 qBzJIm/5ubaVzraUnQuCVoqsCrd2R5FlIqgOtWYxHREpCj65RNLDN5o0IVgZZSQU8RMJ U6pgYwWdGA7V8h2RHCG5PzeiElan2tt4r6ByxiEg4uKRxSu4DPp4ilRUfJcikT9Xk0JK oGXkQeG9WmIKzjSTPQ/dcJ/PUA2DB8j1Srti1gfnO/awAYf+B0SbbmhTRnjCwNWlGgnI UXHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BqMmcda2UhZJdwcOwUCwLTwklaJVU7iFg6alpTOEc5c=; b=q6a8f6tQtYGxhvH94DLIgvlIBeaQFVaSYpzcllc/DFyMuZ93Nb+PzDymBGOX0KN7Fx ecxf0rkSlzwkEgpdbwNvRN4dy37gLc2E12eyPooiuORYiyDHvl229qmVvxfiIhLhYCbz Wa0822Zd+HWNUozNoTYhXzJvJf9dj3h7G21fCwUpl+mkCjxb50OyFUxnNQY90iVwrFqB NaR5KtcsKBI8qjcQf+b17MEQxSl51Oxhr87+Vrj5ZHzdr29/y9Eys574HVtzhXLTYBbK l09G4mgzu7z4+kUttf4sILNoVuWRBZOyuU8SPAI6hOL0Z7HhseBo4OHM4gGgZx3mNl0A p3GQ== 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 cd16si1847136plb.72.2019.06.14.02.49.50; Fri, 14 Jun 2019 02:50:05 -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 S1727300AbfFNJtR (ORCPT + 99 others); Fri, 14 Jun 2019 05:49:17 -0400 Received: from verein.lst.de ([213.95.11.211]:45603 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbfFNJtQ (ORCPT ); Fri, 14 Jun 2019 05:49:16 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 8158F227A86; Fri, 14 Jun 2019 11:48:48 +0200 (CEST) Date: Fri, 14 Jun 2019 11:48:47 +0200 From: Christoph Hellwig To: Vladimir Murzin Cc: Christoph Hellwig , Palmer Dabbelt , Damien Le Moal , linux-riscv@lists.infradead.org, uclinux-dev@uclinux.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/17] mm: stub out all of swapops.h for !CONFIG_MMU Message-ID: <20190614094847.GI17292@lst.de> References: <20190610221621.10938-1-hch@lst.de> <20190610221621.10938-3-hch@lst.de> <516c8def-22db-027c-873d-a943454e33af@arm.com> <20190611141841.GA29151@lst.de> <80d01a1d-b6b0-18e8-811c-71af14cba3b9@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <80d01a1d-b6b0-18e8-811c-71af14cba3b9@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 11, 2019 at 03:36:53PM +0100, Vladimir Murzin wrote: > It looks like NOMMU ports tend to define those. For ARM they are: > > #define __swp_type(x) (0) > #define __swp_offset(x) (0) > #define __swp_entry(typ,off) ((swp_entry_t) { ((typ) | ((off) << 7)) }) > #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) > #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) > > Anyway, I have no strong opinion on which is better :) It just seems a lot easier to stub out swapops.h rather than providing stubs in each arch so that inlines which we are never going to use can build. I can look into dropping this from the other nommu ports for the next merge window, though.