Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp951202pxu; Wed, 7 Oct 2020 22:18:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyu6I8PWz9U+58etyHsB7TRvxA2KX6uSeylZh9snR9GGkRP1/IEQ6uH8vtqQPm/pVvNw2Vp X-Received: by 2002:a17:906:af75:: with SMTP id os21mr6831920ejb.28.1602134336503; Wed, 07 Oct 2020 22:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602134336; cv=none; d=google.com; s=arc-20160816; b=G06yXpm/yib21vmUSpMRXyPR1H90FpmN2JhD/t6w1u1K4xEsWvPWIkKWawonFlEMJt Z+gyy5TTbfpQTgVi0JwyxTeLpHzo4zMDzVPzoA69YsYpfsi12Zpm5MimiiHTNs0+HzkB /HkpvehjwrfCAxeRGPKAdRl6t7nrxK4oPw3PywGlANIW2oro8V2vaCHlAGhpzMk99kSC GXZq2j+REYphp4FLsaMtzP3XFc2hNrq2wMETalxBmcHR508DDwfXrf77OiCbZcgtZe5Q CddOlmGfs5ADv+M04SIfOva4OtmdenDLxNWknS75x5dY+WHi233kZ2TlLd7KaIZQ8Cyl mKqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=DGXqI+4Sh6rs8urwhC133dx8DNmlAjYdeCRk7jyHfZg=; b=EkWRHZQbyHAMVp4rta5d015hYFyB8JdPYnKsXRVeV8o2fid+czyn1W3+UL+8BfjNtc +ttGq42TlZpwsEPesmyA1D9XF1RRgSk0fzhS0Me3RU+qGPUK4R1ZeBXKd1feB7tTDzlq kWhBd6+n9tdGRB27SU+5FJGf4NIWOPL12/8zuHIHO7dh4hT8Ryg+z1kre7LMrM4RCBXZ 85GjUheLUIeIyUc3YW930tkkvTm9gaml7TyW0X2du+DgycbDpuV6WR+i1+J9NL4xmrGn o5LZQe7X9xHeLUG5h2Xdfgm4w33kWWYm2K5OHJihemRAfHVna3GRbiSy8MpCn2XchJ3E 08Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OfFdEtFh; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e8si3346343ejh.23.2020.10.07.22.18.33; Wed, 07 Oct 2020 22:18:56 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OfFdEtFh; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727857AbgJHFLS (ORCPT + 99 others); Thu, 8 Oct 2020 01:11:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726279AbgJHFLS (ORCPT ); Thu, 8 Oct 2020 01:11:18 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BDE5C061755; Wed, 7 Oct 2020 22:11:18 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id h6so3260658pgk.4; Wed, 07 Oct 2020 22:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=DGXqI+4Sh6rs8urwhC133dx8DNmlAjYdeCRk7jyHfZg=; b=OfFdEtFhTKkRCe5RhlJFEaguPGSub55q1j5ONalcOHYwpD35DWTogG8xfJy0GBysMo dxcYGiB8uyMdFWDnNUp7Hd1hPovvpAuxunu94srqIv0CH5Y6e48+RSphHQi8uqeyh8Da NR10jkXD0hVtDZjJIaqnPL+rlortGJ3JWWQUy4OcFaQj5dFCWB2MYVBCzgqh7XThOKLO XNUDKQBQ+/NmCUKSNM2WiorrxI9tZk3qOoqZxaHMhl/tTEx6ihRc1b8ABChignNYILSS RTfW+NoPm8MxlQ7BdzJigZFnU1+GryvjXu3yPndZip5zzdffGbaSC8zKCCstTDPilIbm viIA== 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-transfer-encoding :content-language; bh=DGXqI+4Sh6rs8urwhC133dx8DNmlAjYdeCRk7jyHfZg=; b=HicVhaozVc1jqGgFcqKjzPZjoaVYA5zXYlzApN3Fl27GNr6i+sZsjJzZXYlDdQjjLl OPYjexN470cUdj1TiyFdTTNkLGhLrK8Z89Bjsn52ABl8FtmUYdgJHyWySedVis6OQJYq 8f2YFVGrYaAYJe6ivr8BlzRAFrktJQNudCUSRxhoUSmOQ7QyR3QdK0oHkFLlsKfOT/jh u/ecJgTN1eM97il/CsmT036xVSTpurJQTFnIrJJnvIvD4SXcANESNLunDomxZocOAq0K cYjYYwvTNJbmwUuVHhVv8VE5wkobRiAFiV5I3Bi5fPZ172Qg0rD+jhp+5+/agMazWYhR zfiw== X-Gm-Message-State: AOAM533IZ9F/wO5ArBMOwek7OwA5bSSL4pLT6vbSK6crjouNHC1NzbWG EUoF8bF3O07h81PFK6zjtms= X-Received: by 2002:a17:90a:73c9:: with SMTP id n9mr6194715pjk.90.1602133877705; Wed, 07 Oct 2020 22:11:17 -0700 (PDT) Received: from ?IPv6:2402:b801:2840:8200:64bb:b626:4f99:bb54? ([2402:b801:2840:8200:64bb:b626:4f99:bb54]) by smtp.gmail.com with ESMTPSA id k7sm4643537pjs.9.2020.10.07.22.11.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Oct 2020 22:11:17 -0700 (PDT) Subject: Re: [PATCH] mmc: meson-gx: remove IRQF_ONESHOT To: Jerome Brunet , Thomas Gleixner , Ulf Hansson Cc: Kevin Hilman , "open list:ARM/Amlogic Meson..." , Linux Kernel Mailing List , "linux-mmc@vger.kernel.org" , Sebastian Andrzej Siewior , Marc Zyngier References: <87o8lf74j5.fsf@nanos.tec.linutronix.de> <1jy2ki1db4.fsf@starbuckisacylon.baylibre.com> From: Brad Harper Message-ID: Date: Thu, 8 Oct 2020 16:11:10 +1100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <1jy2ki1db4.fsf@starbuckisacylon.baylibre.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/10/2020 10:32 pm, Jerome Brunet wrote: > With arm64 defconfig on Khadas vim3, no obvious regression. Looks good. > > Tested-by: Jerome Brunet > > I did not test with RT. Brad, Could you let us know is Thomas's patch > works for you ? Thx There was a merge conflict in applying against v5.9-rc8-rt12 with particular this patch: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/kernel/irq/manage.c?h=linux-5.9.y-rt&id=18df00ef0b2b1513dc8f1a9ed26b11fff2261c30 I did manage to add the patch after attempting to resolve the conflict which solves the deadlock issue I am seeing with mmc and works fine during testing (a kernel compilation on preempt_rt configured kernel). irq_thread in /kernel/irq/manage.c Looks like this (not 100% sure I should have placed the irq_finalize_oneshot before add_interrupt_randomness). Based on this I can provide Tested-by: Brad Harper --- static int irq_thread(void *data) {         struct callback_head on_exit_work;         struct irqaction *action = data;         struct irq_desc *desc = irq_to_desc(action->irq);         irqreturn_t (*handler_fn)(struct irq_desc *desc,                         struct irqaction *action);         if (force_irqthreads && test_bit(IRQTF_FORCED_THREAD, &action->thread_flags))                 handler_fn = irq_forced_thread_fn;         else                 handler_fn = irq_thread_fn;         init_task_work(&on_exit_work, irq_thread_dtor);         task_work_add(current, &on_exit_work, false);         irq_thread_check_affinity(desc, action);         while (!irq_wait_for_interrupt(action)) {                 irqreturn_t action_ret;                 irq_thread_check_affinity(desc, action);                 action_ret = handler_fn(desc, action);                 if (action_ret == IRQ_HANDLED)                         atomic_inc(&desc->threads_handled);                 if (action_ret == IRQ_WAKE_THREAD)                         irq_wake_secondary(desc, action);                 irq_finalize_oneshot(desc, action);                 if (IS_ENABLED(CONFIG_PREEMPT_RT)) {                        migrate_disable();                        add_interrupt_randomness(action->irq, 0,                                 desc->random_ip ^ (unsigned long) action);                        migrate_enable();                 }                 wake_threads_waitq(desc);         }         /*          * This is the regular exit path. __free_irq() is stopping the          * thread via kthread_stop() after calling          * synchronize_hardirq(). So neither IRQTF_RUNTHREAD nor the          * oneshot mask bit can be set.          */         task_work_cancel(current, irq_thread_dtor);         return 0; } ---