Skip to content

Commit 34f6d2c

Browse files
committed
Merge tag 'v4.4.1' into linux-linaro-lsk-v4.4
This is the 4.4.1 stable release # gpg: Signature made Sun 31 Jan 2016 19:29:43 GMT using RSA key ID 6092693E # gpg: Good signature from "Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 647F 2865 4894 E3BD 4571 99BE 38DB BDC8 6092 693E
2 parents afd2ff9 + f1ab5ea commit 34f6d2c

80 files changed

Lines changed: 644 additions & 280 deletions

Some content is hidden

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

Documentation/ABI/testing/sysfs-bus-usb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,21 @@ Description:
134134
enabled for the device. Developer can write y/Y/1 or n/N/0 to
135135
the file to enable/disable the feature.
136136

137-
What: /sys/bus/usb/devices/.../power/usb3_hardware_lpm
138-
Date: June 2015
137+
What: /sys/bus/usb/devices/.../power/usb3_hardware_lpm_u1
138+
/sys/bus/usb/devices/.../power/usb3_hardware_lpm_u2
139+
Date: November 2015
139140
Contact: Kevin Strasser <kevin.strasser@linux.intel.com>
141+
Lu Baolu <baolu.lu@linux.intel.com>
140142
Description:
141143
If CONFIG_PM is set and a USB 3.0 lpm-capable device is plugged
142144
in to a xHCI host which supports link PM, it will check if U1
143145
and U2 exit latencies have been set in the BOS descriptor; if
144-
the check is is passed and the host supports USB3 hardware LPM,
146+
the check is passed and the host supports USB3 hardware LPM,
145147
USB3 hardware LPM will be enabled for the device and the USB
146-
device directory will contain a file named
147-
power/usb3_hardware_lpm. The file holds a string value (enable
148-
or disable) indicating whether or not USB3 hardware LPM is
149-
enabled for the device.
148+
device directory will contain two files named
149+
power/usb3_hardware_lpm_u1 and power/usb3_hardware_lpm_u2. These
150+
files hold a string value (enable or disable) indicating whether
151+
or not USB3 hardware LPM U1 or U2 is enabled for the device.
150152

151153
What: /sys/bus/usb/devices/.../removable
152154
Date: February 2012

Documentation/usb/power-management.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -537,17 +537,18 @@ relevant attribute files are usb2_hardware_lpm and usb3_hardware_lpm.
537537
can write y/Y/1 or n/N/0 to the file to enable/disable
538538
USB2 hardware LPM manually. This is for test purpose mainly.
539539

540-
power/usb3_hardware_lpm
540+
power/usb3_hardware_lpm_u1
541+
power/usb3_hardware_lpm_u2
541542

542543
When a USB 3.0 lpm-capable device is plugged in to a
543544
xHCI host which supports link PM, it will check if U1
544545
and U2 exit latencies have been set in the BOS
545546
descriptor; if the check is is passed and the host
546547
supports USB3 hardware LPM, USB3 hardware LPM will be
547-
enabled for the device and this file will be created.
548-
The file holds a string value (enable or disable)
549-
indicating whether or not USB3 hardware LPM is
550-
enabled for the device.
548+
enabled for the device and these files will be created.
549+
The files hold a string value (enable or disable)
550+
indicating whether or not USB3 hardware LPM U1 or U2
551+
is enabled for the device.
551552

552553
USB Port Power Control
553554
----------------------

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 0
3+
SUBLEVEL = 1
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

arch/arm64/kernel/head.S

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,9 +512,14 @@ CPU_LE( movk x0, #0x30d0, lsl #16 ) // Clear EE and E0E on LE systems
512512
#endif
513513

514514
/* EL2 debug */
515+
mrs x0, id_aa64dfr0_el1 // Check ID_AA64DFR0_EL1 PMUVer
516+
sbfx x0, x0, #8, #4
517+
cmp x0, #1
518+
b.lt 4f // Skip if no PMU present
515519
mrs x0, pmcr_el0 // Disable debug access traps
516520
ubfx x0, x0, #11, #5 // to EL2 and allow access to
517521
msr mdcr_el2, x0 // all PMU counters from EL1
522+
4:
518523

519524
/* Stage-2 translation */
520525
msr vttbr_el2, xzr

arch/arm64/kernel/perf_event.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,9 +574,6 @@ static void armv8pmu_reset(void *info)
574574

575575
/* Initialize & Reset PMNC: C and P bits. */
576576
armv8pmu_pmcr_write(ARMV8_PMCR_P | ARMV8_PMCR_C);
577-
578-
/* Disable access from userspace. */
579-
asm volatile("msr pmuserenr_el0, %0" :: "r" (0));
580577
}
581578

582579
static int armv8_pmuv3_map_event(struct perf_event *event)

arch/arm64/kernel/ptrace.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@
5858
*/
5959
void ptrace_disable(struct task_struct *child)
6060
{
61+
/*
62+
* This would be better off in core code, but PTRACE_DETACH has
63+
* grown its fair share of arch-specific worts and changing it
64+
* is likely to cause regressions on obscure architectures.
65+
*/
66+
user_disable_single_step(child);
6167
}
6268

6369
#ifdef CONFIG_HAVE_HW_BREAKPOINT

arch/arm64/mm/mmu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,9 @@ void __init paging_init(void)
456456

457457
empty_zero_page = virt_to_page(zero_page);
458458

459+
/* Ensure the zero page is visible to the page table walker */
460+
dsb(ishst);
461+
459462
/*
460463
* TTBR0 is only used for the identity mapping at this stage. Make it
461464
* point to zero page to avoid speculatively fetching new entries.

arch/arm64/mm/proc-macros.S

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,15 @@
6262
bfi \valreg, \tmpreg, #TCR_T0SZ_OFFSET, #TCR_TxSZ_WIDTH
6363
#endif
6464
.endm
65+
66+
/*
67+
* reset_pmuserenr_el0 - reset PMUSERENR_EL0 if PMUv3 present
68+
*/
69+
.macro reset_pmuserenr_el0, tmpreg
70+
mrs \tmpreg, id_aa64dfr0_el1 // Check ID_AA64DFR0_EL1 PMUVer
71+
sbfx \tmpreg, \tmpreg, #8, #4
72+
cmp \tmpreg, #1 // Skip if no PMU present
73+
b.lt 9000f
74+
msr pmuserenr_el0, xzr // Disable PMU access from EL0
75+
9000:
76+
.endm

arch/arm64/mm/proc.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ ENTRY(cpu_do_resume)
117117
*/
118118
ubfx x11, x11, #1, #1
119119
msr oslar_el1, x11
120+
reset_pmuserenr_el0 x0 // Disable PMU access from EL0
120121
mov x0, x12
121122
dsb nsh // Make sure local tlb invalidation completed
122123
isb
@@ -155,6 +156,7 @@ ENTRY(__cpu_setup)
155156
msr cpacr_el1, x0 // Enable FP/ASIMD
156157
mov x0, #1 << 12 // Reset mdscr_el1 and disable
157158
msr mdscr_el1, x0 // access to the DCC from EL0
159+
reset_pmuserenr_el0 x0 // Disable PMU access from EL0
158160
/*
159161
* Memory region attributes for LPAE:
160162
*

arch/powerpc/include/asm/cmpxchg.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ __xchg_u32(volatile void *p, unsigned long val)
1818
unsigned long prev;
1919

2020
__asm__ __volatile__(
21-
PPC_RELEASE_BARRIER
21+
PPC_ATOMIC_ENTRY_BARRIER
2222
"1: lwarx %0,0,%2 \n"
2323
PPC405_ERR77(0,%2)
2424
" stwcx. %3,0,%2 \n\
2525
bne- 1b"
26-
PPC_ACQUIRE_BARRIER
26+
PPC_ATOMIC_EXIT_BARRIER
2727
: "=&r" (prev), "+m" (*(volatile unsigned int *)p)
2828
: "r" (p), "r" (val)
2929
: "cc", "memory");
@@ -61,12 +61,12 @@ __xchg_u64(volatile void *p, unsigned long val)
6161
unsigned long prev;
6262

6363
__asm__ __volatile__(
64-
PPC_RELEASE_BARRIER
64+
PPC_ATOMIC_ENTRY_BARRIER
6565
"1: ldarx %0,0,%2 \n"
6666
PPC405_ERR77(0,%2)
6767
" stdcx. %3,0,%2 \n\
6868
bne- 1b"
69-
PPC_ACQUIRE_BARRIER
69+
PPC_ATOMIC_EXIT_BARRIER
7070
: "=&r" (prev), "+m" (*(volatile unsigned long *)p)
7171
: "r" (p), "r" (val)
7272
: "cc", "memory");
@@ -151,14 +151,14 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new)
151151
unsigned int prev;
152152

153153
__asm__ __volatile__ (
154-
PPC_RELEASE_BARRIER
154+
PPC_ATOMIC_ENTRY_BARRIER
155155
"1: lwarx %0,0,%2 # __cmpxchg_u32\n\
156156
cmpw 0,%0,%3\n\
157157
bne- 2f\n"
158158
PPC405_ERR77(0,%2)
159159
" stwcx. %4,0,%2\n\
160160
bne- 1b"
161-
PPC_ACQUIRE_BARRIER
161+
PPC_ATOMIC_EXIT_BARRIER
162162
"\n\
163163
2:"
164164
: "=&r" (prev), "+m" (*p)
@@ -197,13 +197,13 @@ __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new)
197197
unsigned long prev;
198198

199199
__asm__ __volatile__ (
200-
PPC_RELEASE_BARRIER
200+
PPC_ATOMIC_ENTRY_BARRIER
201201
"1: ldarx %0,0,%2 # __cmpxchg_u64\n\
202202
cmpd 0,%0,%3\n\
203203
bne- 2f\n\
204204
stdcx. %4,0,%2\n\
205205
bne- 1b"
206-
PPC_ACQUIRE_BARRIER
206+
PPC_ATOMIC_EXIT_BARRIER
207207
"\n\
208208
2:"
209209
: "=&r" (prev), "+m" (*p)

0 commit comments

Comments
 (0)