linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Gautam <vivek.gautam@codeaurora.org>
To: Marc Gonzalez <marc.w.gonzalez@free.fr>
Cc: MSM <linux-arm-msm@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/1] iommu/arm-smmu: Add SID information to context fault log
Date: Mon, 15 Apr 2019 17:34:40 +0530	[thread overview]
Message-ID: <1c73617c-64a5-0c9f-7791-72e596a4e21f@codeaurora.org> (raw)
In-Reply-To: <5cee3aa1-6bef-25bf-2a34-06d086ca76dd@free.fr>

Hi Marc,


On 4/15/2019 2:24 PM, Marc Gonzalez wrote:
> Trimming CC list for very minor suggestions (feel free to ignore)

Thanks for the review. Please find my responses inline below.

>
> On 15/04/2019 10:07, Vivek Gautam wrote:
>
>> Extract the SID and add the information to context fault log.
>> This is specially useful in a distributed smmu architecture
>> where multiple masters are connected to smmu. SID information
>> helps to quickly identify the faulting master device.
> I find it slightly clearer to keep acronyms capitalized, such as SMMU.

Sure, will change it.
>
>
>> @@ -575,7 +575,10 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev)
>>   	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
>>   	struct arm_smmu_cfg *cfg = &smmu_domain->cfg;
>>   	struct arm_smmu_device *smmu = smmu_domain->smmu;
>> +	void __iomem *gr1_base = ARM_SMMU_GR1(smmu);
>>   	void __iomem *cb_base;
>> +	u32 cbfrsynra;
>> +	u16 sid;
>>   
>>   	cb_base = ARM_SMMU_CB(smmu, cfg->cbndx);
>>   	fsr = readl_relaxed(cb_base + ARM_SMMU_CB_FSR);
>> @@ -586,9 +589,16 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev)
>>   	fsynr = readl_relaxed(cb_base + ARM_SMMU_CB_FSYNR0);
>>   	iova = readq_relaxed(cb_base + ARM_SMMU_CB_FAR);
>>   
>> +	cbfrsynra = readl_relaxed(gr1_base +
>> +				  ARM_SMMU_GR1_CBFRSYNRA(cfg->cbndx));
> I find it slightly clearer to write
>
> 	void __iomem *reg;
> 	...
> 	reg = ARM_SMMU_GR1(smmu) + ARM_SMMU_GR1_CBFRSYNRA(cfg->cbndx);
> 	cbfrsynra = readl_relaxed(reg);

I would actually argue here, to go with the flow of how this function 
declares the variables, for the simple case of symmetry.
Let me know what do you think.

Thanks & regards
Vivek


>
> Regards.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-04-15 12:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15  8:07 [PATCH 1/1] iommu/arm-smmu: Add SID information to context fault log Vivek Gautam
2019-04-15  8:54 ` Marc Gonzalez
2019-04-15 12:04   ` Vivek Gautam [this message]
2019-04-15  9:41 ` Robin Murphy
2019-04-15 12:05   ` Vivek Gautam
2019-04-15 17:37     ` [PATCH 1/1] iommu/arm-smmu: Log CBFRSYNRA register on context fault Vivek Gautam
2019-04-19  0:24       ` Bjorn Andersson
2019-04-19  5:34         ` Vivek Gautam

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=1c73617c-64a5-0c9f-7791-72e596a4e21f@codeaurora.org \
    --to=vivek.gautam@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=marc.w.gonzalez@free.fr \
    /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;
as well as URLs for NNTP newsgroup(s).