Skip to contentSkip to conversation

arm64: Align an assembler string properly

PATCH New Radha Mohan 3 participants 5 messages Sep 2, 2013 – Sep 5, 2013 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: Align an assembler string properly

From: Corey Minyard <[email protected]>

Do a proper align and put it in the right section.

---
 arch/arm64/mm/proc.S |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm64/mm/proc.S +2 -1
index 76d8320..1f89adc 100644
@@ -95,10 +95,11 @@ ENTRY(cpu_do_switch_mm)
        ret
 ENDPROC(cpu_do_switch_mm)
 
+       .section ".rodata"
 cpu_name:
        .ascii  "AArch64 Processor"
-       .align
 
+       .align 3
        .section ".text.init", #alloc, #execinstr
 
 /*

--
1.7.1

maintainer
#1 lore raw

PATCH 1/1 arm64: Align an assembler string properly

Quoted 14 lines · Radha Mohan

From: Corey Minyard <[email protected]>

Do a proper align and put it in the right section.

---
 arch/arm64/mm/proc.S |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm64/mm/proc.S +0 -0
index 76d8320..1f89adc 100644

arch/arm64/mm/proc.S ENTRY(cpu_do_switch_mm) · line 103

Quoted 10 lines
arch/arm64/mm/proc.S +2 -1
@@ -95,10 +95,11 @@ ENTRY(cpu_do_switch_mm)
        ret
 ENDPROC(cpu_do_switch_mm)
 
+       .section ".rodata"
 cpu_name:
        .ascii  "AArch64 Processor"
-       .align
 
+       .align 3
        .section ".text.init", #alloc, #execinstr

Oh, we still have this in proc.S. I moved it long time ago to arch/arm64/kernel/cputable.c but forgot about this. It compiles fine after removing it completely.

Signature · 1 line
Catalin
#2 lore raw

PATCH 1/1 arm64: Align an assembler string properly

In reply to Radha Mohan

Hi Catalin,
Can you please review this?

regards,
Radha Mohan

Quoted 28 lines · Radha Mohan

From: Corey Minyard <[email protected]>

Do a proper align and put it in the right section.

---
 arch/arm64/mm/proc.S |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm64/mm/proc.S +2 -2
index 76d8320..1f89adc 100644
@@ -95,10 +95,11 @@ ENTRY(cpu_do_switch_mm)
        ret
 ENDPROC(cpu_do_switch_mm)
 
+       .section ".rodata"
 cpu_name:
        .ascii  "AArch64 Processor"
-       .align
 
+       .align 3
        .section ".text.init", #alloc, #execinstr
 
 /*
--

1.7.1

#3 lore raw

PATCH 1/1 arm64: Align an assembler string properly

Quoted 24 lines · Radha Mohan

Hi Catalin,
Can you please review this?

regards,
Radha Mohan

Quoted 17 lines · Radha Mohan

From: Corey Minyard <[email protected]>

Do a proper align and put it in the right section.

---
 arch/arm64/mm/proc.S |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm64/mm/proc.S +0 -0
index 76d8320..1f89adc 100644
@@ -95,10 +95,11 @@ ENTRY(cpu_do_switch_mm)
        ret
 ENDPROC(cpu_do_switch_mm)
 
Quoted 6 lines

arch/arm64/mm/proc.S ENTRY(cpu_do_switch_mm) · line 102

Quoted 6 lines
arch/arm64/mm/proc.S +2 -1
+       .section ".rodata"
 cpu_name:
        .ascii  "AArch64 Processor"
-       .align
 
+       .align 3

Since cpu_name is local, not referenced, and not next to anything noteworthy (so, unlikely to be found implicitly), I wonder why it's needed at all.

cputable.c:cpu_table just has a C string literal instead, with the same content.

Perhaps proc.S:cpu_name is used in some other way, but I can't see it. The kernel still builds if it is deleted.

Cheers
---Dave

Quoted 10 lines
Quoted 5 lines
arch/arm64/mm/proc.S +0 -1
        .section ".text.init", #alloc, #execinstr
 
 /*
--

1.7.1

_______________________________________________
linaro-kernel mailing list
linaro-kernel at lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-kernel

maintainer
#4 lore raw

PATCH 1/1 arm64: Align an assembler string properly

Quoted 36 lines · Dave P Martin
Quoted 24 lines · Radha Mohan

Hi Catalin,
Can you please review this?

regards,
Radha Mohan

Quoted 17 lines · Radha Mohan

From: Corey Minyard <[email protected]>

Do a proper align and put it in the right section.

---
 arch/arm64/mm/proc.S |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm64/mm/proc.S +0 -0
index 76d8320..1f89adc 100644
@@ -95,10 +95,11 @@ ENTRY(cpu_do_switch_mm)
        ret
 ENDPROC(cpu_do_switch_mm)
 
Quoted 6 lines

arch/arm64/mm/proc.S ENTRY(cpu_do_switch_mm) · line 102

Quoted 6 lines
arch/arm64/mm/proc.S +2 -1
+       .section ".rodata"
 cpu_name:
        .ascii  "AArch64 Processor"
-       .align
 
+       .align 3

Since cpu_name is local, not referenced, and not next to anything noteworthy (so, unlikely to be found implicitly), I wonder why it's needed at all.

Quoted 5 lines

cputable.c:cpu_table just has a C string literal instead, with the same content.

Perhaps proc.S:cpu_name is used in some other way, but I can't see it. The kernel still builds if it is deleted.

I replied couple of days ago but the SMTP server was playing tricks, so still not sure whether it is delayed or dropped. Anyway, what I said was:

Oh, we still have this in proc.S. I moved it long time ago to arch/arm64/kernel/cputable.c but forgot about this. It compiles fine after removing it completely.

And I already pushed a patch to -next removing it (and it will make it to mainline shortly.

Thanks.

Signature · 1 line
Catalin