Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3019980ybt; Mon, 29 Jun 2020 13:05:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy72bvX1YJxQqf2L3AHPqe+muUlHGzSKv+qqN+c+4mnvbcWxxB+WGHeGTc0zu0N3qIVuicX X-Received: by 2002:a50:e047:: with SMTP id g7mr18927234edl.290.1593461124048; Mon, 29 Jun 2020 13:05:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593461124; cv=none; d=google.com; s=arc-20160816; b=R5FIP7+B4iO2lDd9bLLGoz7jklzFRlyVxzdVo2JYBNi46JLrHLIpD5fgYu/PlYZeQj +xU2B7f6leSVrd9bEkyPKSyxNQ2IWLeY5FsM5Zt7k0vNqKEvENtSV/OMfNi3OhDA6OmP 7d5uHAwPjxwBFDyYumH/SQKjeVNdSzpxf6oufH4Gp8syCQf+/JFoOkcg+1N3KKySmNJR kxzFMaRq6j7nSHrpBYzxbIaC6xc2NmKaNjPnaVz+d7j6NWOxS55ynXFu03oL0lt191Rm xCSto0fMu+mQq/hO8JJgucymfdOTrt6olS3H7ZQvV6J5jqRlhX3WQo6XixCQq5Hofd9F AIrw== 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=qtpTpEyX7P3/UBQOBDIxCImXEpI/7q2pBRc6Go1iexs=; b=LHrfq/363aT2FcPfsIx/fH5xsXCC+dAI9e437rTZ0k0pVAo/y402aVdrGJBcHMgZ8K uKA6+H73YiFl3VBDuWntlvKh1a8O3721d4IIypGpNAySWIvpFr7jOQq3Qs4twOBUndFy 4MgfyUbXRph86HmlyrBcRd/XlesW2u1M5POm61SacJ0VmqMJCBB0KgLbcPpwpeID+6Jh iVErg2q17jhk0QkXeeJMzQOKn44Aj0ogSOcIUfF/LfCeu8I2gWLUhKkGh8vnpu9yoSri PRFM7laliEfPhUKK82FXehD/Bs7Mi+cdcwuufAxnvRHuJK2w/IuyHpZQkVqS7yySfkpb r/xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=m6jfRbL6; 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 dn16si379159ejc.427.2020.06.29.13.05.00; Mon, 29 Jun 2020 13:05:24 -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=m6jfRbL6; 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 S2388587AbgF2UES (ORCPT + 99 others); Mon, 29 Jun 2020 16:04:18 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:47737 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732126AbgF2UDg (ORCPT ); Mon, 29 Jun 2020 16:03:36 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1593461016; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=qtpTpEyX7P3/UBQOBDIxCImXEpI/7q2pBRc6Go1iexs=; b=m6jfRbL6jUGwsJoj9KCMaMLth0fWWfF5kRhS5KvUjpPN/B8kOa85k54H/+GLfjPwlefSmjoD L6x+u0TSeBevQWZ3xU0jEIjo3O0F3Xq2GxiqAx2TU/AMwiRC/IM11B1RdaOf1NJKL/MMLDcT X5lZAlR+E+bCtkfAdy4HMiMYvqk= X-Mailgun-Sending-Ip: 104.130.122.29 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-n05.prod.us-west-2.postgun.com with SMTP id 5efa490f4c9690533af33426 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 29 Jun 2020 20:03:27 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id BCC48C433AF; Mon, 29 Jun 2020 20:03:26 +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 DD483C4339C; Mon, 29 Jun 2020 20:03:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DD483C4339C 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, tsoni@codeaurora.org, psodagud@codeaurora.org, sidgup@codeaurora.org, Rishabh Bhatnagar Subject: [PATCH v6 0/3] Extend coredump functionality Date: Mon, 29 Jun 2020 13:02:10 -0700 Message-Id: <1593460933-4262-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. Changelog: v6 -> v5: - Fix unsigned comaprison with negative bug found on gcc-9.3.0 v5 -> v4: - Rebase on top of linux-next 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