Commit Graph

49 Commits

Author SHA1 Message Date
christos
32d612a206 fix leak. 2014-09-21 15:46:44 +00:00
joerg
f800359619 intrcnt and _intrnames are unused. 2014-06-20 13:17:59 +00:00
joerg
8b058f850e Don't use cpsr_all/spsr_all with mrs, it doesn't take a mask. 2013-12-02 18:36:10 +00:00
matt
ab152917fb Move parts of cpu.h that are not needed by MI code in <arm/locore.h>
Don't include <machine/cpu.h> or <machine/frame.h>, use <arm/locore.h>
Use <arm/asm.h> instead of <machine/arm.h>
2013-08-18 06:28:18 +00:00
chs
cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
matt
2650ef287e Avoid using r7 (which is being reserved for a different purpose). 2012-08-29 07:06:27 +00:00
matt
21a4349cd1 Use a typedef to cleanup OF_set_callback. 2012-01-31 04:32:07 +00:00
joerg
3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
matt
338de10a0a Some more device_t, cfdata_t, CFATTACH_DECL_NEW cleanup. 2011-06-06 16:29:14 +00:00
matt
6a66466f0c Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits.  Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
2010-12-20 00:25:23 +00:00
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
dsl
7cc9af7d64 ANSIfy functions with function-pointer arguments 2009-03-16 23:11:09 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
dsl
02cdf4d2c8 Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
2009-03-14 14:45:51 +00:00
martin
719a906ef5 As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
2008-11-30 18:21:31 +00:00
ad
0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
matt
e896294a6c Remove non-__ELF__ snippets. 2008-08-29 19:08:29 +00:00
matt
825088eda6 Merge kernel changes in matt-armv6 to HEAD. 2008-04-27 18:58:43 +00:00
joerg
4e56cdd20a Convert evbarm to timecounter. Only one of the systems was tested, the
rest of the patch is compile-time tested only.
2008-01-20 16:28:22 +00:00
chris
131e68c2e1 Remove arm support for IPKDB.
It hasn't worked since arm was broken out from arm32 in Jan 2001, and
no-one has noticed or cared to fix it.
2008-01-19 13:11:09 +00:00
matt
d9322458cc Truly kill current_intr_depth once and for all. 2008-01-06 03:45:26 +00:00
garbled
d974db0ada 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.
2007-10-17 19:52:51 +00:00
tsutsui
320e4f3fc5 Remove all references to spl_mask. Now it isn't used by any sources.
Discussed on port-arm.
2007-08-13 02:04:50 +00:00
thorpej
165d4e6d83 Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing.  (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
2007-03-09 19:21:57 +00:00
matt
d471ccf3aa Clean the bitrotting ofw code. Don't export export the underlying irq
dispatch mechanism to the rest of the kernel; they don't need to know.
Nuke IRQSTATS entirely.

XXX ofwgencfg_clock needs to taught about timecounters
2007-03-08 20:48:39 +00:00
macallan
12dd6f9c02 add OF_setprop() 2007-02-28 20:30:57 +00:00
matt
af22d52131 Don't do softinit_init from irq_init. 2007-02-19 21:46:32 +00:00
matt
981ae6645d Don't export spl_smasks or soft_interrupts. They are local to intr.c
Make sure that softintr_init() is called when needed.
Assume __HAVE_GENERIC_SOFT_INTERRUPTS is defined (since newlock2 requires it).
2007-02-18 07:48:20 +00:00
matt
37f7079751 Call softintr_init() 2007-02-18 07:20:40 +00:00
bjh21
3191d2a481 Change the type of initarm() on OFW-based ARM systems to match other non-hpcarm
ports.  This seems sensible since all of them call it from the same locore.S.
This makes NetBSD/shark GENERIC compile.
2006-10-26 22:49:36 +00:00
bjh21
84e47229be parse_mi_bootargs() is declared in <arm/arm32/machdep.h>, so there's no need
to declare it here too.
2006-10-24 21:03:13 +00:00
manu
f309b668fd - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
2006-09-27 21:42:04 +00:00
yamt
ccc0bd2ab6 remove irqblock[] as no one uses it. reviewed by Ben Harris. 2006-05-11 12:05:37 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
scw
312b7ad7d8 Appease -Wcast-qual 2005-06-03 13:01:29 +00:00
thorpej
c409cf7317 Make this compile again. 2004-08-29 17:37:03 +00:00
thorpej
f4d9e6500d Add a local prototype for a called-from-asm function. 2004-08-29 17:36:46 +00:00
scw
f77bf2bb0c Enable/Restore alignment fault state on interrupt handler entry/exit. 2003-11-05 21:10:59 +00:00
lukem
08716eae82 __KERNEL_RCSID() 2003-07-15 00:24:37 +00:00
ragge
69a66687f8 Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
2003-04-26 11:05:05 +00:00
thorpej
95281cabad Use PAGE_SIZE rather than NBPG. 2003-04-01 23:19:08 +00:00
bjh21
d599df9587 Continue the " - . - 8" purge. Specifically:
add	rd, pc, #foo - . - 8		->	adr	rd, foo
ldr	rd, [pc, #foo - . - 8]		->	ldr	rd, foo

Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.

Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
2002-10-14 22:32:50 +00:00
chs
cdd13585e9 add missing protos. 2002-10-05 17:01:51 +00:00
thorpej
c5e91d447d Use CFATTACH_DECL(). 2002-10-02 04:55:47 +00:00
thorpej
9a711d6985 Declare all cfattach structures const. 2002-09-27 20:29:02 +00:00
provos
0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
mycroft
47c99ba59e Fix off-by-one error in delay(). 2002-05-02 22:01:46 +00:00
thorpej
20b1bb2655 Clean up handling of the vector page on 32-bit ARM systems:
* Don't refer to VA 0, instead refer to a new variable: vector_page
* Delete the old zero_page_*() functions, replacing them with a new
  one: vector_page_setprot().
* When manipulating vector page mappings in user pmaps, only do so if
  the vector page is below KERNEL_BASE (if it's above KERNEL_BASE, the
  vector page is mapped by the kernel pmap).
* Add a new function, arm32_vector_init(), which takes the virtual
  address of the vector page (which MUST be valid when the function
  is called) and a bitmask of vectors the kernel is going to take
  over, and performs all vector page initialization, including setting
  the V bit in the CPU Control register ("relocate vectors to high
  address"), if necessary.
2002-04-03 23:33:26 +00:00
thorpej
d17cc4f043 * Move some generic ARM OpenFirmware stuff into arch/arm/ofw (still
more can move, but not yet).
* Garbage-collect some cruft from arch/arm32 in preparation for
  renaming to arch/shark.
2002-02-06 21:30:25 +00:00