<commit_before><commit_msg>some MACRO for page entry permission<commit_after>#ifndef __MMU_H__
#define __MMU_H__

// accesss permission AP
#define AP_SHIFT 10
#define AP_NA    0x00 // no access
#define AP_KO    0x01 // kernel only
#define AP_KUR   0x02 // user write only
#define AP_KU    0x03 // access

// page entry other permission
#define PE_CACHE (1 << 3) // cachable
#define PE_BUF   (1 << 2) // bufferable

// 1st level
#define PGD_SHIFT 20
#define PGD_SIZE (1 << PGD_SHIFT)
#define PGD_MASK (PGD_SIZE - 1)
#define PGD_INDEX(v) ((uint)(v) >> PGD_SHIFT)

// 2nd level
#define PTE_SHIFT 12
#define PTE_SIZE (1 << PTE_SHIFT)

#endif

{'fraction_non_alphanumeric': 0.11128526645768025, 'fraction_numerical': 0.04231974921630094, 'mean_word_length': 3.840909090909091, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5786199', 'n_tokens_mistral': 259, 'n_tokens_neox': 242, 'n_words': 76}