Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1004099ybm; Wed, 27 May 2020 13:30:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxb0wkPWjt/0ZynRwYgHUQY1a08sgsguJaQhcxynCv5E786m0mmsHGZIUmYphvNJM6CW9xO X-Received: by 2002:aa7:dd16:: with SMTP id i22mr26806870edv.366.1590611401897; Wed, 27 May 2020 13:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590611401; cv=none; d=google.com; s=arc-20160816; b=eRfASk3Dt6vBPAV8BHIsYK+2utcl7aZAIU9dzl6RhHpp7kYT2UGgIwVwopIuqd9QSs C1ulNvwpP18YvdsNKI0BTgN4gUf7xILfNLE0S2QT6ED3WShxqDHC+h0DX6S7Hm24AzxQ yMTdjDLEorI3z+XWPyze4ckhQSc2ecPqPJyKkJ6L+6JoB1u2nINUkTgSSgX5weIm4un8 RqwrlaKzNOWCV1DK/p+TzA98vt2KX3yI/leUCchfBU7POxNpLIQVnQ2exeNGRgOuxdSR A0Yb1UKt/fiRJVz/PlA1u+4eagTIr/lvegyp8au0lb3I3gbQeP53unsHlICvjE6zwGnJ 3f7g== 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=lDvp9mtb1BNZtF00ZqLwVSC6bknYfvTg0uIyQBTnJ20=; b=s6X5GwxcD67qp/NgSUFbUPf5hZ0vBW2w9GaHUaz6GwsxfsDILXrGNfen+x027xlZ5O VOzAN0xx1pEYdSE2n1EXAHwH4LblKAzNILKMLesH8C7hchmYrc3YiWE44YvgIBalDmi7 5dokwu7wWvK3+lNSPVuE8R5fZUD1fX09kf7dTOomyWz8y4VZJ0lZqj3XPL9N4+iDxdO/ aNff5d5qzHdqZ7gWYOax8c0m4UDvpkxxJe7IBXHvpAC0bdeWZFE4YgDsuOCXRqjqkeNH WBhw/k3dF4sHzECO6xbhCkKoL6IOys/g09OUbnXe/IeTG7Wf2BwXRCrFEt7NvJmun/KT cKZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=lUlbEb48; 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 nl2si2518078ejb.490.2020.05.27.13.29.38; Wed, 27 May 2020 13:30:01 -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=lUlbEb48; 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 S1728731AbgE0U07 (ORCPT + 99 others); Wed, 27 May 2020 16:26:59 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:33575 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728149AbgE0U07 (ORCPT ); Wed, 27 May 2020 16:26:59 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1590611219; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=lDvp9mtb1BNZtF00ZqLwVSC6bknYfvTg0uIyQBTnJ20=; b=lUlbEb48AxefuplFpEa9FHFztmgFY8aYwOPRPrZxTCGdWZGKqB9GNQb3IGLwiDJD1DSZO14v /oKNSrT1oSE9WZyxCM2JfFFIZiRr1p+827Nlvp363doiE8aZs/AlTygqugLskkFNhALaweME UP0HQEvQeBkvJSnr4sigdZV3At0= 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-n01.prod.us-east-1.postgun.com with SMTP id 5ececd00ea0dfa490e06c968 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 27 May 2020 20:26:40 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id A5940C433CB; Wed, 27 May 2020 20:26:39 +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 85C51C433C6; Wed, 27 May 2020 20:26:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 85C51C433C6 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, tsoni@codeaurora.org, psodagud@codeaurora.org, sidgup@codeaurora.org, mathieu.poirier@linaro.org, Rishabh Bhatnagar Subject: [v4 PATCH 0/3] Extend coredump functionality Date: Wed, 27 May 2020 13:26:14 -0700 Message-Id: <1590611177-15826-1-git-send-email-rishabhb@codeaurora.org> X-Mailer: git-send-email 1.9.1 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. Changelog: 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 (3): remoteproc: Move coredump functionality to a new file remoteproc: Add inline coredump functionality remoteproc: Add coredump debugfs entry drivers/remoteproc/Makefile | 1 + drivers/remoteproc/qcom_q6v5_mss.c | 9 +- drivers/remoteproc/remoteproc_core.c | 191 ------------------ drivers/remoteproc/remoteproc_coredump.c | 328 +++++++++++++++++++++++++++++++ drivers/remoteproc/remoteproc_debugfs.c | 86 ++++++++ drivers/remoteproc/remoteproc_internal.h | 4 + include/linux/remoteproc.h | 21 +- 7 files changed, 443 insertions(+), 197 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