From patchwork Wed Feb 7 13:22:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: JITENDRA SHARMA X-Patchwork-Id: 10205177 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 209806056E for ; Wed, 7 Feb 2018 13:22:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 034802022C for ; Wed, 7 Feb 2018 13:22:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBDAA28E26; Wed, 7 Feb 2018 13:22:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C46428E52 for ; Wed, 7 Feb 2018 13:22:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753728AbeBGNW5 (ORCPT ); Wed, 7 Feb 2018 08:22:57 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:38720 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753795AbeBGNWz (ORCPT ); Wed, 7 Feb 2018 08:22:55 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id BE9456029D; Wed, 7 Feb 2018 13:22:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518009774; bh=jVUXANMolx2Wcai0J8Tk99ce8wg0k9E8qZYtaAdTbzI=; h=From:To:Cc:Subject:Date:From; b=lDZkRdARkRYhYlpEYLwvezTgqT4MzitDVg8X2+uqOCxtD0r06K9ONS1VATxtwaWkq mU7yNfJyLzsgFv9AucNaVM5s/FcMpMPnIJeyhwGCx/IfhYpTXwUrI6YJhDw/yxiFsI kbXtPtoa29d0jzrhqEaxWk3RoO33OhFLxZBQYUbY= Received: from shajit-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: shajit@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D3F2B601C4; Wed, 7 Feb 2018 13:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518009773; bh=jVUXANMolx2Wcai0J8Tk99ce8wg0k9E8qZYtaAdTbzI=; h=From:To:Cc:Subject:Date:From; b=olsDUvvJbmvNpGle9MX3Xi7fNZmPH/t5hLyvQQvwp/keC14qHoGT8utsTfDTAG5BY McFye5jp0/FCC9eAd9ZSw4PPxQNSE9Texl5/E8k9530UVZOR/2470qzSDcy79Q0xoZ 7Vtxp5/Xo2w5x3pNWS6gAKzTLCef+AX8zvDzmGoU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D3F2B601C4 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=shajit@codeaurora.org From: Jitendra Sharma To: bjorn.andersson@linaro.org, sboyd@codeaurora.org Cc: linux-remoteproc@vger.kernel.org, linux-arm-msm@vger.kernel.org, Jitendra Sharma Subject: [PATCH] remoteproc: Remove null character write of shared mem Date: Wed, 7 Feb 2018 18:52:42 +0530 Message-Id: <1518009762-26480-1-git-send-email-shajit@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP remoteproc is writing '\0' in the shared mem region. This region is shared among multiple clients that are also trying to read. Hence they miss first character. Remove this null character write, as this mem area is supposed to be Read only. Further during every subsystem reboot, this region is initialized with default, hence no need to write this region. Signed-off-by: Jitendra Sharma --- drivers/remoteproc/qcom_adsp_pil.c | 3 --- drivers/remoteproc/qcom_q6v5_pil.c | 3 --- drivers/remoteproc/qcom_wcnss.c | 3 --- 3 files changed, 9 deletions(-) diff --git a/drivers/remoteproc/qcom_adsp_pil.c b/drivers/remoteproc/qcom_adsp_pil.c index 373c167..4a2ee6c 100644 --- a/drivers/remoteproc/qcom_adsp_pil.c +++ b/drivers/remoteproc/qcom_adsp_pil.c @@ -201,9 +201,6 @@ static irqreturn_t adsp_fatal_interrupt(int irq, void *dev) rproc_report_crash(adsp->rproc, RPROC_FATAL_ERROR); - if (!IS_ERR(msg)) - msg[0] = '\0'; - return IRQ_HANDLED; } diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c index b4e5e72..f51e143 100644 --- a/drivers/remoteproc/qcom_q6v5_pil.c +++ b/drivers/remoteproc/qcom_q6v5_pil.c @@ -959,9 +959,6 @@ static irqreturn_t q6v5_fatal_interrupt(int irq, void *dev) rproc_report_crash(qproc->rproc, RPROC_FATAL_ERROR); - if (!IS_ERR(msg)) - msg[0] = '\0'; - return IRQ_HANDLED; } diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index 3f06092..043f3d3 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -332,9 +332,6 @@ static irqreturn_t wcnss_fatal_interrupt(int irq, void *dev) rproc_report_crash(wcnss->rproc, RPROC_FATAL_ERROR); - if (!IS_ERR(msg)) - msg[0] = '\0'; - return IRQ_HANDLED; }