* 1 if the insertion succeeds, 0 if the queue was full.
*/
unsigned char
-SignalInsert(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal)
+visor_signal_insert(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal)
{
void *psignal;
unsigned int head, tail;
pqhdr->NumSignalsSent++;
return 1;
}
-EXPORT_SYMBOL_GPL(SignalInsert);
+EXPORT_SYMBOL_GPL(visor_signal_insert);
/*
* Routine Description:
* 1 if the removal succeeds, 0 if the queue was empty.
*/
unsigned char
-SignalRemove(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal)
+visor_signal_remove(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal)
{
void *psource;
unsigned int head, tail;
pqhdr->NumSignalsReceived++;
return 1;
}
-EXPORT_SYMBOL_GPL(SignalRemove);
+EXPORT_SYMBOL_GPL(visor_signal_remove);
/*
* Routine Description:
* 1 if the signal queue is empty, 0 otherwise.
*/
unsigned char
-SignalQueueIsEmpty(pCHANNEL_HEADER pChannel, U32 Queue)
+visor_signalqueue_empty(pCHANNEL_HEADER pChannel, U32 Queue)
{
pSIGNAL_QUEUE_HEADER pqhdr =
(pSIGNAL_QUEUE_HEADER) ((char *) pChannel +
pChannel->oChannelSpace) + Queue;
return pqhdr->Head == pqhdr->Tail;
}
-EXPORT_SYMBOL_GPL(SignalQueueIsEmpty);
+EXPORT_SYMBOL_GPL(visor_signalqueue_empty);
/*
* Routine Description:
unsigned char result;
unsigned long flags;
spin_lock_irqsave(lock, flags);
- result = SignalInsert(pChannel, Queue, pSignal);
+ result = visor_signal_insert(pChannel, Queue, pSignal);
spin_unlock_irqrestore(lock, flags);
return result;
}
{
unsigned char result;
spin_lock(lock);
- result = SignalRemove(pChannel, Queue, pSignal);
+ result = visor_signal_remove(pChannel, Queue, pSignal);
spin_unlock(lock);
return result;
}
U64 NumInterruptsReceived; /* Total # of Interrupts received. This
* is incremented by the ISR in the
* guest windows driver */
- U64 NumEmptyCnt; /* Number of times that SignalRemove
+ U64 NumEmptyCnt; /* Number of times that visor_signal_remove
* is called and returned Empty
* Status. */
U32 ErrorFlags; /* Error bits set during SignalReinit
* full.
*/
-unsigned char SignalInsert(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal);
+unsigned char visor_signal_insert(pCHANNEL_HEADER pChannel, U32 Queue,
+ void *pSignal);
/*
* Routine Description:
* empty.
*/
-unsigned char SignalRemove(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal);
+unsigned char visor_signal_remove(pCHANNEL_HEADER pChannel, U32 Queue,
+ void *pSignal);
/*
* Routine Description:
* Return value:
* 1 if the signal queue is empty, 0 otherwise.
*/
-unsigned char SignalQueueIsEmpty(pCHANNEL_HEADER pChannel, U32 Queue);
+unsigned char visor_signalqueue_empty(pCHANNEL_HEADER pChannel, U32 Queue);
#endif
*/
typedef struct PERIODIC_WORK_Tag PERIODIC_WORK;
-PERIODIC_WORK *periodic_work_create(ulong jiffy_interval,
- struct workqueue_struct *workqueue,
- void (*workfunc)(void *),
- void *workfuncarg,
- const char *devnam);
-void periodic_work_destroy(PERIODIC_WORK *periodic_work);
-BOOL periodic_work_nextperiod(PERIODIC_WORK *periodic_work);
-BOOL periodic_work_start(PERIODIC_WORK *periodic_work);
-BOOL periodic_work_stop(PERIODIC_WORK *periodic_work);
+PERIODIC_WORK *visor_periodic_work_create(ulong jiffy_interval,
+ struct workqueue_struct *workqueue,
+ void (*workfunc)(void *),
+ void *workfuncarg,
+ const char *devnam);
+void visor_periodic_work_destroy(PERIODIC_WORK *periodic_work);
+BOOL visor_periodic_work_nextperiod(PERIODIC_WORK *periodic_work);
+BOOL visor_periodic_work_start(PERIODIC_WORK *periodic_work);
+BOOL visor_periodic_work_stop(PERIODIC_WORK *periodic_work);
#endif
typedef struct MYPROCOBJECT_Tag MYPROCOBJECT;
typedef struct MYPROCTYPE_Tag MYPROCTYPE;
-MYPROCOBJECT *proc_CreateObject(MYPROCTYPE *type, const char *name,
- void *context);
-void proc_DestroyObject(MYPROCOBJECT *obj);
-MYPROCTYPE *proc_CreateType(struct proc_dir_entry *procRootDir,
- const char **name,
- const char **propertyNames,
- void (*show_property)(struct seq_file *,
- void *, int));
-void proc_DestroyType(MYPROCTYPE *type);
+MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type, const char *name,
+ void *context);
+void visor_proc_DestroyObject(MYPROCOBJECT *obj);
+MYPROCTYPE *visor_proc_CreateType(struct proc_dir_entry *procRootDir,
+ const char **name,
+ const char **propertyNames,
+ void (*show_property)(struct seq_file *,
+ void *, int));
+void visor_proc_DestroyType(MYPROCTYPE *type);
#endif
* (not including the trailing '\0' byte)
* @ingroup internal
*/
-int hexDumpToBuffer(char *dest,
- int destSize,
- char *prefix,
- char *src,
- int srcLen,
- int bytesToDumpPerLine);
+int visor_hexDumpToBuffer(char *dest,
+ int destSize,
+ char *prefix,
+ char *src,
+ int srcLen,
+ int bytesToDumpPerLine);
/*--------------------------------*
*--- GENERAL MESSAGEQ STUFF ---*
u64 iterations, char *buf, size_t bufsize);
char *cyclesToSomethingsPerSecond(u64 cycles, u64 cyclesPerSecond,
u64 somethings, char *buf, size_t bufsize);
-struct seq_file *seq_file_new_buffer(void *buf, size_t buf_size);
-void seq_file_done_buffer(struct seq_file *m);
+struct seq_file *visor_seq_file_new_buffer(void *buf, size_t buf_size);
+void visor_seq_file_done_buffer(struct seq_file *m);
#endif
#define PROC_READ_BUFFER_SIZE 131072 /* size of the buffer to allocate to
* hold all of /proc/XXX/info */
-int util_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining,
- char *format, ...);
+int uisutil_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining,
+ char *format, ...);
int uisctrl_register_req_handler(int type, void *fptr,
ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo);
/* CopyFragsInfoFromSkb returns the number of entries added to frags array
* Returns -1 on failure.
*/
-unsigned int util_copy_fragsinfo_from_skb(unsigned char *calling_ctx,
- void *skb_in, unsigned int firstfraglen,
- unsigned int frags_max, struct phys_info frags[]);
+unsigned int uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx,
+ void *skb_in,
+ unsigned int firstfraglen,
+ unsigned int frags_max,
+ struct phys_info frags[]);
static inline unsigned int
Issue_VMCALL_IO_CONTROLVM_ADDR(U64 *ControlAddress, U32 *ControlBytes)
#define PROCLINE(...) \
do { \
- if (util_add_proc_line_ex(&tot, buff, \
- buff_len, __VA_ARGS__) < 0) { \
+ if (uisutil_add_proc_line_ex(&tot, buff, \
+ buff_len, __VA_ARGS__) < 0) { \
goto err_done; \
} \
} while (0)
acquired = 1;
- queueWasEmpty = SignalQueueIsEmpty(queueinfo->chan, whichqueue);
- if (!SignalInsert(queueinfo->chan, whichqueue, pSignal))
+ queueWasEmpty = visor_signalqueue_empty(queueinfo->chan, whichqueue);
+ if (!visor_signal_insert(queueinfo->chan, whichqueue, pSignal))
RETINT(0);
ULTRA_CHANNEL_CLIENT_RELEASE_OS(queueinfo->chan, channelId, NULL);
acquired = 0;
issueInterruptIfEmpty,
interruptHandle, channelId)) {
if (oktowait != OK_TO_WAIT) {
- LOGERR("****FAILED SignalInsert failed; cannot wait; insert aborted\n");
+ LOGERR("****FAILED visor_signal_insert failed; cannot wait; insert aborted\n");
return 0; /* failed to queue */
}
/* try again */
- LOGERR("****FAILED SignalInsert failed; waiting to try again\n");
+ LOGERR("****FAILED visor_signal_insert failed; waiting to try again\n");
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(msecs_to_jiffies(10));
}
uisqueue_get_cmdrsp(struct uisqueue_info *queueinfo,
void *cmdrsp, unsigned int whichqueue)
{
- if (!SignalRemove(queueinfo->chan, whichqueue, cmdrsp))
+ if (!visor_signal_remove(queueinfo->chan, whichqueue, cmdrsp))
return 0;
queueinfo->packets_received++;
/*****************************************************/
int
-util_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining,
+uisutil_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining,
char *format, ...)
{
va_list args;
*total += len;
return len;
}
-EXPORT_SYMBOL_GPL(util_add_proc_line_ex);
+EXPORT_SYMBOL_GPL(uisutil_add_proc_line_ex);
int
uisctrl_register_req_handler(int type, void *fptr,
EXPORT_SYMBOL_GPL(uisctrl_unregister_req_handler_ex);
/*
- * unsigned int util_copy_fragsinfo_from_skb(unsigned char *calling_ctx,
+ * unsigned int uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx,
* void *skb_in,
* unsigned int firstfraglen,
* unsigned int frags_max,
* entries filled in frags
*/
unsigned int
-util_copy_fragsinfo_from_skb(unsigned char *calling_ctx, void *skb_in,
- unsigned int firstfraglen, unsigned int frags_max,
- struct phys_info frags[])
+uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx, void *skb_in,
+ unsigned int firstfraglen,
+ unsigned int frags_max,
+ struct phys_info frags[])
{
unsigned int count = 0, ii, size, offset = 0, numfrags;
struct sk_buff *skb = skb_in;
for (skbinlist = skb_shinfo(skb)->frag_list; skbinlist;
skbinlist = skbinlist->next) {
- c = util_copy_fragsinfo_from_skb("recursive", skbinlist,
- skbinlist->len -
- skbinlist->data_len,
- frags_max - count,
- &frags[count]);
+ c = uisutil_copy_fragsinfo_from_skb("recursive",
+ skbinlist,
+ skbinlist->len -
+ skbinlist->data_len,
+ frags_max - count,
+ &frags[count]);
if (c == -1) {
LOGERR("**** FAILED recursive call failed\n");
return -1;
}
return count;
}
-EXPORT_SYMBOL_GPL(util_copy_fragsinfo_from_skb);
+EXPORT_SYMBOL_GPL(uisutil_copy_fragsinfo_from_skb);
static LIST_HEAD(ReqHandlerInfo_list); /* list of ReqHandlerInfo_t */
static DEFINE_SPINLOCK(ReqHandlerInfo_list_lock);
mask = ~ULTRA_CHANNEL_ENABLE_INTS;
rc1 = uisqueue_InterlockedAnd(virthbainfo->flags_addr, mask);
}
- if (SignalQueueIsEmpty(pChannelHeader, IOCHAN_FROM_IOPART)) {
+ if (visor_signalqueue_empty(pChannelHeader, IOCHAN_FROM_IOPART)) {
virthbainfo->interrupts_notme++;
return IRQ_NONE;
}
virthbainfo->serverdown = true;
virthbainfo->serverchangingstate = false;
/* Return the ServerDown response to Command */
- device_pause_response(virtpcidev->busNo, virtpcidev->deviceNo, 0);
+ visorchipset_device_pause_response(virtpcidev->busNo,
+ virtpcidev->deviceNo, 0);
}
/* As per VirtpciFunc returns 1 for success and 0 for failure */
#define MYDRVNAME "visorchannel"
struct VISORCHANNEL_Tag {
- MEMREGION *memregion; /* from memregion_create() */
+ MEMREGION *memregion; /* from visor_memregion_create() */
CHANNEL_HEADER chan_hdr;
GUID guid;
ulong size;
/* prepare chan_hdr (abstraction to read/write channel memory) */
if (parent == NULL)
p->memregion =
- memregion_create(physaddr, sizeof(CHANNEL_HEADER));
+ visor_memregion_create(physaddr, sizeof(CHANNEL_HEADER));
else
p->memregion =
- memregion_create_overlapped
- (parent->memregion, off, sizeof(CHANNEL_HEADER));
+ visor_memregion_create_overlapped(parent->memregion,
+ off,
+ sizeof(CHANNEL_HEADER));
if (p->memregion == NULL)
- FAIL("memregion_create failed", 0);
- if (memregion_read(p->memregion, 0, &p->chan_hdr,
- sizeof(CHANNEL_HEADER)) < 0)
- FAIL("memregion_read failed", 0);
+ FAIL("visor_memregion_create failed", 0);
+ if (visor_memregion_read(p->memregion, 0, &p->chan_hdr,
+ sizeof(CHANNEL_HEADER)) < 0)
+ FAIL("visor_memregion_read failed", 0);
if (channelBytes == 0)
/* we had better be a CLIENT of this channel */
channelBytes = (ulong) p->chan_hdr.Size;
if (STRUCTSEQUAL(guid, Guid0))
/* we had better be a CLIENT of this channel */
guid = p->chan_hdr.Type;
- if (memregion_resize(p->memregion, channelBytes) < 0)
- FAIL("memregion_resize failed", 0);
+ if (visor_memregion_resize(p->memregion, channelBytes) < 0)
+ FAIL("visor_memregion_resize failed", 0);
p->size = channelBytes;
p->guid = guid;
if (channel == NULL)
return;
if (channel->memregion != NULL) {
- memregion_destroy(channel->memregion);
+ visor_memregion_destroy(channel->memregion);
channel->memregion = NULL;
}
kfree(channel);
HOSTADDRESS
visorchannel_get_physaddr(VISORCHANNEL *channel)
{
- return memregion_get_physaddr(channel->memregion);
+ return visor_memregion_get_physaddr(channel->memregion);
}
EXPORT_SYMBOL_GPL(visorchannel_get_physaddr);
visorchannel_read(VISORCHANNEL *channel, ulong offset,
void *local, ulong nbytes)
{
- int rc = memregion_read(channel->memregion, offset, local, nbytes);
+ int rc = visor_memregion_read(channel->memregion, offset,
+ local, nbytes);
if ((rc >= 0) && (offset == 0) && (nbytes >= sizeof(CHANNEL_HEADER)))
memcpy(&channel->chan_hdr, local, sizeof(CHANNEL_HEADER));
return rc;
{
if (offset == 0 && nbytes >= sizeof(CHANNEL_HEADER))
memcpy(&channel->chan_hdr, local, sizeof(CHANNEL_HEADER));
- return memregion_write(channel->memregion, offset, local, nbytes);
+ return visor_memregion_write(channel->memregion, offset, local, nbytes);
}
EXPORT_SYMBOL_GPL(visorchannel_write);
int x = -1;
if (nbytes < thisbytes)
thisbytes = nbytes;
- x = memregion_write(channel->memregion, offset + written,
- buf, thisbytes);
+ x = visor_memregion_write(channel->memregion, offset + written,
+ buf, thisbytes);
if (x < 0)
RETINT(x);
written += thisbytes;
/** Write the contents of a specific field within a SIGNAL_QUEUE_HEADER back
* into host memory
*/
-#define SIG_WRITE_FIELD(channel, queue, sig_hdr, FIELD) \
- (memregion_write(channel->memregion, \
- SIG_QUEUE_OFFSET(&channel->chan_hdr, queue)+\
- offsetof(SIGNAL_QUEUE_HEADER, FIELD), \
- &((sig_hdr)->FIELD), \
- sizeof((sig_hdr)->FIELD)) >= 0)
+#define SIG_WRITE_FIELD(channel, queue, sig_hdr, FIELD) \
+ (visor_memregion_write(channel->memregion, \
+ SIG_QUEUE_OFFSET(&channel->chan_hdr, queue)+ \
+ offsetof(SIGNAL_QUEUE_HEADER, FIELD), \
+ &((sig_hdr)->FIELD), \
+ sizeof((sig_hdr)->FIELD)) >= 0)
static BOOL
sig_read_header(VISORCHANNEL *channel, U32 queue,
/* Read the appropriate SIGNAL_QUEUE_HEADER into local memory. */
- if (memregion_read(channel->memregion,
- SIG_QUEUE_OFFSET(&channel->chan_hdr, queue),
- sig_hdr, sizeof(SIGNAL_QUEUE_HEADER)) < 0) {
+ if (visor_memregion_read(channel->memregion,
+ SIG_QUEUE_OFFSET(&channel->chan_hdr, queue),
+ sig_hdr, sizeof(SIGNAL_QUEUE_HEADER)) < 0) {
ERRDRV("queue=%d SIG_QUEUE_OFFSET=%d",
queue, (int)SIG_QUEUE_OFFSET(&channel->chan_hdr, queue));
- FAIL("memregion_read of signal queue failed", FALSE);
+ FAIL("visor_memregion_read of signal queue failed", FALSE);
}
RETBOOL(TRUE);
Away:
int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
sig_hdr, slot);
if (is_write) {
- if (memregion_write(channel->memregion, signal_data_offset,
- data, sig_hdr->SignalSize) < 0)
- FAIL("memregion_write of signal data failed", FALSE);
+ if (visor_memregion_write(channel->memregion,
+ signal_data_offset,
+ data, sig_hdr->SignalSize) < 0)
+ FAIL("visor_memregion_write of signal data failed",
+ FALSE);
} else {
- if (memregion_read(channel->memregion, signal_data_offset,
- data, sig_hdr->SignalSize) < 0)
- FAIL("memregion_read of signal data failed", FALSE);
+ if (visor_memregion_read(channel->memregion, signal_data_offset,
+ data, sig_hdr->SignalSize) < 0)
+ FAIL("visor_memregion_read of signal data failed",
+ FALSE);
}
RETBOOL(TRUE);
Away:
*/
MEMORYBARRIER;
if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, Tail))
- FAIL("memregion_write of Tail failed", FALSE);
+ FAIL("visor_memregion_write of Tail failed", FALSE);
if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, NumSignalsReceived))
- FAIL("memregion_write of NumSignalsReceived failed", FALSE);
+ FAIL("visor_memregion_write of NumSignalsReceived failed",
+ FALSE);
RETBOOL(TRUE);
*/
MEMORYBARRIER;
if (!SIG_WRITE_FIELD(channel, queue, &unsafe_sqh, Tail))
- FAIL("memregion_write of Tail failed", FALSE);
+ FAIL("visor_memregion_write of Tail failed", FALSE);
if (!SIG_WRITE_FIELD(channel, queue, &unsafe_sqh, NumSignalsReceived))
- FAIL("memregion_write of NumSignalsReceived failed", FALSE);
+ FAIL("visor_memregion_write of NumSignalsReceived failed",
+ FALSE);
RETBOOL(TRUE);
#endif
sig_hdr.NumOverflows++;
if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, NumOverflows))
- FAIL("memregion_write of NumOverflows failed", FALSE);
+ FAIL("visor_memregion_write of NumOverflows failed",
+ FALSE);
RETBOOL(FALSE);
}
*/
MEMORYBARRIER;
if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, Head))
- FAIL("memregion_write of Head failed", FALSE);
+ FAIL("visor_memregion_write of Head failed", FALSE);
if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, NumSignalsSent))
- FAIL("memregion_write of NumSignalsSent failed", FALSE);
+ FAIL("visor_memregion_write of NumSignalsSent failed", FALSE);
RETBOOL(TRUE);
#endif
unsafe_sqh.NumOverflows++;
if (!SIG_WRITE_FIELD(channel, queue, &unsafe_sqh, NumOverflows))
- FAIL("memregion_write of NumOverflows failed", FALSE);
+ FAIL("visor_memregion_write of NumOverflows failed",
+ FALSE);
RETBOOL(FALSE);
}
*/
MEMORYBARRIER;
if (!SIG_WRITE_FIELD(channel, queue, &unsafe_sqh, Head))
- FAIL("memregion_write of Head failed", FALSE);
+ FAIL("visor_memregion_write of Head failed", FALSE);
if (!SIG_WRITE_FIELD(channel, queue, &unsafe_sqh, NumSignalsSent))
- FAIL("memregion_write of NumSignalsSent failed", FALSE);
+ FAIL("visor_memregion_write of NumSignalsSent failed", FALSE);
RETBOOL(TRUE);
ERRDRV("%s no memregion", __func__);
return;
}
- addr = memregion_get_physaddr(memregion);
- nbytes_region = memregion_get_nbytes(memregion);
+ addr = visor_memregion_get_physaddr(memregion);
+ nbytes_region = visor_memregion_get_nbytes(memregion);
errcode = visorchannel_read(channel, off,
phdr, sizeof(CHANNEL_HEADER));
if (errcode < 0) {
goto Away;
}
seq_printf(seq, "channel %s:\n", s);
- hexDumpToBuffer(fmtbuf, fmtbufsize, " ", buf, len, 16);
+ visor_hexDumpToBuffer(fmtbuf, fmtbufsize, " ", buf, len, 16);
for (i = 0; fmtbuf[i] != '\0'; i++)
seq_printf(seq, "%c", fmtbuf[i]);
p = __va((ulong) (addr));
memcpy(ctx->data, p, bytes);
} else {
- rgn = memregion_create(addr, bytes);
+ rgn = visor_memregion_create(addr, bytes);
if (!rgn)
RETPTR(NULL);
- if (memregion_read(rgn, 0, ctx->data, bytes) < 0)
+ if (visor_memregion_read(rgn, 0, ctx->data, bytes) < 0)
RETPTR(NULL);
}
if (!hasStandardPayloadHeader) {
Away:
if (rgn) {
- memregion_destroy(rgn);
+ visor_memregion_destroy(rgn);
rgn = NULL;
}
if (rc)
typedef void (*SPARREPORTEVENT_COMPLETE_FUNC) (CONTROLVM_MESSAGE *msg,
int status);
-void device_pause_response(ulong busNo, ulong devNo, int response);
+void visorchipset_device_pause_response(ulong busNo, ulong devNo, int response);
BOOL visorchipset_get_bus_info(ulong busNo, VISORCHIPSET_BUS_INFO *busInfo);
BOOL visorchipset_get_device_info(ulong busNo, ulong devNo,
.bus_destroy = bus_destroy_response,
.device_create = device_create_response,
.device_destroy = device_destroy_response,
- .device_pause = device_pause_response,
+ .device_pause = visorchipset_device_pause_response,
.device_resume = device_resume_response,
};
VISORCHIPSET_BUS_INFO *p = (VISORCHIPSET_BUS_INFO *) (v);
if (p->procObject) {
- proc_DestroyObject(p->procObject);
+ visor_proc_DestroyObject(p->procObject);
p->procObject = NULL;
}
kfree(p->name);
visorchannel_GUID_id(&pBusInfo->partitionGuid, s);
pBusInfo->procObject =
- proc_CreateObject(PartitionType, s, (void *) (pBusInfo));
+ visor_proc_CreateObject(PartitionType, s, (void *) (pBusInfo));
if (pBusInfo->procObject == NULL) {
LOGERR("CONTROLVM_BUS_CONFIGURE Failed: busNo=%lu failed to create /proc entry",
busNo);
}
void
-device_pause_response(ulong busNo, ulong devNo, int response)
+visorchipset_device_pause_response(ulong busNo, ulong devNo, int response)
{
device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE,
busNo, devNo, response,
SegmentStateStandby);
}
-EXPORT_SYMBOL_GPL(device_pause_response);
+EXPORT_SYMBOL_GPL(visorchipset_device_pause_response);
static void
device_resume_response(ulong busNo, ulong devNo, int response)
InitPartitionProperties();
InitControlVmProperties();
- PartitionType = proc_CreateType(ProcDir, PartitionTypeNames,
- (const char **) PartitionPropertyNames,
- &show_partition_property);
+ PartitionType = visor_proc_CreateType(ProcDir, PartitionTypeNames,
+ (const char **)
+ PartitionPropertyNames,
+ &show_partition_property);
ControlVmType =
- proc_CreateType(ProcDir, ControlVmTypeNames,
- (const char **) ControlVmPropertyNames,
- &show_controlvm_property);
+ visor_proc_CreateType(ProcDir, ControlVmTypeNames,
+ (const char **) ControlVmPropertyNames,
+ &show_controlvm_property);
- ControlVmObject = proc_CreateObject(ControlVmType, NULL, NULL);
+ ControlVmObject = visor_proc_CreateObject(ControlVmType, NULL, NULL);
/* Setup Installation fields */
installer_file = proc_create("installer", 0644, ProcDir,
}
filexfer_destructor();
if (ControlVmObject) {
- proc_DestroyObject(ControlVmObject);
+ visor_proc_DestroyObject(ControlVmObject);
ControlVmObject = NULL;
}
cleanup_controlvm_structures();
if (ControlVmType) {
- proc_DestroyType(ControlVmType);
+ visor_proc_DestroyType(ControlVmType);
ControlVmType = NULL;
}
if (PartitionType) {
- proc_DestroyType(PartitionType);
+ visor_proc_DestroyType(PartitionType);
PartitionType = NULL;
}
if (diag_proc_dir) {
-CHARQUEUE *charqueue_create(ulong nslots)
+CHARQUEUE *visor_charqueue_create(ulong nslots)
{
int alloc_size = sizeof(CHARQUEUE) + nslots + 1;
CHARQUEUE *cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY);
if (cq == NULL) {
- ERRDRV("charqueue_create allocation failed (alloc_size=%d)",
+ ERRDRV("visor_charqueue_create allocation failed (alloc_size=%d)",
alloc_size);
return NULL;
}
spin_lock_init(&cq->lock);
return cq;
}
-EXPORT_SYMBOL_GPL(charqueue_create);
+EXPORT_SYMBOL_GPL(visor_charqueue_create);
-void charqueue_enqueue(CHARQUEUE *charqueue, unsigned char c)
+void visor_charqueue_enqueue(CHARQUEUE *charqueue, unsigned char c)
{
int alloc_slots = charqueue->nslots+1; /* 1 slot is always empty */
charqueue->buf[charqueue->head] = c;
spin_unlock(&charqueue->lock);
}
-EXPORT_SYMBOL_GPL(charqueue_enqueue);
+EXPORT_SYMBOL_GPL(visor_charqueue_enqueue);
-BOOL charqueue_is_empty(CHARQUEUE *charqueue)
+BOOL visor_charqueue_is_empty(CHARQUEUE *charqueue)
{
BOOL b;
spin_lock(&charqueue->lock);
spin_unlock(&charqueue->lock);
return b;
}
-EXPORT_SYMBOL_GPL(charqueue_is_empty);
+EXPORT_SYMBOL_GPL(visor_charqueue_is_empty);
-int charqueue_dequeue_n(CHARQUEUE *charqueue, unsigned char *buf, int n)
+int visor_charqueue_dequeue_n(CHARQUEUE *charqueue, unsigned char *buf, int n)
{
int rc = -1, counter = 0, c;
spin_unlock(&charqueue->lock);
return rc;
}
-EXPORT_SYMBOL_GPL(charqueue_dequeue_n);
+EXPORT_SYMBOL_GPL(visor_charqueue_dequeue_n);
-void charqueue_destroy(CHARQUEUE *charqueue)
+void visor_charqueue_destroy(CHARQUEUE *charqueue)
{
if (charqueue == NULL)
return;
kfree(charqueue);
}
-EXPORT_SYMBOL_GPL(charqueue_destroy);
+EXPORT_SYMBOL_GPL(visor_charqueue_destroy);
*/
typedef struct CHARQUEUE_Tag CHARQUEUE;
-CHARQUEUE *charqueue_create(ulong nslots);
-void charqueue_enqueue(CHARQUEUE *charqueue, unsigned char c);
+CHARQUEUE *visor_charqueue_create(ulong nslots);
+void visor_charqueue_enqueue(CHARQUEUE *charqueue, unsigned char c);
int charqueue_dequeue(CHARQUEUE *charqueue);
-int charqueue_dequeue_n(CHARQUEUE *charqueue, unsigned char *buf, int n);
-BOOL charqueue_is_empty(CHARQUEUE *charqueue);
-void charqueue_destroy(CHARQUEUE *charqueue);
+int visor_charqueue_dequeue_n(CHARQUEUE *charqueue, unsigned char *buf, int n);
+BOOL visor_charqueue_is_empty(CHARQUEUE *charqueue);
+void visor_charqueue_destroy(CHARQUEUE *charqueue);
#endif
* does it know anything about what information to reveal as part of the proc
* entries. The 2 functions that take care of displaying device and
* driver specific information are passed as parameters to
- * easyproc_InitDriver().
+ * visor_easyproc_InitDriver().
*
* void show_device_info(struct seq_file *seq, void *p);
* void show_driver_info(struct seq_file *seq);
*
* The second parameter to show_device_info is actually a pointer to the
* device-specific info to show. It is the context that was originally
- * passed to easyproc_InitDevice().
+ * passed to visor_easyproc_InitDevice().
*
******************************************************************************
*/
-void easyproc_InitDriver(struct easyproc_driver_info *pdriver,
- char *procId,
- void (*show_driver_info)(struct seq_file *),
- void (*show_device_info)(struct seq_file *, void *))
+void visor_easyproc_InitDriver(struct easyproc_driver_info *pdriver,
+ char *procId,
+ void (*show_driver_info)(struct seq_file *),
+ void (*show_device_info)(struct seq_file *,
+ void *))
{
memset(pdriver, 0, sizeof(struct easyproc_driver_info));
pdriver->ProcId = procId;
pdriver->ProcId);
}
}
-EXPORT_SYMBOL_GPL(easyproc_InitDriver);
-
-
-
-void easyproc_InitDriverEx(struct easyproc_driver_info *pdriver,
- char *procId,
- void (*show_driver_info)(struct seq_file *),
- void (*show_device_info)(struct seq_file *, void *),
- void (*write_driver_info)(char *buf, size_t count,
- loff_t *ppos),
- void (*write_device_info)(char *buf, size_t count,
- loff_t *ppos, void *p))
+EXPORT_SYMBOL_GPL(visor_easyproc_InitDriver);
+
+
+
+void visor_easyproc_InitDriverEx(struct easyproc_driver_info *pdriver,
+ char *procId,
+ void (*show_driver_info)(struct seq_file *),
+ void (*show_device_info)(struct seq_file *,
+ void *),
+ void (*write_driver_info)(char *buf,
+ size_t count,
+ loff_t *ppos),
+ void (*write_device_info)(char *buf,
+ size_t count,
+ loff_t *ppos,
+ void *p))
{
- easyproc_InitDriver(pdriver, procId,
- show_driver_info, show_device_info);
+ visor_easyproc_InitDriver(pdriver, procId,
+ show_driver_info, show_device_info);
pdriver->Write_driver_info = write_driver_info;
pdriver->Write_device_info = write_device_info;
}
-EXPORT_SYMBOL_GPL(easyproc_InitDriverEx);
+EXPORT_SYMBOL_GPL(visor_easyproc_InitDriverEx);
-void easyproc_DeInitDriver(struct easyproc_driver_info *pdriver)
+void visor_easyproc_DeInitDriver(struct easyproc_driver_info *pdriver)
{
if (pdriver->ProcDriverDiagFile != NULL) {
remove_proc_entry("diag", pdriver->ProcDriverDir);
pdriver->Write_driver_info = NULL;
pdriver->Write_device_info = NULL;
}
-EXPORT_SYMBOL_GPL(easyproc_DeInitDriver);
+EXPORT_SYMBOL_GPL(visor_easyproc_DeInitDriver);
-void easyproc_InitDevice(struct easyproc_driver_info *pdriver,
- struct easyproc_device_info *p, int devno,
- void *devdata)
+void visor_easyproc_InitDevice(struct easyproc_driver_info *pdriver,
+ struct easyproc_device_info *p, int devno,
+ void *devdata)
{
if ((pdriver->ProcDeviceDir != NULL) && (p->procDevicexDir == NULL)) {
char s[29];
memset(&(p->device_property_info[0]), 0,
sizeof(p->device_property_info));
}
-EXPORT_SYMBOL_GPL(easyproc_InitDevice);
+EXPORT_SYMBOL_GPL(visor_easyproc_InitDevice);
-void easyproc_CreateDeviceProperty(struct easyproc_device_info *p,
- void (*show_property_info)(struct seq_file *, void *),
- char *property_name)
+void visor_easyproc_CreateDeviceProperty(struct easyproc_device_info *p,
+ void (*show_property_info)
+ (struct seq_file *, void *),
+ char *property_name)
{
size_t i;
struct easyproc_device_property_info *px = NULL;
}
px->show_device_property_info = show_property_info;
}
-EXPORT_SYMBOL_GPL(easyproc_CreateDeviceProperty);
+EXPORT_SYMBOL_GPL(visor_easyproc_CreateDeviceProperty);
-void easyproc_DeInitDevice(struct easyproc_driver_info *pdriver,
- struct easyproc_device_info *p, int devno)
+void visor_easyproc_DeInitDevice(struct easyproc_driver_info *pdriver,
+ struct easyproc_device_info *p, int devno)
{
size_t i;
for (i = 0; i < ARRAY_SIZE(p->device_property_info); i++) {
p->devdata = NULL;
p->pdriver = NULL;
}
-EXPORT_SYMBOL_GPL(easyproc_DeInitDevice);
+EXPORT_SYMBOL_GPL(visor_easyproc_DeInitDevice);
struct easyproc_device_property_info device_property_info[10];
};
-void easyproc_InitDevice(struct easyproc_driver_info *pdriver,
- struct easyproc_device_info *p, int devno,
- void *devdata);
-void easyproc_DeInitDevice(struct easyproc_driver_info *pdriver,
- struct easyproc_device_info *p, int devno);
-void easyproc_InitDriver(struct easyproc_driver_info *pdriver,
- char *procId,
- void (*show_driver_info)(struct seq_file *),
- void (*show_device_info)(struct seq_file *, void *));
-void easyproc_InitDriverEx(struct easyproc_driver_info *pdriver,
- char *procId,
- void (*show_driver_info)(struct seq_file *),
- void (*show_device_info)(struct seq_file *, void *),
- void (*Write_driver_info)(char *buf, size_t count,
- loff_t *ppos),
- void (*Write_device_info)(char *buf, size_t count,
- loff_t *ppos, void *p));
-void easyproc_DeInitDriver(struct easyproc_driver_info *pdriver);
-void easyproc_CreateDeviceProperty(struct easyproc_device_info *p,
- void (*show_property_info)(struct seq_file *, void *),
- char *property_name);
+void visor_easyproc_InitDevice(struct easyproc_driver_info *pdriver,
+ struct easyproc_device_info *p, int devno,
+ void *devdata);
+void visor_easyproc_DeInitDevice(struct easyproc_driver_info *pdriver,
+ struct easyproc_device_info *p, int devno);
+void visor_easyproc_InitDriver(struct easyproc_driver_info *pdriver,
+ char *procId,
+ void (*show_driver_info)(struct seq_file *),
+ void (*show_device_info)(struct seq_file *,
+ void *));
+void visor_easyproc_InitDriverEx(struct easyproc_driver_info *pdriver,
+ char *procId,
+ void (*show_driver_info)(struct seq_file *),
+ void (*show_device_info)(struct seq_file *,
+ void *),
+ void (*Write_driver_info)(char *buf,
+ size_t count,
+ loff_t *ppos),
+ void (*Write_device_info)(char *buf,
+ size_t count,
+ loff_t *ppos,
+ void *p));
+void visor_easyproc_DeInitDriver(struct easyproc_driver_info *pdriver);
+void visor_easyproc_CreateDeviceProperty(struct easyproc_device_info *p,
+ void (*show_property_info)
+ (struct seq_file *, void *),
+ char *property_name);
#endif
*/
typedef struct MEMREGION_Tag MEMREGION;
-MEMREGION *memregion_create(HOSTADDRESS physaddr, ulong nbytes);
-MEMREGION *memregion_create_overlapped(MEMREGION *parent,
- ulong offset, ulong nbytes);
-int memregion_resize(MEMREGION *memregion, ulong newsize);
-int memregion_read(MEMREGION *memregion,
+MEMREGION *visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes);
+MEMREGION *visor_memregion_create_overlapped(MEMREGION *parent,
+ ulong offset, ulong nbytes);
+int visor_memregion_resize(MEMREGION *memregion, ulong newsize);
+int visor_memregion_read(MEMREGION *memregion,
ulong offset, void *dest, ulong nbytes);
-int memregion_write(MEMREGION *memregion,
- ulong offset, void *src, ulong nbytes);
-void memregion_destroy(MEMREGION *memregion);
-HOSTADDRESS memregion_get_physaddr(MEMREGION *memregion);
-ulong memregion_get_nbytes(MEMREGION *memregion);
+int visor_memregion_write(MEMREGION *memregion,
+ ulong offset, void *src, ulong nbytes);
+void visor_memregion_destroy(MEMREGION *memregion);
+HOSTADDRESS visor_memregion_get_physaddr(MEMREGION *memregion);
+ulong visor_memregion_get_nbytes(MEMREGION *memregion);
void memregion_dump(MEMREGION *memregion, char *s,
ulong off, ulong len, struct seq_file *seq);
-void *memregion_get_pointer(MEMREGION *memregion);
+void *visor_memregion_get_pointer(MEMREGION *memregion);
#endif
static void unmapit(MEMREGION *memregion);
MEMREGION *
-memregion_create(HOSTADDRESS physaddr, ulong nbytes)
+visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes)
{
MEMREGION *rc = NULL;
MEMREGION *memregion = kmalloc(sizeof(MEMREGION),
GFP_KERNEL|__GFP_NORETRY);
if (memregion == NULL) {
- ERRDRV("memregion_create allocation failed");
+ ERRDRV("visor_memregion_create allocation failed");
return NULL;
}
memset(memregion, 0, sizeof(MEMREGION));
Away:
if (rc == NULL) {
if (memregion != NULL) {
- memregion_destroy(memregion);
+ visor_memregion_destroy(memregion);
memregion = NULL;
}
}
return rc;
}
-EXPORT_SYMBOL_GPL(memregion_create);
+EXPORT_SYMBOL_GPL(visor_memregion_create);
MEMREGION *
-memregion_create_overlapped(MEMREGION *parent, ulong offset, ulong nbytes)
+visor_memregion_create_overlapped(MEMREGION *parent, ulong offset, ulong nbytes)
{
MEMREGION *memregion = NULL;
memregion->overlapped = TRUE;
return memregion;
}
-EXPORT_SYMBOL_GPL(memregion_create_overlapped);
+EXPORT_SYMBOL_GPL(visor_memregion_create_overlapped);
static BOOL
}
HOSTADDRESS
-memregion_get_physaddr(MEMREGION *memregion)
+visor_memregion_get_physaddr(MEMREGION *memregion)
{
return memregion->physaddr;
}
-EXPORT_SYMBOL_GPL(memregion_get_physaddr);
+EXPORT_SYMBOL_GPL(visor_memregion_get_physaddr);
ulong
-memregion_get_nbytes(MEMREGION *memregion)
+visor_memregion_get_nbytes(MEMREGION *memregion)
{
return memregion->nbytes;
}
-EXPORT_SYMBOL_GPL(memregion_get_nbytes);
+EXPORT_SYMBOL_GPL(visor_memregion_get_nbytes);
void *
-memregion_get_pointer(MEMREGION *memregion)
+visor_memregion_get_pointer(MEMREGION *memregion)
{
return memregion->mapped;
}
-EXPORT_SYMBOL_GPL(memregion_get_pointer);
+EXPORT_SYMBOL_GPL(visor_memregion_get_pointer);
int
-memregion_resize(MEMREGION *memregion, ulong newsize)
+visor_memregion_resize(MEMREGION *memregion, ulong newsize)
{
if (newsize == memregion->nbytes)
return 0;
}
return 0;
}
-EXPORT_SYMBOL_GPL(memregion_resize);
+EXPORT_SYMBOL_GPL(visor_memregion_resize);
static int
}
int
-memregion_read(MEMREGION *memregion, ulong offset, void *dest, ulong nbytes)
+visor_memregion_read(MEMREGION *memregion, ulong offset, void *dest,
+ ulong nbytes)
{
return memregion_readwrite(FALSE, memregion, offset, dest, nbytes);
}
-EXPORT_SYMBOL_GPL(memregion_read);
+EXPORT_SYMBOL_GPL(visor_memregion_read);
int
-memregion_write(MEMREGION *memregion, ulong offset, void *src, ulong nbytes)
+visor_memregion_write(MEMREGION *memregion, ulong offset, void *src,
+ ulong nbytes)
{
return memregion_readwrite(TRUE, memregion, offset, src, nbytes);
}
-EXPORT_SYMBOL_GPL(memregion_write);
+EXPORT_SYMBOL_GPL(visor_memregion_write);
void
-memregion_destroy(MEMREGION *memregion)
+visor_memregion_destroy(MEMREGION *memregion)
{
if (memregion == NULL)
return;
unmapit(memregion);
kfree(memregion);
}
-EXPORT_SYMBOL_GPL(memregion_destroy);
+EXPORT_SYMBOL_GPL(visor_memregion_destroy);
-PERIODIC_WORK *periodic_work_create(ulong jiffy_interval,
- struct workqueue_struct *workqueue,
- void (*workfunc)(void *),
- void *workfuncarg,
- const char *devnam)
+PERIODIC_WORK *visor_periodic_work_create(ulong jiffy_interval,
+ struct workqueue_struct *workqueue,
+ void (*workfunc)(void *),
+ void *workfuncarg,
+ const char *devnam)
{
PERIODIC_WORK *periodic_work = kmalloc(sizeof(PERIODIC_WORK),
GFP_KERNEL|__GFP_NORETRY);
periodic_work->devnam = devnam;
return periodic_work;
}
-EXPORT_SYMBOL_GPL(periodic_work_create);
+EXPORT_SYMBOL_GPL(visor_periodic_work_create);
-void periodic_work_destroy(PERIODIC_WORK *periodic_work)
+void visor_periodic_work_destroy(PERIODIC_WORK *periodic_work)
{
if (periodic_work == NULL)
return;
kfree(periodic_work);
}
-EXPORT_SYMBOL_GPL(periodic_work_destroy);
+EXPORT_SYMBOL_GPL(visor_periodic_work_destroy);
* If this function returns FALSE, there was a failure and the
* periodic work is no longer scheduled
*/
-BOOL periodic_work_nextperiod(PERIODIC_WORK *periodic_work)
+BOOL visor_periodic_work_nextperiod(PERIODIC_WORK *periodic_work)
{
BOOL rc = FALSE;
write_lock(&periodic_work->lock);
if (periodic_work->want_to_stop) {
periodic_work->is_scheduled = FALSE;
periodic_work->want_to_stop = FALSE;
- RETBOOL(TRUE); /* yes, TRUE; see periodic_work_stop() */
+ RETBOOL(TRUE); /* yes, TRUE; see visor_periodic_work_stop() */
} else if (queue_delayed_work(periodic_work->workqueue,
&periodic_work->work,
periodic_work->jiffy_interval) < 0) {
write_unlock(&periodic_work->lock);
return rc;
}
-EXPORT_SYMBOL_GPL(periodic_work_nextperiod);
+EXPORT_SYMBOL_GPL(visor_periodic_work_nextperiod);
* If this function returns FALSE, then no work was started
* (either because it was already started, or because of a failure).
*/
-BOOL periodic_work_start(PERIODIC_WORK *periodic_work)
+BOOL visor_periodic_work_start(PERIODIC_WORK *periodic_work)
{
BOOL rc = FALSE;
return rc;
}
-EXPORT_SYMBOL_GPL(periodic_work_start);
+EXPORT_SYMBOL_GPL(visor_periodic_work_start);
*
* Do NOT call this function from some function that is running on the
* same workqueue as the work you are trying to stop might be running
- * on! If you violate this rule, periodic_work_stop() MIGHT work, but it
- * also MIGHT get hung up in an infinite loop saying
+ * on! If you violate this rule, visor_periodic_work_stop() MIGHT work,
+ * but it also MIGHT get hung up in an infinite loop saying
* "waiting for delayed work...". This will happen if the delayed work
* you are trying to cancel has been put in the workqueue list, but can't
* run yet because we are running that same workqueue thread right now.
*
- * Bottom line: If you need to call periodic_work_stop() from a workitem,
- * be sure the workitem is on a DIFFERENT workqueue than the workitem that
- * you are trying to cancel.
+ * Bottom line: If you need to call visor_periodic_work_stop() from a
+ * workitem, be sure the workitem is on a DIFFERENT workqueue than the
+ * workitem that you are trying to cancel.
*
* If I could figure out some way to check for this "no no" condition in
* the code, I would. It would have saved me the trouble of writing this
* this deadlock, you will get hung up in an infinite loop saying
* "waiting for delayed work...".
*/
-BOOL periodic_work_stop(PERIODIC_WORK *periodic_work)
+BOOL visor_periodic_work_stop(PERIODIC_WORK *periodic_work)
{
BOOL stopped_something = FALSE;
WARNDEV(periodic_work->devnam,
"waiting for delayed work...");
/* We rely on the delayed work function running here,
- * and eventually calling periodic_work_nextperiod(),
+ * and eventually calling
+ * visor_periodic_work_nextperiod(),
* which will see that want_to_stop is set, and
* subsequently clear is_scheduled.
*/
write_unlock(&periodic_work->lock);
return stopped_something;
}
-EXPORT_SYMBOL_GPL(periodic_work_stop);
+EXPORT_SYMBOL_GPL(visor_periodic_work_stop);
-MYPROCTYPE *proc_CreateType(struct proc_dir_entry *procDirRoot,
- const char **name,
- const char **propertyNames,
- void (*show_property)(struct seq_file *,
- void *, int))
+MYPROCTYPE *visor_proc_CreateType(struct proc_dir_entry *procDirRoot,
+ const char **name,
+ const char **propertyNames,
+ void (*show_property)(struct seq_file *,
+ void *, int))
{
int i = 0;
MYPROCTYPE *rc = NULL, *type = NULL;
Away:
if (rc == NULL) {
if (type != NULL) {
- proc_DestroyType(type);
+ visor_proc_DestroyType(type);
type = NULL;
}
}
return rc;
}
-EXPORT_SYMBOL_GPL(proc_CreateType);
+EXPORT_SYMBOL_GPL(visor_proc_CreateType);
-void proc_DestroyType(MYPROCTYPE *type)
+void visor_proc_DestroyType(MYPROCTYPE *type)
{
if (type == NULL)
return;
}
kfree(type);
}
-EXPORT_SYMBOL_GPL(proc_DestroyType);
+EXPORT_SYMBOL_GPL(visor_proc_DestroyType);
-MYPROCOBJECT *proc_CreateObject(MYPROCTYPE *type,
- const char *name, void *context)
+MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type,
+ const char *name, void *context)
{
MYPROCOBJECT *obj = NULL, *rc = NULL;
int i = 0;
Away:
if (rc == NULL) {
if (obj != NULL) {
- proc_DestroyObject(obj);
+ visor_proc_DestroyObject(obj);
obj = NULL;
}
}
return rc;
}
-EXPORT_SYMBOL_GPL(proc_CreateObject);
+EXPORT_SYMBOL_GPL(visor_proc_CreateObject);
-void proc_DestroyObject(MYPROCOBJECT *obj)
+void visor_proc_DestroyObject(MYPROCOBJECT *obj)
{
MYPROCTYPE *type = NULL;
if (obj == NULL)
}
kfree(obj);
}
-EXPORT_SYMBOL_GPL(proc_DestroyObject);
+EXPORT_SYMBOL_GPL(visor_proc_DestroyObject);
* (not including the trailing '\0' byte)
* @ingroup internal
*/
-int hexDumpToBuffer(char *dest, int destSize, char *prefix, char *src,
- int srcLen, int bytesToDumpPerLine)
+int visor_hexDumpToBuffer(char *dest, int destSize, char *prefix, char *src,
+ int srcLen, int bytesToDumpPerLine)
{
int i = 0;
int pos = 0;
vfree(line);
return rc;
}
-EXPORT_SYMBOL_GPL(hexDumpToBuffer);
+EXPORT_SYMBOL_GPL(visor_hexDumpToBuffer);
/** Callers to interfaces that set __GFP_NORETRY flag below
/* Use these handy-dandy seq_file_xxx functions if you want to call some
* functions that write stuff into a seq_file, but you actually just want
* to dump that output into a buffer. Use them as follows:
- * - call seq_file_new_buffer to create the seq_file (you supply the buf)
+ * - call visor_seq_file_new_buffer to create the seq_file (you supply the buf)
* - call whatever functions you want that take a seq_file as an argument
* (the buf you supplied will get the output data)
- * - call seq_file_done_buffer to dispose of your seq_file
+ * - call visor_seq_file_done_buffer to dispose of your seq_file
*/
-struct seq_file *seq_file_new_buffer(void *buf, size_t buf_size)
+struct seq_file *visor_seq_file_new_buffer(void *buf, size_t buf_size)
{
struct seq_file *rc = NULL;
struct seq_file *m = kmalloc_kernel(sizeof(struct seq_file));
RETPTR(m);
Away:
if (rc == NULL) {
- seq_file_done_buffer(m);
+ visor_seq_file_done_buffer(m);
m = NULL;
}
return rc;
}
-EXPORT_SYMBOL_GPL(seq_file_new_buffer);
+EXPORT_SYMBOL_GPL(visor_seq_file_new_buffer);
-void seq_file_done_buffer(struct seq_file *m)
+void visor_seq_file_done_buffer(struct seq_file *m)
{
if (!m)
return;
kfree(m);
}
-EXPORT_SYMBOL_GPL(seq_file_done_buffer);
+EXPORT_SYMBOL_GPL(visor_seq_file_done_buffer);