/** * Copyright (C) 2008, Creative Technology Ltd. All Rights Reserved. * * This source file is released under GPL v2 license (no other versions). * See the COPYING file included in the main directory of this source * distribution for the license terms and conditions. * * @File ctvmem.h * * @Brief * This file contains the definition of virtual memory management object * for card device. * * @Author Liu Chun * @Date Mar 28 2008 */ #ifndef CTVMEM_H #define CTVMEM_H #define CT_PTP_NUM 4 /* num of device page table pages */ #include #include #include #include /* The chip can handle the page table of 4k pages * (emu20k1 can handle even 8k pages, but we don't use it right now) */ #define CT_PAGE_SIZE 4096 #define CT_PAGE_SHIFT 12 #define CT_PAGE_MASK (~(PAGE_SIZE - 1)) #define CT_PAGE_ALIGN(addr) ALIGN(addr, CT_PAGE_SIZE) struct ct_vm_block { unsigned int addr; /* starting logical addr of this block */ unsigned int size; /* size of this device virtual mem block */ struct list_head list; }; struct snd_pcm_substream; /* Virtual memory management object for card device */ struct ct_vm { struct snd_dma_buffer ptp[CT_PTP_NUM]; /* Device page table pages */ unsigned int size; /* Available addr space in bytes */ struct list_head unused; /* List of unused blocks */ struct list_head used; /* List of used blocks */ struct mutex lock; /* Map host addr (kmalloced/vmalloced) to device logical addr. */ struct ct_vm_block *(*map)(struct ct_vm *, struct snd_pcm_substream *, int size); /* Unmap device logical addr area. */ void (*unmap)(struct ct_vm *, struct ct_vm_block *block); dma_addr_t (*get_ptp_phys)(struct ct_vm *vm, int index); }; int ct_vm_create(struct ct_vm **rvm, struct pci_dev *pci); void ct_vm_destroy(struct ct_vm *vm); #endif /* CTVMEM_H */ de/uapi/scsi/Kbuild?h=nds-private-remove&id=90c1aff702d449a1a248c4829d51c0bc677f968e'>treecommitdiff
AgeCommit message (Expand)AuthorFilesLines
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-29 10:56:56 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-29 10:56:56 -0800
commit2c5d9555d6d937966d79d4c6529a5f7b9206e405 (patch)
tree4f3d220ea3aeaadcae0796c5456e0ef9a908071d /tools/testing/selftests/kcmp
parent53cd1ad1a68fd10f677445e04ed63aa9ce39b36b (diff)
parent2ad5d52d42810bed95100a3d912679d8864421ec (diff)
Merge branch 'parisc-4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull two parisc fixes from Helge Deller: "One fix to avoid usage of BITS_PER_LONG in user-space exported swab.h header which breaks compiling qemu, and one trivial fix for printk continuation in the parisc parport driver" * 'parisc-4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Don't use BITS_PER_LONG in userspace-exported swab.h header parisc, parport_gsc: Fixes for printk continuation lines
Diffstat (limited to 'tools/testing/selftests/kcmp')