-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vineet Gupta
committed
Feb 11, 2013
1 parent
8652f29
commit 4c61d23
Showing
13 changed files
with
686 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: ca15c8ecd588dda4377d18d6d27bc1e87b4177cb | ||
refs/heads/master: 3be80aaef861a60b85a9323462ebb5f623774f7a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef _ASM_ARC_BUG_H | ||
#define _ASM_ARC_BUG_H | ||
|
||
#ifndef __ASSEMBLY__ | ||
|
||
#include <asm/ptrace.h> | ||
|
||
struct task_struct; | ||
|
||
void show_regs(struct pt_regs *regs); | ||
void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs); | ||
void show_kernel_fault_diag(const char *str, struct pt_regs *regs, | ||
unsigned long address, unsigned long cause_reg); | ||
void die(const char *str, struct pt_regs *regs, unsigned long address, | ||
unsigned long cause_reg); | ||
|
||
#define BUG() do { \ | ||
dump_stack(); \ | ||
pr_warn("Kernel BUG in %s: %s: %d!\n", \ | ||
__FILE__, __func__, __LINE__); \ | ||
} while (0) | ||
|
||
#define HAVE_ARCH_BUG | ||
|
||
#include <asm-generic/bug.h> | ||
|
||
#endif /* !__ASSEMBLY__ */ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef __ARC_ASM_CACHE_H | ||
#define __ARC_ASM_CACHE_H | ||
|
||
/* In case $$ not config, setup a dummy number for rest of kernel */ | ||
#ifndef CONFIG_ARC_CACHE_LINE_SHIFT | ||
#define L1_CACHE_SHIFT 6 | ||
#else | ||
#define L1_CACHE_SHIFT CONFIG_ARC_CACHE_LINE_SHIFT | ||
#endif | ||
|
||
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | ||
|
||
#endif /* _ASM_CACHE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/* | ||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef __ASM_ARC_ELF_H | ||
#define __ASM_ARC_ELF_H | ||
|
||
#include <asm/ptrace.h> | ||
|
||
#define EM_ARCOMPACT 93 | ||
|
||
/* Machine specific ELF Hdr flags */ | ||
#define EF_ARC_OSABI_MSK 0x00000f00 | ||
#define EF_ARC_OSABI_ORIG 0x00000000 /* MUST be zero for back-compat */ | ||
#define EF_ARC_OSABI_V2 0x00000200 | ||
|
||
/* ARC Relocations (kernel Modules only) */ | ||
#define R_ARC_32 0x4 | ||
#define R_ARC_32_ME 0x1B | ||
#define R_ARC_S25H_PCREL 0x10 | ||
#define R_ARC_S25W_PCREL 0x11 | ||
|
||
typedef unsigned long elf_greg_t; | ||
typedef unsigned long elf_fpregset_t; | ||
|
||
|
||
/* core dump regs is in the order pt_regs, callee_regs, stop_pc (for gdb) */ | ||
#define ELF_NGREG ((sizeof(struct pt_regs) + sizeof(struct callee_regs) \ | ||
+ sizeof(unsigned long)) / sizeof(elf_greg_t)) | ||
|
||
typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
|
||
/* | ||
* To ensure that | ||
* -we don't load something for the wrong architecture. | ||
* -The userspace is using the correct syscall ABI | ||
*/ | ||
struct elf32_hdr; | ||
extern int elf_check_arch(const struct elf32_hdr *); | ||
#define elf_check_arch elf_check_arch | ||
|
||
/* | ||
* These are used to set parameters in the core dumps. | ||
*/ | ||
#define ELF_ARCH EM_ARCOMPACT | ||
#define ELF_CLASS ELFCLASS32 | ||
|
||
#ifdef CONFIG_CPU_BIG_ENDIAN | ||
#define ELF_DATA ELFDATA2MSB | ||
#else | ||
#define ELF_DATA ELFDATA2LSB | ||
#endif | ||
|
||
#ifdef __KERNEL__ | ||
|
||
#define CORE_DUMP_USE_REGSET | ||
|
||
#define ELF_EXEC_PAGESIZE PAGE_SIZE | ||
|
||
/* | ||
* This is the location that an ET_DYN program is loaded if exec'ed. Typical | ||
* use of this is to invoke "./ld.so someprog" to test out a new version of | ||
* the loader. We need to make sure that it is out of the way of the program | ||
* that it will "exec", and that there is sufficient room for the brk. | ||
*/ | ||
#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | ||
|
||
/* | ||
* When the program starts, a1 contains a pointer to a function to be | ||
* registered with atexit, as per the SVR4 ABI. A value of 0 means we | ||
* have no such handler. | ||
*/ | ||
#define ELF_PLAT_INIT(_r, load_addr) ((_r)->r0 = 0) | ||
|
||
/* | ||
* This yields a mask that user programs can use to figure out what | ||
* instruction set this cpu supports. | ||
*/ | ||
#define ELF_HWCAP (0) | ||
|
||
/* | ||
* This yields a string that ld.so will use to load implementation | ||
* specific libraries for optimization. This is more specific in | ||
* intent than poking at uname or /proc/cpuinfo. | ||
*/ | ||
#define ELF_PLATFORM (NULL) | ||
|
||
#define SET_PERSONALITY(ex) \ | ||
set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
|
||
#endif /* __KERNEL__ */ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef __ASM_ARC_EXEC_H | ||
#define __ASM_ARC_EXEC_H | ||
|
||
/* Align to 16b */ | ||
#define arch_align_stack(p) ((unsigned long)(p) & ~0xf) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef _ASM_ARC_KDEBUG_H | ||
#define _ASM_ARC_KDEBUG_H | ||
|
||
enum die_val { | ||
DIE_UNUSED, | ||
DIE_TRAP, | ||
DIE_IERR, | ||
DIE_OOPS | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef __ASM_LINKAGE_H | ||
#define __ASM_LINKAGE_H | ||
|
||
#ifdef __ASSEMBLY__ | ||
|
||
/* Can't use the ENTRY macro in linux/linkage.h | ||
* gas considers ';' as comment vs. newline | ||
*/ | ||
.macro ARC_ENTRY name | ||
.global \name | ||
.align 4 | ||
\name: | ||
.endm | ||
|
||
.macro ARC_EXIT name | ||
#define ASM_PREV_SYM_ADDR(name) .-##name | ||
.size \ name, ASM_PREV_SYM_ADDR(\name) | ||
.endm | ||
|
||
#endif /* __ASSEMBLY__ */ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
* Amit Bhor, Sameer Dhavale: Codito Technologies 2004 | ||
*/ | ||
|
||
#ifndef _ASM_ARC_MODULE_H | ||
#define _ASM_ARC_MODULE_H | ||
|
||
#include <asm-generic/module.h> | ||
|
||
#endif /* _ASM_ARC_MODULE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef __ASM_ARC_PAGE_H | ||
#define __ASM_ARC_PAGE_H | ||
|
||
/* PAGE_SHIFT determines the page size */ | ||
#if defined(CONFIG_ARC_PAGE_SIZE_16K) | ||
#define PAGE_SHIFT 14 | ||
#elif defined(CONFIG_ARC_PAGE_SIZE_4K) | ||
#define PAGE_SHIFT 12 | ||
#else | ||
/* | ||
* Default 8k | ||
* done this way (instead of under CONFIG_ARC_PAGE_SIZE_8K) because adhoc | ||
* user code (busybox appletlib.h) expects PAGE_SHIFT to be defined w/o | ||
* using the correct uClibc header and in their build our autoconf.h is | ||
* not available | ||
*/ | ||
#define PAGE_SHIFT 13 | ||
#endif | ||
|
||
#ifdef __ASSEMBLY__ | ||
#define PAGE_SIZE (1 << PAGE_SHIFT) | ||
#define PAGE_OFFSET (0x80000000) | ||
#else | ||
#define PAGE_SIZE (1UL << PAGE_SHIFT) /* Default 8K */ | ||
#define PAGE_OFFSET (0x80000000UL) /* Kernel starts at 2G onwards */ | ||
#endif | ||
|
||
#define PAGE_MASK (~(PAGE_SIZE-1)) | ||
|
||
#endif /* !__ASSEMBLY__ */ | ||
|
||
#endif /* __KERNEL__ */ | ||
|
||
#endif |
Oops, something went wrong.