aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Liqin <liqin.chen@sunplusct.com>2009-08-30 00:26:32 -0400
committerChen Liqin <liqin.chen@sunplusct.com>2009-08-30 00:26:32 -0400
commitd8aa899bb27ad7879ab9e621365e04ada2745a65 (patch)
treed853e70141b93476431d09bba812802c63c9ba10
parentd27eadc7612404b06f99888c02726ab7d5036e0f (diff)
score: remove unused code, add include files in .c
-rw-r--r--arch/score/include/asm/elf.h18
-rw-r--r--arch/score/include/asm/irqflags.h2
-rw-r--r--arch/score/kernel/signal.c4
-rw-r--r--arch/score/mm/init.c4
-rw-r--r--arch/score/mm/pgtable.c10
5 files changed, 17 insertions, 21 deletions
diff --git a/arch/score/include/asm/elf.h b/arch/score/include/asm/elf.h
index 832436375ac3..43526d9fda93 100644
--- a/arch/score/include/asm/elf.h
+++ b/arch/score/include/asm/elf.h
@@ -1,9 +1,8 @@
1#ifndef _ASM_SCORE_ELF_H 1#ifndef _ASM_SCORE_ELF_H
2#define _ASM_SCORE_ELF_H 2#define _ASM_SCORE_ELF_H
3 3
4/* ELF register definitions */ 4#include <linux/ptrace.h>
5#define ELF_NGREG 45 5
6#define ELF_NFPREG 33
7#define EM_SCORE7 135 6#define EM_SCORE7 135
8 7
9/* Relocation types. */ 8/* Relocation types. */
@@ -30,11 +29,15 @@
30#define R_SCORE_IMM30 20 29#define R_SCORE_IMM30 20
31#define R_SCORE_IMM32 21 30#define R_SCORE_IMM32 21
32 31
33typedef unsigned long elf_greg_t; 32/* ELF register definitions */
34typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 33typedef unsigned long elf_greg_t;
34
35#define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t))
36typedef elf_greg_t elf_gregset_t[ELF_NGREG];
35 37
36typedef double elf_fpreg_t; 38/* Score does not have fp regs. */
37typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; 39typedef double elf_fpreg_t;
40typedef elf_fpreg_t elf_fpregset_t;
38 41
39#define elf_check_arch(x) ((x)->e_machine == EM_SCORE7) 42#define elf_check_arch(x) ((x)->e_machine == EM_SCORE7)
40 43
@@ -57,6 +60,7 @@ do { \
57struct task_struct; 60struct task_struct;
58struct pt_regs; 61struct pt_regs;
59 62
63#define CORE_DUMP_USE_REGSET
60#define USE_ELF_CORE_DUMP 64#define USE_ELF_CORE_DUMP
61#define ELF_EXEC_PAGESIZE PAGE_SIZE 65#define ELF_EXEC_PAGESIZE PAGE_SIZE
62 66
diff --git a/arch/score/include/asm/irqflags.h b/arch/score/include/asm/irqflags.h
index 92eeb33dd72b..690a6cae7294 100644
--- a/arch/score/include/asm/irqflags.h
+++ b/arch/score/include/asm/irqflags.h
@@ -17,8 +17,6 @@
17 "nop;" \ 17 "nop;" \
18 "nop;" \ 18 "nop;" \
19 "nop;" \ 19 "nop;" \
20 "ldi r9, 0x1;" \
21 "and %0, %0, r9;" \
22 : "=r" (x) \ 20 : "=r" (x) \
23 : \ 21 : \
24 : "r8", "r9" \ 22 : "r8", "r9" \
diff --git a/arch/score/kernel/signal.c b/arch/score/kernel/signal.c
index 950f87c4a16a..aa57440e4973 100644
--- a/arch/score/kernel/signal.c
+++ b/arch/score/kernel/signal.c
@@ -25,14 +25,14 @@
25 25
26#include <linux/errno.h> 26#include <linux/errno.h>
27#include <linux/signal.h> 27#include <linux/signal.h>
28#include <linux/ptrace.h>
28#include <linux/unistd.h> 29#include <linux/unistd.h>
29#include <linux/uaccess.h> 30#include <linux/uaccess.h>
30 31
32#include <asm/cacheflush.h>
31#include <asm/syscalls.h> 33#include <asm/syscalls.h>
32#include <asm/ucontext.h> 34#include <asm/ucontext.h>
33 35
34#include <asm/cacheflush.h>
35
36#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 36#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
37 37
38struct rt_sigframe { 38struct rt_sigframe {
diff --git a/arch/score/mm/init.c b/arch/score/mm/init.c
index d496e9f1a601..4e3dcd0c4716 100644
--- a/arch/score/mm/init.c
+++ b/arch/score/mm/init.c
@@ -144,7 +144,8 @@ void free_initrd_mem(unsigned long start, unsigned long end)
144void __init_refok free_initmem(void) 144void __init_refok free_initmem(void)
145{ 145{
146 free_init_pages("unused kernel memory", 146 free_init_pages("unused kernel memory",
147 (unsigned long)__init_begin, (unsigned long)__init_end); 147 __pa(&__init_begin),
148 __pa(&__init_end));
148} 149}
149 150
150unsigned long pgd_current; 151unsigned long pgd_current;
@@ -156,4 +157,5 @@ unsigned long pgd_current;
156 * are constants. So we use the variants from asm-offset.h until that gcc 157 * are constants. So we use the variants from asm-offset.h until that gcc
157 * will officially be retired. 158 * will officially be retired.
158 */ 159 */
160pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned(PTE_ORDER);
159pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER); 161pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER);
diff --git a/arch/score/mm/pgtable.c b/arch/score/mm/pgtable.c
index 10b0962f83d4..6408bb73d3cc 100644
--- a/arch/score/mm/pgtable.c
+++ b/arch/score/mm/pgtable.c
@@ -47,14 +47,6 @@ void pgd_init(unsigned long page)
47 47
48void __init pagetable_init(void) 48void __init pagetable_init(void)
49{ 49{
50 unsigned long vaddr;
51 pgd_t *pgd_base;
52
53 /* Initialize the entire pgd. */ 50 /* Initialize the entire pgd. */
54 pgd_init((unsigned long) swapper_pg_dir); 51 pgd_init((unsigned long)swapper_pg_dir);
55 pgd_init((unsigned long) swapper_pg_dir
56 + sizeof(pgd_t) * USER_PTRS_PER_PGD);
57
58 pgd_base = swapper_pg_dir;
59 vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK;
60} 52}