mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Komal Bajaj <quic_kbajaj@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <manivannan.sadhasivam@linaro.org>, <bp@alien8.de>,
	<tony.luck@intel.com>, <james.morse@arm.com>,
	<mchehab@kernel.org>, <rric@kernel.org>, <andy.gross@linaro.org>,
	<vnkgutta@codeaurora.org>, <linux-arm-msm@vger.kernel.org>,
	<linux-edac@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] qcom: llcc/edac: Correct interrupt enable register configuration
Date: Thu, 5 Dec 2024 15:59:06 +0530	[thread overview]
Message-ID: <a47a11be-377f-489f-a4dd-fd9b4ddc1a98@quicinc.com> (raw)
In-Reply-To: <zkqjyuem3ykeona7p7n6ejkndaxrnpfxjbk33nkzqjjyktoqpw@3b77c4jjdqhd>


On 11/20/2024 5:29 PM, Dmitry Baryshkov wrote:
> On Tue, Nov 19, 2024 at 12:16:08PM +0530, Komal Bajaj wrote:
>> The previous implementation incorrectly configured the cmn_interrupt_2_enable
>> register for interrupt handling. Using cmn_interrupt_2_enable to configure Tag,
>> Data RAM ECC interrupts would lead to issues like double handling of the
>> interrupts (EL1 and EL3) as cmn_interrupt_2_enable is meant to be configured
>> for interrupts which needs to be handled by EL3.
> This reads as if it was possible to write EL3-related register from EL1.
> Is it true?


Both EL1 and EL3 can access the LLCC "cmn_interrupt_2_enable" register, 
but configuring the register from both
EL1 & EL3 shouldn't be done as the register is meant to be configured 
from EL3. There was a bug in HPG which was
fixed recently on not to configure the register from EL1.

Thanks
Komal


>> EL1 LLCC EDAC driver needs to use cmn_interrupt_0_enable register to
>> configure Tag, Data RAM ECC interrupts instead of cmn_interrupt_2_enable.
>>
>> Fixes: 27450653f1db ("drivers: edac: Add EDAC driver support for QCOM SoCs")
>> Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
>> ---
>>   drivers/edac/qcom_edac.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c
>> index a9a8ba067007..0fd7a777fe7d 100644
>> --- a/drivers/edac/qcom_edac.c
>> +++ b/drivers/edac/qcom_edac.c
>> @@ -95,7 +95,7 @@ static int qcom_llcc_core_setup(struct llcc_drv_data *drv, struct regmap *llcc_b
>>   	 * Configure interrupt enable registers such that Tag, Data RAM related
>>   	 * interrupts are propagated to interrupt controller for servicing
>>   	 */
>> -	ret = regmap_update_bits(llcc_bcast_regmap, drv->edac_reg_offset->cmn_interrupt_2_enable,
>> +	ret = regmap_update_bits(llcc_bcast_regmap, drv->edac_reg_offset->cmn_interrupt_0_enable,
>>   				 TRP0_INTERRUPT_ENABLE,
>>   				 TRP0_INTERRUPT_ENABLE);
>>   	if (ret)
>> @@ -113,7 +113,7 @@ static int qcom_llcc_core_setup(struct llcc_drv_data *drv, struct regmap *llcc_b
>>   	if (ret)
>>   		return ret;
>>
>> -	ret = regmap_update_bits(llcc_bcast_regmap, drv->edac_reg_offset->cmn_interrupt_2_enable,
>> +	ret = regmap_update_bits(llcc_bcast_regmap, drv->edac_reg_offset->cmn_interrupt_0_enable,
>>   				 DRP0_INTERRUPT_ENABLE,
>>   				 DRP0_INTERRUPT_ENABLE);
>>   	if (ret)
>> --
>> 2.46.0
>>

  reply	other threads:[~2024-12-05 10:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19  6:46 Komal Bajaj
2024-11-20 11:59 ` Dmitry Baryshkov
2024-12-05 10:29   ` Komal Bajaj [this message]
2025-02-14  8:30     ` Komal Bajaj
2025-02-14 13:18 ` Manivannan Sadhasivam
2025-02-14 19:45   ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a47a11be-377f-489f-a4dd-fd9b4ddc1a98@quicinc.com \
    --to=quic_kbajaj@quicinc.com \
    --cc=andy.gross@linaro.org \
    --cc=bp@alien8.de \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=james.morse@arm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mchehab@kernel.org \
    --cc=rric@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=vnkgutta@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®