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 0104BC83F17 for ; Mon, 28 Aug 2023 10:27:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231225AbjH1K1B (ORCPT ); Mon, 28 Aug 2023 06:27:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231189AbjH1K0b (ORCPT ); Mon, 28 Aug 2023 06:26:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7B17D7; Mon, 28 Aug 2023 03:26:28 -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 35D0E63AC0; Mon, 28 Aug 2023 10:26:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B55FC433C8; Mon, 28 Aug 2023 10:26:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693218387; bh=tkjosulHP+16FnPz+CCatC7X/KqMbHjO933JFiN4Vyc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=eMPXz575TzNzXB5u0LKu+9V+itGSDZneFKB5uJdztcOA2rwwbFShZQN/6z+VpbsMX 30erM4veQeEWbSEAtOfXAXtBHh2Sp04OKH8xbhFFk7LYLB0gt9F/F6IqyVn5ZVvHPh Tc0jzALyAFyJ9FxmHC12DpDJq2B+i16sxwEPfpk8bJtc9TJM+ZaKZ1jdeX+F4/6n8M gvcw5mt66PQ54yzm8M9xEs0pjauVBL9lxNuwMaXwcgm4kvWsAL5ydiTlIoSi6AFEKY eNaHyMM4ZyfnZ5mSJKARVWPfazXNWhsZ7FSYWZnDLebdAaj6miy1xakfVGAuqiDU3G dsUJXaiCr/ckA== 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 1qaZRx-008gst-4k; Mon, 28 Aug 2023 11:26:25 +0100 Date: Mon, 28 Aug 2023 11:26:24 +0100 Message-ID: <863503foof.wl-maz@kernel.org> From: Marc Zyngier To: Dmitry Baryshkov Cc: "Maulik Shah (mkshah)" , Andy Gross , Bjorn Andersson , Konrad Dybcio , Thomas Gleixner , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong Subject: Re: [PATCH 1/2] irqchip/qcom-pdc: don't read version register if it is not available In-Reply-To: References: <20230825213552.1646321-1-dmitry.baryshkov@linaro.org> <09d89b1c-8c78-7671-a385-99c6a8910fde@quicinc.com> <865y4zfppf.wl-maz@kernel.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, quic_mkshah@quicinc.com, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, tglx@linutronix.de, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, neil.armstrong@linaro.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 Mon, 28 Aug 2023 11:18:10 +0100, Dmitry Baryshkov wrote: > > On Mon, 28 Aug 2023 at 13:04, Marc Zyngier wrote: > > > > On Mon, 28 Aug 2023 10:46:10 +0100, > > Dmitry Baryshkov wrote: > > > > > > On Mon, 28 Aug 2023 at 12:36, Maulik Shah (mkshah) > > > wrote: > > > > > > > > Hi Dmitry, > > > > > > > > This patch may be useful if there was a case where some PDCs don't have > > > > version register populated/available, > > > > In all PDC versions, version register is always available but due to reg > > > > size not good enough in device tree for SM8150 it failed to read. > > > > > > > > reg size in device node must be expanded if its too small to access all > > > > registers and i think > > > > additional check in driver to check if size is good enough would not be > > > > of much use. > > > > > > Unfortunately, it doesn't work this way. DT files are ABI. Even if we > > > change the DT, the kernel should continue working with the older > > > version. > > > Thus, we have to add such bandaid code, which will keep the kernel > > > from crashing if old DT was used. > > > > You're missing the point: all existing PDC HW have version register. > > The fact that the DT is crap doesn't invalidate this simple fact. It > > is thus perfectly possible for the driver to *ignore* the crap and do > > the right thing by expanding the size of the mapping, rather than > > falling back to the non-versioned code. > > Ah. Interesting idea. If that's the overall consensus I can send v2 > doing this. Not sure what is better though. Given that DT files are mostly generated using copy-paste by people making a point not to read specifications, odds are that your current patch would end-up applying the v0 behaviour to v3.2 HW. What could possibly go wrong? M. -- Without deviation from the norm, progress is not possible.