Changeset b3f8fb7 in mainline for kernel/arch/ia64


Ignore:
Timestamp:
2007-01-28T13:25:49Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8e8c1a5
Parents:
1ba41c5
Message:

huge type system cleanup
remove cyclical type dependencies across multiple header files
many minor coding style fixes

Location:
kernel/arch/ia64
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/_link.ld.in

    r1ba41c5 rb3f8fb7  
    66 *
    77 */
    8 
    9 #define __ASM__
    108
    119ENTRY(kernel_image_start)
  • kernel/arch/ia64/include/context.h

    r1ba41c5 rb3f8fb7  
    3838#include <arch/types.h>
    3939#include <arch/register.h>
    40 #include <typedefs.h>
    4140#include <align.h>
    4241#include <arch/stack.h>
     
    4847 * One item is put onto the stack to support get_stack_base().
    4948 */
    50 #define SP_DELTA        (0+ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
     49#define SP_DELTA        (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
    5150
    5251#ifdef context_set
     
    106105        uint64_t pr;
    107106
    108         __r128 f2 __attribute__ ((aligned(16)));
    109         __r128 f3;
    110         __r128 f4;
    111         __r128 f5;
     107        uint128_t f2 __attribute__ ((aligned(16)));
     108        uint128_t f3;
     109        uint128_t f4;
     110        uint128_t f5;
    112111
    113         __r128 f16;
    114         __r128 f17;
    115         __r128 f18;
    116         __r128 f19;
    117         __r128 f20;
    118         __r128 f21;
    119         __r128 f22;
    120         __r128 f23;
    121         __r128 f24;
    122         __r128 f25;
    123         __r128 f26;
    124         __r128 f27;
    125         __r128 f28;
    126         __r128 f29;
    127         __r128 f30;
    128         __r128 f31;
     112        uint128_t f16;
     113        uint128_t f17;
     114        uint128_t f18;
     115        uint128_t f19;
     116        uint128_t f20;
     117        uint128_t f21;
     118        uint128_t f22;
     119        uint128_t f23;
     120        uint128_t f24;
     121        uint128_t f25;
     122        uint128_t f26;
     123        uint128_t f27;
     124        uint128_t f28;
     125        uint128_t f29;
     126        uint128_t f30;
     127        uint128_t f31;
    129128       
    130129        ipl_t ipl;
  • kernel/arch/ia64/include/cpu.h

    r1ba41c5 rb3f8fb7  
    3737
    3838#include <arch/types.h>
    39 #include <typedefs.h>
    4039#include <arch/register.h>
     40#include <arch/asm.h>
    4141
    4242#define FAMILY_ITANIUM  0x7
  • kernel/arch/ia64/include/fpu_context.h

    r1ba41c5 rb3f8fb7  
    4444
    4545typedef struct {
    46         __r128 fr[FRS];
     46        uint128_t fr[FRS];
    4747} fpu_context_t;
    4848
  • kernel/arch/ia64/include/interrupt.h

    r1ba41c5 rb3f8fb7  
    3636#define KERN_ia64_INTERRUPT_H_
    3737
    38 #include <typedefs.h>
    3938#include <arch/types.h>
    4039#include <arch/register.h>
     
    6564#define EOI     0               /**< The actual value doesn't matter. */
    6665
    67 struct istate {
    68         __r128 f2;
    69         __r128 f3;
    70         __r128 f4;
    71         __r128 f5;
    72         __r128 f6;
    73         __r128 f7;
    74         __r128 f8;
    75         __r128 f9;
    76         __r128 f10;
    77         __r128 f11;
    78         __r128 f12;
    79         __r128 f13;
    80         __r128 f14;
    81         __r128 f15;
    82         __r128 f16;
    83         __r128 f17;
    84         __r128 f18;
    85         __r128 f19;
    86         __r128 f20;
    87         __r128 f21;
    88         __r128 f22;
    89         __r128 f23;
    90         __r128 f24;
    91         __r128 f25;
    92         __r128 f26;
    93         __r128 f27;
    94         __r128 f28;
    95         __r128 f29;
    96         __r128 f30;
    97         __r128 f31;
     66typedef struct {
     67        uint128_t f2;
     68        uint128_t f3;
     69        uint128_t f4;
     70        uint128_t f5;
     71        uint128_t f6;
     72        uint128_t f7;
     73        uint128_t f8;
     74        uint128_t f9;
     75        uint128_t f10;
     76        uint128_t f11;
     77        uint128_t f12;
     78        uint128_t f13;
     79        uint128_t f14;
     80        uint128_t f15;
     81        uint128_t f16;
     82        uint128_t f17;
     83        uint128_t f18;
     84        uint128_t f19;
     85        uint128_t f20;
     86        uint128_t f21;
     87        uint128_t f22;
     88        uint128_t f23;
     89        uint128_t f24;
     90        uint128_t f25;
     91        uint128_t f26;
     92        uint128_t f27;
     93        uint128_t f28;
     94        uint128_t f29;
     95        uint128_t f30;
     96        uint128_t f31;
    9897               
    9998        uintptr_t ar_bsp;
     
    120119        uint64_t in3;
    121120        uint64_t in4;
    122 };
     121} istate_t;
    123122
    124123static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr)
  • kernel/arch/ia64/include/mm/as.h

    r1ba41c5 rb3f8fb7  
    4848} as_arch_t;
    4949
     50#include <genarch/mm/as_ht.h>
     51
    5052#define as_constructor_arch(as, flags)          (as != as)
    5153#define as_destructor_arch(as)                  (as != as)
  • kernel/arch/ia64/include/mm/page.h

    r1ba41c5 rb3f8fb7  
    8686#ifndef __ASM__
    8787
     88#include <arch/mm/as.h>
    8889#include <arch/mm/frame.h>
     90#include <arch/interrupt.h>
    8991#include <arch/barrier.h>
    90 #include <genarch/mm/page_ht.h>
    9192#include <arch/mm/asid.h>
    9293#include <arch/types.h>
    93 #include <typedefs.h>
    9494#include <debug.h>
    9595
  • kernel/arch/ia64/include/mm/tlb.h

    r1ba41c5 rb3f8fb7  
    4343#include <arch/interrupt.h>
    4444#include <arch/types.h>
    45 #include <typedefs.h>
    4645
    4746/** Data and instruction Translation Register indices. */
  • kernel/arch/ia64/include/types.h

    r1ba41c5 rb3f8fb7  
    3636#define KERN_ia64_TYPES_H_
    3737
    38 #define NULL    0
     38#define NULL 0
     39#define false 0
     40#define true 1
    3941
    4042typedef signed char int8_t;
    41 typedef signed short int int16_t;
     43typedef signed short int16_t;
    4244typedef signed int int32_t;
    4345typedef signed long int64_t;
     46typedef struct {
     47        int64_t lo;
     48        int64_t hi;
     49} int128_t;
    4450
    4551typedef unsigned char uint8_t;
     
    4753typedef unsigned int uint32_t;
    4854typedef unsigned long uint64_t;
     55typedef struct {
     56        uint64_t lo;
     57        uint64_t hi;
     58} uint128_t;
    4959
    50 typedef unsigned char __r8;                     /* Reserve byte */
    51 typedef unsigned short __r16;
    52 typedef unsigned int __r32;
    53 typedef unsigned long __r64;
    54 typedef struct __r128 {
    55         __r64 lo;
    56         __r64 hi;
    57 } __r128;
     60typedef uint64_t size_t;
     61typedef uint64_t count_t;
     62typedef uint64_t index_t;
    5863
    5964typedef uint64_t uintptr_t;
     
    6570typedef int64_t native_t;
    6671
    67 typedef struct pte pte_t;
     72typedef uint8_t bool;
     73typedef uint64_t task_id_t;
     74typedef uint32_t context_id_t;
     75
     76typedef int32_t inr_t;
     77typedef int32_t devno_t;
    6878
    6979#endif
  • kernel/arch/ia64/src/ddi/ddi.c

    r1ba41c5 rb3f8fb7  
    3636#include <proc/task.h>
    3737#include <arch/types.h>
    38 #include <typedefs.h>
    3938
    4039/** Enable I/O space range for task.
  • kernel/arch/ia64/src/mm/page.c

    r1ba41c5 rb3f8fb7  
    4040#include <arch/mm/vhpt.h>
    4141#include <arch/types.h>
    42 #include <typedefs.h>
    4342#include <print.h>
    4443#include <mm/page.h>
  • kernel/arch/ia64/src/mm/tlb.c

    r1ba41c5 rb3f8fb7  
    4848#include <arch/pal/pal.h>
    4949#include <arch/asm.h>
    50 #include <typedefs.h>
    5150#include <panic.h>
    5251#include <print.h>
  • kernel/arch/ia64/src/mm/vhpt.c

    r1ba41c5 rb3f8fb7  
    3333*/
    3434
     35#include <memstr.h>
    3536#include <arch/mm/vhpt.h>
    3637#include <mm/frame.h>
     
    4142uintptr_t vhpt_set_up(void)
    4243{
    43         vhpt_base = frame_alloc(VHPT_WIDTH-FRAME_WIDTH,FRAME_KA | FRAME_ATOMIC);
    44         if(!vhpt_base)
     44        vhpt_base = frame_alloc(VHPT_WIDTH - FRAME_WIDTH, FRAME_KA | FRAME_ATOMIC);
     45        if (!vhpt_base)
    4546                panic("Kernel configured with VHPT but no memory for table.");
    4647        vhpt_invalidate_all();
     
    6263        rid = ASID2RID(asid, vrn);
    6364                                                                                                                                                                                                                               
    64   rr_save.word = rr_read(vrn);
    65   rr.word = rr_save.word;
    66   rr.map.rid = rid;
    67   rr_write(vrn, rr.word);
    68   srlz_i();
     65        rr_save.word = rr_read(vrn);
     66        rr.word = rr_save.word;
     67        rr.map.rid = rid;
     68        rr_write(vrn, rr.word);
     69        srlz_i();
    6970       
    7071        ventry = (vhpt_entry_t *) thash(va);
    71   tag = ttag(va);
    72   rr_write(vrn, rr_save.word);
    73   srlz_i();
    74   srlz_d();
     72        tag = ttag(va);
     73        rr_write(vrn, rr_save.word);
     74        srlz_i();
     75        srlz_d();
    7576
    76         ventry->word[0]=entry.word[0];
    77         ventry->word[1]=entry.word[1];
     77        ventry->word[0] = entry.word[0];
     78        ventry->word[1] = entry.word[1];
    7879        ventry->present.tag.tag_word = tag;
    79        
    80 
    8180}
    8281
    8382void vhpt_invalidate_all()
    8483{
    85         memsetb((uintptr_t)vhpt_base,1<<VHPT_WIDTH,0);
     84        memsetb((uintptr_t) vhpt_base, 1 << VHPT_WIDTH, 0);
    8685}
    8786
  • kernel/arch/ia64/src/ski/ski.c

    r1ba41c5 rb3f8fb7  
    3939#include <sysinfo/sysinfo.h>
    4040#include <arch/types.h>
    41 #include <typedefs.h>
    4241#include <ddi/device.h>
    4342#include <ddi/irq.h>
Note: See TracChangeset for help on using the changeset viewer.