Skip to content

Commit 54f7fc2

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull tile arch update from Chris Metcalf: "The bulk of this change is the tile uapi disintegration. There is also a one-line change in here to enable interrupts in do_work_pending() to avoid a WARN_ON in _local_bh_enable_ip()." * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: arch/tile: enable interrupts in do_work_pending() UAPI: (Scripted) Disintegrate arch/tile/include/asm UAPI: (Scripted) Disintegrate arch/tile/include/arch
2 parents 0c4a479 + c19c6c9 commit 54f7fc2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+298
-177
lines changed

arch/tile/include/arch/Kbuild

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +0,0 @@
1-
header-y += abi.h
2-
header-y += chip.h
3-
header-y += chip_tile64.h
4-
header-y += chip_tilegx.h
5-
header-y += chip_tilepro.h
6-
header-y += icache.h
7-
header-y += interrupts.h
8-
header-y += interrupts_32.h
9-
header-y += interrupts_64.h
10-
header-y += opcode.h
11-
header-y += opcode_tilegx.h
12-
header-y += opcode_tilepro.h
13-
header-y += sim.h
14-
header-y += sim_def.h
15-
header-y += spr_def.h
16-
header-y += spr_def_32.h
17-
header-y += spr_def_64.h

arch/tile/include/arch/spr_def.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@
1111
* NON INFRINGEMENT. See the GNU General Public License for
1212
* more details.
1313
*/
14+
#ifndef __ARCH_SPR_DEF_H__
15+
#define __ARCH_SPR_DEF_H__
1416

15-
/* Include the proper base SPR definition file. */
16-
#ifdef __tilegx__
17-
#include <arch/spr_def_64.h>
18-
#else
19-
#include <arch/spr_def_32.h>
20-
#endif
17+
#include <uapi/arch/spr_def.h>
2118

22-
#ifdef __KERNEL__
2319

2420
/*
2521
* In addition to including the proper base SPR definition file, depending
@@ -110,4 +106,4 @@
110106
#define INT_INTCTRL_K \
111107
_concat4(INT_INTCTRL_, CONFIG_KERNEL_PL,,)
112108

113-
#endif /* __KERNEL__ */
109+
#endif /* __ARCH_SPR_DEF_H__ */

arch/tile/include/asm/Kbuild

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
include include/asm-generic/Kbuild.asm
21

32
header-y += ../arch/
43

5-
header-y += cachectl.h
64
header-y += ucontext.h
7-
header-y += hardwall.h
85

96
generic-y += bug.h
107
generic-y += bugs.h

arch/tile/include/asm/hardwall.h

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,11 @@
1414
* Provide methods for access control of per-cpu resources like
1515
* UDN, IDN, or IPI.
1616
*/
17-
1817
#ifndef _ASM_TILE_HARDWALL_H
1918
#define _ASM_TILE_HARDWALL_H
2019

21-
#include <arch/chip.h>
22-
#include <linux/ioctl.h>
23-
24-
#define HARDWALL_IOCTL_BASE 0xa2
25-
26-
/*
27-
* The HARDWALL_CREATE() ioctl is a macro with a "size" argument.
28-
* The resulting ioctl value is passed to the kernel in conjunction
29-
* with a pointer to a standard kernel bitmask of cpus.
30-
* For network resources (UDN or IDN) the bitmask must physically
31-
* represent a rectangular configuration on the chip.
32-
* The "size" is the number of bytes of cpu mask data.
33-
*/
34-
#define _HARDWALL_CREATE 1
35-
#define HARDWALL_CREATE(size) \
36-
_IOC(_IOC_READ, HARDWALL_IOCTL_BASE, _HARDWALL_CREATE, (size))
37-
38-
#define _HARDWALL_ACTIVATE 2
39-
#define HARDWALL_ACTIVATE \
40-
_IO(HARDWALL_IOCTL_BASE, _HARDWALL_ACTIVATE)
41-
42-
#define _HARDWALL_DEACTIVATE 3
43-
#define HARDWALL_DEACTIVATE \
44-
_IO(HARDWALL_IOCTL_BASE, _HARDWALL_DEACTIVATE)
45-
46-
#define _HARDWALL_GET_ID 4
47-
#define HARDWALL_GET_ID \
48-
_IO(HARDWALL_IOCTL_BASE, _HARDWALL_GET_ID)
20+
#include <uapi/asm/hardwall.h>
4921

50-
#ifdef __KERNEL__
5122
/* /proc hooks for hardwall. */
5223
struct proc_dir_entry;
5324
#ifdef CONFIG_HARDWALL
@@ -56,6 +27,4 @@ int proc_pid_hardwall(struct task_struct *task, char *buffer);
5627
#else
5728
static inline void proc_tile_hardwall_init(struct proc_dir_entry *root) {}
5829
#endif
59-
#endif
60-
6130
#endif /* _ASM_TILE_HARDWALL_H */

arch/tile/include/asm/ptrace.h

Lines changed: 2 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -11,87 +11,21 @@
1111
* NON INFRINGEMENT. See the GNU General Public License for
1212
* more details.
1313
*/
14-
1514
#ifndef _ASM_TILE_PTRACE_H
1615
#define _ASM_TILE_PTRACE_H
1716

18-
#include <arch/chip.h>
19-
#include <arch/abi.h>
20-
21-
/* These must match struct pt_regs, below. */
22-
#if CHIP_WORD_SIZE() == 32
23-
#define PTREGS_OFFSET_REG(n) ((n)*4)
24-
#else
25-
#define PTREGS_OFFSET_REG(n) ((n)*8)
26-
#endif
27-
#define PTREGS_OFFSET_BASE 0
28-
#define PTREGS_OFFSET_TP PTREGS_OFFSET_REG(53)
29-
#define PTREGS_OFFSET_SP PTREGS_OFFSET_REG(54)
30-
#define PTREGS_OFFSET_LR PTREGS_OFFSET_REG(55)
31-
#define PTREGS_NR_GPRS 56
32-
#define PTREGS_OFFSET_PC PTREGS_OFFSET_REG(56)
33-
#define PTREGS_OFFSET_EX1 PTREGS_OFFSET_REG(57)
34-
#define PTREGS_OFFSET_FAULTNUM PTREGS_OFFSET_REG(58)
35-
#define PTREGS_OFFSET_ORIG_R0 PTREGS_OFFSET_REG(59)
36-
#define PTREGS_OFFSET_FLAGS PTREGS_OFFSET_REG(60)
37-
#if CHIP_HAS_CMPEXCH()
38-
#define PTREGS_OFFSET_CMPEXCH PTREGS_OFFSET_REG(61)
39-
#endif
40-
#define PTREGS_SIZE PTREGS_OFFSET_REG(64)
17+
#include <linux/compiler.h>
4118

4219
#ifndef __ASSEMBLY__
43-
44-
#ifdef __KERNEL__
4520
/* Benefit from consistent use of "long" on all chips. */
4621
typedef unsigned long pt_reg_t;
47-
#else
48-
/* Provide appropriate length type to userspace regardless of -m32/-m64. */
49-
typedef uint_reg_t pt_reg_t;
50-
#endif
51-
52-
/*
53-
* This struct defines the way the registers are stored on the stack during a
54-
* system call or exception. "struct sigcontext" has the same shape.
55-
*/
56-
struct pt_regs {
57-
/* Saved main processor registers; 56..63 are special. */
58-
/* tp, sp, and lr must immediately follow regs[] for aliasing. */
59-
pt_reg_t regs[53];
60-
pt_reg_t tp; /* aliases regs[TREG_TP] */
61-
pt_reg_t sp; /* aliases regs[TREG_SP] */
62-
pt_reg_t lr; /* aliases regs[TREG_LR] */
63-
64-
/* Saved special registers. */
65-
pt_reg_t pc; /* stored in EX_CONTEXT_K_0 */
66-
pt_reg_t ex1; /* stored in EX_CONTEXT_K_1 (PL and ICS bit) */
67-
pt_reg_t faultnum; /* fault number (INT_SWINT_1 for syscall) */
68-
pt_reg_t orig_r0; /* r0 at syscall entry, else zero */
69-
pt_reg_t flags; /* flags (see below) */
70-
#if !CHIP_HAS_CMPEXCH()
71-
pt_reg_t pad[3];
72-
#else
73-
pt_reg_t cmpexch; /* value of CMPEXCH_VALUE SPR at interrupt */
74-
pt_reg_t pad[2];
7522
#endif
76-
};
77-
78-
#endif /* __ASSEMBLY__ */
7923

80-
#define PTRACE_GETREGS 12
81-
#define PTRACE_SETREGS 13
82-
#define PTRACE_GETFPREGS 14
83-
#define PTRACE_SETFPREGS 15
24+
#include <uapi/asm/ptrace.h>
8425

85-
/* Support TILE-specific ptrace options, with events starting at 16. */
86-
#define PTRACE_O_TRACEMIGRATE 0x00010000
87-
#define PTRACE_EVENT_MIGRATE 16
88-
#ifdef __KERNEL__
8926
#define PTRACE_O_MASK_TILE (PTRACE_O_TRACEMIGRATE)
9027
#define PT_TRACE_MIGRATE 0x00080000
9128
#define PT_TRACE_MASK_TILE (PT_TRACE_MIGRATE)
92-
#endif
93-
94-
#ifdef __KERNEL__
9529

9630
/* Flag bits in pt_regs.flags */
9731
#define PT_FLAGS_DISABLE_IRQ 1 /* on return to kernel, disable irqs */
@@ -159,6 +93,4 @@ extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
15993
#define SINGLESTEP_STATE_TARGET_LB 2
16094
#define SINGLESTEP_STATE_TARGET_UB 7
16195

162-
#endif /* !__KERNEL__ */
163-
16496
#endif /* _ASM_TILE_PTRACE_H */

arch/tile/include/asm/setup.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@
1111
* NON INFRINGEMENT. See the GNU General Public License for
1212
* more details.
1313
*/
14-
1514
#ifndef _ASM_TILE_SETUP_H
1615
#define _ASM_TILE_SETUP_H
1716

18-
#define COMMAND_LINE_SIZE 2048
19-
20-
#ifdef __KERNEL__
2117

2218
#include <linux/pfn.h>
2319
#include <linux/init.h>
20+
#include <uapi/asm/setup.h>
2421

2522
/*
2623
* Reserved space for vmalloc and iomap - defined in asm/page.h
@@ -53,6 +50,4 @@ int hardwall_ipi_valid(int cpu);
5350
} while (0)
5451
#endif
5552

56-
#endif /* __KERNEL__ */
57-
5853
#endif /* _ASM_TILE_SETUP_H */

arch/tile/include/asm/signal.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,11 @@
1111
* NON INFRINGEMENT. See the GNU General Public License for
1212
* more details.
1313
*/
14-
1514
#ifndef _ASM_TILE_SIGNAL_H
1615
#define _ASM_TILE_SIGNAL_H
1716

18-
/* Do not notify a ptracer when this signal is handled. */
19-
#define SA_NOPTRACE 0x02000000u
20-
21-
/* Used in earlier Tilera releases, so keeping for binary compatibility. */
22-
#define SA_RESTORER 0x04000000u
23-
24-
#include <asm-generic/signal.h>
17+
#include <uapi/asm/signal.h>
2518

26-
#if defined(__KERNEL__)
2719
#if !defined(__ASSEMBLY__)
2820
struct pt_regs;
2921
int restore_sigcontext(struct pt_regs *, struct sigcontext __user *);
@@ -34,6 +26,4 @@ void signal_fault(const char *type, struct pt_regs *,
3426
void trace_unhandled_signal(const char *type, struct pt_regs *regs,
3527
unsigned long address, int signo);
3628
#endif
37-
#endif
38-
3929
#endif /* _ASM_TILE_SIGNAL_H */

arch/tile/include/asm/unistd.h

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,9 @@
1111
* NON INFRINGEMENT. See the GNU General Public License for
1212
* more details.
1313
*/
14-
15-
#if !defined(__LP64__) || defined(__SYSCALL_COMPAT)
16-
/* Use the flavor of this syscall that matches the 32-bit API better. */
17-
#define __ARCH_WANT_SYNC_FILE_RANGE2
18-
#endif
19-
20-
/* Use the standard ABI for syscalls. */
21-
#include <asm-generic/unistd.h>
22-
23-
/* Additional Tilera-specific syscalls. */
24-
#define __NR_cacheflush (__NR_arch_specific_syscall + 1)
25-
__SYSCALL(__NR_cacheflush, sys_cacheflush)
26-
27-
#ifndef __tilegx__
28-
/* "Fast" syscalls provide atomic support for 32-bit chips. */
29-
#define __NR_FAST_cmpxchg -1
30-
#define __NR_FAST_atomic_update -2
31-
#define __NR_FAST_cmpxchg64 -3
32-
#define __NR_cmpxchg_badaddr (__NR_arch_specific_syscall + 0)
33-
__SYSCALL(__NR_cmpxchg_badaddr, sys_cmpxchg_badaddr)
34-
#endif
35-
36-
#ifdef __KERNEL__
3714
/* In compat mode, we use sys_llseek() for compat_sys_llseek(). */
3815
#ifdef CONFIG_COMPAT
3916
#define __ARCH_WANT_SYS_LLSEEK
4017
#endif
4118
#define __ARCH_WANT_SYS_NEWFSTATAT
42-
#endif
19+
#include <uapi/asm/unistd.h>

arch/tile/include/uapi/arch/Kbuild

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
11
# UAPI Header export list
2+
header-y += abi.h
3+
header-y += chip.h
4+
header-y += chip_tile64.h
5+
header-y += chip_tilegx.h
6+
header-y += chip_tilepro.h
7+
header-y += icache.h
8+
header-y += interrupts.h
9+
header-y += interrupts_32.h
10+
header-y += interrupts_64.h
11+
header-y += opcode.h
12+
header-y += opcode_tilegx.h
13+
header-y += opcode_tilepro.h
14+
header-y += sim.h
15+
header-y += sim_def.h
16+
header-y += spr_def.h
17+
header-y += spr_def_32.h
18+
header-y += spr_def_64.h
File renamed without changes.
File renamed without changes.
File renamed without changes.

arch/tile/include/uapi/arch/spr_def.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2010 Tilera Corporation. All Rights Reserved.
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU General Public License
6+
* as published by the Free Software Foundation, version 2.
7+
*
8+
* This program is distributed in the hope that it will be useful, but
9+
* WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11+
* NON INFRINGEMENT. See the GNU General Public License for
12+
* more details.
13+
*/
14+
15+
#ifndef _UAPI__ARCH_SPR_DEF_H__
16+
#define _UAPI__ARCH_SPR_DEF_H__
17+
18+
/* Include the proper base SPR definition file. */
19+
#ifdef __tilegx__
20+
#include <arch/spr_def_64.h>
21+
#else
22+
#include <arch/spr_def_32.h>
23+
#endif
24+
25+
26+
#endif /* _UAPI__ARCH_SPR_DEF_H__ */

arch/tile/include/arch/spr_def_32.h renamed to arch/tile/include/uapi/arch/spr_def_32.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
#ifndef __DOXYGEN__
1616

17-
#ifndef __ARCH_SPR_DEF_H__
18-
#define __ARCH_SPR_DEF_H__
17+
#ifndef __ARCH_SPR_DEF_32_H__
18+
#define __ARCH_SPR_DEF_32_H__
1919

2020
#define SPR_AUX_PERF_COUNT_0 0x6005
2121
#define SPR_AUX_PERF_COUNT_1 0x6006
@@ -252,6 +252,6 @@
252252
#define SPR_WATCH_MASK 0x420a
253253
#define SPR_WATCH_VAL 0x420b
254254

255-
#endif /* !defined(__ARCH_SPR_DEF_H__) */
255+
#endif /* !defined(__ARCH_SPR_DEF_32_H__) */
256256

257257
#endif /* !defined(__DOXYGEN__) */

arch/tile/include/arch/spr_def_64.h renamed to arch/tile/include/uapi/arch/spr_def_64.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
#ifndef __DOXYGEN__
1616

17-
#ifndef __ARCH_SPR_DEF_H__
18-
#define __ARCH_SPR_DEF_H__
17+
#ifndef __ARCH_SPR_DEF_64_H__
18+
#define __ARCH_SPR_DEF_64_H__
1919

2020
#define SPR_AUX_PERF_COUNT_0 0x2105
2121
#define SPR_AUX_PERF_COUNT_1 0x2106
@@ -211,6 +211,6 @@
211211
#define SPR_WATCH_MASK 0x200a
212212
#define SPR_WATCH_VAL 0x200b
213213

214-
#endif /* !defined(__ARCH_SPR_DEF_H__) */
214+
#endif /* !defined(__ARCH_SPR_DEF_64_H__) */
215215

216216
#endif /* !defined(__DOXYGEN__) */

arch/tile/include/uapi/asm/Kbuild

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
# UAPI Header export list
22
include include/uapi/asm-generic/Kbuild.asm
33

4+
header-y += auxvec.h
5+
header-y += bitsperlong.h
6+
header-y += byteorder.h
7+
header-y += cachectl.h
8+
header-y += hardwall.h
9+
header-y += kvm_para.h
10+
header-y += mman.h
11+
header-y += ptrace.h
12+
header-y += setup.h
13+
header-y += sigcontext.h
14+
header-y += siginfo.h
15+
header-y += signal.h
16+
header-y += stat.h
17+
header-y += swab.h
18+
header-y += unistd.h
File renamed without changes.

0 commit comments

Comments
 (0)