dragonfly.git
12 years agovkernel - cpu_disable_intr adjustments
Matthew Dillon [Fri, 29 Jul 2011 08:32:22 +0000 (01:32 -0700)]
vkernel - cpu_disable_intr adjustments

* cpu_disable_intr() also disables IPI interrupts now.

12 years agokernel - Fix rare IPIQ freezes
Matthew Dillon [Fri, 29 Jul 2011 08:25:46 +0000 (01:25 -0700)]
kernel - Fix rare IPIQ freezes

* Ensure that an IPI interrupt is sent went waiting for an IPIQ
  to drain.  The IPIQ can be pushed up by passive IPIs and not
  necessarily have a signal pending on the target cpu, so we
  have to put the check in our drain loop rather than outside
  the loop.

* Add a cpu_pause() to reduce power use for the IPIQ drain case.

* Normalize the use of gd_intr_nesting_level and clean up the
  code syntax for the ipiq_optimized case.

* Remove the previous temporary IPI interrupt signaling fix, it
  was incomplete.

* Fix a missing crit_exit() in the ENOENT case for
  lwkt_send_ipiq3_nowait().

* Track cpu's which are in the middle of ipiq processing and
  assert that a cpu is not in an IPIQ processing loop when
  switching between threads.

* Normalize the use of ip->ip_npoll in the IPIQ code.  This
  field is used to avoid unnecessary IPI interrupts.

12 years agovkernel - Fix lockup with [v]kernel due to missing ipiq signal
Matthew Dillon [Thu, 28 Jul 2011 23:16:29 +0000 (16:16 -0700)]
vkernel - Fix lockup with [v]kernel due to missing ipiq signal

* If the target ipiq has nothing but passively queued entries the target
  cpu will normally just process the ipi's on the next clock interrupt.

  However, if the originating cpu is forced to live-loop waiting for the
  target to the drain the target may not be aware that it needs to drain
  ASAP.

* The fix is for the originating cpu to ensure that an ipi interrupt is
  sent to the target cpu before live looping.

* This appears to primarily effect vkernels.

Reported-by: ftigeot, tuxillo
12 years agovkernel - do not set SA_NODEFER for SIGIO and SIGUSR1
Matthew Dillon [Fri, 29 Jul 2011 08:21:59 +0000 (01:21 -0700)]
vkernel - do not set SA_NODEFER for SIGIO and SIGUSR1

* Do not set SA_NODEFER for SIGIO and SIGUSR1 in vkernels.  This fixes a
  stack overflow which can occur under heavy I/O or IPI loads.

12 years agokernel - Fix signal delivery races
Matthew Dillon [Fri, 29 Jul 2011 08:19:29 +0000 (01:19 -0700)]
kernel - Fix signal delivery races

* The send side was using p->p_token but the processing code from trap
  was still using the mp_lock.  Fix the trap processing code to use
  p->p_token.

* This fixes several nasty races that can cause signals to be lost and
  vkernels to freeze, and possibly other programs which depend on signals
  between threads.

12 years agokernel - Fix a small race in the umtx code
Matthew Dillon [Fri, 29 Jul 2011 08:12:08 +0000 (01:12 -0700)]
kernel - Fix a small race in the umtx code

* Add an additional check after registering the vm_page action before
  actually going to sleep, closing a potential vm_token race.

12 years agovga(4): Remove a bogus check.
Sascha Wildner [Mon, 11 Jul 2011 17:44:46 +0000 (19:44 +0200)]
vga(4): Remove a bogus check.

These are the remains of a larger chunk of code that I removed in
4e193d20. It was used to determine whether a MGA, CGA, EGA or VGA
was present in the box. I left the check in at the time because I
thought, why not?

However, ASpeed's VGA BIOS (at least as found on some Tyan S8230*
series motherboards) seems to have some flaws and ends up returning
0xf instead of 0x9. This caused vga(4) initialization to fail early
in the boot and no kernel messages would go to the screen.

Since the only thing that interests us is whether a VGA is present
or not, remove this check. There are other tests later on that will
detect what we want (such as checking the CRTC's address).

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
12 years agoktrdump: handle %c in ktr format strings
Aggelos Economopoulos [Sun, 10 Jul 2011 21:44:04 +0000 (23:44 +0200)]
ktrdump: handle %c in ktr format strings

12 years agoktrdump: fixup size modifiers for integers
Aggelos Economopoulos [Sun, 10 Jul 2011 17:49:49 +0000 (19:49 +0200)]
ktrdump: fixup size modifiers for integers

The 'j' modifier is actually {u,}intmax_t, not {s,}size_t. Correct that
and add support for 'z' while at it.

12 years agovga(4): Fix the kernel build with VGA_NO_BIOS set.
Sascha Wildner [Sat, 9 Jul 2011 19:50:35 +0000 (21:50 +0200)]
vga(4): Fix the kernel build with VGA_NO_BIOS set.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
12 years agokernel - Fix directory scanning bug in Samba
Matthew Dillon [Sat, 11 Jun 2011 19:13:20 +0000 (12:13 -0700)]
kernel - Fix directory scanning bug in Samba

* Bring in the patch from FreeBSD PR 78953

Taken-from: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/78953
Reported-by: uv <uv.negativa@gmail.com>
12 years agodf - Properly handle paths passed when -t is used.
Antonio Huete Jimenez [Wed, 29 Jun 2011 16:07:04 +0000 (18:07 +0200)]
df - Properly handle paths passed when -t is used.

Show only the related mount points for the specified filesystem(s) when
option -t is used.

Obtained-from: FreeBSD

12 years agokernel: Fix buildkernel for kernel w/ 'options IPSEC', but w/o IPSEC_ESP
Thomas Nikolajsen [Wed, 6 Jul 2011 09:03:21 +0000 (11:03 +0200)]
kernel: Fix buildkernel for kernel w/ 'options IPSEC', but w/o IPSEC_ESP

12 years agoMerge commit 'crater/DragonFly_RELEASE_2_10' into rel2_10
Thomas Nikolajsen [Wed, 6 Jul 2011 10:21:09 +0000 (12:21 +0200)]
Merge commit 'crater/DragonFly_RELEASE_2_10' into rel2_10

12 years agohammer(8) - Fix snapshot count in info directive.
Antonio Huete Jimenez [Thu, 30 Jun 2011 19:55:53 +0000 (21:55 +0200)]
hammer(8) - Fix snapshot count in info directive.

- We were wrongly using the HAMMER filesystem fd instead of a per-PFS one.
- Adapt the snapshot count in the case of error

12 years agoSync zoneinfo database with tzdata2011h from elsie.nci.nih.gov
Sascha Wildner [Tue, 28 Jun 2011 05:58:19 +0000 (07:58 +0200)]
Sync zoneinfo database with tzdata2011h from elsie.nci.nih.gov

antarctica:     8.8  -> 8.9
asia:           8.64 -> 8.65
europe:         8.32 -> 8.33
iso3166.tab     8.6  -> 8.9
southamerica:   8.49 -> 8.50
zone.tab:       8.43 -> 8.45

* antarctica: Remove unused RussAQ rules.

* asia: Add comment on retaining "old" Russia rules for the benefit
    of Armenia.

* europe: Russia abandons DST in 2011 (thanks to Alexander Krivenyshev).
    "Old" Russia rules retained for now for Belarus.

* iso3166.tab: Change AN (Netherlands Antilles) to CW (Curacao).

* southamerica: Use links for places with new iso3166 codes.

* zone.tab: Change AN (Netherlands Antilles) to CW (Curacao).

12 years agokernel - Fix a 'vm_page_unhold: hold count < 0' panic in kern_execve()
Matthew Dillon [Thu, 9 Jun 2011 20:28:08 +0000 (13:28 -0700)]
kernel - Fix a 'vm_page_unhold: hold count < 0' panic in kern_execve()

* imgp->firstpage is preloaded with lwbuf storage but we failed to NULL
  it out on error, causing the code to later attempt to release a bogus
  lwbuf.

* Fixes a hold count panic on random vm_page's.

12 years agokernel - Allow signal delivery via KQ even if the process SIG_IGN's the signal
Samuel J. Greear [Thu, 9 Jun 2011 07:34:27 +0000 (01:34 -0600)]
kernel - Allow signal delivery via KQ even if the process SIG_IGN's the signal

Reported-by: swildner@
12 years agokernel - Fix netgraph MP race
Matthew Dillon [Wed, 18 May 2011 01:54:00 +0000 (18:54 -0700)]
kernel - Fix netgraph MP race

* Fix a netgraph MP race due to netgraph not acquiring required tokens
  when manipulating the socket's sockbuf structure.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
12 years agokernel -- snp: Correct bug in snpfilter_detach().
Venkatesh Srinivas [Fri, 3 Jun 2011 08:24:11 +0000 (01:24 -0700)]
kernel -- snp: Correct bug in snpfilter_detach().

Signed-off-by: Nathaniel Filardo <nwfilardo@gmail.com>
Submitted-by: Nick Prokharau <nickprok@gmail.com>
12 years agoAF_UNIX: Hold a reference of the unp_conn before executing blocking code
Sepherosa Ziehau [Wed, 27 Apr 2011 07:10:03 +0000 (15:10 +0800)]
AF_UNIX: Hold a reference of the unp_conn before executing blocking code

Since unp_token will be automaticly released upon execution of blocking
code, close of unp_conn could race any code paths that references unp_conn
after executing blocking code.  To fix these races, we simply increment
the reference count of the unp_conn before executig any possibly blocking
code and release the reference count of unp_conn, which may release unp_conn
itself.  This _currently_ does not suffer 0-ref race, since unp_token is
always being held.

12 years agoAF_UNIX: Allocate pcb using M_WAITOK|M_NULLOK instead of M_NOWAIT
Sepherosa Ziehau [Wed, 27 Apr 2011 05:48:48 +0000 (13:48 +0800)]
AF_UNIX: Allocate pcb using M_WAITOK|M_NULLOK instead of M_NOWAIT

So the allocation will not fail mysteriously while the system will not
panic if the system is really out of memory.

12 years agointr: Call machintr_intren() only for hardware interrupts
Sepherosa Ziehau [Mon, 30 May 2011 15:01:17 +0000 (23:01 +0800)]
intr: Call machintr_intren() only for hardware interrupts

12 years agomail(1) & battlestar(6): Rename some files.
Sascha Wildner [Mon, 23 May 2011 11:00:41 +0000 (13:00 +0200)]
mail(1) & battlestar(6): Rename some files.

All these files had names which are reserved in Windows, which led
to our tree being not correctly checked out to NTFS, for example.

Reported-by: Adam Hoka <adam.hoka@gmail.com>
12 years agoUse OpenBSD's glob in OpenSSH.
Peter Avalos [Thu, 19 May 2011 00:56:40 +0000 (14:56 -1000)]
Use OpenBSD's glob in OpenSSH.

This fixes a bus error caused by globbing in the ssh utils (specifically
'ls *' in sftp).

12 years agoMerge branch 'vendor/OPENSSH' into DragonFly_RELEASE_2_10
Peter Avalos [Thu, 19 May 2011 01:05:47 +0000 (15:05 -1000)]
Merge branch 'vendor/OPENSSH' into DragonFly_RELEASE_2_10

12 years agoAdd OpenBSD's compat glob.c for OpenSSH.
Peter Avalos [Thu, 19 May 2011 00:26:17 +0000 (14:26 -1000)]
Add OpenBSD's compat glob.c for OpenSSH.

The latest version of OpenSSH uses OpenBSD-specific features.

12 years agobinutils221: Remove /usr/{local,pkg}/lib as libdirs from ld(1).
Sascha Wildner [Tue, 17 May 2011 13:38:35 +0000 (15:38 +0200)]
binutils221: Remove /usr/{local,pkg}/lib as libdirs from ld(1).

12 years agomake upgrade - removal additional obsolete files
Matthew Dillon [Fri, 6 May 2011 08:45:38 +0000 (01:45 -0700)]
make upgrade - removal additional obsolete files

* Remove /usr/lib/libc_r.so.5, libthread_xu.so.2, libc_r_p.a, and
  libthread_xu_p.a, in addition to the base libc_r and libthread_xu
  libraries.

* All of these were relocated to /usr/lib/thread/

12 years agomake upgrade - Allow removal of protected files
Matthew Dillon [Fri, 6 May 2011 08:39:16 +0000 (01:39 -0700)]
make upgrade - Allow removal of protected files

* chflags -Rf noschg <blah> from the files to be deleted list
  before attempting to rm -rf <blah>.

* Fixes the proper removal of obsolete or moved libraries.

12 years agolibpthread - Always override the symlinks
Matthew Dillon [Fri, 6 May 2011 08:24:28 +0000 (01:24 -0700)]
libpthread - Always override the symlinks

* Always override the symlinks for /usr/lib/libpthread* to ensure that
  very old systems are properly upgraded.

* If the user wants to point the symlink at a different threading library
  the use rcan set THREAD_LIB in /etc/make.conf.

Reported-by: Vitaly Shevtsov <loki.vt@gmail.com>
12 years agogcc 4.4: Remove PIE profiling trigger
John Marino [Thu, 5 May 2011 19:16:01 +0000 (21:16 +0200)]
gcc 4.4: Remove PIE profiling trigger

The support for Position Independent Executables came from FreeBSD.
Unfortunately, a bug in their initial commit was also carried over.
Removing the GCRT define from the i386 crtstuff makefile will stop
PIE binaries from generating *.gmon files as they are executed.  The main
software that suffers this are cups and samba.  Rebuilding those ports
after rebuilding world will fix this issue on the i386 platform, the only
one affected.

Report by mroland, issue 2063

12 years agokernel/ddb: Fix examine's z format (for signed hex).
Sascha Wildner [Thu, 5 May 2011 01:17:57 +0000 (03:17 +0200)]
kernel/ddb: Fix examine's z format (for signed hex).

This was previously attempted to be printed with a special %z conversion
specifier of kprintf(). But our kprintf() doesn't support this specifier.
Either support for it got lost along the way or we never had it, I didn't
check.

Since we want to get rid of non-standard conversion specifiers (because
they require compiler modification for silencing format warnings), use a
db_format_hex() function that does the same as %z was supposed to do.

Taken-from: NetBSD

12 years agoinstallkernel: Copy /boot/kernel/initrd.img to /boot/kernel.old too.
Sascha Wildner [Mon, 2 May 2011 23:11:36 +0000 (01:11 +0200)]
installkernel: Copy /boot/kernel/initrd.img to /boot/kernel.old too.

Reported-by: Tim Darby <t+dfbsd@timdarby.net>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue2059>

12 years agogcc44: provide pragma pack(push) & pragma pack(pop) support
John Marino [Sun, 1 May 2011 19:12:37 +0000 (21:12 +0200)]
gcc44: provide pragma pack(push) & pragma pack(pop) support

12 years agoswapon(8): Fix "swapctl -l".
Sascha Wildner [Sat, 30 Apr 2011 22:27:05 +0000 (00:27 +0200)]
swapon(8): Fix "swapctl -l".

Without -s, swapctl -l would report 0 for swap size and used swap because
some variables were initialized only for the -s case. Just remove the
"if (sflag)" around the calculation.

Reported-by: Joachim de Groot <jdegroot@web.de>
Taken-from:  FreeBSD

12 years agodm(4): Fix a typo in the code.
Sascha Wildner [Fri, 29 Apr 2011 06:23:47 +0000 (08:23 +0200)]
dm(4): Fix a typo in the code.

12 years agosysv_msg: Fix a typo in the code.
Sascha Wildner [Fri, 29 Apr 2011 02:27:17 +0000 (04:27 +0200)]
sysv_msg: Fix a typo in the code.

12 years agong_pppoe(4): Fix a typo in the code.
Sascha Wildner [Thu, 28 Apr 2011 23:54:12 +0000 (01:54 +0200)]
ng_pppoe(4): Fix a typo in the code.

13 years agodummy commit w/new tag
Matthew Dillon [Mon, 25 Apr 2011 18:47:51 +0000 (11:47 -0700)]
dummy commit w/new tag

13 years agokernel - Try to reduce 'busy buffers problems' during halt/reboot v2.10.1
Matthew Dillon [Mon, 25 Apr 2011 18:43:52 +0000 (11:43 -0700)]
kernel - Try to reduce 'busy buffers problems' during halt/reboot

* Ignore busy buffers related to TMPFS in pass 1, and busy buffers related
  to TMPFS, NFS, SMBFS, and MFS in the final check.

13 years agoSync zoneinfo database with tzdata2011g from elsie.nci.nih.gov
Sascha Wildner [Mon, 25 Apr 2011 17:16:06 +0000 (19:16 +0200)]
Sync zoneinfo database with tzdata2011g from elsie.nci.nih.gov

africa:         8.30 -> 8.31
europe:         8.28 -> 8.32
southamerica:   8.47 -> 8.49

* africa: Egypt's interim cabinet decided to cancel daylight
    saving time.

* europe: Eliminate some doubled words.

* southamerica: As a trial, the Falkland Islands will remain on
    summer time throughout 2011. Also eliminate some doubled
    words.

13 years agoaesni(4): Sync with FreeBSD.
Sascha Wildner [Sat, 23 Apr 2011 12:53:26 +0000 (14:53 +0200)]
aesni(4): Sync with FreeBSD.

* Add support for CRYPTO_AES_XTS.

* Fix some bugs in aeskeys_*.S and aesni_wrap.c

* Add support for CRD_F_KEY_EXPLICIT flag.

* Remove DEBUG sections.

* Simplify code a bit.

13 years agoinstaller: For bootblocks, only offer the disk that was installed to.
Sascha Wildner [Sat, 23 Apr 2011 10:51:20 +0000 (12:51 +0200)]
installer: For bootblocks, only offer the disk that was installed to.

In the "Disk Utilities" menu, we still offer all disks.

Requested-by: dillon
13 years agoaesni(4): Avoid panicking when kmalloc() returns an unaligned pointer.
Sascha Wildner [Sat, 23 Apr 2011 08:56:05 +0000 (10:56 +0200)]
aesni(4): Avoid panicking when kmalloc() returns an unaligned pointer.

Instead, align it ourselves and keep the original address for kfree().
This is a bit hacky but not too hacky (and it is done the same way in
padlock(4)).

In the middle run, we probably need some kmalloc() flavor that can do
alignment.

In-discussion-with: alexh

13 years agoMerge branch 'DragonFly_RELEASE_2_10' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Fri, 22 Apr 2011 20:05:50 +0000 (13:05 -0700)]
Merge branch 'DragonFly_RELEASE_2_10' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into DragonFly_RELEASE_2_10

13 years agokernel - enable carrier/modem-status for usb serial devices (/dev/ucomX)
Matthew Dillon [Fri, 22 Apr 2011 04:43:59 +0000 (21:43 -0700)]
kernel - enable carrier/modem-status for usb serial devices (/dev/ucomX)

* Fix an incorrect return code from umodem which was preventing
  ucom from processing TIOCMGET and other related modem control
  ioctls.

* For the moment comment out a panic condition dealing with an
  abort sent from an interrupt context.

13 years agopf(4): Fix compilation without INET6.
Sascha Wildner [Fri, 22 Apr 2011 09:10:57 +0000 (11:10 +0200)]
pf(4): Fix compilation without INET6.

13 years agoMerge branch 'DragonFly_RELEASE_2_10' of ssh://crater.dragonflybsd.org/repository...
Matthew Dillon [Thu, 21 Apr 2011 19:03:28 +0000 (12:03 -0700)]
Merge branch 'DragonFly_RELEASE_2_10' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into DragonFly_RELEASE_2_10

13 years agoftpd - Remove the use of GLOB_LIMIT
Matthew Dillon [Thu, 21 Apr 2011 11:11:09 +0000 (04:11 -0700)]
ftpd - Remove the use of GLOB_LIMIT

* The problem with this flag is that it currently arbitrarily limits
  stat and other operations and completely breaks anonymous ftp on
  directories with large numbers of files (like packages/All).

  Remove its use for now.

13 years agokernel - Fix a rare nfsnode destruction race
Matthew Dillon [Thu, 21 Apr 2011 09:23:49 +0000 (02:23 -0700)]
kernel - Fix a rare nfsnode destruction race

* Clear np->n_vnode atomically (w/ the token held) when removing a
  node from the hash table.  The field was previously not being
  cleared at all which could race the nfsnhash lookup code despite
  the vnode interlock and check the lookup code was performing.

* Remove unnecessary tokens around the remaining nfsnode freeing code
  in the reclaim path.

13 years agokernel - Add mtrr support for x86-64
Matthew Dillon [Thu, 21 Apr 2011 04:22:18 +0000 (21:22 -0700)]
kernel - Add mtrr support for x86-64

Taken-From: FreeBSD

13 years agobinutils220: Fix a copy/paste error.
Sascha Wildner [Thu, 21 Apr 2011 16:11:29 +0000 (18:11 +0200)]
binutils220: Fix a copy/paste error.

13 years agoSet the DragonFly version to 2.10 for 2.10.
Sascha Wildner [Wed, 20 Apr 2011 16:30:11 +0000 (18:30 +0200)]
Set the DragonFly version to 2.10 for 2.10.

13 years agokernel - Fix panic when unloading a module on x86-64
Matthew Dillon [Wed, 20 Apr 2011 05:57:02 +0000 (22:57 -0700)]
kernel - Fix panic when unloading a module on x86-64

* Fix a vm_object ref count panic during a module unload,
  including unloads which occur after failed loads.

13 years agorelease - pkgsrc-2011Q1 is the standard pkgsrc branch now
Matthew Dillon [Wed, 20 Apr 2011 03:03:36 +0000 (20:03 -0700)]
release - pkgsrc-2011Q1 is the standard pkgsrc branch now

* Adjust default pkgsrc branch to 2011Q1

13 years agorelease - remove xchat from gui build
Matthew Dillon [Wed, 20 Apr 2011 03:01:48 +0000 (20:01 -0700)]
release - remove xchat from gui build

* xchat has build problems, remove it

13 years agorelease - Branch 2.10 v2.10.0
Matthew Dillon [Wed, 20 Apr 2011 02:55:41 +0000 (19:55 -0700)]
release - Branch 2.10

* Edit sys/sys/param.h, sys/conf/newvers.sh

13 years agokernel - Add kqueue support to ulpt for CUPS printing
Matthew Dillon [Wed, 20 Apr 2011 00:26:30 +0000 (17:26 -0700)]
kernel - Add kqueue support to ulpt for CUPS printing

* Adjust the ulpt driver to add kqueue support (reporting always write-ready).
  Otherwise CUPS will stall indefinitely on a usb printer device.

* NOTE: For CUPS operation /dev/ulpt* must be chgrp'd lp and modes 664,
by adding this to your /etc/devfs.conf:

perm ulpt* root:lp 664

(group 'lp' is added by the CUPS package).

13 years agonewfs_hammer: update checks on undosize and fssize minimum
Thomas Nikolajsen [Tue, 19 Apr 2011 22:20:32 +0000 (00:20 +0200)]
newfs_hammer: update checks on undosize and fssize minimum

Unless -f options given undosize must be at least 500MB
and fssize at least 10GB (50GB recommended).

Also fix a few extra spaces.

13 years agohammer.8: improve general description and markup
Thomas Nikolajsen [Tue, 19 Apr 2011 22:18:20 +0000 (00:18 +0200)]
hammer.8: improve general description and markup

13 years agohammer.5: add info on dedup and improve general description and markup
Thomas Nikolajsen [Tue, 19 Apr 2011 22:14:56 +0000 (00:14 +0200)]
hammer.5: add info on dedup and improve general description and markup

13 years agonrelease - index.html: fix stale links
Thomas Nikolajsen [Tue, 19 Apr 2011 22:10:50 +0000 (00:10 +0200)]
nrelease - index.html: fix stale links

13 years agonrelease - update README w/ HAMMER instructions etc
Thomas Nikolajsen [Tue, 19 Apr 2011 22:02:30 +0000 (00:02 +0200)]
nrelease - update README w/ HAMMER instructions etc

 - Add instructions on manual HAMMER install
 - Default USB disk name is 'da8'
 - SILI disks uses 'da' name, default 'da0'
 - EHCI (USB 2.0) is enabled by default

13 years agohammer - Fix version output
Antonio Huete Jimenez [Tue, 19 Apr 2011 18:58:07 +0000 (20:58 +0200)]
hammer - Fix version output

Do not try to display WIP version if there isn't one.

13 years agobitstring.h -- Correct bit_fls and bit_nsearch
Venkatesh Srinivas [Tue, 19 Apr 2011 10:36:43 +0000 (03:36 -0700)]
bitstring.h -- Correct bit_fls and bit_nsearch

bit_nsearch was searching for one-too-many bits and was walking the whole set.

Submitted-by: Luis Useche <useche@gmail.com>
13 years agoacpi: Reduce log verbosity
Sepherosa Ziehau [Tue, 19 Apr 2011 06:26:48 +0000 (14:26 +0800)]
acpi: Reduce log verbosity

13 years agotest from machine bugg
Sepherosa Ziehau [Tue, 19 Apr 2011 06:21:10 +0000 (14:21 +0800)]
test from machine bugg

13 years agoAdd a final newline to the last file that didn't have one.
Sascha Wildner [Sun, 17 Apr 2011 23:24:41 +0000 (01:24 +0200)]
Add a final newline to the last file that didn't have one.

13 years agoeditline(3): Use getpwnam_r() and getpwuid_r() and raise WARNS to 6.
Sascha Wildner [Sun, 17 Apr 2011 22:04:54 +0000 (00:04 +0200)]
editline(3): Use getpwnam_r() and getpwuid_r() and raise WARNS to 6.

13 years agokbdcontrol(1): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Sun, 17 Apr 2011 21:36:29 +0000 (23:36 +0200)]
kbdcontrol(1): Raise WARNS to 6 and fix warnings.

13 years agovknetd(8): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Sun, 17 Apr 2011 21:13:54 +0000 (23:13 +0200)]
vknetd(8): Raise WARNS to 6 and fix warnings.

13 years agoinstaller/LiveCD: Do no longer set kern.emergency_intr_enable to 1.
Sascha Wildner [Sun, 17 Apr 2011 11:50:00 +0000 (13:50 +0200)]
installer/LiveCD: Do no longer set kern.emergency_intr_enable to 1.

In-discussion-with: sephe

13 years agoacpi/pcib: If bus does not present, give other bus drivers chance
Sepherosa Ziehau [Sun, 17 Apr 2011 10:58:26 +0000 (18:58 +0800)]
acpi/pcib: If bus does not present, give other bus drivers chance

- Call acpi_DeviceIsPresent() during probing, so that if bus does not
  present other bus drivers could have chance to take over the bus.
- In acpi_pcib_attach(), assert that bus is present, since the presence
  of the bus is checked during probing.

Reported-by: swildner@
13 years agoioapic/abi; Reduce log verbosity
Sepherosa Ziehau [Sun, 17 Apr 2011 08:56:31 +0000 (16:56 +0800)]
ioapic/abi; Reduce log verbosity

13 years agoacpi: FACS is already loaded, don't load it manually again
Sepherosa Ziehau [Sun, 17 Apr 2011 08:24:53 +0000 (16:24 +0800)]
acpi: FACS is already loaded, don't load it manually again

13 years agoacpi: Enable ACPI reset by default
Sepherosa Ziehau [Sun, 17 Apr 2011 08:08:37 +0000 (16:08 +0800)]
acpi: Enable ACPI reset by default

- Enable ACPI reset if FADT has this feature bit set
- During ACPI reset, use AcpiReset() instead of rolling our own

Obtained-from: FreeBSD (r213755 jkim@freebsd.org)

13 years agoacpi/pstate: Add tunable to allow BIOS whacking start/max FID/VID
Sepherosa Ziehau [Sun, 17 Apr 2011 07:21:55 +0000 (15:21 +0800)]
acpi/pstate: Add tunable to allow BIOS whacking start/max FID/VID

This tunable is set to 1 (stringent check) by default.

DragonFly-issue: http://bugs.dragonflybsd.org/issue2025

13 years agopowerd: Wait hw.acpi.cpu.px_dom* sysctl to be created by kernel
Sepherosa Ziehau [Sun, 17 Apr 2011 07:00:54 +0000 (15:00 +0800)]
powerd: Wait hw.acpi.cpu.px_dom* sysctl to be created by kernel

Since hw.acpi.cpu.px_dom* creation is queued into ACPI taskqueue
and ACPI taskqueue is shared across various ACPI modules, any delay
in other modules may cause hw.acpi.cpu.px_dom* to be created at
quite a later time (e.g. cmbat module's task could take quite a lot
of time).

13 years agoacpi: Enable GPE for button and lid, if they have _PRW object
Sepherosa Ziehau [Sun, 17 Apr 2011 05:00:17 +0000 (13:00 +0800)]
acpi: Enable GPE for button and lid, if they have _PRW object

For devices which has _PRW object, AcpiSetupGpeForWake() will be called,
however, AcpiSetupGpeForWake() will disable GPE, which causes devices
like button and lid to stop function if they have _PRW object.  So for
button and lid, we explicitly enable GPE if they have _PRW object.

Reported-by: y0netan1@
13 years agoacpi: Skip \_SB_ and \_TZ_ only for devices.
Sepherosa Ziehau [Sun, 17 Apr 2011 04:39:19 +0000 (12:39 +0800)]
acpi: Skip \_SB_ and \_TZ_ only for devices.

Obtained-from: FreeBSD (r214765 jkim@freebsd.org)

  Adjust a comment to clarify why \_SB_ and \_TZ_ are defined as device
  type in ACPICA.  Reshuffle the code a bit to make sure this kludge only
  applies to these two specical cases and to make it cleaner.

13 years agoacpi: Restore old AcpiWalkNamespace semantic
Sepherosa Ziehau [Sun, 17 Apr 2011 04:12:17 +0000 (12:12 +0800)]
acpi: Restore old AcpiWalkNamespace semantic

Noticed-by: y0netan1@
13 years agoSh: Add test for getting length of string in double-quotes.
Peter Avalos [Sat, 16 Apr 2011 21:51:32 +0000 (11:51 -1000)]
Sh: Add test for getting length of string in double-quotes.

13 years agosh: Add test for obscure and ambiguous ${#?}.
Peter Avalos [Sat, 16 Apr 2011 21:48:06 +0000 (11:48 -1000)]
sh: Add test for obscure and ambiguous ${#?}.

Obtained-from: FreeBSD

13 years agosh: Add test for expanding of quoted positional parameters in case.
Peter Avalos [Sat, 16 Apr 2011 21:46:25 +0000 (11:46 -1000)]
sh: Add test for expanding of quoted positional parameters in case.

13 years agosh: Add some tests for ${#parameter}.
Peter Avalos [Sat, 16 Apr 2011 21:40:50 +0000 (11:40 -1000)]
sh: Add some tests for ${#parameter}.

Obtained-from: FreeBSD

13 years agosh: Add some tests for omitting whitespace.
Peter Avalos [Sat, 16 Apr 2011 21:36:09 +0000 (11:36 -1000)]
sh: Add some tests for omitting whitespace.

Obtained-from: FreeBSD

13 years agosh: Split off some special behavior into separate regress tests.
Peter Avalos [Sat, 16 Apr 2011 21:33:04 +0000 (11:33 -1000)]
sh: Split off some special behavior into separate regress tests.

Obtained-from: FreeBSD

13 years agosh(1): Describe subshell environment, command substitution better
Peter Avalos [Sat, 16 Apr 2011 21:21:02 +0000 (11:21 -1000)]
sh(1): Describe subshell environment, command substitution better

POSIX does not require the shell to fork for a subshell environment, and
we use that possibility in various ways (command substitutions with a
single command and most subshells that are the final command of a shell
process).  Therefore do not tie subshells to forking in the man page.

Also, fix some sentences with excessive semicolons.

Obtained-from:  FreeBSD

13 years agosh: Fix some parameter expansion variants ${#...}.
Peter Avalos [Sat, 16 Apr 2011 21:17:03 +0000 (11:17 -1000)]
sh: Fix some parameter expansion variants ${#...}.

These already worked: $# ${#} ${##} ${#-} ${#?}
These now work as well: ${#+word} ${#-word} ${##word} ${#%word}

There is an ambiguity in the standard with ${#?}: it could be the length of
$? or it could be $# giving an error in the (impossible) case that it is not
set. We continue to use the former interpretation as it seems more useful.

Obtained-from:  FreeBSD

13 years agosh: Reduce diffs to FreeBSD in the arith code.
Peter Avalos [Sat, 16 Apr 2011 21:10:07 +0000 (11:10 -1000)]
sh:  Reduce diffs to FreeBSD in the arith code.

Obtained-from:   FreeBSD

13 years agoctags(1): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Sat, 16 Apr 2011 20:29:19 +0000 (22:29 +0200)]
ctags(1): Raise WARNS to 6 and fix warnings.

13 years agotalk(1): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Sat, 16 Apr 2011 20:22:24 +0000 (22:22 +0200)]
talk(1): Raise WARNS to 6 and fix warnings.

13 years agousbhidctl(1): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Sat, 16 Apr 2011 20:22:08 +0000 (22:22 +0200)]
usbhidctl(1): Raise WARNS to 6 and fix warnings.

13 years agoacpi/ec: Bring in more GPE fixes from FreeBSD head (acpi_ec.c r216965)
Sepherosa Ziehau [Sat, 16 Apr 2011 16:58:34 +0000 (00:58 +0800)]
acpi/ec: Bring in more GPE fixes from FreeBSD head (acpi_ec.c r216965)

13 years agoacpi: Sync ec with FreeBSD 8
Sepherosa Ziehau [Sat, 16 Apr 2011 15:12:05 +0000 (23:12 +0800)]
acpi: Sync ec with FreeBSD 8

13 years agomount/umount: Small whitespace fix in the usage().
Sascha Wildner [Sat, 16 Apr 2011 08:54:07 +0000 (10:54 +0200)]
mount/umount: Small whitespace fix in the usage().

13 years agomount, umount: Implement the '-F' option to specify an alternate fstab file.
YONETANI Tomokazu [Sat, 16 Apr 2011 08:02:49 +0000 (17:02 +0900)]
mount, umount: Implement the '-F' option to specify an alternate fstab file.

This also fixes jail_${jail}_fstab option in /etc/rc.d/jail .

Taken-from: FreeBSD (r113220 by mdodd@freebsd.org)

13 years agokernel - Fix apparent timing race in early usb keyboard polling code
Matthew Dillon [Fri, 15 Apr 2011 17:58:32 +0000 (10:58 -0700)]
kernel - Fix apparent timing race in early usb keyboard polling code

* Fix an apparent timing race where a USB command does not complete
  prior to the poll issued with the command.  Perform another poll
  in a loop to deal with it.

* Problem appears to occur w/ohci's early poll prior to ehci attachment.

Reported-by: Antonio Huete Jimenez <ahuete.devel@gmail.com>
13 years agoasf(8): Fix module path.
Sascha Wildner [Fri, 15 Apr 2011 15:39:40 +0000 (17:39 +0200)]
asf(8): Fix module path.