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
c8ee610a
Commit
c8ee610a
authored
Feb 03, 2020
by
Vineet Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARC: uaccess: elide unaliged handling if hardware supports
Signed-off-by:
Vineet Gupta
<
vgupta@kernel.org
>
parent
f798f91e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
arch/arc/include/asm/uaccess.h
arch/arc/include/asm/uaccess.h
+6
-4
No files found.
arch/arc/include/asm/uaccess.h
View file @
c8ee610a
...
...
@@ -146,8 +146,9 @@ raw_copy_from_user(void *to, const void __user *from, unsigned long n)
if
(
n
==
0
)
return
0
;
/* unaligned */
if
(((
unsigned
long
)
to
&
0x3
)
||
((
unsigned
long
)
from
&
0x3
))
{
/* fallback for unaligned access when hardware doesn't support */
if
(
!
IS_ENABLED
(
CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS
)
&&
(((
unsigned
long
)
to
&
0x3
)
||
((
unsigned
long
)
from
&
0x3
)))
{
unsigned
char
tmp
;
...
...
@@ -373,8 +374,9 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n)
if
(
n
==
0
)
return
0
;
/* unaligned */
if
(((
unsigned
long
)
to
&
0x3
)
||
((
unsigned
long
)
from
&
0x3
))
{
/* fallback for unaligned access when hardware doesn't support */
if
(
!
IS_ENABLED
(
CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS
)
&&
(((
unsigned
long
)
to
&
0x3
)
||
((
unsigned
long
)
from
&
0x3
)))
{
unsigned
char
tmp
;
...
...
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