aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-08-24 01:03:34 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-08-24 01:03:34 -0400
commit75a95178dafb5c8d69b4abe45ea746a9cea23142 (patch)
tree1dbf80c83d9521dcdebc9e670f48da6c1ba34187 /include
parent8531c5ffbca65f6df868637c26e6df6f88bff738 (diff)
parent0572e3da3ff5c3744b2f606ecf296d5f89a4bbdf (diff)
Merge upstream into 'upstream' branch of netdev-2.6.git.
Hand fix merge conflict in drivers/net/tokenring/Kconfig.
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/system.h29
-rw-r--r--include/asm-arm/arch-ixp4xx/timex.h6
-rw-r--r--include/asm-arm/bug.h2
-rw-r--r--include/asm-arm/cpu-multi32.h2
-rw-r--r--include/asm-arm/cpu-single.h2
-rw-r--r--include/asm-ia64/io.h8
-rw-r--r--include/asm-m32r/smp.h2
-rw-r--r--include/asm-ppc/time.h2
-rw-r--r--include/asm-s390/uaccess.h21
-rw-r--r--include/asm-sparc64/thread_info.h5
-rw-r--r--include/linux/fs.h8
-rw-r--r--include/net/ax25.h18
-rw-r--r--include/net/sock.h5
-rw-r--r--include/sound/core.h2
14 files changed, 55 insertions, 57 deletions
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h
index c08ce970ff8c..bdb4d66418f1 100644
--- a/include/asm-alpha/system.h
+++ b/include/asm-alpha/system.h
@@ -443,22 +443,19 @@ __xchg_u64(volatile long *m, unsigned long val)
443 if something tries to do an invalid xchg(). */ 443 if something tries to do an invalid xchg(). */
444extern void __xchg_called_with_bad_pointer(void); 444extern void __xchg_called_with_bad_pointer(void);
445 445
446static inline unsigned long 446#define __xchg(ptr, x, size) \
447__xchg(volatile void *ptr, unsigned long x, int size) 447({ \
448{ 448 unsigned long __xchg__res; \
449 switch (size) { 449 volatile void *__xchg__ptr = (ptr); \
450 case 1: 450 switch (size) { \
451 return __xchg_u8(ptr, x); 451 case 1: __xchg__res = __xchg_u8(__xchg__ptr, x); break; \
452 case 2: 452 case 2: __xchg__res = __xchg_u16(__xchg__ptr, x); break; \
453 return __xchg_u16(ptr, x); 453 case 4: __xchg__res = __xchg_u32(__xchg__ptr, x); break; \
454 case 4: 454 case 8: __xchg__res = __xchg_u64(__xchg__ptr, x); break; \
455 return __xchg_u32(ptr, x); 455 default: __xchg_called_with_bad_pointer(); __xchg__res = x; \
456 case 8: 456 } \
457 return __xchg_u64(ptr, x); 457 __xchg__res; \
458 } 458})
459 __xchg_called_with_bad_pointer();
460 return x;
461}
462 459
463#define xchg(ptr,x) \ 460#define xchg(ptr,x) \
464 ({ \ 461 ({ \
diff --git a/include/asm-arm/arch-ixp4xx/timex.h b/include/asm-arm/arch-ixp4xx/timex.h
index 38c9d77d3727..3745e35cc030 100644
--- a/include/asm-arm/arch-ixp4xx/timex.h
+++ b/include/asm-arm/arch-ixp4xx/timex.h
@@ -7,7 +7,9 @@
7 7
8/* 8/*
9 * We use IXP425 General purpose timer for our timer needs, it runs at 9 * We use IXP425 General purpose timer for our timer needs, it runs at
10 * 66.66... MHz 10 * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
11 * timer register ignores the bottom 2 bits of the LATCH value.
11 */ 12 */
12#define CLOCK_TICK_RATE (66666666) 13#define FREQ 66666666
14#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
13 15
diff --git a/include/asm-arm/bug.h b/include/asm-arm/bug.h
index 24d11672eb60..7fb02138f585 100644
--- a/include/asm-arm/bug.h
+++ b/include/asm-arm/bug.h
@@ -5,7 +5,7 @@
5 5
6#ifdef CONFIG_BUG 6#ifdef CONFIG_BUG
7#ifdef CONFIG_DEBUG_BUGVERBOSE 7#ifdef CONFIG_DEBUG_BUGVERBOSE
8extern volatile void __bug(const char *file, int line, void *data); 8extern void __bug(const char *file, int line, void *data) __attribute__((noreturn));
9 9
10/* give file/line information */ 10/* give file/line information */
11#define BUG() __bug(__FILE__, __LINE__, NULL) 11#define BUG() __bug(__FILE__, __LINE__, NULL)
diff --git a/include/asm-arm/cpu-multi32.h b/include/asm-arm/cpu-multi32.h
index ff48022e4720..4679f63688e9 100644
--- a/include/asm-arm/cpu-multi32.h
+++ b/include/asm-arm/cpu-multi32.h
@@ -31,7 +31,7 @@ extern struct processor {
31 /* 31 /*
32 * Special stuff for a reset 32 * Special stuff for a reset
33 */ 33 */
34 volatile void (*reset)(unsigned long addr); 34 void (*reset)(unsigned long addr) __attribute__((noreturn));
35 /* 35 /*
36 * Idle the processor 36 * Idle the processor
37 */ 37 */
diff --git a/include/asm-arm/cpu-single.h b/include/asm-arm/cpu-single.h
index b5ec5d54665d..6723e67244fa 100644
--- a/include/asm-arm/cpu-single.h
+++ b/include/asm-arm/cpu-single.h
@@ -41,4 +41,4 @@ extern int cpu_do_idle(void);
41extern void cpu_dcache_clean_area(void *, int); 41extern void cpu_dcache_clean_area(void *, int);
42extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); 42extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
43extern void cpu_set_pte(pte_t *ptep, pte_t pte); 43extern void cpu_set_pte(pte_t *ptep, pte_t pte);
44extern volatile void cpu_reset(unsigned long addr); 44extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h
index 491e9d1fc538..54e7637a326c 100644
--- a/include/asm-ia64/io.h
+++ b/include/asm-ia64/io.h
@@ -120,14 +120,6 @@ static inline void ___ia64_mmiowb(void)
120 ia64_mfa(); 120 ia64_mfa();
121} 121}
122 122
123static inline const unsigned long
124__ia64_get_io_port_base (void)
125{
126 extern unsigned long ia64_iobase;
127
128 return ia64_iobase;
129}
130
131static inline void* 123static inline void*
132__ia64_mk_io_addr (unsigned long port) 124__ia64_mk_io_addr (unsigned long port)
133{ 125{
diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h
index b9a20cdad65f..7885b7df84a2 100644
--- a/include/asm-m32r/smp.h
+++ b/include/asm-m32r/smp.h
@@ -61,9 +61,7 @@ extern physid_mask_t phys_cpu_present_map;
61 * Some lowlevel functions might want to know about 61 * Some lowlevel functions might want to know about
62 * the real CPU ID <-> CPU # mapping. 62 * the real CPU ID <-> CPU # mapping.
63 */ 63 */
64extern volatile int physid_2_cpu[NR_CPUS];
65extern volatile int cpu_2_physid[NR_CPUS]; 64extern volatile int cpu_2_physid[NR_CPUS];
66#define physid_to_cpu(physid) physid_2_cpu[physid]
67#define cpu_to_physid(cpu_id) cpu_2_physid[cpu_id] 65#define cpu_to_physid(cpu_id) cpu_2_physid[cpu_id]
68 66
69#define raw_smp_processor_id() (current_thread_info()->cpu) 67#define raw_smp_processor_id() (current_thread_info()->cpu)
diff --git a/include/asm-ppc/time.h b/include/asm-ppc/time.h
index ce09b47fa819..321fb75b5f22 100644
--- a/include/asm-ppc/time.h
+++ b/include/asm-ppc/time.h
@@ -58,7 +58,7 @@ static __inline__ void set_dec(unsigned int val)
58/* Accessor functions for the timebase (RTC on 601) registers. */ 58/* Accessor functions for the timebase (RTC on 601) registers. */
59/* If one day CONFIG_POWER is added just define __USE_RTC as 1 */ 59/* If one day CONFIG_POWER is added just define __USE_RTC as 1 */
60#ifdef CONFIG_6xx 60#ifdef CONFIG_6xx
61extern __inline__ int const __USE_RTC(void) { 61extern __inline__ int __attribute_pure__ __USE_RTC(void) {
62 return (mfspr(SPRN_PVR)>>16) == 1; 62 return (mfspr(SPRN_PVR)>>16) == 1;
63} 63}
64#else 64#else
diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h
index a7f43a251f81..3e3bfe6a8fa8 100644
--- a/include/asm-s390/uaccess.h
+++ b/include/asm-s390/uaccess.h
@@ -149,11 +149,11 @@ struct exception_table_entry
149}) 149})
150#endif 150#endif
151 151
152#ifndef __CHECKER__
153#define __put_user(x, ptr) \ 152#define __put_user(x, ptr) \
154({ \ 153({ \
155 __typeof__(*(ptr)) __x = (x); \ 154 __typeof__(*(ptr)) __x = (x); \
156 int __pu_err; \ 155 int __pu_err; \
156 __chk_user_ptr(ptr); \
157 switch (sizeof (*(ptr))) { \ 157 switch (sizeof (*(ptr))) { \
158 case 1: \ 158 case 1: \
159 case 2: \ 159 case 2: \
@@ -167,14 +167,6 @@ struct exception_table_entry
167 } \ 167 } \
168 __pu_err; \ 168 __pu_err; \
169}) 169})
170#else
171#define __put_user(x, ptr) \
172({ \
173 void __user *p; \
174 p = (ptr); \
175 0; \
176})
177#endif
178 170
179#define put_user(x, ptr) \ 171#define put_user(x, ptr) \
180({ \ 172({ \
@@ -213,11 +205,11 @@ extern int __put_user_bad(void) __attribute__((noreturn));
213}) 205})
214#endif 206#endif
215 207
216#ifndef __CHECKER__
217#define __get_user(x, ptr) \ 208#define __get_user(x, ptr) \
218({ \ 209({ \
219 __typeof__(*(ptr)) __x; \ 210 __typeof__(*(ptr)) __x; \
220 int __gu_err; \ 211 int __gu_err; \
212 __chk_user_ptr(ptr); \
221 switch (sizeof(*(ptr))) { \ 213 switch (sizeof(*(ptr))) { \
222 case 1: \ 214 case 1: \
223 case 2: \ 215 case 2: \
@@ -232,15 +224,6 @@ extern int __put_user_bad(void) __attribute__((noreturn));
232 (x) = __x; \ 224 (x) = __x; \
233 __gu_err; \ 225 __gu_err; \
234}) 226})
235#else
236#define __get_user(x, ptr) \
237({ \
238 void __user *p; \
239 p = (ptr); \
240 0; \
241})
242#endif
243
244 227
245#define get_user(x, ptr) \ 228#define get_user(x, ptr) \
246({ \ 229({ \
diff --git a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h
index 352d9943661a..c94d8b3991bd 100644
--- a/include/asm-sparc64/thread_info.h
+++ b/include/asm-sparc64/thread_info.h
@@ -68,6 +68,9 @@ struct thread_info {
68 68
69 struct restart_block restart_block; 69 struct restart_block restart_block;
70 70
71 struct pt_regs *kern_una_regs;
72 unsigned int kern_una_insn;
73
71 unsigned long fpregs[0] __attribute__ ((aligned(64))); 74 unsigned long fpregs[0] __attribute__ ((aligned(64)));
72}; 75};
73 76
@@ -103,6 +106,8 @@ struct thread_info {
103#define TI_PCR 0x00000490 106#define TI_PCR 0x00000490
104#define TI_CEE_STUFF 0x00000498 107#define TI_CEE_STUFF 0x00000498
105#define TI_RESTART_BLOCK 0x000004a0 108#define TI_RESTART_BLOCK 0x000004a0
109#define TI_KUNA_REGS 0x000004c8
110#define TI_KUNA_INSN 0x000004d0
106#define TI_FPREGS 0x00000500 111#define TI_FPREGS 0x00000500
107 112
108/* We embed this in the uppermost byte of thread_info->flags */ 113/* We embed this in the uppermost byte of thread_info->flags */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f9adf75fd9b4..67e6732d4fdc 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -993,8 +993,8 @@ struct inode_operations {
993 int (*rename) (struct inode *, struct dentry *, 993 int (*rename) (struct inode *, struct dentry *,
994 struct inode *, struct dentry *); 994 struct inode *, struct dentry *);
995 int (*readlink) (struct dentry *, char __user *,int); 995 int (*readlink) (struct dentry *, char __user *,int);
996 int (*follow_link) (struct dentry *, struct nameidata *); 996 void * (*follow_link) (struct dentry *, struct nameidata *);
997 void (*put_link) (struct dentry *, struct nameidata *); 997 void (*put_link) (struct dentry *, struct nameidata *, void *);
998 void (*truncate) (struct inode *); 998 void (*truncate) (struct inode *);
999 int (*permission) (struct inode *, int, struct nameidata *); 999 int (*permission) (struct inode *, int, struct nameidata *);
1000 int (*setattr) (struct dentry *, struct iattr *); 1000 int (*setattr) (struct dentry *, struct iattr *);
@@ -1602,8 +1602,8 @@ extern struct file_operations generic_ro_fops;
1602extern int vfs_readlink(struct dentry *, char __user *, int, const char *); 1602extern int vfs_readlink(struct dentry *, char __user *, int, const char *);
1603extern int vfs_follow_link(struct nameidata *, const char *); 1603extern int vfs_follow_link(struct nameidata *, const char *);
1604extern int page_readlink(struct dentry *, char __user *, int); 1604extern int page_readlink(struct dentry *, char __user *, int);
1605extern int page_follow_link_light(struct dentry *, struct nameidata *); 1605extern void *page_follow_link_light(struct dentry *, struct nameidata *);
1606extern void page_put_link(struct dentry *, struct nameidata *); 1606extern void page_put_link(struct dentry *, struct nameidata *, void *);
1607extern int page_symlink(struct inode *inode, const char *symname, int len); 1607extern int page_symlink(struct inode *inode, const char *symname, int len);
1608extern struct inode_operations page_symlink_inode_operations; 1608extern struct inode_operations page_symlink_inode_operations;
1609extern int generic_readlink(struct dentry *, char __user *, int); 1609extern int generic_readlink(struct dentry *, char __user *, int);
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 828a3a93dda1..3696f988a9f1 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -139,11 +139,25 @@ enum {
139#define AX25_DEF_DS_TIMEOUT (3 * 60 * HZ) /* DAMA timeout 3 minutes */ 139#define AX25_DEF_DS_TIMEOUT (3 * 60 * HZ) /* DAMA timeout 3 minutes */
140 140
141typedef struct ax25_uid_assoc { 141typedef struct ax25_uid_assoc {
142 struct ax25_uid_assoc *next; 142 struct hlist_node uid_node;
143 atomic_t refcount;
143 uid_t uid; 144 uid_t uid;
144 ax25_address call; 145 ax25_address call;
145} ax25_uid_assoc; 146} ax25_uid_assoc;
146 147
148#define ax25_uid_for_each(__ax25, node, list) \
149 hlist_for_each_entry(__ax25, node, list, uid_node)
150
151#define ax25_uid_hold(ax25) \
152 atomic_inc(&((ax25)->refcount))
153
154static inline void ax25_uid_put(ax25_uid_assoc *assoc)
155{
156 if (atomic_dec_and_test(&assoc->refcount)) {
157 kfree(assoc);
158 }
159}
160
147typedef struct { 161typedef struct {
148 ax25_address calls[AX25_MAX_DIGIS]; 162 ax25_address calls[AX25_MAX_DIGIS];
149 unsigned char repeated[AX25_MAX_DIGIS]; 163 unsigned char repeated[AX25_MAX_DIGIS];
@@ -376,7 +390,7 @@ extern unsigned long ax25_display_timer(struct timer_list *);
376 390
377/* ax25_uid.c */ 391/* ax25_uid.c */
378extern int ax25_uid_policy; 392extern int ax25_uid_policy;
379extern ax25_address *ax25_findbyuid(uid_t); 393extern ax25_uid_assoc *ax25_findbyuid(uid_t);
380extern int ax25_uid_ioctl(int, struct sockaddr_ax25 *); 394extern int ax25_uid_ioctl(int, struct sockaddr_ax25 *);
381extern struct file_operations ax25_uid_fops; 395extern struct file_operations ax25_uid_fops;
382extern void ax25_uid_free(void); 396extern void ax25_uid_free(void);
diff --git a/include/net/sock.h b/include/net/sock.h
index a1042d08becd..e9b1dbab90d0 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -384,6 +384,11 @@ enum sock_flags {
384 SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */ 384 SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */
385}; 385};
386 386
387static inline void sock_copy_flags(struct sock *nsk, struct sock *osk)
388{
389 nsk->sk_flags = osk->sk_flags;
390}
391
387static inline void sock_set_flag(struct sock *sk, enum sock_flags flag) 392static inline void sock_set_flag(struct sock *sk, enum sock_flags flag)
388{ 393{
389 __set_bit(flag, &sk->sk_flags); 394 __set_bit(flag, &sk->sk_flags);
diff --git a/include/sound/core.h b/include/sound/core.h
index 38b357fc8958..f72b3ef515e2 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -360,11 +360,13 @@ int snd_device_free_all(snd_card_t *card, snd_device_cmd_t cmd);
360 360
361/* isadma.c */ 361/* isadma.c */
362 362
363#ifdef CONFIG_ISA_DMA_API
363#define DMA_MODE_NO_ENABLE 0x0100 364#define DMA_MODE_NO_ENABLE 0x0100
364 365
365void snd_dma_program(unsigned long dma, unsigned long addr, unsigned int size, unsigned short mode); 366void snd_dma_program(unsigned long dma, unsigned long addr, unsigned int size, unsigned short mode);
366void snd_dma_disable(unsigned long dma); 367void snd_dma_disable(unsigned long dma);
367unsigned int snd_dma_pointer(unsigned long dma, unsigned int size); 368unsigned int snd_dma_pointer(unsigned long dma, unsigned int size);
369#endif
368 370
369/* misc.c */ 371/* misc.c */
370 372