dragonfly.git
13 years agoMerge branch 'vendor/GCC44'
Sascha Wildner [Mon, 4 Apr 2011 00:55:42 +0000 (02:55 +0200)]
Merge branch 'vendor/GCC44'

13 years agoUpgrade GCC from 4.4.2 to 4.4.5 on the vendor branch.
Sascha Wildner [Mon, 4 Apr 2011 00:45:07 +0000 (02:45 +0200)]
Upgrade GCC from 4.4.2 to 4.4.5 on the vendor branch.

13 years agobinutils221: Fix missing section start/end label generation
Matthew Dillon [Sun, 3 Apr 2011 07:23:42 +0000 (00:23 -0700)]
binutils221: Fix missing section start/end label generation

* The code to generate section __start_set and __end_set symbols
  was using exp_provide() instead of exp_assign(), and exp_provide()
  appears to silently discard the symbol due to being assigned to '.'
  (the origin).

  This resulted in the symbols not being generated in the output file.

* Change to using exp_assign() and pray.

13 years agoHAMMER VFS - Cleanup a swapcache hammer_vop_write() case
Matthew Dillon [Sun, 3 Apr 2011 01:55:53 +0000 (18:55 -0700)]
HAMMER VFS - Cleanup a swapcache hammer_vop_write() case

* Mark buffers created via write() B_NOTMETA if hammer's double buffer
  mode is enabled.  When both the hammer double buffer mode and swapcache
  is enabled this will cause the system to re-read the file from disk
  once (via the block device) before attempting to swapcache it.

13 years agoHAMMER VFS - Force reading from the block device when live dedup is enabled
Matthew Dillon [Sun, 3 Apr 2011 00:25:25 +0000 (17:25 -0700)]
HAMMER VFS - Force reading from the block device when live dedup is enabled

* Attempting to access the vnode's buffer cache is currently not MPSAFE
  and can cause crashes so don't try to do that.  Use the block device
  instead.

* It is suggested but not required that vfs.hammer.double_buffer mode also
  be enabled if you use vfs.hammer.live.deup.

13 years agoHAMMER VFS - Implement swapcache for HAMMER data in double_buffer mode
Matthew Dillon [Sun, 3 Apr 2011 00:16:15 +0000 (17:16 -0700)]
HAMMER VFS - Implement swapcache for HAMMER data in double_buffer mode

* Support swapcache data caching when HAMMER's double_buffer mode is enabled.
  Typically the following sysctls:

  vfs.hammer.double_buffer=1
  vm.swapcache.read_enable=1
  vm.swapcache.data_enable=1
  vm.swapcache.meta_enable=1 (optional)
  vm.swapcache.use_chflags=0 (optional - see man swapcache)

* This causes swapcache to attempt to cache file data from HAMMER
  filesystems stored via the block device instead of the individual
  file vnodes.

* This allows swapcache to more efficiently cache file data without
  vnode recycling from a limited kern.maxvnodes value getting in the way.

  If you have a large dataset spread across many smaller files which would
  normally overwhelm maxvnodes, and even on large systems handling very
  large data sets where you wish to cache the file data for some of the
  files (using use_chflags=1 mode), this makes it possible to cache ALL
  the file data AND meta-data on the SSD even though the related vnodes
  cached by the kernel get recycled.

* Whereas it may have been inefficient to turn on vm.swapcache.data_enable
  before, due to filesystem scans and such, it may now be possible to this
  feature on with double buffering also enabled.

  Note that you must still be cognizant of the aggregate amount of file
  data being accessed by your system if you have set use_chflags to 0, you
  simply no longer need to worry about how many files that data belongs to.

* Enabling HAMMER's double_buffer mode will reduce performance somewhat for
  the normal best-case file caching, but it will also greatly improve
  performance once you start blowing out your memory caches.

13 years agokernel - Check B_NOTMETA in buffer release code
Matthew Dillon [Sun, 3 Apr 2011 00:10:28 +0000 (17:10 -0700)]
kernel - Check B_NOTMETA in buffer release code

* When releasing the VM pages backing a buffer cache buffer if B_NOTMETA
  is set on the buffer attempt to move the pages to the VM page cache
  instead of leaving them on the active or inactive queue.

* This partially deals with the double data caching which occurs when
  HAMMER's double_buffer mode is enabled by shortening the life of
  the pages backing the secondary buffer(s).

13 years agobinutils221: Add arlex.l to the list of modified files.
Sascha Wildner [Sat, 2 Apr 2011 23:56:00 +0000 (01:56 +0200)]
binutils221: Add arlex.l to the list of modified files.

While here, sort the lists alphabetically.

13 years agobinutils221: Fix a warning.
Sascha Wildner [Sat, 2 Apr 2011 23:41:16 +0000 (01:41 +0200)]
binutils221: Fix a warning.

13 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 2 Apr 2011 23:09:35 +0000 (16:09 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

13 years agoCheck if the host system has the desired binutils for HOST_BINUTILSVER.
Sascha Wildner [Sat, 2 Apr 2011 23:06:12 +0000 (01:06 +0200)]
Check if the host system has the desired binutils for HOST_BINUTILSVER.

If not, fall back to the previous ones. This fixes buildworld for systems
that don't have binutils 2.21 installed at all (everthing that was last
upgraded before we added 2.21).

Reported-by: Ferruccio Zamuner <nonsolosoft@diff.org>
13 years agokernel - allow PG_NOTMETA to be set on regular files too
Matthew Dillon [Sat, 2 Apr 2011 23:05:58 +0000 (16:05 -0700)]
kernel - allow PG_NOTMETA to be set on regular files too

* Allow this flag to be set for VM pages associated with regular files
  too, the flag prevents the related VM page from being swapcache'd.

  The flag is set by HAMMER on normal file buffer cache buffers when
  double buffering is enabled to prevent swapcache from caching the
  data twice.

* This also fixes an issue when a large number of files exceeding the
  maxvnode limit are recycled, and double buffering is enabled along
  with vm.swapcache.data_enable.  We do not want swapcache to try to
  cache the pages via the vnode, instead we'd rather it cache them
  via the block device (whos vnode doesn't get recycled).

13 years agoHAMMER VFS - Bump the default hammer rev to 6
Matthew Dillon [Sat, 2 Apr 2011 22:45:35 +0000 (15:45 -0700)]
HAMMER VFS - Bump the default hammer rev to 6

* The default hammer rev is now 6, which is the directory filename hash
  algorithm.

13 years agoMerge branch 'master' of git://git.dragonflybsd.org/dragonfly
Peter Avalos [Sat, 2 Apr 2011 21:37:46 +0000 (11:37 -1000)]
Merge branch 'master' of git://git.dragonflybsd.org/dragonfly

13 years agoMerge branch 'vendor/DIFFUTILS'
Peter Avalos [Sat, 2 Apr 2011 21:33:20 +0000 (11:33 -1000)]
Merge branch 'vendor/DIFFUTILS'

13 years agoRemove the hack for loading x86_64 kernels linked with binutils >=2.20.
Sascha Wildner [Sat, 2 Apr 2011 21:31:17 +0000 (23:31 +0200)]
Remove the hack for loading x86_64 kernels linked with binutils >=2.20.

Now that both our binutils support CONSTANT, MAXPAGESIZE and
COMMONPAGESIZE, use those in the ldscript.

13 years agoRemove the version number from the diffutils dir.
Peter Avalos [Sat, 2 Apr 2011 21:18:21 +0000 (11:18 -1000)]
Remove the version number from the diffutils dir.

13 years agoRemove diffutils 2.8.1 from the vendor branch.
Peter Avalos [Sat, 2 Apr 2011 21:17:33 +0000 (11:17 -1000)]
Remove diffutils 2.8.1 from the vendor branch.

13 years agoSwitch the default binutils from 2.17 to 2.21.
Sascha Wildner [Sat, 2 Apr 2011 18:14:04 +0000 (20:14 +0200)]
Switch the default binutils from 2.17 to 2.21.

The optional binutils is now 2.20 and can be selected using 'binutils220'
for BINUTILSVER and/or WORLD_BINUTILSVER.

Please do a full buildworld/-kernel for upgrading.

13 years agoacpi/Osd: SCI_INT in FADT is the IRQ number on the system with 8259 (icu)
Sepherosa Ziehau [Sat, 2 Apr 2011 14:02:48 +0000 (22:02 +0800)]
acpi/Osd: SCI_INT in FADT is the IRQ number on the system with 8259 (icu)

MADT's interrupt source override entry, which only tells you how SCI is
wired to I/O APIC, does _not_ change SCI's IRQ number.

While I'm here, remove unused function.

13 years agoacpi/pci_link: Avoid sharing interrupt with SCI if possible
Sepherosa Ziehau [Sat, 2 Apr 2011 11:15:04 +0000 (19:15 +0800)]
acpi/pci_link: Avoid sharing interrupt with SCI if possible

Since ACPI SCI handler is time consuming, sharing its interrupt
with others may cause significant performance penalty.  SCI
interrupt is now shared if we can't find other resorts.

13 years agozlib: Eliminate unneeded diffs from vendor sources.
Peter Avalos [Sat, 2 Apr 2011 06:46:12 +0000 (20:46 -1000)]
zlib:  Eliminate unneeded diffs from vendor sources.

13 years agolibz: Use off_t instead of long.
Peter Avalos [Sat, 2 Apr 2011 07:43:16 +0000 (21:43 -1000)]
libz:  Use off_t instead of long.

This problem was triggered by clamav.  As the comment in zconf.h states,
we'd prefer to always define Z_HAVE_UNISTD_H, but libstand has some issues
with this, which is why we originally had the change to the vendor
source to include <unistd.h> in gzguts.h.

While we're here, there's no point in defining HAVE_MEMCPY in
Makefile.stand, since it's already defined elsewhere in zconf.h.

13 years agokernel - Fix fstatfs() and fstatvfs() when called from a null-mounted chroot()
Matthew Dillon [Fri, 1 Apr 2011 23:03:09 +0000 (16:03 -0700)]
kernel - Fix fstatfs() and fstatvfs() when called from a null-mounted chroot()

* These funtions were using the wrong starting mount pointer when calling
  cache_fullpath().  They were using the mount pointer for the open file's
  vnode instead of the overlay (null) mount pointer.

  This caused cache_fullpath() to believe the fd represented a file outside
  the chroot and return an error.

Reported-by: Francois Tigeot<ftigeot@wolfpond.org>:
13 years agoSync zoneinfo database with tzdata2011e from elsie.nci.nih.gov
Sascha Wildner [Fri, 1 Apr 2011 12:20:24 +0000 (14:20 +0200)]
Sync zoneinfo database with tzdata2011e from elsie.nci.nih.gov

africa:         8.28 -> 8.30
southamerica:   8.45 -> 8.47

* africa: Morocco will start DST on April 3 and end it on July 31.

* southamerica: Chile has extended its DST again, this time to
    May 7. Clocks will go forward again on the third Saturday
    in August.

13 years agogetmntinfo.2: Some cleanup for the addition of getmntvinfo() in 2008.
Sascha Wildner [Fri, 1 Apr 2011 00:03:31 +0000 (02:03 +0200)]
getmntinfo.2: Some cleanup for the addition of getmntvinfo() in 2008.

13 years agoerr.3: Mention that verrx() and vwarnx() don't append an error message.
Sascha Wildner [Fri, 1 Apr 2011 00:03:26 +0000 (02:03 +0200)]
err.3: Mention that verrx() and vwarnx() don't append an error message.

13 years agologinx.3: Fix SYNOPSIS
Sascha Wildner [Thu, 31 Mar 2011 00:58:57 +0000 (02:58 +0200)]
loginx.3: Fix SYNOPSIS

13 years agoFix LINT kernel build.
Sascha Wildner [Thu, 31 Mar 2011 00:47:34 +0000 (02:47 +0200)]
Fix LINT kernel build.

13 years agokernel - Major bridging functionality added (bug fixes 6)
Matthew Dillon [Wed, 30 Mar 2011 07:20:40 +0000 (00:20 -0700)]
kernel - Major bridging functionality added (bug fixes 6)

* Flapping on one of the member interfaces can cause the entire bridge
  to go down due to all member interfaces entering a transient state.
  For example, if openvpn is flapping the related tap interfaces will
  go up and down without any actual packet traffic making it across.

  With these changes openvpn flapping no longer makes the bridge
  effectively non-operational.

* When a port is disabled or enabled either manually or due to a TAP
  process going away / attaching, only issue a configuration update
  when transitioning out of an active state.

  Thus disabled<->l1blocking flip-flopping does not cause the other
  member interfaces to change state.

* Also change the initial state setup when LINK1 is flagged.
  Go into the L1BLOCKING state instead of the BLOCKING state.

13 years agodevfs - Change setattr code to use vop_helper fns
Alex Hornung [Tue, 29 Mar 2011 09:06:29 +0000 (10:06 +0100)]
devfs - Change setattr code to use vop_helper fns

* Change the devfs vop_setattr to use the vop_helper functions for chown
  and chmod.

* This gets rid of the previous roll-your-own solution and fixes several
  edge cases.

* It also fixes a warning thrown by xterm when closing it.

Reported-by: luxh
13 years agovfs_helper - Remove stale comment
Alex Hornung [Tue, 29 Mar 2011 09:06:11 +0000 (10:06 +0100)]
vfs_helper - Remove stale comment

13 years agoRemove obsolete reference to cache_mpsafe in sys/namecache.h.
Venkatesh Srinivas [Tue, 29 Mar 2011 04:42:22 +0000 (21:42 -0700)]
Remove obsolete reference to cache_mpsafe in sys/namecache.h.

13 years agokernel - Enhance the FAIRQ ALTQ to use relative weightings
Matthew Dillon [Tue, 29 Mar 2011 02:22:15 +0000 (19:22 -0700)]
kernel - Enhance the FAIRQ ALTQ to use relative weightings

* Previously the FAIRQ altq specification guaranteed a bandwidth minimum
  for each queue but then used a fixed priority model for any excess
  bandwidth.

* Now the FAIRQ uses the minimum bandwidth specifications to also calculate
  relative weightings for any excess bandwidth, and no longer uses a fixed
  priority model.

* This results in a better apportionment of excess bandwidth and allows
  bandwidth specifications to also be used as a pure weighting specification
  if desired.

* Fix bandwidth calculation.  The decay was being executed on every packet
  instead of once a second.

13 years agokernel -- vm_object hold debugging should not panic if the debug array overflows
Venkatesh Srinivas [Tue, 29 Mar 2011 00:02:43 +0000 (17:02 -0700)]
kernel -- vm_object hold debugging should not panic if the debug array overflows

If the debug array overflows, we lose the ability to test for object drops
when we never established a hold. However the system keeps running.

Suggested-by: dillon
13 years agokernel -- vm_object locking: DEBUG_LOCKS check for hold_wait vs hold deadlock
Venkatesh Srinivas [Sun, 27 Mar 2011 14:20:20 +0000 (07:20 -0700)]
kernel -- vm_object locking: DEBUG_LOCKS check for hold_wait vs hold deadlock

If a thread has a hold on a vm_object and enters hold_wait (via either
vm_object_terminate or vm_object_collapse), it will wait forever for the hold
count to hit 0. Record the threads holding an object in a per-object array.

13 years agoacpi: Style and white space changes
Sepherosa Ziehau [Tue, 22 Mar 2011 07:26:41 +0000 (15:26 +0800)]
acpi: Style and white space changes

13 years agoacpi/pcib: Fix interrupt routing code
Sepherosa Ziehau [Tue, 22 Mar 2011 07:04:16 +0000 (15:04 +0800)]
acpi/pcib: Fix interrupt routing code

13 years agoacpi/pcib: Use pcib_alloc_resource as bus alloc_resource method
Sepherosa Ziehau [Tue, 22 Mar 2011 07:03:06 +0000 (15:03 +0800)]
acpi/pcib: Use pcib_alloc_resource as bus alloc_resource method

13 years agoacpi: Remove no longer needed file
Sepherosa Ziehau [Tue, 22 Mar 2011 03:16:33 +0000 (11:16 +0800)]
acpi: Remove no longer needed file

13 years agoacpi: Minor style changes
Sepherosa Ziehau [Tue, 22 Mar 2011 02:48:48 +0000 (10:48 +0800)]
acpi: Minor style changes

13 years agoAcpi userland: adapt to 20110211 upgrade and sync with FreeBSD 8.0
Magliano Andrea [Thu, 3 Mar 2011 05:00:33 +0000 (06:00 +0100)]
Acpi userland: adapt to 20110211 upgrade and sync with FreeBSD 8.0

* acpiconf: show V/A battery units
* acpidump: add SRAT table support (FreebSD sync), untested

13 years agoSome minor changes
Magliano Andrea [Tue, 1 Mar 2011 09:03:14 +0000 (10:03 +0100)]
Some minor changes

* use AcpiUpdateAllGpes() (from FreeBSD 8.0)

* ACPI_THREAD_ID type is no longer configurable

* sync AcpiOsReadPciConfiguration with FreeBSD 8.0
  (and simplify bitmasking)

* because of AcpiOsDerivePciId() API removal, acpi_bus_number() is
  no longer needed

13 years agoDon't leave Value32 uinitialized (as it's not completely filled)
Magliano Andrea [Tue, 1 Mar 2011 07:42:05 +0000 (08:42 +0100)]
Don't leave Value32 uinitialized (as it's not completely filled)

OsdHardware.c:AcpiOsReadPort() casts Value to (u_int8_t *) resp.
(u_int16_t *) when assigning, thus leaving the upper region of Value32
untouched. If Value32 isn't initialized, random data remains trashing
the whole value.

Without this every bus_space_read_[12] is virtually screwed up.

13 years agoFurther acpica 20110211 code cleanup
Magliano Andrea [Tue, 1 Mar 2011 07:29:37 +0000 (08:29 +0100)]
Further acpica 20110211 code cleanup

In some files from the original taball, code was repeated n times
(this one was overseen)

13 years agoacpi: sync GPE with FreeBSD 8.0 (and according the acpi api)
Magliano Andrea [Thu, 24 Feb 2011 16:37:44 +0000 (17:37 +0100)]
acpi: sync GPE with FreeBSD 8.0 (and according the acpi api)

* use AcpiSetGpeWakeMask(), as AcpiEnableGpe() is already done in
  embedded controller initialization code. AcpiSetGpeWakeMask()
  is needed anyway to mark the gpe as wakable.
  (AcpiEnableGpe() enableas automatically only runtime GPEs now)

* using AcpiFinishGpe() in EcGpeQueryHandler() (as fbsd does) seems
  to make the system reactive as it should (was sensibly slowly
  without that)

13 years agoBring in acpica 20110211, still not ok anyway
Magliano Andrea [Tue, 22 Feb 2011 22:54:23 +0000 (23:54 +0100)]
Bring in acpica 20110211, still not ok anyway

(partially) sync with FreeBSD 8:
  * AcpiWalkNamespace post callbacks
  * wakable GPEs in acpi_probe_child()

problems:
  * system reacts slowly
  * temp reads nonsense values

13 years agokernel - Major bridging functionality added (bug fixes 5)
Matthew Dillon [Sun, 27 Mar 2011 02:17:55 +0000 (19:17 -0700)]
kernel - Major bridging functionality added (bug fixes 5)

* Consolidate the unicast target interface selection code into a single
  routine.

* bridge_start() now calls the unicast target interface selection routine.
  Prior to this packets originated on the machine containing the bridge
  were not selecting the proper target interface when bonding was operational,
  and would also not select a backup interface if the learned target
  interface went offline.

* Add some debug calls to mbuftrackid()

13 years agomemoryallocators.9: Some small cleanup.
Sascha Wildner [Sat, 26 Mar 2011 22:40:55 +0000 (23:40 +0100)]
memoryallocators.9: Some small cleanup.

13 years agokernel - Change mbuf allocation in tapwrite/tunwrite path to blocking
Matthew Dillon [Sat, 26 Mar 2011 22:15:34 +0000 (15:15 -0700)]
kernel - Change mbuf allocation in tapwrite/tunwrite path to blocking

* Tapwrite and tunwrite are called via userland, a blocking mbuf allocation
  is perfectly acceptable here and avoids dropping packets unnecessarily.

* Fixes numerous spurious packet drops when using TAP or TUN, for example
  with openvpn.

* Minor code cleanup in if_tap.c

13 years agokernel - Major bridging functionality added (bug fixes 4)
Matthew Dillon [Sat, 26 Mar 2011 19:39:23 +0000 (12:39 -0700)]
kernel - Major bridging functionality added (bug fixes 4)

* Fix an issue where we were assuming that a root bridge receiving a
  configuration packet from a remote bridge would get a path cost
  that already include the root bridge's path cost for that port.
  In fact the target bridge only includes an aggregate path cost to
  root (typically the lowest path cost of all the target bridge's
  ports), which is a fixed value.

* The root bridge must add the local path cost back in.

13 years agokiconv(3): Raise WARNS to 3 and fix some warnings.
Sascha Wildner [Sat, 26 Mar 2011 18:36:39 +0000 (19:36 +0100)]
kiconv(3): Raise WARNS to 3 and fix some warnings.

13 years agokernel build: msdosfs is no longer warning, so remove 'nowerror'.
Sascha Wildner [Sat, 26 Mar 2011 05:16:16 +0000 (06:16 +0100)]
kernel build: msdosfs is no longer warning, so remove 'nowerror'.

13 years agokernel - Fix MP race in vmspace_president_count() (2)
Matthew Dillon [Fri, 25 Mar 2011 21:38:35 +0000 (14:38 -0700)]
kernel - Fix MP race in vmspace_president_count() (2)

* Fix bug in last commit related to buildworld also wanting to use
  the inline functions in vm_map.h

Reported-by: Magliano Andrea <masterblaster@tiscali.it>
13 years ago/usr/Makefile: Use ${GITHOST} for the shallow clone too.
Sascha Wildner [Fri, 25 Mar 2011 18:51:13 +0000 (19:51 +0100)]
/usr/Makefile: Use ${GITHOST} for the shallow clone too.

Reported-by: John Marino <john@marino.st>
13 years agoioapic: Properly log interrupt mode
Sepherosa Ziehau [Fri, 25 Mar 2011 14:42:02 +0000 (22:42 +0800)]
ioapic: Properly log interrupt mode

13 years ago8254: Don't setup 8254 interrupt, if it is not selected as interrupt cputimer
Sepherosa Ziehau [Fri, 25 Mar 2011 13:54:30 +0000 (21:54 +0800)]
8254: Don't setup 8254 interrupt, if it is not selected as interrupt cputimer

8254 interrupt is setup, mainly to support C-state > C1, however, on some
systems it could cause system freezing during boot.  Change the default value
of hw.i8254.intr_disable to 1, so more systems could boot by default.

13 years agoacpi: Parse FADT to extract SCI IRQ number
Sepherosa Ziehau [Fri, 25 Mar 2011 13:50:53 +0000 (21:50 +0800)]
acpi: Parse FADT to extract SCI IRQ number

13 years agoioapic: Don't assert that interrupt mode are level/low or edge/high
Sepherosa Ziehau [Fri, 25 Mar 2011 13:04:38 +0000 (21:04 +0800)]
ioapic: Don't assert that interrupt mode are level/low or edge/high

For ACPI SCI, other combinations may be used by brain damaged BIOSes.

13 years agoacpi: Factor out SDT functions to locate specified SDT
Sepherosa Ziehau [Thu, 24 Mar 2011 13:20:51 +0000 (21:20 +0800)]
acpi: Factor out SDT functions to locate specified SDT

13 years agomadt: File relocate
Sepherosa Ziehau [Thu, 24 Mar 2011 11:18:40 +0000 (19:18 +0800)]
madt: File relocate

In preparation for FADT parsing

13 years agomadt: Configure interrupt trigger mode does not work quite well yet.
Sepherosa Ziehau [Thu, 24 Mar 2011 11:05:41 +0000 (19:05 +0800)]
madt: Configure interrupt trigger mode does not work quite well yet.

One of my system has interrupt storm on ACPI SCI (irq 9) after
change ACPI SCI mode to level/low (was edge/high).

13 years agoioapic: Allow interrupt trigger mode override in MADT
Sepherosa Ziehau [Wed, 23 Mar 2011 14:33:52 +0000 (22:33 +0800)]
ioapic: Allow interrupt trigger mode override in MADT

13 years agoapic/i386: Wait APs's LAPIC to be initialized before programming I/O APIC
Sepherosa Ziehau [Fri, 25 Mar 2011 12:24:46 +0000 (20:24 +0800)]
apic/i386: Wait APs's LAPIC to be initialized before programming I/O APIC

13 years agoapic/x86_64: Wait APs's LAPIC to be initialized before programming I/O APIC
Sepherosa Ziehau [Thu, 24 Mar 2011 14:45:43 +0000 (22:45 +0800)]
apic/x86_64: Wait APs's LAPIC to be initialized before programming I/O APIC

13 years agokernel - Fix MP race in vmspace_president_count()
Matthew Dillon [Fri, 25 Mar 2011 06:25:05 +0000 (23:25 -0700)]
kernel - Fix MP race in vmspace_president_count()

* We must get at least a shared vm_map lock in order to scan the
  vm_map_entry list.

* Cache the totaled value and use it for repeated requests within one
  second or if the vm_map lock could not be acquired non-blocking.

* The bug being fixed could be triggered by top.

13 years agoobjformat(1): Fix whitespace in the Makefile.
Sascha Wildner [Fri, 25 Mar 2011 06:14:56 +0000 (07:14 +0100)]
objformat(1): Fix whitespace in the Makefile.

13 years agoHook binutils 2.21 into the build in place of 2.20.
Sascha Wildner [Thu, 24 Mar 2011 21:02:35 +0000 (22:02 +0100)]
Hook binutils 2.21 into the build in place of 2.20.

Submitted-by: John Marino <john@marino.st>
13 years agoHAMMER VFS - Fix incorrect reflush conditional
Matthew Dillon [Fri, 25 Mar 2011 04:02:35 +0000 (21:02 -0700)]
HAMMER VFS - Fix incorrect reflush conditional

* Fix a conditional that was testing the wrong field when determining
  how to reflush a directory or regular file.  This could prevent sync
  sequences from properly syncing the entire dependency chain during
  heavy filesystem activity.

* No known bugs are related to this fix as the chains would get flushed
  normally by the filesystem syncer eventually.

Reported-by: Sascha Wildner <saw@online.de>
13 years agovkernel - test/vkernel 'scratch' target missing root build
Matthew Dillon [Thu, 24 Mar 2011 23:46:06 +0000 (16:46 -0700)]
vkernel - test/vkernel 'scratch' target missing root build

* Add the 'root' target to the 'scratch' target at the appropriate
  place, it was missing.

13 years agokernel - Revamp LWKT thread migration
Matthew Dillon [Thu, 24 Mar 2011 21:40:08 +0000 (14:40 -0700)]
kernel - Revamp LWKT thread migration

* Rearrange the handling of TDF_RUNNING, making lwkt_switch() responsible
  for it instead of the assembly switch code.  Adjust td->td_switch() to
  return the previously running thread.

  This allows lwkt_switch() to process thread migration between cpus after
  the thread has been completely and utterly switched out, removing the
  need to loop on TDF_RUNNING on the target cpu.

* Fixes lwkt_setcpu_remote livelock failure

* This required major surgery on the core thread switch assembly, testing
  is needed.  I tried to avoid doing this but the livelock problems persisted,
  so the only solution was to remove the need for the loops that were causing
  the livelocks.

* NOTE: The user process scheduler is still using the old giveaway/acquire
method.  More work is needed here.

Reported-by: "Magliano Andre'" <masterblaster@tiscali.it>
13 years agokernel - Silence warnings from older gcc
Matthew Dillon [Thu, 24 Mar 2011 20:16:52 +0000 (13:16 -0700)]
kernel - Silence warnings from older gcc

* Silence a warning (fatal) during the kernel build when building with
  an older gcc.  The code itself was correct.

13 years agoobjformat(1): Remove gdb from the list. Not part of binutils.
Sascha Wildner [Thu, 24 Mar 2011 17:52:03 +0000 (18:52 +0100)]
objformat(1): Remove gdb from the list. Not part of binutils.

13 years agoRemove the remains of the removal of gasp in binutils 2.13 years ago.
Sascha Wildner [Thu, 24 Mar 2011 16:57:11 +0000 (17:57 +0100)]
Remove the remains of the removal of gasp in binutils 2.13 years ago.

13 years agoREADME: I removed a bit too much.
Sascha Wildner [Thu, 24 Mar 2011 13:29:32 +0000 (14:29 +0100)]
README: I removed a bit too much.

13 years agoFix some more the the typos.
Sascha Wildner [Thu, 24 Mar 2011 13:21:32 +0000 (14:21 +0100)]
Fix some more the the typos.

13 years agomille: Fix typo.
Peter Avalos [Wed, 23 Mar 2011 06:05:19 +0000 (17:05 +1100)]
mille: Fix typo.

13 years agosh: Fix typo in comment.
Peter Avalos [Sat, 5 Mar 2011 22:54:35 +0000 (12:54 -1000)]
sh: Fix typo in comment.

Obtained-from: FreeBSD

13 years agoRemove a years old attempt at a BSD licensed libiberty.
Sascha Wildner [Wed, 23 Mar 2011 22:40:20 +0000 (23:40 +0100)]
Remove a years old attempt at a BSD licensed libiberty.

This never gained traction and was never part of the build.

Since libiberty is only used by the GNU toolchain (included in binutils*,
gcc* and gdb), and given that the real work with the toolchain certainly
isn't in libiberty related things, this can go.

13 years agobinutils221: Fix some copy/paste errors.
Sascha Wildner [Wed, 23 Mar 2011 21:25:14 +0000 (22:25 +0100)]
binutils221: Fix some copy/paste errors.

13 years agobinutils221: Add the gnu/ building hierarchy.
Sascha Wildner [Wed, 23 Mar 2011 21:12:23 +0000 (22:12 +0100)]
binutils221: Add the gnu/ building hierarchy.

Submitted-by: John Marino <john@marino.st>
13 years agobinutils221: Fix an error and a warning.
Sascha Wildner [Wed, 23 Mar 2011 20:58:30 +0000 (21:58 +0100)]
binutils221: Fix an error and a warning.

Submitted-by: John Marino <john@marino.st>
13 years agobinutils221: Add some generated manual pages.
Sascha Wildner [Wed, 23 Mar 2011 20:56:12 +0000 (21:56 +0100)]
binutils221: Add some generated manual pages.

Submitted-by: John Marino <john@marino.st>
13 years agobinutils221: Add some DragonFly specific configuration stuff.
Sascha Wildner [Wed, 23 Mar 2011 20:50:50 +0000 (21:50 +0100)]
binutils221: Add some DragonFly specific configuration stuff.

Submitted-by: John Marino <john@marino.st>
13 years agobinutils221: Bring in some needed files instead of generating them.
Sascha Wildner [Wed, 23 Mar 2011 20:46:44 +0000 (21:46 +0100)]
binutils221: Bring in some needed files instead of generating them.

Submitted-by: John Marino <john@marino.st>
13 years agobinutils221: Add our READMEs.
Sascha Wildner [Wed, 23 Mar 2011 20:40:55 +0000 (21:40 +0100)]
binutils221: Add our READMEs.

Submitted-by: John Marino <john@marino.st>
13 years agoMerge branch 'vendor/BINUTILS221'
Sascha Wildner [Wed, 23 Mar 2011 20:14:59 +0000 (21:14 +0100)]
Merge branch 'vendor/BINUTILS221'

13 years agobinutils221: Bring in some more files on the vendor branch.
Sascha Wildner [Wed, 23 Mar 2011 20:13:13 +0000 (21:13 +0100)]
binutils221: Bring in some more files on the vendor branch.

13 years agoMerge branch 'vendor/BINUTILS221'
Sascha Wildner [Wed, 23 Mar 2011 19:23:06 +0000 (20:23 +0100)]
Merge branch 'vendor/BINUTILS221'

13 years agoImport binutils-2.21
Sascha Wildner [Wed, 23 Mar 2011 19:22:22 +0000 (20:22 +0100)]
Import binutils-2.21

13 years agoAdd memoryallocators(9) manpage to describe kernel memory allocators.
Venkatesh Srinivas [Wed, 23 Mar 2011 18:11:30 +0000 (11:11 -0700)]
Add memoryallocators(9) manpage to describe kernel memory allocators.

13 years agokernel - Major bridging functionality added (bug fixes 3)
Matthew Dillon [Wed, 23 Mar 2011 16:36:33 +0000 (09:36 -0700)]
kernel - Major bridging functionality added (bug fixes 3)

* When forwarding packets we do not retransmit the packet out the same
  interface it came in on, but this check was not taking into account
  bonding sets and could bounce a packet out a different interface on the
  same bonding set the packet came in on.

  This could result in loops for things like ARP broadcasts and cause
  intermediate ethernet switches to get confused as to which port a
  particular MAC is on.

* Change src_if == dst_if checks to compare MAC addresses instead, which
  solves the problem.

13 years agomptable: Make interrupt routing information logging consistent with PIR
Sepherosa Ziehau [Wed, 23 Mar 2011 12:41:02 +0000 (20:41 +0800)]
mptable: Make interrupt routing information logging consistent with PIR

13 years agoioapic: Raise MADT I/O APIC enumerator priority
Sepherosa Ziehau [Wed, 23 Mar 2011 12:33:35 +0000 (20:33 +0800)]
ioapic: Raise MADT I/O APIC enumerator priority

13 years agoioapic: Disable imen_dump() in new code
Sepherosa Ziehau [Wed, 23 Mar 2011 12:26:55 +0000 (20:26 +0800)]
ioapic: Disable imen_dump() in new code

13 years agoioapic: Rework I/O APIC APIC ID allocation
Sepherosa Ziehau [Wed, 23 Mar 2011 12:04:15 +0000 (20:04 +0800)]
ioapic: Rework I/O APIC APIC ID allocation

- I/O APIC's ID field in ID register contains only 4bits, so only 16
  I/O APICs should be allowed.
- All I/O APIC's APIC ID's lower 4bits (what we wrote to I/O APIC ID
  register) must be different from each other, this should be done
  even on xAPIC (e.g. Pentium 4), where I/O APIC's APIC IDs are not
  required to be different from what LAPIC's.

13 years agoioapic: Don't assume that BSP's APIC ID is 0
Sepherosa Ziehau [Wed, 23 Mar 2011 10:54:33 +0000 (18:54 +0800)]
ioapic: Don't assume that BSP's APIC ID is 0

13 years agomsdosfs: use size_t for unlen consistently instead of int.
Alexander Polakov [Mon, 21 Mar 2011 23:00:15 +0000 (02:00 +0300)]
msdosfs: use size_t for unlen consistently instead of int.

size_t is different from int on x86-64, which can lead
to weird effects.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue2027>

13 years agoacpi/x86_64: Properly configure ACPI interrupt model
Sepherosa Ziehau [Tue, 22 Mar 2011 11:10:07 +0000 (19:10 +0800)]
acpi/x86_64: Properly configure ACPI interrupt model

13 years agokernel - Reduce dsched console output
Matthew Dillon [Mon, 21 Mar 2011 21:36:24 +0000 (14:36 -0700)]
kernel - Reduce dsched console output

* Only print out 'No policy for ...' messages if bootverbose is set.