diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-alpha/system.h | 29 | ||||
| -rw-r--r-- | include/asm-arm/arch-ixp4xx/timex.h | 6 | ||||
| -rw-r--r-- | include/asm-arm/bug.h | 2 | ||||
| -rw-r--r-- | include/asm-arm/cpu-multi32.h | 2 | ||||
| -rw-r--r-- | include/asm-arm/cpu-single.h | 2 | ||||
| -rw-r--r-- | include/asm-ia64/io.h | 8 | ||||
| -rw-r--r-- | include/asm-m32r/smp.h | 2 | ||||
| -rw-r--r-- | include/asm-ppc/time.h | 2 | ||||
| -rw-r--r-- | include/asm-s390/uaccess.h | 21 | ||||
| -rw-r--r-- | include/net/ax25.h | 18 | ||||
| -rw-r--r-- | include/net/sock.h | 5 | ||||
| -rw-r--r-- | include/sound/core.h | 2 |
12 files changed, 46 insertions, 53 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(). */ |
| 444 | extern void __xchg_called_with_bad_pointer(void); | 444 | extern void __xchg_called_with_bad_pointer(void); |
| 445 | 445 | ||
| 446 | static 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 |
| 8 | extern volatile void __bug(const char *file, int line, void *data); | 8 | extern 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); | |||
| 41 | extern void cpu_dcache_clean_area(void *, int); | 41 | extern void cpu_dcache_clean_area(void *, int); |
| 42 | extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); | 42 | extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); |
| 43 | extern void cpu_set_pte(pte_t *ptep, pte_t pte); | 43 | extern void cpu_set_pte(pte_t *ptep, pte_t pte); |
| 44 | extern volatile void cpu_reset(unsigned long addr); | 44 | extern 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 | ||
| 123 | static 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 | |||
| 131 | static inline void* | 123 | static 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 | */ |
| 64 | extern volatile int physid_2_cpu[NR_CPUS]; | ||
| 65 | extern volatile int cpu_2_physid[NR_CPUS]; | 64 | extern 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 |
| 61 | extern __inline__ int const __USE_RTC(void) { | 61 | extern __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/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 | ||
| 141 | typedef struct ax25_uid_assoc { | 141 | typedef 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 | |||
| 154 | static inline void ax25_uid_put(ax25_uid_assoc *assoc) | ||
| 155 | { | ||
| 156 | if (atomic_dec_and_test(&assoc->refcount)) { | ||
| 157 | kfree(assoc); | ||
| 158 | } | ||
| 159 | } | ||
| 160 | |||
| 147 | typedef struct { | 161 | typedef 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 */ |
| 378 | extern int ax25_uid_policy; | 392 | extern int ax25_uid_policy; |
| 379 | extern ax25_address *ax25_findbyuid(uid_t); | 393 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); |
| 380 | extern int ax25_uid_ioctl(int, struct sockaddr_ax25 *); | 394 | extern int ax25_uid_ioctl(int, struct sockaddr_ax25 *); |
| 381 | extern struct file_operations ax25_uid_fops; | 395 | extern struct file_operations ax25_uid_fops; |
| 382 | extern void ax25_uid_free(void); | 396 | extern 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 | ||
| 387 | static inline void sock_copy_flags(struct sock *nsk, struct sock *osk) | ||
| 388 | { | ||
| 389 | nsk->sk_flags = osk->sk_flags; | ||
| 390 | } | ||
| 391 | |||
| 387 | static inline void sock_set_flag(struct sock *sk, enum sock_flags flag) | 392 | static 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 | ||
| 365 | void snd_dma_program(unsigned long dma, unsigned long addr, unsigned int size, unsigned short mode); | 366 | void snd_dma_program(unsigned long dma, unsigned long addr, unsigned int size, unsigned short mode); |
| 366 | void snd_dma_disable(unsigned long dma); | 367 | void snd_dma_disable(unsigned long dma); |
| 367 | unsigned int snd_dma_pointer(unsigned long dma, unsigned int size); | 368 | unsigned int snd_dma_pointer(unsigned long dma, unsigned int size); |
| 369 | #endif | ||
| 368 | 370 | ||
| 369 | /* misc.c */ | 371 | /* misc.c */ |
| 370 | 372 | ||
