aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/Kconfig7
-rw-r--r--arch/sparc/kernel/process.c33
-rw-r--r--arch/sparc/kernel/setup.c1
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c3
-rw-r--r--arch/sparc/mm/loadmmu.c1
-rw-r--r--arch/sparc/mm/srmmu.c11
-rw-r--r--arch/sparc/mm/sun4c.c14
7 files changed, 24 insertions, 46 deletions
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 99f8971716d2..7c674a3503b6 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -27,6 +27,13 @@ config ARCH_NO_VIRT_TO_BUS
27config OF 27config OF
28 def_bool y 28 def_bool y
29 29
30config ARCH_SUPPORTS_AOUT
31 def_bool y
32
33config HZ
34 int
35 default 100
36
30source "init/Kconfig" 37source "init/Kconfig"
31 38
32menu "General machine setup" 39menu "General machine setup"
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
index 77460e316a03..19186ce8850d 100644
--- a/arch/sparc/kernel/process.c
+++ b/arch/sparc/kernel/process.c
@@ -20,7 +20,6 @@
20#include <linux/ptrace.h> 20#include <linux/ptrace.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <linux/user.h> 22#include <linux/user.h>
23#include <linux/a.out.h>
24#include <linux/smp.h> 23#include <linux/smp.h>
25#include <linux/reboot.h> 24#include <linux/reboot.h>
26#include <linux/delay.h> 25#include <linux/delay.h>
@@ -567,38 +566,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
567} 566}
568 567
569/* 568/*
570 * fill in the user structure for a core dump..
571 */
572void dump_thread(struct pt_regs * regs, struct user * dump)
573{
574 unsigned long first_stack_page;
575
576 dump->magic = SUNOS_CORE_MAGIC;
577 dump->len = sizeof(struct user);
578 dump->regs.psr = regs->psr;
579 dump->regs.pc = regs->pc;
580 dump->regs.npc = regs->npc;
581 dump->regs.y = regs->y;
582 /* fuck me plenty */
583 memcpy(&dump->regs.regs[0], &regs->u_regs[1], (sizeof(unsigned long) * 15));
584 dump->uexec = current->thread.core_exec;
585 dump->u_tsize = (((unsigned long) current->mm->end_code) -
586 ((unsigned long) current->mm->start_code)) & ~(PAGE_SIZE - 1);
587 dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1)));
588 dump->u_dsize -= dump->u_tsize;
589 dump->u_dsize &= ~(PAGE_SIZE - 1);
590 first_stack_page = (regs->u_regs[UREG_FP] & ~(PAGE_SIZE - 1));
591 dump->u_ssize = (TASK_SIZE - first_stack_page) & ~(PAGE_SIZE - 1);
592 memcpy(&dump->fpu.fpstatus.fregs.regs[0], &current->thread.float_regs[0], (sizeof(unsigned long) * 32));
593 dump->fpu.fpstatus.fsr = current->thread.fsr;
594 dump->fpu.fpstatus.flags = dump->fpu.fpstatus.extra = 0;
595 dump->fpu.fpstatus.fpq_count = current->thread.fpqdepth;
596 memcpy(&dump->fpu.fpstatus.fpq[0], &current->thread.fpqueue[0],
597 ((sizeof(unsigned long) * 2) * 16));
598 dump->sigcode = 0;
599}
600
601/*
602 * fill in the fpu structure for a core dump. 569 * fill in the fpu structure for a core dump.
603 */ 570 */
604int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs) 571int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c
index d07bc74773aa..3cf78f160846 100644
--- a/arch/sparc/kernel/setup.c
+++ b/arch/sparc/kernel/setup.c
@@ -16,7 +16,6 @@
16#include <linux/initrd.h> 16#include <linux/initrd.h>
17#include <asm/smp.h> 17#include <asm/smp.h>
18#include <linux/user.h> 18#include <linux/user.h>
19#include <linux/a.out.h>
20#include <linux/screen_info.h> 19#include <linux/screen_info.h>
21#include <linux/delay.h> 20#include <linux/delay.h>
22#include <linux/fs.h> 21#include <linux/fs.h>
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index ef647acc479e..c1025e551650 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -51,7 +51,6 @@
51#ifdef CONFIG_PCI 51#ifdef CONFIG_PCI
52#include <asm/ebus.h> 52#include <asm/ebus.h>
53#endif 53#endif
54#include <asm/a.out.h>
55#include <asm/io-unit.h> 54#include <asm/io-unit.h>
56#include <asm/bug.h> 55#include <asm/bug.h>
57 56
@@ -214,8 +213,6 @@ EXPORT_SYMBOL(kunmap_atomic);
214EXPORT_SYMBOL(svr4_setcontext); 213EXPORT_SYMBOL(svr4_setcontext);
215EXPORT_SYMBOL(svr4_getcontext); 214EXPORT_SYMBOL(svr4_getcontext);
216 215
217EXPORT_SYMBOL(dump_thread);
218
219/* prom symbols */ 216/* prom symbols */
220EXPORT_SYMBOL(idprom); 217EXPORT_SYMBOL(idprom);
221EXPORT_SYMBOL(prom_root_node); 218EXPORT_SYMBOL(prom_root_node);
diff --git a/arch/sparc/mm/loadmmu.c b/arch/sparc/mm/loadmmu.c
index 36b4d24988f8..2d9cd65160a4 100644
--- a/arch/sparc/mm/loadmmu.c
+++ b/arch/sparc/mm/loadmmu.c
@@ -14,7 +14,6 @@
14#include <asm/system.h> 14#include <asm/system.h>
15#include <asm/page.h> 15#include <asm/page.h>
16#include <asm/pgtable.h> 16#include <asm/pgtable.h>
17#include <asm/a.out.h>
18#include <asm/mmu_context.h> 17#include <asm/mmu_context.h>
19#include <asm/oplib.h> 18#include <asm/oplib.h>
20 19
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index 17b485f2825c..23d3291a3e81 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -34,7 +34,6 @@
34#include <asm/sbus.h> 34#include <asm/sbus.h>
35#include <asm/asi.h> 35#include <asm/asi.h>
36#include <asm/msi.h> 36#include <asm/msi.h>
37#include <asm/a.out.h>
38#include <asm/mmu_context.h> 37#include <asm/mmu_context.h>
39#include <asm/io-unit.h> 38#include <asm/io-unit.h>
40#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
@@ -490,14 +489,17 @@ srmmu_pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
490 return (pte_t *)srmmu_get_nocache(PTE_SIZE, PTE_SIZE); 489 return (pte_t *)srmmu_get_nocache(PTE_SIZE, PTE_SIZE);
491} 490}
492 491
493static struct page * 492static pgtable_t
494srmmu_pte_alloc_one(struct mm_struct *mm, unsigned long address) 493srmmu_pte_alloc_one(struct mm_struct *mm, unsigned long address)
495{ 494{
496 unsigned long pte; 495 unsigned long pte;
496 struct page *page;
497 497
498 if ((pte = (unsigned long)srmmu_pte_alloc_one_kernel(mm, address)) == 0) 498 if ((pte = (unsigned long)srmmu_pte_alloc_one_kernel(mm, address)) == 0)
499 return NULL; 499 return NULL;
500 return pfn_to_page( __nocache_pa(pte) >> PAGE_SHIFT ); 500 page = pfn_to_page( __nocache_pa(pte) >> PAGE_SHIFT );
501 pgtable_page_ctor(page);
502 return page;
501} 503}
502 504
503static void srmmu_free_pte_fast(pte_t *pte) 505static void srmmu_free_pte_fast(pte_t *pte)
@@ -505,10 +507,11 @@ static void srmmu_free_pte_fast(pte_t *pte)
505 srmmu_free_nocache((unsigned long)pte, PTE_SIZE); 507 srmmu_free_nocache((unsigned long)pte, PTE_SIZE);
506} 508}
507 509
508static void srmmu_pte_free(struct page *pte) 510static void srmmu_pte_free(pgtable_t pte)
509{ 511{
510 unsigned long p; 512 unsigned long p;
511 513
514 pgtable_page_dtor(pte);
512 p = (unsigned long)page_address(pte); /* Cached address (for test) */ 515 p = (unsigned long)page_address(pte); /* Cached address (for test) */
513 if (p == 0) 516 if (p == 0)
514 BUG(); 517 BUG();
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c
index 0729305f2f59..c0442e8c4b15 100644
--- a/arch/sparc/mm/sun4c.c
+++ b/arch/sparc/mm/sun4c.c
@@ -1947,12 +1947,17 @@ static pte_t *sun4c_pte_alloc_one_kernel(struct mm_struct *mm, unsigned long add
1947 return pte; 1947 return pte;
1948} 1948}
1949 1949
1950static struct page *sun4c_pte_alloc_one(struct mm_struct *mm, unsigned long address) 1950static pgtable_t sun4c_pte_alloc_one(struct mm_struct *mm, unsigned long address)
1951{ 1951{
1952 pte_t *pte = sun4c_pte_alloc_one_kernel(mm, address); 1952 pte_t *pte;
1953 struct page *page;
1954
1955 pte = sun4c_pte_alloc_one_kernel(mm, address);
1953 if (pte == NULL) 1956 if (pte == NULL)
1954 return NULL; 1957 return NULL;
1955 return virt_to_page(pte); 1958 page = virt_to_page(pte);
1959 pgtable_page_ctor(page);
1960 return page;
1956} 1961}
1957 1962
1958static inline void sun4c_free_pte_fast(pte_t *pte) 1963static inline void sun4c_free_pte_fast(pte_t *pte)
@@ -1962,8 +1967,9 @@ static inline void sun4c_free_pte_fast(pte_t *pte)
1962 pgtable_cache_size++; 1967 pgtable_cache_size++;
1963} 1968}
1964 1969
1965static void sun4c_pte_free(struct page *pte) 1970static void sun4c_pte_free(pgtable_t pte)
1966{ 1971{
1972 pgtable_page_dtor(pte);
1967 sun4c_free_pte_fast(page_address(pte)); 1973 sun4c_free_pte_fast(page_address(pte));
1968} 1974}
1969 1975