linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: grygorii.strashko@ti.com (Grygorii Strashko)
To: linux-arm-kernel@lists.infradead.org
Subject: [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report
Date: Fri, 15 Jan 2016 13:35:33 +0200	[thread overview]
Message-ID: <5698D985.2050608@ti.com> (raw)
In-Reply-To: <20160114213048.GB19062@n2100.arm.linux.org.uk>

Hi Russell,

On 01/14/2016 11:30 PM, Russell King - ARM Linux wrote:
> On Thu, Jan 14, 2016 at 10:11:09PM +0200, Grygorii Strashko wrote:
>> diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
>> index deabc36..b9b4f9c 100644
>> --- a/arch/arm/mm/highmem.c
>> +++ b/arch/arm/mm/highmem.c
>> @@ -167,7 +167,7 @@ void switch_kmaps(struct task_struct *prev_p, struct task_struct *next_p)
>>           * Clear @prev's kmap_atomic mappings
>>           */
>>          for (i = 0; i < prev_p->kmap_idx; i++) {
>> -               int idx = i + KM_TYPE_NR * smp_processor_id();
>> +               int idx = FIX_KMAP_BEGIN + i + KM_TYPE_NR * smp_processor_id();
>>   
>>                  set_fixmap_pte(idx, __pte(0));
>>          }
>> @@ -175,7 +175,7 @@ void switch_kmaps(struct task_struct *prev_p, struct task_struct *next_p)
>>           * Restore @next_p's kmap_atomic mappings
>>           */
>>          for (i = 0; i < next_p->kmap_idx; i++) {
>> -               int idx = i + KM_TYPE_NR * smp_processor_id();
>> +               int idx = FIX_KMAP_BEGIN + i + KM_TYPE_NR * smp_processor_id();
>>   
>>                  if (!pte_none(next_p->kmap_pte[i]))
>>                          set_fixmap_pte(idx, next_p->kmap_pte[i]);
> 
> This looks like it introduces the 4th and 5th copies of the same
> calcuation, so can I suggest that we do this to prevent this kind
> of error?
> 
> diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
> index d02f8187b1cc..61f0d5941116 100644
> --- a/arch/arm/mm/highmem.c
> +++ b/arch/arm/mm/highmem.c
> @@ -34,6 +34,11 @@ static inline pte_t get_fixmap_pte(unsigned long vaddr)
>   	return *ptep;
>   }
>   
> +static unsigned int fixmap_idx(int type)
> +{
> +	return FIX_KMAP_BEGIN + type + KM_TYPE_NR * smp_processor_id();
> +}
> +


This looks very reasonable - I'll updated and re-send.
Would you agree if I'll add your Signed-off-by: in final patch?

Thanks for review.


[...]


-- 
regards,
-grygorii

  reply	other threads:[~2016-01-15 11:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1451325611-21678-1-git-send-email-grygorii.strashko@ti.com>
     [not found] ` <20160112171556.GB31009@linutronix.de>
     [not found]   ` <569637ED.1030304@ti.com>
     [not found]     ` <5696B025.8020909@ti.com>
2016-01-14 20:11       ` [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report Grygorii Strashko
2016-01-14 21:30         ` Russell King - ARM Linux
2016-01-15 11:35           ` Grygorii Strashko [this message]
2016-01-15 11:36             ` Russell King - ARM Linux

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=5698D985.2050608@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).