Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1306175 > unrolled thread

[PATCH v3 03/21] arm64: pgtable: add dummy pud_index() and pmd_index() definitions

Started byArd Biesheuvel <ard.biesheuvel@linaro.org>
First post2016-01-11 14:20 +0100
Last post2016-01-12 18:30 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 03/21] arm64: pgtable: add dummy pud_index() and pmd_index() definitions Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-11 14:20 +0100
    Re: [PATCH v3 03/21] arm64: pgtable: add dummy pud_index() and  pmd_index() definitions Mark Rutland <mark.rutland@arm.com> - 2016-01-11 18:50 +0100
      Re: [PATCH v3 03/21] arm64: pgtable: add dummy pud_index() and  pmd_index() definitions Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-12 18:30 +0100

#1306175 — [PATCH v3 03/21] arm64: pgtable: add dummy pud_index() and pmd_index() definitions

FromArd Biesheuvel <ard.biesheuvel@linaro.org>
Date2016-01-11 14:20 +0100
Subject[PATCH v3 03/21] arm64: pgtable: add dummy pud_index() and pmd_index() definitions
Message-ID<qPKy6-2SK-13@gated-at.bofh.it>
Add definitions of pud_index() and pmd_index() for configurations with
fewer than 4 resp. 3 translation levels. This makes it easier to keep
the users (e.g., the fixmap init code) generic.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 arch/arm64/include/asm/pgtable.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index fe9bf47db5d3..6129f6755081 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -495,6 +495,7 @@ static inline phys_addr_t pud_page_paddr(pud_t pud)
 #else
 
 #define pud_page_paddr(pud)	({ BUILD_BUG(); 0; })
+#define pmd_index(addr)		({ BUILD_BUG(); 0; })
 
 /* Match pmd_offset folding in <asm/generic/pgtable-nopmd.h> */
 #define pmd_set_fixmap(addr)		NULL
@@ -542,6 +543,7 @@ static inline phys_addr_t pgd_page_paddr(pgd_t pgd)
 #else
 
 #define pgd_page_paddr(pgd)	({ BUILD_BUG(); 0;})
+#define pud_index(addr)		({ BUILD_BUG(); 0;})
 
 /* Match pud_offset folding in <asm/generic/pgtable-nopud.h> */
 #define pud_set_fixmap(addr)		NULL
-- 
2.5.0

[toc] | [next] | [standalone]


#1306562 — Re: [PATCH v3 03/21] arm64: pgtable: add dummy pud_index() and pmd_index() definitions

FromMark Rutland <mark.rutland@arm.com>
Date2016-01-11 18:50 +0100
SubjectRe: [PATCH v3 03/21] arm64: pgtable: add dummy pud_index() and pmd_index() definitions
Message-ID<qPOLo-5E8-7@gated-at.bofh.it>
In reply to#1306175
On Mon, Jan 11, 2016 at 02:18:56PM +0100, Ard Biesheuvel wrote:
> Add definitions of pud_index() and pmd_index() for configurations with
> fewer than 4 resp. 3 translation levels. This makes it easier to keep
> the users (e.g., the fixmap init code) generic.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  arch/arm64/include/asm/pgtable.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
> index fe9bf47db5d3..6129f6755081 100644
> --- a/arch/arm64/include/asm/pgtable.h
> +++ b/arch/arm64/include/asm/pgtable.h
> @@ -495,6 +495,7 @@ static inline phys_addr_t pud_page_paddr(pud_t pud)
>  #else
>  
>  #define pud_page_paddr(pud)	({ BUILD_BUG(); 0; })
> +#define pmd_index(addr)		({ BUILD_BUG(); 0; })
>  
>  /* Match pmd_offset folding in <asm/generic/pgtable-nopmd.h> */
>  #define pmd_set_fixmap(addr)		NULL
> @@ -542,6 +543,7 @@ static inline phys_addr_t pgd_page_paddr(pgd_t pgd)
>  #else
>  
>  #define pgd_page_paddr(pgd)	({ BUILD_BUG(); 0;})
> +#define pud_index(addr)		({ BUILD_BUG(); 0;})

I think we don't need these if we use p??_ofset_kimg for the fixmap
initialisation.

Regardless, these look good conceptually, so if they're useful
elsewhere:

Reviewed-by: Mark Rutland <mark.rutland@arm.com>

Mark.

[toc] | [prev] | [next] | [standalone]


#1307652 — Re: [PATCH v3 03/21] arm64: pgtable: add dummy pud_index() and pmd_index() definitions

FromArd Biesheuvel <ard.biesheuvel@linaro.org>
Date2016-01-12 18:30 +0100
SubjectRe: [PATCH v3 03/21] arm64: pgtable: add dummy pud_index() and pmd_index() definitions
Message-ID<qQaVA-40U-1@gated-at.bofh.it>
In reply to#1306562
On 11 January 2016 at 18:40, Mark Rutland <mark.rutland@arm.com> wrote:
> On Mon, Jan 11, 2016 at 02:18:56PM +0100, Ard Biesheuvel wrote:
>> Add definitions of pud_index() and pmd_index() for configurations with
>> fewer than 4 resp. 3 translation levels. This makes it easier to keep
>> the users (e.g., the fixmap init code) generic.
>>
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> ---
>>  arch/arm64/include/asm/pgtable.h | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
>> index fe9bf47db5d3..6129f6755081 100644
>> --- a/arch/arm64/include/asm/pgtable.h
>> +++ b/arch/arm64/include/asm/pgtable.h
>> @@ -495,6 +495,7 @@ static inline phys_addr_t pud_page_paddr(pud_t pud)
>>  #else
>>
>>  #define pud_page_paddr(pud)  ({ BUILD_BUG(); 0; })
>> +#define pmd_index(addr)              ({ BUILD_BUG(); 0; })
>>
>>  /* Match pmd_offset folding in <asm/generic/pgtable-nopmd.h> */
>>  #define pmd_set_fixmap(addr)         NULL
>> @@ -542,6 +543,7 @@ static inline phys_addr_t pgd_page_paddr(pgd_t pgd)
>>  #else
>>
>>  #define pgd_page_paddr(pgd)  ({ BUILD_BUG(); 0;})
>> +#define pud_index(addr)              ({ BUILD_BUG(); 0;})
>
> I think we don't need these if we use p??_ofset_kimg for the fixmap
> initialisation.
>
> Regardless, these look good conceptually, so if they're useful
> elsewhere:
>
> Reviewed-by: Mark Rutland <mark.rutland@arm.com>
>

Thanks, but this can indeed be dropped after the proposed changes have
been made to the fixmap init code.

-- 
Ard.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web