arch/powerpc/crypto/vmx.c
Source file repositories/reference/linux-study-clean/arch/powerpc/crypto/vmx.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/crypto/vmx.c- Extension
.c- Size
- 1412 bytes
- Lines
- 62
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
Dependency Surface
linux/module.hlinux/moduleparam.hlinux/types.hlinux/err.hlinux/cpufeature.hlinux/crypto.hasm/cputable.hcrypto/internal/skcipher.haesp8-ppc.h
Detected Declarations
function Copyrightfunction p8_exit
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Routines supporting VMX instructions on the Power 8
*
* Copyright (C) 2015 International Business Machines Inc.
*
* Author: Marcelo Henrique Cerri <mhcerri@br.ibm.com>
*/
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/err.h>
#include <linux/cpufeature.h>
#include <linux/crypto.h>
#include <asm/cputable.h>
#include <crypto/internal/skcipher.h>
#include "aesp8-ppc.h"
static int __init p8_init(void)
{
int ret;
ret = crypto_register_skcipher(&p8_aes_cbc_alg);
if (ret)
goto err;
ret = crypto_register_skcipher(&p8_aes_ctr_alg);
if (ret)
goto err_unregister_aes_cbc;
ret = crypto_register_skcipher(&p8_aes_xts_alg);
if (ret)
goto err_unregister_aes_ctr;
return 0;
err_unregister_aes_ctr:
crypto_unregister_skcipher(&p8_aes_ctr_alg);
err_unregister_aes_cbc:
crypto_unregister_skcipher(&p8_aes_cbc_alg);
err:
return ret;
}
static void __exit p8_exit(void)
{
crypto_unregister_skcipher(&p8_aes_xts_alg);
crypto_unregister_skcipher(&p8_aes_ctr_alg);
crypto_unregister_skcipher(&p8_aes_cbc_alg);
}
module_cpu_feature_match(PPC_MODULE_FEATURE_VEC_CRYPTO, p8_init);
module_exit(p8_exit);
MODULE_AUTHOR("Marcelo Cerri<mhcerri@br.ibm.com>");
MODULE_DESCRIPTION("IBM VMX cryptographic acceleration instructions "
"support on Power 8");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0.0");
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/types.h`, `linux/err.h`, `linux/cpufeature.h`, `linux/crypto.h`, `asm/cputable.h`, `crypto/internal/skcipher.h`.
- Detected declarations: `function Copyright`, `function p8_exit`.
- Atlas domain: Architecture Layer / arch/powerpc.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.