diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-09 21:10:34 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-09 21:10:34 -0400 |
| commit | 82abb273d838318424644d8f02825db0fbbd400a (patch) | |
| tree | e1ea8a92db4ba68f347249986ffe3a25ffbf8219 /arch/mips/include/uapi | |
| parent | 9b651cc2277b5e4883012ebab0fea2bcda4cbafa (diff) | |
| parent | f8647b506d7116a1a3accd8d618184096e85f50b (diff) | |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
- three fixes for 3.15 that didn't make it in time
- limited Octeon 3 support.
- paravirtualization support
- improvment to platform support for Netlogix SOCs.
- add support for powering down the Malta eval board in software
- add many instructions to the in-kernel microassembler.
- add support for the BPF JIT.
- minor cleanups of the BCM47xx code.
- large cleanup of math emu code resulting in significant code size
reduction, better readability of the code and more accurate
emulation.
- improvments to the MIPS CPS code.
- support C3 power status for the R4k count/compare clock device.
- improvments to the GIO support for older SGI workstations.
- increase number of supported CPUs to 256; this can be reached on
certain embedded multithreaded ccNUMA configurations.
- various small cleanups, updates and fixes
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (173 commits)
MIPS: IP22/IP28: Improve GIO support
MIPS: Octeon: Add twsi interrupt initialization for OCTEON 3XXX, 5XXX, 63XX
DEC: Document the R4k MB ASIC mini interrupt controller
DEC: Add self as the maintainer
MIPS: Add microMIPS MSA support.
MIPS: Replace calls to obsolete strict_strto call with kstrto* equivalents.
MIPS: Replace obsolete strict_strto call with kstrto
MIPS: BFP: Simplify code slightly.
MIPS: Call find_vma with the mmap_sem held
MIPS: Fix 'write_msa_##' inline macro.
MIPS: Fix MSA toolchain support detection.
mips: Update the email address of Geert Uytterhoeven
MIPS: Add minimal defconfig for mips_paravirt
MIPS: Enable build for new system 'paravirt'
MIPS: paravirt: Add pci controller for virtio
MIPS: Add code for new system 'paravirt'
MIPS: Add functions for hypervisor call
MIPS: OCTEON: Add OCTEON3 to __get_cpu_type
MIPS: Add function get_ebase_cpunum
MIPS: Add minimal support for OCTEON3 to c-r4k.c
...
Diffstat (limited to 'arch/mips/include/uapi')
| -rw-r--r-- | arch/mips/include/uapi/asm/Kbuild | 1 | ||||
| -rw-r--r-- | arch/mips/include/uapi/asm/bitfield.h | 29 | ||||
| -rw-r--r-- | arch/mips/include/uapi/asm/inst.h | 64 | ||||
| -rw-r--r-- | arch/mips/include/uapi/asm/kvm_para.h | 6 | ||||
| -rw-r--r-- | arch/mips/include/uapi/asm/types.h | 5 |
5 files changed, 74 insertions, 31 deletions
diff --git a/arch/mips/include/uapi/asm/Kbuild b/arch/mips/include/uapi/asm/Kbuild index be7196eacb88..96fe7395ed8d 100644 --- a/arch/mips/include/uapi/asm/Kbuild +++ b/arch/mips/include/uapi/asm/Kbuild | |||
| @@ -4,6 +4,7 @@ include include/uapi/asm-generic/Kbuild.asm | |||
| 4 | generic-y += auxvec.h | 4 | generic-y += auxvec.h |
| 5 | generic-y += ipcbuf.h | 5 | generic-y += ipcbuf.h |
| 6 | 6 | ||
| 7 | header-y += bitfield.h | ||
| 7 | header-y += bitsperlong.h | 8 | header-y += bitsperlong.h |
| 8 | header-y += break.h | 9 | header-y += break.h |
| 9 | header-y += byteorder.h | 10 | header-y += byteorder.h |
diff --git a/arch/mips/include/uapi/asm/bitfield.h b/arch/mips/include/uapi/asm/bitfield.h new file mode 100644 index 000000000000..ad9861359cea --- /dev/null +++ b/arch/mips/include/uapi/asm/bitfield.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | /* | ||
| 2 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 3 | * License. See the file "COPYING" in the main directory of this archive | ||
| 4 | * for more details. | ||
| 5 | * | ||
| 6 | * Copyright (C) 2014 by Ralf Baechle <ralf@linux-mips.org> | ||
| 7 | */ | ||
| 8 | #ifndef __UAPI_ASM_BITFIELD_H | ||
| 9 | #define __UAPI_ASM_BITFIELD_H | ||
| 10 | |||
| 11 | /* | ||
| 12 | * * Damn ... bitfields depend from byteorder :-( | ||
| 13 | * */ | ||
| 14 | #ifdef __MIPSEB__ | ||
| 15 | #define __BITFIELD_FIELD(field, more) \ | ||
| 16 | field; \ | ||
| 17 | more | ||
| 18 | |||
| 19 | #elif defined(__MIPSEL__) | ||
| 20 | |||
| 21 | #define __BITFIELD_FIELD(field, more) \ | ||
| 22 | more \ | ||
| 23 | field; | ||
| 24 | |||
| 25 | #else /* !defined (__MIPSEB__) && !defined (__MIPSEL__) */ | ||
| 26 | #error "MIPS but neither __MIPSEL__ nor __MIPSEB__?" | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #endif /* __UAPI_ASM_BITFIELD_H */ | ||
diff --git a/arch/mips/include/uapi/asm/inst.h b/arch/mips/include/uapi/asm/inst.h index 3125797f2a88..4b7160259292 100644 --- a/arch/mips/include/uapi/asm/inst.h +++ b/arch/mips/include/uapi/asm/inst.h | |||
| @@ -13,6 +13,8 @@ | |||
| 13 | #ifndef _UAPI_ASM_INST_H | 13 | #ifndef _UAPI_ASM_INST_H |
| 14 | #define _UAPI_ASM_INST_H | 14 | #define _UAPI_ASM_INST_H |
| 15 | 15 | ||
| 16 | #include <asm/bitfield.h> | ||
| 17 | |||
| 16 | /* | 18 | /* |
| 17 | * Major opcodes; before MIPS IV cop1x was called cop3. | 19 | * Major opcodes; before MIPS IV cop1x was called cop3. |
| 18 | */ | 20 | */ |
| @@ -74,16 +76,17 @@ enum spec2_op { | |||
| 74 | enum spec3_op { | 76 | enum spec3_op { |
| 75 | ext_op, dextm_op, dextu_op, dext_op, | 77 | ext_op, dextm_op, dextu_op, dext_op, |
| 76 | ins_op, dinsm_op, dinsu_op, dins_op, | 78 | ins_op, dinsm_op, dinsu_op, dins_op, |
| 77 | lx_op = 0x0a, lwle_op = 0x19, | 79 | yield_op = 0x09, lx_op = 0x0a, |
| 78 | lwre_op = 0x1a, cachee_op = 0x1b, | 80 | lwle_op = 0x19, lwre_op = 0x1a, |
| 79 | sbe_op = 0x1c, she_op = 0x1d, | 81 | cachee_op = 0x1b, sbe_op = 0x1c, |
| 80 | sce_op = 0x1e, swe_op = 0x1f, | 82 | she_op = 0x1d, sce_op = 0x1e, |
| 81 | bshfl_op = 0x20, swle_op = 0x21, | 83 | swe_op = 0x1f, bshfl_op = 0x20, |
| 82 | swre_op = 0x22, prefe_op = 0x23, | 84 | swle_op = 0x21, swre_op = 0x22, |
| 83 | dbshfl_op = 0x24, lbue_op = 0x28, | 85 | prefe_op = 0x23, dbshfl_op = 0x24, |
| 84 | lhue_op = 0x29, lbe_op = 0x2c, | 86 | lbue_op = 0x28, lhue_op = 0x29, |
| 85 | lhe_op = 0x2d, lle_op = 0x2e, | 87 | lbe_op = 0x2c, lhe_op = 0x2d, |
| 86 | lwe_op = 0x2f, rdhwr_op = 0x3b | 88 | lle_op = 0x2e, lwe_op = 0x2f, |
| 89 | rdhwr_op = 0x3b | ||
| 87 | }; | 90 | }; |
| 88 | 91 | ||
| 89 | /* | 92 | /* |
| @@ -125,7 +128,8 @@ enum bcop_op { | |||
| 125 | enum cop0_coi_func { | 128 | enum cop0_coi_func { |
| 126 | tlbr_op = 0x01, tlbwi_op = 0x02, | 129 | tlbr_op = 0x01, tlbwi_op = 0x02, |
| 127 | tlbwr_op = 0x06, tlbp_op = 0x08, | 130 | tlbwr_op = 0x06, tlbp_op = 0x08, |
| 128 | rfe_op = 0x10, eret_op = 0x18 | 131 | rfe_op = 0x10, eret_op = 0x18, |
| 132 | wait_op = 0x20, | ||
| 129 | }; | 133 | }; |
| 130 | 134 | ||
| 131 | /* | 135 | /* |
| @@ -202,6 +206,16 @@ enum lx_func { | |||
| 202 | }; | 206 | }; |
| 203 | 207 | ||
| 204 | /* | 208 | /* |
| 209 | * BSHFL opcodes | ||
| 210 | */ | ||
| 211 | enum bshfl_func { | ||
| 212 | wsbh_op = 0x2, | ||
| 213 | dshd_op = 0x5, | ||
| 214 | seb_op = 0x10, | ||
| 215 | seh_op = 0x18, | ||
| 216 | }; | ||
| 217 | |||
| 218 | /* | ||
| 205 | * (microMIPS) Major opcodes. | 219 | * (microMIPS) Major opcodes. |
| 206 | */ | 220 | */ |
| 207 | enum mm_major_op { | 221 | enum mm_major_op { |
| @@ -244,17 +258,22 @@ enum mm_32i_minor_op { | |||
| 244 | enum mm_32a_minor_op { | 258 | enum mm_32a_minor_op { |
| 245 | mm_sll32_op = 0x000, | 259 | mm_sll32_op = 0x000, |
| 246 | mm_ins_op = 0x00c, | 260 | mm_ins_op = 0x00c, |
| 261 | mm_sllv32_op = 0x010, | ||
| 247 | mm_ext_op = 0x02c, | 262 | mm_ext_op = 0x02c, |
| 248 | mm_pool32axf_op = 0x03c, | 263 | mm_pool32axf_op = 0x03c, |
| 249 | mm_srl32_op = 0x040, | 264 | mm_srl32_op = 0x040, |
| 250 | mm_sra_op = 0x080, | 265 | mm_sra_op = 0x080, |
| 266 | mm_srlv32_op = 0x090, | ||
| 251 | mm_rotr_op = 0x0c0, | 267 | mm_rotr_op = 0x0c0, |
| 252 | mm_lwxs_op = 0x118, | 268 | mm_lwxs_op = 0x118, |
| 253 | mm_addu32_op = 0x150, | 269 | mm_addu32_op = 0x150, |
| 254 | mm_subu32_op = 0x1d0, | 270 | mm_subu32_op = 0x1d0, |
| 271 | mm_wsbh_op = 0x1ec, | ||
| 272 | mm_mul_op = 0x210, | ||
| 255 | mm_and_op = 0x250, | 273 | mm_and_op = 0x250, |
| 256 | mm_or32_op = 0x290, | 274 | mm_or32_op = 0x290, |
| 257 | mm_xor32_op = 0x310, | 275 | mm_xor32_op = 0x310, |
| 276 | mm_sltu_op = 0x390, | ||
| 258 | }; | 277 | }; |
| 259 | 278 | ||
| 260 | /* | 279 | /* |
| @@ -294,15 +313,20 @@ enum mm_32axf_minor_op { | |||
| 294 | mm_mfc0_op = 0x003, | 313 | mm_mfc0_op = 0x003, |
| 295 | mm_mtc0_op = 0x00b, | 314 | mm_mtc0_op = 0x00b, |
| 296 | mm_tlbp_op = 0x00d, | 315 | mm_tlbp_op = 0x00d, |
| 316 | mm_mfhi32_op = 0x035, | ||
| 297 | mm_jalr_op = 0x03c, | 317 | mm_jalr_op = 0x03c, |
| 298 | mm_tlbr_op = 0x04d, | 318 | mm_tlbr_op = 0x04d, |
| 319 | mm_mflo32_op = 0x075, | ||
| 299 | mm_jalrhb_op = 0x07c, | 320 | mm_jalrhb_op = 0x07c, |
| 300 | mm_tlbwi_op = 0x08d, | 321 | mm_tlbwi_op = 0x08d, |
| 301 | mm_tlbwr_op = 0x0cd, | 322 | mm_tlbwr_op = 0x0cd, |
| 302 | mm_jalrs_op = 0x13c, | 323 | mm_jalrs_op = 0x13c, |
| 303 | mm_jalrshb_op = 0x17c, | 324 | mm_jalrshb_op = 0x17c, |
| 325 | mm_sync_op = 0x1ad, | ||
| 304 | mm_syscall_op = 0x22d, | 326 | mm_syscall_op = 0x22d, |
| 327 | mm_wait_op = 0x24d, | ||
| 305 | mm_eret_op = 0x3cd, | 328 | mm_eret_op = 0x3cd, |
| 329 | mm_divu_op = 0x5dc, | ||
| 306 | }; | 330 | }; |
| 307 | 331 | ||
| 308 | /* | 332 | /* |
| @@ -480,24 +504,6 @@ enum MIPS6e_i8_func { | |||
| 480 | */ | 504 | */ |
| 481 | #define MM_NOP16 0x0c00 | 505 | #define MM_NOP16 0x0c00 |
| 482 | 506 | ||
| 483 | /* | ||
| 484 | * Damn ... bitfields depend from byteorder :-( | ||
| 485 | */ | ||
| 486 | #ifdef __MIPSEB__ | ||
| 487 | #define __BITFIELD_FIELD(field, more) \ | ||
| 488 | field; \ | ||
| 489 | more | ||
| 490 | |||
| 491 | #elif defined(__MIPSEL__) | ||
| 492 | |||
| 493 | #define __BITFIELD_FIELD(field, more) \ | ||
| 494 | more \ | ||
| 495 | field; | ||
| 496 | |||
| 497 | #else /* !defined (__MIPSEB__) && !defined (__MIPSEL__) */ | ||
| 498 | #error "MIPS but neither __MIPSEL__ nor __MIPSEB__?" | ||
| 499 | #endif | ||
| 500 | |||
| 501 | struct j_format { | 507 | struct j_format { |
| 502 | __BITFIELD_FIELD(unsigned int opcode : 6, /* Jump format */ | 508 | __BITFIELD_FIELD(unsigned int opcode : 6, /* Jump format */ |
| 503 | __BITFIELD_FIELD(unsigned int target : 26, | 509 | __BITFIELD_FIELD(unsigned int target : 26, |
diff --git a/arch/mips/include/uapi/asm/kvm_para.h b/arch/mips/include/uapi/asm/kvm_para.h index 14fab8f0b957..7e16d7c42e65 100644 --- a/arch/mips/include/uapi/asm/kvm_para.h +++ b/arch/mips/include/uapi/asm/kvm_para.h | |||
| @@ -1 +1,5 @@ | |||
| 1 | #include <asm-generic/kvm_para.h> | 1 | #ifndef _UAPI_ASM_MIPS_KVM_PARA_H |
| 2 | #define _UAPI_ASM_MIPS_KVM_PARA_H | ||
| 3 | |||
| 4 | |||
| 5 | #endif /* _UAPI_ASM_MIPS_KVM_PARA_H */ | ||
diff --git a/arch/mips/include/uapi/asm/types.h b/arch/mips/include/uapi/asm/types.h index 7ac9d0baad84..f3dd9ff0cc0c 100644 --- a/arch/mips/include/uapi/asm/types.h +++ b/arch/mips/include/uapi/asm/types.h | |||
| @@ -14,9 +14,12 @@ | |||
| 14 | /* | 14 | /* |
| 15 | * We don't use int-l64.h for the kernel anymore but still use it for | 15 | * We don't use int-l64.h for the kernel anymore but still use it for |
| 16 | * userspace to avoid code changes. | 16 | * userspace to avoid code changes. |
| 17 | * | ||
| 18 | * However, some user programs (e.g. perf) may not want this. They can | ||
| 19 | * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here. | ||
| 17 | */ | 20 | */ |
| 18 | #ifndef __KERNEL__ | 21 | #ifndef __KERNEL__ |
| 19 | # if _MIPS_SZLONG == 64 | 22 | # if _MIPS_SZLONG == 64 && !defined(__SANE_USERSPACE_TYPES__) |
| 20 | # include <asm-generic/int-l64.h> | 23 | # include <asm-generic/int-l64.h> |
| 21 | # else | 24 | # else |
| 22 | # include <asm-generic/int-ll64.h> | 25 | # include <asm-generic/int-ll64.h> |
