Commit Graph

156484 Commits

Author SHA1 Message Date
Weongyo Jeong
6dcc706bc5 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
2010-07-10 21:39:03 +00:00
Alan Cox
8155e5d561 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
2010-07-10 18:22:44 +00:00
Nathan Whitehorn
daf94b1b7a 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.
2010-07-10 17:46:53 +00:00
Nathan Whitehorn
27bd4146a1 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
2010-07-10 17:43:24 +00:00
Alexander Motin
aecfe194a9 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.
2010-07-10 15:36:27 +00:00
Alexander Motin
663c22a27d 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.
2010-07-10 15:27:27 +00:00
Nathan Whitehorn
f76e14a6ad 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.
2010-07-10 15:16:35 +00:00
Nathan Whitehorn
b5d529643a 64-bit PowerPC KVM support. 2010-07-10 15:15:00 +00:00
Nathan Whitehorn
65801ce52d Powerpc64 thread libraries support. 2010-07-10 15:13:49 +00:00
Nathan Whitehorn
840b91cc52 Provide 64-bit PowerPC support in libc.
Obtained from:	projects/ppc64
2010-07-10 14:45:03 +00:00
Nathan Whitehorn
3c766d1c8f powerpc64 floating-point is identical to powerpc, so use the same
code on both architectures.
2010-07-10 14:40:57 +00:00
Nathan Whitehorn
8869de5e55 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
2010-07-10 14:39:08 +00:00
Nathan Whitehorn
03d07f4e24 32-bit sysctl emulation is also interesting on powerpc64. 2010-07-10 14:34:37 +00:00
Nathan Whitehorn
dbe25130a0 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.
2010-07-10 14:33:57 +00:00
Konstantin Belousov
cefac16712 Document pl_siginfo and PT_FLAG_SI for PT_LWPINFO.
MFC after:	1 month
2010-07-10 14:31:44 +00:00
Alexander Motin
9a9bce34f1 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
2010-07-10 13:46:14 +00:00
Giorgos Keramidas
36dc373119 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
2010-07-10 11:40:31 +00:00
Nathan Whitehorn
282e37622c C startup support for 64-bit PowerPC.
Obtained from:	projects/ppc64
2010-07-10 03:45:55 +00:00
Nathan Whitehorn
13109bdf8d Minor modifications to know what to do with powerpc64. 2010-07-10 02:32:50 +00:00
Nathan Whitehorn
2cf64c8006 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
2010-07-10 02:29:22 +00:00
Konstantin Belousov
b543e91ba5 Fix spacing.
Noted by:	pgollucci
MFC after:	3 weeks
2010-07-09 21:27:42 +00:00
Pyun YongHyeon
2610dbf59b 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>
2010-07-09 21:21:08 +00:00
Konstantin Belousov
2680dac9e1 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
2010-07-09 20:05:56 +00:00
Alan Cox
b99348e5ea 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
2010-07-09 19:38:30 +00:00
Xin LI
c8ed14e2d8 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
2010-07-09 17:38:15 +00:00
Jack F Vogel
d6ff3d4d13 Fix of a VLAN problem by jhb, the checksum capability
got lost along the way.

MFC: asap
2010-07-09 17:11:29 +00:00
Nathan Whitehorn
932773c882 The number after 2 is 3, not 4.
MFC after:	3 days
2010-07-09 14:04:16 +00:00
Nathan Whitehorn
ce0df83f13 Remove an unnecessary include of opt_psim.h, which is not present on
powerpc64.
2010-07-09 14:02:57 +00:00
Nathan Whitehorn
945c08644e MFppc64:
Minor 64-bit-cleanliness upgrades and support for platform detection on
subtly-broken OF implementations like in the Mambo simulator.
2010-07-09 14:02:24 +00:00
Nathan Whitehorn
53c30f7e96 MFppc64:
Use longs instead of ints as the native word type in bcopy(). This will
expand nicely on 64-bit systems.
2010-07-09 14:01:18 +00:00
Nathan Whitehorn
0e8792a1cb MFppc64:
Check if devices are direct-mapped individually instead of just checking
the value of hw_direct_map.
2010-07-09 14:00:22 +00:00
John Baldwin
e113db82af Accidentally committed an older version of this comment rather than the
final one.
2010-07-09 13:59:53 +00:00
John Baldwin
07b183388a Refine a comment.
Reviewed by:	bde
2010-07-09 13:53:25 +00:00
Gleb Smirnoff
281b584e8e Improve last commit: use bpf_mtap2() to avoiding stack usage.
Prodded by:	julian
2010-07-09 11:27:33 +00:00
Jaakko Heinonen
831aa555de Remove redundant high >= 0.
Reported by:	rstone
2010-07-09 10:57:55 +00:00
Jung-uk Kim
2857dd23a4 Fix build by defining MAX() macro here. 2010-07-09 05:25:14 +00:00
Navdeep Parhar
bd1a9fbad6 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
2010-07-09 00:38:00 +00:00
Navdeep Parhar
2c32b50248 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
2010-07-09 00:36:35 +00:00
Navdeep Parhar
29c54b85f9 Fix bufsize calculation so that cxgbtool can display information for the
last I/O queue too.

MFC after:	3 days
2010-07-09 00:35:09 +00:00
Jung-uk Kim
5cd8ebeb32 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'.
2010-07-08 22:21:18 +00:00
Jung-uk Kim
4624e08a59 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'.
2010-07-08 22:13:23 +00:00
Randi Harper
b48aee40b9 Revert r209787 pending further discussion.
Approved by:	cperciva (mentor)
2010-07-08 21:26:26 +00:00
Jamie Gritton
c2e8cb49d9 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
2010-07-08 19:22:52 +00:00
John Baldwin
fc8cca02c7 - Various style and whitespace fixes.
- Make sugid_coredump and kern_logsigexit private to kern_sig.c.

Submitted by:	bde (partially)
MFC after:	1 month
2010-07-08 19:15:26 +00:00
Pyun YongHyeon
78b1140644 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 >
2010-07-08 18:22:49 +00:00
Nathan Whitehorn
a26209a43a Missed a file in r209803: this header contains a definition of
OFW_STD_32BIT.

Pointy hat to:	me
2010-07-08 18:15:06 +00:00
Jaakko Heinonen
501812f2c5 Assert that low and high are >= 0. The allocator doesn't support the
negative range.
2010-07-08 16:53:19 +00:00
Jayachandran C.
9132d3f5b0 Fix XLR64, the previous version had the contents of file duplicated. 2010-07-08 16:11:06 +00:00
Jayachandran C.
d580a6708b 64 bit ld script for mips, and configuration file for 64 bit compilation
on XLR

Approved by:	rrs
2010-07-08 16:06:58 +00:00
Nathan Whitehorn
f6421f31e3 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.
2010-07-08 15:38:55 +00:00