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
nexedi
linux
Commits
030dabd5
Commit
030dabd5
authored
Jun 11, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/home/davem/BK/sparc-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
c50dbc33
e1dccf46
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
59 additions
and
40 deletions
+59
-40
arch/sparc64/kernel/dtlb_backend.S
arch/sparc64/kernel/dtlb_backend.S
+1
-0
arch/sparc64/kernel/dtlb_base.S
arch/sparc64/kernel/dtlb_base.S
+3
-0
arch/sparc64/kernel/setup.c
arch/sparc64/kernel/setup.c
+1
-0
arch/sparc64/kernel/smp.c
arch/sparc64/kernel/smp.c
+1
-0
arch/sparc64/kernel/sparc64_ksyms.c
arch/sparc64/kernel/sparc64_ksyms.c
+1
-1
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/sys_sparc32.c
+20
-12
arch/sparc64/kernel/sys_sunos32.c
arch/sparc64/kernel/sys_sunos32.c
+1
-1
arch/sparc64/mm/init.c
arch/sparc64/mm/init.c
+6
-7
drivers/sbus/audio/dbri.c
drivers/sbus/audio/dbri.c
+1
-0
include/asm-sparc64/mmu_context.h
include/asm-sparc64/mmu_context.h
+2
-0
include/asm-sparc64/pgalloc.h
include/asm-sparc64/pgalloc.h
+8
-8
include/asm-sparc64/pgtable.h
include/asm-sparc64/pgtable.h
+3
-1
include/asm-sparc64/tlbflush.h
include/asm-sparc64/tlbflush.h
+11
-10
No files found.
arch/sparc64/kernel/dtlb_backend.S
View file @
030dabd5
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
*/
*/
#include <asm/pgtable.h>
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
#if PAGE_SHIFT == 13
#if PAGE_SHIFT == 13
#define FILL_VALID_SZ_BITS1(r1) \
#define FILL_VALID_SZ_BITS1(r1) \
...
...
arch/sparc64/kernel/dtlb_base.S
View file @
030dabd5
...
@@ -6,6 +6,9 @@
...
@@ -6,6 +6,9 @@
*
Copyright
(
C
)
1997
,
1998
Jakub
Jelinek
(
jj
@
ultra
.
linux
.
cz
)
*
Copyright
(
C
)
1997
,
1998
Jakub
Jelinek
(
jj
@
ultra
.
linux
.
cz
)
*/
*/
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
/*
%
g1
TLB_SFSR
(%
g1
+
%
g1
==
TLB_TAG_ACCESS
)
/*
%
g1
TLB_SFSR
(%
g1
+
%
g1
==
TLB_TAG_ACCESS
)
*
%
g2
(
KERN_HIGHBITS
|
KERN_LOWBITS
)
*
%
g2
(
KERN_HIGHBITS
|
KERN_LOWBITS
)
*
%
g3
VPTE
base
(
0xfffffffe00000000
)
Spitfire
/
Blackbird
(
44
-
bit
VA
space
)
*
%
g3
VPTE
base
(
0xfffffffe00000000
)
Spitfire
/
Blackbird
(
44
-
bit
VA
space
)
...
...
arch/sparc64/kernel/setup.c
View file @
030dabd5
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
#include <asm/head.h>
#include <asm/head.h>
#include <asm/starfire.h>
#include <asm/starfire.h>
#include <asm/hardirq.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h>
#ifdef CONFIG_IP_PNP
#ifdef CONFIG_IP_PNP
#include <net/ipconfig.h>
#include <net/ipconfig.h>
...
...
arch/sparc64/kernel/smp.c
View file @
030dabd5
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/atomic.h>
#include <asm/atomic.h>
#include <asm/tlbflush.h>
#include <asm/tlbflush.h>
#include <asm/mmu_context.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include <asm/page.h>
#include <asm/page.h>
...
...
arch/sparc64/kernel/sparc64_ksyms.c
View file @
030dabd5
...
@@ -143,7 +143,7 @@ EXPORT_SYMBOL(__global_restore_flags);
...
@@ -143,7 +143,7 @@ EXPORT_SYMBOL(__global_restore_flags);
#if defined(CONFIG_MCOUNT)
#if defined(CONFIG_MCOUNT)
extern
void
mcount
(
void
);
extern
void
mcount
(
void
);
EXPORT_SYMBOL
(
mcount
);
EXPORT_SYMBOL
_NOVERS
(
mcount
);
#endif
#endif
/* Per-CPU information table */
/* Per-CPU information table */
...
...
arch/sparc64/kernel/sys_sparc32.c
View file @
030dabd5
...
@@ -513,9 +513,9 @@ static int do_sys32_msgsnd (int first, int second, int third, void *uptr)
...
@@ -513,9 +513,9 @@ static int do_sys32_msgsnd (int first, int second, int third, void *uptr)
if
(
!
p
)
if
(
!
p
)
return
-
ENOMEM
;
return
-
ENOMEM
;
err
=
get_user
(
p
->
mtype
,
&
up
->
mtype
)
;
err
=
-
EFAULT
;
err
|=
__copy_from_user
(
p
->
mtext
,
&
up
->
mtext
,
second
);
if
(
get_user
(
p
->
mtype
,
&
up
->
mtype
)
||
if
(
err
)
__copy_from_user
(
p
->
mtext
,
&
up
->
mtext
,
second
)
)
goto
out
;
goto
out
;
old_fs
=
get_fs
();
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
set_fs
(
KERNEL_DS
);
...
@@ -1001,7 +1001,7 @@ typedef ssize_t (*iov_fn_t)(struct file *, const struct iovec *, unsigned long,
...
@@ -1001,7 +1001,7 @@ typedef ssize_t (*iov_fn_t)(struct file *, const struct iovec *, unsigned long,
static
long
do_readv_writev32
(
int
type
,
struct
file
*
file
,
static
long
do_readv_writev32
(
int
type
,
struct
file
*
file
,
const
struct
iovec32
*
vector
,
u32
count
)
const
struct
iovec32
*
vector
,
u32
count
)
{
{
unsigned
long
tot_len
;
__kernel_ssize_t32
tot_len
;
struct
iovec
iovstack
[
UIO_FASTIOV
];
struct
iovec
iovstack
[
UIO_FASTIOV
];
struct
iovec
*
iov
=
iovstack
,
*
ivp
;
struct
iovec
*
iov
=
iovstack
,
*
ivp
;
struct
inode
*
inode
;
struct
inode
*
inode
;
...
@@ -1031,13 +1031,19 @@ static long do_readv_writev32(int type, struct file *file,
...
@@ -1031,13 +1031,19 @@ static long do_readv_writev32(int type, struct file *file,
tot_len
=
0
;
tot_len
=
0
;
i
=
count
;
i
=
count
;
ivp
=
iov
;
ivp
=
iov
;
retval
=
-
EINVAL
;
while
(
i
>
0
)
{
while
(
i
>
0
)
{
u32
len
;
__kernel_ssize_t32
tmp
=
tot_len
;
__kernel_ssize_t32
len
;
u32
buf
;
u32
buf
;
__get_user
(
len
,
&
vector
->
iov_len
);
__get_user
(
len
,
&
vector
->
iov_len
);
__get_user
(
buf
,
&
vector
->
iov_base
);
__get_user
(
buf
,
&
vector
->
iov_base
);
if
(
len
<
0
)
/* size_t not fittina an ssize_t32 .. */
goto
out
;
tot_len
+=
len
;
tot_len
+=
len
;
if
(
tot_len
<
tmp
)
/* maths overflow on the ssize_t32 */
goto
out
;
ivp
->
iov_base
=
(
void
*
)
A
(
buf
);
ivp
->
iov_base
=
(
void
*
)
A
(
buf
);
ivp
->
iov_len
=
(
__kernel_size_t
)
len
;
ivp
->
iov_len
=
(
__kernel_size_t
)
len
;
vector
++
;
vector
++
;
...
@@ -2759,6 +2765,8 @@ sys32_rt_sigaction(int sig, struct sigaction32 *act, struct sigaction32 *oact,
...
@@ -2759,6 +2765,8 @@ sys32_rt_sigaction(int sig, struct sigaction32 *act, struct sigaction32 *oact,
ret
|=
__copy_to_user
(
&
oact
->
sa_mask
,
&
set32
,
sizeof
(
sigset_t32
));
ret
|=
__copy_to_user
(
&
oact
->
sa_mask
,
&
set32
,
sizeof
(
sigset_t32
));
ret
|=
__put_user
(
old_ka
.
sa
.
sa_flags
,
&
oact
->
sa_flags
);
ret
|=
__put_user
(
old_ka
.
sa
.
sa_flags
,
&
oact
->
sa_flags
);
ret
|=
__put_user
((
long
)
old_ka
.
sa
.
sa_restorer
,
&
oact
->
sa_restorer
);
ret
|=
__put_user
((
long
)
old_ka
.
sa
.
sa_restorer
,
&
oact
->
sa_restorer
);
if
(
ret
)
ret
=
-
EFAULT
;
}
}
return
ret
;
return
ret
;
...
@@ -3494,7 +3502,7 @@ static int nfs_clnt32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
...
@@ -3494,7 +3502,7 @@ static int nfs_clnt32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
err
|=
copy_from_user
(
&
karg
->
ca_client
.
cl_fhkey
[
0
],
err
|=
copy_from_user
(
&
karg
->
ca_client
.
cl_fhkey
[
0
],
&
arg32
->
ca32_client
.
cl32_fhkey
[
0
],
&
arg32
->
ca32_client
.
cl32_fhkey
[
0
],
NFSCLNT_KEYMAX
);
NFSCLNT_KEYMAX
);
return
err
;
return
(
err
?
-
EFAULT
:
0
)
;
}
}
static
int
nfs_exp32_trans
(
struct
nfsctl_arg
*
karg
,
struct
nfsctl_arg32
*
arg32
)
static
int
nfs_exp32_trans
(
struct
nfsctl_arg
*
karg
,
struct
nfsctl_arg32
*
arg32
)
...
@@ -3520,7 +3528,7 @@ static int nfs_exp32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
...
@@ -3520,7 +3528,7 @@ static int nfs_exp32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
&
arg32
->
ca32_export
.
ex32_anon_gid
);
&
arg32
->
ca32_export
.
ex32_anon_gid
);
karg
->
ca_export
.
ex_anon_uid
=
high2lowuid
(
karg
->
ca_export
.
ex_anon_uid
);
karg
->
ca_export
.
ex_anon_uid
=
high2lowuid
(
karg
->
ca_export
.
ex_anon_uid
);
karg
->
ca_export
.
ex_anon_gid
=
high2lowgid
(
karg
->
ca_export
.
ex_anon_gid
);
karg
->
ca_export
.
ex_anon_gid
=
high2lowgid
(
karg
->
ca_export
.
ex_anon_gid
);
return
err
;
return
(
err
?
-
EFAULT
:
0
)
;
}
}
static
int
nfs_uud32_trans
(
struct
nfsctl_arg
*
karg
,
struct
nfsctl_arg32
*
arg32
)
static
int
nfs_uud32_trans
(
struct
nfsctl_arg
*
karg
,
struct
nfsctl_arg32
*
arg32
)
...
@@ -3568,7 +3576,7 @@ static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
...
@@ -3568,7 +3576,7 @@ static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
err
|=
__get_user
(
karg
->
ca_umap
.
ug_gdimap
[
i
],
err
|=
__get_user
(
karg
->
ca_umap
.
ug_gdimap
[
i
],
&
(((
__kernel_gid_t32
*
)
A
(
uaddr
))[
i
]));
&
(((
__kernel_gid_t32
*
)
A
(
uaddr
))[
i
]));
return
err
;
return
(
err
?
-
EFAULT
:
0
)
;
}
}
static
int
nfs_getfh32_trans
(
struct
nfsctl_arg
*
karg
,
struct
nfsctl_arg32
*
arg32
)
static
int
nfs_getfh32_trans
(
struct
nfsctl_arg
*
karg
,
struct
nfsctl_arg32
*
arg32
)
...
@@ -3585,7 +3593,7 @@ static int nfs_getfh32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32
...
@@ -3585,7 +3593,7 @@ static int nfs_getfh32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32
&
arg32
->
ca32_getfh
.
gf32_ino
);
&
arg32
->
ca32_getfh
.
gf32_ino
);
err
|=
__get_user
(
karg
->
ca_getfh
.
gf_version
,
err
|=
__get_user
(
karg
->
ca_getfh
.
gf_version
,
&
arg32
->
ca32_getfh
.
gf32_version
);
&
arg32
->
ca32_getfh
.
gf32_version
);
return
err
;
return
(
err
?
-
EFAULT
:
0
)
;
}
}
static
int
nfs_getfd32_trans
(
struct
nfsctl_arg
*
karg
,
struct
nfsctl_arg32
*
arg32
)
static
int
nfs_getfd32_trans
(
struct
nfsctl_arg
*
karg
,
struct
nfsctl_arg32
*
arg32
)
...
@@ -3601,7 +3609,7 @@ static int nfs_getfd32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32
...
@@ -3601,7 +3609,7 @@ static int nfs_getfd32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32
(
NFS_MAXPATHLEN
+
1
));
(
NFS_MAXPATHLEN
+
1
));
err
|=
__get_user
(
karg
->
ca_getfd
.
gd_version
,
err
|=
__get_user
(
karg
->
ca_getfd
.
gd_version
,
&
arg32
->
ca32_getfd
.
gd32_version
);
&
arg32
->
ca32_getfd
.
gd32_version
);
return
err
;
return
(
err
?
-
EFAULT
:
0
)
;
}
}
static
int
nfs_getfs32_trans
(
struct
nfsctl_arg
*
karg
,
struct
nfsctl_arg32
*
arg32
)
static
int
nfs_getfs32_trans
(
struct
nfsctl_arg
*
karg
,
struct
nfsctl_arg32
*
arg32
)
...
@@ -3617,7 +3625,7 @@ static int nfs_getfs32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32
...
@@ -3617,7 +3625,7 @@ static int nfs_getfs32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32
(
NFS_MAXPATHLEN
+
1
));
(
NFS_MAXPATHLEN
+
1
));
err
|=
__get_user
(
karg
->
ca_getfs
.
gd_maxlen
,
err
|=
__get_user
(
karg
->
ca_getfs
.
gd_maxlen
,
&
arg32
->
ca32_getfs
.
gd32_maxlen
);
&
arg32
->
ca32_getfs
.
gd32_maxlen
);
return
err
;
return
(
err
?
-
EFAULT
:
0
)
;
}
}
/* This really doesn't need translations, we are only passing
/* This really doesn't need translations, we are only passing
...
@@ -3625,7 +3633,7 @@ static int nfs_getfs32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32
...
@@ -3625,7 +3633,7 @@ static int nfs_getfs32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32
*/
*/
static
int
nfs_getfh32_res_trans
(
union
nfsctl_res
*
kres
,
union
nfsctl_res32
*
res32
)
static
int
nfs_getfh32_res_trans
(
union
nfsctl_res
*
kres
,
union
nfsctl_res32
*
res32
)
{
{
return
copy_to_user
(
res32
,
kres
,
sizeof
(
*
res32
)
);
return
(
copy_to_user
(
res32
,
kres
,
sizeof
(
*
res32
))
?
-
EFAULT
:
0
);
}
}
int
asmlinkage
sys32_nfsservctl
(
int
cmd
,
struct
nfsctl_arg32
*
arg32
,
union
nfsctl_res32
*
res32
)
int
asmlinkage
sys32_nfsservctl
(
int
cmd
,
struct
nfsctl_arg32
*
arg32
,
union
nfsctl_res32
*
res32
)
...
...
arch/sparc64/kernel/sys_sunos32.c
View file @
030dabd5
...
@@ -445,7 +445,7 @@ asmlinkage int sunos_uname(struct sunos_utsname *name)
...
@@ -445,7 +445,7 @@ asmlinkage int sunos_uname(struct sunos_utsname *name)
ret
|=
copy_to_user
(
&
name
->
ver
[
0
],
&
system_utsname
.
version
[
0
],
sizeof
(
name
->
ver
)
-
1
);
ret
|=
copy_to_user
(
&
name
->
ver
[
0
],
&
system_utsname
.
version
[
0
],
sizeof
(
name
->
ver
)
-
1
);
ret
|=
copy_to_user
(
&
name
->
mach
[
0
],
&
system_utsname
.
machine
[
0
],
sizeof
(
name
->
mach
)
-
1
);
ret
|=
copy_to_user
(
&
name
->
mach
[
0
],
&
system_utsname
.
machine
[
0
],
sizeof
(
name
->
mach
)
-
1
);
up_read
(
&
uts_sem
);
up_read
(
&
uts_sem
);
return
ret
;
return
(
ret
?
-
EFAULT
:
0
)
;
}
}
asmlinkage
int
sunos_nosys
(
void
)
asmlinkage
int
sunos_nosys
(
void
)
...
...
arch/sparc64/mm/init.c
View file @
030dabd5
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/mmu_context.h>
#include <asm/tlbflush.h>
#include <asm/dma.h>
#include <asm/dma.h>
#include <asm/starfire.h>
#include <asm/starfire.h>
#include <asm/tlb.h>
#include <asm/tlb.h>
...
@@ -89,17 +90,15 @@ void check_pgt_cache(void)
...
@@ -89,17 +90,15 @@ void check_pgt_cache(void)
if
(
pgd_cache_size
>
PGT_CACHE_HIGH
/
4
)
{
if
(
pgd_cache_size
>
PGT_CACHE_HIGH
/
4
)
{
struct
page
*
page
,
*
page2
;
struct
page
*
page
,
*
page2
;
for
(
page2
=
NULL
,
page
=
(
struct
page
*
)
pgd_quicklist
;
page
;)
{
for
(
page2
=
NULL
,
page
=
(
struct
page
*
)
pgd_quicklist
;
page
;)
{
if
((
unsigned
long
)
page
->
pprev_hash
==
3
)
{
if
((
unsigned
long
)
page
->
lru
.
prev
==
3
)
{
if
(
page2
)
if
(
page2
)
page2
->
next_hash
=
page
->
next_hash
;
page2
->
lru
.
next
=
page
->
lru
.
next
;
else
else
(
struct
page
*
)
pgd_quicklist
=
page
->
next_hash
;
(
struct
page
*
)
pgd_quicklist
=
page
->
lru
.
next
;
page
->
next_hash
=
NULL
;
page
->
pprev_hash
=
NULL
;
pgd_cache_size
-=
2
;
pgd_cache_size
-=
2
;
__free_page
(
page
);
__free_page
(
page
);
if
(
page2
)
if
(
page2
)
page
=
page2
->
next_hash
;
page
=
(
struct
page
*
)
page2
->
lru
.
next
;
else
else
page
=
(
struct
page
*
)
pgd_quicklist
;
page
=
(
struct
page
*
)
pgd_quicklist
;
if
(
pgd_cache_size
<=
PGT_CACHE_LOW
/
4
)
if
(
pgd_cache_size
<=
PGT_CACHE_LOW
/
4
)
...
@@ -107,7 +106,7 @@ void check_pgt_cache(void)
...
@@ -107,7 +106,7 @@ void check_pgt_cache(void)
continue
;
continue
;
}
}
page2
=
page
;
page2
=
page
;
page
=
page
->
next_hash
;
page
=
(
struct
page
*
)
page
->
lru
.
next
;
}
}
}
}
#endif
#endif
...
...
drivers/sbus/audio/dbri.c
View file @
030dabd5
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
* - Data sheet of the T7903, a newer but very similar ISA bus equivalent
* - Data sheet of the T7903, a newer but very similar ISA bus equivalent
* available from the Lucent (formarly AT&T microelectronics) home
* available from the Lucent (formarly AT&T microelectronics) home
* page.
* page.
* - http://www.freesoft.org/Linux/DBRI/
* - MMCODEC: Crystal Semiconductor CS4215 16 bit Multimedia Audio Codec
* - MMCODEC: Crystal Semiconductor CS4215 16 bit Multimedia Audio Codec
* Interfaces: CHI, Audio In & Out, 2 bits parallel
* Interfaces: CHI, Audio In & Out, 2 bits parallel
* Documentation: from the Crystal Semiconductor home page.
* Documentation: from the Crystal Semiconductor home page.
...
...
include/asm-sparc64/mmu_context.h
View file @
030dabd5
...
@@ -141,6 +141,8 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str
...
@@ -141,6 +141,8 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str
spin_unlock
(
&
mm
->
page_table_lock
);
spin_unlock
(
&
mm
->
page_table_lock
);
}
}
extern
void
__flush_tlb_mm
(
unsigned
long
,
unsigned
long
);
/* Activate a new MM instance for the current task. */
/* Activate a new MM instance for the current task. */
static
inline
void
activate_mm
(
struct
mm_struct
*
active_mm
,
struct
mm_struct
*
mm
)
static
inline
void
activate_mm
(
struct
mm_struct
*
active_mm
,
struct
mm_struct
*
mm
)
{
{
...
...
include/asm-sparc64/pgalloc.h
View file @
030dabd5
...
@@ -35,11 +35,11 @@ static __inline__ void free_pgd_fast(pgd_t *pgd)
...
@@ -35,11 +35,11 @@ static __inline__ void free_pgd_fast(pgd_t *pgd)
struct
page
*
page
=
virt_to_page
(
pgd
);
struct
page
*
page
=
virt_to_page
(
pgd
);
preempt_disable
();
preempt_disable
();
if
(
!
page
->
pprev_hash
)
{
if
(
!
page
->
lru
.
prev
)
{
(
unsigned
long
*
)
page
->
next_hash
=
pgd_quicklist
;
(
unsigned
long
*
)
page
->
lru
.
next
=
pgd_quicklist
;
pgd_quicklist
=
(
unsigned
long
*
)
page
;
pgd_quicklist
=
(
unsigned
long
*
)
page
;
}
}
(
unsigned
long
)
page
->
pprev_hash
|=
(
unsigned
long
)
page
->
lru
.
prev
|=
(((
unsigned
long
)
pgd
&
(
PAGE_SIZE
/
2
))
?
2
:
1
);
(((
unsigned
long
)
pgd
&
(
PAGE_SIZE
/
2
))
?
2
:
1
);
pgd_cache_size
++
;
pgd_cache_size
++
;
preempt_enable
();
preempt_enable
();
...
@@ -51,7 +51,7 @@ static __inline__ pgd_t *get_pgd_fast(void)
...
@@ -51,7 +51,7 @@ static __inline__ pgd_t *get_pgd_fast(void)
preempt_disable
();
preempt_disable
();
if
((
ret
=
(
struct
page
*
)
pgd_quicklist
)
!=
NULL
)
{
if
((
ret
=
(
struct
page
*
)
pgd_quicklist
)
!=
NULL
)
{
unsigned
long
mask
=
(
unsigned
long
)
ret
->
pprev_hash
;
unsigned
long
mask
=
(
unsigned
long
)
ret
->
lru
.
prev
;
unsigned
long
off
=
0
;
unsigned
long
off
=
0
;
if
(
mask
&
1
)
if
(
mask
&
1
)
...
@@ -60,9 +60,9 @@ static __inline__ pgd_t *get_pgd_fast(void)
...
@@ -60,9 +60,9 @@ static __inline__ pgd_t *get_pgd_fast(void)
off
=
PAGE_SIZE
/
2
;
off
=
PAGE_SIZE
/
2
;
mask
&=
~
2
;
mask
&=
~
2
;
}
}
(
unsigned
long
)
ret
->
pprev_hash
=
mask
;
(
unsigned
long
)
ret
->
lru
.
prev
=
mask
;
if
(
!
mask
)
if
(
!
mask
)
pgd_quicklist
=
(
unsigned
long
*
)
ret
->
next_hash
;
pgd_quicklist
=
(
unsigned
long
*
)
ret
->
lru
.
next
;
ret
=
(
struct
page
*
)(
__page_address
(
ret
)
+
off
);
ret
=
(
struct
page
*
)(
__page_address
(
ret
)
+
off
);
pgd_cache_size
--
;
pgd_cache_size
--
;
preempt_enable
();
preempt_enable
();
...
@@ -74,10 +74,10 @@ static __inline__ pgd_t *get_pgd_fast(void)
...
@@ -74,10 +74,10 @@ static __inline__ pgd_t *get_pgd_fast(void)
if
(
page
)
{
if
(
page
)
{
ret
=
(
struct
page
*
)
page_address
(
page
);
ret
=
(
struct
page
*
)
page_address
(
page
);
clear_page
(
ret
);
clear_page
(
ret
);
(
unsigned
long
)
page
->
pprev_hash
=
2
;
(
unsigned
long
)
page
->
lru
.
prev
=
2
;
preempt_disable
();
preempt_disable
();
(
unsigned
long
*
)
page
->
next_hash
=
pgd_quicklist
;
(
unsigned
long
*
)
page
->
lru
.
next
=
pgd_quicklist
;
pgd_quicklist
=
(
unsigned
long
*
)
page
;
pgd_quicklist
=
(
unsigned
long
*
)
page
;
pgd_cache_size
++
;
pgd_cache_size
++
;
preempt_enable
();
preempt_enable
();
...
...
include/asm-sparc64/pgtable.h
View file @
030dabd5
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
#include <asm/spitfire.h>
#include <asm/spitfire.h>
#include <asm/asi.h>
#include <asm/asi.h>
#include <asm/mmu_context.h>
#include <asm/system.h>
#include <asm/system.h>
#include <asm/page.h>
#include <asm/page.h>
#include <asm/processor.h>
#include <asm/processor.h>
...
@@ -63,6 +62,8 @@
...
@@ -63,6 +62,8 @@
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLY__
#include <linux/sched.h>
/* Certain architectures need to do special things when pte's
/* Certain architectures need to do special things when pte's
* within a page table are directly modified. Thus, the following
* within a page table are directly modified. Thus, the following
* hook is made available.
* hook is made available.
...
@@ -286,6 +287,7 @@ extern pgd_t swapper_pg_dir[1];
...
@@ -286,6 +287,7 @@ extern pgd_t swapper_pg_dir[1];
#define mmu_lockarea(vaddr, len) (vaddr)
#define mmu_lockarea(vaddr, len) (vaddr)
#define mmu_unlockarea(vaddr, len) do { } while(0)
#define mmu_unlockarea(vaddr, len) do { } while(0)
struct
vm_area_struct
;
extern
void
update_mmu_cache
(
struct
vm_area_struct
*
,
unsigned
long
,
pte_t
);
extern
void
update_mmu_cache
(
struct
vm_area_struct
*
,
unsigned
long
,
pte_t
);
/* Make a non-present pseudo-TTE. */
/* Make a non-present pseudo-TTE. */
...
...
include/asm-sparc64/tlbflush.h
View file @
030dabd5
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#include <linux/config.h>
#include <linux/config.h>
#include <linux/mm.h>
#include <linux/mm.h>
#include <asm/mmu_context.h>
/* TLB flush operations. */
/* TLB flush operations. */
...
@@ -22,43 +23,43 @@ extern void __flush_tlb_kernel_range(unsigned long start, unsigned long end);
...
@@ -22,43 +23,43 @@ extern void __flush_tlb_kernel_range(unsigned long start, unsigned long end);
__flush_tlb_kernel_range(start,end)
__flush_tlb_kernel_range(start,end)
#define flush_tlb_mm(__mm) \
#define flush_tlb_mm(__mm) \
do { if(CTX_VALID((__mm)->context)) \
do { if
(CTX_VALID((__mm)->context)) \
__flush_tlb_mm(CTX_HWBITS((__mm)->context), SECONDARY_CONTEXT); \
__flush_tlb_mm(CTX_HWBITS((__mm)->context), SECONDARY_CONTEXT); \
} while(0)
} while
(0)
#define flush_tlb_range(__vma, start, end) \
#define flush_tlb_range(__vma, start, end) \
do { if(CTX_VALID((__vma)->vm_mm->context)) { \
do { if
(CTX_VALID((__vma)->vm_mm->context)) { \
unsigned long __start = (start)&PAGE_MASK; \
unsigned long __start = (start)&PAGE_MASK; \
unsigned long __end = PAGE_ALIGN(end); \
unsigned long __end = PAGE_ALIGN(end); \
__flush_tlb_range(CTX_HWBITS((__vma)->vm_mm->context), __start, \
__flush_tlb_range(CTX_HWBITS((__vma)->vm_mm->context), __start, \
SECONDARY_CONTEXT, __end, PAGE_SIZE, \
SECONDARY_CONTEXT, __end, PAGE_SIZE, \
(__end - __start)); \
(__end - __start)); \
} \
} \
} while(0)
} while
(0)
#define flush_tlb_vpte_range(__mm, start, end) \
#define flush_tlb_vpte_range(__mm, start, end) \
do { if(CTX_VALID((__mm)->context)) { \
do { if
(CTX_VALID((__mm)->context)) { \
unsigned long __start = (start)&PAGE_MASK; \
unsigned long __start = (start)&PAGE_MASK; \
unsigned long __end = PAGE_ALIGN(end); \
unsigned long __end = PAGE_ALIGN(end); \
__flush_tlb_range(CTX_HWBITS((__mm)->context), __start, \
__flush_tlb_range(CTX_HWBITS((__mm)->context), __start, \
SECONDARY_CONTEXT, __end, PAGE_SIZE, \
SECONDARY_CONTEXT, __end, PAGE_SIZE, \
(__end - __start)); \
(__end - __start)); \
} \
} \
} while(0)
} while
(0)
#define flush_tlb_page(vma, page) \
#define flush_tlb_page(vma, page) \
do { struct mm_struct *__mm = (vma)->vm_mm; \
do { struct mm_struct *__mm = (vma)->vm_mm; \
if(CTX_VALID(__mm->context)) \
if
(CTX_VALID(__mm->context)) \
__flush_tlb_page(CTX_HWBITS(__mm->context), (page)&PAGE_MASK, \
__flush_tlb_page(CTX_HWBITS(__mm->context), (page)&PAGE_MASK, \
SECONDARY_CONTEXT); \
SECONDARY_CONTEXT); \
} while(0)
} while
(0)
#define flush_tlb_vpte_page(mm, addr) \
#define flush_tlb_vpte_page(mm, addr) \
do { struct mm_struct *__mm = (mm); \
do { struct mm_struct *__mm = (mm); \
if(CTX_VALID(__mm->context)) \
if
(CTX_VALID(__mm->context)) \
__flush_tlb_page(CTX_HWBITS(__mm->context), (addr)&PAGE_MASK, \
__flush_tlb_page(CTX_HWBITS(__mm->context), (addr)&PAGE_MASK, \
SECONDARY_CONTEXT); \
SECONDARY_CONTEXT); \
} while(0)
} while
(0)
#else
/* CONFIG_SMP */
#else
/* CONFIG_SMP */
...
...
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