Commit Graph

351 Commits

Author SHA1 Message Date
bjh21
8f2e944cdf Use more fields from curcup(), specifically ci_dev (replacing the local
the_cpu) and the various fields set from the CPU ID register.
2009-01-17 16:08:02 +00:00
bjh21
a91d2ba8c7 Small tweak to kernel RAS restart code: there's no need to restart if PC
is already at the first instruction of the RAS.
2009-01-17 15:43:52 +00:00
bjh21
e26a7c553a cpu_info_store, machine, and machine_arch can all be shared by acorn26 and
arm32, so share them.
2009-01-16 01:03:47 +00:00
bjh21
3947d9169a acorn26 and arm32 have identical versions of cpu_need_resched(). Unify them.
Similarly, with a small tweak acorn26 can use the same cpu_intr_p() as arm32,
so those can be unified too.
2009-01-16 00:44:43 +00:00
bjh21
b4036b9540 Remove a couple of spurious instructions from irq_entry -- there's
no need to copy SP into R0 to pass to irq_handler() when R0 already
contains SP from a few instructions earlier.
2009-01-16 00:13:25 +00:00
bjh21
805cc01a50 Finally purge __P() from sys/arch/acorn26. 2009-01-14 23:14:48 +00:00
bjh21
039be0e249 Nothing uses set_r13_irq(). Indeed, NetBSD/acorn26 doesn't use R13_irq
at all.  G/c the function.
2009-01-14 22:17:52 +00:00
bjh21
994c290845 atomic_set_bit() and atomic_clear_bit() are unused. Garbage-collect them.
If anyone wants such functionality, it's trivially synthesised with
atomic_cas_uint() anyway.
2009-01-14 20:43:28 +00:00
bjh21
22361356d3 Use a compatible format for printing suseconds_t. 2009-01-14 20:40:55 +00:00
bjh21
2403360562 Make the restartable atomic sequence for _lock_cas() actually atomic and
restartable on acorn26.
2009-01-13 22:43:48 +00:00
bjh21
583bfaa708 Autoconfiguration cleanup for arcvideo(4):
- Use device_t and cfdata_t rather than explicit structure pointers.
- Use device_private() rather than a cast to convert device_t to a softc.
- Use device_*() to get at the innards of device_t.
device/softc split not done yet because of worrying about bootstrap console
stuff.
2009-01-07 23:14:40 +00:00
bjh21
a3551a3ce2 Autoconfiguration cleanup for arcpp(4):
- Split device_t out of softc.
- Use device_t and cfdata_t rather than explicit structure pointers.
- Use device_*() rather than accessing parts of device_t directly.
- Use aprint_*() rather than printf().
Also ANSIfy arcpppushbytes.
2009-01-07 23:05:46 +00:00
bjh21
60f9cd19b7 Add arcpp(4) and eca(4) since they are aren't horribly broken. 2009-01-07 23:01:53 +00:00
bjh21
5ddd0631a0 Rework the bootstrap IIC stuff used by cmos_read() so that it works
properly, albeit only after iociic0 has been attached.  Happily,
cmos_read() isn't needed before that anyway.
2009-01-07 22:58:38 +00:00
bjh21
12052c1959 Make Econet code compile again. 2009-01-07 20:56:40 +00:00
bjh21
d5602e8683 Autoconfiguration cleanup for latches(4):
- Split struct device out of the softc.
- Use device_t and cfdata_t rather than explicit structure pointers.
- Use aprint_*() rather than printf().
- Use device_private() to convert device_t into softc.
2009-01-07 00:09:24 +00:00
bjh21
4c6ac02e21 Autoconfiguration cleanup for iociic(4):
- Use device_t and cfdata_t rather than explicit structure pointers.
- Use aprint_*() rather than printf().
- Pass "self" to config_found_ia rather than &sc->sc_dev.
Also an amount of KNF.
I haven't actually split the device structure off from the softc because
iociic_bootstrap_cookie() expects to allocate fake versions of both at once,
and I've not yet decided what it's best to do about that.
2009-01-07 00:06:59 +00:00
bjh21
06d5a26fdb Autoconfiguration cleanup for arckbd(4):
- Use device_t and cfdata_t rather than explicit structure pointers.
- Split device and (non-existent) softc for arcwskbd and arcwsmouse.
- Use aprint_*() rather than printf().
- Use device_*() to access fields of device_t.
- Use device_private() rather than a cast to convert from device_t to softc.
device/softc split not done for arckbd(4) itself because there are lots
of void* cookies that get treated as arckbd_softc at one end and device_t
at the other, and they'll need a little thought to clean up.
2009-01-06 23:58:00 +00:00
bjh21
25e4eb23f4 Autoconfiguration cleanup for upc(4) at iobus(4):
- Use device_t and cfdata_t rather than explicit structure pointers.
- Use device_*() to access parts of device_t.
- Use device_private() to convert device_t into a softc.
device and softc not split because that will involve venturing outside
sys/arch/acorn26 and I want to get that cleaned up first.
2009-01-06 23:51:34 +00:00
bjh21
8cb474f8d5 Autoconfiguration cleanup for ioc(4):
- Use aprint_*() rather than printf().
- Use device_t and cfdata_t rather than explicit pointer types.
- Use device_* to get at parts of device_t.
- Use device_private to convert device_t into ioc_softc *.
Note that I haven't yet separated the softc from the device structure because
this driver will need a little care in doing that.
2009-01-06 23:48:30 +00:00
bjh21
493a701000 Autoconfiguration cleanup:
- Use aprint_*() rather than printf().
- Split device_t from iobus_softc and remove the latter since it's empty.
- Use device_t and cfdata_t rather than explicit structure pointers.
2009-01-06 23:44:27 +00:00
bjh21
8c2f284250 Autoconfiguration cleanup:
- Use aprint_*() rather than printf().
- Split device_t out of cpu_softc, then remove the latter entirely since that
  left it empty.
- Use device_t and cfdata_t rather than explicit structure types.
2009-01-06 23:41:28 +00:00
bjh21
5e231a9502 Replace the local current_spl with the ARM-wide curcpu()->ci_cpl, since
otherwise a DEBUG kernel panics at the first AST, though I don't think
any non-DEBUG code cares.
2009-01-06 23:35:39 +00:00
bjh21
b954c58e71 Add a TESTING kernel configuration that includes GENERIC with useful
diagnostic options turned on and any local drivers that aren't ready
for GENERIC yet but still ought to be tested.
2009-01-04 01:06:26 +00:00
bjh21
ba2b1f1960 device_t/softc split for experimental powerrom driver. 2009-01-04 01:02:29 +00:00
bjh21
4b46702699 device_t/softc split for unixbp(4) 2009-01-04 00:36:00 +00:00
bjh21
fada7a07d6 Initialise cpu_info_store so that we start up with a valid curlwp. 2009-01-03 18:15:11 +00:00
cegger
dcf705893e use M_ZERO on malloc() and remove subsequent bzero(). 2008-12-19 18:49:37 +00:00
cegger
9b87d582bd kill MALLOC and FREE macros. 2008-12-17 20:51:31 +00:00
christos
9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
he
9a3d86109e _DEV_ZERO_oARM is now only defined under COMPAT_16; make this build
after that change.
2008-12-15 09:43:27 +00:00
pooka
ee352f3d33 Make kernel_pmap_ptr a const. Requested by steve_martin. 2008-12-10 11:10:17 +00:00
pooka
29d439f898 Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module.  pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
2008-12-09 20:45:44 +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
6ba528b5bc Remove softdep, pass 1. We are focused on improving journalling.
Proposed on tech-kern@.
2008-11-24 11:41:07 +00:00
ad
3f1c80da0a Remove compat ifdef. 2008-11-15 11:04:39 +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
dyoung
94d985722a It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled.  So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks().  Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown().  No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown().  I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that.  Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.
2008-11-11 06:46:40 +00:00
apb
f46c1de7cb Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +00:00
he
39f71a34bc Resurrect cpu_setfunc(), and make cpu_lwp_fork() use it.
Restores buildable status for the acorn26 kernel.

skrll@ reviewed and commented an earlier version of this diff.
2008-10-25 22:12:33 +00:00
tls
fca9d633b9 Add accept filters to GENERIC kernels where they exist. 2008-08-10 15:31:20 +00:00
simonb
0751ba4bff Add "options WAPBL" to standard GENERIC/INSTALL type configs. 2008-07-31 07:40:59 +00:00
ad
b94f79f0e8 Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@. 2008-07-02 17:28:54 +00:00
matt
29731f5c84 Make acorn26 kernels build again. 2008-06-23 17:58:17 +00:00
cegger
681dac3dfc use device_lookup_private to get softc 2008-06-11 22:07:49 +00:00
martin
11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cube
cf80f73d17 Split device_t and softc for the NE2000 Ethernet chip and all its variants
and attachments.  Use device_t accessors, correct types, and ANSIfy when
appropriate.
2008-03-12 14:31:11 +00:00
drochner
bb33f35f20 Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
2008-02-20 21:43:33 +00:00
joerg
75501168d3 Add missing assym.h dependencies. 2008-02-13 23:37:17 +00:00