Changeset 1433ecda in mainline for kernel/arch/sparc64/include


Ignore:
Timestamp:
2018-04-04T15:42:37Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

Location:
kernel/arch/sparc64/include/arch
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/arch/atomic.h

    r47b2d7e3 r1433ecda  
    6464
    6565                asm volatile (
    66                         "casx %0, %2, %1\n"
    67                         : "+m" (*((atomic_count_t *) ptr)),
     66                    "casx %0, %2, %1\n"
     67                    : "+m" (*((atomic_count_t *) ptr)),
    6868                      "+r" (b)
    6969                    : "r" (a)
     
    110110
    111111        asm volatile (
    112                 "casx %0, %2, %1\n"
    113                 : "+m" (*((atomic_count_t *) ptr)),
     112            "casx %0, %2, %1\n"
     113            : "+m" (*((atomic_count_t *) ptr)),
    114114              "+r" (v)
    115115            : "r" (0)
     
    129129
    130130        asm volatile (
    131                 "0:\n"
    132                         "casx %0, %3, %1\n"
    133                         "brz %1, 2f\n"
    134                         "nop\n"
    135                 "1:\n"
    136                         "ldx %0, %2\n"
    137                         "brz %2, 0b\n"
    138                         "nop\n"
    139                         "ba,a %%xcc, 1b\n"
    140                 "2:\n"
    141                 : "+m" (*((atomic_count_t *) ptr)),
    142                   "+r" (tmp1),
    143                   "+r" (tmp2)
    144                 : "r" (0)
     131            "0:\n"
     132            "casx %0, %3, %1\n"
     133            "brz %1, 2f\n"
     134            "nop\n"
     135            "1:\n"
     136            "ldx %0, %2\n"
     137            "brz %2, 0b\n"
     138            "nop\n"
     139            "ba,a %%xcc, 1b\n"
     140            "2:\n"
     141            : "+m" (*((atomic_count_t *) ptr)),
     142              "+r" (tmp1),
     143              "+r" (tmp2)
     144            : "r" (0)
    145145        );
    146146
  • kernel/arch/sparc64/include/arch/barrier.h

    r47b2d7e3 r1433ecda  
    9696
    9797        asm volatile (
    98                 "rd %%pc, %[pc]\n"
    99                 "flush %[pc]\n"
    100                 : [pc] "=&r" (pc)
     98            "rd %%pc, %[pc]\n"
     99            "flush %[pc]\n"
     100            : [pc] "=&r" (pc)
    101101        );
    102102}
     
    106106{
    107107        asm volatile (
    108                 "membar #Sync\n"
     108            "membar #Sync\n"
    109109        );
    110110}
  • kernel/arch/sparc64/include/arch/cpu_family.h

    r47b2d7e3 r1433ecda  
    5050        int impl = ((ver_reg_t) ver_read()).impl;
    5151        return (impl == IMPL_ULTRASPARCI) || (impl == IMPL_ULTRASPARCII) ||
    52                (impl == IMPL_ULTRASPARCII_I) ||  (impl == IMPL_ULTRASPARCII_E);
     52            (impl == IMPL_ULTRASPARCII_I) ||  (impl == IMPL_ULTRASPARCII_E);
    5353}
    5454
     
    6262        int impl = ((ver_reg_t) ver_read()).impl;
    6363        return (impl == IMPL_ULTRASPARCIII) ||
    64                (impl == IMPL_ULTRASPARCIII_PLUS) ||
    65                (impl == IMPL_ULTRASPARCIII_I);
     64            (impl == IMPL_ULTRASPARCIII_PLUS) ||
     65            (impl == IMPL_ULTRASPARCIII_I);
    6666}
    6767
  • kernel/arch/sparc64/include/arch/drivers/niagara_buf.h

    r47b2d7e3 r1433ecda  
    5050        uint64_t write_ptr;
    5151        char data[OUTPUT_BUFFER_SIZE];
    52 } __attribute__ ((packed)) niagara_output_buffer_t;
     52} __attribute__((packed)) niagara_output_buffer_t;
    5353
    5454#define INPUT_BUFFER_SIZE  ((PAGE_SIZE) - 2 * 8)
     
    5858        uint64_t read_ptr;
    5959        char data[INPUT_BUFFER_SIZE];
    60 } __attribute__ ((packed)) niagara_input_buffer_t;
     60} __attribute__((packed)) niagara_input_buffer_t;
    6161
    6262/** @}
  • kernel/arch/sparc64/include/arch/mm/page.h

    r47b2d7e3 r1433ecda  
    6868                uint64_t vpn : 51;              /**< Virtual Page Number. */
    6969                unsigned offset : 13;           /**< Offset. */
    70         } __attribute__ ((packed));
     70        } __attribute__((packed));
    7171} page_address_t;
    7272
  • kernel/arch/sparc64/include/arch/mm/sun4u/as.h

    r47b2d7e3 r1433ecda  
    5656                unsigned : 6;
    5757                uint64_t va_tag : 42;   /**< Virtual address bits <63:22>. */
    58         } __attribute__ ((packed));
     58        } __attribute__((packed));
    5959} tsb_tag_target_t;
    6060
     
    6363        tsb_tag_target_t tag;
    6464        tte_data_t data;
    65 } __attribute__ ((packed)) tsb_entry_t;
     65} __attribute__((packed)) tsb_entry_t;
    6666
    6767typedef struct {
  • kernel/arch/sparc64/include/arch/mm/sun4u/frame.h

    r47b2d7e3 r1433ecda  
    6969#endif
    7070                unsigned offset : 13;           /**< Offset. */
    71         } __attribute__ ((packed));
     71        } __attribute__((packed));
    7272};
    7373
  • kernel/arch/sparc64/include/arch/mm/sun4u/mmu.h

    r47b2d7e3 r1433ecda  
    112112                unsigned ic : 1;        /**< I-Cache enable. */
    113113
    114         } __attribute__ ((packed));
     114        } __attribute__((packed));
    115115} lsu_cr_reg_t;
    116116#endif /* US */
  • kernel/arch/sparc64/include/arch/mm/sun4u/tlb.h

    r47b2d7e3 r1433ecda  
    109109                unsigned long : 51;
    110110                unsigned context : 13;          /**< Context/ASID. */
    111         } __attribute__ ((packed));
     111        } __attribute__((packed));
    112112};
    113113typedef union tlb_context_reg tlb_context_reg_t;
     
    126126                unsigned tlb_entry : 6;
    127127                unsigned : 3;
    128         } __attribute__ ((packed));
     128        } __attribute__((packed));
    129129};
    130130typedef union tlb_data_access_addr dtlb_data_access_addr_t;
     
    155155                unsigned local_tlb_entry : 9;
    156156                unsigned : 3;
    157         } __attribute__ ((packed));
     157        } __attribute__((packed));
    158158};
    159159typedef union dtlb_data_access_addr dtlb_data_access_addr_t;
     
    169169                unsigned local_tlb_entry : 7;
    170170                unsigned : 3;
    171         } __attribute__ ((packed));
     171        } __attribute__((packed));
    172172};
    173173typedef union itlb_data_access_addr itlb_data_access_addr_t;
     
    182182                uint64_t vpn : 51;      /**< Virtual Address bits 63:13. */
    183183                unsigned context : 13;  /**< Context identifier. */
    184         } __attribute__ ((packed));
     184        } __attribute__((packed));
    185185};
    186186typedef union tlb_tag_read_reg tlb_tag_read_reg_t;
     
    192192        uint64_t value;
    193193        struct {
    194                 uint64_t vpn: 51;       /**< Virtual Address bits 63:13. */
     194                uint64_t vpn : 51;      /**< Virtual Address bits 63:13. */
    195195#if defined (US)
    196196                unsigned : 6;           /**< Ignored. */
     
    198198#elif defined (US3)
    199199                unsigned : 5;           /**< Ignored. */
    200                 unsigned type: 2;       /**< The type of demap operation. */
     200                unsigned type : 2;      /**< The type of demap operation. */
    201201#endif
    202202                unsigned context : 2;   /**< Context register selection. */
    203203                unsigned : 4;           /**< Zero. */
    204         } __attribute__ ((packed));
     204        } __attribute__((packed));
    205205};
    206206typedef union tlb_demap_addr tlb_demap_addr_t;
     
    229229                unsigned ow : 1;        /**< Overwrite bit. */
    230230                unsigned fv : 1;        /**< Fault Valid bit. */
    231         } __attribute__ ((packed));
     231        } __attribute__((packed));
    232232};
    233233typedef union tlb_sfsr_reg tlb_sfsr_reg_t;
     
    436436 */
    437437NO_TRACE static inline void itlb_data_access_write(int tlb, size_t entry,
    438         uint64_t value)
     438    uint64_t value)
    439439{
    440440        itlb_data_access_addr_t reg;
     
    472472 */
    473473NO_TRACE static inline void dtlb_data_access_write(int tlb, size_t entry,
    474         uint64_t value)
     474    uint64_t value)
    475475{
    476476        dtlb_data_access_addr_t reg;
  • kernel/arch/sparc64/include/arch/mm/sun4u/tsb.h

    r47b2d7e3 r1433ecda  
    7575                unsigned size : 3;      /**< TSB size. Number of entries is
    7676                                         * 512 * 2^size. */
    77         } __attribute__ ((packed));
     77        } __attribute__((packed));
    7878} tsb_base_reg_t;
    7979
  • kernel/arch/sparc64/include/arch/mm/sun4u/tte.h

    r47b2d7e3 r1433ecda  
    6363                unsigned : 6;           /**< Reserved. */
    6464                uint64_t va_tag : 42;   /**< Virtual Address Tag, bits 63:22. */
    65         } __attribute__ ((packed));
     65        } __attribute__((packed));
    6666};
    6767
     
    9292                unsigned w : 1;         /**< Writable. */
    9393                unsigned g : 1;         /**< Global. */
    94         } __attribute__ ((packed));
     94        } __attribute__((packed));
    9595};
    9696
  • kernel/arch/sparc64/include/arch/mm/sun4v/as.h

    r47b2d7e3 r1433ecda  
    6363                unsigned : 6;
    6464                uint64_t va_tag : 42;   /**< Virtual address bits <63:22>. */
    65         } __attribute__ ((packed));
     65        } __attribute__((packed));
    6666} tte_tag_t;
    6767
     
    7070        tte_tag_t tag;
    7171        tte_data_t data;
    72 } __attribute__ ((packed)) tsb_entry_t;
     72} __attribute__((packed)) tsb_entry_t;
    7373
    7474typedef struct {
  • kernel/arch/sparc64/include/arch/mm/sun4v/page.h

    r47b2d7e3 r1433ecda  
    6060                uint64_t vpn : 51;              /**< Virtual Page Number. */
    6161                unsigned offset : 13;           /**< Offset. */
    62         } __attribute__ ((packed));
     62        } __attribute__((packed));
    6363} page_address_t;
    6464
  • kernel/arch/sparc64/include/arch/mm/sun4v/tlb.h

    r47b2d7e3 r1433ecda  
    6868        uint64_t dfc;           /**< Data fault context (DFC) */
    6969        uint8_t reserved2[0x28];
    70 } __attribute__ ((packed)) mmu_fault_status_area_t;
     70} __attribute__((packed)) mmu_fault_status_area_t;
    7171
    7272#define DTLB_MAX_LOCKED_ENTRIES         8
     
    126126 * @param mmu_flag      MMU_FLAG_DTLB, MMU_FLAG_ITLB or a combination of both
    127127 */
    128 NO_TRACE static inline void mmu_demap_ctx(int context, int mmu_flag) {
     128NO_TRACE static inline void mmu_demap_ctx(int context, int mmu_flag)
     129{
    129130        __hypercall_fast4(MMU_DEMAP_CTX, 0, 0, context, mmu_flag);
    130131}
     
    137138 * @param mmu_flag      MMU_FLAG_DTLB, MMU_FLAG_ITLB or a combination of both
    138139 */
    139 NO_TRACE static inline void mmu_demap_page(uintptr_t vaddr, int context, int mmu_flag) {
     140NO_TRACE static inline void mmu_demap_page(uintptr_t vaddr, int context, int mmu_flag)
     141{
    140142        __hypercall_fast5(MMU_DEMAP_PAGE, 0, 0, vaddr, context, mmu_flag);
    141143}
  • kernel/arch/sparc64/include/arch/mm/sun4v/tsb.h

    r47b2d7e3 r1433ecda  
    6565        uint64_t tsb_base;      /**< Real address of TSB base. */
    6666        uint64_t reserved;
    67 } __attribute__ ((packed)) tsb_descr_t;
     67} __attribute__((packed)) tsb_descr_t;
    6868
    6969
  • kernel/arch/sparc64/include/arch/mm/sun4v/tte.h

    r47b2d7e3 r1433ecda  
    6969                unsigned soft2 : 2;     /**< Software defined field. */
    7070                unsigned size : 4;      /**< Page size. */
    71         } __attribute__ ((packed));
     71        } __attribute__((packed));
    7272};
    7373
  • kernel/arch/sparc64/include/arch/register.h

    r47b2d7e3 r1433ecda  
    5050                unsigned : 3;
    5151                unsigned maxwin : 5;
    52         } __attribute__ ((packed));
     52        } __attribute__((packed));
    5353};
    5454typedef union ver_reg ver_reg_t;
     
    7070                unsigned ie : 1;        /**< Interrupt Enable. */
    7171                unsigned ag : 1;        /**< Alternate Globals*/
    72         } __attribute__ ((packed));
     72        } __attribute__((packed));
    7373};
    7474typedef union pstate_reg pstate_reg_t;
     
    8080                unsigned npt : 1;       /**< Non-privileged Trap enable. */
    8181                uint64_t counter : 63;  /**< Elapsed CPU clck cycle counter. */
    82         } __attribute__ ((packed));
     82        } __attribute__((packed));
    8383};
    8484typedef union tick_reg tick_reg_t;
     
    9090                unsigned int_dis : 1;           /**< TICK_INT interrupt disabled flag. */
    9191                uint64_t tick_cmpr : 63;        /**< Compare value for TICK interrupts. */
    92         } __attribute__ ((packed));
     92        } __attribute__((packed));
    9393};
    9494typedef union tick_compare_reg tick_compare_reg_t;
     
    102102                unsigned int_level : 15;
    103103                unsigned tick_int : 1;
    104         } __attribute__ ((packed));
     104        } __attribute__((packed));
    105105};
    106106typedef union softint_reg softint_reg_t;
     
    114114                unsigned du : 1;
    115115                unsigned dl : 1;
    116         } __attribute__ ((packed));
     116        } __attribute__((packed));
    117117};
    118118typedef union fprs_reg fprs_reg_t;
  • kernel/arch/sparc64/include/arch/sun4u/asm.h

    r47b2d7e3 r1433ecda  
    4848
    4949        asm volatile (
    50                 "rdpr %%ver, %[v]\n"
    51                 : [v] "=r" (v)
     50            "rdpr %%ver, %[v]\n"
     51            : [v] "=r" (v)
    5252        );
    5353
  • kernel/arch/sparc64/include/arch/sun4v/hypercall.h

    r47b2d7e3 r1433ecda  
    152152 */
    153153static inline uint64_t
    154 __hypercall_fast(const uint64_t p1, const uint64_t p2, const uint64_t p3,
     154    __hypercall_fast(const uint64_t p1, const uint64_t p2, const uint64_t p3,
    155155    const uint64_t p4, const uint64_t p5, const uint64_t function_number)
    156156{
     
    163163
    164164        asm volatile (
    165                 "ta %7\n"
    166                 : "=r" (a1)
    167                 : "r" (a1), "r" (a2), "r" (a3), "r" (a4), "r" (a5), "r" (a6),
    168                   "i" (FAST_TRAP)
    169                 : "memory"
     165            "ta %7\n"
     166            : "=r" (a1)
     167            : "r" (a1), "r" (a2), "r" (a3), "r" (a4), "r" (a5), "r" (a6),
     168              "i" (FAST_TRAP)
     169            : "memory"
    170170        );
    171171
     
    187187 */
    188188static inline uint64_t
    189 __hypercall_fast_ret1(const uint64_t p1, const uint64_t p2, const uint64_t p3,
     189    __hypercall_fast_ret1(const uint64_t p1, const uint64_t p2, const uint64_t p3,
    190190    const uint64_t p4, const uint64_t p5, const uint64_t function_number,
    191191    uint64_t *ret1)
     
    199199
    200200        asm volatile (
    201                 "ta %8\n"
    202                 : "=r" (a1), "=r" (a2)
    203                 : "r" (a1), "r" (a2), "r" (a3), "r" (a4), "r" (a5), "r" (a6),
    204                   "i" (FAST_TRAP)
    205                 : "memory"
     201            "ta %8\n"
     202            : "=r" (a1), "=r" (a2)
     203            : "r" (a1), "r" (a2), "r" (a3), "r" (a4), "r" (a5), "r" (a6),
     204              "i" (FAST_TRAP)
     205            : "memory"
    206206        );
    207207
     
    223223 */
    224224static inline uint64_t
    225 __hypercall_hyperfast(const uint64_t p1, const uint64_t p2, const uint64_t p3,
     225    __hypercall_hyperfast(const uint64_t p1, const uint64_t p2, const uint64_t p3,
    226226    const uint64_t p4, const uint64_t p5, const uint64_t sw_trap_number)
    227227{
     
    233233
    234234        asm volatile (
    235                 "ta %6\n"
    236                 : "=r" (a1)
    237                 : "r" (a1), "r" (a2), "r" (a3), "r" (a4), "r" (a5),
    238                   "i" (sw_trap_number)
    239                 : "memory"
     235            "ta %6\n"
     236            : "=r" (a1)
     237            : "r" (a1), "r" (a2), "r" (a3), "r" (a4), "r" (a5),
     238              "i" (sw_trap_number)
     239            : "memory"
    240240        );
    241241
  • kernel/arch/sparc64/include/arch/sun4v/register.h

    r47b2d7e3 r1433ecda  
    5353                unsigned ie : 1;        /**< Interrupt Enable. */
    5454                unsigned : 1;
    55         } __attribute__ ((packed));
     55        } __attribute__((packed));
    5656};
    5757typedef union pstate_reg pstate_reg_t;
Note: See TracChangeset for help on using the changeset viewer.