Commit Graph

158238 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
351b9a37a4 Sort includes.
MFC after:	3 days
2010-09-22 18:38:02 +00:00
Sunpoet Po-Chuan Hsieh
e5d8eb431b Add myself as a ports committer
Approved by:	pgollucci (mentor)
2010-09-22 16:54:22 +00:00
Pyun YongHyeon
4a4dd474db Fix build breakage introduced in r212972. 2010-09-22 16:48:24 +00:00
John Baldwin
7494ee9b63 Copy td_rqindex during fork instead of zero'ing it to match the comments.
I do not believe there is any functional change.
2010-09-22 15:10:03 +00:00
Konstantin Belousov
e8b4ca850e For sparc64 relocations that directly put bits of the symbol value into
the location, apply elf_relocaddr to the symbol value to have right
values for the symbols from dpcpu segment.

PR:	kern/147769
Discussed with:	avg
Tested by:	marius
MFC after:	2 weeks
2010-09-22 12:52:12 +00:00
Alexander Motin
48fe2e6719 Quick fix for unmotivated C2 state usage during boot, introduced at r212541.
That caused LAPIC timer failure and huge delays during boot on some systems.
2010-09-22 11:32:22 +00:00
Andriy Gapon
61548876b1 kdb_backtrace: use stack_print_ddb instead of stack_print
This is a followup to r212964.
stack_print call chain obtains linker sx lock and thus potentially may
lead to a deadlock depending on a kind of a panic.
stack_print_ddb doesn't acquire any locks and it doesn't use any
facilities of ddb backend.
Using stack_print_ddb outside of DDB ifdef required taking a number of
helper functions from under it as well.

It is a good idea to rename linker_ddb_* and stack_*_ddb functions to
have 'unlocked' component in their name instead of 'ddb', because those
functions do not use any DDB services, but instead they provide unlocked
access to linker symbol information.  The latter was previously needed
only for DDB, hence the 'ddb' name component.

Alternative is to ditch unlocked versions altogether after implementing
proper panic handling:
1. stop other cpus upon a panic
2. make all non-spinlock lock operations (mutex, sx, rwlock) be a no-op
   when panicstr != NULL

Suggested by:	mdf
Discussed with:	attilio
MFC after:	2 weeks
2010-09-22 06:45:07 +00:00
Andriy Gapon
9c2d052943 acpi_attach: do not explicitly install default handlers for default
address spaces

There has been no need to do that starting with ACPICA 20040427 as
AcpiEnableSubsystem() installs the handlers automatically.
Additionaly, explicitly calling AcpiInstallAddressSpaceHandler before
AcpiEnableSubsystem is not supported by ACPICA and leads to too early
execution of _REG methods in some DSDTs, which may result in problems.

Big thanks to Robert Moore of ACPICA/Intel for explaining the above.

Reported by:	Daniel Bilik <daniel.bilik@neosystem.cz>
Tested by:	Daniel Bilik <daniel.bilik@neosystem.cz>
Reviewed by:	jkim
Suggested by:	"Moore, Robert" <robert.moore@intel.com>
MFC after:	1 week
2010-09-22 06:10:22 +00:00
Alexander Motin
9dfc483c4a If kernel built with DEVICE_POLLING, keep one CPU always in active state
to handle it.
2010-09-22 05:32:37 +00:00
Alexander Motin
0069293b2b Decrease poll interval from 1000 to 100us. This significantly reduces
kernel dump time, especially with minidump.
2010-09-22 05:17:18 +00:00
Warner Losh
12d455a6b1 Make the labels match the device name that's mounted, not just the
slice they are on.  When NANO_LABEL is not defined, the fstab
generates entries that specify /dev/ad0s1a.  When NANO_LABEL is
defined, it generates /dev/usb/${NANO_LABEL}s1a.  The prior code
created the file system with a label of ${NANO_LABEL}s1, leading to
problems on boot.

Pointy hat to: imp@
2010-09-22 04:48:39 +00:00
Neel Natu
5df4b6be91 Enforce that 'pmap_kenter()' is only used to establish cacheable mappings.
Mappings with other cacheability attributes can be established, if needed,
by using 'pmap_kenter_attr()'.

Suggested by:	jchandra, imp
2010-09-22 02:26:07 +00:00
MIHIRA Sanpei Yoshiro
87b6f1855b Add new device ids.
Buffalo (Melco Inc.) LUA3-U2-AGT
 Logitec LAN-GTJ/U2A(usb/119981)

PR:		usb/119981 and me
Submitted by:	"Y.Okabe" <be_works_us at yahoo.com>, hiroo at oikumene.gcd.org
Reviewed by:	thompsa
MFC after:	3 days
2010-09-21 22:42:14 +00:00
Dimitry Andric
d205253515 When building world with clang, for gnu/lib/libobjc, sys/boot/i386/boot2
and sys/boot/pc98/boot2, do not simply assign 'gcc' to CC, since compile
flags are sometimes passed via this variable, for example during the
build32 stage on amd64.  This caused the 32-bit libobjc build on amd64
to fail.

Instead, only replace the first instance of clang (if any, including
optional path) with gcc, and leave the arguments alone.

Approved-by:	rpaulo (mentor)
2010-09-21 21:41:45 +00:00
Christian Brueffer
bed6f18493 Minor grammar fixes. 2010-09-21 21:07:46 +00:00
Rui Paulo
7e78863707 Workaround LLVM bug #4434:
Reorder inline assembly arguments temp2, temp, value and texp to follow
the st(0), st(1), etc. style.
Also mark the temp2 variable as volatile to workaround another clang
bug.
This allows clang to buildworld FreeBSD/i386.

Submitted by:	dim
2010-09-21 20:23:19 +00:00
John Baldwin
a8103ae8ca Comment nit, set TDF_NEEDRESCHED after the comment describing why it is
done rather than before.

MFC after:	1 week
2010-09-21 19:12:22 +00:00
Pyun YongHyeon
fc05868abd Remove unnecessary controller reinitialization.
PR:	kern/87506
2010-09-21 17:52:32 +00:00
Pyun YongHyeon
e9dfd82ff1 Remove unnecessary controller reinitialization.
StarFire controller does not require controller reinitialization to
program perfect filters. While here, make driver immediately exit
from interrupt/polling handler if driver reinitialized controller.

PR:	kern/87506
2010-09-21 17:42:19 +00:00
Alexander Motin
bcb74c4c95 If new callout scheduled to another CPU and we are using global timer,
there is high probability that timer is already programmed by some other
CPU. Especially by one that registered this callout, and so active now.
2010-09-21 17:37:28 +00:00
Pyun YongHyeon
744ec7f282 Make sure to clear IFF_DRV_RUNNING to reinitialize controller.
While I'm here update if_oerrors counter when driver encounters
watchdog timeout.
2010-09-21 17:31:14 +00:00
Pyun YongHyeon
b7dc7dd4f5 Remove unnecessary controller reinitialization.
PR:	kern/87506
2010-09-21 17:25:15 +00:00
Alexander Motin
afe41f2da7 Remember last kern.eventtimer.periodic value, explicitly set by user.
If timer capabilities forcing us to change periodicity mode, try to restore
it back later, as soon as new choosen timer capable to do it. Without this,
timer change like HPET->RTC->HPET always results in enabling periodic mode.
2010-09-21 16:50:24 +00:00
Jaakko Heinonen
6adc52306a Modify devfs_fqpn() for future use in devfs path reference counting
code:

- Accept devfs_mount and devfs_dirent as the arguments instead of a
  vnode. This generalizes the function so that it can be used from
  contexts where vnode references are not available.
- Accept NULL cnp argument. No '/' will be appended, if a NULL cnp is
  provided.
- Make the function global and add its prototype to devfs.h.

Reviewed by:	kib
2010-09-21 16:49:02 +00:00
Alan Cox
8f7f5a7f26 Fix exec_imgact_shell()'s handling of two error cases: (1) Previously, if
the first line of a script exceeded MAXSHELLCMDLEN characters, then
exec_imgact_shell() silently truncated the line and passed on the truncated
interpreter name or argument.  Now, exec_imgact_shell() will fail and return
ENOEXEC, which is the commonly used errno among Unix variants for this type
of error. (2) Previously, exec_imgact_shell()'s check on the length of the
interpreter's name was ineffective.  In other words, exec_imgact_shell()
could not possibly fail and return ENAMETOOLONG.  The reason being that the
length of the interpreter name had to exceed MAXSHELLCMDLEN characters in
order that ENAMETOOLONG be returned.  But, the search for the end of the
interpreter name stops after at most MAXSHELLCMDLEN - 2 characters are
scanned.  (In the end, this particular error is eventually discovered
outside of exec_imgact_shell() and ENAMETOOLONG is returned.  So, the real
effect of this second change is that the error is detected earlier, in
exec_imgact_shell().)

Update the definition of MAXINTERP to the actual limit on the size of
the interpreter name that has been in effect since r142453 (from
2005).

In collaboration with: kib
2010-09-21 16:24:51 +00:00
Andriy Gapon
088acbb312 kdb_backtrace: stack(9)-based code to print backtrace without any backend
The idea is to add KDB and KDB_TRACE options to GENERIC kernels on
stable branches, so that at least the minimal information is produced
for non-specific panics like traps on page faults.
The GENERICs in stable branches seem to already include STACK option.

Reviewed by:	attilio
MFC after:	2 weeks
2010-09-21 15:07:44 +00:00
Rui Paulo
62ec0abc3c Bring in OpenSSL checkin 19821:
Make inline assembler clang-friendly [from HEAD].

 openssl/crypto/md32_common.h     	1.45.2.1 -> 1.45.2.2
 openssl/crypto/rc5/rc5_locl.h     	1.8 -> 1.8.8.1

Approved by:	simon
2010-09-21 10:22:29 +00:00
Ed Schouten
8aecb90468 Add a notice to the man page that batteries should be installed. 2010-09-21 08:25:00 +00:00
Alexander Motin
95d23438dd Until hardclock() and respectively tc_windup() called first time, system
is running on "dummy" time counter. But to function properly in one-shot
mode, event timer management code requires working time counter. Slow
moving "dummy" time counter delays first hardclock() call by few seconds
on my systems, even though timer interrupts were correctly kicking kernel.
That causes few seconds delay during boot with one-shot mode enabled.

To break this loop, explicitly call tc_windup() first time during
initialization process to let it switch to some real time counter.
2010-09-21 08:02:02 +00:00
Jayachandran C.
f294c94440 n32 fixes for nlge.
Use correct define (__mips_n64) for n64 compilation and use correct
parameter type for xlr_paddr_lw() in n32.
2010-09-21 07:58:47 +00:00
Andrew Thompson
231fffcf1a Fix the path to the sys dir when cross compiling after r209510.
Reviewed by:	imp
2010-09-21 07:03:53 +00:00
David Xu
81f3e99c56 If we are at cancellation point, always work as deferred mode despite
whether asynchronous mode is turned on or not, this always gives us a
chance to decide whether thread should be canceled or not in
cancellation points.
2010-09-21 06:47:04 +00:00
Andriy Gapon
68653c3bd6 zfs_map_page/zfs_unmap_page: do not use sched_pin() and SFB_CPUPRIVATE
zfs_map_page/zfs_unmap_page are mostly called around potential I/O paths
and it seems to be a not very good idea to do cpu pinning there.

Suggested by:	kib
MFC after:	2 weeks
2010-09-21 05:58:45 +00:00
Andriy Gapon
ff5e15a487 zfs_vnops: use zfs_map_page/zfs_unmap_page helper functions in another place
MFC after:	2 weeks
2010-09-21 05:54:36 +00:00
Andriy Gapon
928405318d tools/umastat: more cleanups
PR:		misc/146119
Submitted by:	pluknet <pluknet@gmail.com>
MFC after:	1 week
2010-09-21 05:36:30 +00:00
Warner Losh
eba842f9d8 Support new variable NANO_LABEL. When set to a non-null string,
nanobsd will build a system that uses this label (via
/dev/ufs/${NANO_LABEL}sX) in preference to NANO_DRIVE (well, it forces
NANO_DRIVE to be ufs/${NANO_LABEL}).  This allows images that will
boot off usb stick or CF card easily well.

There is no change if you don't set this variable.
2010-09-20 23:36:54 +00:00
Brian Somers
044bf69fd5 Add a geli resize subcommand to resize encrypted filesystems prior
to growing the filesystem.

Refuse to attach providers where the metadata provider size is
wrong.  This makes post-boot attaches behave consistently with
pre-boot attaches.  Also refuse to restore metadata to a provider
of the wrong size without the new -f switch.  The new -f switch
forces the metadata restoration despite the provider size, and
updates the provider size in the restored metadata to the correct
value.

Helped by:	pjd
Reviewed by:	pjd
2010-09-20 22:04:59 +00:00
Andriy Gapon
4b5ccbf768 tools/umastat: fix build on amd64
And perhaps other 64-bit platforms.

Submitted by:	Fabian Keil <freebsd-listen@fabiankeil.de>
MFC after:	1 week
2010-09-20 21:22:15 +00:00
Matthew D Fleming
d69b01efc2 Replace an XXX comment with the appropriate code.
Submitted by:	alc
2010-09-20 20:41:59 +00:00
Xin LI
f7482a2568 Add Simplified Chinese messages for BSD grep. 2010-09-20 19:42:52 +00:00
Matthew D Fleming
81059816c0 Use destroy_dev_sched(9) instead of destroy_dev(9) in passcleanup() as
it is indirectly a d_close method.

Prompted by:	kib
Reviewed by:	mav
MFC after:	2 weeks
2010-09-20 19:42:14 +00:00
Edward Tomasz Napierala
4089cc8aa1 First step at adopting FreeBSD to support PSARC/2010/029. This makes
acl_is_trivial_np(3) properly recognize the new trivial ACLs.  From
the user point of view, that means "ls -l" no longer shows plus signs
for all the files when running ZFS v28.
2010-09-20 17:10:06 +00:00
Dimitry Andric
e580952d8a Upgrade our Clang in base to r114020, from upstream's release_28 branch.
Approved-by:	rpaulo (mentor)
2010-09-20 16:43:17 +00:00
John Baldwin
8385f4cf94 Tweak the stats exported by the e1000 drivers:
- Add a single sysctl procedure to all three drivers to read an arbitrary
  register (the register is passed as arg2).  Use it to replace existing
  routines in igb(4) that used a separate routine for each register, and
  to add support for missing stats in em(4) and lem(4).
- Move the 'rx_overruns' and 'watchdog_timeouts' stats out of the MAC stats
  section as they are driver stats, not MAC counters.
- Simplify the code that creates per-queue stats in igb(4) to use a single
  loop and remove duplicated code.
- Properly read all 64 bits of the 'good octets received/transmitted' in
  em(4) and lem(4).
- Actually read the interrupt count registers in em(4), and drop the
  'host to card' sysctl stats from em(4) as they are not implemented in
  any of the hardware this driver supports.
- Restore several stats to em(4) that were lost in the earlier stats
  conversion including per-queue stats.
- Export several MAC stats in em(4) that were exported in igb(4) but not
  in em(4).
- Export stats in lem(4) using individual sysctls as in em(4) and igb(4).

Reviewed by:	jfv
MFC after:	1 week
2010-09-20 16:04:44 +00:00
Colin Percival
66e576525d Fix an integer overflow in RLE length parsing when decompressing
corrupt bzip2 data.

Approved by:	so (cperciva)
Security:	FreeBSD-SA-10:08.bzip2
2010-09-20 14:58:08 +00:00
Pawel Jakub Dawidek
e43e02f1a4 Add __dead2 to functions that we know they are going to exit.
MFC after:	3 days
2010-09-20 13:23:43 +00:00
Gleb Smirnoff
6baf7a243a Do not convert some meaningful error value to EINVAL.
Reviewed by:	will
2010-09-20 12:23:10 +00:00
Michael Tuexen
1ea735c802 Fix a locking issue which resulted in aborted associations
due to a corrupted nr-mapping array.

MFC after: 2 weeks.
2010-09-20 12:19:11 +00:00
Jayachandran C.
75e70f56a2 Add 64 bit support to nlge, and additional fixes
- 64 bit fixes for ifnlge.c
- Use m_nextpkt to save mbuf vaddr on 64 bit, we cannot store the
  64 bit vaddr  in the 40bit freeback field.
- remove unused code and unnecessary variables.
- use xlr_io_mmio macro instead of adding io base address
- rewrite GPIO related code to fixup nlge using xlr_write_reg and DELAY
- support for engg boards major num 11 and 12
- add xlr_paddr_lw() to load 32bit value from physical address, fix
  inline assembly
- style fixes
2010-09-20 11:53:57 +00:00
Marcel Moolenaar
e29560acd7 Unbreak the build on strong-aligned architectures (arm, ia64).
Casting from (char *) to (struct ufs1_dinode *) changes the
alignment requirement of the pointer and GCC does not know that
the pointer is adequately aligned (due to malloc(3)), and warns
about it. Cast to (void *) first to by-pass the check.
2010-09-20 04:20:55 +00:00