Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp756977pxb; Wed, 25 Aug 2021 14:26:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWrBWyRftsRCxKb4eupAagHxUCnbhQr/ljuil5aZwoGnaq9OkxfubhoGF0m/hvA/E4uFbr X-Received: by 2002:a6b:7519:: with SMTP id l25mr369708ioh.169.1629926783349; Wed, 25 Aug 2021 14:26:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629926783; cv=none; d=google.com; s=arc-20160816; b=VXGwFA/7nZgQrg/jlc2wmk20AZQz7shM0kLuMTGck4fWq/LW83GTtbtzy4+G0tqEbe wDwt9XlLZ0UEjraJvvdou8lrNvl0InlCqauGeUVFYGNiQas86Q1DSvwmCe1/6SjfDjJx zoM1BllyaJyDy1NegI2djuG5kQs4suF9bpPVAfdG4/vczkI4fyWJxMYyHKJfHTV4obH5 OyGgANol/xqc+5BMpJiLkTLkSmHG0JYOVEoK38582mAn7W+F/GJ78Ow3TuIalVU3NoQ4 0GnQF/k+HrKyxcE3dOQ1+ZoaVY+/9rl/Sp+8gu1ilPjesaqdxReCwNKY7GFUhlGGcp56 Tnsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=quBucgEBkfg2yt8tN8y/eKhu98tHA7FkQlGhQwdtsig=; b=BUOOX6CB9V72tze+juu4Fx10+e/2e/eoFVqu6qmFxkQ1CkU/N+ldRnw6/730mqyHZx 7Qok7XMAAugjbHaVbLztPsiD1M2IIR8NBV0/eIYYjeGx+oqjJ7t/XCFJ9a8iqIW0mASQ I3i3+GoPQyZi9/rEmLRxzB+ayIy6ku7Om/uJKhwGszKVl4Bq+L8CXGe4AQnzwhZnT/ND Ds3Qv3k1WdstSHc0VFy7VDehagHwvKAnT55weEooyhc54BIlAFNxSfeug1OWCOn1GoLM sjYllH+cp2gqjiUTPdbNDq0p+gguK3AMFNg7TyrNzSBLmU1qPv5RD4Z8IAbNzkLZ1Ls2 xevA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b18si820394ioz.23.2021.08.25.14.26.12; Wed, 25 Aug 2021 14:26:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230476AbhHYVZ5 (ORCPT + 99 others); Wed, 25 Aug 2021 17:25:57 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:49891 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbhHYVZ4 (ORCPT ); Wed, 25 Aug 2021 17:25:56 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]) by mrelayeu.kundenserver.de (mreue108 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MMoT4-1mZZL63hNU-00InKl for ; Wed, 25 Aug 2021 23:25:08 +0200 Received: by mail-wr1-f50.google.com with SMTP id d26so1577967wrc.0 for ; Wed, 25 Aug 2021 14:25:08 -0700 (PDT) X-Gm-Message-State: AOAM533SxapwIDVmHjsJ+n3axOPZKVofqN8Ot/ltT3iPZlJvgT0DFBp1 yMGmI6r1gL4qfBfylkhnz6jVojJHiJOoOoCoJgI= X-Received: by 2002:a05:6000:188d:: with SMTP id a13mr178744wri.99.1629926708563; Wed, 25 Aug 2021 14:25:08 -0700 (PDT) MIME-Version: 1.0 References: <20210825205041.927788-1-vladimir.oltean@nxp.com> <20210825205041.927788-3-vladimir.oltean@nxp.com> In-Reply-To: <20210825205041.927788-3-vladimir.oltean@nxp.com> From: Arnd Bergmann Date: Wed, 25 Aug 2021 23:24:52 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] mfd: syscon: request a regmap with raw spinlocks for some devices To: Vladimir Oltean Cc: Mark Brown , Rasmus Villemoes , Lee Jones , Arnd Bergmann , Thomas Gleixner , Marc Zyngier , Hou Zhiqiang , Biwen Li , Greg Kroah-Hartman , "Rafael J. Wysocki" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:16WoTw5KqwMVF0YunEfB1oegZEDxI50eglQaeJxkv3tEg0BVcXY cSjFejjKRR2m7EcDDVhBol6aS+Zs8mZcAo2/o8SvAiZzqVrkdNEM8RkTz5Ngedl0ezTbL+b 8HXolDaEzRD1k0DwPlGAZ9t5ge7WwV9/YoVn8mHv4bJ2QNpZSnlEgmiUEWhW8ms0+PUoNBm +Tq80iJJN4xCosZCNkLCw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:cnP1+K8iRL0=:SEWCW4k5ZipyG96Tq7a3eC NeUh9+OMH0sKQQdS4G+5cm0XDgU+RYa7/d9zIDV5rf2rc22eyJbJeiYWwfwAVJW1OuEFtmJ4X SXmf6QX+T2cJSkqbBmmqkm6z3vZIrCAnj8cnx2qHoC9x2jYPAHERJkfZNQeXJd46WX/4vbgE/ GvviNXtqNe0Mj3z4kGzwUsYPreZnw0lr2xNDH1nl+F75PTJs2nkc7lrKYa5rWhXlb8W5ZgXJ+ 4dvfuptQYyMKDtX26QrVIKVHj132IjnrM+lDV+KyvSczY3ZaA721FogJZ6VnESEJYQn77ms0C dei368o/N2BdgE0giWfJsFrn/kdV4IO/EzH76XMUC4VmexiWjNVhh6mvj0O2EbN501x6FM9Dw 3iGTIt1ATAeCxve/oxNAqmHT+lcb28Nwc2hcwogF4F9t/gQk7yxwk2xojcb78o4TJ0uU5/yzV NlpoisyvkTnFa00KjYRySB3LjMUkaOr/n/ZYsyOxdeiFe53miV22BtGWl1XhE0Pt6ekjyeu1C Ygo/SjP5mXgmi7mftDl39JRC2R0heQC9BNM6P4ZHGCIxDjvjIdpbp5CtHxSTjUsmY5dFuYmPG G1uL1jLHiSQNjDWkyyuqirxrmg0Rr+qNfOtzLh+2bGA/4Ys/P2art2XnbjEtPDqgKR31qBkvQ 8KWpUC1v6XKYzQe2tlngLpljBkUcQIVmi6wKGvNuDUNgFfEQc5lVo09UsbAejunxDdIIa8CKw h6OigjpGqkGtyOGXe5Vee6DfSmC43FSVlMA+zsGldITui1s1opGZ910WKi8XY1lzfNlCa9wQ/ q2mLxq1JcITVeqpZ7RNyrjbDAtyZr2Sq34vHyPrh1zMd96KEwK8lOoovkKQg/5B/NmnA1/avE 3PhBc4V8PhE7VmRRhutg== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 25, 2021 at 10:50 PM Vladimir Oltean wrote: > > This patch solves a ls-extirq irqchip driver bug in a perhaps > non-intuitive (at least non-localized) way. > > The issue is that ls-extirq uses regmap, and due to the fact that it is > being called by the IRQ core under raw spinlock context, it needs to use > raw spinlocks itself. So it needs to request raw spinlocks from the > regmap config. > > All is fine so far, except the ls-extirq driver does not manage its own > regmap, instead it uses syscon_node_to_regmap() to get it from the > parent syscon (this driver). > > Because the syscon regmap is initialized before any of the consumer > drivers (ls-extirq) probe, we need to know beforehand whether to request > raw spinlocks or not. > > The solution seems to be to check some compatible string. The ls-extirq > driver probes on quite a few NXP Layerscape SoCs, all with different > compatible strings. This is potentially fragile and subject to bit rot > (since the fix is not localized to the ls-extirq driver, adding new > compatible strings there but not here seems plausible). Anyway, it is > probably the best we can do without major rework. > > Suggested-by: Mark Brown > Signed-off-by: Vladimir Oltean This should work, but how hard would it be to change the ls-extirq driver instead to not use the syscon driver at all but make the extirq driver set up the regmap itself? Are there any other users of the syscon? Arnd