- 01 Jul, 2020 40 commits
-
-
Puranjay Mohan authored
Use %s and __func__ in place of function names. This solves following checkpatch.pl warning WARNING: Prefer using '"%s...", __func__' to using 'rtw_do_join', this function's name, in a string Signed-off-by: Puranjay Mohan <puranjay12@gmail.com> Link: https://lore.kernel.org/r/20200701145457.9562-1-puranjay12@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Simon Fong authored
Fixed a WARNING of Block comments use * on subsequent lines. Signed-off-by: Simon Fong <simon.fodin@gmail.com> Link: https://lore.kernel.org/r/20200630022228.GA580@simon-pcSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
To make the separation clear between vchiq's header files and vchiq.h, which is to be used by services and is the 'public' API, move it into a dedicated includes directory. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-48-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
Those are only used in the core vchiq code, while present in vchiq's 'public' API header. Move them into the right place. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-47-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
This used to be vchiq_if.h but vchiq.h is more concise for an include file that will hopefully be in the future in the includes directory. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-46-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
The barrier is only used by core code. So keep the barrier definition in the core header. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-45-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
All the functions that vchi currently provides are a 1:1 mapping to its vchiq counterparts. Get rid of vchi altogether and use vchiq's on all services. In the process also get rid of the vchi directory, as the only remaining file was a TODO file, which now lives in the parent directory. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-44-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
We can't really merge it with vchiq_queue_message() as it has internal users that will not benefit from the retry mechanism vchiq_queue_kernel_message() uses. So, for the sake of getting rid of vchi, move it into vchiq. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-43-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
Its vchiq counterpart, vchiq_bulk_transmit() is only used by vchi. We can then merge both functions by moving vchi_bulk_queue_transmit()'s retry mechanism into vchiq_bulk_transmit() and let services call the later. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-42-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
Its vchiq counterpart, vchiq_bulk_receive() is only used by vchi. We can then merge both functions by moving vchi_bulk_queue_receive()'s retry mechanism into vchiq_bulk_receive() and let services call the later. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-41-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
vchiq_if.h is used by service consumers and only the exported API should be present. Move the rest of definitions, which were not exported by the way, to vchiq_core.h where they belong. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-40-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
The function is being exported although there is no use for it outside of vchiq's core code. Keep it local then. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-39-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
Those functions don't actually exist, nor have any use, nor the macros. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-38-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
This file is internal to vchiq. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-37-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
It's already forward declared in vchiq_if.h. So no need to insist Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-36-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
There is already enough duplication with regard to fourcc generation in the kernel. Let's at least use the same macro all over the vchiq ecosystem. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-35-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
The services have access to struct vchiq_header's internals, so we can let them get the data pointer. This pretty much makes both functions exactly the same, which will allow us to make a switch to vchiq_msg_hold() further down the road. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-34-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
vchi created an opaque structure to be held by services while they process callback messages. The contents of this opaque structure are the service handle, which all services already maintain, and a pointer to vchiq's message structure, struct vchiq_header. Let's get rid of this opaque structure and directly pass struct vchiq_header, which is what ultimately vchiq consumes when handling callback messages. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-33-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
The structure only contains a single parameter, which is the underlying vchiq handle. Get rid of the struct and directly pass the handle around. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-32-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
For initialization, vchi has its own params structure, which is then translated to vchiq's params structure. They are essentially the same, so lets directly use vchiq's. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-31-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
Linux coding style says to avoid typdefs. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-30-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
As vchiq_shim's callback does nothing aside from pushing messages into the service's queue, let's bypass it and jump directly to the service's callbacks, letting them choose whether to use the message queue. It turns out most services don't need to use the message queue, which makes for simpler code in the end. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-29-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
vchiq consumer drivers may need to use this function in order to get the benefits of vchiq's per service message queueing mechanism. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-28-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
This is for service's callbacks to get their private data. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-27-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
This will make further changes easier. The struct will ultimately disappear. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-26-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
The header file only provides other includes. Move the relevant includes to their respective C files and delete it for good. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-25-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
This has historically been handled by vchi, but there is no reason why this couldn't be handled directly in vchiq. The patch tries to avoid altering any behavior, with the exception of the msg_queue size, which is now fixed to VCHIQ_MAX_SLOTS (it was set to VCHIQ_MAX_SLOTS / 2). This is done to match vchiq's user_service message queue, which could be merged with this one in the future. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-24-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
When adding a new service validate the configuration parameters provided, and remove unnecessary checks in vchi, now that we have validated service's config. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-23-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
It was probably there to trick compilers into ignoring unused variables, which isn't needed in Linux. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-22-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
enum vchi_callback_reason maps 1:1 to enum vchiq_reason, in an effort to simplify things, let's use the later, and get rid of the extra indirection. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-21-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
vchi has a set of transfer flags which almost map 1:1 to vchiq's own transfer modes. For the sake of simplicity let's use the later and delete vchi's. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-20-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
All users are ignoring the flags argument. So for the sake of simplicity delete it. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-19-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
Nothing in it is being used. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-18-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
Those defines aren't used by anyone. Get rid of them. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-17-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
There is a series of structures and enums defined but never used. Get rid of them. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-16-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
Nobody uses it. Get rid of it. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-15-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
vchi_msg_dequeue() provides the same functionality as vchi_msg_hold() except it copies the message data as opposed to the later which provides the data in place. The copying is done on a local variable, so there is no need to keep the message out the function's bounds, so use vchi_msg_hold() instead. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-14-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
The idea behind struct vchi_service_handle is to create an opaque handle to struct shim_service. This can be achieved by doing a forward declaration of struct shim_service, which will avoid unwarranted casts and pointer play. Ultimately as a rename is due all over the vchi user space, rename struct shim_service into struvt vchi_service, which is more consistent with the rest of the exposed API. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-13-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
The idea behind this was to create an opaque handle to struct vchiq_instance. This can be achieved without creating a new type by means of a forward declaration of struct vchiq_instance. This saves us from a lot of useless casting and overall simplifies code. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-12-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
There already is a function that covers most of the functionality vchi_msg_peek() provides: vchi_msg_hold(). The main difference being that the later removes the message from vchu's queue while the other does it later on, while releasing the message. There are no users of this function that can't be trivially converted to vchi_msg_hold(). So, for the sake of removing duplicate code, get rid of vchi_msg_peek(). Note that the opposite change could be performed as well. But vchi_msg_peek()'s implementation was deemed less robust as messages have to be released in order. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-11-nsaenzjulienne@suse.deSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-