Re: [PATCH 5/6] virt: bao: Move BAO_IPCSHMEM_HYPERCALL_ID to common header

From: João Peixoto

Date: Fri Aug 07 2026 - 03:48:50 EST



On 1/7/26 19:36, Greg KH wrote:
On Wed, Jan 07, 2026 at 04:28:28PM +0000,joaopeixoto@xxxxxxxxx wrote:
From: João Peixoto<joaopeixoto@xxxxxxxxx>

Move the IPC shared-memory hypercall ID from architecture-specific
headers into include/linux/bao.h.
That says _what_ you did, but not why you did it :(

I have no idea why this is needed at all, sorry.

Signed-off-by: João Peixoto<joaopeixoto@xxxxxxxxx>
---
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 <linux/arm-smccc.h>
#include <linux/bao.h>
-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)
This does not match what you said you were doing in the changelog :(
You are right on both counts; the message now explains the why and no longer
hides the signature change:

  virt: bao: consolidate the IPC hypercall ID in include/linux/bao.h

  The IPC shared-memory hypercall ID was passed as a parameter through each
  architecture's bao_ipcshmem_hypercall() and defined locally in ipcshmem.c.
  Define it once in include/linux/bao.h, next to the Remote I/O hypercall ID,
  and reference it directly from the arch helpers. As there is only one IPC
  hypercall, this also lets bao_ipcshmem_hypercall() drop its hypercall_id
  parameter.

See also my reply to Andrew on this patch re: whether to keep it standalone
or fold it into the earlier patches.