signal trampoline for old signals. The arches that support old signals
currently abuse sigreturn(2) instead. This mainly complicates things
and slightly breaks the the new sigreturn(2).
COMPAT is too limited to support the correct configuration of osigreturn,
and this commit doesn't attempt to fix it; it just moves the bogusness:
osigreturn() must now be provided unconditionally even on arches that
don't really need it; previously it had to be provided under the bogus
condition defined(COMPAT_43).
some arches and the syscall table is machine-independent. It was
(bogusly) conditional on COMPAT_43, so this usually makes no difference.
ia64: in addition:
- replace the bogus cloned comment before osigreturn() by a correct one.
osigreturn() is just a stub fo ia64's.
- fix the formatting of cloned comment before sigreturn().
- fix the return code. use nosys() instead of returning ENOSYS to get
the same semantics as if the syscall is not in the syscall table.
Generating SIGSYS is actually correct here.
- fix style bugs.
powerpc: copy the cleaned up ia64 stub. This mainly fixes a bogus comment.
sparc64: copy the cleaned up the ia64 stub, since there was no stub before.
'struct ng_ksocket_sockopt') like to peek into the ng_mesg header for
information. Make sure when generating default values that we provide
a valid header to peek into.
MFC after: 1 week
for SMP in the plain profiling case. It seems to work too.
This error was not detected by LINT because LINT only compiles the
GUPROF profiling case, which is is a superset of the plain profiling
case for !SMP but which is so broken for SMP that the buggy code is
not compiled.
SIOCSIFMAC, which are for the Mandatory Access Control
implementation. This will prevent collisions on the p4 development
branch.
Obtained from: TrustedBSD Project
the packet transfer routines, since rev.1.468 of machdep.c does this
better. I'm surprised that disabling interrupts helped much. Disabling
them in the packet receive routine is too late.
Fixed some minor style bugs in rev.1.14.
to fetch the magic word instead of useracc() plus a direct access.
This is more efficient as well as simpler and less incorrect:
- it was inefficent because useracc() takes much longer than just
accessing the data using a correct access method, at least on i386's.
- it was incorrect because direct access is incorrect unless the address
has been mapped. This and nearby direct accesses are mostly handled
better for other arches because they have to be (direct accesses don't
work).
- using magic in sigreturn is still fundamentally broken because false
matches are possible. On i386's, a false match occurs when %eip in a
new signal context happens to equal the magic value. This is not
handled better for other arches.
npx is no more mandatory than sc. Its mandatoryness went away in
rev.1.226 of i386/machdep.c 9 months before it was made mandatory in
rev.1.24 of config/mkmakefile.c.
This change is mainly to test building of minimal kernel configurations.
npx should really be even more standard than clk. It was optional mainly
so that the usual device driver configuration info could be specified in
the usual way in config files, but this hasn't been necessary for a few
years.
is not configured. Including <isa/isavar.h> when it is not used is
harmful as well as bogus, since it includes "isa_if.h" which is not
generated when isa is not configured.
This was fixed in 1999 but was broken by unconditionalizing PNPBIOS.
other threads as well as speed up the interfaces.
To fix the race and accomplish the speedup, remove selholddrop and
pollholddrop. The entire concept is somewhat bogus because holding
the individual struct file pointers offers us no guarantees that
another thread context won't close it on us thereby removing our
access to our own reference.
Selholddrop and pollholddrop also would do multiple locks and unlocks
of mutexes _per-file_ in the fd arrays to be scanned, this needed to
be sped up.
Instead of using selholddrop and pollholddrop, simply hold the
filedesc lock over the selscan and pollscan functions. This should
protect us against close(2)'s on the files as reduce the multiple
lock/unlock pairs per fd into a single lock over the filedesc.
to ExCA register sets. These registers exist in both ISA and PCI
devices in a couple different ways, and this will provide a common
base for future building. This code is a rehash of the pccbb 16-bit
code, which was a rehash of the pcic code, which was a rehash of the
netbsd i82365 code. More hashing to come.
interfaces we encounter. In Linux, all addresses are returned for
which gifconf handlers are installed. This boils down to AF_DECnet
and AF_INET. We care mostly about AF_INET for now. Adding additional
families is simple enough.
Returning the addresses is important for RPC clients to function
properly. Andrew found in some reference code that the logic that
handles the retransmission looks for an interface that's up and has
an AF_INET address. This obviously failed as we didn't return any
addresses at all.
Note also that with this change we don't return interfaces that don't
have AF_INET addresses, whereas before we returned any interface
present in the system. This is in line with what Linux does (modulo
interfaces with only AF_DECnet addresses of course :-)
Reported by: "Andrew Atrens" <atrens@nortelnetworks.com>
MFC after: 1 week
apply to this file. The correct message is:
throw_rude_remark: Make sure we're holding the config lock before
proceeding. There's no reason to assume that this
has ever happened, but the alternative might be a
double fault.
uhub.c: revision 1.37
usb.4: revision 1.30
usb.c: revision 1.38
usb.h: revision 1.40
usb_port.h: revision 1.21
usb_subr.c: revision 1.65
usbdi.h: revision 1.40
Split the attach/detach events up into device, driver and controller
attach and detach events.
The commit message from NetBSD was:
date: 2000/02/02 07:34:00; author: augustss; state: Exp;
Change the USB event mechanism to include more information
about devices and drivers. Partly from FreeBSD.
Also rework usbd to take these new event types into account.
for success, non-zero otherwise. The maestro and maestro3 drivers were
returning the format code, which was being interpreted as a failure code.
Fixed. No one seems to have noticed that the maestro driver was broken,
but I'll fix it anyways.
MFC after: 2 weeks
64-bit platforms. The unaligned access is caused by struct ifa_msghdr
not being a multiple of 8-bytes in size. If an interface has an odd
number of addresses, this causes the next interface to generate an
unaligned access in the user-level app walking the interfaces (ifconfig).
Submitted by: Bernd Walter <ticso@cicely8.cicely.de>
* be more specific in verbose boot messages
* allow the feeder subsystem to veto pcm* attaching if there is an error
initialising the root feeder
* don't free/malloc a new tmpbuf when resizing a snd_dbuf to the same size as
it currently is
* store the feeder description in the feeder structure instead of mallocing
space for it
usb.c: revision 1.39
revision 1.39
date: 2000/02/22 11:30:56; author: augustss; lines: +7 -1
Prepare a little for having USB interrupt processing done
outside the hard interrupt level (in a thread or a softintr).
No real soft processing done yet.
usb.c: revision 1.41
revision 1.41
date: 2000/03/16 00:46:38; author: augustss; lines: +2 -2
Make the USB event queue longer. Mine overflows before the
(user-land) event handler has started. But then I have
about 25 devices connected. :)
ohci.c: revision 1.72 and 1.73
ohcivar.h: revision 1.19 and 1.20
uhci.c: revision 1.85
usbdi.h: a small part of revision 1.40
usbdivar.h: revision 1.47
Relevant commit messages from NetBSD are:
date: 2000/02/22 11:30:54; author: augustss; state: Exp;
Prepare a little for having USB interrupt processing done
outside the hard interrupt level (in a thread or a softintr).
No real soft processing done yet.
----------------------------
date: 2000/02/01 05:42:53; author: augustss; state: Exp;
Put some #ifdefs around power and shutdown hooks.
some time. _All_ packets, regardless of destination, were accepted by
the machine as if addressed to it.
Jump back to 'pass' processing for a teed packet instead of falling
through as if it was ours.
PR: kern/31130
Reviewed by: -net, luigi
MFC after: 2 weeks
from 1 megabyte of ram per user to 2 megabytes of ram per user, and
reduce the cap from 512 to 384. 512 leaves around 240 MB of KVM available
while 384 leaves 270 MB of KVM available. Available KVM is important
in order to deal with zalloc and kernel malloc area growth.
Reviewed by: mckusick
MFC: either before 4.5 if re's agree, or after 4.5
usb.c: -r1.35 - 1.37
usb_port.h: tiny bit of -r1.26 + an extra bit in the FreeBSD config section.
revision 1.37
date: 2000/01/24 18:35:51; author: thorpej; state: Exp; lines: +7 -1
Use config_pending.
----------------------------
revision 1.36
date: 1999/12/22 23:54:09; author: augustss; state: Exp; lines: +2 -2
Use the flags `locator' to govern if devices are detected early or
late during cold boot.
----------------------------
revision 1.35
date: 1999/12/20 02:12:23; author: augustss; state: Exp; lines: +8 -5
Make sure tsleep() is not called during cold boot.
stead of after
2) Honour NO_TEST_UNIT_READY quirk for atapi devices as well
3) Actually support FujiFilm FinePix 6800 camera's. Will very likely also
work for other FinePix models.
Based on a debug session about half a year ago with Nik Hibma.
MFC after: 2 weeks
getpid, getuid, getgid and pipe, since they bootstrapped from
OSF/1 and never cleaned up. Switch to the native syscalls
on alpha so that the above functions work
MFC after: 7 days
extensively as none of my testboxes have speakers or an audio source at
present, but the chains built look correct and reading /dev/audio (ulaw,
translated from signed 16 bit little-endian) gives values within the
expected range for silence.
default format for the chosen subdevice cannot be obtained return an error
instead of returning success with an indeteterminate format selected.
note that this should never happen once the feederchain builder works for
recording.
which small and/or nearly full filesystems would fail with `file
system full' messages when trying to replace a number of existing
files (for example during a system installation). When the allocation
routines are about to fail with a file system full condition, they
make a call to softdep_request_cleanup() which attempts to accelerate
the flushing of pending deletion requests in an effort to free up
space. In the face of filesystem I/O requests that exceed the
available disk transfer capacity, the cleanup request could take
an unbounded amount of time. Thus, the softdep_request_cleanup()
routine will only try for tickdelay seconds (default 2 seconds)
before giving up and returning a filesystem full error. Under typical
conditions, the softdep_request_cleanup() routine is able to free
up space in under fifty milliseconds.
- Clear the cached destination before getting another cached route.
Otherwise, garbage in the padding space (which might be filled in if it was
used for IPv4) could annoy rtalloc.
Obtained from: KAME
ohci.c: -r1.69 to 1.71
ohcireg.h: -r1.14
Some of these deltas are based upon patches that we submitted back to
NetBSD. They got manifested slightly differently though, so I've brought
back those differences to bring our code bases closer together.
The logs from the NetBSD version of ohci.c:
revision 1.71
date: 2000/02/01 05:42:52; author: augustss; state: Exp; lines: +13 -2
Put some #ifdefs around power and shutdown hooks.
----------------------------
revision 1.70
date: 2000/01/31 22:35:13; author: augustss; state: Exp; lines: +7 -7
Rename TAILMASK to HEADMASK, since it really masks the head pointer.
From FreeBSD.
----------------------------
revision 1.69
date: 2000/01/31 22:09:13; author: augustss; state: Exp; lines: +18 -14
Change where the has table for physical-to-virtual address translation
is handled. Partly from FreeBSD.
ohci.c: -r1.68
ohcireg.h: -r1.13
date: 2000/01/31 20:17:25; author: augustss; state: Exp;
Fiddle with over-current protect when turning on port power to make
things work for some OHCI controllers.
uhci.c: -r1.82
uhcivar.h: -r1.22
date: 2000/01/26 10:04:39; author: augustss; state: Exp;
Try to avoid accessing the HC if it is dead. Suggested by mycroft.
This allows obtaining crash dumps from the panics occured during late stages
of kernel initialisation before system enters into single-user mode.
MFC after: 2 weeks
revision 1.125
date: 2000/09/23 21:00:10; author: augustss; state: Exp; lines: +19 -3
Avoid "bandwidth reclamation" for control transfers. The kue device chokes
on it.
uhci.c: -r1.124
uhcireg.h: -r1.13
date: 2000/08/13 18:20:14; author: augustss; state: Exp;
Fix race condition when unlinking xfers. Thanks to IWAMOTO Toshihiro
<iwamoto@sat.t.u-tokyo.ac.jp> for analyzing the problem and suggesting a fix.
Fixes PR 10662.
replace mutex_lock calls on uidinfo with macro calls:
mtx_lock(&uidp->ui_mtx) -> UIDINFO_LOCK(uidp)
Terry Lambert <tlambert2@mindspring.com> helped with this.
uhci.c: -r1.123 (and a tiny bit of -r1.92)
uhcivar.h: -r1.32
date: 2000/08/13 16:18:09; author: augustss; state: Exp;
Implement what in Intel-speech is known as "bandwidth
reclamation". It means that we continously poll USB devices
that have a pending transfer instead of polling just once
every ms. This speeds up some transfers at the expense of
using more PCI bandwidth.
uchireg.h: -r1.12
uchi.c: -r1.121
date: 2000/07/23 19:43:38; author: augustss; state: Exp;
Be a little more explicit and careful about setting links in TDs and QHs.
prior ICP Vortex models. This driver was developed by Achim Leubner
of Intel (previously with ICP Vortex) and Boji Kannanthanam of Intel.
Submitted by: "Kannanthanam, Boji T" <boji.t.kannanthanam@intel.com>
MFC after: 2 weeks
Integrated RAID driver, supported by <boji.t.kannanthanam@intel.com> and
<achim.leubner@intel.com>.
Submitted by: "Kannanthanam, Boji T" <boji.t.kannanthanam@intel.com>
This typo keeps us from properly routing an interrupt for CardBus
bridges on this machine. So, now we look for $PIR and then _PIR to
cope. With these changes, the Libretto L1 now works properly.
Evidentally, the idea comes from patch that the Japanese version of
RedHat (or against a Japanese version of Red Hat), but my Japanese
isn't good enough to to know for sure.
Reported by: Hiroyuki Aizu-san <eyes@navi.org>
# This may be an MFC candidate, but I'm not yet sure.
sleeping on a process object but changed the corresponding
wakeup()s to the thread object. The result was that non-raw
aio ops waited for an aio daemon to timeout before action
was taken. Now, we sleep on the thread object.
PR: kern/34016
operation. The vgonel() code has always called vclean() but until we
started proactively freeing vnodes it would never actually be called with
a dirty vnode, so this situation did not occur prior to the vnlru() code.
Now that we proactively free vnodes when kern.maxvnodes is hit, however,
vclean() winds up with work to do and improperly generates the warnings.
Reviewed by: peter
Approved by: re (for MFC)
MFC after: 1 day
a simple version of bcopy() so we avoid picking up the overly-complex
implementation in libc (via libstand). This is not necessary on
-current, but RELENG_4 has apparently just exceeded the 15-sector
limit for boot1.
Reviewed by: wilko
likely looking rate calculation.
Install interrupt handler before calling ich_init as the initialization
occasionally generates spurious interrupts.
These changes are derived from cg's work in progress version of this
driver.
socket so that routing daemons and other interested parties
know when an interface is attached/detached.
PR: kern/33747
Obtained from: NetBSD
MFC after: 2 weeks
db_machdep.h to fix the link failure (multiple definitions)
caused by disabling the emission of common symbols. As a result,
there were no definitions at all. While here, remove useless
declarations.
because the buffers we use could end up spanning a 64k boundary.
Unfortunately it causes too much bloat (228 -> 72 bytes free) to
just reinstate the old malloc() function.
Instead, define a structure that contains all 4 buffers which must
not cross 64k boundaries. We allocate a 64k-aligned instance in
main() using the magic that was in the old boot2 malloc() function.
This brings the free space down to 168 bytes, but that is still
better than it was before revision 1.35 (136 bytes).
Reported by: Mike Brancato <funnyguy@digitalsmackdown.net>
Pointy-hat to: iedowse
at insert time. When asking gibbs for approval for an MFC, this was
his reply:
1) It leaks memory if it can't allocate a path.
2) It defers allocation of aic->path until the call to scan the
bus. This means the path may be NULL when an interrupt occurs
prior to the call to scan the bus (stray bus reset for instance),
which will lead to a panic.
3) The driver in current doesn't recover from the failure to allocate
aic->path. The driver doesn't check during normal operation if
the path is NULL, so again a panic will result.
4) aic_cam_rescan calls malloc with M_WAITOK. aic_cam_rescan is called
from attach where it isn't necessarily safe to sleep.
5) And most importantly, it co-opts the xpt_periph from the driver level.
This was never part of the design (xpt_periph used to be static). Making
a call of this type may completely confuse the XPT if other XPT operations
are ongoing.
In the long term, Justin and Warner agreed to implement solution where
CAM itself will initiate the bus rescan if a new bus is added. For
the time being (and in particular in light of the upcoming 4.5
release), we now have camcontrol available on the boot floppy, and can
have pccardd initiate the rescan through it.
previous commit, it should always print due to lack of {} around the
second line in the if statement. The message should likely say
something more like "There's no hardware responding at this IRQ.
Device not present (or disbaled)," but that is too long. We generally
don't give elementary advise in device driver messages anyway. Be
that as it may, the problem with it printing all the time should be
corrected.
which caused incomplete snapshots to be taken. When background
fsck would run on these snapshots, the result would be files
being incorrectly released which would subsequently panic the
kernel with ``handle_workitem_freefile: inodedep survived'',
``handle_written_inodeblock: live inodedep'', and
``handle_workitem_remove: lost inodedep'' errors.
and the reference to db_regs is *extern* from alpha/include/db_machdep.h
(put it in alpha/alpha/machdep.c)- this avoids the problems we've had
about different 'common' sizes prohibiting the kernel from linking.
One to notify the system that the MTU for VLAN can be 1500 so the vlan
will automatically be configured with a 1500 MTU the other is to ignore
the error case if the received frame is to long.
The frame size notification came from code in the SIS driver, and
the support for long frames derived from the NetBSD Tulip driver.
Tested on: 4 port D-Link adapter DFE-570TX 4 Intel 21143
Netgear card with 82c169 PNIC 10/100BaseTX
Reviewed by: ru (manpage), wpaul (not objected to), archie
Approved by: imp
Obtained from: NetBSD
cpuid with %eax=1 will return a logical cpu count in bits 16-23 of %ebx.
Bit 29 is actually 'TM' according to AP-485. This signifies the presence
of the thermal control circuit (which I believe can slow the clock down
to reduce core temperature).
they make it through to userland. This should fix the p5-smp problem
without affecting the other cpus (eg: cyrix, see initcpu.c and the special
cache handling for these cpu types).
o Remove bogus flags that aren't used (if we need them in the future, we can
add them back).
o Add support for the TI-1031. This is the only YENTA compatible PCI-PCMCIA
bridge that I'm aware of (all the others are PCIC on a PCI bus, which is
different).
seem to be too short for the 500 Mhz DS20 I'm testing on. The rather
arbitrary numbers are rather bogus anyways. We should probably have
variables for these limits that are calibrated in the MD startup code
somehow.
NULL rather than curproc. Without this, if we trap early before
curthread is set, we recursively panic.
- In an SMP kernel, if we trap before curthread is set, then trap is going
to recursively panic trying to bump td->td_md.md_kernnest. The trap is
fatal anyways, so to make debugging easier just call printtrap() to
dump the trap info to the console and then halt.
involving file removal or file update were not always being fully
committed to disk. The result was lost files or corrupted file data.
This change ensures that the filesystem is properly synced to disk
before the filesystem is down-graded.
This delta also fixes a long standing bug in which a file open for
reading has been unlinked. When the last open reference to the file
is closed, the inode is reclaimed by the filesystem. Previously,
if the filesystem had been down-graded to read-only, the inode could
not be reclaimed, and thus was lost and had to be later recovered
by fsck. With this change, such files are found at the time of the
down-grade. Normally they will result in the filesystem down-grade
failing with `device busy'. If a forcible down-grade is done, then
the affected files will be revoked causing the inode to be released
and the open file descriptors to begin failing on attempts to read.
Submitted by: "Sam Leffler" <sam@errno.com>
itself, it's used outside the Linuxulator. Reimplement the
function so that its behaviour matches the current renaming
scheme. It's probably better to formalize these interdependencies.
Backout revision 1.56 and 1.57 of fifo_vnops.c.
Introduce a new poll op "POLLINIGNEOF" that can be used to ignore
EOF on a fifo, POLLIN/POLLRDNORM is converted to POLLINIGNEOF within
the FIFO implementation to effect the correct behavior.
This should allow one to view a fifo pretty much as a data source
rather than worry about connections coming and going.
Reviewed by: bde
done with boot1 on the alpha. We use 4k buffers regardless of the
actual filesystem block size.
Remove the simple malloc() implementation, as it is no longer used.
server side. This can lead to a system deadlock.
Reviewed by: iedowse
Tested by: Alexey G Misurenko <mag@caravan.ru>, iedowse
Bug found with help by: Alexey G Misurenko <mag@caravan.ru>
MFC at: earliest convenience
detect 3.3V cards for the 6710 and another method for the 6722. This
latter method is also how the 6729/6730 is supposed to detect 3.3V
cards. This method works great on my Fujitsu Stylistic 500. Sadly,
it appears that not all laptop makers are as detail oriented as the
folks that made the Stylistic. IBM Thinkpad 701C and AST Asentia 810N
both hang hard when the 6729 method is used, but at least the thinkpad
works when the 6710 method is used. The failure mode appears to be any
access to the memory that we've mapped the CIS in causes the machine to
hang until you eject the card. The Thinkpad, at least, works with this
change, and it doesn't break my Stylistic.
MFC after: 4 days