Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1844052lqb; Sun, 26 May 2024 21:53:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUkI07Zj6Kch19HRHUDI3UQ3XiPbIMpdMoTED22ovoZTO7wgL+cE/X8fnG80Wx8MalIaGYHQrWQNfY81CyD6ZMfQmJcFwQP3978CzNcKw== X-Google-Smtp-Source: AGHT+IFasHFOahZ31gHVLYsHgbgu1KXwk49Z6LrJ9xbmkqS8q8jYQK7GB+qV6stxOuooFBicvP3/ X-Received: by 2002:a17:906:640a:b0:a59:bae0:b12f with SMTP id a640c23a62f3a-a6264f162b5mr530055466b.57.1716785584686; Sun, 26 May 2024 21:53:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716785584; cv=pass; d=google.com; s=arc-20160816; b=TT+qIj0D+/1yuc3Ynda8X+cQ7b0vc0LFuqNkE4Oga8iWDt7Fe9Ete6BLf6hJ5xDm+B c6DUkh1rt52CRPyCxna/3S6EZgZ1SS7sl8CpEwqroz9KA9ehezlR2qTml2h+mOkLIhBE zEo+KyNDHq4pu26TLY6sW/mjgevNn7kUU3QgApqd1jMxRDbIZe8hL1N6CiUlOMTp6DrY doiZ1xgN2n390tbaiOe/dJNfKzSQ8o3MDULC/RGFA1FpVQGN0I1qD0zqPCWb/Pq6swtP zYEg4PtCyhYcFWqhgetVfWdOukt8maeaIHPitBWu7MKxYNGrJeT4LtKaPyIuWPMOi1cn 0CNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=q7vYNtWXHN0koVdw3jOnpPUhzKwJD0gqc9GMNDmYMko=; fh=7FqQY95/6dNosXCjFkEopk0YDb4YCNocz5tbx4U0IiY=; b=Z/AKwokeVk6Bo4WtcDnVezHXAJBmaFz4M+MBcnCOF021DUiorDCClghLQwN2j0lGZ/ nIiiEcs9YSjXnpXnZQM4oo4z9p/FxG5MtFvDZelOhKu6/pML9zi4OO4H+60AR3w6YBTt UO+kG6ktO51o6bzxobmQxNLNRE3lN8E0ci1jNCJlkCSqQcuuhlX0A9dz0IZuobaSiFA4 tAVtMWtQxn6YSKH3Ut6n6TFjxcnHcR2Ke1OvS4cn3VGqTOV/RQqLDwokL8cbEGlxztOT SoI4/46HwpuD/lImvKdavpRok1RB5x5pDCDK4MTznpf/VFYI0Bz2w4HUxYSXggCVJkHn x+/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=TPmoAr1l; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=TPmoAr1l; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-190029-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190029-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a62bebe7e84si194745766b.289.2024.05.26.21.53.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 21:53:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190029-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=TPmoAr1l; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=TPmoAr1l; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-190029-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190029-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 am.mirrors.kernel.org (Postfix) with ESMTPS id 698621F213D3 for ; Mon, 27 May 2024 04:53:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5579BD50F; Mon, 27 May 2024 04:52:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="TPmoAr1l"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Scjl48Op"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="TPmoAr1l"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Scjl48Op" 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 EAD6879F6 for ; Mon, 27 May 2024 04:52:53 +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=1716785575; cv=none; b=TGnQzy4h58XzhVyFOf7pZKlGwS/zRLPA6s3zEg5zwFxwpBvmrXakAy1/loA0GELWV2esTejy2EYkLU2oyWCF0za33TJ+wayslmcdRwaBSrUDk99bSSkCCwVfqAr7AlGEtNkUnfm7Zph0KrfWxUwiyXAGzU6qMGL2Th7QceCnozY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716785575; c=relaxed/simple; bh=trA99P4Lpp/M25QZgj3714Wgbnap79vY/GMoCj32Ml0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lZE/yNicf70eFgOsTNsguzT2wlHnZvJ8PR3uUa/3BwHyrWqwUz5g95wO6PhD1gjXDppMOpOLx4Mdx0RH2H0HCZtqPi6AUrn44U5jPOYqmwPEF/fw0O2qO7M169xh2121bqQXos6I3FkFQPxKToIBWOBULOybwIqzDWVeDXs9XxE= 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; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=TPmoAr1l; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Scjl48Op; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=TPmoAr1l; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Scjl48Op; 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 (unknown [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 08E9221C1A; Mon, 27 May 2024 04:52:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1716785572; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q7vYNtWXHN0koVdw3jOnpPUhzKwJD0gqc9GMNDmYMko=; b=TPmoAr1lDAbCuGfjGQ25qRi+zi53ga379HbEw0aCCymei9yBEPcYHUdypqr8Ab/nvFbv7e ImZZowl2gG+o9RcUWIRHmMnfTzk3EowJlf97dYga/plmFw9q+06uhC3BG2mJ7mhnPXWXzx LC1tU38b/9UF7lqAoz/BIaW7Y2R4ksI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1716785572; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q7vYNtWXHN0koVdw3jOnpPUhzKwJD0gqc9GMNDmYMko=; b=Scjl48OpI2hWkaKl8/2sLYSiB1b27PD+WTh54BW9jwOAoBCou9NuPc4fyRzPe/wH0cW2sP Td7UF6+/HvUuPsAg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1716785572; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q7vYNtWXHN0koVdw3jOnpPUhzKwJD0gqc9GMNDmYMko=; b=TPmoAr1lDAbCuGfjGQ25qRi+zi53ga379HbEw0aCCymei9yBEPcYHUdypqr8Ab/nvFbv7e ImZZowl2gG+o9RcUWIRHmMnfTzk3EowJlf97dYga/plmFw9q+06uhC3BG2mJ7mhnPXWXzx LC1tU38b/9UF7lqAoz/BIaW7Y2R4ksI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1716785572; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q7vYNtWXHN0koVdw3jOnpPUhzKwJD0gqc9GMNDmYMko=; b=Scjl48OpI2hWkaKl8/2sLYSiB1b27PD+WTh54BW9jwOAoBCou9NuPc4fyRzPe/wH0cW2sP Td7UF6+/HvUuPsAg== 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 71D9F13A6B; Mon, 27 May 2024 04:52:51 +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 OupCGaMRVGaZOQAAD6G6ig (envelope-from ); Mon, 27 May 2024 04:52:51 +0000 Date: Mon, 27 May 2024 06:52:45 +0200 From: Oscar Salvador To: Christophe Leroy Cc: Andrew Morton , Jason Gunthorpe , Peter Xu , Michael Ellerman , Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [RFC PATCH v3 02/16] mm: Define __pte_leaf_size() to also take a PMD entry Message-ID: References: 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=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Level: X-Spamd-Result: default: False [-8.30 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.976]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_SEVEN(0.00)[9]; MISSING_XM_UA(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[linux-foundation.org,nvidia.com,redhat.com,ellerman.id.au,gmail.com,vger.kernel.org,kvack.org,lists.ozlabs.org]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email] X-Spam-Score: -8.30 X-Spam-Flag: NO On Sun, May 26, 2024 at 11:22:22AM +0200, Christophe Leroy wrote: > On powerpc 8xx, when a page is 8M size, the information is in the PMD > entry. So allow architectures to provide __pte_leaf_size() instead of > pte_leaf_size() and provide the PMD entry to that function. > > When __pte_leaf_size() is not defined, define it as a pte_leaf_size() > so that architectures not interested in the PMD arguments are not > impacted. > > Only define a default pte_leaf_size() when __pte_leaf_size() is not > defined to make sure nobody adds new calls to pte_leaf_size() in the > core. > > Signed-off-by: Christophe Leroy thanks, this looks much cleaner. Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE Labs