Commit 306cf7f1 authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/home/davem/BK/sparc-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 2aceefe4 167f66d3
...@@ -90,11 +90,13 @@ extern void dump_thread(struct pt_regs *, struct user *); ...@@ -90,11 +90,13 @@ extern void dump_thread(struct pt_regs *, struct user *);
#define EXPORT_SYMBOL_DOT(sym) \ #define EXPORT_SYMBOL_DOT(sym) \
extern int __sparc_dot_ ## sym (int) __asm__("." #sym); \ extern int __sparc_dot_ ## sym (int) __asm__("." #sym); \
__EXPORT_SYMBOL(__sparc_dot_ ## sym, "." #sym) const struct kernel_symbol __ksymtab___sparc_dot_##sym \
__attribute__((section("__ksymtab"))) \
= { (unsigned long)&__sparc_dot_##sym , "." #sym }
#define EXPORT_SYMBOL_PRIVATE(sym) \ #define EXPORT_SYMBOL_PRIVATE(sym) \
extern int __sparc_priv_ ## sym (int) __asm__("__" #sym); \ extern int __sparc_priv_ ## sym (int) __asm__("__" #sym); \
const struct module_symbol __export_priv_##sym \ const struct kernel_symbol __export_priv_##sym \
__attribute__((section("__ksymtab"))) = \ __attribute__((section("__ksymtab"))) = \
{ (unsigned long) &__sparc_priv_ ## sym, "__" #sym } { (unsigned long) &__sparc_priv_ ## sym, "__" #sym }
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <net/sock.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#ifndef KERNEL_DS #ifndef KERNEL_DS
#include <linux/segment.h> #include <linux/segment.h>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/string.h> #include <linux/string.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/timex.h> #include <linux/timex.h>
#include <linux/interrupt.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/segment.h> #include <asm/segment.h>
......
...@@ -192,9 +192,9 @@ static void iommu_get_scsi_sgl_pflush(struct scatterlist *sg, int sz, struct sbu ...@@ -192,9 +192,9 @@ static void iommu_get_scsi_sgl_pflush(struct scatterlist *sg, int sz, struct sbu
{ {
unsigned long page, oldpage = 0; unsigned long page, oldpage = 0;
while(sz >= 0) { while(sz != 0) {
--sz; --sz;
page = ((unsigned long) sg[sz].offset) & PAGE_MASK; page = (unsigned long) page_address(sg[sz].page);
if (oldpage == page) if (oldpage == page)
page += PAGE_SIZE; /* We flushed that page already */ page += PAGE_SIZE; /* We flushed that page already */
while(page < (unsigned long)(page_address(sg[sz].page) + sg[sz].offset + sg[sz].length)) { while(page < (unsigned long)(page_address(sg[sz].page) + sg[sz].offset + sg[sz].length)) {
......
...@@ -19,6 +19,7 @@ CC := $(shell if gcc -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then e ...@@ -19,6 +19,7 @@ CC := $(shell if gcc -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then e
NEW_GCC := $(shell if $(CC) -m64 -mcmodel=medlow -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo y; else echo n; fi; ) NEW_GCC := $(shell if $(CC) -m64 -mcmodel=medlow -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo y; else echo n; fi; )
NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi) NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; ) UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; )
INLINE_LIMIT := $(shell if $(CC) -m64 -finline-limit=100000 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo y; else echo n; fi; )
export NEW_GCC export NEW_GCC
...@@ -51,6 +52,10 @@ else ...@@ -51,6 +52,10 @@ else
AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL)
endif endif
ifeq ($(INLINE_LIMIT),y)
CFLAGS := $(CFLAGS) -finline-limit=100000
endif
ifeq ($(CONFIG_MCOUNT),y) ifeq ($(CONFIG_MCOUNT),y)
CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS))
CFLAGS := $(CFLAGS) -pg CFLAGS := $(CFLAGS) -pg
......
...@@ -145,28 +145,28 @@ void __init smp_callin(void) ...@@ -145,28 +145,28 @@ void __init smp_callin(void)
* purposes. Also workaround BB_ERRATA_1 by doing a dummy * purposes. Also workaround BB_ERRATA_1 by doing a dummy
* read back of %tick after writing it. * read back of %tick after writing it.
*/ */
__asm__ __volatile__(" __asm__ __volatile__(
sethi %%hi(0x80000000), %%g1 "sethi %%hi(0x80000000), %%g1\n\t"
ba,pt %%xcc, 1f "ba,pt %%xcc, 1f\n\t"
sllx %%g1, 32, %%g1 " sllx %%g1, 32, %%g1\n\t"
.align 64 ".align 64\n"
1: rd %%tick, %%g2 "1: rd %%tick, %%g2\n\t"
add %%g2, 6, %%g2 "add %%g2, 6, %%g2\n\t"
andn %%g2, %%g1, %%g2 "andn %%g2, %%g1, %%g2\n\t"
wrpr %%g2, 0, %%tick "wrpr %%g2, 0, %%tick\n\t"
rdpr %%tick, %%g0" "rdpr %%tick, %%g0"
: /* no outputs */ : /* no outputs */
: /* no inputs */ : /* no inputs */
: "g1", "g2"); : "g1", "g2");
if (SPARC64_USE_STICK) { if (SPARC64_USE_STICK) {
/* Let the user get at STICK too. */ /* Let the user get at STICK too. */
__asm__ __volatile__(" __asm__ __volatile__(
sethi %%hi(0x80000000), %%g1 "sethi %%hi(0x80000000), %%g1\n\t"
sllx %%g1, 32, %%g1 "sllx %%g1, 32, %%g1\n\t"
rd %%asr24, %%g2 "rd %%asr24, %%g2\n\t"
andn %%g2, %%g1, %%g2 "andn %%g2, %%g1, %%g2\n\t"
wr %%g2, 0, %%asr24" "wr %%g2, 0, %%asr24"
: /* no outputs */ : /* no outputs */
: /* no inputs */ : /* no inputs */
: "g1", "g2"); : "g1", "g2");
...@@ -283,18 +283,18 @@ static void spitfire_xcall_helper(u64 data0, u64 data1, u64 data2, u64 pstate, u ...@@ -283,18 +283,18 @@ static void spitfire_xcall_helper(u64 data0, u64 data1, u64 data2, u64 pstate, u
* ADDR 0x20) for the dummy read. -DaveM * ADDR 0x20) for the dummy read. -DaveM
*/ */
tmp = 0x40; tmp = 0x40;
__asm__ __volatile__(" __asm__ __volatile__(
wrpr %1, %2, %%pstate "wrpr %1, %2, %%pstate\n\t"
stxa %4, [%0] %3 "stxa %4, [%0] %3\n\t"
stxa %5, [%0+%8] %3 "stxa %5, [%0+%8] %3\n\t"
add %0, %8, %0 "add %0, %8, %0\n\t"
stxa %6, [%0+%8] %3 "stxa %6, [%0+%8] %3\n\t"
membar #Sync "membar #Sync\n\t"
stxa %%g0, [%7] %3 "stxa %%g0, [%7] %3\n\t"
membar #Sync "membar #Sync\n\t"
mov 0x20, %%g1 "mov 0x20, %%g1\n\t"
ldxa [%%g1] 0x7f, %%g0 "ldxa [%%g1] 0x7f, %%g0\n\t"
membar #Sync" "membar #Sync"
: "=r" (tmp) : "=r" (tmp)
: "r" (pstate), "i" (PSTATE_IE), "i" (ASI_INTR_W), : "r" (pstate), "i" (PSTATE_IE), "i" (ASI_INTR_W),
"r" (data0), "r" (data1), "r" (data2), "r" (target), "r" (data0), "r" (data1), "r" (data2), "r" (target),
...@@ -1054,21 +1054,21 @@ static void __init smp_setup_percpu_timer(void) ...@@ -1054,21 +1054,21 @@ static void __init smp_setup_percpu_timer(void)
* read back from %tick_cmpr right after writing to it. -DaveM * read back from %tick_cmpr right after writing to it. -DaveM
*/ */
if (!SPARC64_USE_STICK) { if (!SPARC64_USE_STICK) {
__asm__ __volatile__(" __asm__ __volatile__(
rd %%tick, %%g1 "rd %%tick, %%g1\n\t"
ba,pt %%xcc, 1f "ba,pt %%xcc, 1f\n\t"
add %%g1, %0, %%g1 " add %%g1, %0, %%g1\n\t"
.align 64 ".align 64\n"
1: wr %%g1, 0x0, %%tick_cmpr "1: wr %%g1, 0x0, %%tick_cmpr\n\t"
rd %%tick_cmpr, %%g0" "rd %%tick_cmpr, %%g0"
: /* no outputs */ : /* no outputs */
: "r" (current_tick_offset) : "r" (current_tick_offset)
: "g1"); : "g1");
} else { } else {
__asm__ __volatile__(" __asm__ __volatile__(
rd %%asr24, %%g1 "rd %%asr24, %%g1\n\t"
add %%g1, %0, %%g1 "add %%g1, %0, %%g1\n\t"
wr %%g1, 0x0, %%asr25" "wr %%g1, 0x0, %%asr25"
: /* no outputs */ : /* no outputs */
: "r" (current_tick_offset) : "r" (current_tick_offset)
: "g1"); : "g1");
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include <linux/sysctl.h> #include <linux/sysctl.h>
#include <linux/binfmts.h> #include <linux/binfmts.h>
#include <linux/dnotify.h> #include <linux/dnotify.h>
#include <linux/security.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/ipc.h> #include <asm/ipc.h>
...@@ -1096,7 +1097,7 @@ static long do_readv_writev32(int type, struct file *file, ...@@ -1096,7 +1097,7 @@ static long do_readv_writev32(int type, struct file *file,
/* VERIFY_WRITE actually means a read, as we write to user space */ /* VERIFY_WRITE actually means a read, as we write to user space */
if ((retval + (type == VERIFY_WRITE)) > 0) if ((retval + (type == VERIFY_WRITE)) > 0)
dnotify_parent(file->f_dentry, dnotify_parent(file->f_dentry,
(type == VERIFY_WRITE) ? DN_MODIFY : DN_ACCESS); (type == VERIFY_WRITE) ? DN_ACCESS : DN_MODIFY);
return retval; return retval;
} }
......
...@@ -369,6 +369,7 @@ static inline int solaris_sockmod(unsigned int fd, unsigned int cmd, u32 arg) ...@@ -369,6 +369,7 @@ static inline int solaris_sockmod(unsigned int fd, unsigned int cmd, u32 arg)
case 106: /* SI_GETINTRANSIT */ case 106: /* SI_GETINTRANSIT */
case 107: /* SI_TCL_LINK */ case 107: /* SI_TCL_LINK */
case 108: /* SI_TCL_UNLINK */ case 108: /* SI_TCL_UNLINK */
;
} }
return TNOTSUPPORT; return TNOTSUPPORT;
} }
...@@ -456,6 +457,7 @@ static inline int solaris_timod(unsigned int fd, unsigned int cmd, u32 arg, ...@@ -456,6 +457,7 @@ static inline int solaris_timod(unsigned int fd, unsigned int cmd, u32 arg,
case 145: /* TI_GETPEERNAME */ case 145: /* TI_GETPEERNAME */
case 146: /* TI_SETMYNAME */ case 146: /* TI_SETMYNAME */
case 147: /* TI_SETPEERNAME */ case 147: /* TI_SETPEERNAME */
;
} }
return TNOTSUPPORT; return TNOTSUPPORT;
} }
......
...@@ -1586,8 +1586,9 @@ static void __init sunzilog_init_hw(void) ...@@ -1586,8 +1586,9 @@ static void __init sunzilog_init_hw(void)
} else { } else {
/* Normal serial TTY. */ /* Normal serial TTY. */
up->parity_mask = 0xff; up->parity_mask = 0xff;
up->curregs[R3] = RxENAB; up->curregs[R4] = PAR_EVEN | X16CLK | SB1;
up->curregs[R5] = TxENAB; up->curregs[R3] = RxENAB | Rx8;
up->curregs[R5] = TxENAB | Tx8;
up->curregs[R9] = NV | MIE; up->curregs[R9] = NV | MIE;
up->curregs[R10] = NRZ; up->curregs[R10] = NRZ;
up->curregs[R11] = TCBR | RCBR; up->curregs[R11] = TCBR | RCBR;
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/ */
#include <linux/errno.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <xfs_types.h> #include <xfs_types.h>
......
...@@ -56,7 +56,7 @@ typedef struct { ...@@ -56,7 +56,7 @@ typedef struct {
} elf_fpregset_t; } elf_fpregset_t;
#define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \ #define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \
({ ELF_CORE_COPY_REGS((*(__elf_regs)), (__tsk)->thread_info->kregs); 1; }) ({ ELF_CORE_COPY_REGS((*(__elf_regs)), (__tsk)->thread.kregs); 1; })
/* /*
* This is used to ensure we don't load something for the wrong architecture. * This is used to ensure we don't load something for the wrong architecture.
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/threads.h> #include <linux/threads.h>
#include <linux/brlock.h> #include <linux/brlock.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/cache.h>
/* entry.S is sensitive to the offsets of these fields */ /* XXX P3 Is it? */ /* entry.S is sensitive to the offsets of these fields */ /* XXX P3 Is it? */
typedef struct { typedef struct {
......
...@@ -187,9 +187,6 @@ extern unsigned long sbus_ioremap(struct resource *res, unsigned long offset, ...@@ -187,9 +187,6 @@ extern unsigned long sbus_ioremap(struct resource *res, unsigned long offset,
extern void sbus_iounmap(unsigned long vaddr, unsigned long size); extern void sbus_iounmap(unsigned long vaddr, unsigned long size);
#define virt_to_phys(x) __pa((unsigned long)(x))
#define phys_to_virt(x) __va((unsigned long)(x))
/* /*
* At the moment, we do not use CMOS_READ anywhere outside of rtc.c, * At the moment, we do not use CMOS_READ anywhere outside of rtc.c,
* so rtc_port is static in it. This should not change unless a new * so rtc_port is static in it. This should not change unless a new
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
BTFIXUPDEF_CALL(char *, __irq_itoa, unsigned int) BTFIXUPDEF_CALL(char *, __irq_itoa, unsigned int)
#define __irq_itoa(irq) BTFIXUP_CALL(__irq_itoa)(irq) #define __irq_itoa(irq) BTFIXUP_CALL(__irq_itoa)(irq)
#define NR_IRQS 15 #define NR_IRQS 16
#define irq_cannonicalize(irq) (irq) #define irq_cannonicalize(irq) (irq)
......
...@@ -174,6 +174,9 @@ extern __inline__ int get_order(unsigned long size) ...@@ -174,6 +174,9 @@ extern __inline__ int get_order(unsigned long size)
#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET) #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
#define virt_to_phys(x) __pa((unsigned long)(x))
#define phys_to_virt(x) __va((unsigned long)(x))
#define pfn_to_page(pfn) (mem_map + (pfn)) #define pfn_to_page(pfn) (mem_map + (pfn))
#define page_to_pfn(page) ((unsigned long)((page) - mem_map)) #define page_to_pfn(page) ((unsigned long)((page) - mem_map))
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT)) #define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
......
...@@ -110,7 +110,7 @@ static __inline__ char *__irq_itoa(unsigned int irq) ...@@ -110,7 +110,7 @@ static __inline__ char *__irq_itoa(unsigned int irq)
return buff; return buff;
} }
#define NR_IRQS 15 #define NR_IRQS 16
#define irq_cannonicalize(irq) (irq) #define irq_cannonicalize(irq) (irq)
extern void disable_irq(unsigned int); extern void disable_irq(unsigned int);
......
...@@ -279,7 +279,7 @@ static __inline__ int rwsem_atomic_update(int delta, struct rw_semaphore *sem) ...@@ -279,7 +279,7 @@ static __inline__ int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
"mov %%g7, %0\n\t" "mov %%g7, %0\n\t"
: "=&r" (tmp) : "=&r" (tmp)
: "0" (tmp), "r" (sem) : "0" (tmp), "r" (sem)
: "g5", "g7", "memory"); : "g5", "g7", "memory", "cc");
return tmp + delta; return tmp + delta;
} }
......
...@@ -164,6 +164,11 @@ do { spin_unlock_irq(&(prev)->switch_lock); \ ...@@ -164,6 +164,11 @@ do { spin_unlock_irq(&(prev)->switch_lock); \
* not preserve it's value. Hairy, but it lets us remove 2 loads * not preserve it's value. Hairy, but it lets us remove 2 loads
* and 2 stores in this critical code path. -DaveM * and 2 stores in this critical code path. -DaveM
*/ */
#if __GNUC__ >= 3
#define EXTRA_CLOBBER ,"%l1"
#else
#define EXTRA_CLOBBER
#endif
#define switch_to(prev, next, last) \ #define switch_to(prev, next, last) \
do { if (test_thread_flag(TIF_PERFCTR)) { \ do { if (test_thread_flag(TIF_PERFCTR)) { \
unsigned long __tmp; \ unsigned long __tmp; \
...@@ -209,10 +214,11 @@ do { if (test_thread_flag(TIF_PERFCTR)) { \ ...@@ -209,10 +214,11 @@ do { if (test_thread_flag(TIF_PERFCTR)) { \
: "0" (next->thread_info), \ : "0" (next->thread_info), \
"i" (TI_WSTATE), "i" (TI_KSP), "i" (TI_FLAGS), "i" (TI_CWP), \ "i" (TI_WSTATE), "i" (TI_KSP), "i" (TI_FLAGS), "i" (TI_CWP), \
"i" (_TIF_NEWCHILD), "i" (TI_TASK) \ "i" (_TIF_NEWCHILD), "i" (TI_TASK) \
: "cc", "g1", "g2", "g3", "g5", "g7", \ : "cc", \
"g1", "g2", "g3", "g5", "g7", \
"l2", "l3", "l4", "l5", "l6", "l7", \ "l2", "l3", "l4", "l5", "l6", "l7", \
"i0", "i1", "i2", "i3", "i4", "i5", \ "i0", "i1", "i2", "i3", "i4", "i5", \
"o0", "o1", "o2", "o3", "o4", "o5", "o7"); \ "o0", "o1", "o2", "o3", "o4", "o5", "o7" EXTRA_CLOBBER);\
/* If you fuck with this, update ret_from_syscall code too. */ \ /* If you fuck with this, update ret_from_syscall code too. */ \
if (test_thread_flag(TIF_PERFCTR)) { \ if (test_thread_flag(TIF_PERFCTR)) { \
write_pcr(current_thread_info()->pcr_reg); \ write_pcr(current_thread_info()->pcr_reg); \
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/time.h> #include <linux/time.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/fs.h>
#include <linux/init.h> #include <linux/init.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/control.h> #include <sound/control.h>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <sound/driver.h> #include <sound/driver.h>
#include <linux/time.h> #include <linux/time.h>
#include <linux/fs.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/rawmidi.h> #include <sound/rawmidi.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <sound/driver.h> #include <sound/driver.h>
#include <linux/time.h> #include <linux/time.h>
#include <linux/fs.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/timer.h> #include <sound/timer.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <sound/driver.h> #include <sound/driver.h>
#include <linux/time.h> #include <linux/time.h>
#include <linux/fs.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/timer.h> #include <sound/timer.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
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