lkml.org 
[lkml]   [2014]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 09/28] nios2: Page table management
From
Hi

On Sun, Apr 20, 2014 at 12:05 AM, Pavel Machek <pavel@denx.de> wrote:

>> +static void pgd_init(pgd_t *pgd)
>> +{
>> + unsigned long *p = (unsigned long *) pgd;
>> + int i;
>> +
>> + for (i = 0; i < USER_PTRS_PER_PGD; i += 8) {
>> + p[i + 0] = (unsigned long) invalid_pte_table;
>> + p[i + 1] = (unsigned long) invalid_pte_table;
>> + p[i + 2] = (unsigned long) invalid_pte_table;
>> + p[i + 3] = (unsigned long) invalid_pte_table;
>> + p[i + 4] = (unsigned long) invalid_pte_table;
>> + p[i + 5] = (unsigned long) invalid_pte_table;
>> + p[i + 6] = (unsigned long) invalid_pte_table;
>> + p[i + 7] = (unsigned long) invalid_pte_table;
>> + }
>
> Umm. Manual loop unrolling. Does it really improve performance? Is the
> code hot enough to warrant the uglyness?
We can use the memset here because invalid_pte_table is full 32 bit value.
BTW, arch for score and mips have the similar implementation as well.

Regards


\
 
 \ /
  Last update: 2014-04-22 10:41    [W:2.030 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site