Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1413419rdb; Fri, 16 Feb 2024 15:30:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWqLFlwWNaPtvyPG8hAeAKQAwAkS7w6qUwxuC8s6HXT4uB6WhI/388gEiq5XICxeazCGgNFxR4nY4CFD3pKoQCoaEB8dGpuWfQ83ejXEQ== X-Google-Smtp-Source: AGHT+IGH+9xR8DcmnyMQ8eDn1mkahhuOPZynNizrvRUshzZynwMXTHMsNTPXw77CfwnxTSZN4c2d X-Received: by 2002:a05:6870:3282:b0:21e:5f83:e695 with SMTP id q2-20020a056870328200b0021e5f83e695mr4108170oac.9.1708126234715; Fri, 16 Feb 2024 15:30:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708126234; cv=pass; d=google.com; s=arc-20160816; b=0UfOX0B0ncwAm+Pm+Ctp1N+hoB87gEBONnhR46GY4oJoCZe8vU4yWECchCqz+zAIRL GUOKNbPQ5TlPOK+75ZXVlr2sm52l3qGKeZiEqs6hTVkrjd39z29KiGW7HyYFpEKdJs3x Bzv2JORWYs59c+oOLXK5O5UIS2p80YyeQNN6yMmWYE8wR3pZPs3JNU77uuHBL7dHwVqT Zj/7WIDTGmejB2W1+M5tMvnuBSVKYZDjGLWN1EMSWbgB2aA1oT1QYdfRRfJ7tyWQPN7S 4kSxB/eobC1V8h95gKZ/whmWL6SioTGyZ4fmeyKa4nJ/NPUE2mzH2/JnW0EbUtBkvbIg eFIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=E0rm8oJW/XJYG6K14YhQ3ephozjzMlAvikt0W/eKgk8=; fh=6GUBHnN74oex89M2HUnkhsMjK43fmciE7hXMIiFMgPk=; b=fhsENOBndwpG/oIWDp+kl7wgM2yqA9UL+/i7Lgi6sQQedUB0BAcF2piwLj0yipR8UT +fm6an+oZGzmIKs9ix4Gm37WQqUQpVXpuER8EWhULABWm0otFnGAwpWT97so/rnYQdHN nbChNHbD8SUw/cyxyOUM41Brsu99ptTxMYZ4rmSYcPk99PNcIGVnRixC/Tujt4zSUv5a rdOKSfloQkHJ/gN2pVb9j2dEEQnWG8FARgjVKOtuVt7VNHSJw1EWYhEFtI0aBE9yF5BM z+jQqDmeV3LeMsdCjCuw++N2AaEAaf8RNHj0f53a/kdwFmyWC6sZ3Fthpm/C7TvVXRJt wvXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=V2bFIjdJ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-69482-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69482-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d16-20020a637350000000b005dc4da21214si571002pgn.249.2024.02.16.15.30.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 15:30:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69482-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=V2bFIjdJ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-69482-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69482-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C57E4287263 for ; Fri, 16 Feb 2024 23:30:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F43B39856; Fri, 16 Feb 2024 23:30:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="V2bFIjdJ" Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A2411487D6; Fri, 16 Feb 2024 23:30:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708126210; cv=none; b=KubILkXCcJrBr3eC0lZKrnE33k/7FJdWAgvNVk01G3JNbEAy/L0dUXSYBa3GotFgnKYygUCdL951iZIAE2NKltUrp3uBJhrGYBqy2bVFhdGgKiil3qhmv31fD2VdO34Z685deDM6wDMsZsrMALazcvCoOhTzemDECpoctPXW1w0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708126210; c=relaxed/simple; bh=FMVWaPEG1nX3jE+CDbdrHVeNP4wVjb/A2lK/tKqysmw=; h=MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; b=Q3be95nbKAz2Nw+CjaQtTUgYADQRkThEg4GwOq4xwPEaYJdQ0YqZVE8BV3crADPnRjg9TSngVm9mOLAvh98V6BrQKrt0k1ozQYi4rS6mRgLzrnZGApRIQEgNdhM3pr+MkcoP2bdCa8s+Ew8vhS4Rcfq1v48MZAMpjU5gLu82l8E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=V2bFIjdJ; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1d7232dcb3eso9868805ad.2; Fri, 16 Feb 2024 15:30:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708126208; x=1708731008; darn=vger.kernel.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=E0rm8oJW/XJYG6K14YhQ3ephozjzMlAvikt0W/eKgk8=; b=V2bFIjdJXTa82sy5ct7qxx7308kt/RBCmvKSccHePrVK3wUjn4OSMoDSctQlz6snHD gtncmo/z6AtdSucc3+EdDMq3fWJ3lXkO33HJbzH8KBP0KwTvLWvj4kgdZ1e2dCQQJDdH 6rKvduHIQS+hzTOFCfD37y7DbBKb24s3K06/gdLwKrp5n2dCmSmJjJS/lUGSN9loAKmX MTvQyf9I9hO8rsOvefu3mMyN7Pc2P+jqcJ6xaOM60Yf3brvURdNFQDVxxdQ9YGAhn0j6 iDu6aewjTaULiwxJSLdIChROpsq7cVyuc/jmjz8z6AuPOCFP3KfCwaDKd18louUq6rAi R1+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708126208; x=1708731008; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=E0rm8oJW/XJYG6K14YhQ3ephozjzMlAvikt0W/eKgk8=; b=ALek6IdXzS5ngz3PgRTJ5LsUFyF3qEZEHlnMNc5QYHr9zk2aCTk/Dl40Fu6Urh2s/x W3z8ztM3yAhX9qFQox026hClj/kmDU95BWKePsBoFxCrz7AzQdACPedcseNoKDqHBeBy kBBW7h7zqCc2qlKpJSgWbHmksqBo0xW+A7RvM0Vr5RRimJTD6xWEV/WZXkwut96P/ylf 2B2Ulsyw5KYNyvKnYRyxNJQfn24NldYUpWpxyE7lN4tJJvwgH3JIJZyFBs0kLojAouKS F0fOAYpVEfynsW0lJ3YEK0Vb8o2/7gXiXs7tssGBsfWdKOra7ouBHilS8PHHuiRX9t7K C2gw== X-Forwarded-Encrypted: i=1; AJvYcCVoqmSwqguPSNoNoH/x1vwrcjR4ji3LGkZnFi2bedmEZBq0wB2SrQu9ygrWqtKItuWvrh8NeybnQlRGBRLfJMgRYr7cvzcu4Nv1jDI+ X-Gm-Message-State: AOJu0YzoPClki+EGYJ3aC4hBkMQAritJpsX3b29DNHzM87Y5OKnMh54Q A2ZeIgvBKTRj2xCErR34Gd8SsfRz3Z571CCDfooX0L3QBwnv+yx7pjYCTJN9a6hOUUfqoc4indo JdZufU9+yeZ5/gcgtL4DvY+Qicj5g4CVATqU= X-Received: by 2002:a17:90a:ce8c:b0:299:56ee:6946 with SMTP id g12-20020a17090ace8c00b0029956ee6946mr165826pju.32.1708126208110; Fri, 16 Feb 2024 15:30:08 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: noman pouigt Date: Fri, 16 Feb 2024 15:29:56 -0800 Message-ID: Subject: Audio dsp recovery using remoteproc To: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Content-Type: text/plain; charset="UTF-8" mailbox to dsp_1 is currently modeling platform pcm driver. mailbox to dsp_2 is also doing the same. Platform driver callbacks cause IPC to be sent to dsp's. Lifecycle of two dsp's are managed by separate remoteproc drivers. Single sound card is exposed. Separate watchdog interrupts from the corresponding dsp's are connected to remoteproc to manage crashing of the individual dsp's. How can I restart both the dsp when either of them crashes using the kernel device model? Remoteproc driver currently only restarts the crashed dsp instead of restarting both the dsp. It is needed to bring up the hardware in a consistent state as both the dsp's are connected to a common hardware. I thought of making a virtual parent remoteproc device and then managing individual dsp as a subdevice of that parent device but remoteproc device node is associated with the individual elf file i.e. it can manage only a single dsp. How can I model remoteproc drivers using linux device model so that when either of them crashes both the dsp's get reloaded by the remoteproc framework. MailBox ---- DSP_1 --- | | Linux ------ common_hw -> speaker/mic | | MailBox ---- DSP_2 ---