Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19527722rwd; Wed, 28 Jun 2023 10:26:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6HbgEZhAZo20DNOvqjohPi7V+XPuTTXMufAn6SZgcxCW4aS7hQueRAftRR+nkWSOfkE8yJ X-Received: by 2002:a17:902:e54a:b0:1b7:f99f:63c9 with SMTP id n10-20020a170902e54a00b001b7f99f63c9mr8796256plf.67.1687973176354; Wed, 28 Jun 2023 10:26:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687973176; cv=none; d=google.com; s=arc-20160816; b=M6FUv+STcnENIQ/k4ELAgEYBeikcYUZ9kSvgJEmOIkDXMVoAr7CAg1kxhVq5eejsax psRfOK8jBEJmzUKmSEOxEeiCn5P2xgXNwcMufLylO4dXQswMgqLYA9T1681gA5CcZNNC fz6gC0Y4rsuy2CIT/dORhFkcW7fVkWyxysS3mEw+tOZ6vtoR+ptvx99TmL4/5TMcgQWd idiLdpmJYAOd2CTXlZvBOjn0pgB3E2uv9DC9GpGe/1CI9t/P82ElA/JrvycAltsMKvVQ SKU7qShoVK/oUGXkYFI4AwEkiTOcjSOqZT8rYh046u9ypsiTtMSMMHyUoQxDgZL8znkx NbSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hupP6LkXLxM56lRm8mTGV8uV6W16kFEQJxA+YqETHQU=; fh=7ocbA3zXC95AHvkKaiwt3ajA2wuafe9VGnCFfr18XNM=; b=VAdwYMIuMd6u6LI3RFA5KP0TYF5A2VtSjAoUj9FxJipRPn22daVw7f/lDh63EBHbbt b3DSdIIeK4WcC3AHldJrfkL/9KHx7K+xka8qSReYozd/LfOpm2pUvw8xobdnyI+VtkuP +V6t6P4NY5SSwF7AgO2M/vO+H2lXUX8VuZOvTR8LsQOsh+/nFwy5+hn2zPpUHIGPHIZx +XbCUcXMr/BUdKdfvN+nTWLOayVgZ4lSD0C6VzbPnLRUhBZWFr48vThHHJpXCWtCMmXq UHcLTGS1Yct7H9I6eAaP2Zo5KMyNNUNzeYBMec0dRDCeZQhVKxjQ6r23rpr2pbF8qaTb jzmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XSAZJUru; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a17090300c500b001b5006b87c0si8573700plc.139.2023.06.28.10.26.03; Wed, 28 Jun 2023 10:26:16 -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=@linuxfoundation.org header.s=korg header.b=XSAZJUru; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231447AbjF1QxZ (ORCPT + 99 others); Wed, 28 Jun 2023 12:53:25 -0400 Received: from dfw.source.kernel.org ([139.178.84.217]:46110 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230059AbjF1QxW (ORCPT ); Wed, 28 Jun 2023 12:53:22 -0400 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 F100E6129B; Wed, 28 Jun 2023 16:53:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CFC8EC433C8; Wed, 28 Jun 2023 16:53:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1687971201; bh=gozokXz2eVh6fctzR506kgwTFWCpOKR95WNjlihKjp0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XSAZJUru2/LERqubKZhN960vjbBGOsstoqQchktqgk2eAmAtD04A8rchUv6KtMPCO bluJTB4rl9FsREuSLLbvkM+kuLVOwWaqtIpM5FPIWWt2zmRAH96RiEjex7HjZ2P52U 90KKlCAHvvTURFden0f0Wv5p/9azoOifGjIJdo/I= Date: Wed, 28 Jun 2023 18:53:18 +0200 From: Greg KH To: Mukesh Ojha Cc: corbet@lwn.net, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.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 Subject: Re: [PATCH v4 00/21] Add Qualcomm Minidump kernel driver related support Message-ID: <2023062812-exporter-facing-aaf9@gregkh> References: <1687955688-20809-1-git-send-email-quic_mojha@quicinc.com> <2023062814-chance-flounder-f002@gregkh> <10dd2ead-758a-89f0-cda4-70ae927269eb@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10dd2ead-758a-89f0-cda4-70ae927269eb@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 28, 2023 at 09:50:00PM +0530, Mukesh Ojha wrote: > > > On 6/28/2023 9:15 PM, Greg KH wrote: > > On Wed, Jun 28, 2023 at 06:04:27PM +0530, Mukesh Ojha wrote: > > > Minidump is a best effort mechanism to collect useful and predefined data > > > for first level of debugging on end user devices running on Qualcomm SoCs. > > > It is built on the premise that System on Chip (SoC) or subsystem part of > > > SoC crashes, due to a range of hardware and software bugs. Hence, the > > > ability to collect accurate data is only a best-effort. The data collected > > > could be invalid or corrupted, data collection itself could fail, and so on. > > > > > > Qualcomm devices in engineering mode provides a mechanism for generating > > > full system ramdumps for post mortem debugging. But in some cases it's > > > however not feasible to capture the entire content of RAM. The minidump > > > mechanism provides the means for selecting which snippets should be > > > included in the ramdump. > > > > > > Minidump kernel driver implementation is divided into two parts for > > > simplicity, one is minidump core which can also be called minidump > > > frontend(As API gets exported from this driver for registration with > > > backend) and the other part is minidump backend i.e, where the underlying > > > implementation of minidump will be there. There could be different way > > > how the backend is implemented like Shared memory, Memory mapped IO > > > or Resource manager(gunyah) based where the guest region information is > > > passed to hypervisor via hypercalls. > > > > > > Minidump Client-1 Client-2 Client-5 Client-n > > > | | | | > > > | | ... | ... | > > > | | | | > > > | | | | > > > | | | | > > > | | | | > > > | | | | > > > | | | | > > > | +---+--------------+----+ | > > > +-----------+ qcom_minidump(core) +--------+ > > > | | > > > +------+-----+------+---+ > > > | | | > > > | | | > > > +---------------+ | +--------------------+ > > > | | | > > > | | | > > > | | | > > > v v v > > > +-------------------+ +-------------------+ +------------------+ > > > |qcom_minidump_smem | |qcom_minidump_mmio | | qcom_minidump_rm | > > > | | | | | | > > > +-------------------+ +-------------------+ +------------------+ > > > Shared memory Memory mapped IO Resource manager > > > (backend) (backend) (backend) > > > > > > > > > Here, we will be giving all analogy of backend with SMEM as it is the > > > only implemented backend at present but general idea remains the same. > > > > If you only have one "backend" then you don't need the extra compexity > > here at all, just remove that whole middle layer please and make this > > much simpler and smaller and easier to review and possibly accept. > > > > We don't add layers when they are not needed, and never when there is no > > actual user. If you need the extra "complexity" later, then add it > > later when it is needed as who knows when that will ever be. > > > > Please redo this series based on that, thanks. > > I already followed without this middle layer till v3 since without > the middle layer it will be end up with lot of code duplication if there > is another backend. But as this series does not have such a thing, only add it when needed please. Don't make us review a whole bunch of stuff that is not actually used here. Would you want to review such a thing? > We already have other backend implementation in the downstream, if you > want to see them, i will try to post them in upcoming series.. Ok, so if you already have it, yes, post it as part of the series, otherwise such a layer makes no sense. thanks, greg k-h