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 X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E249C11F66 for ; Wed, 30 Jun 2021 22:12:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E739D6141A for ; Wed, 30 Jun 2021 22:12:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E739D6141A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=lREj52bHO2nga7A90W1VnmaBSmACGJrneHDSc4UnmZM=; b=1RcAFYyQwM69ZUw3JJC102V+y2 jLmAAVbM25iwvcGGYTT4N4uws/88IBaKNG6H3NtSisk/wYJ5YypEqTzpgP6ya/m0ezFGVsU4aNlVe BxVE1StlHAlOy4zDRGuBAvnIRAoKwyvnYQeEstzK5rrRfKuwTUjGqce9VJWl+BbQXyg8yXwYUG6pL EA3vUXI46DlYsFQfp9Q3mVKuvs3gKlsN0S7H7VfG4fUJHFT1cz3C/h5fw+omk4KHRz7wm3SrBbxt9 oGHwGCd9g/Fc8qZFjwvcQXMevfJZ/0MFpVVOzh9pMDbhk788njf98DwcfX045oRD9TVefr/0Hkimt vnG4olKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyiPI-00FMNt-Cw; Wed, 30 Jun 2021 22:10:08 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyiPF-00FMN3-2X for linux-arm-kernel@lists.infradead.org; Wed, 30 Jun 2021 22:10:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625091002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ReCbrtMP/cxLMRe/lZJL4GXF42nMx1vpMXEPSI0hvQ=; b=KAkRhiD8lqEvL133a/SsRTuJ3V3X6QTJbHgZDmSbP5Fo4A9hp4Rg8tb+AximmvOuFzsUrH XVggwiAQVukZO+7MhQJ/1ceKftRhCprdXfPu1UecDbuC8RWTrt7HPooQ6XTcK5F5rjmohq haIbDGgRzphVCvhpPbVn3gi026jO7JE= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-149-c4iuUYEoP8aoSgotPVqgwQ-1; Wed, 30 Jun 2021 18:10:01 -0400 X-MC-Unique: c4iuUYEoP8aoSgotPVqgwQ-1 Received: by mail-wm1-f72.google.com with SMTP id z127-20020a1c7e850000b02901e46e4d52c0so3555850wmc.6 for ; Wed, 30 Jun 2021 15:10:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2ReCbrtMP/cxLMRe/lZJL4GXF42nMx1vpMXEPSI0hvQ=; b=Spy4iWSgoAKErf/7ujG96DA5tGYAhxHj9sNvd2bP0ifLYbIIQ8AnnsouBas+3yOpM6 ZakHEvEpDGcZY6NFqquEOwsASm6+RT0HurS68Ig/PEizo/kXL6dvTKGY1r14EY2hejIm YqqIDJxoHLnfmMLeznrLzVJGcs3sfiAgpMNXO8HfFaGfHn3LNmlBwZjhTiDLgKI2j9LS Q56XMQRVbMSsF6JGN8hsB7j8goB+HzsdTsJ83VfQTpV5NgSAaN43S5uf7uLersjx9bp8 EBr9jAsLFCqf+ZNLe7U0+EUUyntb7OymG5Jn86D6dcN4DhJfTYk/2VfDVgx9Jn/8Dkfn HTww== X-Gm-Message-State: AOAM531pwdrTsdrxVguF3jRiobiVBtl61sH9QWIoiqTvFgrqnMYI7P5V HDZr4Vwas8y83AZpY2ckpTIllKIbDbYURYtN1AWwF/xjQAfle6yIWZHK6UZY92BNvu8nyXHm50v jrTO7S9ODMkFN8GZdFI8f349HVJ4aM9WJrfY= X-Received: by 2002:a7b:cf3a:: with SMTP id m26mr16882660wmg.117.1625091000146; Wed, 30 Jun 2021 15:10:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlU5TtFXVLyohpWwUCLVR70qKXp8D+c6+g8CDe44j7e9CNHSYRynn3Hnx7Cwjxfz20NWN+Rw== X-Received: by 2002:a7b:cf3a:: with SMTP id m26mr16882631wmg.117.1625090999901; Wed, 30 Jun 2021 15:09:59 -0700 (PDT) Received: from [192.168.1.101] ([92.176.231.106]) by smtp.gmail.com with ESMTPSA id d17sm9611715wro.93.2021.06.30.15.09.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Jun 2021 15:09:59 -0700 (PDT) Subject: Re: [PATCH v2] PCI: rockchip: Avoid accessing PCIe registers with clocks gated To: Bjorn Helgaas Cc: linux-kernel@vger.kernel.org, Peter Robinson , Shawn Lin , Bjorn Helgaas , Heiko Stuebner , Lorenzo Pieralisi , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, Michal Simek , Jingoo Han , Thierry Reding , Jonathan Hunter , linux-tegra@vger.kernel.org References: <20210630203030.GA4178852@bjorn-Precision-5520> From: Javier Martinez Canillas Message-ID: <51276875-658e-e6fe-5433-b5d795b253ff@redhat.com> Date: Thu, 1 Jul 2021 00:09:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210630203030.GA4178852@bjorn-Precision-5520> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=javierm@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210630_151005_301078_2C73BE95 X-CRM114-Status: GOOD ( 19.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 6/30/21 10:30 PM, Bjorn Helgaas wrote: > On Wed, Jun 30, 2021 at 09:59:58PM +0200, Javier Martinez Canillas wrote: [snip] >> >> But maybe you can also add a paragraph that mentions the CONFIG_DEBUG_SHIRQ >> option and shared interrupts? That way, other driver authors could know that >> by enabling this an underlying problem might be exposed for them to fix. > > Good idea, thanks! I added this; is it something like what you had in > mind? > Thanks a lot for doing this rewording. I just have a small nit for the text. > Found by enabling CONFIG_DEBUG_SHIRQ, which calls the IRQ handler when it > is being unregistered. An error during the probe path might cause this > unregistration and IRQ handler execution before the device or data > structure init has finished. > The IRQ handler is not called when unregistered, but it is called when another handler for the shared IRQ is unregistered. In this particular driver, both a "pcie-sys" and "pcie-client" handlers are registered, then an error leads to "pcie-sys" being unregistered and the handler for "pcie-client" being called. So maybe the following instead? Found by enabling CONFIG_DEBUG_SHIRQ, which calls the IRQ handlers when a handler for the shared IRQ is unregistered. An error during the probe path might cause this unregistration and handler execution before the device or data structure init has finished. Best regards, -- Javier Martinez Canillas Software Engineer New Platform Technologies Enablement team RHEL Engineering _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel