Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3197850lqo; Tue, 21 May 2024 09:24:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWr0P8oj029WrnQWxlB6/n3bSaJPCetT8pM4/ab9KeKuGcxPGbLvnMvW/k98/qWoT15irvsiAxHgrS+nCX59IxFaOKcRShqCBhuM/DTnQ== X-Google-Smtp-Source: AGHT+IEwk5ukARwNZTmj+NWLFEeAQBQi/v+h5Vfa7H5TazJW6GxLR6ezkJlMXtGKL9ejlS8TJ2k9 X-Received: by 2002:a50:9b0d:0:b0:572:a4eb:6678 with SMTP id 4fb4d7f45d1cf-5752b4e2b0fmr8782270a12.19.1716308673761; Tue, 21 May 2024 09:24:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716308673; cv=pass; d=google.com; s=arc-20160816; b=s0s4YjyaNLm+VLtFiB4wjagiwPRG5pXGaaRSo3mUCOjj/ev7QPW8P1Zu8nbbo3lmGm G1Yiq1csxOENHNQgamljCzNZl1nWFI067bh5jXrz76L3Firm/C1ka1ILa/lrb3ijWvam W5iL4a7jkjh73dnbSBOIKotroeWgiL/fKSHcUIh8kB/bcluK/jSE8B7zT6Y7TE4U6ROt CNDyDIbaHRtJimXi8BACF6CxSGxIaYwiPPYzpLOuSuxZWoxdX0RUJCRnma8OAQ0CFpyZ J4GfEqLUGdaMtOPUiijJOlTWBy1GmaufMUTHTN121llZXd9MUAi8NbhAwe0JWtTBxJhd NeFQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=NqC2Z7uc3q/WlEKnSoaFIEs4EfwdkefIzuUpW2dO1iw=; fh=ASW7BNyMs6a0pJXZOogkuEH3QshCk8lbW1XyhHhUsH4=; b=NJXOo8RHP4ZtLcY1xtAdgTjMdTJdPzmMo3AsFHJ+gE/o6MAB7pxcvwihPsXOBpOldV cIXMBdeCG240X+Hoa0wnUzZ++a/NofvpECeHxVcRlrD8bUYZe+1V79+Lu38lXttDlB4C EnvuvouQaVBaASmCLq38S1Meebd9cM8zmwpUUfOM19GOBhKTToBW2LgEMRnRG9fF4fCZ J6EksZf5cFLNHw8ZkGB9CKD80d1O77bjxjAtl6xxfwuPCMSjModbi7KVK4VDLZvHvji3 48KmDBl61MngbcX5CakV1I84/ofBAcaD1439oJrHVdIG1tW7GQbSlraBDUMJSHc7J33Y GxBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=wnmeCwMY; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-185212-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185212-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c2e3e81si14756411a12.210.2024.05.21.09.24.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 09:24:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185212-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=wnmeCwMY; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-185212-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185212-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 795BE1F225FA for ; Tue, 21 May 2024 16:24:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7CB625569; Tue, 21 May 2024 16:24:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="wnmeCwMY" Received: from mx08-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89D8B1CD1F; Tue, 21 May 2024 16:24:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716308666; cv=none; b=aMzOx5V0rZ5DFmunACQiwg29+SRtGUjoP1pp68l7eF8rwrADUz9gMqkeXe0gq2wFlVDVU+ZZUvkuq+z+5o82U+McwZ/xVvojgWgCcp77fBExiOV5i4V/OqO+D2JTg/dxcQ3qBOWwfqZqtrI19CzWpAB/ff5cFyEb+NOScF8/liE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716308666; c=relaxed/simple; bh=r8UYuML328Rse1sl+1Cyo4/LmLgtLYzTHlziAkhudkQ=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Xtj2dvzJtJI8Tn7X9igP5P9L6JgZrc3meInglfdMPxFXJvD8qGcL1YXbauZ5x0e/6oUcbstv7w4cGikH8B4KHkOnwJLs9fpdEH7Ar75kL3yfDmJXBhhjQmo6SvvYw4dw9+y4tZKfs/7R4suH+Aq6xODOdL8bMcC9AlbzBrJQD5s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=wnmeCwMY; arc=none smtp.client-ip=91.207.212.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44LGIfkR011115; Tue, 21 May 2024 18:24:00 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=selector1; bh=NqC2Z7u c3q/WlEKnSoaFIEs4EfwdkefIzuUpW2dO1iw=; b=wnmeCwMYjWSjSmoTbH3DOl/ 8gX81tlwXNhmKI4w6BTHwUtqNVIMf9i0jryQZAYT4nNED2JZH35WV081KDXw1vvd MDa8DUbZGgTzftUUhcFXeVnRxFImGyuEf2QZ0KFyxZGrn3IdKuFn3hRiQvZ+kr9M sUY0NPCckAC1gHwbFyAlxUHh1tsVC3S6M01j/6NoLzdgp0ZUH+mYZuvOxVlWEjZU MkdH6BOJMeS3/rdHGa9BmRKsO4Ob8x8ehs3LFtY4ghaSwJucila1IdIQ914d0LhU pSx74//U/krIrGWOdtMMN/lzrhNHXRvZ2YGieEk29nlN6ZxgD3gOy3eLvw2sM9A= = Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3y8vqh8n6u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 May 2024 18:23:59 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id CE2174002D; Tue, 21 May 2024 18:23:54 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id DD1602258A8; Tue, 21 May 2024 18:23:31 +0200 (CEST) Received: from localhost (10.48.86.146) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 21 May 2024 18:23:31 +0200 From: Gwenael Treuveur To: Bjorn Andersson , Mathieu Poirier CC: , , , Arnaud Pouliquen , Gwenael Treuveur Subject: [PATCH] remoteproc: stm32_rproc: Fix mailbox interrupts queuing Date: Tue, 21 May 2024 18:23:16 +0200 Message-ID: <20240521162316.156259-1-gwenael.treuveur@foss.st.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-21_10,2024-05-21_01,2024-05-17_01 Manage interrupt coming from coprocessor also when state is ATTACHED. Fixes: 35bdafda40cc ("remoteproc: stm32_rproc: Add mutex protection for workqueue") Signed-off-by: Gwenael Treuveur Acked-by: Arnaud Pouliquen --- drivers/remoteproc/stm32_rproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index 88623df7d0c3..8c7f7950b80e 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -294,7 +294,7 @@ static void stm32_rproc_mb_vq_work(struct work_struct *work) mutex_lock(&rproc->lock); - if (rproc->state != RPROC_RUNNING) + if (rproc->state != RPROC_RUNNING && rproc->state != RPROC_ATTACHED) goto unlock_mutex; if (rproc_vq_interrupt(rproc, mb->vq_id) == IRQ_NONE) base-commit: 4d5ba6ead1dc9fa298d727e92db40cd98564d1ac -- 2.25.1