Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
39f4d441
Commit
39f4d441
authored
Oct 22, 2019
by
Russell King
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'misc' into fixes
parents
2ecb2879
e963408e
Changes
23
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1039 additions
and
30 deletions
+1039
-30
Documentation/devicetree/bindings/arm/l2c2x0.yaml
Documentation/devicetree/bindings/arm/l2c2x0.yaml
+4
-0
MAINTAINERS
MAINTAINERS
+6
-0
arch/arm/Kconfig
arch/arm/Kconfig
+4
-3
arch/arm/Kconfig.debug
arch/arm/Kconfig.debug
+1
-1
arch/arm/Makefile
arch/arm/Makefile
+14
-8
arch/arm/boot/compressed/head.S
arch/arm/boot/compressed/head.S
+13
-1
arch/arm/include/asm/hardware/cache-aurora-l2.h
arch/arm/include/asm/hardware/cache-aurora-l2.h
+49
-1
arch/arm/kernel/perf_event_v7.c
arch/arm/kernel/perf_event_v7.c
+3
-3
arch/arm/kernel/smp.c
arch/arm/kernel/smp.c
+2
-4
arch/arm/kernel/vdso.c
arch/arm/kernel/vdso.c
+0
-1
arch/arm/lib/Makefile
arch/arm/lib/Makefile
+7
-1
arch/arm/lib/backtrace-clang.S
arch/arm/lib/backtrace-clang.S
+217
-0
arch/arm/mach-iop13xx/pci.c
arch/arm/mach-iop13xx/pci.c
+2
-2
arch/arm/mm/cache-l2x0.c
arch/arm/mm/cache-l2x0.c
+15
-3
arch/arm/mm/fault.c
arch/arm/mm/fault.c
+2
-2
arch/arm/mm/fault.h
arch/arm/mm/fault.h
+1
-0
arch/arm/mm/mmu.c
arch/arm/mm/mmu.c
+19
-0
drivers/amba/bus.c
drivers/amba/bus.c
+22
-0
drivers/edac/Kconfig
drivers/edac/Kconfig
+7
-0
drivers/edac/Makefile
drivers/edac/Makefile
+1
-0
drivers/edac/armada_xp_edac.c
drivers/edac/armada_xp_edac.c
+635
-0
drivers/edac/debugfs.c
drivers/edac/debugfs.c
+11
-0
drivers/edac/edac_module.h
drivers/edac/edac_module.h
+4
-0
No files found.
Documentation/devicetree/bindings/arm/l2c2x0.yaml
View file @
39f4d441
...
@@ -176,6 +176,10 @@ properties:
...
@@ -176,6 +176,10 @@ properties:
description
:
disable parity checking on the L2 cache (L220 or PL310).
description
:
disable parity checking on the L2 cache (L220 or PL310).
type
:
boolean
type
:
boolean
marvell,ecc-enable
:
description
:
enable ECC protection on the L2 cache
type
:
boolean
arm,outer-sync-disable
:
arm,outer-sync-disable
:
description
:
disable the outer sync operation on the L2 cache.
description
:
disable the outer sync operation on the L2 cache.
Some core tiles, especially ARM PB11MPCore have a faulty L220 cache that
Some core tiles, especially ARM PB11MPCore have a faulty L220 cache that
...
...
MAINTAINERS
View file @
39f4d441
...
@@ -5755,6 +5755,12 @@ L: linux-edac@vger.kernel.org
...
@@ -5755,6 +5755,12 @@ L: linux-edac@vger.kernel.org
S: Maintained
S: Maintained
F: drivers/edac/amd64_edac*
F: drivers/edac/amd64_edac*
EDAC-ARMADA
M: Jan Luebbe <jlu@pengutronix.de>
L: linux-edac@vger.kernel.org
S: Maintained
F: drivers/edac/armada_xp_*
EDAC-AST2500
EDAC-AST2500
M: Stefan Schaeckeler <sschaeck@cisco.com>
M: Stefan Schaeckeler <sschaeck@cisco.com>
S: Supported
S: Supported
...
...
arch/arm/Kconfig
View file @
39f4d441
...
@@ -82,7 +82,7 @@ config ARM
...
@@ -82,7 +82,7 @@ config ARM
select HAVE_FAST_GUP if ARM_LPAE
select HAVE_FAST_GUP if ARM_LPAE
select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL && !CC_IS_CLANG
select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL && !CC_IS_CLANG
select HAVE_FUNCTION_TRACER if !XIP_KERNEL
select HAVE_FUNCTION_TRACER if !XIP_KERNEL
&& (CC_IS_GCC || CLANG_VERSION >= 100000)
select HAVE_GCC_PLUGINS
select HAVE_GCC_PLUGINS
select HAVE_HW_BREAKPOINT if PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)
select HAVE_HW_BREAKPOINT if PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)
select HAVE_IDE if PCI || ISA || PCMCIA
select HAVE_IDE if PCI || ISA || PCMCIA
...
@@ -1572,8 +1572,9 @@ config ARM_PATCH_IDIV
...
@@ -1572,8 +1572,9 @@ config ARM_PATCH_IDIV
code to do integer division.
code to do integer division.
config AEABI
config AEABI
bool "Use the ARM EABI to compile the kernel" if !CPU_V7 && !CPU_V7M && !CPU_V6 && !CPU_V6K
bool "Use the ARM EABI to compile the kernel" if !CPU_V7 && \
default CPU_V7 || CPU_V7M || CPU_V6 || CPU_V6K
!CPU_V7M && !CPU_V6 && !CPU_V6K && !CC_IS_CLANG
default CPU_V7 || CPU_V7M || CPU_V6 || CPU_V6K || CC_IS_CLANG
help
help
This option allows for the kernel to be compiled using the latest
This option allows for the kernel to be compiled using the latest
ARM ABI (aka EABI). This is only useful if you are using a user
ARM ABI (aka EABI). This is only useful if you are using a user
...
...
arch/arm/Kconfig.debug
View file @
39f4d441
...
@@ -56,7 +56,7 @@ choice
...
@@ -56,7 +56,7 @@ choice
config UNWINDER_FRAME_POINTER
config UNWINDER_FRAME_POINTER
bool "Frame pointer unwinder"
bool "Frame pointer unwinder"
depends on !THUMB2_KERNEL
&& !CC_IS_CLANG
depends on !THUMB2_KERNEL
select ARCH_WANT_FRAME_POINTERS
select ARCH_WANT_FRAME_POINTERS
select FRAME_POINTER
select FRAME_POINTER
help
help
...
...
arch/arm/Makefile
View file @
39f4d441
...
@@ -36,7 +36,10 @@ KBUILD_CFLAGS += $(call cc-option,-mno-unaligned-access)
...
@@ -36,7 +36,10 @@ KBUILD_CFLAGS += $(call cc-option,-mno-unaligned-access)
endif
endif
ifeq
($(CONFIG_FRAME_POINTER),y)
ifeq
($(CONFIG_FRAME_POINTER),y)
KBUILD_CFLAGS
+=
-fno-omit-frame-pointer
-mapcs
-mno-sched-prolog
KBUILD_CFLAGS
+=
-fno-omit-frame-pointer
ifeq
($(CONFIG_CC_IS_GCC),y)
KBUILD_CFLAGS
+=
-mapcs
-mno-sched-prolog
endif
endif
endif
ifeq
($(CONFIG_CPU_BIG_ENDIAN),y)
ifeq
($(CONFIG_CPU_BIG_ENDIAN),y)
...
@@ -112,6 +115,10 @@ ifeq ($(CONFIG_ARM_UNWIND),y)
...
@@ -112,6 +115,10 @@ ifeq ($(CONFIG_ARM_UNWIND),y)
CFLAGS_ABI
+=
-funwind-tables
CFLAGS_ABI
+=
-funwind-tables
endif
endif
ifeq
($(CONFIG_CC_IS_CLANG),y)
CFLAGS_ABI
+=
-meabi
gnu
endif
# Accept old syntax despite ".syntax unified"
# Accept old syntax despite ".syntax unified"
AFLAGS_NOWARN
:=
$(
call
as-option,-Wa
$(comma)
-mno-warn-deprecated
,-Wa
$(comma)
-W
)
AFLAGS_NOWARN
:=
$(
call
as-option,-Wa
$(comma)
-mno-warn-deprecated
,-Wa
$(comma)
-W
)
...
@@ -270,14 +277,9 @@ endif
...
@@ -270,14 +277,9 @@ endif
export
TEXT_OFFSET
GZFLAGS
MMUEXT
export
TEXT_OFFSET
GZFLAGS
MMUEXT
# Do we have FASTFPE?
FASTFPE
:=
arch
/arm/fastfpe
ifeq
($(FASTFPE),$(wildcard $(FASTFPE)))
FASTFPE_OBJ
:=
$(FASTFPE)
/
endif
core-$(CONFIG_FPE_NWFPE)
+=
arch
/arm/nwfpe/
core-$(CONFIG_FPE_NWFPE)
+=
arch
/arm/nwfpe/
core-$(CONFIG_FPE_FASTFPE)
+=
$(FASTFPE_OBJ)
# Put arch/arm/fastfpe/ to use this.
core-$(CONFIG_FPE_FASTFPE)
+=
$(
patsubst
$(srctree)
/%,%,
$(
wildcard
$(srctree)
/arch/arm/fastfpe/
))
core-$(CONFIG_VFP)
+=
arch
/arm/vfp/
core-$(CONFIG_VFP)
+=
arch
/arm/vfp/
core-$(CONFIG_XEN)
+=
arch
/arm/xen/
core-$(CONFIG_XEN)
+=
arch
/arm/xen/
core-$(CONFIG_KVM_ARM_HOST)
+=
arch
/arm/kvm/
core-$(CONFIG_KVM_ARM_HOST)
+=
arch
/arm/kvm/
...
@@ -290,6 +292,10 @@ core-y += arch/arm/net/
...
@@ -290,6 +292,10 @@ core-y += arch/arm/net/
core-y
+=
arch
/arm/crypto/
core-y
+=
arch
/arm/crypto/
core-y
+=
$(machdirs)
$(platdirs)
core-y
+=
$(machdirs)
$(platdirs)
# For cleaning
core-
+=
$(
patsubst
%,arch/arm/mach-%/,
$
(
machine-
))
core-
+=
$(
patsubst
%,arch/arm/plat-%/,
$
(
plat-
))
drivers-$(CONFIG_OPROFILE)
+=
arch
/arm/oprofile/
drivers-$(CONFIG_OPROFILE)
+=
arch
/arm/oprofile/
libs-y
:=
arch
/arm/lib/
$
(
libs-y
)
libs-y
:=
arch
/arm/lib/
$
(
libs-y
)
...
...
arch/arm/boot/compressed/head.S
View file @
39f4d441
...
@@ -153,11 +153,23 @@
...
@@ -153,11 +153,23 @@
AR_CLASS
(
.
arm
)
AR_CLASS
(
.
arm
)
start
:
start
:
.
type
start
,#
function
.
type
start
,#
function
/
*
*
These
7
nops
along
with
the
1
nop
immediately
below
for
*
!
THUMB2
form
8
nops
that
make
the
compressed
kernel
bootable
*
on
legacy
ARM
systems
that
were
assuming
the
kernel
in
a
.
out
*
binary
format
.
The
boot
loaders
on
these
systems
would
*
jump
32
bytes
into
the
image
to
skip
the
a
.
out
header
.
*
with
these
8
nops
filling
exactly
32
bytes
,
things
still
*
work
as
expected
on
these
legacy
systems
.
Thumb2
mode
keeps
*
7
of
the
nops
as
it
turns
out
that
some
boot
loaders
*
were
patching
the
initial
instructions
of
the
kernel
,
i
.
e
*
had
started
to
exploit
this
"patch area"
.
*/
.
rept
7
.
rept
7
__nop
__nop
.
endr
.
endr
#ifndef CONFIG_THUMB2_KERNEL
#ifndef CONFIG_THUMB2_KERNEL
mov
r0
,
r0
__nop
#else
#else
AR_CLASS
(
sub
pc
,
pc
,
#
3
)
@
A
/
R
:
switch
to
Thumb2
mode
AR_CLASS
(
sub
pc
,
pc
,
#
3
)
@
A
/
R
:
switch
to
Thumb2
mode
M_CLASS
(
nop
.
w
)
@
M
:
already
in
Thumb2
mode
M_CLASS
(
nop
.
w
)
@
M
:
already
in
Thumb2
mode
...
...
arch/arm/
mm
/cache-aurora-l2.h
→
arch/arm/
include/asm/hardware
/cache-aurora-l2.h
View file @
39f4d441
...
@@ -31,6 +31,9 @@
...
@@ -31,6 +31,9 @@
#define AURORA_ACR_REPLACEMENT_TYPE_SEMIPLRU \
#define AURORA_ACR_REPLACEMENT_TYPE_SEMIPLRU \
(3 << AURORA_ACR_REPLACEMENT_OFFSET)
(3 << AURORA_ACR_REPLACEMENT_OFFSET)
#define AURORA_ACR_PARITY_EN (1 << 21)
#define AURORA_ACR_ECC_EN (1 << 20)
#define AURORA_ACR_FORCE_WRITE_POLICY_OFFSET 0
#define AURORA_ACR_FORCE_WRITE_POLICY_OFFSET 0
#define AURORA_ACR_FORCE_WRITE_POLICY_MASK \
#define AURORA_ACR_FORCE_WRITE_POLICY_MASK \
(0x3 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
(0x3 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
...
@@ -41,7 +44,52 @@
...
@@ -41,7 +44,52 @@
#define AURORA_ACR_FORCE_WRITE_THRO_POLICY \
#define AURORA_ACR_FORCE_WRITE_THRO_POLICY \
(2 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
(2 << AURORA_ACR_FORCE_WRITE_POLICY_OFFSET)
#define MAX_RANGE_SIZE 1024
#define AURORA_ERR_CNT_REG 0x600
#define AURORA_ERR_ATTR_CAP_REG 0x608
#define AURORA_ERR_ADDR_CAP_REG 0x60c
#define AURORA_ERR_WAY_CAP_REG 0x610
#define AURORA_ERR_INJECT_CTL_REG 0x614
#define AURORA_ERR_INJECT_MASK_REG 0x618
#define AURORA_ERR_CNT_CLR_OFFSET 31
#define AURORA_ERR_CNT_CLR \
(0x1 << AURORA_ERR_CNT_CLR_OFFSET)
#define AURORA_ERR_CNT_UE_OFFSET 16
#define AURORA_ERR_CNT_UE_MASK \
(0x7fff << AURORA_ERR_CNT_UE_OFFSET)
#define AURORA_ERR_CNT_CE_OFFSET 0
#define AURORA_ERR_CNT_CE_MASK \
(0xffff << AURORA_ERR_CNT_CE_OFFSET)
#define AURORA_ERR_ATTR_SRC_OFF 16
#define AURORA_ERR_ATTR_SRC_MSK \
(0x7 << AURORA_ERR_ATTR_SRC_OFF)
#define AURORA_ERR_ATTR_TXN_OFF 12
#define AURORA_ERR_ATTR_TXN_MSK \
(0xf << AURORA_ERR_ATTR_TXN_OFF)
#define AURORA_ERR_ATTR_ERR_OFF 8
#define AURORA_ERR_ATTR_ERR_MSK \
(0x3 << AURORA_ERR_ATTR_ERR_OFF)
#define AURORA_ERR_ATTR_CAP_VALID_OFF 0
#define AURORA_ERR_ATTR_CAP_VALID \
(0x1 << AURORA_ERR_ATTR_CAP_VALID_OFF)
#define AURORA_ERR_ADDR_CAP_ADDR_MASK 0xffffffe0
#define AURORA_ERR_WAY_IDX_OFF 8
#define AURORA_ERR_WAY_IDX_MSK \
(0xfff << AURORA_ERR_WAY_IDX_OFF)
#define AURORA_ERR_WAY_CAP_WAY_OFFSET 1
#define AURORA_ERR_WAY_CAP_WAY_MASK \
(0xf << AURORA_ERR_WAY_CAP_WAY_OFFSET)
#define AURORA_ERR_INJECT_CTL_ADDR_MASK 0xfffffff0
#define AURORA_ERR_ATTR_TXN_OFF 12
#define AURORA_ERR_INJECT_CTL_EN_MASK 0x3
#define AURORA_ERR_INJECT_CTL_EN_PARITY 0x2
#define AURORA_ERR_INJECT_CTL_EN_ECC 0x1
#define AURORA_MAX_RANGE_SIZE 1024
#define AURORA_WAY_SIZE_SHIFT 2
#define AURORA_WAY_SIZE_SHIFT 2
...
...
arch/arm/kernel/perf_event_v7.c
View file @
39f4d441
...
@@ -697,9 +697,9 @@ static struct attribute_group armv7_pmuv2_events_attr_group = {
...
@@ -697,9 +697,9 @@ static struct attribute_group armv7_pmuv2_events_attr_group = {
/*
/*
* Event filters for PMUv2
* Event filters for PMUv2
*/
*/
#define ARMV7_EXCLUDE_PL1
(1 <<
31)
#define ARMV7_EXCLUDE_PL1
BIT(
31)
#define ARMV7_EXCLUDE_USER
(1 <<
30)
#define ARMV7_EXCLUDE_USER
BIT(
30)
#define ARMV7_INCLUDE_HYP
(1 <<
27)
#define ARMV7_INCLUDE_HYP
BIT(
27)
/*
/*
* Secure debug enable reg
* Secure debug enable reg
...
...
arch/arm/kernel/smp.c
View file @
39f4d441
...
@@ -264,15 +264,13 @@ int __cpu_disable(void)
...
@@ -264,15 +264,13 @@ int __cpu_disable(void)
return
0
;
return
0
;
}
}
static
DECLARE_COMPLETION
(
cpu_died
);
/*
/*
* called on the thread which is asking for a CPU to be shutdown -
* called on the thread which is asking for a CPU to be shutdown -
* waits until shutdown has completed, or it is timed out.
* waits until shutdown has completed, or it is timed out.
*/
*/
void
__cpu_die
(
unsigned
int
cpu
)
void
__cpu_die
(
unsigned
int
cpu
)
{
{
if
(
!
wait_for_completion_timeout
(
&
cpu_died
,
msecs_to_jiffies
(
5000
)
))
{
if
(
!
cpu_wait_death
(
cpu
,
5
))
{
pr_err
(
"CPU%u: cpu didn't die
\n
"
,
cpu
);
pr_err
(
"CPU%u: cpu didn't die
\n
"
,
cpu
);
return
;
return
;
}
}
...
@@ -319,7 +317,7 @@ void arch_cpu_idle_dead(void)
...
@@ -319,7 +317,7 @@ void arch_cpu_idle_dead(void)
* this returns, power and/or clocks can be removed at any point
* this returns, power and/or clocks can be removed at any point
* from this CPU and its cache by platform_cpu_kill().
* from this CPU and its cache by platform_cpu_kill().
*/
*/
complete
(
&
cpu_died
);
(
void
)
cpu_report_death
(
);
/*
/*
* Ensure that the cache lines associated with that completion are
* Ensure that the cache lines associated with that completion are
...
...
arch/arm/kernel/vdso.c
View file @
39f4d441
...
@@ -194,7 +194,6 @@ static int __init vdso_init(void)
...
@@ -194,7 +194,6 @@ static int __init vdso_init(void)
}
}
text_pages
=
(
vdso_end
-
vdso_start
)
>>
PAGE_SHIFT
;
text_pages
=
(
vdso_end
-
vdso_start
)
>>
PAGE_SHIFT
;
pr_debug
(
"vdso: %i text pages at base %p
\n
"
,
text_pages
,
vdso_start
);
/* Allocate the VDSO text pagelist */
/* Allocate the VDSO text pagelist */
vdso_text_pagelist
=
kcalloc
(
text_pages
,
sizeof
(
struct
page
*
),
vdso_text_pagelist
=
kcalloc
(
text_pages
,
sizeof
(
struct
page
*
),
...
...
arch/arm/lib/Makefile
View file @
39f4d441
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
# Copyright (C) 1995-2000 Russell King
# Copyright (C) 1995-2000 Russell King
#
#
lib-y
:=
backtrace.o changebit.o csumipv6.o csumpartial.o
\
lib-y
:=
changebit.o csumipv6.o csumpartial.o
\
csumpartialcopy.o csumpartialcopyuser.o clearbit.o
\
csumpartialcopy.o csumpartialcopyuser.o clearbit.o
\
delay.o delay-loop.o findbit.o memchr.o memcpy.o
\
delay.o delay-loop.o findbit.o memchr.o memcpy.o
\
memmove.o memset.o setbit.o
\
memmove.o memset.o setbit.o
\
...
@@ -19,6 +19,12 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \
...
@@ -19,6 +19,12 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \
mmu-y
:=
clear_user.o copy_page.o getuser.o putuser.o
\
mmu-y
:=
clear_user.o copy_page.o getuser.o putuser.o
\
copy_from_user.o copy_to_user.o
copy_from_user.o copy_to_user.o
ifdef
CONFIG_CC_IS_CLANG
lib-y
+=
backtrace-clang.o
else
lib-y
+=
backtrace.o
endif
# using lib_ here won't override already available weak symbols
# using lib_ here won't override already available weak symbols
obj-$(CONFIG_UACCESS_WITH_MEMCPY)
+=
uaccess_with_memcpy.o
obj-$(CONFIG_UACCESS_WITH_MEMCPY)
+=
uaccess_with_memcpy.o
...
...
arch/arm/lib/backtrace-clang.S
0 → 100644
View file @
39f4d441
/*
SPDX
-
License
-
Identifier
:
GPL
-
2
.0
-
only
*/
/*
*
linux
/
arch
/
arm
/
lib
/
backtrace
-
clang
.
S
*
*
Copyright
(
C
)
2019
Nathan
Huckleberry
*
*/
#include <linux/kern_levels.h>
#include <linux/linkage.h>
#include <asm/assembler.h>
.
text
/*
fp
is
0
or
stack
frame
*/
#define frame r4
#define sv_fp r5
#define sv_pc r6
#define mask r7
#define sv_lr r8
ENTRY
(
c_backtrace
)
#if !defined(CONFIG_FRAME_POINTER) || !defined(CONFIG_PRINTK)
ret
lr
ENDPROC
(
c_backtrace
)
#else
/*
*
Clang
does
not
store
pc
or
sp
in
function
prologues
so
we
don
't know exactly
*
where
the
function
starts
.
*
*
We
can
treat
the
current
frame
's lr as the saved pc and the preceding
*
frame
's lr as the current frame'
s
lr
,
but
we
can
't trace the most recent
*
call
.
Inserting
a
false
stack
frame
allows
us
to
reference
the
function
*
called
last
in
the
stacktrace
.
*
*
If
the
call
instruction
was
a
bl
we
can
look
at
the
callers
branch
*
instruction
to
calculate
the
saved
pc
.
We
can
recover
the
pc
in
most
cases
,
*
but
in
cases
such
as
calling
function
pointers
we
cannot
.
In
this
case
,
*
default
to
using
the
lr
.
This
will
be
some
address
in
the
function
,
but
will
*
not
be
the
function
start
.
*
*
Unfortunately
due
to
the
stack
frame
layout
we
can
't dump r0 - r3, but these
*
are
less
frequently
saved
.
*
*
Stack
frame
layout
:
*
<
larger
addresses
>
*
saved
lr
*
frame
=>
saved
fp
*
optionally
saved
caller
registers
(
r4
-
r10
)
*
optionally
saved
arguments
(
r0
-
r3
)
*
<
top
of
stack
frame
>
*
<
smaller
addresses
>
*
*
Functions
start
with
the
following
code
sequence
:
*
corrected
pc
=>
stmfd
sp
!,
{
...
,
fp
,
lr
}
*
add
fp
,
sp
,
#
x
*
stmfd
sp
!,
{
r0
-
r3
}
(
optional
)
*
*
*
*
*
*
*
The
diagram
below
shows
an
example
stack
setup
for
dump_stack
.
*
*
The
frame
for
c_backtrace
has
pointers
to
the
code
of
dump_stack
.
This
is
*
why
the
frame
of
c_backtrace
is
used
to
for
the
pc
calculation
of
*
dump_stack
.
This
is
why
we
must
move
back
a
frame
to
print
dump_stack
.
*
*
The
stored
locals
for
dump_stack
are
in
dump_stack
's frame. This means that
*
to
fully
print
dump_stack
's frame we need both the frame for dump_stack (for
*
locals
)
and
the
frame
that
was
called
by
dump_stack
(
for
pc
)
.
*
*
To
print
locals
we
must
know
where
the
function
start
is
.
If
we
read
the
*
function
prologue
opcodes
we
can
determine
which
variables
are
stored
in
the
*
stack
frame
.
*
*
To
find
the
function
start
of
dump_stack
we
can
look
at
the
stored
LR
of
*
show_stack
.
It
points
at
the
instruction
directly
after
the
bl
dump_stack
.
*
We
can
then
read
the
offset
from
the
bl
opcode
to
determine
where
the
branch
*
takes
us
.
The
address
calculated
must
be
the
start
of
dump_stack
.
*
*
c_backtrace
frame
dump_stack
:
*
{[
LR
]
}
============|
...
*
{[
FP
]
}
=======
| |
bl
c_backtrace
*
| |
=>
...
*
{[
R4
-
R10
]}
|
*
{[
R0
-
R3
]
}
|
show_stack
:
*
dump_stack
frame
|
...
*
{[
LR
]
}
=============|
bl
dump_stack
*
{[
FP
]
}
<=======
| |
=>
...
*
{[
R4
-
R10
]}
*
{[
R0
-
R3
]
}
*/
stmfd
sp
!,
{
r4
-
r9
,
fp
,
lr
}
@
Save
an
extra
register
@
to
ensure
8
byte
alignment
movs
frame
,
r0
@
if
frame
pointer
is
zero
beq
no_frame
@
we
have
no
stack
frames
tst
r1
,
#
0x10
@
26
or
32
-
bit
mode
?
moveq
mask
,
#
0xfc000003
movne
mask
,
#
0
@
mask
for
32
-
bit
/*
*
Switches
the
current
frame
to
be
the
frame
for
dump_stack
.
*/
add
frame
,
sp
,
#
24
@
switch
to
false
frame
for_each_frame
:
tst
frame
,
mask
@
Check
for
address
exceptions
bne
no_frame
/*
*
sv_fp
is
the
stack
frame
with
the
locals
for
the
current
considered
*
function
.
*
*
sv_pc
is
the
saved
lr
frame
the
frame
above
.
This
is
a
pointer
to
a
code
*
address
within
the
current
considered
function
,
but
it
is
not
the
function
*
start
.
This
value
gets
updated
to
be
the
function
start
later
if
it
is
*
possible
.
*/
1001
:
ldr
sv_pc
,
[
frame
,
#
4
]
@
get
saved
'pc'
1002
:
ldr
sv_fp
,
[
frame
,
#
0
]
@
get
saved
fp
teq
sv_fp
,
mask
@
make
sure
next
frame
exists
beq
no_frame
/*
*
sv_lr
is
the
lr
from
the
function
that
called
the
current
function
.
This
is
*
a
pointer
to
a
code
address
in
the
current
function
's caller. sv_lr-4 is
*
the
instruction
used
to
call
the
current
function
.
*
*
This
sv_lr
can
be
used
to
calculate
the
function
start
if
the
function
was
*
called
using
a
bl
instruction
.
If
the
function
start
can
be
recovered
sv_pc
*
is
overwritten
with
the
function
start
.
*
*
If
the
current
function
was
called
using
a
function
pointer
we
cannot
*
recover
the
function
start
and
instead
continue
with
sv_pc
as
an
arbitrary
*
value
within
the
current
function
.
If
this
is
the
case
we
cannot
print
*
registers
for
the
current
function
,
but
the
stacktrace
is
still
printed
*
properly
.
*/
1003
:
ldr
sv_lr
,
[
sv_fp
,
#
4
]
@
get
saved
lr
from
next
frame
ldr
r0
,
[
sv_lr
,
#-
4
]
@
get
call
instruction
ldr
r3
,
.
Lopcode
+
4
and
r2
,
r3
,
r0
@
is
this
a
bl
call
teq
r2
,
r3
bne
finished_setup
@
give
up
if
it
's not
and
r0
,
#
0xffffff
@
get
call
offset
24
-
bit
int
lsl
r0
,
r0
,
#
8
@
sign
extend
offset
asr
r0
,
r0
,
#
8
ldr
sv_pc
,
[
sv_fp
,
#
4
]
@
get
lr
address
add
sv_pc
,
sv_pc
,
#-
4
@
get
call
instruction
address
add
sv_pc
,
sv_pc
,
#
8
@
take
care
of
prefetch
add
sv_pc
,
sv_pc
,
r0
,
lsl
#
2
@
find
function
start
finished_setup
:
bic
sv_pc
,
sv_pc
,
mask
@
mask
PC
/
LR
for
the
mode
/*
*
Print
the
function
(
sv_pc
)
and
where
it
was
called
from
(
sv_lr
)
.
*/
1004
:
mov
r0
,
sv_pc
mov
r1
,
sv_lr
mov
r2
,
frame
bic
r1
,
r1
,
mask
@
mask
PC
/
LR
for
the
mode
bl
dump_backtrace_entry
/*
*
Test
if
the
function
start
is
a
stmfd
instruction
to
determine
which
*
registers
were
stored
in
the
function
prologue
.
*
*
If
we
could
not
recover
the
sv_pc
because
we
were
called
through
a
function
*
pointer
the
comparison
will
fail
and
no
registers
will
print
.
Unwinding
will
*
continue
as
if
there
had
been
no
registers
stored
in
this
frame
.
*/
1005
:
ldr
r1
,
[
sv_pc
,
#
0
]
@
if
stmfd
sp
!,
{
...
,
fp
,
lr
}
ldr
r3
,
.
Lopcode
@
instruction
exists
,
teq
r3
,
r1
,
lsr
#
11
ldr
r0
,
[
frame
]
@
locals
are
stored
in
@
the
preceding
frame
subeq
r0
,
r0
,
#
4
bleq
dump_backtrace_stm
@
dump
saved
registers
/*
*
If
we
are
out
of
frames
or
if
the
next
frame
is
invalid
.
*/
teq
sv_fp
,
#
0
@
zero
saved
fp
means
beq
no_frame
@
no
further
frames
cmp
sv_fp
,
frame
@
next
frame
must
be
mov
frame
,
sv_fp
@
above
the
current
frame
bhi
for_each_frame
1006
:
adr
r0
,
.
Lbad
mov
r1
,
frame
bl
printk
no_frame
:
ldmfd
sp
!,
{
r4
-
r9
,
fp
,
pc
}
ENDPROC
(
c_backtrace
)
.
pushsection
__ex_table
,
"a"
.
align
3
.
long
1001
b
,
1006
b
.
long
1002
b
,
1006
b
.
long
1003
b
,
1006
b
.
long
1004
b
,
1006
b
.
long
1005
b
,
1006
b
.
popsection
.
Lbad
:
.
asciz
"Backtrace aborted due to bad frame pointer <%p>\n"
.
align
.
Lopcode
:
.
word
0xe92d4800
>>
11
@
stmfd
sp
!,
{
...
fp
,
lr
}
.
word
0x0b000000
@
bl
if
these
bits
are
set
#endif
arch/arm/mach-iop13xx/pci.c
View file @
39f4d441
...
@@ -289,7 +289,7 @@ iop13xx_atux_write_config(struct pci_bus *bus, unsigned int devfn, int where,
...
@@ -289,7 +289,7 @@ iop13xx_atux_write_config(struct pci_bus *bus, unsigned int devfn, int where,
if
(
size
!=
4
)
{
if
(
size
!=
4
)
{
val
=
iop13xx_atux_read
(
addr
);
val
=
iop13xx_atux_read
(
addr
);
if
(
!
iop13xx_atux_pci_status
(
1
)
==
0
)
if
(
iop13xx_atux_pci_status
(
1
)
)
return
PCIBIOS_SUCCESSFUL
;
return
PCIBIOS_SUCCESSFUL
;
where
=
(
where
&
3
)
*
8
;
where
=
(
where
&
3
)
*
8
;
...
@@ -436,7 +436,7 @@ iop13xx_atue_write_config(struct pci_bus *bus, unsigned int devfn, int where,
...
@@ -436,7 +436,7 @@ iop13xx_atue_write_config(struct pci_bus *bus, unsigned int devfn, int where,
if
(
size
!=
4
)
{
if
(
size
!=
4
)
{
val
=
iop13xx_atue_read
(
addr
);
val
=
iop13xx_atue_read
(
addr
);
if
(
!
iop13xx_atue_pci_status
(
1
)
==
0
)
if
(
iop13xx_atue_pci_status
(
1
)
)
return
PCIBIOS_SUCCESSFUL
;
return
PCIBIOS_SUCCESSFUL
;
where
=
(
where
&
3
)
*
8
;
where
=
(
where
&
3
)
*
8
;
...
...
arch/arm/mm/cache-l2x0.c
View file @
39f4d441
...
@@ -18,8 +18,8 @@
...
@@ -18,8 +18,8 @@
#include <asm/cp15.h>
#include <asm/cp15.h>
#include <asm/cputype.h>
#include <asm/cputype.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/hardware/cache-aurora-l2.h>
#include "cache-tauros3.h"
#include "cache-tauros3.h"
#include "cache-aurora-l2.h"
struct
l2c_init_data
{
struct
l2c_init_data
{
const
char
*
type
;
const
char
*
type
;
...
@@ -1352,8 +1352,8 @@ static unsigned long aurora_range_end(unsigned long start, unsigned long end)
...
@@ -1352,8 +1352,8 @@ static unsigned long aurora_range_end(unsigned long start, unsigned long end)
* since cache range operations stall the CPU pipeline
* since cache range operations stall the CPU pipeline
* until completion.
* until completion.
*/
*/
if
(
end
>
start
+
MAX_RANGE_SIZE
)
if
(
end
>
start
+
AURORA_
MAX_RANGE_SIZE
)
end
=
start
+
MAX_RANGE_SIZE
;
end
=
start
+
AURORA_
MAX_RANGE_SIZE
;
/*
/*
* Cache range operations can't straddle a page boundary.
* Cache range operations can't straddle a page boundary.
...
@@ -1493,6 +1493,18 @@ static void __init aurora_of_parse(const struct device_node *np,
...
@@ -1493,6 +1493,18 @@ static void __init aurora_of_parse(const struct device_node *np,
mask
|=
AURORA_ACR_FORCE_WRITE_POLICY_MASK
;
mask
|=
AURORA_ACR_FORCE_WRITE_POLICY_MASK
;
}
}
if
(
of_property_read_bool
(
np
,
"marvell,ecc-enable"
))
{
mask
|=
AURORA_ACR_ECC_EN
;
val
|=
AURORA_ACR_ECC_EN
;
}
if
(
of_property_read_bool
(
np
,
"arm,parity-enable"
))
{
mask
|=
AURORA_ACR_PARITY_EN
;
val
|=
AURORA_ACR_PARITY_EN
;
}
else
if
(
of_property_read_bool
(
np
,
"arm,parity-disable"
))
{
mask
|=
AURORA_ACR_PARITY_EN
;
}
*
aux_val
&=
~
mask
;
*
aux_val
&=
~
mask
;
*
aux_val
|=
val
;
*
aux_val
|=
val
;
*
aux_mask
&=
~
mask
;
*
aux_mask
&=
~
mask
;
...
...
arch/arm/mm/fault.c
View file @
39f4d441
...
@@ -191,7 +191,7 @@ static inline bool access_error(unsigned int fsr, struct vm_area_struct *vma)
...
@@ -191,7 +191,7 @@ static inline bool access_error(unsigned int fsr, struct vm_area_struct *vma)
{
{
unsigned
int
mask
=
VM_READ
|
VM_WRITE
|
VM_EXEC
;
unsigned
int
mask
=
VM_READ
|
VM_WRITE
|
VM_EXEC
;
if
(
fsr
&
FSR_WRITE
)
if
(
(
fsr
&
FSR_WRITE
)
&&
!
(
fsr
&
FSR_CM
)
)
mask
=
VM_WRITE
;
mask
=
VM_WRITE
;
if
(
fsr
&
FSR_LNX_PF
)
if
(
fsr
&
FSR_LNX_PF
)
mask
=
VM_EXEC
;
mask
=
VM_EXEC
;
...
@@ -262,7 +262,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
...
@@ -262,7 +262,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
if
(
user_mode
(
regs
))
if
(
user_mode
(
regs
))
flags
|=
FAULT_FLAG_USER
;
flags
|=
FAULT_FLAG_USER
;
if
(
fsr
&
FSR_WRITE
)
if
(
(
fsr
&
FSR_WRITE
)
&&
!
(
fsr
&
FSR_CM
)
)
flags
|=
FAULT_FLAG_WRITE
;
flags
|=
FAULT_FLAG_WRITE
;
/*
/*
...
...
arch/arm/mm/fault.h
View file @
39f4d441
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
* Fault status register encodings. We steal bit 31 for our own purposes.
* Fault status register encodings. We steal bit 31 for our own purposes.
*/
*/
#define FSR_LNX_PF (1 << 31)
#define FSR_LNX_PF (1 << 31)
#define FSR_CM (1 << 13)
#define FSR_WRITE (1 << 11)
#define FSR_WRITE (1 << 11)
#define FSR_FS4 (1 << 10)
#define FSR_FS4 (1 << 10)
#define FSR_FS3_0 (15)
#define FSR_FS3_0 (15)
...
...
arch/arm/mm/mmu.c
View file @
39f4d441
...
@@ -1177,10 +1177,29 @@ void __init adjust_lowmem_bounds(void)
...
@@ -1177,10 +1177,29 @@ void __init adjust_lowmem_bounds(void)
*/
*/
vmalloc_limit
=
(
u64
)(
uintptr_t
)
vmalloc_min
-
PAGE_OFFSET
+
PHYS_OFFSET
;
vmalloc_limit
=
(
u64
)(
uintptr_t
)
vmalloc_min
-
PAGE_OFFSET
+
PHYS_OFFSET
;
/*
* The first usable region must be PMD aligned. Mark its start
* as MEMBLOCK_NOMAP if it isn't
*/
for_each_memblock
(
memory
,
reg
)
{
if
(
!
memblock_is_nomap
(
reg
))
{
if
(
!
IS_ALIGNED
(
reg
->
base
,
PMD_SIZE
))
{
phys_addr_t
len
;
len
=
round_up
(
reg
->
base
,
PMD_SIZE
)
-
reg
->
base
;
memblock_mark_nomap
(
reg
->
base
,
len
);
}
break
;
}
}
for_each_memblock
(
memory
,
reg
)
{
for_each_memblock
(
memory
,
reg
)
{
phys_addr_t
block_start
=
reg
->
base
;
phys_addr_t
block_start
=
reg
->
base
;
phys_addr_t
block_end
=
reg
->
base
+
reg
->
size
;
phys_addr_t
block_end
=
reg
->
base
+
reg
->
size
;
if
(
memblock_is_nomap
(
reg
))
continue
;
if
(
reg
->
base
<
vmalloc_limit
)
{
if
(
reg
->
base
<
vmalloc_limit
)
{
if
(
block_end
>
lowmem_limit
)
if
(
block_end
>
lowmem_limit
)
/*
/*
...
...
drivers/amba/bus.c
View file @
39f4d441
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#include <linux/limits.h>
#include <linux/limits.h>
#include <linux/clk/clk-conf.h>
#include <linux/clk/clk-conf.h>
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <asm/irq.h>
#include <asm/irq.h>
...
@@ -401,6 +402,21 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent)
...
@@ -401,6 +402,21 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent)
ret
=
amba_get_enable_pclk
(
dev
);
ret
=
amba_get_enable_pclk
(
dev
);
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
u32
pid
,
cid
;
u32
pid
,
cid
;
struct
reset_control
*
rstc
;
/*
* Find reset control(s) of the amba bus and de-assert them.
*/
rstc
=
of_reset_control_array_get_optional_shared
(
dev
->
dev
.
of_node
);
if
(
IS_ERR
(
rstc
))
{
ret
=
PTR_ERR
(
rstc
);
if
(
ret
!=
-
EPROBE_DEFER
)
dev_err
(
&
dev
->
dev
,
"can't get reset: %d
\n
"
,
ret
);
goto
err_reset
;
}
reset_control_deassert
(
rstc
);
reset_control_put
(
rstc
);
/*
/*
* Read pid and cid based on size of resource
* Read pid and cid based on size of resource
...
@@ -458,6 +474,12 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent)
...
@@ -458,6 +474,12 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent)
release_resource
(
&
dev
->
res
);
release_resource
(
&
dev
->
res
);
err_out:
err_out:
return
ret
;
return
ret
;
err_reset:
amba_put_disable_pclk
(
dev
);
iounmap
(
tmp
);
dev_pm_domain_detach
(
&
dev
->
dev
,
true
);
goto
err_release
;
}
}
/*
/*
...
...
drivers/edac/Kconfig
View file @
39f4d441
...
@@ -466,6 +466,13 @@ config EDAC_SIFIVE
...
@@ -466,6 +466,13 @@ config EDAC_SIFIVE
help
help
Support for error detection and correction on the SiFive SoCs.
Support for error detection and correction on the SiFive SoCs.
config EDAC_ARMADA_XP
bool "Marvell Armada XP DDR and L2 Cache ECC"
depends on MACH_MVEBU_V7
help
Support for error correction and detection on the Marvell Aramada XP
DDR RAM and L2 cache controllers.
config EDAC_SYNOPSYS
config EDAC_SYNOPSYS
tristate "Synopsys DDR Memory Controller"
tristate "Synopsys DDR Memory Controller"
depends on ARCH_ZYNQ || ARCH_ZYNQMP
depends on ARCH_ZYNQ || ARCH_ZYNQMP
...
...
drivers/edac/Makefile
View file @
39f4d441
...
@@ -80,6 +80,7 @@ obj-$(CONFIG_EDAC_THUNDERX) += thunderx_edac.o
...
@@ -80,6 +80,7 @@ obj-$(CONFIG_EDAC_THUNDERX) += thunderx_edac.o
obj-$(CONFIG_EDAC_ALTERA)
+=
altera_edac.o
obj-$(CONFIG_EDAC_ALTERA)
+=
altera_edac.o
obj-$(CONFIG_EDAC_SIFIVE)
+=
sifive_edac.o
obj-$(CONFIG_EDAC_SIFIVE)
+=
sifive_edac.o
obj-$(CONFIG_EDAC_ARMADA_XP)
+=
armada_xp_edac.o
obj-$(CONFIG_EDAC_SYNOPSYS)
+=
synopsys_edac.o
obj-$(CONFIG_EDAC_SYNOPSYS)
+=
synopsys_edac.o
obj-$(CONFIG_EDAC_XGENE)
+=
xgene_edac.o
obj-$(CONFIG_EDAC_XGENE)
+=
xgene_edac.o
obj-$(CONFIG_EDAC_TI)
+=
ti_edac.o
obj-$(CONFIG_EDAC_TI)
+=
ti_edac.o
...
...
drivers/edac/armada_xp_edac.c
0 → 100644
View file @
39f4d441
This diff is collapsed.
Click to expand it.
drivers/edac/debugfs.c
View file @
39f4d441
...
@@ -138,3 +138,14 @@ void edac_debugfs_create_x16(const char *name, umode_t mode,
...
@@ -138,3 +138,14 @@ void edac_debugfs_create_x16(const char *name, umode_t mode,
debugfs_create_x16
(
name
,
mode
,
parent
,
value
);
debugfs_create_x16
(
name
,
mode
,
parent
,
value
);
}
}
EXPORT_SYMBOL_GPL
(
edac_debugfs_create_x16
);
EXPORT_SYMBOL_GPL
(
edac_debugfs_create_x16
);
/* Wrapper for debugfs_create_x32() */
void
edac_debugfs_create_x32
(
const
char
*
name
,
umode_t
mode
,
struct
dentry
*
parent
,
u32
*
value
)
{
if
(
!
parent
)
parent
=
edac_debugfs
;
debugfs_create_x32
(
name
,
mode
,
parent
,
value
);
}
EXPORT_SYMBOL_GPL
(
edac_debugfs_create_x32
);
drivers/edac/edac_module.h
View file @
39f4d441
...
@@ -82,6 +82,8 @@ void edac_debugfs_create_x8(const char *name, umode_t mode,
...
@@ -82,6 +82,8 @@ void edac_debugfs_create_x8(const char *name, umode_t mode,
struct
dentry
*
parent
,
u8
*
value
);
struct
dentry
*
parent
,
u8
*
value
);
void
edac_debugfs_create_x16
(
const
char
*
name
,
umode_t
mode
,
void
edac_debugfs_create_x16
(
const
char
*
name
,
umode_t
mode
,
struct
dentry
*
parent
,
u16
*
value
);
struct
dentry
*
parent
,
u16
*
value
);
void
edac_debugfs_create_x32
(
const
char
*
name
,
umode_t
mode
,
struct
dentry
*
parent
,
u32
*
value
);
#else
#else
static
inline
void
edac_debugfs_init
(
void
)
{
}
static
inline
void
edac_debugfs_init
(
void
)
{
}
static
inline
void
edac_debugfs_exit
(
void
)
{
}
static
inline
void
edac_debugfs_exit
(
void
)
{
}
...
@@ -96,6 +98,8 @@ static inline void edac_debugfs_create_x8(const char *name, umode_t mode,
...
@@ -96,6 +98,8 @@ static inline void edac_debugfs_create_x8(const char *name, umode_t mode,
struct
dentry
*
parent
,
u8
*
value
)
{
}
struct
dentry
*
parent
,
u8
*
value
)
{
}
static
inline
void
edac_debugfs_create_x16
(
const
char
*
name
,
umode_t
mode
,
static
inline
void
edac_debugfs_create_x16
(
const
char
*
name
,
umode_t
mode
,
struct
dentry
*
parent
,
u16
*
value
)
{
}
struct
dentry
*
parent
,
u16
*
value
)
{
}
static
inline
void
edac_debugfs_create_x32
(
const
char
*
name
,
umode_t
mode
,
struct
dentry
*
parent
,
u32
*
value
)
{
}
#endif
#endif
/*
/*
...
...
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