Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44694
b: refs/heads/master
c: 255d1f8
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Dec 18, 2006
1 parent 4cb02e6 commit 4fc7379
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 26 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: 994adcc36d8c2133fce01f4d3fe4e41007555913
refs/heads/master: 255d1f8639f5877381545d0da6821079ebad1c21
20 changes: 20 additions & 0 deletions trunk/arch/arm/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,26 @@ static int __init noalign_setup(char *__unused)
}
__setup("noalign", noalign_setup);

#ifndef CONFIG_SMP
void adjust_cr(unsigned long mask, unsigned long set)
{
unsigned long flags;

mask &= ~CR_A;

set &= mask;

local_irq_save(flags);

cr_no_alignment = (cr_no_alignment & ~mask) | set;
cr_alignment = (cr_alignment & ~mask) | set;

set_cr((get_cr() & ~mask) | set);

local_irq_restore(flags);
}
#endif

struct mem_types {
unsigned int prot_pte;
unsigned int prot_l1;
Expand Down
33 changes: 8 additions & 25 deletions trunk/include/asm-arm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
#ifndef __ASSEMBLY__

#include <linux/linkage.h>
#include <linux/irqflags.h>

struct thread_info;
struct task_struct;
Expand Down Expand Up @@ -139,6 +140,9 @@ static inline int cpu_is_xsc3(void)
#define cpu_is_xscale() 1
#endif

extern unsigned long cr_no_alignment; /* defined in entry-armv.S */
extern unsigned long cr_alignment; /* defined in entry-armv.S */

static inline unsigned int get_cr(void)
{
unsigned int val;
Expand All @@ -152,6 +156,10 @@ static inline void set_cr(unsigned int val)
: : "r" (val) : "cc");
}

#ifndef CONFIG_SMP
extern void adjust_cr(unsigned long mask, unsigned long set);
#endif

#define CPACC_FULL(n) (3 << (n * 2))
#define CPACC_SVC(n) (1 << (n * 2))
#define CPACC_DISABLE(n) (0 << (n * 2))
Expand All @@ -170,29 +178,6 @@ static inline void set_copro_access(unsigned int val)
: : "r" (val) : "cc");
}

extern unsigned long cr_no_alignment; /* defined in entry-armv.S */
extern unsigned long cr_alignment; /* defined in entry-armv.S */

#ifndef CONFIG_SMP
static inline void adjust_cr(unsigned long mask, unsigned long set)
{
unsigned long flags, cr;

mask &= ~CR_A;

set &= mask;

local_irq_save(flags);

cr_no_alignment = (cr_no_alignment & ~mask) | set;
cr_alignment = (cr_alignment & ~mask) | set;

set_cr((get_cr() & ~mask) | set);

local_irq_restore(flags);
}
#endif

#define UDBG_UNDEFINED (1 << 0)
#define UDBG_SYSCALL (1 << 1)
#define UDBG_BADABORT (1 << 2)
Expand Down Expand Up @@ -248,8 +233,6 @@ static inline void sched_cacheflush(void)
{
}

#include <linux/irqflags.h>

#ifdef CONFIG_SMP

#define smp_mb() mb()
Expand Down

0 comments on commit 4fc7379

Please sign in to comment.