Changeset 4b1c7c6f in mainline for kernel/generic/include/mm/mm.h


Ignore:
Timestamp:
2018-03-16T20:57:16Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
6be2c13
Parents:
973be387
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-16 20:51:59)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-16 20:57:16)
Message:

Clean up PAGE_* flags.

Remove "nop flags", they are confusing for readers and any benefit they would
gain in self-documentation they lose in being used inconsistently.

Remove "PAGE_READ", the only place it's used meaningfully is the incomplete
RISC-V implementation, and most call sites assume read is implied.

File:
1 edited

Legend:

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

    r973be387 r4b1c7c6f  
    3737
    3838#define PAGE_CACHEABLE_SHIFT            0
    39 #define PAGE_NOT_CACHEABLE_SHIFT        PAGE_CACHEABLE_SHIFT
    40 #define PAGE_PRESENT_SHIFT              1
    41 #define PAGE_NOT_PRESENT_SHIFT          PAGE_PRESENT_SHIFT
     39#define PAGE_NOT_PRESENT_SHIFT          1
    4240#define PAGE_USER_SHIFT                 2
    43 #define PAGE_KERNEL_SHIFT               PAGE_USER_SHIFT
    44 #define PAGE_READ_SHIFT                 3
    4541#define PAGE_WRITE_SHIFT                4
    4642#define PAGE_EXEC_SHIFT                 5
    4743#define PAGE_GLOBAL_SHIFT               6
    4844
    49 #define PAGE_NOT_CACHEABLE              (0 << PAGE_CACHEABLE_SHIFT)
    5045#define PAGE_CACHEABLE                  (1 << PAGE_CACHEABLE_SHIFT)
    51 
    52 #define PAGE_PRESENT                    (0 << PAGE_PRESENT_SHIFT)
    53 #define PAGE_NOT_PRESENT                (1 << PAGE_PRESENT_SHIFT)
    54 
     46#define PAGE_NOT_PRESENT                (1 << PAGE_NOT_PRESENT_SHIFT)
    5547#define PAGE_USER                       (1 << PAGE_USER_SHIFT)
    56 #define PAGE_KERNEL                     (0 << PAGE_USER_SHIFT)
    57 
    58 #define PAGE_READ                       (1 << PAGE_READ_SHIFT)
    5948#define PAGE_WRITE                      (1 << PAGE_WRITE_SHIFT)
    6049#define PAGE_EXEC                       (1 << PAGE_EXEC_SHIFT)
    61 
    6250#define PAGE_GLOBAL                     (1 << PAGE_GLOBAL_SHIFT)
    6351
Note: See TracChangeset for help on using the changeset viewer.