Message ID | 20250113004748.41658-10-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp1214064wrc; Sun, 12 Jan 2025 16:53:17 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUJ6sUa7awxKiG9LvgbL7Wm/5EQGpBX8MqgarygxHbzqbI5MLbwsLKEUKVtoK96H1wEs8WZtQ==@linaro.org X-Google-Smtp-Source: AGHT+IEcI2ook+0C28DmEU9Nc+KViHkqAgvLidTKKmaD5bbH94sQCnpIcMgC3yDYUnmezxcmIK05 X-Received: by 2002:a05:620a:45a6:b0:7b6:e207:c8a2 with SMTP id af79cd13be357-7bcd97d5673mr3278877985a.55.1736729596901; Sun, 12 Jan 2025 16:53:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736729596; cv=none; d=google.com; s=arc-20240605; b=ctsQfZikcOtwCR03EuJETXQFlzpK9kxoTmKkc3w3uIgv0DJsn1+MC5xM5tVW8tI458 ACMfs+I9hp1DjnO931ilX+rOg9ZnANh082dSVcadxo7psCGu40W+0YXksDm+I8saexQV Lp+z5rRkMUauq/yIBvlNAbPW5VoGfeytkg8myaX0fdz5ijyo2fugjME1lEZbQGnspNi3 ysg3x0lt5fsjE1BpXkYZw1RqqIzHzrYjNdFeW2FmBGlpk+7jNvIgrUVeB0pPxOw0Nitr CZMUX/7W7GAy7Y2I/3oeQVdeEPsPQRRahiwGacAGa+0ZMAAeH8N199Gsjyd5eGd2ptXg riaw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ff+NOtJyQbo2r4PRwy1cOlEv+D/dc6it23d0jmpFRLY=; fh=NAziacGX1oLRG5aXR1KEGKyZTrl+lhslKvmHcMEZt5Y=; b=gzKkcTc0NQwcToE37rbitf4C4Z9wUmxzmkhlBSgKaPq3NhBW2TU9T4ClJhB9fYqYnR nnRviZL+OUIu7tRwudJ2kCZ63qCF48usTT7x8WWuYYsKGtY2n7ddC1ThIBN4ZoSHlGmA T2Lx0vhBL1Kgx3ChhJ1gAo+KX14a9/ucPV/aKyUHRKUyLW2z37yM0QhmKK6jFjyQo+Ij YrHqcsH1gJsu/qqMzlwW9xoLSSrYuYa2qD/I6vS9E/nBfTCZhsSyFVf3pEJSBT62YKXq Pk0A8tAvBYhVXQVIuMSh1H2ATwIvoJcKh3WtNMk2y8GIKghwkc0Y7gZ0raN3PyRdk3kR iazA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ANnQ192c; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7bce3235dfesi944469885a.149.2025.01.12.16.53.16 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Jan 2025 16:53:16 -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=ANnQ192c; 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 <qemu-devel-bounces@nongnu.org>) id 1tX8dP-0004h8-62; Sun, 12 Jan 2025 19:48:51 -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 <philmd@linaro.org>) id 1tX8dL-0004cX-Mr for qemu-devel@nongnu.org; Sun, 12 Jan 2025 19:48:48 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tX8dK-0000m8-2U for qemu-devel@nongnu.org; Sun, 12 Jan 2025 19:48:47 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4362bae4d7dso26414545e9.1 for <qemu-devel@nongnu.org>; Sun, 12 Jan 2025 16:48:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736729324; x=1737334124; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ff+NOtJyQbo2r4PRwy1cOlEv+D/dc6it23d0jmpFRLY=; b=ANnQ192c13JrfdtU3gqgLaP30TckYvsO+TXts7Kt1SAc3l/Z0MbdQaZmISx9s53xXM iwwwPkqr7pezSDzKvkHqy4fasBCPfrz5Voj7c+C9RXomno++W7Pn09n8DGwLNawG4UlZ 8eRPAVExIYGYg2P8TRK89Nk6A0DIdfddr6PFb0pzXUVhL8PEr9BbqqV9j2Mzv8u+cy7Q /5LQzPXgv6HGHXAC1//ieiqhy3GSnzzouEt8y+VK2T5dwU/dx7nHQlrtn3n/NJcYVxLk b6mNSTnP6FhJ948tSha3jRNaEkIcY6Q1PivKPjjSU4GIr3ZFZYCeb5Tk09EX4G+OTq4t PePQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736729324; x=1737334124; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ff+NOtJyQbo2r4PRwy1cOlEv+D/dc6it23d0jmpFRLY=; b=hrjPW0Pjkq46viYQAC7kGDiV7WA+kO2PQcQALUCFVP3CcJ0wFPf6kiWNMfL44z7Jvt efvpmtrzddx5pZl/Y5ullN3cCeN/CwIz58BNoFWCwiCMkFwhQmuU9kVTNTPUT6mHBaBV lH5Qr+mKrxl26s2nObdPCNRrfQhhWyd1DCgofrsL6aXoDsugS8sf5n9bogsIXs34vWEm 3yqcodgLF+Qgj+FumS7xBshLDf1whVwcta7bRdDCTyltbRJtdz4BCwYqO3LOUkvzGU2n ANMf44g4e0lUbAHzNH6E9JHMztpc66S3+An8D0IOBMSi5iITFEaCzBfY2fTP4ncSQwl6 UNNQ== X-Gm-Message-State: AOJu0YyBmM7v9fDTaS62mDX2S7c4hMbeR/D6rH01KyyGGkuo78jmMvhL 3YZB+y6y/w0K0ci0oIsUPLKpEdzBsrGMSkuPxpwYbkV/UCRyaNtL8OH+hlQGymQ79QI9htJmAKJ zgRc= X-Gm-Gg: ASbGncs/0/UaQljkiJYA7d64fLBRafcpyhG/g2FLngBWAphfvmSKsgL3YN9sjbVawcS x5v6V5rPIbKqMSgepyQxBT4UNba3vGp9G8nK1lako+7RhjaU6b+/9j8T1L6snzMpmMbv1VC8SoU P0TkPRhebvQQqILcTSlMk8qVp6erwBhuAM8+ZanxBf9RrfGhsMcvxYWvI0MBx1HwvZhJ00BDtPo arqrQ708NHdKRsXt0Vqt8LOFF3y8y+9wVerncv0CP+ZhUf9Ik7W/8To+RU/crZheWjeHnQV5E/l 6DIsfT6jvhnNa8vLBCqbl4b0GdCINZY= X-Received: by 2002:a05:6000:1f81:b0:38b:d765:7046 with SMTP id ffacd0b85a97d-38bd765733bmr3228174f8f.33.1736729323896; Sun, 12 Jan 2025 16:48:43 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e38428bsm10836435f8f.37.2025.01.12.16.48.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Jan 2025 16:48:43 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Aleksandar Rikalo <arikalo@gmail.com>, Huacai Chen <chenhuacai@kernel.org>, Paul Burton <paulburton@kernel.org>, Aurelien Jarno <aurelien@aurel32.net>, Jiaxun Yang <jiaxun.yang@flygoat.com> Subject: [PATCH 09/23] hw/mips/bootloader: Propagate CPU env to bl_gen_sd() Date: Mon, 13 Jan 2025 01:47:34 +0100 Message-ID: <20250113004748.41658-10-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250113004748.41658-1-philmd@linaro.org> References: <20250113004748.41658-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
hw/mips: Remove all uses of &first_cpu
|
expand
|
diff --git a/hw/mips/bootloader.c b/hw/mips/bootloader.c index 30e6422d331..34c3043a563 100644 --- a/hw/mips/bootloader.c +++ b/hw/mips/bootloader.c @@ -205,9 +205,10 @@ static void bl_gen_sw(const CPUMIPSState *env, void **p, } } -static void bl_gen_sd(void **p, bl_reg rt, uint8_t base, uint16_t offset) +static void bl_gen_sd(const CPUMIPSState *env, void **p, + bl_reg rt, uint8_t base, uint16_t offset) { - if (bootcpu_supports_isa(&MIPS_CPU(first_cpu)->env, ISA_MIPS3)) { + if (bootcpu_supports_isa(env, ISA_MIPS3)) { bl_gen_i_type(p, 0x3f, base, rt, offset); } else { g_assert_not_reached(); /* unsupported */ @@ -284,7 +285,7 @@ void bl_gen_write_ulong(void **p, target_ulong addr, target_ulong val) bl_gen_load_ulong(p, BL_REG_K0, val); bl_gen_load_ulong(p, BL_REG_K1, addr); if (bootcpu_supports_isa(&MIPS_CPU(first_cpu)->env, ISA_MIPS3)) { - bl_gen_sd(p, BL_REG_K0, BL_REG_K1, 0x0); + bl_gen_sd(&MIPS_CPU(first_cpu)->env, p, BL_REG_K0, BL_REG_K1, 0x0); } else { bl_gen_sw(&MIPS_CPU(first_cpu)->env, p, BL_REG_K0, BL_REG_K1, 0x0); } @@ -301,5 +302,5 @@ void bl_gen_write_u64(void **p, target_ulong addr, uint64_t val) { bl_gen_dli(p, BL_REG_K0, val); bl_gen_load_ulong(p, BL_REG_K1, addr); - bl_gen_sd(p, BL_REG_K0, BL_REG_K1, 0x0); + bl_gen_sd(&MIPS_CPU(first_cpu)->env, p, BL_REG_K0, BL_REG_K1, 0x0); }
Propagate the target specific CPU env to the locally declared bl_gen_sd() function. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/mips/bootloader.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)