Skip to contentSkip to conversation

arm64/fixmap: make notes of fixed_addresses more precisely

PATCH Superseded Pingfan Liu 2 participants 6 messages Jul 10, 2020 – Aug 3, 2020 arm64

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64/fixmap: make notes of fixed_addresses more precisely

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

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>

To: [email protected]

---
 arch/arm64/include/asm/fixmap.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/include/asm/fixmap.h +2 -1
index f987b8a..318aee1 100644
@@ -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.
  *
  */
Signature · 7 lines
2.7.5


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#1 lore raw
Quoted 16 lines · Pingfan Liu

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

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>

To: [email protected]

---
 arch/arm64/include/asm/fixmap.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/include/asm/fixmap.h +0 -0
index f987b8a..318aee1 100644

arch/arm64/include/asm/fixmap.h line 34

Quoted 7 lines
arch/arm64/include/asm/fixmap.h +2 -1
@@ -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?

Signature · 6 lines
Catalin

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw
Quoted 13 lines · Catalin Marinas
Quoted 11 lines · Pingfan Liu

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

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>

To: [email protected]

---
 arch/arm64/include/asm/fixmap.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 15 lines

arch/arm64/include/asm/fixmap.h line 34

Quoted 12 lines
arch/arm64/include/asm/fixmap.h +2 -1
index f987b8a..318aee1 100644
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#3 lore raw
Quoted 29 lines · Pingfan Liu
Quoted 12 lines · Catalin Marinas
Quoted 11 lines · Pingfan Liu

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

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>

To: [email protected]

---
 arch/arm64/include/asm/fixmap.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 15 lines

arch/arm64/include/asm/fixmap.h line 34

Quoted 12 lines
arch/arm64/include/asm/fixmap.h +2 -1
index f987b8a..318aee1 100644
@@ -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?

Quoted 3 lines

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.

Signature · 6 lines
Catalin

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#4 lore raw
Quoted 35 lines · Catalin Marinas
Quoted 29 lines · Pingfan Liu
Quoted 12 lines · Catalin Marinas
Quoted 11 lines · Pingfan Liu

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

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>

To: [email protected]

---
 arch/arm64/include/asm/fixmap.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 15 lines

arch/arm64/include/asm/fixmap.h line 34

Quoted 12 lines
arch/arm64/include/asm/fixmap.h +2 -1
index f987b8a..318aee1 100644
@@ -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?

Quoted 3 lines

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.

Quoted 5 lines

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:

arch/arm64/include/asm/fixmap.h +3 -4
index f987b8a..4335800 100644
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#5 lore raw
Quoted 7 lines · Pingfan Liu

What about description like:

arch/arm64/include/asm/fixmap.h +0 -0
index f987b8a..4335800 100644
@@ -28,10 +28,9 @@
  * compile time, but to set the physical address only

arch/arm64/include/asm/fixmap.h line 34

Quoted 10 lines
arch/arm64/include/asm/fixmap.h +3 -4
  * 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.

Signature · 6 lines
Catalin

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel