Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
drivers/cdrom/gdrom.c
static void gdrom_bdops_release(struct gendisk *disk, fmode_t mode) { mutex_lock(&gdrom_mutex); cdrom_release(gd.cd_info, mode); mutex_unlock(&gdrom_mutex); }
[ 0, 0 ]
Linux Kernel
drivers/cdrom/gdrom.c
static int gdrom_bdops_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, unsigned long arg) { int ret; mutex_lock(&gdrom_mutex); ret = cdrom_ioctl(gd.cd_info, bdev, mode, cmd, arg); mutex_unlock(&gdrom_mutex); return ret; }
[ 0, 0 ]
Linux Kernel
drivers/cdrom/gdrom.c
static irqreturn_t gdrom_dma_interrupt(int irq, void *dev_id) { gd.status = __raw_readb(GDROM_STATUSCOMMAND_REG); if (gd.transfer != 1) return IRQ_HANDLED; gd.transfer = 0; wake_up_interruptible(&request_queue); return IRQ_HANDLED; }
[ 0, 0 ]
Linux Kernel
drivers/cdrom/gdrom.c
static void probe_gdrom_setupdisk(void) { gd.disk->major = gdrom_major; gd.disk->first_minor = 1; gd.disk->minors = 1; gd.disk->flags |= GENHD_FL_NO_PART; strcpy(gd.disk->disk_name, GDROM_DEV_NAME); }
[ 1, 0 ]
Linux Kernel
drivers/cdrom/gdrom.c
static int __init init_gdrom(void) { int rc; rc = platform_driver_register(&gdrom_driver); if (rc) return rc; pd = platform_device_register_simple(GDROM_DEV_NAME, -1, NULL, 0); if (IS_ERR(pd)) { platform_driver_unregister(&gdrom_driver); return PTR_ERR(pd); } return 0; }
[ 0, 0 ]
Linux Kernel
drivers/char/adi.c
static int read_mcd_tag(unsigned long addr) { long err; int ver; __asm__ __volatile__( "1: ldxa [%[addr]] %[asi], %[ver]\n" " mov 0, %[err]\n" "2:\n" " .section .fixup,#alloc,#execinstr\n" " .align 4\n" "3: sethi %%hi(2b), %%g1\n" " jmpl %%g1 + %%lo(2b), %%g0\n" ...
[ 1, 0 ]
Linux Kernel
drivers/char/adi.c
static int set_mcd_tag(unsigned long addr, u8 ver) { long err; __asm__ __volatile__("1: stxa %[ver], [%[addr]] %[asi]\n" " mov 0, %[err]\n" "2:\n" " .section .fixup,#alloc,#execinstr\n" " .align 4\n" ...
[ 1, 0 ]
Linux Kernel
drivers/char/adi.c
static loff_t adi_llseek(struct file *file, loff_t offset, int whence) { loff_t ret = -EINVAL; switch (whence) { case SEEK_END: case SEEK_DATA: case SEEK_HOLE: return -EINVAL; case SEEK_CUR: if (offset == 0) return file->f_pos; offset += file->f_pos; break; case SEEK_SET: brea...
[ 1, 0 ]
Linux Kernel
drivers/char/adi.c
static void __exit adi_exit(void) { misc_deregister(&adi_miscdev); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/ali-agp.c
static void m1541_destroy_page(struct page *page, int flags) { u32 temp; if (page == NULL) return; if (flags & AGP_PAGE_DESTROY_UNMAP) { global_cache_flush(); pci_read_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, &temp); pci_write_config_dword( agp_bridge->dev, ALI_CACHE_FLUSH_C...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/alpha-agp.c
static int alpha_core_agp_configure(void) { alpha_agp_info *agp = agp_bridge->dev_private_data; agp_bridge->gart_bus_addr = agp->aperture.bus_base; return 0; }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/alpha-agp.c
static void alpha_core_agp_tlbflush(struct agp_memory *mem) { alpha_agp_info *agp = agp_bridge->dev_private_data; alpha_mv.mv_pci_tbi(agp->hose, 0, -1); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/alpha-agp.c
static int alpha_core_agp_insert_memory(struct agp_memory *mem, off_t pg_start, int type) { alpha_agp_info *agp = agp_bridge->dev_private_data; int num_entries, status; void *temp; if (type >= AGP_USER_TYPES || mem->type >= AGP_USER_TYPES) return -EINVAL; temp = ...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/alpha-agp.c
int __init alpha_core_agp_setup(void) { alpha_agp_info *agp = alpha_mv.agp_info(); struct pci_dev *pdev; struct aper_size_info_fixed *aper_size; if (!agp) return -ENODEV; if (agp->ops->setup(agp)) return -ENODEV; /* * Build the aperture size descriptor */ aper_size = alpha_core_agp_sizes; ...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/amd-k7-agp.c
static int amd_irongate_fetch_size(void) { int i; u32 temp; struct aper_size_info_lvl2 *values; pci_read_config_dword(agp_bridge->dev, AMD_APSIZE, &temp); temp = (temp & 0x0000000e); values = A_SIZE_LVL2(agp_bridge->driver->aperture_sizes); for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) { ...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/amd-k7-agp.c
static void amd_irongate_tlbflush(struct agp_memory *temp) { writel(1, amd_irongate_private.registers + AMD_TLBFLUSH); readl(amd_irongate_private.registers + AMD_TLBFLUSH); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/amd-k7-agp.c
static int amd_remove_memory(struct agp_memory *mem, off_t pg_start, int type) { int i; unsigned long __iomem *cur_gatt; unsigned long addr; if (type != mem->type || agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type)) return -EINVAL; for (i = pg_start; i < (mem->page_count + pg_start); i+...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/amd64-agp.c
static int amd_8151_configure(void) { unsigned long gatt_bus = virt_to_phys(agp_bridge->gatt_table_real); int i; if (!amd_nb_has_feature(AMD_NB_GART)) return 0; for (i = 0; i < amd_nb_num(); i++) { agp_bridge->gart_bus_addr = amd64_configure(node_to_amd_nb(i)->misc, gatt_bus); } amd_flush_...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/amd64-agp.c
static int __maybe_unused agp_amd64_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); if (pdev->vendor == PCI_VENDOR_ID_NVIDIA) nforce3_agp_init(pdev); return amd_8151_configure(); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/ati-agp.c
static void ati_free_gatt_pages(void) { int i; struct ati_page_map **tables; struct ati_page_map *entry; tables = ati_generic_private.gatt_pages; for (i = 0; i < ati_generic_private.num_tables; i++) { entry = tables[i]; if (entry != NULL) { if (entry->real != NULL) ati_free_page_map(e...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/ati-agp.c
static int ati_create_gatt_pages(int nr_tables) { struct ati_page_map **tables; struct ati_page_map *entry; int retval = 0; int i; tables = kcalloc(nr_tables + 1, sizeof(struct ati_page_map *), GFP_KERNEL); if (tables == NULL) return -ENOMEM; for (i = 0; i < nr_tables; i++) { entry = kzalloc(s...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/ati-agp.c
static int is_r200(void) { if ((agp_bridge->dev->device == PCI_DEVICE_ID_ATI_RS100) || (agp_bridge->dev->device == PCI_DEVICE_ID_ATI_RS200) || (agp_bridge->dev->device == PCI_DEVICE_ID_ATI_RS200_B) || (agp_bridge->dev->device == PCI_DEVICE_ID_ATI_RS250)) return 1; return 0; }
[ 1, 0 ]
Linux Kernel
drivers/char/agp/ati-agp.c
static void ati_tlbflush(struct agp_memory *mem) { writel(1, ati_generic_private.registers + ATI_GART_CACHE_CNTRL); readl(ati_generic_private.registers + ATI_GART_CACHE_CNTRL); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/ati-agp.c
static int __init agp_ati_init(void) { if (agp_off) return -EINVAL; return pci_register_driver(&agp_ati_pci_driver); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/compat_ioctl.c
static int compat_agpioc_allocate_wrap(struct agp_file_private *priv, void __user *arg) { struct agp_memory *memory; struct agp_allocate32 alloc; DBG(""); if (copy_from_user(&alloc, arg, sizeof(alloc))) return -EFAULT; memory = agp_allocate_memory_wrap(alloc.pg_co...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/compat_ioctl.c
static int compat_agpioc_bind_wrap(struct agp_file_private *priv, void __user *arg) { struct agp_bind32 bind_info; struct agp_memory *memory; DBG(""); if (copy_from_user(&bind_info, arg, sizeof(bind_info))) return -EFAULT; memory = agp_find_mem_by_key(bind_info.key); ...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/compat_ioctl.c
static int compat_agpioc_unbind_wrap(struct agp_file_private *priv, void __user *arg) { struct agp_memory *memory; struct agp_unbind32 unbind; DBG(""); if (copy_from_user(&unbind, arg, sizeof(unbind))) return -EFAULT; memory = agp_find_mem_by_key(unbind.key); if ...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/efficeon-agp.c
static int efficeon_configure(void) { u16 temp2; struct aper_size_info_lvl2 *current_size; printk(KERN_DEBUG PFX "efficeon_configure()\n"); current_size = A_SIZE_LVL2(agp_bridge->current_size); pci_write_config_word(agp_bridge->dev, INTEL_APSIZE, current_size->size_value); /* add...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/efficeon-agp.c
static int efficeon_free_gatt_table(struct agp_bridge_data *bridge) { int index, freed = 0; for (index = 0; index < EFFICEON_L1_SIZE; index++) { unsigned long page = efficeon_private.l1_table[index]; if (page) { efficeon_private.l1_table[index] = 0; free_page(page); freed++; } pri...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/efficeon-agp.c
static int efficeon_insert_memory(struct agp_memory *mem, off_t pg_start, int type) { int i, count = mem->page_count, num_entries; unsigned int *page, *last_page; const int clflush_chunk = ((cpuid_ebx(1) >> 8) & 0xff) << 3; const unsigned long clflush_mask = ~(clflush_chunk - 1...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/frontend.c
static struct agp_segment_priv * agp_find_seg_in_client(const struct agp_client *client, unsigned long offset, int size, pgprot_t page_prot) { struct agp_segment_priv *seg; int i; off_t pg_start; size_t pg_count; pg_start = offset / 4096; pg_count = size / 4096; seg = *(client->seg...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/frontend.c
static void agp_add_seg_to_client(struct agp_client *client, struct agp_segment_priv **seg, int num_segments) { struct agp_segment_priv **prev_seg; prev_seg = client->segments; if (prev_seg != NULL) agp_remove_seg_from_client(client); D...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/frontend.c
static struct agp_controller *agp_create_controller(pid_t id) { struct agp_controller *controller; controller = kzalloc(sizeof(struct agp_controller), GFP_KERNEL); if (controller == NULL) return NULL; controller->pid = id; return controller; }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/frontend.c
static int agp_insert_controller(struct agp_controller *controller) { struct agp_controller *prev_controller; prev_controller = agp_fe.controllers; controller->next = prev_controller; if (prev_controller != NULL) prev_controller->prev = controller; agp_fe.controllers = controller; return 0; }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/frontend.c
static struct agp_controller *agp_find_controller_for_client(pid_t id) { struct agp_controller *controller; controller = agp_fe.controllers; while (controller != NULL) { if ((agp_find_client_in_controller(controller, id)) != NULL) return controller; controller = controller->next; } return NU...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/frontend.c
static void agp_insert_client(struct agp_client *client) { struct agp_client *prev_client; prev_client = agp_fe.current_controller->clients; client->next = prev_client; if (prev_client != NULL) prev_client->prev = client; agp_fe.current_controller->clients = client; agp_fe.current_controller->num_cl...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/frontend.c
static int agp_release(struct inode *inode, struct file *file) { struct agp_file_private *priv = file->private_data; mutex_lock(&(agp_fe.agp_mutex)); DBG("priv=%p", priv); if (test_bit(AGP_FF_IS_CONTROLLER, &priv->access_flags)) { struct agp_controller *controller; controller = agp_find_controller_...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/frontend.c
static int agpioc_info_wrap(struct agp_file_private *priv, void __user *arg) { struct agp_info userinfo; struct agp_kern_info kerninfo; agp_copy_info(agp_bridge, &kerninfo); memset(&userinfo, 0, sizeof(userinfo)); userinfo.version.major = kerninfo.version.major; userinfo.version.minor = kerninfo.version....
[ 1, 0 ]
Linux Kernel
drivers/char/agp/generic.c
void agp_free_key(int key) { if (key < 0) return; if (key < MAXKEY) clear_bit(key, agp_bridge->key_list); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/generic.c
static struct agp_memory *agp_create_user_memory(unsigned long num_agp_pages) { struct agp_memory *new; unsigned long alloc_size = num_agp_pages * sizeof(struct page *); if (INT_MAX / sizeof(struct page *) < num_agp_pages) return NULL; new = kzalloc(sizeof(struct agp_memory), GFP_KERNEL); if (new == NU...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/generic.c
struct agp_memory *agp_create_memory(int scratch_pages) { struct agp_memory *new; new = kzalloc(sizeof(struct agp_memory), GFP_KERNEL); if (new == NULL) return NULL; new->key = agp_get_key(); if (new->key < 0) { kfree(new); return NULL; } agp_alloc_page_array(PAGE_SIZE * scratch_pages, ne...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/generic.c
int agp_unbind_memory(struct agp_memory *curr) { int ret_val; if (curr == NULL) return -EINVAL; if (!curr->is_bound) { printk(KERN_INFO PFX "memory %p was not bound!\n", curr); return -EINVAL; } ret_val = curr->bridge->driver->remove_memory(curr, curr->pg_start, curr->type); if (ret_va...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/generic.c
void agp_device_command(u32 bridge_agpstat, bool agp_v3) { struct pci_dev *device = NULL; int mode; mode = bridge_agpstat & 0x7; if (agp_v3) mode *= 4; for_each_pci_dev(device) { u8 agp = pci_find_capability(device, PCI_CAP_ID_AGP); if (!agp) continue; dev_info(&device->dev, "puttin...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/generic.c
void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode) { u32 bridge_agpstat, temp; get_agp_version(agp_bridge); dev_info(&agp_bridge->dev->dev, "AGP %d.%d bridge\n", agp_bridge->major_version, agp_bridge->minor_version); pci_read_config_dword(agp_bridge->dev, agp_bridge->capnd...
[ 0, 1 ]
Linux Kernel
drivers/char/agp/generic.c
unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr, int type) { if (bridge->driver->masks) return addr | bridge->driver->masks[0].mask; else return addr; }
[ 1, 0 ]
Linux Kernel
drivers/char/agp/generic.c
int agp3_generic_fetch_size(void) { u16 temp_size; int i; struct aper_size_info_16 *values; pci_read_config_word(agp_bridge->dev, agp_bridge->capndx + AGPAPSIZE, &temp_size); values = A_SIZE_16(agp_bridge->driver->aperture_sizes); for (i = 0; i < agp_bridge->driver->num_aperture_siz...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/generic.c
void agp3_generic_tlbflush(struct agp_memory *mem) { u32 ctrl; pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx + AGPCTRL, &ctrl); pci_write_config_dword(agp_bridge->dev, agp_bridge->capndx + AGPCTRL, ctrl & ~AGPCTRL_GTLBEN); pci_write_config_dword(agp_bridge->dev, agp_bridge-...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/generic.c
int agp3_generic_configure(void) { u32 temp; struct aper_size_info_16 *current_size; current_size = A_SIZE_16(agp_bridge->current_size); agp_bridge->gart_bus_addr = pci_bus_address(agp_bridge->dev, AGP_APERTURE_BAR); pci_write_config_word(agp_bridge->dev, agp_bridge->capndx + AGPAPSIZE, ...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/hp-agp.c
static int hp_zx1_fetch_size(void) { int size; size = hp_private.gart_size / MB(1); hp_zx1_sizes[0].size = size; agp_bridge->current_size = (void *)&hp_zx1_sizes[0]; return size; }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/hp-agp.c
static void hp_zx1_cleanup(void) { struct _hp_private *hp = &hp_private; if (hp->ioc_regs) { if (hp->io_pdir_owner) { writeq(0, hp->ioc_regs + HP_ZX1_IBASE); readq(hp->ioc_regs + HP_ZX1_IBASE); } iounmap(hp->ioc_regs); } if (hp->lba_regs) iounmap(hp->lba_regs); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/hp-agp.c
static int hp_zx1_remove_memory(struct agp_memory *mem, off_t pg_start, int type) { struct _hp_private *hp = &hp_private; int i, io_pg_start, io_pg_count; if (type != mem->type || agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type)) { return -EINVAL; } io_p...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/hp-agp.c
static void hp_zx1_enable(struct agp_bridge_data *bridge, u32 mode) { struct _hp_private *hp = &hp_private; u32 command; command = readl(hp->lba_regs + hp->lba_cap_offset + PCI_AGP_STATUS); command = agp_collect_device_status(bridge, mode, command); command |= 0x00000100; writel(command, hp->lba_regs + h...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/i460-agp.c
static int i460_configure(void) { union { u32 small[2]; u64 large; } temp; size_t size; u8 scratch; struct aper_size_info_8 *current_size; temp.large = 0; current_size = A_SIZE_8(agp_bridge->current_size); i460_write_agpsiz(current_size->size_value); pci_read_config_dword(agp_bridge->dev, i...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/i460-agp.c
static int i460_remove_memory_small_io_page(struct agp_memory *mem, off_t pg_start, int type) { int i; pr_debug("i460_remove_memory_small_io_page(mem=%p, pg_start=%ld, type=%d)\n", mem, pg_start, type); pg_start = I460_IOPAGES_PER_KPAGE * pg_start; for ...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/i460-agp.c
static int i460_alloc_large_page(struct lp_desc *lp) { unsigned long order = I460_IO_PAGE_SHIFT - PAGE_SHIFT; size_t map_size; lp->page = alloc_pages(GFP_KERNEL, order); if (!lp->page) { printk(KERN_ERR PFX "Couldn't alloc 4M GART page...\n"); return -ENOMEM; } map_size = ((I460_KPAGES_PER_I...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/i460-agp.c
static int i460_remove_memory(struct agp_memory *mem, off_t pg_start, int type) { if (I460_IO_PAGE_SHIFT <= PAGE_SHIFT) return i460_remove_memory_small_io_page(mem, pg_start, type); else return i460_remove_memory_large_io_page(mem, pg_start, type); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/i460-agp.c
static unsigned long i460_mask_memory(struct agp_bridge_data *bridge, dma_addr_t addr, int type) { return bridge->driver->masks[0].mask | (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xfffff000) >> 12); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/intel-agp.c
static void intel_cleanup(void) { u16 temp; struct aper_size_info_16 *previous_size; previous_size = A_SIZE_16(agp_bridge->previous_size); pci_read_config_word(agp_bridge->dev, INTEL_NBXCFG, &temp); pci_write_config_word(agp_bridge->dev, INTEL_NBXCFG, temp & ~(1 << 9)); pci_write_config_word(agp_bridge->...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/intel-agp.c
static int intel_configure(void) { u16 temp2; struct aper_size_info_16 *current_size; current_size = A_SIZE_16(agp_bridge->current_size); pci_write_config_word(agp_bridge->dev, INTEL_APSIZE, current_size->size_value); /* address to map to */ agp_bridge->gart_bus_addr = pci_b...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/intel-agp.c
static int intel_815_configure(void) { u32 addr; u8 temp2; struct aper_size_info_8 *current_size; /* the Intel 815 chipset spec. says that bits 29-31 in the * ATTBASE register are reserved -> try not to write them */ if (agp_bridge->gatt_bus_addr & INTEL_815_ATTBASE_MASK) { dev_emerg(&agp_bridge->dev-...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/intel-agp.c
static int intel_850_configure(void) { u16 temp2; struct aper_size_info_8 *current_size; current_size = A_SIZE_8(agp_bridge->current_size); pci_write_config_byte(agp_bridge->dev, INTEL_APSIZE, current_size->size_value); /* address to map to */ agp_bridge->gart_bus_addr = pci...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/intel-gtt.c
static void i810_cleanup(void) { writel(0, intel_private.registers + I810_PGETBL_CTL); free_gatt_pages(intel_private.i81x_gtt_table, I810_GTT_ORDER); } #if IS_ENABLED(CONFIG_AGP_INTEL)
[ 0, 0 ]
Linux Kernel
drivers/char/agp/intel-gtt.c
static void i810_write_entry(dma_addr_t addr, unsigned int entry, unsigned int flags) { u32 pte_flags = I810_PTE_VALID; switch (flags) { case AGP_DCACHE_MEMORY: pte_flags |= I810_PTE_LOCAL; break; case AGP_USER_CACHED_MEMORY: pte_flags |= I830_PTE_SYSTEM_CACHED; br...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/intel-gtt.c
static unsigned int intel_gtt_mappable_entries(void) { unsigned int aperture_size; if (INTEL_GTT_GEN == 1) { u32 smram_miscc; pci_read_config_dword(intel_private.bridge_dev, I810_SMRAM_MISCC, &smram_miscc); if ((smram_miscc & I810_GFX_MEM_WIN_SIZE) == I810_GFX_MEM_WIN_32M) ...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/intel-gtt.c
static void intel_gtt_cleanup(void) { intel_private.driver->cleanup(); iounmap(intel_private.gtt); iounmap(intel_private.registers); intel_gtt_teardown_scratch_page(); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/intel-gtt.c
static bool i830_check_flags(unsigned int flags) { switch (flags) { case 0: case AGP_PHYS_MEMORY: case AGP_USER_CACHED_MEMORY: case AGP_USER_MEMORY: return true; } return false; }
[ 1, 0 ]
Linux Kernel
drivers/char/agp/intel-gtt.c
static void intel_gmch_gtt_insert_pages(unsigned int first_entry, unsigned int num_entries, struct page **pages, unsigned int flags) { int i, j; for (i = 0, j = first_entry; i < num_entries; i++,...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/intel-gtt.c
static struct agp_memory *intel_fake_agp_alloc_by_type(size_t pg_count, int type) { struct agp_memory *new; if (type == AGP_DCACHE_MEMORY && INTEL_GTT_GEN == 1) { if (pg_count != intel_private.num_dcache_entries) return NULL; new = agp_create_me...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/intel-gtt.c
static void i965_write_entry(dma_addr_t addr, unsigned int entry, unsigned int flags) { u32 pte_flags; pte_flags = I810_PTE_VALID; if (flags == AGP_USER_CACHED_MEMORY) pte_flags |= I830_PTE_SYSTEM_CACHED; addr |= (addr >> 28) & 0xf0; writel_relaxed(addr | pte_flags, intel_pr...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/intel-gtt.c
void intel_gmch_gtt_get(u64 *gtt_total, phys_addr_t *mappable_base, resource_size_t *mappable_end) { *gtt_total = intel_private.gtt_total_entries << PAGE_SHIFT; *mappable_base = intel_private.gma_bus_addr; *mappable_end = intel_private.gtt_mappable_entries << PAGE_SHIFT; }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/intel-gtt.c
void intel_gmch_gtt_flush(void) { if (intel_private.driver->chipset_flush) intel_private.driver->chipset_flush(); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/intel-gtt.c
void intel_gmch_remove(void) { if (--intel_private.refcount) return; if (intel_private.scratch_page) intel_gtt_teardown_scratch_page(); if (intel_private.pcidev) pci_dev_put(intel_private.pcidev); if (intel_private.bridge_dev) pci_dev_put(intel_private.bridge_dev); intel_private.driver = NUL...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/isoch.c
static void agp_3_5_dev_list_sort(struct agp_3_5_dev *list, unsigned int ndevs) { struct agp_3_5_dev *cur; struct pci_dev *dev; struct list_head *pos, *tmp, *head = &list->list, *start = head->next; u32 nistat; INIT_LIST_HEAD(head); for (pos = start; pos != head;) { ...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/isoch.c
static void agp_3_5_nonisochronous_node_enable(struct agp_bridge_data *bridge, struct agp_3_5_dev *dev_list, unsigned int ndevs) { struct agp_3_5_dev *cur; struct list_head *head = &dev_list->list, *pos; u32 tstatus, mcm...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/nvidia-agp.c
static int nvidia_init_iorr(u32 base, u32 size) { u32 base_hi, base_lo; u32 mask_hi, mask_lo; u32 sys_hi, sys_lo; u32 iorr_addr, free_iorr_addr; /* If not found, determine the uppermost available iorr */ free_iorr_addr = AMD_K7_NUM_IORR; for (iorr_addr = 0; iorr_addr < AMD_K7_NUM_IORR; iorr_addr++) { ...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/nvidia-agp.c
static void nvidia_cleanup(void) { struct aper_size_info_8 *previous_size; u32 temp; pci_read_config_dword(agp_bridge->dev, NVIDIA_0_APSIZE, &temp); pci_write_config_dword(agp_bridge->dev, NVIDIA_0_APSIZE, temp & ~(0x100)); /* gtlb control */ pci_read_config_dword(nvidia_private.dev_2, NVIDIA_2_GARTCTRL, ...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/nvidia-agp.c
static int nvidia_remove_memory(struct agp_memory *mem, off_t pg_start, int type) { int i; int mask_type; mask_type = agp_generic_type_to_mask_type(mem->bridge, type); if (mask_type != 0 || type != mem->type) return -EINVAL; if (mem->page_count == 0) return 0; f...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/nvidia-agp.c
static void agp_nvidia_remove(struct pci_dev *pdev) { struct agp_bridge_data *bridge = pci_get_drvdata(pdev); agp_remove_bridge(bridge); agp_put_bridge(bridge); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/nvidia-agp.c
static int agp_nvidia_resume(struct pci_dev *pdev) { pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev); /* reconfigure AGP hardware again */ nvidia_configure(); return 0; }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/parisc-agp.c
static int parisc_agp_fetch_size(void) { int size; size = parisc_agp_info.gart_size / MB(1); parisc_agp_sizes[0].size = size; agp_bridge->current_size = (void *)&parisc_agp_sizes[0]; return size; }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/parisc-agp.c
static int parisc_agp_free_gatt_table(struct agp_bridge_data *bridge) { struct _parisc_agp_info *info = &parisc_agp_info; info->gatt[0] = SBA_AGPGART_COOKIE; return 0; }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/parisc-agp.c
static void parisc_agp_enable(struct agp_bridge_data *bridge, u32 mode) { struct _parisc_agp_info *info = &parisc_agp_info; u32 command; command = readl(info->lba_regs + info->lba_cap_offset + PCI_AGP_STATUS); command = agp_collect_device_status(bridge, mode, command); command |= 0x00000100; writel(comm...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/parisc-agp.c
static int __init parisc_agp_setup(void __iomem *ioc_hpa, void __iomem *lba_hpa) { struct pci_dev *fake_bridge_dev = NULL; struct agp_bridge_data *bridge; int error = 0; fake_bridge_dev = pci_alloc_dev(NULL); if (!fake_bridge_dev) { error = -ENOMEM; goto fail; } ...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/sis-agp.c
static int sis_fetch_size(void) { u8 temp_size; int i; struct aper_size_info_8 *values; pci_read_config_byte(agp_bridge->dev, SIS_APSIZE, &temp_size); values = A_SIZE_8(agp_bridge->driver->aperture_sizes); for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) { if ((temp_size == values[i].size_...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/sis-agp.c
static void agp_sis_remove(struct pci_dev *pdev) { struct agp_bridge_data *bridge = pci_get_drvdata(pdev); agp_remove_bridge(bridge); agp_put_bridge(bridge); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/sworks-agp.c
static void serverworks_free_page_map(struct serverworks_page_map *page_map) { set_memory_wb((unsigned long)page_map->real, 1); free_page((unsigned long)page_map->real); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/sworks-agp.c
static int serverworks_create_gatt_pages(int nr_tables) { struct serverworks_page_map **tables; struct serverworks_page_map *entry; int retval = 0; int i; tables = kcalloc(nr_tables + 1, sizeof(struct serverworks_page_map *), GFP_KERNEL); if (tables == NULL) return -ENOMEM; for (i = 0; i < nr...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/sworks-agp.c
static void serverworks_tlbflush(struct agp_memory *temp) { unsigned long timeout; writeb(1, serverworks_private.registers + SVWRKS_POSTFLUSH); timeout = jiffies + 3 * HZ; while (readb(serverworks_private.registers + SVWRKS_POSTFLUSH) == 1) { cpu_relax(); if (time_after(jiffies, timeout)) { dev_e...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/sworks-agp.c
static void serverworks_agp_enable(struct agp_bridge_data *bridge, u32 mode) { u32 command; pci_read_config_dword(serverworks_private.svrwrks_dev, bridge->capndx + PCI_AGP_STATUS, &command); command = agp_collect_device_status(bridge, mode, command); command &= ~0x10; command &= ~0x...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/uninorth-agp.c
static void uninorth_tlbflush(struct agp_memory *mem) { u32 ctrl = UNI_N_CFG_GART_ENABLE; if (is_u3) ctrl |= U3_N_CFG_GART_PERFRD; pci_write_config_dword(agp_bridge->dev, UNI_N_CFG_GART_CTRL, ctrl | UNI_N_CFG_GART_INVAL); pci_write_config_dword(agp_bridge->dev, UNI_N_CFG_GART_CTRL...
[ 1, 0 ]
Linux Kernel
drivers/char/agp/uninorth-agp.c
static int uninorth_configure(void) { struct aper_size_info_32 *current_size; current_size = A_SIZE_32(agp_bridge->current_size); dev_info(&agp_bridge->dev->dev, "configuring for size idx: %d\n", current_size->size_value); pci_write_config_dword(agp_bridge->dev, UNI_N_CFG_GART_BASE, ...
[ 0, 1 ]
Linux Kernel
drivers/char/agp/uninorth-agp.c
static int uninorth_remove_memory(struct agp_memory *mem, off_t pg_start, int type) { size_t i; u32 *gp; int mask_type; if (type != mem->type) return -EINVAL; mask_type = agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type); if (mask_type != 0) { return -E...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/uninorth-agp.c
static int agp_uninorth_resume(struct pci_dev *pdev) { struct agp_bridge_data *bridge; u32 command; bridge = agp_find_bridge(pdev); if (bridge == NULL) return -ENODEV; command = (long)bridge->dev_private_data; bridge->dev_private_data = NULL; if (!(command & PCI_AGP_COMMAND_AGP)) return 0; un...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/via-agp.c
static void via_cleanup(void) { struct aper_size_info_8 *previous_size; previous_size = A_SIZE_8(agp_bridge->previous_size); pci_write_config_byte(agp_bridge->dev, VIA_APSIZE, previous_size->size_value); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/via-agp.c
static int via_configure_agp3(void) { u32 temp; agp_bridge->gart_bus_addr = pci_bus_address(agp_bridge->dev, AGP_APERTURE_BAR); /* attbase - aperture GATT base */ pci_write_config_dword(agp_bridge->dev, VIA_AGP3_ATTBASE, agp_bridge->gatt_bus_addr & 0xfffff000); /* 1. Enable G...
[ 0, 0 ]
Linux Kernel
drivers/char/agp/via-agp.c
static void via_cleanup_agp3(void) { struct aper_size_info_16 *previous_size; previous_size = A_SIZE_16(agp_bridge->previous_size); pci_write_config_byte(agp_bridge->dev, VIA_APSIZE, previous_size->size_value); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/via-agp.c
static void via_tlbflush_agp3(struct agp_memory *mem) { u32 temp; pci_read_config_dword(agp_bridge->dev, VIA_AGP3_GARTCTRL, &temp); pci_write_config_dword(agp_bridge->dev, VIA_AGP3_GARTCTRL, temp & ~(1 << 7)); pci_write_config_dword(agp_bridge->dev, VIA_AGP3_GARTCTRL, temp); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/via-agp.c
static void agp_via_remove(struct pci_dev *pdev) { struct agp_bridge_data *bridge = pci_get_drvdata(pdev); agp_remove_bridge(bridge); agp_put_bridge(bridge); }
[ 0, 0 ]
Linux Kernel
drivers/char/agp/via-agp.c
static int __init agp_via_init(void) { if (agp_off) return -EINVAL; return pci_register_driver(&agp_via_pci_driver); }
[ 0, 0 ]
Linux Kernel
drivers/char/apm-emulation.c
static inline apm_event_t queue_get_event(struct apm_queue *q) { q->event_tail = (q->event_tail + 1) % APM_MAX_EVENTS; return q->events[q->event_tail]; }
[ 1, 0 ]