diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-31 08:57:05 +0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-31 08:57:05 +0400 |
commit | 5bc65793cbf8da0d35f19ef025dda22887e79e80 (patch) | |
tree | 8291998abd73055de6f487fafa174ee2a5d3afee /include/asm-alpha | |
parent | 6edae708bf77e012d855a7e2c7766f211d234f4f (diff) | |
parent | 3f0a6766e0cc5a577805732e5adb50a585c58175 (diff) | |
download | linux-5bc65793cbf8da0d35f19ef025dda22887e79e80.tar.xz |
[SCSI] Merge up to linux-2.6 head
Conflicts:
drivers/scsi/jazz_esp.c
Same changes made by both SCSI and SPARC trees: problem with UTF-8
conversion in the copyright.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/asm-alpha')
-rw-r--r-- | include/asm-alpha/bitops.h | 50 | ||||
-rw-r--r-- | include/asm-alpha/thread_info.h | 2 | ||||
-rw-r--r-- | include/asm-alpha/unistd.h | 48 |
3 files changed, 78 insertions, 22 deletions
diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h index 4b6ef7f21b93..3a0cbeb03fa1 100644 --- a/include/asm-alpha/bitops.h +++ b/include/asm-alpha/bitops.h @@ -313,32 +313,29 @@ static inline int ffs(int word) * fls: find last bit set. */ #if defined(CONFIG_ALPHA_EV6) && defined(CONFIG_ALPHA_EV67) -static inline int fls(int word) +static inline int fls64(unsigned long word) { - return 64 - __kernel_ctlz(word & 0xffffffff); + return 64 - __kernel_ctlz(word); } #else -#include <asm-generic/bitops/fls.h> -#endif -#include <asm-generic/bitops/fls64.h> +extern const unsigned char __flsm1_tab[256]; -/* Compute powers of two for the given integer. */ -static inline long floor_log2(unsigned long word) +static inline int fls64(unsigned long x) { -#if defined(CONFIG_ALPHA_EV6) && defined(CONFIG_ALPHA_EV67) - return 63 - __kernel_ctlz(word); -#else - long bit; - for (bit = -1; word ; bit++) - word >>= 1; - return bit; -#endif + unsigned long t, a, r; + + t = __kernel_cmpbge (x, 0x0101010101010101); + a = __flsm1_tab[t]; + t = __kernel_extbl (x, a); + r = a*8 + __flsm1_tab[t] + (x != 0); + + return r; } +#endif -static inline long ceil_log2(unsigned long word) +static inline int fls(int x) { - long bit = floor_log2(word); - return bit + (word > (1UL << bit)); + return fls64((unsigned int) x); } /* @@ -353,9 +350,20 @@ static inline unsigned long hweight64(unsigned long w) return __kernel_ctpop(w); } -#define hweight32(x) (unsigned int) hweight64((x) & 0xfffffffful) -#define hweight16(x) (unsigned int) hweight64((x) & 0xfffful) -#define hweight8(x) (unsigned int) hweight64((x) & 0xfful) +static inline unsigned int hweight32(unsigned int w) +{ + return hweight64(w); +} + +static inline unsigned int hweight16(unsigned int w) +{ + return hweight64(w & 0xffff); +} + +static inline unsigned int hweight8(unsigned int w) +{ + return hweight64(w & 0xff); +} #else #include <asm-generic/bitops/hweight.h> #endif diff --git a/include/asm-alpha/thread_info.h b/include/asm-alpha/thread_info.h index f4defc2bd3fb..48a22e3e6f32 100644 --- a/include/asm-alpha/thread_info.h +++ b/include/asm-alpha/thread_info.h @@ -76,12 +76,14 @@ register struct thread_info *__current_thread_info __asm__("$8"); #define TIF_UAC_NOFIX 7 #define TIF_UAC_SIGBUS 8 #define TIF_MEMDIE 9 +#define TIF_RESTORE_SIGMASK 10 /* restore signal mask in do_signal */ #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) +#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) /* Work to do on interrupt/exception return. */ #define _TIF_WORK_MASK (_TIF_NOTIFY_RESUME \ diff --git a/include/asm-alpha/unistd.h b/include/asm-alpha/unistd.h index e58a427012dd..29bf2fdc91c0 100644 --- a/include/asm-alpha/unistd.h +++ b/include/asm-alpha/unistd.h @@ -233,6 +233,20 @@ #define __NR_osf_memcntl 260 /* not implemented */ #define __NR_osf_fdatasync 261 /* not implemented */ +/* + * Ignore legacy syscalls that we don't use. + */ +#define __IGNORE_alarm +#define __IGNORE_creat +#define __IGNORE_getegid +#define __IGNORE_geteuid +#define __IGNORE_getgid +#define __IGNORE_getpid +#define __IGNORE_getppid +#define __IGNORE_getuid +#define __IGNORE_pause +#define __IGNORE_time +#define __IGNORE_utime /* * Linux-specific system calls begin at 300 @@ -387,10 +401,42 @@ #define __NR_inotify_init 444 #define __NR_inotify_add_watch 445 #define __NR_inotify_rm_watch 446 +#define __NR_fdatasync 447 +#define __NR_kexec_load 448 +#define __NR_migrate_pages 449 +#define __NR_openat 450 +#define __NR_mkdirat 451 +#define __NR_mknodat 452 +#define __NR_fchownat 453 +#define __NR_futimesat 454 +#define __NR_fstatat64 455 +#define __NR_unlinkat 456 +#define __NR_renameat 457 +#define __NR_linkat 458 +#define __NR_symlinkat 459 +#define __NR_readlinkat 460 +#define __NR_fchmodat 461 +#define __NR_faccessat 462 +#define __NR_pselect6 463 +#define __NR_ppoll 464 +#define __NR_unshare 465 +#define __NR_set_robust_list 466 +#define __NR_get_robust_list 467 +#define __NR_splice 468 +#define __NR_sync_file_range 469 +#define __NR_tee 470 +#define __NR_vmsplice 471 +#define __NR_move_pages 472 +#define __NR_getcpu 473 +#define __NR_epoll_pwait 474 +#define __NR_utimensat 475 +#define __NR_signalfd 476 +#define __NR_timerfd 477 +#define __NR_eventfd 478 #ifdef __KERNEL__ -#define NR_SYSCALLS 447 +#define NR_SYSCALLS 479 #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR |