Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
14881d2b
Commit
14881d2b
authored
Jun 22, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Move cpu_switch_mm() and cpu_get_pgd() to asm/proc-fns.h
parent
144b6300
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
35 deletions
+19
-35
include/asm-arm/cpu-multi32.h
include/asm-arm/cpu-multi32.h
+1
-16
include/asm-arm/cpu-single.h
include/asm-arm/cpu-single.h
+2
-19
include/asm-arm/proc-fns.h
include/asm-arm/proc-fns.h
+16
-0
No files found.
include/asm-arm/cpu-multi32.h
View file @
14881d2b
...
...
@@ -7,9 +7,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __ASSEMBLY__
#include <asm/memory.h>
#include <asm/page.h>
struct
mm_struct
;
...
...
@@ -64,16 +61,4 @@ extern struct processor {
#define cpu_do_idle() processor._do_idle()
#define cpu_dcache_clean_area(addr,sz) processor.dcache_clean_area(addr,sz)
#define cpu_set_pte(ptep, pte) processor.set_pte(ptep, pte)
#define cpu_switch_mm(pgd,mm) processor.switch_mm(__virt_to_phys((unsigned long)(pgd)),mm)
#define cpu_get_pgd() \
({ \
unsigned long pg; \
__asm__("mrc p15, 0, %0, c2, c0, 0" \
: "=r" (pg) : : "cc"); \
pg &= ~0x3fff; \
(pgd_t *)phys_to_virt(pg); \
})
#endif
#define cpu_do_switch_mm(pgd,mm) processor.switch_mm(pgd,mm)
include/asm-arm/cpu-single.h
View file @
14881d2b
...
...
@@ -27,12 +27,9 @@
#define cpu_reset __cpu_fn(CPU_NAME,_reset)
#define cpu_do_idle __cpu_fn(CPU_NAME,_do_idle)
#define cpu_dcache_clean_area __cpu_fn(CPU_NAME,_dcache_clean_area)
#define cpu_
_switch_mm
__cpu_fn(CPU_NAME,_switch_mm)
#define cpu_
do_switch_mm
__cpu_fn(CPU_NAME,_switch_mm)
#define cpu_set_pte __cpu_fn(CPU_NAME,_set_pte)
#ifndef __ASSEMBLY__
#include <asm/memory.h>
#include <asm/page.h>
struct
mm_struct
;
...
...
@@ -42,20 +39,6 @@ extern void cpu_proc_init(void);
extern
void
cpu_proc_fin
(
void
);
extern
int
cpu_do_idle
(
void
);
extern
void
cpu_dcache_clean_area
(
void
*
,
int
);
extern
void
cpu__switch_mm
(
unsigned
long
pgd_phys
,
struct
mm_struct
*
mm
);
extern
void
cpu_
do
_switch_mm
(
unsigned
long
pgd_phys
,
struct
mm_struct
*
mm
);
extern
void
cpu_set_pte
(
pte_t
*
ptep
,
pte_t
pte
);
extern
volatile
void
cpu_reset
(
unsigned
long
addr
);
#define cpu_switch_mm(pgd,mm) cpu__switch_mm(__virt_to_phys((unsigned long)(pgd)),mm)
#define cpu_get_pgd() \
({ \
unsigned long pg; \
__asm__("mrc p15, 0, %0, c2, c0, 0" \
: "=r" (pg) : : "cc"); \
pg &= ~0x3fff; \
(pgd_t *)phys_to_virt(pg); \
})
#endif
include/asm-arm/proc-fns.h
View file @
14881d2b
...
...
@@ -148,11 +148,27 @@
# endif
#endif
#ifndef __ASSEMBLY__
#ifndef MULTI_CPU
#include "asm/cpu-single.h"
#else
#include "asm/cpu-multi32.h"
#endif
#include <asm/memory.h>
#define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm)
#define cpu_get_pgd() \
({ \
unsigned long pg; \
__asm__("mrc p15, 0, %0, c2, c0, 0" \
: "=r" (pg) : : "cc"); \
pg &= ~0x3fff; \
(pgd_t *)phys_to_virt(pg); \
})
#endif
/* __ASSEMBLY__ */
#endif
/* __KERNEL__ */
#endif
/* __ASM_PROCFNS_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment