arch/sh/include/asm/platform_early.h
Source file repositories/reference/linux-study-clean/arch/sh/include/asm/platform_early.h
File Facts
- System
- Linux kernel
- Corpus path
arch/sh/include/asm/platform_early.h- Extension
.h- Size
- 1849 bytes
- Lines
- 62
- Domain
- Architecture Layer
- Bucket
- arch/sh
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/platform_device.hlinux/pm_runtime.hlinux/slab.h
Detected Declarations
struct sh_early_platform_driverfunction is_sh_early_platform_device
Annotated Snippet
struct sh_early_platform_driver {
const char *class_str;
struct platform_driver *pdrv;
struct list_head list;
int requested_id;
char *buffer;
int bufsize;
};
#define EARLY_PLATFORM_ID_UNSET -2
#define EARLY_PLATFORM_ID_ERROR -3
extern int sh_early_platform_driver_register(struct sh_early_platform_driver *epdrv,
char *buf);
extern void sh_early_platform_add_devices(struct platform_device **devs, int num);
static inline int is_sh_early_platform_device(struct platform_device *pdev)
{
return !pdev->dev.driver;
}
extern void sh_early_platform_driver_register_all(char *class_str);
extern int sh_early_platform_driver_probe(char *class_str,
int nr_probe, int user_only);
#define sh_early_platform_init(class_string, platdrv) \
sh_early_platform_init_buffer(class_string, platdrv, NULL, 0)
#ifndef MODULE
#define sh_early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \
static __initdata struct sh_early_platform_driver early_driver = { \
.class_str = class_string, \
.buffer = buf, \
.bufsize = bufsiz, \
.pdrv = platdrv, \
.requested_id = EARLY_PLATFORM_ID_UNSET, \
}; \
static int __init sh_early_platform_driver_setup_func(char *buffer) \
{ \
return sh_early_platform_driver_register(&early_driver, buffer); \
} \
early_param(class_string, sh_early_platform_driver_setup_func)
#else /* MODULE */
#define sh_early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \
static inline char *sh_early_platform_driver_setup_func(void) \
{ \
return bufsiz ? buf : NULL; \
}
#endif /* MODULE */
#endif /* __PLATFORM_EARLY__ */
Annotation
- Immediate include surface: `linux/types.h`, `linux/platform_device.h`, `linux/pm_runtime.h`, `linux/slab.h`.
- Detected declarations: `struct sh_early_platform_driver`, `function is_sh_early_platform_device`.
- Atlas domain: Architecture Layer / arch/sh.
- 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.