Home | History | Annotate | Download | only in include
History log of /src/sys/arch/hp300/include/intr.h
RevisionDateAuthorComments
 1.39  19-Jan-2024  thorpej Add _KERNEL guards around most of the definitions in these files.
 1.38  16-Jan-2024  thorpej Fix computation of the appropriate auto-vector interrupt level to use
for the DMA controller by tracking all of the DIO devices that have
"ISRPRI_BIO" interrupt handlers, and finding the highest auto-vector
level among them and informing the DMA controller.

Previously, in a post-flattening world, the DMA controller was always
told to interrupt at lev5, which is fine I guess although definitely not
ideal, but would not work on aaaancient HP320 Rev A DMA boards. To that
effect, print a warning if a Rev B DMA board ends up at ipl != 3 (we can't
differentiate between a Rev A and a Rev B board).
 1.37  16-Jan-2024  thorpej Switch hp300 over to the common interrupt dispatch code.

XXX There are still some things to fix up here, but it's no worse
than it was before (the problems date back to when we flattened
the device interrupt levels into IPL_VM).
 1.36  11-Jul-2023  riastradh hp300/intr.h: Put most of this under #ifdef _KERNEL.

Only ipl_cookie_t really needs to be exposed now, for crash(8).
 1.35  11-Jul-2023  riastradh hp300/intr.h: Fix missing includes.
 1.34  06-Mar-2011  tsutsui branches: 1.34.86;
Remove trailing spaces.
 1.33  09-Apr-2009  tsutsui branches: 1.33.4; 1.33.6;
Include <sys/evcnt.h> instead of <sys/device.h> for struct evcnt.

<sys/device.h> now requires <sys/mutex.h> for struct device_lock, and
<machine/mutex.h> requires <machine/intr.h> for ipl_cookie_t, so
including <sys/device.h> from <machine/intr.h> causes recursive dependency.
 1.32  21-Dec-2008  tsutsui branches: 1.32.2;
Remove obsolete code for old software interrupt emulation.
The MI softint(9) handles it in the kernel threads nowadays.

Note "Emulation of VAX REI instruction" is still there to handle ASTs.
 1.31  22-Jun-2008  tsutsui branches: 1.31.4; 1.31.6;
Make cpu_intr_p() inline.
 1.30  22-Jun-2008  tsutsui Don't recompute an ipl level for IPL_VM during or after cpu_configure(9)
and use a static and possible highest ipl value (ipl 5) for IPL_VM
so that we can put ipl2psl_table[] conversion into makeiplcookie(9),
which could be called before cpu_configure(9).

Fixes "panic: sbappendaddr" on NFS load.
 1.29  15-Jun-2008  tsutsui Unify splraiseipl(9) implementation among m68k ports as per
suggestion from isaki@ on port-m68k.

For hp300:
- use ipl2psl_table[] for makeiplcookie() conversion
- use uint16_t for ipl2psl_table[]
 1.28  28-Apr-2008  martin branches: 1.28.2; 1.28.4;
Remove clause 3 and 4 from TNF licenses
 1.27  28-Jan-2008  tsutsui branches: 1.27.6; 1.27.8; 1.27.10;
- account idepth in a clock interrupt handler too
- use idepth for CLKF_INTR()
 1.26  03-Dec-2007  ad Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.25  17-Oct-2007  garbled branches: 1.25.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.24  15-Oct-2007  tsutsui Add IPL_SERIAL definition since MI com(4) now requires it for mutex(9).
 1.23  11-Mar-2007  thorpej branches: 1.23.8; 1.23.16; 1.23.18; 1.23.20;
- Shrink ipl_cookie_t from 32-bits to 16-bits (large enough to hold
an SR value or an IPL_* constant).
- Take advange of the smaller ipl_cookie_t to shrink kmutex_t from
16 bytes to 8 bytes by overlapping storage where possible.
- Implement a RAS-based _lock_cas() for mc68010 systems (Sun2). See
sun68k/sun68k/isr.c.

Tested on various m68k platforms, but NOT Sun2. In any case, at least
Sun2 compiles now.
 1.22  04-Mar-2007  tsutsui branches: 1.22.2;
Remove #ifdef _KERNEL since this file is no longer exported.
 1.21  04-Mar-2007  tsutsui Hide #include <m68k/softintr.h> inside #ifdef _KERNEL in <machine/intr.h>
to avoid exporting unnecessary files to userland.
Should fix build.sh failure, which was pointed out by isaki@.

XXX: which userland program would require contents of <machine/intr.h>?
 1.20  04-Mar-2007  tsutsui Make hp300 use common m68k/softintr.c.
 1.19  16-Feb-2007  ad branches: 1.19.2;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.18  15-Feb-2007  tsutsui Fix an indent in the previous.
 1.17  10-Feb-2007  tsutsui Rename _IPL_SOFT* macro to SI_SOFT* to sync with other m68k ports.
 1.16  21-Dec-2006  yamt merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.15  11-Dec-2005  christos branches: 1.15.20; 1.15.22;
merge ktrace-lwp.
 1.14  02-Jan-2005  tsutsui branches: 1.14.10;
u_intNN_t -> uintNN_t
 1.13  08-Nov-2003  tsutsui Switch DCA and APCI serial devices to use MI com(4) driver.

DCA is tested on HP362 and HP382 with serial console,
but APCI on HP4xx is not tested yet.
 1.12  08-Dec-2001  gmcgarry branches: 1.12.16;
softintr(9) interface for hp300
 1.11  13-Apr-2001  thorpej branches: 1.11.2; 1.11.8;
Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
 1.10  14-Jan-2001  thorpej branches: 1.10.2;
Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
 1.9  22-Aug-2000  thorpej Add spllock(). See spl(9) for details.
 1.8  21-Aug-2000  thorpej Make sure we provide splsched() as described in spl(9).
 1.7  05-Aug-1999  thorpej branches: 1.7.2;
Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.
 1.6  01-Aug-1999  thorpej Store computed PSL values in an array indexed by abstract interrupt
level, rather than individual shortwords.
 1.5  15-Jun-1999  kleink Slightly rearrange the SSIR inline assembly implementation in order to avoid
making assumptions on C symbol name prefixes.
 1.4  18-May-1998  kleink branches: 1.4.10;
Spell `interrupt' correctly.
 1.3  09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.2  24-Jul-1997  scottr branches: 1.2.2;
Use optimized _splraise() implementation, from mac68k/intr.h
 1.1  14-Apr-1997  thorpej Rearrange the interrupt code slightly:
- place all interrupt-related macros, prototypes, etc. into <machine/intr.h>,
like other ports.
- rename isrlink/isrunlink/isrinit, etc. intr_establish/intr_disestablish/
intr_init, etc., and move to intr.c for naming consistency.
- don't call intr_init() twice.
 1.2.2.1  14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.10.2  02-Aug-1999  thorpej Update from trunk.
 1.4.10.1  21-Jun-1999  thorpej Sync w/ -current.
 1.7.2.3  21-Apr-2001  bouyer Sync with HEAD
 1.7.2.2  18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.7.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.10.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.11.8.2  08-Jan-2002  nathanw Catch up to -current.
 1.11.8.1  13-Apr-2001  nathanw file intr.h was added on branch nathanw_sa on 2002-01-08 00:24:45 +0000
 1.11.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.12.16.4  17-Jan-2005  skrll Sync with HEAD.
 1.12.16.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.16.2  18-Sep-2004  skrll Sync with HEAD.
 1.12.16.1  03-Aug-2004  skrll Sync with HEAD
 1.14.10.6  04-Feb-2008  yamt sync with head.
 1.14.10.5  07-Dec-2007  yamt sync with head
 1.14.10.4  27-Oct-2007  yamt sync with head.
 1.14.10.3  03-Sep-2007  yamt sync with head.
 1.14.10.2  26-Feb-2007  yamt sync with head.
 1.14.10.1  30-Dec-2006  yamt sync with head.
 1.15.22.2  04-Nov-2006  tsutsui Add missing parentheses to splsoftserial macro.
(which is used only inside #ifdef __NO_SOFT_SERIAL_INTERRUPT in com.c?)

Now init_main.c compiles though GENERIC still doesn't build due to
"initialization discards qualifiers from pointer target type" warnings
by newer gcc4.
 1.15.22.1  06-Oct-2006  tsutsui Reorganize IPL macros for proper splraiseipl() implementation:
- merge HP300_IPL_* and IPL_* macros
- prepare independent _IPL_SOFT_* macro to determine softintr(9) handlers
- rename hp300_ipls[] array to hp300_ipl2psl[]
- then use these macro for makeiplcookie() and splraiseipl()
Tested on HP382.
 1.15.20.1  12-Jan-2007  ad Sync with head.
 1.19.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.22.2.3  03-Dec-2007  ad Sync with HEAD.
 1.22.2.2  23-Oct-2007  ad Sync with head.
 1.22.2.1  13-Mar-2007  ad Sync with head.
 1.23.20.1  18-Oct-2007  yamt sync with head.
 1.23.18.3  23-Mar-2008  matt sync with HEAD
 1.23.18.2  09-Jan-2008  matt sync with HEAD
 1.23.18.1  06-Nov-2007  matt sync with HEAD
 1.23.16.2  09-Dec-2007  jmcneill Sync with HEAD.
 1.23.16.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.23.8.1  16-Oct-2007  garbled Sync with HEAD
 1.25.2.2  18-Feb-2008  mjf Sync with HEAD.
 1.25.2.1  08-Dec-2007  mjf Sync with HEAD.
 1.27.10.2  04-May-2009  yamt sync with head.
 1.27.10.1  16-May-2008  yamt sync with head.
 1.27.8.2  17-Jun-2008  yamt sync with head.
 1.27.8.1  18-May-2008  yamt sync with head.
 1.27.6.3  17-Jan-2009  mjf Sync with HEAD.
 1.27.6.2  29-Jun-2008  mjf Sync with HEAD.
 1.27.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.28.4.2  27-Jun-2008  simonb Sync with head.
 1.28.4.1  18-Jun-2008  simonb Sync with head.
 1.28.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.31.6.1  27-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #207):
sys/arch/hp300/include/intr.h: revision 1.32
sys/arch/hp300/hp300/locore.s: revision 1.145
sys/arch/hp300/hp300/intr.c: revision 1.39
Remove obsolete code for old software interrupt emulation.
The MI softint(9) handles it in the kernel threads nowadays.
Note "Emulation of VAX REI instruction" is still there to handle ASTs.
 1.31.4.2  28-Apr-2009  skrll Sync with HEAD.
 1.31.4.1  19-Jan-2009  skrll Sync with HEAD.
 1.32.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.33.6.1  06-Jun-2011  jruoho Sync with HEAD.
 1.33.4.1  21-Apr-2011  rmind sync with head
 1.34.86.1  09-Aug-2023  martin Pull up following revision(s) (requested by maya in ticket #316):

sys/arch/m68k/include/mutex.h: revision 1.13
sys/arch/arm/include/cpu.h: revision 1.125
sys/arch/sun68k/include/intr.h: revision 1.21
sys/arch/arm/include/mutex.h: revision 1.28
sys/sys/rwlock.h: revision 1.18
sys/arch/powerpc/include/mutex.h: revision 1.7
sys/arch/arm/include/mutex.h: revision 1.29
sys/arch/powerpc/include/mutex.h: revision 1.8
sys/uvm/uvm_param.h: revision 1.42
sys/sys/ksem.h: revision 1.16
sys/arch/x86/include/mutex.h: revision 1.10
sys/sys/proc.h: revision 1.372
sys/sys/ksem.h: revision 1.17
sys/arch/ia64/include/mutex.h: revision 1.8
sys/arch/evbarm/include/intr.h: revision 1.29
sys/sys/lua.h: revision 1.9
sys/arch/next68k/include/intr.h: revision 1.23
sys/arch/ia64/include/mutex.h: revision 1.9
sys/arch/hp300/include/intr.h: revision 1.35
sys/arch/hp300/include/intr.h: revision 1.36
sys/arch/sparc/include/cpu.h: revision 1.111
sys/arch/hppa/include/mutex.h: revision 1.16
sys/arch/vax/include/intr.h: revision 1.31
sys/arch/hppa/include/mutex.h: revision 1.17
sys/arch/news68k/include/intr.h: revision 1.28
sys/arch/hppa/include/mutex.h: revision 1.18
sys/arch/hppa/include/intr.h: revision 1.3
sys/arch/hppa/include/mutex.h: revision 1.19
sys/arch/hppa/include/intr.h: revision 1.4
sys/sys/sched.h: revision 1.92
sys/opencrypto/cryptodev.h: revision 1.51
sys/arch/vax/include/mutex.h: revision 1.20
sys/arch/sparc64/include/mutex.h: revision 1.10
sys/arch/ia64/include/sapicvar.h: revision 1.2
sys/arch/riscv/include/mutex.h: revision 1.5
sys/arch/amiga/dev/grfabs_cc.c: revision 1.39
sys/external/bsd/drm2/include/linux/idr.h: revision 1.11
sys/arch/riscv/include/mutex.h: revision 1.6
sys/ddb/files.ddb: revision 1.16
sys/arch/mac68k/include/intr.h: revision 1.32
share/man/man4/ddb.4: revision 1.203
sys/ddb/db_command.c: revision 1.183
sys/arch/mips/include/mutex.h: revision 1.10
sys/ddb/db_command.c: revision 1.184
sys/arch/x68k/include/intr.h: revision 1.22
sys/arch/sparc/include/psl.h: revision 1.51
sys/arch/or1k/include/mutex.h: revision 1.4
sys/arch/mips/include/mutex.h: revision 1.11
sys/arch/arm/xscale/pxa2x0_intr.h: revision 1.16
sys/arch/sparc64/include/cpu.h: revision 1.134
sys/arch/sparc/include/psl.h: revision 1.52
sys/arch/or1k/include/mutex.h: revision 1.5
sys/arch/mvme68k/include/intr.h: revision 1.22
sys/arch/luna68k/include/intr.h: revision 1.16
external/cddl/osnet/sys/sys/kcondvar.h: revision 1.6
sys/arch/sparc/include/mutex.h: revision 1.12
sys/arch/sparc/include/mutex.h: revision 1.13
sys/arch/usermode/include/mutex.h: revision 1.5
sys/arch/usermode/include/mutex.h: revision 1.6
sys/kern/kern_core.c: revision 1.38
usr.sbin/crash/Makefile: revision 1.49
sys/arch/amiga/include/intr.h: revision 1.23
sys/arch/alpha/include/mutex.h: revision 1.12
sys/arch/alpha/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.16
sys/ddb/ddb.h: revision 1.6
sys/arch/sparc64/include/mutex.h: revision 1.8
sys/arch/sh3/include/mutex.h: revision 1.12
sys/arch/evbarm/lubbock/sacc_obio.c: revision 1.17
sys/ddb/db_syncobj.c: revision 1.1
sys/arch/vax/include/mutex.h: revision 1.18
sys/arch/sparc64/include/psl.h: revision 1.63
sys/arch/sparc64/include/mutex.h: revision 1.9
sys/arch/sh3/include/mutex.h: revision 1.13
sys/arch/evbarm/lubbock/obio.c: revision 1.13
sys/arch/atari/include/intr.h: revision 1.23
sys/ddb/db_syncobj.c: revision 1.2
sys/arch/vax/include/mutex.h: revision 1.19
sys/arch/evbarm/g42xxeb/obio.c: revision 1.14
sys/arch/evbarm/g42xxeb/obio.c: revision 1.15
sys/arch/cesfic/include/intr.h: revision 1.14
sys/ddb/db_syncobj.h: revision 1.1
sys/arch/x86/include/cpu.h: revision 1.134
sys/arch/evbarm/g42xxeb/obio.c: revision 1.16
sys/arch/cesfic/include/intr.h: revision 1.15
sys/arch/arm/xscale/pxa2x0_intr.c: revision 1.26
sys/sys/cpu_data.h: revision 1.54
sys/arch/m68k/include/mutex.h: revision 1.12
sys/arch/ia64/acpi/madt.c: revision 1.6

sys/rwlock.h: Make this more self-contained for bool.

machine/mutex.h: Sprinkle includes so this can be used by crash(8).

ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

Include psl.h for ipl_cookie_t if __MUTEX_PRIVATE

sys: Rip <sys/resourcevar.h> out of <uvm/uvm_param.h>.

And thus out of <sys/param.h>, which is exceedingly overused and
fragile and delenda est.

Should fix (some) issues with the recent inclusion of machine/lock.h
in various machine/mutex.h files.

arm/mutex.h: Need machine/intr.h, machine/lock.h.

For ipl_cookie_t and __cpu_simple_lock_t.
evbarm/intr.h: Define ipl_cookie_t before including ARM_INTR_IMPL.

Otherwise arm/mutex.h doesn't work, due to a cyclic dependency which
should really be fixed.
opencrypto/cryptodev.h: Fix includes.
- Move sys/condvar.h under #ifdef _KERNEL.
- Add some other necessary includes and forward declarations.
- Sort.

hp300/intr.h: Fix missing includes.
linux/idr.h: Need <sys/mutex.h> for kmutex_t.
amiga/intr.h: Don't define spl*() functions if !_KERNEL.

This is used by crash(8) now, and what's important is ipl_cookie_t.
cesfic/intr.h: Expose ipl_cookie_t to userland for crash(8).
cesfic/intr.h: Expose ipl_cookie_t to userland only with _KMEMUSER.

Probably not necessary but let's be a little more cautious about
this.

atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).

arm/cpu.h: Need sys/param.h for COHERENCY_UNIT.

Nix machine/param.h -- not meant to be used directly, pulled in by
sys/param.h.

Move the definition of ipl_cookie_t out of the kernel-only sections,
some _KMEMUSER applications need it.

ddb: Cast pointer to uintptr_t first before db_expr_t.

hppa/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

news68k/intr.h: Fix includes. Put some definitions under _KERNEL.

next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

sys/ksem.h: Hack around fstat(8) abuse of _KERNEL.

sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).

x68k/intr.h: Put functions under _KERNEL so crash(8) can use this.

Make ipl_cookie_t visible for _KMEMUSER userland applications.

fix editor mishap in previous

Explicitly include <sys/mutex.h> for kmutex_t.

Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.

hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).

mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8).
Make inclusion of sys/intr.h explicit for spl*.

fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h. avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.

Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h. And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.

ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.

re-fix hppa builds.

this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.

Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex. Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT. Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.

ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t.

explicitly include no longer implicitly included sys/mutex.h.

arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.

complete the previous - there were two calls to find_first_bit() to fix.

arm/xscale: Missed a spot with previous find_first_bit commit.

evbarm/g42xxeb: Fix off-by-one in previous.

The original find_first_bit(x) was 31 - __builtin_clz((uint32_t)x),
which is equivalent to fls32(x) - 1, not to fls32(x).

Note that fls32 is 1-based and returns 0 for x=0.

RSS XML Feed