Commit Graph

3589 Commits

Author SHA1 Message Date
rmind 3f18fe8123 - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places.  Reduce sys/user.h inclusions.
2009-11-27 03:23:03 +00:00
matt 11af2f9cfa Kill proc0paddr. Use lwp0.l_addr instead. 2009-11-26 00:19:11 +00:00
rmind 9303fb5a00 Remove IPL_LPT and IPL_IPI aliases, use the actual IPLs.
Fix some broken comments.
2009-11-25 14:28:49 +00:00
pooka 09dbb89b44 If cpu_disklabel includes struct dkbad, define __HAVE_DISKLABEL_DKBAD.
This allows use of subr_disk_mbr on all archs.  Default to it for
the rump disk component.  No functional change for regular kernels.
(The other option would've been to include dkbad in disklabels
everywhere, but arguably this approach has less possible side-effects,
especially given that wedges and related magic will take over the
world any second now).
2009-11-23 13:40:08 +00:00
rmind 498ef96f10 - Use lwp_getpcb() on Alpha.
- Replace and clean struct user usage, slightly simplify some code parts.
- Include sys/user.h in MD proc.h .
2009-11-21 05:35:40 +00:00
mhitch aafca08c2d The tlb shootdown IPI can interrupt the pool_cache_get() in places that
can cause a deadlock or pool cache corruption.  Take the shootdown job
queue mutex before calling pool_cache_get(), which will block the IPI
interrupts and seems to fix the remaining tlb shootdown deadlocks and
pool cache corruption I've been seeing.  Should address both
PR port-amiga/38335 and PR port-amiga/42174.
2009-11-09 04:31:03 +00:00
mhitch 83c7e4d319 Loading the kernel at 0xfffffc0000300000 doesn't work on my ES40 when I've
got raid drives configured on the iop(4) adapter and the mlx(4) adapter.
Change the kernel text to 0xfffffc0000430000 (which is where Tru64 has its
kernel).
2009-11-09 04:03:19 +00:00
cegger 9480c51b04 Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
2009-11-07 07:27:40 +00:00
thorpej 121cb87046 Fix error in previous that could cause us to refer to the wrong cpu_info
after handling an AST.
2009-11-05 04:19:47 +00:00
thorpej c64f923f50 Restructure exception_return() a bit in preparation for some upcoming
changes.
2009-11-03 16:08:00 +00:00
mhitch a755312d41 The tsc(4) bus initialization was using a single statically allocated
extent storage for each tsp(4), which caused a LOCKDEBUG kernel to fail
because the extent storage contained a mutex which panics when the second
mutex_init() is attempted.  Put the extent storage into the tsp_config
structure so each tsp(4) gets it own.  Fixes PR port-alpha/38358.
2009-10-30 18:55:45 +00:00
thorpej b88f55760b Garbage-collect pmap_do_reactivate() and the associated IPI -- nothing has
used them for a long time.
2009-10-26 03:51:42 +00:00
thorpej ba23fd19c8 Garbage-collect PMAP_LEV1MAP_SHOOTDOWN() -- it hasn't been used for a long
time.
2009-10-26 03:21:19 +00:00
mhitch 4cdf2079e4 We might switch cpu in between the start of cpu_reboot() and where we
actually start shutting down cpus.  This caused problems because the
wait_mask computed at the beginning of cpu_reboot() wouldn't be correct
when actually waiting for the other cpus to shutdown, and cpu_halt()
might be called instead of prom_halt() at the end, leading to a hung
machine.
2009-10-25 20:39:45 +00:00
thorpej 825a207d3f Ensure coherency between the L1 PT cache and pmap_growkernel() -- protect
allocations from pmap_growkernel() with a r/w lock.
2009-10-24 04:56:42 +00:00
rmind 10758cb0f9 Simplify pmap_remove() a little by avoiding pmap_do_remove() layer, since
possibility to skip wired mappings is not needed anymore.  Apart from that,
no functional differences are intended.
2009-10-22 19:50:55 +00:00
snj febb7cce65 Drop 3rd and 4th clauses. Approved by gwr@ (copyright holder). 2009-10-21 23:12:09 +00:00
rmind 40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
mhitch 7e4eb61e65 IPI interrupts occur above IPL_VM, so using IPL_VM in for the tlb shootdown
queue mutex doesn't work very well.  I get various deadlocks and corrupted
queue entries.  Change to IPL_SCHED [IPL_CLOCK] to block IPI interrupts
while the cpu is mucking with the shootdown queue.
2009-10-04 17:00:31 +00:00
mhitch e851d39acd Add support for booting off a couple of common RAID adapters found on
several models of alpha systems: mlx [Mylex DAC060] and iop [I2O].
Addresses PR #25829.
2009-09-14 02:46:29 +00:00
mhitch a25d763f88 Add the I2O iop controller, as used in the ES40 and ES45. 2009-09-14 02:28:22 +00:00
mhitch 7b90090350 Alpha will size the mutex structure in pmap_tlb_shootdown_q to 16 bytes.
Change the command and pad accordingly;  now pmap_tlb_shootdown_q entries
really are cache-aligned.
2009-09-10 22:27:11 +00:00
mhitch 8c83d5056c Now that secondary cpus are added the cpu_info list earlier, attempt to
send pmap tlb shootdowns to them cause the shootdown job queue to fill up,
but since the cpus aren't running yet, no IPIs get sent.  When the job
queue is full, the bit mask of cpus to send the IPI to is not set and no
shootdown IPI ever gets sent after the cpu is marked running.  Always
set the cpumask even when the queue is full.  Now I get shootdown ipis
on all the secondary cpus.
2009-09-10 21:36:39 +00:00
mhitch 66b730fd58 There's now some per-cpu initialization that occurs before the secondary
cpus are told to begin running.  Since the seconedary cpus weren't being
added to the cpu_info list until then, that initialization wasn't being
done and resulted in crashes on the secondary cpus.  Add the secondary
cpus to the cpu_info_list after they've been started (but waiting to be
told to start running).  This fixes the problem specifically stated in
PR port-alpha/41106.  MP alphas will now at least boot and begin running,
but will eventually crash in various ways later.
2009-09-06 18:06:24 +00:00
thorpej 4f976b9bb1 Use bus_dmamem common. 2009-08-21 03:39:41 +00:00
skrll 98243f3753 Don't try and symbol set debug_stack_top from the common symbol
debug_stack_bottom. It's bogus and disallowed in new binutils.
2009-08-20 21:34:03 +00:00
matt 5902a47247 Add print format specifiers for {p,v}{addr,size}_t and register_t,
PRTx{P,V}{ADDR,SIZE} and PRTxREGISTER, respectively.
2009-08-20 21:31:49 +00:00
dyoung ab367b5fb7 (Re-)define isa_detach_hook(), and define isa_dmadestroy(). Update
some isa_chipset_tag_t->ic_detach_hook() definitions.
2009-08-19 15:09:56 +00:00
dyoung 72047fbc34 isa_detach_hook() needs two arguments, the first an isa_chipset_tag_t. 2009-08-19 15:00:23 +00:00
dyoung e178a961c9 Define isa_dmadestroy and isa_detach_hook. Hook up a couple of
isa_detach_hook implementations.
2009-08-19 14:29:53 +00:00
thorpej 97a2657a66 Add a real API for testing if a page is a managed page, and adjust callers
to stop relying on vm_physseg_find() for this purpose.
2009-08-18 18:06:53 +00:00
thorpej 2864afa106 Delete some vanity configs, esp. now that the machines no longer exist. 2009-08-18 17:52:30 +00:00
matt 209a0b42e3 Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
2009-08-15 23:44:57 +00:00
martin 476755a88c Do not use lwp_trampoline for cpu_setfunc, but a simplified setfunc_trampoline
that does not call lwp_startup() instead.
2009-06-01 20:58:16 +00:00
skrll e03976623a Add TLS relocation definitions. 2009-05-30 05:56:52 +00:00
cegger 1d89a182fb change pmap flags argument from int to u_int.
discussed with christos@ on source-changes-d@
2009-04-21 21:29:58 +00:00
tsutsui bd6f58e511 Set STRIPFLAG= after ${MAKECONF} is included by <bsd.own.mk> via <bsd.prog.mk>.
Fixes PR install/40492.
2009-04-20 13:15:12 +00:00
tsutsui 78712968dc Use <bsd.klinks.mk> to create ${MACHINE} and ${MACHINE_ARCH} symlinks. 2009-04-13 12:18:56 +00:00
tsutsui ac465a42e7 Remove obsolete LIBSA_USE_MEMCPY and LIBSA_USE_MEMSET.
They were removed from <lib/libsa/stand.h> on December 2007.
2009-04-03 10:38:12 +00:00
tsutsui ab3ad94358 Remove kernfs and use dmesg(8) on alpha INSTALL kernel. 2009-03-29 10:12:31 +00:00
cegger c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
cegger df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
cegger 20cd1777db ansify function definitions 2009-03-18 07:41:54 +00:00
he 75306d0938 Correct the sense of the test for LIBSA_NO_FS_CLOSE
so that this builds again.
2009-03-17 18:43:43 +00:00
dsl 98ae204731 Add some 'int' into function definitions where the K&R one didn't
specify a type.
2009-03-17 18:19:15 +00:00
dsl 7cc9af7d64 ANSIfy functions with function-pointer arguments 2009-03-16 23:11:09 +00:00
cegger 164477c65a ansify function definitions 2009-03-15 22:16:09 +00:00
dsl 82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +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