lib/crc/arm64/crc-t10dif.h

Source file repositories/reference/linux-study-clean/lib/crc/arm64/crc-t10dif.h

File Facts

System
Linux kernel
Corpus path
lib/crc/arm64/crc-t10dif.h
Extension
.h
Size
1398 bytes
Lines
49
Domain
Kernel Services
Bucket
lib
Inferred role
Kernel Services: implementation source
Status
source implementation candidate

Why This File Exists

Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.

Dependency Surface

Detected Declarations

Annotated Snippet

if (static_branch_likely(&have_pmull)) {
			scoped_ksimd()
				return crc_t10dif_pmull_p64(crc, data, length);
		} else if (length > CRC_T10DIF_PMULL_CHUNK_SIZE &&
			   static_branch_likely(&have_asimd)) {
			u8 buf[16];

			scoped_ksimd()
				crc_t10dif_pmull_p8(crc, data, length, buf);

			return crc_t10dif_generic(0, buf, sizeof(buf));
		}
	}
	return crc_t10dif_generic(crc, data, length);
}

#define crc_t10dif_mod_init_arch crc_t10dif_mod_init_arch
static void crc_t10dif_mod_init_arch(void)
{
	if (cpu_have_named_feature(ASIMD)) {
		static_branch_enable(&have_asimd);
		if (cpu_have_named_feature(PMULL))
			static_branch_enable(&have_pmull);
	}
}

Annotation

Implementation Notes