Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2415348lqb; Mon, 27 May 2024 21:12:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXgaAnbwUvhSVL21pQhLt4AYON4Ww2a3kgKSWYbXdrCgTYYQCr2rxAOGXBg8sIlnSWlJh0x74SL1wGuSdugXf48g5J0oZ3eYna5ahpaMg== X-Google-Smtp-Source: AGHT+IE9AJzBihOT9kopa/Wt5skUR1xYuZUg9S4bmjkSJ7kihh5rGWAI3Nbvjtjq0zA4138ulRTg X-Received: by 2002:a05:620a:991:b0:792:ec90:b1f5 with SMTP id af79cd13be357-794ab07be8emr1299821485a.28.1716869561168; Mon, 27 May 2024 21:12:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716869561; cv=pass; d=google.com; s=arc-20160816; b=rqW0og3D7XyitwbRzVFd3m30A8qX8WBJn76OdVt7iT+TXqNPIWyBhpCrWxcEt3cuJc IhaP4sHMNtMJtj04buQ3+s7xUf9H5uOYb9OS0F97V5zQPu97W2MxX+ITNVI0FrOS3IQJ 4MU8e3I1gPrqrRBsu9X+K7+VDephWSRRT+S3JDND8BYpnbyLMq8pbMTdrbLkmscWGH5a OS+oAsFMDpBpsmk5M+KG37uyi9tjK16+h/YDXlaOYDublF0gEOt8leISD2sPAEOk6Kpg KV/Pa2SDFhfjFML+NfDmROb9b/ygaaGy2Xckb+d4EjhFg4yRftmPuJ90tOfRMq3nW5mp 9emw== 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=Gy2fmPzIz29y+vFL0cHH3XbtFn60EEpegJmC7HngM3Y=; fh=7FqQY95/6dNosXCjFkEopk0YDb4YCNocz5tbx4U0IiY=; b=NS9bGTlLwZaDO6rM71YOR8cQbKWBcbOrUdSoDhNT/MDRIr9yJix+XXdVBkjXkQvics CMgAtnLTJBZ7YZAGLpLouHI+k5GYQjDUTDNhS1vH0ZoAuGB//g1Wm11/fxsGZG9vl2Q9 6J1DWGI5GfXxsii6jLb5HAWtaI6R18IZ/tlh2FqLYy41LEdeEDrlWRIQJlKEPpKI561v ldT4Z/oQTrndlozCkMZaYK/TuWNSD/BMplNve29kw7+2Zuk/4yJWIGtOVwkYecT1s14u 0LurIVdPsjuwcn5RNf1iKVg8N2P7T69WsMX7I90ZJhTHevZdA+v74Rr/zVglWNm1P53N G9fg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ydGePfnm; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ydGePfnm; 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-191732-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191732-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794abd51103si912484485a.581.2024.05.27.21.12.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 21:12:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191732-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ydGePfnm; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ydGePfnm; 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-191732-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191732-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 645981C20EC7 for ; Tue, 28 May 2024 04:12:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 37F7C18037; Tue, 28 May 2024 04:12:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ydGePfnm"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="rMs5cO0m"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ydGePfnm"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="rMs5cO0m" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (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 7DF991BC20 for ; Tue, 28 May 2024 04:12:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716869554; cv=none; b=TiaWYG+SXIR7mJskflBn/LjCEVKynzB4+3b+UiWfyhfOMqnO5+ljXDBz3s2oOFkQAv0+c/OiQgoKbt8qXgHJbA+Cx5Lq8GwlMWZxIfTBYxOPy0P80F6RvfOJ36t2M1Le4ZLG9GCvIAbn1AcQFa5SR2Qq+sghpl56JQTKs789L3Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716869554; c=relaxed/simple; bh=oI4MYNkcDayvJQTPe4NF+Zcqhv1sZeFcoIetBpgj7xI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lEsfOADfcBUbk+9fUZhYJ2oufyu9n04MEKAyfZW2Rk9mJiQYLV03bbLKF9sWrz85AvQvtD9xjoJ6aauMhF6jYg/uuA3Vv4sWCSsmwWdKdIrDvrGPTljMtQMTAgaed46egWkFAbUEse+wDH1hWeq+tcHMduivaKEFKr62NSZK8QA= 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=ydGePfnm; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=rMs5cO0m; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ydGePfnm; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=rMs5cO0m; arc=none smtp.client-ip=195.135.223.131 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-out2.suse.de (Postfix) with ESMTPS id 79B2A200EB; Tue, 28 May 2024 04:12:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1716869550; 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=Gy2fmPzIz29y+vFL0cHH3XbtFn60EEpegJmC7HngM3Y=; b=ydGePfnmIFiekzX2yeycuMFI3rGMkCkSm045XqJUhrvys0C8qxOEGBafgRcN84NeAq4CEd i4q/rp5lq07sxDnmBMITYthirZ3qtBaTXrZepvWmFStMArWSYrIr9hgRpBvwHlzaZ10PNi OGWSInYJGkJWj9AkxN0yT42eNwHcWW0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1716869550; 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=Gy2fmPzIz29y+vFL0cHH3XbtFn60EEpegJmC7HngM3Y=; b=rMs5cO0mrpiKyRxl6kONIAW8jrBVplDJSL5Vofvz1QfKe7+Et5CXrdDbpsDo69bBRaEmJf EoRZbtRSGLab+kDw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ydGePfnm; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=rMs5cO0m DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1716869550; 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=Gy2fmPzIz29y+vFL0cHH3XbtFn60EEpegJmC7HngM3Y=; b=ydGePfnmIFiekzX2yeycuMFI3rGMkCkSm045XqJUhrvys0C8qxOEGBafgRcN84NeAq4CEd i4q/rp5lq07sxDnmBMITYthirZ3qtBaTXrZepvWmFStMArWSYrIr9hgRpBvwHlzaZ10PNi OGWSInYJGkJWj9AkxN0yT42eNwHcWW0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1716869550; 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=Gy2fmPzIz29y+vFL0cHH3XbtFn60EEpegJmC7HngM3Y=; b=rMs5cO0mrpiKyRxl6kONIAW8jrBVplDJSL5Vofvz1QfKe7+Et5CXrdDbpsDo69bBRaEmJf EoRZbtRSGLab+kDw== 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 EF59913A6B; Tue, 28 May 2024 04:12:29 +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 vbSXN61ZVWYJCwAAD6G6ig (envelope-from ); Tue, 28 May 2024 04:12:29 +0000 Date: Tue, 28 May 2024 06:12:24 +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 v4 03/16] mm: Provide mm_struct and address to huge_ptep_get() Message-ID: References: <941ae68c7813cafc7aee3f34131f895fb7599636.1716815901.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=us-ascii Content-Disposition: inline In-Reply-To: <941ae68c7813cafc7aee3f34131f895fb7599636.1716815901.git.christophe.leroy@csgroup.eu> X-Spam-Level: X-Spamd-Result: default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; 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]; RCPT_COUNT_SEVEN(0.00)[9]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DKIM_TRACE(0.00)[suse.de:+]; MISSING_XM_UA(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Action: no action X-Rspamd-Queue-Id: 79B2A200EB X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Score: -4.51 On Mon, May 27, 2024 at 03:30:01PM +0200, Christophe Leroy wrote: > On powerpc 8xx huge_ptep_get() will need to know whether the given > ptep is a PTE entry or a PMD entry. This cannot be known with the > PMD entry itself because there is no easy way to know it from the > content of the entry. > > So huge_ptep_get() will need to know either the size of the page > or get the pmd. > > In order to be consistent with huge_ptep_get_and_clear(), give > mm and address to huge_ptep_get(). > > Signed-off-by: Christophe Leroy Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE Labs