Commit Graph

78899 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
0778b1d117 - Check the result of malloc(M_NOWAIT) in replay_alloc(). The caller
(replay_alloc()) knows how to handle replay_alloc() failure.
- Eliminate 'freed_one' variable, it is not needed - when no entry is found
  rce will be NULL.
- Add locking assertions where we expect a rc_lock to be held.

Reviewed by:	rmacklem
MFC after:	2 weeks
2010-08-26 23:33:04 +00:00
Jaakko Heinonen
4136388a18 Set de_dir for user created symbolic links. This will be needed to be
able to resolve their parent directories.
2010-08-26 16:01:29 +00:00
Rui Paulo
6bf9fb35e5 Sync DTrace bits with amd64 and fix the build.
Sponsored by:	The FreeBSD Foundation
2010-08-26 11:22:12 +00:00
Konstantin Belousov
13561ed4ed Fix typo.
Submitted by:	Ben Kaduk <minimarmot gmail com>
2010-08-26 11:20:57 +00:00
Rick Macklem
d7dc2db434 Add mutex locking for the call to replay_prune() in
replay_setsize(), since replay_prune() expects the
rc_lock to be held when it is called.

MFC after:	2 weeks
2010-08-25 23:23:00 +00:00
Jung-uk Kim
2b13785931 Fix a debugging message under bootverbose. This address is not linear. 2010-08-25 22:48:18 +00:00
Jung-uk Kim
a73f383ee9 Add an experimental feature to shadow video BIOS. Long ago, this trick was
supported by many BIOSes to improve performance of VESA BIOS calls for real
mode OSes but it is not our intention here.  However, this may help some
platforms where the video ROMs are inaccessible after suspend, for example.
Note it may consume up to 64K bytes of contiguous memory depending on video
controller model when it is enabled.  This feature can be disabled by
setting zero to 'debug.vesa.shadow_rom' loader tunable via loader(8) or
loader.conf(5).  The default is 1 (enabled), for now.
2010-08-25 22:09:02 +00:00
Edward Tomasz Napierala
81f6480d42 Revert r210194, adding a comment explaining why calls to chgproccnt()
in unionfs are actually needed.  I have a better fix in trasz_hrl p4 branch,
but now is not a good moment to commit it.

Reported by:	Alex Kozlov
2010-08-25 21:32:08 +00:00
Jung-uk Kim
db1cea00ad Increase maximum number of page table entries per VM86 context from 8 to 24
pages, yet again.  Now we can allocate a whole segment, which is required
for shadowing option ROM images, for example.
2010-08-25 21:13:23 +00:00
Jung-uk Kim
97e6525d6a Add x86bios_set_intr() to set interrupt vectors for real mode and simplify
x86bios_get_intr() a little.
2010-08-25 21:03:50 +00:00
Jung-uk Kim
bc339276fb Check opcode for short jump as well. Some option ROMs do short jumps
(e.g., some NVIDIA video cards) and we were not able to do POST while
resuming because we only honored long jump.

MFC after:	3 days
2010-08-25 20:52:40 +00:00
John Baldwin
8bddaf9007 Correctly ensure that the CPU family is 0x6, not non-zero.
Submitted by:	Dimitry Andric
2010-08-25 20:37:58 +00:00
John Baldwin
c2175767b7 Intel QPI chipsets actually provide two extra "non-core" PCI buses that
provide PCI devices for various hardware such as memory controllers, etc.
These PCI buses are not enumerated via ACPI however.  Add qpi(4) psuedo
bus and Host-PCI bridge drivers to enumerate these buses.  Currently the
driver uses the CPU ID to determine the bridges' presence.

In collaboration with:	Joseph Golio @ Isilon Systems
MFC after:	2 weeks
2010-08-25 19:12:05 +00:00
Brian Somers
c2d844d814 If we read zero bytes from the directory, early out with ENOENT
rather than forging ahead and interpreting garbage buffer content
and dirent structures.

This change backs out r211684 which was essentially a no-op.

MFC after:	1 week
2010-08-25 18:09:51 +00:00
Nathan Whitehorn
194270c84b Fix build of ppc32 loader. 2010-08-25 16:23:50 +00:00
Jaakko Heinonen
f5efcd64f4 Call devfs_populate_vp() from devfs_getattr(). It was possible that
fstat(2) returned stale information through an open file descriptor.
2010-08-25 15:29:12 +00:00
Jayachandran C.
867a12afe1 Provide timecounter based on XLR PIC timer.
- Use timer 7 in XLR PIC as a 32 counter
- provide pic_init_timer(), pic_set_timer(), pic_timer_count32() and
  pic_timer_count() PIC timer operations.
- register this timer as platform_timecounter on rmi platform.
2010-08-25 13:37:55 +00:00
Rui Paulo
c2f84fc39a Add the necessary DTrace function pointers.
Sponsored by:	The FreeBSD Foundation
2010-08-25 12:35:36 +00:00
Jayachandran C.
f6f7fc21c4 XLR PIC code update.
- Fix a bug in xlr_pic_init (use irq in PIC_IRQ_IS_EDGE_TRIGGERED)
- use new macro PIC_INTR_TO_IRQ() and PIC_IRT_x() in xlr_pic_init
2010-08-25 12:10:20 +00:00
Jayachandran C.
30eb8eda72 XLR PIC code update and style(9) fixes.
- style(9) fixes to mips/rmi platform files
- update pic.h to add pic_setup_intr() and use pic_setup_intr() for setting
  up interrupts which are routed thru PIC.
- remove rmi_spin_mutex_safe and haslock, and make sure that the functions
  are called only after mutexes are available.
2010-08-25 11:49:48 +00:00
Jayachandran C.
afc1e71002 Rename on_chip.c to fmn.c, as the file has just the fast messaging network
code.  The iodi.c has the bus for SoC devices, so the name on_chip.c is
misleading.
2010-08-25 09:53:00 +00:00
Rui Paulo
0bc1991a4a Call the necessary DTrace function pointers when we have different kinds
of traps.

Sponsored by:	The FreeBSD Foundation
2010-08-25 09:10:32 +00:00
Jayachandran C.
5cdefefaed RMI XLR platform code clean-up.
- move PIC code to xlr_machdep.c
- move fast message ring code completely to on_chip.c
- move memory initialization to a new function xlr_mem_init()
- style fixes
2010-08-25 08:48:54 +00:00
Jayachandran C.
871726d7e9 Sync up XLR tick.c with the new MIPS tick.c 2010-08-25 07:33:35 +00:00
David Xu
df7442533c If a thread is removed from umtxq while sleeping, reset error code
to zero, this gives userland a better indication that a thread needn't
to be cancelled.
2010-08-25 03:14:32 +00:00
Warner Losh
253953cd5b On second thought, we need to force 16-bit mode 2010-08-25 02:09:07 +00:00
Warner Losh
e94b9f21a8 Prodded by Yongari, add support for Holtek HT80232. Add the device
ID, plus the ability to force '16-bit mode' which really means NE-2000
mode.  Other open source drivers suggest that the Holtek misbehaves if
you allow the 8-bit probe.  Also, all of the PCI chips emulate
NE-2000ish cards, so always force 16-bit mode for memory transfers.

PR:		84202 (patch not used)
2010-08-25 02:03:48 +00:00
Rick Macklem
12731c317d If the first iteration of the do loop in replay_prune()
succeeded and a subsequent interation failed to find an
entry to prune, it could loop infinitely, since the
"freed" variable wasn't reset to FALSE. This patch moves
setting freed FALSE to inside the loop to fix the problem.

Tested by:	alan.bryan at yahoo.com
MFC after:	2 weeks
2010-08-25 00:35:58 +00:00
Pyun YongHyeon
3ca447da3d Remove unnecessary controller reinitialization.
PR:	kern/87506
2010-08-24 19:41:15 +00:00
Pyun YongHyeon
2bd45735ea Remove unnecessary controller reinitialization.
PR:	kern/87506
2010-08-24 18:52:24 +00:00
Pyun YongHyeon
6a085e6341 vr_init_locked() will stop and reset the controller. Remove
unnecessary vr_stop()/vr_reset() calls.
2010-08-24 18:44:12 +00:00
Pyun YongHyeon
9fb40e0a9b Remove unnecessary controller reinitialization.
CAM filter handling was rewritten long time ago so it should not
require controller reinitialization.

PR:	kern/87506
2010-08-24 18:40:11 +00:00
Pyun YongHyeon
7c45b43651 Add PNP id for Compex RL2000.
I'm not sure whether adding this logical id is correct or not
because Compex RL2000 is in the list of supported hardware list.
I guess the Compex RL2000 could be PCI variant while the controller
in question is ISA controller. It seems PNP compat id didn't match
or it had multiple compat ids so isa_pnp_probe() seemed to return
ENOENT.

PR:	kern/80853
2010-08-24 18:17:40 +00:00
Andriy Gapon
694a0a8717 zfs arc_reclaim_thread: no need to call arc_reclaim_needed when
resetting needfree

needfree is checked at the very start of arc_reclaim_needed.
This change makes code easier to follow and maintain in face of
potential changed in arc_reclaim_needed.

Also, put the whole sub-block under _KERNEL because needfree can be set
only in kernel code.

To do: rename needfree to something else to aovid confusion with
OpenSolaris global variable of the same name which is used in the same
code, but has different meaning (page deficit).

Note: I have an impression that locking around accesses to this variable
as well as mutual notifications between arc_reclaim_thread and
arc_lowmem are not proper.

MFC after:	1 week
2010-08-24 17:48:22 +00:00
Alexander Motin
733cb5ec90 Enable timer interrupt before starting timer. This allows to handle very
short periods without interrupt loss.
2010-08-24 16:08:01 +00:00
Rui Paulo
4fbdc85400 Enable fasttrap and make dtraceall depend on fasttrap when building i386
or amd64.

Sponsored by:	The FreeBSD Foundation
2010-08-24 13:21:05 +00:00
Rui Paulo
8a8d8fa3d1 Add two DTrace trap type values. Used by fasttrap.
Sponsored by:	The FreeBSD Foundation
2010-08-24 13:13:24 +00:00
Rui Paulo
12f48a53f9 Add a trap code for DTrace induced traps.
Sponsored by:	The FreeBSD Foundation
2010-08-24 13:11:24 +00:00
Rui Paulo
f5a5c5653a Replace structure assignments with explicity memcpy calls. This allows
Clang to compile this file: it was using the builtin memcpy and we want
to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet).

Submitted by:	Dimitry Andric <dimitry at andric.com>
Reviewed by:	jhb
2010-08-24 12:56:45 +00:00
Rui Paulo
4873b1ac4d Update for the recent location of the fasttrap code.
Sponsored by:	The FreeBSD Foundation
2010-08-24 12:18:39 +00:00
Rui Paulo
5caab9d4cd Replace a pksignal() call with tdksignal().
Pointed out by:	kib
2010-08-24 12:12:03 +00:00
Rui Paulo
625564de63 MD fasttrap implementation.
Sponsored by:	The FreeBSD Foundation
2010-08-24 12:05:58 +00:00
Konstantin Belousov
4b8c3ea4ba Use preferred spelling for the __attribute__.
MFC after:	3 days
2010-08-24 11:53:30 +00:00
Rui Paulo
8605d1ae99 Port the fasttrap provider to FreeBSD. This provider is responsible for
injecting debugging probes in the userland programs and is the basis for
the pid provider and the usdt provider.

Sponsored by:	The FreeBSD Foundation
2010-08-24 11:11:58 +00:00
David Xu
3586381d50 Bump __FreeBSD_version for revision 211732.
Noticed by: thompa
2010-08-24 08:09:30 +00:00
David Xu
2961a78226 Optimize thr_suspend, if timeout is zero, don't call msleep, just
return immediately.
2010-08-24 07:29:55 +00:00
David Xu
baf28b69f4 - According to specification, SI_USER code should only be generated by
standard kill(). On other systems, SI_LWP is generated by lwp_kill().
  This will allow conforming applications to differentiate between
  signals generated by standard events and those generated by other
  implementation events in a manner compatible with existing practice.
- Bump __FreeBSD_version
2010-08-24 07:22:24 +00:00
Warner Losh
25faff346c MFtbemd:
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
2010-08-23 22:24:11 +00:00
Pyun YongHyeon
820b53e152 Fix a possible unaligned access to savebyte array.
PR:	kern/122195
2010-08-23 21:40:03 +00:00
Pyun YongHyeon
9ae11bbaa6 Implement basic WOL support. Note, not all xl(4) controllers
support WOL. Some controllers require additional 3-wire auxiliary
remote wakeup connector to draw power. More recent xl(4)
controllers may not need the wakeup connector though.
2010-08-23 19:18:50 +00:00