Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3131040rdb; Wed, 13 Sep 2023 03:06:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/4JtFs9/Y5c9GiPKqNgMWXCFvEFsLlPXryVOPaJWAhk39+jN/1dtNsgxAHzO5eO9IgjVa X-Received: by 2002:a05:6a20:a128:b0:14c:e8d4:fb3e with SMTP id q40-20020a056a20a12800b0014ce8d4fb3emr2167989pzk.43.1694599617312; Wed, 13 Sep 2023 03:06:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694599617; cv=none; d=google.com; s=arc-20160816; b=frN1ZlW6FDBGOzZYfwvrT544qWtMAisMQ8ZxqsYUoCJ/r1gmGCv5rrdacXjL7corzV urAJk/2HqWX13j9tJIhSKa1Dfqh/5iM8HZt9jR+hWUw9OW5gRi3UzY71yea53aST0ZbO L9RzQQygcsS6CqLWsUiqqToAVUYhP3weMIxPvIFsDG6oQHWQE6YugCK2cSfKUJphUt4r FjyXbnlKPP/fu92pu2tESREFA8z85uFDzCOs8nPWY7jotYoMKK8bkPL9dS8C5Pxotxoo CflVXXLb8DWoQYoAJPZfbglUT8KMTGZ5OsAtAMHxCG1/3LLfNoyvf4XNc+RKFU0qmLcg zpig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ziSOaqQRIoG94oZGz0d5r0+7UOw/nEgZ32lMUgWge/E=; fh=89G0YaEvn/g82rHGmGqq94MQV13qsFPl+wuvUpWHzn0=; b=ehKLdEG/VGZLRYxLv4PVxTIKq0TDeVf4u9tS0C2Zvz2MN1e/AoOi1FbZsXpIP7P67d wNZxix6s8OyeM7+e7eWEbv6l7tqQDcDVrXBG9MDp7mqRPonEV4fjCwxtfLAOIAz8jwd4 0NUey0Bw3CWPIbblyegYLBqh9Qqq3bCLsO35K0UPHw4vXRECMKM0UbEos7Wnky3eu/qq dsSFExGoO53QxUYk2EGHYKRd+YTMhqGPVRzMXEsz2olixCc4YULNS36sgU16pzeREzNE LnewqQMQiJMuHGM7Yv8Pp8s96Z6J5sN+YUbzfm16UDiED10qKb6353ejKCX1dWDh9Byw 3E9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="l1Mm2/Go"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id y15-20020a17090264cf00b001bb377f8c8bsi9140458pli.2.2023.09.13.03.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 03:06:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="l1Mm2/Go"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2E5D8830F546; Wed, 13 Sep 2023 00:04:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238417AbjIMHD4 (ORCPT + 99 others); Wed, 13 Sep 2023 03:03:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230228AbjIMHDz (ORCPT ); Wed, 13 Sep 2023 03:03:55 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 654691738; Wed, 13 Sep 2023 00:03:51 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38D6q17L027482; Wed, 13 Sep 2023 07:03:15 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=ziSOaqQRIoG94oZGz0d5r0+7UOw/nEgZ32lMUgWge/E=; b=l1Mm2/Gor3UeT616Kj3wNqUh82gOg4TSYQDva8Q2a6CTViIYYdhbrzuC9UGrBUKAJK5Y qA6fr3JCshsUCAimWB2n1/3f7Xyts2008/ruKvk8vzDL3jTayon0X3Kshvg9nTkmnT3h UZkJoP5+qQul3Mt8O/yEsV7+4MJXxqsFF4PEHQaagoKuC48c3Z5aLcL5144Q/FBRZLXH upRNzbXFML4EGc0RRDTN+btvDpCrnZo0Eu82M+/bRkmgeb3UJG321CJM/JL3bkPB6mYw 7ssWkFHFxV9GlT7L+ClJPWVzRTAVqt4WX/L28bvHcvN05+W1SO7GklEcXUHB6YzBi64O 3Q== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t2y7ts0vg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Sep 2023 07:03:15 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38D73Eg8010732 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Sep 2023 07:03:14 GMT Received: from [10.214.66.81] (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Wed, 13 Sep 2023 00:03:02 -0700 Message-ID: <14bf3fca-f031-d000-6fd6-d82f4de9b255@quicinc.com> Date: Wed, 13 Sep 2023 12:32:54 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [REBASE PATCH v5 08/17] arm64: mm: Add dynamic ramoops region support through command line Content-Language: en-US To: Will Deacon CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <1694429639-21484-1-git-send-email-quic_mojha@quicinc.com> <1694429639-21484-9-git-send-email-quic_mojha@quicinc.com> <20230912101820.GA10884@willie-the-truck> From: Mukesh Ojha In-Reply-To: <20230912101820.GA10884@willie-the-truck> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: GyAbQ0AdteB_VHS7rJh3KcbsPiZrwY1L X-Proofpoint-ORIG-GUID: GyAbQ0AdteB_VHS7rJh3KcbsPiZrwY1L X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-12_24,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 clxscore=1015 mlxlogscore=999 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309130058 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 13 Sep 2023 00:04:02 -0700 (PDT) X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Thanks for the response. On 9/12/2023 3:48 PM, Will Deacon wrote: > On Mon, Sep 11, 2023 at 04:23:50PM +0530, Mukesh Ojha wrote: >> The reserved memory region for ramoops is assumed to be at a fixed >> and known location when read from the devicetree. This may not be >> required for something like Qualcomm's minidump which is interested >> in knowing addresses of ramoops region but it does not put hard >> requirement of address being fixed as most of it's SoC does not >> support warm reset and does not use pstorefs at all instead it has >> firmware way of collecting ramoops region if it gets to know the >> address and register it with apss minidump table which is sitting >> in shared memory region in DDR and firmware will have access to >> these table during reset and collects it on crash of SoC. >> >> So, add the support of reserving ramoops region to be dynamically >> allocated early during boot if it is request through command line >> via 'dyn_ramoops_size=' and fill up reserved resource structure and >> export the structure, so that it can be read by ramoops driver. >> >> Signed-off-by: Mukesh Ojha >> --- >> arch/arm64/mm/init.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++ > > Why does this need to be in the arch code? There's absolutely nothing > arm64-specific here. Current clients of this cmdline would be only arm64, and that is the reason of putting this here. I was checking the places where memblock_phys_alloc_range() gets called and found either it is arch/*/ and drivers/of/of_reserved_mem.c . Since, this is not related to device tree, did not find a proper place than this, i took the reference of this place from reserve_crashkernel(). Also, not sure how could it be of help to other non-arch64 users at this point. -Mukesh > > Will