aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-10-11 03:56:12 -0400
committerJeff Garzik <jeff@garzik.org>2006-10-11 03:56:12 -0400
commit24fcbacedb0d83cabc6761acbecfbf751265ce52 (patch)
tree7147b206304b028c3cfd5de6317e5c8510098ca9 /include/asm-mips
parent2f614fe04f4463ff22234133319067d7361f54e5 (diff)
parent53a5fbdc2dff55161a206ed1a1385a8fa8055c34 (diff)
Merge branch 'master' into upstream-fixes
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/dec/ecc.h3
-rw-r--r--include/asm-mips/dec/kn01.h3
-rw-r--r--include/asm-mips/dec/kn02xa.h3
-rw-r--r--include/asm-mips/fpu.h6
-rw-r--r--include/asm-mips/irq.h8
-rw-r--r--include/asm-mips/irq_regs.h21
-rw-r--r--include/asm-mips/jmr3927/irq.h4
-rw-r--r--include/asm-mips/mach-au1x00/au1000_dma.h3
-rw-r--r--include/asm-mips/mach-au1x00/au1000_usbdev.h73
-rw-r--r--include/asm-mips/marvell.h2
-rw-r--r--include/asm-mips/msc01_ic.h2
-rw-r--r--include/asm-mips/thread_info.h1
-rw-r--r--include/asm-mips/time.h8
13 files changed, 40 insertions, 97 deletions
diff --git a/include/asm-mips/dec/ecc.h b/include/asm-mips/dec/ecc.h
index 19495a490e72..707ffdbc9add 100644
--- a/include/asm-mips/dec/ecc.h
+++ b/include/asm-mips/dec/ecc.h
@@ -49,8 +49,7 @@ struct pt_regs;
49 49
50extern void dec_ecc_be_init(void); 50extern void dec_ecc_be_init(void);
51extern int dec_ecc_be_handler(struct pt_regs *regs, int is_fixup); 51extern int dec_ecc_be_handler(struct pt_regs *regs, int is_fixup);
52extern irqreturn_t dec_ecc_be_interrupt(int irq, void *dev_id, 52extern irqreturn_t dec_ecc_be_interrupt(int irq, void *dev_id);
53 struct pt_regs *regs);
54#endif 53#endif
55 54
56#endif /* __ASM_MIPS_DEC_ECC_H */ 55#endif /* __ASM_MIPS_DEC_ECC_H */
diff --git a/include/asm-mips/dec/kn01.h b/include/asm-mips/dec/kn01.h
index eb522aa1e226..28fa717ac423 100644
--- a/include/asm-mips/dec/kn01.h
+++ b/include/asm-mips/dec/kn01.h
@@ -84,8 +84,7 @@ extern spinlock_t kn01_lock;
84 84
85extern void dec_kn01_be_init(void); 85extern void dec_kn01_be_init(void);
86extern int dec_kn01_be_handler(struct pt_regs *regs, int is_fixup); 86extern int dec_kn01_be_handler(struct pt_regs *regs, int is_fixup);
87extern irqreturn_t dec_kn01_be_interrupt(int irq, void *dev_id, 87extern irqreturn_t dec_kn01_be_interrupt(int irq, void *dev_id);
88 struct pt_regs *regs);
89#endif 88#endif
90 89
91#endif /* __ASM_MIPS_DEC_KN01_H */ 90#endif /* __ASM_MIPS_DEC_KN01_H */
diff --git a/include/asm-mips/dec/kn02xa.h b/include/asm-mips/dec/kn02xa.h
index a25f3d7da7f7..b56b4577f6ef 100644
--- a/include/asm-mips/dec/kn02xa.h
+++ b/include/asm-mips/dec/kn02xa.h
@@ -78,8 +78,7 @@ struct pt_regs;
78 78
79extern void dec_kn02xa_be_init(void); 79extern void dec_kn02xa_be_init(void);
80extern int dec_kn02xa_be_handler(struct pt_regs *regs, int is_fixup); 80extern int dec_kn02xa_be_handler(struct pt_regs *regs, int is_fixup);
81extern irqreturn_t dec_kn02xa_be_interrupt(int irq, void *dev_id, 81extern irqreturn_t dec_kn02xa_be_interrupt(int irq, void *dev_id);
82 struct pt_regs *regs);
83#endif 82#endif
84 83
85#endif /* __ASM_MIPS_DEC_KN02XA_H */ 84#endif /* __ASM_MIPS_DEC_KN02XA_H */
diff --git a/include/asm-mips/fpu.h b/include/asm-mips/fpu.h
index 58c561a9ec6b..efef843b93f0 100644
--- a/include/asm-mips/fpu.h
+++ b/include/asm-mips/fpu.h
@@ -134,9 +134,11 @@ static inline void restore_fp(struct task_struct *tsk)
134 134
135static inline fpureg_t *get_fpu_regs(struct task_struct *tsk) 135static inline fpureg_t *get_fpu_regs(struct task_struct *tsk)
136{ 136{
137 if (cpu_has_fpu) { 137 if (tsk == current) {
138 if ((tsk == current) && __is_fpu_owner()) 138 preempt_disable();
139 if (is_fpu_owner())
139 _save_fp(current); 140 _save_fp(current);
141 preempt_enable();
140 } 142 }
141 143
142 return tsk->thread.fpu.fpr; 144 return tsk->thread.fpu.fpr;
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h
index d35c61776a02..1a9804c65369 100644
--- a/include/asm-mips/irq.h
+++ b/include/asm-mips/irq.h
@@ -26,7 +26,7 @@ static inline int irq_canonicalize(int irq)
26 26
27struct pt_regs; 27struct pt_regs;
28 28
29extern asmlinkage unsigned int do_IRQ(unsigned int irq, struct pt_regs *regs); 29extern asmlinkage unsigned int do_IRQ(unsigned int irq);
30 30
31#ifdef CONFIG_MIPS_MT_SMTC 31#ifdef CONFIG_MIPS_MT_SMTC
32/* 32/*
@@ -55,18 +55,18 @@ do { \
55 * Ideally there should be away to get this into kernel/irq/handle.c to 55 * Ideally there should be away to get this into kernel/irq/handle.c to
56 * avoid the overhead of a call for just a tiny function ... 56 * avoid the overhead of a call for just a tiny function ...
57 */ 57 */
58#define do_IRQ(irq, regs) \ 58#define do_IRQ(irq) \
59do { \ 59do { \
60 irq_enter(); \ 60 irq_enter(); \
61 __DO_IRQ_SMTC_HOOK(); \ 61 __DO_IRQ_SMTC_HOOK(); \
62 __do_IRQ((irq), (regs)); \ 62 __do_IRQ((irq)); \
63 irq_exit(); \ 63 irq_exit(); \
64} while (0) 64} while (0)
65 65
66#endif 66#endif
67 67
68extern void arch_init_irq(void); 68extern void arch_init_irq(void);
69extern void spurious_interrupt(struct pt_regs *regs); 69extern void spurious_interrupt(void);
70 70
71#ifdef CONFIG_MIPS_MT_SMTC 71#ifdef CONFIG_MIPS_MT_SMTC
72struct irqaction; 72struct irqaction;
diff --git a/include/asm-mips/irq_regs.h b/include/asm-mips/irq_regs.h
new file mode 100644
index 000000000000..33bd2a06de57
--- /dev/null
+++ b/include/asm-mips/irq_regs.h
@@ -0,0 +1,21 @@
1/*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License
4 * as published by the Free Software Foundation; either version
5 * 2 of the License, or (at your option) any later version.
6 *
7 * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org)
8 */
9#ifndef __ASM_IRQ_REGS_H
10#define __ASM_IRQ_REGS_H
11
12#define ARCH_HAS_OWN_IRQ_REGS
13
14#include <linux/thread_info.h>
15
16static inline struct pt_regs *get_irq_regs(void)
17{
18 return current_thread_info()->regs;
19}
20
21#endif /* __ASM_IRQ_REGS_H */
diff --git a/include/asm-mips/jmr3927/irq.h b/include/asm-mips/jmr3927/irq.h
index fe551f33a74f..e3e7ed38da6c 100644
--- a/include/asm-mips/jmr3927/irq.h
+++ b/include/asm-mips/jmr3927/irq.h
@@ -45,10 +45,6 @@ extern int
45toshibaboards_setup_irq(int irq, struct irqaction * new); 45toshibaboards_setup_irq(int irq, struct irqaction * new);
46 46
47 47
48#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND
49extern void tx_branch_likely_bug_fixup(struct pt_regs *regs);
50#endif
51
52extern int (*toshibaboards_gen_iack)(void); 48extern int (*toshibaboards_gen_iack)(void);
53 49
54#endif /* !__ASSEMBLY__ */ 50#endif /* !__ASSEMBLY__ */
diff --git a/include/asm-mips/mach-au1x00/au1000_dma.h b/include/asm-mips/mach-au1x00/au1000_dma.h
index 810f2fa33444..9f29520e8fb0 100644
--- a/include/asm-mips/mach-au1x00/au1000_dma.h
+++ b/include/asm-mips/mach-au1x00/au1000_dma.h
@@ -123,8 +123,7 @@ struct dma_chan {
123extern struct dma_chan au1000_dma_table[]; 123extern struct dma_chan au1000_dma_table[];
124extern int request_au1000_dma(int dev_id, 124extern int request_au1000_dma(int dev_id,
125 const char *dev_str, 125 const char *dev_str,
126 irqreturn_t (*irqhandler)(int, void *, 126 irq_handler_t irqhandler,
127 struct pt_regs *),
128 unsigned long irqflags, 127 unsigned long irqflags,
129 void *irq_dev_id); 128 void *irq_dev_id);
130extern void free_au1000_dma(unsigned int dmanr); 129extern void free_au1000_dma(unsigned int dmanr);
diff --git a/include/asm-mips/mach-au1x00/au1000_usbdev.h b/include/asm-mips/mach-au1x00/au1000_usbdev.h
deleted file mode 100644
index 05bc74bed0b1..000000000000
--- a/include/asm-mips/mach-au1x00/au1000_usbdev.h
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * Au1000 USB Device-Side Driver
4 *
5 * Copyright 2001 MontaVista Software Inc.
6 * Author: MontaVista Software, Inc.
7 * stevel@mvista.com or source@mvista.com
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 */
29
30#define USBDEV_REV 0x0110 // BCD
31#define USBDEV_EP0_MAX_PACKET_SIZE 64
32
33typedef enum {
34 ATTACHED = 0,
35 POWERED,
36 DEFAULT,
37 ADDRESS,
38 CONFIGURED
39} usbdev_state_t;
40
41typedef enum {
42 CB_NEW_STATE = 0,
43 CB_PKT_COMPLETE
44} usbdev_cb_type_t;
45
46
47typedef struct usbdev_pkt {
48 int ep_addr; // ep addr this packet routed to
49 int size; // size of payload in bytes
50 unsigned status; // packet status
51 struct usbdev_pkt* next; // function layer can't touch this
52 u8 payload[0]; // the payload
53} usbdev_pkt_t;
54
55#define PKT_STATUS_ACK (1<<0)
56#define PKT_STATUS_NAK (1<<1)
57#define PKT_STATUS_SU (1<<2)
58
59extern int usbdev_init(struct usb_device_descriptor* dev_desc,
60 struct usb_config_descriptor* config_desc,
61 struct usb_interface_descriptor* if_desc,
62 struct usb_endpoint_descriptor* ep_desc,
63 struct usb_string_descriptor* str_desc[],
64 void (*cb)(usbdev_cb_type_t, unsigned long, void *),
65 void* cb_data);
66
67extern void usbdev_exit(void);
68
69extern int usbdev_alloc_packet (int ep_addr, int data_size,
70 usbdev_pkt_t** pkt);
71extern int usbdev_send_packet (int ep_addr, usbdev_pkt_t* pkt);
72extern int usbdev_receive_packet(int ep_addr, usbdev_pkt_t** pkt);
73extern int usbdev_get_byte_count(int ep_addr);
diff --git a/include/asm-mips/marvell.h b/include/asm-mips/marvell.h
index 6bb2125bb053..df94955b098a 100644
--- a/include/asm-mips/marvell.h
+++ b/include/asm-mips/marvell.h
@@ -53,6 +53,6 @@ struct mv_pci_controller {
53 unsigned long config_vreg; 53 unsigned long config_vreg;
54}; 54};
55 55
56extern void ll_mv64340_irq(struct pt_regs *regs); 56extern void ll_mv64340_irq(void);
57 57
58#endif /* __ASM_MIPS_MARVELL_H */ 58#endif /* __ASM_MIPS_MARVELL_H */
diff --git a/include/asm-mips/msc01_ic.h b/include/asm-mips/msc01_ic.h
index 64f17208d602..aa7ad9a71762 100644
--- a/include/asm-mips/msc01_ic.h
+++ b/include/asm-mips/msc01_ic.h
@@ -145,7 +145,7 @@ typedef struct msc_irqmap {
145#define MSC01_IRQ_EDGE 1 145#define MSC01_IRQ_EDGE 1
146 146
147extern void __init init_msc_irqs(unsigned int base, msc_irqmap_t *imp, int nirq); 147extern void __init init_msc_irqs(unsigned int base, msc_irqmap_t *imp, int nirq);
148extern void ll_msc_irq(struct pt_regs *regs); 148extern void ll_msc_irq(void);
149 149
150#endif /* __ASM_MIPS_BOARDS_MSC01_IC_H */ 150#endif /* __ASM_MIPS_BOARDS_MSC01_IC_H */
151 151
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h
index ae8ada5b42a9..e475c45ea263 100644
--- a/include/asm-mips/thread_info.h
+++ b/include/asm-mips/thread_info.h
@@ -34,6 +34,7 @@ struct thread_info {
34 0-0xFFFFFFFF for kernel-thread 34 0-0xFFFFFFFF for kernel-thread
35 */ 35 */
36 struct restart_block restart_block; 36 struct restart_block restart_block;
37 struct pt_regs *regs;
37}; 38};
38 39
39/* 40/*
diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h
index 2d543735668b..28512ba2266e 100644
--- a/include/asm-mips/time.h
+++ b/include/asm-mips/time.h
@@ -67,18 +67,18 @@ extern unsigned long (*do_gettimeoffset)(void);
67/* 67/*
68 * high-level timer interrupt routines. 68 * high-level timer interrupt routines.
69 */ 69 */
70extern irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); 70extern irqreturn_t timer_interrupt(int irq, void *dev_id);
71 71
72/* 72/*
73 * the corresponding low-level timer interrupt routine. 73 * the corresponding low-level timer interrupt routine.
74 */ 74 */
75extern asmlinkage void ll_timer_interrupt(int irq, struct pt_regs *regs); 75extern asmlinkage void ll_timer_interrupt(int irq);
76 76
77/* 77/*
78 * profiling and process accouting is done separately in local_timer_interrupt 78 * profiling and process accouting is done separately in local_timer_interrupt
79 */ 79 */
80extern void local_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); 80extern void local_timer_interrupt(int irq, void *dev_id);
81extern asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs); 81extern asmlinkage void ll_local_timer_interrupt(int irq);
82 82
83/* 83/*
84 * board specific routines required by time_init(). 84 * board specific routines required by time_init().