Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2611574lqo; Mon, 20 May 2024 10:42:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCdNAsafddkN6MwzhrjokLVor7F6jaAuExc9sgOHdGXrduSJBf1s6bPueCHubSilUAoTHJUHCPR4uT0O/g1P8vb8tbptU3r6N9PJpMaA== X-Google-Smtp-Source: AGHT+IHfSscwDLCGctGQUjwb3bY8vtsYRdxRJC4/4ae9V1QwWqfT4eDVCc0NGqRmjWKxNQ9rTML4 X-Received: by 2002:a05:6a20:de95:b0:1a6:b689:8c29 with SMTP id adf61e73a8af0-1afde225151mr26929334637.61.1716226962561; Mon, 20 May 2024 10:42:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716226962; cv=pass; d=google.com; s=arc-20160816; b=OWFzsvJme9aeFc3u6CU/W6L2XXqB6X/FTajkgx8cpzP/FVuDyvSUKW2IyGwhfBLCw2 lKod70dIP4TmfJmwboP3T7m8wvjVGMEnxJeNsuWGl942vCz/V4s3LoEBtP6/XUF9RYuO symun1AtHKiaYf0u/tSHxvQcEjBOqrpk4DZagFAPyN3M/Bg92v6qQB5pdv4LW6M2mmoi oUw9oE+bWJs0/nWwdVE+BLPEJUQqAa/oxc5I4tSZYztxCiuT25Gnujgq8cCJJrMuItXv z1XN2xNZw4MQZC+Y+No6LDk28i5Jm7enmnejqDe7yMp+p+Bs1SLn7uF+dFGBzbScO1Vi ey1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=Ekx6mIgPMSQjLTm5ihEn9mI3NNMiCczQusfDLvJGhNQ=; fh=3a4DJ3waVmnIqLtXCr440QV3HHwIdKSCPB2emOqXFnk=; b=QdVNgkV1OghyATTpBqiYpYPi2rsrsvhrUm2Q/505q4aYVu9ny1H5wGm7/hfuCRet6k J1Stci9vNi3BSwicuxGC5RlLk+OR/veAgK335lk8aaWoZxBm8otiC2hvb9v/LaIxOWxT nkzdrNe8nNlSFzl4yNBkt7VxdLqb+xcSmbaiMAjLHLDJI+G7WFSumyxeb/Tzg+XsONxi SX3TaK76Kgq5GsB5ze32Gnye9xQAtTVIUF1FVFqU9PclgT2z10Nf9QG0i9+76oe3Olai /Ps43bhpdfH3PaEzbqj1DCLFOIr2FIjtJYZnjA7lJhe/b5xYxSmV45+1Cdrp3CcAm7PU 67BA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-184022-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184022-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-66cbde8ad3esi684862a12.740.2024.05.20.10.42.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 10:42:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184022-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-184022-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184022-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id F09D7B2175D for ; Mon, 20 May 2024 17:42:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 106F0137C44; Mon, 20 May 2024 17:42:32 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DAEFA2D for ; Mon, 20 May 2024 17:42:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716226951; cv=none; b=twcQNwJJiZgRE1ttH3HCnxDke3Ev2liEzsMiq1xFYF271Cf036yaBJA7/+rm6LXD+7kKiA8fy42/QUcuvmG619+dq5bJZ0iDnyJkMKMHKPsI7DTvWHlLG5aZqqDW3xc2ZbnKiPhaxWDUFhNEduPRNzFNjVqpBpGvmlwdmh31ito= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716226951; c=relaxed/simple; bh=/mXDHW8VJpO6vlz6465Ksuoe/MWBFR43n1hirMX43fs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Zvplo0fo3djQrE1XqGACIdw8sFmpDNe0I9ow/EvZFKwGGx4JNs9OJ0reuSzFtln5HxC9ynjzNRVMhg1gaDN51RUT/jdNPcnWMwb3PMFDAFpfJec0g8iOWiQgZSxKu5dL4MSFXnF1lOa3ZEwrGqL2sdsBKy7YVhkleGljSzp1daU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de 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) Authentication-Results: smtp-out1.suse.de; none 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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-Spam-Level: X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Flag: NO X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 2BE0E33DAC X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action 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