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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 2C159C433DF for ; Fri, 12 Jun 2020 10:21:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DB5892081A for ; Fri, 12 Jun 2020 10:21:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591957295; bh=tpzlq4rZc+tZKZjNYxCpc8hi6Wzy3Os1tfa8kmtPiew=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=tDf1uBqbPZ3fGplkFXTgNmZ6VYf39HpAOfbl5gcGJY1lrE1rHAf/m7vVRL6DSC3cH P098Far360LgsXyE1OAFvN9vIr90bvYKWkcLHm9hjdFvk/YxazzxYfIvstGEjylpqX ZluM/RwcEfzAQXUqbhCT/INsyNgQ0SL1DC3ceaOw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726024AbgFLKV2 (ORCPT ); Fri, 12 Jun 2020 06:21:28 -0400 Received: from mail-ej1-f67.google.com ([209.85.218.67]:32792 "EHLO mail-ej1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbgFLKVS (ORCPT ); Fri, 12 Jun 2020 06:21:18 -0400 Received: by mail-ej1-f67.google.com with SMTP id n24so9597501ejd.0; Fri, 12 Jun 2020 03:21:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=UCmnkQ+7r4Yl/XA1DWNILW2Cx3UCtYcdqwjb2/DioLQ=; b=mD1pqe16Ipvj13XKi+L6puzVnNsydwHvj2mShUC1LP7O7rpujc3NPfkyTu/ai9Q36Z 4K9Y5dOzQm9ARVstVW4TVFnTzbluZuuFh4bqL+PhRki24UwjrE9+cYC06eLfOqTRYoOg wwvJdjjmu2FKGe7RevBWw4qVloBg5SNwm69jLgfnoz8FItCBOmQkCwb0M0309BCfa3fM PSLu3CGI7ftK9S13AfTOYqKEWg97GPpuR0wKuM8SuM8CaHG1oTazE3P35Cld90+K1Y3p LurczdAsYM/8aY4y/gwh7cmWVZdqD9gsBVM1zDzeYjX6B7pLxVd6Efn5NaNrYlT5XIaN oZNA== X-Gm-Message-State: AOAM5331XfNb2iMkxPAsTnfkMUe5HeVVgJYvZuJTH4pbVmKbBkLPtaIx n+gItteF3MTsN9vz2ES2Vxs= X-Google-Smtp-Source: ABdhPJzJ6RaY0eAM4hGkuYlc3SLJUwUFh4TiDwD8FMRxFmZkjqZLgmm7NPWi924xDJTeY04nohakWQ== X-Received: by 2002:a17:906:c2c6:: with SMTP id ch6mr12273554ejb.36.1591957276099; Fri, 12 Jun 2020 03:21:16 -0700 (PDT) Received: from pi3 ([194.230.155.184]) by smtp.googlemail.com with ESMTPSA id ws10sm3227738ejb.24.2020.06.12.03.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 03:21:15 -0700 (PDT) Date: Fri, 12 Jun 2020 12:21:13 +0200 From: Krzysztof Kozlowski To: Wolfram Sang Cc: Oleksij Rempel , Pengutronix Kernel Team , Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] i2c: imx: Fix external abort on early interrupt Message-ID: <20200612102113.GA26056@pi3> References: <1591796802-23504-1-git-send-email-krzk@kernel.org> <20200612090517.GA3030@ninjato> <20200612092941.GA25990@pi3> <20200612095604.GA17763@ninjato> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200612095604.GA17763@ninjato> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org On Fri, Jun 12, 2020 at 11:56:04AM +0200, Wolfram Sang wrote: > On Fri, Jun 12, 2020 at 11:29:41AM +0200, Krzysztof Kozlowski wrote: > > On Fri, Jun 12, 2020 at 11:05:17AM +0200, Wolfram Sang wrote: > > > On Wed, Jun 10, 2020 at 03:46:42PM +0200, Krzysztof Kozlowski wrote: > > > > If interrupt comes early (could be triggered with CONFIG_DEBUG_SHIRQ), > > > > > > That code is disabled since 2011 (6d83f94db95c ("genirq: Disable the > > > SHIRQ_DEBUG call in request_threaded_irq for now"))? So, you had this > > > without fake injection, I assume? > > > > No, I observed it only after enabling DEBUG_SHIRQ (to a kernel with > > some debugging options already). > > Interesting. Maybe probe was deferred and you got the extra irq when > deregistering? Yes, good catch. The abort happens right after deferred probe exit. It could be then different reason than I thought - the interrupt is freed through devm infrastructure quite late. At this time, the clock might be indeed disabled (error path of probe()). Best regards, Krzysztof 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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 81956C433E0 for ; Fri, 12 Jun 2020 10:21:26 +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 4A5B920792 for ; Fri, 12 Jun 2020 10:21:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="m/JfIHai" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A5B920792 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cBV/ntE2OkWw95QlLAukiCiCK49Td74xHRGNdbSjfog=; b=m/JfIHaixmC6Kr yu0yX9F7BRu61FvLcK7pwX3IzMsSi/X3gp/iYQdixfOa+XjlQMggC0mqa8pP13U3V8V9TH0dT2Xom WKmg7GKH42Y3WFX4ZlWsvYw7a1zql9NOQIkI40Gs75H8ZoGDk7QqrGngoWS93AHTFhY8rleeGFC5l 0r6ei2KCOf9g1VYh1+w8D3lGU3TAks+CO513uewqYN5Tz0siQ6r/FEpwyacqtUQhMae7x0fK0bdhW DfkuUZxXVi/D0p15AcM7sj9q9X6YiwzYNk8bK+N3xq5znxGf4d+KxwcLM6f/h0858s+EfKaan0CmH j0bXTa+SFKyu0ZDO7rTA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jjgoK-0005br-Vz; Fri, 12 Jun 2020 10:21:20 +0000 Received: from mail-ej1-f65.google.com ([209.85.218.65]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jjgoI-0005bO-Cl for linux-arm-kernel@lists.infradead.org; Fri, 12 Jun 2020 10:21:19 +0000 Received: by mail-ej1-f65.google.com with SMTP id gl26so9530775ejb.11 for ; Fri, 12 Jun 2020 03:21:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=UCmnkQ+7r4Yl/XA1DWNILW2Cx3UCtYcdqwjb2/DioLQ=; b=XWgS9IfTCLmrpY9VYkPELlfe+t5zDOZjlTEXxelCYdXsu4/nn11QqPY1l0YbNmvVNZ 10IVxS6AAGbH4D20TEORItiJW32QwrXQv3XdTQpe8jiuVYHB/IKldDdGWYIN75kyRwlg gOS8GGouFxt3+nAQxwbF29Fm7PuuPWq79WORuUSuAdUAZN/O7U2bhnWftyk6AEh606zB L1+fTCc07jpQ10aIJPkPCSAtu7e4zIVPXSax6eXoBxYQwyjDxtyevNPggEshJ89G7F7m V8Ms9i7jx6HRsihUIpXf82F1AZKg9IHt7Jeik8/l5/HoZZ3nFpLPFBT8m0JMT8Tm/Iay /oXA== X-Gm-Message-State: AOAM532KeGABf7rSKlH+8YCSBKwNj2qk2blO/T+ds53JPghyFBPBtJPb xxkPjhIfgvRn8OzmXxNYGcY= X-Google-Smtp-Source: ABdhPJzJ6RaY0eAM4hGkuYlc3SLJUwUFh4TiDwD8FMRxFmZkjqZLgmm7NPWi924xDJTeY04nohakWQ== X-Received: by 2002:a17:906:c2c6:: with SMTP id ch6mr12273554ejb.36.1591957276099; Fri, 12 Jun 2020 03:21:16 -0700 (PDT) Received: from pi3 ([194.230.155.184]) by smtp.googlemail.com with ESMTPSA id ws10sm3227738ejb.24.2020.06.12.03.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 03:21:15 -0700 (PDT) Date: Fri, 12 Jun 2020 12:21:13 +0200 From: Krzysztof Kozlowski To: Wolfram Sang Subject: Re: [PATCH] i2c: imx: Fix external abort on early interrupt Message-ID: <20200612102113.GA26056@pi3> References: <1591796802-23504-1-git-send-email-krzk@kernel.org> <20200612090517.GA3030@ninjato> <20200612092941.GA25990@pi3> <20200612095604.GA17763@ninjato> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200612095604.GA17763@ninjato> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200612_032118_430982_8BC595BF X-CRM114-Status: GOOD ( 12.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Shawn Guo , Sascha Hauer , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Oleksij Rempel , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jun 12, 2020 at 11:56:04AM +0200, Wolfram Sang wrote: > On Fri, Jun 12, 2020 at 11:29:41AM +0200, Krzysztof Kozlowski wrote: > > On Fri, Jun 12, 2020 at 11:05:17AM +0200, Wolfram Sang wrote: > > > On Wed, Jun 10, 2020 at 03:46:42PM +0200, Krzysztof Kozlowski wrote: > > > > If interrupt comes early (could be triggered with CONFIG_DEBUG_SHIRQ), > > > > > > That code is disabled since 2011 (6d83f94db95c ("genirq: Disable the > > > SHIRQ_DEBUG call in request_threaded_irq for now"))? So, you had this > > > without fake injection, I assume? > > > > No, I observed it only after enabling DEBUG_SHIRQ (to a kernel with > > some debugging options already). > > Interesting. Maybe probe was deferred and you got the extra irq when > deregistering? Yes, good catch. The abort happens right after deferred probe exit. It could be then different reason than I thought - the interrupt is freed through devm infrastructure quite late. At this time, the clock might be indeed disabled (error path of probe()). Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel