On Thu, 2025-07-03 at 08:58 +0200, Krzysztof Kozlowski wrote: > 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?
HVPIPE is a new feature and is docucmented in new version of PAPR. This feature is available only on powerpc and not applicable to other archs. Following the same interfaces available in the existing misc driver code for RTAS calls such as ibm,get/set-system-parameter (papr- sysparm.c), ibm,get-indices, ibm,get-dynamic-sensor (papr-indices.c) and etc. > > > > + NULL)) > > + return -ENODEV; > > Totally odd wrapping. > > > + > > + if (!rtas_function_implemented(RTAS_FN_IBM_SEND_HVPIPE_MSG) || > > + !rtas_function_implemented(RTAS_FN_IBM_RECEIVE_HVPIPE_M > > SG)) > > Odd alignment. I did test with checkpatch and did not notices any issues. Also seeing with proper tab spaces. Will check again. Thanks for your comments. Haren > > > + 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