linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64/fixmap: make notes of fixed_addresses more precisely
@ 2020-07-10 13:43 Pingfan Liu
  2020-07-30 11:09 ` Catalin Marinas
  0 siblings, 1 reply; 6+ messages in thread
From: Pingfan Liu @ 2020-07-10 13:43 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Catalin Marinas, Will Deacon, Pingfan Liu

These 'compile-time allocated' memory buffers can occupy more than one
page. So improve the note about it.

Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
To: linux-arm-kernel@lists.infradead.org
---
 arch/arm64/include/asm/fixmap.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h
index f987b8a..318aee1 100644
--- a/arch/arm64/include/asm/fixmap.h
+++ b/arch/arm64/include/asm/fixmap.h
@@ -29,7 +29,8 @@
  * in the boot process.
  *
  * These 'compile-time allocated' memory buffers are
- * page-sized. Use set_fixmap(idx,phys) to associate
+ * page-sized (or larger if used with an increment
+ * higher than 1). Use set_fixmap(idx,phys) to associate
  * physical memory with fixmap indices.
  *
  */
-- 
2.7.5


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

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

* Re: [PATCH] arm64/fixmap: make notes of fixed_addresses more precisely
  2020-07-10 13:43 [PATCH] arm64/fixmap: make notes of fixed_addresses more precisely Pingfan Liu
@ 2020-07-30 11:09 ` Catalin Marinas
  2020-07-31  2:47   ` Pingfan Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Catalin Marinas @ 2020-07-30 11:09 UTC (permalink / raw)
  To: Pingfan Liu; +Cc: Will Deacon, linux-arm-kernel

On Fri, Jul 10, 2020 at 09:43:22PM +0800, Pingfan Liu wrote:
> These 'compile-time allocated' memory buffers can occupy more than one
> page. So improve the note about it.
> 
> Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> To: linux-arm-kernel@lists.infradead.org
> ---
>  arch/arm64/include/asm/fixmap.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h
> index f987b8a..318aee1 100644
> --- a/arch/arm64/include/asm/fixmap.h
> +++ b/arch/arm64/include/asm/fixmap.h
> @@ -29,7 +29,8 @@
>   * in the boot process.
>   *
>   * These 'compile-time allocated' memory buffers are
> - * page-sized. Use set_fixmap(idx,phys) to associate
> + * page-sized (or larger if used with an increment
> + * higher than 1). Use set_fixmap(idx,phys) to associate
>   * physical memory with fixmap indices.

I don't get this. set_fixmap() only maps a page. Also, what's
"increment" in this context?

-- 
Catalin

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

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

* Re: [PATCH] arm64/fixmap: make notes of fixed_addresses more precisely
  2020-07-30 11:09 ` Catalin Marinas
@ 2020-07-31  2:47   ` Pingfan Liu
  2020-07-31 12:13     ` Catalin Marinas
  0 siblings, 1 reply; 6+ messages in thread
From: Pingfan Liu @ 2020-07-31  2:47 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: Will Deacon, linux-arm-kernel

On Thu, Jul 30, 2020 at 7:09 PM Catalin Marinas <catalin.marinas@arm.com> wrote:
>
> On Fri, Jul 10, 2020 at 09:43:22PM +0800, Pingfan Liu wrote:
> > These 'compile-time allocated' memory buffers can occupy more than one
> > page. So improve the note about it.
> >
> > Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: Will Deacon <will@kernel.org>
> > To: linux-arm-kernel@lists.infradead.org
> > ---
> >  arch/arm64/include/asm/fixmap.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h
> > index f987b8a..318aee1 100644
> > --- a/arch/arm64/include/asm/fixmap.h
> > +++ b/arch/arm64/include/asm/fixmap.h
> > @@ -29,7 +29,8 @@
> >   * in the boot process.
> >   *
> >   * These 'compile-time allocated' memory buffers are
> > - * page-sized. Use set_fixmap(idx,phys) to associate
> > + * page-sized (or larger if used with an increment
> > + * higher than 1). Use set_fixmap(idx,phys) to associate
> >   * physical memory with fixmap indices.
>
> I don't get this. set_fixmap() only maps a page. Also, what's
> "increment" in this context?
I refer to the notes in the counterpart in x86. And for the time
being, it is the case for the ranges (FIX_FDT, FIX_FDT_END), which may
cost more than one page size.

Thanks,
Pingfan

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

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

* Re: [PATCH] arm64/fixmap: make notes of fixed_addresses more precisely
  2020-07-31  2:47   ` Pingfan Liu
@ 2020-07-31 12:13     ` Catalin Marinas
  2020-08-03  2:07       ` Pingfan Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Catalin Marinas @ 2020-07-31 12:13 UTC (permalink / raw)
  To: Pingfan Liu; +Cc: Will Deacon, linux-arm-kernel

On Fri, Jul 31, 2020 at 10:47:13AM +0800, Pingfan Liu wrote:
> On Thu, Jul 30, 2020 at 7:09 PM Catalin Marinas <catalin.marinas@arm.com> wrote:
> > On Fri, Jul 10, 2020 at 09:43:22PM +0800, Pingfan Liu wrote:
> > > These 'compile-time allocated' memory buffers can occupy more than one
> > > page. So improve the note about it.
> > >
> > > Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> > > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > > Cc: Will Deacon <will@kernel.org>
> > > To: linux-arm-kernel@lists.infradead.org
> > > ---
> > >  arch/arm64/include/asm/fixmap.h | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h
> > > index f987b8a..318aee1 100644
> > > --- a/arch/arm64/include/asm/fixmap.h
> > > +++ b/arch/arm64/include/asm/fixmap.h
> > > @@ -29,7 +29,8 @@
> > >   * in the boot process.
> > >   *
> > >   * These 'compile-time allocated' memory buffers are
> > > - * page-sized. Use set_fixmap(idx,phys) to associate
> > > + * page-sized (or larger if used with an increment
> > > + * higher than 1). Use set_fixmap(idx,phys) to associate
> > >   * physical memory with fixmap indices.
> >
> > I don't get this. set_fixmap() only maps a page. Also, what's
> > "increment" in this context?
> 
> I refer to the notes in the counterpart in x86. And for the time
> being, it is the case for the ranges (FIX_FDT, FIX_FDT_END), which may
> cost more than one page size.

OK, so increment refers to the enum increment. But if we update this, we
also need to state that set_fixmap() only maps page-size buffers,
otherwise one may think that set_fixmap(FIX_FDT, phys) maps the whole
FDT. We could say that each enum increment represents a page-sized
buffer.

-- 
Catalin

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

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

* Re: [PATCH] arm64/fixmap: make notes of fixed_addresses more precisely
  2020-07-31 12:13     ` Catalin Marinas
@ 2020-08-03  2:07       ` Pingfan Liu
  2020-08-03 11:53         ` Catalin Marinas
  0 siblings, 1 reply; 6+ messages in thread
From: Pingfan Liu @ 2020-08-03  2:07 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: Will Deacon, linux-arm-kernel

On Fri, Jul 31, 2020 at 8:13 PM Catalin Marinas <catalin.marinas@arm.com> wrote:
>
> On Fri, Jul 31, 2020 at 10:47:13AM +0800, Pingfan Liu wrote:
> > On Thu, Jul 30, 2020 at 7:09 PM Catalin Marinas <catalin.marinas@arm.com> wrote:
> > > On Fri, Jul 10, 2020 at 09:43:22PM +0800, Pingfan Liu wrote:
> > > > These 'compile-time allocated' memory buffers can occupy more than one
> > > > page. So improve the note about it.
> > > >
> > > > Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> > > > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > > > Cc: Will Deacon <will@kernel.org>
> > > > To: linux-arm-kernel@lists.infradead.org
> > > > ---
> > > >  arch/arm64/include/asm/fixmap.h | 3 ++-
> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h
> > > > index f987b8a..318aee1 100644
> > > > --- a/arch/arm64/include/asm/fixmap.h
> > > > +++ b/arch/arm64/include/asm/fixmap.h
> > > > @@ -29,7 +29,8 @@
> > > >   * in the boot process.
> > > >   *
> > > >   * These 'compile-time allocated' memory buffers are
> > > > - * page-sized. Use set_fixmap(idx,phys) to associate
> > > > + * page-sized (or larger if used with an increment
> > > > + * higher than 1). Use set_fixmap(idx,phys) to associate
> > > >   * physical memory with fixmap indices.
> > >
> > > I don't get this. set_fixmap() only maps a page. Also, what's
> > > "increment" in this context?
> >
> > I refer to the notes in the counterpart in x86. And for the time
> > being, it is the case for the ranges (FIX_FDT, FIX_FDT_END), which may
> > cost more than one page size.
>
> OK, so increment refers to the enum increment. But if we update this, we
> also need to state that set_fixmap() only maps page-size buffers,
> otherwise one may think that set_fixmap(FIX_FDT, phys) maps the whole
> FDT. We could say that each enum increment represents a page-sized
> buffer.
What about description like:
diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h
index f987b8a..4335800 100644
--- a/arch/arm64/include/asm/fixmap.h
+++ b/arch/arm64/include/asm/fixmap.h
@@ -28,10 +28,9 @@
  * compile time, but to set the physical address only
  * in the boot process.
  *
- * These 'compile-time allocated' memory buffers are
- * page-sized. Use set_fixmap(idx,phys) to associate
- * physical memory with fixmap indices.
- *
+ * Each enum increment in these 'compile-time allocated'
+ * memory buffers is page-sized. Use set_fixmap(idx,phys)
+ * to associate physical memory with a fixmap index.
  */

Thanks,
Pingfan

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

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

* Re: [PATCH] arm64/fixmap: make notes of fixed_addresses more precisely
  2020-08-03  2:07       ` Pingfan Liu
@ 2020-08-03 11:53         ` Catalin Marinas
  0 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2020-08-03 11:53 UTC (permalink / raw)
  To: Pingfan Liu; +Cc: Will Deacon, linux-arm-kernel

On Mon, Aug 03, 2020 at 10:07:16AM +0800, Pingfan Liu wrote:
> What about description like:
> diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h
> index f987b8a..4335800 100644
> --- a/arch/arm64/include/asm/fixmap.h
> +++ b/arch/arm64/include/asm/fixmap.h
> @@ -28,10 +28,9 @@
>   * compile time, but to set the physical address only
>   * in the boot process.
>   *
> - * These 'compile-time allocated' memory buffers are
> - * page-sized. Use set_fixmap(idx,phys) to associate
> - * physical memory with fixmap indices.
> - *
> + * Each enum increment in these 'compile-time allocated'
> + * memory buffers is page-sized. Use set_fixmap(idx,phys)
> + * to associate physical memory with a fixmap index.
>   */

It looks fine. Please send it as a separate patch. Thanks.

-- 
Catalin

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

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

end of thread, other threads:[~2020-08-03 11:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 13:43 [PATCH] arm64/fixmap: make notes of fixed_addresses more precisely Pingfan Liu
2020-07-30 11:09 ` Catalin Marinas
2020-07-31  2:47   ` Pingfan Liu
2020-07-31 12:13     ` Catalin Marinas
2020-08-03  2:07       ` Pingfan Liu
2020-08-03 11:53         ` Catalin Marinas

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).