Skip to content

Commit 3f7df3e

Browse files
author
Ingo Molnar
committed
Merge tag 'v4.16-rc3' into x86/mm, to pick up fixes
Signed-off-by: Ingo Molnar <[email protected]>
2 parents 39b9552 + 4a3928c commit 3f7df3e

File tree

676 files changed

+6784
-4161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

676 files changed

+6784
-4161
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,7 @@ all.config
127127

128128
# Kdevelop4
129129
*.kdev4
130+
131+
#Automatically generated by ASN.1 compiler
132+
net/ipv4/netfilter/nf_nat_snmp_basic-asn1.c
133+
net/ipv4/netfilter/nf_nat_snmp_basic-asn1.h
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
What: /sys/devices/platform/dock.N/docked
2+
Date: Dec, 2006
3+
KernelVersion: 2.6.19
4+
5+
Description:
6+
(RO) Value 1 or 0 indicates whether the software believes the
7+
laptop is docked in a docking station.
8+
9+
What: /sys/devices/platform/dock.N/undock
10+
Date: Dec, 2006
11+
KernelVersion: 2.6.19
12+
13+
Description:
14+
(WO) Writing to this file causes the software to initiate an
15+
undock request to the firmware.
16+
17+
What: /sys/devices/platform/dock.N/uid
18+
Date: Feb, 2007
19+
KernelVersion: v2.6.21
20+
21+
Description:
22+
(RO) Displays the docking station the laptop is docked to.
23+
24+
What: /sys/devices/platform/dock.N/flags
25+
Date: May, 2007
26+
KernelVersion: v2.6.21
27+
28+
Description:
29+
(RO) Show dock station flags, useful for checking if undock
30+
request has been made by the user (from the immediate_undock
31+
option).
32+
33+
What: /sys/devices/platform/dock.N/type
34+
Date: Aug, 2008
35+
KernelVersion: v2.6.27
36+
37+
Description:
38+
(RO) Display the dock station type- dock_station, ata_bay or
39+
battery_bay.

Documentation/ABI/testing/sysfs-devices-system-cpu

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ Description: CPU topology files that describe a logical CPU's relationship
108108

109109
What: /sys/devices/system/cpu/cpuidle/current_driver
110110
/sys/devices/system/cpu/cpuidle/current_governer_ro
111+
/sys/devices/system/cpu/cpuidle/available_governors
112+
/sys/devices/system/cpu/cpuidle/current_governor
111113
Date: September 2007
112114
Contact: Linux kernel mailing list <[email protected]>
113115
Description: Discover cpuidle policy and mechanism
@@ -119,13 +121,84 @@ Description: Discover cpuidle policy and mechanism
119121
Idle policy (governor) is differentiated from idle mechanism
120122
(driver)
121123

122-
current_driver: displays current idle mechanism
124+
current_driver: (RO) displays current idle mechanism
123125

124-
current_governor_ro: displays current idle policy
126+
current_governor_ro: (RO) displays current idle policy
127+
128+
With the cpuidle_sysfs_switch boot option enabled (meant for
129+
developer testing), the following three attributes are visible
130+
instead:
131+
132+
current_driver: same as described above
133+
134+
available_governors: (RO) displays a space separated list of
135+
available governors
136+
137+
current_governor: (RW) displays current idle policy. Users can
138+
switch the governor at runtime by writing to this file.
125139

126140
See files in Documentation/cpuidle/ for more information.
127141

128142

143+
What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name
144+
/sys/devices/system/cpu/cpuX/cpuidle/stateN/latency
145+
/sys/devices/system/cpu/cpuX/cpuidle/stateN/power
146+
/sys/devices/system/cpu/cpuX/cpuidle/stateN/time
147+
/sys/devices/system/cpu/cpuX/cpuidle/stateN/usage
148+
Date: September 2007
149+
KernelVersion: v2.6.24
150+
Contact: Linux power management list <[email protected]>
151+
Description:
152+
The directory /sys/devices/system/cpu/cpuX/cpuidle contains per
153+
logical CPU specific cpuidle information for each online cpu X.
154+
The processor idle states which are available for use have the
155+
following attributes:
156+
157+
name: (RO) Name of the idle state (string).
158+
159+
latency: (RO) The latency to exit out of this idle state (in
160+
microseconds).
161+
162+
power: (RO) The power consumed while in this idle state (in
163+
milliwatts).
164+
165+
time: (RO) The total time spent in this idle state (in microseconds).
166+
167+
usage: (RO) Number of times this state was entered (a count).
168+
169+
170+
What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc
171+
Date: February 2008
172+
KernelVersion: v2.6.25
173+
Contact: Linux power management list <[email protected]>
174+
Description:
175+
(RO) A small description about the idle state (string).
176+
177+
178+
What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/disable
179+
Date: March 2012
180+
KernelVersion: v3.10
181+
Contact: Linux power management list <[email protected]>
182+
Description:
183+
(RW) Option to disable this idle state (bool). The behavior and
184+
the effect of the disable variable depends on the implementation
185+
of a particular governor. In the ladder governor, for example,
186+
it is not coherent, i.e. if one is disabling a light state, then
187+
all deeper states are disabled as well, but the disable variable
188+
does not reflect it. Likewise, if one enables a deep state but a
189+
lighter state still is disabled, then this has no effect.
190+
191+
192+
What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/residency
193+
Date: March 2014
194+
KernelVersion: v3.15
195+
Contact: Linux power management list <[email protected]>
196+
Description:
197+
(RO) Display the target residency i.e. the minimum amount of
198+
time (in microseconds) this cpu should spend in this idle state
199+
to make the transition worth the effort.
200+
201+
129202
What: /sys/devices/system/cpu/cpu#/cpufreq/*
130203
Date: pre-git history
131204
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
What: /sys/bus/platform/devices/INT3407:00/dptf_power/charger_type
2+
Date: Jul, 2016
3+
KernelVersion: v4.10
4+
5+
Description:
6+
(RO) The charger type - Traditional, Hybrid or NVDC.
7+
8+
What: /sys/bus/platform/devices/INT3407:00/dptf_power/adapter_rating_mw
9+
Date: Jul, 2016
10+
KernelVersion: v4.10
11+
12+
Description:
13+
(RO) Adapter rating in milliwatts (the maximum Adapter power).
14+
Must be 0 if no AC Adaptor is plugged in.
15+
16+
What: /sys/bus/platform/devices/INT3407:00/dptf_power/max_platform_power_mw
17+
Date: Jul, 2016
18+
KernelVersion: v4.10
19+
20+
Description:
21+
(RO) Maximum platform power that can be supported by the battery
22+
in milliwatts.
23+
24+
What: /sys/bus/platform/devices/INT3407:00/dptf_power/platform_power_source
25+
Date: Jul, 2016
26+
KernelVersion: v4.10
27+
28+
Description:
29+
(RO) Display the platform power source
30+
0x00 = DC
31+
0x01 = AC
32+
0x02 = USB
33+
0x03 = Wireless Charger
34+
35+
What: /sys/bus/platform/devices/INT3407:00/dptf_power/battery_steady_power
36+
Date: Jul, 2016
37+
KernelVersion: v4.10
38+
39+
Description:
40+
(RO) The maximum sustained power for battery in milliwatts.

Documentation/atomic_bitops.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ Like with atomic_t, the rule of thumb is:
5858

5959
- RMW operations that have a return value are fully ordered.
6060

61-
Except for test_and_set_bit_lock() which has ACQUIRE semantics and
61+
- RMW operations that are conditional are unordered on FAILURE,
62+
otherwise the above rules apply. In the case of test_and_{}_bit() operations,
63+
if the bit in memory is unchanged by the operation then it is deemed to have
64+
failed.
65+
66+
Except for a successful test_and_set_bit_lock() which has ACQUIRE semantics and
6267
clear_bit_unlock() which has RELEASE semantics.
6368

6469
Since a platform only has a single means of achieving atomic operations
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Binding for MIPS Cluster Power Controller (CPC).
2+
3+
This binding allows a system to specify where the CPC registers are
4+
located.
5+
6+
Required properties:
7+
compatible : Should be "mti,mips-cpc".
8+
regs: Should describe the address & size of the CPC register region.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#
2+
# Feature name: membarrier-sync-core
3+
# Kconfig: ARCH_HAS_MEMBARRIER_SYNC_CORE
4+
# description: arch supports core serializing membarrier
5+
#
6+
# Architecture requirements
7+
#
8+
# * arm64
9+
#
10+
# Rely on eret context synchronization when returning from IPI handler, and
11+
# when returning to user-space.
12+
#
13+
# * x86
14+
#
15+
# x86-32 uses IRET as return from interrupt, which takes care of the IPI.
16+
# However, it uses both IRET and SYSEXIT to go back to user-space. The IRET
17+
# instruction is core serializing, but not SYSEXIT.
18+
#
19+
# x86-64 uses IRET as return from interrupt, which takes care of the IPI.
20+
# However, it can return to user-space through either SYSRETL (compat code),
21+
# SYSRETQ, or IRET.
22+
#
23+
# Given that neither SYSRET{L,Q}, nor SYSEXIT, are core serializing, we rely
24+
# instead on write_cr3() performed by switch_mm() to provide core serialization
25+
# after changing the current mm, and deal with the special case of kthread ->
26+
# uthread (temporarily keeping current mm into active_mm) by issuing a
27+
# sync_core_before_usermode() in that specific case.
28+
#
29+
-----------------------
30+
| arch |status|
31+
-----------------------
32+
| alpha: | TODO |
33+
| arc: | TODO |
34+
| arm: | TODO |
35+
| arm64: | ok |
36+
| blackfin: | TODO |
37+
| c6x: | TODO |
38+
| cris: | TODO |
39+
| frv: | TODO |
40+
| h8300: | TODO |
41+
| hexagon: | TODO |
42+
| ia64: | TODO |
43+
| m32r: | TODO |
44+
| m68k: | TODO |
45+
| metag: | TODO |
46+
| microblaze: | TODO |
47+
| mips: | TODO |
48+
| mn10300: | TODO |
49+
| nios2: | TODO |
50+
| openrisc: | TODO |
51+
| parisc: | TODO |
52+
| powerpc: | TODO |
53+
| s390: | TODO |
54+
| score: | TODO |
55+
| sh: | TODO |
56+
| sparc: | TODO |
57+
| tile: | TODO |
58+
| um: | TODO |
59+
| unicore32: | TODO |
60+
| x86: | ok |
61+
| xtensa: | TODO |
62+
-----------------------

Documentation/gpu/tve200.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
==================================
44

55
.. kernel-doc:: drivers/gpu/drm/tve200/tve200_drv.c
6-
:doc: Faraday TV Encoder 200
6+
:doc: Faraday TV Encoder TVE200 DRM Driver

Documentation/i2c/busses/i2c-i801

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ Supported adapters:
2828
* Intel Wildcat Point (PCH)
2929
* Intel Wildcat Point-LP (PCH)
3030
* Intel BayTrail (SOC)
31+
* Intel Braswell (SOC)
3132
* Intel Sunrise Point-H (PCH)
3233
* Intel Sunrise Point-LP (PCH)
34+
* Intel Kaby Lake-H (PCH)
3335
* Intel DNV (SOC)
3436
* Intel Broxton (SOC)
3537
* Intel Lewisburg (PCH)

Documentation/locking/mutex-design.txt

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,23 @@ Implementation
2121
--------------
2222

2323
Mutexes are represented by 'struct mutex', defined in include/linux/mutex.h
24-
and implemented in kernel/locking/mutex.c. These locks use a three
25-
state atomic counter (->count) to represent the different possible
26-
transitions that can occur during the lifetime of a lock:
27-
28-
1: unlocked
29-
0: locked, no waiters
30-
negative: locked, with potential waiters
31-
32-
In its most basic form it also includes a wait-queue and a spinlock
33-
that serializes access to it. CONFIG_SMP systems can also include
34-
a pointer to the lock task owner (->owner) as well as a spinner MCS
35-
lock (->osq), both described below in (ii).
24+
and implemented in kernel/locking/mutex.c. These locks use an atomic variable
25+
(->owner) to keep track of the lock state during its lifetime. Field owner
26+
actually contains 'struct task_struct *' to the current lock owner and it is
27+
therefore NULL if not currently owned. Since task_struct pointers are aligned
28+
at at least L1_CACHE_BYTES, low bits (3) are used to store extra state (e.g.,
29+
if waiter list is non-empty). In its most basic form it also includes a
30+
wait-queue and a spinlock that serializes access to it. Furthermore,
31+
CONFIG_MUTEX_SPIN_ON_OWNER=y systems use a spinner MCS lock (->osq), described
32+
below in (ii).
3633

3734
When acquiring a mutex, there are three possible paths that can be
3835
taken, depending on the state of the lock:
3936

40-
(i) fastpath: tries to atomically acquire the lock by decrementing the
41-
counter. If it was already taken by another task it goes to the next
42-
possible path. This logic is architecture specific. On x86-64, the
43-
locking fastpath is 2 instructions:
44-
45-
0000000000000e10 <mutex_lock>:
46-
e21: f0 ff 0b lock decl (%rbx)
47-
e24: 79 08 jns e2e <mutex_lock+0x1e>
48-
49-
the unlocking fastpath is equally tight:
50-
51-
0000000000000bc0 <mutex_unlock>:
52-
bc8: f0 ff 07 lock incl (%rdi)
53-
bcb: 7f 0a jg bd7 <mutex_unlock+0x17>
54-
37+
(i) fastpath: tries to atomically acquire the lock by cmpxchg()ing the owner with
38+
the current task. This only works in the uncontended case (cmpxchg() checks
39+
against 0UL, so all 3 state bits above have to be 0). If the lock is
40+
contended it goes to the next possible path.
5541

5642
(ii) midpath: aka optimistic spinning, tries to spin for acquisition
5743
while the lock owner is running and there are no other tasks ready
@@ -143,11 +129,10 @@ Test if the mutex is taken:
143129
Disadvantages
144130
-------------
145131

146-
Unlike its original design and purpose, 'struct mutex' is larger than
147-
most locks in the kernel. E.g: on x86-64 it is 40 bytes, almost twice
148-
as large as 'struct semaphore' (24 bytes) and tied, along with rwsems,
149-
for the largest lock in the kernel. Larger structure sizes mean more
150-
CPU cache and memory footprint.
132+
Unlike its original design and purpose, 'struct mutex' is among the largest
133+
locks in the kernel. E.g: on x86-64 it is 32 bytes, where 'struct semaphore'
134+
is 24 bytes and rw_semaphore is 40 bytes. Larger structure sizes mean more CPU
135+
cache and memory footprint.
151136

152137
When to use mutexes
153138
-------------------

0 commit comments

Comments
 (0)