xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Andre Przywara <andre.przywara@linaro.org>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 3/3] xen/arm: vpsci: Move PSCI function dispatching from vsmc.c to vpsci.c
Date: Tue, 30 Jan 2018 22:06:49 +0000	[thread overview]
Message-ID: <CAEC2Cxrs+4-kbEofcp2NMuYH-qx2cyXpzJJ5nzoRBwGFGUynhw@mail.gmail.com> (raw)
In-Reply-To: <8e999880-9d28-981e-465e-7b9d25ce5c37@epam.com>

On 30 January 2018 at 19:35, Volodymyr Babchuk
<volodymyr_babchuk@epam.com> wrote:
>
>
> On 30.01.18 20:44, Julien Grall wrote:
>>
>>
>>
>> On 30/01/18 18:28, Volodymyr Babchuk wrote:
>>>
>>> Hi Julien,
>>>
>>> On 30.01.18 20:01, Julien Grall wrote:
>>>>
>>>>
>>>>
>>>> On 26/01/18 18:27, Volodymyr Babchuk wrote:
>>>>>
>>>>> Hi,
>>>>
>>>>
>>>> Hi Volodymyr,
>>>>
>>>>> On 26.01.18 20:15, Julien Grall wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> On 26/01/18 18:09, Volodymyr Babchuk wrote:
>>>>>>>
>>>>>>> On 24.01.18 20:34, Julien Grall wrote:
>>>>>>>>
>>>>>>>> -    case PSCI_0_2_FN32(AFFINITY_INFO):
>>>>>>>> -    case PSCI_0_2_FN64(AFFINITY_INFO):
>>>>>>>> +    switch ( fid )
>>>>>>>>       {
>>>>>>>> -        register_t taff = PSCI_ARG(regs, 1);
>>>>>>>> -        uint32_t laff = PSCI_ARG32(regs, 2);
>>>>>>>> -
>>>>>>>> -        perfc_incr(vpsci_cpu_affinity_info);
>>>>>>>> -        PSCI_SET_RESULT(regs, do_psci_0_2_affinity_info(taff,
>>>>>>>> laff));
>>>>>>>> -        return true;
>>>>>>>> -    }
>>>>>>>> -
>>>>>>>>       case ARM_SMCCC_FUNC_CALL_COUNT(STANDARD):
>>>>>>>>           return fill_function_call_count(regs,
>>>>>>>> SSSC_SMCCC_FUNCTION_COUNT);
>>>>>>>
>>>>>>> Now definition SSSC_SMCCC_FUNCTION_COUNT depends on code in vscpi.c.
>>>>>>> Maybe it is time to introduce function get_psci_0_2_fn_count() and
>>>>>>> use it there, what do you think?
>>>>>>
>>>>>>
>>>>>> Definitely not a function. It is a static number. But I can think of
>>>>>> separate the call count.
>>>>>
>>>>> Yep, separate call count for vPSCI and for SSSC itself would be a good
>>>>> thing.
>>>>
>>>>
>>>> Looking a bit more into it, this will not make a real improvement. This
>>>> will be equally difficult to remember to update the call count.
>>>
>>> Nevertheless, I think that it is right thing to hold call count in the
>>> same file, where calls are implemented. This increases chances that call
>>> count will be held in sync.
>>
>>
>> So you are suggesting to implement a function? If so, that's a no-go from
>> my side.
>
> I'm not insist on function if you can propose alternative.
> But why you are against getter function in the first place?

Because a function returning a const value is pretty dumb.

>
> I wanted to propose another approach: define this call count in
> vpsci.h, but there is no vpsci.h, instead you use psci.h, which is confusing
> in itself.

I thought about vpsci.h, but basically you will have only 2 functions in it and
the number of PSCI calls. That's it.

So it is not going to help to update because the header will unlikely need to
change when adding new PSCI call.

[...]

>>
>> I looked at some implementation of SMCCC and those calls are either not
>> handled or the number are not correct.
>
> I agree that *some* implementations can not conform to SMCCC.But, I thought
> you want Xen to follow standards as close as possible...

It is not about cannot conform but only implements partially SMCCC. I could name
ATF for that (yes).

So it makes me more confident the call count is not something people seem to
care.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-01-30 22:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24 18:34 [PATCH 0/3] xen/arm: SMCCC fixes and PSCI clean-up Julien Grall
2018-01-24 18:34 ` [PATCH 1/3] xen/arm: vpsci: Removing dummy MIGRATE and MIGRATE_INFO_UP_CPU Julien Grall
2018-01-26 16:37   ` Julien Grall
2018-01-26 17:46   ` Volodymyr Babchuk
2018-01-24 18:34 ` [PATCH 2/3] xen/arm: vsmc: Don't implement function ID that doesn't exist Julien Grall
2018-01-26 18:03   ` Volodymyr Babchuk
2018-01-26 18:07     ` Julien Grall
2018-01-26 18:12       ` Volodymyr Babchuk
2018-01-26 18:19         ` Julien Grall
2018-01-24 18:34 ` [PATCH 3/3] xen/arm: vpsci: Move PSCI function dispatching from vsmc.c to vpsci.c Julien Grall
2018-01-26 18:09   ` Volodymyr Babchuk
2018-01-26 18:15     ` Julien Grall
2018-01-26 18:27       ` Volodymyr Babchuk
2018-01-30 18:01         ` Julien Grall
2018-01-30 18:28           ` Volodymyr Babchuk
2018-01-30 18:44             ` Julien Grall
2018-01-30 19:35               ` Volodymyr Babchuk
2018-01-30 22:06                 ` Julien Grall [this message]
2018-01-31 11:32                   ` Volodymyr Babchuk
2018-01-31 11:36                     ` Julien Grall
2018-01-31 14:29                       ` Volodymyr Babchuk
2018-01-31 14:54                         ` Julien Grall
2018-01-31 14:57                           ` Volodymyr Babchuk

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=CAEC2Cxrs+4-kbEofcp2NMuYH-qx2cyXpzJJ5nzoRBwGFGUynhw@mail.gmail.com \
    --to=julien.grall@linaro.org \
    --cc=andre.przywara@linaro.org \
    --cc=sstabellini@kernel.org \
    --cc=volodymyr_babchuk@epam.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).