Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
packages
kernel
linux
Commits
01d1cd63
Commit
01d1cd63
authored
Dec 27, 2016
by
Lorenzo "Palinuro" Faletra
Browse files
Import Upstream version 4.8.15
parent
6b4bea78
Changes
1000
Hide whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
20 of 1000+
files are displayed.
Plain diff
Email patch
Makefile
View file @
01d1cd63
VERSION
=
4
PATCHLEVEL
=
8
SUBLEVEL
=
1
1
SUBLEVEL
=
1
5
EXTRAVERSION
=
NAME
=
Psychotic Stoned Sheep
...
...
arch/arc/include/asm/delay.h
View file @
01d1cd63
...
...
@@ -22,10 +22,11 @@
static
inline
void
__delay
(
unsigned
long
loops
)
{
__asm__
__volatile__
(
" lp 1f
\n
"
" nop
\n
"
"1:
\n
"
:
"+l"
(
loops
));
" mov lp_count, %0
\n
"
" lp 1f
\n
"
" nop
\n
"
"1:
\n
"
:
:
"r"
(
loops
));
}
extern
void
__bad_udelay
(
void
);
...
...
arch/arc/include/asm/pgtable.h
View file @
01d1cd63
...
...
@@ -280,7 +280,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
#define pte_page(pte) pfn_to_page(pte_pfn(pte))
#define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot)
#define pfn_pte(pfn, prot) __pte(
((pfn) << PAGE_SHIFT
) | pgprot_val(prot))
#define pfn_pte(pfn, prot) __pte(
__pfn_to_phys(pfn
) | pgprot_val(prot))
/* Don't use virt_to_pfn for macros below: could cause truncations for PAE40*/
#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT)
...
...
arch/arm/boot/dts/imx7s.dtsi
View file @
01d1cd63
...
...
@@ -640,9 +640,8 @@ lcdif: lcdif@30730000 {
reg = <0x30730000 0x10000>;
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX7D_LCDIF_PIXEL_ROOT_CLK>,
<&clks IMX7D_CLK_DUMMY>,
<&clks IMX7D_CLK_DUMMY>;
clock-names = "pix", "axi", "disp_axi";
<&clks IMX7D_LCDIF_PIXEL_ROOT_CLK>;
clock-names = "pix", "axi";
status = "disabled";
};
};
...
...
arch/arm/boot/dts/orion5x-linkstation-lsgl.dts
View file @
01d1cd63
...
...
@@ -82,6 +82,10 @@ &usb_power {
gpios
=
<&
gpio0
9
GPIO_ACTIVE_HIGH
>;
};
&
sata
{
nr
-
ports
=
<
2
>;
};
&
ehci1
{
status
=
"okay"
;
};
arch/arm64/boot/dts/arm/juno-r1.dts
View file @
01d1cd63
...
...
@@ -76,7 +76,7 @@ CLUSTER_SLEEP_0: cluster-sleep-0 {
compatible
=
"arm,idle-state"
;
arm
,
psci
-
suspend
-
param
=
<
0x1010000
>;
local
-
timer
-
stop
;
entry
-
latency
-
us
=
<
3
00
>;
entry
-
latency
-
us
=
<
4
00
>;
exit
-
latency
-
us
=
<
1200
>;
min
-
residency
-
us
=
<
2500
>;
};
...
...
arch/arm64/boot/dts/arm/juno-r2.dts
View file @
01d1cd63
...
...
@@ -76,7 +76,7 @@ CLUSTER_SLEEP_0: cluster-sleep-0 {
compatible
=
"arm,idle-state"
;
arm
,
psci
-
suspend
-
param
=
<
0x1010000
>;
local
-
timer
-
stop
;
entry
-
latency
-
us
=
<
3
00
>;
entry
-
latency
-
us
=
<
4
00
>;
exit
-
latency
-
us
=
<
1200
>;
min
-
residency
-
us
=
<
2500
>;
};
...
...
arch/arm64/boot/dts/arm/juno.dts
View file @
01d1cd63
...
...
@@ -76,7 +76,7 @@ CLUSTER_SLEEP_0: cluster-sleep-0 {
compatible
=
"arm,idle-state"
;
arm
,
psci
-
suspend
-
param
=
<
0x1010000
>;
local
-
timer
-
stop
;
entry
-
latency
-
us
=
<
3
00
>;
entry
-
latency
-
us
=
<
4
00
>;
exit
-
latency
-
us
=
<
1200
>;
min
-
residency
-
us
=
<
2500
>;
};
...
...
arch/arm64/include/asm/cpufeature.h
View file @
01d1cd63
...
...
@@ -90,7 +90,7 @@ struct arm64_cpu_capabilities {
u16
capability
;
int
def_scope
;
/* default scope */
bool
(
*
matches
)(
const
struct
arm64_cpu_capabilities
*
caps
,
int
scope
);
void
(
*
enable
)(
void
*
);
/* Called on all active CPUs */
int
(
*
enable
)(
void
*
);
/* Called on all active CPUs */
union
{
struct
{
/* To be used for erratum handling only */
u32
midr_model
;
...
...
arch/arm64/include/asm/exec.h
View file @
01d1cd63
...
...
@@ -18,6 +18,9 @@
#ifndef __ASM_EXEC_H
#define __ASM_EXEC_H
#include <linux/sched.h>
extern
unsigned
long
arch_align_stack
(
unsigned
long
sp
);
void
uao_thread_switch
(
struct
task_struct
*
next
);
#endif
/* __ASM_EXEC_H */
arch/arm64/include/asm/processor.h
View file @
01d1cd63
...
...
@@ -190,8 +190,8 @@ static inline void spin_lock_prefetch(const void *ptr)
#endif
void
cpu_enable_pan
(
void
*
__unused
);
void
cpu_enable_uao
(
void
*
__unused
);
void
cpu_enable_cache_maint_trap
(
void
*
__unused
);
int
cpu_enable_pan
(
void
*
__unused
);
int
cpu_enable_uao
(
void
*
__unused
);
int
cpu_enable_cache_maint_trap
(
void
*
__unused
);
#endif
/* __ASM_PROCESSOR_H */
arch/arm64/kernel/cpufeature.c
View file @
01d1cd63
...
...
@@ -19,7 +19,9 @@
#define pr_fmt(fmt) "CPU features: " fmt
#include <linux/bsearch.h>
#include <linux/cpumask.h>
#include <linux/sort.h>
#include <linux/stop_machine.h>
#include <linux/types.h>
#include <asm/cpu.h>
#include <asm/cpufeature.h>
...
...
@@ -936,7 +938,13 @@ void __init enable_cpu_capabilities(const struct arm64_cpu_capabilities *caps)
{
for
(;
caps
->
matches
;
caps
++
)
if
(
caps
->
enable
&&
cpus_have_cap
(
caps
->
capability
))
on_each_cpu
(
caps
->
enable
,
NULL
,
true
);
/*
* Use stop_machine() as it schedules the work allowing
* us to modify PSTATE, instead of on_each_cpu() which
* uses an IPI, giving us a PSTATE that disappears when
* we return.
*/
stop_machine
(
caps
->
enable
,
NULL
,
cpu_online_mask
);
}
/*
...
...
arch/arm64/kernel/process.c
View file @
01d1cd63
...
...
@@ -49,6 +49,7 @@
#include <asm/alternative.h>
#include <asm/compat.h>
#include <asm/cacheflush.h>
#include <asm/exec.h>
#include <asm/fpsimd.h>
#include <asm/mmu_context.h>
#include <asm/processor.h>
...
...
@@ -303,7 +304,7 @@ static void tls_thread_switch(struct task_struct *next)
}
/* Restore the UAO state depending on next's addr_limit */
static
void
uao_thread_switch
(
struct
task_struct
*
next
)
void
uao_thread_switch
(
struct
task_struct
*
next
)
{
if
(
IS_ENABLED
(
CONFIG_ARM64_UAO
))
{
if
(
task_thread_info
(
next
)
->
addr_limit
==
KERNEL_DS
)
...
...
arch/arm64/kernel/suspend.c
View file @
01d1cd63
#include <linux/ftrace.h>
#include <linux/percpu.h>
#include <linux/slab.h>
#include <asm/alternative.h>
#include <asm/cacheflush.h>
#include <asm/cpufeature.h>
#include <asm/debug-monitors.h>
#include <asm/exec.h>
#include <asm/pgtable.h>
#include <asm/memory.h>
#include <asm/mmu_context.h>
...
...
@@ -47,6 +50,14 @@ void notrace __cpu_suspend_exit(void)
*/
set_my_cpu_offset
(
per_cpu_offset
(
smp_processor_id
()));
/*
* PSTATE was not saved over suspend/resume, re-enable any detected
* features that might not have been set correctly.
*/
asm
(
ALTERNATIVE
(
"nop"
,
SET_PSTATE_PAN
(
1
),
ARM64_HAS_PAN
,
CONFIG_ARM64_PAN
));
uao_thread_switch
(
current
);
/*
* Restore HW breakpoint registers to sane values
* before debug exceptions are possibly reenabled
...
...
arch/arm64/kernel/traps.c
View file @
01d1cd63
...
...
@@ -428,9 +428,10 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
force_signal_inject
(
SIGILL
,
ILL_ILLOPC
,
regs
,
0
);
}
void
cpu_enable_cache_maint_trap
(
void
*
__unused
)
int
cpu_enable_cache_maint_trap
(
void
*
__unused
)
{
config_sctlr_el1
(
SCTLR_EL1_UCI
,
0
);
return
0
;
}
#define __user_cache_maint(insn, address, res) \
...
...
arch/arm64/mm/fault.c
View file @
01d1cd63
...
...
@@ -29,7 +29,9 @@
#include <linux/sched.h>
#include <linux/highmem.h>
#include <linux/perf_event.h>
#include <linux/preempt.h>
#include <asm/bug.h>
#include <asm/cpufeature.h>
#include <asm/exception.h>
#include <asm/debug-monitors.h>
...
...
@@ -671,9 +673,17 @@ asmlinkage int __exception do_debug_exception(unsigned long addr,
NOKPROBE_SYMBOL
(
do_debug_exception
);
#ifdef CONFIG_ARM64_PAN
void
cpu_enable_pan
(
void
*
__unused
)
int
cpu_enable_pan
(
void
*
__unused
)
{
/*
* We modify PSTATE. This won't work from irq context as the PSTATE
* is discarded once we return from the exception.
*/
WARN_ON_ONCE
(
in_interrupt
());
config_sctlr_el1
(
SCTLR_EL1_SPAN
,
0
);
asm
(
SET_PSTATE_PAN
(
1
));
return
0
;
}
#endif
/* CONFIG_ARM64_PAN */
...
...
@@ -684,8 +694,9 @@ void cpu_enable_pan(void *__unused)
* We need to enable the feature at runtime (instead of adding it to
* PSR_MODE_EL1h) as the feature may not be implemented by the cpu.
*/
void
cpu_enable_uao
(
void
*
__unused
)
int
cpu_enable_uao
(
void
*
__unused
)
{
asm
(
SET_PSTATE_UAO
(
1
));
return
0
;
}
#endif
/* CONFIG_ARM64_UAO */
arch/m68k/include/asm/delay.h
View file @
01d1cd63
...
...
@@ -114,6 +114,6 @@ static inline void __udelay(unsigned long usecs)
*/
#define HZSCALE (268435456 / (1000000 / HZ))
#define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000))
;
#define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000))
#endif
/* defined(_M68K_DELAY_H) */
arch/parisc/Kconfig
View file @
01d1cd63
...
...
@@ -33,7 +33,9 @@ config PARISC
select HAVE_ARCH_HASH
select HAVE_ARCH_SECCOMP_FILTER
select HAVE_ARCH_TRACEHOOK
select HAVE_UNSTABLE_SCHED_CLOCK if (SMP || !64BIT)
select GENERIC_SCHED_CLOCK
select HAVE_UNSTABLE_SCHED_CLOCK if SMP
select GENERIC_CLOCKEVENTS
select ARCH_NO_COHERENT_DMA_MMAP
select CPU_NO_EFFICIENT_FFS
...
...
arch/parisc/include/asm/pgtable.h
View file @
01d1cd63
...
...
@@ -65,9 +65,9 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
unsigned long flags; \
spin_lock_irqsave(&pa_tlb_lock, flags); \
old_pte = *ptep; \
set_pte(ptep, pteval); \
if (pte_inserted(old_pte)) \
purge_tlb_entries(mm, addr); \
set_pte(ptep, pteval); \
spin_unlock_irqrestore(&pa_tlb_lock, flags); \
} while (0)
...
...
@@ -478,8 +478,8 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned
spin_unlock_irqrestore
(
&
pa_tlb_lock
,
flags
);
return
0
;
}
set_pte
(
ptep
,
pte_mkold
(
pte
));
purge_tlb_entries
(
vma
->
vm_mm
,
addr
);
set_pte
(
ptep
,
pte_mkold
(
pte
));
spin_unlock_irqrestore
(
&
pa_tlb_lock
,
flags
);
return
1
;
}
...
...
@@ -492,9 +492,9 @@ static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
spin_lock_irqsave
(
&
pa_tlb_lock
,
flags
);
old_pte
=
*
ptep
;
set_pte
(
ptep
,
__pte
(
0
));
if
(
pte_inserted
(
old_pte
))
purge_tlb_entries
(
mm
,
addr
);
set_pte
(
ptep
,
__pte
(
0
));
spin_unlock_irqrestore
(
&
pa_tlb_lock
,
flags
);
return
old_pte
;
...
...
@@ -504,8 +504,8 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
{
unsigned
long
flags
;
spin_lock_irqsave
(
&
pa_tlb_lock
,
flags
);
set_pte
(
ptep
,
pte_wrprotect
(
*
ptep
));
purge_tlb_entries
(
mm
,
addr
);
set_pte
(
ptep
,
pte_wrprotect
(
*
ptep
));
spin_unlock_irqrestore
(
&
pa_tlb_lock
,
flags
);
}
...
...
arch/parisc/kernel/cache.c
View file @
01d1cd63
...
...
@@ -369,6 +369,7 @@ void __init parisc_setup_cache_timing(void)
{
unsigned
long
rangetime
,
alltime
;
unsigned
long
size
,
start
;
unsigned
long
threshold
;
alltime
=
mfctl
(
16
);
flush_data_cache
();
...
...
@@ -382,26 +383,30 @@ void __init parisc_setup_cache_timing(void)
printk
(
KERN_DEBUG
"Whole cache flush %lu cycles, flushing %lu bytes %lu cycles
\n
"
,
alltime
,
size
,
rangetime
);
/* Racy, but if we see an intermediate value, it's ok too... */
parisc_cache_flush_threshold
=
size
*
alltime
/
rangetime
;
parisc_cache_flush_threshold
=
L1_CACHE_ALIGN
(
parisc_cache_flush_threshold
);
if
(
!
parisc_cache_flush_threshold
)
parisc_cache_flush_threshold
=
FLUSH_THRESHOLD
;
if
(
parisc_cache_flush_threshold
>
cache_info
.
dc_size
)
parisc_cache_flush_threshold
=
cache_info
.
dc_size
;
printk
(
KERN_INFO
"Setting cache flush threshold to %lu kB
\n
"
,
threshold
=
L1_CACHE_ALIGN
(
size
*
alltime
/
rangetime
);
if
(
threshold
>
cache_info
.
dc_size
)
threshold
=
cache_info
.
dc_size
;
if
(
threshold
)
parisc_cache_flush_threshold
=
threshold
;
printk
(
KERN_INFO
"Cache flush threshold set to %lu KiB
\n
"
,
parisc_cache_flush_threshold
/
1024
);
/* calculate TLB flush threshold */
/* On SMP machines, skip the TLB measure of kernel text which
* has been mapped as huge pages. */
if
(
num_online_cpus
()
>
1
&&
!
parisc_requires_coherency
())
{
threshold
=
max
(
cache_info
.
it_size
,
cache_info
.
dt_size
);
threshold
*=
PAGE_SIZE
;
threshold
/=
num_online_cpus
();
goto
set_tlb_threshold
;
}
alltime
=
mfctl
(
16
);
flush_tlb_all
();
alltime
=
mfctl
(
16
)
-
alltime
;
size
=
PAGE_SIZE
;
size
=
0
;
start
=
(
unsigned
long
)
_text
;
rangetime
=
mfctl
(
16
);
while
(
start
<
(
unsigned
long
)
_end
)
{
...
...
@@ -414,13 +419,12 @@ void __init parisc_setup_cache_timing(void)
printk
(
KERN_DEBUG
"Whole TLB flush %lu cycles, flushing %lu bytes %lu cycles
\n
"
,
alltime
,
size
,
rangetime
);
parisc_tlb_flush_threshold
=
size
*
alltime
/
rangetime
;
parisc_tlb_flush_threshold
*=
num_online_cpus
();
parisc_tlb_flush_threshold
=
PAGE_ALIGN
(
parisc_tlb_flush_threshold
);
if
(
!
parisc_tlb_flush_threshold
)
parisc_tlb_flush_threshold
=
FLUSH_TLB_THRESHOLD
;
threshold
=
PAGE_ALIGN
(
num_online_cpus
()
*
size
*
alltime
/
rangetime
);
printk
(
KERN_INFO
"Setting TLB flush threshold to %lu kB
\n
"
,
set_tlb_threshold:
if
(
threshold
)
parisc_tlb_flush_threshold
=
threshold
;
printk
(
KERN_INFO
"TLB flush threshold set to %lu KiB
\n
"
,
parisc_tlb_flush_threshold
/
1024
);
}
...
...
Prev
1
2
3
4
5
…
50
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment