Commit Graph

78643 Commits

Author SHA1 Message Date
Jung-uk Kim
a6d613a57f Do not block any I/O port on amd64. 2010-08-07 04:05:58 +00:00
Jung-uk Kim
d7a5fb634f Optimize interrupt vector lookup. There is no need to check the page table. 2010-08-07 03:45:45 +00:00
Neel Natu
f978c8f2c3 - Consolidate the the cache coherence attribute definitions in a single place.
Adapted from Juli's changes to pte.h in the octeon branch:
  http://svn.freebsd.org/viewvc/base/user/jmallett/octeon/sys/mips/include/pte.h

- Set the KX and UX bits in the status register for n64 kernels.

Reviewed by:	jmallett
2010-08-07 01:49:44 +00:00
Jung-uk Kim
34622ff1ab When EC burst mode is activated and multiple bytes are accessed, do not
disable and enable repeatedly, just do it once per call.  It also reduces
code duplication.  Check all parameters early and fail immediately.
2010-08-06 23:35:33 +00:00
Jung-uk Kim
709fac0616 Merge ACPICA 20100806. 2010-08-06 23:11:19 +00:00
Jamie Gritton
f4aad87394 Implicitly make a new jail persistent if it's set not to attach.
MFC after:	3 days
2010-08-06 22:04:18 +00:00
Jack F Vogel
3b9b3fc3bf Put the early setting of the MAC type back, its
removal resulted in broken code in MSIX setup.
2010-08-06 20:55:49 +00:00
Bernhard Schmidt
5ec432ed82 Fix whitespace nits.
PR:		conf/148989
Submitted by:	pluknet <pluknet at gmail.com>
MFC after:	3 days
2010-08-06 18:46:27 +00:00
Matt Jacob
c97bb67a70 Figure which is the IO and MEM bars- do not assume that they are in
a fixed order.

PR:		149220
Obtained from:	John Baldwin
MFC after:	1 month
2010-08-06 17:27:00 +00:00
Jung-uk Kim
64299552b9 Remove unnecessary casting and simplify code. We are not there yet. ;-) 2010-08-06 17:21:32 +00:00
Jung-uk Kim
05db09e056 Correct argument order of acpi_restorecpu(), which was forgotten in r210804. 2010-08-06 15:59:00 +00:00
John Baldwin
d9d8d1449d Add a new ipi_cpu() function to the MI IPI API that can be used to send an
IPI to a specific CPU by its cpuid.  Replace calls to ipi_selected() that
constructed a mask for a single CPU with calls to ipi_cpu() instead.  This
will matter more in the future when we transition from cpumask_t to
cpuset_t for CPU masks in which case building a CPU mask is more expensive.

Submitted by:	peter, sbruno
Reviewed by:	rookie
Obtained from:	Yahoo! (x86)
MFC after:	1 month
2010-08-06 15:36:59 +00:00
Jung-uk Kim
fc82156f95 Consistently use architecture specific macros. 2010-08-06 15:24:37 +00:00
John Baldwin
3ba24fde11 Adjust the interface type in the link layer socket address for vlan(4)
interfaces to be a vlan (IFT_L2VLAN) rather than an Ethernet interface
(IFT_ETHER).  The code already fixed if_type in the ifnet causing some
places to report the interface as a vlan (e.g. arp -a output) and other
places to report the interface as Ethernet (getifaddrs(3)).  Now they
should all report IFT_L2VLAN.

Reviewed by:	brooks
MFC after:	1 month
2010-08-06 15:15:26 +00:00
Christian S.J. Peron
ea235a1449 Add Xen to the list of virtual vendors. In the non PV (HVM) case this fixes
the virtualization detection successfully disabling the clflush instruction.
This fixes insta-panics for XEN hvm users when the hw.clflush_disable
tunable is -1 or 0 (-1 by default).

Discussed with:	jhb
2010-08-06 15:04:40 +00:00
Jung-uk Kim
f10776734f Fix allocation of multiple pages, which forgot to increase page number.
Particularly, it caused "vm86_addpage: overlap" panics under VirtualBox.
Add a safety check before freeing memory while I am here.
2010-08-06 15:04:01 +00:00
Konstantin Belousov
6aeff67cd8 Disable sync cache for the Transcend Jetflash V90. It is more specific
quirk over the general one for transcend sticks.

Submitted by:	Mykola Dzham <i levsha me>
MFC after:	1 week
2010-08-06 13:45:16 +00:00
Konstantin Belousov
f53444bc4d Mark /dev/zero and /dev/null as eternal.
In collaboration with:	pho
MFC after:	1 month
2010-08-06 09:47:48 +00:00
Konstantin Belousov
d3c5a40780 Enable shared lookups and externed shared ops for devfs.
In collaboration with:	pho
MFC after:	1 month
2010-08-06 09:46:53 +00:00
Konstantin Belousov
6c5e633cd6 Add "show cdev" ddb command.
In collaboration with:	pho
MFC after:	1 month
2010-08-06 09:44:01 +00:00
Konstantin Belousov
3979450b4c Add new make_dev_p(9) flag MAKEDEV_ETERNAL to inform devfs that created
cdev will never be destroyed. Propagate the flag to devfs vnodes as
VV_ETERNVALDEV. Use the flags to avoid acquiring devmtx and taking a
thread reference on such nodes.

In collaboration with:	pho
MFC after:	1 month
2010-08-06 09:42:15 +00:00
Jayachandran C.
b1f19c11b6 Fix issue reported by alc :
MIPS doesn't really need to use atomic_cmpset_int() in situations like
 this because the software dirty bit emulation in trap.c acquires
 the pmap lock.  Atomics like this appear to be a carryover from i386
 where the hardware-managed TLB might concurrently set the modified bit.

Reviewed by:	alc
2010-08-06 09:25:42 +00:00
Konstantin Belousov
9968a42675 Enable shared locks for the devfs vnodes. Honor the locking mode
requested by lookup(). This should be a nop at the moment.

In collaboration with:	pho
MFC after:	1 month
2010-08-06 09:23:47 +00:00
Konstantin Belousov
3a6fc63c9f Initialize VV_ISTTY vnode flag on the devfs vnode creation instead of
doing it on each open.

In collaboration with:	pho
MFC after:	1 month
2010-08-06 09:06:55 +00:00
Jayachandran C.
a178ce03e1 Fix the issue reported by alc:
pmap_page_wired_mappings() counts the number of pv entries for the
 specified page that have the pv entry wired flag set to TRUE.
 pmap_enter() correctly initializes this flag.  However,
 pmap_change_wiring() doesn't update the corresponding pv entry flag,
 only the PTE.  So, the count returned by pmap_page_wired_mappings()
 will sometimes be wrong.

 In the short term, the best fix would be to eliminate the pv entry
 flag and use only the PTE.  That flag is wasting non-trivial memory.

Remove pv_wired flag, and use PTE flag to count the wired mappings.

Reviewed by:	alc
2010-08-06 07:32:33 +00:00
Neel Natu
3ca4a6cdd3 Remove redundant declaration of 'pcib_driver' class from sb_zbpci.c. This
causes a compilation error.

The declaration is provided by sys/dev/pci/pcib_private.h starting from r210864.
2010-08-06 07:03:22 +00:00
Neel Natu
d3c1485e8f Use a signed integer to hold the address of a register.
This does the right thing by sign extending the address when compiling for
the n64 abi.
2010-08-06 05:30:55 +00:00
Neel Natu
482287c6af uint64_t is 'unsigned long' in n64 build, so compiler is unhappy if the
format specifier in printf is "%llu".

Use "%ju" instead.
2010-08-06 05:24:41 +00:00
Pyun YongHyeon
7ee9ed98c6 Reduce Tx interrupt moderation timer from 50ms to 1ms. The default
value resulted in poor performance for UDP packets. With this
change, UDP bulk transfer performance is more than 940Mbps.

While I'm here fix a wrong register definition.
2010-08-06 00:50:16 +00:00
Oleksandr Tymoshenko
d8484ec681 - Add interrupts counter for PCI devices 2010-08-05 21:31:29 +00:00
Jung-uk Kim
0a3493e5e7 Re-add flag register for output. Some BIOS calls actually use it to return
success/failure status.  Oops.
2010-08-05 19:30:57 +00:00
Jung-uk Kim
c5e960de35 Do not copy stack pointer and flags. These registers are unconditionally
destroyed from vm86_prepcall().
2010-08-05 19:12:35 +00:00
Jung-uk Kim
439f3d8b81 Implement a simple native VM86 backend for X86BIOS. Now i386 uses native
VM86 calls instead of the real mode emulator as a backend.  VM86 has been
proven reliable for very long time and it is actually few times faster than
emulation.  Increase maximum number of page table entries per VM86 context
from 3 to 8 pages.  It was (ridiculously) low and insufficient for new VM86
backend, which shares one context globally.  Slighly rearrange and clean up
the emulator backend to accommodate new code.  The only visible change here
is stack size, which is decreased from 64K to 4K bytes to sync. with VM86.
Actually, it seems there is no need for big stack in real mode.

MFC after:	1 month
2010-08-05 18:48:30 +00:00
John Baldwin
e2865ebbc2 Change the MPTable and $PIR PCI-PCI bridge drivers to inherit from the
generic PCI-PCI bridge driver and only override specific methods.  This
should fix suspend/resume of PCI-PCI bridges using these drivers.
2010-08-05 17:48:37 +00:00
Michael Tuexen
87a37484eb Fix a bug where endpoints bound to wildcard addresses where
using addresses not announced to the peer due to address
scoping.

MFC after: 3 weeks
2010-08-05 16:52:13 +00:00
Oliver Fromme
9c0ef6d5b8 Fix a bunch of errors (spelling and similar).
As des noted, the section on SCTP would benefit from
a rewrite by a native speaker (which I am not).
Any volunteers?

Approved by:	des (mentor)
MFC after:	1 week
2010-08-05 16:28:17 +00:00
John Baldwin
7d23a9b3d5 - Retire acpi_pcib_resume(). It is has just been an alias for
bus_generic_resume() since the pci_link(4) driver was added.
- Change the ACPI PCI-PCI bridge driver to inherit most of its methods
  from the generic PCI-PCI bridge driver.  In particular, this will now
  restore PCI config registers for ACPI PCI-PCI bridges.

Tested by:	Oleg Sharoyko  osharoiko of gmail
2010-08-05 16:10:12 +00:00
Neel Natu
f49fde7faf Fix a race between clock_intr() and tick_ticker() when updating
'counter_upper' and 'counter_lower_last'. The race exists because
interrupts are enabled even though tick_ticker() executes in a
critical section.

Fix a bug in clock_intr() in how it updates the cached values of
'counter_upper' and 'counter_lower_last'. They are updated only
when the COUNT register rolls over. More interestingly it will *never*
update the cached values if 'counter_lower_last' happens to be zero.

Get rid of superfluous critical section in clock_intr(). There is no
reason to do this because clock_intr() executes in hard interrupt
context.

Switch back to using 'tick_ticker()' as the cpu ticker for Sibyte.

Reviewed by:	jmallett, mav
2010-08-05 04:59:54 +00:00
Konstantin Belousov
64dc04de68 Copy inode birthtime to the struct stat32.
MFC after:	1 week
2010-08-04 14:38:20 +00:00
Konstantin Belousov
45b6fa3b54 Fix style.
MFC after:	1 week
2010-08-04 14:35:05 +00:00
Jayachandran C.
442d536595 Add 3 level page tables for MIPS in n64.
- 32 bit compilation will still use old 2 level page tables
- re-arrange pmap code so that adding another level is easier
- pmap code for 3 level page tables for n64
- update TLB handler to traverse 3 levels in n64

Reviewed by:	jmallett
2010-08-04 14:12:09 +00:00
Jayachandran C.
cb5e82a0b4 ithd_name no longer defined, use td_name. Fix compile with KTR enabled. 2010-08-04 14:03:23 +00:00
Gavin Atkinson
af9800150c Do not free sc if attach failed, as it was allocated by the bus
infrastructure, not us.  This appears to be a leftover from an older
version of the driver.

Submitted by:	avg
Tested by:	Anton Shterenlikht <mexas bristol.ac.uk>
MFC after:	1 week
X-MFC-Note:	To stable/8 and stable/7 only
2010-08-04 07:49:40 +00:00
Alan Cox
3b156706c4 In order for MAXVNODES_MAX to be an "int" on powerpc and sparc, we must
cast PAGE_SIZE to an "int".  (Powerpc and sparc, unlike the other
architectures, define PAGE_SIZE as a "long".)

Submitted by:	Andreas Tobler
2010-08-04 05:09:02 +00:00
Rick Macklem
ffea18bdfa Add some mutex locking on the nfsnode to the regular NFS client.
Reviewed by:	jhb
2010-08-04 01:19:11 +00:00
Xin LI
28a54cacee Catch known CPUs before using IA32_TEMPERATURE_TARGET.
This way we would have an opportunity to hide the
Tj(target) value doesn't seem right stuff if we know
it's not working there.

Add temperature value for Core2 Duo Extreme Mobile that
I have access to.
2010-08-04 00:25:13 +00:00
Oliver Fromme
d191ee22b1 Add support for ATI Radeon HD 4250.
PR:		kern/149041
Submitted by:	olli
Reviewed by:	rnoland
Approved by:	des (mentor)
MFC after:	1 week
2010-08-03 16:30:56 +00:00
Jung-uk Kim
aa9928df7a Remove an unnecessary register load. 2010-08-03 16:08:58 +00:00
Konstantin Belousov
04f3205755 Properly set ifi_datalen for compat32 struct if_data32.
PR:	kern/149240
Submitted by:	Stef Walter <stef memberwebs com>
MFC after:	1 weeks
2010-08-03 15:40:42 +00:00
Jung-uk Kim
3ab42a25a9 savectx() has not been used for fork(2) for about 15 years. [1]
Do not clobber FPU thread's PCB as it is more harmful.  When we resume CPU,
unconditionally reload FPU state.

Pointed out by:	bde [1]
2010-08-03 15:32:08 +00:00