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
4978a1f0
Commit
4978a1f0
authored
Oct 17, 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
3d2fc2a0
38084663
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
83 additions
and
135 deletions
+83
-135
arch/sparc/Makefile
arch/sparc/Makefile
+12
-4
arch/sparc/boot/Makefile
arch/sparc/boot/Makefile
+1
-1
arch/sparc/kernel/Makefile
arch/sparc/kernel/Makefile
+0
-92
arch/sparc/kernel/asm-offsets.c
arch/sparc/kernel/asm-offsets.c
+53
-0
arch/sparc/kernel/check_asm.sh
arch/sparc/kernel/check_asm.sh
+0
-19
arch/sparc/kernel/entry.S
arch/sparc/kernel/entry.S
+1
-0
arch/sparc/kernel/etrap.S
arch/sparc/kernel/etrap.S
+1
-0
arch/sparc/kernel/rtrap.S
arch/sparc/kernel/rtrap.S
+1
-0
arch/sparc/kernel/sclow.S
arch/sparc/kernel/sclow.S
+0
-12
arch/sparc/kernel/wof.S
arch/sparc/kernel/wof.S
+1
-0
arch/sparc/kernel/wuf.S
arch/sparc/kernel/wuf.S
+1
-0
arch/sparc/vmlinux.lds.S
arch/sparc/vmlinux.lds.S
+3
-3
arch/sparc64/vmlinux.lds.S
arch/sparc64/vmlinux.lds.S
+3
-3
include/asm-sparc/ptrace.h
include/asm-sparc/ptrace.h
+6
-1
No files found.
arch/sparc/Makefile
View file @
4978a1f0
#
$Id: Makefile,v 1.49 2001/07/27 09:42:22 davem Exp $
#
# sparc/Makefile
# sparc/Makefile
#
#
# Makefile for the architecture dependent flags and dependencies on the
# Makefile for the architecture dependent flags and dependencies on the
...
@@ -47,16 +47,24 @@ image: vmlinux
...
@@ -47,16 +47,24 @@ image: vmlinux
$(MAKE)
-C
arch
/sparc/boot image
$(MAKE)
-C
arch
/sparc/boot image
archclean
:
archclean
:
rm
-f
arch
/sparc/kernel/include
rm
-f
$(TOPDIR)
/vmlinux.aout
rm
-f
$(TOPDIR)
/vmlinux.aout
-
$(MAKE)
-C
arch
/sparc/boot clean
-
$(MAKE)
-C
arch
/sparc/boot clean
archmrproper
:
archmrproper
:
rm
-f
$(TOPDIR)
/include/asm-sparc/asm_offsets.h
rm
-f
$(TOPDIR)
/include/asm-sparc/asm_offsets.h
prepare
:
check_asm
prepare
:
include/asm-$(ARCH)/asm_offsets.h
arch/$(ARCH)/kernel/asm-offsets.s
:
include/asm include/linux/version.h
\
include/config/MARKER
include/asm-$(ARCH)/asm_offsets.h.tmp
:
arch/$(ARCH)/kernel/asm-offsets.s
@
$
(
generate-asm-offsets.h
)
<
$<
>
$@
check_asm
:
include/linux/version.h include/asm include/config/MARKER
include/asm-$(ARCH)/asm_offsets.h
:
include/asm-$(ARCH)/asm_offsets.h.tmp
$(MAKE)
-C
arch
/sparc/kernel check_asm
@
echo
-n
' Generating $@'
@
$
(
update-if-changed
)
tftpboot.img
:
tftpboot.img
:
$(MAKE)
-C
arch
/sparc/boot tftpboot.img
$(MAKE)
-C
arch
/sparc/boot tftpboot.img
arch/sparc/boot/Makefile
View file @
4978a1f0
...
@@ -23,7 +23,7 @@ clean:
...
@@ -23,7 +23,7 @@ clean:
rm
-f
btfixupprep piggyback tftpboot.img btfix.o btfix.s image
rm
-f
btfixupprep piggyback tftpboot.img btfix.o btfix.s image
BTOBJS
:=
$(HEAD)
$
(
init-y
)
BTOBJS
:=
$(HEAD)
$
(
init-y
)
BTLIBS
:=
$
(
core-y
)
$(
LIBS
)
$
(
drivers-y
)
$
(
net-y
)
BTLIBS
:=
$
(
core-y
)
$
(
libs-y
)
$
(
drivers-y
)
$
(
net-y
)
# Actual linking
# Actual linking
image
:
btfix.o
image
:
btfix.o
...
...
arch/sparc/kernel/Makefile
View file @
4978a1f0
...
@@ -28,95 +28,3 @@ obj-y += sys_sunos.o sunos_ioctl.o
...
@@ -28,95 +28,3 @@ obj-y += sys_sunos.o sunos_ioctl.o
endif
endif
include
$(TOPDIR)/Rules.make
include
$(TOPDIR)/Rules.make
HPATH
:=
$(objtree)
/include
check_asm
:
FORCE
@
if
[
!
-r
$(HPATH)
/asm/asm_offsets.h
]
;
then
\
touch
$(HPATH)
/asm/asm_offsets.h
;
\
fi
@
echo
"/* Automatically generated. Do not edit. */"
>
asm_offsets.h
@
echo
"#ifndef __ASM_OFFSETS_H__"
>>
asm_offsets.h
@
echo
"#define __ASM_OFFSETS_H__"
>>
asm_offsets.h
@
echo
""
>>
asm_offsets.h
@
echo
"#include <linux/config.h>"
>>
asm_offsets.h
@
echo
""
>>
asm_offsets.h
@
echo
"#ifndef CONFIG_SMP"
>>
asm_offsets.h
@
echo
""
>>
asm_offsets.h
@
echo
"#include <linux/config.h>"
>
tmp.c
@
echo
"#undef CONFIG_SMP"
>>
tmp.c
@
echo
"#include <linux/sched.h>"
>>
tmp.c
$(CPP)
$(CPPFLAGS)
tmp.c
-o
tmp.i
@
echo
"/* Automatically generated. Do not edit. */"
>
check_asm_data.c
@
echo
"#include <linux/config.h>"
>>
check_asm_data.c
@
echo
"#undef CONFIG_SMP"
>>
check_asm_data.c
@
echo
"#include <linux/sched.h>"
>>
check_asm_data.c
@
echo
"unsigned int check_asm_data[] = {"
>>
check_asm_data.c
$(SH)
./check_asm.sh
-data
task tmp.i check_asm_data.c
$(SH)
./check_asm.sh
-data
mm tmp.i check_asm_data.c
$(SH)
./check_asm.sh
-data
thread tmp.i check_asm_data.c
@
echo
'};'
>>
check_asm_data.c
$(CC)
$(CFLAGS)
-S
-o
check_asm_data.s check_asm_data.c
@
echo
"/* Automatically generated. Do not edit. */"
>
check_asm.c
@
echo
'extern int printf(const char *fmt, ...);'
>>
check_asm.c
@
echo
"unsigned int check_asm_data[] = {"
>>
check_asm.c
$(SH)
./check_asm.sh
-ints
check_asm_data.s check_asm.c
@
echo
"};"
>>
check_asm.c
@
echo
'int main(void) {'
>>
check_asm.c
@
echo
'int i = 0;'
>>
check_asm.c
$(SH)
./check_asm.sh
-printf
task tmp.i check_asm.c
$(SH)
./check_asm.sh
-printf
mm tmp.i check_asm.c
$(SH)
./check_asm.sh
-printf
thread tmp.i check_asm.c
@
echo
'return 0; }'
>>
check_asm.c
@
rm
-f
tmp.[ci] check_asm_data.[cs]
$(HOSTCC)
-o
check_asm check_asm.c
./check_asm
>>
asm_offsets.h
@
rm
-f
check_asm check_asm.c
@
echo
""
>>
asm_offsets.h
@
echo
"#else /* CONFIG_SMP */"
>>
asm_offsets.h
@
echo
""
>>
asm_offsets.h
@
echo
"#include <linux/config.h>"
>
tmp.c
@
echo
"#undef CONFIG_SMP"
>>
tmp.c
@
echo
"#define CONFIG_SMP 1"
>>
tmp.c
@
echo
"#include <linux/sched.h>"
>>
tmp.c
$(CPP)
$(CPPFLAGS)
tmp.c
-o
tmp.i
@
echo
"/* Automatically generated. Do not edit. */"
>
check_asm_data.c
@
echo
"#include <linux/config.h>"
>>
check_asm_data.c
@
echo
"#undef CONFIG_SMP"
>>
check_asm_data.c
@
echo
"#define CONFIG_SMP 1"
>>
check_asm_data.c
@
echo
"#include <linux/sched.h>"
>>
check_asm_data.c
@
echo
"unsigned int check_asm_data[] = {"
>>
check_asm_data.c
$(SH)
./check_asm.sh
-data
task tmp.i check_asm_data.c
$(SH)
./check_asm.sh
-data
mm tmp.i check_asm_data.c
$(SH)
./check_asm.sh
-data
thread tmp.i check_asm_data.c
@
echo
'};'
>>
check_asm_data.c
$(CC)
$(CFLAGS)
-S
-o
check_asm_data.s check_asm_data.c
@
echo
"/* Automatically generated. Do not edit. */"
>
check_asm.c
@
echo
'extern int printf(const char *fmt, ...);'
>>
check_asm.c
@
echo
"unsigned int check_asm_data[] = {"
>>
check_asm.c
$(SH)
./check_asm.sh
-ints
check_asm_data.s check_asm.c
@
echo
"};"
>>
check_asm.c
@
echo
'int main(void) {'
>>
check_asm.c
@
echo
'int i = 0;'
>>
check_asm.c
$(SH)
./check_asm.sh
-printf
task tmp.i check_asm.c
$(SH)
./check_asm.sh
-printf
mm tmp.i check_asm.c
$(SH)
./check_asm.sh
-printf
thread tmp.i check_asm.c
@
echo
'return 0; }'
>>
check_asm.c
@
rm
-f
tmp.[ci] check_asm_data.[cs]
$(HOSTCC)
-o
check_asm check_asm.c
./check_asm
>>
asm_offsets.h
@
rm
-f
check_asm check_asm.c
@
echo
""
>>
asm_offsets.h
@
echo
"#endif /* CONFIG_SMP */"
>>
asm_offsets.h
@
echo
""
>>
asm_offsets.h
@
echo
"#endif /* __ASM_OFFSETS_H__ */"
>>
asm_offsets.h
@
if
test
-r
$(HPATH)
/asm/asm_offsets.h
;
then
\
if
cmp
-s
asm_offsets.h
$(HPATH)
/asm/asm_offsets.h
;
then
\
echo
$(HPATH)
/asm/asm_offsets.h is unchanged
;
\
rm
-f
asm_offsets.h
;
\
else
\
mv
-f
asm_offsets.h
$(HPATH)
/asm/asm_offsets.h
;
\
fi
;
\
else
\
mv
-f
asm_offsets.h
$(HPATH)
/asm/asm_offsets.h
;
\
fi
arch/sparc/kernel/asm-offsets.c
0 → 100644
View file @
4978a1f0
/*
* This program is used to generate definitions needed by
* assembly language modules.
*
* We use the technique used in the OSF Mach kernel code:
* generate asm statements containing #defines,
* compile this file to assembler, and then extract the
* #defines from the assembly-language output.
*
* On sparc, thread_info data is static and TI_XXX offsets are computed by hand.
*/
#include <linux/config.h>
#include <linux/sched.h>
// #include <linux/mm.h>
#define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
#define BLANK() asm volatile("\n->" : : )
int
foo
(
void
)
{
DEFINE
(
AOFF_task_thread
,
offsetof
(
struct
task_struct
,
thread
));
DEFINE
(
AOFF_task_ptrace
,
offsetof
(
struct
task_struct
,
ptrace
));
DEFINE
(
AOFF_task_blocked
,
offsetof
(
struct
task_struct
,
blocked
));
BLANK
();
/* XXX This is the stuff for sclow.S, kill it. */
DEFINE
(
AOFF_task_pid
,
offsetof
(
struct
task_struct
,
pid
));
DEFINE
(
AOFF_task_uid
,
offsetof
(
struct
task_struct
,
uid
));
DEFINE
(
AOFF_task_gid
,
offsetof
(
struct
task_struct
,
gid
));
DEFINE
(
AOFF_task_euid
,
offsetof
(
struct
task_struct
,
euid
));
DEFINE
(
AOFF_task_egid
,
offsetof
(
struct
task_struct
,
egid
));
/* DEFINE(THREAD_INFO, offsetof(struct task_struct, thread_info)); */
DEFINE
(
ASIZ_task_uid
,
sizeof
(
current
->
uid
));
DEFINE
(
ASIZ_task_gid
,
sizeof
(
current
->
gid
));
DEFINE
(
ASIZ_task_euid
,
sizeof
(
current
->
euid
));
DEFINE
(
ASIZ_task_egid
,
sizeof
(
current
->
egid
));
BLANK
();
DEFINE
(
AOFF_thread_fork_kpsr
,
offsetof
(
struct
thread_struct
,
fork_kpsr
));
BLANK
();
DEFINE
(
AOFF_thread_w_saved
,
offsetof
(
struct
thread_struct
,
w_saved
));
DEFINE
(
AOFF_thread_rwbuf_stkptrs
,
offsetof
(
struct
thread_struct
,
rwbuf_stkptrs
));
DEFINE
(
AOFF_thread_reg_window
,
offsetof
(
struct
thread_struct
,
reg_window
));
BLANK
();
DEFINE
(
AOFF_mm_context
,
offsetof
(
struct
mm_struct
,
context
));
/* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */
return
0
;
}
arch/sparc/kernel/check_asm.sh
deleted
100755 → 0
View file @
3d2fc2a0
#!/bin/sh
case
$1
in
-printf
)
sed
-n
-e
'/^#/d;/struct[ ]*'
$2
'_struct[ ]*{/,/};/p'
<
$3
|
sed
'/struct[ ]*'
$2
'_struct[ ]*{/d;/:[0-9]*[ ]*;/d;/^[ ]*$/d;/};/d;s/^[ ]*//;s/volatile[ ]*//;s/\(unsigned\|signed\|struct\)[ ]*//;s/\(\[\|__attribute__\).*;[ ]*$//;s/(\*//;s/)(.*)//;s/;[ ]*$//;s/^[^ ]*[ ]*//;s/,/\
/g'
|
sed
's/^[ *]*//;s/[ ]*$//;s/^.*$/printf ("#define AOFF_'
$2
'_\0 0x%08x\\n", check_asm_data[i++]); printf("#define ASIZ_'
$2
'_\0 0x%08x\\n", check_asm_data[i++]);/'
>>
$4
echo
"printf (
\"
#define ASIZ_
$2
\\
t0x%08x
\\
n
\"
, check_asm_data[i++]);"
>>
$4
;;
-data
)
sed
-n
-e
'/^#/d;/struct[ ]*'
$2
'_struct[ ]*{/,/};/p'
<
$3
|
sed
'/struct[ ]*'
$2
'_struct[ ]*{/d;/:[0-9]*[ ]*;/d;/^[ ]*$/d;/};/d;s/^[ ]*//;s/volatile[ ]*//;s/\(unsigned\|signed\|struct\)[ ]*//;s/\(\[\|__attribute__\).*;[ ]*$//;s/(\*//;s/)(.*)//;s/;[ ]*$//;s/^[^ ]*[ ]*//;s/,/\
/g'
|
sed
's/^[ *]*//;s/[ ]*$//;s/^.*$/ ((char *)\&((struct '
$2
'_struct *)0)->\0) - ((char *)((struct '
$2
'_struct *)0)), sizeof(((struct '
$2
'_struct *)0)->\0),/'
>>
$4
echo
" sizeof(struct
$2_struct
),"
>>
$4
;;
-ints
)
sed
-n
-e
'/check_asm_data:/,/\.size/p'
<
$2
|
sed
-e
's/check_asm_data://'
-e
's/\.size.*//'
-e
's/\.ident.*//'
-e
's/\.global.*//'
-e
's/\.long[ ]\([0-9]*\)/\1,/'
>>
$3
;;
*
)
exit
1
;;
esac
exit
0
arch/sparc/kernel/entry.S
View file @
4978a1f0
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include <asm/kgdb.h>
#include <asm/kgdb.h>
#include <asm/contregs.h>
#include <asm/contregs.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/asm_offsets.h>
#include <asm/psr.h>
#include <asm/psr.h>
#include <asm/cprefix.h>
#include <asm/cprefix.h>
#include <asm/vaddrs.h>
#include <asm/vaddrs.h>
...
...
arch/sparc/kernel/etrap.S
View file @
4978a1f0
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include <asm/page.h>
#include <asm/page.h>
#include <asm/psr.h>
#include <asm/psr.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/asm_offsets.h>
#include <asm/winmacro.h>
#include <asm/winmacro.h>
#include <asm/asmmacro.h>
#include <asm/asmmacro.h>
#include <asm/thread_info.h>
#include <asm/thread_info.h>
...
...
arch/sparc/kernel/rtrap.S
View file @
4978a1f0
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#include <asm/cprefix.h>
#include <asm/cprefix.h>
#include <asm/page.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/asm_offsets.h>
#include <asm/psr.h>
#include <asm/psr.h>
#include <asm/asi.h>
#include <asm/asi.h>
#include <asm/smp.h>
#include <asm/smp.h>
...
...
arch/sparc/kernel/sclow.S
View file @
4978a1f0
...
@@ -36,18 +36,6 @@
...
@@ -36,18 +36,6 @@
LABEL
(
sunosnop
):
LABEL
(
sunosnop
):
CC_AND_RETT
CC_AND_RETT
#if 0
/*
Not
SMP
safe
*/
.
globl
LABEL
(
sunosgetpid
)
LABEL
(
sunosgetpid
):
LOAD_CURRENT
(
l4
,
l5
)
ld
[%
l4
+
TI_TASK
],
%
l4
ld
[%
l4
+
AOFF_task_pid
],
%
i0
ld
[%
l4
+
AOFF_task_p_opptr
],
%
l5
ld
[%
l5
+
AOFF_task_pid
],
%
i1
CC_AND_RETT
#endif
#if (ASIZ_task_uid == 2 && ASIZ_task_euid == 2)
#if (ASIZ_task_uid == 2 && ASIZ_task_euid == 2)
.
globl
LABEL
(
sunosgetuid
)
.
globl
LABEL
(
sunosgetuid
)
LABEL
(
sunosgetuid
):
LABEL
(
sunosgetuid
):
...
...
arch/sparc/kernel/wof.S
View file @
4978a1f0
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include <asm/contregs.h>
#include <asm/contregs.h>
#include <asm/page.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/asm_offsets.h>
#include <asm/psr.h>
#include <asm/psr.h>
#include <asm/smp.h>
#include <asm/smp.h>
#include <asm/asi.h>
#include <asm/asi.h>
...
...
arch/sparc/kernel/wuf.S
View file @
4978a1f0
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include <asm/contregs.h>
#include <asm/contregs.h>
#include <asm/page.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/asm_offsets.h>
#include <asm/psr.h>
#include <asm/psr.h>
#include <asm/smp.h>
#include <asm/smp.h>
#include <asm/asi.h>
#include <asm/asi.h>
...
...
arch/sparc/vmlinux.lds.S
View file @
4978a1f0
...
@@ -38,12 +38,12 @@ SECTIONS
...
@@ -38,12 +38,12 @@ SECTIONS
.
=
ALIGN
(
4096
)
;
.
=
ALIGN
(
4096
)
;
__init_begin
=
.
;
__init_begin
=
.
;
.
text.init
:
{
*(
.
text
.
ini
t
)
}
.
init.text
:
{
*(
.
init
.
tex
t
)
}
__init_text_end
=
.
;
__init_text_end
=
.
;
.
data.init
:
{
*(
.
data
.
init
)
}
.
init.data
:
{
*(
.
init
.
data
)
}
.
=
ALIGN
(
16
)
;
.
=
ALIGN
(
16
)
;
__setup_start
=
.
;
__setup_start
=
.
;
.
setup_init
:
{
*(
.
setup
.
init
)
}
.
init.setup
:
{
*(
.
init
.
setup
)
}
__setup_end
=
.
;
__setup_end
=
.
;
__initcall_start
=
.
;
__initcall_start
=
.
;
.
initcall.init
:
{
.
initcall.init
:
{
...
...
arch/sparc64/vmlinux.lds.S
View file @
4978a1f0
...
@@ -40,11 +40,11 @@ SECTIONS
...
@@ -40,11 +40,11 @@ SECTIONS
__stop___kallsyms
=
.
;
__stop___kallsyms
=
.
;
.
=
ALIGN
(
8192
)
;
.
=
ALIGN
(
8192
)
;
__init_begin
=
.
;
__init_begin
=
.
;
.
text.init
:
{
*(
.
text
.
ini
t
)
}
.
init.text
:
{
*(
.
init
.
tex
t
)
}
.
data.init
:
{
*(
.
data
.
init
)
}
.
init.data
:
{
*(
.
init
.
data
)
}
.
=
ALIGN
(
16
)
;
.
=
ALIGN
(
16
)
;
__setup_start
=
.
;
__setup_start
=
.
;
.
setup_init
:
{
*(
.
setup
.
init
)
}
.
init.setup
:
{
*(
.
init
.
setup
)
}
__setup_end
=
.
;
__setup_end
=
.
;
__initcall_start
=
.
;
__initcall_start
=
.
;
.
initcall.init
:
{
.
initcall.init
:
{
...
...
include/asm-sparc/ptrace.h
View file @
4978a1f0
...
@@ -73,7 +73,12 @@ extern void show_regs(struct pt_regs *);
...
@@ -73,7 +73,12 @@ extern void show_regs(struct pt_regs *);
#define REGWIN_SZ 0x40
#define REGWIN_SZ 0x40
#endif
#endif
#include <asm/asm_offsets.h>
/*
* The asm_offsets.h is a generated file, so we cannot include it.
* It may be OK for glibc headers, but it's utterly pointless for C code.
* The assembly code using those offsets has to include it explicitly.
*/
/* #include <asm/asm_offsets.h> */
/* These are for pt_regs. */
/* These are for pt_regs. */
#define PT_PSR 0x0
#define PT_PSR 0x0
...
...
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