Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1667519lqg; Sun, 3 Mar 2024 22:58:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUXaq7DNxTHwW+5Uly4DTrlctkp2boE7/zr225rjrGzg1YP5qQO6wVBE9NEuG7FvVzHcLWZj5UEEKTXkJ36y1mQz4Q/dxONYfROxQoMbw== X-Google-Smtp-Source: AGHT+IFnY9xav0oql2Ufx818eRgUWEeghTa/N5MedZhdOM0pp6BXO1HJbvXw9rVtQ+PVWvxnDz+B X-Received: by 2002:a17:902:c40f:b0:1dc:c8b8:3cb7 with SMTP id k15-20020a170902c40f00b001dcc8b83cb7mr10822105plk.13.1709535519292; Sun, 03 Mar 2024 22:58:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709535519; cv=pass; d=google.com; s=arc-20160816; b=fEmGCflmpq9Ahl9mevfeNH0ZS/GVxl9JzZrv/y3EDfcWN/ztgJRqLsCJ0+xfc4mbNJ 4RaoTO4FCzjuOoP3geAQqW0ia8SqvLj+Xcn2QQ+BjknSZspCaqxCxgaUdlIjjsTD4n+A PytcSy7RNLU8DJciNUGh3CKsZ+9sbEA0YFphlTrdc9qJ5wC/J7bL/po+d4amTCA5zwtl LtzDukiepoqS5u8k1mRPjYaoYGzkwlRclI/niPFsJi2cvEGI9ieZG77kESkETtVMez+k sFzW1IZ3c8xxIEet5hou68wTJUA3R792duxz9wszJ6H9aX5sD6v6UxUaS3URhVpKw7ne t0jQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=P9EWi5xZ3Iohuux8MlBHpmZuB+8RsNNOB9Q+jwJcFkg=; fh=pJm3ZVN54r3BiI2UxtWMXz3RUYpaHp4/HECMGHjSSdY=; b=GMPDle8b66O9pjNAB4QuY4DwiinoWwIztXqusY7N3f6ZAWA2PvhFbrpcDUqMIoJVVB hnE3BE/R+SClFyJ23ZBCYsA5P7lgMl4B5Aaip+W8AmqOYHma8tiNnH6IHz3HiyoTf4UU fyt9RVfY/lmvJHl3hPvnig1QJr3wyUntfqGjOfQHviOOobgnVoifS6jGRTQ/tt9Uogqt EvsA+ct1KiNPSf30dY6/qk8wlLE7AaS5bW1uJiPnXIpRXoC9E/234rfmkUuRD/mMbbLe lVCxROb6Q8OaMX+3ing8IeyTZPrpSLcsRt4Zun8RSgp32i6LsKyohd5p2iBr5DLbjtNf dGpA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eAT8eJWe; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-90101-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90101-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c7-20020a170902d48700b001dbad3b436fsi7983958plg.453.2024.03.03.22.58.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 22:58:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90101-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eAT8eJWe; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-90101-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90101-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id F0EFC2815EB for ; Mon, 4 Mar 2024 06:58:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E513612B6D; Mon, 4 Mar 2024 06:58:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eAT8eJWe" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1266E125D9 for ; Mon, 4 Mar 2024 06:58:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709535512; cv=none; b=XOin0qK+LXjh/nIgzCG5ctV1tlRRtqjnPAl2TToeC5yQP1JLTRDrcr4bqL4y163mWW5Sbz2zyIx5XaIX8V8ekGQogWoAm5RMpZgoOPnVXnKB9cXnwO9rNdOqcN+zBH//LRpJKeI3AHCsOGTieuYd+jA665V0vI/mB9wSXnNV+f4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709535512; c=relaxed/simple; bh=pCHXV/s88VE05KHiAtDUcDWj2C6kZNCANXL4c+tdvNg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dMLfTXZnbg/4Zgt1GQ1eRLIjcCUT0XaqcHWMucOfu5ZkQEsYf9DLyTpfYfZWEPOi+53ztJ7A//Z6XRnq0G8QtXXOBl4flmHqoOtuW50LxYWJiSy6SrzFS4zm7u57xZ3uXCNSnpq/Vzng9cSwzvSZYeKUUxDJTUcl14cTPgIP2QE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eAT8eJWe; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B8B3C433C7; Mon, 4 Mar 2024 06:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709535511; bh=pCHXV/s88VE05KHiAtDUcDWj2C6kZNCANXL4c+tdvNg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=eAT8eJWePJd0jK8Q2ixYVlvIpvbeeLUFoFy/sPTywGp9Q9vA+7LVcfX852wftPuwt MCzTGMA3XXTTiCtMvzdJtShw5uz7C3mlwqC+2li4cNz8sAXfqo6g7vhltuNVKX+zHI G6D1sVk3N4SeMME7KilqGabeYxTc3/y3FBBO68N6l7IezvBwRyl49B5I6ENlcQbQVL T++ovo7BFzwcTa3jmK7C3Ib8e3sdcSRbl4Ot6eof2/A9rXto3fTz1Ll3XLKByaLCYw 8CDZEFzigrcusaCgFK1iRGuP6PkmTq9GlQqcw95+itOVqVIcbH26w6aQ9e+ipONRqg LADpyzp2BriQw== Message-ID: <0b1ebda7-cf70-47bc-9d31-129eb895ae9f@kernel.org> Date: Mon, 4 Mar 2024 12:28:23 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] powerpc: align memory_limit to 16MB in early_parse_mem To: Michael Ellerman , Joel Savitz , linux-kernel@vger.kernel.org Cc: Nicholas Piggin , Christophe Leroy , "Naveen N. Rao" , Benjamin Gray , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Gonzalo Siero References: <20240301203023.2197451-1-jsavitz@redhat.com> <87cysdfsef.fsf@mail.lhotse> Content-Language: en-US From: "Aneesh Kumar K.V" In-Reply-To: <87cysdfsef.fsf@mail.lhotse> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/2/24 4:53 AM, Michael Ellerman wrote: > Hi Joel, > > Joel Savitz writes: >> On 64-bit powerpc, usage of a non-16MB-aligned value for the mem= kernel >> cmdline parameter results in a system hang at boot. > > Can you give us any more details on that? It might be a bug we can fix. > >> For example, using 'mem=4198400K' will always reproduce this issue. >> >> This patch fixes the problem by aligning any argument to mem= to 16MB >> corresponding with the large page size on powerpc. > > The large page size depends on the MMU, with Radix it's 2MB or 1GB. So > depending on what's happening 16MB may not be enough. > > What system are you testing on? > htab_bolt_mapping should have aligned things to a lower value that is 16MB aligned. /* Carefully map only the possible range */ vaddr = ALIGN(vstart, step); paddr = ALIGN(pstart, step); vend = ALIGN_DOWN(vend, step); -aneesh