Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Alex Ghiti <alex@ghiti.fr>, Palmer Dabbelt <palmer@dabbelt.com>,
	<linux-riscv@lists.infradead.org>
Cc: <palmerdabbelt@google.com>, <paul.walmsley@sifive.com>,
	<aou@eecs.berkeley.edu>
Subject: Re: [PATCH v2] riscv: Add support to allocate gigantic hugepages using CMA
Date: Fri, 30 Jul 2021 21:01:31 +0800	[thread overview]
Message-ID: <3a21d44b-58e6-6fe9-e782-37aeccafb979@huawei.com> (raw)
In-Reply-To: <09d4ec9c-c95a-c6c7-32b8-65822a8a2640@ghiti.fr>


On 2021/7/30 20:09, Alex Ghiti wrote:
> Le 30/07/2021 à 03:30, Kefeng Wang a écrit :
>> commit 9e953cda5cdf ("riscv: Introduce huge page support for32/64bit
>
> "Commit"
>
>> kernel") add support gigantic hugepage support for RV64.
>
> "adds support for gigantic huge pages for RV64."
>
>>
>> This patch add support to allocate gigantic hugepages using CMA by
>
> "adds"
>
>> specifying the hugetlb_cma= kernel parameter on RV64.
>>
>> Cc: Alexandre Ghiti <alex@ghiti.fr>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
>> ---
>> v2: don't disable hugepage support on RV32.
>>
>>   arch/riscv/mm/init.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
>> index a14bf3910eec..e547e53cddd2 100644
>> --- a/arch/riscv/mm/init.c
>> +++ b/arch/riscv/mm/init.c
>> @@ -19,6 +19,7 @@
>>   #include <linux/set_memory.h>
>>   #include <linux/dma-map-ops.h>
>>   #include <linux/crash_dump.h>
>> +#include <linux/hugetlb.h>
>>     #include <asm/fixmap.h>
>>   #include <asm/tlbflush.h>
>> @@ -216,6 +217,8 @@ static void __init setup_bootmem(void)
>>         early_init_fdt_scan_reserved_mem();
>>       dma_contiguous_reserve(dma32_phys_limit);
>> +    if (IS_ENABLED(CONFIG_64BIT))
>> +        hugetlb_cma_reserve(PUD_SHIFT - PAGE_SHIFT);
>>       memblock_allow_resize();
>>   }
>>
>
> Apart from the minor nits above, you can add:
>
> Reviewed-by: Alexandre Ghiti <alex@ghiti.fr>
>
Resend with update, thanks :)
> Thanks!
>
> .
>

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

      reply	other threads:[~2021-07-30 13:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30  1:30 [PATCH v2] riscv: Add support to allocate gigantic hugepages using CMA Kefeng Wang
2021-07-30 12:09 ` Alex Ghiti
2021-07-30 13:01   ` Kefeng Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a21d44b-58e6-6fe9-e782-37aeccafb979@huawei.com \
    --to=wangkefeng.wang@huawei.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=palmerdabbelt@google.com \
    --cc=paul.walmsley@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox