diff mbox series

[2/3] riscv: Fix wrong comment about task size for riscv64

Message ID 20181210062146.24951-3-aghiti@upmem.com (mailing list archive)
State New, archived
Headers show
Series Hugetlbfs support for riscv | expand

Commit Message

Alexandre Ghiti Dec. 10, 2018, 6:21 a.m. UTC
The comment indicated a wrong size which was misleading, after
the following computation, TASK_SIZE is in fact equal to
0x4000000000.

     TASK_SIZE  = (PGDIR_SIZE * PTRS_PER_PGD / 2)
with PGDIR_SIZE = 1 << 30 and PTRS_PER_PGD = 4K / 8 = 0x200
=>   TASK_SIZE = 0x40000000 * 0x100 = 0x4000000000

Signed-off-by: Alexandre Ghiti <aghiti@upmem.com>
---
 arch/riscv/include/asm/pgtable.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig Jan. 15, 2019, 3:58 p.m. UTC | #1
Looks fine to me, and should go in independent of the hugetlb support.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Alexandre Ghiti Jan. 15, 2019, 6:53 p.m. UTC | #2
On 1/15/19 3:58 PM, Christoph Hellwig wrote:
> Looks fine to me, and should go in independent of the hugetlb support.
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks for your review,

Alex

> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
Alexandre Ghiti Feb. 7, 2019, 12:52 p.m. UTC | #3
On 01/15/2019 07:53 PM, Alex Ghiti wrote:
> On 1/15/19 3:58 PM, Christoph Hellwig wrote:
>> Looks fine to me, and should go in independent of the hugetlb support.
>>
>> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Thanks for your review,
>
> Alex

Hi Palmer,

I'm about to send the v2 for hugetlbfs support, do you want me to
merge this patch into it or do you prefer this patch to be separate ?

Thanks,

Alex

>
>> _______________________________________________
>> linux-riscv mailing list
>> linux-riscv@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-riscv
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
diff mbox series

Patch

diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 50ea3d6e7de7..db3bf0dccd0d 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -420,7 +420,7 @@  static inline void pgtable_cache_init(void)
 #define VMALLOC_START    (PAGE_OFFSET - VMALLOC_SIZE)
 
 /*
- * Task size is 0x40000000000 for RV64 or 0xb800000 for RV32.
+ * Task size is 0x4000000000 for RV64 or 0xb800000 for RV32.
  * Note that PGDIR_SIZE must evenly divide TASK_SIZE.
  */
 #ifdef CONFIG_64BIT