Use pmap_TLB_invalidate instead of invltlb_1pg to eliminate
unnecessary IPIs.
pmap_remove, pmap_protect and pmap_remove_pages:
Use pmap_TLB_invalidate_all instead of invltlb to eliminate
unnecessary IPIs.
pmap_copy:
Use cpu_invltlb instead of invltlb when updating APTDpde.
pmap_changebit:
Rather than deleting the unused "set bit" option (which may be
useful later), make pmap_changebit an inline that is used
by the new pmap_clearbit procedure.
Collectively, the first three changes reduce the number of TLB shootdown
IPIs by 1/3 for a kernel compile.
attached to the nexus. With one exception, this (for example) allows
you to do wierd things like kldload the eisa bus on the fly and then
drivers, and have it auto probe the eisa bus when the drivers come online.
The one exception being pci, it only adds the pcib after the presence of
the pci bus is detected and that's #if'ed code.
A side effect of this is that isa and eisa will be attached to the nexus
directly rather than the PCI->ISA or PCI->EISA bridges. I'm not sure if
this is good or bad at this point, but it seems to be closer to the way
things are for the i386 family... This is likely to be followed up.
This also fixes compilation without a PCI bus configured and will allow
eisa to work without PCI too.
- fix cut/paste problem. :-)
- don't forget to call isa_dmacascade()
- reset the port after we release resources.
That last one is a trap to watch out for.. The isa bus driver uses the
same port/irq/mem/etc variables for the initial probe hints as it does
for allocation/deallocation tracking. Releasing a resource clears the
variable and then you loose the hint during attach.. (ouch!)
had a quirk that made a shim rather hard to implement properly and it was
just easier to convert the drivers in one go. The changes to the
buslogic driver go beyond just this - the whole driver was new-bus'ed
including pci and isa. I have only tested the EISA part of this so far.
Submitted by: Doug Rabson <dfr@nlsystems.com>
cannot yet be closed, though.
I hope I got all credits right, and that the multiple submitted by lines
do not break anyone's scripts...
PR: kern/5038, kern/5567
Submitted by: Keith Jang <keith@email.gcn.net.tw>
Submitted by: Joachim Kuebart <joki@kuebart.stuttgart.netsurf.de>
Submitted by: Byung Yang <byung@wam.umd.edu>
Submitted by: Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition. eisa, isapnp and pccard* are
not yet using the new resource manager. Once fully converted, all drivers
will be loadable, including PCI and ISA.
(Some other changes appear to have snuck in, including a port of Soren's
ATA driver to the Alpha. Soren, back this out if you need to.)
This is a checkpoint of work-in-progress, but is quite functional.
The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.
Approved by: core
only worked for configurations with "swap on generic".
usr.sbin/config/config.y:
- ignore all "swap [on] device ...' specifications except for
warning about them. They haven't done anything related to swap
for almost 4 years, and were previously silently ignored,
except for "swap on generic" which stopped swap${KERNEL}.c
from being generated. Code to support swapping is now deader
than before.
usr.sbin/config/mkswapconf.c:
- don't generate a dummy setconf() function in swap${KERNEL}.c.
sys/i386/conf/files.i386:
- swapgeneric.c is now standard. It should be merged into autoconf.c
so that it doesn't conflict with swap${KERNEL}.c for kernels named
"generic".
sys/i386/i386/autoconf.c:
- don't call setroot() for mfs roots. Since setroot() doesn't do anything
harmful, this was just a waste of time, except possibly for booting with
-a it may have helped prevent an undesireable call to setconf() by
finding a bogus rootdev.
- honor -a for ffs roots. -a now overrides all other ways of specifying
the root device. Previously, -r had precedence over -a, and the -a
handling was usually a no-op.
- don't honor -a for non-ffs roots, since it would currently just get in
the way of a clean panic.
sys/i386/i386/swapgeneric.c:
- don't declare things that are now always declared in swap${KERNEL}.c.
Don't decide things that are now decided in autoconf.c. Code to
support the "generic" case is now dead instead of useless.
3c900B-TPC (twisted pair and coax). Treated similarly to the
3c900B-COMBO, except no AUI port.
- Fix media selection so that it's possible to select the AUI and BNC
ports on the 3c905B-COMBO. This board is now fully supported.
- Change TX queueing strategy to hopefully be more efficient by avoiding
register accesses in xl_start(). Should provide small performance
improvement and a little better reliability.
transceiver. Note in the manual page that autoselection doesn't
work on the 82c168 because the built-in NWAY support is horribly
broken. Manual mode selection works fine, but autoneg is broken for
everything except maybe 10Mbps half-duplex. There's no simple way
to fix this at the moment, so I have to settle for documenting the
bug for now. Fortunately, there aren't anywhere near as many 82c168
boards around as there are 82c169s.
in the RB_ASKNAME case. I had thought that I made this change in
rev.1.18, but rev.1.18 only affects obscure subcases of the
RB_DFLTROOT case (subcases where the compiled in default root is
not found in bdevsw[] -- then the root device is set to the first
device in the half-baked table that is also in bdevsw[]).
Removed yet more vestiges of config-time swap configuration.
All it did was match a specific device ID and turn on a quirk for
the wdc driver.
Incidently, at line 1462 there is a return that prevents the generic
ide_pci code from trying to look at the device. I'd be interested
to know if we can take out the return and let the generic code "see" it.
I've left the return in because that's the way it worked before.
(Be sure to rerun config after cvsup or you'll get undefined files!)
perform a cleanup/unifdef sweep over it to tidy things up. The atapi
code is permanently attached to the wd driver and is always probed.
I will add an extra option bit in the flags to disable an atapi probe on
either the master or slave if needed, if people want this.
Remember, this driver is destined to die some time. It's possible that
it will loose all atapi support down the track and only be used for
dumb non-ATA disks and all ata/atapi devices will be handled by the new
ata system.
ATAPI, ATAPI_STATIC and CMD640 are no longer options, all are implicit.
Previously discussed with: sos
Sense ${DEBUG} to decide on building kernel.debug or not.
Use a common install and install.debug target to minimize duplication.
(I deleted the ELF transition kernel warning, it was getting dated..)
- It turns out that the 'promiscuous mode' bug what I discovered with the
PNIC is not restricted to promiscuous mode. I've been doing some remote
debugging for someone with a P75 system, and at 100Mbps, the receiver
screws up even when the NIC is in normal mode. Thus, enable the workaround
for this bug all the time. Note that the workaround is still not enabled
for the PNIC II, since I haven't tested one yet.
- Set the 'arbitration' bit in the bus configuration register and set the
maximum burst size to 16 longwords. This seems to fix problems with
transmit corruption on the P75 system mentioned above. (It probably hurts
performance a bit too, but I've given up trying to make the PNIC perform
well.)
- Rewrite the transmit section to be a little less bogus.
- Set ifq_maxlen correctly. RL_TX_LIST_CNT - 1 is wrong, because for the
RealTek, RL_TX_LIST_CNT is 4. Set it to IFQ_MAXLEN instead.
(cut-down version of the "cyclone" for the small office/home office
"cheap bastard" market). Basically the same as a 3c905B but without
Wake-on-LAN, ROM socket, etc...
2) create function usbd_errstr which turns a usbd_status into a sensible
error message
3) Change the printf in DPRINTF to logprintf which is a define for
log(KERN_DEBUG, x)
- Wait longer for the reset to complete in xl_attach() to try and avoid
'command never completed' warnings.
- Clean up a few odds and ends in xl_attach().
- Add PCI ID for the 3c905B-COMBO (a new card). Right now this is
treated as a 3c905B; I need to dig up one of these cards for testing
before I can make the AUI and BNC ports work.
- Add a hack to force reading the I/O address directly from the PCI
registers if pci_map_port() fails. I SHOULD NOT HAVE TO DO THIS:
SOMEBODY WITH MORE PCI CLUES THAN I SHOULD INVESTIGATE WHY THIS
HAPPENS.
Requested-by: ache
bde
dg
Modify targets for debug kernels: when -g was specified, make will
now build a debug kernel called kernel.debug, and create a stripped
version called kernel at the same time. The two targets install and
install.debug are otherwise unchanged.
Requested-by: dillon
Update man page accordingly.
no more memory (M_WAITOK -> M_NOWAIT). It may be called early enough
during boot that M_WAITOK isn't OK. (In theory - right now it isn't called
from anywhere).
Fixed problems:
Promise controllers was not always set up correctly.
Parantheses are a good thing, fixed.
Some older CDROM's could hang the probe.
Proberly wait for the drive to catch its breath after IDENTIFY.
Some CD writers fails because they dont support rezero.
Rearranged the code to not use rezero.
Warnings now that we use EGCS.
Fixed.
transceiver. Thanks to Brian Walenze for donating a NIC with this chip
on it (LinkSys didn't really sell that many of them and they're not
in production anymore). The driver now distinguishes between the
82c168 and 82c169 when probing. If no MII transceiver is detected,
it switches over to using the internal one.
Fix a potential drive deadlock when saving config to a non-existent
drive.
Add debug calls to catch occasional deadlocks on drives. The problem
(above) is probably gone, but the debug checks remain for a while.
is probably gone, but the debug checks remain for a while.
update_plex_config: Catch yet another divide-by-zero problem when
detaching the last subdisk from a striped plex.
Uncovered-by: Michael Reifenberger <root@nihil.plaut.de>
Reduce synth_info.name lenght for binary compatibility.
o sys/i386/isa/sound/mpu401.c
Reduce mpu device number info to avoid overflow of mpu_synth_info.name.
Submitted by: Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
are pending I/O transactions. It is not clear that is works 100% of
the time under SMP, but since the bt_cmds() that are sent after other
CPUs are started are not critical, the driver will function until I
can figure out why this is the case.
for as much as one second, but no more. Allows a miscreant to
double-time march the clock, but no worse.
XXX Unlike putting negative deltas in a while(1), performing small
positive steps inside of a while(1) will return EPERM for the
unpermitted ones. Repeated negative deltas are clamped without
error (but the kernel does log a notice).
1 second prior to the highest the clock has run so far. This allows
time adjusters like xntpd to do their work, but the worst a miscreant
can do is "freeze" the clock, not go back in time.
We still need to decide on an algorithm to clamp positive adjustments.
As it stands, it is possible to achieve arbitrary negative adjustments
by "wrapping" time around.
PR: 10361
2. Config complains if you use -g:
Debugging is enabled by default, there is no ned to specify the -g option
3. Config warns you if you don't use -s:
Building kernel with full debugging symbols. Do
"config -s BSD" for historic partial symbolic support.
To install the debugging kernel, do make install.debug
(BSD was the name of the config file I used; I print out the same
name).
4. Modify Makefile.i386, Makefile.alpha, Makefile.pc98 and config to
work if a kernel name other than 'kernel' is specified. This is
not absolutely necessary, but useful, and it was relatively easy.
I now have a kernel called /crapshit :-)
5. Modify Makefile.i386, Makefile.alpha, Makefile.pc98 "clean" target
to remove both the debug and normal kernel.
6. Modify all to install the stripped kernel by default and the debug
kernel if you enter "make install.debug".
7. Update version number of Makefiles and config.
Split out ioctl handler a little more cleanly, add memory
range attribute handling for both kernel and user-space
consumers.
pmap.c
Remove obsolete P6 MTRR-related code.
i686_mem.c
Map generic memory-range attribute interface to the P6 MTRR
model.
condition ( bufspace > hibufspace ), an inappropriate scan of the empty
queue was performed looking for buffer space to free up.
Submitted by: Matthew Dillon <dillon@apollo.backplane.com>
Oh, I forgot to mention: this driver also works on FreeBSD/alpha (big
thanks to Andrew Gallatin). And there is a 2.2.x version available for
those who stubbornly refuse to upgrade.
Networks Tigon 1 and Tigon 2 chipsets. There are a _lot_ of OEM'ed
gigabit ethernet adapters out there which use the Alteon chipset so
this driver covers a fair amount of hardware. I know that it works with
the Alteon AceNIC, 3Com 3c985 and Netgear GA620, however it should also
work with the DEC/Compaq EtherWORKS 1000, Silicon Graphics Gigabit
ethernet board, NEC Gigabit Ethernet board and maybe even the IBM and
and Sun boards. The Netgear board is the cheapest (~$350US) but still
yields fairly good performance.
Support is provided for jumbo frames with all adapters (just set the
MTU to something larger than 1500 bytes), as well as hardware multicast
filtering and vlan tagging (in conjunction with the vlan support in
-current, which I should merge into -stable soon). There are some hooks
for checksum offload support, but they're turned off for now since
FreeBSD doesn't have an officially sanctioned way to support checksum
offloading (yet).
I have not added the 'device ti0' entry to GENERIC since the driver
with all the firmware compiled in is quite large, and it doesn't really
fit into the category of generic hardware.
1. Switch to pmap_TLB_invalidate from invltlb, eliminating a full TLB
flush where a single-page flush suffices. (Also, this eliminates some
unnecessary IPIs.)
2. Use "loadandclear" to update the pte, eliminating a race condition
on SMPs.
Change #2 should be committed to -STABLE.
unallocated parts of the last page when the file ended on a frag
but not a page boundary.
Delimitted by tags PRE_MATT_MMAP_EOF and POST_MATT_MMAP_EOF,
in files alpha/alpha/pmap.c i386/i386/pmap.c nfs/nfs_bio.c vm/pmap.h
vm/vm_page.c vm/vm_page.h vm/vnode_pager.c miscfs/specfs/spec_vnops.c
ufs/ufs/ufs_readwrite.c kern/vfs_bio.c
Submitted by: Matt Dillon <dillon@freebsd.org>
Reviewed by: Alan Cox <alc@freebsd.org>
in my tree for 12+ months, and I just noticed that NetBSD have (I think,
I've just seen the commit, not the change) just zapped it there.
It wasn't in the options files or LINT either.
Repeatedly-tripped-over-by: Vallo Kallaste <vallo@matti.ee>
When VINUMDEBUG is set, free any memory found still
allocated.
Only log errors if DEBUG_EXITFREE is set.
NetBSD compatible.
Add parameter to fo_read and fo_write. (The only flag FOF_OFFSET mean that
the offset is set in the struct uio).
Factor out some common code from read/pread/write/pwrite syscalls.
1. Don't bother checking object->ref_count == 1 in order to set
OBJ_ONEMAPPING. It's a waste of time. If object->ref_count == 1,
vm_map_entry_delete will "run-down" the object and its pages.
2. If object->ref_count == 1, ignore OBJ_ONEMAPPING. Wait for
vm_map_entry_delete to "run-down" the object and its pages.
Otherwise, we're calling two different procedures to delete
the object's pages.
Note: "vmstat -s" will once again show a non-zero value
for "pages freed by exiting processes".
board versions with no BIOS. Separate mailbox interrupts from
IOCB interrupts. Read OUTMAILBOX5 while RISC_INT is active- not
after you clear it (potential race condition). Clear out older broken
BIG_ENDIAN goop. Don't negotiate narrow/async for LVD busses at startup
if already in LVD mode. Note usage of presumptive 1040C revision. For
all the LIP, PDB Changed, Loop UP/DOWN async events, mark fw state
as unknown as well as marking the need to do a getpdb on targets- after
a LIP for certain the f/w has to do PRLI/PLOGI for all targets again
and marking f/w state as unknown gives us a fighting chance to (start
to) hold up for that to complete.
that will SBusify an isp header or the lun/target portions of a request IOCB-
and have these only valid iff __sparc__ (no non-sparc SBus machine that *I*
know about).
the address of the ps_strings structure to the process via %ebx.
For other kinds of binaries, %ebx is still zeroed as before.
Submitted by: Thomas Stephens <tas@stephens.org>
Reviewed by: jdp
In particular, replace the unused field pmap::pm_flag by pmap::pm_active,
which is a bit mask representing which processors have the pmap activated.
(Thus, it is a simple Boolean on UPs.)
Also, eliminate an unnecessary memory reference from cpu_switch()
in swtch.s.
Assisted by: John S. Dyson <dyson@iquest.net>
Tested by: Luoqi Chen <luoqi@watermarkgroup.com>,
Poul-Henning Kamp <phk@critter.freebsd.dk>