From nobody Mon Feb 9 13:57:08 2026 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 74D9B37D1C3 for ; Wed, 7 Jan 2026 16:29:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767803411; cv=none; b=e/pb1DT0Xqo5vYe957IqcfSbCQNw3rXSwR81VDgmPnZd3uazkTlOvZd+mQrGGVPw7e/6eFiEoUV8aPBamcvbPkSjsFjzBCXalfiq7k8jvPWeA8PlOGN9ba7KFm+G4nqHNgJ0ar1RkjInX5hj9cWocTWvgdQyitEo7fyRsVg7zYo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767803411; c=relaxed/simple; bh=8QHeTQ1XWPXrXIuaoG9PXPBKmQw6B9CxYPEzAKre7JY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=G2//YSWzACeMyaKk+X/qbOhW4XHq+lCe0ZPNdhyWpmxKhVzqn1PJfwgb+xuGEOIMtp9JMWswtFlhRAXXDKP3CtC1FEb+/TTA+OhR+zWApvTRU5NJbgAA8A5jsH3rT6p3GVVsRIKMqSQAWoPqoAyryX8/PlUoHh3vcJhMDeqvP8k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=osyx.tech; spf=fail smtp.mailfrom=osyx.tech; dkim=pass (2048-bit key) header.d=osyx-tech.20230601.gappssmtp.com header.i=@osyx-tech.20230601.gappssmtp.com header.b=Y4gUTC3M; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=osyx.tech Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=osyx.tech Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=osyx-tech.20230601.gappssmtp.com header.i=@osyx-tech.20230601.gappssmtp.com header.b="Y4gUTC3M" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-43260a5a096so1542428f8f.0 for ; Wed, 07 Jan 2026 08:29:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osyx-tech.20230601.gappssmtp.com; s=20230601; t=1767803383; x=1768408183; darn=vger.kernel.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=TGfMB1SwaAERf8A9+EJZzOGOMSv16YGZ4dbapv2DrTs=; b=Y4gUTC3MrooR8TXD8YTfru1jOcy5sBzZqUID9YizdinrPnvWdW2Y0efLIz9oqPq6Vp 1Q4j52k8fKwxnx0gOoHiyGhtxI4R9FGFfiB/kr0T60iqlCWfWw6JqIRAp75VM0PDFtq6 brCvvjqJuu7tTydsje8NLHxYlcU2A6P8JhYcT4KAAd9asEqTWtY7Bid9Bgrvw2Mbdzn9 NNYCui/Zg/cogop/y66l1QmIIxNJZIiwjAtX+JR/Ph5TvaI0c87ZiEj5Lw6Cli1wGbGS 3vXFefAMxI1k20ak/yt457w8DRBr1rlmtv5GnzoQYsbjAxISyl38OKmYDft4GOs54lsj Z3Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767803383; x=1768408183; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=TGfMB1SwaAERf8A9+EJZzOGOMSv16YGZ4dbapv2DrTs=; b=ozu5LwuMPoYPyz2ul+A/1fzbhwOvSQtF2i6BV2ak/5MbJey80qpXpCSOJm+4XLD0Kd H+6WbDEVLgICLViPa6Sv429c+90nOWaj3+xR57eCCKQJ5R6f7p2UCft04nftQcuRaMTc JE+X4Po2Sqc4tZCeEGNTfnIqCVqHBYI87UOJyU4gtjTspEr/nowZgpzBul2hznQgThOR XHibBJZsNj+xm42G4H8ES1gjop/bxcr8ah3ks/+XMuFTo3M/R1/uqp7jT2CLZ0ExXdOh 6UaCwq6rnnVlHK0wIafIW82OHoTCDfxmsUbCdTlngnq6IJ2AHB0K5iiX7C71z4p9gaKA KFxg== X-Gm-Message-State: AOJu0Ywqjl66aip0Yu+8VVciHSX0wjqTFaRc9LzBwXxr4obbrbDAip8X NjSPe3tbV6oTjJ7pG2mmnCPuYAJYT3fSeWSfJbVw3oCdWOEDdjohzluh9Ig6JSzkIH/N5PvEJkb ziPU0Aw== X-Gm-Gg: AY/fxX7z7QscTfpdkk6r4AzGVH0Hz0QL//k/aMFbJgL1IWAJcnyDELHxT6yVBAmAgm2 Rv5H3bBd3G0Nj3ji4Abs4uvV6f8BKktKYtiuWlaqhBkiVehYTPJnqxMQ0F5zJF/zWTtE1j5Yx2h tgn5R8dJd5K6MG9N037ENSM6YVTK3Ku/hPTTXdcdWJ07Vr13qQjRiR8N4bkbF7VmioQ1MT5Ap99 E7pC79uh5GYa/5q3fnWnjVfdLSt+wMz1Xkm6f05rYgXiZpdRCs2yJyhFFozatJ5/ewNBhx4KZ7L jWEdP0H+Ywp6zmuDNx0ssr4mwqdgPpQ9UshaUKoS70ToAzAQs9Rb75IUfrPpxUgv2M1MHTMgksH hh1vvVKm9+6TQLAgyKVrrQV7RW02OAV1AK6CbkdG4MzMaG8Ds+Dg02cxWd4fFd/YCjtBbfqhOMm rLWluMC06O/dm8Ppz7Bw== X-Google-Smtp-Source: AGHT+IHYX8ERrMEjplERjC6ixgzkBNgkXhYStxw+rahyUBYDlRtMCSfk+AGXhNnNExJ8kz9EYuCSDQ== X-Received: by 2002:adf:f4c9:0:b0:431:907:f324 with SMTP id ffacd0b85a97d-432c38d2312mr3237384f8f.61.1767803383134; Wed, 07 Jan 2026 08:29:43 -0800 (PST) Received: from jp-linux.Home ([2001:8a0:f59c:a900:4a3c:13be:a1c0:7b9f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd5ff0b2sm11117030f8f.42.2026.01.07.08.29.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jan 2026 08:29:42 -0800 (PST) From: joaopeixoto@osyx.tech To: linux-kernel@vger.kernel.org Cc: ajd@linux.ibm.com, alex@ghiti.fr, aou@eecs.berkeley.edu, bagasdotme@gmail.com, catalin.marinas@arm.com, conor+dt@kernel.org, corbet@lwn.net, dan.j.williams@intel.com, davidmcerdeira@osyx.tech, devicetree@vger.kernel.org, dev@kael-k.io, gregkh@linuxfoundation.org, haren@linux.ibm.com, heiko@sntech.de, joaopeixoto@osyx.tech, jose@osyx.tech, kever.yang@rock-chips.com, krzk+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, maddy@linux.ibm.com, mani@kernel.org, nathan@kernel.org, neil.armstrong@linaro.org, palmer@dabbelt.com, pjw@kernel.org, prabhakar.mahadev-lad.rj@bp.renesas.com, robh@kernel.org, will@kernel.org Subject: [PATCH 5/6] virt: bao: Move BAO_IPCSHMEM_HYPERCALL_ID to common header Date: Wed, 7 Jan 2026 16:28:28 +0000 Message-ID: <20260107162829.416885-6-joaopeixoto@osyx.tech> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260107162829.416885-1-joaopeixoto@osyx.tech> References: <20251224135217.25350-1-joaopeixoto@osyx.tech> <20260107162829.416885-1-joaopeixoto@osyx.tech> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Jo=C3=A3o Peixoto Move the IPC shared-memory hypercall ID from architecture-specific headers into include/linux/bao.h. Signed-off-by: Jo=C3=A3o Peixoto --- arch/arm/include/asm/bao.h | 5 ++--- arch/arm64/include/asm/bao.h | 5 ++--- arch/riscv/include/asm/bao.h | 7 +++---- drivers/virt/bao/ipcshmem/ipcshmem.c | 5 +---- include/linux/bao.h | 3 +++ 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/arch/arm/include/asm/bao.h b/arch/arm/include/asm/bao.h index 5ece9ecb1455..7d13591fe669 100644 --- a/arch/arm/include/asm/bao.h +++ b/arch/arm/include/asm/bao.h @@ -16,14 +16,13 @@ #include #include =20 -static inline unsigned long bao_ipcshmem_hypercall(unsigned long hypercall= _id, - unsigned long ipcshmem_id) +static inline unsigned long bao_ipcshmem_hypercall(unsigned long ipcshmem_= id) { struct arm_smccc_res res; =20 arm_smccc_hvc(ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, ARM_SMCCC_SMC_32, ARM_SMCCC_OWNER_VENDOR_HYP, - hypercall_id), + BAO_IPCSHMEM_HYPERCALL_ID), ipcshmem_id, 0, 0, 0, 0, 0, 0, &res); =20 return res.a0; diff --git a/arch/arm64/include/asm/bao.h b/arch/arm64/include/asm/bao.h index c7b7ec60c042..409f4058d56e 100644 --- a/arch/arm64/include/asm/bao.h +++ b/arch/arm64/include/asm/bao.h @@ -16,14 +16,13 @@ #include #include =20 -static inline unsigned long bao_ipcshmem_hypercall(unsigned long hypercall= _id, - unsigned long ipcshmem_id) +static inline unsigned long bao_ipcshmem_hypercall(unsigned long ipcshmem_= id) { struct arm_smccc_res res; =20 arm_smccc_hvc(ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, ARM_SMCCC_SMC_64, ARM_SMCCC_OWNER_VENDOR_HYP, - hypercall_id), + BAO_IPCSHMEM_HYPERCALL_ID), ipcshmem_id, 0, 0, 0, 0, 0, 0, &res); =20 return res.a0; diff --git a/arch/riscv/include/asm/bao.h b/arch/riscv/include/asm/bao.h index f04e6cd33fa9..d168aba7d8ec 100644 --- a/arch/riscv/include/asm/bao.h +++ b/arch/riscv/include/asm/bao.h @@ -18,13 +18,12 @@ =20 #define BAO_SBI_EXT_ID 0x08000ba0 =20 -static inline unsigned long bao_ipcshmem_hypercall(unsigned long hypercall= _id, - unsigned long ipcshmem_id) +static inline unsigned long bao_ipcshmem_hypercall(unsigned long ipcshmem_= id) { struct sbiret ret; =20 - ret =3D sbi_ecall(BAO_SBI_EXT_ID, hypercall_id, ipcshmem_id, 0, 0, 0, 0, - 0); + ret =3D sbi_ecall(BAO_SBI_EXT_ID, BAO_IPCSHMEM_HYPERCALL_ID, ipcshmem_id, + 0, 0, 0, 0, 0); =20 return ret.error; } diff --git a/drivers/virt/bao/ipcshmem/ipcshmem.c b/drivers/virt/bao/ipcshm= em/ipcshmem.c index f3892d41248c..593e89cb76bd 100644 --- a/drivers/virt/bao/ipcshmem/ipcshmem.c +++ b/drivers/virt/bao/ipcshmem/ipcshmem.c @@ -14,9 +14,6 @@ =20 #define BAO_IPCSHMEM_NAME_LEN 16 =20 -/* IPC through shared-memory hypercall ID */ -#define BAO_IPCSHMEM_HYPERCALL_ID 0x1 - struct bao_ipcshmem { struct miscdevice miscdev; int id; @@ -90,7 +87,7 @@ static ssize_t bao_ipcshmem_write(struct file *filp, cons= t char __user *buf, *ppos +=3D count; =20 /* Notify Bao hypervisor */ - bao_ipcshmem_hypercall(BAO_IPCSHMEM_HYPERCALL_ID, bao->id); + bao_ipcshmem_hypercall(bao->id); =20 return count; } diff --git a/include/linux/bao.h b/include/linux/bao.h index 5b06d2a17d21..b29830374788 100644 --- a/include/linux/bao.h +++ b/include/linux/bao.h @@ -15,6 +15,9 @@ =20 #include =20 +/* IPC through shared-memory hypercall ID */ +#define BAO_IPCSHMEM_HYPERCALL_ID 0x1 + /* Remote I/O Hypercall ID */ #define BAO_REMIO_HYPERCALL_ID 0x2 =20 --=20 2.43.0