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
36b7c108
Commit
36b7c108
authored
Jan 13, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/for-alan
parents
811b6a3b
586b148b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
89 deletions
+55
-89
arch/ppc64/kernel/signal32.c
arch/ppc64/kernel/signal32.c
+4
-11
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+1
-3
arch/ppc64/mm/extable.c
arch/ppc64/mm/extable.c
+11
-40
arch/ppc64/mm/fault.c
arch/ppc64/mm/fault.c
+4
-4
arch/ppc64/mm/init.c
arch/ppc64/mm/init.c
+34
-30
include/asm-ppc64/cacheflush.h
include/asm-ppc64/cacheflush.h
+1
-1
No files found.
arch/ppc64/kernel/signal32.c
View file @
36b7c108
...
...
@@ -720,17 +720,10 @@ long sys32_rt_sigtimedwait(sigset32_t *uthese, siginfo_t32 *uinfo,
case
2
:
s
.
sig
[
1
]
=
s32
.
sig
[
2
]
|
(((
long
)
s32
.
sig
[
3
])
<<
32
);
case
1
:
s
.
sig
[
0
]
=
s32
.
sig
[
0
]
|
(((
long
)
s32
.
sig
[
1
])
<<
32
);
}
if
(
uts
)
{
ret
=
get_user
(
t
.
tv_sec
,
&
uts
->
tv_sec
);
ret
|=
__get_user
(
t
.
tv_nsec
,
&
uts
->
tv_nsec
);
if
(
ret
)
if
(
uts
&&
get_compat_timespec
(
&
t
,
uts
))
return
-
EFAULT
;
}
set_fs
(
KERNEL_DS
);
if
(
uts
)
ret
=
sys_rt_sigtimedwait
(
&
s
,
&
info
,
&
t
,
sigsetsize
);
else
ret
=
sys_rt_sigtimedwait
(
&
s
,
&
info
,
(
struct
timespec
*
)
uts
,
ret
=
sys_rt_sigtimedwait
(
&
s
,
uinfo
?
&
info
:
NULL
,
uts
?
&
t
:
NULL
,
sigsetsize
);
set_fs
(
old_fs
);
if
(
ret
>=
0
&&
uinfo
)
{
...
...
arch/ppc64/kernel/sys_ppc32.c
View file @
36b7c108
...
...
@@ -3603,10 +3603,8 @@ asmlinkage int sys32_sched_rr_get_interval(u32 pid, struct compat_timespec *inte
set_fs
(
KERNEL_DS
);
ret
=
sys_sched_rr_get_interval
((
int
)
pid
,
&
t
);
set_fs
(
old_fs
);
if
(
put_user
(
t
.
tv_sec
,
&
interval
->
tv_sec
)
||
__put_user
(
t
.
tv_nsec
,
&
interval
->
tv_nsec
))
if
(
put_compat_timespec
(
&
t
,
interval
))
return
-
EFAULT
;
return
ret
;
}
...
...
arch/ppc64/mm/extable.c
View file @
36b7c108
/*
*
linux/
arch/ppc64/mm/extable.c
* arch/ppc64/mm/extable.c
*
* from
linux/
arch/i386/mm/extable.c
* from arch/i386/mm/extable.c
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -11,7 +11,7 @@
#include <linux/config.h>
#include <linux/module.h>
#include <linux/
spinlock
.h>
#include <linux/
init
.h>
#include <asm/uaccess.h>
extern
struct
exception_table_entry
__start___ex_table
[];
...
...
@@ -45,14 +45,15 @@ sort_ex_table(struct exception_table_entry *start,
}
}
void
void
__init
sort_exception_table
(
void
)
{
sort_ex_table
(
__start___ex_table
,
__stop___ex_table
);
}
static
inline
unsigned
long
search_one_table
(
const
struct
exception_table_entry
*
first
,
/* Simple binary search */
const
struct
exception_table_entry
*
search_extable
(
const
struct
exception_table_entry
*
first
,
const
struct
exception_table_entry
*
last
,
unsigned
long
value
)
{
...
...
@@ -63,41 +64,11 @@ search_one_table(const struct exception_table_entry *first,
mid
=
(
last
-
first
)
/
2
+
first
;
diff
=
mid
->
insn
-
value
;
if
(
diff
==
0
)
return
mid
->
fixup
;
return
mid
;
else
if
(
diff
<
0
)
first
=
mid
+
1
;
else
last
=
mid
-
1
;
}
return
0
;
}
extern
spinlock_t
modlist_lock
;
unsigned
long
search_exception_table
(
unsigned
long
addr
)
{
unsigned
long
ret
=
0
;
#ifndef CONFIG_MODULES
/* There is only the kernel to search. */
ret
=
search_one_table
(
__start___ex_table
,
__stop___ex_table
-
1
,
addr
);
return
ret
;
#else
unsigned
long
flags
;
/* The kernel is the last "module" -- no need to treat it special. */
struct
module
*
mp
;
spin_lock_irqsave
(
&
modlist_lock
,
flags
);
for
(
mp
=
module_list
;
mp
!=
NULL
;
mp
=
mp
->
next
)
{
if
(
mp
->
ex_table_start
==
NULL
||
!
(
mp
->
flags
&
(
MOD_RUNNING
|
MOD_INITIALIZING
)))
continue
;
ret
=
search_one_table
(
mp
->
ex_table_start
,
mp
->
ex_table_end
-
1
,
addr
);
if
(
ret
)
break
;
}
spin_unlock_irqrestore
(
&
modlist_lock
,
flags
);
return
ret
;
#endif
return
NULL
;
}
arch/ppc64/mm/fault.c
View file @
36b7c108
...
...
@@ -28,6 +28,7 @@
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/smp_lock.h>
#include <linux/module.h>
#include <asm/page.h>
#include <asm/pgtable.h>
...
...
@@ -204,12 +205,11 @@ void
bad_page_fault
(
struct
pt_regs
*
regs
,
unsigned
long
address
,
int
sig
)
{
extern
void
die
(
const
char
*
,
struct
pt_regs
*
,
long
);
unsigned
long
fixup
;
const
struct
exception_table_entry
*
entry
;
/* Are we prepared to handle this fault? */
if
((
fixup
=
search_exception_table
(
regs
->
nip
))
!=
0
)
{
regs
->
nip
=
fixup
;
if
((
entry
=
search_exception_tables
(
regs
->
nip
))
!=
NULL
)
{
regs
->
nip
=
entry
->
fixup
;
return
;
}
...
...
arch/ppc64/mm/init.c
View file @
36b7c108
...
...
@@ -592,36 +592,24 @@ void __init mem_init(void)
*/
void
flush_dcache_page
(
struct
page
*
page
)
{
/* avoid an atomic op if possible */
if
(
test_bit
(
PG_arch_1
,
&
page
->
flags
))
clear_bit
(
PG_arch_1
,
&
page
->
flags
);
}
void
flush_icache_page
(
struct
vm_area_struct
*
vma
,
struct
page
*
page
)
{
if
(
cpu_has_noexecute
())
return
;
if
((
vma
->
vm_flags
&
VM_EXEC
)
==
0
)
return
;
if
(
page
->
mapping
&&
!
PageReserved
(
page
)
&&
!
test_bit
(
PG_arch_1
,
&
page
->
flags
))
{
__flush_dcache_icache
(
page_address
(
page
));
set_bit
(
PG_arch_1
,
&
page
->
flags
);
}
}
void
clear_user_page
(
void
*
page
,
unsigned
long
vaddr
,
struct
page
*
pg
)
{
clear_page
(
page
);
/* XXX we shouldnt have to do this, but glibc requires it */
if
(
cpu_has_noexecute
())
{
/*
* We shouldnt have to do this, but some versions of glibc
* require it (ld.so assumes zero filled pages are icache clean)
* - Anton
*/
/* avoid an atomic op if possible */
if
(
test_bit
(
PG_arch_1
,
&
pg
->
flags
))
clear_bit
(
PG_arch_1
,
&
pg
->
flags
);
}
else
{
__flush_dcache_icache
(
page
);
}
}
void
copy_user_page
(
void
*
vto
,
void
*
vfrom
,
unsigned
long
vaddr
,
...
...
@@ -630,20 +618,23 @@ void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
copy_page
(
vto
,
vfrom
);
/*
* Unfortunately we havent always marked our GOT and PLT sections
* as executable, so we need to flush all file regions - Anton
* We should be able to use the following optimisation, however
* there are two problems.
* Firstly a bug in some versions of binutils meant PLT sections
* were not marked executable.
* Secondly the first word in the GOT section is blrl, used
* to establish the GOT address. Until recently the GOT was
* not marked executable.
* - Anton
*/
#if 0
if (!vma->vm_file && ((vma->vm_flags & VM_EXEC) == 0))
return;
#endif
if
(
cpu_has_noexecute
())
{
/* avoid an atomic op if possible */
if
(
test_bit
(
PG_arch_1
,
&
pg
->
flags
))
clear_bit
(
PG_arch_1
,
&
pg
->
flags
);
}
else
{
__flush_dcache_icache
(
vto
);
}
}
void
flush_icache_user_range
(
struct
vm_area_struct
*
vma
,
struct
page
*
page
,
...
...
@@ -675,6 +666,19 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long ea,
pte_t
*
ptep
;
int
local
=
0
;
/* handle i-cache coherency */
if
(
!
cpu_has_noexecute
())
{
unsigned
long
pfn
=
pte_pfn
(
pte
);
if
(
pfn_valid
(
pfn
))
{
struct
page
*
page
=
pfn_to_page
(
pfn
);
if
(
!
PageReserved
(
page
)
&&
!
test_bit
(
PG_arch_1
,
&
page
->
flags
))
{
__flush_dcache_icache
(
page_address
(
page
));
set_bit
(
PG_arch_1
,
&
page
->
flags
);
}
}
}
/* We only want HPTEs for linux PTEs that have _PAGE_ACCESSED set */
if
(
!
pte_young
(
pte
))
return
;
...
...
include/asm-ppc64/cacheflush.h
View file @
36b7c108
...
...
@@ -14,10 +14,10 @@
#define flush_cache_range(vma, start, end) do { } while (0)
#define flush_cache_page(vma, vmaddr) do { } while (0)
#define flush_page_to_ram(page) do { } while (0)
#define flush_icache_page(vma, page) do { } while (0)
extern
void
flush_dcache_page
(
struct
page
*
page
);
extern
void
flush_icache_range
(
unsigned
long
,
unsigned
long
);
extern
void
flush_icache_page
(
struct
vm_area_struct
*
vma
,
struct
page
*
page
);
extern
void
flush_icache_user_range
(
struct
vm_area_struct
*
vma
,
struct
page
*
page
,
unsigned
long
addr
,
int
len
);
...
...
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