Erwin fired up a ports build a couple of weeks ago and it seems the
following functions are not used by any of the 20k ports we have, which
makes me believe they don't have any purpose. Just remove them.
jhb [Fri, 6 Aug 2010 15:36:59 +0000 (15:36 +0000)]
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.
jhb [Fri, 6 Aug 2010 15:15:26 +0000 (15:15 +0000)]
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.
jhb [Fri, 6 Aug 2010 15:09:21 +0000 (15:09 +0000)]
Ethernet vlan(4) interfaces have valid Ethernet link layer addresses but
use a different interface type (IFT_L2VLAN vs IFT_ETHER). Treat IFT_L2VLAN
interfaces like IFT_ETHER interfaces when handling link layer addresses.
csjp [Fri, 6 Aug 2010 15:04:40 +0000 (15:04 +0000)]
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).
jkim [Fri, 6 Aug 2010 15:04:01 +0000 (15:04 +0000)]
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.
kib [Fri, 6 Aug 2010 09:42:15 +0000 (09:42 +0000)]
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.
jchandra [Fri, 6 Aug 2010 09:25:42 +0000 (09:25 +0000)]
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.
jchandra [Fri, 6 Aug 2010 07:32:33 +0000 (07:32 +0000)]
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.
yongari [Fri, 6 Aug 2010 00:50:16 +0000 (00:50 +0000)]
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.
pjd [Thu, 5 Aug 2010 19:16:31 +0000 (19:16 +0000)]
Implement configuration reload on SIGHUP. This includes:
- Load added resources.
- Stop and forget removed resources.
- Update modified resources in least intrusive way, ie. don't touch
/dev/hast/<name> unless path to local component or provider name were
modified.
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
MFC after: 1 month
pjd [Thu, 5 Aug 2010 19:08:54 +0000 (19:08 +0000)]
Prepare configuration parsing code to be called multiple times:
- Don't exit on errors if not requested.
- Don't keep configuration in global variable, but allocate memory for
configuration.
- Call yyrestart() before yyparse() so that on error in configuration file
we will start from the begining next time and not from the place we left of.
jkim [Thu, 5 Aug 2010 18:48:30 +0000 (18:48 +0000)]
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.
pjd [Thu, 5 Aug 2010 18:26:38 +0000 (18:26 +0000)]
Problem with assertion is that it logs on stderr. Add two macros:
PJDLOG_ASSERT() and PJDLOG_VERIFY() that will check the given condition
and log the problem where appropriate. The difference between those
two is that PJDLOG_VERIFY() always work and PJDLOG_ASSERT() can be
turned off by defining NDEBUG.
pjd [Thu, 5 Aug 2010 17:56:41 +0000 (17:56 +0000)]
Add an argument to the proto_register() function which allows protocol to
declare it is the default and be placed at the end of the queue so it is
checked last.
jhb [Thu, 5 Aug 2010 17:48:37 +0000 (17:48 +0000)]
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.
jhb [Thu, 5 Aug 2010 16:10:12 +0000 (16:10 +0000)]
- 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.
olli [Thu, 5 Aug 2010 15:53:33 +0000 (15:53 +0000)]
Add a daily script to the periodic framework that reports
changes to the package database, i.e. any packages that
have been added, updated or deleted in the past 24 hours.
The format is intentionally simple and concise.
That information is particularly useful on servers that
are maintained by multiple administrators. When someone
adds, updates or deletes a package, the others will see
it in the daily periodic output.
This script is disabled by default.
PR: conf/113913
Submitted by: olli
Approved by: des (mentor)
MFC after: 3 weeks
neel [Thu, 5 Aug 2010 04:59:54 +0000 (04:59 +0000)]
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.
ache [Thu, 5 Aug 2010 01:39:25 +0000 (01:39 +0000)]
Comment out IEEE Std 1003.1-2001 conformance proclaimed too early,
see problems described in the comment to:
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/128933
jchandra [Wed, 4 Aug 2010 14:12:09 +0000 (14:12 +0000)]
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
gavin [Wed, 4 Aug 2010 07:49:40 +0000 (07:49 +0000)]
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
alc [Wed, 4 Aug 2010 05:09:02 +0000 (05:09 +0000)]
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".)
delphij [Wed, 4 Aug 2010 00:25:13 +0000 (00:25 +0000)]
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.
uqs [Tue, 3 Aug 2010 20:56:23 +0000 (20:56 +0000)]
grdc(6): de-obfuscate the timekeeping of now/delay
- 'now' only contains current time readings
- delay is only used as parameter to nanosleep
- prev_sec contains the time_t of the previous loop iteration
uqs [Tue, 3 Aug 2010 16:02:57 +0000 (16:02 +0000)]
grdc(6): Partial backout of r210755
The previous revision was flawed in numerous ways:
- the if condition would depend on garbage stack values
- grdc(6) would loop n times, not n seconds. This only makes
a difference if it takes more than 1 second to recalculate/redraw
the display.
- style(9) violations
The following change adds argument checking and tracks the elapsed time
between loops explicitly and will exit after roughly n seconds.
jkim [Tue, 3 Aug 2010 15:32:08 +0000 (15:32 +0000)]
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.