diff options
Diffstat (limited to 'arch/score/include/asm')
49 files changed, 156 insertions, 456 deletions
diff --git a/arch/score/include/asm/Kbuild b/arch/score/include/asm/Kbuild index b367abd4620..2f947aba4bd 100644 --- a/arch/score/include/asm/Kbuild +++ b/arch/score/include/asm/Kbuild @@ -1,3 +1,12 @@ -include include/asm-generic/Kbuild.asm header-y += + + +generic-y += barrier.h +generic-y += clkdev.h +generic-y += cputime.h +generic-y += hash.h +generic-y += mcs_spinlock.h +generic-y += preempt.h +generic-y += trace_clock.h +generic-y += xor.h diff --git a/arch/score/include/asm/atomic.h b/arch/score/include/asm/atomic.h index 84eb8ddf9f3..edf33dbded1 100644 --- a/arch/score/include/asm/atomic.h +++ b/arch/score/include/asm/atomic.h @@ -1,6 +1,7 @@ #ifndef _ASM_SCORE_ATOMIC_H #define _ASM_SCORE_ATOMIC_H +#include <asm/cmpxchg.h> #include <asm-generic/atomic.h> #endif /* _ASM_SCORE_ATOMIC_H */ diff --git a/arch/score/include/asm/auxvec.h b/arch/score/include/asm/auxvec.h deleted file mode 100644 index f69151565ae..00000000000 --- a/arch/score/include/asm/auxvec.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _ASM_SCORE_AUXVEC_H -#define _ASM_SCORE_AUXVEC_H - -#endif /* _ASM_SCORE_AUXVEC_H */ diff --git a/arch/score/include/asm/bitops.h b/arch/score/include/asm/bitops.h index 2763b050fca..c1bf8d6d0fb 100644 --- a/arch/score/include/asm/bitops.h +++ b/arch/score/include/asm/bitops.h @@ -2,13 +2,7 @@ #define _ASM_SCORE_BITOPS_H #include <asm/byteorder.h> /* swab32 */ -#include <asm/system.h> /* save_flags */ - -/* - * clear_bit() doesn't provide any barrier for the compiler. - */ -#define smp_mb__before_clear_bit() barrier() -#define smp_mb__after_clear_bit() barrier() +#include <asm/barrier.h> #include <asm-generic/bitops.h> #include <asm-generic/bitops/__fls.h> diff --git a/arch/score/include/asm/bitsperlong.h b/arch/score/include/asm/bitsperlong.h deleted file mode 100644 index 86ff337aa45..00000000000 --- a/arch/score/include/asm/bitsperlong.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_BITSPERLONG_H -#define _ASM_SCORE_BITSPERLONG_H - -#include <asm-generic/bitsperlong.h> - -#endif /* _ASM_SCORE_BITSPERLONG_H */ diff --git a/arch/score/include/asm/bug.h b/arch/score/include/asm/bug.h index bb76a330bcf..fd7164af1f0 100644 --- a/arch/score/include/asm/bug.h +++ b/arch/score/include/asm/bug.h @@ -3,4 +3,15 @@ #include <asm-generic/bug.h> +struct pt_regs; +extern void __die(const char *, struct pt_regs *, const char *, + const char *, unsigned long) __attribute__((noreturn)); +extern void __die_if_kernel(const char *, struct pt_regs *, const char *, + const char *, unsigned long); + +#define die(msg, regs) \ + __die(msg, regs, __FILE__ ":", __func__, __LINE__) +#define die_if_kernel(msg, regs) \ + __die_if_kernel(msg, regs, __FILE__ ":", __func__, __LINE__) + #endif /* _ASM_SCORE_BUG_H */ diff --git a/arch/score/include/asm/byteorder.h b/arch/score/include/asm/byteorder.h deleted file mode 100644 index 88cbebc7921..00000000000 --- a/arch/score/include/asm/byteorder.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_BYTEORDER_H -#define _ASM_SCORE_BYTEORDER_H - -#include <linux/byteorder/little_endian.h> - -#endif /* _ASM_SCORE_BYTEORDER_H */ diff --git a/arch/score/include/asm/checksum.h b/arch/score/include/asm/checksum.h index f909ac3144a..961bd64015a 100644 --- a/arch/score/include/asm/checksum.h +++ b/arch/score/include/asm/checksum.h @@ -184,48 +184,57 @@ static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, __wsum sum) { __asm__ __volatile__( - ".set\tnoreorder\t\t\t# csum_ipv6_magic\n\t" - ".set\tnoat\n\t" - "addu\t%0, %5\t\t\t# proto (long in network byte order)\n\t" - "sltu\t$1, %0, %5\n\t" - "addu\t%0, $1\n\t" - "addu\t%0, %6\t\t\t# csum\n\t" - "sltu\t$1, %0, %6\n\t" - "lw\t%1, 0(%2)\t\t\t# four words source address\n\t" - "addu\t%0, $1\n\t" - "addu\t%0, %1\n\t" - "sltu\t$1, %0, %1\n\t" - "lw\t%1, 4(%2)\n\t" - "addu\t%0, $1\n\t" - "addu\t%0, %1\n\t" - "sltu\t$1, %0, %1\n\t" - "lw\t%1, 8(%2)\n\t" - "addu\t%0, $1\n\t" - "addu\t%0, %1\n\t" - "sltu\t$1, %0, %1\n\t" - "lw\t%1, 12(%2)\n\t" - "addu\t%0, $1\n\t" - "addu\t%0, %1\n\t" - "sltu\t$1, %0, %1\n\t" - "lw\t%1, 0(%3)\n\t" - "addu\t%0, $1\n\t" - "addu\t%0, %1\n\t" - "sltu\t$1, %0, %1\n\t" - "lw\t%1, 4(%3)\n\t" - "addu\t%0, $1\n\t" - "addu\t%0, %1\n\t" - "sltu\t$1, %0, %1\n\t" - "lw\t%1, 8(%3)\n\t" - "addu\t%0, $1\n\t" - "addu\t%0, %1\n\t" - "sltu\t$1, %0, %1\n\t" - "lw\t%1, 12(%3)\n\t" - "addu\t%0, $1\n\t" - "addu\t%0, %1\n\t" - "sltu\t$1, %0, %1\n\t" - "addu\t%0, $1\t\t\t# Add final carry\n\t" - ".set\tnoat\n\t" - ".set\tnoreorder" + ".set\tvolatile\t\t\t# csum_ipv6_magic\n\t" + "add\t%0, %0, %5\t\t\t# proto (long in network byte order)\n\t" + "cmp.c\t%5, %0\n\t" + "bleu 1f\n\t" + "addi\t%0, 0x1\n\t" + "1:add\t%0, %0, %6\t\t\t# csum\n\t" + "cmp.c\t%6, %0\n\t" + "lw\t%1, [%2, 0]\t\t\t# four words source address\n\t" + "bleu 1f\n\t" + "addi\t%0, 0x1\n\t" + "1:add\t%0, %0, %1\n\t" + "cmp.c\t%1, %0\n\t" + "1:lw\t%1, [%2, 4]\n\t" + "bleu 1f\n\t" + "addi\t%0, 0x1\n\t" + "1:add\t%0, %0, %1\n\t" + "cmp.c\t%1, %0\n\t" + "lw\t%1, [%2,8]\n\t" + "bleu 1f\n\t" + "addi\t%0, 0x1\n\t" + "1:add\t%0, %0, %1\n\t" + "cmp.c\t%1, %0\n\t" + "lw\t%1, [%2, 12]\n\t" + "bleu 1f\n\t" + "addi\t%0, 0x1\n\t" + "1:add\t%0, %0,%1\n\t" + "cmp.c\t%1, %0\n\t" + "lw\t%1, [%3, 0]\n\t" + "bleu 1f\n\t" + "addi\t%0, 0x1\n\t" + "1:add\t%0, %0, %1\n\t" + "cmp.c\t%1, %0\n\t" + "lw\t%1, [%3, 4]\n\t" + "bleu 1f\n\t" + "addi\t%0, 0x1\n\t" + "1:add\t%0, %0, %1\n\t" + "cmp.c\t%1, %0\n\t" + "lw\t%1, [%3, 8]\n\t" + "bleu 1f\n\t" + "addi\t%0, 0x1\n\t" + "1:add\t%0, %0, %1\n\t" + "cmp.c\t%1, %0\n\t" + "lw\t%1, [%3, 12]\n\t" + "bleu 1f\n\t" + "addi\t%0, 0x1\n\t" + "1:add\t%0, %0, %1\n\t" + "cmp.c\t%1, %0\n\t" + "bleu 1f\n\t" + "addi\t%0, 0x1\n\t" + "1:\n\t" + ".set\toptimize" : "=r" (sum), "=r" (proto) : "r" (saddr), "r" (daddr), "0" (htonl(len)), "1" (htonl(proto)), "r" (sum)); diff --git a/arch/score/include/asm/cmpxchg.h b/arch/score/include/asm/cmpxchg.h new file mode 100644 index 00000000000..f384839c3ee --- /dev/null +++ b/arch/score/include/asm/cmpxchg.h @@ -0,0 +1,49 @@ +#ifndef _ASM_SCORE_CMPXCHG_H +#define _ASM_SCORE_CMPXCHG_H + +#include <linux/irqflags.h> + +struct __xchg_dummy { unsigned long a[100]; }; +#define __xg(x) ((struct __xchg_dummy *)(x)) + +static inline +unsigned long __xchg(volatile unsigned long *m, unsigned long val) +{ + unsigned long retval; + unsigned long flags; + + local_irq_save(flags); + retval = *m; + *m = val; + local_irq_restore(flags); + return retval; +} + +#define xchg(ptr, v) \ + ((__typeof__(*(ptr))) __xchg((unsigned long *)(ptr), \ + (unsigned long)(v))) + +static inline unsigned long __cmpxchg(volatile unsigned long *m, + unsigned long old, unsigned long new) +{ + unsigned long retval; + unsigned long flags; + + local_irq_save(flags); + retval = *m; + if (retval == old) + *m = new; + local_irq_restore(flags); + return retval; +} + +#define cmpxchg(ptr, o, n) \ + ((__typeof__(*(ptr))) __cmpxchg((unsigned long *)(ptr), \ + (unsigned long)(o), \ + (unsigned long)(n))) + +#define __HAVE_ARCH_CMPXCHG 1 + +#include <asm-generic/cmpxchg-local.h> + +#endif /* _ASM_SCORE_CMPXCHG_H */ diff --git a/arch/score/include/asm/cputime.h b/arch/score/include/asm/cputime.h deleted file mode 100644 index 1fced99f0d6..00000000000 --- a/arch/score/include/asm/cputime.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_CPUTIME_H -#define _ASM_SCORE_CPUTIME_H - -#include <asm-generic/cputime.h> - -#endif /* _ASM_SCORE_CPUTIME_H */ diff --git a/arch/score/include/asm/dma-mapping.h b/arch/score/include/asm/dma-mapping.h deleted file mode 100644 index f9c0193c7a5..00000000000 --- a/arch/score/include/asm/dma-mapping.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_DMA_MAPPING_H -#define _ASM_SCORE_DMA_MAPPING_H - -#include <asm-generic/dma-mapping-broken.h> - -#endif /* _ASM_SCORE_DMA_MAPPING_H */ diff --git a/arch/score/include/asm/elf.h b/arch/score/include/asm/elf.h index f478ce94181..6a9421c693c 100644 --- a/arch/score/include/asm/elf.h +++ b/arch/score/include/asm/elf.h @@ -52,11 +52,6 @@ typedef elf_fpreg_t elf_fpregset_t; #define ELF_DATA ELFDATA2LSB #define ELF_ARCH EM_SCORE7 -#define SET_PERSONALITY(ex) \ -do { \ - set_personality(PER_LINUX); \ -} while (0) - struct task_struct; struct pt_regs; diff --git a/arch/score/include/asm/errno.h b/arch/score/include/asm/errno.h deleted file mode 100644 index 29ff39d5ab4..00000000000 --- a/arch/score/include/asm/errno.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_ERRNO_H -#define _ASM_SCORE_ERRNO_H - -#include <asm-generic/errno.h> - -#endif /* _ASM_SCORE_ERRNO_H */ diff --git a/arch/score/include/asm/exec.h b/arch/score/include/asm/exec.h new file mode 100644 index 00000000000..f9f3cd59c86 --- /dev/null +++ b/arch/score/include/asm/exec.h @@ -0,0 +1,6 @@ +#ifndef _ASM_SCORE_EXEC_H +#define _ASM_SCORE_EXEC_H + +extern unsigned long arch_align_stack(unsigned long sp); + +#endif /* _ASM_SCORE_EXEC_H */ diff --git a/arch/score/include/asm/fcntl.h b/arch/score/include/asm/fcntl.h deleted file mode 100644 index 03968a3103a..00000000000 --- a/arch/score/include/asm/fcntl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_FCNTL_H -#define _ASM_SCORE_FCNTL_H - -#include <asm-generic/fcntl.h> - -#endif /* _ASM_SCORE_FCNTL_H */ diff --git a/arch/score/include/asm/io.h b/arch/score/include/asm/io.h index fbbfd7132e3..574c8827abe 100644 --- a/arch/score/include/asm/io.h +++ b/arch/score/include/asm/io.h @@ -5,5 +5,4 @@ #define virt_to_bus virt_to_phys #define bus_to_virt phys_to_virt - #endif /* _ASM_SCORE_IO_H */ diff --git a/arch/score/include/asm/ioctl.h b/arch/score/include/asm/ioctl.h deleted file mode 100644 index a351d2194bf..00000000000 --- a/arch/score/include/asm/ioctl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_IOCTL_H -#define _ASM_SCORE_IOCTL_H - -#include <asm-generic/ioctl.h> - -#endif /* _ASM_SCORE_IOCTL_H */ diff --git a/arch/score/include/asm/ioctls.h b/arch/score/include/asm/ioctls.h deleted file mode 100644 index ed01d2b9aea..00000000000 --- a/arch/score/include/asm/ioctls.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_IOCTLS_H -#define _ASM_SCORE_IOCTLS_H - -#include <asm-generic/ioctls.h> - -#endif /* _ASM_SCORE_IOCTLS_H */ diff --git a/arch/score/include/asm/ipcbuf.h b/arch/score/include/asm/ipcbuf.h deleted file mode 100644 index e082ceff181..00000000000 --- a/arch/score/include/asm/ipcbuf.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_IPCBUF_H -#define _ASM_SCORE_IPCBUF_H - -#include <asm-generic/ipcbuf.h> - -#endif /* _ASM_SCORE_IPCBUF_H */ diff --git a/arch/score/include/asm/mman.h b/arch/score/include/asm/mman.h deleted file mode 100644 index 84d85ddfed8..00000000000 --- a/arch/score/include/asm/mman.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_MMAN_H -#define _ASM_SCORE_MMAN_H - -#include <asm-generic/mman.h> - -#endif /* _ASM_SCORE_MMAN_H */ diff --git a/arch/score/include/asm/module.h b/arch/score/include/asm/module.h index f0b5dc0bd02..abf395bbfab 100644 --- a/arch/score/include/asm/module.h +++ b/arch/score/include/asm/module.h @@ -3,6 +3,7 @@ #include <linux/list.h> #include <asm/uaccess.h> +#include <asm-generic/module.h> struct mod_arch_specific { /* Data Bus Error exception tables */ @@ -13,11 +14,6 @@ struct mod_arch_specific { typedef uint8_t Elf64_Byte; /* Type for a 8-bit quantity. */ -#define Elf_Shdr Elf32_Shdr -#define Elf_Sym Elf32_Sym -#define Elf_Ehdr Elf32_Ehdr -#define Elf_Addr Elf32_Addr - /* Given an address, look for it in the exception tables. */ #ifdef CONFIG_MODULES const struct exception_table_entry *search_module_dbetables(unsigned long addr); diff --git a/arch/score/include/asm/msgbuf.h b/arch/score/include/asm/msgbuf.h deleted file mode 100644 index 7506721e29f..00000000000 --- a/arch/score/include/asm/msgbuf.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_MSGBUF_H -#define _ASM_SCORE_MSGBUF_H - -#include <asm-generic/msgbuf.h> - -#endif /* _ASM_SCORE_MSGBUF_H */ diff --git a/arch/score/include/asm/param.h b/arch/score/include/asm/param.h deleted file mode 100644 index 916b8690b6a..00000000000 --- a/arch/score/include/asm/param.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_PARAM_H -#define _ASM_SCORE_PARAM_H - -#include <asm-generic/param.h> - -#endif /* _ASM_SCORE_PARAM_H */ diff --git a/arch/score/include/asm/pgalloc.h b/arch/score/include/asm/pgalloc.h index 059a61b7071..2e067657db9 100644 --- a/arch/score/include/asm/pgalloc.h +++ b/arch/score/include/asm/pgalloc.h @@ -2,7 +2,7 @@ #define _ASM_SCORE_PGALLOC_H #include <linux/mm.h> - +#include <linux/highmem.h> static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) { @@ -54,9 +54,12 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, struct page *pte; pte = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER); - if (pte) { - clear_highpage(pte); - pgtable_page_ctor(pte); + if (!pte) + return NULL; + clear_highpage(pte); + if (!pgtable_page_ctor(pte)) { + __free_page(pte); + return NULL; } return pte; } diff --git a/arch/score/include/asm/pgtable.h b/arch/score/include/asm/pgtable.h index 2fd46980768..db96ad9afc0 100644 --- a/arch/score/include/asm/pgtable.h +++ b/arch/score/include/asm/pgtable.h @@ -113,9 +113,6 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; } #define pte_clear(mm, addr, xp) \ do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) -#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ - remap_pfn_range(vma, vaddr, pfn, size, prot) - /* * The "pgd_xxx()" functions here are trivial for a folded two-level * setup: the pgd is never bad, and a pmd always exists (as it's folded diff --git a/arch/score/include/asm/poll.h b/arch/score/include/asm/poll.h deleted file mode 100644 index 18532db0286..00000000000 --- a/arch/score/include/asm/poll.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_POLL_H -#define _ASM_SCORE_POLL_H - -#include <asm-generic/poll.h> - -#endif /* _ASM_SCORE_POLL_H */ diff --git a/arch/score/include/asm/posix_types.h b/arch/score/include/asm/posix_types.h deleted file mode 100644 index b88acf80048..00000000000 --- a/arch/score/include/asm/posix_types.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_POSIX_TYPES_H -#define _ASM_SCORE_POSIX_TYPES_H - -#include <asm-generic/posix_types.h> - -#endif /* _ASM_SCORE_POSIX_TYPES_H */ diff --git a/arch/score/include/asm/processor.h b/arch/score/include/asm/processor.h index 7e22f216d77..d9a922d8711 100644 --- a/arch/score/include/asm/processor.h +++ b/arch/score/include/asm/processor.h @@ -13,7 +13,6 @@ struct task_struct; */ extern void (*cpu_wait)(void); -extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); extern unsigned long thread_saved_pc(struct task_struct *tsk); extern void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp); @@ -26,7 +25,6 @@ extern unsigned long get_wchan(struct task_struct *p); #define cpu_relax() barrier() #define release_thread(thread) do {} while (0) -#define prepare_to_copy(tsk) do {} while (0) /* * User space process size: 2GB. This is hardcoded into a few places, diff --git a/arch/score/include/asm/ptrace.h b/arch/score/include/asm/ptrace.h index e89dc9b1ef4..abc279d96b7 100644 --- a/arch/score/include/asm/ptrace.h +++ b/arch/score/include/asm/ptrace.h @@ -1,78 +1,8 @@ #ifndef _ASM_SCORE_PTRACE_H #define _ASM_SCORE_PTRACE_H -#define PTRACE_GETREGS 12 -#define PTRACE_SETREGS 13 +#include <uapi/asm/ptrace.h> -#define PC 32 -#define CONDITION 33 -#define ECR 34 -#define EMA 35 -#define CEH 36 -#define CEL 37 -#define COUNTER 38 -#define LDCR 39 -#define STCR 40 -#define PSR 41 - -#define SINGLESTEP16_INSN 0x7006 -#define SINGLESTEP32_INSN 0x840C8000 -#define BREAKPOINT16_INSN 0x7002 /* work on SPG300 */ -#define BREAKPOINT32_INSN 0x84048000 /* work on SPG300 */ - -/* Define instruction mask */ -#define INSN32_MASK 0x80008000 - -#define J32 0x88008000 /* 1_00010_0000000000_1_000000000000000 */ -#define J32M 0xFC008000 /* 1_11111_0000000000_1_000000000000000 */ - -#define B32 0x90008000 /* 1_00100_0000000000_1_000000000000000 */ -#define B32M 0xFC008000 -#define BL32 0x90008001 /* 1_00100_0000000000_1_000000000000001 */ -#define BL32M B32 -#define BR32 0x80008008 /* 1_00000_0000000000_1_00000000_000100_0 */ -#define BR32M 0xFFE0807E -#define BRL32 0x80008009 /* 1_00000_0000000000_1_00000000_000100_1 */ -#define BRL32M BR32M - -#define B32_SET (J32 | B32 | BL32 | BR32 | BRL32) - -#define J16 0x3000 /* 0_011_....... */ -#define J16M 0xF000 -#define B16 0x4000 /* 0_100_....... */ -#define B16M 0xF000 -#define BR16 0x0004 /* 0_000.......0100 */ -#define BR16M 0xF00F -#define B16_SET (J16 | B16 | BR16) - - -/* - * This struct defines the way the registers are stored on the stack during a - * system call/exception. As usual the registers k0/k1 aren't being saved. - */ -struct pt_regs { - unsigned long pad0[6]; /* stack arguments */ - unsigned long orig_r4; - unsigned long orig_r7; - long is_syscall; - - unsigned long regs[32]; - - unsigned long cel; - unsigned long ceh; - - unsigned long sr0; /* cnt */ - unsigned long sr1; /* lcr */ - unsigned long sr2; /* scr */ - - unsigned long cp0_epc; - unsigned long cp0_ema; - unsigned long cp0_psr; - unsigned long cp0_ecr; - unsigned long cp0_condition; -}; - -#ifdef __KERNEL__ struct task_struct; @@ -83,6 +13,7 @@ struct task_struct; #define instruction_pointer(regs) ((unsigned long)(regs)->cp0_epc) #define profile_pc(regs) instruction_pointer(regs) +#define user_stack_pointer(r) ((unsigned long)(r)->regs[0]) extern void do_syscall_trace(struct pt_regs *regs, int entryexit); extern int read_tsk_long(struct task_struct *, unsigned long, unsigned long *); @@ -91,6 +22,4 @@ extern int read_tsk_short(struct task_struct *, unsigned long, #define arch_has_single_step() (1) -#endif /* __KERNEL__ */ - #endif /* _ASM_SCORE_PTRACE_H */ diff --git a/arch/score/include/asm/resource.h b/arch/score/include/asm/resource.h deleted file mode 100644 index 9ce22bc7b47..00000000000 --- a/arch/score/include/asm/resource.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_RESOURCE_H -#define _ASM_SCORE_RESOURCE_H - -#include <asm-generic/resource.h> - -#endif /* _ASM_SCORE_RESOURCE_H */ diff --git a/arch/score/include/asm/sembuf.h b/arch/score/include/asm/sembuf.h deleted file mode 100644 index dae5e835ce9..00000000000 --- a/arch/score/include/asm/sembuf.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_SEMBUF_H -#define _ASM_SCORE_SEMBUF_H - -#include <asm-generic/sembuf.h> - -#endif /* _ASM_SCORE_SEMBUF_H */ diff --git a/arch/score/include/asm/setup.h b/arch/score/include/asm/setup.h index 3cb944dc68d..1f3aa7262fa 100644 --- a/arch/score/include/asm/setup.h +++ b/arch/score/include/asm/setup.h @@ -1,11 +1,8 @@ #ifndef _ASM_SCORE_SETUP_H #define _ASM_SCORE_SETUP_H -#define COMMAND_LINE_SIZE 256 -#define MEMORY_START 0 -#define MEMORY_SIZE 0x2000000 +#include <uapi/asm/setup.h> -#ifdef __KERNEL__ extern void pagetable_init(void); extern void pgd_init(unsigned long page); @@ -36,6 +33,4 @@ extern void debug_exception_vector(void); extern void general_exception_vector(void); extern void interrupt_exception_vector(void); -#endif /* __KERNEL__ */ - #endif /* _ASM_SCORE_SETUP_H */ diff --git a/arch/score/include/asm/shmbuf.h b/arch/score/include/asm/shmbuf.h deleted file mode 100644 index c85b2429ba2..00000000000 --- a/arch/score/include/asm/shmbuf.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_SHMBUF_H -#define _ASM_SCORE_SHMBUF_H - -#include <asm-generic/shmbuf.h> - -#endif /* _ASM_SCORE_SHMBUF_H */ diff --git a/arch/score/include/asm/sigcontext.h b/arch/score/include/asm/sigcontext.h deleted file mode 100644 index 5ffda39ddb9..00000000000 --- a/arch/score/include/asm/sigcontext.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _ASM_SCORE_SIGCONTEXT_H -#define _ASM_SCORE_SIGCONTEXT_H - -/* - * Keep this struct definition in sync with the sigcontext fragment - * in arch/score/tools/offset.c - */ -struct sigcontext { - unsigned int sc_regmask; - unsigned int sc_psr; - unsigned int sc_condition; - unsigned long sc_pc; - unsigned long sc_regs[32]; - unsigned int sc_ssflags; - unsigned int sc_mdceh; - unsigned int sc_mdcel; - unsigned int sc_ecr; - unsigned long sc_ema; - unsigned long sc_sigset[4]; -}; - -#endif /* _ASM_SCORE_SIGCONTEXT_H */ diff --git a/arch/score/include/asm/siginfo.h b/arch/score/include/asm/siginfo.h deleted file mode 100644 index 87ca35607a2..00000000000 --- a/arch/score/include/asm/siginfo.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_SIGINFO_H -#define _ASM_SCORE_SIGINFO_H - -#include <asm-generic/siginfo.h> - -#endif /* _ASM_SCORE_SIGINFO_H */ diff --git a/arch/score/include/asm/signal.h b/arch/score/include/asm/signal.h deleted file mode 100644 index 2605bc06b64..00000000000 --- a/arch/score/include/asm/signal.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_SIGNAL_H -#define _ASM_SCORE_SIGNAL_H - -#include <asm-generic/signal.h> - -#endif /* _ASM_SCORE_SIGNAL_H */ diff --git a/arch/score/include/asm/socket.h b/arch/score/include/asm/socket.h deleted file mode 100644 index 612a70e385b..00000000000 --- a/arch/score/include/asm/socket.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_SOCKET_H -#define _ASM_SCORE_SOCKET_H - -#include <asm-generic/socket.h> - -#endif /* _ASM_SCORE_SOCKET_H */ diff --git a/arch/score/include/asm/sockios.h b/arch/score/include/asm/sockios.h deleted file mode 100644 index ba825648018..00000000000 --- a/arch/score/include/asm/sockios.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_SOCKIOS_H -#define _ASM_SCORE_SOCKIOS_H - -#include <asm-generic/sockios.h> - -#endif /* _ASM_SCORE_SOCKIOS_H */ diff --git a/arch/score/include/asm/stat.h b/arch/score/include/asm/stat.h deleted file mode 100644 index 5037055500a..00000000000 --- a/arch/score/include/asm/stat.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_STAT_H -#define _ASM_SCORE_STAT_H - -#include <asm-generic/stat.h> - -#endif /* _ASM_SCORE_STAT_H */ diff --git a/arch/score/include/asm/statfs.h b/arch/score/include/asm/statfs.h deleted file mode 100644 index 36e41004e99..00000000000 --- a/arch/score/include/asm/statfs.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_STATFS_H -#define _ASM_SCORE_STATFS_H - -#include <asm-generic/statfs.h> - -#endif /* _ASM_SCORE_STATFS_H */ diff --git a/arch/score/include/asm/swab.h b/arch/score/include/asm/swab.h deleted file mode 100644 index fadc3cc6d8a..00000000000 --- a/arch/score/include/asm/swab.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_SWAB_H -#define _ASM_SCORE_SWAB_H - -#include <asm-generic/swab.h> - -#endif /* _ASM_SCORE_SWAB_H */ diff --git a/arch/score/include/asm/switch_to.h b/arch/score/include/asm/switch_to.h new file mode 100644 index 00000000000..031756b59ec --- /dev/null +++ b/arch/score/include/asm/switch_to.h @@ -0,0 +1,13 @@ +#ifndef _ASM_SCORE_SWITCH_TO_H +#define _ASM_SCORE_SWITCH_TO_H + +extern void *resume(void *last, void *next, void *next_ti); + +#define switch_to(prev, next, last) \ +do { \ + (last) = resume(prev, next, task_thread_info(next)); \ +} while (0) + +#define finish_arch_switch(prev) do {} while (0) + +#endif /* _ASM_SCORE_SWITCH_TO_H */ diff --git a/arch/score/include/asm/syscalls.h b/arch/score/include/asm/syscalls.h index 1dd5e0d6b0c..98d1df92fbd 100644 --- a/arch/score/include/asm/syscalls.h +++ b/arch/score/include/asm/syscalls.h @@ -1,9 +1,6 @@ #ifndef _ASM_SCORE_SYSCALLS_H #define _ASM_SCORE_SYSCALLS_H -asmlinkage long score_clone(struct pt_regs *regs); -asmlinkage long score_execve(struct pt_regs *regs); -asmlinkage long score_sigaltstack(struct pt_regs *regs); asmlinkage long score_rt_sigreturn(struct pt_regs *regs); #include <asm-generic/syscalls.h> diff --git a/arch/score/include/asm/system.h b/arch/score/include/asm/system.h deleted file mode 100644 index 589d5c7e171..00000000000 --- a/arch/score/include/asm/system.h +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef _ASM_SCORE_SYSTEM_H -#define _ASM_SCORE_SYSTEM_H - -#include <linux/types.h> -#include <linux/irqflags.h> - -struct pt_regs; -struct task_struct; - -extern void *resume(void *last, void *next, void *next_ti); - -#define switch_to(prev, next, last) \ -do { \ - (last) = resume(prev, next, task_thread_info(next)); \ -} while (0) - -#define finish_arch_switch(prev) do {} while (0) - -typedef void (*vi_handler_t)(void); -extern unsigned long arch_align_stack(unsigned long sp); - -#define mb() barrier() -#define rmb() barrier() -#define wmb() barrier() -#define smp_mb() barrier() -#define smp_rmb() barrier() -#define smp_wmb() barrier() - -#define read_barrier_depends() do {} while (0) -#define smp_read_barrier_depends() do {} while (0) - -#define set_mb(var, value) do {var = value; wmb(); } while (0) - -#define __HAVE_ARCH_CMPXCHG 1 - -#include <asm-generic/cmpxchg-local.h> - -#ifndef __ASSEMBLY__ - -struct __xchg_dummy { unsigned long a[100]; }; -#define __xg(x) ((struct __xchg_dummy *)(x)) - -static inline -unsigned long __xchg(volatile unsigned long *m, unsigned long val) -{ - unsigned long retval; - unsigned long flags; - - local_irq_save(flags); - retval = *m; - *m = val; - local_irq_restore(flags); - return retval; -} - -#define xchg(ptr, v) \ - ((__typeof__(*(ptr))) __xchg((unsigned long *)(ptr), \ - (unsigned long)(v))) - -static inline unsigned long __cmpxchg(volatile unsigned long *m, - unsigned long old, unsigned long new) -{ - unsigned long retval; - unsigned long flags; - - local_irq_save(flags); - retval = *m; - if (retval == old) - *m = new; - local_irq_restore(flags); - return retval; -} - -#define cmpxchg(ptr, o, n) \ - ((__typeof__(*(ptr))) __cmpxchg((unsigned long *)(ptr), \ - (unsigned long)(o), \ - (unsigned long)(n))) - -extern void __die(const char *, struct pt_regs *, const char *, - const char *, unsigned long) __attribute__((noreturn)); -extern void __die_if_kernel(const char *, struct pt_regs *, const char *, - const char *, unsigned long); - -#define die(msg, regs) \ - __die(msg, regs, __FILE__ ":", __func__, __LINE__) -#define die_if_kernel(msg, regs) \ - __die_if_kernel(msg, regs, __FILE__ ":", __func__, __LINE__) - -#endif /* !__ASSEMBLY__ */ -#endif /* _ASM_SCORE_SYSTEM_H */ diff --git a/arch/score/include/asm/termbits.h b/arch/score/include/asm/termbits.h deleted file mode 100644 index 9a95c141243..00000000000 --- a/arch/score/include/asm/termbits.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_TERMBITS_H -#define _ASM_SCORE_TERMBITS_H - -#include <asm-generic/termbits.h> - -#endif /* _ASM_SCORE_TERMBITS_H */ diff --git a/arch/score/include/asm/termios.h b/arch/score/include/asm/termios.h deleted file mode 100644 index 40984e811ad..00000000000 --- a/arch/score/include/asm/termios.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_TERMIOS_H -#define _ASM_SCORE_TERMIOS_H - -#include <asm-generic/termios.h> - -#endif /* _ASM_SCORE_TERMIOS_H */ diff --git a/arch/score/include/asm/thread_info.h b/arch/score/include/asm/thread_info.h index 2205c62284d..656b7ada932 100644 --- a/arch/score/include/asm/thread_info.h +++ b/arch/score/include/asm/thread_info.h @@ -11,10 +11,9 @@ #include <linux/const.h> /* thread information allocation */ -#define THREAD_SIZE_ORDER (1) -#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) -#define THREAD_MASK (THREAD_SIZE - _AC(1,UL)) -#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR +#define THREAD_SIZE_ORDER (1) +#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) +#define THREAD_MASK (THREAD_SIZE - _AC(1,UL)) #ifndef __ASSEMBLY__ @@ -71,13 +70,8 @@ struct thread_info { register struct thread_info *__current_thread_info __asm__("r28"); #define current_thread_info() __current_thread_info -#define alloc_thread_info_node(tsk, node) kmalloc_node(THREAD_SIZE, GFP_KERNEL, node) -#define free_thread_info(info) kfree(info) - #endif /* !__ASSEMBLY__ */ -#define PREEMPT_ACTIVE 0x10000000 - /* * thread information flags * - these are process state flags that various assembly files may need to @@ -90,16 +84,12 @@ register struct thread_info *__current_thread_info __asm__("r28"); #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ #define TIF_NOTIFY_RESUME 5 /* callback before returning to user */ #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ -#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling - TIF_NEED_RESCHED */ #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) -#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) -#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) #define _TIF_WORK_MASK (0x0000ffff) diff --git a/arch/score/include/asm/types.h b/arch/score/include/asm/types.h deleted file mode 100644 index 2140032778e..00000000000 --- a/arch/score/include/asm/types.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASM_SCORE_TYPES_H -#define _ASM_SCORE_TYPES_H - -#include <asm-generic/types.h> - -#endif /* _ASM_SCORE_TYPES_H */ diff --git a/arch/score/include/asm/unistd.h b/arch/score/include/asm/unistd.h deleted file mode 100644 index 4aa957364d4..00000000000 --- a/arch/score/include/asm/unistd.h +++ /dev/null @@ -1,13 +0,0 @@ -#if !defined(_ASM_SCORE_UNISTD_H) || defined(__SYSCALL) -#define _ASM_SCORE_UNISTD_H - -#define __ARCH_HAVE_MMU - -#define __ARCH_WANT_SYSCALL_NO_AT -#define __ARCH_WANT_SYSCALL_NO_FLAGS -#define __ARCH_WANT_SYSCALL_OFF_T -#define __ARCH_WANT_SYSCALL_DEPRECATED - -#include <asm-generic/unistd.h> - -#endif /* _ASM_SCORE_UNISTD_H */ |
