Skip to contentSkip to conversation

sparc: unify kernel/cpu

PATCH In review Sam Ravnborg 4 participants 6 messages Dec 6, 2008 – Dec 9, 2008 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc: unify kernel/cpu

o use cpu_32.c as base
o move all sparc64 definitions to the common cpu.c
o use ifdef for the parts that differs and use cpu_32 as base
o spitfire.h required a CONFIG_SPARC64 guard to fix build on 32 bit

---

This is build tested only!
I need to get a sparc system soon if I shall continue this...

Sam

 arch/sparc/include/asm/spitfire.h     |    4 +-
 arch/sparc/kernel/Makefile            |    2 +-
 arch/sparc/kernel/{cpu_32.c => cpu.c} |   91 ++++++++++++++++++
 arch/sparc/kernel/cpu_64.c            |  167 ---------------------------------
 4 files changed, 95 insertions(+), 169 deletions(-)
 rename arch/sparc/kernel/{cpu_32.c => cpu.c} (70%)
 delete mode 100644 arch/sparc/kernel/cpu_64.c
arch/sparc/include/asm/spitfire.h +3 -1
index 985ea7e..f0d0c40 100644
@@ -6,6 +6,8 @@
 #ifndef _SPARC64_SPITFIRE_H
 #define _SPARC64_SPITFIRE_H
 
+#ifdef CONFIG_SPARC64
+
 #include <asm/asi.h>
 
 /* The following register addresses are accessible via ASI_DMMU
@@ -338,5 +340,5 @@ static inline void cheetah_put_itlb_data(int entry, unsigned long data)
 }
 
 #endif /* !(__ASSEMBLY__) */
-
+#endif /* CONFIG_SPARC64 */
 #endif /* !(_SPARC64_SPITFIRE_H) */
arch/sparc/kernel/Makefile +1 -1
index 04c74d0..0ba314b 100644
@@ -27,7 +27,7 @@ obj-y                   += sys_sparc_$(BITS).o
 obj-$(CONFIG_SPARC32)   += systbls_32.o
 obj-y                   += time_$(BITS).o
 obj-$(CONFIG_SPARC32)   += windows.o
-obj-y                   += cpu_$(BITS).o
+obj-y                   += cpu.o
 obj-$(CONFIG_SPARC32)   += devices.o
 obj-$(CONFIG_SPARC32)   += tadpole.o
 obj-$(CONFIG_SPARC32)   += tick14.o
arch/sparc/kernel/cpu.c renamed from arch/sparc/kernel/cpu_32.c +91 -0

112 lines not on this page · raw message

arch/sparc/kernel/cpu_64.c deleted +0 -167

167 lines not on this page · raw message

Signature · 1 line
1.5.6.GIT
maintainer
#1 lore raw

From: Sam Ravnborg <[email protected]>
Date: Sat, 6 Dec 2008 22:02:37 +0100

Quoted 10 lines

o use cpu_32.c as base
o move all sparc64 definitions to the common cpu.c
o use ifdef for the parts that differs and use cpu_32 as base
o spitfire.h required a CONFIG_SPARC64 guard to fix build on 32 bit

---

This is build tested only!
I need to get a sparc system soon if I shall continue this...

Applied and I'll test this.

Sam, if you want I can give you an account on one of my Niagara systems which is very easy to reboot remotely and does allmodconfig builds from scratch in like 12 minutes :-) Just email me privately if interested.

That would take care of sparc64. For sparc32 it is possible to use qemu for basic kernel testing.

#2 lore raw
In reply to Sam Ravnborg
Quoted 14 lines · David Miller

From: Sam Ravnborg <[email protected]>
Date: Sat, 6 Dec 2008 22:02:37 +0100

Quoted 10 lines

o use cpu_32.c as base
o move all sparc64 definitions to the common cpu.c
o use ifdef for the parts that differs and use cpu_32 as base
o spitfire.h required a CONFIG_SPARC64 guard to fix build on 32 bit

---

This is build tested only!
I need to get a sparc system soon if I shall continue this...

Quoted 6 lines

Applied and I'll test this.

Sam, if you want I can give you an account on one of my Niagara systems which is very easy to reboot remotely and does allmodconfig builds from scratch in like 12 minutes :-) Just email me privately if interested.

If I continue to do sparc hacking it would make sense. But for now I was planning to take a quick sweep over the sparse warnings produced for sparc32 so we get close to the sparc64 level and then be done with it for this time.

I need to do a bit of kbuild hacking soon and m68k needs some love too...

I will keep your offer in mind.

Thanks,
Sam

#3 lore raw
In reply to Sam Ravnborg
Quoted 10 lines · Sam Ravnborg

o use cpu_32.c as base
o move all sparc64 definitions to the common cpu.c
o use ifdef for the parts that differs and use cpu_32 as base
o spitfire.h required a CONFIG_SPARC64 guard to fix build on 32 bit

---

This is build tested only!
I need to get a sparc system soon if I shall continue this...

If you want a sparc64 machine, I have a spare Ultra1e with a 2 GB disk that I'm willing to mail you if you live in Australia or are willing to pay the postage.

Thanks,

Signature · 3 lines
Julian Calaby

Email: [email protected]
#4 lore raw
In reply to Sam Ravnborg
Quoted 9 lines · Julian Calaby
Quoted 8 lines · Sam Ravnborg

o use cpu_32.c as base
o move all sparc64 definitions to the common cpu.c
o use ifdef for the parts that differs and use cpu_32 as base
o spitfire.h required a CONFIG_SPARC64 guard to fix build on 32 bit

---

Quoted 6 lines
Quoted 2 lines

This is build tested only!
I need to get a sparc system soon if I shall continue this...

If you want a sparc64 machine, I have a spare Ultra1e with a 2 GB disk that I'm willing to mail you if you live in Australia or are willing to pay the postage.

Thanks for the offer Julian!

As I live at the other side of the world there would be some postage involded. But I actually have a Ultra 10 that just need a new disk so I will try to get that running if I get bored during christmas.

Sam

#5 lore raw
In reply to Sam Ravnborg

Hi Guy's

Quoted 10 lines · Sam Ravnborg
Quoted 8 lines · Julian Calaby
Quoted 3 lines · Sam Ravnborg

This is build tested only!
I need to get a sparc system soon if I shall continue this...

If you want a sparc64 machine, I have a spare Ultra1e with a 2 GB disk that I'm willing to mail you if you live in Australia or are willing to pay the postage.

Quoted 5 lines

Thanks for the offer Julian!

As I live at the other side of the world there would be some postage involded. But I actually have a Ultra 10 that just need a new disk so I will try to get that running if I get bored during christmas.

I it a idea to create a small build (internet based) cluster?

Thanks,

Frans van Berckel