Commit Graph

66283 Commits

Author SHA1 Message Date
Alan Cox
4c8e0452e0 Correct a long-standing error in vm_object_deallocate(). Specifically,
only anonymous default (OBJT_DEFAULT) and swap (OBJT_SWAP) objects should
ever have OBJ_ONEMAPPING set.  However, vm_object_deallocate() was
setting it on device (OBJT_DEVICE) objects.  As a result,
vm_object_page_remove() could be called on a device object and if that
occurred pmap_remove_all() would be called on the device object's pages.
However, a device object's pages are fictitious, and fictitious pages do
not have an initialized pv list (struct md_page).

To date, fictitious pages have been allocated from zeroed memory,
effectively hiding this problem.  Now, however, the conversion of rotting
diagnostics to invariants in the amd64 and i386 pmaps has revealed the
problem.  Specifically, assertion failures have occurred during the
initialization phase of the X server on some hardware.

MFC after: 1 week
Discussed with: Kostik Belousov
Reported by: Michiel Boland
2008-02-24 18:03:56 +00:00
Marcel Moolenaar
72020fc2c1 Don't define DEBUG. No debugging required.
Pointy hat: marcel
2008-02-24 17:10:30 +00:00
Attilio Rao
628f51d275 Introduce some functions in the vnode locks namespace and in the ffs
namespace in order to handle lockmgr fields in a controlled way instead
than spreading all around bogus stubs:
- VN_LOCK_AREC() allows lock recursion for a specified vnode
- VN_LOCK_ASHARE() allows lock sharing for a specified vnode

In FFS land:
- BUF_AREC() allows lock recursion for a specified buffer lock
- BUF_NOREC() disallows recursion for a specified buffer lock

Side note: union_subr.c::unionfs_node_update() is the only other function
directly handling lockmgr fields. As this is not simple to fix, it has
been left behind as "sole" exception.
2008-02-24 16:38:58 +00:00
Attilio Rao
93b651d88c Currently, smb_co_init() uses the same lock name for the mutex interlock
and the lockmgr. Use different names in order to avoid WITNESS conflicts.

Reported by:	Bryan Venteicher <bryanv at daemoninthecloset dot org>
2008-02-24 16:26:52 +00:00
Paolo Pisati
f94a7fc0b5 Add table/tablearg support to ipfw's nat.
MFC After: 1 week
2008-02-24 15:37:45 +00:00
Shunsuke Akiyama
54462c2410 o Add module event handler.
Now ucom kernel module can unload properly.
o Update copyright year.

PR:		usb/88966
MFC after:	1 week
2008-02-24 12:16:01 +00:00
Alexander Motin
510b772284 Fix shutdown bug made by previous commit. 2008-02-24 10:13:32 +00:00
Kip Macy
88e8506e22 Fix namespace collision with sparc macro 2008-02-24 07:19:31 +00:00
Mike Silbersack
ea346b19cc Change FreeBSD 7 so that it returns TCP options in
the same order that FreeBSD 6 and before did.  Doug
White and the other bloodhounds at ISC discovered that
while FreeBSD 7's ordering of options was more efficient,
it caused some cable modem routers to ignore the
SYN-ACKs ordered in this fashion.

The placement of sackOK after the timestamp option seems
to be the critical difference:

FreeBSD 6:
<mss 1460,nop,wscale 1,nop,nop,timestamp 3512155768 0,sackOK,eol>

FreeBSD 7.0:
<mss 1460,nop,wscale 3,sackOK,timestamp 1370692577 0>

FreeBSD 7.0 + this change:
<mss 1460,nop,wscale 3,nop,nop,timestamp 7371813 0,sackOK,eol>

MFC after: 1 week
2008-02-24 05:13:20 +00:00
Marcel Moolenaar
cebb2edba8 Resolve warnings exposed by LINT.
o  Put prototypes in a single header only.
o  Fix printf format specifiers.
2008-02-24 03:01:26 +00:00
Colin Percival
491869163b After finishing sending file data in sendfile(2), don't forget to send
the provided trailers.  This has been broken since revision 1.240.

Submitted by:	Dan Nelson
PR:		kern/120948
"sounds ok to me" from:	phk
MFC after:	3 days
2008-02-24 00:07:00 +00:00
Marcel Moolenaar
c2602b5b06 Add prototype for __cmpd2(). 2008-02-23 22:40:05 +00:00
Marcel Moolenaar
eb9b8516f2 Add FPU_EMU. 2008-02-23 22:32:16 +00:00
Kip Macy
7c84f79070 remove call to kdb_backtrace() 2008-02-23 21:18:13 +00:00
Marcel Moolenaar
4bbf0886b3 Hook-up the FPU emulator. It's optional upon FPU_EMU. 2008-02-23 20:16:38 +00:00
Marcel Moolenaar
f7355c360b Bring back (without advertising clause) cmpdi2.c. It's needed on PowerPC
when the FP emulator is compiled-in.
2008-02-23 20:10:49 +00:00
Marcel Moolenaar
7e76048a69 Add a floating-point emulator so that a single userland or single ABI
can run on processors that don't have a FPU. This is typically the
case for Book E processors. While a tuned system will probably want
to use soft-float (or use a processor that has a FPU if the usage is
FP intensive enough), allowing hard-float on FPU-less systems gives
great portability and flexibility.

Obtained from: NetBSD
2008-02-23 20:05:26 +00:00
Marcel Moolenaar
859baed9a9 o Build and install the U-Boot loader as ubldr.
o  Don't build/install the manual pages or configuration
   files that are already installed by the OFW loader.
o  Hook the U-Boot loader to the build.
2008-02-23 19:45:20 +00:00
Marcel Moolenaar
8b4c4c1c72 style(9) commit. 2008-02-23 19:43:29 +00:00
Marcel Moolenaar
3802c8b6da Setup the new bootinfo structure.
While here, make local function static and update copyright.
2008-02-23 19:08:25 +00:00
Marcel Moolenaar
0f5615e325 o Keep running on U-Boot's stack.
o  Disable interrupts while not running U-Boot code. We clobber
   registers that the U-Boot interrupt handlers assume to be
   fixed as per the U-Boot register usage. At this time this only
   applies to r14. U-Boot uses r2 now for what they used r29 for.
   After we restore r14 in preparation of doing the syscall, we
   re-enable interrupts. When we return from the syscall, we
   disable interrupts and restore the callee-saved r14.
2008-02-23 18:42:53 +00:00
Marcel Moolenaar
f673ad04f5 The NFS file system support is conditional upon LOADER_NFS_SUPPORT,
not LOADER_NET_SUPPORT.
2008-02-23 18:36:13 +00:00
Marcel Moolenaar
e641a443f4 Add __elfN(relocation_offset). It holds the offset between the virtual
(link) address and the physical (load) address. Ideally, the mapping
between link and load addresses should be abstracted by the copyin(),
copyout() and readin() functions, so that we don't have to add kluges
in __elfN(loadimage)(). Then, we could also have paged virtual memory
for the kernel. This can be important under EFI, where you need to
allocate physical memory form the firmware if you want to work in all
scenarios.
2008-02-23 18:33:50 +00:00
Marcel Moolenaar
e1233a8bb7 Define the bootinfo structure for FreeBSD. It is not used on
AIM, but it's used for BookE.
2008-02-23 18:01:45 +00:00
Marcel Moolenaar
b8c02f17ea o Include glue.h
o  Support multiple memory regions.
2008-02-23 17:58:12 +00:00
Marcel Moolenaar
9dbb1b6e7d o Build libuboot with -msoft-float like everything else.
o  Move the API prototypes to a separate header (glue.h)
o  Allow the platform to hint libuboot about where to look
   for the API signature. The uboot_address variable is
   expected to be defined by the platform.
2008-02-23 17:56:17 +00:00
Marcel Moolenaar
719ea9c174 Add the appropriate license information. This file is double
licensed under GPL and BSD.

Thanks to: raj@
2008-02-23 17:52:30 +00:00
Marcel Moolenaar
9a1b62b630 We build ficl and libofw with -msoft-float. Build the loader
with -msoft-float too.
2008-02-23 17:48:23 +00:00
Kip Macy
ce86be8a6a Fix tinderbox by removing call to kdb_backtrace
MFC after: 3 days
2008-02-23 06:19:16 +00:00
Kip Macy
8e10660f12 - update firmware to 5.0
- add support for T3C
- add DDP support (zero-copy receive)
- fix TOE transmit of large requests
- fix shutdown so that sockets don't remain in CLOSING state indefinitely
- register listeners when an interface is brought up after tom is loaded
- fix setting of multicast filter
- enable link at device attach
- exit tick handler if shutdown is in progress
- add helper for logging TCB
- add sysctls for dumping transmit queues

- note that TOE wxill not be MFC'd until after 7.0 has been finalized

MFC after: 3 days
2008-02-23 01:06:17 +00:00
Dag-Erling Smørgrav
60e15db992 This patch adds a new ktrace(2) record type, KTR_STRUCT, whose payload
consists of the null-terminated name and the contents of any structure
you wish to record.  A new ktrstruct() function constructs and emits a
KTR_STRUCT record.  It is accompanied by convenience macros for struct
stat and struct sockaddr.

In kdump(1), KTR_STRUCT records are handled by a dispatcher function
that runs stringent sanity checks on its contents before handing it
over to individual decoding funtions for each type of structure.
Currently supported structures are struct stat and struct sockaddr for
the AF_INET, AF_INET6 and AF_UNIX families; support for AF_APPLETALK
and AF_IPX is present but disabled, as I am unable to test it properly.

Since 's' was already taken, the letter 't' is used by ktrace(1) to
enable KTR_STRUCT trace points, and in kdump(1) to enable their
decoding.

Derived from patches by Andrew Li <andrew2.li@citi.com>.

PR:		kern/117836
MFC after:	3 weeks
2008-02-23 01:01:49 +00:00
Randall Stewart
7a846e9ad8 Fixes a memory leak when VRF's are in play.
Submitted by:	Prasad Narasimha (snprasad@cisco.com)
Reviewed by:	rrs
2008-02-22 15:08:10 +00:00
Randall Stewart
69d5ee4f23 - Takes out stray ifdef code that should not have been present. 2008-02-22 15:06:25 +00:00
Konstantin Belousov
cbd2c621f8 Sanitize arguments to linux_mremap().
Check that only MREMAP_FIXED and MREMAP_MAYMOVE flags are specified.
Check for the page alignment of the addr argument.

Submitted by:	rdivacky
MFC after:	1 week
2008-02-22 11:47:56 +00:00
David Christensen
8ec2795f0d MFC after: 4 weeks
- Added loose RX MTU functionality to allow frames larger than 1500 bytes
  to be accepted even though the interface MTU is set to 1500.
- Implemented new TCP header splitting/jumbo frame support which uses
  two chains for receive traffic rather than the original single recevie
  chain.
- Added additional debug support code.
2008-02-22 00:46:22 +00:00
Remko Lodder
03206b569c Add support for the VIA USB2IDE bridge [1].
PR:		usb/95173
Submitted by:	Goegele Hannes <diazepam@gmx.net>
		Ben Kelly <bkelly at vadev dot org>
Tested by:	blackend
Approved by:	imp (mentor, blanket for simple patches)
X-MFC-After:	1 week
2008-02-21 19:07:08 +00:00
Kai Wang
7a76718800 Back out previous commit. Restore Binutils ar as default. Disconnect
'BSD' ar to the build.

Requested by: 	des
2008-02-21 16:12:46 +00:00
Kai Wang
d0e2abaf12 * Connect ar(1) to the build and make it default ar. Rename GNU
binutils ar and ranlib to gar and granlib, respectively.

* Introduce a temporary variable WITH_GNUAR as a safety net.
When buildworld with -DWITH_GNUAR, GNU binutils ar and ranlib
will install as default ones and 'BSD' ar will be disabled.

* Bump __FreeBSD_version to reflect the import of 'BSD' ar(1).

Approved by:		 jkoshy (mentor)
2008-02-21 11:21:29 +00:00
Ruslan Ermilov
741ac35cd4 Remove WARNS from here and compile with default kernel flags.
Switch off those warnings that ZFS sources do not pass.
2008-02-21 11:11:06 +00:00
Ruslan Ermilov
995dc98447 Remove WARNS from here and compile with default kernel flags. 2008-02-21 11:09:59 +00:00
Marcel Moolenaar
043ec583dc Don't check the bpbSecPerTrack and bpbHeads fields of the BPB.
They are typically 0 on new ia64 systems. Since we don't use
either field, there's no harm in not checking.
2008-02-21 03:19:46 +00:00
Scott Long
c9f892eb86 Fix a couple of locking mistakes in the ses_ioctl path.
Submitted by: Matt Jacob
2008-02-20 19:49:46 +00:00
Andrew Thompson
00620931e1 geom_lvm(4) is now known as geom_linux_lvm(4). 2008-02-20 11:32:12 +00:00
Andrew Thompson
b61033d925 Rename geom_lvm(4) to geom_linux_lvm(4).
Requested by:   des, phk
2008-02-20 11:30:49 +00:00
Andrew Thompson
764fa86761 geom_lvm(4) is now known as geom_linux_lvm(4). 2008-02-20 07:52:43 +00:00
Andrew Thompson
1669d8afc6 Rename geom_lvm(4) to geom_linux_lvm(4).
Requested by:	des, phk
2008-02-20 07:50:13 +00:00
Andrew Thompson
1332875338 Add a geom class to map Linux LVM logical volumes.
The logical disks will appear as /dev/lvm/<vol group>-<logical vol>, for
instance /dev/lvm/vg0-home. G_LINUX_LVM currently supports linear stripes with
segments on multiple physical disks. The metadata is read only, logical
volumes can not be allocated or resized.

Reviewed by:	Ivan Voras

Previously known as geom_lvm(4), rename requested by des, phk.
2008-02-20 07:45:36 +00:00
Remko Lodder
f17edc7494 Set the baudrate for if_ti.
PR:		kern/40516
Submitted by:	"Jin Guojun[VFF]" <jin at adsl-63-198-35-122 dot dsl dot snfc21 dot pacbell dot net>
Approved by:	imp (mentor, implicit for minor changes)
MFC After:	1 week
2008-02-19 20:54:42 +00:00
Ruslan Ermilov
58eefce0e6 Eliminate whitespace diffs to the i386 version. 2008-02-19 06:30:49 +00:00
Yaroslav Tykhiy
c6446de05d Undo the damage I did in sys/kern/vfs_mount.c #1.274 and
sbin/mount_nfs/mount_nfs.c #1.76.  Let the dragons sleep.

Requested by:	rodrigc, des
PR:		kern/120319 (welcome the bug back)
2008-02-18 20:58:57 +00:00