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
17659443
Commit
17659443
authored
Sep 08, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: add arg to do_fork and fix ELF_AUX entries as done in ppc32
parent
2d02c825
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
23 deletions
+29
-23
arch/ppc64/kernel/pSeries_pci.c
arch/ppc64/kernel/pSeries_pci.c
+9
-9
arch/ppc64/kernel/process.c
arch/ppc64/kernel/process.c
+6
-3
arch/ppc64/kernel/smp.c
arch/ppc64/kernel/smp.c
+1
-1
arch/ppc64/mm/init.c
arch/ppc64/mm/init.c
+9
-7
include/asm-ppc64/elf.h
include/asm-ppc64/elf.h
+4
-3
No files found.
arch/ppc64/kernel/pSeries_pci.c
View file @
17659443
/*
/*
* pSeries_pci.c
* pSeries_pci.c
*
*
*
pSeries_pcibios_init(void)
opyright (C) 2001 Dave Engebretsen, IBM Corporation
*
C
opyright (C) 2001 Dave Engebretsen, IBM Corporation
*
*
* pSeries specific routines for PCI.
* pSeries specific routines for PCI.
*
*
...
@@ -563,10 +563,9 @@ alloc_phb(struct device_node *dev, char *model, unsigned int addr_size_words)
...
@@ -563,10 +563,9 @@ alloc_phb(struct device_node *dev, char *model, unsigned int addr_size_words)
buid_vals
=
(
int
*
)
get_property
(
dev
,
"ibm,fw-phb-id"
,
&
len
);
buid_vals
=
(
int
*
)
get_property
(
dev
,
"ibm,fw-phb-id"
,
&
len
);
if
(
buid_vals
==
NULL
)
{
if
(
buid_vals
==
NULL
)
{
phb
->
buid
=
0
;
phb
->
buid
=
0
;
}
}
else
{
else
{
struct
pci_bus
check
;
struct
pci_bus
check
;
if
(
sizeof
(
check
.
number
)
==
1
||
sizeof
(
check
.
primary
)
==
1
||
if
(
sizeof
(
check
.
number
)
==
1
||
sizeof
(
check
.
primary
)
==
1
||
sizeof
(
check
.
secondary
)
==
1
||
sizeof
(
check
.
subordinate
)
==
1
)
{
sizeof
(
check
.
secondary
)
==
1
||
sizeof
(
check
.
subordinate
)
==
1
)
{
...
@@ -578,11 +577,11 @@ alloc_phb(struct device_node *dev, char *model, unsigned int addr_size_words)
...
@@ -578,11 +577,11 @@ alloc_phb(struct device_node *dev, char *model, unsigned int addr_size_words)
"number, primary, secondary and subordinate are ints.
\n
"
);
"number, primary, secondary and subordinate are ints.
\n
"
);
}
}
if
(
len
<
2
*
sizeof
(
int
))
if
(
len
<
2
*
sizeof
(
int
))
phb
->
buid
=
(
unsigned
long
)
buid_vals
[
0
];
// Support for new OF that only has 1 integer for buid.
phb
->
buid
=
(
unsigned
long
)
buid_vals
[
0
];
// Support for new OF that only has 1 integer for buid.
else
else
phb
->
buid
=
(((
unsigned
long
)
buid_vals
[
0
])
<<
32UL
)
|
phb
->
buid
=
(((
unsigned
long
)
buid_vals
[
0
])
<<
32UL
)
|
(((
unsigned
long
)
buid_vals
[
1
])
&
0xffffffff
);
(((
unsigned
long
)
buid_vals
[
1
])
&
0xffffffff
);
phb
->
first_busno
+=
(
phb
->
global_number
<<
8
);
phb
->
first_busno
+=
(
phb
->
global_number
<<
8
);
phb
->
last_busno
+=
(
phb
->
global_number
<<
8
);
phb
->
last_busno
+=
(
phb
->
global_number
<<
8
);
...
@@ -784,6 +783,7 @@ pSeries_pcibios_init_early(void)
...
@@ -784,6 +783,7 @@ pSeries_pcibios_init_early(void)
ppc_md
.
pcibios_write_config_word
=
rtas_write_config_word
;
ppc_md
.
pcibios_write_config_word
=
rtas_write_config_word
;
ppc_md
.
pcibios_write_config_dword
=
rtas_write_config_dword
;
ppc_md
.
pcibios_write_config_dword
=
rtas_write_config_dword
;
}
}
/************************************************************************/
/************************************************************************/
/* Get a char* of the device physical location(U0.3-P1-I8) */
/* Get a char* of the device physical location(U0.3-P1-I8) */
/* See the Product Topology in the RS/6000 Architecture. */
/* See the Product Topology in the RS/6000 Architecture. */
...
...
arch/ppc64/kernel/process.c
View file @
17659443
...
@@ -260,11 +260,13 @@ int sys_clone(unsigned long clone_flags, u32 p2, u32 p3, u32 p4, u32 p5,
...
@@ -260,11 +260,13 @@ int sys_clone(unsigned long clone_flags, u32 p2, u32 p3, u32 p4, u32 p5,
u32
p6
,
struct
pt_regs
*
regs
)
u32
p6
,
struct
pt_regs
*
regs
)
{
{
struct
task_struct
*
p
;
struct
task_struct
*
p
;
int
*
user_tid
=
(
int
*
)
p3
;
if
(
regs
->
msr
&
MSR_FP
)
if
(
regs
->
msr
&
MSR_FP
)
giveup_fpu
(
current
);
giveup_fpu
(
current
);
p
=
do_fork
(
clone_flags
&
~
CLONE_IDLETASK
,
regs
->
gpr
[
1
],
regs
,
0
);
p
=
do_fork
(
clone_flags
&
~
CLONE_IDLETASK
,
regs
->
gpr
[
1
],
regs
,
0
,
user_tid
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
}
...
@@ -276,7 +278,7 @@ int sys_fork(u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6,
...
@@ -276,7 +278,7 @@ int sys_fork(u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6,
if
(
regs
->
msr
&
MSR_FP
)
if
(
regs
->
msr
&
MSR_FP
)
giveup_fpu
(
current
);
giveup_fpu
(
current
);
p
=
do_fork
(
SIGCHLD
,
regs
->
gpr
[
1
],
regs
,
0
);
p
=
do_fork
(
SIGCHLD
,
regs
->
gpr
[
1
],
regs
,
0
,
NULL
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
}
...
@@ -288,7 +290,8 @@ int sys_vfork(u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6,
...
@@ -288,7 +290,8 @@ int sys_vfork(u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6,
if
(
regs
->
msr
&
MSR_FP
)
if
(
regs
->
msr
&
MSR_FP
)
giveup_fpu
(
current
);
giveup_fpu
(
current
);
p
=
do_fork
(
CLONE_VFORK
|
CLONE_VM
|
SIGCHLD
,
regs
->
gpr
[
1
],
regs
,
0
);
p
=
do_fork
(
CLONE_VFORK
|
CLONE_VM
|
SIGCHLD
,
regs
->
gpr
[
1
],
regs
,
0
,
NULL
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
}
}
...
...
arch/ppc64/kernel/smp.c
View file @
17659443
...
@@ -616,7 +616,7 @@ int __devinit __cpu_up(unsigned int cpu)
...
@@ -616,7 +616,7 @@ int __devinit __cpu_up(unsigned int cpu)
/* create a process for the processor */
/* create a process for the processor */
/* only regs.msr is actually used, and 0 is OK for it */
/* only regs.msr is actually used, and 0 is OK for it */
memset
(
&
regs
,
0
,
sizeof
(
struct
pt_regs
));
memset
(
&
regs
,
0
,
sizeof
(
struct
pt_regs
));
p
=
do_fork
(
CLONE_VM
|
CLONE_IDLETASK
,
0
,
&
regs
,
0
);
p
=
do_fork
(
CLONE_VM
|
CLONE_IDLETASK
,
0
,
&
regs
,
0
,
NULL
);
if
(
IS_ERR
(
p
))
if
(
IS_ERR
(
p
))
panic
(
"failed fork for CPU %u: %li"
,
cpu
,
PTR_ERR
(
p
));
panic
(
"failed fork for CPU %u: %li"
,
cpu
,
PTR_ERR
(
p
));
...
...
arch/ppc64/mm/init.c
View file @
17659443
...
@@ -98,21 +98,23 @@ mmu_gather_t mmu_gathers[NR_CPUS];
...
@@ -98,21 +98,23 @@ mmu_gather_t mmu_gathers[NR_CPUS];
void
show_mem
(
void
)
void
show_mem
(
void
)
{
{
int
i
,
total
=
0
,
reserved
=
0
;
int
pfn
,
total
=
0
,
reserved
=
0
;
int
shared
=
0
,
cached
=
0
;
int
shared
=
0
,
cached
=
0
;
struct
page
*
page
;
printk
(
"Mem-info:
\n
"
);
printk
(
"Mem-info:
\n
"
);
show_free_areas
();
show_free_areas
();
printk
(
"Free swap: %6dkB
\n
"
,
nr_swap_pages
<<
(
PAGE_SHIFT
-
10
));
printk
(
"Free swap: %6dkB
\n
"
,
nr_swap_pages
<<
(
PAGE_SHIFT
-
10
));
i
=
max_mapnr
;
pfn
=
max_mapnr
;
while
(
i
--
>
0
)
{
while
(
pfn
--
>
0
)
{
page
=
pfn_to_page
(
pfn
);
total
++
;
total
++
;
if
(
PageReserved
(
mem_map
+
i
))
if
(
PageReserved
(
page
))
reserved
++
;
reserved
++
;
else
if
(
PageSwapCache
(
mem_map
+
i
))
else
if
(
PageSwapCache
(
page
))
cached
++
;
cached
++
;
else
if
(
page_count
(
mem_map
+
i
))
else
if
(
page_count
(
page
))
shared
+=
page_count
(
mem_map
+
i
)
-
1
;
shared
+=
page_count
(
page
)
-
1
;
}
}
printk
(
"%d pages of RAM
\n
"
,
total
);
printk
(
"%d pages of RAM
\n
"
,
total
);
printk
(
"%d reserved pages
\n
"
,
reserved
);
printk
(
"%d reserved pages
\n
"
,
reserved
);
...
...
include/asm-ppc64/elf.h
View file @
17659443
...
@@ -122,12 +122,13 @@ extern int ucache_bsize;
...
@@ -122,12 +122,13 @@ extern int ucache_bsize;
*/
*/
#define ARCH_DLINFO \
#define ARCH_DLINFO \
do { \
do { \
/* Handle glibc compatibility. */
\
NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \
NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \
/* Cache size items */
\
NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize); \
NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize); \
NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize); \
NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize); \
NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize); \
NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize); \
/* Now handle glibc compatibility. */
\
NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \
NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \
} while (0)
} while (0)
#endif
/* __PPC64_ELF_H */
#endif
/* __PPC64_ELF_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