Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170403
b: refs/heads/master
c: 4309e56
h: refs/heads/master
i:
  170401: 6120f3e
  170399: 79fe305
v: v3
  • Loading branch information
Kristoffer Glembo authored and David S. Miller committed Nov 16, 2009
1 parent 368895a commit cb01eaf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c000c71272ddbe3774b624fdef4eae3147877133
refs/heads/master: 4309e5682dd6cca22f1a5cc364b209bf4a121786
17 changes: 12 additions & 5 deletions trunk/arch/sparc/include/asm/leon.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static inline unsigned long leon_load_reg(unsigned long paddr)
return retval;
}

extern inline void leon_srmmu_disabletlb(void)
static inline void leon_srmmu_disabletlb(void)
{
unsigned int retval;
__asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0),
Expand All @@ -158,7 +158,7 @@ extern inline void leon_srmmu_disabletlb(void)
"i"(ASI_LEON_MMUREGS) : "memory");
}

extern inline void leon_srmmu_enabletlb(void)
static inline void leon_srmmu_enabletlb(void)
{
unsigned int retval;
__asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0),
Expand Down Expand Up @@ -190,7 +190,7 @@ extern void leon_init_IRQ(void);

extern unsigned long last_valid_pfn;

extern inline unsigned long sparc_leon3_get_dcachecfg(void)
static inline unsigned long sparc_leon3_get_dcachecfg(void)
{
unsigned int retval;
__asm__ __volatile__("lda [%1] %2, %0\n\t" :
Expand All @@ -201,15 +201,22 @@ extern inline unsigned long sparc_leon3_get_dcachecfg(void)
}

/* enable snooping */
extern inline void sparc_leon3_enable_snooping(void)
static inline void sparc_leon3_enable_snooping(void)
{
__asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t"
"set 0x800000, %%l2\n\t"
"or %%l2, %%l1, %%l2\n\t"
"sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2");
};

extern inline void sparc_leon3_disable_cache(void)
static inline int sparc_leon3_snooping_enabled(void)
{
u32 cctrl;
__asm__ __volatile__("lda [%%g0] 2, %0\n\t" : "=r"(cctrl));
return (cctrl >> 23) & 1;
};

static inline void sparc_leon3_disable_cache(void)
{
__asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t"
"set 0x00000f, %%l2\n\t"
Expand Down

0 comments on commit cb01eaf

Please sign in to comment.