From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2673CC83F13 for ; Sat, 26 Aug 2023 10:10:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231903AbjHZKJr (ORCPT ); Sat, 26 Aug 2023 06:09:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231840AbjHZKJQ (ORCPT ); Sat, 26 Aug 2023 06:09:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CFCEBA; Sat, 26 Aug 2023 03:09:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AE9946238A; Sat, 26 Aug 2023 10:09:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08EC7C43395; Sat, 26 Aug 2023 10:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693044553; bh=amr3faRrFgPTx8cSSryYFK037g8RXqcpT4aumqinmOg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OprKqxj4rxru7OQ6wwoNxaW1wa87kvGpMdh0nqTyqhwlFc/L1xmRZBFlfwdcOjspg CR58yItoYCRbEGHK8nV5WaLSzaUURQYa2SIvYmMd3ZvGEyqGBgFuOJrjWDksJXXiY0 P6Ek3vxCBtRdl9wZBUiUbfx1hpLN8T8ykDdk73ezqsyAPSEgSaH0U/RbYn8OawYjDf qwPj9tnKSzptdnf5AWCOAN3E+2STMy3PKxlMdZmnM76OlvzWil1EyrOhnZLJgmvrZB wzq7uKPNV4pX3GLduOPnpr67KXUYWF/ufrf+9ykMSbEBGPt0lFLzwwGwc2F/JGjiTC 6jIwTrjdQot3Q== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qZqE9-008GTq-UP; Sat, 26 Aug 2023 11:09:10 +0100 Date: Sat, 26 Aug 2023 11:09:09 +0100 Message-ID: <86edjqf73u.wl-maz@kernel.org> From: Marc Zyngier To: Dmitry Baryshkov Cc: Neil Armstrong , Andy Gross , Bjorn Andersson , Konrad Dybcio , Thomas Gleixner , "Maulik Shah (mkshah)" , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] irqchip/qcom-pdc: add support for v3.2 HW In-Reply-To: References: <20230823-topic-sm8x50-upstream-pdc-ver-v3-1-aa7d9ab862e4@linaro.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: dmitry.baryshkov@linaro.org, neil.armstrong@linaro.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, tglx@linutronix.de, quic_mkshah@quicinc.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 25 Aug 2023 19:43:34 +0100, Dmitry Baryshkov wrote: > > On Wed, 23 Aug 2023 at 12:49, Neil Armstrong wrote: > > > > Starting from HW version 3.2 the IRQ_ENABLE bit has moved to the > > IRQ_i_CFG register and requires a change of the driver to avoid > > writing into an undefined register address. > > > > Get the HW version from registers and set the IRQ_ENABLE bit to the > > correct register depending on the HW version. > > > > Reviewed-by: Maulik Shah > > Signed-off-by: Neil Armstrong > > --- > > Changes in v3: > > - Simplify qcom_pdc_gic_set_type() > > - Used __assign_bit in pdc_setup_pin_mapping() > > - remove BIT() from IRQ_i_CFG_IRQ_ENABLE to be used with __assign_bit() > > - Add Reviewed-by tag > > - Link to v2: https://lore.kernel.org/r/20230822-topic-sm8x50-upstream-pdc-ver-v2-1-3035b8d388f7@linaro.org > > > > Changes in v2: > > - Changed IRQ_ENABLE handling based on Maulik's comments > > - Link to v1: https://lore.kernel.org/r/20230821-topic-sm8x50-upstream-pdc-ver-v1-1-6d7f4dd95719@linaro.org > > --- > > drivers/irqchip/qcom-pdc.c | 61 ++++++++++++++++++++++++++++++++++++---------- > > 1 file changed, 48 insertions(+), 13 deletions(-) > > This patch in linux-next broke sm8150. On that platform the PDC region > has size 0x400, so reading the version crashes the kernel. > I'll send a patch fixing device tree, but we'd still need to handle > this in a driver too. Thanks for reporting the breakage. Given that this has direct platform implications, I've dropped the patch from my tree until people figure out whether the proposed fix is the correct one and take the time it takes to test it. Please work with Neil to post an updated series that contains the fixed support for v3.2 and the DT churn. Thanks, M. -- Without deviation from the norm, progress is not possible.