]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years ago- Don't assign the return value from read(2) to a variable of type
jh [Wed, 30 Jun 2010 18:34:45 +0000 (18:34 +0000)]
- Don't assign the return value from read(2) to a variable of type
  int.
- Use errx(3) instead of err(3) to print the error message on short
  reads in readlabel(). errno won't be set on short reads which can
  easily occur here due to the fixed size read request.

PR: 144307
Reviewed by: bde

14 years agoMove prototypes for kern_sigtimedwait() and kern_sigprocmask() to
jhb [Wed, 30 Jun 2010 18:03:42 +0000 (18:03 +0000)]
Move prototypes for kern_sigtimedwait() and kern_sigprocmask() to
<sys/syscallsubr.h> where all other kern_<syscall> prototypes live.

14 years agoUpdate comment for tdsignal() -> tdsendsignal() rename. Forgot to include
jhb [Wed, 30 Jun 2010 18:00:45 +0000 (18:00 +0000)]
Update comment for tdsignal() -> tdsendsignal() rename.  Forgot to include
this in 209592.

14 years agoSR-IOV support added to igb
jfv [Wed, 30 Jun 2010 17:26:47 +0000 (17:26 +0000)]
SR-IOV support added to igb

What this provides is support for the 'virtual function'
interface that a FreeBSD VM may be assigned from a host
like KVM on Linux, or newer versions of Xen with such
support.

When the guest is set up with the capability, a special
limited function 82576 PCI device is present in its virtual
PCI space, so with this driver installed in the guest that
device will be detected and function nearly like the bare
metal, as it were.

The interface is only allowed a single queue in this configuration
however initial performance tests have looked very good.

Enjoy!!

14 years agoSimplify entry to vm_pageout_clean(). Expect the page to be locked.
alc [Wed, 30 Jun 2010 17:20:33 +0000 (17:20 +0000)]
Simplify entry to vm_pageout_clean().  Expect the page to be locked.
Previously, the caller unlocked the page, and vm_pageout_clean()
immediately reacquired the page lock.  Also, assert rather than test
that the page is neither busy nor held.  Since vm_pageout_clean() is
called with the object and page locked, the page can't have changed
state since the caller verified that the page is neither busy nor
held.

14 years agoLeft out header change in last delta - new member
jfv [Wed, 30 Jun 2010 16:28:28 +0000 (16:28 +0000)]
Left out header change in last delta - new member
in adapter so that advertise changes can be done
to one port without the other changing.

14 years agoFix build.
glebius [Wed, 30 Jun 2010 11:17:55 +0000 (11:17 +0000)]
Fix build.

14 years agoImprove bufdone_finish()'s handling of the bogus page. Specifically, if
alc [Wed, 30 Jun 2010 04:52:42 +0000 (04:52 +0000)]
Improve bufdone_finish()'s handling of the bogus page.  Specifically, if
one or more mappings to the bogus page must be replaced, call pmap_qenter()
just once.  Previously, pmap_qenter() was called for each mapping to the
bogus page.

MFC after: 3 weeks

14 years agoOn powerpc, calculate s_scale using the non-FP version previously
marcel [Wed, 30 Jun 2010 01:40:25 +0000 (01:40 +0000)]
On powerpc, calculate s_scale using the non-FP version previously
specific to hp300. Since FreeBSD does not support hp300, hp300 has
been removed from the condition altogether.

The FP version broke profiling on powerpc due to invalid results.
Casting to double instead of float resolved the issue, but with
Book-E not having a FP unit, the non-FP version looked preferrable.
Note that even on AIM hardware the FP version yielded an invalid
value for s_scale, so the problem is most likely with the compiler
or with the expression itself.

14 years agoBAH, I apologize, the wrong version of the code got
jfv [Wed, 30 Jun 2010 01:10:08 +0000 (01:10 +0000)]
BAH, I apologize, the wrong version of the code got
fat fingered in place, this is the correct version
that actually works... <sheepish grin>

MFC: in a week

14 years agoAdd a new sysctl option, this will allow one to
jfv [Wed, 30 Jun 2010 01:01:06 +0000 (01:01 +0000)]
Add a new sysctl option, this will allow one to
limit the advertised speed of an SFP+ to 1G, effectively
"forcing" link at that lower speed. It is off by default
and is enabled by sysctl dev.ix.0.force_gig=1, 0 will
set it back to the norm.

14 years agosh: Forget about terminated background processes sooner.
jilles [Tue, 29 Jun 2010 22:37:45 +0000 (22:37 +0000)]
sh: Forget about terminated background processes sooner.

Unless $! has been referenced for a particular job or $! still contains that
job's pid, forget about it after it has terminated. If $! has been
referenced, remember the job until the wait builtin has reported its
completion (either with the pid as parameter or without parameters).

In interactive mode, jobs are forgotten after termination has been reported,
which happens before primary prompts and through the jobs builtin. Even
then, though, remember a job if $! has been referenced.

This is similar to what is suggested by POSIX and should fix most memory
leaks (which also tend to cause sh to use more CPU time) with long running
scripts that start background jobs.

Caveats:
* Repeatedly referencing $! without ever doing 'wait', like
    while :; do foo & echo started foo: $!; sleep 60; done
  will still use a lot of memory and CPU time in the long run.
* The jobs and jobid builtins do not cause a job to be remembered for longer
  like expanding $! does.

PR: bin/55346

14 years agoChange the mpt driver to allow larger I/O sizes.
ken [Tue, 29 Jun 2010 22:07:53 +0000 (22:07 +0000)]
Change the mpt driver to allow larger I/O sizes.

The mpt driver previously didn't report a 'maxio' size to CAM, and so the
da(4) driver limited I/O sizes to DFLTPHYS (64K) by default.  The number
of scatter gather segments allowed, as reported to busdma, was
(128K / PAGE_SIZE) + 1, or 33 on architectures with 4K pages.

Change things around so that we wait until we've determined how many
segments the adapter can support before creating the busdma tag used for
buffers, so we can potentially support more S/G segments and therefore
larger I/O sizes.

Also, fix some things that were broken about the module unload path.  It
still gets hung up inside CAM, though.

mpt.c: Move some busdma initialization calls in here, and call
them just after we've gotten the IOCFacts, and know how
many S/G segments this adapter can support.

mpt.h: Get rid of MPT_MAXPHYS, it is no longer used.

Add max_cam_seg_cnt, which is used to report our maximum
I/O size up to CAM.

mpt_cam.c: Use max_cam_seg_cnt to report our maximum I/O size to CAM.

Fix the locking in mpt_cam_detach().

mpt_pci.c: Pull some busdma initialization and teardown out and put
it in mpt.c.  We now delay it until we know many scatter
gather segments the adapter can support, and therefore
how to setup our busdma tags.

mpt_raid.c: Make sure we wake up the right wait channel to get the
raid thread to wake up when we're trying to shut it down.

Reviewed by: gibbs, mjacob
MFC after: 2 weeks

14 years agoInitializes the ratectl for a node when the state is changed to RUN.
weongyo [Tue, 29 Jun 2010 21:56:42 +0000 (21:56 +0000)]
Initializes the ratectl for a node when the state is changed to RUN.
This prevents a kernel fault by dividing with zero because the initial
rate was 0 and didn't be initialized.

Tested by: Warren Block <wblock at wonkity.com>
MFC after: 3 days

14 years agoFixes NULL pointer reference that it's occurred when the state is
weongyo [Tue, 29 Jun 2010 21:52:40 +0000 (21:52 +0000)]
Fixes NULL pointer reference that it's occurred when the state is
changed to RUN because ic->ic_newassoc isn't set anywhere now.  In the
previous bwi_newassoc() is used to initialize AMRR rate routines.

Tested by: Warren Block <wblock at wonkity.com>
MFC after: 3 days

14 years agoSort function prototypes (since I didn't manage to insert tdksignal()
jhb [Tue, 29 Jun 2010 20:55:12 +0000 (20:55 +0000)]
Sort function prototypes (since I didn't manage to insert tdksignal()
correctly).

14 years agoSend SIGPIPE to the thread that issued the offending system call
jhb [Tue, 29 Jun 2010 20:44:19 +0000 (20:44 +0000)]
Send SIGPIPE to the thread that issued the offending system call
rather than to the entire process.

Reported by: Anit Chakraborty
Reviewed by: kib, deischen (concept)
MFC after: 1 week

14 years agoTweak the in-kernel API for sending signals to threads:
jhb [Tue, 29 Jun 2010 20:41:52 +0000 (20:41 +0000)]
Tweak the in-kernel API for sending signals to threads:
- Rename tdsignal() to tdsendsignal() and make it private to kern_sig.c.
- Add tdsignal() and tdksignal() routines that mirror psignal() and
  pksignal() except that they accept a thread as an argument instead of
  a process.  They send a signal to a specific thread rather than to an
  individual process.

Reviewed by: kib

14 years agoFix profiling (part 1):
marcel [Tue, 29 Jun 2010 19:07:44 +0000 (19:07 +0000)]
Fix profiling (part 1):
o   Functions are 4-byte aligned for Book-E.
o   We get compiled with -DPROF and not -DGPROF if profiling
    is enabled.

14 years agoDon't lock buses around a call to xptperiphlistmatch- the buses will be
mjacob [Tue, 29 Jun 2010 17:10:55 +0000 (17:10 +0000)]
Don't lock buses around a call to xptperiphlistmatch- the buses will be
locked at appropriate places.

MFC after: 1 week
X-MFC: 208752

14 years agoAfter processing the O_SKIPTO opcode our cmd points to the next rule, and
glebius [Tue, 29 Jun 2010 16:57:30 +0000 (16:57 +0000)]
After processing the O_SKIPTO opcode our cmd points to the next rule, and
"match" processing at the end of inner loop would look ahead into the next
rule, which is incorrect. Particularly, in the case when the next rule
started with F_NOT opcode it was skipped blindly.

To fix this, exit the inner loop with the continue operator forcibly and
explicitly.

PR: kern/147798

14 years ago- The ETIMEDOUT error applies to pthread_timedjoin_np(), not pthread_join().
jhb [Tue, 29 Jun 2010 14:32:01 +0000 (14:32 +0000)]
- The ETIMEDOUT error applies to pthread_timedjoin_np(), not pthread_join().
- Tweak wording in history section for pthread_timedjoin_np().

MFC after: 3 days

14 years agoRevert r209578:
kib [Tue, 29 Jun 2010 14:31:49 +0000 (14:31 +0000)]
Revert r209578:
  Use C99 initializers for the struct sysent generated by MAKE_SYSENT().
C++ does not have designator-initializer facility of C99, not using this
in the header makes us friendly to C++ kernel modules, whoever wants
such schism.

Requested by: mdf
MFC after: 6 days (not really)

14 years agoExpand system into my_system, and add the necessary tidyness that we
imp [Tue, 29 Jun 2010 03:52:12 +0000 (03:52 +0000)]
Expand system into my_system, and add the necessary tidyness that we
need.  Close the pidfile.  Then close all descriptors >= 3 to avoid
information leakage to children.

This solves the problem of not being able to restart devd when you
have, for example, a dhclient forked to configure your network...

MFC after: 3 days

14 years agoIf i is going to be used in the loop unconditionally the declaration
dougb [Tue, 29 Jun 2010 01:04:24 +0000 (01:04 +0000)]
If i is going to be used in the loop unconditionally the declaration
has to be unconditional as well.

Conical head covering to: kib

14 years agoRegenerate
kib [Mon, 28 Jun 2010 18:17:21 +0000 (18:17 +0000)]
Regenerate

14 years agoDespite system call deregistration drains the threads executing System V
kib [Mon, 28 Jun 2010 18:12:42 +0000 (18:12 +0000)]
Despite system call deregistration drains the threads executing System V
shm syscalls, and initial check for the number of allocated segments
in the module deinitialization code, the following might happen:
   after the check for active segment, while waiting for threads to
   leave some other syscall, shmget(2) is called. Then, we can end
   up with the shared segment that cannot be detached since sysvshm
   module is unloaded.

Prevent the leak by rechecking and disclaiming a reference to the vm
object owned by sysvshm module, that might have grown during the drain.

Tested by: pho
Reviewed by: jhb
MFC after: 1 month

14 years agoCount number of threads that enter and leave dynamically registered
kib [Mon, 28 Jun 2010 18:06:46 +0000 (18:06 +0000)]
Count number of threads that enter and leave dynamically registered
syscalls. On the dynamic syscall deregistration, wait until all
threads leave the syscall code. This somewhat increases the safety
of the loadable modules unloading.

Reviewed by: jhb
Tested by: pho
MFC after: 1 month

14 years agoUse C99 initializers for the struct sysent generated by MAKE_SYSENT().
kib [Mon, 28 Jun 2010 17:59:45 +0000 (17:59 +0000)]
Use C99 initializers for the struct sysent generated by MAKE_SYSENT().

MFC after: 1 week

14 years agoFix a lock leak in the deadlock resolver in case the ticks counter
attilio [Mon, 28 Jun 2010 17:45:00 +0000 (17:45 +0000)]
Fix a lock leak in the deadlock resolver in case the ticks counter
wrapped up.

Sponsored by: Sandvine Incorporated
Submitted by: pluknet <pluknet at gmail dot com>
Reported by: Anton Yuzhaninov <citrin at citrin dot ru>
Reviewed by: jhb
MFC after: 3 days

14 years agoVarious changes to make locate compilable with WARNS=6. Note that there
gavin [Mon, 28 Jun 2010 12:04:55 +0000 (12:04 +0000)]
Various changes to make locate compilable with WARNS=6.  Note that there
is still one issue on FreeBSD/arm (signed vs unsigned char) which prevents
actually bumping this to WARNS=6 - I'm still considering the correct
solution to this issue.

Tested by: make universe

14 years agoMake WARNS=6 safe, mainly by casting to intmax_t and printing with %ju
gavin [Mon, 28 Jun 2010 12:00:20 +0000 (12:00 +0000)]
Make WARNS=6 safe, mainly by casting to intmax_t and printing with %ju
where needed.  Also, fix bad indentation on lines already affected by the
above changes.

Tested with: make universe

14 years agoMake WARNS=6 safe.
gavin [Mon, 28 Jun 2010 08:30:10 +0000 (08:30 +0000)]
Make WARNS=6 safe.

Tested by: make universe

14 years agoUse spaces, not tabs.
pjd [Mon, 28 Jun 2010 08:05:30 +0000 (08:05 +0000)]
Use spaces, not tabs.

14 years agoRevert r209544. It papers over a binutils bug, and is not even a reliable
nwhitehorn [Mon, 28 Jun 2010 01:40:56 +0000 (01:40 +0000)]
Revert r209544. It papers over a binutils bug, and is not even a reliable
fix for it.

The bug occurs when using the --as-needed flag to ld in the presence of
synthetic linker-generated symbols that reference symbols defined in
linked-to shared libraries with versioned symbols. When the only symbols
used from a library fall into this category, ld will drop the DT_NEEDED
entry for it, but retain the versioning information. This bug is best
fixed/hacked around in binutils, not in rtld.

Discussed with: kan

14 years agoMake the second example command more closely match the demo output, and as
gavin [Sun, 27 Jun 2010 23:11:35 +0000 (23:11 +0000)]
Make the second example command more closely match the demo output, and as
a side effect more clearly show the change in command lines between the
first and second example invocations.

14 years agoProperly inherit variables from src/usr.sbin/Makefile.inc for
imp [Sun, 27 Jun 2010 17:14:04 +0000 (17:14 +0000)]
Properly inherit variables from src/usr.sbin/Makefile.inc for
subdirectories of pc-sysinstall.  Back out explicit setting in
pc-sysinstall/pc-sysinstall/Makefile.

14 years agoUpdate pc-sysinstall to output list of FTP mirrors as well as some
imp [Sun, 27 Jun 2010 17:04:03 +0000 (17:04 +0000)]
Update pc-sysinstall to output list of FTP mirrors as well as some
installation information.  Export architecture to install.

PR: 148184
Submitted by: John Hixson

14 years agoSpell iXsystems, Inc properly
imp [Sun, 27 Jun 2010 16:46:11 +0000 (16:46 +0000)]
Spell iXsystems, Inc properly

Submitted by: delphij@

14 years agoFix transfer statistics in the "send file" case - The conditional used
gavin [Sun, 27 Jun 2010 14:21:08 +0000 (14:21 +0000)]
Fix transfer statistics in the "send file" case - The conditional used
to print the stats were using an uninitialised variable. [1]

Fix trasnfer statistics in the "receive file" case - the statistics struct
was being cleared both before and after the initial connect to the remote
server.  As a result, the printed time and calculated bandwidth covers
the time to connect ad well as the time to transfer the file.  This may
not be ideal, but now at least matches the "send file" case.

Found by: clang static analyser [1]
Reviewed by: imp

14 years agoFix core dump when server fails to respond.
gavin [Sun, 27 Jun 2010 14:11:03 +0000 (14:11 +0000)]
Fix core dump when server fails to respond.

Reviewed by: imp

14 years agoCorrect a comment typo.
jh [Sun, 27 Jun 2010 12:19:09 +0000 (12:19 +0000)]
Correct a comment typo.

14 years agoFix typo introduced in previous revision.
rpaulo [Sun, 27 Jun 2010 10:17:11 +0000 (10:17 +0000)]
Fix typo introduced in previous revision.

14 years agoNote that internal_underscores should be used in identifier names rather
cperciva [Sun, 27 Jun 2010 02:30:19 +0000 (02:30 +0000)]
Note that internal_underscores should be used in identifier names rather
than camelCase or TitleCase.

According to grep and my checked-out source tree, we're currently at
3733379 internal_underscores, 93024 camelCases, and 80831 TitleCases;
so this commit is merely documenting existing practice.

14 years agoIgnore versioned dependencies on shared objects to which we do not link.
nwhitehorn [Sat, 26 Jun 2010 22:04:52 +0000 (22:04 +0000)]
Ignore versioned dependencies on shared objects to which we do not link.
This fixes an error with files like this created by GNU ld under certain
circumstances.

14 years agoCorrect arguments order.
pjd [Sat, 26 Jun 2010 21:44:45 +0000 (21:44 +0000)]
Correct arguments order.

14 years agoJust like in case of setgroups(2), for getgroups(2) also advice including
pjd [Sat, 26 Jun 2010 21:44:05 +0000 (21:44 +0000)]
Just like in case of setgroups(2), for getgroups(2) also advice including
sys/param.h instead of sys/types.h so we get NGROUPS_MAX and NGROUPS
definitions.

14 years agoFix the AR_SREV_MERLIN_20_OR_LATER() check.
rpaulo [Sat, 26 Jun 2010 20:59:10 +0000 (20:59 +0000)]
Fix the AR_SREV_MERLIN_20_OR_LATER() check.

Submitted by: Alex Kozlov <spam at rm-rf.kiev.ua>
MFC after: 2 weeks

14 years ago* Do not dereference a NULL pointer when calling an SCTP send syscall
tuexen [Sat, 26 Jun 2010 19:26:20 +0000 (19:26 +0000)]
* Do not dereference a NULL pointer when calling an SCTP send syscall
  not providing a destination address and using ktrace.
* Do not copy out kernel memory when providing sinfo for sctp_recvmsg().
Both bug where reported by Valentin Nechayev.
The first bug results in a kernel panic.
MFC after: 3 days.

14 years agoSet svn:executable property so we can run the DTrace test suite.
rpaulo [Sat, 26 Jun 2010 18:13:44 +0000 (18:13 +0000)]
Set svn:executable property so we can run the DTrace test suite.

14 years agoAdd NTFS partition type to GEOM_MBR.
rpaulo [Sat, 26 Jun 2010 13:20:40 +0000 (13:20 +0000)]
Add NTFS partition type to GEOM_MBR.

14 years agoTaken from actual police videos ...
dougb [Sat, 26 Jun 2010 07:02:31 +0000 (07:02 +0000)]
Taken from actual police videos ...

14 years agoWe need to install the shell scripts as executables rather than as
imp [Fri, 25 Jun 2010 22:35:19 +0000 (22:35 +0000)]
We need to install the shell scripts as executables rather than as
data files in the backend* trees.

Submitted by: John Hixon

14 years agoImport the acpi_aibs(4) driver written by Constantine A. Murenin.
rpaulo [Fri, 25 Jun 2010 15:32:46 +0000 (15:32 +0000)]
Import the acpi_aibs(4) driver written by Constantine A. Murenin.
It has more features than acpi_aiboost(4) and it will eventually replace
acpi_aiboost(4).

Submitted by: Constantine A. Murenin <cnst at FreeBSD.org>
Reviewed by: freebsd-acpi, imp
MFC after: 1 month

14 years agouse PTR_WORD for __curbrk and minbrk instead of .word, the new version
jchandra [Fri, 25 Jun 2010 05:36:36 +0000 (05:36 +0000)]
use PTR_WORD for __curbrk and minbrk instead of .word, the new version
wil support all ABIs.

Approved by: rrs (mentor)

14 years agoAdd an alignment of 8 for sections in the n32 ABI. The default alignment
jchandra [Fri, 25 Jun 2010 05:07:42 +0000 (05:07 +0000)]
Add an alignment of 8 for sections in the n32 ABI.  The default alignment
of of 4 causes _end to be word aligned, which will be returned by sbrk.

malloc(3), when compiled for n32, expects sbrk to return an 8-byte aligned
value.

Approved by: rrs (mentor)

14 years agoFix a stray PC-BSDism, on FreeBSD, we install these things into /usr/share
imp [Thu, 24 Jun 2010 22:47:50 +0000 (22:47 +0000)]
Fix a stray PC-BSDism, on FreeBSD, we install these things into /usr/share

14 years agoMakefile overlooked in r2095137
imp [Thu, 24 Jun 2010 22:33:03 +0000 (22:33 +0000)]
Makefile overlooked in r2095137

14 years agoRemove the license files that svn made me remove at the last second, doh!
imp [Thu, 24 Jun 2010 22:29:36 +0000 (22:29 +0000)]
Remove the license files that svn made me remove at the last second, doh!

14 years agoBring in Kris Moore's pc-sysinstall shell script from PC-BSD. This
imp [Thu, 24 Jun 2010 22:21:47 +0000 (22:21 +0000)]
Bring in Kris Moore's pc-sysinstall shell script from PC-BSD.  This
shell script is the back end logic necessary for an installer.  It
contains both query routines to allow a front-end installer to present
reasonable choices to the user and also action routines which allow
the front end installer to put a FreeBSD distribution onto a disk.  It
supports installing onto the usual suspects, as well as advanced
features like Mirroring, ZFS, Encryprion and GPT labels.

While this is only the back-end of the installer, it can do unattended
scripted installations.  In PC-BSD's world view, all installations are
scripted and all the front-end does is write the script.  As such, it
is useful in its own right.

This has been extensively tested over the past several releases of
PC-BSD.  However, differences between that environment and FreeBSD
suggest there will be a period of shake-out while those differences
are discovered and corrected.

A text-based front-end is in the works.  For the GUI-based front-end,
you can use the PC-BSD distribution.

Kris' BSDcan paper on pc-sysinstall is linked off his talk on the
BSDcan site:
http://www.bsdcan.org/2010/schedule/events/173.en.html

The man page is written by Josh Paetzel, and I wrote the Makefiles for
the FreeBSD integration.  Kris wrote the rest.

This represents version r7010 in the PC-BSD repo.
http://svn.pcbsd.org/pcbsd/current/pc-sysinstall

Submitted by: kris@
Sponsored by: iX Systems

14 years agoMake sure that all the exposed counters and variables are actually
gnn [Thu, 24 Jun 2010 21:17:58 +0000 (21:17 +0000)]
Make sure that all the exposed counters and variables are actually
being updated.

Pointed out by: jfv

14 years agoMerge from tbemd:
imp [Thu, 24 Jun 2010 17:53:25 +0000 (17:53 +0000)]
Merge from tbemd:

use MACHINE_CPUARCH instead of MACHINE_CPU since the sources for the
CSU is based on MACHINE_CPUARCH

Reviewed by: arch@ (twice)

14 years agoMerge from tbemd:
imp [Thu, 24 Jun 2010 16:32:20 +0000 (16:32 +0000)]
Merge from tbemd:

change the name of the object tree from ${TARGET} to
${TARGET}.${TARGET_ARCH} so we can do both big and little endian
builds in the same tree.

Reviewed by: arch@ (twice)

14 years agoMerge from TBEMD:
imp [Thu, 24 Jun 2010 16:28:52 +0000 (16:28 +0000)]
Merge from TBEMD:

Rather than having arch specific code in Makefile.inc1, generalize so
that we can control the settings of different options on a per
architecutre basis.

Reviewed by: arch@ (twice)

14 years agoAdd linker script and configuration file for n32 kernel.
jchandra [Thu, 24 Jun 2010 10:14:31 +0000 (10:14 +0000)]
Add linker script and configuration file for n32 kernel.

Approved by: rrs (mentor)

14 years agoMerge jmallett@'s n64 work into HEAD - changeset 7
jchandra [Thu, 24 Jun 2010 08:08:43 +0000 (08:08 +0000)]
Merge jmallett@'s n64 work into HEAD - changeset 7

Initial support for n32 and n64 ABIs from
http://svn.freebsd.org/base/user/jmallett/octeon

Changes are:
 - syscall, exception and trap support for n32/n64 ABIs
 - 64-bit address space defines
 - _jmp_buf for n32/n64
 - casts between registers and ptr/int updated to work on n32/n64

Approved by: rrs(mentor), jmallett

14 years agoFix a bug I introduced in r209470.
tuexen [Thu, 24 Jun 2010 07:43:25 +0000 (07:43 +0000)]
Fix a bug I introduced in r209470.

MFC after: 3 days

14 years agoAssign PCI intline values for ISA interrupts using the new INTR_VEC()
marcel [Thu, 24 Jun 2010 05:49:58 +0000 (05:49 +0000)]
Assign PCI intline values for ISA interrupts using the new INTR_VEC()
macro.

14 years agoRemove debugging printf() -- that is, I assume it was for debugging :-)
marcel [Thu, 24 Jun 2010 05:47:00 +0000 (05:47 +0000)]
Remove debugging printf() -- that is, I assume it was for debugging :-)

14 years agoComment about the shared pins I know about.
adrian [Thu, 24 Jun 2010 05:17:21 +0000 (05:17 +0000)]
Comment about the shared pins I know about.

14 years agoPass the device_t of the AT PIC driver to atpic_intr() so that
marcel [Thu, 24 Jun 2010 05:05:18 +0000 (05:05 +0000)]
Pass the device_t of the AT PIC driver to atpic_intr() so that
we don't have to use a global variable. Pass a NULL frame pointer
to the dispatch function just like openpic(4).

14 years agoReverse the logic of the if statement that sets the default value of
nwhitehorn [Thu, 24 Jun 2010 00:27:20 +0000 (00:27 +0000)]
Reverse the logic of the if statement that sets the default value of
HZ; the list of 1000 Hz platforms was getting unwieldy.

Suggested by: marcel

14 years agoUse M_WAITOK for VESA BIOS initialization consistently.
jkim [Wed, 23 Jun 2010 23:34:56 +0000 (23:34 +0000)]
Use M_WAITOK for VESA BIOS initialization consistently.

14 years agoMove default HZ from 100 to 1000 on powerpc.
nwhitehorn [Wed, 23 Jun 2010 23:26:14 +0000 (23:26 +0000)]
Move default HZ from 100 to 1000 on powerpc.

Reviewed by: marcel
MFC after: 2 weeks

14 years agoWith openpic(4) using active-low as the default polarity, reconfigure
marcel [Wed, 23 Jun 2010 23:16:27 +0000 (23:16 +0000)]
With openpic(4) using active-low as the default polarity, reconfigure
the internal interrupt sources as active-high. The internal interrupt
sources are disabled when programmed as active-low.

Note that the internal interrupts have no sense bit like the external
interrupts. We program them as edge-triggered to make sure we write a
0 value to a reserved register. It does not in any way say anything
about the sense of internal interrupt.

14 years agoConfigure interrupts on SMP systems to be distributed among all online
nwhitehorn [Wed, 23 Jun 2010 22:33:03 +0000 (22:33 +0000)]
Configure interrupts on SMP systems to be distributed among all online
CPUs by default, and provide a functional version of BUS_BIND_INTR().
While here, fix some potential concurrency problems in the interrupt
handling code.

14 years agoIn the attach method, refactor to take into account that
marcel [Wed, 23 Jun 2010 22:25:52 +0000 (22:25 +0000)]
In the attach method, refactor to take into account that
BUS_GET_RESOURCE_LIST() can return a NULL pointer -- and
will for MPC85xx kernels.

14 years agoClear DF bit in eflags/rflags on the kernel entry. The i386 and amd64
kib [Wed, 23 Jun 2010 20:44:07 +0000 (20:44 +0000)]
Clear DF bit in eflags/rflags on the kernel entry. The i386 and amd64
ABI specifies the DF should be zero, and newer compilers do not clear
DF before using DF-sensitive instructions.

The DF clearing for signal handlers was done some time ago.

MFC after: 1 week

14 years agoMerge jmallett@'s n64 work into HEAD - changeset 6
jchandra [Wed, 23 Jun 2010 19:42:01 +0000 (19:42 +0000)]
Merge jmallett@'s n64 work into HEAD - changeset 6

PTE flag cleanup from http://svn.freebsd.org/base/user/jmallett/octeon
- Rename PTE_xx flags to match their MIPS names
- Use the new pte_set/test/clear macros uniformly, instead of a mixture
  of mips_pg_xxx(), pmap_pte_x() macros and direct access.
- Remove unused macros and defines from pte.h and pmap.c

Discussed on freebsd-mips@

Approved by: rrs(mentor), jmallett

14 years agoUpdate the man page to reflect the changes to the netDev configuration
randi [Wed, 23 Jun 2010 19:29:17 +0000 (19:29 +0000)]
Update the man page to reflect the changes to the netDev configuration
variable.

Approved by: cperciva (mentor)
MFC after: 3 days

14 years agoLet x86bios_alloc() pass contigmalloc(9) flags. Use it to set M_WAITOK
jkim [Wed, 23 Jun 2010 17:20:51 +0000 (17:20 +0000)]
Let x86bios_alloc() pass contigmalloc(9) flags.  Use it to set M_WAITOK
from VESA BIOS initialization.  All other malloc(9) uses in the function is
blocking any way.

14 years ago* Implement sctp_does_stcb_own_this_addr() correclty. It was taking the
tuexen [Wed, 23 Jun 2010 15:19:07 +0000 (15:19 +0000)]
* Implement sctp_does_stcb_own_this_addr() correclty. It was taking the
  wrong side into account.
* sctp_findassociation_ep_addr() must check the local address if available.
This fixes a bug where ABORT chunks were accepted even in the case where
the local was not owned by the endpoint.
Thanks to brucec for pointing out a bug in my first version of the fix.
MFC after: 3 days

14 years agoIf a device can't be opened, don't keep going but display the error
brucec [Wed, 23 Jun 2010 14:28:08 +0000 (14:28 +0000)]
If a device can't be opened, don't keep going but display the error
returned from open() and quit.

PR: bin/81035
Submitted by: Peter Schuller <peter.schuller at infidyne.com>
Approved by: rrs (mentor)

14 years agoMake it easier to cancel a failing installation by only attempting to
brucec [Wed, 23 Jun 2010 14:19:19 +0000 (14:19 +0000)]
Make it easier to cancel a failing installation by only attempting to
extract distributions once. If a distribution fails to fetch/extract
and the user doesn't want to retry, abort the installation.

Reviewed by: randi
Approved by: rrs (mentor)
MFC after: 1 month

14 years agoWhen installing on a machine which doesn't have a VGA card installed, enable
brucec [Wed, 23 Jun 2010 14:11:34 +0000 (14:11 +0000)]
When installing on a machine which doesn't have a VGA card installed, enable
a getty on the serial port so that it's possible to login when the system is
rebooted.

PR: bin/23098
Submitted by: Doug Ambrisko <ambrisko at whistle.com>
Reviewed by: randi
Approved by: rrs (mentor)
MFC after: 1 month

14 years agoAdd some more modules to loader.conf. Remove if_awi since support for it
brucec [Wed, 23 Jun 2010 14:06:05 +0000 (14:06 +0000)]
Add some more modules to loader.conf. Remove if_awi since support for it
was removed 2 years ago.

PR: conf/147126
PR: conf/116071
Approved by: rrs (mentor)

14 years agoFix bugs on pc98, use npxgetuserregs() instead of npxgetregs() for
kib [Wed, 23 Jun 2010 12:17:13 +0000 (12:17 +0000)]
Fix bugs on pc98, use npxgetuserregs() instead of npxgetregs() for
get_fpcontext(), and npxsetuserregs() for set_fpcontext). Also,
note that usercontext is not initialized anymore in fpstate_drop().

Systematically replace references to npxgetregs() and npxsetregs()
by npxgetuserregs() and npxsetuserregs() in comments.

Noted by: bde

14 years agoAfter the FPU use requires #MF working due to INT13 FPU exception handling
kib [Wed, 23 Jun 2010 11:21:19 +0000 (11:21 +0000)]
After the FPU use requires #MF working due to INT13 FPU exception handling
removal, MFi386 r209198:
    Use critical sections instead of disabling local interrupts to ensure
    the consistency between PCPU fpcurthread and the state of FPU.

Reviewed by: bde
Tested by: pho

14 years agoRemove the support for int13 FPU exception reporting on i386. It is
kib [Wed, 23 Jun 2010 11:12:58 +0000 (11:12 +0000)]
Remove the support for int13 FPU exception reporting on i386. It is
believed that all 486-class CPUs FreeBSD is capable to run on, either
have no FPU and cannot use external coprocessor, or have FPU on the
package and can use #MF.

Reviewed by: bde
Tested by: pho (previous version)

14 years agoRemove unused i586 optimized bcopy/bzero/etc implementations that utilize
kib [Wed, 23 Jun 2010 10:40:28 +0000 (10:40 +0000)]
Remove unused i586 optimized bcopy/bzero/etc implementations that utilize
FPU registers for copying. Remove the switch table and jumps from
bcopy/bzero/... to the actual implementation.
As a side-effect, i486-optimized bzero is removed.

Reviewed by: bde
Tested by: pho (previous version)

14 years agoDo not trust IRQ reported by ACPI. There are cases when it is wrong.
mav [Wed, 23 Jun 2010 05:43:21 +0000 (05:43 +0000)]
Do not trust IRQ reported by ACPI. There are cases when it is wrong.

14 years agoFix missing argument for errx().
kevlo [Wed, 23 Jun 2010 04:42:47 +0000 (04:42 +0000)]
Fix missing argument for errx().
While here, clean up the code a bit.

14 years agoAR71XX GPIO register definitions.
adrian [Wed, 23 Jun 2010 03:59:26 +0000 (03:59 +0000)]
AR71XX GPIO register definitions.

Reviewed by: gonzo@

14 years ago- fix for USB audio devices which use the 7-byte endpoint descriptor instead of
thompsa [Tue, 22 Jun 2010 21:16:18 +0000 (21:16 +0000)]
- fix for USB audio devices which use the 7-byte endpoint descriptor instead of
  the 9-byte one.
- remove sync-endpoint code, which is currently unused.

Reported by: Antun Matanovi
Submitted by: Hans Petter Selasky

14 years agoReduce MIDI input buffer size to one USB packet, hence some USB devices don't
thompsa [Tue, 22 Jun 2010 21:13:36 +0000 (21:13 +0000)]
Reduce MIDI input buffer size to one USB packet, hence some USB devices don't
properly short terminate their transfers. This fixes a problem where input
appears several seconds late.

Reported by: Alexander Yerenkow
Submitted by: Hans Petter Selasky

14 years agoAdd new device id.
thompsa [Tue, 22 Jun 2010 21:08:45 +0000 (21:08 +0000)]
Add new device id.

PR: usb/147190

14 years agoRemove unnecessarily inflammatory commentary.
randi [Tue, 22 Jun 2010 21:06:33 +0000 (21:06 +0000)]
Remove unnecessarily inflammatory commentary.

Approved by: cperciva (mentor)

14 years agoAdd a mass storage quirk.
thompsa [Tue, 22 Jun 2010 21:03:13 +0000 (21:03 +0000)]
Add a mass storage quirk.

PR: usb/147196

14 years agoAdd new device id.
thompsa [Tue, 22 Jun 2010 21:01:40 +0000 (21:01 +0000)]
Add new device id.

PR: usb/146907

14 years agoAdd support for LOW speed BULK transfers. This mode is not recommended by the
thompsa [Tue, 22 Jun 2010 20:57:48 +0000 (20:57 +0000)]
Add support for LOW speed BULK transfers.  This mode is not recommended by the
USB 2.0 standard, though some USB devices use it anyway.

Submitted by: Hans Petter Selasky