Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754031Ab3JBNHR (ORCPT ); Wed, 2 Oct 2013 09:07:17 -0400 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21]:52366 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753507Ab3JBNHM (ORCPT ); Wed, 2 Oct 2013 09:07:12 -0400 Date: Wed, 2 Oct 2013 14:05:50 +0100 From: Dave Martin To: Nicolas Pitre Cc: Vyacheslav Tyrtov , Mark Rutland , devicetree@vger.kernel.org, Kukjin Kim , Russell King , Ben Dooks , Pawel Moll , Ian Campbell , Stephen Warren , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Tarek Dakhran , Daniel Lezcano , linux-samsung-soc@vger.kernel.org, Rob Landley , Mike Turquette , Thomas Gleixner , Naour Romain , linux-arm-kernel@lists.infradead.org, Heiko Stuebner Subject: Re: [PATCH 3/6] ARM: EXYNOS: add Exynos Dual Cluster Support Message-ID: <20131002130550.GB3407@localhost.localdomain> References: <1380644227-12244-1-git-send-email-v.tyrtov@samsung.com> <1380644227-12244-4-git-send-email-v.tyrtov@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1351 Lines: 41 On Tue, Oct 01, 2013 at 03:55:24PM -0400, Nicolas Pitre wrote: > On Tue, 1 Oct 2013, Vyacheslav Tyrtov wrote: > > > From: Tarek Dakhran [...] > > + kfs_use_count[cpu][cluster]++; > > + if (kfs_use_count[cpu][cluster] == 1) { > > + ++core_count[cluster]; > > + if (core_count[cluster] == 1) { > > + ret = exynos_cluster_power_up(cluster); > > + if (ret) { > > + pr_err("%s: cluster %u power up error\n", > > + __func__, cluster); > > + return ret; > > + } > > + __cci_control_port_by_index(MAX_NR_CLUSTERS > > + - cluster, true); > > This is wrong and very racy. The state machine implemented in > mcpm-head.S is there already to handle proper synchronization for you. Maybe this issue didn't make itself obvious yet due to the lack of suspend support. Moving the CCI maintenance to power_up_setup() is essential for suspend/ resume to work, because then CPUs can power up randomly in response to interrupts -- exynos_lock is not sufficient protection in that case. The TC2 code should provide a good example of what to do. [...] Cheers ---Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/