1ac4c244dSVineet Gupta /* 2ac4c244dSVineet Gupta * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) 3ac4c244dSVineet Gupta * 4ac4c244dSVineet Gupta * This program is free software; you can redistribute it and/or modify 5ac4c244dSVineet Gupta * it under the terms of the GNU General Public License version 2 as 6ac4c244dSVineet Gupta * published by the Free Software Foundation. 7ac4c244dSVineet Gupta */ 8ac4c244dSVineet Gupta 9ac4c244dSVineet Gupta #ifndef _ASM_ARC_ARCREGS_H 10ac4c244dSVineet Gupta #define _ASM_ARC_ARCREGS_H 11ac4c244dSVineet Gupta 12bacdf480SVineet Gupta /* Build Configuration Registers */ 13af617428SVineet Gupta #define ARC_REG_DCCMBASE_BCR 0x61 /* DCCM Base Addr */ 14af617428SVineet Gupta #define ARC_REG_CRC_BCR 0x62 15bacdf480SVineet Gupta #define ARC_REG_VECBASE_BCR 0x68 16af617428SVineet Gupta #define ARC_REG_PERIBASE_BCR 0x69 1756372082SVineet Gupta #define ARC_REG_FP_BCR 0x6B /* ARCompact: Single-Precision FPU */ 1856372082SVineet Gupta #define ARC_REG_DPFP_BCR 0x6C /* ARCompact: Dbl Precision FPU */ 191f6ccfffSVineet Gupta #define ARC_REG_FP_V2_BCR 0xc8 /* ARCv2 FPU */ 20d1f317d8SVineet Gupta #define ARC_REG_SLC_BCR 0xce 21af617428SVineet Gupta #define ARC_REG_DCCM_BCR 0x74 /* DCCM Present + SZ */ 22af617428SVineet Gupta #define ARC_REG_TIMERS_BCR 0x75 2356372082SVineet Gupta #define ARC_REG_AP_BCR 0x76 24af617428SVineet Gupta #define ARC_REG_ICCM_BCR 0x78 25af617428SVineet Gupta #define ARC_REG_XY_MEM_BCR 0x79 26af617428SVineet Gupta #define ARC_REG_MAC_BCR 0x7a 27af617428SVineet Gupta #define ARC_REG_MUL_BCR 0x7b 28af617428SVineet Gupta #define ARC_REG_SWAP_BCR 0x7c 29af617428SVineet Gupta #define ARC_REG_NORM_BCR 0x7d 30af617428SVineet Gupta #define ARC_REG_MIXMAX_BCR 0x7e 31af617428SVineet Gupta #define ARC_REG_BARREL_BCR 0x7f 32af617428SVineet Gupta #define ARC_REG_D_UNCACH_BCR 0x6A 3356372082SVineet Gupta #define ARC_REG_BPU_BCR 0xc0 3456372082SVineet Gupta #define ARC_REG_ISA_CFG_BCR 0xc1 35a44ec8bdSVineet Gupta #define ARC_REG_RTT_BCR 0xF2 36820970a5SVineet Gupta #define ARC_REG_IRQ_BCR 0xF3 3756372082SVineet Gupta #define ARC_REG_SMART_BCR 0xFF 38bacdf480SVineet Gupta 39ac4c244dSVineet Gupta /* status32 Bits Positions */ 40ac4c244dSVineet Gupta #define STATUS_AE_BIT 5 /* Exception active */ 41ac4c244dSVineet Gupta #define STATUS_DE_BIT 6 /* PC is in delay slot */ 42ac4c244dSVineet Gupta #define STATUS_U_BIT 7 /* User/Kernel mode */ 43ac4c244dSVineet Gupta #define STATUS_L_BIT 12 /* Loop inhibit */ 44ac4c244dSVineet Gupta 45ac4c244dSVineet Gupta /* These masks correspond to the status word(STATUS_32) bits */ 46ac4c244dSVineet Gupta #define STATUS_AE_MASK (1<<STATUS_AE_BIT) 47ac4c244dSVineet Gupta #define STATUS_DE_MASK (1<<STATUS_DE_BIT) 48ac4c244dSVineet Gupta #define STATUS_U_MASK (1<<STATUS_U_BIT) 49ac4c244dSVineet Gupta #define STATUS_L_MASK (1<<STATUS_L_BIT) 50ac4c244dSVineet Gupta 51cc562d2eSVineet Gupta /* 52cc562d2eSVineet Gupta * ECR: Exception Cause Reg bits-n-pieces 53cc562d2eSVineet Gupta * [23:16] = Exception Vector 54cc562d2eSVineet Gupta * [15: 8] = Exception Cause Code 55cc562d2eSVineet Gupta * [ 7: 0] = Exception Parameters (for certain types only) 56cc562d2eSVineet Gupta */ 571f6ccfffSVineet Gupta #ifdef CONFIG_ISA_ARCOMPACT 58dc9e234fSVineet Gupta #define ECR_V_MEM_ERR 0x01 59cc562d2eSVineet Gupta #define ECR_V_INSN_ERR 0x02 60cc562d2eSVineet Gupta #define ECR_V_MACH_CHK 0x20 61cc562d2eSVineet Gupta #define ECR_V_ITLB_MISS 0x21 62cc562d2eSVineet Gupta #define ECR_V_DTLB_MISS 0x22 63cc562d2eSVineet Gupta #define ECR_V_PROTV 0x23 64502a0c77SVineet Gupta #define ECR_V_TRAP 0x25 651f6ccfffSVineet Gupta #else 661f6ccfffSVineet Gupta #define ECR_V_MEM_ERR 0x01 671f6ccfffSVineet Gupta #define ECR_V_INSN_ERR 0x02 681f6ccfffSVineet Gupta #define ECR_V_MACH_CHK 0x03 691f6ccfffSVineet Gupta #define ECR_V_ITLB_MISS 0x04 701f6ccfffSVineet Gupta #define ECR_V_DTLB_MISS 0x05 711f6ccfffSVineet Gupta #define ECR_V_PROTV 0x06 721f6ccfffSVineet Gupta #define ECR_V_TRAP 0x09 731f6ccfffSVineet Gupta #endif 74cc562d2eSVineet Gupta 75dc9e234fSVineet Gupta /* DTLB Miss and Protection Violation Cause Codes */ 76dc9e234fSVineet Gupta 77cc562d2eSVineet Gupta #define ECR_C_PROTV_INST_FETCH 0x00 78cc562d2eSVineet Gupta #define ECR_C_PROTV_LOAD 0x01 79cc562d2eSVineet Gupta #define ECR_C_PROTV_STORE 0x02 80cc562d2eSVineet Gupta #define ECR_C_PROTV_XCHG 0x03 81cc562d2eSVineet Gupta #define ECR_C_PROTV_MISALIG_DATA 0x04 82cc562d2eSVineet Gupta 831898a959SVineet Gupta #define ECR_C_BIT_PROTV_MISALIG_DATA 10 841898a959SVineet Gupta 851898a959SVineet Gupta /* Machine Check Cause Code Values */ 861898a959SVineet Gupta #define ECR_C_MCHK_DUP_TLB 0x01 871898a959SVineet Gupta 88cc562d2eSVineet Gupta /* DTLB Miss Exception Cause Code Values */ 89cc562d2eSVineet Gupta #define ECR_C_BIT_DTLB_LD_MISS 8 90cc562d2eSVineet Gupta #define ECR_C_BIT_DTLB_ST_MISS 9 91cc562d2eSVineet Gupta 92ac4c244dSVineet Gupta /* Auxiliary registers */ 93ac4c244dSVineet Gupta #define AUX_IDENTITY 4 94ac4c244dSVineet Gupta #define AUX_INTR_VEC_BASE 0x25 95e13c42ecSVineet Gupta #define AUX_NON_VOL 0x5e 96f1f3347dSVineet Gupta 97bf90e1eaSVineet Gupta /* 98bf90e1eaSVineet Gupta * Floating Pt Registers 99bf90e1eaSVineet Gupta * Status regs are read-only (build-time) so need not be saved/restored 100bf90e1eaSVineet Gupta */ 101bf90e1eaSVineet Gupta #define ARC_AUX_FP_STAT 0x300 102bf90e1eaSVineet Gupta #define ARC_AUX_DPFP_1L 0x301 103bf90e1eaSVineet Gupta #define ARC_AUX_DPFP_1H 0x302 104bf90e1eaSVineet Gupta #define ARC_AUX_DPFP_2L 0x303 105bf90e1eaSVineet Gupta #define ARC_AUX_DPFP_2H 0x304 106bf90e1eaSVineet Gupta #define ARC_AUX_DPFP_STAT 0x305 107bf90e1eaSVineet Gupta 108ac4c244dSVineet Gupta #ifndef __ASSEMBLY__ 109ac4c244dSVineet Gupta 110ac4c244dSVineet Gupta /* 111ac4c244dSVineet Gupta ****************************************************************** 112ac4c244dSVineet Gupta * Inline ASM macros to read/write AUX Regs 113ac4c244dSVineet Gupta * Essentially invocation of lr/sr insns from "C" 114ac4c244dSVineet Gupta */ 115ac4c244dSVineet Gupta 116ac4c244dSVineet Gupta #if 1 117ac4c244dSVineet Gupta 118ac4c244dSVineet Gupta #define read_aux_reg(reg) __builtin_arc_lr(reg) 119ac4c244dSVineet Gupta 120ac4c244dSVineet Gupta /* gcc builtin sr needs reg param to be long immediate */ 121ac4c244dSVineet Gupta #define write_aux_reg(reg_immed, val) \ 122ac4c244dSVineet Gupta __builtin_arc_sr((unsigned int)val, reg_immed) 123ac4c244dSVineet Gupta 124ac4c244dSVineet Gupta #else 125ac4c244dSVineet Gupta 126ac4c244dSVineet Gupta #define read_aux_reg(reg) \ 127ac4c244dSVineet Gupta ({ \ 128ac4c244dSVineet Gupta unsigned int __ret; \ 129ac4c244dSVineet Gupta __asm__ __volatile__( \ 130ac4c244dSVineet Gupta " lr %0, [%1]" \ 131ac4c244dSVineet Gupta : "=r"(__ret) \ 132ac4c244dSVineet Gupta : "i"(reg)); \ 133ac4c244dSVineet Gupta __ret; \ 134ac4c244dSVineet Gupta }) 135ac4c244dSVineet Gupta 136ac4c244dSVineet Gupta /* 137ac4c244dSVineet Gupta * Aux Reg address is specified as long immediate by caller 138ac4c244dSVineet Gupta * e.g. 139ac4c244dSVineet Gupta * write_aux_reg(0x69, some_val); 140ac4c244dSVineet Gupta * This generates tightest code. 141ac4c244dSVineet Gupta */ 142ac4c244dSVineet Gupta #define write_aux_reg(reg_imm, val) \ 143ac4c244dSVineet Gupta ({ \ 144ac4c244dSVineet Gupta __asm__ __volatile__( \ 145ac4c244dSVineet Gupta " sr %0, [%1] \n" \ 146ac4c244dSVineet Gupta : \ 147ac4c244dSVineet Gupta : "ir"(val), "i"(reg_imm)); \ 148ac4c244dSVineet Gupta }) 149ac4c244dSVineet Gupta 150ac4c244dSVineet Gupta /* 151ac4c244dSVineet Gupta * Aux Reg address is specified in a variable 152ac4c244dSVineet Gupta * * e.g. 153ac4c244dSVineet Gupta * reg_num = 0x69 154ac4c244dSVineet Gupta * write_aux_reg2(reg_num, some_val); 155ac4c244dSVineet Gupta * This has to generate glue code to load the reg num from 156ac4c244dSVineet Gupta * memory to a reg hence not recommended. 157ac4c244dSVineet Gupta */ 158ac4c244dSVineet Gupta #define write_aux_reg2(reg_in_var, val) \ 159ac4c244dSVineet Gupta ({ \ 160ac4c244dSVineet Gupta unsigned int tmp; \ 161ac4c244dSVineet Gupta \ 162ac4c244dSVineet Gupta __asm__ __volatile__( \ 163ac4c244dSVineet Gupta " ld %0, [%2] \n\t" \ 164ac4c244dSVineet Gupta " sr %1, [%0] \n\t" \ 165ac4c244dSVineet Gupta : "=&r"(tmp) \ 166ac4c244dSVineet Gupta : "r"(val), "memory"(®_in_var)); \ 167ac4c244dSVineet Gupta }) 168ac4c244dSVineet Gupta 169ac4c244dSVineet Gupta #endif 170ac4c244dSVineet Gupta 17195d6976dSVineet Gupta #define READ_BCR(reg, into) \ 17295d6976dSVineet Gupta { \ 17395d6976dSVineet Gupta unsigned int tmp; \ 17495d6976dSVineet Gupta tmp = read_aux_reg(reg); \ 17595d6976dSVineet Gupta if (sizeof(tmp) == sizeof(into)) { \ 17695d6976dSVineet Gupta into = *((typeof(into) *)&tmp); \ 17795d6976dSVineet Gupta } else { \ 17895d6976dSVineet Gupta extern void bogus_undefined(void); \ 17995d6976dSVineet Gupta bogus_undefined(); \ 18095d6976dSVineet Gupta } \ 18195d6976dSVineet Gupta } 18295d6976dSVineet Gupta 1831425d5e7SVineet Gupta #define WRITE_AUX(reg, into) \ 18495d6976dSVineet Gupta { \ 18595d6976dSVineet Gupta unsigned int tmp; \ 18695d6976dSVineet Gupta if (sizeof(tmp) == sizeof(into)) { \ 1871425d5e7SVineet Gupta tmp = (*(unsigned int *)&(into)); \ 18895d6976dSVineet Gupta write_aux_reg(reg, tmp); \ 18995d6976dSVineet Gupta } else { \ 19095d6976dSVineet Gupta extern void bogus_undefined(void); \ 19195d6976dSVineet Gupta bogus_undefined(); \ 19295d6976dSVineet Gupta } \ 19395d6976dSVineet Gupta } 19495d6976dSVineet Gupta 195c121c506SVineet Gupta /* Helpers */ 196c121c506SVineet Gupta #define TO_KB(bytes) ((bytes) >> 10) 197c121c506SVineet Gupta #define TO_MB(bytes) (TO_KB(bytes) >> 10) 198c121c506SVineet Gupta #define PAGES_TO_KB(n_pages) ((n_pages) << (PAGE_SHIFT - 10)) 199c121c506SVineet Gupta #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10) 20095d6976dSVineet Gupta 201bf90e1eaSVineet Gupta 20295d6976dSVineet Gupta /* 20395d6976dSVineet Gupta *************************************************************** 20495d6976dSVineet Gupta * Build Configuration Registers, with encoded hardware config 20595d6976dSVineet Gupta */ 206af617428SVineet Gupta struct bcr_identity { 207af617428SVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 208af617428SVineet Gupta unsigned int chip_id:16, cpu_id:8, family:8; 209af617428SVineet Gupta #else 210af617428SVineet Gupta unsigned int family:8, cpu_id:8, chip_id:16; 211af617428SVineet Gupta #endif 212af617428SVineet Gupta }; 21395d6976dSVineet Gupta 21456372082SVineet Gupta struct bcr_isa { 215af617428SVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 2161f6ccfffSVineet Gupta unsigned int div_rem:4, pad2:4, ldd:1, unalign:1, atomic:1, be:1, 2171f6ccfffSVineet Gupta pad1:11, atomic1:1, ver:8; 218af617428SVineet Gupta #else 2191f6ccfffSVineet Gupta unsigned int ver:8, atomic1:1, pad1:11, be:1, atomic:1, unalign:1, 2201f6ccfffSVineet Gupta ldd:1, pad2:4, div_rem:4; 221af617428SVineet Gupta #endif 222af617428SVineet Gupta }; 223af617428SVineet Gupta 22456372082SVineet Gupta struct bcr_mpy { 225af617428SVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 22656372082SVineet Gupta unsigned int pad:8, x1616:8, dsp:4, cycles:2, type:2, ver:8; 227af617428SVineet Gupta #else 22856372082SVineet Gupta unsigned int ver:8, type:2, cycles:2, dsp:4, x1616:8, pad:8; 229af617428SVineet Gupta #endif 230af617428SVineet Gupta }; 231af617428SVineet Gupta 232af617428SVineet Gupta struct bcr_extn_xymem { 233af617428SVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 234af617428SVineet Gupta unsigned int ram_org:2, num_banks:4, bank_sz:4, ver:8; 235af617428SVineet Gupta #else 236af617428SVineet Gupta unsigned int ver:8, bank_sz:4, num_banks:4, ram_org:2; 237af617428SVineet Gupta #endif 238af617428SVineet Gupta }; 239af617428SVineet Gupta 240af617428SVineet Gupta struct bcr_perip { 241af617428SVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 242e13c42ecSVineet Gupta unsigned int start:8, pad2:8, sz:8, ver:8; 243af617428SVineet Gupta #else 244e13c42ecSVineet Gupta unsigned int ver:8, sz:8, pad2:8, start:8; 245af617428SVineet Gupta #endif 246af617428SVineet Gupta }; 24756372082SVineet Gupta 248af617428SVineet Gupta struct bcr_iccm { 249af617428SVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 250af617428SVineet Gupta unsigned int base:16, pad:5, sz:3, ver:8; 251af617428SVineet Gupta #else 252af617428SVineet Gupta unsigned int ver:8, sz:3, pad:5, base:16; 253af617428SVineet Gupta #endif 254af617428SVineet Gupta }; 255af617428SVineet Gupta 256af617428SVineet Gupta /* DCCM Base Address Register: ARC_REG_DCCMBASE_BCR */ 257af617428SVineet Gupta struct bcr_dccm_base { 258af617428SVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 259af617428SVineet Gupta unsigned int addr:24, ver:8; 260af617428SVineet Gupta #else 261af617428SVineet Gupta unsigned int ver:8, addr:24; 262af617428SVineet Gupta #endif 263af617428SVineet Gupta }; 264af617428SVineet Gupta 265af617428SVineet Gupta /* DCCM RAM Configuration Register: ARC_REG_DCCM_BCR */ 266af617428SVineet Gupta struct bcr_dccm { 267af617428SVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 268af617428SVineet Gupta unsigned int res:21, sz:3, ver:8; 269af617428SVineet Gupta #else 270af617428SVineet Gupta unsigned int ver:8, sz:3, res:21; 271af617428SVineet Gupta #endif 272af617428SVineet Gupta }; 273af617428SVineet Gupta 27456372082SVineet Gupta /* ARCompact: Both SP and DP FPU BCRs have same format */ 27556372082SVineet Gupta struct bcr_fp_arcompact { 276af617428SVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 277af617428SVineet Gupta unsigned int fast:1, ver:8; 278af617428SVineet Gupta #else 279af617428SVineet Gupta unsigned int ver:8, fast:1; 280af617428SVineet Gupta #endif 281af617428SVineet Gupta }; 282af617428SVineet Gupta 2831f6ccfffSVineet Gupta struct bcr_fp_arcv2 { 2841f6ccfffSVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 2851f6ccfffSVineet Gupta unsigned int pad2:15, dp:1, pad1:7, sp:1, ver:8; 2861f6ccfffSVineet Gupta #else 2871f6ccfffSVineet Gupta unsigned int ver:8, sp:1, pad1:7, dp:1, pad2:15; 2881f6ccfffSVineet Gupta #endif 2891f6ccfffSVineet Gupta }; 2901f6ccfffSVineet Gupta 29156372082SVineet Gupta struct bcr_timer { 29256372082SVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 2931f6ccfffSVineet Gupta unsigned int pad2:15, rtsc:1, pad1:5, rtc:1, t1:1, t0:1, ver:8; 29456372082SVineet Gupta #else 2951f6ccfffSVineet Gupta unsigned int ver:8, t0:1, t1:1, rtc:1, pad1:5, rtsc:1, pad2:15; 29656372082SVineet Gupta #endif 29756372082SVineet Gupta }; 29856372082SVineet Gupta 29956372082SVineet Gupta struct bcr_bpu_arcompact { 30056372082SVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 30156372082SVineet Gupta unsigned int pad2:19, fam:1, pad:2, ent:2, ver:8; 30256372082SVineet Gupta #else 30356372082SVineet Gupta unsigned int ver:8, ent:2, pad:2, fam:1, pad2:19; 30456372082SVineet Gupta #endif 30556372082SVineet Gupta }; 30656372082SVineet Gupta 3071f6ccfffSVineet Gupta struct bcr_bpu_arcv2 { 3081f6ccfffSVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 3091f6ccfffSVineet Gupta unsigned int pad:6, fbe:2, tqe:2, ts:4, ft:1, rse:2, pte:3, bce:3, ver:8; 3101f6ccfffSVineet Gupta #else 3111f6ccfffSVineet Gupta unsigned int ver:8, bce:3, pte:3, rse:2, ft:1, ts:4, tqe:2, fbe:2, pad:6; 3121f6ccfffSVineet Gupta #endif 3131f6ccfffSVineet Gupta }; 3141f6ccfffSVineet Gupta 31556372082SVineet Gupta struct bcr_generic { 31656372082SVineet Gupta #ifdef CONFIG_CPU_BIG_ENDIAN 31756372082SVineet Gupta unsigned int pad:24, ver:8; 31856372082SVineet Gupta #else 31956372082SVineet Gupta unsigned int ver:8, pad:24; 32056372082SVineet Gupta #endif 32156372082SVineet Gupta }; 32256372082SVineet Gupta 32395d6976dSVineet Gupta /* 32495d6976dSVineet Gupta ******************************************************************* 32595d6976dSVineet Gupta * Generic structures to hold build configuration used at runtime 32695d6976dSVineet Gupta */ 32795d6976dSVineet Gupta 328cc562d2eSVineet Gupta struct cpuinfo_arc_mmu { 329d7a512bfSVineet Gupta unsigned int ver:4, pg_sz_k:8, s_pg_sz_m:8, u_dtlb:6, u_itlb:6; 33040b552d9SVineet Gupta unsigned int num_tlb:16, sets:12, ways:4; 331cc562d2eSVineet Gupta }; 332cc562d2eSVineet Gupta 33395d6976dSVineet Gupta struct cpuinfo_arc_cache { 334d1f317d8SVineet Gupta unsigned int sz_k:14, line_len:8, assoc:4, ver:4, alias:1, vipt:1; 33595d6976dSVineet Gupta }; 33695d6976dSVineet Gupta 33756372082SVineet Gupta struct cpuinfo_arc_bpu { 33856372082SVineet Gupta unsigned int ver, full, num_cache, num_pred; 33956372082SVineet Gupta }; 34056372082SVineet Gupta 341af617428SVineet Gupta struct cpuinfo_arc_ccm { 342af617428SVineet Gupta unsigned int base_addr, sz; 343af617428SVineet Gupta }; 344af617428SVineet Gupta 34595d6976dSVineet Gupta struct cpuinfo_arc { 346d1f317d8SVineet Gupta struct cpuinfo_arc_cache icache, dcache, slc; 347cc562d2eSVineet Gupta struct cpuinfo_arc_mmu mmu; 34856372082SVineet Gupta struct cpuinfo_arc_bpu bpu; 349af617428SVineet Gupta struct bcr_identity core; 35056372082SVineet Gupta struct bcr_isa isa; 35156372082SVineet Gupta struct bcr_timer timers; 352af617428SVineet Gupta unsigned int vec_base; 353af617428SVineet Gupta struct cpuinfo_arc_ccm iccm, dccm; 35456372082SVineet Gupta struct { 35556372082SVineet Gupta unsigned int swap:1, norm:1, minmax:1, barrel:1, crc:1, pad1:3, 35656372082SVineet Gupta fpu_sp:1, fpu_dp:1, pad2:6, 35756372082SVineet Gupta debug:1, ap:1, smart:1, rtt:1, pad3:4, 35856372082SVineet Gupta pad4:8; 35956372082SVineet Gupta } extn; 36056372082SVineet Gupta struct bcr_mpy extn_mpy; 361af617428SVineet Gupta struct bcr_extn_xymem extn_xymem; 36295d6976dSVineet Gupta }; 36395d6976dSVineet Gupta 36495d6976dSVineet Gupta extern struct cpuinfo_arc cpuinfo_arc700[]; 36595d6976dSVineet Gupta 3661f6ccfffSVineet Gupta static inline int is_isa_arcv2(void) 3671f6ccfffSVineet Gupta { 3681f6ccfffSVineet Gupta return IS_ENABLED(CONFIG_ISA_ARCV2); 3691f6ccfffSVineet Gupta } 3701f6ccfffSVineet Gupta 3711f6ccfffSVineet Gupta static inline int is_isa_arcompact(void) 3721f6ccfffSVineet Gupta { 3731f6ccfffSVineet Gupta return IS_ENABLED(CONFIG_ISA_ARCOMPACT); 3741f6ccfffSVineet Gupta } 3751f6ccfffSVineet Gupta 3761f6ccfffSVineet Gupta #if defined(CONFIG_ISA_ARCOMPACT) && !defined(_CPU_DEFAULT_A7) 3771f6ccfffSVineet Gupta #error "Toolchain not configured for ARCompact builds" 3781f6ccfffSVineet Gupta #elif defined(CONFIG_ISA_ARCV2) && !defined(_CPU_DEFAULT_HS) 3791f6ccfffSVineet Gupta #error "Toolchain not configured for ARCv2 builds" 3801f6ccfffSVineet Gupta #endif 3811f6ccfffSVineet Gupta 382ac4c244dSVineet Gupta #endif /* __ASEMBLY__ */ 383ac4c244dSVineet Gupta 384ac4c244dSVineet Gupta #endif /* _ASM_ARC_ARCREGS_H */ 385