cregit-Linux how code gets into the kernel

Release 4.10 lib/iommu-helper.c

Directory: lib
/*
 * IOMMU helper functions for the free area management
 */

#include <linux/export.h>
#include <linux/bitmap.h>
#include <linux/bug.h>


int iommu_is_span_boundary(unsigned int index, unsigned int nr, unsigned long shift, unsigned long boundary_size) { BUG_ON(!is_power_of_2(boundary_size)); shift = (shift + index) & (boundary_size - 1); return shift + nr > boundary_size; }

Contributors

PersonTokensPropCommitsCommitProp
fujita tomonorifujita tomonori51100.00%2100.00%
Total51100.00%2100.00%


unsigned long iommu_area_alloc(unsigned long *map, unsigned long size, unsigned long start, unsigned int nr, unsigned long shift, unsigned long boundary_size, unsigned long align_mask) { unsigned long index; /* We don't want the last of the limit */ size -= 1; again: index = bitmap_find_next_zero_area(map, size, start, nr, align_mask); if (index < size) { if (iommu_is_span_boundary(index, nr, shift, boundary_size)) { start = ALIGN(shift + index, boundary_size) - shift; goto again; } bitmap_set(map, index, nr); return index; } return -1; }

Contributors

PersonTokensPropCommitsCommitProp
fujita tomonorifujita tomonori9380.17%250.00%
akinobu mitaakinobu mita1412.07%125.00%
sebastian ottsebastian ott97.76%125.00%
Total116100.00%4100.00%

EXPORT_SYMBOL(iommu_area_alloc);

Overall Contributors

PersonTokensPropCommitsCommitProp
fujita tomonorifujita tomonori15484.62%233.33%
akinobu mitaakinobu mita158.24%116.67%
sebastian ottsebastian ott94.95%116.67%
paul gortmakerpaul gortmaker42.20%233.33%
Total182100.00%6100.00%
Directory: lib
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.