Commit ab9e5896 authored by Adam Wujek's avatar Adam Wujek 💬

userspace: get rid of query_ports from libwr and wrsr_hal

All clients using query_ports moved to use shm for communication with HAL.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 28e5fb37
......@@ -1620,14 +1620,6 @@ the processes (excluding the @sc{rt} subsystem).
Called by library code (@t{halexp_lock_cmd}) but not used.
Called by @i{ppsi} directly in @t{wrs-time.c}.
@item hal::query_ports
@c FIXME: shmem this
Called by library code (@t{halexp_query_ports}). This
in turn is called by @i{rtu_stat} and @i{rtud}.
If fills a structure @t{hexp_port_list_t}. It is being
moved to shared memory.
@item rtud::get_fd_list
@itemx rtud::get_vd_list
@c FIXME: shmem these
......
......@@ -151,7 +151,6 @@ extern int halexp_check_running(void);
extern int halexp_reset_port(const char *port_name);
extern int halexp_calibration_cmd(const char *port_name, int command, int on_off);
extern int halexp_lock_cmd(const char *port_name, int command, int priority);
extern int halexp_query_ports(hexp_port_list_t *list);
extern int halexp_get_port_state(hexp_port_state_t *state, const char *port_name);
extern int halexp_pps_cmd(int cmd, hexp_pps_params_t *params);
extern int halexp_get_timing_state(hexp_timing_state_t *state);
......@@ -203,15 +202,6 @@ struct minipc_pd __rpcdef_lock_cmd = {
},
};
//int halexp_query_ports(hexp_port_list_t *list);
struct minipc_pd __rpcdef_query_ports = {
.name = "query_ports",
.retval = MINIPC_ARG_ENCODE(MINIPC_ATYPE_STRUCT, hexp_port_list_t),
.args = {
MINIPC_ARG_END,
},
};
//int halexp_get_port_state(hexp_port_state_t *state, const char *port_name);
struct minipc_pd __rpcdef_get_port_state = {
.name = "get_port_state",
......
......@@ -26,16 +26,6 @@ int halexp_lock_cmd(const char *port_name, int command, int priority)
return rval;
}
/* This used to be a mini-rpc call; it is now a shmem lookup, in libwr */
int halexp_query_ports(hexp_port_list_t * list)
{
hal_port_query_ports(list, hal_ports);
/* The function above wrote a plain 18 in there; but we know better */
list->num_physical_ports = hal_nports;
return 0;
}
/* This used to be a mini-rpc call; it is now a shmem lookup */
int halexp_get_port_state(hexp_port_state_t * state, const char *port_name)
{
......
......@@ -66,25 +66,3 @@ int hal_port_get_exported_state(struct hexp_port_state *state,
return 0;
}
/* Public API function - returns the array of names of all WR network
* interfaces */
int hal_port_query_ports(struct hexp_port_list *list,
const struct hal_port_state *ports)
{
int i;
int n = 0;
for (i = 0; i < HAL_MAX_PORTS; i++)
if (ports[i].in_use)
strcpy(list->port_names[n++], ports[i].name);
/*
* This "18" is returned through RPC; shmem users fix it in the
* caller function. We have too many plain "18" around anyways
*/
list->num_physical_ports = 18; /* was hal_port_nports */
list->num_ports = n;
return 0;
}
......@@ -106,8 +106,7 @@ struct hal_shmem_header {
*/
struct hal_port_state *hal_port_lookup(struct hal_port_state *ports,
const char *name);
int hal_port_query_ports(struct hexp_port_list *list,
const struct hal_port_state *ports);
int hal_port_get_exported_state(struct hexp_port_state *state,
struct hal_port_state *ports,
const char *port_name);
......
......@@ -190,14 +190,6 @@ static int export_lock_cmd(const struct minipc_pd *pd,
return 0;
}
static int export_query_ports(const struct minipc_pd *pd,
uint32_t * args, void *ret)
{
hexp_port_list_t *list = ret;
hal_port_query_ports(list, ports);
return 0;
}
static int export_get_timing_state(const struct minipc_pd *pd,
uint32_t * args, void *ret)
{
......@@ -223,13 +215,11 @@ int hal_init_wripc(struct hal_port_state *hal_ports)
__rpcdef_pps_cmd.f = export_pps_cmd;
__rpcdef_get_port_state.f = export_get_port_state;
__rpcdef_lock_cmd.f = export_lock_cmd;
__rpcdef_query_ports.f = export_query_ports;
__rpcdef_get_timing_state.f = export_get_timing_state;
minipc_export(hal_ch, &__rpcdef_pps_cmd);
minipc_export(hal_ch, &__rpcdef_get_port_state);
minipc_export(hal_ch, &__rpcdef_lock_cmd);
minipc_export(hal_ch, &__rpcdef_query_ports);
minipc_export(hal_ch, &__rpcdef_get_timing_state);
/* FIXME: pll_cmd is empty anyways???? */
......
......@@ -23,10 +23,6 @@ struct hal_port_state;
int hal_port_get_exported_state(struct hexp_port_state *state,
struct hal_port_state *ports,
const char *port_name);
struct hexp_port_list;
int hal_port_query_ports(struct hexp_port_list *list,
const struct hal_port_state *ports);
int hal_init_wripc();
int hal_update_wripc(int ms_timeout);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment