summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2010-03-10 12:13:02 -0600
committerHari Kanigeri <h-kanigeri2@ti.com>2010-07-09 17:57:22 -0500
commitc7de8f03ab6a0855046a848384158ee9e76bb7f8 (patch)
treefe26404f715079f4646e4d7dc21c896b471dd87a /arch/arm
parent77d0da054d4c5db724a050120017199301066b8d (diff)
SYSLINK: ipc - nameserver_remotenotify migrated to SysLink 2.0 version
nameserver_remotenotify module is synched up with SysLink-2.0 version. This version incorporates changes for improved ease of programming for the user. The following are the main changes specific to this module: 1. The new nameserver_remotenotify module does not have any ioctl interface. It does not have any presence in the userspace now. It is directly invoked in SysMgr/Ipc module on the kernel-side. 2. nameserver_remotenotify_start, nameserver_remotenotify_attach & nameserver_remotenotify_detach API are added. 3. nameserver_remote_get & nameserver_remotenotify_get function signatures changed. The length of the value is returned as part of the function arguments. The functions return a success or failure status instead. 5. nameserver_remotenotify_params_init function does not take any object handle. 6. nameserver_remotenotify_shared_memreq return value changed. 7. nameserver_remotenotify_config and nameserver_remotenotify_params structure elements have changed. The params structure now takes a new gatemp handle. Some other elements have been removed/replaced. nameserver_remotenotify_attrs structure has been removed. 7. nameserver_remotenotify_obj internal object is modified to store the shared region id, it's cacheability properties, and the gatemp handle that will be used to protect it. 8. gatepeterson_ function calls have been replaced with the corresponding gatemp_ function calls. 9. WARN_ONs have been added in place of BUG_ONs and unlikely macros are added for compiler branch prediction improvement. 10. support for serialization of requests from multiple processes is added. 11. cache calls are added, but commented out. Signed-off-by: Suman Anna <s-anna@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/plat-omap/include/syslink/nameserver_remote.h6
-rw-r--r--arch/arm/plat-omap/include/syslink/nameserver_remotenotify.h68
-rw-r--r--arch/arm/plat-omap/include/syslink/nameserver_remotenotify_ioctl.h163
3 files changed, 32 insertions, 205 deletions
diff --git a/arch/arm/plat-omap/include/syslink/nameserver_remote.h b/arch/arm/plat-omap/include/syslink/nameserver_remote.h
index dbdcedfc7ac3..bc0921b08e06 100644
--- a/arch/arm/plat-omap/include/syslink/nameserver_remote.h
+++ b/arch/arm/plat-omap/include/syslink/nameserver_remote.h
@@ -24,8 +24,8 @@
struct nameserver_remote_object {
int (*get)(const struct nameserver_remote_object *obj,
const char *instance_name, const char *name,
- void *value, u32 value_len, void *reserved);
- /* Function to get data from remote nameserver */
+ void *value, u32 *value_len, void *reserved);
+ /* Function to get data from remote nameserver */
void *obj; /* Implementation specific object */
};
@@ -34,6 +34,6 @@ struct nameserver_remote_object {
*/
int nameserver_remote_get(const struct nameserver_remote_object *handle,
const char *instance_name, const char *name,
- void *value, u32 value_len);
+ void *value, u32 *value_len, void *reserved);
#endif /* _NAMESERVER_REMOTE_H_ */
diff --git a/arch/arm/plat-omap/include/syslink/nameserver_remotenotify.h b/arch/arm/plat-omap/include/syslink/nameserver_remotenotify.h
index 852da8effcc6..cb9b6218930d 100644
--- a/arch/arm/plat-omap/include/syslink/nameserver_remotenotify.h
+++ b/arch/arm/plat-omap/include/syslink/nameserver_remotenotify.h
@@ -31,70 +31,60 @@
* Module configuration structure
*/
struct nameserver_remotenotify_config {
- u32 reserved;
- /* Reserved value (not currently used) */
+ u32 notify_event_id;
+ /* Notify event number */
};
/*
* Module configuration structure
*/
struct nameserver_remotenotify_params {
- u32 notify_event_no; /* Notify event number */
- void *notify_driver; /* Notify Driver handle */
void *shared_addr; /* Address of the shared memory */
- u32 shared_addr_size; /* Size of the shared memory */
- void *gate; /* Handle to the gate used for protecting
- nameserver add and delete */
+ void *gatemp; /* Handle to the gatemp used for protecting the
+ nameserver_remotenotify instance. Using the default
+ value of NULL will result in the default gatemp being
+ used for context protection */
};
-/*
- * Function to get the default configuration for the nameserver_remotenotify
- * module
- */
+/* Function to get the default configuration for the nameserver_remotenotify
+ * module */
void nameserver_remotenotify_get_config(
struct nameserver_remotenotify_config *cfg);
-/*
- * Function to setup the nameserver_remotenotify module
- */
+/* Function to setup the nameserver_remotenotify module */
int nameserver_remotenotify_setup(struct nameserver_remotenotify_config *cfg);
-/*
- * Function to destroy the nameserver_remotenotify module
- */
+/* Function to destroy the nameserver_remotenotify module */
int nameserver_remotenotify_destroy(void);
-/*
- * Function to get the current configuration values
- */
-void nameserver_remotenotify_params_init(void *handle,
- struct nameserver_remotenotify_params *params);
+/* Function to get the current configuration values */
+void nameserver_remotenotify_params_init(
+ struct nameserver_remotenotify_params *params);
-/*
- * Function to setup the Name Server remote notify
- */
-void *nameserver_remotenotify_create(u16 proc_id,
+/* Function to create the nameserver_remotenotify object */
+void *nameserver_remotenotify_create(u16 remote_proc_id,
const struct nameserver_remotenotify_params *params);
-/*
- * Function to destroy the Name Server remote notify
- */
+/* Function to delete the nameserver_remotenotify object */
int nameserver_remotenotify_delete(void **handle);
-
-/*
- * Function to get a name/value from remote nameserver
- */
+/* Function to get a name/value from remote nameserver */
int nameserver_remotenotify_get(void *handle,
const char *instance_name, const char *name,
- void *value, u32 value_len, void *reserved);
+ void *value, u32 *value_len, void *reserved);
-/*
- * Get the shared memory requirements for the nameserver_remotenotify
- */
-u32 nameserver_remotenotify_shared_memreq(
+/* Get the shared memory requirements for the nameserver_remotenotify */
+uint nameserver_remotenotify_shared_mem_req(
const struct nameserver_remotenotify_params *params);
+/* Create all the NameServerRemoteNotify drivers. */
+int nameserver_remotenotify_start(void *shared_addr);
-#endif /* _NAMESERVER_REMOTENOTIFY_H_ */
+/* Attaches to remote processor */
+int nameserver_remotenotify_attach(u16 remote_proc_id, void *shared_addr);
+
+/* Detaches from remote processor */
+int nameserver_remotenotify_detach(u16 remote_proc_id);
+
+#endif /* _NAMESERVER_REMOTENOTIFY_H_ */
diff --git a/arch/arm/plat-omap/include/syslink/nameserver_remotenotify_ioctl.h b/arch/arm/plat-omap/include/syslink/nameserver_remotenotify_ioctl.h
deleted file mode 100644
index e8a355456c09..000000000000
--- a/arch/arm/plat-omap/include/syslink/nameserver_remotenotify_ioctl.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * nameserver_remotenotify_ioctl.h
- *
- * The nameserver_remotenotify module provides functionality to get name
- * value pair from a remote nameserver.
- *
- * Copyright (C) 2008-2009 Texas Instruments, Inc.
- *
- * This package is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
- */
-
-#ifndef _NAMESERVERREMOTENOTIFY_DRVDEFS_H
-#define _NAMESERVERREMOTENOTIFY_DRVDEFS_H
-
-
-#include <linux/ioctl.h>
-#include <linux/types.h>
-
-#include <ipc_ioctl.h>
-#include <nameserver_remotenotify.h>
-
-enum CMD_NAMESERVERREMOTENOTIFY {
- NAMESERVERREMOTENOTIFY_GETCONFIG = NAMESERVERREMOTENOTIFY_BASE_CMD,
- NAMESERVERREMOTENOTIFY_SETUP,
- NAMESERVERREMOTENOTIFY_DESTROY,
- NAMESERVERREMOTENOTIFY_PARAMS_INIT,
- NAMESERVERREMOTENOTIFY_CREATE,
- NAMESERVERREMOTENOTIFY_DELETE,
- NAMESERVERREMOTENOTIFY_GET,
- NAMESERVERREMOTENOTIFY_SHAREDMEMREQ
-};
-
-
-/*
- * IOCTL command IDs for nameserver_remotenotify
- *
- */
-
-/*
- * Command for nameserver_remotenotify_get_config
- */
-#define CMD_NAMESERVERREMOTENOTIFY_GETCONFIG _IOWR(IPC_IOC_MAGIC, \
- NAMESERVERREMOTENOTIFY_GETCONFIG, \
- struct nameserver_remotenotify_cmd_args)
-/*
- * Command for nameserver_remotenotify_setup
- */
-#define CMD_NAMESERVERREMOTENOTIFY_SETUP _IOWR(IPC_IOC_MAGIC, \
- NAMESERVERREMOTENOTIFY_SETUP, \
- struct nameserver_remotenotify_cmd_args)
-
-/*
- * Command for nameserver_remotenotify_setup
- */
-#define CMD_NAMESERVERREMOTENOTIFY_DESTROY _IOWR(IPC_IOC_MAGIC, \
- NAMESERVERREMOTENOTIFY_DESTROY, \
- struct nameserver_remotenotify_cmd_args)
-
-/*
- * Command for nameserver_remotenotify_destroy
- */
-#define CMD_NAMESERVERREMOTENOTIFY_PARAMS_INIT _IOWR(IPC_IOC_MAGIC, \
- NAMESERVERREMOTENOTIFY_PARAMS_INIT, \
- struct nameserver_remotenotify_cmd_args)
-
-/*
- * Command for nameserver_remotenotify_create
- */
-#define CMD_NAMESERVERREMOTENOTIFY_CREATE _IOWR(IPC_IOC_MAGIC, \
- NAMESERVERREMOTENOTIFY_CREATE, \
- struct nameserver_remotenotify_cmd_args)
-
-/*
- * Command for nameserver_remotenotify_delete
- */
-#define CMD_NAMESERVERREMOTENOTIFY_DELETE _IOWR(IPC_IOC_MAGIC, \
- NAMESERVERREMOTENOTIFY_DELETE, \
- struct nameserver_remotenotify_cmd_args)
-
-/*
- * Command for nameserver_remotenotify_get
- */
-#define CMD_NAMESERVERREMOTENOTIFY_GET _IOWR(IPC_IOC_MAGIC, \
- NAMESERVERREMOTENOTIFY_GET, \
- struct nameserver_remotenotify_cmd_args)
-
-/*
- * Command for nameserver_remotenotify_shared_memreq
- */
-#define CMD_NAMESERVERREMOTENOTIFY_SHAREDMEMREQ _IOWR(IPC_IOC_MAGIC, \
- NAMESERVERREMOTENOTIFY_SHAREDMEMREQ, \
- struct nameserver_remotenotify_cmd_args)
-
-/*
- * Command arguments for nameserver_remotenotify
- */
-union nameserver_remotenotify_arg {
- struct {
- struct nameserver_remotenotify_config *config;
- } get_config;
-
- struct {
- struct nameserver_remotenotify_config *config;
- } setup;
-
- struct {
- void *handle;
- struct nameserver_remotenotify_params *params;
- } params_init;
-
- struct {
- void *handle;
- u16 proc_id;
- struct nameserver_remotenotify_params *params;
- } create;
-
- struct {
- void *handle;
- } delete_instance;
-
- struct {
- void *handle;
- char *instance_name;
- u32 instance_name_len;
- char *name;
- u32 name_len;
- u8 *value;
- s32 value_len;
- void *reserved;
- s32 len;
- } get;
-
- struct {
- void *handle;
- struct nameserver_remotenotify_params *params;
- u32 shared_mem_size;
- } shared_memreq;
-};
-
-/*
- * Command arguments for nameserver_remotenotify
- */
-struct nameserver_remotenotify_cmd_args {
- union nameserver_remotenotify_arg args;
- s32 api_status;
-};
-
-/*
- * This ioctl interface for nameserver_remotenotify module
- */
-int nameserver_remotenotify_ioctl(struct inode *inode, struct file *filp,
- unsigned int cmd, unsigned long args);
-
-
-#endif /* _NAMESERVERREMOTENOTIFY_DRVDEFS_H */
-