Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754089AbbFEBKS (ORCPT ); Thu, 4 Jun 2015 21:10:18 -0400 Received: from mail-ig0-f171.google.com ([209.85.213.171]:33010 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753450AbbFEBKP (ORCPT ); Thu, 4 Jun 2015 21:10:15 -0400 MIME-Version: 1.0 X-Originating-IP: [109.186.38.88] In-Reply-To: <20150526203634.GL23206@linaro.org> References: <1430500026-47990-1-git-send-email-lina.iyer@linaro.org> <20150511144608.GB16124@linaro.org> <20150518150302.GA23206@linaro.org> <20150526203634.GL23206@linaro.org> From: Ohad Ben-Cohen Date: Fri, 5 Jun 2015 04:09:54 +0300 Message-ID: Subject: Re: [PATCH RFC] hwspinlock: Don't take software spinlock before hwspinlock To: Lina Iyer Cc: "Anna, Suman" , Bjorn Andersson , Andy Gross , "linux-arm-msm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Kumar Gala , Jeffrey Hugo Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1331 Lines: 35 On Tue, May 26, 2015 at 11:36 PM, Lina Iyer wrote: >> Just to make sure I understand, is this how your scenario is solved? >> >> - c1 goes down >> - c0 goes down, carries information about shared resources >> - c1 takes HWLOCK and calls into SCM, stuck handling FIQs >> - c0 wants to call into SCM but is waiting spinning on HWLOCK >> - c1 completes handling FIQs, goes idle, HWLOCK is released by secure monitor >> - c0 takes HWLOCK, calls into SCM, shared resources handled correctly, >> >> HWLOCK in this example is a single shared hwspinlock accessible by c0, >> c1 and secure monitor. >> > That is correct. Ok, thanks. If we adopt the proposed approach in your patch, I'm thinking maybe we should restrict it only to hardware implementations that explicitly allow it, using some hardware capability flag published by the hwspinlock driver. In OMAP, e.g., it is prohibited to spin on this hwlock for a long period of time, so such a hw cap flag would allow you guys to enable this behaviour specifically for your driver. What do you think? Thanks, Ohad. -- 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/