Skip to content

Commit 223aa64

Browse files
author
Ingo Molnar
committed
Merge branch 'perf/timer' into perf/core
This WIP branch is now ready to be merged. Signed-off-by: Ingo Molnar <[email protected]>
2 parents aaa9fa3 + 34f4392 commit 223aa64

File tree

116 files changed

+1813
-861
lines changed

Some content is hidden

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

116 files changed

+1813
-861
lines changed

MAINTAINERS

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ M: Sebastian Hesselbarth <[email protected]>
11861186
L: [email protected] (moderated for non-subscribers)
11871187
S: Maintained
11881188
F: arch/arm/mach-mvebu/
1189-
F: drivers/rtc/armada38x-rtc
1189+
F: drivers/rtc/rtc-armada38x.c
11901190

11911191
ARM/Marvell Berlin SoC support
11921192
M: Sebastian Hesselbarth <[email protected]>
@@ -1675,8 +1675,8 @@ F: drivers/misc/eeprom/at24.c
16751675
F: include/linux/platform_data/at24.h
16761676

16771677
ATA OVER ETHERNET (AOE) DRIVER
1678-
M: "Ed L. Cashin" <[email protected]>
1679-
W: http://support.coraid.com/support/linux
1678+
M: "Ed L. Cashin" <[email protected]>
1679+
W: http://www.openaoe.org/
16801680
S: Supported
16811681
F: Documentation/aoe/
16821682
F: drivers/block/aoe/
@@ -3252,6 +3252,13 @@ S: Maintained
32523252
F: Documentation/hwmon/dme1737
32533253
F: drivers/hwmon/dme1737.c
32543254

3255+
DMI/SMBIOS SUPPORT
3256+
M: Jean Delvare <[email protected]>
3257+
S: Maintained
3258+
F: drivers/firmware/dmi-id.c
3259+
F: drivers/firmware/dmi_scan.c
3260+
F: include/linux/dmi.h
3261+
32553262
DOCKING STATION DRIVER
32563263
M: Shaohua Li <[email protected]>
32573264

arch/arm/plat-omap/counter_32k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ int __init omap_init_clocksource_32k(void __iomem *vbase)
103103

104104
/*
105105
* 120000 rough estimate from the calculations in
106-
* __clocksource_updatefreq_scale.
106+
* __clocksource_update_freq_scale.
107107
*/
108108
clocks_calc_mult_shift(&persistent_mult, &persistent_shift,
109109
32768, NSEC_PER_SEC, 120000);

arch/arm64/include/asm/cmpxchg.h

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,30 @@ static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
246246
__ret; \
247247
})
248248

249-
#define this_cpu_cmpxchg_1(ptr, o, n) cmpxchg_local(raw_cpu_ptr(&(ptr)), o, n)
250-
#define this_cpu_cmpxchg_2(ptr, o, n) cmpxchg_local(raw_cpu_ptr(&(ptr)), o, n)
251-
#define this_cpu_cmpxchg_4(ptr, o, n) cmpxchg_local(raw_cpu_ptr(&(ptr)), o, n)
252-
#define this_cpu_cmpxchg_8(ptr, o, n) cmpxchg_local(raw_cpu_ptr(&(ptr)), o, n)
253-
254-
#define this_cpu_cmpxchg_double_8(ptr1, ptr2, o1, o2, n1, n2) \
255-
cmpxchg_double_local(raw_cpu_ptr(&(ptr1)), raw_cpu_ptr(&(ptr2)), \
256-
o1, o2, n1, n2)
249+
#define _protect_cmpxchg_local(pcp, o, n) \
250+
({ \
251+
typeof(*raw_cpu_ptr(&(pcp))) __ret; \
252+
preempt_disable(); \
253+
__ret = cmpxchg_local(raw_cpu_ptr(&(pcp)), o, n); \
254+
preempt_enable(); \
255+
__ret; \
256+
})
257+
258+
#define this_cpu_cmpxchg_1(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
259+
#define this_cpu_cmpxchg_2(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
260+
#define this_cpu_cmpxchg_4(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
261+
#define this_cpu_cmpxchg_8(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
262+
263+
#define this_cpu_cmpxchg_double_8(ptr1, ptr2, o1, o2, n1, n2) \
264+
({ \
265+
int __ret; \
266+
preempt_disable(); \
267+
__ret = cmpxchg_double_local( raw_cpu_ptr(&(ptr1)), \
268+
raw_cpu_ptr(&(ptr2)), \
269+
o1, o2, n1, n2); \
270+
preempt_enable(); \
271+
__ret; \
272+
})
257273

258274
#define cmpxchg64(ptr,o,n) cmpxchg((ptr),(o),(n))
259275
#define cmpxchg64_local(ptr,o,n) cmpxchg_local((ptr),(o),(n))

arch/arm64/include/asm/mmu_context.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,15 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
151151
{
152152
unsigned int cpu = smp_processor_id();
153153

154+
/*
155+
* init_mm.pgd does not contain any user mappings and it is always
156+
* active for kernel addresses in TTBR1. Just set the reserved TTBR0.
157+
*/
158+
if (next == &init_mm) {
159+
cpu_set_reserved_ttbr0();
160+
return;
161+
}
162+
154163
if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next)
155164
check_and_switch_context(next, tsk);
156165
}

arch/arm64/include/asm/percpu.h

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -204,25 +204,47 @@ static inline unsigned long __percpu_xchg(void *ptr, unsigned long val,
204204
return ret;
205205
}
206206

207+
#define _percpu_read(pcp) \
208+
({ \
209+
typeof(pcp) __retval; \
210+
preempt_disable(); \
211+
__retval = (typeof(pcp))__percpu_read(raw_cpu_ptr(&(pcp)), \
212+
sizeof(pcp)); \
213+
preempt_enable(); \
214+
__retval; \
215+
})
216+
217+
#define _percpu_write(pcp, val) \
218+
do { \
219+
preempt_disable(); \
220+
__percpu_write(raw_cpu_ptr(&(pcp)), (unsigned long)(val), \
221+
sizeof(pcp)); \
222+
preempt_enable(); \
223+
} while(0) \
224+
225+
#define _pcp_protect(operation, pcp, val) \
226+
({ \
227+
typeof(pcp) __retval; \
228+
preempt_disable(); \
229+
__retval = (typeof(pcp))operation(raw_cpu_ptr(&(pcp)), \
230+
(val), sizeof(pcp)); \
231+
preempt_enable(); \
232+
__retval; \
233+
})
234+
207235
#define _percpu_add(pcp, val) \
208-
__percpu_add(raw_cpu_ptr(&(pcp)), val, sizeof(pcp))
236+
_pcp_protect(__percpu_add, pcp, val)
209237

210-
#define _percpu_add_return(pcp, val) (typeof(pcp)) (_percpu_add(pcp, val))
238+
#define _percpu_add_return(pcp, val) _percpu_add(pcp, val)
211239

212240
#define _percpu_and(pcp, val) \
213-
__percpu_and(raw_cpu_ptr(&(pcp)), val, sizeof(pcp))
241+
_pcp_protect(__percpu_and, pcp, val)
214242

215243
#define _percpu_or(pcp, val) \
216-
__percpu_or(raw_cpu_ptr(&(pcp)), val, sizeof(pcp))
217-
218-
#define _percpu_read(pcp) (typeof(pcp)) \
219-
(__percpu_read(raw_cpu_ptr(&(pcp)), sizeof(pcp)))
220-
221-
#define _percpu_write(pcp, val) \
222-
__percpu_write(raw_cpu_ptr(&(pcp)), (unsigned long)(val), sizeof(pcp))
244+
_pcp_protect(__percpu_or, pcp, val)
223245

224246
#define _percpu_xchg(pcp, val) (typeof(pcp)) \
225-
(__percpu_xchg(raw_cpu_ptr(&(pcp)), (unsigned long)(val), sizeof(pcp)))
247+
_pcp_protect(__percpu_xchg, pcp, (unsigned long)(val))
226248

227249
#define this_cpu_add_1(pcp, val) _percpu_add(pcp, val)
228250
#define this_cpu_add_2(pcp, val) _percpu_add(pcp, val)

arch/arm64/kernel/vdso.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
200200
void update_vsyscall(struct timekeeper *tk)
201201
{
202202
struct timespec xtime_coarse;
203-
u32 use_syscall = strcmp(tk->tkr.clock->name, "arch_sys_counter");
203+
u32 use_syscall = strcmp(tk->tkr_mono.clock->name, "arch_sys_counter");
204204

205205
++vdso_data->tb_seq_count;
206206
smp_wmb();
@@ -213,11 +213,11 @@ void update_vsyscall(struct timekeeper *tk)
213213
vdso_data->wtm_clock_nsec = tk->wall_to_monotonic.tv_nsec;
214214

215215
if (!use_syscall) {
216-
vdso_data->cs_cycle_last = tk->tkr.cycle_last;
216+
vdso_data->cs_cycle_last = tk->tkr_mono.cycle_last;
217217
vdso_data->xtime_clock_sec = tk->xtime_sec;
218-
vdso_data->xtime_clock_nsec = tk->tkr.xtime_nsec;
219-
vdso_data->cs_mult = tk->tkr.mult;
220-
vdso_data->cs_shift = tk->tkr.shift;
218+
vdso_data->xtime_clock_nsec = tk->tkr_mono.xtime_nsec;
219+
vdso_data->cs_mult = tk->tkr_mono.mult;
220+
vdso_data->cs_shift = tk->tkr_mono.shift;
221221
}
222222

223223
smp_wmb();

arch/metag/include/asm/io.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define _ASM_METAG_IO_H
33

44
#include <linux/types.h>
5+
#include <asm/pgtable-bits.h>
56

67
#define IO_SPACE_LIMIT 0
78

arch/metag/include/asm/pgtable-bits.h

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
/*
2+
* Meta page table definitions.
3+
*/
4+
5+
#ifndef _METAG_PGTABLE_BITS_H
6+
#define _METAG_PGTABLE_BITS_H
7+
8+
#include <asm/metag_mem.h>
9+
10+
/*
11+
* Definitions for MMU descriptors
12+
*
13+
* These are the hardware bits in the MMCU pte entries.
14+
* Derived from the Meta toolkit headers.
15+
*/
16+
#define _PAGE_PRESENT MMCU_ENTRY_VAL_BIT
17+
#define _PAGE_WRITE MMCU_ENTRY_WR_BIT
18+
#define _PAGE_PRIV MMCU_ENTRY_PRIV_BIT
19+
/* Write combine bit - this can cause writes to occur out of order */
20+
#define _PAGE_WR_COMBINE MMCU_ENTRY_WRC_BIT
21+
/* Sys coherent bit - this bit is never used by Linux */
22+
#define _PAGE_SYS_COHERENT MMCU_ENTRY_SYS_BIT
23+
#define _PAGE_ALWAYS_ZERO_1 0x020
24+
#define _PAGE_CACHE_CTRL0 0x040
25+
#define _PAGE_CACHE_CTRL1 0x080
26+
#define _PAGE_ALWAYS_ZERO_2 0x100
27+
#define _PAGE_ALWAYS_ZERO_3 0x200
28+
#define _PAGE_ALWAYS_ZERO_4 0x400
29+
#define _PAGE_ALWAYS_ZERO_5 0x800
30+
31+
/* These are software bits that we stuff into the gaps in the hardware
32+
* pte entries that are not used. Note, these DO get stored in the actual
33+
* hardware, but the hardware just does not use them.
34+
*/
35+
#define _PAGE_ACCESSED _PAGE_ALWAYS_ZERO_1
36+
#define _PAGE_DIRTY _PAGE_ALWAYS_ZERO_2
37+
38+
/* Pages owned, and protected by, the kernel. */
39+
#define _PAGE_KERNEL _PAGE_PRIV
40+
41+
/* No cacheing of this page */
42+
#define _PAGE_CACHE_WIN0 (MMCU_CWIN_UNCACHED << MMCU_ENTRY_CWIN_S)
43+
/* burst cacheing - good for data streaming */
44+
#define _PAGE_CACHE_WIN1 (MMCU_CWIN_BURST << MMCU_ENTRY_CWIN_S)
45+
/* One cache way per thread */
46+
#define _PAGE_CACHE_WIN2 (MMCU_CWIN_C1SET << MMCU_ENTRY_CWIN_S)
47+
/* Full on cacheing */
48+
#define _PAGE_CACHE_WIN3 (MMCU_CWIN_CACHED << MMCU_ENTRY_CWIN_S)
49+
50+
#define _PAGE_CACHEABLE (_PAGE_CACHE_WIN3 | _PAGE_WR_COMBINE)
51+
52+
/* which bits are used for cache control ... */
53+
#define _PAGE_CACHE_MASK (_PAGE_CACHE_CTRL0 | _PAGE_CACHE_CTRL1 | \
54+
_PAGE_WR_COMBINE)
55+
56+
/* This is a mask of the bits that pte_modify is allowed to change. */
57+
#define _PAGE_CHG_MASK (PAGE_MASK)
58+
59+
#define _PAGE_SZ_SHIFT 1
60+
#define _PAGE_SZ_4K (0x0)
61+
#define _PAGE_SZ_8K (0x1 << _PAGE_SZ_SHIFT)
62+
#define _PAGE_SZ_16K (0x2 << _PAGE_SZ_SHIFT)
63+
#define _PAGE_SZ_32K (0x3 << _PAGE_SZ_SHIFT)
64+
#define _PAGE_SZ_64K (0x4 << _PAGE_SZ_SHIFT)
65+
#define _PAGE_SZ_128K (0x5 << _PAGE_SZ_SHIFT)
66+
#define _PAGE_SZ_256K (0x6 << _PAGE_SZ_SHIFT)
67+
#define _PAGE_SZ_512K (0x7 << _PAGE_SZ_SHIFT)
68+
#define _PAGE_SZ_1M (0x8 << _PAGE_SZ_SHIFT)
69+
#define _PAGE_SZ_2M (0x9 << _PAGE_SZ_SHIFT)
70+
#define _PAGE_SZ_4M (0xa << _PAGE_SZ_SHIFT)
71+
#define _PAGE_SZ_MASK (0xf << _PAGE_SZ_SHIFT)
72+
73+
#if defined(CONFIG_PAGE_SIZE_4K)
74+
#define _PAGE_SZ (_PAGE_SZ_4K)
75+
#elif defined(CONFIG_PAGE_SIZE_8K)
76+
#define _PAGE_SZ (_PAGE_SZ_8K)
77+
#elif defined(CONFIG_PAGE_SIZE_16K)
78+
#define _PAGE_SZ (_PAGE_SZ_16K)
79+
#endif
80+
#define _PAGE_TABLE (_PAGE_SZ | _PAGE_PRESENT)
81+
82+
#if defined(CONFIG_HUGETLB_PAGE_SIZE_8K)
83+
# define _PAGE_SZHUGE (_PAGE_SZ_8K)
84+
#elif defined(CONFIG_HUGETLB_PAGE_SIZE_16K)
85+
# define _PAGE_SZHUGE (_PAGE_SZ_16K)
86+
#elif defined(CONFIG_HUGETLB_PAGE_SIZE_32K)
87+
# define _PAGE_SZHUGE (_PAGE_SZ_32K)
88+
#elif defined(CONFIG_HUGETLB_PAGE_SIZE_64K)
89+
# define _PAGE_SZHUGE (_PAGE_SZ_64K)
90+
#elif defined(CONFIG_HUGETLB_PAGE_SIZE_128K)
91+
# define _PAGE_SZHUGE (_PAGE_SZ_128K)
92+
#elif defined(CONFIG_HUGETLB_PAGE_SIZE_256K)
93+
# define _PAGE_SZHUGE (_PAGE_SZ_256K)
94+
#elif defined(CONFIG_HUGETLB_PAGE_SIZE_512K)
95+
# define _PAGE_SZHUGE (_PAGE_SZ_512K)
96+
#elif defined(CONFIG_HUGETLB_PAGE_SIZE_1M)
97+
# define _PAGE_SZHUGE (_PAGE_SZ_1M)
98+
#elif defined(CONFIG_HUGETLB_PAGE_SIZE_2M)
99+
# define _PAGE_SZHUGE (_PAGE_SZ_2M)
100+
#elif defined(CONFIG_HUGETLB_PAGE_SIZE_4M)
101+
# define _PAGE_SZHUGE (_PAGE_SZ_4M)
102+
#endif
103+
104+
#endif /* _METAG_PGTABLE_BITS_H */

0 commit comments

Comments
 (0)