Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp242008lqm; Tue, 30 Apr 2024 21:03:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW89/14KfTGrEmkdT0vh82VsRMBnhyGHjJwp+fb+98mRHscEJumkq3dKjpcTzT/bE00LSSjWYBt+lvWBJw6b7eTDEV9/Vlltozf1KeCNQ== X-Google-Smtp-Source: AGHT+IFICEy2/qcsD/lB5UpK4LD6RC0gLBXsch0TE8imfKsCCd3nCDPeNDfvUDS7biF3/hAV5AOl X-Received: by 2002:a17:906:b17:b0:a55:90f0:bdf2 with SMTP id u23-20020a1709060b1700b00a5590f0bdf2mr917146ejg.32.1714536204195; Tue, 30 Apr 2024 21:03:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714536204; cv=pass; d=google.com; s=arc-20160816; b=VnXwpkptFTRZ27ocWfhDMrnxNP1rH5GHhAAMO53GteELb0NFiEknFNfZoROR+KXdBO CklAdgG7vVsHpwibFAOaCOIL6+C+kv0SwXwxYiLPyAHTnsCqVb+6FR6y96WssTmRtEm2 RxDwal7XDNkZr3RzTa8qXESR1u9v3cy3aFU3vH+0/saS26PQpLmB7zA7q3y9ZYPCOReA KkoirUiGyfYHzkyk0yF6ENUKnsf40Kecufttj9GFSirvUz5qKZ+t3/1v3HEiihPE0bAX TsIt9wxhDSdE3nxS4xPsf0rN2qiPDI1N2qpduZhF/LdS64fBzOOgHITJdr9iM/d8ig7P MdVg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=9DhpvDZ5jjadT8noMpFkM2fayukKhN/HBsuXQwKC1aE=; fh=SZN+hmsD6AOM1u24qWGpgEu90E5p1ODBTnzVT8+/Mrg=; b=KZtHhKTziytknQPDvzqwd7IX3+rYgcChMPxyET//bl4enRZylZ9ukEi0R0S8vZZ2/d efr1zqPdslJFHgbFv/crOPYS4Te91TgUCO1tzZBTXq2NoS4ecZT117CabUjx/yNcyN0t QJ6W8zBWp3NmFc22t2KvpNtn1a+ejsPLSmWL38o7qr6RfJcaFw7op3etAbz5Chez0jZ8 ySbXdeHrCuLHX8+P4dYPwcyBBqR7hrT/ehud+F+FJmgf5rFc9XEYJ/3wMqZYcqaUJrEy xgDbXapAt3TEAqqstUCwr+w5vxl94eajFEuagYMQJhJPdVMgGHW36kCsgnXK/Q1nJQdJ rOPA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SoZqnvTU; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-164891-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a26-20020a1709064a5a00b00a58ed2c2d62si4397847ejv.316.2024.04.30.21.03.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 21:03:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164891-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SoZqnvTU; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-164891-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E85DA1F22E57 for ; Wed, 1 May 2024 04:03:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DBBB237165; Wed, 1 May 2024 04:03:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SoZqnvTU" Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CB2922F19 for ; Wed, 1 May 2024 04:03:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714536197; cv=none; b=k8P8FMfsrAnJGsR+J4Wn2FqCBZo9RkcTA6ALnnLkNd/PDLZUD9c9WeiJtGUYIaVcZqQm6eP7YRlLI+RrJ51pTDEKqDYWFlpM9AnGOU3796GTc/L3sd+Lb30VblI39bXJO8dr4wgAh/x9NXXfLaFph+jbNeRlXuDyw1x/YYusa8A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714536197; c=relaxed/simple; bh=0+M3w/Rwyk4DELz4Y5UB8syWUFAjVBlsGq8zhTnbPhM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=BOcy23gYT/udDzBWPn5SK8uMTEb4m81afRadjXYyOiKWP8Aq/rsJOth3Qw4SH9QBA6v3uoaeoT/b5wvKHNeA+3M7fPniZaINSQSidUy+MBqcn4RpuPl6e3eOuvlUzkJUrFh33b6HZs5c2+XOHMiwUe7LhxfI9Lati3tbLzf5wH8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=SoZqnvTU; arc=none smtp.client-ip=209.85.219.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-de46da8ced2so7356549276.0 for ; Tue, 30 Apr 2024 21:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714536193; x=1715140993; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9DhpvDZ5jjadT8noMpFkM2fayukKhN/HBsuXQwKC1aE=; b=SoZqnvTUIiYNfv7DcSmd5Ks5kDM/M4mpMFJx5eZnb9LO+Xv/6a/lTUYRjMICg5pzgZ UhNAQI4SOAB7BMTCW6mRa7bBWZlozoUOZRm5tA7DiUeU1xycoNshtzW+V2BIa4Fta210 pcmMJiHP2mE6EtOgoDPafB97aqoc3JfejIlNYOZW2j5I1LZCP5pTTyTRc0SbfoWMQBkm igpwtzZJjc7T312rV4oDxzeRVSdP+44jl74OyosEm4vSFo3+3sTFyodStkPORN6J9bRi 78CeObMJH2E72jnhnO/cxklQaEAzmXAlSbNTmRXh4VZoGRqzrrUmqQb6g0liyldivUeb EQ9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714536193; x=1715140993; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9DhpvDZ5jjadT8noMpFkM2fayukKhN/HBsuXQwKC1aE=; b=tO/RBt1D0PtZBRUtEBj5eziivghqO3D2EX/t7nqt9xdo/VkYZ7zb+O6P0J9i5DmRMe +WgBIQsksXUiBfumWSI/1GSbbNt2gO+MpvtQz1qcIlzQJceL2qZ8XYEz9p7yEQQpHphw 8/0GRofi3yWCubf9B6LLe8EP744x56g5WukC9qR3VlVgB07D4Laa5xgsH9udRd4CnB+B m+KPqq0t5FeSJacnp2c9ZD6z08Br2WdiBOShSUKzryEgNuOhSv9huXLMZ77v1qSEaBrX ZMpISMtwi2f0fF8iQCwFQj7q37hFVIPTvnmbealCwKPAT8CRBX78+G0Vxyit0QLGJ4Ol +msQ== X-Forwarded-Encrypted: i=1; AJvYcCXTl8ICN+UP4PxeRGO/RmE/UFE9b12b9k+YapuFDhjbnFS69/0FdqA1xRam0t3FydrkQLrb1ninOJpOFpBHC0UW+mqVGfS11fuxlLe3 X-Gm-Message-State: AOJu0Yxy7fM1v6M6q2y/yKDR325nxx9wsu/3HO/Xh+MO36AWzNEkEJ/8 pK797mXvwWdf6uUCz1SrRJF9R41URp4tfem2Tb852P6a42jkRQeEIMFRE2k0jzfhr74wsJzBQgp RVkoYB3KwxIOttyqzKYkuqZ3q/8u8cv6fdHes6A== X-Received: by 2002:a25:bcc5:0:b0:de6:1245:c3d5 with SMTP id l5-20020a25bcc5000000b00de61245c3d5mr1472680ybm.60.1714536193411; Tue, 30 Apr 2024 21:03:13 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240430-pmic-glink-sleep-while-atomic-v1-1-88fb493e8545@quicinc.com> In-Reply-To: <20240430-pmic-glink-sleep-while-atomic-v1-1-88fb493e8545@quicinc.com> From: Dmitry Baryshkov Date: Wed, 1 May 2024 07:03:02 +0300 Message-ID: Subject: Re: [PATCH] soc: qcom: pmic_glink: Make client-lock non-sleeping To: Bjorn Andersson Cc: Konrad Dybcio , Mukesh Ojha , Andrew Halaney , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson Content-Type: text/plain; charset="UTF-8" On Wed, 1 May 2024 at 06:33, Bjorn Andersson wrote: > > From: Bjorn Andersson > > The recently introduced commit '635ce0db8956 ("soc: qcom: pmic_glink: > don't traverse clients list without a lock")' ensured that the clients > list is not modified while traversed. > > But the callback is made from the GLINK IRQ handler and as such this > mutual exclusion can not be provided by a (sleepable) mutex. > > Replace the mutex with a spinlock. > > Fixes: 635ce0db8956 ("soc: qcom: pmic_glink: don't traverse clients list without a lock") > Signed-off-by: Bjorn Andersson > --- > drivers/soc/qcom/pmic_glink.c | 25 +++++++++++++++---------- > 1 file changed, 15 insertions(+), 10 deletions(-) > Reviewed-by: Dmitry Baryshkov -- With best wishes Dmitry