Commit 665c1ef8 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC]: Fix link errors with gcc-4.3
  sparc64: replace remaining __FUNCTION__ occurances
  sparc: replace remaining __FUNCTION__ occurances
  [SPARC]: Add reboot_command[] extern decl to asm/system.h
  [SPARC]: Mark linux_sparc_{fpu,chips} static.
parents 71ca44da f0e98c38
# $Id: Makefile,v 1.62 2000/12/15 00:41:17 davem Exp $ #
# Makefile for the linux kernel. # Makefile for the linux kernel.
# #
...@@ -12,7 +12,8 @@ obj-y := entry.o wof.o wuf.o etrap.o rtrap.o traps.o $(IRQ_OBJS) \ ...@@ -12,7 +12,8 @@ obj-y := entry.o wof.o wuf.o etrap.o rtrap.o traps.o $(IRQ_OBJS) \
sys_sparc.o sunos_asm.o systbls.o \ sys_sparc.o sunos_asm.o systbls.o \
time.o windows.o cpu.o devices.o sclow.o \ time.o windows.o cpu.o devices.o sclow.o \
tadpole.o tick14.o ptrace.o sys_solaris.o \ tadpole.o tick14.o ptrace.o sys_solaris.o \
unaligned.o muldiv.o semaphore.o prom.o of_device.o devres.o unaligned.o una_asm.o muldiv.o semaphore.o \
prom.o of_device.o devres.o
devres-y = ../../../kernel/irq/devres.o devres-y = ../../../kernel/irq/devres.o
......
...@@ -32,7 +32,7 @@ struct cpu_fp_info { ...@@ -32,7 +32,7 @@ struct cpu_fp_info {
/* In order to get the fpu type correct, you need to take the IDPROM's /* In order to get the fpu type correct, you need to take the IDPROM's
* machine type value into consideration too. I will fix this. * machine type value into consideration too. I will fix this.
*/ */
struct cpu_fp_info linux_sparc_fpu[] = { static struct cpu_fp_info linux_sparc_fpu[] = {
{ 0, 0, "Fujitsu MB86910 or Weitek WTL1164/5"}, { 0, 0, "Fujitsu MB86910 or Weitek WTL1164/5"},
{ 0, 1, "Fujitsu MB86911 or Weitek WTL1164/5 or LSI L64831"}, { 0, 1, "Fujitsu MB86911 or Weitek WTL1164/5 or LSI L64831"},
{ 0, 2, "LSI Logic L64802 or Texas Instruments ACT8847"}, { 0, 2, "LSI Logic L64802 or Texas Instruments ACT8847"},
...@@ -76,7 +76,7 @@ struct cpu_fp_info linux_sparc_fpu[] = { ...@@ -76,7 +76,7 @@ struct cpu_fp_info linux_sparc_fpu[] = {
#define NSPARCFPU ARRAY_SIZE(linux_sparc_fpu) #define NSPARCFPU ARRAY_SIZE(linux_sparc_fpu)
struct cpu_iu_info linux_sparc_chips[] = { static struct cpu_iu_info linux_sparc_chips[] = {
/* Sun4/100, 4/200, SLC */ /* Sun4/100, 4/200, SLC */
{ 0, 0, "Fujitsu MB86900/1A or LSI L64831 SparcKIT-40"}, { 0, 0, "Fujitsu MB86900/1A or LSI L64831 SparcKIT-40"},
/* borned STP1012PGA */ /* borned STP1012PGA */
......
...@@ -101,7 +101,7 @@ void __init fill_ebus_child(struct device_node *dp, ...@@ -101,7 +101,7 @@ void __init fill_ebus_child(struct device_node *dp,
prom_printf("UGH: property for %s was %d, need < %d\n", prom_printf("UGH: property for %s was %d, need < %d\n",
dev->prom_node->name, len, dev->prom_node->name, len,
dev->parent->num_addrs); dev->parent->num_addrs);
panic(__FUNCTION__); panic(__func__);
} }
/* XXX resource */ /* XXX resource */
...@@ -162,7 +162,7 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d ...@@ -162,7 +162,7 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
prom_printf("UGH: proplen for %s was %d, need multiple of %d\n", prom_printf("UGH: proplen for %s was %d, need multiple of %d\n",
dev->prom_node->name, len, dev->prom_node->name, len,
(int)sizeof(struct linux_prom_registers)); (int)sizeof(struct linux_prom_registers));
panic(__FUNCTION__); panic(__func__);
} }
dev->num_addrs = len / sizeof(struct linux_prom_registers); dev->num_addrs = len / sizeof(struct linux_prom_registers);
...@@ -324,7 +324,7 @@ void __init ebus_init(void) ...@@ -324,7 +324,7 @@ void __init ebus_init(void)
regs = of_get_property(dp, "reg", &len); regs = of_get_property(dp, "reg", &len);
if (!regs) { if (!regs) {
prom_printf("%s: can't find reg property\n", prom_printf("%s: can't find reg property\n",
__FUNCTION__); __func__);
prom_halt(); prom_halt();
} }
nreg = len / sizeof(struct linux_prom_pci_registers); nreg = len / sizeof(struct linux_prom_pci_registers);
......
...@@ -139,8 +139,6 @@ void cpu_idle(void) ...@@ -139,8 +139,6 @@ void cpu_idle(void)
#endif #endif
extern char reboot_command [];
/* XXX cli/sti -> local_irq_xxx here, check this works once SMP is fixed. */ /* XXX cli/sti -> local_irq_xxx here, check this works once SMP is fixed. */
void machine_halt(void) void machine_halt(void)
{ {
......
/* una_asm.S: Kernel unaligned trap assembler helpers.
*
* Copyright (C) 1996,2005,2008 David S. Miller (davem@davemloft.net)
* Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
*/
#include <linux/errno.h>
.text
retl_efault:
retl
mov -EFAULT, %o0
/* int __do_int_store(unsigned long *dst_addr, int size,
* unsigned long *src_val)
*
* %o0 = dest_addr
* %o1 = size
* %o2 = src_val
*
* Return '0' on success, -EFAULT on failure.
*/
.globl __do_int_store
__do_int_store:
ld [%o2], %g1
cmp %1, 2
be 2f
cmp %1, 4
be 1f
srl %g1, 24, %g2
srl %g1, 16, %g7
4: stb %g2, [%o0]
srl %g1, 8, %g2
5: stb %g7, [%o0 + 1]
ld [%o2 + 4], %g7
6: stb %g2, [%o0 + 2]
srl %g7, 24, %g2
7: stb %g1, [%o0 + 3]
srl %g7, 16, %g1
8: stb %g2, [%o0 + 4]
srl %g7, 8, %g2
9: stb %g1, [%o0 + 5]
10: stb %g2, [%o0 + 6]
b 0f
11: stb %g7, [%o0 + 7]
1: srl %g1, 16, %g7
12: stb %g2, [%o0]
srl %g1, 8, %g2
13: stb %g7, [%o0 + 1]
14: stb %g2, [%o0 + 2]
b 0f
15: stb %g1, [%o0 + 3]
2: srl %g1, 8, %g2
16: stb %g2, [%o0]
17: stb %g1, [%o0 + 1]
0: retl
mov 0, %o0
.section __ex_table,#alloc
.word 4b, retl_efault
.word 5b, retl_efault
.word 6b, retl_efault
.word 7b, retl_efault
.word 8b, retl_efault
.word 9b, retl_efault
.word 10b, retl_efault
.word 11b, retl_efault
.word 12b, retl_efault
.word 13b, retl_efault
.word 14b, retl_efault
.word 15b, retl_efault
.word 16b, retl_efault
.word 17b, retl_efault
.previous
/* int do_int_load(unsigned long *dest_reg, int size,
* unsigned long *saddr, int is_signed)
*
* %o0 = dest_reg
* %o1 = size
* %o2 = saddr
* %o3 = is_signed
*
* Return '0' on success, -EFAULT on failure.
*/
.globl do_int_load
do_int_load:
cmp %o1, 8
be 9f
cmp %o1, 4
be 6f
4: ldub [%o2], %g1
5: ldub [%o2 + 1], %g2
sll %g1, 8, %g1
tst %o3
be 3f
or %g1, %g2, %g1
sll %g1, 16, %g1
sra %g1, 16, %g1
3: b 0f
st %g1, [%o0]
6: ldub [%o2 + 1], %g2
sll %g1, 24, %g1
7: ldub [%o2 + 2], %g7
sll %g2, 16, %g2
8: ldub [%o2 + 3], %g3
sll %g7, 8, %g7
or %g3, %g2, %g3
or %g7, %g3, %g7
or %g1, %g7, %g1
b 0f
st %g1, [%o0]
9: ldub [%o2], %g1
10: ldub [%o2 + 1], %g2
sll %g1, 24, %g1
11: ldub [%o2 + 2], %g7
sll %g2, 16, %g2
12: ldub [%o2 + 3], %g3
sll %g7, 8, %g7
or %g1, %g2, %g1
or %g7, %g3, %g7
or %g1, %g7, %g7
13: ldub [%o2 + 4], %g1
st %g7, [%o0]
14: ldub [%o2 + 5], %g2
sll %g1, 24, %g1
15: ldub [%o2 + 6], %g7
sll %g2, 16, %g2
16: ldub [%o2 + 7], %g3
sll %g7, 8, %g7
or %g1, %g2, %g1
or %g7, %g3, %g7
or %g1, %g7, %g7
st %g7, [%o0 + 4]
0: retl
mov 0, %o0
.section __ex_table,#alloc
.word 4b, retl_efault
.word 5b, retl_efault
.word 6b, retl_efault
.word 7b, retl_efault
.word 8b, retl_efault
.word 9b, retl_efault
.word 10b, retl_efault
.word 11b, retl_efault
.word 12b, retl_efault
.word 13b, retl_efault
.word 14b, retl_efault
.word 15b, retl_efault
.word 16b, retl_efault
.previous
This diff is collapsed.
...@@ -30,7 +30,7 @@ struct cpu_fp_info { ...@@ -30,7 +30,7 @@ struct cpu_fp_info {
char* fp_name; char* fp_name;
}; };
struct cpu_fp_info linux_sparc_fpu[] = { static struct cpu_fp_info linux_sparc_fpu[] = {
{ 0x17, 0x10, 0, "UltraSparc I integrated FPU"}, { 0x17, 0x10, 0, "UltraSparc I integrated FPU"},
{ 0x22, 0x10, 0, "UltraSparc I integrated FPU"}, { 0x22, 0x10, 0, "UltraSparc I integrated FPU"},
{ 0x17, 0x11, 0, "UltraSparc II integrated FPU"}, { 0x17, 0x11, 0, "UltraSparc II integrated FPU"},
...@@ -46,7 +46,7 @@ struct cpu_fp_info linux_sparc_fpu[] = { ...@@ -46,7 +46,7 @@ struct cpu_fp_info linux_sparc_fpu[] = {
#define NSPARCFPU ARRAY_SIZE(linux_sparc_fpu) #define NSPARCFPU ARRAY_SIZE(linux_sparc_fpu)
struct cpu_iu_info linux_sparc_chips[] = { static struct cpu_iu_info linux_sparc_chips[] = {
{ 0x17, 0x10, "TI UltraSparc I (SpitFire)"}, { 0x17, 0x10, "TI UltraSparc I (SpitFire)"},
{ 0x22, 0x10, "TI UltraSparc I (SpitFire)"}, { 0x22, 0x10, "TI UltraSparc I (SpitFire)"},
{ 0x17, 0x11, "TI UltraSparc II (BlackBird)"}, { 0x17, 0x11, "TI UltraSparc II (BlackBird)"},
......
...@@ -114,8 +114,6 @@ void cpu_idle(void) ...@@ -114,8 +114,6 @@ void cpu_idle(void)
} }
} }
extern char reboot_command [];
void machine_halt(void) void machine_halt(void)
{ {
sstate_halt(); sstate_halt();
......
...@@ -28,7 +28,7 @@ extern unsigned sunos_sys_table[]; ...@@ -28,7 +28,7 @@ extern unsigned sunos_sys_table[];
#define SUNOS(x) ((long)sunos_sys_table[x]) #define SUNOS(x) ((long)sunos_sys_table[x])
#ifdef DEBUG_SOLARIS #ifdef DEBUG_SOLARIS
#define SOLD(s) printk("%s,%d,%s(): %s\n",__FILE__,__LINE__,__FUNCTION__,(s)) #define SOLD(s) printk("%s,%d,%s(): %s\n",__FILE__,__LINE__,__func__,(s))
#define SOLDD(s) printk("solaris: "); printk s #define SOLDD(s) printk("solaris: "); printk s
#else #else
#define SOLD(s) #define SOLD(s)
......
...@@ -81,7 +81,7 @@ void mykfree(void *p) ...@@ -81,7 +81,7 @@ void mykfree(void *p)
#define MKCTL_MAGIC 0xDEADBABEBADC0DEDL #define MKCTL_MAGIC 0xDEADBABEBADC0DEDL
#define PUT_MAGIC(a,m) do{(*(u64*)(a))=(m);}while(0) #define PUT_MAGIC(a,m) do{(*(u64*)(a))=(m);}while(0)
#define SCHECK_MAGIC(a,m) do{if((*(u64*)(a))!=(m))printk("%s,%u,%s(): magic %08x at %p corrupted!\n",\ #define SCHECK_MAGIC(a,m) do{if((*(u64*)(a))!=(m))printk("%s,%u,%s(): magic %08x at %p corrupted!\n",\
__FILE__,__LINE__,__FUNCTION__,(m),(a));}while(0) __FILE__,__LINE__,__func__,(m),(a));}while(0)
#define BUF_OFFSET sizeof(u64) #define BUF_OFFSET sizeof(u64)
#define MKCTL_TRAILER sizeof(u64) #define MKCTL_TRAILER sizeof(u64)
......
...@@ -44,6 +44,8 @@ extern enum sparc_cpu sparc_cpu_model; ...@@ -44,6 +44,8 @@ extern enum sparc_cpu sparc_cpu_model;
#define SUN4M_NCPUS 4 /* Architectural limit of sun4m. */ #define SUN4M_NCPUS 4 /* Architectural limit of sun4m. */
extern char reboot_command[];
extern struct thread_info *current_set[NR_CPUS]; extern struct thread_info *current_set[NR_CPUS];
extern unsigned long empty_bad_page; extern unsigned long empty_bad_page;
......
...@@ -30,6 +30,8 @@ enum sparc_cpu { ...@@ -30,6 +30,8 @@ enum sparc_cpu {
#define ARCH_SUN4C_SUN4 0 #define ARCH_SUN4C_SUN4 0
#define ARCH_SUN4 0 #define ARCH_SUN4 0
extern char reboot_command[];
/* These are here in an effort to more fully work around Spitfire Errata /* These are here in an effort to more fully work around Spitfire Errata
* #51. Essentially, if a memory barrier occurs soon after a mispredicted * #51. Essentially, if a memory barrier occurs soon after a mispredicted
* branch, the chip can stop executing instructions until a trap occurs. * branch, the chip can stop executing instructions until a trap occurs.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment