Changeset 371bd7d in mainline for kernel/arch/ppc32/include


Ignore:
Timestamp:
2010-03-27T09:22:17Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36a75a2
Parents:
cd82bb1 (diff), eaf22d4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Location:
kernel/arch/ppc32/include
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/include/asm.h

    rcd82bb1 r371bd7d  
    2727 */
    2828
    29 /** @addtogroup ppc32   
     29/** @addtogroup ppc32
    3030 * @{
    3131 */
     
    3636#define KERN_ppc32_ASM_H_
    3737
    38 #include <arch/types.h>
    3938#include <typedefs.h>
    4039#include <config.h>
     
    146145}
    147146
    148 void cpu_halt(void);
    149 void asm_delay_loop(uint32_t t);
    150 
     147extern void cpu_halt(void) __attribute__((noreturn));
     148extern void asm_delay_loop(uint32_t t);
    151149extern void userspace_asm(uintptr_t uspace_uarg, uintptr_t stack, uintptr_t entry);
    152150
    153151static inline void pio_write_8(ioport8_t *port, uint8_t v)
    154152{
    155         *port = v;     
     153        *port = v;
    156154}
    157155
    158156static inline void pio_write_16(ioport16_t *port, uint16_t v)
    159157{
    160         *port = v;     
     158        *port = v;
    161159}
    162160
    163161static inline void pio_write_32(ioport32_t *port, uint32_t v)
    164162{
    165         *port = v;     
     163        *port = v;
    166164}
    167165
    168166static inline uint8_t pio_read_8(ioport8_t *port)
    169167{
    170         return *port; 
     168        return *port;
    171169}
    172170
    173171static inline uint16_t pio_read_16(ioport16_t *port)
    174172{
    175         return *port; 
     173        return *port;
    176174}
    177175
    178176static inline uint32_t pio_read_32(ioport32_t *port)
    179177{
    180         return *port; 
     178        return *port;
    181179}
    182180
  • kernel/arch/ppc32/include/atomic.h

    rcd82bb1 r371bd7d  
    2727 */
    2828
    29 /** @addtogroup ppc32   
     29/** @addtogroup ppc32
    3030 * @{
    3131 */
     
    3838static inline void atomic_inc(atomic_t *val)
    3939{
    40         long tmp;
    41 
     40        atomic_count_t tmp;
     41       
    4242        asm volatile (
    4343                "1:\n"
     
    4646                "stwcx. %0, 0, %2\n"
    4747                "bne- 1b"
    48                 : "=&r" (tmp), "=m" (val->count)
    49                 : "r" (&val->count), "m" (val->count)
     48                : "=&r" (tmp),
     49                  "=m" (val->count)
     50                : "r" (&val->count),
     51                  "m" (val->count)
    5052                : "cc"
    5153        );
     
    5456static inline void atomic_dec(atomic_t *val)
    5557{
    56         long tmp;
    57 
     58        atomic_count_t tmp;
     59       
    5860        asm volatile (
    5961                "1:\n"
    6062                "lwarx %0, 0, %2\n"
    6163                "addic %0, %0, -1\n"
    62                 "stwcx. %0, 0, %2\n"
     64                "stwcx. %0, 0, %2\n"
    6365                "bne- 1b"
    64                 : "=&r" (tmp), "=m" (val->count)
    65                 : "r" (&val->count), "m" (val->count)
     66                : "=&r" (tmp),
     67                  "=m" (val->count)
     68                : "r" (&val->count),
     69                  "m" (val->count)
    6670                : "cc"
    6771        );
    6872}
    6973
    70 static inline long atomic_postinc(atomic_t *val)
     74static inline atomic_count_t atomic_postinc(atomic_t *val)
    7175{
    7276        atomic_inc(val);
     
    7478}
    7579
    76 static inline long atomic_postdec(atomic_t *val)
     80static inline atomic_count_t atomic_postdec(atomic_t *val)
    7781{
    7882        atomic_dec(val);
     
    8084}
    8185
    82 static inline long atomic_preinc(atomic_t *val)
     86static inline atomic_count_t atomic_preinc(atomic_t *val)
    8387{
    8488        atomic_inc(val);
     
    8690}
    8791
    88 static inline long atomic_predec(atomic_t *val)
     92static inline atomic_count_t atomic_predec(atomic_t *val)
    8993{
    9094        atomic_dec(val);
  • kernel/arch/ppc32/include/boot/boot.h

    rcd82bb1 r371bd7d  
    4747#ifndef __ASM__
    4848
    49 #include <arch/types.h>
     49#include <typedefs.h>
    5050#include <config.h>
    5151#include <genarch/ofw/ofw_tree.h>
  • kernel/arch/ppc32/include/context.h

    rcd82bb1 r371bd7d  
    2727 */
    2828
    29 /** @addtogroup ppc32   
     29/** @addtogroup ppc32
    3030 * @{
    3131 */
     
    3636#define KERN_ppc32_CONTEXT_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    40 #define SP_DELTA        16
     40#define SP_DELTA  16
     41
     42#define context_set(ctx, pc, stack, size) \
     43    context_set_generic(ctx, pc, stack, size)
    4144
    4245typedef struct {
     
    6871       
    6972        ipl_t ipl;
    70 } __attribute__ ((packed)) context_t;
     73} __attribute__((packed)) context_t;
    7174
    7275#endif
  • kernel/arch/ppc32/include/cpuid.h

    rcd82bb1 r371bd7d  
    3636#define KERN_ppc32_CPUID_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040typedef struct {
  • kernel/arch/ppc32/include/drivers/pic.h

    rcd82bb1 r371bd7d  
    3636#define KERN_ppc32_PIC_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <ddi/irq.h>
    4040
  • kernel/arch/ppc32/include/exception.h

    rcd82bb1 r371bd7d  
    3636#define KERN_ppc32_EXCEPTION_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <arch/regutils.h>
    4040
    41 typedef struct {
     41typedef struct istate {
    4242        uint32_t r0;
    4343        uint32_t r2;
     
    9898}
    9999
     100static inline unative_t istate_get_fp(istate_t *istate)
     101{
     102        return istate->sp;
     103}
     104
    100105#endif
    101106
  • kernel/arch/ppc32/include/faddr.h

    rcd82bb1 r371bd7d  
    3636#define KERN_ppc32_FADDR_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040#define FADDR(fptr)             ((uintptr_t) (fptr))
  • kernel/arch/ppc32/include/fpu_context.h

    rcd82bb1 r371bd7d  
    3737
    3838#ifndef KERN_ppc32_TYPES_H_
    39 # include <arch/types.h>
     39        #include <typedefs.h>
    4040#endif
    4141
  • kernel/arch/ppc32/include/memstr.h

    rcd82bb1 r371bd7d  
    2727 */
    2828
    29 /** @addtogroup ppc32   
     29/** @addtogroup ppc32
    3030 * @{
    3131 */
     
    3838#define memcpy(dst, src, cnt)  __builtin_memcpy((dst), (src), (cnt))
    3939
    40 extern void memsetw(void *dst, size_t cnt, uint16_t x);
    41 extern void memsetb(void *dst, size_t cnt, uint8_t x);
    42 
    43 extern int memcmp(const void *a, const void *b, size_t cnt);
     40extern void memsetw(void *, size_t, uint16_t);
     41extern void memsetb(void *, size_t, uint8_t);
    4442
    4543#endif
  • kernel/arch/ppc32/include/mm/asid.h

    rcd82bb1 r371bd7d  
    3636#define KERN_ppc32_ASID_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040#define ASID_MAX_ARCH           4096
  • kernel/arch/ppc32/include/mm/frame.h

    rcd82bb1 r371bd7d  
    4242#ifndef __ASM__
    4343
    44 #include <arch/types.h>
     44#include <typedefs.h>
    4545
    4646extern uintptr_t last_frame;
  • kernel/arch/ppc32/include/mm/tlb.h

    rcd82bb1 r371bd7d  
    3737
    3838#include <arch/interrupt.h>
    39 #include <arch/types.h>
    4039#include <typedefs.h>
    4140
  • kernel/arch/ppc32/include/types.h

    rcd82bb1 r371bd7d  
    2727 */
    2828
    29 /** @addtogroup ppc32   
     29/** @addtogroup ppc32
    3030 * @{
    3131 */
     
    3535#ifndef KERN_ppc32_TYPES_H_
    3636#define KERN_ppc32_TYPES_H_
    37 
    38 typedef signed char int8_t;
    39 typedef signed short int16_t;
    40 typedef signed int int32_t;
    41 typedef signed long long int64_t;
    42 
    43 typedef unsigned char uint8_t;
    44 typedef unsigned short uint16_t;
    45 typedef unsigned int uint32_t;
    46 typedef unsigned long long uint64_t;
    4737
    4838typedef uint32_t size_t;
     
    5545typedef uint32_t unative_t;
    5646typedef int32_t native_t;
     47typedef uint32_t atomic_count_t;
    5748
    5849typedef struct {
     
    6051
    6152/**< Formats for uintptr_t, size_t */
    62 #define PRIp "x"
    63 #define PRIs "u"
     53#define PRIp  "x"
     54#define PRIs  "u"
    6455
    6556/**< Formats for (u)int8_t, (u)int16_t, (u)int32_t, (u)int64_t and (u)native_t */
    66 #define PRId8 "d"
    67 #define PRId16 "d"
    68 #define PRId32 "d"
    69 #define PRId64 "lld"
    70 #define PRIdn "d"
     57#define PRId8   "d"
     58#define PRId16  "d"
     59#define PRId32  "d"
     60#define PRId64  "lld"
     61#define PRIdn   "d"
    7162
    72 #define PRIu8 "u"
    73 #define PRIu16 "u"
    74 #define PRIu32 "u"
    75 #define PRIu64 "llu"
    76 #define PRIun "u"
     63#define PRIu8   "u"
     64#define PRIu16  "u"
     65#define PRIu32  "u"
     66#define PRIu64  "llu"
     67#define PRIun   "u"
    7768
    78 #define PRIx8 "x"
    79 #define PRIx16 "x"
    80 #define PRIx32 "x"
    81 #define PRIx64 "llx"
    82 #define PRIxn "x"
     69#define PRIx8   "x"
     70#define PRIx16  "x"
     71#define PRIx32  "x"
     72#define PRIx64  "llx"
     73#define PRIxn   "x"
    8374
    8475#endif
Note: See TracChangeset for help on using the changeset viewer.