Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4498224ybb; Mon, 23 Mar 2020 23:12:07 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt55dTi5l2giksy9a9bg7ZSKbzgnhXtJcLAsxr/IYpgl+oZ4gWzAoFoltFCSjXtgmV00JQu X-Received: by 2002:a05:6830:19ec:: with SMTP id t12mr19601033ott.24.1585030327125; Mon, 23 Mar 2020 23:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585030327; cv=none; d=google.com; s=arc-20160816; b=wANoB/whlftP86vLV7id1syskRSbV4lhsPt5uQ8iIJnOuXTopKyQktcgBzguA5wfAC pB7+KMkbR1Am7bVHoU2s4d/UMP37NIu0lnMdRrYXY1VvZO4gYxCE5hpmjo5lGxC0kvEN L+Ur8dD6CpzpXLTQ2q+IZz3mfAGGwQ+xnkwMvnRo34MCDGgwdH1etyP7SIOByP1OW6my I9ZMeYtxbQ9YfbIyyqZgy5OMByrrn+FWhKn6oTvcEdfGDMUcCfxm8fCLTH1poXhunjdp /bhXU0EVwB0/ct5AyIT1im6NvGZGfpIJwgOrHPt6zAytU0cF7sb5PCZ6800ucNBveeGS RlNg== 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; bh=unGw6c2ZufitdrNu+5YBhFURhwCE/NrCJkMv+/OxkYg=; b=ZDRu82j/+48NRi0HXDUDpejbwsV34llpR3/TG6rH0uea6NlBIOWAa+59G+WobhVvG8 oTomFmsKgf4zrpYVwJ0JjGLYLX2OkGE6EewMeCA0Y7tEzpjifniIl7omYaD5bY6ssH8u uUx3RByhzNqDcOa6TJlPCUDOVpM4tn5cDPU2eLEJCB94qEkP3qL0Jt5HPeD5eu1v5ci4 5XP5xDhBQJVKok7wtAsdNLu4Yiau4yvEkoG57U8OCuHmuI8PCltjWYq5Dqhu2BhRPz/9 WNAP2mP+oDZXhnmYGJBb0CUr/jt3H+iU4zJ35kvfW3pnaM5x+XSpRuNtEZaW4y8+H4vP q3Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mmLkHpFK; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si718709otl.265.2020.03.23.23.11.54; Mon, 23 Mar 2020 23:12:07 -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=@linaro.org header.s=google header.b=mmLkHpFK; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727382AbgCXGLT (ORCPT + 99 others); Tue, 24 Mar 2020 02:11:19 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:36606 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727389AbgCXGLS (ORCPT ); Tue, 24 Mar 2020 02:11:18 -0400 Received: by mail-pl1-f194.google.com with SMTP id g2so6983168plo.3 for ; Mon, 23 Mar 2020 23:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=unGw6c2ZufitdrNu+5YBhFURhwCE/NrCJkMv+/OxkYg=; b=mmLkHpFKTPFen+ZlFBI6Y5O7t5YQ+gxaypgDSVkVsy6No15tBsYyZBcivmIjXfDksv b8nhz4EZZ2iBHdAZ7Tf53h3eN7oiBb36Drk1mSKlYwOTqmSdtbBLdT8D520MXrTRurDo 7xqv+yuWmiIwS9kVde5JkGflRvjNS1N0smgCb/x/OBmVu/h62TxHhWMIA3vf2r5q0HI7 EV90UIZSFydnGLXruPL0t4iOGrEzSIZNZJwJkn4ydW3o9zWPxu8ET4+SGNZpv3TXtIK9 Q9+q6KYZv4mAmT9CO61IAZeT3ycG053BCwPz8IEDllMnFHISUO5In3GGDuJQEk0jA6yf qM3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=unGw6c2ZufitdrNu+5YBhFURhwCE/NrCJkMv+/OxkYg=; b=YeGu707wZLaUgjoumawU4R9jM/3sDJP34BrKzfMxUAsfl0dRRDCRzoDHs9kbshYfdj NCcNXoaAqTzy3H1XmgzdXQRmYO3oYByxOv5VMPR/zYKifBY5cYsdhoJkpfIJwll+xqGI u+Y2tr44L3yOXxdCdn5VPTmRGK+PVmGyk/JNX01KT8hVu0LdYg6R8Oir6Ww6QF8bVABO dzUXm9Y5vdj9d52fWUwUk7lNm8zbNR/Kq4oqsc5/tc1PintUu4ld5xiS5hVxVHzv/dFt koOrXGHkppPDBLrkNoPGBLTQw7gME6HDo3HMfOFvPjr6Q/L+BoKcDlbPEyLQPLAkJao+ hn9w== X-Gm-Message-State: ANhLgQ3FHSkon/etyPFUIFuWKh8WJ1bAkM3j0yi6AHqimwbXKXrp0OdE gEo73zXfoZJd4uvvIz8fGydk X-Received: by 2002:a17:90a:d101:: with SMTP id l1mr3604492pju.130.1585030277624; Mon, 23 Mar 2020 23:11:17 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:59b:91e:2dd6:dffe:3569:b473]) by smtp.gmail.com with ESMTPSA id d3sm1198230pjc.42.2020.03.23.23.11.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 23:11:17 -0700 (PDT) From: Manivannan Sadhasivam To: gregkh@linuxfoundation.org, davem@davemloft.net Cc: smohanad@codeaurora.org, jhugo@codeaurora.org, kvalo@codeaurora.org, bjorn.andersson@linaro.org, hemantk@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam Subject: [PATCH v3 3/7] bus: mhi: core: Initialize bhie field in mhi_cntrl for RDDM capture Date: Tue, 24 Mar 2020 11:40:46 +0530 Message-Id: <20200324061050.14845-4-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200324061050.14845-1-manivannan.sadhasivam@linaro.org> References: <20200324061050.14845-1-manivannan.sadhasivam@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The bhie field in mhi_cntrl needs to be initialized to proper register base in order to make mhi_rddm_prepare() to work. Otherwise, mhi_rddm_prepare() will cause NULL pointer dereference. Fixes: 6fdfdd27328c ("bus: mhi: core: Add support for downloading RDDM image during panic") Reported-by: Hemant Kumar Signed-off-by: Manivannan Sadhasivam --- drivers/bus/mhi/core/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c index d136f6c6ca78..f6e3c16225a7 100644 --- a/drivers/bus/mhi/core/init.c +++ b/drivers/bus/mhi/core/init.c @@ -979,7 +979,8 @@ int mhi_prepare_for_power_up(struct mhi_controller *mhi_cntrl) goto bhie_error; } - memset_io(mhi_cntrl->regs + bhie_off + BHIE_RXVECADDR_LOW_OFFS, + mhi_cntrl->bhie = mhi_cntrl->regs + bhie_off; + memset_io(mhi_cntrl->bhie + BHIE_RXVECADDR_LOW_OFFS, 0, BHIE_RXVECSTATUS_OFFS - BHIE_RXVECADDR_LOW_OFFS + 4); -- 2.17.1