diff options
Diffstat (limited to 'include/asm-m68k')
-rw-r--r-- | include/asm-m68k/amigaints.h | 96 | ||||
-rw-r--r-- | include/asm-m68k/apollohw.h | 4 | ||||
-rw-r--r-- | include/asm-m68k/atari_stdma.h | 2 | ||||
-rw-r--r-- | include/asm-m68k/atariints.h | 11 | ||||
-rw-r--r-- | include/asm-m68k/bvme6000hw.h | 30 | ||||
-rw-r--r-- | include/asm-m68k/cacheflush.h | 40 | ||||
-rw-r--r-- | include/asm-m68k/dma-mapping.h | 90 | ||||
-rw-r--r-- | include/asm-m68k/irq.h | 106 | ||||
-rw-r--r-- | include/asm-m68k/mac_oss.h | 10 | ||||
-rw-r--r-- | include/asm-m68k/machdep.h | 6 | ||||
-rw-r--r-- | include/asm-m68k/macintosh.h | 10 | ||||
-rw-r--r-- | include/asm-m68k/macints.h | 14 | ||||
-rw-r--r-- | include/asm-m68k/mvme147hw.h | 44 | ||||
-rw-r--r-- | include/asm-m68k/mvme16xhw.h | 40 | ||||
-rw-r--r-- | include/asm-m68k/scatterlist.h | 9 | ||||
-rw-r--r-- | include/asm-m68k/signal.h | 19 | ||||
-rw-r--r-- | include/asm-m68k/sun3ints.h | 22 | ||||
-rw-r--r-- | include/asm-m68k/traps.h | 7 | ||||
-rw-r--r-- | include/asm-m68k/uaccess.h | 234 |
19 files changed, 418 insertions, 376 deletions
diff --git a/include/asm-m68k/amigaints.h b/include/asm-m68k/amigaints.h index aa968d014bb6..7c8713468fd2 100644 --- a/include/asm-m68k/amigaints.h +++ b/include/asm-m68k/amigaints.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef _ASMm68k_AMIGAINTS_H_ | 13 | #ifndef _ASMm68k_AMIGAINTS_H_ |
14 | #define _ASMm68k_AMIGAINTS_H_ | 14 | #define _ASMm68k_AMIGAINTS_H_ |
15 | 15 | ||
16 | #include <asm/irq.h> | ||
17 | |||
16 | /* | 18 | /* |
17 | ** Amiga Interrupt sources. | 19 | ** Amiga Interrupt sources. |
18 | ** | 20 | ** |
@@ -23,72 +25,52 @@ | |||
23 | #define CIA_IRQS (5) | 25 | #define CIA_IRQS (5) |
24 | #define AMI_IRQS (32) /* AUTO_IRQS+AMI_STD_IRQS+2*CIA_IRQS */ | 26 | #define AMI_IRQS (32) /* AUTO_IRQS+AMI_STD_IRQS+2*CIA_IRQS */ |
25 | 27 | ||
26 | /* vertical blanking interrupt */ | 28 | /* builtin serial port interrupts */ |
27 | #define IRQ_AMIGA_VERTB 0 | 29 | #define IRQ_AMIGA_TBE (IRQ_USER+0) |
30 | #define IRQ_AMIGA_RBF (IRQ_USER+11) | ||
28 | 31 | ||
29 | /* copper interrupt */ | 32 | /* floppy disk interrupts */ |
30 | #define IRQ_AMIGA_COPPER 1 | 33 | #define IRQ_AMIGA_DSKBLK (IRQ_USER+1) |
34 | #define IRQ_AMIGA_DSKSYN (IRQ_USER+12) | ||
31 | 35 | ||
32 | /* Audio interrupts */ | 36 | /* software interrupts */ |
33 | #define IRQ_AMIGA_AUD0 2 | 37 | #define IRQ_AMIGA_SOFT (IRQ_USER+2) |
34 | #define IRQ_AMIGA_AUD1 3 | ||
35 | #define IRQ_AMIGA_AUD2 4 | ||
36 | #define IRQ_AMIGA_AUD3 5 | ||
37 | 38 | ||
38 | /* Blitter done interrupt */ | 39 | /* interrupts from external hardware */ |
39 | #define IRQ_AMIGA_BLIT 6 | 40 | #define IRQ_AMIGA_PORTS IRQ_AUTO_2 |
41 | #define IRQ_AMIGA_EXTER IRQ_AUTO_6 | ||
40 | 42 | ||
41 | /* floppy disk interrupts */ | 43 | /* copper interrupt */ |
42 | #define IRQ_AMIGA_DSKSYN 7 | 44 | #define IRQ_AMIGA_COPPER (IRQ_USER+4) |
43 | #define IRQ_AMIGA_DSKBLK 8 | ||
44 | 45 | ||
45 | /* builtin serial port interrupts */ | 46 | /* vertical blanking interrupt */ |
46 | #define IRQ_AMIGA_RBF 9 | 47 | #define IRQ_AMIGA_VERTB (IRQ_USER+5) |
47 | #define IRQ_AMIGA_TBE 10 | ||
48 | 48 | ||
49 | /* software interrupts */ | 49 | /* Blitter done interrupt */ |
50 | #define IRQ_AMIGA_SOFT 11 | 50 | #define IRQ_AMIGA_BLIT (IRQ_USER+6) |
51 | 51 | ||
52 | /* interrupts from external hardware */ | 52 | /* Audio interrupts */ |
53 | #define IRQ_AMIGA_PORTS 12 | 53 | #define IRQ_AMIGA_AUD0 (IRQ_USER+7) |
54 | #define IRQ_AMIGA_EXTER 13 | 54 | #define IRQ_AMIGA_AUD1 (IRQ_USER+8) |
55 | #define IRQ_AMIGA_AUD2 (IRQ_USER+9) | ||
56 | #define IRQ_AMIGA_AUD3 (IRQ_USER+10) | ||
55 | 57 | ||
56 | /* CIA interrupt sources */ | 58 | /* CIA interrupt sources */ |
57 | #define IRQ_AMIGA_CIAA 14 | 59 | #define IRQ_AMIGA_CIAA (IRQ_USER+14) |
58 | #define IRQ_AMIGA_CIAA_TA 14 | 60 | #define IRQ_AMIGA_CIAA_TA (IRQ_USER+14) |
59 | #define IRQ_AMIGA_CIAA_TB 15 | 61 | #define IRQ_AMIGA_CIAA_TB (IRQ_USER+15) |
60 | #define IRQ_AMIGA_CIAA_ALRM 16 | 62 | #define IRQ_AMIGA_CIAA_ALRM (IRQ_USER+16) |
61 | #define IRQ_AMIGA_CIAA_SP 17 | 63 | #define IRQ_AMIGA_CIAA_SP (IRQ_USER+17) |
62 | #define IRQ_AMIGA_CIAA_FLG 18 | 64 | #define IRQ_AMIGA_CIAA_FLG (IRQ_USER+18) |
63 | #define IRQ_AMIGA_CIAB 19 | 65 | #define IRQ_AMIGA_CIAB (IRQ_USER+19) |
64 | #define IRQ_AMIGA_CIAB_TA 19 | 66 | #define IRQ_AMIGA_CIAB_TA (IRQ_USER+19) |
65 | #define IRQ_AMIGA_CIAB_TB 20 | 67 | #define IRQ_AMIGA_CIAB_TB (IRQ_USER+20) |
66 | #define IRQ_AMIGA_CIAB_ALRM 21 | 68 | #define IRQ_AMIGA_CIAB_ALRM (IRQ_USER+21) |
67 | #define IRQ_AMIGA_CIAB_SP 22 | 69 | #define IRQ_AMIGA_CIAB_SP (IRQ_USER+22) |
68 | #define IRQ_AMIGA_CIAB_FLG 23 | 70 | #define IRQ_AMIGA_CIAB_FLG (IRQ_USER+23) |
69 | |||
70 | /* auto-vector interrupts */ | ||
71 | #define IRQ_AMIGA_AUTO 24 | ||
72 | #define IRQ_AMIGA_AUTO_0 24 /* This is just a dummy */ | ||
73 | #define IRQ_AMIGA_AUTO_1 25 | ||
74 | #define IRQ_AMIGA_AUTO_2 26 | ||
75 | #define IRQ_AMIGA_AUTO_3 27 | ||
76 | #define IRQ_AMIGA_AUTO_4 28 | ||
77 | #define IRQ_AMIGA_AUTO_5 29 | ||
78 | #define IRQ_AMIGA_AUTO_6 30 | ||
79 | #define IRQ_AMIGA_AUTO_7 31 | ||
80 | |||
81 | #define IRQ_FLOPPY IRQ_AMIGA_DSKBLK | ||
82 | 71 | ||
83 | /* INTREQR masks */ | ||
84 | #define IRQ1_MASK 0x0007 /* INTREQR mask for IRQ 1 */ | ||
85 | #define IRQ2_MASK 0x0008 /* INTREQR mask for IRQ 2 */ | ||
86 | #define IRQ3_MASK 0x0070 /* INTREQR mask for IRQ 3 */ | ||
87 | #define IRQ4_MASK 0x0780 /* INTREQR mask for IRQ 4 */ | ||
88 | #define IRQ5_MASK 0x1800 /* INTREQR mask for IRQ 5 */ | ||
89 | #define IRQ6_MASK 0x2000 /* INTREQR mask for IRQ 6 */ | ||
90 | #define IRQ7_MASK 0x4000 /* INTREQR mask for IRQ 7 */ | ||
91 | 72 | ||
73 | /* INTREQR masks */ | ||
92 | #define IF_SETCLR 0x8000 /* set/clr bit */ | 74 | #define IF_SETCLR 0x8000 /* set/clr bit */ |
93 | #define IF_INTEN 0x4000 /* master interrupt bit in INT* registers */ | 75 | #define IF_INTEN 0x4000 /* master interrupt bit in INT* registers */ |
94 | #define IF_EXTER 0x2000 /* external level 6 and CIA B interrupt */ | 76 | #define IF_EXTER 0x2000 /* external level 6 and CIA B interrupt */ |
@@ -106,9 +88,6 @@ | |||
106 | #define IF_DSKBLK 0x0002 /* diskblock DMA finished */ | 88 | #define IF_DSKBLK 0x0002 /* diskblock DMA finished */ |
107 | #define IF_TBE 0x0001 /* serial transmit buffer empty interrupt */ | 89 | #define IF_TBE 0x0001 /* serial transmit buffer empty interrupt */ |
108 | 90 | ||
109 | extern void amiga_do_irq(int irq, struct pt_regs *fp); | ||
110 | extern void amiga_do_irq_list(int irq, struct pt_regs *fp); | ||
111 | |||
112 | /* CIA interrupt control register bits */ | 91 | /* CIA interrupt control register bits */ |
113 | 92 | ||
114 | #define CIA_ICR_TA 0x01 | 93 | #define CIA_ICR_TA 0x01 |
@@ -125,6 +104,7 @@ extern void amiga_do_irq_list(int irq, struct pt_regs *fp); | |||
125 | 104 | ||
126 | extern struct ciabase ciaa_base, ciab_base; | 105 | extern struct ciabase ciaa_base, ciab_base; |
127 | 106 | ||
107 | extern void cia_init_IRQ(struct ciabase *base); | ||
128 | extern unsigned char cia_set_irq(struct ciabase *base, unsigned char mask); | 108 | extern unsigned char cia_set_irq(struct ciabase *base, unsigned char mask); |
129 | extern unsigned char cia_able_irq(struct ciabase *base, unsigned char mask); | 109 | extern unsigned char cia_able_irq(struct ciabase *base, unsigned char mask); |
130 | 110 | ||
diff --git a/include/asm-m68k/apollohw.h b/include/asm-m68k/apollohw.h index 4304e1c33e17..a1373b9aa281 100644 --- a/include/asm-m68k/apollohw.h +++ b/include/asm-m68k/apollohw.h | |||
@@ -3,6 +3,8 @@ | |||
3 | #ifndef _ASMm68k_APOLLOHW_H_ | 3 | #ifndef _ASMm68k_APOLLOHW_H_ |
4 | #define _ASMm68k_APOLLOHW_H_ | 4 | #define _ASMm68k_APOLLOHW_H_ |
5 | 5 | ||
6 | #include <linux/types.h> | ||
7 | |||
6 | /* | 8 | /* |
7 | apollo models | 9 | apollo models |
8 | */ | 10 | */ |
@@ -101,4 +103,6 @@ extern u_long timer_physaddr; | |||
101 | 103 | ||
102 | #define isaIO2mem(x) (((((x) & 0x3f8) << 7) | (((x) & 0xfc00) >> 6) | ((x) & 0x7)) + 0x40000 + IO_BASE) | 104 | #define isaIO2mem(x) (((((x) & 0x3f8) << 7) | (((x) & 0xfc00) >> 6) | ((x) & 0x7)) + 0x40000 + IO_BASE) |
103 | 105 | ||
106 | #define IRQ_APOLLO IRQ_USER | ||
107 | |||
104 | #endif | 108 | #endif |
diff --git a/include/asm-m68k/atari_stdma.h b/include/asm-m68k/atari_stdma.h index 64f92880ce43..b4eadf852738 100644 --- a/include/asm-m68k/atari_stdma.h +++ b/include/asm-m68k/atari_stdma.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #define _atari_stdma_h | 3 | #define _atari_stdma_h |
4 | 4 | ||
5 | 5 | ||
6 | #include <asm/irq.h> | 6 | #include <linux/interrupt.h> |
7 | 7 | ||
8 | 8 | ||
9 | /***************************** Prototypes *****************************/ | 9 | /***************************** Prototypes *****************************/ |
diff --git a/include/asm-m68k/atariints.h b/include/asm-m68k/atariints.h index 42952c890593..0ed454fc24bb 100644 --- a/include/asm-m68k/atariints.h +++ b/include/asm-m68k/atariints.h | |||
@@ -45,17 +45,6 @@ | |||
45 | #define IRQ_TYPE_FAST 1 | 45 | #define IRQ_TYPE_FAST 1 |
46 | #define IRQ_TYPE_PRIO 2 | 46 | #define IRQ_TYPE_PRIO 2 |
47 | 47 | ||
48 | #define IRQ_SPURIOUS (0) | ||
49 | |||
50 | /* auto-vector interrupts */ | ||
51 | #define IRQ_AUTO_1 (1) | ||
52 | #define IRQ_AUTO_2 (2) | ||
53 | #define IRQ_AUTO_3 (3) | ||
54 | #define IRQ_AUTO_4 (4) | ||
55 | #define IRQ_AUTO_5 (5) | ||
56 | #define IRQ_AUTO_6 (6) | ||
57 | #define IRQ_AUTO_7 (7) | ||
58 | |||
59 | /* ST-MFP interrupts */ | 48 | /* ST-MFP interrupts */ |
60 | #define IRQ_MFP_BUSY (8) | 49 | #define IRQ_MFP_BUSY (8) |
61 | #define IRQ_MFP_DCD (9) | 50 | #define IRQ_MFP_DCD (9) |
diff --git a/include/asm-m68k/bvme6000hw.h b/include/asm-m68k/bvme6000hw.h index 28a859b03959..f40d2f8510ee 100644 --- a/include/asm-m68k/bvme6000hw.h +++ b/include/asm-m68k/bvme6000hw.h | |||
@@ -109,23 +109,23 @@ typedef struct { | |||
109 | 109 | ||
110 | #define BVME_IRQ_TYPE_PRIO 0 | 110 | #define BVME_IRQ_TYPE_PRIO 0 |
111 | 111 | ||
112 | #define BVME_IRQ_PRN 0x54 | 112 | #define BVME_IRQ_PRN (IRQ_USER+20) |
113 | #define BVME_IRQ_I596 0x1a | 113 | #define BVME_IRQ_TIMER (IRQ_USER+25) |
114 | #define BVME_IRQ_SCSI 0x1b | 114 | #define BVME_IRQ_I596 IRQ_AUTO_2 |
115 | #define BVME_IRQ_TIMER 0x59 | 115 | #define BVME_IRQ_SCSI IRQ_AUTO_3 |
116 | #define BVME_IRQ_RTC 0x1e | 116 | #define BVME_IRQ_RTC IRQ_AUTO_6 |
117 | #define BVME_IRQ_ABORT 0x1f | 117 | #define BVME_IRQ_ABORT IRQ_AUTO_7 |
118 | 118 | ||
119 | /* SCC interrupts */ | 119 | /* SCC interrupts */ |
120 | #define BVME_IRQ_SCC_BASE 0x40 | 120 | #define BVME_IRQ_SCC_BASE IRQ_USER |
121 | #define BVME_IRQ_SCCB_TX 0x40 | 121 | #define BVME_IRQ_SCCB_TX IRQ_USER |
122 | #define BVME_IRQ_SCCB_STAT 0x42 | 122 | #define BVME_IRQ_SCCB_STAT (IRQ_USER+2) |
123 | #define BVME_IRQ_SCCB_RX 0x44 | 123 | #define BVME_IRQ_SCCB_RX (IRQ_USER+4) |
124 | #define BVME_IRQ_SCCB_SPCOND 0x46 | 124 | #define BVME_IRQ_SCCB_SPCOND (IRQ_USER+6) |
125 | #define BVME_IRQ_SCCA_TX 0x48 | 125 | #define BVME_IRQ_SCCA_TX (IRQ_USER+8) |
126 | #define BVME_IRQ_SCCA_STAT 0x4a | 126 | #define BVME_IRQ_SCCA_STAT (IRQ_USER+10) |
127 | #define BVME_IRQ_SCCA_RX 0x4c | 127 | #define BVME_IRQ_SCCA_RX (IRQ_USER+12) |
128 | #define BVME_IRQ_SCCA_SPCOND 0x4e | 128 | #define BVME_IRQ_SCCA_SPCOND (IRQ_USER+14) |
129 | 129 | ||
130 | /* Address control registers */ | 130 | /* Address control registers */ |
131 | 131 | ||
diff --git a/include/asm-m68k/cacheflush.h b/include/asm-m68k/cacheflush.h index 8aba971b1368..24d3ff449135 100644 --- a/include/asm-m68k/cacheflush.h +++ b/include/asm-m68k/cacheflush.h | |||
@@ -3,26 +3,30 @@ | |||
3 | 3 | ||
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | 5 | ||
6 | /* cache code */ | ||
7 | #define FLUSH_I_AND_D (0x00000808) | ||
8 | #define FLUSH_I (0x00000008) | ||
9 | |||
6 | /* | 10 | /* |
7 | * Cache handling functions | 11 | * Cache handling functions |
8 | */ | 12 | */ |
9 | 13 | ||
10 | #define flush_icache() \ | 14 | static inline void flush_icache(void) |
11 | ({ \ | 15 | { |
12 | if (CPU_IS_040_OR_060) \ | 16 | if (CPU_IS_040_OR_060) |
13 | __asm__ __volatile__("nop\n\t" \ | 17 | asm volatile ( "nop\n" |
14 | ".chip 68040\n\t" \ | 18 | " .chip 68040\n" |
15 | "cinva %%ic\n\t" \ | 19 | " cpusha %bc\n" |
16 | ".chip 68k" : ); \ | 20 | " .chip 68k"); |
17 | else { \ | 21 | else { |
18 | unsigned long _tmp; \ | 22 | unsigned long tmp; |
19 | __asm__ __volatile__("movec %%cacr,%0\n\t" \ | 23 | asm volatile ( "movec %%cacr,%0\n" |
20 | "orw %1,%0\n\t" \ | 24 | " or.w %1,%0\n" |
21 | "movec %0,%%cacr" \ | 25 | " movec %0,%%cacr" |
22 | : "=&d" (_tmp) \ | 26 | : "=&d" (tmp) |
23 | : "id" (FLUSH_I)); \ | 27 | : "id" (FLUSH_I)); |
24 | } \ | 28 | } |
25 | }) | 29 | } |
26 | 30 | ||
27 | /* | 31 | /* |
28 | * invalidate the cache for the specified memory range. | 32 | * invalidate the cache for the specified memory range. |
@@ -43,10 +47,6 @@ extern void cache_push(unsigned long paddr, int len); | |||
43 | */ | 47 | */ |
44 | extern void cache_push_v(unsigned long vaddr, int len); | 48 | extern void cache_push_v(unsigned long vaddr, int len); |
45 | 49 | ||
46 | /* cache code */ | ||
47 | #define FLUSH_I_AND_D (0x00000808) | ||
48 | #define FLUSH_I (0x00000008) | ||
49 | |||
50 | /* This is needed whenever the virtual mapping of the current | 50 | /* This is needed whenever the virtual mapping of the current |
51 | process changes. */ | 51 | process changes. */ |
52 | #define __flush_cache_all() \ | 52 | #define __flush_cache_all() \ |
diff --git a/include/asm-m68k/dma-mapping.h b/include/asm-m68k/dma-mapping.h index dffd59cf1364..cebbb03370ec 100644 --- a/include/asm-m68k/dma-mapping.h +++ b/include/asm-m68k/dma-mapping.h | |||
@@ -1,11 +1,91 @@ | |||
1 | #ifndef _M68K_DMA_MAPPING_H | 1 | #ifndef _M68K_DMA_MAPPING_H |
2 | #define _M68K_DMA_MAPPING_H | 2 | #define _M68K_DMA_MAPPING_H |
3 | 3 | ||
4 | #include <asm/cache.h> | ||
4 | 5 | ||
5 | #ifdef CONFIG_PCI | 6 | struct scatterlist; |
6 | #include <asm-generic/dma-mapping.h> | 7 | |
7 | #else | 8 | static inline int dma_supported(struct device *dev, u64 mask) |
8 | #include <asm-generic/dma-mapping-broken.h> | 9 | { |
9 | #endif | 10 | return 1; |
11 | } | ||
12 | |||
13 | static inline int dma_set_mask(struct device *dev, u64 mask) | ||
14 | { | ||
15 | return 0; | ||
16 | } | ||
17 | |||
18 | static inline int dma_get_cache_alignment(void) | ||
19 | { | ||
20 | return 1 << L1_CACHE_SHIFT; | ||
21 | } | ||
22 | |||
23 | static inline int dma_is_consistent(dma_addr_t dma_addr) | ||
24 | { | ||
25 | return 0; | ||
26 | } | ||
27 | |||
28 | extern void *dma_alloc_coherent(struct device *, size_t, | ||
29 | dma_addr_t *, int); | ||
30 | extern void dma_free_coherent(struct device *, size_t, | ||
31 | void *, dma_addr_t); | ||
32 | |||
33 | static inline void *dma_alloc_noncoherent(struct device *dev, size_t size, | ||
34 | dma_addr_t *handle, int flag) | ||
35 | { | ||
36 | return dma_alloc_coherent(dev, size, handle, flag); | ||
37 | } | ||
38 | static inline void dma_free_noncoherent(struct device *dev, size_t size, | ||
39 | void *addr, dma_addr_t handle) | ||
40 | { | ||
41 | dma_free_coherent(dev, size, addr, handle); | ||
42 | } | ||
43 | static inline void dma_cache_sync(void *vaddr, size_t size, | ||
44 | enum dma_data_direction dir) | ||
45 | { | ||
46 | /* we use coherent allocation, so not much to do here. */ | ||
47 | } | ||
48 | |||
49 | extern dma_addr_t dma_map_single(struct device *, void *, size_t, | ||
50 | enum dma_data_direction); | ||
51 | static inline void dma_unmap_single(struct device *dev, dma_addr_t addr, | ||
52 | size_t size, enum dma_data_direction dir) | ||
53 | { | ||
54 | } | ||
55 | |||
56 | extern dma_addr_t dma_map_page(struct device *, struct page *, | ||
57 | unsigned long, size_t size, | ||
58 | enum dma_data_direction); | ||
59 | static inline void dma_unmap_page(struct device *dev, dma_addr_t address, | ||
60 | size_t size, enum dma_data_direction dir) | ||
61 | { | ||
62 | } | ||
63 | |||
64 | extern int dma_map_sg(struct device *, struct scatterlist *, int, | ||
65 | enum dma_data_direction); | ||
66 | static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg, | ||
67 | int nhwentries, enum dma_data_direction dir) | ||
68 | { | ||
69 | } | ||
70 | |||
71 | extern void dma_sync_single_for_device(struct device *, dma_addr_t, size_t, | ||
72 | enum dma_data_direction); | ||
73 | extern void dma_sync_sg_for_device(struct device *, struct scatterlist *, int, | ||
74 | enum dma_data_direction); | ||
75 | |||
76 | static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, | ||
77 | size_t size, enum dma_data_direction dir) | ||
78 | { | ||
79 | } | ||
80 | |||
81 | static inline void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | ||
82 | int nents, enum dma_data_direction dir) | ||
83 | { | ||
84 | } | ||
85 | |||
86 | static inline int dma_mapping_error(dma_addr_t handle) | ||
87 | { | ||
88 | return 0; | ||
89 | } | ||
10 | 90 | ||
11 | #endif /* _M68K_DMA_MAPPING_H */ | 91 | #endif /* _M68K_DMA_MAPPING_H */ |
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h index 9727ca9d9f26..f4ae7d8feac6 100644 --- a/include/asm-m68k/irq.h +++ b/include/asm-m68k/irq.h | |||
@@ -1,13 +1,9 @@ | |||
1 | #ifndef _M68K_IRQ_H_ | 1 | #ifndef _M68K_IRQ_H_ |
2 | #define _M68K_IRQ_H_ | 2 | #define _M68K_IRQ_H_ |
3 | 3 | ||
4 | #include <linux/interrupt.h> | 4 | #include <linux/linkage.h> |
5 | 5 | #include <linux/hardirq.h> | |
6 | /* | 6 | #include <linux/spinlock_types.h> |
7 | * # of m68k interrupts | ||
8 | */ | ||
9 | |||
10 | #define SYS_IRQS 8 | ||
11 | 7 | ||
12 | /* | 8 | /* |
13 | * This should be the same as the max(NUM_X_SOURCES) for all the | 9 | * This should be the same as the max(NUM_X_SOURCES) for all the |
@@ -15,10 +11,20 @@ | |||
15 | * Currently the Atari has 72 and the Amiga 24, but if both are | 11 | * Currently the Atari has 72 and the Amiga 24, but if both are |
16 | * supported in the kernel it is better to make room for 72. | 12 | * supported in the kernel it is better to make room for 72. |
17 | */ | 13 | */ |
18 | #if defined(CONFIG_ATARI) || defined(CONFIG_MAC) | 14 | #if defined(CONFIG_VME) || defined(CONFIG_SUN3) || defined(CONFIG_SUN3X) |
19 | #define NR_IRQS (72+SYS_IRQS) | 15 | #define NR_IRQS 200 |
16 | #elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) | ||
17 | #define NR_IRQS 72 | ||
18 | #elif defined(CONFIG_Q40) | ||
19 | #define NR_IRQS 43 | ||
20 | #elif defined(CONFIG_AMIGA) | ||
21 | #define NR_IRQS 32 | ||
22 | #elif defined(CONFIG_APOLLO) | ||
23 | #define NR_IRQS 24 | ||
24 | #elif defined(CONFIG_HP300) | ||
25 | #define NR_IRQS 8 | ||
20 | #else | 26 | #else |
21 | #define NR_IRQS (24+SYS_IRQS) | 27 | #error unknown nr of irqs |
22 | #endif | 28 | #endif |
23 | 29 | ||
24 | /* | 30 | /* |
@@ -40,53 +46,25 @@ | |||
40 | * that routine requires service. | 46 | * that routine requires service. |
41 | */ | 47 | */ |
42 | 48 | ||
43 | #define IRQ1 (1) /* level 1 interrupt */ | 49 | #define IRQ_SPURIOUS 0 |
44 | #define IRQ2 (2) /* level 2 interrupt */ | ||
45 | #define IRQ3 (3) /* level 3 interrupt */ | ||
46 | #define IRQ4 (4) /* level 4 interrupt */ | ||
47 | #define IRQ5 (5) /* level 5 interrupt */ | ||
48 | #define IRQ6 (6) /* level 6 interrupt */ | ||
49 | #define IRQ7 (7) /* level 7 interrupt (non-maskable) */ | ||
50 | 50 | ||
51 | /* | 51 | #define IRQ_AUTO_1 1 /* level 1 interrupt */ |
52 | * "Generic" interrupt sources | 52 | #define IRQ_AUTO_2 2 /* level 2 interrupt */ |
53 | */ | 53 | #define IRQ_AUTO_3 3 /* level 3 interrupt */ |
54 | 54 | #define IRQ_AUTO_4 4 /* level 4 interrupt */ | |
55 | #define IRQ_SCHED_TIMER (8) /* interrupt source for scheduling timer */ | 55 | #define IRQ_AUTO_5 5 /* level 5 interrupt */ |
56 | #define IRQ_AUTO_6 6 /* level 6 interrupt */ | ||
57 | #define IRQ_AUTO_7 7 /* level 7 interrupt (non-maskable) */ | ||
56 | 58 | ||
57 | static __inline__ int irq_canonicalize(int irq) | 59 | #define IRQ_USER 8 |
58 | { | ||
59 | return irq; | ||
60 | } | ||
61 | |||
62 | /* | ||
63 | * Machine specific interrupt sources. | ||
64 | * | ||
65 | * Adding an interrupt service routine for a source with this bit | ||
66 | * set indicates a special machine specific interrupt source. | ||
67 | * The machine specific files define these sources. | ||
68 | * | ||
69 | * The IRQ_MACHSPEC bit is now gone - the only thing it did was to | ||
70 | * introduce unnecessary overhead. | ||
71 | * | ||
72 | * All interrupt handling is actually machine specific so it is better | ||
73 | * to use function pointers, as used by the Sparc port, and select the | ||
74 | * interrupt handling functions when initializing the kernel. This way | ||
75 | * we save some unnecessary overhead at run-time. | ||
76 | * 01/11/97 - Jes | ||
77 | */ | ||
78 | 60 | ||
79 | extern void (*enable_irq)(unsigned int); | 61 | extern unsigned int irq_canonicalize(unsigned int irq); |
80 | extern void (*disable_irq)(unsigned int); | 62 | extern void enable_irq(unsigned int); |
63 | extern void disable_irq(unsigned int); | ||
81 | #define disable_irq_nosync disable_irq | 64 | #define disable_irq_nosync disable_irq |
82 | 65 | ||
83 | struct pt_regs; | 66 | struct pt_regs; |
84 | 67 | ||
85 | extern int cpu_request_irq(unsigned int, | ||
86 | irqreturn_t (*)(int, void *, struct pt_regs *), | ||
87 | unsigned long, const char *, void *); | ||
88 | extern void cpu_free_irq(unsigned int, void *); | ||
89 | |||
90 | /* | 68 | /* |
91 | * various flags for request_irq() - the Amiga now uses the standard | 69 | * various flags for request_irq() - the Amiga now uses the standard |
92 | * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ | 70 | * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ |
@@ -105,29 +83,45 @@ extern void cpu_free_irq(unsigned int, void *); | |||
105 | * interrupt source (if it supports chaining). | 83 | * interrupt source (if it supports chaining). |
106 | */ | 84 | */ |
107 | typedef struct irq_node { | 85 | typedef struct irq_node { |
108 | irqreturn_t (*handler)(int, void *, struct pt_regs *); | 86 | int (*handler)(int, void *, struct pt_regs *); |
109 | unsigned long flags; | ||
110 | void *dev_id; | 87 | void *dev_id; |
111 | const char *devname; | ||
112 | struct irq_node *next; | 88 | struct irq_node *next; |
89 | unsigned long flags; | ||
90 | const char *devname; | ||
113 | } irq_node_t; | 91 | } irq_node_t; |
114 | 92 | ||
115 | /* | 93 | /* |
116 | * This structure has only 4 elements for speed reasons | 94 | * This structure has only 4 elements for speed reasons |
117 | */ | 95 | */ |
118 | typedef struct irq_handler { | 96 | typedef struct irq_handler { |
119 | irqreturn_t (*handler)(int, void *, struct pt_regs *); | 97 | int (*handler)(int, void *, struct pt_regs *); |
120 | unsigned long flags; | 98 | unsigned long flags; |
121 | void *dev_id; | 99 | void *dev_id; |
122 | const char *devname; | 100 | const char *devname; |
123 | } irq_handler_t; | 101 | } irq_handler_t; |
124 | 102 | ||
125 | /* count of spurious interrupts */ | 103 | struct irq_controller { |
126 | extern volatile unsigned int num_spurious; | 104 | const char *name; |
105 | spinlock_t lock; | ||
106 | int (*startup)(unsigned int irq); | ||
107 | void (*shutdown)(unsigned int irq); | ||
108 | void (*enable)(unsigned int irq); | ||
109 | void (*disable)(unsigned int irq); | ||
110 | }; | ||
111 | |||
112 | extern int m68k_irq_startup(unsigned int); | ||
113 | extern void m68k_irq_shutdown(unsigned int); | ||
127 | 114 | ||
128 | /* | 115 | /* |
129 | * This function returns a new irq_node_t | 116 | * This function returns a new irq_node_t |
130 | */ | 117 | */ |
131 | extern irq_node_t *new_irq_node(void); | 118 | extern irq_node_t *new_irq_node(void); |
132 | 119 | ||
120 | extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)); | ||
121 | extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, | ||
122 | void (*handler)(unsigned int, struct pt_regs *)); | ||
123 | extern void m68k_setup_irq_controller(struct irq_controller *, unsigned int, unsigned int); | ||
124 | |||
125 | asmlinkage void m68k_handle_int(unsigned int, struct pt_regs *); | ||
126 | |||
133 | #endif /* _M68K_IRQ_H_ */ | 127 | #endif /* _M68K_IRQ_H_ */ |
diff --git a/include/asm-m68k/mac_oss.h b/include/asm-m68k/mac_oss.h index 7644a639cd6c..7221f7251934 100644 --- a/include/asm-m68k/mac_oss.h +++ b/include/asm-m68k/mac_oss.h | |||
@@ -69,12 +69,12 @@ | |||
69 | 69 | ||
70 | #define OSS_IRQLEV_DISABLED 0 | 70 | #define OSS_IRQLEV_DISABLED 0 |
71 | #define OSS_IRQLEV_IOPISM 1 /* ADB? */ | 71 | #define OSS_IRQLEV_IOPISM 1 /* ADB? */ |
72 | #define OSS_IRQLEV_SCSI 2 | 72 | #define OSS_IRQLEV_SCSI IRQ_AUTO_2 |
73 | #define OSS_IRQLEV_NUBUS 3 /* keep this on its own level */ | 73 | #define OSS_IRQLEV_NUBUS IRQ_AUTO_3 /* keep this on its own level */ |
74 | #define OSS_IRQLEV_IOPSCC 4 /* matches VIA alternate mapping */ | 74 | #define OSS_IRQLEV_IOPSCC IRQ_AUTO_4 /* matches VIA alternate mapping */ |
75 | #define OSS_IRQLEV_SOUND 5 /* matches VIA alternate mapping */ | 75 | #define OSS_IRQLEV_SOUND IRQ_AUTO_5 /* matches VIA alternate mapping */ |
76 | #define OSS_IRQLEV_60HZ 6 /* matches VIA alternate mapping */ | 76 | #define OSS_IRQLEV_60HZ 6 /* matches VIA alternate mapping */ |
77 | #define OSS_IRQLEV_VIA1 6 /* matches VIA alternate mapping */ | 77 | #define OSS_IRQLEV_VIA1 IRQ_AUTO_6 /* matches VIA alternate mapping */ |
78 | #define OSS_IRQLEV_PARITY 7 /* matches VIA alternate mapping */ | 78 | #define OSS_IRQLEV_PARITY 7 /* matches VIA alternate mapping */ |
79 | 79 | ||
80 | #ifndef __ASSEMBLY__ | 80 | #ifndef __ASSEMBLY__ |
diff --git a/include/asm-m68k/machdep.h b/include/asm-m68k/machdep.h index 7d3fee342369..df898f27e434 100644 --- a/include/asm-m68k/machdep.h +++ b/include/asm-m68k/machdep.h | |||
@@ -13,14 +13,8 @@ struct buffer_head; | |||
13 | extern void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)); | 13 | extern void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)); |
14 | /* machine dependent irq functions */ | 14 | /* machine dependent irq functions */ |
15 | extern void (*mach_init_IRQ) (void); | 15 | extern void (*mach_init_IRQ) (void); |
16 | extern irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *); | ||
17 | extern int (*mach_request_irq) (unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), | ||
18 | unsigned long flags, const char *devname, void *dev_id); | ||
19 | extern void (*mach_free_irq) (unsigned int irq, void *dev_id); | ||
20 | extern void (*mach_get_model) (char *model); | 16 | extern void (*mach_get_model) (char *model); |
21 | extern int (*mach_get_hardware_list) (char *buffer); | 17 | extern int (*mach_get_hardware_list) (char *buffer); |
22 | extern int (*mach_get_irq_list) (struct seq_file *p, void *v); | ||
23 | extern irqreturn_t (*mach_process_int) (int irq, struct pt_regs *fp); | ||
24 | /* machine dependent timer functions */ | 18 | /* machine dependent timer functions */ |
25 | extern unsigned long (*mach_gettimeoffset)(void); | 19 | extern unsigned long (*mach_gettimeoffset)(void); |
26 | extern int (*mach_hwclk)(int, struct rtc_time*); | 20 | extern int (*mach_hwclk)(int, struct rtc_time*); |
diff --git a/include/asm-m68k/macintosh.h b/include/asm-m68k/macintosh.h index 6fc3d19512d1..27d11da2b479 100644 --- a/include/asm-m68k/macintosh.h +++ b/include/asm-m68k/macintosh.h | |||
@@ -11,17 +11,7 @@ | |||
11 | extern void mac_reset(void); | 11 | extern void mac_reset(void); |
12 | extern void mac_poweroff(void); | 12 | extern void mac_poweroff(void); |
13 | extern void mac_init_IRQ(void); | 13 | extern void mac_init_IRQ(void); |
14 | extern int mac_request_irq (unsigned int, irqreturn_t (*)(int, void *, | ||
15 | struct pt_regs *), | ||
16 | unsigned long, const char *, void *); | ||
17 | extern void mac_free_irq(unsigned int, void *); | ||
18 | extern void mac_enable_irq(unsigned int); | ||
19 | extern void mac_disable_irq(unsigned int); | ||
20 | extern int mac_irq_pending(unsigned int); | 14 | extern int mac_irq_pending(unsigned int); |
21 | extern int show_mac_interrupts(struct seq_file *, void *); | ||
22 | #if 0 | ||
23 | extern void mac_default_handler(int irq); | ||
24 | #endif | ||
25 | extern void mac_identify(void); | 15 | extern void mac_identify(void); |
26 | extern void mac_report_hardware(void); | 16 | extern void mac_report_hardware(void); |
27 | extern void mac_debugging_penguin(int); | 17 | extern void mac_debugging_penguin(int); |
diff --git a/include/asm-m68k/macints.h b/include/asm-m68k/macints.h index fd8c3a9fea4d..679c48ab4407 100644 --- a/include/asm-m68k/macints.h +++ b/include/asm-m68k/macints.h | |||
@@ -59,17 +59,6 @@ | |||
59 | #define IRQ_SRC(irq) (irq >> 3) | 59 | #define IRQ_SRC(irq) (irq >> 3) |
60 | #define IRQ_IDX(irq) (irq & 7) | 60 | #define IRQ_IDX(irq) (irq & 7) |
61 | 61 | ||
62 | #define IRQ_SPURIOUS (0) | ||
63 | |||
64 | /* auto-vector interrupts */ | ||
65 | #define IRQ_AUTO_1 (1) | ||
66 | #define IRQ_AUTO_2 (2) | ||
67 | #define IRQ_AUTO_3 (3) | ||
68 | #define IRQ_AUTO_4 (4) | ||
69 | #define IRQ_AUTO_5 (5) | ||
70 | #define IRQ_AUTO_6 (6) | ||
71 | #define IRQ_AUTO_7 (7) | ||
72 | |||
73 | /* VIA1 interrupts */ | 62 | /* VIA1 interrupts */ |
74 | #define IRQ_VIA1_0 (8) /* one second int. */ | 63 | #define IRQ_VIA1_0 (8) /* one second int. */ |
75 | #define IRQ_VIA1_1 (9) /* VBlank int. */ | 64 | #define IRQ_VIA1_1 (9) /* VBlank int. */ |
@@ -163,7 +152,4 @@ | |||
163 | #define INT_CLK 24576 /* CLK while int_clk =2.456MHz and divide = 100 */ | 152 | #define INT_CLK 24576 /* CLK while int_clk =2.456MHz and divide = 100 */ |
164 | #define INT_TICKS 246 /* to make sched_time = 99.902... HZ */ | 153 | #define INT_TICKS 246 /* to make sched_time = 99.902... HZ */ |
165 | 154 | ||
166 | extern irq_node_t *mac_irq_list[NUM_MAC_SOURCES]; | ||
167 | extern void mac_do_irq_list(int irq, struct pt_regs *); | ||
168 | |||
169 | #endif /* asm/macints.h */ | 155 | #endif /* asm/macints.h */ |
diff --git a/include/asm-m68k/mvme147hw.h b/include/asm-m68k/mvme147hw.h index f245139f3671..b81043108472 100644 --- a/include/asm-m68k/mvme147hw.h +++ b/include/asm-m68k/mvme147hw.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _MVME147HW_H_ | 1 | #ifndef _MVME147HW_H_ |
2 | #define _MVME147HW_H_ | 2 | #define _MVME147HW_H_ |
3 | 3 | ||
4 | #include <asm/irq.h> | ||
5 | |||
4 | typedef struct { | 6 | typedef struct { |
5 | unsigned char | 7 | unsigned char |
6 | ctrl, | 8 | ctrl, |
@@ -72,39 +74,39 @@ struct pcc_regs { | |||
72 | #define PCC_LEVEL_SCSI_PORT 0x04 | 74 | #define PCC_LEVEL_SCSI_PORT 0x04 |
73 | #define PCC_LEVEL_SCSI_DMA 0x04 | 75 | #define PCC_LEVEL_SCSI_DMA 0x04 |
74 | 76 | ||
75 | #define PCC_IRQ_AC_FAIL 0x40 | 77 | #define PCC_IRQ_AC_FAIL (IRQ_USER+0) |
76 | #define PCC_IRQ_BERR 0x41 | 78 | #define PCC_IRQ_BERR (IRQ_USER+1) |
77 | #define PCC_IRQ_ABORT 0x42 | 79 | #define PCC_IRQ_ABORT (IRQ_USER+2) |
78 | /* #define PCC_IRQ_SERIAL 0x43 */ | 80 | /* #define PCC_IRQ_SERIAL (IRQ_USER+3) */ |
79 | #define PCC_IRQ_PRINTER 0x47 | 81 | #define PCC_IRQ_PRINTER (IRQ_USER+7) |
80 | #define PCC_IRQ_TIMER1 0x48 | 82 | #define PCC_IRQ_TIMER1 (IRQ_USER+8) |
81 | #define PCC_IRQ_TIMER2 0x49 | 83 | #define PCC_IRQ_TIMER2 (IRQ_USER+9) |
82 | #define PCC_IRQ_SOFTWARE1 0x4a | 84 | #define PCC_IRQ_SOFTWARE1 (IRQ_USER+10) |
83 | #define PCC_IRQ_SOFTWARE2 0x4b | 85 | #define PCC_IRQ_SOFTWARE2 (IRQ_USER+11) |
84 | 86 | ||
85 | 87 | ||
86 | #define M147_SCC_A_ADDR 0xfffe3002 | 88 | #define M147_SCC_A_ADDR 0xfffe3002 |
87 | #define M147_SCC_B_ADDR 0xfffe3000 | 89 | #define M147_SCC_B_ADDR 0xfffe3000 |
88 | #define M147_SCC_PCLK 5000000 | 90 | #define M147_SCC_PCLK 5000000 |
89 | 91 | ||
90 | #define MVME147_IRQ_SCSI_PORT 0x45 | 92 | #define MVME147_IRQ_SCSI_PORT (IRQ_USER+0x45) |
91 | #define MVME147_IRQ_SCSI_DMA 0x46 | 93 | #define MVME147_IRQ_SCSI_DMA (IRQ_USER+0x46) |
92 | 94 | ||
93 | /* SCC interrupts, for MVME147 */ | 95 | /* SCC interrupts, for MVME147 */ |
94 | 96 | ||
95 | #define MVME147_IRQ_TYPE_PRIO 0 | 97 | #define MVME147_IRQ_TYPE_PRIO 0 |
96 | #define MVME147_IRQ_SCC_BASE 0x60 | 98 | #define MVME147_IRQ_SCC_BASE (IRQ_USER+32) |
97 | #define MVME147_IRQ_SCCB_TX 0x60 | 99 | #define MVME147_IRQ_SCCB_TX (IRQ_USER+32) |
98 | #define MVME147_IRQ_SCCB_STAT 0x62 | 100 | #define MVME147_IRQ_SCCB_STAT (IRQ_USER+34) |
99 | #define MVME147_IRQ_SCCB_RX 0x64 | 101 | #define MVME147_IRQ_SCCB_RX (IRQ_USER+36) |
100 | #define MVME147_IRQ_SCCB_SPCOND 0x66 | 102 | #define MVME147_IRQ_SCCB_SPCOND (IRQ_USER+38) |
101 | #define MVME147_IRQ_SCCA_TX 0x68 | 103 | #define MVME147_IRQ_SCCA_TX (IRQ_USER+40) |
102 | #define MVME147_IRQ_SCCA_STAT 0x6a | 104 | #define MVME147_IRQ_SCCA_STAT (IRQ_USER+42) |
103 | #define MVME147_IRQ_SCCA_RX 0x6c | 105 | #define MVME147_IRQ_SCCA_RX (IRQ_USER+44) |
104 | #define MVME147_IRQ_SCCA_SPCOND 0x6e | 106 | #define MVME147_IRQ_SCCA_SPCOND (IRQ_USER+46) |
105 | 107 | ||
106 | #define MVME147_LANCE_BASE 0xfffe1800 | 108 | #define MVME147_LANCE_BASE 0xfffe1800 |
107 | #define MVME147_LANCE_IRQ 0x44 | 109 | #define MVME147_LANCE_IRQ (IRQ_USER+4) |
108 | 110 | ||
109 | #define ETHERNET_ADDRESS 0xfffe0778 | 111 | #define ETHERNET_ADDRESS 0xfffe0778 |
110 | 112 | ||
diff --git a/include/asm-m68k/mvme16xhw.h b/include/asm-m68k/mvme16xhw.h index 5d07231d2426..6117f56653d2 100644 --- a/include/asm-m68k/mvme16xhw.h +++ b/include/asm-m68k/mvme16xhw.h | |||
@@ -66,28 +66,28 @@ typedef struct { | |||
66 | 66 | ||
67 | #define MVME162_IRQ_TYPE_PRIO 0 | 67 | #define MVME162_IRQ_TYPE_PRIO 0 |
68 | 68 | ||
69 | #define MVME167_IRQ_PRN 0x54 | 69 | #define MVME167_IRQ_PRN (IRQ_USER+20) |
70 | #define MVME16x_IRQ_I596 0x57 | 70 | #define MVME16x_IRQ_I596 (IRQ_USER+23) |
71 | #define MVME16x_IRQ_SCSI 0x55 | 71 | #define MVME16x_IRQ_SCSI (IRQ_USER+21) |
72 | #define MVME16x_IRQ_FLY 0x7f | 72 | #define MVME16x_IRQ_FLY (IRQ_USER+63) |
73 | #define MVME167_IRQ_SER_ERR 0x5c | 73 | #define MVME167_IRQ_SER_ERR (IRQ_USER+28) |
74 | #define MVME167_IRQ_SER_MODEM 0x5d | 74 | #define MVME167_IRQ_SER_MODEM (IRQ_USER+29) |
75 | #define MVME167_IRQ_SER_TX 0x5e | 75 | #define MVME167_IRQ_SER_TX (IRQ_USER+30) |
76 | #define MVME167_IRQ_SER_RX 0x5f | 76 | #define MVME167_IRQ_SER_RX (IRQ_USER+31) |
77 | #define MVME16x_IRQ_TIMER 0x59 | 77 | #define MVME16x_IRQ_TIMER (IRQ_USER+25) |
78 | #define MVME167_IRQ_ABORT 0x6e | 78 | #define MVME167_IRQ_ABORT (IRQ_USER+46) |
79 | #define MVME162_IRQ_ABORT 0x5e | 79 | #define MVME162_IRQ_ABORT (IRQ_USER+30) |
80 | 80 | ||
81 | /* SCC interrupts, for MVME162 */ | 81 | /* SCC interrupts, for MVME162 */ |
82 | #define MVME162_IRQ_SCC_BASE 0x40 | 82 | #define MVME162_IRQ_SCC_BASE (IRQ_USER+0) |
83 | #define MVME162_IRQ_SCCB_TX 0x40 | 83 | #define MVME162_IRQ_SCCB_TX (IRQ_USER+0) |
84 | #define MVME162_IRQ_SCCB_STAT 0x42 | 84 | #define MVME162_IRQ_SCCB_STAT (IRQ_USER+2) |
85 | #define MVME162_IRQ_SCCB_RX 0x44 | 85 | #define MVME162_IRQ_SCCB_RX (IRQ_USER+4) |
86 | #define MVME162_IRQ_SCCB_SPCOND 0x46 | 86 | #define MVME162_IRQ_SCCB_SPCOND (IRQ_USER+6) |
87 | #define MVME162_IRQ_SCCA_TX 0x48 | 87 | #define MVME162_IRQ_SCCA_TX (IRQ_USER+8) |
88 | #define MVME162_IRQ_SCCA_STAT 0x4a | 88 | #define MVME162_IRQ_SCCA_STAT (IRQ_USER+10) |
89 | #define MVME162_IRQ_SCCA_RX 0x4c | 89 | #define MVME162_IRQ_SCCA_RX (IRQ_USER+12) |
90 | #define MVME162_IRQ_SCCA_SPCOND 0x4e | 90 | #define MVME162_IRQ_SCCA_SPCOND (IRQ_USER+14) |
91 | 91 | ||
92 | /* MVME162 version register */ | 92 | /* MVME162 version register */ |
93 | 93 | ||
diff --git a/include/asm-m68k/scatterlist.h b/include/asm-m68k/scatterlist.h index d7c9b5c5e6c7..8e612266da51 100644 --- a/include/asm-m68k/scatterlist.h +++ b/include/asm-m68k/scatterlist.h | |||
@@ -2,18 +2,17 @@ | |||
2 | #define _M68K_SCATTERLIST_H | 2 | #define _M68K_SCATTERLIST_H |
3 | 3 | ||
4 | struct scatterlist { | 4 | struct scatterlist { |
5 | /* These two are only valid if ADDRESS member of this | ||
6 | * struct is NULL. | ||
7 | */ | ||
8 | struct page *page; | 5 | struct page *page; |
9 | unsigned int offset; | 6 | unsigned int offset; |
10 | |||
11 | unsigned int length; | 7 | unsigned int length; |
12 | 8 | ||
13 | __u32 dvma_address; /* A place to hang host-specific addresses at. */ | 9 | __u32 dma_address; /* A place to hang host-specific addresses at. */ |
14 | }; | 10 | }; |
15 | 11 | ||
16 | /* This is bogus and should go away. */ | 12 | /* This is bogus and should go away. */ |
17 | #define ISA_DMA_THRESHOLD (0x00ffffff) | 13 | #define ISA_DMA_THRESHOLD (0x00ffffff) |
18 | 14 | ||
15 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
16 | #define sg_dma_len(sg) ((sg)->length) | ||
17 | |||
19 | #endif /* !(_M68K_SCATTERLIST_H) */ | 18 | #endif /* !(_M68K_SCATTERLIST_H) */ |
diff --git a/include/asm-m68k/signal.h b/include/asm-m68k/signal.h index b7b7ea20caab..85037a3d3e8e 100644 --- a/include/asm-m68k/signal.h +++ b/include/asm-m68k/signal.h | |||
@@ -156,13 +156,17 @@ typedef struct sigaltstack { | |||
156 | 156 | ||
157 | static inline void sigaddset(sigset_t *set, int _sig) | 157 | static inline void sigaddset(sigset_t *set, int _sig) |
158 | { | 158 | { |
159 | __asm__("bfset %0{%1,#1}" : "=m" (*set) : "id" ((_sig - 1) ^ 31) | 159 | asm ("bfset %0{%1,#1}" |
160 | : "+od" (*set) | ||
161 | : "id" ((_sig - 1) ^ 31) | ||
160 | : "cc"); | 162 | : "cc"); |
161 | } | 163 | } |
162 | 164 | ||
163 | static inline void sigdelset(sigset_t *set, int _sig) | 165 | static inline void sigdelset(sigset_t *set, int _sig) |
164 | { | 166 | { |
165 | __asm__("bfclr %0{%1,#1}" : "=m"(*set) : "id"((_sig - 1) ^ 31) | 167 | asm ("bfclr %0{%1,#1}" |
168 | : "+od" (*set) | ||
169 | : "id" ((_sig - 1) ^ 31) | ||
166 | : "cc"); | 170 | : "cc"); |
167 | } | 171 | } |
168 | 172 | ||
@@ -175,8 +179,10 @@ static inline int __const_sigismember(sigset_t *set, int _sig) | |||
175 | static inline int __gen_sigismember(sigset_t *set, int _sig) | 179 | static inline int __gen_sigismember(sigset_t *set, int _sig) |
176 | { | 180 | { |
177 | int ret; | 181 | int ret; |
178 | __asm__("bfextu %1{%2,#1},%0" | 182 | asm ("bfextu %1{%2,#1},%0" |
179 | : "=d"(ret) : "m"(*set), "id"((_sig-1) ^ 31)); | 183 | : "=d" (ret) |
184 | : "od" (*set), "id" ((_sig-1) ^ 31) | ||
185 | : "cc"); | ||
180 | return ret; | 186 | return ret; |
181 | } | 187 | } |
182 | 188 | ||
@@ -187,7 +193,10 @@ static inline int __gen_sigismember(sigset_t *set, int _sig) | |||
187 | 193 | ||
188 | static inline int sigfindinword(unsigned long word) | 194 | static inline int sigfindinword(unsigned long word) |
189 | { | 195 | { |
190 | __asm__("bfffo %1{#0,#0},%0" : "=d"(word) : "d"(word & -word) : "cc"); | 196 | asm ("bfffo %1{#0,#0},%0" |
197 | : "=d" (word) | ||
198 | : "d" (word & -word) | ||
199 | : "cc"); | ||
191 | return word ^ 31; | 200 | return word ^ 31; |
192 | } | 201 | } |
193 | 202 | ||
diff --git a/include/asm-m68k/sun3ints.h b/include/asm-m68k/sun3ints.h index bd038fccb64b..de91fa071b99 100644 --- a/include/asm-m68k/sun3ints.h +++ b/include/asm-m68k/sun3ints.h | |||
@@ -12,37 +12,25 @@ | |||
12 | #define SUN3INTS_H | 12 | #define SUN3INTS_H |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/kernel.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/kernel_stat.h> | ||
18 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
19 | #include <linux/seq_file.h> | ||
20 | #include <asm/segment.h> | ||
21 | #include <asm/intersil.h> | 16 | #include <asm/intersil.h> |
22 | #include <asm/oplib.h> | 17 | #include <asm/oplib.h> |
18 | #include <asm/traps.h> | ||
23 | 19 | ||
24 | #define SUN3_INT_VECS 192 | 20 | #define SUN3_INT_VECS 192 |
25 | 21 | ||
26 | void sun3_enable_irq(unsigned int irq); | 22 | void sun3_enable_irq(unsigned int irq); |
27 | void sun3_disable_irq(unsigned int irq); | 23 | void sun3_disable_irq(unsigned int irq); |
28 | int sun3_request_irq(unsigned int irq, | ||
29 | irqreturn_t (*handler)(int, void *, struct pt_regs *), | ||
30 | unsigned long flags, const char *devname, void *dev_id | ||
31 | ); | ||
32 | extern void sun3_init_IRQ (void); | 24 | extern void sun3_init_IRQ (void); |
33 | extern irqreturn_t (*sun3_default_handler[]) (int, void *, struct pt_regs *); | ||
34 | extern void sun3_free_irq (unsigned int irq, void *dev_id); | ||
35 | extern void sun3_enable_interrupts (void); | 25 | extern void sun3_enable_interrupts (void); |
36 | extern void sun3_disable_interrupts (void); | 26 | extern void sun3_disable_interrupts (void); |
37 | extern int show_sun3_interrupts(struct seq_file *, void *); | ||
38 | extern irqreturn_t sun3_process_int(int, struct pt_regs *); | ||
39 | extern volatile unsigned char* sun3_intreg; | 27 | extern volatile unsigned char* sun3_intreg; |
40 | 28 | ||
41 | /* master list of VME vectors -- don't fuck with this */ | 29 | /* master list of VME vectors -- don't fuck with this */ |
42 | #define SUN3_VEC_FLOPPY 0x40 | 30 | #define SUN3_VEC_FLOPPY (IRQ_USER+0) |
43 | #define SUN3_VEC_VMESCSI0 0x40 | 31 | #define SUN3_VEC_VMESCSI0 (IRQ_USER+0) |
44 | #define SUN3_VEC_VMESCSI1 0x41 | 32 | #define SUN3_VEC_VMESCSI1 (IRQ_USER+1) |
45 | #define SUN3_VEC_CG 0xA8 | 33 | #define SUN3_VEC_CG (IRQ_USER+104) |
46 | 34 | ||
47 | 35 | ||
48 | #endif /* SUN3INTS_H */ | 36 | #endif /* SUN3INTS_H */ |
diff --git a/include/asm-m68k/traps.h b/include/asm-m68k/traps.h index 475056191252..8caef25624c7 100644 --- a/include/asm-m68k/traps.h +++ b/include/asm-m68k/traps.h | |||
@@ -13,8 +13,15 @@ | |||
13 | 13 | ||
14 | #ifndef __ASSEMBLY__ | 14 | #ifndef __ASSEMBLY__ |
15 | 15 | ||
16 | #include <linux/linkage.h> | ||
17 | #include <asm/ptrace.h> | ||
18 | |||
16 | typedef void (*e_vector)(void); | 19 | typedef void (*e_vector)(void); |
17 | 20 | ||
21 | asmlinkage void auto_inthandler(void); | ||
22 | asmlinkage void user_inthandler(void); | ||
23 | asmlinkage void bad_inthandler(void); | ||
24 | |||
18 | extern e_vector vectors[]; | 25 | extern e_vector vectors[]; |
19 | 26 | ||
20 | #endif | 27 | #endif |
diff --git a/include/asm-m68k/uaccess.h b/include/asm-m68k/uaccess.h index b761ef218cea..88b1f47400e1 100644 --- a/include/asm-m68k/uaccess.h +++ b/include/asm-m68k/uaccess.h | |||
@@ -181,144 +181,164 @@ asm volatile ("\n" \ | |||
181 | unsigned long __generic_copy_from_user(void *to, const void __user *from, unsigned long n); | 181 | unsigned long __generic_copy_from_user(void *to, const void __user *from, unsigned long n); |
182 | unsigned long __generic_copy_to_user(void __user *to, const void *from, unsigned long n); | 182 | unsigned long __generic_copy_to_user(void __user *to, const void *from, unsigned long n); |
183 | 183 | ||
184 | #define __constant_copy_from_user_asm(res, to, from, tmp, n, s1, s2, s3)\ | ||
185 | asm volatile ("\n" \ | ||
186 | "1: moves."#s1" (%2)+,%3\n" \ | ||
187 | " move."#s1" %3,(%1)+\n" \ | ||
188 | "2: moves."#s2" (%2)+,%3\n" \ | ||
189 | " move."#s2" %3,(%1)+\n" \ | ||
190 | " .ifnc \""#s3"\",\"\"\n" \ | ||
191 | "3: moves."#s3" (%2)+,%3\n" \ | ||
192 | " move."#s3" %3,(%1)+\n" \ | ||
193 | " .endif\n" \ | ||
194 | "4:\n" \ | ||
195 | " .section __ex_table,\"a\"\n" \ | ||
196 | " .align 4\n" \ | ||
197 | " .long 1b,10f\n" \ | ||
198 | " .long 2b,20f\n" \ | ||
199 | " .ifnc \""#s3"\",\"\"\n" \ | ||
200 | " .long 3b,30f\n" \ | ||
201 | " .endif\n" \ | ||
202 | " .previous\n" \ | ||
203 | "\n" \ | ||
204 | " .section .fixup,\"ax\"\n" \ | ||
205 | " .even\n" \ | ||
206 | "10: clr."#s1" (%1)+\n" \ | ||
207 | "20: clr."#s2" (%1)+\n" \ | ||
208 | " .ifnc \""#s3"\",\"\"\n" \ | ||
209 | "30: clr."#s3" (%1)+\n" \ | ||
210 | " .endif\n" \ | ||
211 | " moveq.l #"#n",%0\n" \ | ||
212 | " jra 4b\n" \ | ||
213 | " .previous\n" \ | ||
214 | : "+d" (res), "+&a" (to), "+a" (from), "=&d" (tmp) \ | ||
215 | : : "memory") | ||
216 | |||
184 | static __always_inline unsigned long | 217 | static __always_inline unsigned long |
185 | __constant_copy_from_user(void *to, const void __user *from, unsigned long n) | 218 | __constant_copy_from_user(void *to, const void __user *from, unsigned long n) |
186 | { | 219 | { |
187 | unsigned long res = 0, tmp; | 220 | unsigned long res = 0, tmp; |
188 | 221 | ||
189 | /* limit the inlined version to 3 moves */ | ||
190 | if (n == 11 || n > 12) | ||
191 | return __generic_copy_from_user(to, from, n); | ||
192 | |||
193 | switch (n) { | 222 | switch (n) { |
194 | case 1: | 223 | case 1: |
195 | __get_user_asm(res, *(u8 *)to, (u8 *)from, u8, b, d, 1); | 224 | __get_user_asm(res, *(u8 *)to, (u8 *)from, u8, b, d, 1); |
196 | return res; | 225 | break; |
197 | case 2: | 226 | case 2: |
198 | __get_user_asm(res, *(u16 *)to, (u16 *)from, u16, w, d, 2); | 227 | __get_user_asm(res, *(u16 *)to, (u16 *)from, u16, w, d, 2); |
199 | return res; | 228 | break; |
229 | case 3: | ||
230 | __constant_copy_from_user_asm(res, to, from, tmp, 3, w, b,); | ||
231 | break; | ||
200 | case 4: | 232 | case 4: |
201 | __get_user_asm(res, *(u32 *)to, (u32 *)from, u32, l, r, 4); | 233 | __get_user_asm(res, *(u32 *)to, (u32 *)from, u32, l, r, 4); |
202 | return res; | 234 | break; |
235 | case 5: | ||
236 | __constant_copy_from_user_asm(res, to, from, tmp, 5, l, b,); | ||
237 | break; | ||
238 | case 6: | ||
239 | __constant_copy_from_user_asm(res, to, from, tmp, 6, l, w,); | ||
240 | break; | ||
241 | case 7: | ||
242 | __constant_copy_from_user_asm(res, to, from, tmp, 7, l, w, b); | ||
243 | break; | ||
244 | case 8: | ||
245 | __constant_copy_from_user_asm(res, to, from, tmp, 8, l, l,); | ||
246 | break; | ||
247 | case 9: | ||
248 | __constant_copy_from_user_asm(res, to, from, tmp, 9, l, l, b); | ||
249 | break; | ||
250 | case 10: | ||
251 | __constant_copy_from_user_asm(res, to, from, tmp, 10, l, l, w); | ||
252 | break; | ||
253 | case 12: | ||
254 | __constant_copy_from_user_asm(res, to, from, tmp, 12, l, l, l); | ||
255 | break; | ||
256 | default: | ||
257 | /* we limit the inlined version to 3 moves */ | ||
258 | return __generic_copy_from_user(to, from, n); | ||
203 | } | 259 | } |
204 | 260 | ||
205 | asm volatile ("\n" | ||
206 | " .ifndef .Lfrom_user\n" | ||
207 | " .set .Lfrom_user,1\n" | ||
208 | " .macro copy_from_user to,from,tmp\n" | ||
209 | " .if .Lcnt >= 4\n" | ||
210 | "1: moves.l (\\from)+,\\tmp\n" | ||
211 | " move.l \\tmp,(\\to)+\n" | ||
212 | " .set .Lcnt,.Lcnt-4\n" | ||
213 | " .elseif .Lcnt & 2\n" | ||
214 | "1: moves.w (\\from)+,\\tmp\n" | ||
215 | " move.w \\tmp,(\\to)+\n" | ||
216 | " .set .Lcnt,.Lcnt-2\n" | ||
217 | " .elseif .Lcnt & 1\n" | ||
218 | "1: moves.b (\\from)+,\\tmp\n" | ||
219 | " move.b \\tmp,(\\to)+\n" | ||
220 | " .set .Lcnt,.Lcnt-1\n" | ||
221 | " .else\n" | ||
222 | " .exitm\n" | ||
223 | " .endif\n" | ||
224 | "\n" | ||
225 | " .section __ex_table,\"a\"\n" | ||
226 | " .align 4\n" | ||
227 | " .long 1b,3f\n" | ||
228 | " .previous\n" | ||
229 | " .endm\n" | ||
230 | " .endif\n" | ||
231 | "\n" | ||
232 | " .set .Lcnt,%c4\n" | ||
233 | " copy_from_user %1,%2,%3\n" | ||
234 | " copy_from_user %1,%2,%3\n" | ||
235 | " copy_from_user %1,%2,%3\n" | ||
236 | "2:\n" | ||
237 | " .section .fixup,\"ax\"\n" | ||
238 | " .even\n" | ||
239 | "3: moveq.l %4,%0\n" | ||
240 | " move.l %5,%1\n" | ||
241 | " .rept %c4 / 4\n" | ||
242 | " clr.l (%1)+\n" | ||
243 | " .endr\n" | ||
244 | " .if %c4 & 2\n" | ||
245 | " clr.w (%1)+\n" | ||
246 | " .endif\n" | ||
247 | " .if %c4 & 1\n" | ||
248 | " clr.b (%1)+\n" | ||
249 | " .endif\n" | ||
250 | " jra 2b\n" | ||
251 | " .previous\n" | ||
252 | : "+r" (res), "+a" (to), "+a" (from), "=&d" (tmp) | ||
253 | : "i" (n), "g" (to) | ||
254 | : "memory"); | ||
255 | |||
256 | return res; | 261 | return res; |
257 | } | 262 | } |
258 | 263 | ||
264 | #define __constant_copy_to_user_asm(res, to, from, tmp, n, s1, s2, s3) \ | ||
265 | asm volatile ("\n" \ | ||
266 | " move."#s1" (%2)+,%3\n" \ | ||
267 | "11: moves."#s1" %3,(%1)+\n" \ | ||
268 | "12: move."#s2" (%2)+,%3\n" \ | ||
269 | "21: moves."#s2" %3,(%1)+\n" \ | ||
270 | "22:\n" \ | ||
271 | " .ifnc \""#s3"\",\"\"\n" \ | ||
272 | " move."#s3" (%2)+,%3\n" \ | ||
273 | "31: moves."#s3" %3,(%1)+\n" \ | ||
274 | "32:\n" \ | ||
275 | " .endif\n" \ | ||
276 | "4:\n" \ | ||
277 | "\n" \ | ||
278 | " .section __ex_table,\"a\"\n" \ | ||
279 | " .align 4\n" \ | ||
280 | " .long 11b,5f\n" \ | ||
281 | " .long 12b,5f\n" \ | ||
282 | " .long 21b,5f\n" \ | ||
283 | " .long 22b,5f\n" \ | ||
284 | " .ifnc \""#s3"\",\"\"\n" \ | ||
285 | " .long 31b,5f\n" \ | ||
286 | " .long 32b,5f\n" \ | ||
287 | " .endif\n" \ | ||
288 | " .previous\n" \ | ||
289 | "\n" \ | ||
290 | " .section .fixup,\"ax\"\n" \ | ||
291 | " .even\n" \ | ||
292 | "5: moveq.l #"#n",%0\n" \ | ||
293 | " jra 4b\n" \ | ||
294 | " .previous\n" \ | ||
295 | : "+d" (res), "+a" (to), "+a" (from), "=&d" (tmp) \ | ||
296 | : : "memory") | ||
297 | |||
259 | static __always_inline unsigned long | 298 | static __always_inline unsigned long |
260 | __constant_copy_to_user(void __user *to, const void *from, unsigned long n) | 299 | __constant_copy_to_user(void __user *to, const void *from, unsigned long n) |
261 | { | 300 | { |
262 | unsigned long res = 0, tmp; | 301 | unsigned long res = 0, tmp; |
263 | 302 | ||
264 | /* limit the inlined version to 3 moves */ | ||
265 | if (n == 11 || n > 12) | ||
266 | return __generic_copy_to_user(to, from, n); | ||
267 | |||
268 | switch (n) { | 303 | switch (n) { |
269 | case 1: | 304 | case 1: |
270 | __put_user_asm(res, *(u8 *)from, (u8 *)to, b, d, 1); | 305 | __put_user_asm(res, *(u8 *)from, (u8 *)to, b, d, 1); |
271 | return res; | 306 | break; |
272 | case 2: | 307 | case 2: |
273 | __put_user_asm(res, *(u16 *)from, (u16 *)to, w, d, 2); | 308 | __put_user_asm(res, *(u16 *)from, (u16 *)to, w, d, 2); |
274 | return res; | 309 | break; |
310 | case 3: | ||
311 | __constant_copy_to_user_asm(res, to, from, tmp, 3, w, b,); | ||
312 | break; | ||
275 | case 4: | 313 | case 4: |
276 | __put_user_asm(res, *(u32 *)from, (u32 *)to, l, r, 4); | 314 | __put_user_asm(res, *(u32 *)from, (u32 *)to, l, r, 4); |
277 | return res; | 315 | break; |
316 | case 5: | ||
317 | __constant_copy_to_user_asm(res, to, from, tmp, 5, l, b,); | ||
318 | break; | ||
319 | case 6: | ||
320 | __constant_copy_to_user_asm(res, to, from, tmp, 6, l, w,); | ||
321 | break; | ||
322 | case 7: | ||
323 | __constant_copy_to_user_asm(res, to, from, tmp, 7, l, w, b); | ||
324 | break; | ||
325 | case 8: | ||
326 | __constant_copy_to_user_asm(res, to, from, tmp, 8, l, l,); | ||
327 | break; | ||
328 | case 9: | ||
329 | __constant_copy_to_user_asm(res, to, from, tmp, 9, l, l, b); | ||
330 | break; | ||
331 | case 10: | ||
332 | __constant_copy_to_user_asm(res, to, from, tmp, 10, l, l, w); | ||
333 | break; | ||
334 | case 12: | ||
335 | __constant_copy_to_user_asm(res, to, from, tmp, 12, l, l, l); | ||
336 | break; | ||
337 | default: | ||
338 | /* limit the inlined version to 3 moves */ | ||
339 | return __generic_copy_to_user(to, from, n); | ||
278 | } | 340 | } |
279 | 341 | ||
280 | asm volatile ("\n" | ||
281 | " .ifndef .Lto_user\n" | ||
282 | " .set .Lto_user,1\n" | ||
283 | " .macro copy_to_user to,from,tmp\n" | ||
284 | " .if .Lcnt >= 4\n" | ||
285 | " move.l (\\from)+,\\tmp\n" | ||
286 | "11: moves.l \\tmp,(\\to)+\n" | ||
287 | "12: .set .Lcnt,.Lcnt-4\n" | ||
288 | " .elseif .Lcnt & 2\n" | ||
289 | " move.w (\\from)+,\\tmp\n" | ||
290 | "11: moves.w \\tmp,(\\to)+\n" | ||
291 | "12: .set .Lcnt,.Lcnt-2\n" | ||
292 | " .elseif .Lcnt & 1\n" | ||
293 | " move.b (\\from)+,\\tmp\n" | ||
294 | "11: moves.b \\tmp,(\\to)+\n" | ||
295 | "12: .set .Lcnt,.Lcnt-1\n" | ||
296 | " .else\n" | ||
297 | " .exitm\n" | ||
298 | " .endif\n" | ||
299 | "\n" | ||
300 | " .section __ex_table,\"a\"\n" | ||
301 | " .align 4\n" | ||
302 | " .long 11b,3f\n" | ||
303 | " .long 12b,3f\n" | ||
304 | " .previous\n" | ||
305 | " .endm\n" | ||
306 | " .endif\n" | ||
307 | "\n" | ||
308 | " .set .Lcnt,%c4\n" | ||
309 | " copy_to_user %1,%2,%3\n" | ||
310 | " copy_to_user %1,%2,%3\n" | ||
311 | " copy_to_user %1,%2,%3\n" | ||
312 | "2:\n" | ||
313 | " .section .fixup,\"ax\"\n" | ||
314 | " .even\n" | ||
315 | "3: moveq.l %4,%0\n" | ||
316 | " jra 2b\n" | ||
317 | " .previous\n" | ||
318 | : "+r" (res), "+a" (to), "+a" (from), "=&d" (tmp) | ||
319 | : "i" (n) | ||
320 | : "memory"); | ||
321 | |||
322 | return res; | 342 | return res; |
323 | } | 343 | } |
324 | 344 | ||