Commit Graph

3625 Commits

Author SHA1 Message Date
ad 8228d024b7 Use atomics to maintain the number of special page references. Should fix
locking problems including in revision 1.232.
2008-03-10 13:36:22 +00:00
cube 8ecf8999bf Split the softc from the device_t for all lpt(4) variants and attachments
except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.

As usual, it comes with related cosmetic changes.
2008-03-07 17:15:51 +00:00
dyoung e4f3892584 Use pmf_device_register1() instead of shutdownhook_establish() to
register com_cleanup() as the shutdown hook.

Add a generic suspend routine.  Suspend and resume com@isa.

Protect against dereferencing a NULL softc in comioctl().

Destroy both a mutex and a callout in com_detach().

Cosmetic: use aprint_*_dev().  Use PMF_FN_ARGS, PMF_FN_PROTO.
2008-02-29 07:02:04 +00:00
xtraeme f402cadf9a Remove CTL_MACHDEP_NAMES, it's not used anywhere.
Ok by martin@.
2008-02-27 18:26:15 +00:00
ad c64692e9f4 Use a hash of locks, instead of one per vm_page. 2008-02-21 17:12:58 +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
dyoung 2ccede0a9c Start patching up the kernel so that a network driver always has
the opportunity to handle an ioctl before generic ifioctl handling
occurs.  This will ease extending the kernel and sharing of code
between drivers.

First steps:  Make the signature of ifioctl_common() match struct
ifinet->if_ioctl.  Convert SIOCSIFCAP and SIOCSIFMTU to the new
ifioctl() regime, throughout the kernel.
2008-02-07 01:21:52 +00:00
dsl c2a8c787c3 Remove the 'args' parameter to 'trace_exit()' it is no longer used.
Instead of passing the (un)real system call code and syscall table pointer,
just pass the number of arguments - which is what ktrace really wants.
Ride forthcoming 4.99.53
2008-02-06 22:12:39 +00:00
ad 081044f790 Don't call printf from an IPI handler. 2008-02-04 12:46:30 +00:00
tsutsui 0dd140599f Use some loops to prime the cache on measuring the PCC clock frequency.
As per the similar code on mips ports (though no visible difference).
2008-02-03 07:31:21 +00:00
joerg 6e869e402d Refactor in_cksum/in4_cksum/in6_cksum implementations:
- All three functions are included in the kernel by default.
  They call a backend function cpu_in_cksum after possibly
  computing the checksum of the pseudo header.
- cpu_in_cksum is the core to implement the one-complement sum.
  The default implementation is moderate fast on most platforms
  and provides a 32bit accumulator with 16bit addends for L32 platforms
  and a 64bit accumulator with 32bit addends for L64 platforms.
  It handles edge cases like very large mbuf chains (could happen with
  native IPv6 in the future) and provides a good base for new native
  implementations.
- Modify i386 and amd64 assembly to use the new interface.

This disables the MD implementations on !x86 until the conversion is
done. For Alpha, the portable version is faster.
2008-01-25 21:12:10 +00:00
skrll ebb5deb738 Define PT_MACHDEP_STRINGS 2008-01-25 11:59:20 +00:00
joerg 3615cf7715 Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
2008-01-20 18:09:03 +00:00
ad b2b4fb0d7d pmap_do_tlb_shootdown: simplify queue management. 2008-01-15 18:48:51 +00:00
ad eb24572347 Fix some problems with TLB shootdown and (hopefully) make it faster. This
had the potential to cause problems prior to 4.99.48 because it called into
the VM system without kernel_lock held.

XXX1 pmap_update() should be waiting for shootdown jobs to complete. It's
not clear how to do that because the shootdowns happen at IPL_VM.
2008-01-12 16:45:29 +00:00
tsutsui db09bcc34f Move todr_attach(9) calls from each MD attachment to MI mc146818_attach(). 2008-01-10 15:17:39 +00:00
christos 2937b71b26 Add PaX ASLR for testing 2008-01-07 16:46:59 +00:00
ad 907a6a54db Fix dodgy assertions. From Anders Hjalmarsson. 2008-01-07 00:43:27 +00:00
ad 0805a9416a Add MODULAR option. Include kernel linker stuff if MODULAR. 2008-01-06 18:03:58 +00:00
dsl b8bcdbe9e6 Don't pass 'curlwp' into trace_enter() and trace_exit(). 2008-01-05 12:53:52 +00:00
ad c29520cb1a Fix includes. 2008-01-05 00:31:50 +00:00
ad edcd8e4c68 More header file cleanup. 2008-01-04 21:47:16 +00:00
ad 914b753523 Linker bits for alpha. 2008-01-04 16:19:25 +00:00
ad 4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
ad 2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
dsl 7e2790cf6f Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
2007-12-20 23:02:38 +00:00
ad 4b293a84e1 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.
2007-12-03 15:33:00 +00:00
kiyohara a1297d6f3f Add bcsp(4). 2007-12-02 05:19:11 +00:00
ad 32c745d42e __HAVE_ATOMIC64_OPS 2007-11-29 00:56:53 +00:00
ad 77724e6afd Hook in the atomic ops on alpha. 2007-11-28 17:40:02 +00:00
yamt 38d5e34116 make kmutex_t and krwlock_t smaller by killing lock id.
ok'ed by Andrew Doran.
2007-11-21 10:19:06 +00:00
ad 73f1f51cda Fix cpu_need_resched. 2007-11-19 19:01:19 +00:00
ad dc26833bb6 - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
2007-11-19 18:51:36 +00:00
ad 2783731b63 Set curlwp for the boot CPU before entering main(). 2007-11-19 02:12:11 +00:00
ad d37935697b Merge tty changes from the vmlocking branch. 2007-11-07 15:56:11 +00:00
ad d18c6ca4de Merge from vmlocking:
- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.
2007-11-07 00:23:13 +00:00
ad bd6663fc4d Don't set l_usrpri / spc_curpriority here. mi_userret() does it. 2007-11-05 20:37:48 +00:00
xtraeme 4ba09b41c3 Remove System V semaphores and share memory options to set the limits:
SEMMNI, SEMMNS, SEMUME and SHMMAXPGS.

They can be tweaked via sysctl now. Ports that were setting values on
them weren't touched, I only removed the ones that were commented out.
2007-11-04 14:34:19 +00:00
yamt 23005df1e0 defparam PAGER_MAP_SIZE. 2007-10-25 13:03:03 +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
ad 9171fa2872 Comment out references to spinlockmgr(). 2007-10-10 17:44:39 +00:00
ad 36a1712707 Merge run time accounting changes from the vmlocking branch. These make
the LWP "start time" per-thread instead of per-CPU.
2007-10-08 20:06:17 +00:00
ad 9f56dfa520 Merge brelse() changes from the vmlocking branch. 2007-10-08 18:02:53 +00:00
martin d9a407bba2 Add a new option DDB_VERBOSE_HELP that adds online help to ddb.
From Adam Hamsik.
Minor modifications by me, all bugs are probably mine.
2007-09-22 18:40:20 +00:00
skrll 9fdaf800d9 Merge nick-csl-alignment. 2007-09-10 11:34:05 +00:00
drochner dce09ea075 clean up some definitions around rune_t which are not needed anymore 2007-09-03 20:31:56 +00:00
dyoung dcd8923429 Change a bazillion occurrences of code resembling this,
error = (cmd == SIOCADDMULTI) ?
	    ether_addmulti(ifr, &sc->sc_ec) :
	    ether_delmulti(ifr, &sc->sc_ec);

	if (error == ENETRESET) {

to this,

	if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number.  This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.
2007-09-01 07:32:22 +00:00
drochner 0e0fe2c353 Fix definitions of UCHAR_MAX/USHRT_MAX and related
types. C99 requires that these definitions promote to (signed/unsigned)
integer the same way as the types the definition is for. And since
unsigned char/short fit into an "int" on all our archs and thus promote
to signed int, the definitions must not be unsigned.
Fixes PR lib/31306 by Neil Booth.
2007-08-31 16:24:21 +00:00
kiyohara 510dbbae54 Add slhci at pcmcia.
And reorder.
2007-08-21 02:48:14 +00:00
kiyohara 7fbebc4263 Add btbc(4). 2007-08-20 00:54:41 +00:00
ad 07b0fe01aa cpu_lwp_fork: don't rely on struct mdlwp being zeroed in advance. 2007-08-17 23:58:45 +00:00
ad 63c4506184 Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.
2007-08-15 12:07:23 +00:00
dyoung 178f1dafa8 Use satocsdl() instead of SDL(). Constify. 2007-08-07 04:42:49 +00:00
adrianp 475217d719 Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
2007-08-06 21:26:53 +00:00
ad 66fefd117b It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:15:35 +00:00
tsutsui 1983a26b2e Check a correct value on a sanity check in jensenio_eisa_intr_map().
Fixes yet another bug on Jensen found on tracking PR port-alpha/36628.
2007-07-27 13:37:07 +00:00
tsutsui d99606f782 More fixes for Jensen, reported and tested by Christoph Franzen
in PR port-alpha/36628:
- make jensenio_eisa_maxslots() return 8 (instead of 16) since
  EISA config for slot 8-15 on jensen could return invalid values
- pass eisa_chipset_tag_t to eisa_init() and check eisa_maxslots()
  on probing EISA config space
- pass M_ZERO to malloc(9) and make sure malloc(9) doesn't fail
- fix typo in a debug printf, add more debug printfs, and
  use #ifdef EISA_DEBUG to enable them
- cast uint8_t value to uint32_t before shift more than 8 bits
- check buffer region on reading compressed data from EISA config space
2007-07-22 02:14:39 +00:00
ad 744a92f0f8 Don't depend on uvm_extern.h pulling in proc.h. 2007-07-21 19:06:20 +00:00
tsutsui 13084fc846 Add MI todr(9) support and timercounter(9) support with kern_cctr.c to alpha:
- use todr(9) API with MI mc146818(4) driver and remove homegrown
  todr stuff from MD alpha/clock.c and alpha/mcclock.c
- also remove obsolete cc_microtime stuff from MD code
- add ci_pcc_freq member in struct cpu_info for cpu_frequency(), and
  calibrate it with mc146818 interval clock in mcclock attachment
- call cc_init() in cpu_initclocks(9) because all alpha cpus have
  a pcc counter

Tested on DEC 3000/300 and AlphaPC 164, but not on any SMP machines yet.
2007-07-21 11:59:55 +00:00
tsutsui 0d3f4cbf60 Backout changes on lpt_jensenio.c rev 1.2.
lpt at jensenio doesn't seem to have a specific interrupt vector
but uses a normal EISA interrupt.

Fixes another part of PR port-alpha/36628 and PR port-alpha/20386.
2007-07-19 12:58:29 +00:00
tsutsui 43c2f4d087 Avoid NULL pointer dereference in MD device_register() function.
Fixes a part of PR port-alpha/36628.
2007-07-19 12:46:45 +00:00
tsutsui 9463f365d3 Fix indent in printf message. 2007-07-19 12:42:46 +00:00
macallan a1457f5905 change pmap_phys_address()s parameter to paddr_t since that's what it gets
fed from mmap*() anyway
approved by gimpy
2007-07-16 23:48:03 +00:00
ad 63811f5275 Generic soft interrupts are mandatory. 2007-07-14 21:48:17 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
pooka 0bc323f5cd Initialize the link context in a signal frame to the receiving lwp's
link context instead of NULL.  Otherwise, if we got a signal while the
lwp had a link context set, the link context would be set to NULL upon
return from signal delivery.

christos@tech-kern: "I think you are right."
2007-07-08 10:19:21 +00:00
tsutsui 3682cc2396 - make this compile again
- remove an unneeded include file

XXX: Avalon A12 devices are not in alpha/conf/GENERIC.
2007-07-07 21:04:29 +00:00
tsutsui 3a6c410df9 Don't update hz by the hardware RPB field.
Leave it default HZ since we always use 1024Hz in alpha/mcclock.c.
2007-07-07 17:08:15 +00:00
tsutsui d4f1dfc2c4 Add "options HZ=1024" by default for alpha.
All alpha machines use arch/alpha/alpha/mcclock.c for hardclock(9)
and it always sets MC_RATE_1024_Hz.
The default HZ value also affects tick and tickadj in conf/param.c.
2007-07-07 17:03:28 +00:00
tsutsui 6a8a584d1a Remove leftover netns stuff. 2007-07-07 05:13:14 +00:00
christos a65158cbe3 Add options FILEASSOC; needed for veriexec. 2007-06-24 21:17:31 +00:00
yamt 962e1166fd add a missing dependency. 2007-06-05 12:14:33 +00:00
martin c2534a819b Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
2007-06-04 08:55:18 +00:00
mhitch 108936c65e Fix comment: proc_trampoline() -> lwp_trampoline(). 2007-05-20 16:57:57 +00:00
mhitch bc467535b8 Fix multiprocessor operation: move a couple of fields in struct cpu_info
to the beginning so they can still be accessed in assymbly code using 8 bit
offsets.  The addition of a big structure in cpu_data moved these outside
the range of the addq instruction.  Gas should have complained that the
immediate value was too large, but just silently truncated it.  I can now
run multiprocessor again.
2007-05-19 17:09:35 +00:00
mhitch da59486c27 Fix alpha build after idlelwp merge. I don't know why machine/cpu.h was
added here, but it does not seem to be needed now, and was resulting in a
circular dependency when sys/sched.h was changed in the yamt-idlelpw branch.
2007-05-18 19:58:06 +00:00
mhitch 38ee607428 Fix a couple of problems when starting the idle lwp on secondary
cpus:  Set curlwp, and allow interrupts before entering idle loop
(otherwise, IPI interrupts won't be handled on an idle cpu).
2007-05-18 02:48:06 +00:00
mhitch bf0f43741a Fix alpha MP for idlelwp: ci_idle_lwp was added to cpu_info
structure, but never initialized.  There's already a cpu_idlelwp
in ci_data, which appears to be the same thing, so use that instead.
2007-05-18 02:45:18 +00:00
yamt f03010953f merge yamt-idlelwp branch. asked by core@. some ports still needs work.
from doc/BRANCHES:

	idle lwp, and some changes depending on it.

	1. separate context switching and thread scheduling.
	   (cf. gmcgarry_ctxsw)
	2. implement idle lwp.
	3. clean up related MD/MI interfaces.
	4. make scheduler(s) modular.
2007-05-17 14:51:11 +00:00
macallan d4ddadbf9d include files.wsfb 2007-04-10 02:19:03 +00:00
he d74897d542 Absent documentation as to what the newly added 'ipl' argument to
pool_init() is supposed to do, and actual usage of that argument in
pool_init()'s implementation, add use of IPL_VM to the TLB shootdown
job queue pool initialization to get this building again.
Someone suggested an IPL_XXX_ASK_ANDY constant be introduced...
2007-03-14 21:39:39 +00:00
drochner ab07e481e4 It doesn't make sense to specify "configuration" and "interface"
locators for uhub because a hub can't have sub-devices.
This might be sanity-checked eventually.
Same for ubt now after the change to device attachment.
2007-03-14 12:27:20 +00:00
mhitch 0f29ca7906 Contrary to the comment in cia_dma_get_tag(), there are machines with cia
that have over 1.0G.  Allow direct dma requests to fall back to SGMAPs.
my PWS 500au with 1.5G of memory now works with dma operations.
2007-03-14 01:40:14 +00:00
ad 59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
mrg 6b1e46c136 avoid unused variable warnings in pci_up1000_pickintr(). 2007-03-04 21:58:16 +00:00
yamt 45cdcb0e37 fix fallout from caddr_t changes. 2007-03-04 15:59:31 +00:00
yamt 5b23251544 fix fallout from caddr_t changes. 2007-03-04 15:17:20 +00:00
yamt 65c9a0b32e fix fallout from caddr_t changes. 2007-03-04 14:46:45 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tsutsui d4fbe368ec Apply fix for boolean_t -> bool changes on uvm.page_idle_zero access.
Thanks Tobias Nygren for help, ok'ed by thorpej, and tested on
1000A by Aaron J. Grier and on PC164 and 3000/300 by me.
2007-03-03 02:20:44 +00:00
yamt 948e7684e3 make this compilable.
(p_flag -> p_sflag, P_WEXIT -> PS_WEXIT)
2007-03-02 17:42:00 +00:00
kiyohara 11c9c998db Add btuart(4). 2007-03-01 14:57:38 +00:00
dogcow 3f940223f3 miscellaneous fallout from the great boolean rototill. 2007-02-22 20:09:42 +00:00
thorpej b25aff5288 TRUE -> true, FALSE -> false 2007-02-22 04:47:27 +00:00
thorpej dd962f8680 Pick up some additional files that were missed before due to conflicts
with newlock2 merge:

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 23:48:10 +00:00
thorpej 712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
mrg 4410329b87 add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
				  bus_addr_t min_addr,
				  bus_addr_t max_addr,
				  bus_dma_tag_t *newtag,
				  int flags)
	void _bus_dmatag_destroy(bus_dma_tag_t tag)

that allow a (normally broken/limited) device to restrict the bus address
range it can talk to.  this is used by bce(4) to limit DMA addresses to
1GB range, the maximum the chip can address.

all this is from Yorick Hardy <yhardy@uj.ac.za> with input from several
people on tech-kern.

XXX: bus_dma(9) needs an update still.
2007-02-21 20:41:23 +00:00
ad d43ea32af9 - Add /a modifier to trace that allows a specific LWP to be selected.
- When doing trace/t, always note which pid/lid combination is being traced.
2007-02-20 01:02:02 +00:00
pavel 934634a18c Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.
2007-02-17 22:31:36 +00:00
ad 3363855a4a Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
2007-02-16 02:53:43 +00:00
ad 6511d52f7d inline -> __inline 2007-02-11 15:41:31 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
hubertf 142c2a33ba Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
2007-01-24 13:08:11 +00:00
ad a79c7e51e6 Define ipl_cookie_t._psl as uint8_t so that it can be packed into a
word with other seldomly written fields.
2007-01-12 00:55:40 +00:00
pavel d98112fd6b more spaces -> tabs. 2007-01-06 08:51:22 +00:00
pavel 0da58c3f26 spaces -> tabs in the new zstty lines. 2007-01-06 08:49:34 +00:00
pavel f59a4d57f7 Merge GENERIC and ALPHA configuration, and remove the latter. ALPHA was
supposed to be a superset of GENERIC, but sometimes it was not kept up to
date.

As proposed on port-alpha@.
2007-01-04 22:10:52 +00:00
pavel 0e92fba1ae sync the zstty configuration with GENERIC, for consistency. 2007-01-01 15:36:16 +00:00
pavel 4e17ca0304 Explicitely configure zstty2 at zsc1. The corresponding /dev special file
is /dev/ttyB1 which has minor 2. If this serial port becomes zstty1,
/dev/ttyB1 becomes unusable because the minor number does not match. (The
problem was introduced when we started using the zstty(4) driver instead of
the scc(4) driver between NetBSD 1.6 and 2.0.)

Suggested by Bill Studenmund a long time ago.

Tested on DEC 3000 - 300LX and DEC 3000 - M600.
2007-01-01 15:32:34 +00:00
yamt 3f0f3de613 update comments on NFS_V2_ONLY after nqnfs removal. no functional changes.
from Arnaud Lacombe.
2006-12-29 21:49:03 +00:00
elad 504c71d9fe Make machdep scope architecture-agnostic by removing all arch-specific
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.
2006-12-26 10:43:43 +00:00
yamt 8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
tsutsui 5a004f99ec Reduce diffs between GENERIC and INSTALL. 2006-12-11 14:49:12 +00:00
tsutsui 6f7d423e1a Use "options<space><tab>" 2006-12-09 12:52:16 +00:00
tsutsui 8474274d47 Add the following network devices:
- pcn at pci
- wm at pci
- makphy at mii
- rgephy at mii
- rlphy at mii
2006-12-09 12:45:35 +00:00
tsutsui 8c797b13b0 Add pcn(4) at pci. Tested on AlphaPC164. 2006-12-09 04:50:56 +00:00
tsutsui 8687a698bd Add the following network devices:
- wm* at pci?
- makphy* at mii?
- rgephy* at mii?
- rlphy* at mii?
Tested with RTL8139C, RTL8169S-32, and i82544EI on EB164.
2006-12-04 17:33:41 +00:00
scw efb2b3439f Partition sizes are specified in terms of the physical sector size of the disk. 2006-11-25 13:09:14 +00:00
scw e07faf8a74 Replace the myriad copies of bounds_check_with_label() with a single MI
version.

Add disk_blocksize(9) so that disk drivers can record the physical
block size of a disk if it is different to DEV_BSIZE. Right now this
simply initialises dk_blkshift and dk_byteshift according to the
supplied block size. This information is used in the MI version of
bounds_check_with_label().
2006-11-25 11:59:55 +00:00
wiz 6919c6578c s/independant/independent/, from Zafer. 2006-11-24 22:04:21 +00:00
christos 1665d5e960 fix spelling of accommodate; from Zapher. 2006-11-24 19:46:58 +00:00
elad 4b316db1d1 Introduce KAUTH_REQ_MACHDEP_{ALPHA,X86}_UNMANAGEDMEM to handle access
to unmanaged memory.

These are the last two securelevel references in the MD code.
2006-11-22 12:12:51 +00:00
jmmv 7a13fe4abf Remove tmpfs's experimental status. OK'ed by core@. 2006-11-11 18:47:08 +00:00
mrg 648bbec934 in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev.  this occurs when we try to set the dumpdev to a device
with no driver loaded.  this fixes PR#34872.

in sys_swapctl, if bdevsw_lookup() fails, set dumpdev = NODEV
before calling cpu_dumpconf().  (this also fixes PR#34872.)

XXX: cpu_dumpconf() should probably be changed to take a dumpdev
XXX: and return an error in such cases, but that is a much more
XXX: intrusive change.

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
2006-10-21 05:54:31 +00:00
elad 26e2dfd17b PR/29274: Anders Hjalmarsson: MOP booting Alphaserver 2000 does not find
root device

Patch applied, thanks!
2006-10-07 18:04:38 +00:00
tnozaki 44eb8f042e fix gcc -Werror -Wmissing-braces problem
mbstate_t(this is opaque object)'s initializer should be ``{ 0 }'',
so changed 1st field of union from character array to integer.
2006-10-04 13:51:59 +00:00
chs e8295642bd remove MALLOC_NOINLINE, it doesn't do anything anymore. 2006-10-02 03:28:29 +00:00
elad bdc51baebb Adapt MD code to KAUTH_DEVICE_TTY_OPEN, batch #2 from Matt Fleming, thanks!
Also, add forgotten splx() calls in some places.
2006-10-01 19:28:43 +00:00
elad e8373398dc Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks! 2006-10-01 18:56:21 +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
elad 2f417d0f92 Oops! forgot "options" in previous commit. Pointed out by freza@, thanks! 2006-09-26 14:30:26 +00:00
elad 8b4adae65a Make PaX mprotect(2) restrictions more accessible.
On amd64, sparc64, i386, and alpha, they will be compiled in and disabled
by default. That means that to use them you either enable the "global"
knob with sysctl, or use paxctl(1) to enable it on a per-program basis.

On sparc and macppc just include a commentd out line in the GENERIC kernel.
2006-09-26 14:08:18 +00:00
plunky c4b4f61979 add bluetooth capability to alpha port 2006-09-14 18:08:06 +00:00
ad 6c8685b2d2 Use p_find(addr, PFIND_LOCKED) in case the proclist_lock is held. 2006-09-06 23:58:20 +00:00
bjh21 e10108c7f2 Nothing in the kernel now tests __HAVE_NWSCONS, so stop defining it everywhere. 2006-09-03 13:51:23 +00:00
dyoung 4e2fa34401 Delete ath, it is known to be broken on alpha. 2006-09-01 08:19:03 +00:00
dyoung 9079f579cb Add ath(4) to GENERIC alpha kernel. UNTESTED. 2006-09-01 04:58:17 +00:00
matt 2107a6af86 Don't include cpu_coredump unless the COREDUMP option is present. 2006-08-30 21:25:22 +00:00
he 4493c76313 Use the common <dev/sun/vuid_event.h> header file instead of maintaining
separate copies in port-specific directories.  Add duplicate include
protection.  Makes the alpha and atari ports build usr.bin/kdump/ again.
2006-08-28 16:41:04 +00:00
yamt e527ebac6f - remove unused bdbtofsb.
- move the following macros from MD headers to sys/param.h.
	ctod
	dtoc
	ctob
	btoc
	dbtob
	btodb
2006-08-28 13:43:35 +00:00
christos e0df1e4c51 PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
2006-08-26 20:26:43 +00:00
tsutsui 6ff205ce76 Remove obsolete #options VERIFIED_EXEC, found by grep(1). 2006-08-26 07:59:21 +00:00
skrll 1a3062e81b s/adpater/adapter/
Prompted by PR/34195
2006-08-14 06:22:33 +00:00
christos b300b74469 Disable SYSTRACE by default on all kernels (discussed with core) 2006-08-12 15:29:52 +00:00
hubertf ded0447fa8 spc(4) can also attach to pcmcia(4), as was already in hpcmips/GENERIC
for quite some time. Add it to all systems that have pcmcia SCSI.

Pointed out by Björn Johannesson <rherdware@yahoo.com> in private mail,
OK'd by matt@
2006-07-31 23:29:54 +00:00
ad d8360081f7 Remove RASTERCONSOLE support from the pmax port. 2006-07-29 19:10:56 +00:00
drochner 84f50d1b92 don't install <machine/db_machdep.h>, this is kernel only 2006-07-26 19:54:56 +00:00
cube cad5e9a56c Remove "atapibus* at umass?" and "scsibus* at umass?" when there is
already an attachment to the interface attribute (atapi and scsi).

Part of PR#34085, although it is the contrary to what the submitter
suggests (which shows that having both in a config file can be confusing).
2006-07-26 07:00:23 +00:00
ad f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
ad 2b79369c7e - Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
2006-07-19 21:11:37 +00:00
gdamore 34537908ab Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@.  Fixes PR port-evbmips/32362.
2006-07-13 22:56:00 +00:00
liamjfoy aeee5deab9 Add CARP to GENERIC kernel configs. CARP is not enabled by default.
ok: christos
2006-06-28 15:19:27 +00:00
mrg 13f78de634 add NULLFS and re(4) (both tested.) 2006-05-22 07:20:18 +00:00
drochner b5a3ca8ded remove a typecast in a macro which is used on the LHS. gcc4 doesn't like it 2006-05-17 21:35:45 +00:00
drochner 8c3c619453 Define some fixed bus addresses as "Unsigned Long" instead of
"Long Long" -- gcc4 propagates the "long long" along the way and
complains about mismatches to "long".
This is the same on alpha, but the conflict is unnecessary, so avoid it.
2006-05-17 21:32:59 +00:00
yamt e30daee789 - include kauth.h for kauth_cred_geteuid.
- tweak indent for a long line.
2006-05-15 09:32:15 +00:00
elad 8ccb6c9341 integrate kauth. 2006-05-14 21:55:09 +00:00
skrll 76425eeda5 ANSIfy startlwp 2006-05-10 10:26:40 +00:00
skrll dfd91121ef Add KERNEL_PROC_UNLOCK(l) before userret in startlwp. 2006-05-10 10:04:14 +00:00
skrll a9f4c28a3d Fix a bunch of cast lvalues. 2006-05-10 06:24:02 +00:00
drochner d50e999b43 fix typo in comment 2006-05-02 18:04:53 +00:00
thorpej b2bea1ed90 Static'ify. 2006-04-02 03:41:32 +00:00
cherry d600e81a73 closes: PR kern/32359
modifies machine/db_machdep.h: BKPT_SET(inst) to BKPT_SET(inst, addr) for all archs ie; passess the
breakpoint address as well.

Patch from cherry@mahiti.org
2006-04-01 15:44:58 +00:00
pavel dc1372c547 Add stf to all kernel configs which have INET6 and gif, except the INSTALL
ones and those for specific machines of developers. PR 32304.

OK'ed by rpaulo.

N.B. stf is a cloning device, so it still must be enabled by
"ifconfig stf0 create".
2006-03-28 20:58:39 +00:00
thorpej 21374641a5 Use device_unit(). 2006-03-26 04:32:33 +00:00
drochner 47fbb9d86b adapt to uvm_fault() interface cleanup: kill the useless 3rd argument 2006-03-15 18:12:02 +00:00
thorpej 61dd49d3bc Syscall debug tracing is handled by trace_enter() / trace_exit(). Change
trace_is_enabled() to return TRUE if SYSCALL_DEBUG is defined, and g/c
all of the SYSCALL_DEBUG handling from individual system call dispatch
routines.
2006-03-07 07:21:50 +00:00
thorpej be8b235384 Clean up fallout proc_is_traced_p() change:
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
  trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
  about KTRACE and SYSTRACE, but do no more.
2006-03-07 03:32:04 +00:00
christos beea4fc3fa Add a proc_is_traced_p() macro and use it, instead of copying the same code
in many places. Idea from thorpej.
2006-03-05 19:08:38 +00:00
christos a4495f4cec implement PT_SYSCALL 2006-03-05 07:21:37 +00:00
yamt ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
he 5c8819cf0b Fix one more missing double quote. 2006-02-26 21:50:49 +00:00
he 016de84c5b Insert an obviously missing double quote. 2006-02-26 21:42:16 +00:00
thorpej a1050c527b Use device_is_a(). 2006-02-25 17:32:43 +00:00
thorpej 458b3e43f7 Use device_parent(). 2006-02-23 05:37:46 +00:00
drochner 9c6a0cdbbd don't bother to figure out whether a page was not mapped at all or mapped
with too little permission (physically) on a fault -- uvm knows better
2006-02-22 22:11:44 +00:00
perry fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
mhitch dca4768842 Bad Jason! Fix interrupt event counter attach typo. Only the last interrupt
was getting an event counter, and none of the dec_6600 interrupts were
getting counted.
2006-02-16 04:48:50 +00:00
cube 6ff13154dd Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
2006-02-05 05:01:48 +00:00
rpaulo 21c1d240bc bpfilter doesn't accept count anymore. 2006-02-04 02:31:12 +00:00
reinoud a92fdbbc53 Add commented out UDF file-system entry in all GENERIC configurations. 2006-02-02 21:32:08 +00:00
christos 606bb2caed free -> dealloc
unsigned -> size_t for alloc/dealloc
2006-01-25 18:28:25 +00:00
christos 3ffa241fcd Add a STRONG_ALIAS macro 2006-01-20 22:02:40 +00:00
christos a26b31d72e PR/32502: Anders Hjalmarsson: profiling (ticks) is broken on alpha 2006-01-12 00:30:59 +00:00
perry 2d542ba1f8 inline -> __inline 2005-12-28 19:09:29 +00:00
perry 2d65de2479 bare asm -> __asm 2005-12-24 22:45:33 +00:00
perry f2bc845517 __inline__ -> inline 2005-12-24 21:44:28 +00:00
perry 5f1c88d70d Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:06:46 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
elad 4591e5acfd Add (commented out) Veriexec options and pseudo-device to GENERIC kernels,
and remove the i386 GENERIC_VERIEXEC config.
2005-12-09 23:34:01 +00:00
tsutsui 2a32b6081e Remove obsolete options VNODE_OP_NOINLINE. 2005-12-07 12:40:46 +00:00
tsutsui ff9b47d69e Adjust comments for options FFS_NO_SNAPSHOT.
XXX: This option should be mentioned in options(4).
2005-12-07 09:10:11 +00:00
thorpej cfc81086d9 swcr -> swcrypto 2005-11-25 16:41:31 +00:00
thorpej 7385cdd346 "pseudo-device crypto" really refers to the /dev/crypto API to the
opencrypto framework, not the framework itself.  Update the comment
accordingly.
2005-11-25 16:35:11 +00:00
thorpej 751f32db24 Add "pseudo-device swcr" (commented out if "pseudo-device crypto" is also
commented out).
2005-11-25 16:30:23 +00:00
yamt bc21da4cfb bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
2005-11-24 13:08:32 +00:00
chs 59fddeceaa turn off DEBUG and DIAGNOSTIC in GENERIC kernels so that they
are compatible with the LKMs that are part of the release.
2005-11-03 16:48:29 +00:00
yamt 06085e8f52 - use sys/spl.h.
- add some IPL_ definitions.
2005-11-03 13:06:06 +00:00
yamt fd96f3e9ea pull splraiseipl() from newlock branch. 2005-10-29 14:38:51 +00:00
heas bfceed8072 Add major for twe(4), so that management applications have a /dev entry to use. 2005-10-14 22:02:42 +00:00