summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/cpu')
-rw-r--r--arch/sandbox/cpu/cpu.c5
-rw-r--r--arch/sandbox/cpu/start.c8
-rw-r--r--arch/sandbox/cpu/state.c14
3 files changed, 26 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index 3a7f5a0..196f3e1 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -37,7 +37,10 @@ void sandbox_exit(void)
/* delay x useconds */
void __udelay(unsigned long usec)
{
- os_usleep(usec);
+ struct sandbox_state *state = state_get_current();
+
+ if (!state->skip_delays)
+ os_usleep(usec);
}
int cleanup_before_linux(void)
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index 4c38fab..0dda4fc 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -257,6 +257,14 @@ static int sandbox_cmdline_cb_terminal(struct sandbox_state *state,
SANDBOX_CMDLINE_OPT_SHORT(terminal, 't', 1,
"Set terminal to raw/cooked mode");
+static int sandbox_cmdline_cb_verbose(struct sandbox_state *state,
+ const char *arg)
+{
+ state->show_test_output = true;
+ return 0;
+}
+SANDBOX_CMDLINE_OPT_SHORT(verbose, 'v', 0, "Show test output");
+
int main(int argc, char *argv[])
{
struct sandbox_state *state;
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c
index 7e5d03e..d2a7dc9 100644
--- a/arch/sandbox/cpu/state.c
+++ b/arch/sandbox/cpu/state.c
@@ -337,6 +337,20 @@ struct sandbox_state *state_get_current(void)
return state;
}
+void state_set_skip_delays(bool skip_delays)
+{
+ struct sandbox_state *state = state_get_current();
+
+ state->skip_delays = skip_delays;
+}
+
+bool state_get_skip_delays(void)
+{
+ struct sandbox_state *state = state_get_current();
+
+ return state->skip_delays;
+}
+
int state_init(void)
{
state = &main_state;