Sascha Wildner [Wed, 12 Feb 2014 17:46:17 +0000 (18:46 +0100)]
acpi: Move osdragonflytbl.c where it belongs in the contrib dir.
Mihai Carabas [Wed, 12 Feb 2014 11:10:38 +0000 (13:10 +0200)]
CPU Topology: add support for Compute Units on AMD processors
Detect shared compute units between cores on AMD processors and downgrade
them to THREAD_LEVEL in the logical CPU topology used by the
scheduler.
Sascha Wildner [Tue, 11 Feb 2014 20:54:14 +0000 (21:54 +0100)]
acpi: Move acdragonfly.h to where all host config files reside.
I will submit the file and the acenv.h adjustment to Intel.
François Tigeot [Tue, 11 Feb 2014 20:17:19 +0000 (21:17 +0100)]
uuidgen(1): Move sources to src/bin
The binary was installed into /bin ; keeping its sources into src/usr.bin
was confusing.
Sascha Wildner [Tue, 11 Feb 2014 17:24:12 +0000 (18:24 +0100)]
acpi: Clean up acdragonfly.h a bit.
* Add ACPI_USE_DO_WHILE_0 to enclose (debug) macros in a do {} while (0)
loop per our style(9).
* Remove unused __cli() and __sti().
* Shuffle things around a bit to reduce #ifdef _KERNEL ... sections.
Sepherosa Ziehau [Tue, 11 Feb 2014 12:21:00 +0000 (20:21 +0800)]
x86_64: Add machdep.cpu.mwait.bm_sts to bypass BM_STS check
Default still applies BM_STS check. Useful for some broken BIOS.
Sascha Wildner [Mon, 10 Feb 2014 19:42:05 +0000 (20:42 +0100)]
kernel/drm: Fix some warnings due to our vm_paddr_t being 64 bits on i386.
Sascha Wildner [Mon, 10 Feb 2014 19:37:08 +0000 (20:37 +0100)]
kernel/i915: Add missing prototype.
Sascha Wildner [Tue, 11 Feb 2014 10:43:51 +0000 (11:43 +0100)]
libutil: Fix a bunch of manual page issues.
Matthew Dillon [Tue, 11 Feb 2014 02:20:30 +0000 (18:20 -0800)]
swapcache - Fix token leak
* vmobjlst tokens can build up in the swapcache thread due to a label
in the wrong place. This eventually panics the box.
Reported-by: ftigeot
Sascha Wildner [Sun, 9 Feb 2014 20:42:03 +0000 (21:42 +0100)]
kernel: Sync ACPICA with Intel's version
20140114.
Module changes:
* Improved validation for AcpiInstallGpeBlock.
* Support "references" in ACPI_OBJECT (mainly for testing purposes).
* Improve support for 32/64 bit physical addresses in printf()-like
output.
Utilities changes:
* iasl(8): Fix a fault when using Connection().
* acpiexec(8): Loading local test tables is now optional.
* acpiexec(8): Support for overlapping operation regions.
* acpiexec(8): Add region handler support for PCI_Config and
EC spaces.
* acpiexec(8): New "test" command.
* Update the copyrights for 2014.
For a more detailed list, see sys/contrib/dev/acpica/changes.txt.
John Marino [Sun, 9 Feb 2014 20:10:05 +0000 (21:10 +0100)]
libutil: Remove expand_number(3)
This new function is functionally identical to dehumanize_number(3).
There is no apparently benefit to have two implementations so I am
removing the new one which is not used anywhere. The manpage was never
hooked into the build (a mistake) so removing it leaves no leftovers.
At the same time, restore the humanize_number man page which had seen
the dehumanize_number function description removed accidently during
the recent libutil sync.
Discussed-with: swildner and dillon
John Marino [Sun, 9 Feb 2014 17:47:52 +0000 (18:47 +0100)]
daemon(8): Add -P, -r, -u options from FreeBSD
This is a full sync with FreeBSD. The DragonFly daemon hasn't been
significantly updated in years. The sync brings in:
option -P supervisor pidfile
This writes the pid of the daemon process in the specified file.
It gets removed automatically similarly to the child pidfile
option -u user
It executes the command using the credentials the the specified
user, and it requires the superuser to invoke it.
option -r restart
This acts like a watchdog and restarts a program that terminates
The update requires an update to libutil in order to use the same
pidfile handling that FreeBSD uses.
John Marino [Sun, 9 Feb 2014 14:21:13 +0000 (15:21 +0100)]
libutil: Various updates from FreeBSD, esp. pid_* functions
It appears that libutil.so is another Frankenstein monster where half
of it came from FreeBSD and later it was updated with NetBSD functions.
Like libm, this causes problems with syncing later.
In order to update the daemon program, the set of pidfile_* functions
had to be brought in from FreeBSD. While doing that, I synced with
FreeBSD as much as possible. The expand number function was added
as well as a dedicated pw_util man page.
Specifically ignored were FreeBSD functionality involving kinfo and kld.
The login functions are essentially incompatible as the FreeBSD ones
require syscntls, so I left the NetBSD versions alone. The various
humanize functions that only exist on DragonFly were also left untouched.
Collateral damage included:
sbin/devd/devd.[ch][ch] (partial sync)
usr.sbin/authpf/authpf.c (partial sync)
usr.sbin/apmd/apmd.c
usr.sbin/battd/battd.c
usr.sbin/bthcid/bthcid.c
usr.sbin/pflogd/pflogd.c
usr.sbin/rwhod/rwhod.c
usr.sbin/syslogd/ (full sync)
usr.sbin/sysvipcd/sysvipcd.c
Sepherosa Ziehau [Sun, 9 Feb 2014 12:19:26 +0000 (20:19 +0800)]
tools/mwait_mon: Monitor mwait C-state hint usage
Sepherosa Ziehau [Sun, 9 Feb 2014 12:18:11 +0000 (20:18 +0800)]
tools/toeplitz: Install to /usr/local/bin
Sepherosa Ziehau [Sun, 9 Feb 2014 12:12:19 +0000 (20:12 +0800)]
x86_64/mwait: Ramp up faster, if all C1 states are iterated
François Tigeot [Sun, 9 Feb 2014 08:24:55 +0000 (09:24 +0100)]
drm/i915: Move more code to intel_pm.c
Taken from i915_dma.c this time
François Tigeot [Sun, 9 Feb 2014 07:59:38 +0000 (08:59 +0100)]
drm/i915: Add intel_pm.c
Move various functions and structures from intel_display.c to this file,
putting them in the same place as they are in Linux.
Sascha Wildner [Sun, 9 Feb 2014 05:44:09 +0000 (06:44 +0100)]
tools/diag: Remove FreeBSD specific 'ac' script.
Sascha Wildner [Sun, 9 Feb 2014 05:27:41 +0000 (06:27 +0100)]
ee(1): Switch over to ee 1.5.2
Taken-from: FreeBSD
Sascha Wildner [Sun, 9 Feb 2014 05:09:01 +0000 (06:09 +0100)]
Merge branch 'vendor/EE'
Sascha Wildner [Sun, 9 Feb 2014 05:08:42 +0000 (06:08 +0100)]
Import ee 1.5.2
Sascha Wildner [Sat, 8 Feb 2014 16:38:54 +0000 (17:38 +0100)]
Add missing newlines at EOF in a couple of files.
Sascha Wildner [Sat, 8 Feb 2014 15:56:24 +0000 (16:56 +0100)]
fetch.1: Use .Mt for email address.
François Tigeot [Sat, 8 Feb 2014 10:37:10 +0000 (11:37 +0100)]
drm: Implement and use drm_send_vblank_event()
François Tigeot [Sat, 8 Feb 2014 09:06:54 +0000 (10:06 +0100)]
drm: Implement mutex_is_locked()
François Tigeot [Fri, 7 Feb 2014 18:15:33 +0000 (19:15 +0100)]
drm: Move drm_open() and drm_firstopen() to drm_fops.c
* That's where they are located on Linux
* Also rename drm_firstopen() to drm_setup() to further reduce
differences
François Tigeot [Fri, 7 Feb 2014 09:56:02 +0000 (10:56 +0100)]
drm/drm_bufs.c: Reduce differences with Linux
Make sure functions have the same prototypes and top of body comments as their
corresponding versions in Linux 3.9
Sepherosa Ziehau [Sat, 8 Feb 2014 11:47:00 +0000 (19:47 +0800)]
acpi/cstate: Remove unnecessary bus_generic_{attach,probe}()
They were inheritted when acpi_cpu_cstate.c was splitted from acpi_cpu.c.
C-state is a leaf device, nothing will be its children.
Sepherosa Ziehau [Sat, 8 Feb 2014 11:42:14 +0000 (19:42 +0800)]
acpica/cpu: Add missing bus_generic_probe
Used by coretemp(4) and perfbias(4). Maybe many others
Sepherosa Ziehau [Fri, 7 Feb 2014 13:16:59 +0000 (21:16 +0800)]
perfbias: Implement Intel performance-energy hint support
This hint is set on per-logical CPU. 0 delivers highest performance;
15 maximizes energy saving. It could be set through sysctl nodes
machdep.perfbiasX (X is the CPU id).
It is linked into i386 and x86_64 GENERIC kernel.
* We may want to make powerd(8) to aware of these sysctls.
Sascha Wildner [Sat, 8 Feb 2014 08:32:24 +0000 (09:32 +0100)]
kernel: Revert the callout_stop_sync() changes in the wlan stack.
Our locking is quite different here and it could cause a deadlock with
ieee80211_newstate_task().
Pointed-out-by: sephe
Sascha Wildner [Sat, 8 Feb 2014 07:49:17 +0000 (08:49 +0100)]
kernel: Use callout_stop_sync() in a number of drivers.
Sascha Wildner [Sat, 8 Feb 2014 07:37:04 +0000 (08:37 +0100)]
callout.9: Mention callout_stop_sync().
Sascha Wildner [Wed, 5 Feb 2014 17:17:37 +0000 (18:17 +0100)]
libc: Create MLINKS for hesiod(3) too when it is requested.
Sascha Wildner [Sat, 8 Feb 2014 05:13:40 +0000 (06:13 +0100)]
Add gcore(1) to the x86_64 build too. It builds and appears to work.
Matthew Dillon [Sat, 8 Feb 2014 04:28:28 +0000 (20:28 -0800)]
ig4 - improve interrupt handling
* Have the interrupt read the data from the rxfifo in order to clear
the interrupt condition, rather than relying on the polling code to
do it.
* Should fix partial ig4 interrupt live-locks. Still under test.
Matthew Dillon [Sat, 8 Feb 2014 03:17:30 +0000 (19:17 -0800)]
cyapa - Reduced polling rate on idle detection
* Reduce the polling rate from 100hz to 20hz when the trackpad is not in
use. This greatly reduces power consumption by the trackpad and cpus.
Power consumption on my Acer C720 drops from ~8.2W to ~7.8W using default
values with this (and the prior I2C interrupt) commit.
* Reduce the polling rate to 1hz when the trackpad is not open.
TODO - we should power-down the trackpad in this situation.
* The idle rate is used whenever the trackpad has been idle more than 1
second.
Matthew Dillon [Sat, 8 Feb 2014 03:13:53 +0000 (19:13 -0800)]
ig4 - Use interrupt to wait for receive data
* The transmit FIFO is typically big enough to hold the full command
so we do not usually hit the DELAY(25) in the poll loop. However,
this is not the case when receiving data.
* Generate an interrupt on stop-bit detection and when a character is
received. Set the receive FIFO threshold to 1. Our polling loop works
the same way but this allows us to use lksleep() instead of DELAY(25)
when waiting for receive data.
* Reduces cpu overhead very significantly. The cyapa (trackpad) driver
polling at 100hz previously ate 10% of the cpu and now only uses 2%
or less when fully active.
Sascha Wildner [Sat, 8 Feb 2014 02:02:23 +0000 (03:02 +0100)]
gcore(1): Remove no longer needed prototype.
Sascha Wildner [Sat, 8 Feb 2014 01:54:21 +0000 (02:54 +0100)]
gcore(1): Remove sparc specific core image handling.
Sepherosa Ziehau [Fri, 7 Feb 2014 12:55:02 +0000 (20:55 +0800)]
cpu: Add necessary bits to detect existance of PERF_BIAS MSR
Sepherosa Ziehau [Fri, 7 Feb 2014 12:36:16 +0000 (20:36 +0800)]
x86_64: Factor out cpu_mwait_attach
Sepherosa Ziehau [Thu, 6 Feb 2014 13:43:25 +0000 (21:43 +0800)]
x86_64: Turbo is now reported along w/ "Thermal and PM features"
No need to do it again.
John Marino [Thu, 6 Feb 2014 13:33:01 +0000 (14:33 +0100)]
install(1): Fix 2.5 y/o verbose bug, use static functions
A bug was introduced by this commit to add the -D option:
a2bc4e56d4ab068fea12d65d13740b7a600769a8 (7 SEP 11)
It changed the -v verbose option from standalone to expecting input and
as a result, any use of -v caused the usage screen to come up. Fixed.
Additionally, the pathnames.h header is unused, removed now.
Finally, several functions were turned into static functions and explicit
void casts were used when functions normally return integers. The last
two change sets converge with FreeBSD.
xinstall has not been seriously updated in a long time and has fallen
behind BSD counterparts. Syncing with FreeBSD may take several steps as
there is significant divergence and options (e.g. -l) do different things
on FreeBSD
Sepherosa Ziehau [Thu, 6 Feb 2014 13:28:29 +0000 (21:28 +0800)]
x86_64: Print TURBO and SENSOR for "Thermal and PM features"
Sepherosa Ziehau [Thu, 6 Feb 2014 13:21:58 +0000 (21:21 +0800)]
altq: Byte counter is not compat w/ RED or RIO AQM
For altq packet schedulers, use packet counter should be enough.
Reported-by: Pierre Abbat
Sepherosa Ziehau [Thu, 6 Feb 2014 12:34:28 +0000 (20:34 +0800)]
acpica: Disable debug message by default
Sepherosa Ziehau [Thu, 6 Feb 2014 11:56:59 +0000 (19:56 +0800)]
mwait/spin: Push sysctl into machdep code
On x86_64, make the sysctl read only. Sysctl machdep.mwait.CX.spin
should be used to configure the mwait hint.
Manipulate mwait hint value directly through hw.cpu_mwait_halt is not
safe, e.g. intr cputimer may need change for deep cpu specific C-state.
Sepherosa Ziehau [Thu, 6 Feb 2014 11:46:22 +0000 (19:46 +0800)]
x86_64: Make sysctl hw.cpu_mwait_halt read only
Sysctl machdep.mwait.CX.idle should be used to configure mwait hint.
Manipulate mwait hint value directly through hw.cpu_mwait_halt is not
safe, e.g. intr cputimer may need change for deep cpu specific C-state.
Sepherosa Ziehau [Thu, 6 Feb 2014 11:45:08 +0000 (19:45 +0800)]
mwait: Staticize cpu_mwait_halt
It is only used in machdep code.
John Marino [Thu, 6 Feb 2014 11:22:53 +0000 (12:22 +0100)]
patch(1): Sync with FreeBSD
FreeBSD has taken our patch(1) completely (29 JAN 2013), forked it, and
has improved on it. It's a relatively simple sync. Selected change log:
More user friendly:
- Ask only once for "apply anyway"
- Tell user which patch failed rather than only # of hunk failures
Handle lines with null character:
- read buffer for pgets properly populated
- callers of pgets still misprocess buffer contents, but at least
pgets is more accurate
Make "patch < fubar" and "patch -i fubar" equivalent:
- previous behavior was source of "unexpected end of file in patch"
errors when null characters came from stdin
Fixed error handling where final fclose got skipped
Fixed target selection logic to match was was documented on man page
Synced with OpenBSD base
Sepherosa Ziehau [Wed, 5 Feb 2014 13:09:30 +0000 (21:09 +0800)]
x86_64/mwait: Cap idle repeat stats
So we could react to sudden busy much faster. Deep cpu specific C-state
usually takes longer to complete the transition.
Sepherosa Ziehau [Wed, 5 Feb 2014 12:48:41 +0000 (20:48 +0800)]
x86_64/mwait: Start auto tuning from C1
Sepherosa Ziehau [Wed, 5 Feb 2014 12:43:04 +0000 (20:43 +0800)]
x86_64: Fix up the setting of BM_STS
Eitan Adler [Wed, 5 Feb 2014 02:01:58 +0000 (21:01 -0500)]
libc/net: fix a portability issue
* POSIX does not require socklen_t to be unsigned
Submitted by: bde@freebsd.org
Obtained-from: FreeBSD
François Tigeot [Tue, 4 Feb 2014 21:21:40 +0000 (22:21 +0100)]
drm: Sync a few headers with Linux 3.8
François Tigeot [Tue, 4 Feb 2014 21:06:15 +0000 (22:06 +0100)]
drm: Sync drm_fb_helper files with Linux 3.8
John Marino [Mon, 3 Feb 2014 23:12:32 +0000 (00:12 +0100)]
fetch(1), libfetch: Sync with FreeBSD
Changes include:
* Increase buffer size from 4K to 16K
* Include Accept header in requests
* Implement certificate verification
* libfetch support
Sepherosa Ziehau [Mon, 3 Feb 2014 14:42:08 +0000 (22:42 +0800)]
x86_64: Rework cpu specific C-state auto tuning
Sepherosa Ziehau [Mon, 3 Feb 2014 14:05:55 +0000 (22:05 +0800)]
x86_64: Use per-cpu stats for idle
Sepherosa Ziehau [Mon, 3 Feb 2014 11:35:44 +0000 (19:35 +0800)]
x86_64: Check preamble operation before allowing deep cpu specific C-state
Sascha Wildner [Mon, 3 Feb 2014 00:40:21 +0000 (01:40 +0100)]
libthread_xu: Properly inherit the creating thread's sched_priority.
When a new thread is created with the inheritsched attribute set to
PTHREAD_INHERIT_SCHED, then it must inherit the sched_priority
scheduling parameter from the creating thread, because POSIX sez:
"The following thread scheduling attributes defined by POSIX.1-2008
are affected by the inheritsched attribute: [...], scheduling parameters
(schedparam), [...]"
Also:
"For SCHED_FIFO and SCHED_RR, the only required member of the sched_param
structure is the priority sched_priority. For SCHED_OTHER, the affected
scheduling parameters are implementation-defined."
For SCHED_OTHER, it will currently inherit the creating thread's
sched_priority too. We'll see if that poses a problem.
Sascha Wildner [Sun, 2 Feb 2014 23:04:32 +0000 (00:04 +0100)]
kernel/sched_setscheduler: Fix return value.
sched_setscheduler() shall return EINVAL "if one or more of the
parameters contained in param is outside the valid range for the
specified scheduling policy."
Sascha Wildner [Sun, 2 Feb 2014 22:41:30 +0000 (23:41 +0100)]
pthread_attr.3: Adjust pthread_attr_setinheritsched() return value.
Sascha Wildner [Sun, 2 Feb 2014 22:40:12 +0000 (23:40 +0100)]
libthread_xu: Fix wrong return value in pthread_attr_setinheritsched().
If it fails because of an invalid inheritsched, EINVAL must be returned.
Sascha Wildner [Sun, 2 Feb 2014 22:37:29 +0000 (23:37 +0100)]
libc_r: Add inheritsched check in pthread_attr_setinheritsched().
Per POSIX, "the supported values of inheritsched shall be:
PTHREAD_INHERIT_SCHED
[...]
PTHREAD_EXPLICIT_SCHED
[...]"
And, "the pthread_attr_setinheritsched() function may fail if:
[EINVAL]
The value of inheritsched is not valid."
Sascha Wildner [Sun, 2 Feb 2014 22:33:55 +0000 (23:33 +0100)]
libc_r: Check attr.sched_inherit for PTHREAD_INHERIT_SCHED, not attr.flags.
Sascha Wildner [Sun, 2 Feb 2014 17:57:01 +0000 (18:57 +0100)]
libc: __sys_fork() and _fork() are no more.
Sascha Wildner [Sun, 2 Feb 2014 17:56:12 +0000 (18:56 +0100)]
libc_r: Fix up for the recent sysvipc work.
Sepherosa Ziehau [Sun, 2 Feb 2014 13:48:19 +0000 (21:48 +0800)]
x86_64: Implement idle mwait hint auto tuning
The tuning is based on gd_idle_repeat. The higher the gd_idle_repeat,
the deeper cpu specific C-state the current CPU will enter.
The idle mwait hint auto tuning could be enabled by setting sysctl
machdep.mwait.CX.idle to "AUTO" or "AUTODEEP":
"AUTO" -- C0 ~ C2
"AUTODEEP" -- C0 ~ deepest cpu specific C-state
This will allow us to enter deepest cpu specific C-state, even if ACPI
does not map its deepest C-State to the deepest cpu specific C-state.
NOTE:
AUTODEEP and C3+ cpu specific C-state is not bullet prove yet. We need
to get the bus master operations information from ACPI.
Sepherosa Ziehau [Sun, 2 Feb 2014 12:53:41 +0000 (20:53 +0800)]
x86_64: Save mwait hints
These two arrays will be used to implement mwait hint auto tuning.
Sascha Wildner [Sun, 2 Feb 2014 12:12:44 +0000 (13:12 +0100)]
libc_r: Compile with our default CSTD (gnu99) and raise WARNS to 2.
Sascha Wildner [Sun, 2 Feb 2014 10:27:24 +0000 (11:27 +0100)]
libc: Silence another -Wtype-limits (socklen_t is unsigned).
Sascha Wildner [Sun, 2 Feb 2014 00:05:58 +0000 (01:05 +0100)]
libc: __atfork() is only used by the WR() in this file, so make it static.
Also mark it __used.
This silences a -Wmissing-prototypes warning.
Sascha Wildner [Sat, 1 Feb 2014 21:45:45 +0000 (22:45 +0100)]
libc: Fix -Wmissing-field-initializer for FAKE_FILE usages.
While here, use PTHREAD_MUTEX_INITIALIZER for _fl_mutex initialization.
Sascha Wildner [Sat, 1 Feb 2014 19:25:55 +0000 (20:25 +0100)]
libc: Fix some -Wunused-parameter.
Sepherosa Ziehau [Sat, 1 Feb 2014 14:11:53 +0000 (22:11 +0800)]
x86_64/mwait: Request proper intr cputimer, if C3+ is used as hint
Though mwait's hint uses CPU specific C-state, we still believe that
C3+ hints are deep C-states, which may cause certain type of intr
cputimer hang (e.g. LAPIC intr cputimer on CPUs w/o ARAT).
While I'm here, make sure that mwait hint could not be changed on CPUs
that do not support monitor/mwait or mwait hint.
Sepherosa Ziehau [Sat, 1 Feb 2014 13:15:53 +0000 (21:15 +0800)]
cputimer/intr: Move powersaving intr cputimer switching to kern_cputimer.c
While I'm here fix several bugs:
- Don't take ERESTART as error
- Use serializer to protect the number of power saving request. Using
atomic_fetchadd_int is not enough here:
The first power saving request could fail. However, before its failure,
other power saving request could be successful, since the intr cputimer
switch is skipped.
Sascha Wildner [Sat, 1 Feb 2014 07:13:58 +0000 (08:13 +0100)]
rcrun(8): Rename $i, $j and $k to (more) meaningful names.
Sascha Wildner [Sat, 1 Feb 2014 07:02:23 +0000 (08:02 +0100)]
rcrun(8): Read /etc/rc.conf too for overrides of $local_startup.
Sascha Wildner [Fri, 31 Jan 2014 18:52:41 +0000 (19:52 +0100)]
bsd-family-tree: Sync with FreeBSD (for FreeBSD 2.2.9 and NetBSD 6.1.3).
Sascha Wildner [Fri, 31 Jan 2014 18:50:08 +0000 (19:50 +0100)]
kernel/x86_64: Make a function argument const (fixes a new warning).
Sepherosa Ziehau [Fri, 31 Jan 2014 12:02:08 +0000 (20:02 +0800)]
x86_64: Add new sysctls to set idle/spin mwait hint
These sysctls verify that the mwait hint is supported. It's format is:
C-state/sub-state. The valid one could be picked up from the output of
sysctl machdep.mwait.CX.supported.
Sysctls hw.cpu_mwait_{halt,spin} should be deprecated.
While I'm here, rearrange cpu_mwait_hint_valid() a little bit.
Sepherosa Ziehau [Fri, 31 Jan 2014 09:20:08 +0000 (17:20 +0800)]
x86_64: Export Cx support list through sysctl machdep.mwait.CX.supported
The format is: C-state/sub-state
Sepherosa Ziehau [Thu, 30 Jan 2014 16:16:35 +0000 (00:16 +0800)]
acpi/cpu: Remove the cpux naming hack
Used to avoid name conflict between C-state module and cpu module
Sascha Wildner [Thu, 30 Jan 2014 14:23:52 +0000 (15:23 +0100)]
libc/net: Fix some issues in our inet6_opt_init() (from RFC 3542).
* The RFC says (in section 10.1) that only when extbuf is not NULL,
extlen shall be checked, so don't perform this check when NULL is
passed.
* socklen_t is unsigned, so checking extlen for less than zero is
not needed.
Sepherosa Ziehau [Thu, 30 Jan 2014 09:56:16 +0000 (17:56 +0800)]
acpi/cstate/x86_64: Implement native C-state support for Intel CPUs
The native C-state on Intel CPUs is entered using monitor/mwait w/ the
help from mwait hint (eax) and extension (ecx, break upon interrupt).
We still need to keep an eye on native C1 state. Currently C1 state
only uses "sti;halt".
Sepherosa Ziehau [Thu, 30 Jan 2014 06:50:16 +0000 (14:50 +0800)]
acpi/cstate: Allow fixed hardware GAS for C1, which means "sti;halt"
Add comment we still need to filter Intel's "C1 I/O then halt". It
probably won't be problem, since the related bit is not set in _OSC
or _PDC.
Sepherosa Ziehau [Thu, 30 Jan 2014 04:24:58 +0000 (12:24 +0800)]
acpi/cstate: Fix resource leakage
Sepherosa Ziehau [Thu, 30 Jan 2014 04:01:55 +0000 (12:01 +0800)]
acpi/cstate: Use boolean_t for acpi_cst_disable_idle
Sepherosa Ziehau [Thu, 30 Jan 2014 03:51:05 +0000 (11:51 +0800)]
acpi/cstate: Rework preamble operation for entering C-state
- Save preamble operation in C-state struct, instead of choosing
preamble operation at run time
- Add machine depend C-state setup code to optimize out certain
preamble operation for various CPU vendors
- Fix up generic preamble operation setup according to ACPI spec
Markus Pfeiffer [Wed, 29 Jan 2014 21:37:00 +0000 (21:37 +0000)]
jails/netinet6: unbreak source selection after cfd7912
Commit cfd7912 broke source address selection for the host. It
selected link-local addresses for local global routeable addresses.
Reported-By: ftigeot
Johannes Hofmann [Wed, 29 Jan 2014 20:30:02 +0000 (21:30 +0100)]
taskqueue: locking fix
Remove leftover TQ_UNLOCK() call from taskqueue_enqueue_locked()
error case.
Sepherosa Ziehau [Mon, 27 Jan 2014 13:13:14 +0000 (21:13 +0800)]
acpi/cstate: Add a method to per C-state softc to enter the C-state
This will be used to add "native" C-state support
Sepherosa Ziehau [Mon, 27 Jan 2014 12:49:02 +0000 (20:49 +0800)]
acpi/cstate: Make sure that idle hook is installed as the last step
Sepherosa Ziehau [Mon, 27 Jan 2014 12:47:10 +0000 (20:47 +0800)]
acpi/cstate: If there is bus master activity pick up non-C3 is enough
Since bus master activity is only checked before entering C3+ states.
Sepherosa Ziehau [Mon, 27 Jan 2014 12:40:47 +0000 (20:40 +0800)]
acpi/cstate: Rearrange _CST reprobe code path
Sepherosa Ziehau [Mon, 27 Jan 2014 12:30:23 +0000 (20:30 +0800)]
acpi/cstate: Save ACPI_GENERIC_ADDRESS for later use
Also fix a bug that 'res_type' should be used instead of 'type' during
FADT C state resource allocation.