Convert xgi_mem_location enum values to less generic names.

main
Ian Romanick 2007-06-29 21:38:48 -07:00
parent 32584d94e6
commit 49ccec1b08
4 changed files with 14 additions and 14 deletions

View File

@ -158,9 +158,9 @@ struct xgi_ioctl_post_vbios {
};
enum xgi_mem_location {
NON_LOCAL = 0,
LOCAL = 1,
INVALID = 0x7fffffff
XGI_MEMLOC_NON_LOCAL = 0,
XGI_MEMLOC_LOCAL = 1,
XGI_MEMLOC_INVALID = 0x7fffffff
};
enum PcieOwner {

View File

@ -48,7 +48,7 @@ void xgi_fb_alloc(struct xgi_info * info,
struct xgi_mem_pid *mempid_block;
if (req->is_front) {
alloc->location = LOCAL;
alloc->location = XGI_MEMLOC_LOCAL;
alloc->bus_addr = info->fb.base;
alloc->hw_addr = 0;
XGI_INFO
@ -59,7 +59,7 @@ void xgi_fb_alloc(struct xgi_info * info,
xgi_up(info->fb_sem);
if (block == NULL) {
alloc->location = LOCAL;
alloc->location = XGI_MEMLOC_LOCAL;
alloc->size = 0;
alloc->bus_addr = 0;
alloc->hw_addr = 0;
@ -67,7 +67,7 @@ void xgi_fb_alloc(struct xgi_info * info,
} else {
XGI_INFO("Video RAM allocation succeeded: 0x%p\n",
(char *)block->offset);
alloc->location = LOCAL;
alloc->location = XGI_MEMLOC_LOCAL;
alloc->size = block->size;
alloc->bus_addr = info->fb.base + block->offset;
alloc->hw_addr = block->offset;
@ -75,7 +75,7 @@ void xgi_fb_alloc(struct xgi_info * info,
/* manage mempid */
mempid_block =
kmalloc(sizeof(struct xgi_mem_pid), GFP_KERNEL);
mempid_block->location = LOCAL;
mempid_block->location = XGI_MEMLOC_LOCAL;
mempid_block->bus_addr = alloc->bus_addr;
mempid_block->pid = alloc->pid;
@ -111,7 +111,7 @@ void xgi_fb_free(struct xgi_info * info, unsigned long bus_addr)
/* manage mempid */
list_for_each_entry(mempid_block, &xgi_mempid_list, list) {
if (mempid_block->location == LOCAL
if (mempid_block->location == XGI_MEMLOC_LOCAL
&& mempid_block->bus_addr == bus_addr) {
mempid_freeblock = mempid_block;
break;

View File

@ -578,7 +578,7 @@ void xgi_mem_collect(struct xgi_info * info, unsigned int *pcnt)
}
}
if (!find) {
if (block->location == LOCAL) {
if (block->location == XGI_MEMLOC_LOCAL) {
XGI_INFO
("Memory ProcessID free fb and delete one block pid:%ld addr:0x%lx successfully! \n",
block->pid, block->bus_addr);

View File

@ -775,7 +775,7 @@ void xgi_pcie_alloc(struct xgi_info * info, unsigned long size,
xgi_up(info->pcie_sem);
if (block == NULL) {
alloc->location = INVALID;
alloc->location = XGI_MEMLOC_INVALID;
alloc->size = 0;
alloc->bus_addr = 0;
alloc->hw_addr = 0;
@ -784,7 +784,7 @@ void xgi_pcie_alloc(struct xgi_info * info, unsigned long size,
XGI_INFO
("PCIE RAM allocation succeeded: offset = 0x%lx, bus_addr = 0x%lx\n",
block->offset, block->bus_addr);
alloc->location = NON_LOCAL;
alloc->location = XGI_MEMLOC_NON_LOCAL;
alloc->size = block->size;
alloc->bus_addr = block->bus_addr;
alloc->hw_addr = block->hw_addr;
@ -799,7 +799,7 @@ void xgi_pcie_alloc(struct xgi_info * info, unsigned long size,
kmalloc(sizeof(struct xgi_mem_pid), GFP_KERNEL);
if (!mempid_block)
XGI_ERROR("mempid_block alloc failed\n");
mempid_block->location = NON_LOCAL;
mempid_block->location = XGI_MEMLOC_NON_LOCAL;
if (owner == PCIE_3D)
mempid_block->bus_addr = 0xFFFFFFFF; /*xgi_pcie_vertex_block has the address */
else
@ -832,7 +832,7 @@ void xgi_pcie_free(struct xgi_info * info, unsigned long bus_addr)
processcnt = 0;
list_for_each_entry(mempid_block, &xgi_mempid_list, list) {
if (mempid_block->location == NON_LOCAL
if (mempid_block->location == XGI_MEMLOC_NON_LOCAL
&& mempid_block->bus_addr == 0xFFFFFFFF) {
++processcnt;
}
@ -855,7 +855,7 @@ void xgi_pcie_free(struct xgi_info * info, unsigned long bus_addr)
/* manage mempid */
list_for_each_entry(mempid_block, &xgi_mempid_list, list) {
if (mempid_block->location == NON_LOCAL
if (mempid_block->location == XGI_MEMLOC_NON_LOCAL
&& ((isvertex && mempid_block->bus_addr == 0xFFFFFFFF)
|| (!isvertex && mempid_block->bus_addr == bus_addr))) {
mempid_freeblock = mempid_block;