From: Julien Grall <julien.grall@linaro.org>
To: Parth Dixit <parth.dixit@linaro.org>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
tim@xen.org, ian.campbell@citrix.com,
Christoffer Dall <christoffer.dall@linaro.org>,
xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2] xen/arm : emulation of arm's PSCI v0.2 standard
Date: Fri, 27 Jun 2014 11:54:08 +0100 [thread overview]
Message-ID: <53AD4D50.6050209@linaro.org> (raw)
In-Reply-To: <CABy3MNm=0HMJET=H4tPFQ_Z4OmPz=qmfW83m+hcmmBXt0MqE=Q@mail.gmail.com>
Hi Parth,
On 27/06/14 06:18, Parth Dixit wrote:
> On 26 June 2014 21:31, Julien Grall <julien.grall@linaro.org
> <mailto:julien.grall@linaro.org>> wrote:
> > + return do_psci_cpu_off(power_state);
> > +}
> > +
> > +int do_psci_0_2_cpu_on(register_t target_cpu, register_t
> entry_point,
> > + register_t context_id)
>
>
> This function is 95% the same code. I would merge as much as possible
> with do_psci_cpu_on to avoid code duplication.
>
> Ok, i will try to merge the functions together (AI Parth)
FWIW, KVM is using the same PSCI on function on V0.1 and V0.2. I'm
wondering if we can assume the same thing here. Of course, you will have
to add the few improvement in the function (checking if the VCPU is
already online...).
> > diff --git a/xen/include/asm-arm/psci.h b/xen/include/asm-arm/psci.h
> > index 189964b..3487380 100644
> > --- a/xen/include/asm-arm/psci.h
> > +++ b/xen/include/asm-arm/psci.h
> > @@ -1,11 +1,6 @@
> > #ifndef __ASM_PSCI_H__
> > #define __ASM_PSCI_H__
> >
> > -#define PSCI_SUCCESS 0
> > -#define PSCI_ENOSYS -1
> > -#define PSCI_EINVAL -2
> > -#define PSCI_DENIED -3
> > -
>
> Why did you just moved them at the end of the file and change the
> indentation?
>
> This was done to have common return functions between PSCI v0.1 and v
> 0.2 and to define them at one place
Ok... I still don't understand why you can't add the new return value here.
BTW, IIRC there was a copyright int the PSCI header from Linux. I think
you have to retain it here.
> > +/* PSCI version */
> > +#define XEN_PSCI_V_0_1 1
>
> This doesn't seem to be used, right?
>
> Yes it is defined for consistency and also for future use in case we
> return v0.1, i'd prefer to keep it this way what do you think?
Ok
> [..]
>
> > diff --git a/xen/include/public/arch-arm.h
> b/xen/include/public/arch-arm.h
> > index 7496556..93803e4 100644
> > --- a/xen/include/public/arch-arm.h
> > +++ b/xen/include/public/arch-arm.h
> > @@ -385,6 +385,7 @@ typedef uint64_t xen_callback_t;
> > #define PSCI_cpu_off 1
> > #define PSCI_cpu_on 2
> > #define PSCI_migrate 3
> > +#define PSCI_0_1_MAX 4
>
> Why do you expose PSCI_0_1_MAX
>
> You are right i think i can get away by treating PSCI_migrate as max
> value (AI Parth)
Can't you define 2 table in traps.c: one for PSCI v0.1 and one for PSCI
v0.2? This would avoid stupid issue later when we will implement a new
function for 0.1.
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-06-27 10:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-26 5:26 [PATCH v2] xen/arm : emulation of arm's PSCI v0.2 standard Parth Dixit
2014-06-26 16:01 ` Julien Grall
2014-06-27 5:18 ` Parth Dixit
2014-06-27 10:54 ` Julien Grall [this message]
2014-06-27 11:17 ` Parth Dixit
2014-06-27 16:43 ` Ian Campbell
2014-06-30 5:06 ` Parth Dixit
2014-06-30 10:15 ` Ian Campbell
2014-06-30 11:06 ` Parth Dixit
2014-06-30 11:11 ` Ian Campbell
2014-07-01 8:41 ` Parth Dixit
2014-07-02 9:19 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53AD4D50.6050209@linaro.org \
--to=julien.grall@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=parth.dixit@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.