Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/mm/frame.h

    rbbfdf62 r9dae191e  
    3838
    3939#include <typedefs.h>
    40 #include <trace.h>
    4140#include <adt/list.h>
    4241#include <mm/buddy.h>
     
    8281
    8382typedef struct {
    84         size_t refcount;      /**< Tracking of shared frames */
     83        size_t refcount;     /**< Tracking of shared frames */
    8584        uint8_t buddy_order;  /**< Buddy system block order */
    8685        link_t buddy_link;    /**< Link to the next free block inside
     
    9291        pfn_t base;                    /**< Frame_no of the first frame
    9392                                        in the frames array */
    94         size_t count;                  /**< Size of zone */
    95         size_t free_count;             /**< Number of free frame_t
     93        size_t count;                 /**< Size of zone */
     94        size_t free_count;            /**< Number of free frame_t
    9695                                        structures */
    97         size_t busy_count;             /**< Number of busy frame_t
     96        size_t busy_count;            /**< Number of busy frame_t
    9897                                        structures */
    9998        zone_flags_t flags;            /**< Type of the zone */
     
    109108 */
    110109typedef struct {
    111         IRQ_SPINLOCK_DECLARE(lock);
     110        SPINLOCK_DECLARE(lock);
    112111        size_t count;
    113112        zone_t info[ZONES_MAX];
     
    116115extern zones_t zones;
    117116
    118 NO_TRACE static inline uintptr_t PFN2ADDR(pfn_t frame)
     117static inline uintptr_t PFN2ADDR(pfn_t frame)
    119118{
    120119        return (uintptr_t) (frame << FRAME_WIDTH);
    121120}
    122121
    123 NO_TRACE static inline pfn_t ADDR2PFN(uintptr_t addr)
     122static inline pfn_t ADDR2PFN(uintptr_t addr)
    124123{
    125124        return (pfn_t) (addr >> FRAME_WIDTH);
    126125}
    127126
    128 NO_TRACE static inline size_t SIZE2FRAMES(size_t size)
     127static inline size_t SIZE2FRAMES(size_t size)
    129128{
    130129        if (!size)
     
    133132}
    134133
    135 NO_TRACE static inline size_t FRAMES2SIZE(size_t frames)
     134static inline size_t FRAMES2SIZE(size_t frames)
    136135{
    137136        return (size_t) (frames << FRAME_WIDTH);
    138137}
    139138
    140 NO_TRACE static inline bool zone_flags_available(zone_flags_t flags)
     139static inline bool zone_flags_available(zone_flags_t flags)
    141140{
    142141        return ((flags & (ZONE_RESERVED | ZONE_FIRMWARE)) == 0);
     
    167166extern void frame_set_parent(pfn_t, void *, size_t);
    168167extern void frame_mark_unavailable(pfn_t, size_t);
    169 extern size_t zone_conf_size(size_t);
     168extern uintptr_t zone_conf_size(size_t);
    170169extern bool zone_merge(size_t, size_t);
    171170extern void zone_merge_all(void);
Note: See TracChangeset for help on using the changeset viewer.