Intention of this commit is to let us take a full advantage
of libusb(8) ported to Linux. This decreases a possibility of getting
any collisions within ioctl() "command" space, especially with
relation to LINUX_SNDCTL_SEQ... stuff.
Basically, we provide commands, that will be mapped in the kernel
to correct ones and forward those to the USB layer. Port enabling
functionality brought with this patch is here:
http://www.freebsd.org/cgi/query-pr.cgi?pr=146895
Bump __FreeBSD_version to catch, since which version installing a
port makes sense.
This patch should bring no regressions. So far, only i386 is tested.
Jayachandran C. [Mon, 24 May 2010 06:01:37 +0000 (06:01 +0000)]
Remove unused code in sys/mips/rmi :
- ehcireg.h,ehcivar.h : USB related files from old merge
- pcibus.c : was merged into xlr_pci.c earlier
- xlr_boot1_console.c : obsolete console code using bootloader hooks
- sys/mips/rmi/perfmon* : obsolete custom performance monitoring code
Martin Matuska [Sun, 23 May 2010 21:16:34 +0000 (21:16 +0000)]
Remove kstat.zfs.arcstats.l2_write_bytes_written
The arcstats.l2_write_bytes_written kstat counter introduced
in r205231 was duplicite with vendor's arcstats.l2_write_bytes counter
imported in r208373 (OpenSolaris revision 8582:df9361868dbe)
Approved by: pjd, delphij (mentor)
MFC after: 3 days
Marius Strobl [Sun, 23 May 2010 19:46:19 +0000 (19:46 +0000)]
Update the sparc64 hardware list regarding machines that will be supported
beginning with 8.1-RELEASE as well as correct some existing entries and
add previously missed ones.
Extend struct sysvec with three new elements:
sv_fetch_syscall_args - the method to fetch syscall arguments from
usermode into struct syscall_args. The structure is machine-depended
(this might be reconsidered after all architectures are converted).
sv_set_syscall_retval - the method to set a return value for usermode
from the syscall. It is a generalization of
cpu_set_syscall_retval(9) to allow ABIs to override the way to set a
return value.
sv_syscallnames - the table of syscall names.
Use sv_set_syscall_retval in kern_sigsuspend() instead of hardcoding
the call to cpu_set_syscall_retval().
The new functions syscallenter(9) and syscallret(9) are provided that
use sv_*syscall* pointers and contain the common repeated code from
the syscall() implementations for the architecture-specific syscall
trap handlers.
Syscallenter() fetches arguments, calls syscall implementation from
ABI sysent table, and set up return frame. The end of syscall
bookkeeping is done by syscallret().
Take advantage of single place for MI syscall handling code and
implement ptrace_lwpinfo pl_flags PL_FLAG_SCE, PL_FLAG_SCX and
PL_FLAG_EXEC. The SCE and SCX flags notify the debugger that the
thread is stopped at syscall entry or return point respectively. The
EXEC flag augments SCX and notifies debugger that the process address
space was changed by one of exec(2)-family syscalls.
The i386, amd64, sparc64, sun4v, powerpc and ia64 syscall()s are
changed to use syscallenter()/syscallret(). MIPS and arm are not
converted and use the mostly unchanged syscall() implementation.
Alexander Motin [Sun, 23 May 2010 07:53:22 +0000 (07:53 +0000)]
Make table-based HPET identification more clever. Before creating fake
device, make sure we have no real HPET device entry with same ID.
As side effect, it potentially allows several HPETs to be attached.
Use first of them for timecounting, rest (if ever present) could later
be used as event sources.
Neel Natu [Sat, 22 May 2010 21:38:57 +0000 (21:38 +0000)]
- Use ptpgzone zone to allocate page table pages irrespective of the amount of
memory on a platform. Tested on the Sibyte with 256MB and 1GB memory
configurations.
- Replace vtophys() with MIPS_KSEG0_TO_PHYS() to convert a page table
page's virtual address to physical. We can safely do this because
page table pages are allocated out of KSEG0.
- Add an assertion to verify that when a page table page is freed it
contains all zeroes. We can now use it after allocation without
zeroing it.
John Baldwin [Fri, 21 May 2010 17:17:56 +0000 (17:17 +0000)]
- Adjust the whitespace for the lines that output fields in 'show pcpu' in
DDB so that all the fields line up.
- Print out the tid of the per-CPU idlethread instead of the pid since
the idle process is now shared across all idle threads.
John Baldwin [Fri, 21 May 2010 16:58:52 +0000 (16:58 +0000)]
- Set 'dmadat' earlier so that we properly setup the heap if we fail to
locate a high memory area for the heap using the SMAP.
- Read the number of hard drive devices from the BIOS instead of hardcoding
a limit of 128. Some BIOSes duplicate disk devices once you get beyond
the maximum drive number.
Remove PIOLLHUP from the flags used to test for to set exceptfsd
fd_set bits in select(2). It seems that historical behaviour is to not
reporting exception on EOF, and several applications are broken.
Martin Matuska [Fri, 21 May 2010 09:52:49 +0000 (09:52 +0000)]
Update L2ARC code and fix several bugs.
- improve ARC memory consumption (Bug ID 6488341)
- ARC/L2ARC metadata accounting (Bug ID 6748019)
- L2ARC turbo warmup (Bud ID 6748023)
- kstats for ARC content (Bug ID 6748023)
- kstats for evicted bytes from ARC by L2ARC state (Bud ID 6871680)
- fix panic on i386 systems (Bug ID 6821260)
Jayachandran C. [Fri, 21 May 2010 05:34:19 +0000 (05:34 +0000)]
Changes to boot on a subset of threads on an XLR/XLS core.
- Adds re-partitioning TLB per core for enabled threads.
- Adds hardware thread id to cpuid mapping
- updates rge driver packet distribution and message ring handling
threads to be started based on hardware thread id.
- remove unused early debugging code to set control registers.
- coding style fixes
Nathan Whitehorn [Thu, 20 May 2010 21:07:58 +0000 (21:07 +0000)]
Fix a long-standing bug in the PowerPC OFW call function on SMP machines
where running ofwdump could cause hangs by forcing all secondary CPUs
into a busy wait with interrupts off during the call.
Following section 8.4 of the Open Firmware PowerPC processor binding,
the firmware is free to overwrite the system interrupt handlers during
OF calls, restoring the OS handlers on exit. On single CPU systems, this
process is invisible to the operating system. On multiple CPU systems,
taking any exception on a secondary CPU while an OF call is in progress
ends with that exception vectored into OF, resulting in a slow movement
of the entire system into firmware context and a machine hang.
Marius Strobl [Thu, 20 May 2010 12:46:19 +0000 (12:46 +0000)]
Change ad_firmware_geom_adjust() to operate on a struct disk * only and
hook it up to ada(4) also. While at it, rename *ad_firmware_geom_adjust()
to *ata_disk_firmware_geom_adjust() etc now that these are no longer
limited to ad(4).
Marius Strobl [Thu, 20 May 2010 08:56:50 +0000 (08:56 +0000)]
Update to a config.h created by a file 5.03 configure script. This causes
file.1 to contain the correct version number and SIZEOF_LONG_LONG to be
defined as appropriate, which is crucial for 64-bit big-endian ELF files
to be handled correctly on big-endian systems.
Jung-uk Kim [Wed, 19 May 2010 23:56:26 +0000 (23:56 +0000)]
Add a new build option, MAN_UTILS. This option lets you control building
utilities and related support files for manual pages, which were previously
controlled by MAN. For POLA, the default depends on MAN, i.e., WITHOUT_MAN
implies WITHOUT_MAN_UTILS and WITH_MAN implies WITH_MAN_UTILS. This patch
is slightly improved by me from:
Doug Barton [Wed, 19 May 2010 19:03:19 +0000 (19:03 +0000)]
This change does the following for the scripts that run up through
FILESYSTEMS (the default early_late_divider):
1. Move sysctl to run first
2. Move as many BEFOREs to REQUIREs as possible.
3. Minor effect, move hostid_save from right before mdconfig to right
after.
A lot of the early scripts make use of sysctl one way or another so
running this first makes a lot of sense given that system-critical
values are often placed in sysctl.conf.
My original purpose for working on this was that while doing some
debugging on other stuff I noticed that the order of execution was
different in the first pass through the early scripts and the second.
In practice that doesn't matter because the scripts are not executed the
second time. However this _can_ result in problems if the difference in
the rcorder moves a script from the late section to the early section in
the second pass (which would mean the script would not get executed).
So, I wanted to make the order of execution of the scripts in the early
section more deterministic.
In the course of debugging the ordering problems I noticed that moving
the BEFOREs to REQUIREs prevented the changes in order from the first
pass to the second pass without having to make any substantial changes.
(Of course it's no secret that I think BEFORE should be avoided as much
as possible, but this is a good example of why.)
Reviewed by: silence on freebsd-rc@
MFC after: 8.1-RELEASE
Attilio Rao [Wed, 19 May 2010 15:06:09 +0000 (15:06 +0000)]
Fix a race between ngs_rcvmsg() and soclose() which closes the control
socket while it is still in use.
priv->ctlsock is checked at the top of the function but without any
lock held, which means the control socket state may certainly change.
Add a similar protection to ngs_shutdown() even if a race is unlikely
to be experienced there.
Sponsored by: Sandvine Incorporated
Obtained from: Nima Misaghian @ Sandvine Incorporated
<nmisaghian at sandvine dot com>
MFC after: 10 days
Andriy Gapon [Wed, 19 May 2010 09:32:11 +0000 (09:32 +0000)]
ffs_mount: accept and drop userland-only options that can be passed from
loader(8)
In r193192 loader(8) has grown an ability to pass root mount options
from fstab via vfs.root.mountfrom.options. Unfortunately, some options
that can be present in fstab are for userland only and lead to root
mounting failure when seen by kernel.
Rather than teaching loader about FFS-specific options that should be
filtered out, ffs_mount recognizes those options as valid, but ignores
and deletes[1] them.
[1] is suggested by jh.
PR: kern/141050
Reported by: many
Reviewed by: jh, bde
MFC after: 4 days
Ulrich Spörlein [Wed, 19 May 2010 08:52:51 +0000 (08:52 +0000)]
- Fix terminating argument to execl(3), sizeof(NULL) != sizeof(char *)
might be true on some systems [1]
- Rewrite gotos to use return directly
- Some spelling fixes
- Reduce unneeded/non-standard Makefile settings
Jeff Roberson [Wed, 19 May 2010 06:18:01 +0000 (06:18 +0000)]
- Don't immediately re-run softdepflush if we didn't make any progress
on the last iteration. This can lead to a deadlock when we have
worklist items that cannot be immediately satisfied.
- Remove some unnecessary debugging code and place some other under
SUJ_DEBUG.
- Examine the journal state in softdep_slowdown().
- Re-format some comments so I may more easily add flag descriptions.
Jack F Vogel [Wed, 19 May 2010 00:03:48 +0000 (00:03 +0000)]
A few changes:
When not defining header split do not allocate mbufs,
this can be a BIG savings in the mbuf memory pool.
Also keep seperate dma maps for the header and
payload pieces when doing header split. The basis
of this code was a patch done a while ago by
yongari, thank you :)
Jung-uk Kim [Tue, 18 May 2010 18:28:17 +0000 (18:28 +0000)]
Remove unnecessary pointer increment. A wrong pointer may be passed to
free(9) and it can cause kernel panic when there are multiple graphics
controllers in the system.
Tested by: Brandon Gooch (jamesbrandongooch at gmail dot com)
MFC after: 3 days
Roman Divacky [Tue, 18 May 2010 08:55:23 +0000 (08:55 +0000)]
Only use the cache after the early stage of loading. This is
because calling mmap() etc. may use GOT which is not set up
yet. Use calloc() instead of mmap() in cases where this
was the case before (sparc64, powerpc, arm).
Submitted by: Dimitry Andric (dimitry andric com)
Reviewed by: kan
Approved by: ed (mentor)
Rick Macklem [Tue, 18 May 2010 05:18:21 +0000 (05:18 +0000)]
Allow the experimental NFSv4 client to use cached attributes
when a write delegation is held. Also, add a missing
mtx_unlock() call for the ACL debugging code.