Home | History | Annotate | Download | only in xscale
History log of /src/sys/arch/arm/xscale/pxa2x0_intr.c
RevisionDateAuthorComments
 1.26  13-Jul-2023  riastradh arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.

Sidesteps namespace collision with `#define bits ...' in net/zlib.c.
 1.25  31-Oct-2022  andvar branches: 1.25.2;
fix various typos in comments and one output message.
 1.24  27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.23  04-Jan-2021  skrll Trailing whitespace
 1.22  04-Jan-2021  skrll Spell interrupts correctly
 1.21  17-Dec-2013  joerg branches: 1.21.42;
Nuke __raise.
 1.20  29-Jul-2012  matt branches: 1.20.2; 1.20.4;
Fix more -fno-common fallout.
Move more variables to common locations.
 1.19  01-Jul-2011  dyoung branches: 1.19.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.18  06-Jun-2011  matt Some more device_t, cfdata_t, CFATTACH_DECL_NEW cleanup.
 1.17  13-Jun-2010  tsutsui branches: 1.17.6;
Apply fixes for PR port-arm/43339:
Set proper IPL_SOFTfoo values even in !FAST_SOFTINTS case.
Some assertions in MI code expect they have unique values,
per comments from rmind@.

Also cleanup various "interrupt hierarchy" code since IPL_NONE and
IPL_SOFTfoo should not be set by any hardware interrupt establish functions.

Ok'ed by mrg@, tested on shark and hpcarm.
 1.16  05-Sep-2009  bsh branches: 1.16.2; 1.16.4;
correct the initial value of interrupt masks. 0 is to disable.
This fixes stray interrupt from LCD controller when lcd driver is not configured in the kernel.
 1.15  07-Nov-2008  rafal Make stray interrupt handler get the minimum IRQ number based on the current
CPU type vs. hardcoding it for pxa270.
 1.14  27-Apr-2008  matt branches: 1.14.6; 1.14.8;
Merge kernel changes in matt-armv6 to HEAD.
 1.13  11-Dec-2007  ad branches: 1.13.8; 1.13.10; 1.13.12;
And you, be ye fruitful, and multiply; bring forth abundantly in the earth,
and multiply therein. (Genesis 9:6-8)
 1.12  03-Dec-2007  ad branches: 1.12.2; 1.12.4; 1.12.6;
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.11  17-Dec-2006  peter branches: 1.11.6; 1.11.20; 1.11.22; 1.11.24; 1.11.26; 1.11.32;
Update from the latest Zaurus source from NONAKA Kimihiro.

Includes drivers for I2C, I2S, PCMCIA controller, USB device controller,
OHCI USB controller (from OpenBSD) and some improvements to the LCD
controller driver.
 1.10  24-Nov-2006  wiz s/heirarchy/hierarchy/, from Zafer.
 1.9  10-Apr-2006  simonb branches: 1.9.8; 1.9.10;
Tab Police.
 1.8  24-Dec-2005  perry branches: 1.8.4; 1.8.6; 1.8.8; 1.8.10; 1.8.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.7  11-Dec-2005  christos merge ktrace-lwp.
 1.6  04-Jul-2005  bsh branches: 1.6.2;
The first step to support Intel PXA270.

kernel config option CPU_XSCALE_PXA2X0 is now obsoleted by
CPU_XSCALE_PXA250 and CPU_XSCALE_PXA270. If both of them are defined,
CPU is determined run-time.
 1.5  15-Jul-2003  lukem __KERNEL_RCSID()
 1.4  16-Jun-2003  thorpej branches: 1.4.2;
Rename IPL_IMP -> IPL_VM.
 1.3  05-Jun-2003  scw - Rearrange the PXA2x0 support code to better support attaching
child drivers such as interrupt and gpio controllers.
- Add a function to probe SDRAM size at boot time.
- Add a function to configure the Clock Manager's CKEN settings.
- Add an INTC driver.
- Add a GPIO driver.
- Add attach glue for the PXA2x0's "almost" 16550-compatible uarts.
- Tweak the LCD driver to use the GPIO driver's services for setting
up GPIO pin function.
 1.2  03-Jan-2003  thorpej Use the generic irq_dispatch.S
 1.1  19-Oct-2002  bsh branches: 1.1.2;
Support Intel PXA250 and PXA210 application processors.
 1.1.2.3  03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2  11-Nov-2002  nathanw Catch up to -current
 1.1.2.1  19-Oct-2002  nathanw file pxa2x0_intr.c was added on branch nathanw_sa on 2002-11-11 21:56:57 +0000
 1.4.2.4  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1  03-Aug-2004  skrll Sync with HEAD
 1.6.2.4  21-Jan-2008  yamt sync with head
 1.6.2.3  07-Dec-2007  yamt sync with head
 1.6.2.2  30-Dec-2006  yamt sync with head.
 1.6.2.1  21-Jun-2006  yamt sync with head.
 1.8.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.8.10.1  19-Apr-2006  elad sync with head - hopefully this will work
 1.8.8.1  11-Apr-2006  yamt sync with head
 1.8.6.1  22-Apr-2006  simonb Sync with head.
 1.8.4.1  09-Sep-2006  rpaulo sync with head
 1.9.10.2  18-Dec-2006  yamt sync with head.
 1.9.10.1  10-Dec-2006  yamt sync with head.
 1.9.8.1  12-Jan-2007  ad Sync with head.
 1.11.32.2  27-Dec-2007  mjf Sync with HEAD.
 1.11.32.1  08-Dec-2007  mjf Sync with HEAD.
 1.11.26.3  28-Jan-2008  matt Given the that there are only 4 IPLs (ignoring soft IPLs), a number of
cleanups can be done:
Remove _SPL_* aliases.
Don't store irqmasks in ci_cpl, just make it an ipl level.
Add fast softint switching support.
 1.11.26.2  09-Jan-2008  matt sync with HEAD
 1.11.26.1  06-Nov-2007  matt Nuke use of current_spl_level and use curcup()->ci_cpl instead
 1.11.24.1  01-Jan-2008  chris Sync with HEAD.
 1.11.22.1  09-Dec-2007  jmcneill Sync with HEAD.
 1.11.20.2  26-Dec-2007  rjs Sync with HEAD.
 1.11.20.1  06-Oct-2007  rjs Switch to new interrupt code.
 1.11.6.1  03-Dec-2007  ad Sync with HEAD.
 1.12.6.1  13-Dec-2007  bouyer Sync with HEAD
 1.12.4.1  13-Dec-2007  yamt sync with head.
 1.12.2.1  26-Dec-2007  ad Sync with head.
 1.13.12.4  11-Aug-2010  yamt sync with head.
 1.13.12.3  16-Sep-2009  yamt sync with head
 1.13.12.2  04-May-2009  yamt sync with head.
 1.13.12.1  16-May-2008  yamt sync with head.
 1.13.10.1  18-May-2008  yamt sync with head.
 1.13.8.2  17-Jan-2009  mjf Sync with HEAD.
 1.13.8.1  02-Jun-2008  mjf Sync with HEAD.
 1.14.8.1  19-Jan-2009  skrll Sync with HEAD.
 1.14.6.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.16.4.2  12-Jun-2011  rmind sync with head
 1.16.4.1  03-Jul-2010  rmind sync with head
 1.16.2.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.17.6.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.19.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.19.2.1  30-Oct-2012  yamt sync with head
 1.20.4.1  18-May-2014  rmind sync with head
 1.20.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.42.1  03-Apr-2021  thorpej Sync with HEAD.
 1.25.2.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