]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoCorrect inverted parent DMA tag parameters.
Marius Strobl [Mon, 12 Jul 2010 23:01:21 +0000 (23:01 +0000)]
Correct inverted parent DMA tag parameters.

Reviewed by: ken
MFC after: 3 days

14 years ago- Make the maxsize parameter of the data buffer DMA tag match maxio, which
Marius Strobl [Mon, 12 Jul 2010 22:57:57 +0000 (22:57 +0000)]
- Make the maxsize parameter of the data buffer DMA tag match maxio, which
  was missed in r209599.
  Reported and tested by: Michael Moll
- Declare mpt_dma_buf_alloc() static just like mpt_dma_buf_free(), both are
  used in mpt.c only.

Reviewed by: ken
MFC after: r209599

14 years agoFix for a panic when TX checksum offload is done and
Jack F Vogel [Mon, 12 Jul 2010 21:47:30 +0000 (21:47 +0000)]
Fix for a panic when TX checksum offload is done and
a packet has only a header in the first mbuf, the
checksum code will dereference a pointer into the
non-existing IP header. Do a check for the size and
pullup if needed. Thanks to Michael Tuexen for this
fix.

MFC: asap - should be in 8.1 IMHO

14 years agoFix printf specifier to allow 32/64 bit builds.
Peter Grehan [Mon, 12 Jul 2010 21:09:55 +0000 (21:09 +0000)]
Fix printf specifier to allow 32/64 bit builds.

Obtained from: projects/ppc64

14 years agoMove i386-inherited logic of building ACPI headers for acpi_wakeup.c into
Jung-uk Kim [Mon, 12 Jul 2010 21:08:35 +0000 (21:08 +0000)]
Move i386-inherited logic of building ACPI headers for acpi_wakeup.c into
better places and remove intermediate makefile and shell scripts.  This
makes parallel kernel build little bit safer for amd64.

14 years agoRemove a dead test. We already exclude NMI traps from this code in an
John Baldwin [Mon, 12 Jul 2010 20:45:37 +0000 (20:45 +0000)]
Remove a dead test.  We already exclude NMI traps from this code in an
earlier condition.

MFC after: 1 week

14 years agoWhen switching the thread from the processor, store %dr7 content
Konstantin Belousov [Mon, 12 Jul 2010 19:59:15 +0000 (19:59 +0000)]
When switching the thread from the processor, store %dr7 content
into the pcb before disabling watchpoints. Otherwise, when the
thread is restored on a processor, watchpoints are still disabled.

Submitted by: Tijl Coosemans <tijl coosemans org>
(I would be much happier if Tijl commited this himself)
MFC after: 1 week

14 years agoFix spelling of "weirdo" in /etc/gettytab comment.
Benedict Reuschling [Mon, 12 Jul 2010 19:09:18 +0000 (19:09 +0000)]
Fix spelling of "weirdo" in /etc/gettytab comment.

PR:             docs/148500
Submitted by:   Warren Block (wblock at wonkity dot com)
Approved by:    ed@
MFC after:      1 week

14 years agoRemove extraneous ;
Ed Maste [Mon, 12 Jul 2010 17:18:58 +0000 (17:18 +0000)]
Remove extraneous ;

14 years agoUnify ABI-related bits of the Book-E and AIM machdep routines
Nathan Whitehorn [Mon, 12 Jul 2010 16:08:07 +0000 (16:08 +0000)]
Unify ABI-related bits of the Book-E and AIM machdep routines
(exec_setregs, etc.) in order to simplify the addition of 64-bit support,
and possible future extension of the Book-E code to handle hard floating
point and Altivec.

MFC after: 1 month

14 years agoUse type-specific inline function imax() instead of deprecated macro MAX().
Jung-uk Kim [Mon, 12 Jul 2010 15:32:45 +0000 (15:32 +0000)]
Use type-specific inline function imax() instead of deprecated macro MAX().

Prodded by: bde

14 years agoA previous change moved the GETATTR RPC for open() calls that hit in the
John Baldwin [Mon, 12 Jul 2010 14:27:49 +0000 (14:27 +0000)]
A previous change moved the GETATTR RPC for open() calls that hit in the
name cache up into nfs_lookup() instead of nfs_open().  Continue this
trend by flushing the attribute cache for leaf nodes in nfs_lookup() during
an open() if we do a LOOKUP RPC.  For NFSv3 this should generally be a NOP
as the attributes are flushed before fetching the post-op attributes from
the LOOKUP RPC which most (all?) NFSv3 servers provide, so the post-op
attributes should populate the cache.

Now all NFS open() calls will always clear the cached attributes during the
nfs_lookup() prior to nfs_open() in the !NMODIFIED case to provide CTOC.
As a result, we can remove the conditional flushing of the attribute
cache from nfs_open().

Reviewed by: rmacklem, bde
MFC after: 2 weeks

14 years ago- Add missing locking around flushing of an NFS node's attribute cache
John Baldwin [Mon, 12 Jul 2010 14:19:23 +0000 (14:19 +0000)]
- Add missing locking around flushing of an NFS node's attribute cache
  in the NMODIFIED case of nfs_open().
- Cosmetic tweak to simplify an expression in nfs_lookup().

Reviewed by: rmacklem, bde
MFC after: 1 week

14 years agoMFppc64:
Nathan Whitehorn [Mon, 12 Jul 2010 13:38:26 +0000 (13:38 +0000)]
MFppc64:

Provide ELF definitions for 64-bit PowerPC. This unbreaks the powerpc
loader build.

14 years agoRevert and remake r209883:
Alexander Motin [Mon, 12 Jul 2010 12:16:11 +0000 (12:16 +0000)]
Revert and remake r209883:
Do not grab lock while setting up interrupt, as it causes LOR with
allocation code. Instead make interrupt handler check that CAM bus
initialization completed before touching it.

While there, slightly improve attach errors handling.

Reported by: kib

14 years agoMerge jmallett@'s n64 work into HEAD
Jayachandran C. [Mon, 12 Jul 2010 10:22:58 +0000 (10:22 +0000)]
Merge jmallett@'s n64 work into HEAD

Initial set of ddb changes to support n64

Reviewed by: imp
Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon)

14 years agoOne more use for _SIG_VALID.
Konstantin Belousov [Mon, 12 Jul 2010 10:18:10 +0000 (10:18 +0000)]
One more use for _SIG_VALID.

Submitted by: Garrett Cooper <yanegomi gmail com>
MFC after: 1 week

14 years agoUse _SIG_VALID instead of expanded form of the macro.
Konstantin Belousov [Mon, 12 Jul 2010 10:15:33 +0000 (10:15 +0000)]
Use _SIG_VALID instead of expanded form of the macro.

Submitted by: Garrett Cooper <yanegomi gmail com>
MFC after: 1 week

14 years agoFor xsi_sigpause(3), remove the supplied signal from the process mask
Konstantin Belousov [Mon, 12 Jul 2010 10:14:24 +0000 (10:14 +0000)]
For xsi_sigpause(3), remove the supplied signal from the process mask
during sigpause(2) call. It was backward.
Check that the signal number is valid.

Reported by: Garrett Cooper <yanegomi gmail com>
MFC after: 1 week

14 years agoMerge jmallett@'s n64 work into HEAD.
Jayachandran C. [Mon, 12 Jul 2010 09:38:44 +0000 (09:38 +0000)]
Merge jmallett@'s n64 work into HEAD.

Merge changes for initial n64 support in pmap.c. Use direct mapped (XKPHYS)
access for a lot of operations that earlier needed temporary mapping. Add
support for using XKSEG for kernel mappings.

Reviewed by: imp
Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon)

14 years agoMerge jmallett@'s n64 work into HEAD
Jayachandran C. [Mon, 12 Jul 2010 07:42:42 +0000 (07:42 +0000)]
Merge jmallett@'s n64 work into HEAD

64 bit TLB definitions in pte.h

Reviewed by: imp
Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon)

14 years agoMove KSEG address definitions from cpu.h to cpuregs.h with the other
Jayachandran C. [Mon, 12 Jul 2010 07:24:40 +0000 (07:24 +0000)]
Move KSEG address definitions from cpu.h to cpuregs.h with the other
definitions, add some  XKPHYS related definitions for n64.

Reviewed by: imp

14 years agoInstead of deleting existing IRQ resource, which is not really working for
Alexander Motin [Mon, 12 Jul 2010 06:46:17 +0000 (06:46 +0000)]
Instead of deleting existing IRQ resource, which is not really working for
ACPI bus, find wanted IRQ rid or spare one. This should fix panic during
boot on systems reporting fancy IRQ numbers for attimer and atrtc.

14 years agoo Fix typo: sepcify -> specify.
Maxim Konovalov [Mon, 12 Jul 2010 04:21:50 +0000 (04:21 +0000)]
o Fix typo: sepcify -> specify.

PR: docs/148499
Submitted by: Warren Block
MFC after: 1 week

14 years agoAdd -l to the synopsis
Brian Somers [Mon, 12 Jul 2010 01:58:46 +0000 (01:58 +0000)]
Add -l to the synopsis

Submitted by: jhell at dataix dot net
MFC after: 3 days

14 years agoBuild libsmb should be on powerpc64 as well.
Nathan Whitehorn [Mon, 12 Jul 2010 00:56:35 +0000 (00:56 +0000)]
Build libsmb should be on powerpc64 as well.

14 years agoTeach truss and xlint how to operate on 64-bit PowerPC systems.
Nathan Whitehorn [Mon, 12 Jul 2010 00:54:41 +0000 (00:54 +0000)]
Teach truss and xlint how to operate on 64-bit PowerPC systems.

14 years agoProvide support in loader for booting 64-bit PowerPC kernels. Like amd64,
Nathan Whitehorn [Mon, 12 Jul 2010 00:49:22 +0000 (00:49 +0000)]
Provide support in loader for booting 64-bit PowerPC kernels. Like amd64,
64-bit PowerPC kernels are loaded by a 32-bit loader, since nearly all
powerpc64 firmwares execute in 32-bit mode.

14 years agoUse more compact deviceid table.
Andrew Thompson [Sun, 11 Jul 2010 23:54:44 +0000 (23:54 +0000)]
Use more compact deviceid table.

Submitted by: Akinori Furukoshi

14 years agoUpdate for style(9).
Andrew Thompson [Sun, 11 Jul 2010 23:52:12 +0000 (23:52 +0000)]
Update for style(9).

Submitted by: Akinori Furukoshi (author)

14 years agoSort platform options.
Rafal Jaworowski [Sun, 11 Jul 2010 21:12:42 +0000 (21:12 +0000)]
Sort platform options.

14 years agoGet rid of bootinfo for good in loader (U-Boot-based) and ARM.
Rafal Jaworowski [Sun, 11 Jul 2010 21:11:23 +0000 (21:11 +0000)]
Get rid of bootinfo for good in loader (U-Boot-based) and ARM.

For FDT-enabled platforms the device tree is a modern replacement for bootinfo
config data.

14 years agoConvert Freescale PowerPC platforms to FDT convention.
Rafal Jaworowski [Sun, 11 Jul 2010 21:08:29 +0000 (21:08 +0000)]
Convert Freescale PowerPC platforms to FDT convention.

The following systems are affected:

  - MPC8555CDS
  - MPC8572DS

This overhaul covers the following major changes:

  - All integrated peripherals drivers for Freescale MPC85XX SoC, which are
    currently in the FreeBSD source tree are reworked and adjusted so they
    derive config data out of the device tree blob (instead of hard coded /
    tabelarized values).

  - This includes: LBC, PCI / PCI-Express, I2C, DS1553, OpenPIC, TSEC, SEC,
    QUICC, UART, CFI.

  - Thanks to the common FDT infrastrucutre (fdtbus, simplebus) we retire
    ocpbus(4) driver, which was based on hard-coded config data.

Note that world for these platforms has to be built WITH_FDT.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoProvide more defines for PCI-Express device ctrl.
Rafal Jaworowski [Sun, 11 Jul 2010 20:55:39 +0000 (20:55 +0000)]
Provide more defines for PCI-Express device ctrl.

14 years agoIntroduce PowerPC-specific helper routines for FDT.
Rafal Jaworowski [Sun, 11 Jul 2010 20:49:36 +0000 (20:49 +0000)]
Introduce PowerPC-specific helper routines for FDT.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

14 years agoSave fdtbus trigger / polarity data at their correct index.
Rafal Jaworowski [Sun, 11 Jul 2010 20:33:39 +0000 (20:33 +0000)]
Save fdtbus trigger / polarity data at their correct index.

14 years agoLet simplebus(4) diagnostics be a bit more descriptive.
Rafal Jaworowski [Sun, 11 Jul 2010 20:30:59 +0000 (20:30 +0000)]
Let simplebus(4) diagnostics be a bit more descriptive.

14 years agoProvide a missing interrupt-parent for the CPM / QUICC node in the DTS.
Rafal Jaworowski [Sun, 11 Jul 2010 20:29:34 +0000 (20:29 +0000)]
Provide a missing interrupt-parent for the CPM / QUICC node in the DTS.

14 years agoChange the implementation of vm_hold_free_pages() so that it performs at
Alan Cox [Sun, 11 Jul 2010 20:11:44 +0000 (20:11 +0000)]
Change the implementation of vm_hold_free_pages() so that it performs at
most one call to pmap_qremove(), and thus one TLB shootdown, instead of one
call and TLB shootdown per page.

Simplify the interface to vm_hold_free_pages().

MFC after: 3 weeks

14 years agoMake kernel panic with reasonable message if no usable event timer found.
Alexander Motin [Sun, 11 Jul 2010 17:08:37 +0000 (17:08 +0000)]
Make kernel panic with reasonable message if no usable event timer found.

14 years agoRemove interval validation from cpu_tick_calibrate(). As I found, check
Alexander Motin [Sun, 11 Jul 2010 16:47:45 +0000 (16:47 +0000)]
Remove interval validation from cpu_tick_calibrate(). As I found, check
was needed at preliminary version of the patch, where number of CPU ticks
was divided strictly on 16 seconds. Final code instead uses real interval
duration, so precise interval should not be important. Same time aliasing
issues around second boundary causes false positives, periodically logging
useless "t_delta ... too long/short" messages when HZ set below 256.

14 years agoFix SVN mismerge. We somehow ended up with the 32-bit powerpc version
Nathan Whitehorn [Sun, 11 Jul 2010 05:13:38 +0000 (05:13 +0000)]
Fix SVN mismerge. We somehow ended up with the 32-bit powerpc version
in arch/powerpc64 instead of the 64-bit one.

14 years agoFixes a page fault in bwi_pci_probe() because the array isn't terminated
Weongyo Jeong [Sat, 10 Jul 2010 22:37:23 +0000 (22:37 +0000)]
Fixes a page fault in bwi_pci_probe() because the array isn't terminated
with NULL.

PR: kern/148473
Submitted by: Grzegorz Dabrowski <grzegorz.dabrowski at gmail dot com>
MFC after: 1 week

14 years agoOpenSSL configuration for powerpc64
Nathan Whitehorn [Sat, 10 Jul 2010 22:07:48 +0000 (22:07 +0000)]
OpenSSL configuration for powerpc64

Obtained from: projects/ppc64

14 years agoTeach crunchide(1) about PPC ELF64.
Nathan Whitehorn [Sat, 10 Jul 2010 22:06:51 +0000 (22:06 +0000)]
Teach crunchide(1) about PPC ELF64.

14 years agoFixes a bug for LP PHY that some frames have 2 padding bytes at the
Weongyo Jeong [Sat, 10 Jul 2010 21:39:03 +0000 (21:39 +0000)]
Fixes a bug for LP PHY that some frames have 2 padding bytes at the
start so we should adjust the mbuf if the driver is running in PIO mode.
Now it should work well with WPA authentication and association for LP
PHY devices.

Tested by: Warren Block <wblock at wonkity.com>
MFC after: 1 month

14 years agoReduce the number of global TLB shootdowns generated by pmap_qenter().
Alan Cox [Sat, 10 Jul 2010 18:22:44 +0000 (18:22 +0000)]
Reduce the number of global TLB shootdowns generated by pmap_qenter().
Specifically, teach pmap_qenter() to recognize the case when it is being
asked to replace a mapping with the very same mapping and not generate
a shootdown.  Unfortunately, the buffer cache commonly passes an entire
buffer to pmap_qenter() when only a subset of the mappings are changing.
For the extension of buffers in allocbuf() this was resulting in
unnecessary shootdowns.  The addition of new pages to the end of the
buffer need not and did not trigger a shootdown, but overwriting the
initial mappings with the very same mappings was seen as a change that
necessitated a shootdown.  With this change, that is no longer so.

For a "buildworld" on amd64, this change eliminates 14-15% of the
pmap_invalidate_range() shootdowns, and about 4% of the overall
shootdowns.

MFC after: 3 weeks

14 years agoSince powerpc and powerpc64 share an instruction set, bind can and should
Nathan Whitehorn [Sat, 10 Jul 2010 17:46:53 +0000 (17:46 +0000)]
Since powerpc and powerpc64 share an instruction set, bind can and should
use the 32-bit atomic operations unmodified. Accomplish this by switching
some MACHINE_ARCH values to MACHINE_CPUARCH.

14 years agoRTLD support for powerpc64. A few small modifications to the Makefile
Nathan Whitehorn [Sat, 10 Jul 2010 17:43:24 +0000 (17:43 +0000)]
RTLD support for powerpc64. A few small modifications to the Makefile
and symbol map are required to support various consequences of the dot
symbol scheme:

- Symbols beginning with a dot are reserved, so start private symbols with
  an underscore.
- In order to set RTLD breakpoints, gdb must be able to locate the text
  entry point, not the data section function descriptor, so add
  .r_debug_state to the symbol map on powerpc64.

Obtained from: projects/ppc64

14 years agoIf ata_sata_phy_reset() failed and ata_generic_reset() is not called, mark
Alexander Motin [Sat, 10 Jul 2010 15:36:27 +0000 (15:36 +0000)]
If ata_sata_phy_reset() failed and ata_generic_reset() is not called, mark
channel as having no devices connected. This improves hot-unplug operation
on legacy-emulating SATA controllers.

14 years agoOn attach, grab channel lock before setting up interrupt. This fixes crash
Alexander Motin [Sat, 10 Jul 2010 15:27:27 +0000 (15:27 +0000)]
On attach, grab channel lock before setting up interrupt. This fixes crash
in ATA_CAM mode if phy connect event arrive before CAM bus initialization
completed.

14 years agoTeach libstand what to do for powerpc64: the same thing as powerpc. Like
Nathan Whitehorn [Sat, 10 Jul 2010 15:16:35 +0000 (15:16 +0000)]
Teach libstand what to do for powerpc64: the same thing as powerpc. Like
amd64, libstand apps for powerpc64 systems are 32-bit, due to 32-bit Open
Firmware implementations.

14 years ago64-bit PowerPC KVM support.
Nathan Whitehorn [Sat, 10 Jul 2010 15:15:00 +0000 (15:15 +0000)]
64-bit PowerPC KVM support.

14 years agoPowerpc64 thread libraries support.
Nathan Whitehorn [Sat, 10 Jul 2010 15:13:49 +0000 (15:13 +0000)]
Powerpc64 thread libraries support.

14 years agoProvide 64-bit PowerPC support in libc.
Nathan Whitehorn [Sat, 10 Jul 2010 14:45:03 +0000 (14:45 +0000)]
Provide 64-bit PowerPC support in libc.

Obtained from: projects/ppc64

14 years agopowerpc64 floating-point is identical to powerpc, so use the same
Nathan Whitehorn [Sat, 10 Jul 2010 14:40:57 +0000 (14:40 +0000)]
powerpc64 floating-point is identical to powerpc, so use the same
code on both architectures.

14 years agoThe 64-bit PowerPC ABI implemented in binutils 2.15 requires some special
Nathan Whitehorn [Sat, 10 Jul 2010 14:39:08 +0000 (14:39 +0000)]
The 64-bit PowerPC ABI implemented in binutils 2.15 requires some special
quirks for weak-symbol handling. Text symbols require also marking weak
the special dot-symbol associated with the function, and data symbols
require that you not do that. To fix this, provide a hacked
__weak_reference for powerpc64, and define a new __weak_reference_data
for the single weak data symbol in base.

Revert after: binutils 2.17 import
Obtained from: projects/ppc64

14 years ago32-bit sysctl emulation is also interesting on powerpc64.
Nathan Whitehorn [Sat, 10 Jul 2010 14:34:37 +0000 (14:34 +0000)]
32-bit sysctl emulation is also interesting on powerpc64.

14 years agoAdd definitions for powerpc64 ELF relocation types. Some 64-bit relocations
Nathan Whitehorn [Sat, 10 Jul 2010 14:33:57 +0000 (14:33 +0000)]
Add definitions for powerpc64 ELF relocation types. Some 64-bit relocations
are identical to 32-bit relocations in meaning, name, and number, and I
have chosen not to duplicate those here.

14 years agoDocument pl_siginfo and PT_FLAG_SI for PT_LWPINFO.
Konstantin Belousov [Sat, 10 Jul 2010 14:31:44 +0000 (14:31 +0000)]
Document pl_siginfo and PT_FLAG_SI for PT_LWPINFO.

MFC after: 1 month

14 years agoMake hw.ata.ata_dma_check_80pin tunable affect not only device side, but
Alexander Motin [Sat, 10 Jul 2010 13:46:14 +0000 (13:46 +0000)]
Make hw.ata.ata_dma_check_80pin tunable affect not only device side, but
also controller side cable checks. Make respective sysctl writable.

PR: kern/143462

14 years agoFix reading of empty fifolog files. When we don't have anything
Giorgos Keramidas [Sat, 10 Jul 2010 11:40:31 +0000 (11:40 +0000)]
Fix reading of empty fifolog files.  When we don't have anything
to inflate, skip the rest of the fifolog reader code to avoid
hitting the assert about Z_OK a bit further down.

Approved by: phk
MFC after: 1 week

14 years agoC startup support for 64-bit PowerPC.
Nathan Whitehorn [Sat, 10 Jul 2010 03:45:55 +0000 (03:45 +0000)]
C startup support for 64-bit PowerPC.

Obtained from: projects/ppc64

14 years agoMinor modifications to know what to do with powerpc64.
Nathan Whitehorn [Sat, 10 Jul 2010 02:32:50 +0000 (02:32 +0000)]
Minor modifications to know what to do with powerpc64.

14 years agoTeach our toolchain how to generate 64-bit PowerPC binaries. This fixes
Nathan Whitehorn [Sat, 10 Jul 2010 02:29:22 +0000 (02:29 +0000)]
Teach our toolchain how to generate 64-bit PowerPC binaries. This fixes
a variety of bugs in binutils related to handling of 64-bit PPC ELF,
provides a GCC configuration for 64-bit PowerPC on FreeBSD, and
associated build systems tweaks.

Obtained from: projects/ppc64

14 years agoFix spacing.
Konstantin Belousov [Fri, 9 Jul 2010 21:27:42 +0000 (21:27 +0000)]
Fix spacing.

Noted by: pgollucci
MFC after: 3 weeks

14 years agoSome revision of Yukon controller generates corrupted frame when TX
Pyun YongHyeon [Fri, 9 Jul 2010 21:21:08 +0000 (21:21 +0000)]
Some revision of Yukon controller generates corrupted frame when TX
checksum offloading is enabled.  The frame has a valid checksum
value so payload might be modified during TX checksum calculation.
Disable TX checksum offloading but give users chance to enable it
when they know their controller works without problems with TX
checksum offloading.

Reported by: Andrzej Tobola <ato <> iem dot pw dot edu dot pl>

14 years agoFor both i386 and amd64 pmap,
Konstantin Belousov [Fri, 9 Jul 2010 20:05:56 +0000 (20:05 +0000)]
For both i386 and amd64 pmap,
- change the type of pm_active to cpumask_t, which it is;
- in pmap_remove_pages(), compare with PCPU(curpmap), instead of
  dereferencing the long chain of pointers [1].
For amd64 pmap, remove the unneeded checks for validity of curpmap
in pmap_activate(), since curpmap should be always valid after
r209789.

Submitted by: alc [1]
Reviewed by: alc
MFC after: 3 weeks

14 years agoAdd support for the VM_ALLOC_COUNT() hint to vm_page_alloc(). Consequently,
Alan Cox [Fri, 9 Jul 2010 19:38:30 +0000 (19:38 +0000)]
Add support for the VM_ALLOC_COUNT() hint to vm_page_alloc().  Consequently,
the maintenance of vm_pageout_deficit can be localized to just two places:
vm_page_alloc() and vm_pageout_scan().

This change also corrects an off-by-one error in the maintenance of
vm_pageout_deficit.  Historically, the buffer cache functions, allocbuf()
and vm_hold_load_pages(), have not taken into account that vm_page_alloc()
already increments vm_pageout_deficit by one.

Reviewed by: kib

14 years agoDon't use pack() for structures that is used purely for software state.
Xin LI [Fri, 9 Jul 2010 17:38:15 +0000 (17:38 +0000)]
Don't use pack() for structures that is used purely for software state.
Otherwise the resulting, unaligned mutex structure would trigger panic.

Submitted by: Tom Cough <tom.couch lsi.com>
Reported/Tested by: jhb
MFC after: 3 days

14 years agoFix of a VLAN problem by jhb, the checksum capability
Jack F Vogel [Fri, 9 Jul 2010 17:11:29 +0000 (17:11 +0000)]
Fix of a VLAN problem by jhb, the checksum capability
got lost along the way.

MFC: asap

14 years agoThe number after 2 is 3, not 4.
Nathan Whitehorn [Fri, 9 Jul 2010 14:04:16 +0000 (14:04 +0000)]
The number after 2 is 3, not 4.

MFC after: 3 days

14 years agoRemove an unnecessary include of opt_psim.h, which is not present on
Nathan Whitehorn [Fri, 9 Jul 2010 14:02:57 +0000 (14:02 +0000)]
Remove an unnecessary include of opt_psim.h, which is not present on
powerpc64.

14 years agoMFppc64:
Nathan Whitehorn [Fri, 9 Jul 2010 14:02:24 +0000 (14:02 +0000)]
MFppc64:

Minor 64-bit-cleanliness upgrades and support for platform detection on
subtly-broken OF implementations like in the Mambo simulator.

14 years agoMFppc64:
Nathan Whitehorn [Fri, 9 Jul 2010 14:01:18 +0000 (14:01 +0000)]
MFppc64:

Use longs instead of ints as the native word type in bcopy(). This will
expand nicely on 64-bit systems.

14 years agoMFppc64:
Nathan Whitehorn [Fri, 9 Jul 2010 14:00:22 +0000 (14:00 +0000)]
MFppc64:

Check if devices are direct-mapped individually instead of just checking
the value of hw_direct_map.

14 years agoAccidentally committed an older version of this comment rather than the
John Baldwin [Fri, 9 Jul 2010 13:59:53 +0000 (13:59 +0000)]
Accidentally committed an older version of this comment rather than the
final one.

14 years agoRefine a comment.
John Baldwin [Fri, 9 Jul 2010 13:53:25 +0000 (13:53 +0000)]
Refine a comment.

Reviewed by: bde

14 years agoImprove last commit: use bpf_mtap2() to avoiding stack usage.
Gleb Smirnoff [Fri, 9 Jul 2010 11:27:33 +0000 (11:27 +0000)]
Improve last commit: use bpf_mtap2() to avoiding stack usage.

Prodded by: julian

14 years agoRemove redundant high >= 0.
Jaakko Heinonen [Fri, 9 Jul 2010 10:57:55 +0000 (10:57 +0000)]
Remove redundant high >= 0.

Reported by: rstone

14 years agoFix build by defining MAX() macro here.
Jung-uk Kim [Fri, 9 Jul 2010 05:25:14 +0000 (05:25 +0000)]
Fix build by defining MAX() macro here.

14 years agoImprove cxgb(4)'s behaviour when faced with temporarily "bouncy" links:
Navdeep Parhar [Fri, 9 Jul 2010 00:38:00 +0000 (00:38 +0000)]
Improve cxgb(4)'s behaviour when faced with temporarily "bouncy" links:
- Run the adapter's tick at 1Hz and remove link state checks from it.
  Instead, have each port check its link state.  Delay the check so that
  it takes place slightly after the driver is notified of a change in
  link state.  This is a cheap way to debounce these notifications if
  many are received in rapid succession.  POLL_LINK_1ST_TIME flag can
  also be eliminated as a side effect of these changes.
- Do not reset the PHY when link goes down.
- Clear port's link_fault flag if the PHY indicates link is down.
- get_link_status_r should leave speed and duplex alone when link is down.

MFC after: 1 month

14 years agoEliminate ext_intr_task. The "slow" interrupt handler is already
Navdeep Parhar [Fri, 9 Jul 2010 00:36:35 +0000 (00:36 +0000)]
Eliminate ext_intr_task.  The "slow" interrupt handler is already
running on the adapter's task queue.  Just do what the task does
instead of enqueueing it.

MFC after: 3 days

14 years agoFix bufsize calculation so that cxgbtool can display information for the
Navdeep Parhar [Fri, 9 Jul 2010 00:35:09 +0000 (00:35 +0000)]
Fix bufsize calculation so that cxgbtool can display information for the
last I/O queue too.

MFC after: 3 days

14 years agoSync. printf() of libstand(3) with sys/kern/subr_prf.c.
Jung-uk Kim [Thu, 8 Jul 2010 22:21:18 +0000 (22:21 +0000)]
Sync. printf() of libstand(3) with sys/kern/subr_prf.c.

CVS r1.94 jhb:
Cast the integer read as the first argument for %b to an unsigned integer
so it's value is not sign extended when assigned to the uintmax_t variable
used internally by printf.  For example, if bit 31 is set in the cpuid
feature word, then %b would print out the initial value as a 16 character
hexadecimal value.  Now it only prints out an 8 character value.

CVS r1.109 njl:
Add support for 'h' and 'hh' modifiers for printf(9).

CVS r1.117 phk:
If we ignore an unknown % sequence, we must stop interpreting the remaining
% arguments because the varargs are now out of sync and there is a risk that
we might for instance dereference an integer in a %s argument.

SVN r209836 jkim:
Implement optional 'precision' for numbers.  Previously, it was parsed but
ignored.  Some third-party modules (e.g., APCICA) prefer this format over
zero padding flag '0'.

14 years agoImplement optional 'precision' for numbers. Previously, it was parsed but
Jung-uk Kim [Thu, 8 Jul 2010 22:13:23 +0000 (22:13 +0000)]
Implement optional 'precision' for numbers.  Previously, it was parsed but
ignored.  Some third-party modules (e.g., APCICA) prefer this format over
zero padding flag '0'.

14 years agoRevert r209787 pending further discussion.
Randi Harper [Thu, 8 Jul 2010 21:26:26 +0000 (21:26 +0000)]
Revert r209787 pending further discussion.

Approved by: cperciva (mentor)

14 years agoProperly recognize a number followed by non-digits as a jail name.
Jamie Gritton [Thu, 8 Jul 2010 19:22:52 +0000 (19:22 +0000)]
Properly recognize a number followed by non-digits as a jail name.
Call "0" a name because zero is used to indicate no specified jid.

MFC after: 3 days

14 years ago- Various style and whitespace fixes.
John Baldwin [Thu, 8 Jul 2010 19:15:26 +0000 (19:15 +0000)]
- Various style and whitespace fixes.
- Make sugid_coredump and kern_logsigexit private to kern_sig.c.

Submitted by: bde (partially)
MFC after: 1 month

14 years agoRemove enabling RX checksum offloading in RX filter setup. RX
Pyun YongHyeon [Thu, 8 Jul 2010 18:22:49 +0000 (18:22 +0000)]
Remove enabling RX checksum offloading in RX filter setup. RX
checksum is enabled in sge_init_locked().
While I'm here do not set RX checksum bits in RX descriptor
initialization. It is controller's job to set these bits.

Tested by: xclin <xclin <> cs dot nctu dot edu dot tw >

14 years agoMissed a file in r209803: this header contains a definition of
Nathan Whitehorn [Thu, 8 Jul 2010 18:15:06 +0000 (18:15 +0000)]
Missed a file in r209803: this header contains a definition of
OFW_STD_32BIT.

Pointy hat to: me

14 years agoAssert that low and high are >= 0. The allocator doesn't support the
Jaakko Heinonen [Thu, 8 Jul 2010 16:53:19 +0000 (16:53 +0000)]
Assert that low and high are >= 0. The allocator doesn't support the
negative range.

14 years agoFix XLR64, the previous version had the contents of file duplicated.
Jayachandran C. [Thu, 8 Jul 2010 16:11:06 +0000 (16:11 +0000)]
Fix XLR64, the previous version had the contents of file duplicated.

14 years ago64 bit ld script for mips, and configuration file for 64 bit compilation
Jayachandran C. [Thu, 8 Jul 2010 16:06:58 +0000 (16:06 +0000)]
64 bit ld script for mips, and configuration file for 64 bit compilation
on XLR

Approved by: rrs

14 years agoReplace the existing PowerPC busdma implementation with the one from
Nathan Whitehorn [Thu, 8 Jul 2010 15:38:55 +0000 (15:38 +0000)]
Replace the existing PowerPC busdma implementation with the one from
amd64 (with slight modifications). This provides support for bounce
buffers, which are required on systems with RAM above 4 GB.

14 years agoUse 64 bit type for rqb_word_t in n64 kernel.
Jayachandran C. [Thu, 8 Jul 2010 15:37:16 +0000 (15:37 +0000)]
Use 64 bit type for rqb_word_t in n64 kernel.

Reviewed by: imp
Approved by: rrs

14 years agoEnable KX bit, which is needed for 64 bit access, in status register
Jayachandran C. [Thu, 8 Jul 2010 15:22:46 +0000 (15:22 +0000)]
Enable KX bit, which is needed for 64 bit access, in status register
for XLR. Update exception handlers and other functions which set/change
status registers to preserve this.

Approved by: rrs

14 years agoAdd TX-path aligned/unaligned stats for if_arge.
Adrian Chadd [Thu, 8 Jul 2010 15:20:57 +0000 (15:20 +0000)]
Add TX-path aligned/unaligned stats for if_arge.

14 years ago64 bit compilation support XLR platform code.
Jayachandran C. [Thu, 8 Jul 2010 15:05:23 +0000 (15:05 +0000)]
64 bit compilation support XLR platform code.
Mostly changes to make casting between int and pointer and printing
64bit values safe for 32 and 64 bit compile.

Approved by: rrs

14 years agoAddress PR kern/148307 - fix if_ath TX mbuf alignment/size constraint checks
Adrian Chadd [Thu, 8 Jul 2010 14:59:32 +0000 (14:59 +0000)]
Address PR kern/148307 - fix if_ath TX mbuf alignment/size constraint checks

The existing code only checked the alignment of the first mbuf and
didn't enforce the size constraints.

This commit introduces a simple function to check the alignment and
size of all mbufs in the list. This fixes the initial issue in the
PR.

PR: kern/148307
Reviewed by: gonzo@