block/partitions/acorn.c
Source file repositories/reference/linux-study-clean/block/partitions/acorn.c
File Facts
- System
- Linux kernel
- Corpus path
block/partitions/acorn.c- Extension
.c- Size
- 12103 bytes
- Lines
- 548
- Domain
- Representative Device Path
- Bucket
- PCIe NVMe Storage Path
- Inferred role
- Representative Device Path: implementation source
- Status
- source implementation candidate
Why This File Exists
Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/buffer_head.hlinux/adfs_fs.hlinux/minmax.hcheck.h
Detected Declarations
struct riscix_partstruct riscix_recordstruct linux_partstruct ics_partstruct ptec_partstruct eesox_partfunction Copyrightfunction riscix_partitionfunction linux_partitionfunction adfspart_check_CUMANAfunction adfspart_check_ADFSfunction adfspart_check_ICSLinuxfunction valid_ics_sectorfunction adfspart_check_ICSfunction valid_ptec_sectorfunction adfspart_check_POWERTECfunction adfspart_check_EESOX
Annotated Snippet
struct riscix_part {
__le32 start;
__le32 length;
__le32 one;
char name[16];
};
struct riscix_record {
__le32 magic;
#define RISCIX_MAGIC cpu_to_le32(0x4a657320)
__le32 date;
struct riscix_part part[8];
};
#if defined(CONFIG_ACORN_PARTITION_CUMANA) || \
defined(CONFIG_ACORN_PARTITION_ADFS)
static int riscix_partition(struct parsed_partitions *state,
unsigned long first_sect, int slot,
unsigned long nr_sects)
{
Sector sect;
struct riscix_record *rr;
rr = read_part_sector(state, first_sect, §);
if (!rr)
return -1;
seq_buf_puts(&state->pp_buf, " [RISCiX]");
if (rr->magic == RISCIX_MAGIC) {
unsigned long size = min(nr_sects, 2);
int part;
seq_buf_puts(&state->pp_buf, " <");
put_partition(state, slot++, first_sect, size);
for (part = 0; part < 8; part++) {
if (rr->part[part].one &&
memcmp(rr->part[part].name, "All\0", 4)) {
put_partition(state, slot++,
le32_to_cpu(rr->part[part].start),
le32_to_cpu(rr->part[part].length));
seq_buf_printf(&state->pp_buf, "(%s)", rr->part[part].name);
}
}
seq_buf_puts(&state->pp_buf, " >\n");
} else {
put_partition(state, slot++, first_sect, nr_sects);
}
put_dev_sector(sect);
return slot;
}
#endif
#endif
#define LINUX_NATIVE_MAGIC 0xdeafa1de
#define LINUX_SWAP_MAGIC 0xdeafab1e
struct linux_part {
__le32 magic;
__le32 start_sect;
__le32 nr_sects;
};
#if defined(CONFIG_ACORN_PARTITION_CUMANA) || \
defined(CONFIG_ACORN_PARTITION_ADFS)
static int linux_partition(struct parsed_partitions *state,
unsigned long first_sect, int slot,
unsigned long nr_sects)
{
Sector sect;
struct linux_part *linuxp;
unsigned long size = min(nr_sects, 2);
seq_buf_puts(&state->pp_buf, " [Linux]");
put_partition(state, slot++, first_sect, size);
linuxp = read_part_sector(state, first_sect, §);
if (!linuxp)
return -1;
seq_buf_puts(&state->pp_buf, " <");
while (linuxp->magic == cpu_to_le32(LINUX_NATIVE_MAGIC) ||
linuxp->magic == cpu_to_le32(LINUX_SWAP_MAGIC)) {
if (slot == state->limit)
break;
Annotation
- Immediate include surface: `linux/buffer_head.h`, `linux/adfs_fs.h`, `linux/minmax.h`, `check.h`.
- Detected declarations: `struct riscix_part`, `struct riscix_record`, `struct linux_part`, `struct ics_part`, `struct ptec_part`, `struct eesox_part`, `function Copyright`, `function riscix_partition`, `function linux_partition`, `function adfspart_check_CUMANA`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- 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.