dragonfly.git
14 years agoremove getdec() declaration, since this static function no longer exists or
Sepherosa Ziehau [Thu, 27 Oct 2005 14:03:56 +0000 (14:03 +0000)]
remove getdec() declaration, since this static function no longer exists or
is used in the file

14 years agoKill most of the "unused variable" warning
Sepherosa Ziehau [Thu, 27 Oct 2005 13:33:19 +0000 (13:33 +0000)]
Kill most of the "unused variable" warning

# The only survivor is in dev/acpica5/Osd/OsdSynch.c:AcpiOsDeleteSemaphore()

14 years agobug fixing:
Sepherosa Ziehau [Thu, 27 Oct 2005 03:51:55 +0000 (03:51 +0000)]
bug fixing:
BUS_SPACE_MAXADDR_32BIT should be the low address, while high address should
be BUS_SPACE_MAXADDR

14 years ago- convert {set, fill}_??regs() and ptrace_single_step() API to taking
Sepherosa Ziehau [Thu, 27 Oct 2005 03:15:47 +0000 (03:15 +0000)]
- convert {set, fill}_??regs() and ptrace_single_step() API to taking
  struct lwp instead of struct proc, change their caller accordingly
- in i386/include/md_var.h, add forward declaration of struct lwp and eliminate
  the no longer needed forward declaration of struct proc
- in i386/include/reg.h, add forward declaration of struct lwp and struct proc
- minor style and white space changes

Requested-and-Reviewed-by: corecode
14 years agoIncrease the MSGBUF_SIZE from 32K to 64K, boot verbose messages don't
Matthew Dillon [Thu, 27 Oct 2005 00:07:17 +0000 (00:07 +0000)]
Increase the MSGBUF_SIZE from 32K to 64K, boot verbose messages don't
fit in 32K anymore.

14 years agoAdd a redundant double-check in ffs_reallocblks and assert that the number
Matthew Dillon [Wed, 26 Oct 2005 17:15:03 +0000 (17:15 +0000)]
Add a redundant double-check in ffs_reallocblks and assert that the number
of blockmaps in the span does not exceed 2.

14 years agoAssert that the vnode is locked when modifying an inode inside ffs_balloc.
Matthew Dillon [Wed, 26 Oct 2005 17:13:40 +0000 (17:13 +0000)]
Assert that the vnode is locked when modifying an inode inside ffs_balloc.

14 years agoFix a bug in the ppbus code where an interrupt cookie might be torn down
Matthew Dillon [Wed, 26 Oct 2005 17:12:32 +0000 (17:12 +0000)]
Fix a bug in the ppbus code where an interrupt cookie might be torn down
twice.  This didn't matter before when cookies were tested against a
list, but it matters now that they are treated as pointers to interrupt
descriptors.

14 years agoWe have INTR_ENTROPY in sys/bus.h for ~20 months
Sepherosa Ziehau [Wed, 26 Oct 2005 14:19:08 +0000 (14:19 +0000)]
We have INTR_ENTROPY in sys/bus.h for ~20 months
This shuts up /dev/raid/twe/{twe.c, twe_freebsd.c} compile time gcc warning

14 years agoadd forward declaration to shut up dev/usbmisc/umass/umass.c compile time
Sepherosa Ziehau [Wed, 26 Oct 2005 13:59:41 +0000 (13:59 +0000)]
add forward declaration to shut up dev/usbmisc/umass/umass.c compile time
gcc warning

14 years agounbreak kernel building by
Sepherosa Ziehau [Wed, 26 Oct 2005 10:46:45 +0000 (10:46 +0000)]
unbreak kernel building by
- add arg2 to logipiq()
- adjust caller of logipiq()

14 years agoFix a long-standing bug in the livelock code. An interrupt thread normally
Matthew Dillon [Wed, 26 Oct 2005 01:16:04 +0000 (01:16 +0000)]
Fix a long-standing bug in the livelock code.  An interrupt thread normally
unmasks the hardware interrupt source when it is through.  However, if a
livelock occurs the interrupt thread may be polled long after a device has
terminated operations and torn down its interrupt.  To solve this problem,
only unmask the hardware interrupt if the IRQ still has device handlers
installed.  This fixes a weird problem with the parallel port driver
(which installs and tears-down IRQ 7 on each write() for some unfathomable
reason).

14 years agoRedo the interrupt livelock code. Simplify the frequency calculations
Matthew Dillon [Wed, 26 Oct 2005 00:55:20 +0000 (00:55 +0000)]
Redo the interrupt livelock code.  Simplify the frequency calculations
and add a 1-second stabilization requirement before a livelock is removed.
Fix a bug that prevented the code from actually limiting the interrupt rate
properly.

Greatly simplify ithread_done() and rename it to ithread_unmask().  It is
no longer responsible for putting the interrupt thread to sleep.

There is one issue left and that is the livelock code must re-enable the
interrupt at the limit frequency in order to detect when the actual
interrupt rate falls below the low water mark.  In a livelocked situation
the actual interrupt rate will be about 2x the livelock limit because
both the systimer interrupt and the livelocked interrupt will be running.

14 years agoTemporary hack until corecode can fix it. There is a p_rtprio and also
Matthew Dillon [Wed, 26 Oct 2005 00:47:17 +0000 (00:47 +0000)]
Temporary hack until corecode can fix it.  There is a p_rtprio and also
a lwp_rtprio.  The scheduler was using lwp_rtprio but proc0 only initialized
p_rtprio, so all processes wound up with RTP_PRIO_REALTIME instead of
RTP_PRIO_NORMAL.  This basically turned off the estcpu priority code and
made all runnable processes round robin equally.

14 years agoRemove the dummy IPI messaging routines for UP builds and properly
Matthew Dillon [Tue, 25 Oct 2005 17:26:58 +0000 (17:26 +0000)]
Remove the dummy IPI messaging routines for UP builds and properly
conditionalize the use of IPI messages in various core kernel modules.

Change the callback from func(arg, frameptr) to func(arg1, arg2, frameptr),
where the new argument (arg2) is an integer supplied by the originator.

Create wrappers for simpler versions of the callback: func(arg1), and
func(arg1, arg2) (for the moment we presume that GCC will generate code
for the full-sized three-argument callback which is compatible with one
and two-argument function pointers).

This extension to the IPI messaging code is needed to properly implement
MP-safe tsleep/wakeup code.  Although the extra argument is superfluous in
most cases, the overhead of doing an IPI is such that there should be no
noticeable impact on performance.

14 years agoMake usleep as a cancellation point.
David Xu [Tue, 25 Oct 2005 12:14:52 +0000 (12:14 +0000)]
Make usleep as a cancellation point.

14 years agoMake usleep as a weak symbol, so thread library can override it.
David Xu [Tue, 25 Oct 2005 12:14:15 +0000 (12:14 +0000)]
Make usleep as a weak symbol, so thread library can override it.

14 years agoExport following functions:
David Xu [Mon, 24 Oct 2005 23:59:21 +0000 (23:59 +0000)]
Export following functions:
_pthread_mutexattr_setpshared
_pthread_mutexattr_getpshared
pthread_mutexattr_setpshared
pthread_mutexattr_getpshared

14 years agoAdd pthread_mutexattr_setpshared and pthread_mutexattr_getpshared.
David Xu [Mon, 24 Oct 2005 23:58:01 +0000 (23:58 +0000)]
Add pthread_mutexattr_setpshared and pthread_mutexattr_getpshared.

14 years agoBack out last change since Matt has issues will it. Will reimplement it using
Eirik Nygaard [Mon, 24 Oct 2005 22:31:35 +0000 (22:31 +0000)]
Back out last change since Matt has issues will it. Will reimplement it using
his ideas.

14 years agoMake wakeup, tsleep and friends MP-safe.
Eirik Nygaard [Mon, 24 Oct 2005 21:57:55 +0000 (21:57 +0000)]
Make wakeup, tsleep and friends MP-safe.

Reviewed by: hsu

14 years agoAdd a missing BUF_UNLOCK in the last commit.
Matthew Dillon [Mon, 24 Oct 2005 20:12:11 +0000 (20:12 +0000)]
Add a missing BUF_UNLOCK in the last commit.

14 years agoAvoid a recursive kernel fault and subsequent double fault if the VM fault
Matthew Dillon [Mon, 24 Oct 2005 20:02:09 +0000 (20:02 +0000)]
Avoid a recursive kernel fault and subsequent double fault if the VM fault
code gets a KVM map_entry with a NULL object.  Such entries exist in system
maps managed directly by the kernel, such as the buffer cache and kernel_map.
Instead, we check for the condition and panic immediately.  Programs which
access /dev/[k]mem can hit this race/failure.

Reported-by: =?ISO-8859-1?Q?Stefan_Kr=FCger?= <skrueger@meinberlikomm.de>
14 years agoTemporarily work around a race in the kernel. The kernel does a sanity check
Matthew Dillon [Mon, 24 Oct 2005 19:59:51 +0000 (19:59 +0000)]
Temporarily work around a race in the kernel.  The kernel does a sanity check
on the KVM memory range read via /dev/[k]mem.  However, if the user buffer
takes a VM fault and blocks the process, the related kernel memory could
become invalid while the process was blocked.  Try to avoid taking faults on
the user buffer by touching it first.

Reported-by: =?ISO-8859-1?Q?Stefan_Kr=FCger?= <skrueger@meinberlikomm.de>
14 years agoDocument kern.emergency_intr_{enable,freq} in loader.8.
Matthew Dillon [Mon, 24 Oct 2005 18:01:30 +0000 (18:01 +0000)]
Document kern.emergency_intr_{enable,freq} in loader.8.

14 years agoAdd two checks for potential buffer cache races.
Matthew Dillon [Mon, 24 Oct 2005 17:14:04 +0000 (17:14 +0000)]
Add two checks for potential buffer cache races.

"Warning buffer %p (vp %p lblkno %d) was recycled"
    Occurs if a buffer is recycled unexpectedly.  The code will print this
    warning and retry if it detects the case.

"Warning invalid buffer %p (vp %p lblkno %d) did not have cleared b_blkno cache"
    Occurs if a B_INVAL buffer's b_blkno cache has not been reset.  The
    code will reset the cache if it detects this case.

14 years agoPass mii_attach_args to mii_softc_init() rather then initializing the softc's
Matthew Dillon [Mon, 24 Oct 2005 16:55:40 +0000 (16:55 +0000)]
Pass mii_attach_args to mii_softc_init() rather then initializing the softc's
attach-args-related fields manually in each custom driver.  Have
mii_softc_init() automatically merge mii_attach_args->mii_flags into
mii_softc->mii_flags.

14 years agoAdd an mii_flags field to the attach arguments, to make it easier to create
Matthew Dillon [Mon, 24 Oct 2005 16:45:19 +0000 (16:45 +0000)]
Add an mii_flags field to the attach arguments, to make it easier to create
custom MII drivers without having to duplicate all of the generic
attach/detach code.

Add a simplified custom driver for nvidia/marvell which simply sets the
flag which allows the generic mii code to probe for GiGE.

14 years agoOnly check GiGE related flags in the generic code when MIIF_IS_1000X is set
Matthew Dillon [Mon, 24 Oct 2005 15:55:32 +0000 (15:55 +0000)]
Only check GiGE related flags in the generic code when MIIF_IS_1000X is set
in mii_softc->mii_flags.  This really only effects the generic MII code, as
the flags for GigE may not be compatible with all devices (such as xl(4)).

Change the mii_add_media() API to pass mii_softc instead of mii_data, and
derive the instance id from the softc instead of passing it.

Reported-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years ago- Move DEVICE_POLLING from opt_global.h to opt_polling.h(newly added),
Sepherosa Ziehau [Mon, 24 Oct 2005 08:06:16 +0000 (08:06 +0000)]
- Move DEVICE_POLLING from opt_global.h to opt_polling.h(newly added),
  so that polling(4) can be enabled in modules that are not built
  during kernel building
- Add opt_polling.h to files that depend on DEVICE_POLLING
- Change related netif modules' Makefile to enable polling(4) support
- Add comment in net/if_var.h to prevent DEVICE_POLLING related
  incompatibilities from being introduced
Suggested-by: dillon
NOTE: As of this commit, any file that will depend on DEVICE_POLLING
      *must* include opt_polling.h at its beginning

With-helps-from: joerg
Reviewed-by: dillon, submit@
14 years agoUnbreak vmstat by using sysctl instead of kvm.
Simon Schubert [Sat, 22 Oct 2005 04:06:53 +0000 (04:06 +0000)]
Unbreak vmstat by using sysctl instead of kvm.

14 years agoAdd 'shutdown' keyword to save mixer settings upon system shutdown
Sascha Wildner [Fri, 21 Oct 2005 17:44:37 +0000 (17:44 +0000)]
Add 'shutdown' keyword to save mixer settings upon system shutdown
if 'mixer_enable' is set in rc.conf.

14 years agoUpgrade rc.shutdown to FreeBSD's rev. 1.25. This is from
Sascha Wildner [Fri, 21 Oct 2005 17:41:20 +0000 (17:41 +0000)]
Upgrade rc.shutdown to FreeBSD's rev. 1.25. This is from
FreeBSD 5.2.1 which seems to be the stage of the majority
of our RCNG scripts.

RCNG scripts having the 'shutdown' keyword should properly
shut down now. Note that processing of the 'local_startup'
directories is "moved" to rc.d/localdaemons by this commit.

14 years ago- polling(4) support
Sepherosa Ziehau [Fri, 21 Oct 2005 06:42:43 +0000 (06:42 +0000)]
- polling(4) support
- minor style adjust

14 years agoOops, fix the polling enable name, it's supposed to be kern.polling.enable,
Matthew Dillon [Thu, 20 Oct 2005 15:54:55 +0000 (15:54 +0000)]
Oops, fix the polling enable name, it's supposed to be kern.polling.enable,
not kern.polling.polling.

Reported-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years agoAvoid text-relocations, binutils don't like them on AMD64.
Joerg Sonnenberger [Wed, 19 Oct 2005 16:54:25 +0000 (16:54 +0000)]
Avoid text-relocations, binutils don't like them on AMD64.

14 years agoChange kqueue_scan() interface to take "thread" instead of "proc", because
Sepherosa Ziehau [Wed, 19 Oct 2005 07:51:42 +0000 (07:51 +0000)]
Change kqueue_scan() interface to take "thread" instead of "proc", because
kqueue_scan() does not access any fields of "proc" other than "p_thread"

14 years agoFix wrong '/etc/rmt' and '/etc/termcap' symlinks created by
Sascha Wildner [Wed, 19 Oct 2005 05:18:36 +0000 (05:18 +0000)]
Fix wrong '/etc/rmt' and '/etc/termcap' symlinks created by
'make upgrade'.

14 years agoAdjust comment on DEVICE_POLLING option.
Sepherosa Ziehau [Tue, 18 Oct 2005 15:31:10 +0000 (15:31 +0000)]
Adjust comment on DEVICE_POLLING option.

Reminded-by: Justin C. Sherrill <justin at shiningsilence.com>
14 years agoAdd brief comment on DEVICE_POLLING option. This comment is taken from LINT
Sepherosa Ziehau [Tue, 18 Oct 2005 15:19:03 +0000 (15:19 +0000)]
Add brief comment on DEVICE_POLLING option.  This comment is taken from LINT

Requested-by: Justin C. Sherrill <justin at shiningsilence.com>
14 years agoadd DEVICE_POLLING option
Sepherosa Ziehau [Mon, 17 Oct 2005 06:31:23 +0000 (06:31 +0000)]
add DEVICE_POLLING option

Approved-by: dillon
14 years agoSync with FreeBSD dev/em
Sepherosa Ziehau [Mon, 17 Oct 2005 06:18:36 +0000 (06:18 +0000)]
Sync with FreeBSD dev/em

if_em.c rev 1.2.2.{20,21,22} 1.47 1.63
if_em.h rev 1.1.2.17
if_em_hw.c rev 1.1.2.12
if_em_hw.h rev 1.1.2.12

- Add support for Intel PRO/1000 GT Desktop Adapter
- Add support for Intel 82546GB dual port PCIE adapter
- Add fix for 82547 which corrects an issue with Jumbo frames larger than 10k
- Add fix for vlan tagged frames not being properly bridged
- Correct TBI workaround
- Correct LED operation issues
- Do not count RNBC (internal buffer full) towards the RX error count,
  since it's not really an error
- Correct a workaround that should only be applied to one adapter.  Workaround
  was causing device hangs when incorrectly applied to other adapters (*)
- Run em_local_timer() once per second instead of running it once per 2 seconds.
  This makes gathering of stats more precise

(*) Detailed problem description is in FreeBSD's PR kern/66634

14 years agoDo a run through of the fragment allocation and freeing code, documenting
Matthew Dillon [Sun, 16 Oct 2005 18:48:36 +0000 (18:48 +0000)]
Do a run through of the fragment allocation and freeing code, documenting
as I go.  Add a KKASSERT() for one test that I wasn't sure about but
otherwise make no operational changes.

14 years agoOnly resynchronize the RTC on shutdown if we had previously loaded it and
Matthew Dillon [Sat, 15 Oct 2005 21:03:24 +0000 (21:03 +0000)]
Only resynchronize the RTC on shutdown if we had previously loaded it and
we are not in a panic.  This prevents early failures and panics from
writing a bad time back into the RTC.

14 years agoMPTable fixup for Shuttle XPC with an AMD Athlon X2 - there is no entry
Matthew Dillon [Sat, 15 Oct 2005 19:55:16 +0000 (19:55 +0000)]
MPTable fixup for Shuttle XPC with an AMD Athlon X2 - there is no entry
for IRQ 15, preventing ata1 (typically the CD) from operating properly.
Note that the ACPI table has an ISA entry for both IRQ 14 and IRQ 15.

14 years agoUse nlink_t for number of links.
Sascha Wildner [Sat, 15 Oct 2005 19:09:17 +0000 (19:09 +0000)]
Use nlink_t for number of links.

14 years agoDisplay all IOAPIC pin assignments when bootverbose is specified, not
Matthew Dillon [Sat, 15 Oct 2005 18:50:08 +0000 (18:50 +0000)]
Display all IOAPIC pin assignments when bootverbose is specified, not
just the PCI assignments.

14 years agoImplement an emergency interrupt polling feature. When enabled, most
Matthew Dillon [Sat, 15 Oct 2005 03:23:01 +0000 (03:23 +0000)]
Implement an emergency interrupt polling feature.  When enabled, most
interrupt handlers installed on the system will be polled at the specified
frequency.  The exceptions are the 8254 clock and ATA interrupts (ATA can
blow up if it gets a fake interrupt, and the 8254 needs to work for systimers
to work which the poller is based on).  These variables may be specified
in /boot/loader.conf and/or adjusted on a live system with sysctl.

kern.emergency_intr_enable (default 0 = off)
kern.emergency_intr_freq (default 10 = 10 hz)

THIS FEATURE IS NOT DESIGNED TO BE USED ON PRODUCTION SYSTEMS.  It should be
used only for kernel development, debugging, and testing, to get devices to
work that would otherwise not work due to messed up interrupt routing, or if
you have no other choice.  This feature has VERY HIGH OVERHEAD, as a dozen or
more service routines may be called on each tick.  The feature can be
life-safer e.g. on machines that would otherwise not work at all with
DragonFly, to get them working well enough that they can communicate with
the outside world.  As mentioned already, the primary use of this feature
is to aid in kernel development.

14 years agoBring another softupdates fix in from FreeBSD, FreeBSD commit message:
Matthew Dillon [Fri, 14 Oct 2005 23:45:59 +0000 (23:45 +0000)]
Bring another softupdates fix in from FreeBSD, FreeBSD commit message:
 Retain generation count when writing zeroes instead of an inode to disk.

 Don't free a struct inodedep if another process is allocating saved inode
 memory for the same struct inodedep in initiate_write_inodeblock_ufs[12]().

 Handle disappearing dependencies in softdep_disk_io_initiation().

Taken-from: FreeBSD/1.184
Author: tegge

14 years agoFreeBSD commit message:
Matthew Dillon [Fri, 14 Oct 2005 21:04:13 +0000 (21:04 +0000)]
FreeBSD commit message:
 After a rmdir()ed directory has been truncated, force an update of
 the directory's inode after queuing the dirrem that will decrement
 the parent directory's link count.  This will force the update of
 the parent directory's actual link to actually be scheduled.  Without
 this change the parent directory's actual link count would not be
 updated until ufs_inactive() cleared the inode of the newly removed
 directory, which might be deferred indefinitely.  ufs_inactive()
 will not be called as long as any process holds a reference to the
 removed directory, and ufs_inactive() will not clear the inode if
 the link count is non-zero, which could be the result of an earlier
 system crash.

 This change has the fortunate side effect of more quickly cleaning
 up the large number dirrem structures that linger for an extended
 time after the removal of a large directory tree.  It also fixes a
 potential problem with the shutdown of the syncer thread timing out
 if the system is rebooted immediately after removing a large directory
 tree.

Taken-from: FreeBSD/1.185
Submitted-by: tegge
14 years ago* Remove the old hardclock documentation and add information about
Sascha Wildner [Thu, 13 Oct 2005 11:05:10 +0000 (11:05 +0000)]
* Remove the old hardclock documentation and add information about
  the kern.polling.pollhz sysctl variable.

* Add nv(4) and wi(4) to the list of devices that support polling.

Submitted-by: sephe
14 years agoDocument the "polling" and "-polling" parameters.
Sascha Wildner [Thu, 13 Oct 2005 10:57:50 +0000 (10:57 +0000)]
Document the "polling" and "-polling" parameters.

Submitted-by: sephe
14 years agoANSIfy
Sepherosa Ziehau [Thu, 13 Oct 2005 10:22:07 +0000 (10:22 +0000)]
ANSIfy

Submitted-by: Matthias Schmidt <schmidtm at mathematik.uni-marburg.de>
14 years agounbreak LINT building
Sepherosa Ziehau [Thu, 13 Oct 2005 08:50:33 +0000 (08:50 +0000)]
unbreak LINT building

14 years agounbreak GENERIC building
Sepherosa Ziehau [Thu, 13 Oct 2005 08:10:18 +0000 (08:10 +0000)]
unbreak GENERIC building

14 years agoFix a bad panic check from the last commit in register_randintr().
Matthew Dillon [Thu, 13 Oct 2005 06:13:24 +0000 (06:13 +0000)]
Fix a bad panic check from the last commit in register_randintr().

Reported-by: Peter Avalos <pavalos@theshell.com>
14 years agoMove the polling systimer initialization code out of kern_clock.c and into
Matthew Dillon [Thu, 13 Oct 2005 00:45:36 +0000 (00:45 +0000)]
Move the polling systimer initialization code out of kern_clock.c and into
kern_poll.c.

Program the polling systimer to 1hz while polling is disabled, to reduce
cpu waste.  Change the default polling frequency to 2000hz.

14 years agoFix a bug where fsetfd() was not returning an error when it failed,
Matthew Dillon [Thu, 13 Oct 2005 00:06:28 +0000 (00:06 +0000)]
Fix a bug where fsetfd() was not returning an error when it failed,
resulting in a panic.

Reported-by: Peter Avalos <pavalos@theshell.com>
14 years agoUse sysctl's instead of KVM to access the interrupt name and count list.
Matthew Dillon [Thu, 13 Oct 2005 00:04:48 +0000 (00:04 +0000)]
Use sysctl's instead of KVM to access the interrupt name and count list.

14 years agoMajor cleanup of the interrupt registration subsystem.
Matthew Dillon [Thu, 13 Oct 2005 00:02:48 +0000 (00:02 +0000)]
Major cleanup of the interrupt registration subsystem.

* Collapse the separate registrations in the kernel interrupt thread and
  i386 layers into a single machine-independant kernel interrupt thread layer
  in kern/kern_intr.c.  Get rid of the i386 layer's 'MUX' code entirely.

* Have the interrupt vector assembly code (icu_vector.s and apic_vector.s)
  call a machine-independant function in the kernel interrupt thread
  layer to figure out how to process an interrupt.

* Move a lot of assembly into the new C interrupt processing function.

* Add support for INTR_MPSAFE.  If a device driver registers an interrupt
  as being MPSAFE, the Big Giant Lock will not be obtained or required.

* Temporarily just schedule the ithread if a FAST interrupt cannot be executed
  due to its serializer being locked.

* Add LWKT serialization support for a non-blocking 'try' function.

* Get rid of ointhand2_t and adjust all old ISA code to use inthand2_t.

* Supply a frame pointer as a pointer rather then embedding it on th stack.

* Allow FAST and SLOW interrupts to be mixed on the same IRQ, though this
  will not necessarily result in optimal operation.

* Remove direct APIC/ICU vector calls from the apic/icu vector assembly code.
  Everything goes through the new routine in kern/kern_intr.c now.

* Add a new flag, INTR_NOPOLL.  Interrupts registered with the flag will
  not be polled by the upcoming emergency general interrupt polling
  sysctl (e.g. ATA cannot be safely polled due to the way ATA register
  access interferes with ATA DMA).

* Remove most of the distinction in the i386 assembly layers between FAST
  and SLOW interrupts (part 1/2).

* Revamp the interrupt name array returned to userland to list multiple
  drivers associated with the same IRQ.

14 years agoput pthread_timedjoin_np in right order.
David Xu [Wed, 12 Oct 2005 23:53:52 +0000 (23:53 +0000)]
put pthread_timedjoin_np in right order.

14 years agoMove a bunch of per-interrupt-thread variables from static storage to
Matthew Dillon [Wed, 12 Oct 2005 17:39:49 +0000 (17:39 +0000)]
Move a bunch of per-interrupt-thread variables from static storage to
stack storage.

14 years agoRemove the INTR_TYPE_* flags. The interrupt type is no longer used to
Matthew Dillon [Wed, 12 Oct 2005 17:35:56 +0000 (17:35 +0000)]
Remove the INTR_TYPE_* flags.  The interrupt type is no longer used to
figure out which spl*() set an interrupt belongs to, because, well, spl's
no longer exist.

14 years agoSince intr has been setup in the last step of vr_attach(), mii_phy_probe()
Sepherosa Ziehau [Wed, 12 Oct 2005 10:28:02 +0000 (10:28 +0000)]
Since intr has been setup in the last step of vr_attach(), mii_phy_probe()
does not need any protection.

14 years ago- Make device polling use seperate SYSTIMER instead of hardclock
Sepherosa Ziehau [Wed, 12 Oct 2005 05:17:38 +0000 (05:17 +0000)]
- Make device polling use seperate SYSTIMER instead of hardclock
- Add "kern.polling.pollhz" sysctl-node/tunable-variable, which can be used to
  set device polling frequency(1 ~ 20000) on a *running* system

Idea-and-Hint-from: dillon
Review-by: dillon, kernel@, submmit@
Test-with: fxp(4)

14 years agoProperly serialize access in the NV ethernet driver and attempt to fix
Matthew Dillon [Wed, 12 Oct 2005 01:09:31 +0000 (01:09 +0000)]
Properly serialize access in the NV ethernet driver and attempt to fix
another watchdog-on-reinit issue.  I still see occassional watchdog timeouts,
however.

Add polling support, but there is currently no way to disable the interrupt
without also causing the NVidia interrupt callback functions to stop operating
(i.e. it stops doing work when called), so this feature is only really useful
to make the device work in cases where the kernel is unable to properly route
the interrupt.

It might be possible to do an end-run around the problem with a PCI bus
call to mask the interrupt there.

Call pfnClearTxDesc() prior to uninitializing an interface in the hopes
that it cleans out transmit descriptors and makes the callback so we can
deallocate the mbufs (not tested for that yet, but it atleast does not make
things any worse).

GigE NV interfaces should now negotiate for GigE speeds with the changes
made in the generic MII code.

14 years agoAttempt to add generic GigE support to MII. If this creates issues we will
Matthew Dillon [Wed, 12 Oct 2005 00:57:41 +0000 (00:57 +0000)]
Attempt to add generic GigE support to MII.  If this creates issues we will
have to move the GigE nvidia support to its own mii module.

14 years agoAdd forgotten temporary bandaid until ps knows about lwps.
Simon Schubert [Tue, 11 Oct 2005 22:10:22 +0000 (22:10 +0000)]
Add forgotten temporary bandaid until ps knows about lwps.

Noticed-by: John Leimon
14 years agoAdd missing crit_exit(). If VR fails to attach the system will assert
Matthew Dillon [Tue, 11 Oct 2005 18:23:17 +0000 (18:23 +0000)]
Add missing crit_exit().  If VR fails to attach the system will assert
that the critical section count is incorrect at the end of the boot sequence.

Reported-by: John Leimon
14 years agoFix brain-o.
Simon Schubert [Tue, 11 Oct 2005 13:31:05 +0000 (13:31 +0000)]
Fix brain-o.

Noticed-by: Alexey Slynko, swildner
14 years ago1:1 Userland threading stage 2.8/4:
Simon Schubert [Tue, 11 Oct 2005 09:59:56 +0000 (09:59 +0000)]
1:1 Userland threading stage 2.8/4:

Switch the userland scheduler to use lwps instead of procs.

14 years agoIntroduce pthread_timedjoin_np.
David Xu [Mon, 10 Oct 2005 13:53:57 +0000 (13:53 +0000)]
Introduce pthread_timedjoin_np.

14 years agoIntroduce pthread_timedjoin_np().
David Xu [Mon, 10 Oct 2005 13:46:53 +0000 (13:46 +0000)]
Introduce pthread_timedjoin_np().

14 years agoReplace THR_FLAGS_SUSPENDED with THR_FLAGS_NEED_SUSPEND, this
David Xu [Mon, 10 Oct 2005 13:45:57 +0000 (13:45 +0000)]
Replace THR_FLAGS_SUSPENDED with THR_FLAGS_NEED_SUSPEND, this
fixes the brokeness of pthread_attr_setcreatedsuspend_np.

14 years ago1:1 Userland threading stage 2.7/4:
Simon Schubert [Sun, 9 Oct 2005 21:38:04 +0000 (21:38 +0000)]
1:1 Userland threading stage 2.7/4:

- Retire p_sysmsgq and p_num_sysmsg and use the equivalents in lwp
- convert trap entry and exit points to use lwps

14 years ago1:1 Userland threading stage 2.6/4:
Simon Schubert [Sun, 9 Oct 2005 20:12:34 +0000 (20:12 +0000)]
1:1 Userland threading stage 2.6/4:

Retire p_upcall compat and use lwp_upcall instead.

14 years agoBump subversion in param.h
Matthew Dillon [Sun, 9 Oct 2005 19:02:09 +0000 (19:02 +0000)]
Bump subversion in param.h

Reminded-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years ago1:1 Userland threading stage 2.5/4:
Simon Schubert [Sun, 9 Oct 2005 18:07:55 +0000 (18:07 +0000)]
1:1 Userland threading stage 2.5/4:

Remove compatibility p_dupfd and use the per-lwp one.

14 years ago- Check for execvp returning ENOTDIR
Liam J. Foy [Sun, 9 Oct 2005 15:09:02 +0000 (15:09 +0000)]
- Check for execvp returning ENOTDIR

14 years agoCorrectly initialize n_threads.
Simon Schubert [Sun, 9 Oct 2005 14:50:21 +0000 (14:50 +0000)]
Correctly initialize n_threads.

14 years agoGet sources right so that we don't make depend if not needed.
Simon Schubert [Sun, 9 Oct 2005 14:44:04 +0000 (14:44 +0000)]
Get sources right so that we don't make depend if not needed.

14 years agoAdd rue(4) man page.
Sascha Wildner [Sun, 9 Oct 2005 13:29:50 +0000 (13:29 +0000)]
Add rue(4) man page.

Obtained-from: FreeBSD
Requested-by: sephe
14 years agoSync with FreeBSD's rev. 1.12. This works around an mdoc(7) bug which
Sascha Wildner [Sun, 9 Oct 2005 13:18:40 +0000 (13:18 +0000)]
Sync with FreeBSD's rev. 1.12. This works around an mdoc(7) bug which
was recently discussed on bugs@:

http://leaf.dragonflybsd.org/mailarchive/bugs/2005-09/msg00021.html

14 years ago1:1 Userland threading stage 2.4/4:
Simon Schubert [Sat, 8 Oct 2005 19:46:51 +0000 (19:46 +0000)]
1:1 Userland threading stage 2.4/4:

Introduce p_start and use it.  At the moment td_start is zero
for all kernel threads (no change) and processes (changed).  This
field will be filled in a later commit again.

14 years ago1:1 Userland threading stage 2.3/4:
Simon Schubert [Sat, 8 Oct 2005 14:31:26 +0000 (14:31 +0000)]
1:1 Userland threading stage 2.3/4:

Use p_comm instead of p_thread->td_comm.

14 years ago1:1 Userland threading stage 2.2/4:
Simon Schubert [Sat, 8 Oct 2005 12:24:26 +0000 (12:24 +0000)]
1:1 Userland threading stage 2.2/4:

Move profiling and intervall timer data to struct proc.

14 years agoWhitespace cleanup.
Simon Schubert [Sat, 8 Oct 2005 11:43:02 +0000 (11:43 +0000)]
Whitespace cleanup.

14 years agoRegen.
Simon Schubert [Sat, 8 Oct 2005 11:41:44 +0000 (11:41 +0000)]
Regen.

14 years agoAdd linux_nosys which handles non-existing syscalls like linux does:
Simon Schubert [Sat, 8 Oct 2005 11:41:11 +0000 (11:41 +0000)]
Add linux_nosys which handles non-existing syscalls like linux does:
just return ENOSYS instead of sending a signal.

Taken-from: FreeBSD

14 years agoBring in FreeBSD rev 1.123:
Simon Schubert [Sat, 8 Oct 2005 11:34:25 +0000 (11:34 +0000)]
Bring in FreeBSD rev 1.123:
  revision 1.123
  date: 2005-07-19 07:18:23 +0200;  author: delphij;  state: Exp;  lines: +5 -0;
  PLAY_MSF, PLAY_TRACK, PLAY_TRACK_REL, PAUSE, PLAY_12 commands to pass
  through umass(4), in order to make cdcontrol(1) to issue commands to
  a USB CD driver.

  The command IDs were obtained from the CAM subsystem.  This was tested
  on half dozen of USB CD drivers from different vendors.

  Suggested by: "intron" <intron at intron dot ac>
  PR: usb/83439
  Reviewed by: sanpei
  MFC After: 1 week

Submitted-by: Xin Li <delphij@freebsd.org>
14 years agoPrint what we are doing when running make cleandir.
Simon Schubert [Sat, 8 Oct 2005 11:31:29 +0000 (11:31 +0000)]
Print what we are doing when running make cleandir.

14 years agoAdd sources to generated files.
Simon Schubert [Sat, 8 Oct 2005 11:30:45 +0000 (11:30 +0000)]
Add sources to generated files.

14 years agoRemove erroneous MLINKS. These are handled elsewhere (better even).
Simon Schubert [Sat, 8 Oct 2005 11:29:20 +0000 (11:29 +0000)]
Remove erroneous MLINKS.  These are handled elsewhere (better even).

14 years agoAdd -O option: Ignore non-files when recursing.
Simon Schubert [Sat, 8 Oct 2005 11:28:23 +0000 (11:28 +0000)]
Add -O option: Ignore non-files when recursing.

14 years agoEnable emacs line editing by default.
Simon Schubert [Sat, 8 Oct 2005 11:24:43 +0000 (11:24 +0000)]
Enable emacs line editing by default.

14 years agoClean up old yacc syntax
Simon Schubert [Sat, 8 Oct 2005 11:23:28 +0000 (11:23 +0000)]
Clean up old yacc syntax

14 years agoAlias NO_CLEAN with NOCLEAN. I just get bitten by this every second build.
Simon Schubert [Sat, 8 Oct 2005 10:50:53 +0000 (10:50 +0000)]
Alias NO_CLEAN with NOCLEAN.  I just get bitten by this every second build.

14 years ago- Don't build PIC in btools
Simon Schubert [Sat, 8 Oct 2005 10:47:36 +0000 (10:47 +0000)]
- Don't build PIC in btools
- Build statically linked crosstools
- Remove sysinstall

14 years ago* Fix width in begin list (.Bl) macro.
Sascha Wildner [Sat, 8 Oct 2005 10:00:10 +0000 (10:00 +0000)]
* Fix width in begin list (.Bl) macro.

* Correct buildworld description.

* Add documentation for the quickworld, realquickworld, crossworld,
  nativekernel, quickkernel, kernel, preupgrade and upgrade targets.

* Remove obsolete documentation for the aout-to-elf, aout-to-elf-build,
  aout-to-elf-install and move-aout-libs targets.

* Remove cross-compiling examples for PC98 and Alpha. Comment out
  two sentences that can go back in when we support different
  architectures.

* Refer to /etc/defaults/make.conf instead of
  /usr/share/examples/etc/defaults/make.conf.

* Remove reference to mergemaster(8).

* Bump date.

Add some changes from FreeBSD's build.7:

* Add reference to config(8).

* Miscellaneous mdoc cleanup.

14 years ago1:1 Userland threading stage 2.1/4:
Simon Schubert [Fri, 7 Oct 2005 21:55:15 +0000 (21:55 +0000)]
1:1 Userland threading stage 2.1/4:

Convert functions to use struct lwp instead struct proc.