Commit Graph

75 Commits

Author SHA1 Message Date
jhb
dc2e474f79 Change the suser() API to take advantage of td_ucred as well as do a
general cleanup of the API.  The entire API now consists of two functions
similar to the pre-KSE API.  The suser() function takes a thread pointer
as its only argument.  The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0.  The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.

Discussed on:	smp@
2002-04-01 21:31:13 +00:00
obrien
a11b0bc7ef Remove __P(). This was tested on the GENERIC kernel. 2002-03-20 18:58:47 +00:00
mjacob
e4e00ab288 Make it compile again. 2002-03-01 23:15:45 +00:00
jhb
2463f40fc3 Introduce a standard name for the lock protecting an interrupt controller
and it's associated state variables: icu_lock with the name "icu".  This
renames the imen_mtx for x86 SMP, but also uses the lock to protect
access to the 8259 PIC on x86 UP.  This also adds an appropriate lock to
the various Alpha chipsets which fixes problems with Alpha SMP machines
dropping interrupts with an SMP kernel.
2001-12-20 23:48:31 +00:00
phk
0097e8b5ad Don't call cdevsw_add(). 2001-11-04 11:50:08 +00:00
jlemon
86a48bed45 cn_tab no longer exists, use cnadd() to add a console device. Note that
this may result in duplicate console output in some cases.
2001-10-24 18:30:05 +00:00
jhb
d0bdf2ae5d Remove unneeded sys/mutex.h includes. 2001-10-19 19:23:32 +00:00
mjacob
61923fecdf remove unused variable declaration 2001-10-11 21:47:27 +00:00
julian
5596676e6c KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
mjacob
7965e326b3 Old business: some SMP support. 2001-08-15 17:23:22 +00:00
gallatin
97d9e6d553 fix alpha-MD compile errors after the vm_mtx commit 2001-05-20 16:22:46 +00:00
mjacob
a9f3e2fac8 The new order of things is that dwlpxN is now called pcibN- so hack around
*that* whilst we ponder the best way to decide how to register dwlpx interrupts
with TLSB.
2001-05-10 07:08:03 +00:00
mjacob
d739b2bcb9 add alpha_pci_route_interrupt method 2001-05-10 06:52:56 +00:00
phk
c47745e977 Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
jhb
4444722abe Use the MI ithread helper functions in the alpha hardware interrupt code. 2001-02-09 17:53:23 +00:00
alfred
663be26bfa remove unneded sys/ucred.h includes 2000-11-30 18:52:32 +00:00
jhb
af87892726 Pass in the new-bus flags to alpha_setup_intr(). 2000-11-01 18:40:42 +00:00
jhb
71938e9fcd - Heavyweight interrupt threads on the alpha for device I/O interrupts.
- Make softinterrupts (SWI's) almost completely MI, and divorce them
  completely from the x86 hardware interrupt code.
  - The ihandlers array is now gone.  Instead, there is a MI shandlers array
    that just contains SWI handlers.
  - Most of the former machine/ipl.h files have moved to a new sys/ipl.h.
- Stub out all the spl*() functions on all architectures.

Submitted by:	dfr
2000-10-05 23:09:57 +00:00
dfr
dd8b44b395 * Completely rewrite the alpha busspace to hide the implementation from
the drivers.
* Remove legacy inx/outx support from chipset and replace with macros
  which call busspace.
* Rework pci config accesses to route through the pcib device instead of
  calling a MD function directly.

With these changes it is possible to cleanly support machines which have
more than one independantly numbered PCI busses. As a bonus, the new
busspace implementation should be measurably faster than the old one.
2000-08-28 21:48:13 +00:00
mjacob
4175feb6ac Do the same thing for TurboLaser that was done for Rawhide- make room
for secondary (bridged) PCI busses by making primary PCI instances
16 units apart.
2000-07-10 02:40:49 +00:00
peter
22f6069a2a Add $FreeBSD$ 2000-05-01 20:32:07 +00:00
mjacob
dc393630a7 It's the parent that is a CPU node- not GBus itself. 2000-03-27 08:22:23 +00:00
mjacob
b17700648d complain when you do not create a TLSB node 2000-03-27 08:20:44 +00:00
mjacob
3e368a3368 Alpha 8200: Reinsert licence from NetBSD that should have been there
to begin with. Redo newbus attachment code so that all the DMA mapping
and further pci attachment is done right. Insert config space functions
(jeez- how do you do type 1 cycles?). Do the interrupt setups, etc.
Basically, this is the core I/O module for 8200s, even though logically
it's the 3rd level down from the nominal principle backplane bus
(turbolaser). Still to be done here: S/G code isn't done yet, so we
better live with 2GB or less primary memory.
2000-03-18 07:54:11 +00:00
mjacob
0f58b4a728 Alpha 8200: Remove clause 3 of licence. Clean up code slightly. 2000-03-18 07:50:58 +00:00
mjacob
47eb9b40b9 Alpha 8200: Remove clause 3 of licence. Redo KFTXX bus attachment
code (merge in progress made in NetBSD since the initial import to
FreeBSD). Create dwlpx as the child device. Of course, if we had
more h/w and time, we could find out whether the child device was
a FutureBus module, etc...Anyone ever actually seen one?
2000-03-18 07:49:53 +00:00
mjacob
698a74f5c8 Alpha 8200: Remove clause 3 of licence and and some KFTXX defines. 2000-03-18 07:48:15 +00:00
mjacob
d9802b7c62 Alpha 8200: minor formatting tweaks; removal of clause 3 of licence. 2000-03-18 07:46:34 +00:00
mjacob
a3bf492b1a Alpha 8200: Rework to get working properly with real h/w. This isn't a
clean MI/MD driver, but it *does* actually work at this time. Updated
to use new make_dev stuff. A CONS_DRIVER declaration is also put in
so that this can be the real console for the 8200s.
2000-03-18 07:46:05 +00:00
mjacob
f6538420c6 Alpha 8200: Ooops on last delta- real changes include redoing bus attachment
code and interrupt mapping code.
2000-03-18 07:44:18 +00:00
mjacob
1de0f61bdd Alpha 8200: Some minor formatting tweaks and removal of clause 3 of licence. 2000-03-18 07:42:13 +00:00
mjacob
0b099e7dbd Alpha 8200: add a dummy driver for TLSB CPU nodes. Not so dummy, actually,
as you have to hook a GBus into it.
2000-03-18 07:40:17 +00:00
mjacob
b3742ecec0 Alpha 8200: Add in variables and defines for DWLPX PCI controllers. 2000-03-18 07:30:06 +00:00
mjacob
5ae2a3d0d5 Alpha8200: Update this stub memory board driver for using newbus. 2000-03-18 07:28:27 +00:00
mjacob
1428bfa051 update copyright 2000-01-29 17:23:41 +00:00
mjacob
eb4cc7eefa Wrong patch had been applied. 2000-01-29 16:57:03 +00:00
mjacob
db5f0c8dcf Update copyright and pull some newer definitions from NetBSD version. 2000-01-29 16:41:08 +00:00
mjacob
32980fbceb Put tslb_device structure in this file. Put a pointer to to primary
CPU's structure.
2000-01-29 16:40:17 +00:00
mjacob
c9c14d15b4 Clean up some compilation warnings and errors. 2000-01-29 16:39:21 +00:00
mdodd
87e31f4b90 Remove the 'ivars' arguement to device_add_child() and
device_add_child_ordered().  'ivars' may now be set using the
device_set_ivars() function.

This makes it easier for us to change how arbitrary data structures are
associated with a device_t.  Eventually we won't be modifying device_t
to add additional pointers for ivars, softc data etc.

Despite my best efforts I've probably forgotten something so let me know
if this breaks anything.  I've been running with this change for months
and its been quite involved actually isolating all the changes from
the rest of the local changes in my tree.

Reviewed by:	peter, dfr
1999-12-03 08:41:24 +00:00
peter
76de652082 Move Alpha conflicting entries (98,99) to 135,136. Renumber the zsc
CDEV_MAJOR entry to match..  Is "ipr" in the tree?  I can't find it.
1999-11-18 04:20:23 +00:00
peter
5b37dfdd4b Take a shot at using cdevsw_add() to get it working again. This really
needs to use make_dev().
1999-11-08 07:51:28 +00:00
n_hibma
279ad30025 Removal of sys/device.h
- Move intrhook stuff into kernel.h
- Remove all occurrences of #device <device.h>
- Add kernel.h were necessary (nowhere)
- delete device.h

This file contained the structures for cfdata (old style config) and is no
longer used. It was included by most drivers.

It confuses the remote debugger as the definition of 'struct device' in
device.h is found before the one in bus_private.h.
1999-10-05 21:19:41 +00:00
phk
5e9f92ecf7 Introduce ttyread() and ttywrite() which do the canonical thing.
Use them in many tty drivers.

Reviewed by: julian, bde
1999-09-28 11:45:31 +00:00
phk
e9e0512210 Remove five now unused fields from struct cdevsw. They should never
have been there in the first place.  A GENERIC kernel shrinks almost 1k.

Add a slightly different safetybelt under nostop for tty drivers.

Add some missing FreeBSD tags
1999-09-25 18:24:47 +00:00
phk
a2c68c62db This patch clears the way for removing a number of tty related
fields in struct cdevsw:

        d_stop          moved to struct tty.
        d_reset         already unused.
        d_devtotty      linkage now provided by dev_t->si_tty.

These fields will be removed from struct cdevsw together with
d_params and d_maxio Real Soon Now.

The changes in this patch consist of:

        initialize dev->si_tty in *_open()
        initialize tty->t_stop
        remove devtotty functions
        rename ttpoll to ttypoll
        a few adjustments to these changes in the generic code
        a bump of __FreeBSD_version
        add a couple of FreeBSD tags
1999-09-25 16:21:39 +00:00
peter
106843003d $Id$ -> $FreeBSD$ (some mangled and/or hidden ones) 1999-08-28 02:21:15 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
phk
ee871b6440 Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.
1999-08-09 10:35:05 +00:00
mdodd
1b3328c300 Alter the behavior of sys/kern/subr_bus.c:device_print_child()
- device_print_child() either lets the BUS_PRINT_CHILD
	  method produce the entire device announcement message or
	  it prints "foo0: not found\n"

Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on
the previous behavior of device_print_child() (printing the
"foo0: <FooDevice 1.1>" bit of the announce message.)

Provide bus_print_child_header() and bus_print_child_footer()
to actually print the output for bus_generic_print_child().
These functions should be used whenever possible (unless you can
just use bus_generic_print_child())

The BUS_PRINT_CHILD method now returns int instead of void.

Modify everything else that defines or uses a BUS_PRINT_CHILD
method to comply with the above changes.

	- Devices are 'on' a bus, not 'at' it.
	- If a custom BUS_PRINT_CHILD method does the same thing
	  as bus_generic_print_child(), use bus_generic_print_child()
	- Use device_get_nameunit() instead of both
	  device_get_name() and device_get_unit()
	- All BUS_PRINT_CHILD methods return the number of
	  characters output.

Reviewed by: dfr, peter
1999-07-29 01:03:04 +00:00