On Mon, 25 Nov 2019 04:03:47 -0500
Janosch Frank <fran...@linux.ibm.com> wrote:

> Let's also move the clear reset function into the reset handler.
> 
> Signed-off-by: Janosch Frank <fran...@linux.ibm.com>
> ---
>  target/s390x/cpu-qom.h |  1 +
>  target/s390x/cpu.c     | 58 +++++++++++++-----------------------------
>  2 files changed, 18 insertions(+), 41 deletions(-)
> 

> @@ -453,6 +424,11 @@ static Property s390x_cpu_properties[] = {
>      DEFINE_PROP_END_OF_LIST()
>  };
>  
> +static void s390_cpu_reset_clear(CPUState *s)
> +{
> +    return s390_cpu_reset(s, S390_CPU_RESET_CLEAR);
> +}
> +
>  static void s390_cpu_class_init(ObjectClass *oc, void *data)
>  {
>      S390CPUClass *scc = S390_CPU_CLASS(oc);
> @@ -469,7 +445,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void 
> *data)
>      scc->load_normal = s390_cpu_load_normal;
>  #endif
>      scc->reset = s390_cpu_reset;
> -    cc->reset = s390_cpu_full_reset;
> +    cc->reset = s390_cpu_reset_clear;
>      cc->class_by_name = s390_cpu_class_by_name,
>      cc->has_work = s390_cpu_has_work;
>  #ifdef CONFIG_TCG

One thing I liked about the previous naming is that it is more obvious
that the clear reset is actually the full reset of a cpu. Not sure if
keeping that is better than matching the function name to the name of
the reset being performed. Opinions?


Reply via email to