dragonfly.git
20 years agoCompile the kernel with -fno-common to guarentee that we do not accidently
Matthew Dillon [Mon, 16 Feb 2004 19:57:39 +0000 (19:57 +0000)]
Compile the kernel with -fno-common to guarentee that we do not accidently
put non-extern'd variable declarations in header files.  Our module loader
no longer deals with commons so duplicate declarations can cause kldloaded
modules to fail, and its sloppy programming anyway.

20 years agoRemove common variable to get ready for -fno-common.
Matthew Dillon [Mon, 16 Feb 2004 19:56:26 +0000 (19:56 +0000)]
Remove common variable to get ready for -fno-common.

20 years agoAdd a dependant include.
Matthew Dillon [Mon, 16 Feb 2004 19:49:28 +0000 (19:49 +0000)]
Add a dependant include.

20 years agoRemove duplicate bioops declaration in preparation for -fno-common
Matthew Dillon [Mon, 16 Feb 2004 19:48:51 +0000 (19:48 +0000)]
Remove duplicate bioops declaration in preparation for -fno-common

20 years agoRemove duplicate declarations in preparation for adding -fno-common to
Matthew Dillon [Mon, 16 Feb 2004 19:43:28 +0000 (19:43 +0000)]
Remove duplicate declarations in preparation for adding -fno-common to
the kernel compile.

20 years agobuftimetoken must be declared in a .c file.
Matthew Dillon [Mon, 16 Feb 2004 19:37:48 +0000 (19:37 +0000)]
buftimetoken must be declared in a .c file.

20 years agoAdd BUS_DMA_ZERO flag to bus_dmamem_alloc.
Joerg Sonnenberger [Mon, 16 Feb 2004 19:35:53 +0000 (19:35 +0000)]
Add BUS_DMA_ZERO flag to bus_dmamem_alloc.

Add support for M_ZERO to contigmalloc inspired by rev. 1.21 and 1.23 of by
mux to FreeBSD's vm_contig.c

20 years agoMake buftimetoken an extern so it is not declared as a common variable.
Matthew Dillon [Mon, 16 Feb 2004 19:09:31 +0000 (19:09 +0000)]
Make buftimetoken an extern so it is not declared as a common variable.
Modules were compiling up with their own local copy of buftimetoken rather
then linking against the kernel's buftimetoken, causing modules to crash.

Reported-by: Adam K Kirchhoff <adamk@voicenet.com>
20 years agoAdd pci_get_ether and pci_set_ether for FreeBSD 5 compatibility
Joerg Sonnenberger [Mon, 16 Feb 2004 18:51:01 +0000 (18:51 +0000)]
Add pci_get_ether and pci_set_ether for FreeBSD 5 compatibility

20 years agoAdd PCIR_BAR and PCIR_BARS for FreeBSD 5 compatibility
Joerg Sonnenberger [Mon, 16 Feb 2004 18:49:55 +0000 (18:49 +0000)]
Add PCIR_BAR and PCIR_BARS for FreeBSD 5 compatibility

20 years agoAdd device_is_attached to allow a driver to check wether a given device
Joerg Sonnenberger [Mon, 16 Feb 2004 18:48:03 +0000 (18:48 +0000)]
Add device_is_attached to allow a driver to check wether a given device
was or was not succesfully attached to the device tree.

20 years agoInstall new .mk files (/usr/src/share/mk) as part of the upgrade_etc target.
Matthew Dillon [Mon, 16 Feb 2004 05:14:03 +0000 (05:14 +0000)]
Install new .mk files (/usr/src/share/mk) as part of the upgrade_etc target.

20 years agoCleanup and augment the cpu synchronization API a bit. Embed the maxcount
Matthew Dillon [Sun, 15 Feb 2004 05:15:27 +0000 (05:15 +0000)]
Cleanup and augment the cpu synchronization API a bit.  Embed the maxcount
in the structure rather then returning it and requiring it to be passed
again, and document the procedures a bit more.

20 years agoSplit the IPIQ messaging out of lwkt_thread.c and move it to its own file,
Matthew Dillon [Sun, 15 Feb 2004 02:14:42 +0000 (02:14 +0000)]
Split the IPIQ messaging out of lwkt_thread.c and move it to its own file,
lwkt_ipiq.c.

Add a MI synchronous cpu rendezvous API lwkt_cpusync_*().  This API allows the
kernel to synchronize an operation across any number of cpus.  Multiple cpus
can initiate synchronization operations simultaniously without creating a
deadlock.  The API utilizes the IPI messaging core and guarentees that
other synchronization and IPI messaging operations will continue to work
during any given synchronization op.  The API is a spin-blocking API, meaning
that it will not switch threads and can be used by mainline code, interrupts,
and other sensitive code.

This API is intended to replace smp_rendezvous(), Xcpustop, and other
hardwired IPI ops.  It will also be used to fix our TLB shootdown code.

As of this commit the API has not yet been connected to anything and has
been tested only a little.

20 years agoatomic_*_*_nonlocked() inlines are not MP locked. Remove the MPLOCKED
Matthew Dillon [Sat, 14 Feb 2004 22:26:43 +0000 (22:26 +0000)]
atomic_*_*_nonlocked() inlines are not MP locked.  Remove the MPLOCKED
prefix for these ops.

20 years agoRemove old in_cksum.c and in_cksum.h (they were moved to netinet and sys
Matthew Dillon [Sat, 14 Feb 2004 21:13:54 +0000 (21:13 +0000)]
Remove old in_cksum.c and in_cksum.h (they were moved to netinet and sys
respectively).

20 years agoMove <machine/in_cksum.h> to <sys/in_cksum.h>. This file is now platform
Matthew Dillon [Sat, 14 Feb 2004 21:15:34 +0000 (21:15 +0000)]
Move <machine/in_cksum.h> to <sys/in_cksum.h>.  This file is now platform
independant.  If we want to add extreme machine specialization later on
then sys/in_cksum.h will #include machine/in_cksum.h.

Move i386/i386/in_cksum.c to netinet/in_cksum.c.  Note that netinet/in_cksum.c
already existed but was not used by the build system at all.  The move
overwrites it.  The new in_cksum.c is a portable, complete rewrite which
references core assembly (procedure call) to do 32-bit-aligned work.  See
also i386/i386/in_cksum2.s.

20 years agoCreate a new machine type, cpumask_t, to represent a mask of cpus, and
Matthew Dillon [Sat, 14 Feb 2004 20:34:33 +0000 (20:34 +0000)]
Create a new machine type, cpumask_t, to represent a mask of cpus, and
replaces earlier uses of __uint32_t for cpu masks with cpumask_t.

20 years agoGet rid of some old cruft and add a failsafe for M_WAITOK which guarentees
Matthew Dillon [Sat, 14 Feb 2004 20:02:28 +0000 (20:02 +0000)]
Get rid of some old cruft and add a failsafe for M_WAITOK which guarentees
that malloc() will not attempt to reuse pages from the VM page cache if
called with M_WAITOK from a preemption.

If M_WAITOK is used in a malloc called from a preemption, and we would block,
do an initial yield instead of blocking.  This does not effect sequencing
of the preemption since either will cause the preemption to return and the
blocking thread to be scheduled normally, but yield as a first go will get
the cpu back more quickly.

20 years agoChange M_NOWAIT to M_WAITOK. This does not fix any known issues but it
Matthew Dillon [Sat, 14 Feb 2004 19:58:50 +0000 (19:58 +0000)]
Change M_NOWAIT to M_WAITOK.  This does not fix any known issues but it
makes the code properly conform to the malloc API.  Using M_NOWAIT
during booting to mean 'if we block here we would deadlock during boot' but
then assuming that the return value is always non-NULL is worse then
using M_WAITOK and potentially allowing the system to deadlock but, not
really, because there is plenty of memory available during booting.

20 years agoActively manage cam rescan timeouts in the usb subsystem. This does not
Matthew Dillon [Sat, 14 Feb 2004 19:56:28 +0000 (19:56 +0000)]
Actively manage cam rescan timeouts in the usb subsystem.  This does not
fix any known issues but it should make things a bit more robust.

20 years agoAdd PCI busses to the device list in bus number order to make debug output
Matthew Dillon [Sat, 14 Feb 2004 19:54:40 +0000 (19:54 +0000)]
Add PCI busses to the device list in bus number order to make debug output
more understandable.

20 years agogcc2 doesn't like ary[] inside structures. Add __ARRAY_ZERO to
Matthew Dillon [Sat, 14 Feb 2004 17:55:50 +0000 (17:55 +0000)]
gcc2 doesn't like ary[] inside structures.  Add __ARRAY_ZERO to
sys/cdefs.h to take care of the differences between GCC2 and GCC3.

20 years agoC99 specify ary[] instead of ary[0] in structure.
Matthew Dillon [Sat, 14 Feb 2004 17:47:41 +0000 (17:47 +0000)]
C99 specify ary[] instead of ary[0] in structure.

Obtained-from: FreeBSD-5
Submitted-by: YONETANI Tomokazu <qhwt+dragonfly-submit@les.ath.cx>
20 years agoReplace K&R style functions with ANSI C style functions.
Eirik Nygaard [Sat, 14 Feb 2004 12:14:30 +0000 (12:14 +0000)]
Replace K&R style functions with ANSI C style functions.

20 years agoRemove my middle initial.
Hiten Pandya [Sat, 14 Feb 2004 03:54:36 +0000 (03:54 +0000)]
Remove my middle initial.

20 years agoFix forgotten lwkt_send_ipiq() API update. cpuid -> globaldata pointer
Matthew Dillon [Sat, 14 Feb 2004 02:18:25 +0000 (02:18 +0000)]
Fix forgotten lwkt_send_ipiq() API update.  cpuid -> globaldata pointer

Reported-by: Adam K Kirchhoff <adamk@voicenet.com>
20 years agoRewrite the IP checksum code. Get rid of all the inline assembly garbage,
Matthew Dillon [Sat, 14 Feb 2004 02:09:28 +0000 (02:09 +0000)]
Rewrite the IP checksum code.  Get rid of all the inline assembly garbage,
get rid of old APIs that are no longer used, and build a new 'core' checksum
function in C capable of handling any alignment.  Add an assembly procedure
(in its own file) for handling large blocks of 32-bit aligned data.

This new code is better suited for modern cpus and should at least as good
as the previous code, and it is far more portable.

Note that in_cksum_hdr() still assumes 32 bit alignment.  This will be fixed
soon.

20 years agoFix warnings about casting const pointers.
Joerg Sonnenberger [Fri, 13 Feb 2004 22:12:34 +0000 (22:12 +0000)]
Fix warnings about casting const pointers.
Adjust the pccard_get_IVAR to return the wanted value, instead of
writing it to a result pointer. This fellows to practice of the other
bus interfaces.
Adjust pccard_get_ethaddr to return a pointer to the actual hardware
address instead of interpreting result as pointer to a memory region.

20 years agoSync if_ed with FreeBSD current
Joerg Sonnenberger [Fri, 13 Feb 2004 21:15:12 +0000 (21:15 +0000)]
Sync if_ed with FreeBSD current

20 years agoOops. Forgot to renumber the %N's in the macros in the last commit.
Matthew Dillon [Fri, 13 Feb 2004 19:37:16 +0000 (19:37 +0000)]
Oops.  Forgot to renumber the %N's in the macros in the last commit.

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Fri, 13 Feb 2004 19:06:15 +0000 (19:06 +0000)]
Add __DragonFly__

20 years agobio ops can be initiated from the buffer cache, td_proc may be NULL here.
Matthew Dillon [Fri, 13 Feb 2004 18:52:35 +0000 (18:52 +0000)]
bio ops can be initiated from the buffer cache, td_proc may be NULL here.
This is a degenerate case from earlier conversion work.  cred is not used
here so td_proc can be NULL.

Reported-by: David Rhodus <drhodus@machdep.com>
20 years agoUse "iq" instead of "ir" for the register constraint. "iq" means 'an
Matthew Dillon [Fri, 13 Feb 2004 18:44:42 +0000 (18:44 +0000)]
Use "iq" instead of "ir" for the register constraint.  "iq" means 'an
integer constant or one of %ax,%bx,%cx, or %dx.  The prior use of "ir"
could cause GCC to attempt to use a 'low byte' accessor on a register
that cannot be accessed that way, such as '%si' (e.g. %sil).  I see no
need to get fancy so I am just applying %iq to all the atomic instructions.
It's good enough.

Reported-by: YONETANI Tomokazu <qhwt+dragonfly-bugs@les.ath.cx>
20 years agoAdd __DragonFly__
Joerg Sonnenberger [Fri, 13 Feb 2004 17:45:51 +0000 (17:45 +0000)]
Add __DragonFly__

20 years agoFix # style comment in file using the C prepocessor
Joerg Sonnenberger [Fri, 13 Feb 2004 16:13:44 +0000 (16:13 +0000)]
Fix # style comment in file using the C prepocessor

20 years agoFix broken string literals
Joerg Sonnenberger [Fri, 13 Feb 2004 13:43:21 +0000 (13:43 +0000)]
Fix broken string literals

20 years agoAdd -D__FreeBSD__ for buildworld (vacation pulls source files from
Matthew Dillon [Fri, 13 Feb 2004 03:53:37 +0000 (03:53 +0000)]
Add -D__FreeBSD__ for buildworld (vacation pulls source files from
contrib/sendmail)

20 years agoConvert __FreeBSD__ tests to __FreeBSD__ and __DragonFly__ tests
Matthew Dillon [Fri, 13 Feb 2004 03:49:50 +0000 (03:49 +0000)]
Convert __FreeBSD__ tests to __FreeBSD__ and  __DragonFly__ tests

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Fri, 13 Feb 2004 02:44:49 +0000 (02:44 +0000)]
Add __DragonFly__

20 years agoFix wrong conditional from last commit
Joerg Sonnenberger [Fri, 13 Feb 2004 02:36:40 +0000 (02:36 +0000)]
Fix wrong conditional from last commit

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Fri, 13 Feb 2004 01:45:15 +0000 (01:45 +0000)]
Add __DragonFly__

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Fri, 13 Feb 2004 01:33:19 +0000 (01:33 +0000)]
Add __DragonFly__

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Fri, 13 Feb 2004 01:23:57 +0000 (01:23 +0000)]
Add __DragonFly__

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Fri, 13 Feb 2004 01:04:15 +0000 (01:04 +0000)]
Add __DragonFly__

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Fri, 13 Feb 2004 00:40:38 +0000 (00:40 +0000)]
Add __DragonFly__

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Fri, 13 Feb 2004 00:25:17 +0000 (00:25 +0000)]
Add __DragonFly__

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Thu, 12 Feb 2004 23:36:28 +0000 (23:36 +0000)]
Add __DragonFly__

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Thu, 12 Feb 2004 23:33:27 +0000 (23:33 +0000)]
Add __DragonFly__

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Thu, 12 Feb 2004 23:14:05 +0000 (23:14 +0000)]
Add __DragonFly__

20 years agoAlways include net/bpf.h
Joerg Sonnenberger [Thu, 12 Feb 2004 23:04:08 +0000 (23:04 +0000)]
Always include net/bpf.h

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Thu, 12 Feb 2004 22:38:59 +0000 (22:38 +0000)]
Add __DragonFly__

20 years agoAdd __DragonFly__
Joerg Sonnenberger [Thu, 12 Feb 2004 22:35:47 +0000 (22:35 +0000)]
Add __DragonFly__

20 years ago* Update function defines to match up with the work from
David Rhodus [Thu, 12 Feb 2004 20:43:57 +0000 (20:43 +0000)]
* Update function defines to match up with the work from
this moring as to fix the kernel build process.

20 years agoAdd accessor for CIS4 and change some functions to take const char* arguments
Joerg Sonnenberger [Thu, 12 Feb 2004 14:50:33 +0000 (14:50 +0000)]
Add accessor for CIS4 and change some functions to take const char* arguments

20 years agoProbe via CIS lookup
Joerg Sonnenberger [Thu, 12 Feb 2004 12:08:54 +0000 (12:08 +0000)]
Probe via CIS lookup

20 years agoChange lwkt_send_ipiq() and lwkt_wait_ipiq() to take a globaldata_t instead
Matthew Dillon [Thu, 12 Feb 2004 06:57:49 +0000 (06:57 +0000)]
Change lwkt_send_ipiq() and lwkt_wait_ipiq() to take a globaldata_t instead
of a cpuid.  This is part of an ongoing cleanup to use globaldata_t's to
reference other cpus rather then their cpu numbers, reducing the number of
serialized memory indirections required in a number of code paths and
making more context available to the target code.

20 years agosys/dev __FreeBSD__ -> __DragonFly__ cleanups.
Matthew Dillon [Thu, 12 Feb 2004 00:00:19 +0000 (00:00 +0000)]
sys/dev __FreeBSD__ -> __DragonFly__ cleanups.

Submitted-by: Aaron Malone <aaron@munge.net>
20 years agoactivate any tick-delayed software interrupts in the per-cpu hardclock
Matthew Dillon [Wed, 11 Feb 2004 21:47:51 +0000 (21:47 +0000)]
activate any tick-delayed software interrupts in the per-cpu hardclock
by calling setdelayed().  This was accidently removed when the clock code
was revamped.

20 years agoisa_wrongintr() cannot depend on the (void *) unit argument pointing to
Matthew Dillon [Wed, 11 Feb 2004 18:34:40 +0000 (18:34 +0000)]
isa_wrongintr() cannot depend on the (void *) unit argument pointing to
a degenerate structure containing the irq, beacuse isa_wrongintr() is
called only when the wrong APIC vector is used vs the one we thought we
programmed.

This commit adjusts isa_wrongintr() to not depend on the unit argument,
fixing a crash that used to occur in the procedure.  It does not 'fix' the
interrupt routing bug responsible for causing the entry into isa_wrongintr(),
which is typically due to broken MP tables.  But at least the problem gets
reported.  FreeBSD-4.x just locks up without any error message in similar
situations.

20 years ago__FreeBSD__ to __DragonFly__
Joerg Sonnenberger [Wed, 11 Feb 2004 17:46:33 +0000 (17:46 +0000)]
__FreeBSD__ to __DragonFly__

20 years agoSync with FreeBSD's pccarddevs
Joerg Sonnenberger [Wed, 11 Feb 2004 17:34:08 +0000 (17:34 +0000)]
Sync with FreeBSD's pccarddevs

20 years agoFix gcc3 compilation
Joerg Sonnenberger [Wed, 11 Feb 2004 15:24:30 +0000 (15:24 +0000)]
Fix gcc3 compilation

20 years agoAdd defined(__FreeBSD__) and defined(__DragonFly__) where appropriate
Joerg Sonnenberger [Wed, 11 Feb 2004 15:17:26 +0000 (15:17 +0000)]
Add defined(__FreeBSD__) and defined(__DragonFly__) where appropriate

20 years agoAdd defined(__FreeBSD__) and defined(__DragonFly__) where appropiriate.
Joerg Sonnenberger [Wed, 11 Feb 2004 15:13:06 +0000 (15:13 +0000)]
Add defined(__FreeBSD__) and defined(__DragonFly__) where appropiriate.

20 years agoAdd missing */ on the end of a comment.
Eirik Nygaard [Wed, 11 Feb 2004 15:05:08 +0000 (15:05 +0000)]
Add missing */ on the end of a comment.

20 years agoFix gcc3 compilation
Joerg Sonnenberger [Wed, 11 Feb 2004 15:05:03 +0000 (15:05 +0000)]
Fix gcc3 compilation

20 years agoAllow choosing different GCC versions for buildworld and buildkernel as
Joerg Sonnenberger [Wed, 11 Feb 2004 11:11:24 +0000 (11:11 +0000)]
Allow choosing different GCC versions for buildworld and buildkernel as
requested by Simon "corecode" Schubert for snapshot builds.

20 years agoUpdate the Broadcom Gigabit Ethernet driver and the Broadcom
Hiten Pandya [Tue, 10 Feb 2004 21:14:14 +0000 (21:14 +0000)]
Update the Broadcom Gigabit Ethernet driver and the Broadcom
Gigabit PHY.  Revision numbers that appear below are taken from
if_bge.c.

ChangeLog:

Changes taken from FreeBSD RELENG_4:

* (1.3.2.23) distinguish PCS encoding error events
  from actual link state change events.

* (1.3.2.24) support for the Broadcom 5705.
  Please lookup the FreeBSD CVS Logs for if_bge.c
  for more information about this change.  This
  requires update of ``miidevs''.

* (1.3.2.25) properly set the mbuf space size for
  the BCM5704 NICs to fix watchdog timeouts on Dell
  1750 servers, and fix spurious 'gigabit link up'
  messages due to not ignoring the 'MI_COMPLETE' bit
  in the MAC status register.

* (1.3.2.26) BGE_HCC_TX_MAX_COAL_BDS_INT is at offset
  0x3C24, not at 0x3C34.

* (1.3.2.27 and 1.3.2.28 already merged by me in
   previous commits to if_bge.c).

* (1.3.2.29) Dell 2650 no link led problem.  This
  requires update to the PHY (brgphy.c).

* (1.3.2.30 was committed by me, which was fix to
  typo in a comment).

Changes from FreeBSD HEAD:

* Fix a typo when setting wirespeed in the Broadcom
  PHY module (rev. 1.27 HEAD of brgphy.c).

* Add PCI ID for yet another bge chip; the Altima 1002
  (rev 1.62 HEAD of if_bge.c).

* Update for if_xname (if_name -> if_dname).

All of the changes highlighted above are taken from FreeBSD
and the $FreeBSD$ tag was updated accordingly.  This should
fix most of the annoying Broadcom Gig-E bugs as of this date.

Tested by: dillon, drhodus

20 years agoMerge: FreeBSD (RELENG_4) netstat/inet.c rev. 1.37.2.11
Hiten Pandya [Tue, 10 Feb 2004 16:35:59 +0000 (16:35 +0000)]
Merge: FreeBSD (RELENG_4) netstat/inet.c rev. 1.37.2.11

Print the correct ICMP statistics for "no return routes".

20 years agoMerge: FreeBSD (RELENG_4) i386/isa/psm.c rev. 1.23.2.7
Hiten Pandya [Tue, 10 Feb 2004 15:56:38 +0000 (15:56 +0000)]
Merge: FreeBSD (RELENG_4) i386/isa/psm.c rev. 1.23.2.7

Attempt a reset of the mouse controller twice; this helps
pierce through some KVM switches.  The second reset is
non-fatal.

20 years agoMerge: FreeBSD (RELENG_4) isp_ioctl.h 1.1.2.5
Hiten Pandya [Tue, 10 Feb 2004 15:51:56 +0000 (15:51 +0000)]
Merge: FreeBSD (RELENG_4) isp_ioctl.h 1.1.2.5

Fix broken _IOR usage.

20 years agoMerge: FreeBSD (RELENG_4) uipc_socket.c rev. 1.68.2.24
Hiten Pandya [Tue, 10 Feb 2004 15:45:43 +0000 (15:45 +0000)]
Merge: FreeBSD (RELENG_4) uipc_socket.c rev. 1.68.2.24

Don't allow listen() on already connected sockets, otherwise
the socket enters a bad state which results in a panic.  In
this case, solisten() returns EINVAL as POSIX mandates.

20 years agoMerge from FreeBSD:
Hiten Pandya [Tue, 10 Feb 2004 15:31:47 +0000 (15:31 +0000)]
Merge from FreeBSD:

  * Add a ratelimited message:
  "maxproc limit exceeded by uid %i, please see tuning(7) and login.conf(5)."

    This message will be triggered whenever a user hits his/her maxproc limit
    the systemwide maxproc limit is reached.

20 years agoScore a duh-point for myself. Change the remaining lines for the
Hiten Pandya [Tue, 10 Feb 2004 15:28:24 +0000 (15:28 +0000)]
Score a duh-point for myself.  Change the remaining lines for the
NEWCARD update.

Submitted by: Jeroen <koffieyahoo@hotmail.com>

20 years agoUpdate maintainer contact information.
Hiten Pandya [Tue, 10 Feb 2004 15:00:00 +0000 (15:00 +0000)]
Update maintainer contact information.

20 years agoNEWCARD: change `device card' to `device pccard'.
Hiten Pandya [Tue, 10 Feb 2004 14:59:20 +0000 (14:59 +0000)]
NEWCARD: change `device card' to `device pccard'.

20 years agofix typo
Robert Garrett [Tue, 10 Feb 2004 13:46:07 +0000 (13:46 +0000)]
fix typo

20 years agoMerge from FreeBSD:
Hiten Pandya [Tue, 10 Feb 2004 13:27:55 +0000 (13:27 +0000)]
Merge from FreeBSD:

Warn about partitions that overlap with the MBR, and add
the ability to rectify it automatically.

20 years agoInitial backport of NEWCARD from FreeBSD 5.
Joerg Sonnenberger [Tue, 10 Feb 2004 07:55:47 +0000 (07:55 +0000)]
Initial backport of NEWCARD from FreeBSD 5.

The included version is from end of November 2002 with the exception of
bus/pccard/pccarddevs which is from November 2003.

Thanks to Warner Losh and the other folks for NEWCARD.

20 years agoUse a globaldata_t instead of a cpuid in the lwkt_token structure. The
Matthew Dillon [Tue, 10 Feb 2004 07:34:43 +0000 (07:34 +0000)]
Use a globaldata_t instead of a cpuid in the lwkt_token structure.  The
LWKT subsystem already uses globaldata_t instead of cpuid for its thread
td_gd reference, and the IPI messaging code will soon be converted to take
a globaldata_t instead of a cpuid as well.  This reduces the number of
memory indirections we have to make to access the per-cpu globaldata space
in various procedures.

20 years agoConvert mbuf M_ flags into malloc M_ flags when calling malloc().
Matthew Dillon [Tue, 10 Feb 2004 07:28:41 +0000 (07:28 +0000)]
Convert mbuf M_ flags into malloc M_ flags when calling malloc().

20 years agoThe logical pci busses must attach to the physical pci bridges using the
Matthew Dillon [Tue, 10 Feb 2004 07:26:06 +0000 (07:26 +0000)]
The logical pci busses must attach to the physical pci bridges using the
same pci identifier used for the bridge.  If a machine has multiple
motherboard PCI bridges and also has a pci-to-pci bridge hanging off one
of those bridges, it was possible for the pci-to-pci bridge to be handed
an identifier for a motherboard pci bridge bus number which has not yet
been probed.  Then, later on, when the motherboard pci bridge bus is
probed the system believes that it has already been probed and refuses to
scan it.

This is why pcib #1, which gets added *AFTER* pcib #2 on a DELL 2550 does
not appear to exist on a DFly or FreeBSD-4 box.  pcib #1 is what the
BGE network driver is hanging off of on a DELL 2550.

This commit uses the secondary bus identifier as the starting unit number
for the attach rather then -1 (which scans forward from unit 0).  I am
not entirely sure that this is the correct fix.

20 years agoAdd lost -D__FreeBSD__
Joerg Sonnenberger [Tue, 10 Feb 2004 07:25:32 +0000 (07:25 +0000)]
Add lost -D__FreeBSD__

20 years agoIt seems I missed a directory when doing the __FreeBSD__ -> __DragonFly__
Robert Garrett [Tue, 10 Feb 2004 02:59:44 +0000 (02:59 +0000)]
It seems I missed a directory when doing the __FreeBSD__ -> __DragonFly__
conversion. This I believe makes world buildable with gcc3

NOTE:

    The things in the contrib areas will generate warnings about
__FreeBSD__ being redefined for the moment. To correct that
will require moving the files to where they are built from, and
correcting them there. Then patches will be sent to the owners of
the files, and finally we can update with corrected sources and
all will be back to normal. I will be going through these one by
one and moving the files that need to be fixed into place.
But I expect this to take some time.

20 years agodevsw() does not exist in DFly. use dev_dflags() to extract d_flags.
Matthew Dillon [Tue, 10 Feb 2004 00:50:03 +0000 (00:50 +0000)]
devsw() does not exist in DFly.  use dev_dflags() to extract d_flags.

20 years agoMerge from FreeBSD:
Hiten Pandya [Mon, 9 Feb 2004 21:51:28 +0000 (21:51 +0000)]
Merge from FreeBSD:

Don't check block number overflow for D_MEM;
/dev/fwmem needs 48-bit offsets.

20 years agoSplit the lwkt_token code out of lwkt_thread.c. Give it its own file.
Matthew Dillon [Mon, 9 Feb 2004 21:13:18 +0000 (21:13 +0000)]
Split the lwkt_token code out of lwkt_thread.c.  Give it its own file.
No operational changes.

20 years agoFix a DFly buildworld from 4.x issue. Only set HAVE_STDINT_H for
Matthew Dillon [Mon, 9 Feb 2004 20:12:05 +0000 (20:12 +0000)]
Fix a DFly buildworld from 4.x issue.  Only set HAVE_STDINT_H for
__DragonFly__, since FreeBSD-4 does not have it.

20 years agoAdd a locked-bus-cycle add to memory test
Matthew Dillon [Mon, 9 Feb 2004 18:15:35 +0000 (18:15 +0000)]
Add a locked-bus-cycle add to memory test

20 years agoAdd some basic in-pipeline instruction timing tests. Instruction timings
Matthew Dillon [Mon, 9 Feb 2004 18:08:57 +0000 (18:08 +0000)]
Add some basic in-pipeline instruction timing tests.  Instruction timings
depend on many things, especially the pipeline, memory queues, and register
and memory ordering.  Timings are not absolute and should be used for
reference only.

20 years agoInclude Makefile.miidevs, so we can just do:
Hiten Pandya [Mon, 9 Feb 2004 16:43:15 +0000 (16:43 +0000)]
Include Makefile.miidevs, so we can just do:

make miidevs.h

Instead of:

make -f Makefile.miidevs miidevs.h

20 years agoUpdate to devlist2h.awk and friends:
Hiten Pandya [Mon, 9 Feb 2004 16:41:33 +0000 (16:41 +0000)]
Update to devlist2h.awk and friends:

* Print $DragonFly$ instead of $FreeBSD$
* Comment out the original $FreeBSD$
* Add $DragonFly$ to miidevs.h

20 years agoMerge from FreeBSD:
Hiten Pandya [Mon, 9 Feb 2004 14:03:41 +0000 (14:03 +0000)]
Merge from FreeBSD:

Skip all devices whose header type  is > 2; '0' is normal, '1'
is a PCI Bridge and '2' is a Cardbus bridge.  Those are PCI 2.2
defines.

20 years agoremove unwanted __DragonFly__ >= tests
Robert Garrett [Mon, 9 Feb 2004 12:03:36 +0000 (12:03 +0000)]
remove unwanted __DragonFly__ >= tests

20 years ago__FreeBSD__ -> __DragonFly__
Robert Garrett [Sun, 8 Feb 2004 10:59:22 +0000 (10:59 +0000)]
__FreeBSD__ -> __DragonFly__

20 years agoThe last commit was noticed by Yonetani Tomokazu
Robert Garrett [Sun, 8 Feb 2004 10:54:25 +0000 (10:54 +0000)]
The last commit was noticed by Yonetani Tomokazu

20 years agoFix a couple of typos that slipped in
Robert Garrett [Sun, 8 Feb 2004 10:51:18 +0000 (10:51 +0000)]
Fix a couple of typos that slipped in

20 years agoPatch this file to allow the crossbuild to work again
Robert Garrett [Sun, 8 Feb 2004 10:48:30 +0000 (10:48 +0000)]
Patch this file to allow the crossbuild to work again
if all my tests are correct, anyway.

thanks expec to Ed Germain

20 years agoMerge from FreeBSD:
Hiten Pandya [Sun, 8 Feb 2004 07:10:46 +0000 (07:10 +0000)]
Merge from FreeBSD:

Replace an outb() with a DELAY(1) during the test for configuration
mechanism #1.  This fixes probing for PCI on some systems.