Changeset 482f968 in mainline for kernel/generic/include/mm/frame.h


Ignore:
Timestamp:
2018-10-31T16:48:51Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
91a8f83, bab75df6
Parents:
37781819
Message:

Make FRAME_HIGHMEM fall back to low memory on failure.

Which is what existing users of it are doing, and there is no reason
not to as far as I can see.

Also make sure calls to frame_alloc all have either FRAME_LOWMEM or
FRAME_HIGHMEM explicitly set, as appropriate.

File:
1 edited

Legend:

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

    r37781819 r482f968  
    5959/** Allocate a frame which can be identity-mapped. */
    6060#define FRAME_LOWMEM      0x08
    61 /** Allocate a frame which cannot be identity-mapped. */
     61/**
     62 * Allocate a frame outside the identity-mapped region if possible.
     63 * Fall back to low memory if that fails.
     64 */
    6265#define FRAME_HIGHMEM     0x10
     66
     67// NOTE: If neither FRAME_LOWMEM nor FRAME_HIGHMEM is set, FRAME_LOWMEM is
     68//       assumed as a safe default, and a runtime warning may be issued.
     69//       If both are set, FRAME_LOWMEM takes priority.
    6370
    6471typedef uint8_t zone_flags_t;
     
    7885/** Mask of zone bits that must be matched exactly. */
    7986#define ZONE_EF_MASK  0x07
    80 
    81 #define FRAME_TO_ZONE_FLAGS(ff) \
    82         ((((ff) & FRAME_LOWMEM) ? ZONE_LOWMEM : \
    83             (((ff) & FRAME_HIGHMEM) ? ZONE_HIGHMEM : \
    84             ZONE_LOWMEM /* | ZONE_HIGHMEM */)) | \
    85             ZONE_AVAILABLE)
    8687
    8788#define ZONE_FLAGS_MATCH(zf, f) \
Note: See TracChangeset for help on using the changeset viewer.