Commit 35758b00 authored by Alexandra Winter's avatar Alexandra Winter Committed by Paolo Abeni
Browse files

dibs: Create drivers/dibs



Create the file structure for a 'DIBS - Direct Internal Buffer Sharing'
shim layer that will provide generic functionality and declarations for
dibs device drivers and dibs clients.

Following patches will add functionality.

Signed-off-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
Link: https://patch.msgid.link/20250918110500.1731261-4-wintera@linux.ibm.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent a4997e17
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -7132,6 +7132,13 @@ L: linux-gpio@vger.kernel.org
S:	Maintained
F:	drivers/gpio/gpio-gpio-mm.c
DIBS (DIRECT INTERNAL BUFFER SHARING)
M:	Alexandra Winter <wintera@linux.ibm.com>
L:	netdev@vger.kernel.org
S:	Supported
F:	drivers/dibs/
F:	include/linux/dibs.h
DIGITEQ AUTOMOTIVE MGB4 V4L2 DRIVER
M:	Martin Tuma <martin.tuma@digiteqautomotive.com>
L:	linux-media@vger.kernel.org
+1 −0
Original line number Diff line number Diff line
@@ -195,4 +195,5 @@ obj-$(CONFIG_DRM_ACCEL) += accel/
obj-$(CONFIG_CDX_BUS)		+= cdx/
obj-$(CONFIG_DPLL)		+= dpll/

obj-$(CONFIG_DIBS)		+= dibs/
obj-$(CONFIG_S390)		+= s390/

drivers/dibs/Kconfig

0 → 100644
+12 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
config DIBS
	tristate "DIBS support"
	default n
	help
	  Direct Internal Buffer Sharing (DIBS)
	  A communication method that uses common physical (internal) memory
	  for synchronous direct access into a remote buffer.

	  Select this option to provide the abstraction layer between
	  dibs devices and dibs clients like the SMC protocol.
	  The module name is dibs.

drivers/dibs/Makefile

0 → 100644
+7 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
#
# DIBS class module
#

dibs-y += dibs_main.o
obj-$(CONFIG_DIBS) += dibs.o
+37 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 *  DIBS - Direct Internal Buffer Sharing
 *
 *  Implementation of the DIBS class module
 *
 *  Copyright IBM Corp. 2025
 */
#define KMSG_COMPONENT "dibs"
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt

#include <linux/module.h>
#include <linux/types.h>
#include <linux/err.h>
#include <linux/dibs.h>

MODULE_DESCRIPTION("Direct Internal Buffer Sharing class");
MODULE_LICENSE("GPL");

/* use an array rather a list for fast mapping: */
static struct dibs_client *clients[MAX_DIBS_CLIENTS];
static u8 max_client;

static int __init dibs_init(void)
{
	memset(clients, 0, sizeof(clients));
	max_client = 0;

	return 0;
}

static void __exit dibs_exit(void)
{
}

module_init(dibs_init);
module_exit(dibs_exit);
Loading