drivers/crypto/nx/nx-common-pseries.c
Source file repositories/reference/linux-study-clean/drivers/crypto/nx/nx-common-pseries.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/nx/nx-common-pseries.c- Extension
.c- Size
- 35982 bytes
- Lines
- 1272
- Domain
- Driver Families
- Bucket
- drivers/crypto
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/vio.hasm/hvcall.hasm/vas.hcrypto/internal/scompress.hnx-842.hnx_csbcpb.h
Detected Declarations
struct hv_nx_cop_capsstruct nx_cop_capsstruct nx842_workmemstruct ibm_nx842_countersstruct nx842_devdatastruct nx842_slentrystruct nx842_scatterlistfunction check_constraintsfunction ibm_nx842_incr_histfunction nx842_get_desired_dmafunction nx842_get_scatterlist_sizefunction nx842_build_scatterlistfunction nx842_validate_resultfunction nx842_pseries_compressfunction nx842_pseries_decompressfunction nx842_OF_set_defaultsfunction nx842_OF_upd_statusfunction nx842_OF_upd_maxsglenfunction nx842_OF_upd_maxsyncopfunction nx842_OF_updfunction notifier_to_errnofunction nx842_timehist_showfunction nx842_probefunction nx842_removefunction nxcop_get_capabilitiesfunction nx842_pseries_initfunction nx842_pseries_exitmodule init nx842_pseries_init
Annotated Snippet
module_init(nx842_pseries_init);
static void __exit nx842_pseries_exit(void)
{
struct nx842_devdata *old_devdata;
unsigned long flags;
vas_unregister_api_pseries();
crypto_unregister_scomp(&nx842_pseries_alg);
spin_lock_irqsave(&devdata_spinlock, flags);
old_devdata = rcu_dereference_check(devdata,
lockdep_is_held(&devdata_spinlock));
RCU_INIT_POINTER(devdata, NULL);
spin_unlock_irqrestore(&devdata_spinlock, flags);
synchronize_rcu();
if (old_devdata && old_devdata->dev)
dev_set_drvdata(old_devdata->dev, NULL);
kfree(old_devdata);
vio_unregister_driver(&nx842_vio_driver);
}
module_exit(nx842_pseries_exit);
Annotation
- Immediate include surface: `asm/vio.h`, `asm/hvcall.h`, `asm/vas.h`, `crypto/internal/scompress.h`, `nx-842.h`, `nx_csbcpb.h`.
- Detected declarations: `struct hv_nx_cop_caps`, `struct nx_cop_caps`, `struct nx842_workmem`, `struct ibm_nx842_counters`, `struct nx842_devdata`, `struct nx842_slentry`, `struct nx842_scatterlist`, `function check_constraints`, `function ibm_nx842_incr_hist`, `function nx842_get_desired_dma`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.