From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 4A1113F7A82 for ; Tue, 26 May 2026 12:35:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779798921; cv=none; b=lU7BD6n1bCLhsRO9v1dDW0kiCsg35o8T8vlMuUKIMDUXJLG21AzL8fW15YWama1OXi+SRxqBJmH/plU9b5yoG4MMpKd8TJtIOaWt6YqlH/IQUC4d+bQ+11zsfq3uCFHGze1BPJv47lriURo7/eoGz2JVi2y4cFNb0bdxQqunEZE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779798921; c=relaxed/simple; bh=uPfbrIiekRdi5c+dg2yX1VDpWIrwfNRjnUuAs2MeJ/8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D2m6YM3Ps8K18VpQfb1sPGCdDIlgI+EvT/sZ6shqZvoEwNXS/Rh2uitkmHK/cAknuEgHzBvqKoyXdaOXo8KYIxI/mctN2yqVdLoQ6nLuUizJ47L1zvNFFFIUnU+OiWCGr4UZpa98HQnFV3jB7mzvUChZ58gNpvSn4nxovCIufPk= 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=vbARjkY+; arc=none smtp.client-ip=209.85.221.42 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="vbARjkY+" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-43fe608cb92so6411948f8f.2 for ; Tue, 26 May 2026 05:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779798919; x=1780403719; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=+FnVwdbtAOn6T98aiA6Qvgl3nhPcMwGorw0+JjGTmQs=; b=vbARjkY+VkxTDWDTZz9suVzzwNiP1Z4bwHHksjhXpz0hry5MDWniviPT/x3MJeVYD+ 9doeTZosUr95wAp070Cr7lqFoe7WRcbAFjtz/B+wKXtPyVcOw/oQXJ5JimrP5DuAn05W 0Nom8u4esgTR7AYjYRExXMV0VpEDTiUZM+oCxbskqUpI5svEDXQbyQtcLZStSdLWIKK4 BhFRwPsDNnjZ5tQcYZ+WeUIlC47B97XBY9Sn2r6aAnZ/3X7m3wlLV3NsXhswrdOz8+kq vUUIovd80OnOesopANQhwjP/G2LNN7K/BnQsSYaCveDC4NTPW+s24HUnq+lyQAdwIvHT TDvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779798919; x=1780403719; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+FnVwdbtAOn6T98aiA6Qvgl3nhPcMwGorw0+JjGTmQs=; b=o0kYP/hT1vSYAl86h9AhLCf51HC5TDYKNFyh1EQqb949Lps6QYgXQ1tJ8gamZJUcy5 yItvOmwd1uuuE7qhpKmVt2cvZ97OWg9ixeEUYdjkd6i+/aZowVA8tDUFlKRn8j9G25KL FwhuFhHJ8FeTcmP9v3zg7pqeA+QkAhHBOxh3OinKWrf8eJN4w6vx/dqqLT3nwyWVnixk X41SiQ9tn6hkHCVjM5PgZxezexFWp7FPdXPsTAPbBifPsSq0KenetLVDeLJlFd57OKRm onEGKnnj+Aum308MbYxRhiksUZ5s2uFGQwjqe1DryqkiicNI+sIaAkzJUjOjlXPB3/UQ uRSw== X-Forwarded-Encrypted: i=1; AFNElJ9pfm7wZWqFaxTNbsZVyNYFRquPCVLq15UGLnSaCi+RJ8dKKWCFo7Q3yIrfsdXs+8iL49Br8s0pTRV2ZuY=@vger.kernel.org X-Gm-Message-State: AOJu0Yx5Fno8qMcyVLBHbMu7FNVnB4/2FpywfhW7FXd2exDeb/wzEhpd Jkeg99qHCqbMcdIUNwZQ+HP14e9PjFOPs48rDQPGQoY3Z+5d3cdpmNMjqucqD5jSHu0= X-Gm-Gg: Acq92OHSYbNqO17rnzkXD6+zL7bAdFGu0G6GIEO6LxDzGp/IedEsbQtlBzeA6Y7OjU4 byWrojMNmZDAtbfQ3J9qlh/J29d9/vmdoqKVyvq1wL490ebgnzd4uuz3hLtRGscrF14txHteqZW sxGgZMdpGzfeNl9i7pQnA89Mc7cHB0PxWBAj7EWCtLq3vxF9MlpPwS8r80cIVdvs19lXbO1UR/T 0sPw2FvFKrCE6osbD52d+B10HV87g25TcGM0TfRZ/GFxCOPL6H6hxBUbxdZWESLDAEhRLiYyvDV H4e5b/GkWnfYVWZ2TCOFlxwIQiZoznZia1/Wi0w3tHjSwvl+JNY3TvPpJBdxYnhiep7KnapfH3n ty+y1Ispah9w2MVC+bbFtVsTIW6xvrfjy3gfO3SeOaSzE0gVeOj/4X/tLOk9mq6n2f+bdH9ok3A zIbPE7RcIvilv9NmwI6xUFbUxUUs1m X-Received: by 2002:a05:6000:25e3:b0:45e:739c:f187 with SMTP id ffacd0b85a97d-45eb38c5329mr29111131f8f.22.1779798918558; Tue, 26 May 2026 05:35:18 -0700 (PDT) Received: from linaro.org ([77.64.147.108]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45eb6bc5479sm37517812f8f.0.2026.05.26.05.35.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2026 05:35:18 -0700 (PDT) Date: Tue, 26 May 2026 14:34:46 +0200 From: Stephan Gerhold To: Maulik Shah Cc: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Gleixner , Linus Walleij , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, Sneh Mankad Subject: Re: [PATCH v2 3/8] irqchip/qcom-pdc: Remove pdc_enable_intr() wrapper Message-ID: References: <20260526-hamoa_pdc-v2-0-f6857af1ce91@oss.qualcomm.com> <20260526-hamoa_pdc-v2-3-f6857af1ce91@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260526-hamoa_pdc-v2-3-f6857af1ce91@oss.qualcomm.com> On Tue, May 26, 2026 at 04:24:39PM +0530, Maulik Shah wrote: > pdc->enable_intr() function already points to respective version > specific enable function. pdc_enable_intr() now only kept as wrapper. > Remove the wrapper and invoke pdc->enable_intr() from caller. > > Locking in pdc_enable_intr() applies lock to all pdc->enable_intr() > however its only required for pdc_enable_intr_bank() which uses > a shared bank across all interrupts. pdc_enable_intr_cfg() do not > required locking as IRQ_CFG registers are one per interrupt. Move > locking accordingly. Well, pdc_enable_intr_cfg() is still a read-modify-write. If two CPUs read IRQ_i_CFG at the same time and modify different bits (e.g. enable and type bits) then write back the modified register one of the modifications will get lost. Can we be sure that this won't happen? Perhaps we can since PDC has IRQCHIP_SET_TYPE_MASKED, but personally I would keep the lock there to be sure, especially with the new GPIO operations you add that also read-modify-write the same register.. Thanks, Stephan