Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1565489ybh; Thu, 16 Jul 2020 16:14:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBlAI8uZtLWmi5btDOcpoHIDEpq0hwimEW4zYMZYEM535glAJUKZmb/eOxfV5oOhda87j0 X-Received: by 2002:a17:906:c002:: with SMTP id e2mr6198915ejz.244.1594941294638; Thu, 16 Jul 2020 16:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594941294; cv=none; d=google.com; s=arc-20160816; b=IOWrFP6RX5KH/vVLipWs7zAHHjf3M5U7w2fkQf3L7GAV+L/anU7SXDXCDZVKoAGLww Qv8fSyXJ0lHNJami1LnlB1Cw61YACJPxylwXjFVFPdJ3xmed0JkFF2auEZ0IzJxOYrcG QEvgpDSPPN27eTKd81UExszLiMAyUzN0UfWUL8cwoVXatLtTkP+FonNuR5iLhGbdVsAv L+3jcFol4MaMpr/tpt+xce1IgPR1WPkv/k0cAbDSv2Eq/n4vum+PTWZDk6dFQrewWand v3gTEY+1sVwBOSA777aCb8yM3v7JpF4WvC1KlTLzMRuzNLcaC5ARGN1MNv68rZ1XfM4X eeuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature; bh=Nng1sYIDPTAcnUhkBssDTIQdylbGIkCeopFB3ZR9t2g=; b=iT5H8W5qLO33KacTuzRJQls1vVm2kPvrboq4FZrGDCrzZMZmmW8ubCjzGT8SgH9GJd 2AZkJXJvh5HNyI0sg3B8VFS1+cGVvvyZqKxTI3xivFek3YbKuW5MC3lRyet2B8KpF4Iv SQxOfjFVyym4ppivf8EluQUYB24TAlfBn2ThYw4AT9H7yLCHT1dfkJoBkJ6en+R2k358 aN+wbfJChRLZjjo5xvO6FMxBYVfMjcomHo1mSXqpSxuEAD93BFHVrWKawjWk3I+v7sxG gbIk2SWWux3A+H86zMKE9LD8QvIcf8DeKpgQ5wcOljMU2RAWVC5ZDhNAxMexCmlqDxUa DSqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b="dp/wtm+B"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si4217677ejy.226.2020.07.16.16.14.31; Thu, 16 Jul 2020 16:14:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b="dp/wtm+B"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726962AbgGPXOY (ORCPT + 99 others); Thu, 16 Jul 2020 19:14:24 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:39870 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726007AbgGPXOY (ORCPT ); Thu, 16 Jul 2020 19:14:24 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1594941263; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=Nng1sYIDPTAcnUhkBssDTIQdylbGIkCeopFB3ZR9t2g=; b=dp/wtm+BmqSecCfAyfvaeHzXz24+PVu02+HV1ZsbqPf5h7qtt0N7Ldvx8m6Tfcytd4TsqIJ5 IcMPYdsdGyFyeVnbNJLjXgWgB2fEYtsC0Ibhs4RAzATuNtuA8iwZvmGKEJn2c98iCMoNGzw6 gSGof8EOEekqlDLyKkjtrB1f58M= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n20.prod.us-east-1.postgun.com with SMTP id 5f10d31ef9ca681bd070159a (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 16 Jul 2020 22:22:22 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id BA519C433B2; Thu, 16 Jul 2020 22:22:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from rishabhb-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rishabhb) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6C296C433CA; Thu, 16 Jul 2020 22:22:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6C296C433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=rishabhb@codeaurora.org From: Rishabh Bhatnagar To: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, sibis@codearora.org, tsoni@codeaurora.org, psodagud@codeaurora.org, sidgup@codeaurora.org, Rishabh Bhatnagar Subject: [PATCH v8 0/5] Extend coredump functionality Date: Thu, 16 Jul 2020 15:20:30 -0700 Message-Id: <1594938035-7327-1-git-send-email-rishabhb@codeaurora.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series moves the coredump functionality to a separate file and adds "inline" coredump feature. Inline coredump directly copies segments from device memory during coredump to userspace. This avoids extra memory usage at the cost of speed. Recovery is stalled until all data is read by userspace. This patchset also includes Sibi Sankar's patch to deal with chunk sizes lesser than segment size to make inline coredump work for modem. https://patchwork.kernel.org/patch/11637157/ Changelog: v8 -> v7: - Split out the qcom_q6v5_mss refactoring into a new patch - Remove zero size check in dump_segment function for mss - Remove segment number being passed as private member for the segment - Free the memory used by dump state header before signalling completion v7 -> v6: - Include Sibi's patch as part of this patchset - Add a linefeed when displaying coredump conf in debugfs - Fix a typo in remoteproc.h v6 -> v5: - Fix unsigned comaprison with negative bug found on gcc-9.3.0 v5 -> v4: - Rebase on top of linux-next - Modify qcom_q6v5_mss driver as a result of rebasing on latest tip. v4 -> v3: - Write a helper function to copy segment memory for every dump format - Change segment dump fn to add offset and size adn covert mss driver v3 -> v2: - Move entire coredump functionality to remoteproc_coredump.c - Modify rproc_coredump to perform dump according to conf. set by userspace - Move the userspace configuration to debugfs from sysfs. - Keep the default coredump implementation as is v2 -> v1: - Introduce new file for coredump. - Add userspace sysfs configuration for dump type. Rishabh Bhatnagar (4): remoteproc: Move coredump functionality to a new file remoteproc: Add size and offset arguments to segment dump function remoteproc: Add inline coredump functionality remoteproc: Add coredump debugfs entry Sibi Sankar (1): remoteproc: qcom_q6v5_mss: Replace mask based tracking with size drivers/remoteproc/Makefile | 1 + drivers/remoteproc/qcom_q6v5_mss.c | 25 ++- drivers/remoteproc/remoteproc_core.c | 191 ------------------ drivers/remoteproc/remoteproc_coredump.c | 325 +++++++++++++++++++++++++++++++ drivers/remoteproc/remoteproc_debugfs.c | 90 +++++++++ drivers/remoteproc/remoteproc_internal.h | 4 + include/linux/remoteproc.h | 21 +- 7 files changed, 451 insertions(+), 206 deletions(-) create mode 100644 drivers/remoteproc/remoteproc_coredump.c -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project