From patchwork Tue Feb 20 19:26:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 774290 Delivered-To: patch@linaro.org Received: by 2002:a5d:4943:0:b0:33b:4db1:f5b3 with SMTP id r3csp1820876wrs; Tue, 20 Feb 2024 11:28:39 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUoSYBWUjF66W40xAoLyORRCaCfjTatofK2TZ5AK0q/Ns07h8LFacYQ2/Fh/+RXVc7d/TtJz9T7AqkdRL6Ici2C X-Google-Smtp-Source: AGHT+IGkcQavxt67j7fCFOiT+KwvfgYJ5kqAg5Nqn9yr7d31qNT9yQNxScbAJgfW68KSjS+L/P0y X-Received: by 2002:a05:6830:3145:b0:6e4:640d:797f with SMTP id c5-20020a056830314500b006e4640d797fmr1794068ots.35.1708457319554; Tue, 20 Feb 2024 11:28:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708457319; cv=none; d=google.com; s=arc-20160816; b=UOQxqKC8OoTyOerQ9swilxvVTgl2HdhlZUg5eO+QTyqPNprra+5IQu06oowoSaSNN8 WcIpsEnsu9Gb+DC5qm6E9M66BUYv3hoXjAycSTB8auC03WWtb14MLXpV9VBIGYqby+iX snsA8LImXnbHorK1soXp46jyihyITPP82av1eNGaw6gtxGQfEhfmwrP3VMQjVcA20r93 QJnPtMrV8Jtp4gBiz2J2Zl673RqMSChjrZVxm1t7uJu+A6svSLdKy9QCO9ERTendx+M2 DIgLcvH43I+LgBUkWWhDGiTaYg+yCJR/wLTQgdKSuWy6FJhCjxr+NNzqRAzdRIxys5IB 2Q4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=klPLDuAVvcz01mju7wAUAL6HT5lr3iGXlqrlWFnxNvY=; fh=gWdwvapFCBy64EEWQ3+1o3ppMDrs/UbMYMOdTfatJbY=; b=McP5QiGb4gQCrR4kPbCli4Serrzk6lHrwT1pqzNkosP5ulya14Hzq4I7vt2Xk0gLRn Np+7ljYsX6Q4Ox620zA3o22sdfdOpH9yXd7OH/n26nY/9sV2wAGltU34FMt0XYIrEvAy loHw1IEeAnP0aCAr2LQ6UGNQsx47IEPu+J8y8r+YgiRDN/tkZS+a4LiZE1Xi2gp/WYxL lPFOURGkbE3BFv5cfZ5Ki+3aDq6u4+KUmnStwr8zF6qw6VQqpyHbTvcM8vS6PCSTX9ti yP03fdjW/RF6yXVfA37PcswgqkNKpUb9uN+H/suCEbW7eEL8JJEwESc25u4HIeGgUFkj mGVg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TShazIIJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o3-20020a05620a0d4300b0078728ec0793si7764061qkl.396.2024.02.20.11.28.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Feb 2024 11:28:39 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TShazIIJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcVlM-0006Wb-9z; Tue, 20 Feb 2024 14:26:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcVlH-0006TM-D5 for qemu-devel@nongnu.org; Tue, 20 Feb 2024 14:26:39 -0500 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rcVlA-0006WA-Sd for qemu-devel@nongnu.org; Tue, 20 Feb 2024 14:26:39 -0500 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2d2305589a2so40421881fa.1 for ; Tue, 20 Feb 2024 11:26:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708457189; x=1709061989; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=klPLDuAVvcz01mju7wAUAL6HT5lr3iGXlqrlWFnxNvY=; b=TShazIIJMvrIHiQtKzaRu/dFrPXLmZ5OrtougzjPstDA+u7unnUE/gs7Qq5qKvEMxn rersXui0DZKn2/rYjisBlgdCIqbOc+mHsDq45ODbYKsiQgVDzhHKQq+eUstGgvaMsLH+ qMQmj/PfzBJuhwUBskpBdTL4kkIdpS5pg+lrjGJx9BcKP9X/dRA/iPv7eRN0aQIxopBD Cw4pqibQSx4tNjApM3+Clui57sfz4KX+aI04O7HtZA6PC+BjMz3tOziFFz0SmEOsJrS+ PmBiupJw/GEBxH6/A36pQh5DiX+D3YneIHMGxNSihBBPoFcnpt3ldcNgL7ktIXXPxxQE 4rwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708457189; x=1709061989; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=klPLDuAVvcz01mju7wAUAL6HT5lr3iGXlqrlWFnxNvY=; b=ixwQSd+FmALeJZTHhihbd0s5D9Uw+mK7Ww62wnD/YPLVaowRWEK9vqpG9GtAzNVTz4 VVqLc20UVKxxkqhXkxxBnIkb5TgMtzWwysC6hB3xAq+P6f6dy8KCs3XCLV+htOAkrgY9 N0Fvmxen5A+4J7lYy9jwpWb+wxy+CaqiMkz+W7z3rtGIK2WheSnzz+RJgNe8N6nZ0fzr h4r852V/elM1o/0qeTbqUoFCr3fK+HlV3JBpzmbAGtVnTsDHhVM5f1VBTuEaJAoAO6WI S2BZFkC7idQ0B10vHKUkHLCOce3etCLj0ZMY6X/fW0Ma+9J472FH+8ZjWmU/y8WNS8HL 80rw== X-Gm-Message-State: AOJu0YwWxFZ/Y32Fpaad1qyqXg+EcGfpEASzR8uTBSidaHW/okjY19tF pMTYy49T2Ubf7HtyWkIO2ZF6FbzXl5Zp6ttWXbAuOg7HVIDmOm7fmfId6T6v40FiNBDCPVkF5hD C X-Received: by 2002:a2e:a9a6:0:b0:2d2:2e7a:e070 with SMTP id x38-20020a2ea9a6000000b002d22e7ae070mr7911737ljq.10.1708457188930; Tue, 20 Feb 2024 11:26:28 -0800 (PST) Received: from m1x-phil.lan (mek33-h02-176-184-23-7.dsl.sta.abo.bbox.fr. [176.184.23.7]) by smtp.gmail.com with ESMTPSA id v16-20020a05600c471000b004126f8c68eesm2925856wmo.3.2024.02.20.11.26.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 20 Feb 2024 11:26:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , =?utf-8?q?Alex_Benn=C3=A9e?= , Mark Cave-Ayland , Bernhard Beschow , Richard Henderson , Markus Armbruster , Alexander Graf , Anton Johansson , Paolo Bonzini , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 0/2] hw: Replace cpu_interrupt() calls by qemu_irq(QDev GPIO) Date: Tue, 20 Feb 2024 20:26:23 +0100 Message-ID: <20240220192625.17944-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=philmd@linaro.org; helo=mail-lj1-x231.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Hi, cpu_interrupt() doesn't scale well with heterogenous machines because its mask is target specific (defined in target/ARCH/cpu.h). While it is (often...) used by target-specific hw to notify cpu, there is no restriction to use such target-specific hw in a heterogeneous setup, where it'd still target the same kind of target cpus. The Alpha Typhoon HW is unlikely to be used heterogeneously, but it is the simplest case I found to illustrate how I plan to remove cpu_interrupt() calls from hw/: use the QDev GPIO API. Does that sound good enough? Thanks, Phil. Philippe Mathieu-Daudé (2): target/alpha: Expose TMR and SMP IRQ lines via QDev hw/alpha/typhoon: Set CPU IRQs using QDev API hw/alpha/typhoon.c | 15 +++++++++------ target/alpha/cpu.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 6 deletions(-)