projects
/
microwatt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0fa14f6
)
tests/xics: Ensure no compiler optimisations in delay()
author
Benjamin Herrenschmidt
<benh@kernel.crashing.org>
Wed, 17 Jun 2020 12:06:28 +0000
(22:06 +1000)
committer
Benjamin Herrenschmidt
<benh@kernel.crashing.org>
Fri, 19 Jun 2020 10:28:03 +0000
(20:28 +1000)
In case it would be tempted to "read ahead" the delay function
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
tests/xics/xics.c
patch
|
blob
|
history
diff --git
a/tests/xics/xics.c
b/tests/xics/xics.c
index 46f9a016f81a684f469bf79f142a623012289567..f41c3a41c2efd34a227c3172c017c09b243b93f9 100644
(file)
--- a/
tests/xics/xics.c
+++ b/
tests/xics/xics.c
@@
-12,8
+12,8
@@
void delay(void)
{
static volatile int i;
- for (i = 0; i < 1
0
; ++i)
- ;
+ for (i = 0; i < 1
6
; ++i)
+
__asm__ volatile("" : : : "memory")
;
}
void print_number(unsigned int i) // only for i = 0-999