Commit Graph

77250 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
ad3cb80827 Extend locks scope to match OpenSolaris. 2010-04-18 12:25:40 +00:00
Pawel Jakub Dawidek
57a81a8bbc Remove racy assertion.
Obtained from:	OpenSolaris
2010-04-18 12:21:52 +00:00
Pawel Jakub Dawidek
5195ca2307 Set ARC_L2_WRITING on L2ARC header creation.
Obtained from:	OpenSolaris
2010-04-18 12:20:33 +00:00
Alan Cox
b11b56b55b In vm_object_madvise() setting PG_REFERENCED on a page before sleeping on
that page only makes sense if the advice is MADV_WILLNEED.  In that case,
the intention is to activate the page, so discouraging the page daemon
from reclaiming the page makes sense.  In contrast, in the other cases,
MADV_DONTNEED and MADV_FREE, it makes no sense whatsoever to discourage
the page daemon from reclaiming the page by setting PG_REFERENCED.

Wrap a nearby line.

Discussed with:	kib
MFC after:	3 weeks
2010-04-17 21:14:37 +00:00
Alan Cox
aefea7f519 In vm_object_backing_scan(), setting PG_REFERENCED on a page before
sleeping on that page is nonsensical.  Doing so reduces the likelihood
that the page daemon will reclaim the page before the thread waiting in
vm_object_backing_scan() is reawakened.  However, it does not guarantee
that the page is not reclaimed, so vm_object_backing_scan() restarts
after reawakening.  More importantly, this muddles the meaning of
PG_REFERENCED.  There is no reason to believe that the caller of
vm_object_backing_scan() is going to use (i.e., access) the contents of
the page.  There is especially no reason to believe that an access is
more likely because vm_object_backing_scan() had to sleep on the page.

Discussed with:	kib
MFC after:	3 weeks
2010-04-17 18:35:07 +00:00
Bernhard Schmidt
82ff07c047 Remove IPW_LOCK_DECL and fix various LORs.
Approved by:	rpaulo (mentor)
2010-04-17 18:18:46 +00:00
Bernhard Schmidt
6e4c30c9cd Use iv_appie_wpa, with this commit WPA works again.
Approved by:	rpaulo (mentor)
2010-04-17 18:17:25 +00:00
Bernhard Schmidt
557c25b48f - Make ipw usable again by moving directly into ASSOC state.
- No need to manually switch to RUN state, assoc response takes care
  of that.

Approved by:	rpaulo (mentor)
2010-04-17 18:16:14 +00:00
Bernhard Schmidt
892d2e9d9b Pass correct RSSI to ieee80211_input*().
Approved by:	rpaulo (mentor)
2010-04-17 18:14:49 +00:00
Bernhard Schmidt
d02ae91a4c Fix comment about ipw_assoc and remove some whitespaces; no functional
changes.

Approved by:	rpaulo (mentor)
2010-04-17 18:13:52 +00:00
Alan Cox
0b6ace4743 Setting PG_REFERENCED on the requested page in swap_pager_getpages() is
either redundant or harmful, depending on the caller.  For example, when
called by vm_fault(), it is redundant.  However, when called by
vm_thread_swapin(), it is harmful.  Specifically, if the thread is later
swapped out, having PG_REFERENCED set on its stack pages leads the page
daemon to reactivate these stack pages and delay their reclamation.

Reviewed by:	kib
MFC after:	3 weeks
2010-04-17 17:02:17 +00:00
Michael Tuexen
37f144eb5d Fix a bug where SACKs are not sent when they should.
Move some protection code to INVARIANTS.
Cleanups.

MFC after: 3 days.
2010-04-17 12:22:44 +00:00
Rui Paulo
25eb6a7d87 Add another ICH7M chipset that works.
MFC after:	1 week
2010-04-17 11:40:39 +00:00
Juli Mallett
a27e66e8f5 o) Make pcb_onfault a pointer rather than an obscure integer value.
o) Mask off PAGE_MASK bits in pmap_update_page, etc., rather than modifying the
   badvaddr in trapframe.  Some nearby interfaces already did this.
o) Make PTEs "unsigned int" for now, not "unsigned long" -- we are only ready
   for them to be 32-bit on 64-bit platforms.
o) Rather than using pmap_segmap and calculating the offset into the page table
   by hand in trap.c, use pmap_pte().
o) Remove unused quad_syscall variable in trap.c.
o) Log things for illegal instructions like we do for bad page faults.
o) Various cast cleanups related to how to print registers.
o) When logging page faults, show the page table information not just for the
   program counter, but for the fault address.
o) Modify support.S to use ABI-neutral macros for operating on pointers.
o) Consistently use CALLFRAME_SIZ rather than STAND_FRAME_SIZE, etc.
o) Remove unused insque/remque functions.
o) Remove some coprocessor 0 accessor functions implemented in assembly that
   are unused and have inline assembly counterparts.
2010-04-17 09:42:07 +00:00
Juli Mallett
2ab78e3ca5 o) Add NPDEPG, like NPTEPG but for PDEs.
o) Remove NBPG, PGOFSET and PGSHIFT.  Use the standard names.
o) Remove some unused macros and move things from param.h to vmparam.h that
   belong in the latter.  (Actually, all of the kernel segment values, virtual
   addresses, etc., belong in one place, but this is a step in the right
   direction.)
2010-04-17 07:20:01 +00:00
Juli Mallett
b6777295a6 o) Add SMP support for Octeon using U-Boot to launch all the processors at the
same time.
o) Remove some unused trivial uart functions from octeon_machdep now that the
   uart part is fully working and they are unused.
o) Use __func__ instead of __FUNCTION__.
o) Use intr_*() instead of other routines that do the same thing.
o) Remove some duplicate printfs from the Octeon port, as well as duplicate
   setting of Maxmem.
o) Use the right frequency divider on Octeon.
o) Use PCPU_GET(cpuid) consistently to get the cpuid of the running core.
o) Remove some unused macros in the Octeon port.
o) Use mips_sync() around use of the global dpcpu, whose value may not be
   visible to APs at first.
o) When loading the first thread's stack, use macros to make the code correct
   for n64 as well.
o) Remove stub, do-nothing FAU init/enable/disable functions from the RGMX
   driver.
2010-04-17 03:08:13 +00:00
Juli Mallett
a97a1ee3d9 o) Back out my previous change to SWARM; some of it was to address an issue
that turned out to be unrelated, and the rest was, as pointed out by Neel,
   just wrong-headed.
o) Tweak mem.c to fix use of /dev/kmem for direct-mapped addresses.
2010-04-17 01:49:50 +00:00
Juli Mallett
b92f01b79c o) Use inline functions to access coprocessor 0 registers rather than external
ones implemented using assembly.
o) Use TRAPF_USERMODE() consistently rather than USERMODE().  Eliminate
   <machine/psl.h> as a result.
o) Use intr_*() rather than *intr(), consistently.
o) Use register_t instead of u_int in some trap code.
o) Merge some more endian-related macros to machine/asm.h from NetBSD.
o) Add PTR_LI macro, which loads an address with the correct sign-extension for
   a pointer.
o) Restore interrupts when bailing out due to an excessive IRQ in
   nexus_setup_intr().
o) Remove unused functions from psraccess.S.
o) Enter temporary virtual entries for large memory access into the page tables
   rather than simply hoping they stay resident in the TLB and we don't need to
   do a refill for them.
o) Abstract out large memory mapping setup/teardown using some macros.
o) Do mips_dcache_wbinv_range() when using temporary virtual addresses just
   like we do when we can use the direct map.
2010-04-17 01:17:31 +00:00
Juli Mallett
e586cf9a28 o) Remove code related to VM_ALLOC_WIRED_TLB_PG_POOL, VM_KERNEL_ALLOC_OFFSET
and floating pages.  They are unused and unsupported.
2010-04-17 00:05:22 +00:00
Juli Mallett
2ae5ecf8a2 Adjust limits and formats for ABIs with 64-bit longs. 2010-04-16 23:54:56 +00:00
Juli Mallett
11484eb34f o) Use the direct map where possible for uiomove_fromphys, based on code from
sparc64.
o) Use uiomove_fromphys rather than the broken fpage mechanism for /dev/mem.
o) Update sf_buf allocator to not share buffers and to do a pmap_qremove when
   done with an sf_buf so as to better track valid mappings.
2010-04-16 23:48:28 +00:00
Juli Mallett
d0985cfb41 o) Fix the intr_* functions to not spam the whole status register, just the IE
bit.
o) Remove some unused inlines.
o) Generate CP0 access functions for 64-bit TLB registers when building for
   n64.
o) Add an inline function version of the COP0_SYNC macro.
2010-04-16 23:46:30 +00:00
Juli Mallett
4e859425ae Set KERNLOADADDR and TARGET_BIG_ENDIAN for SWARM. 2010-04-16 23:42:19 +00:00
Jack F Vogel
c99cdece4e Remove the tx queue selection based on the cpu whe
no flowid is present, this was causing some bad
reordering, now just use 0.

Also, add a few watchdog bits, and tx handler bits
that were corrected in igb.
2010-04-16 16:33:05 +00:00
Jaakko Heinonen
17f820725e Revert r206560. The change doesn't work correctly in all cases with
multiple devfs mounts.
2010-04-16 07:02:28 +00:00
Juli Mallett
4076170459 Remove some unused header files. 2010-04-16 02:56:24 +00:00
Rick Macklem
0ac68bd339 Add mutex lock calls to 2 cases in the experimental NFS client's
renew thread where they were missing.

MFC after:	1 week
2010-04-15 23:56:05 +00:00
Rick Macklem
55909abf07 The experimental NFS client was not filling in recovery credentials
for opens done locally in the client when a delegation for the file
was held. This could cause the client to crash in crsetgroups() when
recovering from a server crash/reboot. This patch fills in the
recovery credentials for this case, in order to avoid the client crash.
Also, add KASSERT()s to the credential copy functions, to catch any
other cases where the credentials aren't filled in correctly.

MFC after:	1 week
2010-04-15 22:57:30 +00:00
Fabien Thomas
5d0848e9c6 - Fix a typo OFFCORE_REQUESTS.ANY.RFO is B0H10H and not 80H10H.
- Enable missing PARTIAL_ADDRESS_ALIAS for Core i7.

MFC after: 3 days
2010-04-15 19:45:03 +00:00
Pyun YongHyeon
c6491946d8 Fix include path. 2010-04-15 17:24:21 +00:00
Konstantin Belousov
3e22320c43 Fix typo.
MFC after:	3 days
2010-04-15 17:17:02 +00:00
Pawel Jakub Dawidek
40c7da090f Fix 3-way deadlock that can happen because of ZFS and vnode lock
order reversal.

thread0 (vfs_fhtovp)	thread1 (vop_getattr)	thread2 (zfs_recv)
--------------------	---------------------	------------------
			vn_lock
rrw_enter_read
						rrw_enter_write (hangs)
			rrw_enter_read (hangs)
vn_lock (hangs)

Submitted by:	Attila Nagy <bra@fsn.hu>
MFC after:	3 days
2010-04-15 16:40:54 +00:00
Pawel Jakub Dawidek
31c4cef715 Use lower priority for GELI worker threads. This improves system
responsiveness under heavy GELI load.

MFC after:	3 days
2010-04-15 16:34:06 +00:00
Andrew Gallatin
2a29e09f38 Add missing IFCAP_LINKSTATE to mxge
Submitted by: yongari
2010-04-15 14:26:52 +00:00
Andrew Gallatin
c406ad2ecc Cleanup if_media handling in mxge(4)
- Re-probe xfp / sfp+ socket on link events, in case user
    has changed transceiver
- correctly report current media to avoid confusing lagg (reported by Panasas)
- Report link speed  (submitted by yongari)

Reviewed by: yongari (earlier version)

MFC after: 7 days
2010-04-15 13:50:55 +00:00
VANHULLEBUS Yvan
61f73308d4 Locks SPTREE when setting some SP entries to state DEAD.
This can prevent kernel panics when updating SPs while
there is some traffic for them.

Obtained from: NETASQ
MFC after: 1m
2010-04-15 12:40:33 +00:00
Alexander Motin
94410af774 Explicitly enable PCI busmastering on attach.
Now SiI3124 with siis(4) successfully works on sparc64 (SunBlade 100).

H/W donated by:	Gheorghe Ardelean
2010-04-15 11:17:33 +00:00
Andriy Gapon
2a842317eb g_io_check: respond to zero pp->mediasize with ENXIO
Previsouly this condition was reported with EIO by bio_offset > mediasize
check.
Perhaps that check should be extended to bio_offset+bio_length > mediasize.

MFC after:	1 week
2010-04-15 08:39:56 +00:00
Andriy Gapon
a3a86fc397 scsi_cd: CD_FLAG_VALID_MEDIA is sufficient to set d_sectorsize and
d_mediasize

CD_FLAG_VALID_TOC is not required for setting those media properties.

PR:		kern/145385
Submitted by:	Juergen Lock <nox@jelal.kn-bremen.de>
		a slightly different version
Tested by:	Pavel Sukhoy <sukhoy@ripn.net>,
		Markus Wild <m.wild@cybernet.ch>,
		Juergen Lock <nox@jelal.kn-bremen.de>,
		uqs
MFC after:	1 week
2010-04-15 08:29:14 +00:00
Julian Elischer
7a90b21212 Move two copies of the same definition to a common include file.
MFC after: 3 weeks
2010-04-14 23:06:07 +00:00
Gavin Atkinson
2d8d6ee437 Use the UIPROTO_BOOT_KEYBOARD #define from usb.h rather than a local
(almost identically named) local #define.

Reviewed by:	hselasky
2010-04-14 22:03:48 +00:00
Xin LI
57d848483e When an underlying ioctl(2) handler returns an error, our ioctl(2)
interface considers that it hits a fatal error, and will not copyout
the request structure back for _IOW and _IOWR ioctls, keeping them
untouched.

The previous implementation of the SIOCGIFDESCR ioctl intends to
feed the buffer length back to userland.  However, if we return
an error, the feedback would be defeated and ifconfig(8) would
trap into an infinite loop.

This commit changes SIOCGIFDESCR to set buffer field to NULL to
indicate the previous ENAMETOOLONG case.

Reported by:	bschmidt
MFC after:	2 weeks
2010-04-14 22:02:19 +00:00
Julian Elischer
94a04272dd Change the semantics of the debug.ktr.alq_enable control so that when you
disable alq, it acts as if alq had not been enabled in the build.
in other words, the rest of ktr is still available for use.
If you really don't want that as well, set the mask to 0.

MFC after:3 weeks
2010-04-14 21:42:29 +00:00
Jack F Vogel
d43a118797 Add a missing fragment in the tx msix handler to invoke
another if all work is not done.

Sync the igb driver with changes suggested by yongari and
made in em, these made sense to be in both drivers.
2010-04-14 20:55:33 +00:00
Warner Losh
dec52eb94c We don't need the definition for in_cksum repeated here since we get
it from machine/in_cksum.h.  This definition prevents us from using
hand-tuned assembler versions of in_cksum.

# this fixes the modules build on arm for ipfilter.
2010-04-14 20:50:07 +00:00
Pyun YongHyeon
d193ed0bed Add driver for Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet.
This driver was written by Alexander Pohoyda and greatly enhanced
by Nikolay Denev. I don't have these hardwares but this driver was
tested by Nikolay Denev and xclin.

Because SiS didn't release data sheet for this controller, programming
information came from Linux driver and OpenSolaris. Unlike other open
source driver for SiS190/191, sge(4) takes full advantage of TX/RX
checksum offloading and does not require additional copy operation in
RX handler.
The controller seems to have advanced offloading features like VLAN
hardware tag insertion/stripping, TCP segmentation offload(TSO) as
well as jumbo frame support but these features are not available
yet. Special thanks to xclin <xclin<> cs dot nctu dot edu dot tw>
who sent fix for receiving VLAN oversized frames.
2010-04-14 20:45:33 +00:00
Konstantin Belousov
b71e04d3a8 ld_gs_base is executing with stack containing only the frame,
temporary pushed %rflags has been popped already.

Pointy hat to:	kib
MFC after:	3 days
2010-04-14 20:04:55 +00:00
Rui Paulo
20c3b3fa1c Make this code a little more portable by wrapping the mtx calls into
macros.

MFC after:	1 week
2010-04-14 18:29:40 +00:00
Jack F Vogel
7ea05bb9a5 Remove multiqueue stack related stuff form lem, it is
unneeded for legacy hardware.
Also remove some TSO related cruft.
Add some watchdog_time setting that was missing, thanks
to Mikolaj Golub for pointing that out.
2010-04-14 18:29:01 +00:00
Alexander Motin
b9f59cca0d For early ALI chips do not announce I/O sizes that require unsupported
48bit DMA commands.
2010-04-14 15:29:32 +00:00