From: "Mathieu J. Poirier" mathieu.poirier@linaro.org
Will Deacon has a better solution and his patch should be coming in soon. In the mean time please consider for inclusion.
This is an in-between solution that prevents the EVENTEN bit in the CNTKCTL register from being mask, resulting in events between clusters being lost.
Bug: LP1188778
Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org Signed-off-by: Sudeep KarkadaNagesha Sudeep.KarkadaNagesha@arm.com --- arch/arm/include/asm/arch_timer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h index 7c1bfc0..4928cda 100644 --- a/arch/arm/include/asm/arch_timer.h +++ b/arch/arm/include/asm/arch_timer.h @@ -105,7 +105,7 @@ static inline void __cpuinit arch_counter_set_user_access(void) asm volatile("mrc p15, 0, %0, c14, c1, 0" : "=r" (cntkctl));
/* disable user access to everything */ - cntkctl &= ~((3 << 8) | (7 << 0)); + cntkctl &= ~((3 << 8) | (3 << 0));
asm volatile("mcr p15, 0, %0, c14, c1, 0" : : "r" (cntkctl)); }
On Tue, 2013-06-11 at 17:07 -0600, mathieu.poirier@linaro.org wrote:
From: "Mathieu J. Poirier" mathieu.poirier@linaro.org
Will Deacon has a better solution and his patch should be coming in soon. In the mean time please consider for inclusion.
This is an in-between solution that prevents the EVENTEN bit in the CNTKCTL register from being mask, resulting in events between clusters being lost.
Bug: LP1188778
Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org Signed-off-by: Sudeep KarkadaNagesha Sudeep.KarkadaNagesha@arm.com
So this patch stops the kernel disabling the event stream generation we enabled in bootmon? From board.txt we currently set bits 15 and 14 here...
SCC: 0x700 0x1032F003 ;CFGRW48 - [25:24]Boot CPU [28]Boot Cluster (default CA7_0) ; Bootmon configuration: ; [15]: A7 Event stream generation (default: disabled) ; [14]: A15 Event stream generation (default: disabled) ; [13]: Power down the non-boot cluster (default: disabled) ; [12]: Use per-cpu mailboxes for power management (default: disabled) ; [11]: A15 executes WFEs as nops (default: disabled) ; [ 4]: Erase UEFI variable storage in NOR flash
And I guess the problem being worked around is the same as reported in LP bug 1188778?
On 13-06-12 04:09 AM, Jon Medhurst (Tixy) wrote:
On Tue, 2013-06-11 at 17:07 -0600, mathieu.poirier@linaro.org wrote:
From: "Mathieu J. Poirier" mathieu.poirier@linaro.org
Will Deacon has a better solution and his patch should be coming in soon. In the mean time please consider for inclusion.
This is an in-between solution that prevents the EVENTEN bit in the CNTKCTL register from being mask, resulting in events between clusters being lost.
Bug: LP1188778
Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org Signed-off-by: Sudeep KarkadaNagesha Sudeep.KarkadaNagesha@arm.com
So this patch stops the kernel disabling the event stream generation we enabled in bootmon? From board.txt we currently set bits 15 and 14 here...
SCC: 0x700 0x1032F003 ;CFGRW48 - [25:24]Boot CPU [28]Boot Cluster (default CA7_0) ; Bootmon configuration: ; [15]: A7 Event stream generation (default: disabled) ; [14]: A15 Event stream generation (default: disabled) ; [13]: Power down the non-boot cluster (default: disabled) ; [12]: Use per-cpu mailboxes for power management (default: disabled) ; [11]: A15 executes WFEs as nops (default: disabled) ; [ 4]: Erase UEFI variable storage in NOR flash
And I guess the problem being worked around is the same as reported in LP bug 1188778?
Exactly - the sole purpose is to provide an intermediate solution to LP1188778 while Will Deacon is working on his solution. The configuration can be made in the FW but the kernel still has the opportunity of disabling the mechanism, hence this patch.
On Wed, 2013-06-12 at 07:14 -0600, Mathieu Poirier wrote:
On 13-06-12 04:09 AM, Jon Medhurst (Tixy) wrote:
On Tue, 2013-06-11 at 17:07 -0600, mathieu.poirier@linaro.org wrote:
From: "Mathieu J. Poirier" mathieu.poirier@linaro.org
Will Deacon has a better solution and his patch should be coming in soon. In the mean time please consider for inclusion.
This is an in-between solution that prevents the EVENTEN bit in the CNTKCTL register from being mask, resulting in events between clusters being lost.
Bug: LP1188778
Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org Signed-off-by: Sudeep KarkadaNagesha Sudeep.KarkadaNagesha@arm.com
So this patch stops the kernel disabling the event stream generation we enabled in bootmon? From board.txt we currently set bits 15 and 14 here...
SCC: 0x700 0x1032F003 ;CFGRW48 - [25:24]Boot CPU [28]Boot Cluster (default CA7_0) ; Bootmon configuration: ; [15]: A7 Event stream generation (default: disabled) ; [14]: A15 Event stream generation (default: disabled) ; [13]: Power down the non-boot cluster (default: disabled) ; [12]: Use per-cpu mailboxes for power management (default: disabled) ; [11]: A15 executes WFEs as nops (default: disabled) ; [ 4]: Erase UEFI variable storage in NOR flash
And I guess the problem being worked around is the same as reported in LP bug 1188778?
Exactly - the sole purpose is to provide an intermediate solution to LP1188778 while Will Deacon is working on his solution. The configuration can be made in the FW but the kernel still has the opportunity of disabling the mechanism, hence this patch.
Good, I was trying to make sure I understood the patch before applying it to the ARM LT tree, which I've now done.
On 12/06/13 15:57, Jon Medhurst (Tixy) wrote:
On Wed, 2013-06-12 at 07:14 -0600, Mathieu Poirier wrote:
On 13-06-12 04:09 AM, Jon Medhurst (Tixy) wrote:
On Tue, 2013-06-11 at 17:07 -0600, mathieu.poirier@linaro.org wrote:
From: "Mathieu J. Poirier" mathieu.poirier@linaro.org
Will Deacon has a better solution and his patch should be coming in soon. In the mean time please consider for inclusion.
This is an in-between solution that prevents the EVENTEN bit in the CNTKCTL register from being mask, resulting in events between clusters being lost.
Bug: LP1188778
Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org Signed-off-by: Sudeep KarkadaNagesha Sudeep.KarkadaNagesha@arm.com
So this patch stops the kernel disabling the event stream generation we enabled in bootmon? From board.txt we currently set bits 15 and 14 here...
SCC: 0x700 0x1032F003 ;CFGRW48 - [25:24]Boot CPU [28]Boot Cluster (default CA7_0) ; Bootmon configuration: ; [15]: A7 Event stream generation (default: disabled) ; [14]: A15 Event stream generation (default: disabled) ; [13]: Power down the non-boot cluster (default: disabled) ; [12]: Use per-cpu mailboxes for power management (default: disabled) ; [11]: A15 executes WFEs as nops (default: disabled) ; [ 4]: Erase UEFI variable storage in NOR flash
And I guess the problem being worked around is the same as reported in LP bug 1188778?
Exactly - the sole purpose is to provide an intermediate solution to LP1188778 while Will Deacon is working on his solution. The configuration can be made in the FW but the kernel still has the opportunity of disabling the mechanism, hence this patch.
Good, I was trying to make sure I understood the patch before applying it to the ARM LT tree, which I've now done.
Just to summarise, the issue mentioned in LP1188998 happens before the CPU enters suspend for the first time. The bits 15 and 14 ensures that EVENTEN is enabled on reset by bootmon. But Linux on cold boot clears that bit. Once the CPU enters suspend-resume cycle, EVENTEN is again set back by bootmon. The final solution would be to get rid of these bits in board.txt and let Linux handle this bit completely.
Regards, Sudeep
On Wed, 12 Jun 2013, Sudeep KarkadaNagesha wrote:
On 12/06/13 15:57, Jon Medhurst (Tixy) wrote:
On Wed, 2013-06-12 at 07:14 -0600, Mathieu Poirier wrote:
On 13-06-12 04:09 AM, Jon Medhurst (Tixy) wrote:
On Tue, 2013-06-11 at 17:07 -0600, mathieu.poirier@linaro.org wrote:
From: "Mathieu J. Poirier" mathieu.poirier@linaro.org
Will Deacon has a better solution and his patch should be coming in soon. In the mean time please consider for inclusion.
This is an in-between solution that prevents the EVENTEN bit in the CNTKCTL register from being mask, resulting in events between clusters being lost.
Bug: LP1188778
Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org Signed-off-by: Sudeep KarkadaNagesha Sudeep.KarkadaNagesha@arm.com
So this patch stops the kernel disabling the event stream generation we enabled in bootmon? From board.txt we currently set bits 15 and 14 here...
SCC: 0x700 0x1032F003 ;CFGRW48 - [25:24]Boot CPU [28]Boot Cluster (default CA7_0) ; Bootmon configuration: ; [15]: A7 Event stream generation (default: disabled) ; [14]: A15 Event stream generation (default: disabled) ; [13]: Power down the non-boot cluster (default: disabled) ; [12]: Use per-cpu mailboxes for power management (default: disabled) ; [11]: A15 executes WFEs as nops (default: disabled) ; [ 4]: Erase UEFI variable storage in NOR flash
And I guess the problem being worked around is the same as reported in LP bug 1188778?
Exactly - the sole purpose is to provide an intermediate solution to LP1188778 while Will Deacon is working on his solution. The configuration can be made in the FW but the kernel still has the opportunity of disabling the mechanism, hence this patch.
Good, I was trying to make sure I understood the patch before applying it to the ARM LT tree, which I've now done.
Just to summarise, the issue mentioned in LP1188998 happens before the CPU enters suspend for the first time. The bits 15 and 14 ensures that EVENTEN is enabled on reset by bootmon. But Linux on cold boot clears that bit. Once the CPU enters suspend-resume cycle, EVENTEN is again set back by bootmon. The final solution would be to get rid of these bits in board.txt and let Linux handle this bit completely.
That depends.
If that bit is used to implement an errata workaround then given the choice it is preferable to let the firmware deal with it as needed (assuming that at some point it won't be needed anymore) and keep the kernel as transparent as possible. Unless there is some other reasons for the kernel to be aware of this issue, errata knowledge is best confined to the firmware configuration.
Nicolas
On 12/06/13 16:51, Nicolas Pitre wrote:
On Wed, 12 Jun 2013, Sudeep KarkadaNagesha wrote:
On 12/06/13 15:57, Jon Medhurst (Tixy) wrote:
On Wed, 2013-06-12 at 07:14 -0600, Mathieu Poirier wrote:
On 13-06-12 04:09 AM, Jon Medhurst (Tixy) wrote:
On Tue, 2013-06-11 at 17:07 -0600, mathieu.poirier@linaro.org wrote:
From: "Mathieu J. Poirier" mathieu.poirier@linaro.org
Will Deacon has a better solution and his patch should be coming in soon. In the mean time please consider for inclusion.
This is an in-between solution that prevents the EVENTEN bit in the CNTKCTL register from being mask, resulting in events between clusters being lost.
Bug: LP1188778
Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org Signed-off-by: Sudeep KarkadaNagesha Sudeep.KarkadaNagesha@arm.com
So this patch stops the kernel disabling the event stream generation we enabled in bootmon? From board.txt we currently set bits 15 and 14 here...
SCC: 0x700 0x1032F003 ;CFGRW48 - [25:24]Boot CPU [28]Boot Cluster (default CA7_0) ; Bootmon configuration: ; [15]: A7 Event stream generation (default: disabled) ; [14]: A15 Event stream generation (default: disabled) ; [13]: Power down the non-boot cluster (default: disabled) ; [12]: Use per-cpu mailboxes for power management (default: disabled) ; [11]: A15 executes WFEs as nops (default: disabled) ; [ 4]: Erase UEFI variable storage in NOR flash
And I guess the problem being worked around is the same as reported in LP bug 1188778?
Exactly - the sole purpose is to provide an intermediate solution to LP1188778 while Will Deacon is working on his solution. The configuration can be made in the FW but the kernel still has the opportunity of disabling the mechanism, hence this patch.
Good, I was trying to make sure I understood the patch before applying it to the ARM LT tree, which I've now done.
Just to summarise, the issue mentioned in LP1188998 happens before the CPU enters suspend for the first time. The bits 15 and 14 ensures that EVENTEN is enabled on reset by bootmon. But Linux on cold boot clears that bit. Once the CPU enters suspend-resume cycle, EVENTEN is again set back by bootmon. The final solution would be to get rid of these bits in board.txt and let Linux handle this bit completely.
That depends.
If that bit is used to implement an errata workaround then given the choice it is preferable to let the firmware deal with it as needed (assuming that at some point it won't be needed anymore) and keep the kernel as transparent as possible. Unless there is some other reasons for the kernel to be aware of this issue, errata knowledge is best confined to the firmware configuration.
Agreed. And yes it's different reason. Looks like even userspace needs event stream for userspace locking implementation.
Regards, Sudeep
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
linaro-kernel@lists.linaro.org