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
nexedi
linux
Commits
c89c3a6a
Commit
c89c3a6a
authored
Aug 05, 2014
by
Russell King
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'swp' (early part) into for-next
parents
71095615
58171bf2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
8 deletions
+27
-8
arch/arm/kernel/setup.c
arch/arm/kernel/setup.c
+22
-7
arch/arm/kernel/swp_emulate.c
arch/arm/kernel/swp_emulate.c
+4
-0
arch/arm/mm/Kconfig
arch/arm/mm/Kconfig
+1
-1
No files found.
arch/arm/kernel/setup.c
View file @
c89c3a6a
...
...
@@ -393,19 +393,34 @@ static void __init cpuid_init_hwcaps(void)
elf_hwcap
|=
HWCAP_LPAE
;
}
static
void
__init
feat_v6
_fixup
(
void
)
static
void
__init
elf_hwcap
_fixup
(
void
)
{
int
id
=
read_cpuid_id
();
if
((
id
&
0xff0f0000
)
!=
0x41070000
)
return
;
unsigned
id
=
read_cpuid_id
();
unsigned
sync_prim
;
/*
* HWCAP_TLS is available only on 1136 r1p0 and later,
* see also kuser_get_tls_init.
*/
if
((((
id
>>
4
)
&
0xfff
)
==
0xb36
)
&&
(((
id
>>
20
)
&
3
)
==
0
))
if
(
read_cpuid_part
()
==
ARM_CPU_PART_ARM1136
&&
((
id
>>
20
)
&
3
)
==
0
)
{
elf_hwcap
&=
~
HWCAP_TLS
;
return
;
}
/* Verify if CPUID scheme is implemented */
if
((
id
&
0x000f0000
)
!=
0x000f0000
)
return
;
/*
* If the CPU supports LDREX/STREX and LDREXB/STREXB,
* avoid advertising SWP; it may not be atomic with
* multiprocessing cores.
*/
sync_prim
=
((
read_cpuid_ext
(
CPUID_EXT_ISAR3
)
>>
8
)
&
0xf0
)
|
((
read_cpuid_ext
(
CPUID_EXT_ISAR4
)
>>
20
)
&
0x0f
);
if
(
sync_prim
>=
0x13
)
elf_hwcap
&=
~
HWCAP_SWP
;
}
/*
...
...
@@ -609,7 +624,7 @@ static void __init setup_processor(void)
#endif
erratum_a15_798181_init
();
feat_v6
_fixup
();
elf_hwcap
_fixup
();
cacheid_init
();
cpu_init
();
...
...
arch/arm/kernel/swp_emulate.c
View file @
c89c3a6a
...
...
@@ -27,6 +27,7 @@
#include <linux/perf_event.h>
#include <asm/opcodes.h>
#include <asm/system_info.h>
#include <asm/traps.h>
#include <asm/uaccess.h>
...
...
@@ -266,6 +267,9 @@ static struct undef_hook swp_hook = {
*/
static
int
__init
swp_emulation_init
(
void
)
{
if
(
cpu_architecture
()
<
CPU_ARCH_ARMv7
)
return
0
;
#ifdef CONFIG_PROC_FS
if
(
!
proc_create
(
"cpu/swp_emulation"
,
S_IRUGO
,
NULL
,
&
proc_status_fops
))
return
-
ENOMEM
;
...
...
arch/arm/mm/Kconfig
View file @
c89c3a6a
...
...
@@ -669,7 +669,7 @@ config ARM_VIRT_EXT
details.
config SWP_EMULATE
bool "Emulate SWP/SWPB instructions"
bool "Emulate SWP/SWPB instructions"
if !SMP
depends on CPU_V7
default y if SMP
select HAVE_PROC_CPU if PROC_FS
...
...
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