/* * IOMMU helper functions for the free area management */ #include #include #include 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; } 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; } EXPORT_SYMBOL(iommu_area_alloc); '>emaclite-cleanup net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
ModeNameSize
-rw-r--r--Makefile414logplain
-rw-r--r--auth_gss.c54831logplain
-rw-r--r--gss_generic_token.c6226logplain
-rw-r--r--gss_krb5_crypto.c27467logplain
-rw-r--r--gss_krb5_keys.c9076logplain
-rw-r--r--gss_krb5_mech.c20724logplain
-rw-r--r--gss_krb5_seal.c6772logplain
-rw-r--r--gss_krb5_seqnum.c4645logplain
-rw-r--r--gss_krb5_unseal.c6813logplain
-rw-r--r--gss_krb5_wrap.c18005logplain
-rw-r--r--gss_mech_switch.c12603logplain
-rw-r--r--gss_rpc_upcall.c9707logplain