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
09b54128
Commit
09b54128
authored
Jan 30, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: some small optimisations
parent
3ddbd4bd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
15 deletions
+24
-15
arch/ppc64/kernel/htab.c
arch/ppc64/kernel/htab.c
+3
-1
include/asm-ppc64/processor.h
include/asm-ppc64/processor.h
+8
-8
include/asm-ppc64/system.h
include/asm-ppc64/system.h
+11
-4
include/asm-ppc64/uaccess.h
include/asm-ppc64/uaccess.h
+2
-2
No files found.
arch/ppc64/kernel/htab.c
View file @
09b54128
...
...
@@ -333,7 +333,7 @@ int __hash_page(unsigned long ea, unsigned long access, unsigned long vsid,
hpteflags
,
0
,
large
);
/* Primary is full, try the secondary */
if
(
slot
==
-
1
)
{
if
(
unlikely
(
slot
==
-
1
)
)
{
pte_val
(
new_pte
)
|=
1
<<
15
;
hpte_group
=
((
~
hash
&
htab_data
.
htab_hash_mask
)
*
HPTES_PER_GROUP
)
&
~
0x7UL
;
...
...
@@ -393,6 +393,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
mm
=
&
init_mm
;
vsid
=
get_kernel_vsid
(
ea
);
break
;
#if 0
case EEH_REGION_ID:
/*
* Should only be hit if there is an access to MMIO space
...
...
@@ -404,6 +405,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
* Should never get here - entire 0xC0... region is bolted.
* Send the problem up to do_page_fault
*/
#endif
default:
/* Not a valid range
* Send the problem up to do_page_fault
...
...
include/asm-ppc64/processor.h
View file @
09b54128
...
...
@@ -725,17 +725,17 @@ static inline void prefetchw(const void *x)
#define spin_lock_prefetch(x) prefetchw(x)
#define cpu_has_largepage() (
__is_processor(PV_POWER4)
|| \
__is_processor(PV_POWER4p)
)
#define cpu_has_largepage() (
processor_type() == PV_POWER4
|| \
processor_type() == PV_POWER4p
)
#define cpu_has_slb() (
__is_processor(PV_POWER4)
|| \
__is_processor(PV_POWER4p)
)
#define cpu_has_slb() (
processor_type() == PV_POWER4
|| \
processor_type() == PV_POWER4p
)
#define cpu_has_tlbiel() (
__is_processor(PV_POWER4)
|| \
__is_processor(PV_POWER4p)
)
#define cpu_has_tlbiel() (
processor_type() == PV_POWER4
|| \
processor_type() == PV_POWER4p
)
#define cpu_has_noexecute() (
__is_processor(PV_POWER4)
|| \
__is_processor(PV_POWER4p)
)
#define cpu_has_noexecute() (
processor_type() == PV_POWER4
|| \
processor_type() == PV_POWER4p
)
#endif
/* ASSEMBLY */
...
...
include/asm-ppc64/system.h
View file @
09b54128
...
...
@@ -105,11 +105,18 @@ extern void dump_regs(struct pt_regs *);
!(flags & MSR_EE); \
})
static
__inline__
int
__is_processor
(
unsigned
long
pv
)
static
inline
int
__is_processor
(
unsigned
long
pv
)
{
unsigned
long
pvr
;
asm
volatile
(
"mfspr %0, 0x11F"
:
"=r"
(
pvr
));
return
(
PVR_VER
(
pvr
)
==
pv
);
unsigned
long
pvr
;
asm
(
"mfspr %0, 0x11F"
:
"=r"
(
pvr
));
return
(
PVR_VER
(
pvr
)
==
pv
);
}
static
inline
int
processor_type
(
void
)
{
unsigned
long
pvr
;
asm
(
"mfspr %0, 0x11F"
:
"=r"
(
pvr
));
return
(
PVR_VER
(
pvr
));
}
/*
...
...
include/asm-ppc64/uaccess.h
View file @
09b54128
...
...
@@ -131,7 +131,7 @@ do { \
*/
#define __put_user_asm(x, addr, err, op) \
__asm__ __volatile__( \
"1: "op" %1,0(%2)
\n"
\
"1: "op" %1,0(%2)
# put_user\n"
\
"2:\n" \
".section .fixup,\"ax\"\n" \
"3: li %0,%3\n" \
...
...
@@ -179,7 +179,7 @@ do { \
#define __get_user_asm(x, addr, err, op) \
__asm__ __volatile__( \
"1: "op" %1,0(%2)
\n"
\
"1: "op" %1,0(%2)
# get_user\n"
\
"2:\n" \
".section .fixup,\"ax\"\n" \
"3: li %0,%3\n" \
...
...
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