From patchwork Mon Jan 13 00:47:25 2025 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: 856896 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp1213216wrc; Sun, 12 Jan 2025 16:48:48 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVbhhbWnD4vfu2opHouhI8BcEylfPHHGYSLadeBb+hn3KhTQr1ZMrFGzR2Zsu6zVU36uT9o7A==@linaro.org X-Google-Smtp-Source: AGHT+IFvL4e//4e5CaBM/83erdafGQN2N7L0TQJzg641R0B8g5+zkE6nz46JzbdGc+My96jm/IGA X-Received: by 2002:a05:6214:242b:b0:6d4:25c4:e772 with SMTP id 6a1803df08f44-6df9b2ad597mr96214346d6.36.1736729328757; Sun, 12 Jan 2025 16:48:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736729328; cv=none; d=google.com; s=arc-20240605; b=IfDh+leLTgC5pd+OwqMhTYqQnJncMGS4JqEhuVIlmGJLOEdh4PR1pLopSVp7sjuISP 7APt3+/ZDUjfbesFzShuUa9b5prapkMJjHv0cs2oRif+15FyB6cwHP6Eo6NEA2ey01Mc OA6a65y6+y9dev4BGOeseNgOPCXF4twbXq0CxCLHKTnOzvJod0C3i1223Xh/ndeYodjQ t33e2uzgD0+cXFpMDvsGAt8kUKUh9S5K1BZeXm67dCXDPdpeAFQgeYIfs+mflBOnAlTm 11JUV5UdCzoGWIpzGaCgoSmJssAEMfwnJqq0vwjp1fbox/F6kZBgC2R4y3p2MDYCtnqq 9oMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=mZ7F9oRarx8FS7cL5OgCcFv244CWrusVaSTKfTV+FRU=; fh=NAziacGX1oLRG5aXR1KEGKyZTrl+lhslKvmHcMEZt5Y=; b=AlNlRX1kLDMdvbcqGBmzvZy0OxBR7PEPVt6NzS5rkxGU/R7/7tpbM4mzNYfSBr35ZT i4KOZQ3sAb3KJGvYvl6gb7+JLDUAiuEfFsbX9g/ZlcVT2mAPsd0+jQZu9eK7EUc9nurA +mwNnKS+foZi4PGeUfAu2dOj7Nm6LnLc6kzHbCrZ1FAH5Ux1jw90px3QN3W6M/lqOMgH hw5lUhtcQCgumCqgQMU3XM0abwW0tPkjxPUVuZwFJVKoqQS1v7oJGCMPh6hamFle8haQ mKZJIZIJxquly8E699gKNAbANfKlfCFRIXd3hObWUnXtEiZHhDp/2+ZqUKglW8PJq844 OM9A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eyMPdn+q; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6dfadf66049si79765246d6.349.2025.01.12.16.48.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Jan 2025 16:48:48 -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=eyMPdn+q; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tX8cZ-0004Jo-VA; Sun, 12 Jan 2025 19:48:00 -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 1tX8cW-0004J6-Pc for qemu-devel@nongnu.org; Sun, 12 Jan 2025 19:47:56 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tX8cU-0000fy-13 for qemu-devel@nongnu.org; Sun, 12 Jan 2025 19:47:56 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso36554435e9.0 for ; Sun, 12 Jan 2025 16:47:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736729272; x=1737334072; 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=mZ7F9oRarx8FS7cL5OgCcFv244CWrusVaSTKfTV+FRU=; b=eyMPdn+q7vuQY5jN4hUwslZk7Vb1TUdD9eo6Qv/a+bEGPb4B9PRk6XoJ+U/5mfXvF6 CjxUsBNn2dQDosreiROYzFJlNuF3DyTT5tregERK9X516iI3y2KOyS04evth0+xgX2b4 +MZF2vbDInepBlRTe3cIWQmYeA3azLUuXIsr5t0/NlGOBIJSaHHt4CPGikUlgcTK2mFZ H00zSWzxUNdLRkUKpzQUh7ZYYIcGDJVWw1qaXn2zg2HRX/bnZ/6zaub5M9cK5KFq1L0C IBb0Qc0w6HScjvkxCYLbV86dCZ3T2BIiSa1HE6UeUNyPJ0ZWMgphWUey5y63UgZBSIlT yhbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736729272; x=1737334072; 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=mZ7F9oRarx8FS7cL5OgCcFv244CWrusVaSTKfTV+FRU=; b=nGIFdhJ3mE6yhLgosFZ3lac1Qz13o/SLIUpJqPja+oiv38QKCFyxUIOF1zXBx0pFwd ijgWoYBCBIOp3D9+Z3QgLi/yTubxpqBQBkVou1TCrirvGYHJJezpuOr0Q5z2EpOYWfhy Rr7AwDHTjHkuYpHaVHlxnfcRYxzs073frzG3TYw0k16uhAMjv9p4QYwhZwVmkkMpDd7Y GtkDjWayhVfyTvNS+HvM/ZFNpN2BoF9ECxe9ATZeziHFVf5ElrwuDJeWJDnx2mk8AvyN Q8ayLpq2MP/3ZViAlNZuuM2p6HW17vU8frslFoprFLu4SI7NZKSTlu5BO9nyeMpcfsNY l1KQ== X-Gm-Message-State: AOJu0Yw5KOT6Ya04bi2isWcerRcPaD6+Y9VbHkMYm+8l610tpFNLrno7 0vADixdpSgtZMJXYFmHlMySrV733dJx8Rtyec9XwVtEAWrsNpIx8a3YUp43kV5Zrcc/IsM45TM0 wz1A= X-Gm-Gg: ASbGncvZoGrnMQc/DDv4aChPRBZ4ls3iN74gakJGtcC1+11TraVOslm5uRUoqnlwDHk u8RjGD2+IdZ8KfLw7nqkmuz7cRvqY3UBxV1CSFLBcnsSvPKu/oYtpoGa/80v3UtRq2MGptWD4zB q4USKHyguhl+MBaDXB/SvJVkexVR6HyC6oevFbkUnjpvZBsxhxcJvYDqiw82lNg4a9Frgdd9J4N NDn4ckDng3M9SIu1Ln3hkfON0GxN8g9ijVrDUoKhXLkMobm4W7m1931HETo1jlhFNBT7zXjrQy8 NWdhacVkKru63Z5jaQgDa44uE6/Islc= X-Received: by 2002:a05:600c:1d9e:b0:436:8a6f:b6db with SMTP id 5b1f17b1804b1-436e2707c41mr145481315e9.22.1736729271980; Sun, 12 Jan 2025 16:47:51 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e9dc8802sm125732025e9.10.2025.01.12.16.47.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Jan 2025 16:47:50 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Aleksandar Rikalo , Huacai Chen , Paul Burton , Aurelien Jarno , Jiaxun Yang Subject: [PATCH 00/23] hw/mips: Remove all uses of &first_cpu Date: Mon, 13 Jan 2025 01:47:25 +0100 Message-ID: <20250113004748.41658-1-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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 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 - Keep references to vCPUs in CPS and MaltaState, - Refactor the MIPS Bootloader API to take CPU argument - Access first CPU propagate from machine_init() Based-on: <20250112215835.29320-1-philmd@linaro.org> "hw/mips/loongson3: Remove uses of &first_cpu global" Philippe Mathieu-Daudé (23): hw/mips/cps: Keep reference of vCPUs in MIPSCPSState hw/mips/malta: Check CPU index instead of using &first_cpu hw/mips/boston: Replace bl_gen_write_ulong() -> bl_gen_write_u64() hw/mips/bootloader: Propagate CPU env to bootcpu_supports_isa() hw/mips/bootloader: Propagate CPU env to bl_gen_nop() hw/mips/bootloader: Propagate CPU env to bl_gen_dsll() hw/mips/bootloader: Propagate CPU env to bl_gen_jalr() hw/mips/bootloader: Propagate CPU env to bl_gen_sw() hw/mips/bootloader: Propagate CPU env to bl_gen_sd() hw/mips/bootloader: Propagate CPU env to bl_gen_li() hw/mips/bootloader: Propagate CPU env to bl_gen_dli() hw/mips/bootloader: Propagate CPU env to bl_gen_load_ulong() hw/mips/bootloader: Propagate CPU to bl_gen_jump_to() hw/mips/bootloader: Propagate CPU to bl_gen_jump_kernel() hw/mips/bootloader: Propagate CPU to bl_gen_write_ulong() hw/mips/bootloader: Propagate CPU to bl_gen_write_u32() hw/mips/bootloader: Propagate CPU to bl_gen_write_u64() hw/mips/boston: Propagate CPU to gen_firmware() hw/mips/fuloong: Propagate CPU to write_bootloader() hw/mips/malta: Keep reference of vCPUs in MaltaState hw/mips/malta: Propagate MaltaState to write_bootloader() hw/mips/malta: Propagate MaltaState to bl_setup_gt64120_jump_kernel() hw/mips/malta: Remove all uses of &first_cpu global include/hw/mips/bootloader.h | 14 +++-- include/hw/mips/cps.h | 1 + hw/mips/bootloader.c | 103 +++++++++++++++++++---------------- hw/mips/boston.c | 21 ++++--- hw/mips/cps.c | 4 +- hw/mips/fuloong2e.c | 6 +- hw/mips/malta.c | 59 +++++++++++--------- 7 files changed, 118 insertions(+), 90 deletions(-)