Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp1523867rdb; Sat, 26 Aug 2023 06:17:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfEP7UrXMFZ2w6QQYr0zUJYgYueHkbiQm+yWX5O6Aq/u8Wn4RJGBYSo5uXz/2lNbumu2Op X-Received: by 2002:a05:6a20:938d:b0:137:23a2:2b3c with SMTP id x13-20020a056a20938d00b0013723a22b3cmr26681171pzh.49.1693055836134; Sat, 26 Aug 2023 06:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693055836; cv=none; d=google.com; s=arc-20160816; b=CF9XHxGU9ixgQlFYzjVoWu1+bdGUE3ESEM+L69pXZ4YRgeFXh9Kuw9HSAqfQ8HPxj2 4TlJkzRIJIAlLD8S0wTduwvcuVYMaxQK0r5JSVWUflmsdq73VMPpY85223UTlIsBtyPt oSqEaSCzI7C72bx6FdiZDC6+UXAxEnCxb+ziglopt+daqNRf3QPbzbNStycvRrN1MtHW 8l3PzXoLT/8algsPoQNa0Id0Nvopr7JmrHed5/uUvwj2Ygb68I/6NtHqrChOHr7OPWyf 69NYh8cgPQiZ0cy4/KKtWiB+FjGtF7J2j7bzkTYLb2wFI+lMd7Ovv6tP/PSnTcFz7TRg UcKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=a2sva016jJtNutcTJ6Ds83PTVH+5NncEX4SIiKh65Ug=; fh=SNlm6kaQuccbADgmDAWOO3dB0qe/rP0lETxeSxorSCo=; b=AqWCI54b2665ntj8biqro6odRyVbM9Lt79jDzhbvQUUUONNtVy0Qnfm29p1O08lFJk lZ4TLR71YdZu4OIxeTUzH+p82bzOP1bHL8nsQ86d6HcqDjWYO4XBm5lgQDbsbOVtk/HC ooMG3ky2n4o9+rSpg4V0zOEm19ckmno0aEoMwN2AvNdIJJDEEJlWFzfsSy/rEQaZKNGA B3P4D7Yg/WJXlsfbmAd3B8MVJVRhOvrHcfn5fL2eO1EANz/H5PrzbS73MV9UDkB1XwQg QOOAG/Q+0jdDsMlujADvbJuZfkl7iU0cVR7A/syvXItbIPAlloIn0y6brBjBMma1l5KX EAhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OprKqxj4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020a056a000b8900b0068a6038f868si4119615pfj.154.2023.08.26.06.16.37; Sat, 26 Aug 2023 06:17:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OprKqxj4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231872AbjHZKJr (ORCPT + 99 others); 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.