arch/sparc/include/asm/leon.h

Source file repositories/reference/linux-study-clean/arch/sparc/include/asm/leon.h

File Facts

System
Linux kernel
Corpus path
arch/sparc/include/asm/leon.h
Extension
.h
Size
7848 bytes
Lines
267
Domain
Architecture Layer
Bucket
arch/sparc
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct leon3_cacheregs {
	unsigned long ccr;	/* 0x00 - Cache Control Register  */
	unsigned long iccr;     /* 0x08 - Instruction Cache Configuration Register */
	unsigned long dccr;	/* 0x0c - Data Cache Configuration Register */
};

#include <linux/irq.h>
#include <linux/interrupt.h>

struct device_node;
struct task_struct;
unsigned int leon_build_device_irq(unsigned int real_irq,
				   irq_flow_handler_t flow_handler,
				   const char *name, int do_ack);
void leon_update_virq_handling(unsigned int virq,
			       irq_flow_handler_t flow_handler,
			       const char *name, int do_ack);
void leon_init_timers(void);
void leon_node_init(struct device_node *dp, struct device_node ***nextp);
void init_leon(void);
void poke_leonsparc(void);
void leon3_getCacheRegs(struct leon3_cacheregs *regs);
extern int leon3_ticker_irq;

#ifdef CONFIG_SMP
int leon_smp_nrcpus(void);
void leon_clear_profile_irq(int cpu);
void leon_smp_done(void);
void leon_boot_cpus(void);
int leon_boot_one_cpu(int i, struct task_struct *);
void leon_init_smp(void);
void leon_enable_irq_cpu(unsigned int irq_nr, unsigned int cpu);
irqreturn_t leon_percpu_timer_interrupt(int irq, void *unused);

extern unsigned int smpleon_ipi[];
extern unsigned int linux_trap_ipi15_leon[];
extern int leon_ipi_irq;

#endif /* CONFIG_SMP */

#endif /* __ASSEMBLER__ */

/* macros used in leon_mm.c */
#define PFN(x)           ((x) >> PAGE_SHIFT)
#define _pfn_valid(pfn)	 ((pfn < last_valid_pfn) && (pfn >= PFN(phys_base)))
#define _SRMMU_PTE_PMASK_LEON 0xffffffff

/*
 * On LEON PCI Memory space is mapped 1:1 with physical address space.
 *
 * I/O space is located at low 64Kbytes in PCI I/O space. The I/O addresses
 * are converted into CPU addresses to virtual addresses that are mapped with
 * MMU to the PCI Host PCI I/O space window which are translated to the low
 * 64Kbytes by the Host controller.
 */

#endif

Annotation

Implementation Notes