Skip to content

Commit cd975ae

Browse files
committed
Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming
Pull c6x updates from Mark Salter: "Clean up some c6x Kconfig items and add support for Elf FDPIC loader." * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming: C6X: remove unused config items C6X: add support to build with BINFMT_ELF_FDPIC C6X: change main arch kbuild symbol
2 parents 881bcab + 8ff98b9 commit cd975ae

5 files changed

Lines changed: 24 additions & 15 deletions

File tree

‎arch/c6x/Kconfig‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# see Documentation/kbuild/kconfig-language.txt.
44
#
55

6-
config TMS320C6X
6+
config C6X
77
def_bool y
88
select CLKDEV_LOOKUP
99
select GENERIC_IRQ_SHOW
@@ -19,24 +19,12 @@ config TMS320C6X
1919
config MMU
2020
def_bool n
2121

22-
config ZONE_DMA
23-
def_bool y
24-
2522
config FPU
2623
def_bool n
2724

28-
config HIGHMEM
29-
def_bool n
30-
31-
config NUMA
32-
def_bool n
33-
3425
config RWSEM_GENERIC_SPINLOCK
3526
def_bool y
3627

37-
config RWSEM_XCHGADD_ALGORITHM
38-
def_bool n
39-
4028
config GENERIC_CALIBRATE_DELAY
4129
def_bool y
4230

‎arch/c6x/include/asm/elf.h‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,19 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
3030
*/
3131
#define elf_check_arch(x) ((x)->e_machine == EM_TI_C6000)
3232

33-
#define elf_check_const_displacement(x) (1)
33+
#define elf_check_fdpic(x) (1)
34+
#define elf_check_const_displacement(x) (0)
35+
36+
#define ELF_FDPIC_PLAT_INIT(_regs, _exec_map, _interp_map, _dynamic_addr) \
37+
do { \
38+
_regs->b4 = (_exec_map); \
39+
_regs->a6 = (_interp_map); \
40+
_regs->b6 = (_dynamic_addr); \
41+
} while (0)
42+
43+
#define ELF_FDPIC_CORE_EFLAGS 0
44+
45+
#define ELF_CORE_COPY_FPREGS(...) 0 /* No FPU regs to copy */
3446

3547
/*
3648
* These are used to set parameters in the core dumps.

‎arch/c6x/include/asm/mmu.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313

1414
typedef struct {
1515
unsigned long end_brk;
16+
#ifdef CONFIG_BINFMT_ELF_FDPIC
17+
unsigned long exec_fdpic_loadmap;
18+
unsigned long interp_fdpic_loadmap;
19+
#endif
1620
} mm_context_t;
1721

1822
#endif /* _ASM_C6X_MMU_H */

‎arch/c6x/include/asm/ptrace.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@
9797
#define PT_DP PT_B14 /* Data Segment Pointer (B14) */
9898
#define PT_SP PT_B15 /* Stack Pointer (B15) */
9999

100+
#define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */
101+
102+
#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */
103+
#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */
104+
100105
#ifndef __ASSEMBLY__
101106

102107
#ifdef _BIG_ENDIAN

‎fs/Kconfig.binfmt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ config ARCH_BINFMT_ELF_RANDOMIZE_PIE
3333
config BINFMT_ELF_FDPIC
3434
bool "Kernel support for FDPIC ELF binaries"
3535
default y
36-
depends on (FRV || BLACKFIN || (SUPERH32 && !MMU))
36+
depends on (FRV || BLACKFIN || (SUPERH32 && !MMU) || C6X)
3737
help
3838
ELF FDPIC binaries are based on ELF, but allow the individual load
3939
segments of a binary to be located in memory independently of each

0 commit comments

Comments
 (0)