Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2920113lqo; Tue, 14 May 2024 13:33:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVtsq5yJ5CO5hgnISaQ0H5eshxNARVq7uTYgRWibNrP7qoZCOFiB0HBbMBDQPAZB4dLjznuXFses7YhJ6hqjXgV+Pb5RgHsPs0PWDAUnA== X-Google-Smtp-Source: AGHT+IFjt1u86dXoYoB/sZiyU7N5n81VaFGkN6sOjQfmiqtNEFn83DTcHSbrj84vLRJiSB5TkPH2 X-Received: by 2002:a05:622a:110f:b0:43a:f698:2b21 with SMTP id d75a77b69052e-43dfdadff07mr149987401cf.36.1715718780792; Tue, 14 May 2024 13:33:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715718780; cv=pass; d=google.com; s=arc-20160816; b=un/iGromc+Qf6EtlQIfpjVh0knchTxV23yZZY30fI7ALSXTeR8yxGMgO1WphdZap1h dibNS4e5wOykQt9LNSb6n0J/t+of2uwKrGSL4qDQD8Y4RmU5pLsey5iwoDnMssNHdMcN H1YG13OADdWv1D9M23PEP3f5BTqb8WrurlKydMwdogaNCd/IO013pGEquA8/D41sRIYS U9xhHmnKbMlDllcaaFEZ6kdMJXmuB9IT80F0PsVqWmZ2Boa9P6VB00ypv3DRTM2PDh3b zEPoCd4yT6BTJJkoeS7BDZn/cV1F/2cr2zeg0M7m7FkStQmQb3Rboc04BZULFNtzCeHS 1sug== 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:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=kk3PUJn0ZHUnCyV3wo0S0YEaGX6X5EGmXK7wEUx20rU=; fh=wEiMiW2Sn0oGK4b8yKj/oMA/PpvDwOj4jA+xBYuqt3Y=; b=BPIuYPzU4w47/wHhzn0hyJuxa+uP7db+qoXlD+CbLV9LkbgRtoEj1diCiT7ZOiomi+ 9KoK+CRMKHxyh31pucw5AZiZDXEre7PxI8/IpZWFtn3k79+OOqmC5155JOoTH48XI7Pa LwrPrJcCVrOpDKAx4PfHGmOaJyOTI8piXv/hMrw8bII+PAWHFUWs0Rd5VhoHpDYrMfMu IkFrCxhQrUBVd3g0+3u48SyzhIwHQyKleTLWF0djgEie1oV0fNbzlt0ZePKY5hoH8jW7 ygpRp9rA8dO+5R3c3qP9jAFYHa6VT8qDvP3RVgIn1DnPrCJXIEWrwxQpSWQDy1CB6tfF zkNQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=LukJ1p5P; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=LukJ1p5P; 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-179144-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179144-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 d75a77b69052e-43e1b9c54a5si45403201cf.435.2024.05.14.13.33.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 13:33:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179144-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=LukJ1p5P; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=LukJ1p5P; 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-179144-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179144-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 782A81C215CF for ; Tue, 14 May 2024 20:33:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1EB01EB31; Tue, 14 May 2024 20:32:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="LukJ1p5P"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="0I+MOdkt"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="LukJ1p5P"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="0I+MOdkt" 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 7576D1E501 for ; Tue, 14 May 2024 20:32:51 +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=1715718773; cv=none; b=OlVlAz/L9kq8kUg+K+3DqdnrEPsDA3A9cF1WY0koVH/5QQTJLTgmsmBlm1RfiQvQl5SB2A73c1lDtTNVj2QLDw7EIMH+ASALxCGiko8jKbfshXs5nbITB36hWtbwbRTvijh30CtRJRd5efcKBUGOdsh2llx6zc3k/ovV3Tp54Qo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715718773; c=relaxed/simple; bh=RdkQFK1O+AIwgCXbOlknN6KrMEhO+Se7DoIN+ZAc9xU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aD53M/Fu2HAH0MAMzbipL4afD97aWB+V7YUU7fqy/yKorsJqLEpowF7sQYfm5l6VtigSKzPSH0kp8ZZxZHweDyvDHNpMGJrIDS35z+ujxP29VDyzhSchHOnzsa5G1cjJV/MGaM6FaWlpcWw5wlUmKzmB3g6T01KIItJhtzGm1mk= 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=LukJ1p5P; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=0I+MOdkt; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=LukJ1p5P; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=0I+MOdkt; 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 948CB1F911; Tue, 14 May 2024 20:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1715718769; h=from:from:reply-to: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=kk3PUJn0ZHUnCyV3wo0S0YEaGX6X5EGmXK7wEUx20rU=; b=LukJ1p5PWWbiu3qKRQ/sdBVZjjoR0JzQ24HSt7G0MajKuuOYVYByXM20LDzK5JbQMo4ziE z56/SLJzivpZcOuRUZw98Ki+vjMIlh040AIgK3vCWPnae6g4phKWqb4LsXlpLf2oKOt2ie kBrnRmDUjemc4Kg1FQe04AfOtXVmfyc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1715718769; h=from:from:reply-to: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=kk3PUJn0ZHUnCyV3wo0S0YEaGX6X5EGmXK7wEUx20rU=; b=0I+MOdkt9NAN1JNbZ+9l7B9kHwT3WJVbIfpIfdTQse7f9nh8EeVYBmLj1d8T55ebexCPns 3m0Q9+x/wNs3lhDw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=LukJ1p5P; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=0I+MOdkt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1715718769; h=from:from:reply-to: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=kk3PUJn0ZHUnCyV3wo0S0YEaGX6X5EGmXK7wEUx20rU=; b=LukJ1p5PWWbiu3qKRQ/sdBVZjjoR0JzQ24HSt7G0MajKuuOYVYByXM20LDzK5JbQMo4ziE z56/SLJzivpZcOuRUZw98Ki+vjMIlh040AIgK3vCWPnae6g4phKWqb4LsXlpLf2oKOt2ie kBrnRmDUjemc4Kg1FQe04AfOtXVmfyc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1715718769; h=from:from:reply-to: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=kk3PUJn0ZHUnCyV3wo0S0YEaGX6X5EGmXK7wEUx20rU=; b=0I+MOdkt9NAN1JNbZ+9l7B9kHwT3WJVbIfpIfdTQse7f9nh8EeVYBmLj1d8T55ebexCPns 3m0Q9+x/wNs3lhDw== 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 90A4B1372E; Tue, 14 May 2024 20:32:48 +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 kE0NIHDKQ2aOIAAAD6G6ig (envelope-from ); Tue, 14 May 2024 20:32:48 +0000 Date: Tue, 14 May 2024 22:32:43 +0200 From: Oscar Salvador To: =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= Cc: Alexandre Ghiti , Albert Ou , David Hildenbrand , Palmer Dabbelt , Paul Walmsley , linux-riscv@lists.infradead.org, =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Andrew Bresticker , Chethan Seshadri , Lorenzo Stoakes , Santosh Mamila , Sivakumar Munnangi , Sunil V L , linux-kernel@vger.kernel.org, linux-mm@kvack.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v2 2/8] riscv: mm: Change attribute from __init to __meminit for page functions Message-ID: References: <20240514140446.538622-1-bjorn@kernel.org> <20240514140446.538622-3-bjorn@kernel.org> 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: <20240514140446.538622-3-bjorn@kernel.org> X-Spam-Flag: NO X-Spam-Score: -6.49 X-Rspamd-Action: no action X-Rspamd-Queue-Id: 948CB1F911 X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-6.49 / 50.00]; BAYES_HAM(-2.98)[99.92%]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; RCPT_COUNT_TWELVE(0.00)[17]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[rivosinc.com,eecs.berkeley.edu,redhat.com,dabbelt.com,sifive.com,lists.infradead.org,catalinasystems.io,gmail.com,ventanamicro.com,vger.kernel.org,kvack.org,lists.linux-foundation.org]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:email]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] On Tue, May 14, 2024 at 04:04:40PM +0200, Bj?rn T?pel wrote: > From: Bj?rn T?pel > > Prepare for memory hotplugging support by changing from __init to > __meminit for the page table functions that are used by the upcoming > architecture specific callbacks. > > Changing the __init attribute to __meminit, avoids that the functions > are removed after init. The __meminit attribute makes sure the > functions are kept in the kernel text post init, but only if memory > hotplugging is enabled for the build. > > Also, make sure that the altmap parameter is properly passed on to > vmemmap_populate_hugepages(). > > Signed-off-by: Bj?rn T?pel Reviewed-by: Oscar Salvador > +static void __meminit create_linear_mapping_range(phys_addr_t start, phys_addr_t end, > + uintptr_t fixed_map_size) > { > phys_addr_t pa; > uintptr_t va, map_size; > @@ -1435,7 +1429,7 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, > * memory hotplug, we are not able to update all the page tables with > * the new PMDs. > */ > - return vmemmap_populate_hugepages(start, end, node, NULL); > + return vmemmap_populate_hugepages(start, end, node, altmap); I would have put this into a separate patch. -- Oscar Salvador SUSE Labs