Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29719528rwd; Wed, 5 Jul 2023 16:43:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlHuX6ViG1pY16fcdg+t82HzbBIGtlJrn9I/RZCQeCGiZadNLyJ0mpci9Ta8IHvHUwD00r7S X-Received: by 2002:a05:6358:9147:b0:133:4ce:4e8c with SMTP id r7-20020a056358914700b0013304ce4e8cmr299750rwr.29.1688600637694; Wed, 05 Jul 2023 16:43:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688600637; cv=none; d=google.com; s=arc-20160816; b=w3z3J4+/nwuTkGophi6k/s2Ice0Kbetl/Rav6hPdq1YW6z8qm9k2QIPMZCR4nXy0vX cXzc1GBXEX2JY+gnzSD3ET6kQkt8QZSCT1cTv88wsEsVmHh7ZaU45vCJFBNSKcpe9MX+ fpLQadigXdEx660vCQBT3JPBXZScW6aJdNvmmKKxtKo8SpBMFpG5yLs22BkVgqJ7ZPMG mKwQcI5IyojD8n2M0gcuukqtOKATO5bV3SdA1Ml7BF8PWdJtjcoQSo+F7oqZTZ4zC1nS cswP/yWRIve4fbMAV2gBCR8WqAnyz34mUfVK0W+KG4TBlNxVfcLNgXUevD3S6HjMv5dV v/zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=JVGmkkPorwexKO2JQ2NEA6VFBz2RuXlUzLC7y6rbM/E=; fh=sK24Q04K3vYjBdzGwX4lMYDkn/0rZJhG4OLprSg5DZg=; b=mCbZ/xhB1iNC0600pyUFC2y1pPWE3YaaEjrjDR29Toy5/kA8cPH1WehcXwVMN6VnJx ydEdKBNaVKvuhdljSbnJNm7pue1kjTXYiGA3A+nJwjTDeMHAFUHoeJFLN7OQD96BD3HL a76e8CExFVjssINh4hoQq5fxGblXYY468QsGAFuYcUvIMuuuCjQPIP5vkdh825gJIO4F pxO9opEQaWKQdYMY5zo0bo9gQ/sdcezdcA+CQDj/hI4XI9FWn5z0IC0i3lm3x3U2pmSB vnd5rrQhEJb29ojIUx981gCrDEBLWhd4CM55Uk3dhHJ5qBsPuZ9t+3xV8El7JKPdW//5 i/Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZONJDYYI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i194-20020a636dcb000000b0054febc069d3si281271pgc.19.2023.07.05.16.43.45; Wed, 05 Jul 2023 16:43:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZONJDYYI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232241AbjGEX1p (ORCPT + 99 others); Wed, 5 Jul 2023 19:27:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231608AbjGEX1n (ORCPT ); Wed, 5 Jul 2023 19:27:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE47A171A; Wed, 5 Jul 2023 16:27:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3B2DF6187C; Wed, 5 Jul 2023 23:27:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FE9CC433CA; Wed, 5 Jul 2023 23:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688599661; bh=71ABv5/JwaJZ55URTzD8vGgqeEszc1MgI9Tgv+MINjE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZONJDYYI4DfLy7Qsq2iruWU/TAy+MfhN8a+13GK2IWPkDZqio7bRNxa5SQs05lP4P cwPUPxti1OHDRjna7RLvlHvYzjGzNzbIQj3qP3y/Bn+msmAYu9HbnUfdOB0mW+oJ0Y xXd9KYSiaVMbhH8iXxtVbsReICsvqSFCZ93UbTBDH2SxezF1CiOXVRCeK6+eL9LKGf lv5Tdq9By8SoiBvDGs8LHavKem9Wb+MzUqre5RXfWHiAchuT+L/DCozo3/BlyhktAW 7OLkwTDgnazo9mvhKgyHb/J//J+68K3lIP4d0Lf8VbQ7BmWtxd0vaabSh0ecr/t8zz aclhgVyMhnn3Q== Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2b6ef64342aso231811fa.3; Wed, 05 Jul 2023 16:27:41 -0700 (PDT) X-Gm-Message-State: ABy/qLZ15zN9i0RK29N24/YPEZcU9AmIcYDkhPFpv4CaynvygCJuwO56 xE1BiyzvzmSOMJMehNsGnW17NxHUoZ1nVel/ew== X-Received: by 2002:a2e:a170:0:b0:2b6:e958:d03 with SMTP id u16-20020a2ea170000000b002b6e9580d03mr124735ljl.30.1688599659474; Wed, 05 Jul 2023 16:27:39 -0700 (PDT) MIME-Version: 1.0 References: <1687955688-20809-1-git-send-email-quic_mojha@quicinc.com> <1687955688-20809-11-git-send-email-quic_mojha@quicinc.com> In-Reply-To: From: Rob Herring Date: Wed, 5 Jul 2023 17:27:27 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 10/21] soc: qcom: Add qcom's pstore minidump driver support To: Mukesh Ojha Cc: corbet@lwn.net, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, keescook@chromium.org, tony.luck@intel.com, gpiccoli@igalia.com, mathieu.poirier@linaro.org, catalin.marinas@arm.com, will@kernel.org, linus.walleij@linaro.org, andy.shevchenko@gmail.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-hardening@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 29, 2023 at 3:16=E2=80=AFAM Mukesh Ojha wrote: > > > > On 6/29/2023 4:27 AM, Rob Herring wrote: > > On Wed, Jun 28, 2023 at 6:37=E2=80=AFAM Mukesh Ojha wrote: > >> > >> This driver was inspired from the fact pstore ram region should be > >> fixed and boot firmware need to have awarness about this region, > >> so that it will be persistent across boot. But, there are many > >> QCOM SoC which does not support warm boot from hardware but they > >> have minidump support from the software, and for them, there is > >> no need of this pstore ram region to be fixed, but at the same > >> time have interest in the pstore frontends data. So, this driver > >> get the dynamic reserved region from the ram and register the > >> ramoops platform device. > >> > >> +---------+ +---------+ +--------+ +---------+ > >> | console | | pmsg | | ftrace | | dmesg | > >> +---------+ +---------+ +--------+ +---------+ > >> | | | | > >> | | | | > >> +------------------------------------------+ > >> | > >> \ / > >> +----------------+ > >> (1) |pstore frontends| > >> +----------------+ > >> | > >> \ / > >> +------------------- + > >> (2) | pstore backend(ram)| > >> +--------------------+ > >> | > >> \ / > >> +--------------------+ > >> (3) |qcom_pstore_minidump| > >> +--------------------+ > >> | > >> \ / > >> +---------------+ > >> (4) | qcom_minidump | > >> +---------------+ > >> > >> This driver will route all the pstore front data to the stored > >> in qcom pstore reserved region and the reason of showing an > >> arrow from (3) to (4) as qcom_pstore_minidump driver will register > >> all the available frontends region with qcom minidump driver > >> in upcoming patch. > >> > >> Signed-off-by: Mukesh Ojha > >> --- > >> drivers/soc/qcom/Kconfig | 12 +++++ > >> drivers/soc/qcom/Makefile | 1 + > >> drivers/soc/qcom/qcom_pstore_minidump.c | 85 +++++++++++++++++++++++= ++++++++++ > > > > drivers/soc/ is the dumping ground for things with no other place. As > > this is a pstore driver, it belongs with pstore. > > The inspiration of this driver was taken from > drivers/platform/chrome/chromeos_pstore.c, do you think that is misplaced= ? The difference is really that's nothing more than platform specific logic to instantiate a normal ramoops device. It's kind of ugly, yes, but it's still just a normal ramoops device in the end. Your case is that plus all the extra parts for minidump. Rob