Commit Graph

59458 Commits

Author SHA1 Message Date
Matt Jacob
015a972c95 VMware disk volumes are only on LUN 0, and
some VMware HBAs have known bugs with commands
sent to other than LUN 0.

MFC after:	1 day
2006-06-24 16:40:59 +00:00
Marcel Moolenaar
a4b606cd18 Sync up with SDM 2.1:
o  Add nop/hint formats F16, I18, M48 and X5,
o  Add format M47 for ptc.e,
o  Add hint instruction,
o  Fix decoding of cmp8xchg16.
2006-06-24 01:19:52 +00:00
Olivier Houchard
39a0c069fa Backout previous commit, Warner committed at91_pio.c... 2006-06-23 23:07:11 +00:00
Olivier Houchard
9effaba942 There's no need to allocate that much phdr/shdr from the stack. 2006-06-23 22:45:35 +00:00
Olivier Houchard
211d1ec5a8 Add the arm9_setup() prototype. 2006-06-23 22:37:15 +00:00
Olivier Houchard
e45fb59abe Comment out at91_pio.c, it's not in CVS. 2006-06-23 22:30:55 +00:00
John Baldwin
d90db84797 Fix the name of the data set item for the SYSUNINIT in RW_SYSINIT to use
'rw' instead of 'mtx'.  This should only be a cosmetic change rather than
a functional one.

Submitted by:	Alex Lyashkov <shadow AT itt dot net dot ru>
2006-06-23 19:36:50 +00:00
Alexander Leidinger
555f86b8b6 The linux times syscall can be called with a NULL pointer, so keep cool
and don't panic.

This fix is different from the patch submitted as it not only prevents
a NULL-pointer dereference, but also skips some work in this case.

Noticed by:	Dmitry Ganenko <dima@apk-inform.com>
Reviewed by:	rdivacky (the original version as in emulation@)
MFC after:	1 week
Security:	This is a RELENG_x_y candidate (local DoS).
Go ahead by:	secteam (cperciva)
2006-06-23 18:49:38 +00:00
Sam Leffler
30db812aa9 new stats
MFC after:	1 month
2006-06-23 18:48:08 +00:00
John Baldwin
9bdaa43379 Move the code to handle the vm.blacklist tunable up a layer into
vm_page_startup().  As a result, we now only lookup the tunable once
instead of looking it up once for every physical page of memory in the
system.  This cuts out about a 1 second or so delay in boot on x86
systems.  The delay is much larger and more noticable on sun4v apparently.

Reported by:	kmacy
MFC after:	1 week
2006-06-23 16:44:24 +00:00
Mohan Srinivasan
5943f1a781 Size the NFS server dupreq cache on the basis of nmbclusters. On servers
with low nmbclusters, we tie up too many mbclusters in the NFS duplicate
request cache. This change limits the size of the dupreq cache to 1/2
the nmbclusters (and flaots in a range of [64, 2048]).

MFC after 2 weeks.

Reported by: Steve Kargl, David O'Brien
Tested by:   Steve Kargl
2006-06-23 00:42:26 +00:00
Olivier Houchard
f8910b42c8 arm9_setup() is now needed even if we're not using a gzipped kernel, so move
it outside the #ifdef KZIP

Pointy Hat to:	cognet
2006-06-22 22:33:21 +00:00
Marcel Moolenaar
97b94c0e72 Add the UUID of Apple's HFS file system as can be found in the Intel
based Macs.
2006-06-22 22:11:12 +00:00
Andre Oppermann
649ac0ce5f Move the syncookie MD5 context from globals to the stack to make it MP safe. 2006-06-22 15:07:45 +00:00
Hajimu UMEMOTO
a0a59ae4af - Pullup even when the extention header is unknown, to prevent
infinite loop with net.inet6.ip6.fw.deny_unknown_exthdrs=0.
- Teach ipv6 and ipencap as they appear in an IPv4/IPv6 over IPv6
  tunnel.
- Test the next extention header even when the routing header type
  is unknown with net.inet6.ip6.fw.deny_unknown_exthdrs=0.

Found by:	xcast-fan-club
MFC after:	1 week
2006-06-22 13:22:54 +00:00
Diomidis Spinellis
462da4d616 Move conditional preprocessing out of the SYSCTL_ADD_STRING macro
invocation.  Per C99 6.10.3 paragraph 11 preprocessing directives
appearing inside macro arguments yield undefined behavior.
2006-06-22 13:11:36 +00:00
Nate Lawson
6453365422 Clean up style and some printf messages. Note that returning anything other
than 0 for probe seems to cause a panic somewhere in sysctl kern.
2006-06-22 06:34:05 +00:00
Marcel Moolenaar
99ab1812b9 Identify the cual-core Montecito.
MFC after: 3 days
2006-06-22 00:56:58 +00:00
Warner Losh
a64011a08b Nitsville: the routine is called initarm, not init_arm, correct it in
a comment.
2006-06-21 23:47:25 +00:00
John Baldwin
70f3778827 Replace the kld_mtx mutex with a kld_sx sx lock and expand it's scope to
protect all linker-related data structures including the contents of
linker file objects and the any linker class data as well. Considering how
rarely the linker is used I just went with the simple solution of
single-threading the whole thing rather than expending a lot of effor on
something more fine-grained and complex.  Giant is still explicitly
acquired while registering and deregistering sysctl's as well as in the
elf linker class while calling kmupetext().  The rest of the linker runs
without Giant unless it has to acquire Giant while loading files from a
non-MPSAFE filesystem.
2006-06-21 20:42:08 +00:00
John Baldwin
40bdac68d8 Add a sx_xlocked() macro which returns true if the current thread holds an
exclusive lock on the specified sx lock.
2006-06-21 20:38:29 +00:00
John Baldwin
cbda6f950b - Push down Giant in kldfind() and kldsym().
- Remove several goto's by either using direct return's or else clauses.
2006-06-21 20:15:36 +00:00
John Baldwin
d36e739a0c Whoops, revert accidental commit. 2006-06-21 17:48:59 +00:00
John Baldwin
9dd44bd79e Fix two comments and a style fix. 2006-06-21 17:48:03 +00:00
John Baldwin
0df2972736 Various whitespace fixes. 2006-06-21 17:47:45 +00:00
Yaroslav Tykhiy
15ed2fa1f1 Fix the VLAN_ARRAY case, mostly regarding improper use of atomic(9)
in place of conventional rw locking.  Alas, atomic(9) can't buy us
lockless operation so easily.
2006-06-21 13:48:34 +00:00
Konstantin Belousov
455dd7d4c7 Make the mincore(2) return ENOMEM when requested range is not fully mapped.
Requested by:	Bruno Haible <bruno at clisp org>
Reviewed by:	alc
Approved by:	pjd (mentor)
MFC after:	1 month
2006-06-21 12:59:05 +00:00
Olivier Houchard
d0a6d18d1a Don't forget to define uart_sa1110_vaddr.
Submitted by:	kevlo
2006-06-21 10:56:59 +00:00
Alexander Leidinger
adc250e2c5 Commit the DUMMY stuff (printing messages for missing syscalls) for amd64 too.
Submitted by:	rdivacky
Sponsored by:	Google SoC 2006
Noticed by:	jkim
Pointyhat to:	netchild
2006-06-21 08:45:40 +00:00
Yaroslav Tykhiy
5cb8c31af1 Track interface department events and detach vlans from
departing trunk so that we don't get into trouble later
by dereferencing a stale pointer to dead trunk's things.

Prodded by:	oleg
Sponsored by:	RiNet (Cronyx Plus LLC)
MFC after:	1 week
2006-06-21 07:29:44 +00:00
Gleb Smirnoff
457f48e65c - First initialize ifnet, and then insert it into global
list.
- First remove from global list, then start destroying.

PR:		kern/97679
Submitted by:	Alex Lyashkov <shadow itt.net.ru>
Reviewed by:	rwatson, brooks
2006-06-21 06:02:35 +00:00
Warner Losh
c0386612b8 Compute physmem so we can print it correctly on boot.
Slightly optimize while I'm here.
2006-06-20 23:40:04 +00:00
Paul Saab
e94bb9b26e Fix a potential problem when mfi_get_log_state and only
release a command if one was allocated.
Also release the command in mfi_shutdown.
2006-06-20 23:08:35 +00:00
Paul Saab
c0b332d17a Instead of using scsi probes to do device discovery, use the firmware
commands to grab the device listing.  This resolves issues using
multiple volumes, where each volume was actually internally pointing
to target 0.
2006-06-20 22:41:44 +00:00
Paul Saab
330df1ac0d Fix a typo when getting the log_state and set the flags on the
command to signify it is being polled and expecting data to be dma'd
from the card.
2006-06-20 22:17:54 +00:00
John Baldwin
62d615d508 Conditionally acquire Giant around VFS operations. 2006-06-20 21:31:38 +00:00
Andrew Thompson
690d79381a Allow gif interfaces to be added as span ports, the user may want to send a
copy of all packets to the other side of the world.
2006-06-20 21:28:18 +00:00
Paul Saab
fb595e7a9b Cleanup dcmd firmware processing into a single function, mfi_dcmd_command
to avoid duplication and mistakes when setting up firmware commands
for submission.

Reviewed by:	scottl
2006-06-20 21:06:05 +00:00
John Baldwin
880eb8c1ef Add a new section in this file for functions that are only exported by the
linker for use in the linker class handlers.  Move linker_add_class(),
linker_file_unload(), linker_load_dependencies(), and linker_make_file()
into this section.
2006-06-20 20:59:55 +00:00
John Baldwin
aeeb017bd6 - Push Giant down into linker_reference_module().
- Add a new function linker_release_module() as a more intuitive complement
  to linker_reference_module() that wraps linker_file_unload().
  linker_release_module() can either take the module name and version info
  passed to linker_reference_module() or it can accept the linker file
  object returned by linker_reference_module().
2006-06-20 20:54:13 +00:00
Alan Cox
f05446648b Change get_pv_entry() such that the call to vm_page_alloc() specifies
VM_ALLOC_NORMAL instead of VM_ALLOC_SYSTEM when try is TRUE.  In other
words, when get_pv_entry() is permitted to fail, it no longer tries as
hard to allocate a page.

Change pmap_enter_quick_locked() to fail rather than wait if it is
unable to allocate a page table page.  This prevents a race between
pmap_enter_object() and the page daemon.  Specifically, an inactive
page that is a successor to the page that was given to
pmap_enter_quick_locked() might become a cache page while
pmap_enter_quick_locked() waits and later pmap_enter_object() maps
the cache page violating the invariant that cache pages are never
mapped.  Similarly, change
pmap_enter_quick_locked() to call pmap_try_insert_pv_entry() rather
than pmap_insert_entry().  Generally speaking,
pmap_enter_quick_locked() is used to create speculative mappings.  So,
it should not try hard to allocate memory if free memory is scarce.

Add an assertion that the object containing m_start is locked in
pmap_enter_object().  Remove a similar assertion from
pmap_enter_quick_locked() because that function no longer accesses the
containing object.

Remove a stale comment.

Reviewed by: ups@
2006-06-20 20:52:11 +00:00
Paul Saab
83ff9c1304 Clean up some comments and device printf failures in mfi_get_log_state
and mfi_get_controller_info.
2006-06-20 20:41:54 +00:00
Alexander Leidinger
aff681d258 regen after change to syscalls.master 2006-06-20 20:41:29 +00:00
John Baldwin
f462ce3edd Make linker_find_file_by_name() and linker_find_file_by_id() static to
simplify linker locking.  The only external consumers now use
linker_file_foreach().
2006-06-20 20:41:15 +00:00
Alexander Leidinger
502195ac72 Switch to using the DUMMY infrastructure instead of UNIMPL for the new
syscalls. This way there will be a log message printed to the console
(this time for real).

Note: UNIMPL should be used for syscalls we do not implement ever, e.g.
syscalls to load linux kernel modules.

Submitted by:	rdivacky
Sponsored by:	Goole SoC 2006
P4 IDs:		99600, 99602
2006-06-20 20:38:44 +00:00
John Baldwin
932151064a - Add a new linker_file_foreach() function that walks the list of linker
file objects calling a user-specified predicate function on each object.
  The iteration terminates either when the entire list has been iterated
  over or the predicate function returns a non-zero value.
  linker_file_foreach() returns the value returned by the last invocation
  of the predicate function.  It also accepts a void * context pointer that
  is passed to the predicate function as well.  Using an iterator function
  avoids exposing linker internals to the rest of the kernel making locking
  simpler.
- Use linker_file_foreach() instead of walking the list of linker files
  manually to lookup ndis files in ndis(4).
- Use linker_file_foreach() to implement linker_hwpmc_list_objects().
2006-06-20 20:37:17 +00:00
John Baldwin
aaf3170501 Make linker_file_add_dependency() and linker_load_module() static since
only the linker uses them.
2006-06-20 20:18:42 +00:00
Warner Losh
57dc2664ef Probe the memory size of the board better. Look at the bus width,
number of banks, rows and columns the SDRAMC is programmed to access
to determine the RAM size for the board, rather than hard-wiring it to
be 32MB.  My company's board with 64MB now probes correctly, as does
the KB9202 with only 32MB.  This means that to detect the right memory
size, our boot loader must correctly initialize these values.  This is
a fairly safe assumption because the boot loader has to initialize
SDRAM already, and it isn't really possible to change this register
after we've accessed SDRAM.
2006-06-20 20:13:40 +00:00
John Baldwin
e767366f99 Don't check if malloc(M_WAITOK) returns NULL. 2006-06-20 20:11:00 +00:00
John Baldwin
e5bb3a01d7 Use 'else' to remove another goto. 2006-06-20 19:49:28 +00:00