linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RISCV: Fix end PFN for low memory
@ 2018-09-11 18:30 Atish Patra
  2018-09-17 14:08 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Atish Patra @ 2018-09-11 18:30 UTC (permalink / raw)
  To: palmer, linux-riscv
  Cc: hch, anup, atish.patra, linux-kernel, Damien.LeMoal, terpstra

Use memblock_end_of_DRAM which provides correct last low memory
PFN. Without that, DMA32 region becomes empty resulting in zero
pages being allocated for DMA32.

This patch is based on earlier patch from palmer which never
merged into 4.19. I just edited the commit text to make more
sense.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
---
 arch/riscv/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index db20dc63..a192bf8a 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -193,7 +193,7 @@ static void __init setup_bootmem(void)
 	BUG_ON(mem_size == 0);
 
 	set_max_mapnr(PFN_DOWN(mem_size));
-	max_low_pfn = pfn_base + PFN_DOWN(mem_size);
+	max_low_pfn = memblock_end_of_DRAM();
 
 #ifdef CONFIG_BLK_DEV_INITRD
 	setup_initrd();
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISCV: Fix end PFN for low memory
  2018-09-11 18:30 [PATCH] RISCV: Fix end PFN for low memory Atish Patra
@ 2018-09-17 14:08 ` Christoph Hellwig
  2018-09-24 20:55   ` Atish Patra
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2018-09-17 14:08 UTC (permalink / raw)
  To: Atish Patra
  Cc: palmer, linux-riscv, Damien.LeMoal, anup, linux-kernel, hch, terpstra

On Tue, Sep 11, 2018 at 11:30:18AM -0700, Atish Patra wrote:
> Use memblock_end_of_DRAM which provides correct last low memory
> PFN. Without that, DMA32 region becomes empty resulting in zero
> pages being allocated for DMA32.
> 
> This patch is based on earlier patch from palmer which never
> merged into 4.19. I just edited the commit text to make more
> sense.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

Palmer, can you queue this up for 4.19?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISCV: Fix end PFN for low memory
  2018-09-17 14:08 ` Christoph Hellwig
@ 2018-09-24 20:55   ` Atish Patra
  2018-09-25 17:03     ` Palmer Dabbelt
  0 siblings, 1 reply; 4+ messages in thread
From: Atish Patra @ 2018-09-24 20:55 UTC (permalink / raw)
  To: palmer
  Cc: Christoph Hellwig, linux-riscv, Damien Le Moal, anup,
	linux-kernel, terpstra

On 9/17/18 7:08 AM, Christoph Hellwig wrote:
> On Tue, Sep 11, 2018 at 11:30:18AM -0700, Atish Patra wrote:
>> Use memblock_end_of_DRAM which provides correct last low memory
>> PFN. Without that, DMA32 region becomes empty resulting in zero
>> pages being allocated for DMA32.
>>
>> This patch is based on earlier patch from palmer which never
>> merged into 4.19. I just edited the commit text to make more
>> sense.
> 
> Looks good,
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> Palmer, can you queue this up for 4.19?
> 
Hi Palmer,
I did not see this one pulled into your rc6 PR.
Not sure if it was intentional or just lost in heap of emails.


Regards,
Atish

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISCV: Fix end PFN for low memory
  2018-09-24 20:55   ` Atish Patra
@ 2018-09-25 17:03     ` Palmer Dabbelt
  0 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2018-09-25 17:03 UTC (permalink / raw)
  To: atish.patra
  Cc: Christoph Hellwig, linux-riscv, Damien.LeMoal, anup,
	linux-kernel, terpstra

On Mon, 24 Sep 2018 13:55:04 PDT (-0700), atish.patra@wdc.com wrote:
> On 9/17/18 7:08 AM, Christoph Hellwig wrote:
>> On Tue, Sep 11, 2018 at 11:30:18AM -0700, Atish Patra wrote:
>>> Use memblock_end_of_DRAM which provides correct last low memory
>>> PFN. Without that, DMA32 region becomes empty resulting in zero
>>> pages being allocated for DMA32.
>>>
>>> This patch is based on earlier patch from palmer which never
>>> merged into 4.19. I just edited the commit text to make more
>>> sense.
>>
>> Looks good,
>>
>> Reviewed-by: Christoph Hellwig <hch@lst.de>
>>
>> Palmer, can you queue this up for 4.19?
>>
> Hi Palmer,
> I did not see this one pulled into your rc6 PR.
> Not sure if it was intentional or just lost in heap of emails.

Looks like it got lost, sorry.  It's in my branch now, I might re-spin the rc6 
PR because it looks like I may have screwed it up, if not I'll put it in rc7.

Thanks for the ping!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-25 17:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 18:30 [PATCH] RISCV: Fix end PFN for low memory Atish Patra
2018-09-17 14:08 ` Christoph Hellwig
2018-09-24 20:55   ` Atish Patra
2018-09-25 17:03     ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).