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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CED2C04FFE for ; Mon, 20 May 2024 17:42:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B204C6B0088; Mon, 20 May 2024 13:42:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AD0C36B0089; Mon, 20 May 2024 13:42:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 997F26B008A; Mon, 20 May 2024 13:42:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 7B5B86B0088 for ; Mon, 20 May 2024 13:42:32 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 1B787160E7A for ; Mon, 20 May 2024 17:42:32 +0000 (UTC) X-FDA: 82139493744.01.55DA025 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf09.hostedemail.com (Postfix) with ESMTP id 01A14140011 for ; Mon, 20 May 2024 17:42:29 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf09.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=osalvador@suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1716226950; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ekx6mIgPMSQjLTm5ihEn9mI3NNMiCczQusfDLvJGhNQ=; b=iwRckcBVE6/qTo2dnREuBQer1tn00ZFl2X8R/9c0p30x0/Q3ZVoevhgPTJLPBOXGMu/wj4 q9rZmx8t0/VGxKkksUFHqPE2zk8KKxU8Xxrfn31cXb9IIgolekv+D+zONNv6iX6OdVC03j S8pfYIW1JpiesTdazXq4fAqHOYNflk0= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf09.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=osalvador@suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1716226950; a=rsa-sha256; cv=none; b=kQH1dgHR6vvd+aYkU8ui/0KjEYnZhBw7j7txM7epZpfqUJ8RY7bhsBYSYyvRuemTFvqHuj O+dyP8VFRuu1czSdpJ556vDi1uhtpSh1GWqUUqCaKfTAAzdg490l8S0DO3OAqRaiyAEw6E h4ZIIOnTN+4mQeu42cOYe/rLK5VnRno= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2BE0E33DAC; Mon, 20 May 2024 17:42:28 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A1DC513A6B; Mon, 20 May 2024 17:42:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 3RedJIOLS2ZhUwAAD6G6ig (envelope-from ); Mon, 20 May 2024 17:42:27 +0000 Date: Mon, 20 May 2024 19:42:26 +0200 From: Oscar Salvador To: Christophe Leroy Cc: Michael Ellerman , Andrew Morton , Jason Gunthorpe , Peter Xu , Nicholas Piggin , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "linuxppc-dev@lists.ozlabs.org" Subject: Re: [RFC PATCH v2 06/20] powerpc/8xx: Fix size given to set_huge_pte_at() Message-ID: References: <04f4e737608ea0b177b88057db138fbf0d6ab138.1715971869.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 01A14140011 X-Stat-Signature: 11f9c168zbfihpnhrpr688zitiiwzt8t X-HE-Tag: 1716226949-597586 X-HE-Meta: U2FsdGVkX1/2cjYv5kmFau9kzTacajxjsRX3lIFVxhhcPRvy+oGP75RD9u798brJzUqkyNUXRiwEImht13vSD/P9QutGpWmfvHVTUnD60glh2Jaa9txYDjI8YasfmMwFlROGqw1bVo49g7SC7nuPRKU+lDGxX8D7jn+Do2TxbdQdUmzwnRp6WnDHeyfzwu5hHBovEF+CkdoGkC0b8P0t9m2kxJXrvNb8XLFYRvmmx78IuLfri/J6lWcZYJPh7PtDqp1XSKJ6Hw7r8fBs3ibG/igXtRndtZg0boh7HC5wlM4Y97lXqW+JnFEPBMWhy0MCvq7nvU0erOCNF2abHFy96M+74eM03to4cYC9HcpwkWnM7a7ZK0tSdFAxSfUXp+0QNj7N3POwLiH+Tt+hIJVcKi9Lbqv0tk9wJwlfHy29fRAdxESePeZH2IyS7bYLpcrNZ7QBbqIMZ6mlBz0Z52VIwVM4sM4IyTYZYprvzfhGBdvJ8zCmiV9lwDXSX9R9Q+wq5quKwPD8/HA5ahdjFnuLhgTOvY810K1wSOUnaJLJl9UeGq+eSGFdkuonvfxUiHNyuveKzzutY3GJdUCkHh4+7m23tv+uwqZfNRe4I4KwJ/zzgVQZdWmhULG9+h5ZuynpSO3Sa6D4K+4U8Avt1Sb9oCCnxDnp8X6ApF16muIgiQFblhRxp0yRNF4mA1QB5PSw4d0Bj3qei9f+jok/vZf7AYw29BTddWZLXMG6GFBc675SSkY6fOv7hI9XRIJwy4HgprLWISF+QB5+pESNVZZ8+NxT6jyPpAXkZrnW8GxnBWcz00Qkp6ftypIIxhOJnfVpO7YgBD+9VizKAOugKyRp1jxN5c6t1W3XvJWf/H1YxKLriQG+gl+rwdnRJmKNfvPCzMGnw66HqOvNPmWrcCl7tIuNg3hIv5UgBLAmSZPrDFED9EhZ8BWJHRuLfsuc/CdLZyMhQ9Zkdo7kPVGSez5 B3bQ7wiZ B8dNt3LpnOfDpu8+S5O2XcP9ZIzZCW3hEage20GQW2pPNWbpcgtTTRZucT+LZrbXmCTFGUHg+skGSG7rA74ZHKu7XEwXCAkqVU75B7mn0cTiSNzk/az5dkcAB55dRrVt5589QdHyAA49Qft3MRE8tABAbIlldMx3GAMQYP0P0rwANnsy6Hib+zAiyPajXtzv6ynVD7siIhFxn65E= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Mon, May 20, 2024 at 04:31:39PM +0000, Christophe Leroy wrote: > Hi Oscar, hi Michael, > > Le 20/05/2024 à 11:14, Oscar Salvador a écrit : > > On Fri, May 17, 2024 at 09:00:00PM +0200, Christophe Leroy wrote: > >> set_huge_pte_at() expects the real page size, not the psize which is > > > > "expects the size of the huge page" sounds bettter? > > Parameter 'pzize' already provides the size of the hugepage, but not in > the way set_huge_pte_at() expects it. > > psize has one of the values defined by MMU_PAGE_XXX macros defined in > arch/powerpc/include/asm/mmu.h while set_huge_pte_at() expects the size > as a value. Yes, psize is an index, which is not a size by itself but used to get mmu_psize_def.shift to see the actual size, I guess. This is why I thought that being explicit about "expects the size of the huge page" was better. But no strong feelings here. -- Oscar Salvador SUSE Labs