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
8bf69f6f
Commit
8bf69f6f
authored
Oct 03, 2002
by
Martin Schwidefsky
Committed by
Linus Torvalds
Oct 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] s390 update (10/27): bitops bug.
Fix broken bitops for unaligned atomic operations on s390.
parent
c6b71ca4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
include/asm-s390/bitops.h
include/asm-s390/bitops.h
+5
-5
include/asm-s390x/bitops.h
include/asm-s390x/bitops.h
+6
-6
No files found.
include/asm-s390/bitops.h
View file @
8bf69f6f
...
...
@@ -59,8 +59,8 @@ static inline void set_bit_cs(int nr, volatile void *ptr)
addr
=
(
unsigned
long
)
ptr
;
#if ALIGN_CS == 1
addr
^=
addr
&
3
;
/* align address to 4 */
nr
+=
(
addr
&
3
)
<<
3
;
/* add alignment to bit number */
addr
^=
addr
&
3
;
/* align address to 4 */
#endif
addr
+=
(
nr
^
(
nr
&
31
))
>>
3
;
/* calculate address for CS */
mask
=
1UL
<<
(
nr
&
31
);
/* make OR mask */
...
...
@@ -84,8 +84,8 @@ static inline void clear_bit_cs(int nr, volatile void *ptr)
addr
=
(
unsigned
long
)
ptr
;
#if ALIGN_CS == 1
addr
^=
addr
&
3
;
/* align address to 4 */
nr
+=
(
addr
&
3
)
<<
3
;
/* add alignment to bit number */
addr
^=
addr
&
3
;
/* align address to 4 */
#endif
addr
+=
(
nr
^
(
nr
&
31
))
>>
3
;
/* calculate address for CS */
mask
=
~
(
1UL
<<
(
nr
&
31
));
/* make AND mask */
...
...
@@ -109,8 +109,8 @@ static inline void change_bit_cs(int nr, volatile void *ptr)
addr
=
(
unsigned
long
)
ptr
;
#if ALIGN_CS == 1
addr
^=
addr
&
3
;
/* align address to 4 */
nr
+=
(
addr
&
3
)
<<
3
;
/* add alignment to bit number */
addr
^=
addr
&
3
;
/* align address to 4 */
#endif
addr
+=
(
nr
^
(
nr
&
31
))
>>
3
;
/* calculate address for CS */
mask
=
1UL
<<
(
nr
&
31
);
/* make XOR mask */
...
...
@@ -160,8 +160,8 @@ static inline int test_and_clear_bit_cs(int nr, volatile void *ptr)
addr
=
(
unsigned
long
)
ptr
;
#if ALIGN_CS == 1
addr
^=
addr
&
3
;
/* align address to 4 */
nr
+=
(
addr
&
3
)
<<
3
;
/* add alignment to bit number */
addr
^=
addr
&
3
;
/* align address to 4 */
#endif
addr
+=
(
nr
^
(
nr
&
31
))
>>
3
;
/* calculate address for CS */
mask
=
~
(
1UL
<<
(
nr
&
31
));
/* make AND mask */
...
...
@@ -186,8 +186,8 @@ static inline int test_and_change_bit_cs(int nr, volatile void *ptr)
addr
=
(
unsigned
long
)
ptr
;
#if ALIGN_CS == 1
addr
^=
addr
&
3
;
/* align address to 4 */
nr
+=
(
addr
&
3
)
<<
3
;
/* add alignment to bit number */
addr
^=
addr
&
3
;
/* align address to 4 */
#endif
addr
+=
(
nr
^
(
nr
&
31
))
>>
3
;
/* calculate address for CS */
mask
=
1UL
<<
(
nr
&
31
);
/* make XOR mask */
...
...
include/asm-s390x/bitops.h
View file @
8bf69f6f
...
...
@@ -63,8 +63,8 @@ static inline void set_bit_cs(unsigned long nr, volatile void *ptr)
addr
=
(
unsigned
long
)
ptr
;
#if ALIGN_CS == 1
addr
^=
addr
&
7
;
/* align address to 8 */
nr
+=
(
addr
&
7
)
<<
3
;
/* add alignment to bit number */
addr
^=
addr
&
7
;
/* align address to 8 */
#endif
addr
+=
(
nr
^
(
nr
&
63
))
>>
3
;
/* calculate address for CS */
mask
=
1UL
<<
(
nr
&
63
);
/* make OR mask */
...
...
@@ -88,8 +88,8 @@ static inline void clear_bit_cs(unsigned long nr, volatile void *ptr)
addr
=
(
unsigned
long
)
ptr
;
#if ALIGN_CS == 1
addr
^=
addr
&
7
;
/* align address to 8 */
nr
+=
(
addr
&
7
)
<<
3
;
/* add alignment to bit number */
addr
^=
addr
&
7
;
/* align address to 8 */
#endif
addr
+=
(
nr
^
(
nr
&
63
))
>>
3
;
/* calculate address for CS */
mask
=
~
(
1UL
<<
(
nr
&
63
));
/* make AND mask */
...
...
@@ -113,8 +113,8 @@ static inline void change_bit_cs(unsigned long nr, volatile void *ptr)
addr
=
(
unsigned
long
)
ptr
;
#if ALIGN_CS == 1
addr
^=
addr
&
7
;
/* align address to 8 */
nr
+=
(
addr
&
7
)
<<
3
;
/* add alignment to bit number */
addr
^=
addr
&
7
;
/* align address to 8 */
#endif
addr
+=
(
nr
^
(
nr
&
63
))
>>
3
;
/* calculate address for CS */
mask
=
1UL
<<
(
nr
&
63
);
/* make XOR mask */
...
...
@@ -139,8 +139,8 @@ test_and_set_bit_cs(unsigned long nr, volatile void *ptr)
addr
=
(
unsigned
long
)
ptr
;
#if ALIGN_CS == 1
addr
^=
addr
&
7
;
/* align address to 8 */
nr
+=
(
addr
&
7
)
<<
3
;
/* add alignment to bit number */
addr
^=
addr
&
7
;
/* align address to 8 */
#endif
addr
+=
(
nr
^
(
nr
&
63
))
>>
3
;
/* calculate address for CS */
mask
=
1UL
<<
(
nr
&
63
);
/* make OR/test mask */
...
...
@@ -166,8 +166,8 @@ test_and_clear_bit_cs(unsigned long nr, volatile void *ptr)
addr
=
(
unsigned
long
)
ptr
;
#if ALIGN_CS == 1
addr
^=
addr
&
7
;
/* align address to 8 */
nr
+=
(
addr
&
7
)
<<
3
;
/* add alignment to bit number */
addr
^=
addr
&
7
;
/* align address to 8 */
#endif
addr
+=
(
nr
^
(
nr
&
63
))
>>
3
;
/* calculate address for CS */
mask
=
~
(
1UL
<<
(
nr
&
63
));
/* make AND mask */
...
...
@@ -193,8 +193,8 @@ test_and_change_bit_cs(unsigned long nr, volatile void *ptr)
addr
=
(
unsigned
long
)
ptr
;
#if ALIGN_CS == 1
addr
^=
addr
&
7
;
/* align address to 8 */
nr
+=
(
addr
&
7
)
<<
3
;
/* add alignment to bit number */
addr
^=
addr
&
7
;
/* align address to 8 */
#endif
addr
+=
(
nr
^
(
nr
&
63
))
>>
3
;
/* calculate address for CS */
mask
=
1UL
<<
(
nr
&
63
);
/* make XOR mask */
...
...
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