Magellan Linux

Annotation of /trunk/linux-libc-headers/patches/linux-2.6.20.1-mips_headers-1.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 642 - (hide annotations) (download)
Tue Dec 18 00:23:39 2007 UTC (16 years, 5 months ago) by niro
File size: 13724 byte(s)
-synced with upstream

1 niro 642 diff -Naur linux-2.6.20.1/include/asm-mips/compat-signal.h linux-mips-2.6.20.1/include/asm-mips/compat-signal.h
2     --- linux-2.6.20.1/include/asm-mips/compat-signal.h 1969-12-31 16:00:00.000000000 -0800
3     +++ linux-mips-2.6.20.1/include/asm-mips/compat-signal.h 2007-02-20 16:47:41.000000000 -0800
4     @@ -0,0 +1,54 @@
5     +#ifndef __ASM_COMPAT_SIGNAL_H
6     +#define __ASM_COMPAT_SIGNAL_H
7     +
8     +#include <linux/bug.h>
9     +#include <linux/compat.h>
10     +#include <linux/compiler.h>
11     +
12     +#include <asm/uaccess.h>
13     +
14     +static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d,
15     + const sigset_t *s)
16     +{
17     + int err;
18     +
19     + BUG_ON(sizeof(*d) != sizeof(*s));
20     + BUG_ON(_NSIG_WORDS != 2);
21     +
22     + err = __put_user(s->sig[0], &d->sig[0]);
23     + err |= __put_user(s->sig[0] >> 32, &d->sig[1]);
24     + err |= __put_user(s->sig[1], &d->sig[2]);
25     + err |= __put_user(s->sig[1] >> 32, &d->sig[3]);
26     +
27     + return err;
28     +}
29     +
30     +static inline int __copy_conv_sigset_from_user(sigset_t *d,
31     + const compat_sigset_t __user *s)
32     +{
33     + int err;
34     + union sigset_u {
35     + sigset_t s;
36     + compat_sigset_t c;
37     + } *u = (union sigset_u *) d;
38     +
39     + BUG_ON(sizeof(*d) != sizeof(*s));
40     + BUG_ON(_NSIG_WORDS != 2);
41     +
42     +#ifdef CONFIG_CPU_BIG_ENDIAN
43     + err = __get_user(u->c.sig[1], &s->sig[0]);
44     + err |= __get_user(u->c.sig[0], &s->sig[1]);
45     + err |= __get_user(u->c.sig[3], &s->sig[2]);
46     + err |= __get_user(u->c.sig[2], &s->sig[3]);
47     +#endif
48     +#ifdef CONFIG_CPU_LITTLE_ENDIAN
49     + err = __get_user(u->c.sig[0], &s->sig[0]);
50     + err |= __get_user(u->c.sig[1], &s->sig[1]);
51     + err |= __get_user(u->c.sig[2], &s->sig[2]);
52     + err |= __get_user(u->c.sig[3], &s->sig[3]);
53     +#endif
54     +
55     + return err;
56     +}
57     +
58     +#endif /* __ASM_COMPAT_SIGNAL_H */
59     diff -Naur linux-2.6.20.1/include/asm-mips/dma-mapping.h linux-mips-2.6.20.1/include/asm-mips/dma-mapping.h
60     --- linux-2.6.20.1/include/asm-mips/dma-mapping.h 2007-02-19 22:34:32.000000000 -0800
61     +++ linux-mips-2.6.20.1/include/asm-mips/dma-mapping.h 2007-02-20 16:47:41.000000000 -0800
62     @@ -68,6 +68,7 @@
63     extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
64     enum dma_data_direction direction);
65    
66     +#if 0
67     #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
68    
69     extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
70     @@ -75,5 +76,6 @@
71     extern void dma_release_declared_memory(struct device *dev);
72     extern void * dma_mark_declared_memory_occupied(struct device *dev,
73     dma_addr_t device_addr, size_t size);
74     +#endif
75    
76     #endif /* _ASM_DMA_MAPPING_H */
77     diff -Naur linux-2.6.20.1/include/asm-mips/io.h linux-mips-2.6.20.1/include/asm-mips/io.h
78     --- linux-2.6.20.1/include/asm-mips/io.h 2007-02-19 22:34:32.000000000 -0800
79     +++ linux-mips-2.6.20.1/include/asm-mips/io.h 2007-02-20 16:47:41.000000000 -0800
80     @@ -20,6 +20,7 @@
81     #include <asm/byteorder.h>
82     #include <asm/cpu.h>
83     #include <asm/cpu-features.h>
84     +#include <asm-generic/iomap.h>
85     #include <asm/page.h>
86     #include <asm/pgtable-bits.h>
87     #include <asm/processor.h>
88     @@ -518,34 +519,6 @@
89     }
90    
91     /*
92     - * Memory Mapped I/O
93     - */
94     -#define ioread8(addr) readb(addr)
95     -#define ioread16(addr) readw(addr)
96     -#define ioread32(addr) readl(addr)
97     -
98     -#define iowrite8(b,addr) writeb(b,addr)
99     -#define iowrite16(w,addr) writew(w,addr)
100     -#define iowrite32(l,addr) writel(l,addr)
101     -
102     -#define ioread8_rep(a,b,c) readsb(a,b,c)
103     -#define ioread16_rep(a,b,c) readsw(a,b,c)
104     -#define ioread32_rep(a,b,c) readsl(a,b,c)
105     -
106     -#define iowrite8_rep(a,b,c) writesb(a,b,c)
107     -#define iowrite16_rep(a,b,c) writesw(a,b,c)
108     -#define iowrite32_rep(a,b,c) writesl(a,b,c)
109     -
110     -/* Create a virtual mapping cookie for an IO port range */
111     -extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
112     -extern void ioport_unmap(void __iomem *);
113     -
114     -/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
115     -struct pci_dev;
116     -extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
117     -extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
118     -
119     -/*
120     * ISA space is 'always mapped' on currently supported MIPS systems, no need
121     * to explicitly ioremap() it. The fact that the ISA IO space is mapped
122     * to PAGE_OFFSET is pure coincidence - it does not mean ISA values
123     diff -Naur linux-2.6.20.1/include/asm-mips/mach-au1x00/au1000.h linux-mips-2.6.20.1/include/asm-mips/mach-au1x00/au1000.h
124     --- linux-2.6.20.1/include/asm-mips/mach-au1x00/au1000.h 2007-02-19 22:34:32.000000000 -0800
125     +++ linux-mips-2.6.20.1/include/asm-mips/mach-au1x00/au1000.h 2007-02-20 16:47:41.000000000 -0800
126     @@ -39,6 +39,7 @@
127     #ifndef _LANGUAGE_ASSEMBLY
128    
129     #include <linux/delay.h>
130     +#include <linux/types.h>
131     #include <asm/io.h>
132    
133     /* cpu pipeline flush */
134     diff -Naur linux-2.6.20.1/include/asm-mips/mach-au1x00/au1xxx_ide.h linux-mips-2.6.20.1/include/asm-mips/mach-au1x00/au1xxx_ide.h
135     --- linux-2.6.20.1/include/asm-mips/mach-au1x00/au1xxx_ide.h 2007-02-19 22:34:32.000000000 -0800
136     +++ linux-mips-2.6.20.1/include/asm-mips/mach-au1x00/au1xxx_ide.h 2007-02-20 16:47:41.000000000 -0800
137     @@ -83,6 +83,7 @@
138     } _auide_hwif;
139    
140     #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
141     +
142     /* HD white list */
143     static const struct drive_list_entry dma_white_list [] = {
144     /*
145     diff -Naur linux-2.6.20.1/include/asm-mips/mach-generic/ide.h linux-mips-2.6.20.1/include/asm-mips/mach-generic/ide.h
146     --- linux-2.6.20.1/include/asm-mips/mach-generic/ide.h 2007-02-19 22:34:32.000000000 -0800
147     +++ linux-mips-2.6.20.1/include/asm-mips/mach-generic/ide.h 2007-02-20 16:47:41.000000000 -0800
148     @@ -29,17 +29,12 @@
149    
150     #define IDE_ARCH_OBSOLETE_DEFAULTS
151    
152     +extern int mips_system_has_legacy_ide;
153     +
154     static __inline__ int ide_probe_legacy(void)
155     {
156     #ifdef CONFIG_PCI
157     - struct pci_dev *dev;
158     - if ((dev = pci_get_class(PCI_CLASS_BRIDGE_EISA << 8, NULL)) != NULL ||
159     - (dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL)) != NULL) {
160     - pci_dev_put(dev);
161     -
162     - return 1;
163     - }
164     - return 0;
165     + return mips_system_has_legacy_ide;
166     #elif defined(CONFIG_EISA) || defined(CONFIG_ISA)
167     return 1;
168     #else
169     diff -Naur linux-2.6.20.1/include/asm-mips/mips_mt.h linux-mips-2.6.20.1/include/asm-mips/mips_mt.h
170     --- linux-2.6.20.1/include/asm-mips/mips_mt.h 2007-02-19 22:34:32.000000000 -0800
171     +++ linux-mips-2.6.20.1/include/asm-mips/mips_mt.h 2007-02-20 16:47:41.000000000 -0800
172     @@ -12,4 +12,7 @@
173     extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value);
174     extern void mips_mt_set_cpuoptions(void);
175    
176     +struct class;
177     +extern struct class *mt_class;
178     +
179     #endif /* __ASM_MIPS_MT_H */
180     diff -Naur linux-2.6.20.1/include/asm-mips/pci.h linux-mips-2.6.20.1/include/asm-mips/pci.h
181     --- linux-2.6.20.1/include/asm-mips/pci.h 2007-02-19 22:34:32.000000000 -0800
182     +++ linux-mips-2.6.20.1/include/asm-mips/pci.h 2007-02-20 16:47:41.000000000 -0800
183     @@ -32,6 +32,7 @@
184     unsigned long mem_offset;
185     struct resource *io_resource;
186     unsigned long io_offset;
187     + unsigned long io_map_base;
188    
189     unsigned int index;
190     /* For compatibility with current (as of July 2003) pciutils
191     diff -Naur linux-2.6.20.1/include/asm-mips/sigcontext.h linux-mips-2.6.20.1/include/asm-mips/sigcontext.h
192     --- linux-2.6.20.1/include/asm-mips/sigcontext.h 2007-02-19 22:34:32.000000000 -0800
193     +++ linux-mips-2.6.20.1/include/asm-mips/sigcontext.h 2007-02-20 16:47:41.000000000 -0800
194     @@ -42,6 +42,7 @@
195    
196     #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
197    
198     +#include <linux/posix_types.h>
199     /*
200     * Keep this struct definition in sync with the sigcontext fragment
201     * in arch/mips/tools/offset.c
202     @@ -53,27 +54,25 @@
203     * entries, add sc_dsp and sc_reserved for padding. No prisoners.
204     */
205     struct sigcontext {
206     - unsigned long sc_regs[32];
207     - unsigned long sc_fpregs[32];
208     - unsigned long sc_mdhi;
209     - unsigned long sc_hi1;
210     - unsigned long sc_hi2;
211     - unsigned long sc_hi3;
212     - unsigned long sc_mdlo;
213     - unsigned long sc_lo1;
214     - unsigned long sc_lo2;
215     - unsigned long sc_lo3;
216     - unsigned long sc_pc;
217     - unsigned int sc_fpc_csr;
218     - unsigned int sc_used_math;
219     - unsigned int sc_dsp;
220     - unsigned int sc_reserved;
221     + __u64 sc_regs[32];
222     + __u64 sc_fpregs[32];
223     + __u64 sc_mdhi;
224     + __u64 sc_hi1;
225     + __u64 sc_hi2;
226     + __u64 sc_hi3;
227     + __u64 sc_mdlo;
228     + __u64 sc_lo1;
229     + __u64 sc_lo2;
230     + __u64 sc_lo3;
231     + __u64 sc_pc;
232     + __u32 sc_fpc_csr;
233     + __u32 sc_used_math;
234     + __u32 sc_dsp;
235     + __u32 sc_reserved;
236     };
237    
238     #ifdef __KERNEL__
239    
240     -#include <linux/posix_types.h>
241     -
242     struct sigcontext32 {
243     __u32 sc_regmask; /* Unused */
244     __u32 sc_status;
245     diff -Naur linux-2.6.20.1/include/asm-mips/uaccess.h linux-mips-2.6.20.1/include/asm-mips/uaccess.h
246     --- linux-2.6.20.1/include/asm-mips/uaccess.h 2007-02-19 22:34:32.000000000 -0800
247     +++ linux-mips-2.6.20.1/include/asm-mips/uaccess.h 2007-02-20 16:47:41.000000000 -0800
248     @@ -265,12 +265,14 @@
249     */
250     #define __get_user_asm_ll32(val, addr) \
251     { \
252     - unsigned long long __gu_tmp; \
253     + union { \
254     + unsigned long long l; \
255     + __typeof__(*(addr)) t; \
256     + } __gu_tmp; \
257     \
258     __asm__ __volatile__( \
259     "1: lw %1, (%3) \n" \
260     "2: lw %D1, 4(%3) \n" \
261     - " move %0, $0 \n" \
262     "3: .section .fixup,\"ax\" \n" \
263     "4: li %0, %4 \n" \
264     " move %1, $0 \n" \
265     @@ -281,9 +283,10 @@
266     " " __UA_ADDR " 1b, 4b \n" \
267     " " __UA_ADDR " 2b, 4b \n" \
268     " .previous \n" \
269     - : "=r" (__gu_err), "=&r" (__gu_tmp) \
270     + : "=r" (__gu_err), "=&r" (__gu_tmp.l) \
271     : "0" (0), "r" (addr), "i" (-EFAULT)); \
272     - (val) = (__typeof__(*(addr))) __gu_tmp; \
273     + \
274     + (val) = __gu_tmp.t; \
275     }
276    
277     /*
278     @@ -432,8 +435,32 @@
279     __cu_len; \
280     })
281    
282     -#define __copy_to_user_inatomic __copy_to_user
283     -#define __copy_from_user_inatomic __copy_from_user
284     +#define __copy_to_user_inatomic(to,from,n) \
285     +({ \
286     + void __user *__cu_to; \
287     + const void *__cu_from; \
288     + long __cu_len; \
289     + \
290     + __cu_to = (to); \
291     + __cu_from = (from); \
292     + __cu_len = (n); \
293     + __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \
294     + __cu_len; \
295     +})
296     +
297     +#define __copy_from_user_inatomic(to,from,n) \
298     +({ \
299     + void *__cu_to; \
300     + const void __user *__cu_from; \
301     + long __cu_len; \
302     + \
303     + __cu_to = (to); \
304     + __cu_from = (from); \
305     + __cu_len = (n); \
306     + __cu_len = __invoke_copy_from_user_inatomic(__cu_to, __cu_from, \
307     + __cu_len); \
308     + __cu_len; \
309     +})
310    
311     /*
312     * copy_to_user: - Copy a block of data into user space.
313     @@ -487,8 +514,32 @@
314     __cu_len_r; \
315     })
316    
317     +#define __invoke_copy_from_user_inatomic(to,from,n) \
318     +({ \
319     + register void *__cu_to_r __asm__ ("$4"); \
320     + register const void __user *__cu_from_r __asm__ ("$5"); \
321     + register long __cu_len_r __asm__ ("$6"); \
322     + \
323     + __cu_to_r = (to); \
324     + __cu_from_r = (from); \
325     + __cu_len_r = (n); \
326     + __asm__ __volatile__( \
327     + ".set\tnoreorder\n\t" \
328     + __MODULE_JAL(__copy_user_inatomic) \
329     + ".set\tnoat\n\t" \
330     + __UA_ADDU "\t$1, %1, %2\n\t" \
331     + ".set\tat\n\t" \
332     + ".set\treorder" \
333     + : "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \
334     + : \
335     + : "$8", "$9", "$10", "$11", "$12", "$15", "$24", "$31", \
336     + "memory"); \
337     + __cu_len_r; \
338     +})
339     +
340     /*
341     - * __copy_from_user: - Copy a block of data from user space, with less checking. * @to: Destination address, in kernel space.
342     + * __copy_from_user: - Copy a block of data from user space, with less checking.
343     + * @to: Destination address, in kernel space.
344     * @from: Source address, in user space.
345     * @n: Number of bytes to copy.
346     *
347     diff -Naur linux-2.6.20.1/include/linux/pci_ids.h linux-mips-2.6.20.1/include/linux/pci_ids.h
348     --- linux-2.6.20.1/include/linux/pci_ids.h 2007-02-19 22:34:32.000000000 -0800
349     +++ linux-mips-2.6.20.1/include/linux/pci_ids.h 2007-02-20 16:47:41.000000000 -0800
350     @@ -1614,6 +1614,9 @@
351     #define PCI_VENDOR_ID_SATSAGEM 0x1267
352     #define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016
353    
354     +#define PCI_VENDOR_ID_SILICON_MOTION 0x126f
355     +#define PCI_DEVICE_ID_SM501_VOYAGER_GX_REV_AA 0x0501
356     +#define PCI_DEVICE_ID_SM501_VOYAGER_GX_REV_B 0x0510
357    
358     #define PCI_VENDOR_ID_ENSONIQ 0x1274
359     #define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880
360     diff -Naur linux-2.6.20.1/include/linux/serial.h linux-mips-2.6.20.1/include/linux/serial.h
361     --- linux-2.6.20.1/include/linux/serial.h 2007-02-19 22:34:32.000000000 -0800
362     +++ linux-mips-2.6.20.1/include/linux/serial.h 2007-02-20 16:47:41.000000000 -0800
363     @@ -76,7 +76,8 @@
364     #define PORT_16654 11
365     #define PORT_16850 12
366     #define PORT_RSA 13 /* RSA-DV II/S card */
367     -#define PORT_MAX 13
368     +#define PORT_SB1250 14
369     +#define PORT_MAX 14
370    
371     #define SERIAL_IO_PORT 0
372     #define SERIAL_IO_HUB6 1
373     diff -Naur linux-2.6.20.1/include/linux/serial_ip3106.h linux-mips-2.6.20.1/include/linux/serial_ip3106.h
374     --- linux-2.6.20.1/include/linux/serial_ip3106.h 2007-02-19 22:34:32.000000000 -0800
375     +++ linux-mips-2.6.20.1/include/linux/serial_ip3106.h 2007-02-20 16:47:41.000000000 -0800
376     @@ -78,4 +78,16 @@
377     #define IP3106_UART_FIFO_RXFIFO 0x00001F00
378     #define IP3106_UART_FIFO_RBRTHR 0x000000FF
379    
380     +#define ip3106_lcr(base,port) *(volatile u32 *)(base+(port*0x1000) + 0x000)
381     +#define ip3106_mcr(base, port) *(volatile u32 *)(base+(port*0x1000) + 0x004)
382     +#define ip3106_baud(base, port) *(volatile u32 *)(base+(port*0x1000) + 0x008)
383     +#define ip3106_cfg(base, port) *(volatile u32 *)(base+(port*0x1000) + 0x00C)
384     +#define ip3106_fifo(base, port) *(volatile u32 *)(base+(port*0x1000) + 0x028)
385     +#define ip3106_istat(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFE0)
386     +#define ip3106_ien(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFE4)
387     +#define ip3106_iclr(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFE8)
388     +#define ip3106_iset(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFEC)
389     +#define ip3106_pd(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFF4)
390     +#define ip3106_mid(base, port) *(volatile u32 *)(base+(port*0x1000) + 0xFFC)
391     +
392     #endif