All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Mike Rapoport <rppt@linux.ibm.com>
Cc: David Hildenbrand <david@redhat.com>, Alex Ghiti <alex@ghiti.fr>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, linux-mm@kvack.org,
	Vitaly Wool <vitaly.wool@konsulko.com>
Subject: Re: [PATCH v7] RISC-V: enable XIP
Date: Fri, 9 Apr 2021 16:10:15 +0200	[thread overview]
Message-ID: <F096121C-8F7A-4E9A-B319-2C5F656610EA@redhat.com> (raw)
In-Reply-To: <YHBdzPsHantT9r8t@linux.ibm.com>


> Am 09.04.2021 um 15:59 schrieb Mike Rapoport <rppt@linux.ibm.com>:
> 
> On Fri, Apr 09, 2021 at 02:46:17PM +0200, David Hildenbrand wrote:
>>>>> Also, will that memory properly be exposed in the resource tree as
>>>>> System RAM (e.g., /proc/iomem) ? Otherwise some things (/proc/kcore)
>>>>> won't work as expected - the kernel won't be included in a dump.
>>> Do we really need a XIP kernel to included in kdump?
>>> And does not it sound weird to expose flash as System RAM in /proc/iomem? ;-)
>> 
>> See my other mail, maybe we actually want something different.
>> 
>>> 
>>>> I have just checked and it does not appear in /proc/iomem.
>>>> 
>>>> Ok your conclusion would be to have struct page, I'm going to implement this
>>>> version then using memblock as you described.
>>> 
>>> I'm not sure this is required. With XIP kernel text never gets into RAM, so
>>> it does not seem to require struct page.
>>> 
>>> XIP by definition has some limitations relatively to "normal" operation,
>>> so lack of kdump could be one of them.
>> 
>> I agree.
>> 
>>> 
>>> I might be wrong, but IMHO, artificially creating a memory map for part of
>>> flash would cause more problems in the long run.
>> 
>> Can you elaborate?
> 
> Nothing particular, just a gut feeling. Usually, when you force something
> it comes out the wrong way later.
> 
>>> 
>>> BTW, how does XIP account the kernel text on other architectures that
>>> implement it?
>> 
>> Interesting point, I thought XIP would be something new on RISC-V (well, at
>> least to me :) ). If that concept exists already, we better mimic what
>> existing implementations do.
> 
> I had quick glance at ARM, it seems that kernel text does not have memory
> map and does not show up in System RAM.
> 

Does it show up in a different way or not at all?

> -- 
> Sincerely yours,
> Mike.
> 


WARNING: multiple messages have this Message-ID (diff)
From: David Hildenbrand <david@redhat.com>
To: Mike Rapoport <rppt@linux.ibm.com>
Cc: David Hildenbrand <david@redhat.com>, Alex Ghiti <alex@ghiti.fr>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, linux-mm@kvack.org,
	Vitaly Wool <vitaly.wool@konsulko.com>
Subject: Re: [PATCH v7] RISC-V: enable XIP
Date: Fri, 9 Apr 2021 16:10:15 +0200	[thread overview]
Message-ID: <F096121C-8F7A-4E9A-B319-2C5F656610EA@redhat.com> (raw)
In-Reply-To: <YHBdzPsHantT9r8t@linux.ibm.com>


> Am 09.04.2021 um 15:59 schrieb Mike Rapoport <rppt@linux.ibm.com>:
> 
> On Fri, Apr 09, 2021 at 02:46:17PM +0200, David Hildenbrand wrote:
>>>>> Also, will that memory properly be exposed in the resource tree as
>>>>> System RAM (e.g., /proc/iomem) ? Otherwise some things (/proc/kcore)
>>>>> won't work as expected - the kernel won't be included in a dump.
>>> Do we really need a XIP kernel to included in kdump?
>>> And does not it sound weird to expose flash as System RAM in /proc/iomem? ;-)
>> 
>> See my other mail, maybe we actually want something different.
>> 
>>> 
>>>> I have just checked and it does not appear in /proc/iomem.
>>>> 
>>>> Ok your conclusion would be to have struct page, I'm going to implement this
>>>> version then using memblock as you described.
>>> 
>>> I'm not sure this is required. With XIP kernel text never gets into RAM, so
>>> it does not seem to require struct page.
>>> 
>>> XIP by definition has some limitations relatively to "normal" operation,
>>> so lack of kdump could be one of them.
>> 
>> I agree.
>> 
>>> 
>>> I might be wrong, but IMHO, artificially creating a memory map for part of
>>> flash would cause more problems in the long run.
>> 
>> Can you elaborate?
> 
> Nothing particular, just a gut feeling. Usually, when you force something
> it comes out the wrong way later.
> 
>>> 
>>> BTW, how does XIP account the kernel text on other architectures that
>>> implement it?
>> 
>> Interesting point, I thought XIP would be something new on RISC-V (well, at
>> least to me :) ). If that concept exists already, we better mimic what
>> existing implementations do.
> 
> I had quick glance at ARM, it seems that kernel text does not have memory
> map and does not show up in System RAM.
> 

Does it show up in a different way or not at all?

> -- 
> Sincerely yours,
> Mike.
> 


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

  reply	other threads:[~2021-04-09 14:10 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  6:51 [PATCH v7] RISC-V: enable XIP Alexandre Ghiti
2021-04-09  6:51 ` Alexandre Ghiti
2021-04-09  7:14 ` Alex Ghiti
2021-04-09  7:14   ` Alex Ghiti
2021-04-09  8:23   ` David Hildenbrand
2021-04-09  8:23     ` David Hildenbrand
2021-04-09 11:39     ` Alex Ghiti
2021-04-09 11:39       ` Alex Ghiti
2021-04-09 12:07       ` David Hildenbrand
2021-04-09 12:07         ` David Hildenbrand
2021-04-09 12:57         ` Alex Ghiti
2021-04-09 12:57           ` Alex Ghiti
2021-04-09 14:10         ` Mike Rapoport
2021-04-09 14:10           ` Mike Rapoport
2021-04-09 14:16           ` David Hildenbrand
2021-04-09 14:16             ` David Hildenbrand
2021-04-09 12:12       ` Mike Rapoport
2021-04-09 12:12         ` Mike Rapoport
2021-04-09 12:46         ` David Hildenbrand
2021-04-09 12:46           ` David Hildenbrand
2021-04-09 13:59           ` Mike Rapoport
2021-04-09 13:59             ` Mike Rapoport
2021-04-09 14:10             ` David Hildenbrand [this message]
2021-04-09 14:10               ` David Hildenbrand
2021-04-09 14:42             ` Vitaly Wool
2021-04-09 14:42               ` Vitaly Wool
2021-04-09 14:42               ` Vitaly Wool
2021-04-12  5:12               ` Alex Ghiti
2021-04-12  5:12                 ` Alex Ghiti
2021-04-12  7:49                 ` Vitaly Wool
2021-04-12  7:49                   ` Vitaly Wool
2021-04-12  7:49                   ` Vitaly Wool

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=F096121C-8F7A-4E9A-B319-2C5F656610EA@redhat.com \
    --to=david@redhat.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rppt@linux.ibm.com \
    --cc=vitaly.wool@konsulko.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.