git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
arch
/
ppc64
/
kernel
/
viopath.c
diff --git
a/arch/ppc64/kernel/viopath.c
b/arch/ppc64/kernel/viopath.c
index
3fbdd00
..
74f185e
100644
(file)
--- a/
arch/ppc64/kernel/viopath.c
+++ b/
arch/ppc64/kernel/viopath.c
@@
-37,8
+37,10
@@
#include <linux/dma-mapping.h>
#include <linux/wait.h>
#include <linux/seq_file.h>
#include <linux/dma-mapping.h>
#include <linux/wait.h>
#include <linux/seq_file.h>
+#include <linux/smp_lock.h>
+#include <linux/interrupt.h>
-#include <asm/
hardirq
.h>
+#include <asm/
system
.h>
#include <asm/uaccess.h>
#include <asm/iSeries/LparData.h>
#include <asm/iSeries/HvLpEvent.h>
#include <asm/uaccess.h>
#include <asm/iSeries/LparData.h>
#include <asm/iSeries/HvLpEvent.h>
@@
-62,7
+64,7
@@
static struct viopathStatus {
int numberAllocated;
} viopathStatus[HVMAXARCHITECTEDLPS];
int numberAllocated;
} viopathStatus[HVMAXARCHITECTEDLPS];
-static
spinlock_t statuslock = SPIN_LOCK_UNLOCKED
;
+static
DEFINE_SPINLOCK(statuslock)
;
/*
* For each kind of event we allocate a buffer that is
/*
* For each kind of event we allocate a buffer that is
@@
-108,85
+110,6
@@
static vio_event_handler_t *vio_handler[VIO_MAX_SUBTYPES];
#define VIOPATH_KERN_WARN KERN_WARNING "viopath: "
#define VIOPATH_KERN_INFO KERN_INFO "viopath: "
#define VIOPATH_KERN_WARN KERN_WARNING "viopath: "
#define VIOPATH_KERN_INFO KERN_INFO "viopath: "
-static unsigned char e2a(unsigned char x)
-{
- switch (x) {
- case 0xF0:
- return '0';
- case 0xF1:
- return '1';
- case 0xF2:
- return '2';
- case 0xF3:
- return '3';
- case 0xF4:
- return '4';
- case 0xF5:
- return '5';
- case 0xF6:
- return '6';
- case 0xF7:
- return '7';
- case 0xF8:
- return '8';
- case 0xF9:
- return '9';
- case 0xC1:
- return 'A';
- case 0xC2:
- return 'B';
- case 0xC3:
- return 'C';
- case 0xC4:
- return 'D';
- case 0xC5:
- return 'E';
- case 0xC6:
- return 'F';
- case 0xC7:
- return 'G';
- case 0xC8:
- return 'H';
- case 0xC9:
- return 'I';
- case 0xD1:
- return 'J';
- case 0xD2:
- return 'K';
- case 0xD3:
- return 'L';
- case 0xD4:
- return 'M';
- case 0xD5:
- return 'N';
- case 0xD6:
- return 'O';
- case 0xD7:
- return 'P';
- case 0xD8:
- return 'Q';
- case 0xD9:
- return 'R';
- case 0xE2:
- return 'S';
- case 0xE3:
- return 'T';
- case 0xE4:
- return 'U';
- case 0xE5:
- return 'V';
- case 0xE6:
- return 'W';
- case 0xE7:
- return 'X';
- case 0xE8:
- return 'Y';
- case 0xE9:
- return 'Z';
- }
- return ' ';
-}
-
static int proc_viopath_show(struct seq_file *m, void *v)
{
char *buf;
static int proc_viopath_show(struct seq_file *m, void *v)
{
char *buf;
@@
-550,7
+473,7
@@
static int allocateEvents(HvLpIndex remoteLp, int numEvents)
parms.used_wait_atomic = 0;
parms.sem = &Semaphore;
}
parms.used_wait_atomic = 0;
parms.sem = &Semaphore;
}
- mf_allocate
LpEvents(remoteLp, HvLpEvent_Type_VirtualIo, 250,
/* It would be nice to put a real number here! */
+ mf_allocate
_lp_events(remoteLp, HvLpEvent_Type_VirtualIo, 250,
/* It would be nice to put a real number here! */
numEvents, &viopath_donealloc, &parms);
if (in_atomic()) {
while (atomic_read(&wait_atomic))
numEvents, &viopath_donealloc, &parms);
if (in_atomic()) {
while (atomic_read(&wait_atomic))
@@
-659,7
+582,7
@@
int viopath_close(HvLpIndex remoteLp, int subtype, int numReq)
doneAllocParms.used_wait_atomic = 0;
doneAllocParms.sem = &Semaphore;
doneAllocParms.used_wait_atomic = 0;
doneAllocParms.sem = &Semaphore;
- mf_deallocate
LpE
vents(remoteLp, HvLpEvent_Type_VirtualIo,
+ mf_deallocate
_lp_e
vents(remoteLp, HvLpEvent_Type_VirtualIo,
numReq, &viopath_donealloc, &doneAllocParms);
down(&Semaphore);
numReq, &viopath_donealloc, &doneAllocParms);
down(&Semaphore);