Lines Matching refs:mem

679 static int agp_generic_insert_memory(agp_memory * mem,  in agp_generic_insert_memory()  argument
712 if (type != 0 || mem->type != 0) { in agp_generic_insert_memory()
716 if ((pg_start + mem->page_count) > num_entries) { in agp_generic_insert_memory()
721 while (j < (pg_start + mem->page_count)) { in agp_generic_insert_memory()
728 if (mem->is_flushed == FALSE) { in agp_generic_insert_memory()
730 mem->is_flushed = TRUE; in agp_generic_insert_memory()
732 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { in agp_generic_insert_memory()
734 agp_bridge.mask_memory(mem->memory[i], mem->type); in agp_generic_insert_memory()
737 agp_bridge.tlb_flush(mem); in agp_generic_insert_memory()
741 static int agp_generic_remove_memory(agp_memory * mem, off_t pg_start, in agp_generic_remove_memory() argument
746 if (type != 0 || mem->type != 0) { in agp_generic_remove_memory()
750 for (i = pg_start; i < (mem->page_count + pg_start); i++) { in agp_generic_remove_memory()
755 agp_bridge.tlb_flush(mem); in agp_generic_remove_memory()
965 static void intel_i810_tlbflush(agp_memory * mem) in intel_i810_tlbflush() argument
975 static int intel_i810_insert_entries(agp_memory * mem, off_t pg_start, in intel_i810_insert_entries() argument
984 if ((pg_start + mem->page_count) > num_entries) { in intel_i810_insert_entries()
987 for (j = pg_start; j < (pg_start + mem->page_count); j++) { in intel_i810_insert_entries()
993 if (type != 0 || mem->type != 0) { in intel_i810_insert_entries()
995 (mem->type == AGP_DCACHE_MEMORY)) { in intel_i810_insert_entries()
999 i < (pg_start + mem->page_count); i++) { in intel_i810_insert_entries()
1006 agp_bridge.tlb_flush(mem); in intel_i810_insert_entries()
1010 (mem->type == AGP_PHYS_MEMORY)) { in intel_i810_insert_entries()
1018 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { in intel_i810_insert_entries()
1021 agp_bridge.mask_memory(mem->memory[i], mem->type)); in intel_i810_insert_entries()
1025 agp_bridge.tlb_flush(mem); in intel_i810_insert_entries()
1029 static int intel_i810_remove_entries(agp_memory * mem, off_t pg_start, in intel_i810_remove_entries() argument
1034 for (i = pg_start; i < (mem->page_count + pg_start); i++) { in intel_i810_remove_entries()
1041 agp_bridge.tlb_flush(mem); in intel_i810_remove_entries()
1422 static int intel_i830_insert_entries(agp_memory *mem,off_t pg_start,int type) in intel_i830_insert_entries() argument
1438 if ((pg_start + mem->page_count) > num_entries) in intel_i830_insert_entries()
1446 (mem->type != 0 && mem->type != AGP_PHYS_MEMORY)) in intel_i830_insert_entries()
1453 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) in intel_i830_insert_entries()
1454 OUTREG32(intel_i830_private.gtt, j, agp_bridge.mask_memory(mem->memory[i], mem->type)); in intel_i830_insert_entries()
1456 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) in intel_i830_insert_entries()
1457 …_i830_private.registers,I810_PTE_BASE + (j * 4),agp_bridge.mask_memory(mem->memory[i], mem->type)); in intel_i830_insert_entries()
1462 agp_bridge.tlb_flush(mem); in intel_i830_insert_entries()
1467 static int intel_i830_remove_entries(agp_memory *mem,off_t pg_start,int type) in intel_i830_remove_entries() argument
1480 for (i = pg_start; i < (mem->page_count + pg_start); i++) in intel_i830_remove_entries()
1483 for (i = pg_start; i < (mem->page_count + pg_start); i++) in intel_i830_remove_entries()
1489 agp_bridge.tlb_flush(mem); in intel_i830_remove_entries()
1697 static void intel_i460_tlb_flush(agp_memory * mem) in intel_i460_tlb_flush() argument
1854 static int intel_i460_insert_memory_cpk(agp_memory * mem, in intel_i460_insert_memory_cpk() argument
1871 if ((pg_start + I460_CPAGES_PER_KPAGE * mem->page_count) > num_entries) { in intel_i460_insert_memory_cpk()
1877 while (j < (pg_start + I460_CPAGES_PER_KPAGE * mem->page_count)) { in intel_i460_insert_memory_cpk()
1884 for (i = 0, j = pg_start; i < mem->page_count; i++) { in intel_i460_insert_memory_cpk()
1886 paddr = mem->memory[i]; in intel_i460_insert_memory_cpk()
1890 agp_bridge.mask_memory(paddr, mem->type); in intel_i460_insert_memory_cpk()
1902 static int intel_i460_remove_memory_cpk(agp_memory * mem, off_t pg_start, in intel_i460_remove_memory_cpk() argument
1911 mem->page_count); i++) in intel_i460_remove_memory_cpk()
1994 static int intel_i460_insert_memory_kpc(agp_memory * mem, in intel_i460_insert_memory_kpc() argument
2009 end_pg = (pg_start + mem->page_count - 1) / in intel_i460_insert_memory_kpc()
2011 end_offset = (pg_start + mem->page_count - 1) % in intel_i460_insert_memory_kpc()
2046 mem->memory[i] = paddr + (idx * PAGE_SIZE); in intel_i460_insert_memory_kpc()
2048 agp_bridge.mask_memory(mem->memory[i], mem->type); in intel_i460_insert_memory_kpc()
2057 static int intel_i460_remove_memory_kpc(agp_memory * mem, in intel_i460_remove_memory_kpc() argument
2072 end_pg = (pg_start + mem->page_count - 1) / in intel_i460_remove_memory_kpc()
2074 end_offset = (pg_start + mem->page_count - 1) % in intel_i460_remove_memory_kpc()
2082 mem->memory[i] = 0; in intel_i460_remove_memory_kpc()
2102 static int intel_i460_insert_memory(agp_memory * mem, in intel_i460_insert_memory() argument
2106 return intel_i460_insert_memory_cpk(mem, pg_start, type); in intel_i460_insert_memory()
2108 return intel_i460_insert_memory_kpc(mem, pg_start, type); in intel_i460_insert_memory()
2111 static int intel_i460_remove_memory(agp_memory * mem, in intel_i460_remove_memory() argument
2115 return intel_i460_remove_memory_cpk(mem, pg_start, type); in intel_i460_remove_memory()
2117 return intel_i460_remove_memory_kpc(mem, pg_start, type); in intel_i460_remove_memory()
2242 static void intel_tlbflush(agp_memory * mem) in intel_tlbflush() argument
2249 static void intel_8xx_tlbflush(agp_memory * mem) in intel_8xx_tlbflush() argument
2355 static void intel_820_tlbflush(agp_memory * mem) in intel_820_tlbflush() argument
3007 static void via_tlbflush(agp_memory * mem) in via_tlbflush() argument
3096 static void sis_tlbflush(agp_memory * mem) in sis_tlbflush() argument
3455 static int amd_insert_memory(agp_memory * mem, in amd_insert_memory() argument
3464 if (type != 0 || mem->type != 0) { in amd_insert_memory()
3467 if ((pg_start + mem->page_count) > num_entries) { in amd_insert_memory()
3472 while (j < (pg_start + mem->page_count)) { in amd_insert_memory()
3481 if (mem->is_flushed == FALSE) { in amd_insert_memory()
3483 mem->is_flushed = TRUE; in amd_insert_memory()
3486 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { in amd_insert_memory()
3490 agp_bridge.mask_memory(mem->memory[i], mem->type); in amd_insert_memory()
3492 agp_bridge.tlb_flush(mem); in amd_insert_memory()
3496 static int amd_remove_memory(agp_memory * mem, off_t pg_start, in amd_remove_memory() argument
3503 if (type != 0 || mem->type != 0) { in amd_remove_memory()
3506 for (i = pg_start; i < (mem->page_count + pg_start); i++) { in amd_remove_memory()
3513 agp_bridge.tlb_flush(mem); in amd_remove_memory()
3573 static int x86_64_insert_memory(agp_memory * mem, off_t pg_start, int type) in x86_64_insert_memory() argument
3586 if (type != 0 || mem->type != 0) in x86_64_insert_memory()
3590 if ((pg_start + mem->page_count) > num_entries) in x86_64_insert_memory()
3596 while (j < (pg_start + mem->page_count)) { in x86_64_insert_memory()
3602 if (mem->is_flushed == FALSE) { in x86_64_insert_memory()
3604 mem->is_flushed = TRUE; in x86_64_insert_memory()
3607 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { in x86_64_insert_memory()
3608 tmp = agp_bridge.mask_memory(mem->memory[i], mem->type); in x86_64_insert_memory()
3617 agp_bridge.tlb_flush(mem); in x86_64_insert_memory()
4125 static void ali_tlbflush(agp_memory * mem) in ali_tlbflush() argument
4686 static int serverworks_insert_memory(agp_memory * mem, in serverworks_insert_memory() argument
4695 if (type != 0 || mem->type != 0) { in serverworks_insert_memory()
4698 if ((pg_start + mem->page_count) > num_entries) { in serverworks_insert_memory()
4703 while (j < (pg_start + mem->page_count)) { in serverworks_insert_memory()
4712 if (mem->is_flushed == FALSE) { in serverworks_insert_memory()
4714 mem->is_flushed = TRUE; in serverworks_insert_memory()
4717 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { in serverworks_insert_memory()
4721 agp_bridge.mask_memory(mem->memory[i], mem->type); in serverworks_insert_memory()
4723 agp_bridge.tlb_flush(mem); in serverworks_insert_memory()
4727 static int serverworks_remove_memory(agp_memory * mem, off_t pg_start, in serverworks_remove_memory() argument
4734 if (type != 0 || mem->type != 0) { in serverworks_remove_memory()
4739 agp_bridge.tlb_flush(mem); in serverworks_remove_memory()
4741 for (i = pg_start; i < (mem->page_count + pg_start); i++) { in serverworks_remove_memory()
4748 agp_bridge.tlb_flush(mem); in serverworks_remove_memory()
5109 static void nvidia_tlbflush(agp_memory * mem) in nvidia_tlbflush() argument
5156 static int nvidia_insert_memory(agp_memory * mem, in nvidia_insert_memory() argument
5161 if ((type != 0) || (mem->type != 0)) in nvidia_insert_memory()
5164 if ((pg_start + mem->page_count) > in nvidia_insert_memory()
5168 for(j = pg_start; j < (pg_start + mem->page_count); j++) { in nvidia_insert_memory()
5174 if (mem->is_flushed == FALSE) { in nvidia_insert_memory()
5176 mem->is_flushed = TRUE; in nvidia_insert_memory()
5178 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { in nvidia_insert_memory()
5179 …agp_bridge.gatt_table[nvidia_private.pg_offset + j] = agp_bridge.mask_memory(mem->memory[i], mem->… in nvidia_insert_memory()
5182 agp_bridge.tlb_flush(mem); in nvidia_insert_memory()
5186 static int nvidia_remove_memory(agp_memory * mem, off_t pg_start, in nvidia_remove_memory() argument
5191 if ((type != 0) || (mem->type != 0)) in nvidia_remove_memory()
5194 for (i = pg_start; i < (mem->page_count + pg_start); i++) { in nvidia_remove_memory()
5199 agp_bridge.tlb_flush(mem); in nvidia_remove_memory()
5451 static void hp_zx1_tlbflush(agp_memory * mem) in hp_zx1_tlbflush() argument
5499 static int hp_zx1_insert_memory(agp_memory * mem, off_t pg_start, int type) in hp_zx1_insert_memory() argument
5506 if (type != 0 || mem->type != 0) { in hp_zx1_insert_memory()
5511 io_pg_count = hp->io_pages_per_kpage * mem->page_count; in hp_zx1_insert_memory()
5524 for (i = 0, j = io_pg_start; i < mem->page_count; i++) { in hp_zx1_insert_memory()
5527 paddr = mem->memory[i]; in hp_zx1_insert_memory()
5535 agp_bridge.tlb_flush(mem); in hp_zx1_insert_memory()
5539 static int hp_zx1_remove_memory(agp_memory * mem, off_t pg_start, int type) in hp_zx1_remove_memory() argument
5544 if (type != 0 || mem->type != 0) { in hp_zx1_remove_memory()
5549 io_pg_count = hp->io_pages_per_kpage * mem->page_count; in hp_zx1_remove_memory()
5554 agp_bridge.tlb_flush(mem); in hp_zx1_remove_memory()
5811 static int ati_insert_memory(agp_memory * mem, in ati_insert_memory() argument
5820 if (type != 0 || mem->type != 0) in ati_insert_memory()
5823 if ((pg_start + mem->page_count) > num_entries) in ati_insert_memory()
5827 while (j < (pg_start + mem->page_count)) { in ati_insert_memory()
5835 if (mem->is_flushed == FALSE) { in ati_insert_memory()
5837 mem->is_flushed = TRUE; in ati_insert_memory()
5840 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { in ati_insert_memory()
5844 agp_bridge.mask_memory(mem->memory[i], mem->type); in ati_insert_memory()
5846 agp_bridge.tlb_flush(mem); in ati_insert_memory()
5850 static int ati_remove_memory(agp_memory * mem, off_t pg_start, in ati_remove_memory() argument
5857 if (type != 0 || mem->type != 0) { in ati_remove_memory()
5860 for (i = pg_start; i < (mem->page_count + pg_start); i++) { in ati_remove_memory()
5867 agp_bridge.tlb_flush(mem); in ati_remove_memory()
6043 static void ati_tlbflush(agp_memory * mem) in ati_tlbflush() argument
7124 int mem; member
7152 while ((memory > maxes_table[index].mem) && in agp_find_max()
7158 ( (memory - maxes_table[index - 1].mem) * in agp_find_max()
7160 (maxes_table[index].mem - maxes_table[index - 1].mem); in agp_find_max()