Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347
b: refs/heads/master
c: 821376b
h: refs/heads/master
i:
  345: f3ceac3
  343: 12ba687
v: v3
  • Loading branch information
David Mosberger-Tang authored and Tony Luck committed Apr 21, 2005
1 parent 631233e commit 9e28b44
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40b7bc062cdacb3883bb0f94eb122b8336af5b36
refs/heads/master: 821376bf15e692941f9235f13a14987009fd0b10
3 changes: 0 additions & 3 deletions trunk/arch/alpha/kernel/systbls.S
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,6 @@ sys_call_table:
.quad sys_mq_notify
.quad sys_mq_getsetattr
.quad sys_waitid
.quad sys_add_key
.quad sys_request_key /* 440 */
.quad sys_keyctl

.size sys_call_table, . - sys_call_table
.type sys_call_table, @object
Expand Down
5 changes: 1 addition & 4 deletions trunk/include/asm-alpha/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,8 @@
#define __NR_mq_notify 436
#define __NR_mq_getsetattr 437
#define __NR_waitid 438
#define __NR_add_key 439
#define __NR_request_key 440
#define __NR_keyctl 441

#define NR_SYSCALLS 442
#define NR_SYSCALLS 439

#if defined(__GNUC__)

Expand Down
21 changes: 17 additions & 4 deletions trunk/include/asm-ia64/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ __ffs (unsigned long x)
#ifdef __KERNEL__

/*
* find_last_zero_bit - find the last zero bit in a 64 bit quantity
* @x: The value to search
* Return bit number of last (most-significant) bit set. Undefined
* for x==0. Bits are numbered from 0..63 (e.g., ia64_fls(9) == 3).
*/
static inline unsigned long
ia64_fls (unsigned long x)
Expand All @@ -327,10 +327,23 @@ ia64_fls (unsigned long x)
return exp - 0xffff;
}

/*
* Find the last (most significant) bit set. Returns 0 for x==0 and
* bits are numbered from 1..32 (e.g., fls(9) == 4).
*/
static inline int
fls (int x)
fls (int t)
{
return ia64_fls((unsigned int) x);
unsigned long x = t & 0xffffffffu;

if (!x)
return 0;
x |= x >> 1;
x |= x >> 2;
x |= x >> 4;
x |= x >> 8;
x |= x >> 16;
return ia64_popcnt(x);
}

/*
Expand Down
10 changes: 7 additions & 3 deletions trunk/include/asm-ia64/gcc_intrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,17 @@ register unsigned long ia64_r13 asm ("r13") __attribute_used__;
ia64_intri_res; \
})

#define ia64_popcnt(x) \
({ \
#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# define ia64_popcnt(x) __builtin_popcountl(x)
#else
# define ia64_popcnt(x) \
({ \
__u64 ia64_intri_res; \
asm ("popcnt %0=%1" : "=r" (ia64_intri_res) : "r" (x)); \
\
ia64_intri_res; \
})
})
#endif

#define ia64_getf_exp(x) \
({ \
Expand Down

0 comments on commit 9e28b44

Please sign in to comment.