Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

score: remove unused code, add include files in .c

+17 -21
+11 -7
arch/score/include/asm/elf.h
··· 1 1 #ifndef _ASM_SCORE_ELF_H 2 2 #define _ASM_SCORE_ELF_H 3 3 4 - /* ELF register definitions */ 5 - #define ELF_NGREG 45 6 - #define ELF_NFPREG 33 4 + #include <linux/ptrace.h> 5 + 7 6 #define EM_SCORE7 135 8 7 9 8 /* Relocation types. */ ··· 29 30 #define R_SCORE_IMM30 20 30 31 #define R_SCORE_IMM32 21 31 32 32 - typedef unsigned long elf_greg_t; 33 - typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 33 + /* ELF register definitions */ 34 + typedef unsigned long elf_greg_t; 34 35 35 - typedef double elf_fpreg_t; 36 - typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; 36 + #define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t)) 37 + typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 38 + 39 + /* Score does not have fp regs. */ 40 + typedef double elf_fpreg_t; 41 + typedef elf_fpreg_t elf_fpregset_t; 37 42 38 43 #define elf_check_arch(x) ((x)->e_machine == EM_SCORE7) 39 44 ··· 60 57 struct task_struct; 61 58 struct pt_regs; 62 59 60 + #define CORE_DUMP_USE_REGSET 63 61 #define USE_ELF_CORE_DUMP 64 62 #define ELF_EXEC_PAGESIZE PAGE_SIZE 65 63
-2
arch/score/include/asm/irqflags.h
··· 17 17 "nop;" \ 18 18 "nop;" \ 19 19 "nop;" \ 20 - "ldi r9, 0x1;" \ 21 - "and %0, %0, r9;" \ 22 20 : "=r" (x) \ 23 21 : \ 24 22 : "r8", "r9" \
+2 -2
arch/score/kernel/signal.c
··· 25 25 26 26 #include <linux/errno.h> 27 27 #include <linux/signal.h> 28 + #include <linux/ptrace.h> 28 29 #include <linux/unistd.h> 29 30 #include <linux/uaccess.h> 30 31 32 + #include <asm/cacheflush.h> 31 33 #include <asm/syscalls.h> 32 34 #include <asm/ucontext.h> 33 - 34 - #include <asm/cacheflush.h> 35 35 36 36 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 37 37
+3 -1
arch/score/mm/init.c
··· 144 144 void __init_refok free_initmem(void) 145 145 { 146 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 150 151 unsigned long pgd_current; ··· 157 156 * are constants. So we use the variants from asm-offset.h until that gcc 158 157 * will officially be retired. 159 158 */ 159 + pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned(PTE_ORDER); 160 160 pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER);
+1 -9
arch/score/mm/pgtable.c
··· 47 47 48 48 void __init pagetable_init(void) 49 49 { 50 - unsigned long vaddr; 51 - pgd_t *pgd_base; 52 - 53 50 /* Initialize the entire pgd. */ 54 - 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; 51 + pgd_init((unsigned long)swapper_pg_dir); 60 52 }