Commit e5578b98 authored by Charles Jacobsen's avatar Charles Jacobsen Committed by Vikram Narayanan

Fixed all build and linking errors for big test.

parent a8776d26
......@@ -854,6 +854,9 @@ static int test08(void)
struct test08_info mi;
struct test08_info di;
struct test08_info ci;
cptr_t mcptr;
cptr_t dcptr;
cptr_t ccptr;
/*
* Build lcd's
......@@ -873,6 +876,48 @@ static int test08(void)
ret = -1;
goto clean3;
}
/*
* Create and install boot endpoint
*/
ret = lcd_cnode_alloc(dealer_lcd->cspace, &dcptr);
if (ret)
goto clean4;
if (dcptr != 1) {
ret = -1;
LCD_ERR("dealer cptr not 1, so need to change macro first");
goto clean4;
}
ret = __lcd_mk_sync_endpoint(dealer_lcd, dcptr);
if (ret)
goto clean4;
ret = lcd_cnode_alloc(manufacturer_lcd->cspace, &mcptr);
if (ret)
goto clean5;
if (mcptr != 1) {
ret = -1;
LCD_ERR("mfter cptr not 1, so need to change macro first");
goto clean5;
}
ret = lcd_cnode_grant(dealer_lcd->cspace, manufacturer_lcd->cspace,
dcptr, mcptr, LCD_CAP_RIGHT_WRITE);
if (ret)
goto clean5;
ret = lcd_cnode_alloc(customer_lcd->cspace, &ccptr);
if (ret)
goto clean5;
if (ccptr != 1) {
ret = -1;
LCD_ERR("customer cptr not 1, so need to change macro first");
goto clean5;
}
ret = lcd_cnode_grant(dealer_lcd->cspace, customer_lcd->cspace,
dcptr, ccptr, LCD_CAP_RIGHT_WRITE);
if (ret)
goto clean5;
/*
* Init completions
*/
......@@ -886,19 +931,19 @@ static int test08(void)
"test08_manufacturer");
if (!manufacturer_task) {
LCD_ERR("spawning manufacturer task");
goto clean4;
goto clean5;
}
dealer_task = kthread_create(test08_dealer, &di,
"test08_dealer");
if (!dealer_task) {
LCD_ERR("spawning dealer task");
goto clean5;
goto clean6;
}
customer_task = kthread_create(test08_customer, &ci,
"test08_customer");
if (!customer_task) {
LCD_ERR("spawning customer task");
goto clean6;
goto clean7;
}
/*
......@@ -928,28 +973,30 @@ static int test08(void)
LCD_ERR("manufacturer non zero ret val %d",
mi.ret_val);
ret = -1;
goto clean4;
goto clean5;
}
if (di.ret_val) {
LCD_ERR("dealer non zero ret val %d",
di.ret_val);
ret = -1;
goto clean4;
goto clean5;
}
if (ci.ret_val) {
LCD_ERR("customer non zero ret val %d",
ci.ret_val);
ret = -1;
goto clean4;
goto clean5;
}
ret = 0;
goto clean4;
goto clean5;
clean6:
clean7:
kthread_stop(dealer_task);
clean5:
clean6:
kthread_stop(manufacturer_task);
clean5:
__lcd_rm_sync_endpoint(dealer_lcd, dcptr);
clean4:
test_rm_lcd(customer_lcd);
clean3:
......
......@@ -7,12 +7,14 @@
#include "../include/common.h"
struct mutex __lcd_cap_lock;
EXPORT_SYMBOL(__lcd_cap_lock);
int lcd_cap_init(void)
{
mutex_init(&__lcd_cap_lock);
return 0;
}
EXPORT_SYMBOL(lcd_cap_init);
static void init_cspace_cnodes(struct cspace *cspace)
{
......@@ -57,6 +59,7 @@ int lcd_mk_cspace(struct cspace **cspace_ptr)
*cspace_ptr = cspace;
return 0;
}
EXPORT_SYMBOL(lcd_mk_cspace);
static int __lcd_cnode_alloc(struct cspace *cspace, cptr_t *cptr)
{
......@@ -101,6 +104,7 @@ int lcd_cnode_alloc(struct cspace *cspace, cptr_t *cptr)
lcd_cap_unlock();
return ret;
}
EXPORT_SYMBOL(lcd_cnode_alloc);
int __lcd_cnode_lookup(struct cspace *cspace, cptr_t cptr, struct cnode **out)
{
......@@ -111,6 +115,7 @@ int __lcd_cnode_lookup(struct cspace *cspace, cptr_t cptr, struct cnode **out)
*out = c;
return 0;
}
EXPORT_SYMBOL(__lcd_cnode_lookup);
static int __lcd_cnode_insert(struct cnode *cnode, void *object,
enum lcd_cap_type type, int rights)
......@@ -147,6 +152,7 @@ out:
lcd_cap_unlock();
return ret;
}
EXPORT_SYMBOL(lcd_cnode_insert);
static int __lcd_cnode_insert_for_grant(struct cnode *src_cnode,
struct cnode *dest_cnode, int rights)
......@@ -215,6 +221,7 @@ int lcd_cnode_grant(struct cspace *src_cspace, struct cspace *dest_cspace,
lcd_cap_unlock();
return ret;
}
EXPORT_SYMBOL(lcd_cnode_grant);
static void __lcd_cnode_do_revoke(struct cnode *parent, int rights)
{
......@@ -265,6 +272,7 @@ int lcd_cnode_revoke(struct cspace *cspace, cptr_t cptr, int rights)
lcd_cap_unlock();
return ret;
}
EXPORT_SYMBOL(lcd_cnode_revoke);
static void __lcd_cnode_do_free(struct cnode *parent)
{
......@@ -302,6 +310,7 @@ void __lcd_cnode_free(struct cnode *cnode)
__lcd_cnode_do_free(cnode);
return;
}
EXPORT_SYMBOL(__lcd_cnode_free);
void __lcd_rm_cnode(struct cnode *cnode)
{
......@@ -309,6 +318,8 @@ void __lcd_rm_cnode(struct cnode *cnode)
__lcd_cnode_do_free(cnode);
return;
}
EXPORT_SYMBOL(__lcd_rm_cnode);
void __lcd_rm_cspace(struct cspace **cspace_ptr)
{
int i;
......@@ -320,3 +331,4 @@ void __lcd_rm_cspace(struct cspace **cspace_ptr)
*cspace_ptr = NULL;
return;
}
EXPORT_SYMBOL(__lcd_rm_cspace);
......@@ -177,6 +177,7 @@ int __lcd_send(struct lcd *lcd, cptr_t c)
return ret;
}
EXPORT_SYMBOL(__lcd_send);
static int lcd_do_recv(struct lcd *to, cptr_t c)
{
......@@ -283,6 +284,7 @@ int __lcd_recv(struct lcd *lcd, cptr_t c)
return ret;
}
EXPORT_SYMBOL(__lcd_recv);
int __lcd_call(struct lcd *lcd, cptr_t c)
{
......@@ -309,6 +311,7 @@ int __lcd_call(struct lcd *lcd, cptr_t c)
*/
return __lcd_recv(lcd, lcd->utcb.call_endpoint_cap);
}
EXPORT_SYMBOL(__lcd_call);
int __lcd_reply(struct lcd *lcd)
{
......@@ -329,6 +332,7 @@ int __lcd_reply(struct lcd *lcd)
return ret;
}
EXPORT_SYMBOL(__lcd_reply);
int __lcd_mk_sync_endpoint(struct lcd *lcd, cptr_t c)
{
......@@ -364,6 +368,7 @@ fail2:
fail1:
return ret;
}
EXPORT_SYMBOL(__lcd_mk_sync_endpoint);
static int __cleanup_sync_endpoint(struct cnode *cnode)
{
......@@ -426,3 +431,4 @@ int __lcd_rm_sync_endpoint(struct lcd *lcd, cptr_t cptr)
lcd_cap_unlock();
return ret;
}
EXPORT_SYMBOL(__lcd_rm_sync_endpoint);
......@@ -30,6 +30,7 @@ fail2:
fail1:
return ret;
}
EXPORT_SYMBOL(lcd_ds_store);
static void * __lcd_ds_drop(u64 badge, dsptr_t ptr)
{
......@@ -69,6 +70,7 @@ void * lcd_ds_drop(u64 badge, dsptr_t ptr)
return obj;
}
EXPORT_SYMBOL(lcd_ds_drop);
static void * __lcd_ds_read(u64 badge, dsptr_t ptr)
{
......@@ -103,4 +105,4 @@ void * lcd_ds_read(u64 badge, dsptr_t ptr)
return obj;
}
EXPORT_SYMBOL(lcd_ds_read);
......@@ -4,7 +4,7 @@
*
*/
#ifdef CONFIG_RUN_IN_LCD
#ifdef CONFIG_LCD_PROTOTYPE_TEST_IN_LCD
/* INTERNAL DEFS -------------------------------------------------- */
......@@ -15,10 +15,12 @@ extern void __customer_exit(void);
/* IDL/LCD DEFS -------------------------------------------------- */
#include <linux/slab.h>
#include "dealer-idl.h"
#include "customer-idl.h"
#include "../include/common.h"
#include "../include/ipc.h"
#include "../include/api.h"
#include "../include/api-internal.h"
#include "../include/utcb.h"
/* INTERFACE WRAPPERS -------------------------------------------------- */
......@@ -86,6 +88,7 @@ fail1:
*/
void dealer_return_car(struct automobile *a)
{
int ret;
/*
* Free on callee side
*/
......@@ -105,7 +108,7 @@ void dealer_return_car(struct automobile *a)
return;
fail1:
fail:
return;
}
......@@ -149,4 +152,4 @@ void __exit customer_exit(void)
module_init(customer_init);
module_exit(customer_exit);
#endif /* CONFIG_RUN_IN_LCD */
#endif
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