From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56A21C433EF for ; Wed, 2 Feb 2022 07:37:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239045AbiBBHhx (ORCPT ); Wed, 2 Feb 2022 02:37:53 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:38776 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231256AbiBBHhw (ORCPT ); Wed, 2 Feb 2022 02:37:52 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4B02E6178D; Wed, 2 Feb 2022 07:37:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79825C004E1; Wed, 2 Feb 2022 07:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643787471; bh=7Zag7dWQmRrl03hXTb84l3LTObjja6xIUoq+LfZuQXk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ttC/UT8kEhBhnoU8XxjcM+p0HX+TJ8ZQD46rgIV95aQ62WZkyTz2SCPAD8aVNNPfd 4y7xCYEmK+ZfPA61pTFl/sPSnTMlkF55i7nwGo9tGjsiiFSX4wcyKiRELSf+Q8mlGJ owSoa28EIL1M7x8JHcOINTehR6vQlheRxUr7IIwBnFyiKIlr80xn1pY4O5KmIWJXDZ 8RyTbYPZQa42Joj4T5iGucj+EvoGd81De984eK0epLrIWjmbwgl7AIGdz0jrDL22GR kYFTRLX7vyfZKTO5TceTnUIfAy/CwPH7+hSedDh48ijxSe8XSXDgT31hzBzgiaXaTu 3wLM+EmzJYSTQ== Date: Wed, 2 Feb 2022 09:37:41 +0200 From: Mike Rapoport To: Christophe Leroy Cc: Anshuman Khandual , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Paul Mackerras , Catalin Marinas , "sparclinux@vger.kernel.org" , Andrew Morton , Will Deacon , "David S. Miller" , "linux-arm-kernel@lists.infradead.org" , Mike Kravetz Subject: Re: [PATCH] mm: Merge pte_mkhuge() call into arch_make_huge_pte() Message-ID: References: <1643780286-18798-1-git-send-email-anshuman.khandual@arm.com> <76605ef1-f2fe-8682-1eb7-2323f0b9bbaa@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <76605ef1-f2fe-8682-1eb7-2323f0b9bbaa@csgroup.eu> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 02, 2022 at 06:25:31AM +0000, Christophe Leroy wrote: > > > Le 02/02/2022 à 07:18, Mike Rapoport a écrit : > > On Wed, Feb 02, 2022 at 11:08:06AM +0530, Anshuman Khandual wrote: > >> Each call into pte_mkhuge() is invariably followed by arch_make_huge_pte(). > >> Instead arch_make_huge_pte() can accommodate pte_mkhuge() at the beginning. > >> This updates generic fallback stub for arch_make_huge_pte() and available > >> platforms definitions. This makes huge pte creation much cleaner and easier > >> to follow. > > > > Won't it break architectures that don't define arch_make_huge_pte()? > > It shouldn't, see below Right, overlooked that. > >> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h > >> index d1897a69c540..52c462390aee 100644 > >> --- a/include/linux/hugetlb.h > >> +++ b/include/linux/hugetlb.h > >> @@ -754,7 +754,7 @@ static inline void arch_clear_hugepage_flags(struct page *page) { } > >> static inline pte_t arch_make_huge_pte(pte_t entry, unsigned int shift, > >> vm_flags_t flags) > >> { > >> - return entry; > >> + return pte_mkhuge(entry); > >> } > >> #endif > >> -- Sincerely yours, Mike. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58F3CC433F5 for ; Wed, 2 Feb 2022 07:38:33 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JpYZH296kz3cPY for ; Wed, 2 Feb 2022 18:38:31 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ttC/UT8k; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:4641:c500::1; helo=dfw.source.kernel.org; envelope-from=rppt@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ttC/UT8k; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JpYYZ3JGvz30JB for ; Wed, 2 Feb 2022 18:37:54 +1100 (AEDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4526F6178B; Wed, 2 Feb 2022 07:37:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79825C004E1; Wed, 2 Feb 2022 07:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643787471; bh=7Zag7dWQmRrl03hXTb84l3LTObjja6xIUoq+LfZuQXk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ttC/UT8kEhBhnoU8XxjcM+p0HX+TJ8ZQD46rgIV95aQ62WZkyTz2SCPAD8aVNNPfd 4y7xCYEmK+ZfPA61pTFl/sPSnTMlkF55i7nwGo9tGjsiiFSX4wcyKiRELSf+Q8mlGJ owSoa28EIL1M7x8JHcOINTehR6vQlheRxUr7IIwBnFyiKIlr80xn1pY4O5KmIWJXDZ 8RyTbYPZQa42Joj4T5iGucj+EvoGd81De984eK0epLrIWjmbwgl7AIGdz0jrDL22GR kYFTRLX7vyfZKTO5TceTnUIfAy/CwPH7+hSedDh48ijxSe8XSXDgT31hzBzgiaXaTu 3wLM+EmzJYSTQ== Date: Wed, 2 Feb 2022 09:37:41 +0200 From: Mike Rapoport To: Christophe Leroy Subject: Re: [PATCH] mm: Merge pte_mkhuge() call into arch_make_huge_pte() Message-ID: References: <1643780286-18798-1-git-send-email-anshuman.khandual@arm.com> <76605ef1-f2fe-8682-1eb7-2323f0b9bbaa@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <76605ef1-f2fe-8682-1eb7-2323f0b9bbaa@csgroup.eu> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Will Deacon , Anshuman Khandual , Catalin Marinas , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Paul Mackerras , "sparclinux@vger.kernel.org" , Andrew Morton , "linuxppc-dev@lists.ozlabs.org" , "David S. Miller" , "linux-arm-kernel@lists.infradead.org" , Mike Kravetz Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, Feb 02, 2022 at 06:25:31AM +0000, Christophe Leroy wrote: > > > Le 02/02/2022 à 07:18, Mike Rapoport a écrit : > > On Wed, Feb 02, 2022 at 11:08:06AM +0530, Anshuman Khandual wrote: > >> Each call into pte_mkhuge() is invariably followed by arch_make_huge_pte(). > >> Instead arch_make_huge_pte() can accommodate pte_mkhuge() at the beginning. > >> This updates generic fallback stub for arch_make_huge_pte() and available > >> platforms definitions. This makes huge pte creation much cleaner and easier > >> to follow. > > > > Won't it break architectures that don't define arch_make_huge_pte()? > > It shouldn't, see below Right, overlooked that. > >> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h > >> index d1897a69c540..52c462390aee 100644 > >> --- a/include/linux/hugetlb.h > >> +++ b/include/linux/hugetlb.h > >> @@ -754,7 +754,7 @@ static inline void arch_clear_hugepage_flags(struct page *page) { } > >> static inline pte_t arch_make_huge_pte(pte_t entry, unsigned int shift, > >> vm_flags_t flags) > >> { > >> - return entry; > >> + return pte_mkhuge(entry); > >> } > >> #endif > >> -- Sincerely yours, Mike. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0EEDC433F5 for ; Wed, 2 Feb 2022 07:39:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LwVNVYyZbu/dATJyQJIHbFEhtuvZOEyN6B6unNBtnD8=; b=3YjoPdECYZqbf6 7Tfc4jhYrlvbJPJpE6DMDAwnOZZgzzZ4ASJsKw48TwTYwjUW+Rm5TNBx1oJdnMsSlnNXgG1f4Ztgo AuJ7XjJCog7jsvgGXNxLYUMNRQm2cXWJp8iQTHBuxeTq77gkdDn6gwGazC32IteoFHs2/lT/96Nxs jfYVFjFCxCTB1YHf6luORrpDjGT596VMGbX9ck9lkgWW5KubK+p15TWrzomuOS2hgo757pUZf64Cd qExTWPBmmcQVp5ygar+uv1CUNSYmVRD8yydHVDl/6V96PQe7ikrGflF+BAa4mzextL0/H9S0TGVWZ qyCvAbLpYs7dEoZou6kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFADD-00EQxU-Qy; Wed, 02 Feb 2022 07:37:55 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFADA-00EQwo-RK for linux-arm-kernel@lists.infradead.org; Wed, 02 Feb 2022 07:37:54 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4526F6178B; Wed, 2 Feb 2022 07:37:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79825C004E1; Wed, 2 Feb 2022 07:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643787471; bh=7Zag7dWQmRrl03hXTb84l3LTObjja6xIUoq+LfZuQXk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ttC/UT8kEhBhnoU8XxjcM+p0HX+TJ8ZQD46rgIV95aQ62WZkyTz2SCPAD8aVNNPfd 4y7xCYEmK+ZfPA61pTFl/sPSnTMlkF55i7nwGo9tGjsiiFSX4wcyKiRELSf+Q8mlGJ owSoa28EIL1M7x8JHcOINTehR6vQlheRxUr7IIwBnFyiKIlr80xn1pY4O5KmIWJXDZ 8RyTbYPZQa42Joj4T5iGucj+EvoGd81De984eK0epLrIWjmbwgl7AIGdz0jrDL22GR kYFTRLX7vyfZKTO5TceTnUIfAy/CwPH7+hSedDh48ijxSe8XSXDgT31hzBzgiaXaTu 3wLM+EmzJYSTQ== Date: Wed, 2 Feb 2022 09:37:41 +0200 From: Mike Rapoport To: Christophe Leroy Cc: Anshuman Khandual , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Paul Mackerras , Catalin Marinas , "sparclinux@vger.kernel.org" , Andrew Morton , Will Deacon , "David S. Miller" , "linux-arm-kernel@lists.infradead.org" , Mike Kravetz Subject: Re: [PATCH] mm: Merge pte_mkhuge() call into arch_make_huge_pte() Message-ID: References: <1643780286-18798-1-git-send-email-anshuman.khandual@arm.com> <76605ef1-f2fe-8682-1eb7-2323f0b9bbaa@csgroup.eu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <76605ef1-f2fe-8682-1eb7-2323f0b9bbaa@csgroup.eu> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220201_233752_973564_FB6C8021 X-CRM114-Status: GOOD ( 17.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 02, 2022 at 06:25:31AM +0000, Christophe Leroy wrote: > = > = > Le 02/02/2022 =E0 07:18, Mike Rapoport a =E9crit=A0: > > On Wed, Feb 02, 2022 at 11:08:06AM +0530, Anshuman Khandual wrote: > >> Each call into pte_mkhuge() is invariably followed by arch_make_huge_p= te(). > >> Instead arch_make_huge_pte() can accommodate pte_mkhuge() at the begin= ning. > >> This updates generic fallback stub for arch_make_huge_pte() and availa= ble > >> platforms definitions. This makes huge pte creation much cleaner and e= asier > >> to follow. > > = > > Won't it break architectures that don't define arch_make_huge_pte()? > = > It shouldn't, see below Right, overlooked that. = > >> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h > >> index d1897a69c540..52c462390aee 100644 > >> --- a/include/linux/hugetlb.h > >> +++ b/include/linux/hugetlb.h > >> @@ -754,7 +754,7 @@ static inline void arch_clear_hugepage_flags(struc= t page *page) { } > >> static inline pte_t arch_make_huge_pte(pte_t entry, unsigned int shi= ft, > >> vm_flags_t flags) > >> { > >> - return entry; > >> + return pte_mkhuge(entry); > >> } > >> #endif > >> = -- = Sincerely yours, Mike. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel