Commit Graph

148028 Commits

Author SHA1 Message Date
John Baldwin
4ef60d2686 Add support for multiple passes of the device tree during the boot-time
probe.  The current device order is unchanged.  This commit just adds the
infrastructure and ABI changes so that it is easier to merge later changes
into 8.x.
- Driver attachments now have an associated pass level.  Attachments are
  not allowed to probe or attach to drivers until the system-wide pass level
  is >= the attachment's pass level.  By default driver attachments use the
  "last" pass level (BUS_PASS_DEFAULT).  Driver's that wish to probe during
  an earlier pass use EARLY_DRIVER_MODULE() instead of DRIVER_MODULE() which
  accepts the pass level as an additional parameter.
- A new method BUS_NEW_PASS has been added to the bus interface.  This
  method is invoked when the system-wide pass level is changed to kick off
  a rescan of the device tree so that drivers that have just been made
  "eligible" can probe and attach.
- The bus_generic_new_pass() function provides a default implementation of
  BUS_NEW_PASS().  It first allows drivers that were just made eligible for
  this pass to identify new child devices.  Then it propogates the rescan to
  child devices that already have an attached driver by invoking their
  BUS_NEW_PASS() method.  It also reprobes devices without a driver.
- BUS_PROBE_NOMATCH() is only invoked for devices that do not have
  an attached driver after being scanned during the final pass.
- The bus_set_pass() function is used during boot to raise the pass level.
  Currently it is only called once during root_bus_configure() to raise
  the pass level to BUS_PASS_DEFAULT.  This has the effect of probing all
  devices in a single pass identical to previous behavior.

Reviewed by:	imp
Approved by:	re (kib)
2009-06-09 14:26:23 +00:00
John Baldwin
0668724b99 Rework the _BBN handling for Host-PCI bridges. Previously we only trusted
a _BBN value of 0 if it was for the first bridge encountered since some
older systems returned _BBN of 0 for all bridges.  However, some newer
systems enumerate bridges with non-zero _BBN before bus 0 which is
perfectly valid.  Handle both cases by trusting the first bridge that has
a _BBN of 0 and falling back to reading from non-standard config registers
only for subsequent bridges with a _BBN of 0.  We also only perform this
check for segment (domain) 0.  We assume that _BBN is always correct
for segments other than 0.

Tested by:	Josef Moellers  josef.moellers at fujitsu
MFC after:	1 week
2009-06-09 13:44:17 +00:00
John Baldwin
3e7865bcfc - Remove an unnecessary memory barrier from an atomic op.
- Use the per-softc mutex to protect the softc data in the callout routine
  rather than letting it run without any locks whatsoever.
2009-06-09 13:33:03 +00:00
Dag-Erling Smørgrav
18860a1cdf Revert r181651, which changed the ABI, and use a temp variable instead.
Suggested by:	attilio
2009-06-09 12:32:10 +00:00
Bjoern A. Zeeb
f7bde4e836 For now only compile flowtable.c if both options FLOWTABLE and INET
are given.  This will also work when we add IPv6 support as for now
INET6 depends on INET.
2009-06-09 11:31:47 +00:00
Ariff Abdullah
5b9505f5d1 Each generated file should depend its own generator as well. 2009-06-09 10:17:22 +00:00
Bjoern A. Zeeb
c2f16e371e Remove one INET dependency by calling the general
AF agnostic version for doing the routing lookup.

Reviewed by:	kmacy
2009-06-09 09:50:43 +00:00
Bjoern A. Zeeb
78c7c6adbc Unbreak the build for amd64 after r193814 using correct variable names. 2009-06-09 09:47:02 +00:00
Bjoern A. Zeeb
93a885572c Depend on @ machine (_ILINKS) as we do with other modules so that @
is there for parallel (-jN) builds.  Ideally beforedepends in kmod.mk
should do the right thing but it seems it does not.
2009-06-09 09:03:13 +00:00
Xin LI
dbfbdd0474 Spacing fixes. No actual change. 2009-06-09 09:02:58 +00:00
Hiroki Sato
4cd5f57d6b Style fix.
Submitted by:	bz
2009-06-09 08:09:30 +00:00
Ariff Abdullah
b65cb1db3c When using i8254 as the only kernel timer source:
- Interpolate stat/prof clock using clkintr() in a similar fashion to
  local APIC timer, since statclock usually run slower.

- Liberate hardclockintr() from taking the burden of handling both stat
  and prof clock interrupt. Instead, send IPIs within clkintr() to handle
  those.
2009-06-09 07:26:52 +00:00
Warner Losh
2b9a8a330f Use new spelling of the NG_*LEN constants. 2009-06-09 07:14:32 +00:00
Warner Losh
0941c782f9 World now builds without these defines, so eliminate them.
Approved by:	julian@
2009-06-09 07:07:20 +00:00
Joseph Koshy
5c9306fd41 Document the fact that some Core2 family CPUs lack fixed-function counters. 2009-06-09 06:36:29 +00:00
Joseph Koshy
b47ea38e01 Fix parsing of Core2 event qualifiers.
Submitted by:	Nikola K <laladelausanne at gmail dot com>
2009-06-09 06:34:48 +00:00
Warner Losh
367316d5ff Get the other NG_PATHLEN while I'm here too :(. 2009-06-09 05:24:06 +00:00
Warner Losh
c402ff5910 Use NG_PATHSIZ instead of NG_PATHLEN + 1. 2009-06-09 05:18:14 +00:00
Ariff Abdullah
867cdecd40 Move C1E workaround into its own idle function. Previous workaround works
only during initial booting process, while there are laptops/BIOSes that
tend to act 'smarter' by force enabling C1E if the main power adapter
being pulled out, rendering previous workaround ineffective. Given the
fact that we still rely on local APIC to drive timer interrupt, this
workaround should keep all Turion (probably Phenom too) X\d+ alive whether
its on battery power or not.

URL:		http://lists.freebsd.org/pipermail/freebsd-acpi/2008-April/004858.html
    		http://lists.freebsd.org/pipermail/freebsd-acpi/2008-May/004888.html

Tested by:	Peter Jeremy <peterjeremy at optushome d com d au>
2009-06-09 04:17:36 +00:00
Weongyo Jeong
e87b19e38c unify zyd_tx_mgt() and zyd_tx_data() to simplify TX path and sorts
setting TX descritor.

While I'm here fixes a bug that the management frames only sent at 2
Mbits/s.
2009-06-09 04:17:08 +00:00
Alexander Nedotsukov
64fbf83d6d Fix bug in zphys offset calculation I introduced while retyping
original patch.
2009-06-09 04:09:31 +00:00
Alexander Nedotsukov
e29dea04cb Chase ZFS v13 import changes.
This is a temporary fix until we find a way to avoid fstat
to be broken each time we change the znode.

Approved by:	lulf
2009-06-09 03:35:42 +00:00
Hiroki Sato
fb70e72b0c - Fix sanity check of GIFSOPTS ioctl.
- Rename option mask s/GIF_FULLOPTS/GIF_OPTMASK/

Spotted by:	Eygene Ryabinkin, delphij
2009-06-09 02:27:59 +00:00
Xin LI
38676b52dd Add line width calculations for 15/16 and 24/32 bit modes in case
the "Get Scan Line Length" function fails, as it does in Parallels
(in Version 2.2, Build 2112 at least).

PR:		i386/127367
Obtained from:	DragonFly
Submitted by:	Pedro Giffuni
MFC after:	1 month
2009-06-09 00:54:57 +00:00
Edwin Groothuis
c994fb7c5b MFV of tzdata2009i:
Bangladesh will go into DST on 20 June.

MFC after:	2 days
2009-06-09 00:09:36 +00:00
Edwin Groothuis
15fca40e91 Vendor import of tzdata2009i:
Bangladesh will introduce DST in 20 June

Obtained from:	ftp://elsie.nci.nih.gov/pub/
2009-06-09 00:04:57 +00:00
Ariff Abdullah
c7215acf82 Fix compile time warning on sparc64, thanks to strict kobj signatures checking.
Noticed by:	bz
2009-06-08 23:24:01 +00:00
Navdeep Parhar
25db459e09 Add self, list mentor in committers-src.dot
Approved by:	gnn (mentor)
2009-06-08 22:03:37 +00:00
Bjoern A. Zeeb
3ac3ab96b6 Update vnet_net size guard information after r193731. 2009-06-08 22:02:30 +00:00
Jung-uk Kim
240d2af5fe Reflect debug level changes from the recent ACPICA import. 2009-06-08 21:48:13 +00:00
Brian Somers
043bcc8d44 Fix an off by one error when we limit append/prepend text sizes based on our
internal buffer sizes.

When we 'append', assume we're appending to text.  Some MS dhcp servers will
give us a string with the length including the trailing NUL.  when we 'append
domain-name', we get something like "search x.y\000 z" in resolv.conf :(

MFC after:	1 week
Security:	A buffer overflow (by one NUL byte) was possible.
2009-06-08 21:42:30 +00:00
Paul Saab
27bfb741a0 Simply shared vnode locking and extend it to also include fsync.
Also, in vop_write, no longer assert for exclusive locks on the
vnode.

Reviewed by:	jhb, kmacy, jeffr
2009-06-08 21:23:54 +00:00
Sam Leffler
a91ac60c20 purge dead code 2009-06-08 21:16:06 +00:00
Sam Leffler
86ede425f2 fix big-endian machines 2009-06-08 21:15:40 +00:00
Michael Tuexen
4308ccecdc Add myself.
Approved by:	rrs (mentor)
2009-06-08 21:14:21 +00:00
Jung-uk Kim
c930b91c5f Remove redundant checks for ACPI_WAIT_FOREVER cases. 2009-06-08 20:50:38 +00:00
Ed Schouten
417635733e Use proper types in kbdmux_kbd_getc():
- The return value should be a signed integer, because -1 means failure.
- The c variable should be unsigned, to force it to be zero-extended
  when returned.

Reported by:	Andreas Tobler <andreast-list fgznet ch>
2009-06-08 20:24:29 +00:00
Jung-uk Kim
230bb4d90d Rewrite OsdSynch.c to reflect the latest ACPICA more closely:
- Implement ACPI semaphore (ACPI_SEMAPHORE) with condvar(9) and mutex(9).
- Implement ACPI mutex (ACPI_MUTEX) with mutex(9).
- Implement ACPI lock (ACPI_SPINLOCK) with spin mutex(9).
2009-06-08 20:07:16 +00:00
Bjoern A. Zeeb
5c40c5e989 Remove two unneeded, hidden includes. 2009-06-08 20:04:46 +00:00
Bjoern A. Zeeb
8d8bc0182e After r193232 rt_tables in vnet.h are no longer indirectly dependent on
the ROUTETABLES kernel option thus there is no need to include opt_route.h
anymore in all consumers of vnet.h and no longer depend on it for module
builds.

Remove the hidden include in flowtable.h as well and leave the two
explicit #includes in ip_input.c and ip_output.c.
2009-06-08 19:57:35 +00:00
Andrew Thompson
5cdee58296 Commit missed driver_info to driver_ivar change in usb_attach_args.
Pointed out by:	kib
2009-06-08 19:56:23 +00:00
Rick Macklem
2fa32154e4 Fix nfscl_getcl() so that it doesn't crash when it is called to
do an NFSv4 Close operation with the cred argument NULL. Also,
clarify what NULL arguments mean in the function's comment.

Approved by:	kib (mentor)
2009-06-08 18:41:23 +00:00
Ed Schouten
5942207fb4 Revert my change; reintroduce __gnu89_inline.
It turns out our compiler in stable/7 can't build this code anymore.
Even though my opinion is that those people should just run `make
kernel-toolchain' before building a kernel, I am willing to wait and
commit this after we've branched stable/8.

Requested by:	rwatson
2009-06-08 18:23:43 +00:00
Andrew Thompson
ed96654f20 Change driver_info to a ulong as it always stores a number and remove the only
diff of the usb_device_id struct to Linux.

Reviewed by:	HPS
2009-06-08 18:09:51 +00:00
Ed Schouten
032e3d1d19 Remove __gnu89_inline.
Now that we use C99 almost everywhere, just use C99-style in the pmap
code. Since the pmap code is the only consumer of __gnu89_inline, remove
it from cdefs.h as well. Because the flag was only introduced 17 months
ago, I don't expect any problems.

Reviewed by:	alc
2009-06-08 17:27:25 +00:00
Marko Zec
bc29160df3 Introduce an infrastructure for dismantling vnet instances.
Vnet modules and protocol domains may now register destructor
functions to clean up and release per-module state.  The destructor
mechanisms can be triggered by invoking "vimage -d", or a future
equivalent command which will be provided via the new jail framework.

While this patch introduces numerous placeholder destructor functions,
many of those are currently incomplete, thus leaking memory or (even
worse) failing to stop all running timers.  Many of such issues are
already known and will be incrementaly fixed over the next weeks in
smaller incremental commits.

Apart from introducing new fields in structs ifnet, domain, protosw
and vnet_net, which requires the kernel and modules to be rebuilt, this
change should have no impact on nooptions VIMAGE builds, since vnet
destructors can only be called in VIMAGE kernels.  Moreover,
destructor functions should be in general compiled in only in
options VIMAGE builds, except for kernel modules which can be safely
kldunloaded at run time.

Bump __FreeBSD_version to 800097.
Reviewed by:	bz, julian
Approved by:	rwatson, kib (re), julian (mentor)
2009-06-08 17:15:40 +00:00
Jung-uk Kim
389cff5113 Clean up FreeBSD-specific header file:
- Define ACPI_USE_DO_WHILE_0 to add do while(0) around return_*() macros.
- Define __cdecl only for user land.  It will never be used in kernel.
- Remove __cli() and __sti().  They were deprecated long ago.
2009-06-08 17:11:47 +00:00
Alan Cox
3cfc28b0a0 Now that amd64's kernel map is 512GB (SVN rev 192216), there is no reason
to cap its buffer map at 1GB.

MFC after:	6 weeks
2009-06-08 16:43:40 +00:00
John Baldwin
34578ff413 Change the printf format string to match the variable type to quiet
warnings.
2009-06-08 15:54:07 +00:00
Robert Watson
324fb6be0f Move zombie-reaping code out of kern_wait() and into its own function,
proc_reap().
Reviewed by:	jhb
MFC after:	3 days
Sponsored by:	Google, Inc.
2009-06-08 15:26:09 +00:00