All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Tomasz Figa <t.figa@samsung.com>,
	kgene.kim@samsung.com, linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
	jc.lee@samsung.com, lorenzo.pieralisi@arm.com,
	Amit Kachhap <amit.daniel@samsung.com>,
	rjw@sisk.pl, kyungmin.park@samsung.com
Subject: Re: [PATCH 1/3] ARM: EXYNOS: remove non-working AFTR mode support
Date: Fri, 28 Jun 2013 23:47:49 +0200	[thread overview]
Message-ID: <51CE0485.8020109@linaro.org> (raw)
In-Reply-To: <2484012.IH9WOi4iIR@amdc1032>

On 06/28/2013 06:27 PM, Bartlomiej Zolnierkiewicz wrote:
> On Friday, June 28, 2013 01:20:09 PM Daniel Lezcano wrote:
>> On 06/28/2013 12:11 PM, Tomasz Figa wrote:
>>> Hi Daniel,
>>>
>>> I've been fighting with this whole AFTR state as well, before Bartlomiej. 
>>> Let me share my thoughts on this.
>>>

[ ... ]

>>>
>>> If you don't unplug all the CPUs >0 the state is obviously never reached. 
>>> Otherwise the whole system hangs after it tries to enter this mode without 
>>> any reaction for external events, other than reset.
>>
>> Need investigation.
>>
>> What is the exynos board version where that occurs ?
> 
> Could you please tell me what exactly do you mean by that?
> 
> I already wrote that we can reproduce the problem on EXYNOS4210 rev0
> and rev1.1 (we don't have rev1.0). Tomek has also reproduced the problem
> on some later SoCs (I hope that he can give you exact revisions).
> 
> In our testing we didn't encounter the board on which the problem
> doesn't occur. Our current working theory is that the problem may be
> u-boot (or first stage bootloader) related.

Ok, the status for what I know:

Origen Exynos4210, board ver A: works for me
Arndale Exynos5250: works for me but only if u-boot does not enable the
hypervisor mode.
Chromebook Exynos5250: works for me

I found the following drivers:

https://github.com/AndreiLux/Perseus-UNIVERSAL5410/blob/samsung/arch/arm/mach-exynos/cpuidle.c

https://github.com/CyanogenMod/hardkernel-kernel-4412/blob/cm-10.1/arch/arm/mach-exynos/cpuidle-exynos4.c

Sounds like the num cpus > 1 is still there.

[ ... ]

>> The kernel is not a playground where you can upstream code and then
>> remove it because a feature seems broken and you don't have an idea of why.
> 
> Neither me or Tomek did upstream this code and we couldn't react in
> time because we haven't noticed that it is completely unusable for us
> as EXYNOS cpuidle driver is not even used by default on EXYNOS (it is
> not enabled either in defconfig or Kconfig).
> 
> Moreover the feature we are talking about (AFTR mode) is also not used
> by default (except EXYNOS4210 rev0 on which it lockups system for us)
> even with EXYNOS cpuidle driver being enabled (because this specific
> feature depends on CPU hot-unplug which is not done automatically right
> now).
> 
> Such things like unused/broken code removal is not something very
> unusual in the upstream kernel (I'm speaking from the experience here
> having maintained large subsystem for a couple of years). In this
> particular case we are talking about ~130 lines of code which can
> be trivially brought back later when/if needed.
> 
> Anyway if the code removal is controversial for you we can just disable
> AFTR mode by default and enable it only when special command line option
> is given (i.e. "aftr"). This would fix all the broken configuration
> while still allowing the feature to be enabled on systems that had it
> working previously (since you claim that it works on some chipset/u-boot
> configurations).

Actually, there are several reasons I am not in favor for the moment to
remove this code:

1) code can't be pushed upstream and then removed so easily
2) I asked several times what was this cpu1 hack, I had no answer
3) I tried to make both cpus entering the AFTR state, but the cpu1 never
wakes up, I asked but no answer.

I would like to have some answers :)

Before taking the decision to remove this state (btw you can remove the
driver directly, no ? the default idle function is WFI), IMO it is worth
to investigate and to spend some time to clarify what is happening. Then
we can take a decision.

I am willing to help.

>> I asked several times the reasons of why the AFTR state couldn't work
>> with multiple CPUs and I had no answer.
> 
> Unfortunately I don't know the answer for your question.
> 
> The AFTR mode doesn't work for us *at*all* (even with *one* CPU).
> 
>> Frankly speaking I have a couple of hypothesis:
>>
>> 1. something is not correctly setup and the PMU does not wake up the CPU1
>> 2. there is a silicon bug and no one wants to tell it is the case
>>
>> In any case, this must be investigated and identified. And then we can
>> take a decision about this state.
> 
> I don't have good idea currently how to investigate it further.
> 
> I also don't have any prove that the actual work is worth it
> (and this work can easily take some weeks).
> 
> One of main responsibilities of the maintainer it to make sure that
> the code does indeed work and that regressions (like these caused by
> AFTR mode feature) are fixed in the timely manner, not let the code
> sit in the limbo state for large periods of time.  It is already very
> bad situation that the regression we are hitting was present since
> v3.4 and we are in v3.10 now, I would like to have it fixed ASAP so
> we may actually consider enabling cpuidle in our exynos_defconfig.

I agree.

Thanks
  -- Daniel
-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


WARNING: multiple messages have this Message-ID (diff)
From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ARM: EXYNOS: remove non-working AFTR mode support
Date: Fri, 28 Jun 2013 23:47:49 +0200	[thread overview]
Message-ID: <51CE0485.8020109@linaro.org> (raw)
In-Reply-To: <2484012.IH9WOi4iIR@amdc1032>

On 06/28/2013 06:27 PM, Bartlomiej Zolnierkiewicz wrote:
> On Friday, June 28, 2013 01:20:09 PM Daniel Lezcano wrote:
>> On 06/28/2013 12:11 PM, Tomasz Figa wrote:
>>> Hi Daniel,
>>>
>>> I've been fighting with this whole AFTR state as well, before Bartlomiej. 
>>> Let me share my thoughts on this.
>>>

[ ... ]

>>>
>>> If you don't unplug all the CPUs >0 the state is obviously never reached. 
>>> Otherwise the whole system hangs after it tries to enter this mode without 
>>> any reaction for external events, other than reset.
>>
>> Need investigation.
>>
>> What is the exynos board version where that occurs ?
> 
> Could you please tell me what exactly do you mean by that?
> 
> I already wrote that we can reproduce the problem on EXYNOS4210 rev0
> and rev1.1 (we don't have rev1.0). Tomek has also reproduced the problem
> on some later SoCs (I hope that he can give you exact revisions).
> 
> In our testing we didn't encounter the board on which the problem
> doesn't occur. Our current working theory is that the problem may be
> u-boot (or first stage bootloader) related.

Ok, the status for what I know:

Origen Exynos4210, board ver A: works for me
Arndale Exynos5250: works for me but only if u-boot does not enable the
hypervisor mode.
Chromebook Exynos5250: works for me

I found the following drivers:

https://github.com/AndreiLux/Perseus-UNIVERSAL5410/blob/samsung/arch/arm/mach-exynos/cpuidle.c

https://github.com/CyanogenMod/hardkernel-kernel-4412/blob/cm-10.1/arch/arm/mach-exynos/cpuidle-exynos4.c

Sounds like the num cpus > 1 is still there.

[ ... ]

>> The kernel is not a playground where you can upstream code and then
>> remove it because a feature seems broken and you don't have an idea of why.
> 
> Neither me or Tomek did upstream this code and we couldn't react in
> time because we haven't noticed that it is completely unusable for us
> as EXYNOS cpuidle driver is not even used by default on EXYNOS (it is
> not enabled either in defconfig or Kconfig).
> 
> Moreover the feature we are talking about (AFTR mode) is also not used
> by default (except EXYNOS4210 rev0 on which it lockups system for us)
> even with EXYNOS cpuidle driver being enabled (because this specific
> feature depends on CPU hot-unplug which is not done automatically right
> now).
> 
> Such things like unused/broken code removal is not something very
> unusual in the upstream kernel (I'm speaking from the experience here
> having maintained large subsystem for a couple of years). In this
> particular case we are talking about ~130 lines of code which can
> be trivially brought back later when/if needed.
> 
> Anyway if the code removal is controversial for you we can just disable
> AFTR mode by default and enable it only when special command line option
> is given (i.e. "aftr"). This would fix all the broken configuration
> while still allowing the feature to be enabled on systems that had it
> working previously (since you claim that it works on some chipset/u-boot
> configurations).

Actually, there are several reasons I am not in favor for the moment to
remove this code:

1) code can't be pushed upstream and then removed so easily
2) I asked several times what was this cpu1 hack, I had no answer
3) I tried to make both cpus entering the AFTR state, but the cpu1 never
wakes up, I asked but no answer.

I would like to have some answers :)

Before taking the decision to remove this state (btw you can remove the
driver directly, no ? the default idle function is WFI), IMO it is worth
to investigate and to spend some time to clarify what is happening. Then
we can take a decision.

I am willing to help.

>> I asked several times the reasons of why the AFTR state couldn't work
>> with multiple CPUs and I had no answer.
> 
> Unfortunately I don't know the answer for your question.
> 
> The AFTR mode doesn't work for us *at*all* (even with *one* CPU).
> 
>> Frankly speaking I have a couple of hypothesis:
>>
>> 1. something is not correctly setup and the PMU does not wake up the CPU1
>> 2. there is a silicon bug and no one wants to tell it is the case
>>
>> In any case, this must be investigated and identified. And then we can
>> take a decision about this state.
> 
> I don't have good idea currently how to investigate it further.
> 
> I also don't have any prove that the actual work is worth it
> (and this work can easily take some weeks).
> 
> One of main responsibilities of the maintainer it to make sure that
> the code does indeed work and that regressions (like these caused by
> AFTR mode feature) are fixed in the timely manner, not let the code
> sit in the limbo state for large periods of time.  It is already very
> bad situation that the regression we are hitting was present since
> v3.4 and we are in v3.10 now, I would like to have it fixed ASAP so
> we may actually consider enabling cpuidle in our exynos_defconfig.

I agree.

Thanks
  -- Daniel
-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  reply	other threads:[~2013-06-28 21:47 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26 10:13 [PATCH 0/3] ARM: EXYNOS: cpuidle driver fixes Bartlomiej Zolnierkiewicz
2013-06-26 10:13 ` Bartlomiej Zolnierkiewicz
2013-06-26 10:13 ` [PATCH 1/3] ARM: EXYNOS: remove non-working AFTR mode support Bartlomiej Zolnierkiewicz
2013-06-26 10:13   ` Bartlomiej Zolnierkiewicz
2013-06-26 10:36   ` Daniel Lezcano
2013-06-26 10:36     ` Daniel Lezcano
2013-06-27 18:10     ` Bartlomiej Zolnierkiewicz
2013-06-27 18:10       ` Bartlomiej Zolnierkiewicz
2013-06-28  9:57       ` Daniel Lezcano
2013-06-28  9:57         ` Daniel Lezcano
2013-06-28 10:11         ` Tomasz Figa
2013-06-28 10:11           ` Tomasz Figa
2013-06-28 11:13           ` Lorenzo Pieralisi
2013-06-28 11:13             ` Lorenzo Pieralisi
2013-06-28 16:21             ` Tomasz Figa
2013-06-28 16:21               ` Tomasz Figa
2013-06-28 11:20           ` Daniel Lezcano
2013-06-28 11:20             ` Daniel Lezcano
2013-06-28 16:27             ` Bartlomiej Zolnierkiewicz
2013-06-28 16:27               ` Bartlomiej Zolnierkiewicz
2013-06-28 21:47               ` Daniel Lezcano [this message]
2013-06-28 21:47                 ` Daniel Lezcano
2013-06-28 22:47                 ` Tomasz Figa
2013-06-28 22:47                   ` Tomasz Figa
2013-07-01  9:09                   ` Daniel Lezcano
2013-07-01  9:09                     ` Daniel Lezcano
2013-07-11 13:14                 ` Bartlomiej Zolnierkiewicz
2013-07-11 13:14                   ` Bartlomiej Zolnierkiewicz
2013-07-17 12:57                   ` Daniel Lezcano
2013-07-17 12:57                     ` Daniel Lezcano
2013-07-17 13:31                     ` Lorenzo Pieralisi
2013-07-17 13:31                       ` Lorenzo Pieralisi
2013-07-17 14:07                       ` Tomasz Figa
2013-07-17 14:07                         ` Tomasz Figa
2013-07-17 14:36                     ` Bartlomiej Zolnierkiewicz
2013-07-17 14:36                       ` Bartlomiej Zolnierkiewicz
2013-06-28 17:31             ` Tomasz Figa
2013-06-28 17:31               ` Tomasz Figa
2013-06-28 22:27               ` Daniel Lezcano
2013-06-28 22:27                 ` Daniel Lezcano
2013-06-28 23:07                 ` Tomasz Figa
2013-06-28 23:07                   ` Tomasz Figa
2013-07-01  9:23                   ` Daniel Lezcano
2013-07-01  9:23                     ` Daniel Lezcano
2013-06-26 10:13 ` [PATCH 2/3] ARM: EXYNOS: init cpuidle driver in exynos_init_late() Bartlomiej Zolnierkiewicz
2013-06-26 10:13   ` Bartlomiej Zolnierkiewicz
2013-06-26 10:48   ` Daniel Lezcano
2013-06-26 10:48     ` Daniel Lezcano
2013-06-26 10:13 ` [PATCH 3/3] ARM: EXYNOS: move cpuidle driver to drivers/cpuidle/ Bartlomiej Zolnierkiewicz
2013-06-26 10:13   ` Bartlomiej Zolnierkiewicz
2013-06-26 10:46   ` Daniel Lezcano
2013-06-26 10:46     ` Daniel Lezcano

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=51CE0485.8020109@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=amit.daniel@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=jc.lee@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=rjw@sisk.pl \
    --cc=t.figa@samsung.com \
    /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.