Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp449090ybb; Fri, 10 Apr 2020 03:25:47 -0700 (PDT) X-Google-Smtp-Source: APiQypK00tAgiGH/gxd1XMIi+sejyay2f+x4L2BnOnTtws03xibx/xKr/nz2NBA2mBlwG34zO2WJ X-Received: by 2002:ae9:c20d:: with SMTP id j13mr3193565qkg.360.1586514347642; Fri, 10 Apr 2020 03:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586514347; cv=none; d=google.com; s=arc-20160816; b=cK+lEZg3o78HPf+G6gDGBcK8aCsEdwUAoW8q7AHxiatUq29dq+8wZhSmoGswGTTl3e 7xuh6LhqdXnbr+H5bsGjNnHuOQrMd+u7bEIsk4HJcpfOmDsh7ChI2l+xQsKXn3XOjRDQ lS4Cn0A7gf8ZNqjN+BvR8GtFFHN5FU1lY5nVpt1SPEhpPhpWen1pUBZYLrsWT/OR2QDb P/W24IbVE4/t0byiC/bDOheGrUzHiH9aP3llWf56WWL7qEfjK1BYZgDSdn+3c06wMTPU Bzq6nWpWPCjuzgSj9QCiwEJ/jUdBaqmx+ycOJBdrC5bAFLU58FeXAG/ep2OLM+PwdCgB P48w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=oRE9VMfwQl9hbhJuv3IFNxO5INvbX602C4YIkGaSu6U=; b=k7ZJIkZOanoptyHw7P5T+2IlAQLs7aWwzMc017CzovSEdll6iqCNiGlvnvMOSdRdUn hfxKUSZll8qp7QAu6wHoKyOf/6QBNK98TsAzY2syB+u8xougpxPkPYEv6Jc1lBFaLA8I iix7ma7Dn+yaPgkP28bo7N79tUNgvVeeulFYlyQu7orU0mukFurNaWuRQlBJ4D6+jRgS MPZo1xWj1/ui6I6JA2JRfoS4xFsPf/e657xeoT/4GlnM7iDQ70Sex65DXjDoLzPGd5kR vD9MW++0zNW4fRe9CXRVE8P7YI1wUoUyKRF6yVU9H0X43rnbZOXg6tDzZLddYDv4BOZG wLrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=TGa+Zn3m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kalray.eu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si1077253qkf.173.2020.04.10.03.25.33; Fri, 10 Apr 2020 03:25:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=TGa+Zn3m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kalray.eu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726706AbgDJKYp (ORCPT + 99 others); Fri, 10 Apr 2020 06:24:45 -0400 Received: from zimbra2.kalray.eu ([92.103.151.219]:57220 "EHLO zimbra2.kalray.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726666AbgDJKYo (ORCPT ); Fri, 10 Apr 2020 06:24:44 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 778A427E039A; Fri, 10 Apr 2020 12:24:42 +0200 (CEST) Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id G9XqLTYwtpAF; Fri, 10 Apr 2020 12:24:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 0F6B627E0589; Fri, 10 Apr 2020 12:24:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu 0F6B627E0589 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1586514282; bh=oRE9VMfwQl9hbhJuv3IFNxO5INvbX602C4YIkGaSu6U=; h=From:To:Date:Message-Id; b=TGa+Zn3mgG8hIYhxMnAC6RC6fmxXSHgYYS+bDnpPXKoZ/xYyMEjdlV79PUx+6W+8o fSs2jgYu/uRL164qCGNpPvIW/CmXf9ke22ZZ2pKJO93g5h6gBu+X9C6d8wa6hl7C8V uBPN0eOA8wnHTzQSzXVJQeoWgvhF9BkMypxkanyI= X-Virus-Scanned: amavisd-new at zimbra2.kalray.eu Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kHp0JyCnPWr8; Fri, 10 Apr 2020 12:24:41 +0200 (CEST) Received: from triton.lin.mbt.kalray.eu (unknown [192.168.37.25]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id C562D27E039A; Fri, 10 Apr 2020 12:24:41 +0200 (CEST) From: Clement Leger To: Andy Gross , Bjorn Andersson , Ohad Ben-Cohen , Maxime Coquelin , Alexandre Torgue Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Clement Leger Subject: [PATCH 2/2] remoteproc: use rproc_coredump_set_elf_info in drivers Date: Fri, 10 Apr 2020 12:24:33 +0200 Message-Id: <20200410102433.2672-3-cleger@kalray.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200410102433.2672-1-cleger@kalray.eu> References: <20200410102433.2672-1-cleger@kalray.eu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Modify drivers which are using remoteproc coredump functionnality to use rproc_coredump_set_elf_info in order to create correct elf coredump format. Signed-off-by: Clement Leger --- drivers/remoteproc/qcom_q6v5_adsp.c | 1 + drivers/remoteproc/qcom_q6v5_mss.c | 3 +++ drivers/remoteproc/qcom_q6v5_pas.c | 1 + drivers/remoteproc/qcom_wcnss.c | 1 + drivers/remoteproc/stm32_rproc.c | 1 + 5 files changed, 7 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index 2b01f2282062..8c3bd0954a13 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -423,6 +423,7 @@ static int adsp_probe(struct platform_device *pdev) dev_err(&pdev->dev, "unable to allocate remoteproc\n"); return -ENOMEM; } + rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE); adsp = (struct qcom_adsp *)rproc->priv; adsp->dev = &pdev->dev; diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index 03ffc6db4c68..5a7ff1092362 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -1355,6 +1355,8 @@ static int qcom_q6v5_register_dump_segments(struct rproc *rproc, return ret; } + rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE); + ehdr = (struct elf32_hdr *)fw->data; phdrs = (struct elf32_phdr *)(ehdr + 1); qproc->dump_complete_mask = 0; @@ -1632,6 +1634,7 @@ static int q6v5_probe(struct platform_device *pdev) } rproc->auto_boot = false; + rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE); qproc = (struct q6v5 *)rproc->priv; qproc->dev = &pdev->dev; diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index a41860d2243a..991f57e8e55b 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -390,6 +390,7 @@ static int adsp_probe(struct platform_device *pdev) } rproc->auto_boot = desc->auto_boot; + rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE); adsp = (struct qcom_adsp *)rproc->priv; adsp->dev = &pdev->dev; diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index 0c7afd038f0d..5d65e1a9329a 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -480,6 +480,7 @@ static int wcnss_probe(struct platform_device *pdev) dev_err(&pdev->dev, "unable to allocate remoteproc\n"); return -ENOMEM; } + rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE); wcnss = (struct qcom_wcnss *)rproc->priv; wcnss->dev = &pdev->dev; diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index 6a66dbf2df40..0f9d02ca4f5a 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -625,6 +625,7 @@ static int stm32_rproc_probe(struct platform_device *pdev) if (!rproc) return -ENOMEM; + rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE); rproc->has_iommu = false; ddata = rproc->priv; ddata->workqueue = create_workqueue(dev_name(dev)); -- 2.17.1