diff mbox

[RFT,1/2] drivers: bus: check cci device tree node status

Message ID 1417186209-5256-1-git-send-email-a.kesavan@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Abhilash Kesavan Nov. 28, 2014, 2:50 p.m. UTC
The arm-cci driver completes the probe sequence even if the cci node is
marked as disabled. Add a check in the driver to honour the cci status
in the device tree.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
---
 drivers/bus/arm-cci.c |    3 +++
 1 file changed, 3 insertions(+)

Comments

Abhilash Kesavan Dec. 10, 2014, 4:01 a.m. UTC | #1
Hi,

On Fri, Nov 28, 2014 at 8:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
> The arm-cci driver completes the probe sequence even if the cci node is
> marked as disabled. Add a check in the driver to honour the cci status
> in the device tree.
>
> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>

This patch helps disable CCI on the Arndale Octa board thus resolving
some imprecise aborts seen on that board. Kindly review.

Regards,
Abhilash
> ---
>  drivers/bus/arm-cci.c |    3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
> index 860da40..0ce5e2d 100644
> --- a/drivers/bus/arm-cci.c
> +++ b/drivers/bus/arm-cci.c
> @@ -1312,6 +1312,9 @@ static int cci_probe(void)
>         if (!np)
>                 return -ENODEV;
>
> +       if (!of_device_is_available(np))
> +               return -ENODEV;
> +
>         cci_config = of_match_node(arm_cci_matches, np)->data;
>         if (!cci_config)
>                 return -ENODEV;
> --
> 1.7.9.5
>
Sudeep Holla Dec. 10, 2014, 4:14 a.m. UTC | #2
Hi Abhilash,

On Wednesday 10 December 2014 09:31 AM, Abhilash Kesavan wrote:
> Hi,
>
> On Fri, Nov 28, 2014 at 8:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
>> The arm-cci driver completes the probe sequence even if the cci node is
>> marked as disabled. Add a check in the driver to honour the cci status
>> in the device tree.
>>
>> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
>
> This patch helps disable CCI on the Arndale Octa board thus resolving
> some imprecise aborts seen on that board. Kindly review.
>
> Regards,
> Abhilash
>> ---
>>   drivers/bus/arm-cci.c |    3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
>> index 860da40..0ce5e2d 100644
>> --- a/drivers/bus/arm-cci.c
>> +++ b/drivers/bus/arm-cci.c
>> @@ -1312,6 +1312,9 @@ static int cci_probe(void)
>>          if (!np)
>>                  return -ENODEV;
>>
>> +       if (!of_device_is_available(np))
>> +               return -ENODEV;
>> +

IIUC, by this change you are disabling the MCPM boot protocol here.
Is there any alternative boot protocol that works on this platform
to boot all 8 cores ? Sorry by quick grep couldn't find one, hence
so I am asking.

Regards,
Sudeep
Abhilash Kesavan Dec. 10, 2014, 4:25 a.m. UTC | #3
Hi Sudeep,

On Wed, Dec 10, 2014 at 9:44 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
> Hi Abhilash,
>
> On Wednesday 10 December 2014 09:31 AM, Abhilash Kesavan wrote:
>>
>> Hi,
>>
>> On Fri, Nov 28, 2014 at 8:20 PM, Abhilash Kesavan <a.kesavan@samsung.com>
>> wrote:
>>>
>>> The arm-cci driver completes the probe sequence even if the cci node is
>>> marked as disabled. Add a check in the driver to honour the cci status
>>> in the device tree.
>>>
>>> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
>>
>>
>> This patch helps disable CCI on the Arndale Octa board thus resolving
>> some imprecise aborts seen on that board. Kindly review.
>>
>> Regards,
>> Abhilash
>>>
>>> ---
>>>   drivers/bus/arm-cci.c |    3 +++
>>>   1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
>>> index 860da40..0ce5e2d 100644
>>> --- a/drivers/bus/arm-cci.c
>>> +++ b/drivers/bus/arm-cci.c
>>> @@ -1312,6 +1312,9 @@ static int cci_probe(void)
>>>          if (!np)
>>>                  return -ENODEV;
>>>
>>> +       if (!of_device_is_available(np))
>>> +               return -ENODEV;
>>> +
>
>
> IIUC, by this change you are disabling the MCPM boot protocol here.
> Is there any alternative boot protocol that works on this platform
> to boot all 8 cores ? Sorry by quick grep couldn't find one, hence
> so I am asking.

Thanks for the reply.
On disabling MCPM, we will default to platsmp.c/firmware.c which boots
4 cores as per Kevin's comment here[1]. This was the original behavior
before MCPM was enabled for all 5420 based SoCs.

Regards,
Abhilash
[1] http://www.spinics.net/lists/arm-kernel/msg381191.html
>
> Regards,
> Sudeep
>
Sudeep Holla Dec. 10, 2014, 5:16 a.m. UTC | #4
On Wednesday 10 December 2014 09:55 AM, Abhilash Kesavan wrote:
> Hi Sudeep,
>
> On Wed, Dec 10, 2014 at 9:44 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>> Hi Abhilash,
>>
>> On Wednesday 10 December 2014 09:31 AM, Abhilash Kesavan wrote:
>>>
>>> Hi,
>>>
>>> On Fri, Nov 28, 2014 at 8:20 PM, Abhilash Kesavan <a.kesavan@samsung.com>
>>> wrote:
>>>>
>>>> The arm-cci driver completes the probe sequence even if the cci node is
>>>> marked as disabled. Add a check in the driver to honour the cci status
>>>> in the device tree.
>>>>
>>>> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
>>>
>>>
>>> This patch helps disable CCI on the Arndale Octa board thus resolving
>>> some imprecise aborts seen on that board. Kindly review.
>>>
>>> Regards,
>>> Abhilash
>>>>
>>>> ---
>>>>    drivers/bus/arm-cci.c |    3 +++
>>>>    1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
>>>> index 860da40..0ce5e2d 100644
>>>> --- a/drivers/bus/arm-cci.c
>>>> +++ b/drivers/bus/arm-cci.c
>>>> @@ -1312,6 +1312,9 @@ static int cci_probe(void)
>>>>           if (!np)
>>>>                   return -ENODEV;
>>>>
>>>> +       if (!of_device_is_available(np))
>>>> +               return -ENODEV;
>>>> +
>>
>>
>> IIUC, by this change you are disabling the MCPM boot protocol here.
>> Is there any alternative boot protocol that works on this platform
>> to boot all 8 cores ? Sorry by quick grep couldn't find one, hence
>> so I am asking.
>
> Thanks for the reply.
> On disabling MCPM, we will default to platsmp.c/firmware.c which boots
> 4 cores as per Kevin's comment here[1]. This was the original behavior
> before MCPM was enabled for all 5420 based SoCs.
>

Thanks for pointing that out. I assume the firmware can handle the
alternate boot protocol and no more workarounds are needed especially
when getting CPUIdle working in this mode.

Anyways the patch makes sense irrespective how it works on exynos, so
you can add,

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

Regards,
Sudeep
Nicolas Pitre Dec. 10, 2014, 6:29 p.m. UTC | #5
On Wed, 10 Dec 2014, Abhilash Kesavan wrote:

> Hi,
> 
> On Fri, Nov 28, 2014 at 8:20 PM, Abhilash Kesavan <a.kesavan@samsung.com> wrote:
> > The arm-cci driver completes the probe sequence even if the cci node is
> > marked as disabled. Add a check in the driver to honour the cci status
> > in the device tree.
> >
> > Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
> 
> This patch helps disable CCI on the Arndale Octa board thus resolving
> some imprecise aborts seen on that board. Kindly review.

Acked-by: Nicolas Pitre <nico@linaro.org>


> 
> Regards,
> Abhilash
> > ---
> >  drivers/bus/arm-cci.c |    3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
> > index 860da40..0ce5e2d 100644
> > --- a/drivers/bus/arm-cci.c
> > +++ b/drivers/bus/arm-cci.c
> > @@ -1312,6 +1312,9 @@ static int cci_probe(void)
> >         if (!np)
> >                 return -ENODEV;
> >
> > +       if (!of_device_is_available(np))
> > +               return -ENODEV;
> > +
> >         cci_config = of_match_node(arm_cci_matches, np)->data;
> >         if (!cci_config)
> >                 return -ENODEV;
> > --
> > 1.7.9.5
> >
> 
>
Sudeep Holla Jan. 8, 2015, 6:45 a.m. UTC | #6
Hi Abhilash,

On Wednesday 10 December 2014 10:46 AM, Sudeep Holla wrote:
>
>
> On Wednesday 10 December 2014 09:55 AM, Abhilash Kesavan wrote:
>> Hi Sudeep,
>>
>> On Wed, Dec 10, 2014 at 9:44 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>>> Hi Abhilash,
>>>
>>> On Wednesday 10 December 2014 09:31 AM, Abhilash Kesavan wrote:
>>>>
>>>> Hi,
>>>>
>>>> On Fri, Nov 28, 2014 at 8:20 PM, Abhilash Kesavan <a.kesavan@samsung.com>
>>>> wrote:
>>>>>
>>>>> The arm-cci driver completes the probe sequence even if the cci node is
>>>>> marked as disabled. Add a check in the driver to honour the cci status
>>>>> in the device tree.
>>>>>
>>>>> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
>>>>
>>>>
>>>> This patch helps disable CCI on the Arndale Octa board thus resolving
>>>> some imprecise aborts seen on that board. Kindly review.
>>>>
>>>> Regards,
>>>> Abhilash
>>>>>
>>>>> ---
>>>>>     drivers/bus/arm-cci.c |    3 +++
>>>>>     1 file changed, 3 insertions(+)
>>>>>
>>>>> diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
>>>>> index 860da40..0ce5e2d 100644
>>>>> --- a/drivers/bus/arm-cci.c
>>>>> +++ b/drivers/bus/arm-cci.c
>>>>> @@ -1312,6 +1312,9 @@ static int cci_probe(void)
>>>>>            if (!np)
>>>>>                    return -ENODEV;
>>>>>
>>>>> +       if (!of_device_is_available(np))
>>>>> +               return -ENODEV;
>>>>> +
>>>
>>>
>>> IIUC, by this change you are disabling the MCPM boot protocol here.
>>> Is there any alternative boot protocol that works on this platform
>>> to boot all 8 cores ? Sorry by quick grep couldn't find one, hence
>>> so I am asking.
>>
>> Thanks for the reply.
>> On disabling MCPM, we will default to platsmp.c/firmware.c which boots
>> 4 cores as per Kevin's comment here[1]. This was the original behavior
>> before MCPM was enabled for all 5420 based SoCs.
>>
>
> Thanks for pointing that out. I assume the firmware can handle the
> alternate boot protocol and no more workarounds are needed especially
> when getting CPUIdle working in this mode.
>
> Anyways the patch makes sense irrespective how it works on exynos, so
> you can add,
>
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
>

What's the status of this patch. It was useful for me on vexpress for 
some testing. Please feel free to add

Tested-by: Sudeep Holla <sudeep.holla@arm.com>

if this is not yet queued.

Regards,
Sudeep
Abhilash Kesavan Jan. 8, 2015, 3:27 p.m. UTC | #7
Hi Sudeep,

On Thu, Jan 8, 2015 at 12:15 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:
> Hi Abhilash,
>
> On Wednesday 10 December 2014 10:46 AM, Sudeep Holla wrote:
>>
>>
>>
>> On Wednesday 10 December 2014 09:55 AM, Abhilash Kesavan wrote:
>>>
>>> Hi Sudeep,
>>>
>>> On Wed, Dec 10, 2014 at 9:44 AM, Sudeep Holla <sudeep.holla@arm.com>
>>> wrote:
>>>>
>>>> Hi Abhilash,
>>>>
>>>> On Wednesday 10 December 2014 09:31 AM, Abhilash Kesavan wrote:
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> On Fri, Nov 28, 2014 at 8:20 PM, Abhilash Kesavan
>>>>> <a.kesavan@samsung.com>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> The arm-cci driver completes the probe sequence even if the cci node
>>>>>> is
>>>>>> marked as disabled. Add a check in the driver to honour the cci status
>>>>>> in the device tree.
>>>>>>
>>>>>> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
>>>>>
>>>>>
>>>>>
>>>>> This patch helps disable CCI on the Arndale Octa board thus resolving
>>>>> some imprecise aborts seen on that board. Kindly review.
>>>>>
>>>>> Regards,
>>>>> Abhilash
>>>>>>
>>>>>>
>>>>>> ---
>>>>>>     drivers/bus/arm-cci.c |    3 +++
>>>>>>     1 file changed, 3 insertions(+)
>>>>>>
>>>>>> diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
>>>>>> index 860da40..0ce5e2d 100644
>>>>>> --- a/drivers/bus/arm-cci.c
>>>>>> +++ b/drivers/bus/arm-cci.c
>>>>>> @@ -1312,6 +1312,9 @@ static int cci_probe(void)
>>>>>>            if (!np)
>>>>>>                    return -ENODEV;
>>>>>>
>>>>>> +       if (!of_device_is_available(np))
>>>>>> +               return -ENODEV;
>>>>>> +
>>>>
>>>>
>>>>
>>>> IIUC, by this change you are disabling the MCPM boot protocol here.
>>>> Is there any alternative boot protocol that works on this platform
>>>> to boot all 8 cores ? Sorry by quick grep couldn't find one, hence
>>>> so I am asking.
>>>
>>>
>>> Thanks for the reply.
>>> On disabling MCPM, we will default to platsmp.c/firmware.c which boots
>>> 4 cores as per Kevin's comment here[1]. This was the original behavior
>>> before MCPM was enabled for all 5420 based SoCs.
>>>
>>
>> Thanks for pointing that out. I assume the firmware can handle the
>> alternate boot protocol and no more workarounds are needed especially
>> when getting CPUIdle working in this mode.
>>
>> Anyways the patch makes sense irrespective how it works on exynos, so
>> you can add,
>>
>> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
>>
>
> What's the status of this patch. It was useful for me on vexpress for some
> testing. Please feel free to add
>
> Tested-by: Sudeep Holla <sudeep.holla@arm.com>
>
> if this is not yet queued.

Thanks for the tested-by. This patch has not been merged yet; I am not
quite sure who is supposed to pick this up.

Regards,
Abhilash
>
> Regards,
> Sudeep
>
Sudeep Holla Jan. 9, 2015, 5:10 a.m. UTC | #8
On Thursday 08 January 2015 08:57 PM, Abhilash Kesavan wrote:
> Hi Sudeep,
>
> On Thu, Jan 8, 2015 at 12:15 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>> Hi Abhilash,

[...]

>>
>> What's the status of this patch. It was useful for me on vexpress for some
>> testing. Please feel free to add
>>
>> Tested-by: Sudeep Holla <sudeep.holla@arm.com>
>>
>> if this is not yet queued.
>
> Thanks for the tested-by. This patch has not been merged yet; I am not
> quite sure who is supposed to pick this up.
>

So far, most of the CCI patches are merged through arm-soc.

Regards,
Sudeep
Abhilash Kesavan Jan. 9, 2015, 4:28 p.m. UTC | #9
Hi Arnd/Olof,

On Fri, Jan 9, 2015 at 10:40 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
>
> On Thursday 08 January 2015 08:57 PM, Abhilash Kesavan wrote:
>>
>> Hi Sudeep,
>>
>> On Thu, Jan 8, 2015 at 12:15 PM, Sudeep Holla <sudeep.holla@arm.com>
>> wrote:
>>>
>>> Hi Abhilash,
>
>
> [...]
>
>>>
>>> What's the status of this patch. It was useful for me on vexpress for
>>> some
>>> testing. Please feel free to add
>>>
>>> Tested-by: Sudeep Holla <sudeep.holla@arm.com>
>>>
>>> if this is not yet queued.
>>
>>
>> Thanks for the tested-by. This patch has not been merged yet; I am not
>> quite sure who is supposed to pick this up.
>>
>
> So far, most of the CCI patches are merged through arm-soc.

Would you be OK picking this up as is or do you want me to re-send
this with the RFT tag dropped ?

Regards,
Abhilash
>
> Regards,
> Sudeep
>
Kevin Hilman Jan. 9, 2015, 9:09 p.m. UTC | #10
Abhilash Kesavan <kesavan.abhilash@gmail.com> writes:

> Hi Arnd/Olof,
>
> On Fri, Jan 9, 2015 at 10:40 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>>
>>
>> On Thursday 08 January 2015 08:57 PM, Abhilash Kesavan wrote:
>>>
>>> Hi Sudeep,
>>>
>>> On Thu, Jan 8, 2015 at 12:15 PM, Sudeep Holla <sudeep.holla@arm.com>
>>> wrote:
>>>>
>>>> Hi Abhilash,
>>
>>
>> [...]
>>
>>>>
>>>> What's the status of this patch. It was useful for me on vexpress for
>>>> some
>>>> testing. Please feel free to add
>>>>
>>>> Tested-by: Sudeep Holla <sudeep.holla@arm.com>
>>>>
>>>> if this is not yet queued.
>>>
>>>
>>> Thanks for the tested-by. This patch has not been merged yet; I am not
>>> quite sure who is supposed to pick this up.
>>>
>>
>> So far, most of the CCI patches are merged through arm-soc.
>
> Would you be OK picking this up as is or do you want me to re-send
> this with the RFT tag dropped ?

Please resend without the RFT, and collect the Tested-by tags
you can add mine:

Tested-by: Kevin Hilman <khilman@linaro.org>

Please send to arm@kernel.org where patches targeted for the arm-soc
tree are collected.

Thanks,

Kevin
Abhilash Kesavan Jan. 10, 2015, 3:21 a.m. UTC | #11
Hi Kevin,

On Sat, Jan 10, 2015 at 2:39 AM, Kevin Hilman <khilman@kernel.org> wrote:
> Abhilash Kesavan <kesavan.abhilash@gmail.com> writes:
>
>> Hi Arnd/Olof,
>>
>> On Fri, Jan 9, 2015 at 10:40 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>>>
>>>
>>> On Thursday 08 January 2015 08:57 PM, Abhilash Kesavan wrote:
>>>>
>>>> Hi Sudeep,
>>>>
>>>> On Thu, Jan 8, 2015 at 12:15 PM, Sudeep Holla <sudeep.holla@arm.com>
>>>> wrote:
>>>>>
>>>>> Hi Abhilash,
>>>
>>>
>>> [...]
>>>
>>>>>
>>>>> What's the status of this patch. It was useful for me on vexpress for
>>>>> some
>>>>> testing. Please feel free to add
>>>>>
>>>>> Tested-by: Sudeep Holla <sudeep.holla@arm.com>
>>>>>
>>>>> if this is not yet queued.
>>>>
>>>>
>>>> Thanks for the tested-by. This patch has not been merged yet; I am not
>>>> quite sure who is supposed to pick this up.
>>>>
>>>
>>> So far, most of the CCI patches are merged through arm-soc.
>>
>> Would you be OK picking this up as is or do you want me to re-send
>> this with the RFT tag dropped ?
>
> Please resend without the RFT, and collect the Tested-by tags
> you can add mine:
>
> Tested-by: Kevin Hilman <khilman@linaro.org>
>
> Please send to arm@kernel.org where patches targeted for the arm-soc
> tree are collected.

I have done as suggested. Kindly check.

Regards,
Abhilash
>
> Thanks,
>
> Kevin
>
diff mbox

Patch

diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index 860da40..0ce5e2d 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -1312,6 +1312,9 @@  static int cci_probe(void)
 	if (!np)
 		return -ENODEV;
 
+	if (!of_device_is_available(np))
+		return -ENODEV;
+
 	cci_config = of_match_node(arm_cci_matches, np)->data;
 	if (!cci_config)
 		return -ENODEV;