aboutsummaryrefslogtreecommitdiff
path: root/linux-core/xgi_pcie.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-07-09 15:59:09 -0700
committerIan Romanick <idr@us.ibm.com>2007-07-09 15:59:09 -0700
commit2f2d8b9688743ac6367bf13c3c023310a257ceb7 (patch)
treeeb129f17d3efbe7a642e8a9a80c5408ad9c117b6 /linux-core/xgi_pcie.c
parent86e75b7f7f64643c6ef2c0fef353b38753df8239 (diff)
Merge xgi_mem_req and xgi_mem_alloc into a single type.
These two structures were used as the request and reply for certain ioctls. Having a different type for an ioctl's input and output is just wierd. In addition, each structure contained fields (e.g., pid) that had no business being there. This change requires updates to user-space.
Diffstat (limited to 'linux-core/xgi_pcie.c')
-rw-r--r--linux-core/xgi_pcie.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/linux-core/xgi_pcie.c b/linux-core/xgi_pcie.c
index 82111249..0f82e4ec 100644
--- a/linux-core/xgi_pcie.c
+++ b/linux-core/xgi_pcie.c
@@ -764,14 +764,13 @@ static struct xgi_pcie_block *xgi_pcie_mem_free(struct xgi_info * info,
return (used_block);
}
-void xgi_pcie_alloc(struct xgi_info * info, unsigned long size,
- enum PcieOwner owner, struct xgi_mem_alloc * alloc)
+void xgi_pcie_alloc(struct xgi_info * info, struct xgi_mem_alloc * alloc,
+ pid_t pid)
{
struct xgi_pcie_block *block;
- struct xgi_mem_pid *mempid_block;
xgi_down(info->pcie_sem);
- block = xgi_pcie_mem_alloc(info, size, owner);
+ block = xgi_pcie_mem_alloc(info, alloc->size, alloc->owner);
xgi_up(info->pcie_sem);
if (block == NULL) {
@@ -794,17 +793,18 @@ void xgi_pcie_alloc(struct xgi_info * info, unsigned long size,
PCIE_3D request means a opengl process created.
PCIE_3D_TEXTURE request means texture cannot alloc from fb.
*/
- if (owner == PCIE_3D || owner == PCIE_3D_TEXTURE) {
- mempid_block =
+ if ((alloc->owner == PCIE_3D)
+ || (alloc->owner == PCIE_3D_TEXTURE)) {
+ struct xgi_mem_pid *mempid_block =
kmalloc(sizeof(struct xgi_mem_pid), GFP_KERNEL);
if (!mempid_block)
XGI_ERROR("mempid_block alloc failed\n");
mempid_block->location = XGI_MEMLOC_NON_LOCAL;
- if (owner == PCIE_3D)
+ if (alloc->owner == PCIE_3D)
mempid_block->bus_addr = 0xFFFFFFFF; /*xgi_pcie_vertex_block has the address */
else
mempid_block->bus_addr = alloc->bus_addr;
- mempid_block->pid = alloc->pid;
+ mempid_block->pid = pid;
XGI_INFO
("Memory ProcessID add one pcie block pid:%ld successfully! \n",
@@ -944,15 +944,6 @@ void *xgi_find_pcie_virt(struct xgi_info * info, unsigned long address)
return NULL;
}
-void xgi_read_pcie_mem(struct xgi_info * info, struct xgi_mem_req * req)
-{
-
-}
-
-void xgi_write_pcie_mem(struct xgi_info * info, struct xgi_mem_req * req)
-{
-}
-
/*
address -- GE hw address
*/