summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2013-07-12 04:08:27 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2013-07-12 04:08:27 +0000
commitc2f4bafec1c6b5eb4aa6a7d218ec147ba8abe613 (patch)
treee0050652b8427e50f37811a704cdfc76799abf75 /sys/arch/hppa
parentfd611b0219f5d6437512b36e8b284015c10fc905 (diff)
replace fls functions with calls to the libkern versions
found the hard way by deraadt@
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/hppa/intr.c38
1 files changed, 1 insertions, 37 deletions
diff --git a/sys/arch/hppa/hppa/intr.c b/sys/arch/hppa/hppa/intr.c
index 424d9bf37df..b685b069e8f 100644
--- a/sys/arch/hppa/hppa/intr.c
+++ b/sys/arch/hppa/hppa/intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.c,v 1.40 2011/05/12 12:54:38 kettenis Exp $ */
+/* $OpenBSD: intr.c,v 1.41 2013/07/12 04:08:26 jsg Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
@@ -235,42 +235,6 @@ cpu_intr_establish(int pri, int irq, int (*handler)(void *), void *arg,
return (iv);
}
-int fls(u_int mask);
-
-int
-fls(u_int mask)
-{
- int bit;
-
- bit = 32;
- if (!(mask & 0xffff0000)) {
- bit -= 16;
- mask <<= 16;
- }
-
- if (!(mask & 0xff000000)) {
- bit -= 8;
- mask <<= 8;
- }
-
- if (!(mask & 0xf0000000)) {
- bit -= 4;
- mask <<= 4;
- }
-
- if (!(mask & 0xc0000000)) {
- bit -= 2;
- mask <<= 2;
- }
-
- if (!(mask & 0x80000000)) {
- bit -= 1;
- mask <<= 1;
- }
-
- return mask? bit : 0;
-}
-
void
cpu_intr(void *v)
{