[PATCH RFC 3/9] powerpc/pseries: Add papr-hvpipe char driver for HVPIPE interfaces

Krzysztof Kozlowski krzk at kernel.org
Thu Jul 3 16:58:18 AEST 2025


On 03/07/2025 00:14, Haren Myneni wrote:
> +static struct miscdevice papr_hvpipe_dev = {
> +	.minor	=	MISC_DYNAMIC_MINOR,
> +	.name	=	"papr-hvpipe",
> +	.fops	=	&papr_hvpipe_ops,
> +};
> +
> +static int __init papr_hvpipe_init(void)
> +{
> +	int ret;
> +
> +	if (!of_find_property(rtas.dev, "ibm,hypervisor-pipe-capable",

Where did you document the ABI? Anyway, so you just run it on x86 and
every other arch? Why you cannot use proper devices and device driver
matching/binding?


> +		NULL))
> +		return -ENODEV;

Totally odd wrapping.

> +
> +	if (!rtas_function_implemented(RTAS_FN_IBM_SEND_HVPIPE_MSG) ||
> +		!rtas_function_implemented(RTAS_FN_IBM_RECEIVE_HVPIPE_MSG))


Odd alignment.

> +		return -ENODEV;
> +
> +	ret = misc_register(&papr_hvpipe_dev);
> +	if (ret) {
> +		pr_err("misc-dev registration failed %d\n", ret);
> +		return ret;
> +	}
> +
> +	return 0;
> +}


Best regards,
Krzysztof


More information about the Linuxppc-dev mailing list