Re: [PATCH 2/6] virt: bao: Add Bao IPC shared memory driver

João Peixoto <[email protected]>
Newsgroups org.infradead.lists.linux-riscv,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 1/14/26 20:37, Andrew Jones wrote:
> On Wed, Jan 07, 2026 at 04:28:25PM +0000,[email protected] wrote:
> ...
>> diff --git a/arch/riscv/include/asm/bao.h b/arch/riscv/include/asm/bao.h
>> new file mode 100644
>> index 000000000000..35658f37e1bd
>> --- /dev/null
>> +++ b/arch/riscv/include/asm/bao.h
>> @@ -0,0 +1,31 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +/*
>> + * Bao Hypervisor Hypercall Interface
>> + *
>> + * Copyright (c) Bao Project and Contributors. All rights reserved.
>> + *
>> + * Authors:
>> + *	João Peixoto<[email protected]>
>> + *	José Martins<[email protected]>
>> + *	David Cerdeira<[email protected]>
>> + */
>> +
>> +#ifndef __ASM_RISCV_BAO_H
>> +#define __ASM_RISCV_BAO_H
>> +
>> +#include <asm/sbi.h>
>> +
>> +#define BAO_SBI_EXT_ID 0x08000ba0
>> +
>> +static inline unsigned long bao_ipcshmem_hypercall(unsigned long hypercall_id,
>> +						   unsigned long ipcshmem_id)
>> +{
>> +	struct sbiret ret;
>> +
>> +	ret = sbi_ecall(BAO_SBI_EXT_ID, hypercall_id, ipcshmem_id, 0, 0, 0, 0,
>> +			0);
> Just let lines like these stick out. We have up to 100 chars and these
> types of few-char wraps are the most annoying.
>
> Thanks,
> drew
Agreed. In v3 the IPC hypercall ID is a shared constant, so
bao_ipcshmem_hypercall() now takes a single argument and its declaration
fits on one line, and I unwrapped the remaining few-char wraps. For example
the RISC-V ecall is now a single line:

     ret = sbi_ecall(BAO_SBI_EXT_ID, BAO_IPCSHMEM_HYPERCALL_ID, 
ipcshmem_id, 0, 0, 0, 0, 0);

Thanks.

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.