linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Greentime Hu <green.hu@gmail.com>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: Rob Herring <robh@kernel.org>, Albert Ou <aou@eecs.berkeley.edu>,
	Andrew Waterman <andrew@sifive.com>,
	Palmer Dabbelt <palmer@sifive.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Stephen Bates <sbates@raithlin.com>, Zong Li <zong@andestech.com>,
	paul.walmsley@sifive.com, Olof Johansson <olof@lixom.net>,
	greentime.hu@sifive.com, linux-riscv@lists.infradead.org,
	Michael Clark <michaeljclark@mac.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v4 2/2] RISC-V: Implement sparsemem
Date: Thu, 1 Aug 2019 11:34:37 +0800	[thread overview]
Message-ID: <CAEbi=3cn4+7zk2DU1iRa45CDwTsJYfkAV8jXHf-S7Jz63eYy-A@mail.gmail.com> (raw)
In-Reply-To: <c4298fdd-6fd6-fa7f-73f7-5ff016788e49@deltatee.com>

Hi Logan,

Logan Gunthorpe <logang@deltatee.com> 於 2019年8月1日 週四 上午1:08寫道:
>
>
>
> On 2019-07-31 12:30 a.m., Greentime Hu wrote:
> > I look this issue more closely.
> > I found it always sets each memblock region to node 0. Does this make sense?
> > I am not sure if I understand this correctly. Do you have any idea for
> > this? Thank you. :)
>
> Yes, I think this is normal. When we talk about memory nodes we're
> talking about NUMA nodes which is unrelated to device tree nodes.

Ok, but it seems the second memblock_region may overwrite the first
memblock_region in for_each_memblock(memory, reg)  loop. It always
uses this API to set to node 0.
memblock_set_node(PFN_PHYS(start_pfn),PFN_PHYS(end_pfn - start_pfn),
&memblock.memory,0)


> I'm not really sure what's causing the crash. Have you verified it's
> this patch that causes it? Is it related to there being a hole in your
> memory, does it work if you only have one memory node?
>

It works fine if there is only one memory node described in dts.

I think it is related to there being a hole in the device tree script.
I don't actually have a platform with a hole in the memory region, so
I use device tree script to describe it.

The physical address layout will be like this.
2GB-3GB-hole-6GB-7GB

memory@80000000 {
    device_type = "memory";
    reg = <0x0 0x80000000 0x0 0x40000000>;
};
memory@180000000 {
    device_type = "memory";
    reg = <0x1 0x80000000 0x0 0x40000000>;
};

Thank you for the quick reply. :)

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

  reply	other threads:[~2019-08-01  3:35 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-09 20:39 [PATCH v4 0/2] [PATCH v2 0/6] sparsemem support for RISC-V Logan Gunthorpe
2019-01-09 20:39 ` [PATCH v4 1/2] sh: mm: make use of new memblocks_present() helper Logan Gunthorpe
2019-01-15 13:58   ` Christoph Hellwig
2019-01-15 17:30     ` Logan Gunthorpe
2019-01-09 20:39 ` [PATCH v4 2/2] RISC-V: Implement sparsemem Logan Gunthorpe
2019-01-15 13:58   ` Christoph Hellwig
2019-07-31  6:30   ` Greentime Hu
2019-07-31 17:07     ` Logan Gunthorpe
2019-08-01  3:34       ` Greentime Hu [this message]
     [not found]         ` <CAEbi=3eZcgWevpX9VO9ohgxVDFVprk_t52Xbs3-TdtZ+js3NVA@mail.gmail.com>
2019-08-09 15:46           ` Logan Gunthorpe
2019-08-09 17:01             ` Greentime Hu
2019-08-09 19:03               ` Logan Gunthorpe
2019-08-12  4:01                 ` Greentime Hu
2019-08-12 15:51                   ` Logan Gunthorpe
2019-08-13  6:04                     ` Greentime Hu
2019-08-13 16:14                       ` Logan Gunthorpe
2019-08-13 16:39                         ` Paul Walmsley
2019-08-13 16:48                           ` Paul Walmsley
2019-08-13 16:49                           ` Logan Gunthorpe
2019-08-14 13:35                             ` Greentime Hu
2019-08-14 16:56                               ` Logan Gunthorpe
2019-08-14 17:40                                 ` Paul Walmsley
2019-08-14 17:46                                   ` Logan Gunthorpe
2019-08-14 20:09                                     ` Paul Walmsley
2019-08-14 22:21                               ` Logan Gunthorpe
2019-08-15  9:31                                 ` Greentime Hu
2019-08-15 16:20                                   ` Logan Gunthorpe
2019-08-16  2:07                                     ` Greentime Hu

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='CAEbi=3cn4+7zk2DU1iRa45CDwTsJYfkAV8jXHf-S7Jz63eYy-A@mail.gmail.com' \
    --to=green.hu@gmail.com \
    --cc=andrew@sifive.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=greentime.hu@sifive.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=logang@deltatee.com \
    --cc=michaeljclark@mac.com \
    --cc=olof@lixom.net \
    --cc=palmer@sifive.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=sbates@raithlin.com \
    --cc=zong@andestech.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;
as well as URLs for NNTP newsgroup(s).