]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoDrop the default zones that are now covered by the new zones that
dougb [Mon, 18 Jun 2007 06:29:45 +0000 (06:29 +0000)]
Drop the default zones that are now covered by the new zones that
were added in the last revision.

17 years agoBring our default named configuration more in line with current
dougb [Mon, 18 Jun 2007 05:58:23 +0000 (05:58 +0000)]
Bring our default named configuration more in line with current
best practices:

1. The old way of generating the localhost zones was not optimal both
because they did not exist by default, and because they were not really
aligned with BCP. There is no need to have the dynamic data that the
make-localhost script generated, and good reasons to do this more
"by the book."

2. In named.conf
a. Clean up white space
b. Add/clarify a few comments
c. Slave zones from the root servers instead of using a hints
file. This has several advantages, as described in the comments.
d. Significantly revamp the default zones, including the
forward localhost zone, and the reverse zones for IPv4 and IPv6
loopback addresses. There are extensive comments describing what
is included and why. Interested readers should take the time to
review the RFCs mentioned in the comments. There is also relevant
information about the motivations for hosting these zones in the
"work in progress" Internet-Draft,
http://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt
or its successor.
It's also worth noting that a significant number of these
empty zones are already included by default in the named binary
without any user configuration.
e. Because we're including a lot of examples of both local
forward zones and slave zones in the default configuration,
eliminate some of those examples.

3. Add new localhost-{forward|reverse} zone files, and an "empty" zone
to support the changes in 2.d. above. The empty zone file isn't really
empty in order to avoid a warning from BIND about a zone file that
doesn't contain any A or AAAA records.

17 years agoAdd a namedb/master directory for the zone files I'm about to add,
dougb [Mon, 18 Jun 2007 05:44:38 +0000 (05:44 +0000)]
Add a namedb/master directory for the zone files I'm about to add,
and switch to the more "normal" way of installing files for the
namedb directory so that we can pick up the new subdir.

17 years agominor style(9) polishing
imp [Mon, 18 Jun 2007 02:15:58 +0000 (02:15 +0000)]
minor style(9) polishing

# but we need a usb_match function, if we don't already have one...

17 years agoAdd rewind() to the list of functions which may fail and set errno
ache [Mon, 18 Jun 2007 02:13:04 +0000 (02:13 +0000)]
Add rewind() to the list of functions which may fail and set errno

17 years agoAdd mbstate clear missed in one of the cases.
ache [Mon, 18 Jun 2007 02:09:08 +0000 (02:09 +0000)]
Add mbstate clear missed in one of the cases.
Move overflow check for fseek as early as needed.

17 years agoEliminate unnecessary checks from vm_pageout_clean(): The page that is
alc [Mon, 18 Jun 2007 02:04:38 +0000 (02:04 +0000)]
Eliminate unnecessary checks from vm_pageout_clean(): The page that is
passed to vm_pageout_clean() cannot possibly be PG_UNMANAGED because
it came from the inactive queue and PG_UNMANAGED pages are not in any
page queue.  Moreover, PG_UNMANAGED pages only exist in OBJT_PHYS
objects, and all pages within a OBJT_PHYS object are PG_UNMANAGED.
So, if the page that is passed to vm_pageout_clean() is not
PG_UNMANAGED, then it cannot be from an OBJT_PHYS object and its
neighbors from the same object cannot themselves be PG_UNMANAGED.

Reviewed by: tegge

17 years agoFix library names.
davidxu [Mon, 18 Jun 2007 01:50:03 +0000 (01:50 +0000)]
Fix library names.

17 years agoMFp4: fix two locking problems:
delphij [Mon, 18 Jun 2007 01:43:13 +0000 (01:43 +0000)]
MFp4: fix two locking problems:

 - Hold TMPFS_LOCK while updating tm_pages_used.
 - Hold vm page while doing uiomove.

This will hopefully fix all known panics.

Submitted by: Howard Su

17 years agoTrack whether the current read stream supports seek(). For now, we
kientzle [Mon, 18 Jun 2007 00:36:54 +0000 (00:36 +0000)]
Track whether the current read stream supports seek().  For now, we
assume yes unless seek has previously failed, but I fear I'll have to
avoid seeks under other circumstances.  (For instance, tape drives on
FreeBSD seem to return garbage from lseek().)  Also, optimize away
zero-byte skips.

17 years ago- The packet log needs to copy all of the buffer not to the end.
rrs [Sun, 17 Jun 2007 23:43:37 +0000 (23:43 +0000)]
- The packet log needs to copy all of the buffer not to the end.

17 years agoApply a vendor patch that fixes very annoying bug
delphij [Sun, 17 Jun 2007 23:20:43 +0000 (23:20 +0000)]
Apply a vendor patch that fixes very annoying bug
which caused the cursor not to return to the place
it should when -w is used with -e.

Note that this is a commit against -HEAD because
we already have the file off the vendor branch.

Reported by: Tom Uffner (on -current@)
Obtained from: http://www.greenwoodsoftware.com/less/less-405.tar.gz

17 years agoHave gpart synthesize a disk geometry if the underlying provider
marcel [Sun, 17 Jun 2007 22:19:19 +0000 (22:19 +0000)]
Have gpart synthesize a disk geometry if the underlying provider
don't have it. Some partitioning schemes, as well as file systems,
operate on the geometry and without it such schemes (e.g. MBR)
and file systems (e.g. FAT) can't be created. This is useful for
memory disks.

17 years agoSilence some gcc 4 warnings. It is expected that the bpf_movein() routine
csjp [Sun, 17 Jun 2007 21:51:43 +0000 (21:51 +0000)]
Silence some gcc 4 warnings. It is expected that the bpf_movein() routine
will intialize the the header length and re-initialize the mbuf pointer
to reference the mbuf that is allocated after moving user supplied packet
data in.

17 years agoFix a (very) longstanding bug in moused(8) affecting high-resolution rodents
philip [Sun, 17 Jun 2007 20:27:54 +0000 (20:27 +0000)]
Fix a (very) longstanding bug in moused(8) affecting high-resolution rodents
when linear acceleration (-a) was enabled with a <1 value to slow them down.

Previously, rounding errors would eat small movements so the mouse had to be
moved a certain distance to get any movement at all.  We now calculate the
rounding errors and take them into account when reporting movement.

PR: bin/113749
Submitted by: Oliver Fromme <olli -at- secnetix.de>
MFC after: 3 days

17 years agoBack out last change to inpcb_free. Turns out we need
rrs [Sun, 17 Jun 2007 19:27:46 +0000 (19:27 +0000)]
Back out last change to inpcb_free. Turns out we need
to hold off freeing if there is data pending ... someone
might do send/close. Which means we want the data to
go and then close it after startup. Added comments to
the code as well to note that this is done for a reason.

17 years agoSpelling nit due to my lamenglishness.
ariff [Sun, 17 Jun 2007 19:02:05 +0000 (19:02 +0000)]
Spelling nit due to my lamenglishness.

Noticed by: brueffer

17 years agoRemove USBGETSOFTC, USB_ATTACH_START, USB_DETACH_START and
imp [Sun, 17 Jun 2007 18:46:26 +0000 (18:46 +0000)]
Remove USBGETSOFTC, USB_ATTACH_START, USB_DETACH_START and
USB_DECLARE_DRIVER_INIT from the usb network drivers.

17 years agoAdd PAM support to cron(8). Now cron(8) will skip commands scheduled
yar [Sun, 17 Jun 2007 17:25:53 +0000 (17:25 +0000)]
Add PAM support to cron(8).  Now cron(8) will skip commands scheduled
by unavailable accounts, e.g., those locked, expired, not allowed in at
the moment by nologin(5), or whatever, depending on cron's pam.conf(5).
This applies to personal crontabs only, /etc/crontab is unaffected.

In other words, now the account management policy will apply to
commands scheduled by users via crontab(1) so that a user can no
longer use cron(8) to set up a delayed backdoor and run commands
during periods when the admin doesn't want him to.

The PAM check is done just before running a command, not when loading
a crontab, because accounts can get locked, expired, and re-enabled
any time with no changes to their crontabs.  E.g., imagine that you
provide a system with payed access, or better a cluster of such
systems with centralized account management via PAM.  When a user
pays for some days of access, you set his expire field respectively.
If the account expires before its owner pays more, its crontab
commands won't run until the next payment is made.  Then it'll be
enough to set the expire field in future for the commands to run
again.  And so on.

Document this change in the cron(8) manpage, which includes adding
a FILES section and touching the document date.

X-Security: should benefit as users have access to cron(8) by default

17 years agoThis is a forced (and belated) commit to record that these files
phk [Sun, 17 Jun 2007 16:53:45 +0000 (16:53 +0000)]
This is a forced (and belated) commit to record that these files
were repocopied from src/tools/tools/recoverdisk

17 years agoRemove unused softc.
marius [Sun, 17 Jun 2007 16:44:08 +0000 (16:44 +0000)]
Remove unused softc.

17 years agoExpand USB_MATCH_START
imp [Sun, 17 Jun 2007 16:24:49 +0000 (16:24 +0000)]
Expand USB_MATCH_START

17 years agoAdd sysctl/tunable "hw.snd.default_auto", which is useful (especially
ariff [Sun, 17 Jun 2007 16:15:56 +0000 (16:15 +0000)]
Add sysctl/tunable "hw.snd.default_auto", which is useful (especially
for non-root users) to automatically assign default unit to a newly
attach device like USB audio.

17 years agoReassign default unit to a valid unit, be it during attach or detach.
ariff [Sun, 17 Jun 2007 15:53:11 +0000 (15:53 +0000)]
Reassign default unit to a valid unit, be it during attach or detach.
If nothing is available, set to something that is purely ridiculous
so the next valid attach will notice it.

Tested by: chibis

17 years agoFix a compile error from the last change.
scottl [Sun, 17 Jun 2007 15:21:09 +0000 (15:21 +0000)]
Fix a compile error from the last change.

17 years ago o style(9) nit.
rrs [Sun, 17 Jun 2007 14:45:28 +0000 (14:45 +0000)]
o style(9) nit.
o shorten explainations which are over 80 columns in console.
o group rows
o clean up and change explanations a little bit.
Obtained from: weongyo.jeong@gmail.com

17 years agoNote PAM support in atrun(8).
yar [Sun, 17 Jun 2007 14:02:31 +0000 (14:02 +0000)]
Note PAM support in atrun(8).
Sort FILES section while there.
Touch document date.

17 years agoDocument hw.firewire.phydma_enable knob.
simokawa [Sun, 17 Jun 2007 10:40:25 +0000 (10:40 +0000)]
Document hw.firewire.phydma_enable knob.

17 years agoIncrease buffer size of DV stream to prevent buffer
simokawa [Sun, 17 Jun 2007 10:20:55 +0000 (10:20 +0000)]
Increase buffer size of DV stream to prevent buffer
overrun caused by long blocking of file I/O (i.e. zfs).

MFC after: 3 days

17 years agoRemove USB_DO_ATTACH
imp [Sun, 17 Jun 2007 07:34:34 +0000 (07:34 +0000)]
Remove USB_DO_ATTACH

17 years agoExpand USB_DO_ATTACH inline.
imp [Sun, 17 Jun 2007 07:33:59 +0000 (07:33 +0000)]
Expand USB_DO_ATTACH inline.
Remove device_t dv, since it is no longer needed.
Add sizeof(device_t) to replace sizeof dv.
Change device_detach(dev) to device_detach(dev->subdevs[i]) since the type
of dev isn't right!  Not sure when this was introduced, but it likely would
lead to a crash on disconnect.

MFC After: 1 week

17 years agoUse bus_dma to get a page in the first 4 GB. Since the physical address
njl [Sun, 17 Jun 2007 07:18:23 +0000 (07:18 +0000)]
Use bus_dma to get a page in the first 4 GB.  Since the physical address
of the magic string is passed in a 32-bit register, we can't use high
memory in the PAE case.  This also eliminates a use of vtophys().

Tested by: Jeff Shimbo <jts767 / gmail.com>
MFC after: 1 week

17 years agoFlush remaining malloc() cleanups (M_NOWAIT -> M_WAITOK).
ariff [Sun, 17 Jun 2007 06:10:43 +0000 (06:10 +0000)]
Flush remaining malloc() cleanups (M_NOWAIT -> M_WAITOK).

17 years agoPrepare for future integration between CAM and newbus. xpt_bus_register
scottl [Sun, 17 Jun 2007 05:55:54 +0000 (05:55 +0000)]
Prepare for future integration between CAM and newbus.  xpt_bus_register
now takes a device_t to be the parent of the bus that is being created.
Most SIMs have been updated with a reasonable argument, but a few exceptions
just pass NULL for now.  This argument isn't used yet and the newbus
integration likely won't be ready until after 7.0-RELEASE.

17 years agoInitialize key to zero.
mjacob [Sun, 17 Jun 2007 04:40:33 +0000 (04:40 +0000)]
Initialize key to zero.

17 years agoTry a cheap way to get around gcc4.2 believing that user arguments
mjacob [Sun, 17 Jun 2007 04:37:57 +0000 (04:37 +0000)]
Try a cheap way to get around gcc4.2 believing that user arguments
to system calls can change across intervening functions.

17 years ago- switch adapter and port lock over to using sx so that resources
kmacy [Sun, 17 Jun 2007 04:33:38 +0000 (04:33 +0000)]
- switch adapter and port lock over to using sx so that resources
  can be allocated atomically
- add debug macros for printing lock initialization / teardown
- add buffers to port_info and adapter to allow each lock to have a
  unique name
- destroy mutexes initialized by cxgb_offload_init
- remove recursive calls to ADAPTER_LOCK
- move callout_drain calls so that they don't occur with the lock held
- ensure that only as many qsets as are needed are initialized and
  destroyed

MFC after: 3 days
Sponsored by: Chelsio Inc.

17 years agoInitialize mouse resolution to zero if converting from
mjacob [Sun, 17 Jun 2007 04:32:18 +0000 (04:32 +0000)]
Initialize mouse resolution to zero if converting from
OLD to NEW.

17 years agoCheck for pte being NULL in return from pmap_pte_pde- unlikely or
mjacob [Sun, 17 Jun 2007 04:27:45 +0000 (04:27 +0000)]
Check for pte being NULL in return from pmap_pte_pde- unlikely or
even impossible, but it's better ot have a panic and a quiesced
gcc4.2.

17 years agoInitialize lastaddr to zero to make gcc4.2 happy.
mjacob [Sun, 17 Jun 2007 04:21:58 +0000 (04:21 +0000)]
Initialize lastaddr to zero to make gcc4.2 happy.

17 years agoDon't declare inline a function which isn't.
mjacob [Sun, 17 Jun 2007 04:19:05 +0000 (04:19 +0000)]
Don't declare inline a function which isn't.

17 years agoMake sure object is NULL- there is a possible case where you could
mjacob [Sun, 17 Jun 2007 04:17:48 +0000 (04:17 +0000)]
Make sure object is NULL- there is a possible case where you could
fall through to it being used w/o being set. Put a break in the default
case.

17 years agoInitialize reqpage to zero.
mjacob [Sun, 17 Jun 2007 04:14:27 +0000 (04:14 +0000)]
Initialize reqpage to zero.

17 years agogcc4.2 somehow doesn't believe that finaldst can stay stable between
mjacob [Sun, 17 Jun 2007 04:12:21 +0000 (04:12 +0000)]
gcc4.2 somehow doesn't believe that finaldst can stay stable between
where it's initialized and where it's checked twice such that the
origingal destination address is saved. Make it happier and trim
things down a bit.

17 years agoMake gcc4.2 happy and zero save_ip for the unlikely (blackhole != 0)
mjacob [Sun, 17 Jun 2007 04:07:11 +0000 (04:07 +0000)]
Make gcc4.2 happy and zero save_ip for the unlikely (blackhole != 0)
codepath.

17 years ago- Forced commit to update who actually did this code (I forgot
rrs [Sun, 17 Jun 2007 01:57:08 +0000 (01:57 +0000)]
- Forced commit to update who actually did this code (I forgot
  the obtained from in the original line)
Obtained from: Weongyo Jeong (weongyo.jeong@gmail.com)

17 years ago - For sctp_input/sctp6_input add announcment when a packet arrives (debug)
rrs [Sun, 17 Jun 2007 01:36:02 +0000 (01:36 +0000)]
 - For sctp_input/sctp6_input add announcment when a packet arrives (debug)
 - re-factor the packet drop in sctp_output a bit more, we don't need the
   trim after all, but the size calc is now corrected.
 - When a assoc is in the COOKIE-ECHO/COOKIE-WAIT state and the user
   closes, it should not matter if data is queued, the assoc should be
   purged.
 - In error leg a missing free_chunk when iph comes in NULL (should not
   happen but just in case).

17 years agoFix build on arm: time_t on arm is 64 bits while long is
delphij [Sun, 17 Jun 2007 00:43:50 +0000 (00:43 +0000)]
Fix build on arm: time_t on arm is 64 bits while long is
32 bits, so subsequent compile time assertion:

sizeof inf->stat.st_mtime <= sizeof sec

Would fail because of that.  This change is suitable for
general consumption as well, but fix it in our local
patchset as we are near a code freeze.

Submitted by: cognet

17 years agoReplace incorrect local OFFSET_OF macro with the correct and generic
mjacob [Sun, 17 Jun 2007 00:33:34 +0000 (00:33 +0000)]
Replace incorrect local OFFSET_OF macro with the correct and generic
offsetof macro.

17 years agoSimplification to quiet a gcc4.2 warning. Just by setting match.s_addr
mjacob [Sun, 17 Jun 2007 00:31:24 +0000 (00:31 +0000)]
Simplification to quiet a gcc4.2 warning. Just by setting match.s_addr
to nonzero you fulfill the same function as the variable 'cmp'. so you
might as well zero match and test against it later.

Reviewed by: timeout on review request

17 years ago- Make better use of the global chosen, memory and mmu handles instead
marius [Sun, 17 Jun 2007 00:17:15 +0000 (00:17 +0000)]
- Make better use of the global chosen, memory and mmu handles instead
  of obtaining them over and over again and pretending we could do
  anything useful without them (for chosen this includes adding a
  declaration and initializing it in OF_init()).
- In OF_init() if obtaining the memory or mmu handle fails just call
  OF_exit() instead of panic() as the loader hasn't initialized the
  console at these early stages yet and trying to print out something
  causes a hang. With OF_exit() one at least has a change to get back
  to the OFW boot monitor and debug the problem.
- Fix OF_call_method() on 64-bit machines (this is a merge of
  sys/dev/ofw/openfirm.c rev 1.6).
- Replace OF_alloc_phys(), OF_claim_virt(), OF_map_phys() and
  OF_release_phys() in the MI part of the loader with wrappers around
  OF_call_method() in the sparc64. Beside the fact that they duplicate
  OF_call_method() the formers should never have been in the MI part
  of the loader as contrary to the OFW spec they use two-cell physical
  addresses.
- Remove unused functions which are also MD dupes of OF_call_method().
- In sys/boot/sparc64/loader/main.c add __func__ to panic strings as
  different functions use otherwise identical panic strings and make
  some of the panic strings a tad more user-friendly instead of just
  mentioning the name of the function that returned an unexpected
  result.

17 years agoAlso mark writecombine as enabled when PAT is used to enable
gallatin [Sun, 17 Jun 2007 00:09:51 +0000 (00:09 +0000)]
Also mark writecombine as enabled when PAT is used to enable
it rather than MTRRs.

17 years ago- Don't register the over-temperature and power-fail interrupt
marius [Sat, 16 Jun 2007 23:49:41 +0000 (23:49 +0000)]
- Don't register the over-temperature and power-fail interrupt
  handlers as filter/"fast" handlers so shutdown_nice() can
  acquire the process lock.
- Use bus_{read,write}_8() instead of bus_space_{read,write}_8()
  in order to get rid of sc_bushandle and sc_bustag in the softc.
- Remove the banal and outdated comment above sbus_filter_stub().

17 years ago- Use the newly introduced pcib_mtx spin lock to lock psycho_ce(),
marius [Sat, 16 Jun 2007 23:46:41 +0000 (23:46 +0000)]
- Use the newly introduced pcib_mtx spin lock to lock psycho_ce(),
  allowing it to be a filter/"fast" handler. Locking the interrupt
  handlers with a spin lock is mainly a requirement in schizo(4)
  but as we ought to register the spin lock anyway it should not
  hurt to take advantage of it in psycho(4).
- Pass both a driver_filter_t and a driver_intr_t argument to
  psycho_set_intr(), allowing to get rid of the FAST interrupt
  flag hack.
- Don't register the over-temperature interrupt handler as filter/
  "fast" handler so shutdown_nice() can acquire the process lock.
- Use bus_{read,write}_8() instead of bus_space_{read,write}_8()
  in order to get rid of sc_bushandle and sc_bustag in the softc.
- Correct the debug output for adjusting the subordinate bus number.
- Remove the banal and outdated above psycho_filter_stub().
- Fix some white space nits.

17 years agoRather than passing SUSER_RUID into priv_check_cred() to specify when
rwatson [Sat, 16 Jun 2007 23:41:43 +0000 (23:41 +0000)]
Rather than passing SUSER_RUID into priv_check_cred() to specify when
a privilege is checked against the real uid rather than the effective
uid, instead decide which uid to use in priv_check_cred() based on the
privilege passed in.  We use the real uid for PRIV_MAXFILES,
PRIV_MAXPROC, and PRIV_PROC_LIMIT.  Remove the definition of
SUSER_RUID; there are now no flags defined for priv_check_cred().

Obtained from: TrustedBSD Project

17 years agoonly register a ithread handler if the card requests an ithread
imp [Sat, 16 Jun 2007 23:33:57 +0000 (23:33 +0000)]
only register a ithread handler if the card requests an ithread
handler.

17 years ago- Remove zstty spin lock for no longer existing zs(4).
marius [Sat, 16 Jun 2007 23:30:57 +0000 (23:30 +0000)]
- Remove zstty spin lock for no longer existing zs(4).
- Move the rtc_mtx spin lock out from under #ifdef SMP as it's just
  not SMP-specific.
- Add a new spin lock pcib_mtx for locking "fast" interrupt handlers
  of host-to-PCI bridge drivers on sparc64.

17 years ago- In gem_bitwait() check that the bit clears/was set in the content
marius [Sat, 16 Jun 2007 23:27:59 +0000 (23:27 +0000)]
- In gem_bitwait() check that the bit clears/was set in the content
  of the register rather than in the offset describing the register.
- In gem_reset_rx() let gem_bitwait() check for the Rx reset bit
  rather than the Tx reset bit to clear.

Obtained from: OpenBSD (same/similar bugs being fixed)

17 years ago- Add support for sending IPIs with USIII and greater sun4u CPUs.
marius [Sat, 16 Jun 2007 23:26:00 +0000 (23:26 +0000)]
- Add support for sending IPIs with USIII and greater sun4u CPUs.
  These CPUs use an enhanced layout of the interrupt vector dispatch
  and dispatch status registers in order to allow sending IPIs to
  multiple targets simultaneously. Thus support for these CPUs was
  put in a newly added cheetah_ipi_selected(). This is intended to
  be pointed to by cpu_ipi_selected, which now is a function pointer,
  in order to avoid cpu_impl checks once booted. Alternatively it
  can point to spitfire_ipi_selected(), which was renamed from
  cpu_ipi_selected(). Consequently cpu_ipi_send() was also renamed
  to spitfire_ipi_send() (there's no need for a cheetah equivalent
  of this so far). Initialization of the cpu_ipi_selected pointer
  and other requirements is done in mp_init(), which was renamed
  from mp_tramp_alloc(), as cpu_mp_start() isn't called on UP
  systems while cpu_ipi_selected() is. As a side-effect this allows
  to make mp_tramp static to sys/sparc64/sparc64/mp_machdep.c.
  For the sake of avoiding #ifdef SMP and for keeping the history in
  place cheetah_ipi_selected() and spitfire_ipi_{selected,send}()
  where not put into/moved to sys/sparc64/sparc64/{cheetah,spitfire}.c
- Add some CTASSERTs and KASSERTs ensuring that MAXCPU doesn't
  exceed the data types we use to store the CPU bit fields or the
  number of USIII and greater CPUs supported by the current
  cheetah_ipi_selected() implementation (which for JBus-CPUs is
  only 4; that should be fine though as according to OpenSolaris
  there are no sun4u machines with more than 4 JBus-CPUs).
- In cpu_mp_start() don't enumerate and start more than MAXCPU CPUs
  as we can't handle more than that.
- In cpu_mp_start() check for upa-portid vs. portid depending on
  cpu_impl for consistency with nexus(4).
- In spitfire_ipi_selected() add KASSERTs ensuring that a CPU isn't
  told to IPI itself as sun4u CPUs just can't do that.
- In spitfire_ipi_send() do a MEMBAR #Sync after writing the
  interrupt vector data as we want to make sure the payload was
  actually written before we trigger the dispatch.
- In spitfire_ipi_send() also verify IDR_BUSY when checking whether
  the dispatch was successful as it has to be cleared for this to
  be the case.
- Remove some redundant variables.

17 years ago- Flesh out the support for the EBus variant which actually is the
marius [Sat, 16 Jun 2007 23:17:23 +0000 (23:17 +0000)]
- Flesh out the support for the EBus variant which actually is the
  RTC function of a National Semiconductor PC87317/PC97317. This
  consists of using the century register the same way Solaris does
  for compatibility reasons. Once there is a MD power(4) we'd also
  want to interface the APC (Advanced Power Control) functionality
  of the same chip function with it.
- Use a macro for the device description and take advantage of
  ISA_PNP_PROBE() setting the device description.
- Use the generated typedefs for the prototypes of the device
  interface functions.

17 years agoExport mc146818_def_{read,write}() so the front-end can make use
marius [Sat, 16 Jun 2007 23:10:00 +0000 (23:10 +0000)]
Export mc146818_def_{read,write}() so the front-end can make use
of them if needed.

17 years agoRemove the code for displaying the OFW hostid during boot for the
marius [Sat, 16 Jun 2007 23:07:53 +0000 (23:07 +0000)]
Remove the code for displaying the OFW hostid during boot for the
reasons outlined in the comment removed along with it, because the
OFW hostid has no real meaning for FreeBSD and mainly so the OFW
hostid is not confused with the FreeBSD hostid.

17 years agoIn OF_init() check the return value of OF_getprop().
marius [Sat, 16 Jun 2007 22:34:16 +0000 (22:34 +0000)]
In OF_init() check the return value of OF_getprop().

Found with: Coverity Prevent(tm)
CID: 679

17 years ago- Restore the machine independency of sys/dev/ofw/openfirm.{c,h} by
marius [Sat, 16 Jun 2007 22:30:38 +0000 (22:30 +0000)]
- Restore the machine independency of sys/dev/ofw/openfirm.{c,h} by
  moving OF_set_mmfsa_traptable() (SUNW,set-trap-table with the two
  arguments used here is specific to sun4v) to MD code.
- In sys/dev/ofw/openfirm.h remove prototypes for unimplemented
  functions and unused Solaris compatibility macros.

17 years agoMove the gallant 12 x 22 font data from a .h to a .c so it doesn't need
marius [Sat, 16 Jun 2007 21:48:50 +0000 (21:48 +0000)]
Move the gallant 12 x 22 font data from a .h to a .c so it doesn't need
to be compiled into every driver making use of it. Use a const instance
of struct gfb_font for this as the font isn't intended to be changed at
run-time and in order to accompany the font data with height and width
info.

17 years ago- Remove dupe and unused declarations and prototypes.
marius [Sat, 16 Jun 2007 21:46:15 +0000 (21:46 +0000)]
- Remove dupe and unused declarations and prototypes.
- Add missing prototypes.
- Define global variables not used outside of this module as static.
- Replace some outdated hard-coded functions names in panic strings
  with __func__.
- Fix some style(9) bugs.

17 years agoSync the styles of sys/boot/ofw/libofw/openfirm.c and
marius [Sat, 16 Jun 2007 21:38:04 +0000 (21:38 +0000)]
Sync the styles of sys/boot/ofw/libofw/openfirm.c and
sys/dev/ofw/openfirm.c with themselves, with each-other
and with style(9).

17 years ago- Define data of struct gfb_font a const as it's only used to supply font
marius [Sat, 16 Jun 2007 21:31:53 +0000 (21:31 +0000)]
- Define data of struct gfb_font a const as it's only used to supply font
  data and remove the array size from the definition as f.e. the gallant
  12 x 22 font data is 256 * 44 in size, exceeding the previously hard-
  coded size.
- Declare the bold8x16 instance of struct gfb_font as const as it's not
  intended to be changed at run-time as a whole either.
- Use __FBSDID in xboxfb.c

Tested by: rink

17 years agoIf attempting to cache a "busy", panic instead of printing a diagnostic
alc [Sat, 16 Jun 2007 21:07:51 +0000 (21:07 +0000)]
If attempting to cache a "busy", panic instead of printing a diagnostic
message and returning.

17 years agoForced commit to clarify preceding unclear commit message:
wilko [Sat, 16 Jun 2007 20:49:49 +0000 (20:49 +0000)]
Forced commit to clarify preceding unclear commit message:
- core was contacted by Joerg Peter Schley requesting 2 comment lines
  be removed with his name & email address in it.

17 years agoUse signed int, since all the samples are in that form.
ariff [Sat, 16 Jun 2007 20:36:39 +0000 (20:36 +0000)]
Use signed int, since all the samples are in that form.
This will help future implementation of soft amplifier
with variable/relative 0db.

17 years agoo Do not warn if the process exits before we get its name.
maxim [Sat, 16 Jun 2007 20:24:55 +0000 (20:24 +0000)]
o Do not warn if the process exits before we get its name.

PR: bin/113777
Submitted by: Dmitrij Tejblum
MFC after: 1 week

17 years agoPer request (to core) by the person refered to in the comment.
wilko [Sat, 16 Jun 2007 19:23:14 +0000 (19:23 +0000)]
Per request (to core) by the person refered to in the comment.

17 years agoRevert an accidental change from the previous rev.
scottl [Sat, 16 Jun 2007 18:22:19 +0000 (18:22 +0000)]
Revert an accidental change from the previous rev.

17 years agoWork around the other uses of M_WAITOK.
scottl [Sat, 16 Jun 2007 18:20:29 +0000 (18:20 +0000)]
Work around the other uses of M_WAITOK.

17 years agoWork around a malloc locking problem.
scottl [Sat, 16 Jun 2007 18:13:26 +0000 (18:13 +0000)]
Work around a malloc locking problem.

17 years agoAdd xfs(5) man page.
rodrigc [Sat, 16 Jun 2007 16:50:53 +0000 (16:50 +0000)]
Add xfs(5) man page.

17 years agoThe iop34x has 128 interrupts.
cognet [Sat, 16 Jun 2007 15:03:33 +0000 (15:03 +0000)]
The iop34x has 128 interrupts.

17 years ago- Bump ncurses share library version for the coming RELENG_7
rafan [Sat, 16 Jun 2007 14:42:08 +0000 (14:42 +0000)]
- Bump ncurses share library version for the coming RELENG_7

Pointed out by:      jhb
Approved by:      delphij (mentor)

17 years agoNever define the generated rpc server main function with storage type
se [Sat, 16 Jun 2007 14:39:25 +0000 (14:39 +0000)]
Never define the generated rpc server main function with storage type
"static". The header file generated by "rpcgen -h" will always declare
it as extern, leading to a "static after extern" error being issued by
gcc-4.2. This caused only a warning in gcc-3.x, but it has been wrong
all the time.

This change does not modify the code generated by "rpcgen -m", it only
affects rpcgen used to generate server stubs with a local main function.

This is the minimal patch. It does not remove the now obsolete "storage"
parameter from write_program() and write_programs() in an attempt to keep
differences to other systems' versions of rpcgen as small as possible.

17 years ago- Better handle sending large pkt-drops. We were not triming
rrs [Sat, 16 Jun 2007 14:03:15 +0000 (14:03 +0000)]
- Better handle sending large pkt-drops. We were not triming
  the data with m_adj if a large pkt arrived with a bad csum
  some systems can't handle you not triming the tail (think panda :-D)

17 years ago'spi' and the return value of ntohl are unsigned. Remove the extra >=0
bz [Sat, 16 Jun 2007 09:25:23 +0000 (09:25 +0000)]
'spi' and the return value of ntohl are unsigned. Remove the extra >=0
check which was always true.
Document the special meaning of spi values of 0 and 1-255 with a comment.

Found with: Coverity Prevent(tm)
CID: 2047

17 years agoo Add an example how to create /etc/mtree style mtree(8) files.
maxim [Sat, 16 Jun 2007 08:26:00 +0000 (08:26 +0000)]
o Add an example how to create /etc/mtree style mtree(8) files.

PR: docs/113667
Submitted by: edwin
MFC after: 1 week

17 years agoDocument default values for timeout and retry count.
danfe [Sat, 16 Jun 2007 07:01:15 +0000 (07:01 +0000)]
Document default values for timeout and retry count.

Approved by: fjoe

17 years agoCheck for a NULL return from rpcclnt_buildheader- it can fail if
mjacob [Sat, 16 Jun 2007 05:42:26 +0000 (05:42 +0000)]
Check for a NULL return from rpcclnt_buildheader- it can fail if
the passed in auth_type is unacceptable to rpcauth_buildheader-
this avoids a null pointer panic. Clean up allocations if this
happens. This also quiets a gcc 4.2 complaint about ussing mheadend
without it being initialized.

Reviewed by: alfred

17 years agoUpdate a comment.
alc [Sat, 16 Jun 2007 05:25:53 +0000 (05:25 +0000)]
Update a comment.

17 years agoCorrect state machine handling of AUTH -> AUTH transitions that pass
sam [Sat, 16 Jun 2007 05:13:48 +0000 (05:13 +0000)]
Correct state machine handling of AUTH -> AUTH transitions that pass
through wpa_supplcant.  If a sta is deauth'd (e.g. due to inactivity)
with roaming mode set to manual then a subsequent MLME assoc request
will be incorrectly handled and the station will never reauthenticate.
To fix this interpret a reason code of zero as sufficient to send an
auth request frame.

17 years agoEnable the new physical memory allocator.
alc [Sat, 16 Jun 2007 04:57:06 +0000 (04:57 +0000)]
Enable the new physical memory allocator.

This allocator uses a binary buddy system with a twist.  First and
foremost, this allocator is required to support the implementation of
superpages.  As a side effect, it enables a more robust implementation
of contigmalloc(9).  Moreover, this reimplementation of
contigmalloc(9) eliminates the acquisition of Giant by
contigmalloc(..., M_NOWAIT, ...).

The twist is that this allocator tries to reduce the number of TLB
misses incurred by accesses through a direct map to small, UMA-managed
objects and page table pages.  Roughly speaking, the physical pages
that are allocated for such purposes are clustered together in the
physical address space.  The performance benefits vary.  In the most
extreme case, a uniprocessor kernel running on an Opteron, I measured
an 18% reduction in system time during a buildworld.

This allocator does not implement page coloring.  The reason is that
superpages have much the same effect.  The contiguous physical memory
allocation necessary for a superpage is inherently colored.

Finally, the one caveat is that this allocator does not effectively
support prezeroed pages.  I hope this is temporary.  On i386, this is
a slight pessimization.  However, on amd64, the beneficial effects of
the direct-map optimization outweigh the ill effects.  I speculate
that this is true in general of machines with a direct map.

Approved by: re

17 years agoLast (again ?!?) major commit for RELENG_7, featuring total Giant
ariff [Sat, 16 Jun 2007 03:37:28 +0000 (03:37 +0000)]
Last (again ?!?) major commit for RELENG_7, featuring total Giant
eradication in/from userland path, countless locking fixes, etc.

- General sleep call through msleep(9) has been converted to condvar(9)
  with better consistencies.
- Heavily guard every possible "slow path" entries (open(), close(),
  few ioctl()s, sysctls), but once it entering "fast path" (io, interrupt
  started), they are free to fly on their own.
- Rearrange locking sequences, resulting better concurrency and
  serialization. Large part doesn't even need locking at all, and will be
  removed in future. Less clutter, except in few places due to lock
  ordering.
- Anonymous mixer object creation/deletion to simplify mixer handling
  beyond typical mixer ioctls.
  Submitted by: chibis (with modifications)
- Add few mix_[get|set|..] functions to avoid calling mixer_ioctl()
  directly using cryptic arguments.
- Locking fixes to avoid possible deadlock with (still under Giant) USB.
- Better simplex/duplex device handling.
- Recover mmap() functionality for recording, which has been lost
  since 2.2.x - 3.x (the introduction of newpcm). Full-duplex mmap still
  doesn't work (due to VM/page design), but people still can mmap
  both by opening each direction separately. mmaped playback is guarantee
  to work either way.
- New sysctl: "hw.snd.compat_linux_mmap" to allow PROT_EXEC page
  mapping, due to recent changes in linux compatibility layer which
  require it. All linux applications that using sound + mmap() (mostly games)
  require this to be enabled. Disabled by default.
- Other goodies.. too many, that will increase releng7 shareholder value
  and make users of releng6 (and below) cry ;)

* This commit should be atomic. If anything goes wrong (not counting problem
  originated from elsewhere), I will not hesitate to revert everything back
  within 12 hours. This substantial changes itself not a rocket science
  and the process has begun for almost 2 years, and lots of incremental
  changes are already in place during that period of time.
* Some issues does occur in snd_emu10kx (note the 'x') due to various
  internal locking issues and it is currently being worked on by chibis.

Tested by: chibis (Yuriy Tsibizov), joel, Alexandre Vieira,
           many innocent souls...

17 years ago- Raise max range of sctp_logging sysctl so panda does not disallow
rrs [Sat, 16 Jun 2007 03:28:18 +0000 (03:28 +0000)]
- Raise max range of sctp_logging sysctl so panda does not disallow
  us to turn on logging levels.

17 years agoDisable TSO support.
yongari [Sat, 16 Jun 2007 02:54:19 +0000 (02:54 +0000)]
Disable TSO support.
Without bus_dma clean up and increment of number of Tx descriptors
it's hard to guarantee correct Tx operation in TSO case. The TSO
support would be enabled again when I get more feeback from re(4)
patch posted to current.

17 years agoIn previous releases of FreeBSD we have enforced -EfGm, and the
delphij [Sat, 16 Jun 2007 02:43:44 +0000 (02:43 +0000)]
In previous releases of FreeBSD we have enforced -EfGm, and the
new less(1) version enforced only -Em.  Restore old behavior in
respect with POLA.

Submitted by: ru (on -current@)

17 years agoAdd a manual page for tmpfs(5).
delphij [Sat, 16 Jun 2007 02:35:29 +0000 (02:35 +0000)]
Add a manual page for tmpfs(5).

17 years ago- Migrated IPMI fix from RELENG_6.
davidch [Sat, 16 Jun 2007 02:27:03 +0000 (02:27 +0000)]
- Migrated IPMI fix from RELENG_6.
- Added additional debug code.

17 years agoMFp4: Add regression tests for tmpfs.
delphij [Sat, 16 Jun 2007 02:04:44 +0000 (02:04 +0000)]
MFp4: Add regression tests for tmpfs.

Obtained from: NetBSD via p4
Submitted by: Howard Su

17 years agoMFp4: Add tmpfs, an efficient memory file system.
delphij [Sat, 16 Jun 2007 01:56:05 +0000 (01:56 +0000)]
MFp4: Add tmpfs, an efficient memory file system.

Please note that, this is currently considered as an
experimental feature so there could be some rough
edges.  Consult http://wiki.freebsd.org/TMPFS for
more information.

For now, connect tmpfs to build on i386 and amd64
architectures only.  Please let us know if you have
success with other platforms.

This work was developed by Julio M. Merino Vidal
for NetBSD as a SoC project; Rohit Jalan ported it
from NetBSD to FreeBSD.  Howard Su and Glen Leeder
are worked on it to continue this effort.

Obtained from: NetBSD via p4
Submitted by: Howard Su (with some minor changes)
Approved by: re (kensmith)

17 years ago- Lock sbp_write_cmd() and ORB_POINTER_ACTIVE flag.
simokawa [Sat, 16 Jun 2007 00:59:41 +0000 (00:59 +0000)]
- Lock sbp_write_cmd() and ORB_POINTER_ACTIVE flag.
- Remove unnecessary timestamps.
- Return CAM_RESRC_UNAVAIL for ORB shortage.
- Fix a lock problem when doorbell is used.
- Fix a potential bug for unordered execution.

17 years ago- Matthew's changes to get inlines out, plus a few of my own
rrs [Sat, 16 Jun 2007 00:33:47 +0000 (00:33 +0000)]
-  Matthew's changes to get inlines out, plus a few of my own
   to deal with the VRF inline function -> becomes a macro now.
Submitted by: Matthew Jacobs

17 years agoIn case of failure we can directly return ENOBUFS because
bz [Sat, 16 Jun 2007 00:15:14 +0000 (00:15 +0000)]
In case of failure we can directly return ENOBUFS because
'result' is still NULL and we do not need to free anything.
That allows us to gc the entire goto parts and a now unused variable.

Found with: Coverity Prevent(tm)
CID: 2519

17 years agoInitialize some variables that GCC4.2 thinks might possibly be used without
mjacob [Fri, 15 Jun 2007 23:49:54 +0000 (23:49 +0000)]
Initialize some variables that GCC4.2 thinks might possibly be used without
being initialized.