aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-13 00:13:48 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-13 00:13:48 -0500
commit3875e1945b55f0eb83fe7359614a801eeb716761 (patch)
tree4567aef3fb7d081cb7d7b7c9bcd94e0e44d39557 /include
parent587005de144acd3007b8e7f2a2a7c6add157c155 (diff)
parentf1b318793dcd2d9ff6b5ac06e7762098fa079cee (diff)
Merge branch 'upstream'
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/unistd.h2
-rw-r--r--include/asm-s390/bitops.h4
-rw-r--r--include/asm-s390/setup.h10
-rw-r--r--include/asm-s390/smp.h1
-rw-r--r--include/asm-s390/unistd.h7
-rw-r--r--include/asm-x86_64/hpet.h2
-rw-r--r--include/asm-x86_64/ia32_unistd.h2
-rw-r--r--include/linux/ata.h10
-rw-r--r--include/linux/compat.h20
-rw-r--r--include/linux/libata.h10
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/syscalls.h2
-rw-r--r--include/linux/time.h25
13 files changed, 81 insertions, 15 deletions
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index cf6f2cd9c514..dc81a55dd94d 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -305,7 +305,7 @@
305#define __NR_mknodat 297 305#define __NR_mknodat 297
306#define __NR_fchownat 298 306#define __NR_fchownat 298
307#define __NR_futimesat 299 307#define __NR_futimesat 299
308#define __NR_newfstatat 300 308#define __NR_fstatat64 300
309#define __NR_unlinkat 301 309#define __NR_unlinkat 301
310#define __NR_renameat 302 310#define __NR_renameat 302
311#define __NR_linkat 303 311#define __NR_linkat 303
diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h
index 61232760cc3b..3628899f48bb 100644
--- a/include/asm-s390/bitops.h
+++ b/include/asm-s390/bitops.h
@@ -518,8 +518,8 @@ static inline int __test_bit(unsigned long nr, const volatile unsigned long *ptr
518 518
519static inline int 519static inline int
520__constant_test_bit(unsigned long nr, const volatile unsigned long *addr) { 520__constant_test_bit(unsigned long nr, const volatile unsigned long *addr) {
521 return ((((volatile char *) addr) 521 return (((volatile char *) addr)
522 [(nr^(__BITOPS_WORDSIZE-8))>>3] & (1<<(nr&7)))) != 0; 522 [(nr^(__BITOPS_WORDSIZE-8))>>3] & (1<<(nr&7))) != 0;
523} 523}
524 524
525#define test_bit(nr,addr) \ 525#define test_bit(nr,addr) \
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h
index 348a88137445..da3fd4a7bb32 100644
--- a/include/asm-s390/setup.h
+++ b/include/asm-s390/setup.h
@@ -8,6 +8,8 @@
8#ifndef _ASM_S390_SETUP_H 8#ifndef _ASM_S390_SETUP_H
9#define _ASM_S390_SETUP_H 9#define _ASM_S390_SETUP_H
10 10
11#ifdef __KERNEL__
12
11#include <asm/types.h> 13#include <asm/types.h>
12 14
13#define PARMAREA 0x10400 15#define PARMAREA 0x10400
@@ -114,7 +116,7 @@ extern u16 ipl_devno;
114 IPL_PARMBLOCK_ORIGIN) 116 IPL_PARMBLOCK_ORIGIN)
115#define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length) 117#define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length)
116 118
117#else 119#else /* __ASSEMBLY__ */
118 120
119#ifndef __s390x__ 121#ifndef __s390x__
120#define IPL_DEVICE 0x10404 122#define IPL_DEVICE 0x10404
@@ -127,6 +129,6 @@ extern u16 ipl_devno;
127#endif /* __s390x__ */ 129#endif /* __s390x__ */
128#define COMMAND_LINE 0x10480 130#define COMMAND_LINE 0x10480
129 131
130#endif 132#endif /* __ASSEMBLY__ */
131 133#endif /* __KERNEL__ */
132#endif 134#endif /* _ASM_S390_SETUP_H */
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h
index a2ae7628bbaa..9c6e9c300eb9 100644
--- a/include/asm-s390/smp.h
+++ b/include/asm-s390/smp.h
@@ -101,6 +101,7 @@ smp_call_function_on(void (*func) (void *info), void *info,
101 func(info); 101 func(info);
102 return 0; 102 return 0;
103} 103}
104#define smp_cpu_not_running(cpu) 1
104#define smp_get_cpu(cpu) ({ 0; }) 105#define smp_get_cpu(cpu) ({ 0; })
105#define smp_put_cpu(cpu) ({ 0; }) 106#define smp_put_cpu(cpu) ({ 0; })
106#endif 107#endif
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index 29a9f357eb9e..657d582e8149 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -285,7 +285,7 @@
285#define __NR_mknodat 290 285#define __NR_mknodat 290
286#define __NR_fchownat 291 286#define __NR_fchownat 291
287#define __NR_futimesat 292 287#define __NR_futimesat 292
288#define __NR_newfstatat 293 288#define __NR_fstatat64 293
289#define __NR_unlinkat 294 289#define __NR_unlinkat 294
290#define __NR_renameat 295 290#define __NR_renameat 295
291#define __NR_linkat 296 291#define __NR_linkat 296
@@ -295,8 +295,9 @@
295#define __NR_faccessat 300 295#define __NR_faccessat 300
296#define __NR_pselect6 301 296#define __NR_pselect6 301
297#define __NR_ppoll 302 297#define __NR_ppoll 302
298#define __NR_unshare 303
298 299
299#define NR_syscalls 303 300#define NR_syscalls 304
300 301
301/* 302/*
302 * There are some system calls that are not present on 64 bit, some 303 * There are some system calls that are not present on 64 bit, some
@@ -358,6 +359,7 @@
358#undef __NR_fcntl64 359#undef __NR_fcntl64
359#undef __NR_sendfile64 360#undef __NR_sendfile64
360#undef __NR_fadvise64_64 361#undef __NR_fadvise64_64
362#undef __NR_fstatat64
361 363
362#define __NR_select 142 364#define __NR_select 142
363#define __NR_getrlimit 191 /* SuS compliant getrlimit */ 365#define __NR_getrlimit 191 /* SuS compliant getrlimit */
@@ -380,6 +382,7 @@
380#define __NR_setgid 214 382#define __NR_setgid 214
381#define __NR_setfsuid 215 383#define __NR_setfsuid 215
382#define __NR_setfsgid 216 384#define __NR_setfsgid 216
385#define __NR_newfstatat 293
383 386
384#endif 387#endif
385 388
diff --git a/include/asm-x86_64/hpet.h b/include/asm-x86_64/hpet.h
index c20c28f5c7a0..08b75c15269a 100644
--- a/include/asm-x86_64/hpet.h
+++ b/include/asm-x86_64/hpet.h
@@ -55,6 +55,8 @@ extern int is_hpet_enabled(void);
55extern int hpet_rtc_timer_init(void); 55extern int hpet_rtc_timer_init(void);
56extern int oem_force_hpet_timer(void); 56extern int oem_force_hpet_timer(void);
57 57
58extern int hpet_use_timer;
59
58#ifdef CONFIG_HPET_EMULATE_RTC 60#ifdef CONFIG_HPET_EMULATE_RTC
59extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); 61extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask);
60extern int hpet_set_rtc_irq_bit(unsigned long bit_mask); 62extern int hpet_set_rtc_irq_bit(unsigned long bit_mask);
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h
index 20468983d453..eeb2bcd635de 100644
--- a/include/asm-x86_64/ia32_unistd.h
+++ b/include/asm-x86_64/ia32_unistd.h
@@ -305,7 +305,7 @@
305#define __NR_ia32_mknodat 297 305#define __NR_ia32_mknodat 297
306#define __NR_ia32_fchownat 298 306#define __NR_ia32_fchownat 298
307#define __NR_ia32_futimesat 299 307#define __NR_ia32_futimesat 299
308#define __NR_ia32_newfstatat 300 308#define __NR_ia32_fstatat64 300
309#define __NR_ia32_unlinkat 301 309#define __NR_ia32_unlinkat 301
310#define __NR_ia32_renameat 302 310#define __NR_ia32_renameat 302
311#define __NR_ia32_linkat 303 311#define __NR_ia32_linkat 303
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 8e88efc565be..469952366ed4 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -270,6 +270,16 @@ struct ata_taskfile {
270 270
271#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) 271#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20)
272 272
273static inline unsigned int ata_id_major_version(const u16 *id)
274{
275 unsigned int mver;
276
277 for (mver = 14; mver >= 1; mver--)
278 if (id[ATA_ID_MAJOR_VER] & (1 << mver))
279 break;
280 return mver;
281}
282
273static inline int ata_id_current_chs_valid(const u16 *id) 283static inline int ata_id_current_chs_valid(const u16 *id)
274{ 284{
275 /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command 285 /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command
diff --git a/include/linux/compat.h b/include/linux/compat.h
index f9ca534787e2..c9ab2a26348c 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -161,5 +161,25 @@ int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from);
161int get_compat_sigevent(struct sigevent *event, 161int get_compat_sigevent(struct sigevent *event,
162 const struct compat_sigevent __user *u_event); 162 const struct compat_sigevent __user *u_event);
163 163
164static inline int compat_timeval_compare(struct compat_timeval *lhs,
165 struct compat_timeval *rhs)
166{
167 if (lhs->tv_sec < rhs->tv_sec)
168 return -1;
169 if (lhs->tv_sec > rhs->tv_sec)
170 return 1;
171 return lhs->tv_usec - rhs->tv_usec;
172}
173
174static inline int compat_timespec_compare(struct compat_timespec *lhs,
175 struct compat_timespec *rhs)
176{
177 if (lhs->tv_sec < rhs->tv_sec)
178 return -1;
179 if (lhs->tv_sec > rhs->tv_sec)
180 return 1;
181 return lhs->tv_nsec - rhs->tv_nsec;
182}
183
164#endif /* CONFIG_COMPAT */ 184#endif /* CONFIG_COMPAT */
165#endif /* _LINUX_COMPAT_H */ 185#endif /* _LINUX_COMPAT_H */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 9873f4c54f1e..67d07c44b2e7 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -122,9 +122,8 @@ enum {
122 /* struct ata_device stuff */ 122 /* struct ata_device stuff */
123 ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */ 123 ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */
124 ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */ 124 ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */
125 ATA_DFLAG_LOCK_SECTORS = (1 << 2), /* don't adjust max_sectors */ 125 ATA_DFLAG_LBA = (1 << 2), /* device supports LBA */
126 ATA_DFLAG_LBA = (1 << 3), /* device supports LBA */ 126 ATA_DFLAG_CDB_INTR = (1 << 3), /* device asserts INTRQ when ready for CDB */
127 ATA_DFLAG_CDB_INTR = (1 << 4), /* device asserts INTRQ when ready for CDB */
128 127
129 ATA_DEV_UNKNOWN = 0, /* unknown device */ 128 ATA_DEV_UNKNOWN = 0, /* unknown device */
130 ATA_DEV_ATA = 1, /* ATA device */ 129 ATA_DEV_ATA = 1, /* ATA device */
@@ -353,6 +352,8 @@ struct ata_device {
353 352
354 unsigned int multi_count; /* sectors count for 353 unsigned int multi_count; /* sectors count for
355 READ/WRITE MULTIPLE */ 354 READ/WRITE MULTIPLE */
355 unsigned int max_sectors; /* per-device max sectors */
356 unsigned int cdb_len;
356 357
357 /* for CHS addressing */ 358 /* for CHS addressing */
358 u16 cylinders; /* Number of cylinders */ 359 u16 cylinders; /* Number of cylinders */
@@ -382,7 +383,6 @@ struct ata_port {
382 unsigned int mwdma_mask; 383 unsigned int mwdma_mask;
383 unsigned int udma_mask; 384 unsigned int udma_mask;
384 unsigned int cbl; /* cable type; ATA_CBL_xxx */ 385 unsigned int cbl; /* cable type; ATA_CBL_xxx */
385 unsigned int cdb_len;
386 386
387 struct ata_device device[ATA_MAX_DEVICES]; 387 struct ata_device device[ATA_MAX_DEVICES];
388 388
@@ -543,6 +543,8 @@ extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
543extern unsigned int ata_dev_classify(const struct ata_taskfile *tf); 543extern unsigned int ata_dev_classify(const struct ata_taskfile *tf);
544extern void ata_dev_id_string(const u16 *id, unsigned char *s, 544extern void ata_dev_id_string(const u16 *id, unsigned char *s,
545 unsigned int ofs, unsigned int len); 545 unsigned int ofs, unsigned int len);
546extern void ata_dev_id_c_string(const u16 *id, unsigned char *s,
547 unsigned int ofs, unsigned int len);
546extern void ata_dev_config(struct ata_port *ap, unsigned int i); 548extern void ata_dev_config(struct ata_port *ap, unsigned int i);
547extern void ata_bmdma_setup (struct ata_queued_cmd *qc); 549extern void ata_bmdma_setup (struct ata_queued_cmd *qc);
548extern void ata_bmdma_start (struct ata_queued_cmd *qc); 550extern void ata_bmdma_start (struct ata_queued_cmd *qc);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 7a61ccdcbc4b..82b83da25d77 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1087,6 +1087,7 @@
1087#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181 1087#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181
1088#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182 1088#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182
1089#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183 1089#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183
1090#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000 0x0185
1090#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186 1091#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186
1091#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187 1092#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187
1092#define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188 1093#define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 3877209d23c3..d73501ba7e44 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -557,6 +557,8 @@ asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
557 int mode); 557 int mode);
558asmlinkage long sys_newfstatat(int dfd, char __user *filename, 558asmlinkage long sys_newfstatat(int dfd, char __user *filename,
559 struct stat __user *statbuf, int flag); 559 struct stat __user *statbuf, int flag);
560asmlinkage long sys_fstatat64(int dfd, char __user *filename,
561 struct stat64 __user *statbuf, int flag);
560asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, 562asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf,
561 int bufsiz); 563 int bufsiz);
562asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, 564asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename,
diff --git a/include/linux/time.h b/include/linux/time.h
index 7b4dc36532bb..d9cdba54b789 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -33,11 +33,34 @@ struct timezone {
33#define NSEC_PER_SEC 1000000000L 33#define NSEC_PER_SEC 1000000000L
34#define NSEC_PER_USEC 1000L 34#define NSEC_PER_USEC 1000L
35 35
36static __inline__ int timespec_equal(struct timespec *a, struct timespec *b) 36static inline int timespec_equal(struct timespec *a, struct timespec *b)
37{ 37{
38 return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); 38 return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec);
39} 39}
40 40
41/*
42 * lhs < rhs: return <0
43 * lhs == rhs: return 0
44 * lhs > rhs: return >0
45 */
46static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs)
47{
48 if (lhs->tv_sec < rhs->tv_sec)
49 return -1;
50 if (lhs->tv_sec > rhs->tv_sec)
51 return 1;
52 return lhs->tv_nsec - rhs->tv_nsec;
53}
54
55static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs)
56{
57 if (lhs->tv_sec < rhs->tv_sec)
58 return -1;
59 if (lhs->tv_sec > rhs->tv_sec)
60 return 1;
61 return lhs->tv_usec - rhs->tv_usec;
62}
63
41extern unsigned long mktime(const unsigned int year, const unsigned int mon, 64extern unsigned long mktime(const unsigned int year, const unsigned int mon,
42 const unsigned int day, const unsigned int hour, 65 const unsigned int day, const unsigned int hour,
43 const unsigned int min, const unsigned int sec); 66 const unsigned int min, const unsigned int sec);