diff mbox series

[RFC,v4,70/71] cpus-common: move exclusive_idle higher in the file

Message ID 20181025144644.15464-70-cota@braap.org (mailing list archive)
State New, archived
Headers show
Series [RFC,v4,01/71] cpu: convert queued work to a QSIMPLEQ | expand

Commit Message

Emilio Cota Oct. 25, 2018, 2:46 p.m. UTC
This will simplify the following commit's diff.

Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 cpus-common.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Richard Henderson Oct. 26, 2018, 4:06 p.m. UTC | #1
On 10/25/18 3:46 PM, Emilio G. Cota wrote:
> This will simplify the following commit's diff.
> 
> Signed-off-by: Emilio G. Cota <cota@braap.org>
> ---
>  cpus-common.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Alex Bennée Oct. 29, 2018, 3:21 p.m. UTC | #2
Emilio G. Cota <cota@braap.org> writes:

> This will simplify the following commit's diff.
>
> Signed-off-by: Emilio G. Cota <cota@braap.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  cpus-common.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/cpus-common.c b/cpus-common.c
> index 232cb12c46..ad8a8ef535 100644
> --- a/cpus-common.c
> +++ b/cpus-common.c
> @@ -73,6 +73,15 @@ static void finish_safe_work(CPUState *cpu)
>      cpu_exec_end(cpu);
>  }
>
> +/* Wait for pending exclusive operations to complete.  The CPU list lock
> +   must be held.  */
> +static inline void exclusive_idle(void)
> +{
> +    while (pending_cpus) {
> +        qemu_cond_wait(&exclusive_resume, &qemu_cpu_list_lock);
> +    }
> +}
> +
>  void cpu_list_add(CPUState *cpu)
>  {
>      qemu_mutex_lock(&qemu_cpu_list_lock);
> @@ -200,15 +209,6 @@ void async_run_on_cpu_no_bql(CPUState *cpu, run_on_cpu_func func,
>      queue_work_on_cpu(cpu, wi);
>  }
>
> -/* Wait for pending exclusive operations to complete.  The CPU list lock
> -   must be held.  */
> -static inline void exclusive_idle(void)
> -{
> -    while (pending_cpus) {
> -        qemu_cond_wait(&exclusive_resume, &qemu_cpu_list_lock);
> -    }
> -}
> -
>  /* Start an exclusive operation.
>     Must only be called from outside cpu_exec.  */
>  void start_exclusive(void)


--
Alex Bennée
diff mbox series

Patch

diff --git a/cpus-common.c b/cpus-common.c
index 232cb12c46..ad8a8ef535 100644
--- a/cpus-common.c
+++ b/cpus-common.c
@@ -73,6 +73,15 @@  static void finish_safe_work(CPUState *cpu)
     cpu_exec_end(cpu);
 }
 
+/* Wait for pending exclusive operations to complete.  The CPU list lock
+   must be held.  */
+static inline void exclusive_idle(void)
+{
+    while (pending_cpus) {
+        qemu_cond_wait(&exclusive_resume, &qemu_cpu_list_lock);
+    }
+}
+
 void cpu_list_add(CPUState *cpu)
 {
     qemu_mutex_lock(&qemu_cpu_list_lock);
@@ -200,15 +209,6 @@  void async_run_on_cpu_no_bql(CPUState *cpu, run_on_cpu_func func,
     queue_work_on_cpu(cpu, wi);
 }
 
-/* Wait for pending exclusive operations to complete.  The CPU list lock
-   must be held.  */
-static inline void exclusive_idle(void)
-{
-    while (pending_cpus) {
-        qemu_cond_wait(&exclusive_resume, &qemu_cpu_list_lock);
-    }
-}
-
 /* Start an exclusive operation.
    Must only be called from outside cpu_exec.  */
 void start_exclusive(void)