Skip to contentSkip to conversation

arm64: head.S: fix up stale comments

PATCH New Mark Rutland 3 participants 4 messages Jan 9, 2017 – Jan 10, 2017 arm64

lore
Share & tools
lore

Mark Rutland

author reviewer
#0 lore raw

PATCH 1/1 arm64: head.S: fix up stale comments

In commit 23c8a500c24d02dd ("arm64: kernel: use ordinary return/argument register for el2_setup()"), we stopped using w20 as a global stash of the boot mode flag, and instead pass this around in w0 as a function parameter.

Unfortunately, we missed a couple of comments, which still refer to the old convention of using w20/x20.

This patch fixes up the comments to describe the code as it currently works.

Cc Ard Biesheuvel <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm64/kernel/head.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/head.S +2 -2
index 4b1abac..9b0857a 100644
@@ -483,7 +483,7 @@ ENTRY(kimage_vaddr)
  * If we're fortunate enough to boot at EL2, ensure that the world is
  * sane before dropping to EL1.
  *
- * Returns either BOOT_CPU_MODE_EL1 or BOOT_CPU_MODE_EL2 in x20 if
+ * Returns either BOOT_CPU_MODE_EL1 or BOOT_CPU_MODE_EL2 in w0 if
  * booted in EL1 or EL2 respectively.
  */
 ENTRY(el2_setup)
@@ -628,7 +628,7 @@ ENDPROC(el2_setup)
 
 /*
  * Sets the __boot_cpu_mode flag depending on the CPU boot mode passed
- * in x20. See arch/arm64/include/asm/virt.h for more info.
+ * in w0. See arch/arm64/include/asm/virt.h for more info.
  */
 set_cpu_boot_mode_flag:
 	adr_l	x1, __boot_cpu_mode
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 arm64: head.S: fix up stale comments

Quoted 11 lines · Mark Rutland

In commit 23c8a500c24d02dd ("arm64: kernel: use ordinary return/argument register for el2_setup()"), we stopped using w20 as a global stash of the boot mode flag, and instead pass this around in w0 as a function parameter.

Unfortunately, we missed a couple of comments, which still refer to the old convention of using w20/x20.

This patch fixes up the comments to describe the code as it currently works.

Ah yes, apologies for the sloppiness

Quoted 33 lines
Cc Ard Biesheuvel <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm64/kernel/head.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/head.S +2 -3
index 4b1abac..9b0857a 100644
@@ -483,7 +483,7 @@ ENTRY(kimage_vaddr)
  * If we're fortunate enough to boot at EL2, ensure that the world is
  * sane before dropping to EL1.
  *
- * Returns either BOOT_CPU_MODE_EL1 or BOOT_CPU_MODE_EL2 in x20 if
+ * Returns either BOOT_CPU_MODE_EL1 or BOOT_CPU_MODE_EL2 in w0 if
  * booted in EL1 or EL2 respectively.
  */
 ENTRY(el2_setup)
@@ -628,7 +628,7 @@ ENDPROC(el2_setup)
 
 /*
  * Sets the __boot_cpu_mode flag depending on the CPU boot mode passed
- * in x20. See arch/arm64/include/asm/virt.h for more info.
+ * in w0. See arch/arm64/include/asm/virt.h for more info.
  */
 set_cpu_boot_mode_flag:
        adr_l   x1, __boot_cpu_mode
--

1.9.1

author reviewer
#2 lore raw

PATCH 1/1 arm64: head.S: fix up stale comments

Quoted 6 lines · Ard Biesheuvel
Quoted 5 lines · Mark Rutland

In commit 23c8a500c24d02dd ("arm64: kernel: use ordinary return/argument register for el2_setup()"), we stopped using w20 as a global stash of the boot mode flag, and instead pass this around in w0 as a function parameter.

Quoted 8 lines
Quoted 6 lines

Unfortunately, we missed a couple of comments, which still refer to the old convention of using w20/x20.

This patch fixes up the comments to describe the code as it currently works.

Ah yes, apologies for the sloppiness

No worries; I missed this in review, too...

Quoted 1 line

Cheers!

Mark.

Quoted 33 lines
Quoted 33 lines
Cc Ard Biesheuvel <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm64/kernel/head.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/head.S +2 -3
index 4b1abac..9b0857a 100644
@@ -483,7 +483,7 @@ ENTRY(kimage_vaddr)
  * If we're fortunate enough to boot at EL2, ensure that the world is
  * sane before dropping to EL1.
  *
- * Returns either BOOT_CPU_MODE_EL1 or BOOT_CPU_MODE_EL2 in x20 if
+ * Returns either BOOT_CPU_MODE_EL1 or BOOT_CPU_MODE_EL2 in w0 if
  * booted in EL1 or EL2 respectively.
  */
 ENTRY(el2_setup)
@@ -628,7 +628,7 @@ ENDPROC(el2_setup)
 
 /*
  * Sets the __boot_cpu_mode flag depending on the CPU boot mode passed
- * in x20. See arch/arm64/include/asm/virt.h for more info.
+ * in w0. See arch/arm64/include/asm/virt.h for more info.
  */
 set_cpu_boot_mode_flag:
        adr_l   x1, __boot_cpu_mode
--

1.9.1

#3 lore raw

PATCH 1/1 arm64: head.S: fix up stale comments

In reply to Mark Rutland
Quoted 11 lines · Mark Rutland

In commit 23c8a500c24d02dd ("arm64: kernel: use ordinary return/argument register for el2_setup()"), we stopped using w20 as a global stash of the boot mode flag, and instead pass this around in w0 as a function parameter.

Unfortunately, we missed a couple of comments, which still refer to the old convention of using w20/x20.

This patch fixes up the comments to describe the code as it currently works.

Quoted 7 lines
Cc Ard Biesheuvel <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/arm64/kernel/head.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied for 4.11 with Ard's ack.

Will