Hello,
i've this very simple module to test the Resource-Manager.
It just calls ix_rm_init() on module_init() and ix_rm_term()
on module_cleanup().
#include <linux/module.h>
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/proc_fs.h>
#include <linux/vmalloc.h>
#include <ix_ossl.h>
#include <ix_rm.h>
#define DBG_ERR KERN_ERR
#define DBG_WARN KERN_WARNING
#define DBG_INFO KERN_INFO
#define DEFAULT_LVL DBG_WARN
#define DBG_LOG(lvl,str,args...) printk(lvl""str, ##args)
#define DBG_MSG(str,args...) DBG_LOG(DEFAULT_LVL, str,##args)
int init_module(void) {
ix_error err;
DBG_MSG("Initializing RM ...\n");
err = ix_rm_init(0);
if(err != IX_SUCCESS) {
DBG_MSG("RM Initialization FAILED.\n");
return err;
}
return 0;
}
void cleanup_module(void) {
ix_error err;
err = ix_rm_term();
if (err != IX_SUCCESS) {
DBG_MSG("RM Termination FAILED.\n");
}
}
If i load this module it bails out with the following message:
Initializing RM ...
enable_irq(16) unbalanced from c9cd6e90
enable_irq(18) unbalanced from c9cd6f38
enable_irq(17) unbalanced from c9cd7010
enable_irq(19) unbalanced from c9cd70e0
enable_irq(24) unbalanced from c9cd7358
enable_irq(26) unbalanced from c9cd7400
enable_irq(25) unbalanced from c9cd74d4
enable_irq(27) unbalanced from c9cd75a4
Error in file: source/internal/internal_pci_communication.c, line: 1213
Function: _ix_rm_pci_communication_init
Reason: connecting the PCI doorbell interrupt failed!
Error Chain: 0x00000000
Error : 0x0200003e
Error in file: source/remote_communication.c, line: 116
Function: ix_rm_remote_comm_service_register
Reason: Remote service initializer failed!
Error in file: source/remote_communication.c, line: 253
Function: ix_rm_init_pci_remote_communication
Reason: Initialization of PCI remote service failed!
Error in file: source/internal/internal_communication.c, line: 1466
Function: _ix_rm_communication_init
Reason: initialization of PCI communication failed!
Error Chain: 0x0200003e
Error : 0x02000033
Error in file: source/system.c, line: 774
Function: ix_rm_init
Reason: Resource Manager library initialization failed!
RM Initialization FAILED.
Im using the MontaVista-Preview-Kit 3.0 with a kernel-2.4.21-rmk1-ds3.
All the XScale-Support-Libs are loaded.
# lsmod
Module Size Used by
rm_lib 273828 0 (unused)
halMev2_lib 340600 0 [rm_lib]
libossl 5096 0 [rm_lib halMev2_lib]
halMeDrv 19784 0 [rm_lib halMev2_lib]
Has anyone an idea what is wrong?
TIA Frank