diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2004-07-02 13:20:46 +0100 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2004-07-02 13:20:46 +0100 |
| commit | 62054d49783cfe93c9cee9d90a0779f1f9054968 (patch) | |
| tree | 63234ac22723c76b84e629390fb230d499f41151 /include | |
| parent | 639b1a19248ed0aeb364f64fecbd24042a559bac (diff) | |
| parent | a2d708b887c8d932734f3c4ec600269f1252a3d1 (diff) | |
Merge cantab.net:/home/src/ntfs-2.6-devel
into cantab.net:/home/src/ntfs-2.6
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/pgtable.h | 22 | ||||
| -rw-r--r-- | include/asm-x86_64/bootsetup.h | 3 |
2 files changed, 23 insertions, 2 deletions
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index b95fedb5b32d..a22128c2604e 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h @@ -285,7 +285,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) * Chop off the NX bit (if present), and add the NX portion of * the newprot (if present): */ - pte.pte_high &= -1 ^ (1 << (_PAGE_BIT_NX - 32)); + pte.pte_high &= ~(1 << (_PAGE_BIT_NX - 32)); pte.pte_high |= (pgprot_val(newprot) >> 32) & \ (__supported_pte_mask >> 32); #endif @@ -344,6 +344,26 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) #define pte_offset_kernel(dir, address) \ ((pte_t *) pmd_page_kernel(*(dir)) + pte_index(address)) +/* + * Helper function that returns the kernel pagetable entry controlling + * the virtual address 'address'. NULL means no pagetable entry present. + * NOTE: the return type is pte_t but if the pmd is PSE then we return it + * as a pte too. + */ +extern pte_t *lookup_address(unsigned long address); + +/* + * Make a given kernel text page executable/non-executable. + * Returns the previous executability setting of that page (which + * is used to restore the previous state). Used by the SMP bootup code. + * NOTE: this is an __init function for security reasons. + */ +#ifdef CONFIG_X86_PAE + extern int set_kernel_exec(unsigned long vaddr, int enable); +#else + static inline int set_kernel_exec(unsigned long vaddr, int enable) { return 0;} +#endif + #if defined(CONFIG_HIGHPTE) #define pte_offset_map(dir, address) \ ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address)) diff --git a/include/asm-x86_64/bootsetup.h b/include/asm-x86_64/bootsetup.h index 8fe68a93b798..c7e76baaaccb 100644 --- a/include/asm-x86_64/bootsetup.h +++ b/include/asm-x86_64/bootsetup.h @@ -26,8 +26,9 @@ extern char x86_boot_params[2048]; #define INITRD_START (*(unsigned int *) (PARAM+0x218)) #define INITRD_SIZE (*(unsigned int *) (PARAM+0x21c)) #define EDID_INFO (*(struct edid_info *) (PARAM+0x440)) -#define DISK80_SIGNATURE (*(unsigned int*) (PARAM+DISK80_SIG_BUFFER)) #define EDD_NR (*(unsigned char *) (PARAM+EDDNR)) +#define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF)) +#define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF)) #define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF)) #define COMMAND_LINE saved_command_line |
