Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp89731ybp; Tue, 8 Oct 2019 14:34:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyr6ZdoWsQXg3nB+6QUUapXKifu5CrpRI7OWDq3p6o4Aa/UIhxSHIJdRhVwo2w+uQFkkCz X-Received: by 2002:a17:906:164d:: with SMTP id n13mr30860970ejd.75.1570570477495; Tue, 08 Oct 2019 14:34:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570570477; cv=none; d=google.com; s=arc-20160816; b=HintAKyLzwR85PR0BgWj6MS4eYHvNPAfL7v/+1axJt7ahHFzFImVoNirUexH0uspbh S1ueSf2VgoGZ09WI7SEY8xxoC+E8c8n1tsva8leifv5iE6xe5yYw2fqdLf1dCzeXlcZp zwRvi/X1BoTwh29Av3moc5U2qoOcbC/6oZ84xfOKRTZQE+Avd4AiKxEfmVEEmHboslPh j/52TVd8GjwEuluMC1mOqcVQjUObhfKS7tXps1GCTb04UGDueAXF2SXrzIDQ8SVj3nss MF7kc1XwOEKrkhtIC8WVxyjwMbqqim58nDaax7Q8tB50HOSnJ+a3Y9NY7B/GePNro3hH Hrxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=ZuBgbJzoXltmhH0lNq67zyda70EYzZtMbVg27O16d4E=; b=ijI6S8Ls2Ia1zG5Dud706o2K/PBc0Bwl5XyAV5c5EWpbKiQZKGxQQotHynjNAIZzpZ MQ86CPhQ/wD0CaajDQ5NBKzwQ0Uu65ZtceF6SffxLa7LzC4+A8SApvl70wSVNp5NV54v jpyQ1HXXfnHJCS+SoniLVwfqBHJFt/FLvdIJClgGA8d4pwZoAWZY94r2RE1KPI5gspYZ AZ4pHbcPF0VIJGr/uAeOYEvFaYiFKEUBvC22tjeZqz1YWJYBU/4FJudzNeKisE8xpCKI YReYqCYcNSYj1wIcSLFi5VLIAWYtJVbpQu72wC+WQoWQJHO1+JGsT/23IhBKhsxIYRsd b1HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=hsox7f1O; 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 l6si199418edc.67.2019.10.08.14.34.13; Tue, 08 Oct 2019 14:34:37 -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=pass header.i=@sifive.com header.s=google header.b=hsox7f1O; 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 S1729854AbfJHVd5 (ORCPT + 99 others); Tue, 8 Oct 2019 17:33:57 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:34047 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726349AbfJHVd5 (ORCPT ); Tue, 8 Oct 2019 17:33:57 -0400 Received: by mail-io1-f65.google.com with SMTP id q1so351156ion.1 for ; Tue, 08 Oct 2019 14:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=ZuBgbJzoXltmhH0lNq67zyda70EYzZtMbVg27O16d4E=; b=hsox7f1O1JhOkCIRKYbrxjgajBPsOSDqi7B1Lgvugxaamtq9i8nHkkuJBUx+fuqpmy BAak+i52MGnX+KzvK730xUE8OgRGhRjWhnGkFA0okRMkJZ8lV6Q62WhiPg+6n0vFgHbL VCEAwKUPWz0rPth4e7crkTcSlit2voXqJ0ejpl9sJAU7dNLLjT4gqcHH0rIgjJllHUEy PhH3RYFcBRHAIgaKfDAF6XcaX/IvuwtFwRKYJ3kZi33kqKQ1pMfAy1jUs6Wj0FZ/F1G3 kGyRJLvuLqMwxBTP7vx/7G4QtZd9roGDtY1NKikyRwzKqH8JMU5sTbhDnrBfv3XSNB4G +aQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=ZuBgbJzoXltmhH0lNq67zyda70EYzZtMbVg27O16d4E=; b=hn2fE4ryMfoLy65aGX3OBkA/+BFDZbFfEehy1nFiLOLE84o2peK5Y/HELFCI7ciG0E fnCETtU/h/yzfLsp35LY6CkSPQ2LbFKHQvvL03jwl6on388hWU6DrwCOlTjCnKqq8kzu tcc6Voqa3c3jMKWJI/b5Stk/F48fpPZF0eaTExGzHEBWUjoEM0zTdeoHZ2znN2w8TYlb lizOHT4k9O3OKBztC413oSNGGGyeoBIOwyB7oKcC4rig+hAFoB4+f71JmNSDs8zMO1nN vx0EHwkdTJRzgZ7zmRLUO9b9bbYDeNfugmoSeSGfgaGal6eds5ueYJh2WyN1lDtVmXsQ WLzw== X-Gm-Message-State: APjAAAWqOCalDKFHSPNkAwoip8db6DU6m8q6fpELhAKUKPYdbgaeRRDF +00gsjThPJUf/JzeOLd5s6Xp+Q== X-Received: by 2002:a6b:c701:: with SMTP id x1mr331218iof.162.1570570436145; Tue, 08 Oct 2019 14:33:56 -0700 (PDT) Received: from localhost ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id c8sm107904iol.57.2019.10.08.14.33.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2019 14:33:55 -0700 (PDT) Date: Tue, 8 Oct 2019 14:33:48 -0700 (PDT) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Steven Price , alex@ghiti.fr cc: linux-mm@kvack.org, Mark Rutland , Peter Zijlstra , Catalin Marinas , Dave Hansen , "H. Peter Anvin" , linux-riscv@lists.infradead.org, Will Deacon , "Liang, Kan" , x86@kernel.org, Ingo Molnar , Palmer Dabbelt , Albert Ou , Arnd Bergmann , =?ISO-8859-15?Q?J=E9r=F4me_Glisse?= , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , linux-kernel@vger.kernel.org, James Morse , Andrew Morton Subject: Re: [PATCH v11 07/22] riscv: mm: Add p?d_leaf() definitions In-Reply-To: <20191007153822.16518-8-steven.price@arm.com> Message-ID: References: <20191007153822.16518-1-steven.price@arm.com> <20191007153822.16518-8-steven.price@arm.com> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 7 Oct 2019, Steven Price wrote: > walk_page_range() is going to be allowed to walk page tables other than > those of user space. For this it needs to know when it has reached a > 'leaf' entry in the page tables. This information is provided by the > p?d_leaf() functions/macros. > > For riscv a page is a leaf page when it has a read, write or execute bit > set on it. > > CC: Palmer Dabbelt > CC: Albert Ou > CC: linux-riscv@lists.infradead.org > Signed-off-by: Steven Price Acked-by: Paul Walmsley # for arch/riscv Alex has a good point, but probably the right thing to do is to replace the contents of the arch/riscv/mm/hugetlbpage.c p{u,m}d_huge() functions with calls to Steven's new static inline functions. - Paul