Commit 90fccedb authored by Michael Quigley's avatar Michael Quigley
Browse files

obligatory commit. haven't compiled

parent ec05a54d
......@@ -18,6 +18,7 @@
#include <linux/sort.h>
#include <asm/tsc.h>
#include <lcd-domains/thc.h>
#include "../ring-chan/ring-channel.h"
#include "ipc.h"
......@@ -68,19 +69,22 @@ static int wait_for_tx_slot(struct ipc_message *imsg)
return 0;
}
static int wait_for_rx_slot(struct ipc_message *imsg)
static int wait_for_rx_slot(struct ipc_message *imsg)//, bool is_async)
{
while (check_rx_slot_available(imsg)) {
#if defined(USE_MWAIT)
monitor_mwait(ecx, &imsg->msg_status, cstate_wait);
#endif//usemwait
#if defined(POLL)
cpu_relax();
#endif
while (check_rx_slot_available(imsg)) { //while a slot is not available
// if( is_async )
// {
// THCYield();
// }
// else
// {
#if defined(USE_MWAIT)
monitor_mwait(ecx, &imsg->msg_status, cstate_wait);
#endif//usemwait
#if defined(POLL)
cpu_relax();
#endif
// }
}
return 0;
}
......@@ -177,11 +181,23 @@ struct ipc_message *recv(struct ttd_ring_channel *rx)
recv_msg = get_rx_rec(rx, sizeof(struct ipc_message));
inc_rx_slot(rx);
wait_for_rx_slot(recv_msg);
// wait_for_rx_slot(recv_msg, false);
return recv_msg;
}
EXPORT_SYMBOL(recv);
struct ipc_message *async_recv(struct ttd_ring_channel *rx, unsigned long msg_id)
{
struct ipc_message *recv_msg;
recv_msg = get_rx_rec(rx, sizeof(struct ipc_message));
inc_rx_slot(rx);
// wait_for_rx_slot(recv_msg, true);
return recv_msg;
}
EXPORT_SYMBOL(async_recv);
struct ipc_message *get_send_slot(struct ttd_ring_channel *tx)
{
struct ipc_message *msg =
......
......@@ -24,7 +24,7 @@ struct ipc_message{
unsigned long reg4;
unsigned long reg5;
unsigned long reg6;
unsigned long reg7;
void* msg_id;
volatile uint32_t msg_status;
}__attribute__((packed));
......@@ -32,6 +32,7 @@ struct ttd_ring_channel *create_channel(unsigned long size_pages, unsigned CPU);
void free_channel(struct ttd_ring_channel *channel);
void send(struct ttd_ring_channel *tx, struct ipc_message *trans);
struct ipc_message *recv(struct ttd_ring_channel *rx);
struct ipc_message *async_recv(struct ttd_ring_channel *rx);
struct ipc_message *get_send_slot(struct ttd_ring_channel *tx);
void transaction_complete(struct ipc_message *msg);
int ipc_start_thread(struct ttd_ring_channel *chan);
......
/users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/rpc_testing.ko
/users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/../../IPC/ipc.o /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/../../ring-chan/ring-channel.o /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/callee.o /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/caller.o /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/rpc_setup.o /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/rpc_test.o
obj-m := rpc_testing.o
ccflags-y += -O2 -I/users/sbauer/ipc/ramstore/fast-ipc-module/current/IPC
#ccflags-y += -O2 -I/users/mquigley/fast-ipc-module/current/IPC
ccflags-y += -O2 -I/users/sbauer/ipc/ramstore/fast-ipc-module/current/IPC -I/local/sda4/async/xcap-capability-linux/include
INC_DIR = ../../IPC
CFLAGS_ipc.o = -O2 -DPOLL
CFLAGS_ring-channel.o = -I$(INC_DIR)
CFLAGS_ring-channel.o = -I$(INC_DIR)
DEPS= $(INC_DIR)/ipc.h
......
0xe08ef6b3 connect_channels /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/rpc_testing EXPORT_SYMBOL
0xb44f97c9 get_send_slot /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/rpc_testing EXPORT_SYMBOL
0x75052fed free_channel /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/rpc_testing EXPORT_SYMBOL
0x6f332415 create_channel /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/rpc_testing EXPORT_SYMBOL
0x28c0d4c6 send /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/rpc_testing EXPORT_SYMBOL
0x7ab9320d ipc_start_thread /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/rpc_testing EXPORT_SYMBOL
0x34e50186 transaction_complete /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/rpc_testing EXPORT_SYMBOL
0x97e12de2 recv /users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/rpc_testing EXPORT_SYMBOL
0x0b523c9e connect_channels /users/mquigley/fast-ipc-module/current/tests/rpc/rpc_testing EXPORT_SYMBOL
0x92b3fe1c get_send_slot /users/mquigley/fast-ipc-module/current/tests/rpc/rpc_testing EXPORT_SYMBOL
0x8845f183 free_channel /users/mquigley/fast-ipc-module/current/tests/rpc/rpc_testing EXPORT_SYMBOL
0x71bf823f create_channel /users/mquigley/fast-ipc-module/current/tests/rpc/rpc_testing EXPORT_SYMBOL
0x976ec4b2 send /users/mquigley/fast-ipc-module/current/tests/rpc/rpc_testing EXPORT_SYMBOL
0x113b0f31 ipc_start_thread /users/mquigley/fast-ipc-module/current/tests/rpc/rpc_testing EXPORT_SYMBOL
0x34e50186 transaction_complete /users/mquigley/fast-ipc-module/current/tests/rpc/rpc_testing EXPORT_SYMBOL
0x359192d7 async_recv /users/mquigley/fast-ipc-module/current/tests/rpc/rpc_testing EXPORT_SYMBOL
0xd0da8d85 recv /users/mquigley/fast-ipc-module/current/tests/rpc/rpc_testing EXPORT_SYMBOL
kernel//users/sbauer/ipc/ramstore/fast-ipc-module/tests/rpc/rpc_testing.ko
kernel//users/mquigley/fast-ipc-module/current/tests/rpc/rpc_testing.ko
......@@ -46,7 +46,6 @@ static void setup_tests(void)
static int __init rpc_init(void)
{
int ret = 0;
if (!this_cpu_has(X86_FEATURE_MWAIT))
return -EPERM;
......
......@@ -4,7 +4,7 @@
MODULE_INFO(vermagic, VERMAGIC_STRING);
__visible struct module __this_module
struct module __this_module
__attribute__((section(".gnu.linkonce.this_module"))) = {
.name = KBUILD_MODNAME,
.init = init_module,
......@@ -17,22 +17,21 @@ __attribute__((section(".gnu.linkonce.this_module"))) = {
static const struct modversion_info ____versions[]
__used
__attribute__((section("__versions"))) = {
{ 0x2453e971, __VMLINUX_SYMBOL_STR(module_layout) },
{ 0x46c8c7d0, __VMLINUX_SYMBOL_STR(kmalloc_caches) },
{ 0xda3e43d1, __VMLINUX_SYMBOL_STR(_raw_spin_unlock) },
{ 0x44b1d426, __VMLINUX_SYMBOL_STR(__dynamic_pr_debug) },
{ 0x7855bd8f, __VMLINUX_SYMBOL_STR(cpu_info) },
{ 0x48e6980b, __VMLINUX_SYMBOL_STR(kthread_create_on_node) },
{ 0x6f3cc8d6, __VMLINUX_SYMBOL_STR(module_layout) },
{ 0x4cd715f4, __VMLINUX_SYMBOL_STR(kmalloc_caches) },
{ 0x34083a97, __VMLINUX_SYMBOL_STR(_raw_spin_unlock) },
{ 0x79aa04a2, __VMLINUX_SYMBOL_STR(get_random_bytes) },
{ 0x846f59a, __VMLINUX_SYMBOL_STR(cpu_info) },
{ 0x3ff3952e, __VMLINUX_SYMBOL_STR(kthread_create_on_node) },
{ 0x27e1a049, __VMLINUX_SYMBOL_STR(printk) },
{ 0x92a69153, __VMLINUX_SYMBOL_STR(set_cpus_allowed_ptr) },
{ 0x8693c29f, __VMLINUX_SYMBOL_STR(set_cpus_allowed_ptr) },
{ 0xb6029609, __VMLINUX_SYMBOL_STR(kmem_cache_alloc) },
{ 0x93fca811, __VMLINUX_SYMBOL_STR(__get_free_pages) },
{ 0xea8e42de, __VMLINUX_SYMBOL_STR(wake_up_process) },
{ 0xbdfb6dbb, __VMLINUX_SYMBOL_STR(__fentry__) },
{ 0x7b50c6d, __VMLINUX_SYMBOL_STR(kmem_cache_alloc_trace) },
{ 0xd52bf1ce, __VMLINUX_SYMBOL_STR(_raw_spin_lock) },
{ 0x3c30ace4, __VMLINUX_SYMBOL_STR(wake_up_process) },
{ 0x58bec661, __VMLINUX_SYMBOL_STR(_raw_spin_lock) },
{ 0x4302d0eb, __VMLINUX_SYMBOL_STR(free_pages) },
{ 0x37a0cba, __VMLINUX_SYMBOL_STR(kfree) },
{ 0x20b570e1, __VMLINUX_SYMBOL_STR(__put_task_struct) },
{ 0x141b2c50, __VMLINUX_SYMBOL_STR(__put_task_struct) },
};
static const char __module_depends[]
......@@ -41,4 +40,4 @@ __attribute__((section(".modinfo"))) =
"depends=";
MODULE_INFO(srcversion, "26F906D0E804F32E1985E97");
MODULE_INFO(srcversion, "008C0F0599B0C1F40356D4B");
Supports Markdown
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