]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoAll SD cards have a block size of 512. The READ_BL_LEN field in the
imp [Wed, 28 Mar 2007 22:31:32 +0000 (22:31 +0000)]
All SD cards have a block size of 512.  The READ_BL_LEN field in the
CSD is usually 512 (well, 9), but for 2GB (and the rogue 4GB SD cards)
it is 1024 (or 2048 for 4GB).  This value doesn't work for the block
read commands (which really want 512).  Hardcode 512 for those.  This
may break really old MMC cards that don't have a 512 block size (I've
never seen one: make my day and send me one :-), but since the MMC
side of the house is currently broken, it should only have the effect
that 2GB (and non-conforming 4GB) SD cards will work.

My 'non-conforming' 4GB SD card also works now too.  The
non-conforming 4GB SD cards were sold for a while before the SD
association was worried they would be (a) incompatible (different FAT
flavor on them) and (b) confusing for the new SDHC standard and
cracked down on suppliers' bogus use of the SD trademark...

17 years agoRe-enable the HPET timer after a resume.
njl [Wed, 28 Mar 2007 22:28:48 +0000 (22:28 +0000)]
Re-enable the HPET timer after a resume.

Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
MFC after: 3 days

17 years agoTry to silence Coverity by adding (void) in front of function call.
emax [Wed, 28 Mar 2007 21:25:56 +0000 (21:25 +0000)]
Try to silence Coverity by adding (void) in front of function call.
Also add a comment, explaining why return value is not being checked.

Requested by: netchild
MFC after: 1 week

17 years agoNew sentence -> new line
brueffer [Wed, 28 Mar 2007 21:21:22 +0000 (21:21 +0000)]
New sentence -> new line

17 years agoVarious buglets fixed (from submitter):
imp [Wed, 28 Mar 2007 21:18:45 +0000 (21:18 +0000)]
Various buglets fixed (from submitter):

The changes to getstr() is so that the character that is
passed in to it, is also processed just as the rest. I also
removed one of the getc() calls otherwise you loose every
second character.

I also changed the strcpy of kname, so that it only happens if
kname is '\0'. This is so that one can pass a kernel in
through /boot.config.

The last change to boot2.c is in parse(). If you tried to type
a kernel name to boot, the first character was lost, the arg--
fix that.

Submitted by: jhay

17 years agoFix problem where memcmp would return true in the case where the
imp [Wed, 28 Mar 2007 21:15:50 +0000 (21:15 +0000)]
Fix problem where memcmp would return true in the case where the
character after the character that was the same.

Submitted by: jhay

17 years agoFix off by one error in length of the string.
imp [Wed, 28 Mar 2007 21:12:43 +0000 (21:12 +0000)]
Fix off by one error in length of the string.

Submitted by: jhay

17 years agoRemove the run promotion/demotion machinery. Replace it with red-black
jasone [Wed, 28 Mar 2007 19:55:07 +0000 (19:55 +0000)]
Remove the run promotion/demotion machinery.  Replace it with red-black
trees that track all non-full runs for each bin.  Use the red-black
trees to be able to guarantee that each new allocation is placed in the
lowest address available in any non-full run.  This change completes the
transition to allocating from low addresses in order to reduce the
retention of sparsely used chunks.

If the run in current use by a bin becomes empty, deallocate the run
rather than retaining it for later use.  The previous behavior had the
tendency to spread empty runs across multiple chunks, thus preventing
the release of chunks that were completely unused.

Generalize base_chunk_alloc() (and rename it to base_pages_alloc()) to
handle allocation sizes larger than the chunk size, so that it is
possible to support chunk sizes that are smaller than an arena object.

Reduce the minimum chunk size from 64kB to 8kB.

Optimize tracking of addresses for deleted chunks.

Fix a statistics bug for huge allocations.

17 years agoo Add MosChip 9835 PCI Dual UART PCI id.
maxim [Wed, 28 Mar 2007 18:56:27 +0000 (18:56 +0000)]
o Add MosChip 9835 PCI Dual UART PCI id.

PR: kern/110967
Submitted by: Joseph Terner
MFC after: 1 month

17 years agoChange macro in order to refer to FreeBSD 7.0 instead of 7.0BSD.
jasone [Wed, 28 Mar 2007 18:55:44 +0000 (18:55 +0000)]
Change macro in order to refer to FreeBSD 7.0 instead of 7.0BSD.

Reported by: Michal Mertl <mime@traveller.cz>

17 years agoFor embedded UARTs compatible with the ns8250 family it is possible
marcel [Wed, 28 Mar 2007 18:34:59 +0000 (18:34 +0000)]
For embedded UARTs compatible with the ns8250 family it is possible
that the driver clock is identical to the processor or bus clock.
This is the case for the PowerQUICC processor. When the clock is
high enough, overflows happen in the calculation of the time it
takes to send 1/10 of a character, used in delay loops. Fix the
overflows so as to fix bugs in the delay loops that can cause either
insufficient delays or excessive delays.

17 years agoWhen we match UARTs found during bus-enumeration with UARTs used for
marcel [Wed, 28 Mar 2007 18:26:12 +0000 (18:26 +0000)]
When we match UARTs found during bus-enumeration with UARTs used for
system devices (i.e. console, debug port or keyboard), don't stop
after the first match. Find them all and keep track of the last.
The reason for this change is that the low-level console is always
added to the list of system devices first, with other devices added
later. Since new devices are added to the list at the head, we have
the console always at the end. When a debug port is using the same
UART as the console, we would previously mark the "newbus" UART as
a debug port instead of as a console. This would later result in a
panic because no "newbus" device was associated with the console.
By matching all possible system devices we would mark the "newbus"
UART as a console and not as a debug port.
While it is arguably better to be able to mark a "newbus" UART as
both console and debug port, this fix is lightweight and allows
a single UART to be used as the console as well as a debug port
with only the aesthetic bug of not telling the user about it also
being a debug port.

Now that we match all possible system devices, update the rclk of
the system devices with the rclk that was obtained through the
bus attachment. It is generally true that clock information is
more reliable when obtained from the parent bus than by means of
some hardcoded or assumed value used early in the boot. This by
virtue of having more context information.

MFC after: 1 month

17 years agoAdd support for the 82562GX chip within if_fxp.
remko [Wed, 28 Mar 2007 18:10:50 +0000 (18:10 +0000)]
Add support for the 82562GX chip within if_fxp.

PR: 110251
Submitted by: Vyacheslav Vovk
Approved by: imp (mentor)
MFC After: 3 days

17 years agoAdd support for the RTL8110SC driver.
remko [Wed, 28 Mar 2007 18:07:12 +0000 (18:07 +0000)]
Add support for the RTL8110SC driver.

PR: 110804
Submitted by: Daan Vreeken
Sponsored by: Vitsch Electronics (patch)
Approved by: imp (mentor)
MFC After: 3 days

17 years agoAdd method enabled() to the SCC interface. This method can be used
marcel [Wed, 28 Mar 2007 18:05:17 +0000 (18:05 +0000)]
Add method enabled() to the SCC interface. This method can be used
by driver backends to mark individual channels as enabled or not.
The default implementation of this method always mark channels as
enabled.
This method is currently not used, but is added with the PowerQUICC
in mind where the 2nd SCC channel can be disabled.

17 years agoDon't derference a pointer before setting it.
mjacob [Wed, 28 Mar 2007 16:34:11 +0000 (16:34 +0000)]
Don't derference a pointer before setting it.
Very Pointy Dunce Cap T o: me.
Submitted by: Marcel
MFC after: 3 days

17 years agoDo not build the libedit support if NO_LIBPTHREAD is defined.
glebius [Wed, 28 Mar 2007 14:04:35 +0000 (14:04 +0000)]
Do not build the libedit support if NO_LIBPTHREAD is defined.

PR: bin/104478
Submitted by: Mike Durian <durian shadetreesoftware.com>

17 years agoBump maximum number of interface hooks to the maximum possible value.
glebius [Wed, 28 Mar 2007 13:59:13 +0000 (13:59 +0000)]
Bump maximum number of interface hooks to the maximum possible value.
This will increase the memory consumption for more than 1 Mb, but this
is required for operation on multiinterface access concentrators running
mpd.

Requested by: Alexander Motin

17 years agoWhen blackholing do a 'dropunlock' in the new world order to prevent the
andre [Wed, 28 Mar 2007 12:58:13 +0000 (12:58 +0000)]
When blackholing do a 'dropunlock' in the new world order to prevent the
INP_INFO_LOCK from leaking.

Reported by: ache
Found by: rwatson

17 years agonet.link.ether.inet.prune_intvl no longer exists.
glebius [Wed, 28 Mar 2007 11:06:50 +0000 (11:06 +0000)]
net.link.ether.inet.prune_intvl no longer exists.

17 years agoReflect netcat and bzip2 updates.
delphij [Wed, 28 Mar 2007 08:13:23 +0000 (08:13 +0000)]
Reflect netcat and bzip2 updates.

17 years agoThis commit was generated by cvs2svn to compensate for changes in r167984,
delphij [Wed, 28 Mar 2007 07:58:30 +0000 (07:58 +0000)]
This commit was generated by cvs2svn to compensate for changes in r167984,
which included commits to RCS files with non-trunk default branches.

17 years agoReflect 1.0.4 import.
delphij [Wed, 28 Mar 2007 07:56:14 +0000 (07:56 +0000)]
Reflect 1.0.4 import.

17 years agoThis commit was generated by cvs2svn to compensate for changes in r167981,
delphij [Wed, 28 Mar 2007 07:55:07 +0000 (07:55 +0000)]
This commit was generated by cvs2svn to compensate for changes in r167981,
which included commits to RCS files with non-trunk default branches.

17 years agoUpdate for bzip2 1.0.4 import: bzip2.info.gz gone.
delphij [Wed, 28 Mar 2007 07:49:57 +0000 (07:49 +0000)]
Update for bzip2 1.0.4 import: bzip2.info.gz gone.

17 years agoUpdate for bzip2 1.0.4 import.
delphij [Wed, 28 Mar 2007 07:48:03 +0000 (07:48 +0000)]
Update for bzip2 1.0.4 import.

17 years agoResolve conflicts.
delphij [Wed, 28 Mar 2007 07:46:20 +0000 (07:46 +0000)]
Resolve conflicts.

17 years agobzip2.c: SA-05:14.bzip2 has been resolved by the author
delphij [Wed, 28 Mar 2007 07:45:41 +0000 (07:45 +0000)]
bzip2.c: SA-05:14.bzip2 has been resolved by the author
in a different way.  Make the file just the same as it
is in the vendor branch to make it easier for future
upgrade.

17 years agoThis commit was generated by cvs2svn to compensate for changes in r167974,
delphij [Wed, 28 Mar 2007 07:35:07 +0000 (07:35 +0000)]
This commit was generated by cvs2svn to compensate for changes in r167974,
which included commits to RCS files with non-trunk default branches.

17 years agoVirgin import (trimmed) of Bzip2 version 1.0.4.
delphij [Wed, 28 Mar 2007 07:35:07 +0000 (07:35 +0000)]
Virgin import (trimmed) of Bzip2 version 1.0.4.

17 years agoAllow the range of a SCC class to be 0. This gives all child
marcel [Wed, 28 Mar 2007 06:45:33 +0000 (06:45 +0000)]
Allow the range of a SCC class to be 0. This gives all child
devices the same (overlapping) I/O range. This is useful for
embedded communications controllers like the CPM of various
models of the PowerQUICC.

17 years agoMake consistent with style(msmith). 4 spaces indent, tab for each 2 indents.
njl [Wed, 28 Mar 2007 05:33:52 +0000 (05:33 +0000)]
Make consistent with style(msmith).  4 spaces indent, tab for each 2 indents.

17 years agoo Trim unneeded backslash.
maxim [Wed, 28 Mar 2007 04:43:55 +0000 (04:43 +0000)]
o Trim unneeded backslash.

17 years agoo Actually add MLINKs for priv(9) functions.
maxim [Wed, 28 Mar 2007 04:41:50 +0000 (04:41 +0000)]
o Actually add MLINKs for priv(9) functions.

17 years agoUpdate the IMPLEMENTATION NOTES section to reflect recent malloc
jasone [Wed, 28 Mar 2007 04:34:19 +0000 (04:34 +0000)]
Update the IMPLEMENTATION NOTES section to reflect recent malloc
enhancements.

17 years agoRemove some stray roff formatting that caused incorrect rendering.
jasone [Wed, 28 Mar 2007 04:33:34 +0000 (04:33 +0000)]
Remove some stray roff formatting that caused incorrect rendering.

17 years agoAdd a HISTORY section.
jasone [Wed, 28 Mar 2007 04:32:51 +0000 (04:32 +0000)]
Add a HISTORY section.

17 years agoResolve conflicts.
delphij [Wed, 28 Mar 2007 01:57:03 +0000 (01:57 +0000)]
Resolve conflicts.

17 years agoThis commit was generated by cvs2svn to compensate for changes in r167961,
delphij [Wed, 28 Mar 2007 01:55:49 +0000 (01:55 +0000)]
This commit was generated by cvs2svn to compensate for changes in r167961,
which included commits to RCS files with non-trunk default branches.

17 years agoImport netcat as of today's OPENBSD_4_1 snapshot.
delphij [Wed, 28 Mar 2007 01:55:49 +0000 (01:55 +0000)]
Import netcat as of today's OPENBSD_4_1 snapshot.

17 years agoRemove stale comment about not enabling inpcb and inpcbinfo lock assertions
rwatson [Wed, 28 Mar 2007 00:50:20 +0000 (00:50 +0000)]
Remove stale comment about not enabling inpcb and inpcbinfo lock assertions
when IPv6 is enabled.

MFC after: 3 days

17 years agoNew release notes:
brueffer [Tue, 27 Mar 2007 21:26:45 +0000 (21:26 +0000)]
New release notes:
- priv(9) KPI added
- ipw/iwi firmware in the base system

Updated release notes:
- OpenSSL updated to 0.9.8e
- GNOME updated to 2.8.0
- acpi_dock(4) and acpi_hpet MFC
- msk(4) MFC

17 years agoClarify the definition of the watchdog kernel interface by moving a sentence up
n_hibma [Tue, 27 Mar 2007 21:23:20 +0000 (21:23 +0000)]
Clarify the definition of the watchdog kernel interface by moving a sentence up
to the sentence it references.

17 years agoAdd MLINKs for priv(9) functions.
brueffer [Tue, 27 Mar 2007 21:20:57 +0000 (21:20 +0000)]
Add MLINKs for priv(9) functions.

17 years agoRevisit the watchdogs: Resetting the error to EINVAL after failing to set the
n_hibma [Tue, 27 Mar 2007 21:03:37 +0000 (21:03 +0000)]
Revisit the watchdogs: Resetting the error to EINVAL after failing to set the
watchdog might hide the succesful arming of an earlier one. Accept that on
failing to arm any watchdog (because of non-supported timeouts) EOPNOTSUPP is
returned instead of the more appropriate EINVAL.

MFC after: 3 days

17 years agoFix regression in rev. 1.140.
glebius [Tue, 27 Mar 2007 19:36:12 +0000 (19:36 +0000)]
Fix regression in rev. 1.140.

Reported by: Yuriy Tsibizov <Yuriy.Tsibizov gfk.ru>, bsam

17 years agoSort.
jhb [Tue, 27 Mar 2007 19:32:40 +0000 (19:32 +0000)]
Sort.

17 years agoDon't assume the run bit is still set after a suspend.
julian [Tue, 27 Mar 2007 18:55:06 +0000 (18:55 +0000)]
Don't assume the run bit is still set after a suspend.
Submitted by: Andrea Bittau ( adotbittauatcsdotucldotacdotuk)
MFC After: 1 week

17 years agoCorrect HPET header handling.
takawata [Tue, 27 Mar 2007 17:03:52 +0000 (17:03 +0000)]
Correct HPET header handling.
MFC after: 7 days

17 years agoAlign 'struct thread' on 16 byte boundaries so that the lower 4 bits are
jhb [Tue, 27 Mar 2007 16:51:34 +0000 (16:51 +0000)]
Align 'struct thread' on 16 byte boundaries so that the lower 4 bits are
always 0.  Previously we aligned threads on a minimum of 8-byte boundaries.

Note: This changes the uma zone to no longer cache align threads.  We
really want the uma zone to do align threads to MAX(16, cache line size)
but there currently isn't a good way to express that to uma.

Submitted by: attilio

17 years agoFix a case where hardware removal of an interface caused an attempt to
bms [Tue, 27 Mar 2007 16:11:28 +0000 (16:11 +0000)]
Fix a case where hardware removal of an interface caused an attempt to
announce an ll_ifma which has gone away. Add a KASSERT to catch regressions.

Bug found by: Tom Uffner

17 years agoFix a bug which could lead to receive side lockup when WC is disabled.
gallatin [Tue, 27 Mar 2007 15:55:32 +0000 (15:55 +0000)]
Fix a bug which could lead to receive side lockup when WC is disabled.
When submitting rx buffers and not using WC fifo, always replace the
invalid DMA address with the real one, otherwise allocation failures
could lead to the invalid DMA address being given to the NIC, and
that would cause the receive side to lockup.

17 years agoFix a comment grammar nit.
jhb [Tue, 27 Mar 2007 15:09:10 +0000 (15:09 +0000)]
Fix a comment grammar nit.

17 years agoIn account management, verify whether the account has been locked
yar [Tue, 27 Mar 2007 09:59:15 +0000 (09:59 +0000)]
In account management, verify whether the account has been locked
with `pw lock', so that it's impossible to log into a locked account
using an alternative authentication mechanism, such as an ssh key.
This change affects only accounts locked with pw(8), i.e., having a
`*LOCKED*' prefix in their password hash field, so people still can
use a different pattern to disable password authentication only.

Mention all account management criteria in the manpage.

Approved by: maintainer (timeout)
PR: bin/71147
MFC after: 1 month

17 years agoPrevent a race between vm_object_collapse() and vm_object_split() from
alc [Tue, 27 Mar 2007 08:55:17 +0000 (08:55 +0000)]
Prevent a race between vm_object_collapse() and vm_object_split() from
causing a crash.

Suppose that we have two objects, obj and backing_obj, where
backing_obj is obj's backing object.  Further, suppose that
backing_obj has a reference count of two.  One being the reference
held by obj and the other by a map entry.  Now, suppose that the map
entry is deallocated and its reference removed by
vm_object_deallocate().  vm_object_deallocate() recognizes that the
only remaining reference is from a shadow object, obj, and calls
vm_object_collapse() on obj.  vm_object_collapse() executes

                if (backing_object->ref_count == 1) {
                        /*
                         * If there is exactly one reference to the backing
                         * object, we can collapse it into the parent.
                         */
                        vm_object_backing_scan(object, OBSC_COLLAPSE_WAIT);

vm_object_backing_scan(OBSC_COLLAPSE_WAIT) executes

        if (op & OBSC_COLLAPSE_WAIT) {
                vm_object_set_flag(backing_object, OBJ_DEAD);
        }

Finally, suppose that either vm_object_backing_scan() or
vm_object_collapse() sleeps releasing its locks.  At this instant,
another thread executes vm_object_split().  It crashes in
vm_object_reference_locked() on the assertion that the object is not
dead.  If, however, assertions are not enabled, it crashes much later,
after the object has been recycled, in vm_object_deallocate() because
the shadow count and shadow list are inconsistent.

Reviewed by: tegge
Reported by: jhb
MFC after: 1 week

17 years agoDon't map mini-data cache page since ARM920T doesn't have it.
kevlo [Tue, 27 Mar 2007 06:29:19 +0000 (06:29 +0000)]
Don't map mini-data cache page since ARM920T doesn't have it.

17 years agoPowerPC is the only architecture with mpsafe_vfs=0. This is now
marcel [Tue, 27 Mar 2007 05:29:41 +0000 (05:29 +0000)]
PowerPC is the only architecture with mpsafe_vfs=0. This is now
broken. Rudimentary tests show that PowerPC can run with
mpsafe_vfs=1. Make it so...

17 years agoDescribe the contents of the "ar_name" and "ar_rawname" fields of
jkoshy [Tue, 27 Mar 2007 04:47:50 +0000 (04:47 +0000)]
Describe the contents of the "ar_name" and "ar_rawname" fields of
Elf_Arhdr structures better.

17 years agoBug fixes to ar(1) archive handling:
jkoshy [Tue, 27 Mar 2007 04:40:57 +0000 (04:40 +0000)]
Bug fixes to ar(1) archive handling:
 - Correctly retrieve the initial (special) members of an archive after
   an archive descriptor is rewound using elf_rand(SARMAG).
 - Do not strip trailing white space from the 'raw' names retrieved
   using elf_getarhdr().

Reported by: "Hyo geol, Lee" <hyogeollee at gmail dot com>

17 years agoIntroduce the new option -M to allow to set the permissions of
le [Mon, 26 Mar 2007 23:29:20 +0000 (23:29 +0000)]
Introduce the new option -M to allow to set the permissions of
the user's newly created home directory.  If omitted, it's derived
from the current umask.

PR:      bin/16880, bin/83253 (partially), bin/104248
MFC in:  1 month

17 years ago- Use '*h' instead of 'struct acpi_spinlock' for sizeof[1].
jkim [Mon, 26 Mar 2007 23:04:02 +0000 (23:04 +0000)]
- Use '*h' instead of 'struct acpi_spinlock' for sizeof[1].
- Add a missing 'else' for 'if'[2].

Requested by: njl[1]
Submitted by: njl[2]

17 years agoCheck if the new user already exists right after entering the
le [Mon, 26 Mar 2007 22:22:10 +0000 (22:22 +0000)]
Check if the new user already exists right after entering the
username instead of watching the final call to pw(8) fail.

17 years agoAnnotate that this giant acqusition is dependent on tty locking.
kris [Mon, 26 Mar 2007 21:56:46 +0000 (21:56 +0000)]
Annotate that this giant acqusition is dependent on tty locking.

17 years agoCorrect ACPI semaphore function parameters.
jkim [Mon, 26 Mar 2007 21:56:35 +0000 (21:56 +0000)]
Correct ACPI semaphore function parameters.

17 years agoFix setting of serial port speed. A junk value was passed in AX when
thomas [Mon, 26 Mar 2007 21:56:13 +0000 (21:56 +0000)]
Fix setting of serial port speed. A junk value was passed in AX when
bioscom is called to set up serial port parameters because COMSPEED
was treated as an address instead of an immediate value, causing
serial port parameters to never be set.

PR: i386/110828
Reviewed by: jhb
MFC after: 2 weeks

17 years agomake_dev(9) can be (and is) called without Giant, so there is no need to
kris [Mon, 26 Mar 2007 21:47:03 +0000 (21:47 +0000)]
make_dev(9) can be (and is) called without Giant, so there is no need to
drop the topology lock and acquire Giant around this call.

Reviewed by: phk

17 years agoRemove unnecessary giant acquisition around panic in #ifdef DIAGNOSTIC
kris [Mon, 26 Mar 2007 21:45:44 +0000 (21:45 +0000)]
Remove unnecessary giant acquisition around panic in #ifdef DIAGNOSTIC
code.

# There is some question about whether this code is even relevant any
# longer (it dates back to prehistoric times, i.e. present in r1.1),
# especially on amd64.

Reviewed by: jhb

17 years agoFree the handle, not the lock. Pointy hat to me.
jkim [Mon, 26 Mar 2007 21:36:31 +0000 (21:36 +0000)]
Free the handle, not the lock.  Pointy hat to me.

17 years agoCorrect ACPI spinlock function parameters and use known ACPI spinlock names.
jkim [Mon, 26 Mar 2007 21:23:23 +0000 (21:23 +0000)]
Correct ACPI spinlock function parameters and use known ACPI spinlock names.

17 years agoChange the VPD code to read the VPD data on-demand when a driver asks for
jhb [Mon, 26 Mar 2007 20:18:52 +0000 (20:18 +0000)]
Change the VPD code to read the VPD data on-demand when a driver asks for
it via pci_get_vpd_*() rather than always reading it for each device during
boot.  I've left the tunable so that it can still be turned off if a device
driver causes a lockup via a query to a broken device, but devices whose
drivers do not use VPD (the vast majority) should no longer result in
lockups during boot, and most folks should not need to tweak the tunable
now.

Tested on: bge(4)
Silence from: jmg

17 years agoUse a unique name for each mutex now that acpi-ca is creating more than
njl [Mon, 26 Mar 2007 19:38:28 +0000 (19:38 +0000)]
Use a unique name for each mutex now that acpi-ca is creating more than
one (hardware & global lock).  This should address witness complaints that
a duplicate mutex is being acquired.  Be sure to free the mutex to fix a
potential memory leak.

MFC after: 3 days

17 years agoo Update a comment: sonewconn() lives in uipc_socket.c now.
maxim [Mon, 26 Mar 2007 18:17:57 +0000 (18:17 +0000)]
o Update a comment: sonewconn() lives in uipc_socket.c now.

17 years agoBump FreeBSD version for inclusion of CPU frequency change notifiers.
njl [Mon, 26 Mar 2007 18:04:41 +0000 (18:04 +0000)]
Bump FreeBSD version for inclusion of CPU frequency change notifiers.

17 years agoAdd an interface for drivers to be notified of changes to CPU frequency.
njl [Mon, 26 Mar 2007 18:03:29 +0000 (18:03 +0000)]
Add an interface for drivers to be notified of changes to CPU frequency.
cpufreq_pre_change is called before the change, giving each driver a chance
to revoke the change.  cpufreq_post_change provides the results of the
change (success or failure).  cpufreq_levels_changed gives the unit number
of the cpufreq device whose number of available levels has changed.  Hook
in all the drivers I could find that needed it.

* TSC: update TSC frequency value.  When the available levels change, take the
highest possible level and notify the timecounter set_cputicker() of that
freq.  This gets rid of the "calcru: runtime went backwards" messages.
* identcpu: updates the sysctl hw.clockrate value
* Profiling: if profiling is active when the clock changes, let the user
know the results may be inaccurate.

Reviewed by: bde, phk
MFC after: 1 month

17 years agoAvoid manipulating semu_list outside of the scope of SEMUNDO_LOCK(). This
emaste [Mon, 26 Mar 2007 17:41:14 +0000 (17:41 +0000)]
Avoid manipulating semu_list outside of the scope of SEMUNDO_LOCK().  This
would lead to an occasional hang with a cycle in semu_list.

X-Discussed-On: hackers@

17 years agoClarify memory management rules for pmc_cpuinfo().
jkoshy [Mon, 26 Mar 2007 17:33:41 +0000 (17:33 +0000)]
Clarify memory management rules for pmc_cpuinfo().

Suggested by: "Harald Servat" <redcrash at gmail dot com>

17 years agoFollowing movement of functions from uipc_socket2.c to uipc_socket.c and
rwatson [Mon, 26 Mar 2007 17:05:09 +0000 (17:05 +0000)]
Following movement of functions from uipc_socket2.c to uipc_socket.c and
uipc_sockbuf.c, clean up and update comments.

17 years agoDocument the return type of elf_rand(3) correctly.
jkoshy [Mon, 26 Mar 2007 16:31:42 +0000 (16:31 +0000)]
Document the return type of elf_rand(3) correctly.

17 years agoFix a silly bogon that broke ibcs2_rename().
jhb [Mon, 26 Mar 2007 15:39:49 +0000 (15:39 +0000)]
Fix a silly bogon that broke ibcs2_rename().

CID: 1065
Found by: Coverity Prevent (tm)
Reported by: netchild

17 years agoInitialize vfslocked to 0 before nfsm_srvmtofh() so that the variable is
jhb [Mon, 26 Mar 2007 15:14:58 +0000 (15:14 +0000)]
Initialize vfslocked to 0 before nfsm_srvmtofh() so that the variable is
not used uninitialized in 'nfsmout' if nfsm_srvmtofh() gets an internal
error.

CID: 1766
Found by: Coverity Prevent (tm)

17 years ago- Fix typo
gabor [Mon, 26 Mar 2007 11:44:46 +0000 (11:44 +0000)]
- Fix typo

PR: bin/110648
Submitted by: Seth Hieronymus <shieronymus@speakeasy.net>
Approved by: keramida (mentor)
MFC after: 3 days

17 years agoFix some statements in disc(4) and about it:
yar [Mon, 26 Mar 2007 09:10:28 +0000 (09:10 +0000)]
Fix some statements in disc(4) and about it:
- ifnet is no more embedded in softc;
- the interface name is `disc', not `ds'.

17 years agoGive a hint that softc can contain many things besides ifp.
yar [Mon, 26 Mar 2007 09:05:10 +0000 (09:05 +0000)]
Give a hint that softc can contain many things besides ifp.

17 years agoComplete removal of uipc_socket2.c by moving the last few functions to
rwatson [Mon, 26 Mar 2007 08:59:03 +0000 (08:59 +0000)]
Complete removal of uipc_socket2.c by moving the last few functions to
other C files:

- Move sbcreatecontrol() and sbtoxsockbuf() to uipc_sockbuf.c.  While
  sbcreatecontrol() is really an mbuf allocation routine, it does its work
  with awareness of the layout of socket buffer memory.

- Move pru_*() protocol switch stubs to uipc_socket.c where the non-stub
  versions of several of these functions live.  Likewise, move socket state
  transition calls (soisconnecting(), etc) to uipc_socket.c.  Moveo
  sodupsockaddr() and sotoxsocket().

17 years agoWe no longer embed ifnet in softc, and the pointer to ifnet
yar [Mon, 26 Mar 2007 08:58:22 +0000 (08:58 +0000)]
We no longer embed ifnet in softc, and the pointer to ifnet
doesn't need to be first in softc now.  (It was the whole
ifnet structure itself that needed to be first in the good
old days.)  Fix the respective comment accordingly.

Add xrefs to ifnet(9) in some other comments while I'm here.

Pointed out by: thompsa

17 years agoAdding tests for Camellia which will be added to the tree soon.
gnn [Mon, 26 Mar 2007 07:40:51 +0000 (07:40 +0000)]
Adding tests for Camellia which will be added to the tree soon.
Added tests for aes-ctr which were not present before.

17 years agoIntroduce a new toy interface, edsc(4). It's a discard interface
yar [Mon, 26 Mar 2007 04:50:06 +0000 (04:50 +0000)]
Introduce a new toy interface, edsc(4).  It's a discard interface
imitating an Ethernet device, so vlan(4) and if_bridge(4) can be
attached to it for testing and benchmarking purposes.  Its source
can be an introduction to the anatomy of a network interface driver
due to its simplicity as well as to a bunch of comments in it.

(The rest of needed changes were in my previous commit, which got
interrupted in the middle.  Alas, CVS commits are not atomic.)

17 years agoIntroduce a new toy interface, edsc(4). It's a discard interface
yar [Mon, 26 Mar 2007 04:39:18 +0000 (04:39 +0000)]
Introduce a new toy interface, edsc(4).  It's a discard interface
imitating an Ethernet device, so vlan(4) and if_bridge(4) can be
attached to it for testing and benchmarking purposes.  Its source
can be an introduction to the anatomy of a network interface driver
due to its simplicity as well as to a bunch of comments in it.

17 years agoUse "-ne" instead of "!=" for integer comparison.
brooks [Sun, 25 Mar 2007 23:58:46 +0000 (23:58 +0000)]
Use "-ne" instead of "!=" for integer comparison.

17 years agoIn tcp_sack_doack() remove too tight KASSERT() added in last revision. This
andre [Sun, 25 Mar 2007 23:27:26 +0000 (23:27 +0000)]
In tcp_sack_doack() remove too tight KASSERT() added in last revision.  This
function may be called without any TCP SACK option blocks present.  Protect
iteration over SACK option blocks by checking for SACK options present flag
first.

Bug reported by: wkoszek, keramida, Nicolas Blais

17 years agoReplace a comment about RSVP/mrouting with a different but similar comment
rwatson [Sun, 25 Mar 2007 21:49:50 +0000 (21:49 +0000)]
Replace a comment about RSVP/mrouting with a different but similar comment
explaining that some more locking is needed.  The routing pieces are done,
but there is an interlocking issue between optionally compiled code and
mandatory code.

Spotted by: kris

17 years agoReplace GIANT_REQUIRED's present for socket locking with NET_LOCK_GIANT().
rwatson [Sun, 25 Mar 2007 21:44:24 +0000 (21:44 +0000)]
Replace GIANT_REQUIRED's present for socket locking with NET_LOCK_GIANT().
If/when someone does the necessary MPSAFEty locking for the NFSv4 client,
the socket code is generally MPSAFE now.

Spotted by: kris

17 years agoRemove ancient preprocessor code. Fix module compilation.
rik [Sun, 25 Mar 2007 20:21:31 +0000 (20:21 +0000)]
Remove ancient preprocessor code. Fix module compilation.

Requested by: n_hibma

17 years agoHaving gone to the trouble of setting up a variable, we should use it.
mtm [Sun, 25 Mar 2007 19:45:20 +0000 (19:45 +0000)]
Having gone to the trouble of setting up a variable, we should use it.

17 years agoTwo small changes to vm_map_pmap_enter():
alc [Sun, 25 Mar 2007 19:33:40 +0000 (19:33 +0000)]
Two small changes to vm_map_pmap_enter():

1) Eliminate an unnecessary check for fictitious pages.  Specifically,
only device-backed objects contain fictitious pages and the object is
not device-backed.

2) Change the types of "psize" and "tmpidx" to vm_pindex_t in order to
prevent possible wrap around with extremely large maps and objects,
respectively.  Observed by: tegge (last summer)

17 years agoo Really commit typo fixes to HEAD.
maxim [Sun, 25 Mar 2007 18:37:59 +0000 (18:37 +0000)]
o Really commit typo fixes to HEAD.

PR: docs/110809
Submitted by: naddy

17 years agoCorrect a comment typo
kris [Sun, 25 Mar 2007 10:07:23 +0000 (10:07 +0000)]
Correct a comment typo

17 years agoUpdate a comment: we usually call exec_vmspace_new with Giant not held,
kris [Sun, 25 Mar 2007 10:05:44 +0000 (10:05 +0000)]
Update a comment: we usually call exec_vmspace_new with Giant not held,
but sometimes it is.

17 years agoo cd9660 code repo-copied, update a comment.
maxim [Sat, 24 Mar 2007 22:40:16 +0000 (22:40 +0000)]
o cd9660 code repo-copied, update a comment.

17 years agoo Remove isofs from the cscope dirs list. Its content was
maxim [Sat, 24 Mar 2007 22:21:01 +0000 (22:21 +0000)]
o Remove isofs from the cscope dirs list.  Its content was
repo-copied to fs/.