Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1310064
| From | Grygorii Strashko <grygorii.strashko@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report |
| Date | 2016-01-15 12:40 +0100 |
| Message-ID | <qRaTw-5pO-13@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <qQaLV-3Xe-21@gated-at.bofh.it> <qQs66-7xx-17@gated-at.bofh.it> <qQA3E-4La-17@gated-at.bofh.it> <qQWxb-3FW-5@gated-at.bofh.it> <qQXMC-4pB-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-01-12 18:20 +0100
Re: [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report Grygorii Strashko <grygorii.strashko@ti.com> - 2016-01-13 12:50 +0100
Re: [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report Grygorii Strashko <grygorii.strashko@ti.com> - 2016-01-13 21:20 +0100
Re: [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report Grygorii Strashko <grygorii.strashko@ti.com> - 2016-01-14 21:20 +0100
Re: [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-01-14 22:40 +0100
Re: [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report Grygorii Strashko <grygorii.strashko@ti.com> - 2016-01-15 12:40 +0100
Re: [4.4-rc6-rt1 PATCH 0/2] ARM: am437x: boot test report Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-01-15 12:40 +0100
csiph-web