Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2624242lqo; Mon, 20 May 2024 11:05:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2KyzJLkZWigtTbsSL4ZxlJNY6PQnZ1oN7dsOOy/4kljtw5ifpiKK6NHA8Ad1+gFgLAhiiEcdxUlI7gVzG5Wx+TQeACwr3lTiZzn7MlA== X-Google-Smtp-Source: AGHT+IHATKXO7mnfBtat/DEHyxRlj01g/lROCEsDTTp2rnJ85g4KPzcPzSBW1oVpOjWf0uo1NEbA X-Received: by 2002:a05:6e02:19c9:b0:36c:4cbd:ec88 with SMTP id e9e14a558f8ab-36cc144b668mr374742405ab.6.1716228310687; Mon, 20 May 2024 11:05:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716228310; cv=pass; d=google.com; s=arc-20160816; b=lJl6kfgFzSO3oiHTK7bDItzp4Fjnq026l3MxPYdhH1m2MS0cQetlhcTtBeRjhAQvuD 5CGznJToxHswIMn2NbC8KNVNrrcB9izSpSfc+bSxemDkB7YuoA0mROLcMdJggKv2WITh qJZ7g49bzZd83wTsVbNGa6R+2scQ9CXJ7ZWz0I9EC0lqD3EyUmSOaA7wdDWvAN5Q56wE JJnLU4espr5SnOevXbIOWaMwcaBCsVxKEWrd5SWwgKa69OW3HNVBhxP9eG5ffKmBxfjc yRKwhQwmr1itl8GwpzzSQLTuSCLj4SgpoM4Y0/+PbWToiQ0vQTfeeMw6j/pU1B8+mgpn iniA== 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=kPBtia4xzyfEHTggusZtDrxjOdowelLRyYrYWeNkILQ=; fh=5SeQ5Uy2NLYCf1pFOVICZwgFfmmgUqYmPtOYWhMkig0=; b=E7VFzhfXbhX9juQmxKimsHXR1DuSGHjaU/F7WeWRi8Iaem1AW9sLSZGYqML9WV9T7J kVlZcbgmkVcppyM4aicOSNRW//dAYupvnDiCCE8c5zxFu2hRf29MJLJ1GHuD3qQ9J/fW Rjt88b+vn/8Z7KUPauYrt7+L1UTAsl6lCPxm6/tuMBlr5C3GyVb9A4jsOhnnr8YXFvMJ FLnbSdPFs2MfqHTjMozUAvYDyvivjIzZ5ar5dV+ar+8rUKzJ56sglBQIAkVHLMjpsLlK tnh3YWqvfyHTwAzsuCj7ChA8outNwURhZQodIwS2l1uC2NJVNmevxItztynunvAUR0JZ 9LEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oPqJRmaL; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-184047-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184047-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 71dfb90a1353d-4df7c05b96bsi4134374e0c.164.2024.05.20.11.05.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 11:05:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184047-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oPqJRmaL; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-184047-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184047-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com 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 62FFD1C21B52 for ; Mon, 20 May 2024 18:05:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1ED34137C21; Mon, 20 May 2024 18:05:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="oPqJRmaL" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 D636034CDE; Mon, 20 May 2024 18:05:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716228304; cv=none; b=XhXirj86UXBDMRKKpJhxZWlVQhMj42As2Pxlt1/gqqPTKKvaPuGaBdslrMEjP4SGK/FJVZR8p8dn9lhkm0+4voZKJeGfpE62VnzZzFCsLTF64iA+n1JHxTxHmWqlLF5n4UuTJGh8Rlt40zSpVQUdv81lLhh+QPla6yUUrQpvnMo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716228304; c=relaxed/simple; bh=kPBtia4xzyfEHTggusZtDrxjOdowelLRyYrYWeNkILQ=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=f5R/miFMCeYDdl/+mmPjQ39TF3WBS/DI4riYJyz9NMJf5pi2Q5GX29OhdnUtb6qB0AWC+n9MhFgC1tF3j0hfqrbDDb/SRPc/3tuV3erS8/EAe3Ll5WxWLKNk4Cnqmg6XDvccZ3cw1BCCR2ntk+gxRIkfrPzGd9LkRmShbpO+b24= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=oPqJRmaL; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44KBrKQx019730; Mon, 20 May 2024 18:04:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=kPBtia4xzyfEHTggusZtDrxjOdowelLRyYrYWeNkILQ=; b=oP qJRmaLWnD1kxfGyLqrhRLraaRQxTiPHZ34Yr70W5m31c5hQrsi/w2EVEc/1h5MNP /xwaCAuJhuwn/6d3SwZkPYfELmhCh4lphZrtWnGfr229fq+AYsW+REjL8QwZxohl gUp6hSA2yPN31s/W1ET0d3ZeTfZFsm4//GqeoUCtblCMhssvIkYPulXrHXFGWDpg W8njs4W/zWi3LoGQU6hAcW3lDn9aXg9M32CqYOELDkvuD96fHLxUkUI96apyj/Hf gHHaP0piTndidCTZHdYiaZQQ0a4x9jeL/IyH3k+2zjnktVo544JpoosyowWNl0Hf LlY5PY7O1VYJJf1xI6PQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y6n4p4d8s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 May 2024 18:04:40 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44KI4JEw007304 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 May 2024 18:04:19 GMT Received: from [10.110.126.173] (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 20 May 2024 11:04:15 -0700 Message-ID: Date: Mon, 20 May 2024 11:03:50 -0700 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 v2] sh: Call paging_init() earlier in the init sequence To: John Paul Adrian Glaubitz , , CC: , , , , , Rob Herring , Rob Landley References: <20240423233150.74302-1-quic_obabatun@quicinc.com> <72ec7831604326e852eb228072b1d817bab829fb.camel@physik.fu-berlin.de> <0e813c8498bf3d9ed5d8fd5b171ac9980dc2999c.camel@physik.fu-berlin.de> Content-Language: en-US From: Oreoluwa Babatunde In-Reply-To: <0e813c8498bf3d9ed5d8fd5b171ac9980dc2999c.camel@physik.fu-berlin.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: fnn3RhToGM7W8LpYoAZBiwrfbmQxHCc6 X-Proofpoint-GUID: fnn3RhToGM7W8LpYoAZBiwrfbmQxHCc6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-20_09,2024-05-17_03,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 mlxscore=0 malwarescore=0 spamscore=0 impostorscore=0 clxscore=1015 phishscore=0 suspectscore=0 adultscore=0 mlxlogscore=624 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405200145 On 5/7/2024 3:41 PM, John Paul Adrian Glaubitz wrote: > Hello Oreoluwa, > > On Tue, 2024-05-07 at 14:42 -0700, Oreoluwa Babatunde wrote: >> memblock_alloc() marks all its allocations as reserved by calling >> memblock_reserve(). >> https://elixir.bootlin.com/linux/latest/source/mm/memblock.c#L1463 >> >> This should normally stop other users from allocating from within that >> region of memory. >> >> But in this case, since all the free memory regions have already been >> transferred over to the bootmem framework by paging_init(), I am not >> sure if that logic will still hold for the unflatten_deivcetree allocated memory. >> >> The main goal of this patch is to make sure that the reserved memory >> regions defined in the DT are set aside before any memblock allocations >> are done (which includes the allocation done by unflatten_devicetree). >> >> Hence, I can restructure the patch to only remove the portion of code that is >> is responsible for setting aside the DT defined reserved memory regions from >> within paging_init(), and move it above the unflatten_devicetree() call. >> https://elixir.bootlin.com/linux/latest/source/arch/sh/mm/init.c#L292 >> >> I will explore further and possibly restructure this patch based on my findings. > OK, sounds like a plan. In the meantime, I have set up my J2 Turtle Board and > I am actually now able to test patches for this target, so that I would be > able to verify that your patch didn't break anything. > > However, I think for v6.10 I think the ship has sailed. > > Adrian Hi Adrian, I have uploaded v3 of this patch now. https://lore.kernel.org/all/20240520175802.2002183-1-quic_obabatun@quicinc.com/ In this new version, paging_init() is left in its original position and only the portion of code that is responsible for setting aside the reserved memory regions is moved. Thank you! Oreoluwa