Commit 17659443 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: add arg to do_fork and fix ELF_AUX entries as done in ppc32

parent 2d02c825
/*
* pSeries_pci.c
*
* pSeries_pcibios_init(void)opyright (C) 2001 Dave Engebretsen, IBM Corporation
* Copyright (C) 2001 Dave Engebretsen, IBM Corporation
*
* pSeries specific routines for PCI.
*
......@@ -565,8 +565,7 @@ alloc_phb(struct device_node *dev, char *model, unsigned int addr_size_words)
if (buid_vals == NULL) {
phb->buid = 0;
}
else {
} else {
struct pci_bus check;
if (sizeof(check.number) == 1 || sizeof(check.primary) == 1 ||
sizeof(check.secondary) == 1 || sizeof(check.subordinate) == 1) {
......@@ -784,6 +783,7 @@ pSeries_pcibios_init_early(void)
ppc_md.pcibios_write_config_word = rtas_write_config_word;
ppc_md.pcibios_write_config_dword = rtas_write_config_dword;
}
/************************************************************************/
/* Get a char* of the device physical location(U0.3-P1-I8) */
/* See the Product Topology in the RS/6000 Architecture. */
......
......@@ -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)
{
struct task_struct *p;
int *user_tid = (int *)p3;
if (regs->msr & MSR_FP)
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;
}
......@@ -276,7 +278,7 @@ int sys_fork(u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6,
if (regs->msr & MSR_FP)
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;
}
......@@ -288,7 +290,8 @@ int sys_vfork(u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6,
if (regs->msr & MSR_FP)
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;
}
......
......@@ -616,7 +616,7 @@ int __devinit __cpu_up(unsigned int cpu)
/* create a process for the processor */
/* only regs.msr is actually used, and 0 is OK for it */
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))
panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
......
......@@ -98,21 +98,23 @@ mmu_gather_t mmu_gathers[NR_CPUS];
void show_mem(void)
{
int i,total = 0,reserved = 0;
int pfn, total = 0, reserved = 0;
int shared = 0, cached = 0;
struct page *page;
printk("Mem-info:\n");
show_free_areas();
printk("Free swap: %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
i = max_mapnr;
while (i-- > 0) {
pfn = max_mapnr;
while (pfn-- > 0) {
page = pfn_to_page(pfn);
total++;
if (PageReserved(mem_map+i))
if (PageReserved(page))
reserved++;
else if (PageSwapCache(mem_map+i))
else if (PageSwapCache(page))
cached++;
else if (page_count(mem_map+i))
shared += page_count(mem_map+i) - 1;
else if (page_count(page))
shared += page_count(page) - 1;
}
printk("%d pages of RAM\n",total);
printk("%d reserved pages\n",reserved);
......
......@@ -122,12 +122,13 @@ extern int ucache_bsize;
*/
#define ARCH_DLINFO \
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_ICACHEBSIZE, icache_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)
#endif /* __PPC64_ELF_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment