Commit Graph

3625 Commits

Author SHA1 Message Date
chs 8b4d79c278 implement cpu_lwp_setprivate() on several platforms. 2010-07-07 01:20:49 +00:00
chs e8200b900c implement ucas_* for alpha. 2010-07-07 01:17:49 +00:00
rmind 3c507045e2 Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour.  Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.
2010-07-01 02:38:26 +00:00
rmind 2e5851d2b3 Fix build for Alpha. 2010-06-23 13:52:26 +00:00
rmind 1840edb963 Implement high priority (XC_HIGHPRI) xcall(9) mechanism - a facility
to execute functions from software interrupt context, at SOFTINT_CLOCK.
Functions must be lightweight.  Will be used for passive serialization.

OK ad@.
2010-06-22 18:29:01 +00:00
mrg d823f37213 properly document alpha ddb "mach" commands. PR#38303. 2010-06-08 06:14:57 +00:00
tnozaki 9efec5bce3 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
   so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
   prepareing for next libc major crunk.
4. bump libc minor version.
2010-06-07 13:52:28 +00:00
tnozaki dc71c99d49 fix wrong integer promotion rule(removed U suffix from UINT{8,16}_C).
see ISO/IEC 9899:1999 7.18.4.3.
2010-05-29 17:33:57 +00:00
plunky c938c0405b add btmagic(4) where other Bluetooth drivers are listed 2010-05-22 19:02:07 +00:00
mrg 309c6e11b7 enable IPFILTER_COMPAT in all kernels that have ipfilter already.
canonicalise several of the ipf option segments in various files
(this mostly means adding commented out IPFILTER_DEFAULT_BLOCK,
or adding commented or uncommented IPFILTER_LOG or IPFILTER_LOOKUP
option statements.)

i built about 20 of these kernels to check, but not all of them.
2010-05-08 22:16:25 +00:00
chs 7654d6d482 enable TMPFS in all GENERICs that have MFS enabled. 2010-04-29 22:40:48 +00:00
rmind 13f624ca0f Remove lwp_uc_pool, replace it with kmem(9), plus add some consistency.
As discussed, a while ago, with ad@.
2010-04-23 19:18:09 +00:00
pooka 835e533be4 Remove unused count (invariably "4") from pseudo-device fss. 2010-04-16 13:48:27 +00:00
jakllsch ea7d52f635 Share some attention with apecs(4).
- Convert to CFATTACH_DECL_NEW().
 - Sprinkle static on functions.
 - Recycle now-empty-and/or-unused softc structures.
2010-04-15 13:02:13 +00:00
jakllsch 4cf4191e85 Give tsc(4)/tsp(4) some attention.
- Convert to CFATTACH_DECL_NEW().
 - Sprinkle static on functions.
 - Improve KNF conformance.
 - Use C99 integer types.
 - Recycle now-empty-and/or-unused softc structures.
2010-04-15 03:09:12 +00:00
jakllsch 64fcf7099a Clean up accidential commit. 2010-04-07 18:51:34 +00:00
jakllsch 9d6bdcd981 let ath(4) build on alpha 2010-04-07 17:51:15 +00:00
jakllsch e43bf0587d satafis:
- Add function to parse RDH FIS for use in implementing AT_READREG.
- Correct and clean up some structure definitions.
- Sprinkle a bit of const.
- Remove dependency on <dev/ic/wdcreg.h>, WDCTL_4BIT doesn't seem
  to be specified by any recent ATA standard, and it seems to make
  no difference in practice.
- Stop using WDSD_IBM, these bits have been obsolete since before SATA.

siisata:
- Implement AT_READREG.
- Reap now-unneeded <dev/ic/wdcreg.h>.
- Whitespace and slight debug code cleanup.
- Some possibly-uncessary code reordering.

ahcisata:
- Implement AT_READREG.
- Reap now-unneeded <dev/ic/wdcreg.h>.
2010-04-07 17:51:15 +00:00
joerg 58e867556f Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
2010-04-05 07:19:28 +00:00
tnozaki 377cb4e4f9 1. {wctype,wctrans,mbstate}_t: switch MD to MI like other
libc implementation (such as *BSD and glibc2).

2. don't typedef void * wc{type,trans}_t, suggested by soda@-san.
   it may pass through compiler type check, it's harmful.
   so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does).

no ABI change was made.
2010-03-27 22:14:09 +00:00
chs 04aa4da3b0 fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
2010-03-20 23:31:27 +00:00
plunky 04e2ab6ae6 add uhso(4) device where appropriate
- follow the lead of other USB driver declarations wrt commented out
    - (cross-)build tested all these kernels
2010-03-07 09:39:42 +00:00
plunky c269ebf72f use a MI major number for uhso(4) driver
(requested by mrg)
2010-03-06 23:45:38 +00:00
plunky 4677f8289f add major device for usho(4) driver 2010-03-06 21:31:50 +00:00
skrll 158aca4053 s/cpu_fork/cpu_lwp_fork/ in comment. 2010-02-25 07:14:48 +00:00
joerg d621e29eca Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
2010-02-08 19:02:25 +00:00
skrll 3eb360a13a Typo in comment. 2010-02-02 20:40:07 +00:00
pooka 10fe49d72c Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2010-01-19 22:06:18 +00:00
pooka 431bb6c50c if_ade doesn't build, suggesting nobody has tried to do anything
else than rototill it for the past n+1 years.  The comments at the
top note a number of clauses after which it can be removed.  I'm
sure that in the past 10+ years those have either been met or become
irrelevant, so remove this.
2010-01-18 17:53:35 +00:00
mhitch a9a95e1379 Fix incorrect Acer Labs ID. PCI_PRODUCT_ALI_M1543 had been incorrectly
identified as product code 0x1533, which is what is actually in the
CS20.  PCI_PRODUCT_ALI_M1543 was corrected recently and sio.c would fail
to match the bridge.
2010-01-12 20:24:45 +00:00
matt 0a8b38422e Add PRIx{P,V}{ADDR,SIZE}, PRIu{P,V}SIZE, and PRIxREGISTER{,32,64} for all
(except where they will be added via merge).  These should be used to print
{p,v}{addr,size}_t and register*_t as appropriate.
2009-12-11 05:52:03 +00:00
matt 6a9e4e8eeb Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.
2009-12-10 14:13:48 +00:00
rmind e9f7af26e6 Rename L_ADDR to L_PCB and amend some comments accordingly. 2009-12-10 05:10:00 +00:00
pooka 70d4493c77 Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs.  User functionality remains the same.
2009-12-05 20:11:01 +00:00
njoly 743418620c Cleanup interrupt establish error messages. Do not mix
aprint_error/aprint_normal/printf calls for a single line.
2009-12-04 11:13:04 +00:00
rmind ce313d4fb1 Replace l_addr with uvm_lwp_getuarea() in various MD code, mostly cpu_lwp_fork(). 2009-11-29 04:15:42 +00:00
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