diff mbox series

riscv: Fix compilation error with FAST_GUP and rv32

Message ID 20240304080247.387710-1-alexghiti@rivosinc.com (mailing list archive)
State Accepted
Commit 2bb7e0c49302feec1c2f777bbfe8726169986ed8
Headers show
Series riscv: Fix compilation error with FAST_GUP and rv32 | expand

Checks

Context Check Description
conchuod/vmtest-fixes-PR success PR summary
conchuod/patch-1-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh
conchuod/patch-1-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh
conchuod/patch-1-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh
conchuod/patch-1-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-1-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-1-test-6 success .github/scripts/patches/tests/checkpatch.sh
conchuod/patch-1-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh
conchuod/patch-1-test-8 success .github/scripts/patches/tests/header_inline.sh
conchuod/patch-1-test-9 success .github/scripts/patches/tests/kdoc.sh
conchuod/patch-1-test-10 success .github/scripts/patches/tests/module_param.sh
conchuod/patch-1-test-11 success .github/scripts/patches/tests/verify_fixes.sh
conchuod/patch-1-test-12 success .github/scripts/patches/tests/verify_signedoff.sh

Commit Message

Alexandre Ghiti March 4, 2024, 8:02 a.m. UTC
By surrounding the definition of pte_leaf_size() with a ifdef napot as
it should have been.

Fixes: e0fe5ab4192c ("riscv: Fix pte_leaf_size() for NAPOT")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
---
 arch/riscv/include/asm/pgtable.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Randy Dunlap March 4, 2024, 4:47 p.m. UTC | #1
On 3/4/24 00:02, Alexandre Ghiti wrote:
> By surrounding the definition of pte_leaf_size() with a ifdef napot as
> it should have been.
> 
> Fixes: e0fe5ab4192c ("riscv: Fix pte_leaf_size() for NAPOT")
> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>


Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
>  arch/riscv/include/asm/pgtable.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
> index 25ca14f6942c..54d26a07fa63 100644
> --- a/arch/riscv/include/asm/pgtable.h
> +++ b/arch/riscv/include/asm/pgtable.h
> @@ -439,9 +439,11 @@ static inline pte_t pte_mkhuge(pte_t pte)
>  	return pte;
>  }
>  
> +#ifdef CONFIG_RISCV_ISA_SVNAPOT
>  #define pte_leaf_size(pte)	(pte_napot(pte) ?				\
>  					napot_cont_size(napot_cont_order(pte)) :\
>  					PAGE_SIZE)
> +#endif
>  
>  #ifdef CONFIG_NUMA_BALANCING
>  /*
patchwork-bot+linux-riscv@kernel.org March 15, 2024, 5:10 p.m. UTC | #2
Hello:

This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Mon,  4 Mar 2024 09:02:47 +0100 you wrote:
> By surrounding the definition of pte_leaf_size() with a ifdef napot as
> it should have been.
> 
> Fixes: e0fe5ab4192c ("riscv: Fix pte_leaf_size() for NAPOT")
> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> ---
>  arch/riscv/include/asm/pgtable.h | 2 ++
>  1 file changed, 2 insertions(+)

Here is the summary with links:
  - riscv: Fix compilation error with FAST_GUP and rv32
    https://git.kernel.org/riscv/c/2bb7e0c49302

You are awesome, thank you!
Palmer Dabbelt March 15, 2024, 5:13 p.m. UTC | #3
On Mon, 04 Mar 2024 08:47:43 PST (-0800), rdunlap@infradead.org wrote:
>
>
> On 3/4/24 00:02, Alexandre Ghiti wrote:
>> By surrounding the definition of pte_leaf_size() with a ifdef napot as
>> it should have been.
>>
>> Fixes: e0fe5ab4192c ("riscv: Fix pte_leaf_size() for NAPOT")
>> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
>
>
> Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Sorry for being slow here, I just realized this was a result of a 
fixes/for-next semantic conflict.  So I've merged this (on top of the 
broken series) into for-next, but I'm going to hold off on sending 
Linus a PR in order to let it get through the testers.

> Thanks.
>
>> ---
>>  arch/riscv/include/asm/pgtable.h | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
>> index 25ca14f6942c..54d26a07fa63 100644
>> --- a/arch/riscv/include/asm/pgtable.h
>> +++ b/arch/riscv/include/asm/pgtable.h
>> @@ -439,9 +439,11 @@ static inline pte_t pte_mkhuge(pte_t pte)
>>  	return pte;
>>  }
>>
>> +#ifdef CONFIG_RISCV_ISA_SVNAPOT
>>  #define pte_leaf_size(pte)	(pte_napot(pte) ?				\
>>  					napot_cont_size(napot_cont_order(pte)) :\
>>  					PAGE_SIZE)
>> +#endif
>>
>>  #ifdef CONFIG_NUMA_BALANCING
>>  /*
diff mbox series

Patch

diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 25ca14f6942c..54d26a07fa63 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -439,9 +439,11 @@  static inline pte_t pte_mkhuge(pte_t pte)
 	return pte;
 }
 
+#ifdef CONFIG_RISCV_ISA_SVNAPOT
 #define pte_leaf_size(pte)	(pte_napot(pte) ?				\
 					napot_cont_size(napot_cont_order(pte)) :\
 					PAGE_SIZE)
+#endif
 
 #ifdef CONFIG_NUMA_BALANCING
 /*