drivers/scsi/aic7xxx/aicasm/aicasm.c
Source file repositories/reference/linux-study-clean/drivers/scsi/aic7xxx/aicasm/aicasm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/aic7xxx/aicasm/aicasm.c- Extension
.c- Size
- 20181 bytes
- Lines
- 844
- Domain
- Driver Families
- Bucket
- drivers/scsi
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
sys/types.hsys/mman.hctype.hinttypes.hregex.hstdio.hstdlib.hstring.hsysexits.hunistd.hendian.hmachine/endian.haicasm.haicasm_symbol.haicasm_insformat.h
Detected Declarations
function mainfunction usagefunction back_patchfunction output_codefunction dump_scopefunction emit_patchfunction output_listingfunction check_patchfunction stopfunction seq_allocfunction cs_allocfunction scope_allocfunction process_scope
Annotated Snippet
switch(ch) {
case 'd':
#if DEBUG
if (strcmp(optarg, "s") == 0) {
yy_flex_debug = 1;
mm_flex_debug = 1;
} else if (strcmp(optarg, "p") == 0) {
yydebug = 1;
mmdebug = 1;
} else {
fprintf(stderr, "%s: -d Requires either an "
"'s' or 'p' argument\n", appname);
usage();
}
#else
stop("-d: Assembler not built with debugging "
"information", EX_SOFTWARE);
#endif
break;
case 'i':
stock_include_file = optarg;
break;
case 'l':
/* Create a program listing */
if ((listfile = fopen(optarg, "w")) == NULL) {
perror(optarg);
stop(NULL, EX_CANTCREAT);
}
listfilename = optarg;
break;
case 'n':
/* Don't complain about the -nostdinc directrive */
if (strcmp(optarg, "ostdinc")) {
fprintf(stderr, "%s: Unknown option -%c%s\n",
appname, ch, optarg);
usage();
/* NOTREACHED */
}
break;
case 'o':
if ((ofile = fopen(optarg, "w")) == NULL) {
perror(optarg);
stop(NULL, EX_CANTCREAT);
}
ofilename = optarg;
break;
case 'p':
/* Create Register Diagnostic "printing" Functions */
if ((regdiagfile = fopen(optarg, "w")) == NULL) {
perror(optarg);
stop(NULL, EX_CANTCREAT);
}
regdiagfilename = optarg;
break;
case 'r':
if ((regfile = fopen(optarg, "w")) == NULL) {
perror(optarg);
stop(NULL, EX_CANTCREAT);
}
regfilename = optarg;
break;
case 'I':
{
path_entry_t include_dir;
if (strcmp(optarg, "-") == 0) {
if (includes_search_curdir == 0) {
fprintf(stderr, "%s: Warning - '-I-' "
"specified multiple "
"times\n", appname);
}
includes_search_curdir = 0;
for (include_dir = SLIST_FIRST(&search_path);
include_dir != NULL;
include_dir = SLIST_NEXT(include_dir,
links))
/*
* All entries before a '-I-' only
* apply to includes specified with
* quotes instead of "<>".
*/
include_dir->quoted_includes_only = 1;
} else {
include_dir =
(path_entry_t)malloc(sizeof(*include_dir));
if (include_dir == NULL) {
perror(optarg);
stop(NULL, EX_OSERR);
}
include_dir->directory = strdup(optarg);
Annotation
- Immediate include surface: `sys/types.h`, `sys/mman.h`, `ctype.h`, `inttypes.h`, `regex.h`, `stdio.h`, `stdlib.h`, `string.h`.
- Detected declarations: `function main`, `function usage`, `function back_patch`, `function output_code`, `function dump_scope`, `function emit_patch`, `function output_listing`, `function check_patch`, `function stop`, `function seq_alloc`.
- Atlas domain: Driver Families / drivers/scsi.
- 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.