diff options
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/bootparam.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/e820.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/io.h | 38 |
3 files changed, 25 insertions, 20 deletions
diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h index 6aba614361..0386cbeca5 100644 --- a/arch/x86/include/asm/bootparam.h +++ b/arch/x86/include/asm/bootparam.h @@ -111,7 +111,7 @@ struct boot_params { struct setup_header hdr; /* setup header */ /* 0x1f1 */ __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ - struct e820entry e820_map[E820MAX]; /* 0x2d0 */ + struct e820_entry e820_map[E820MAX]; /* 0x2d0 */ __u8 _pad8[48]; /* 0xcd0 */ struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */ __u8 _pad9[276]; /* 0xeec */ diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h index 351f02107e..9d29f82f97 100644 --- a/arch/x86/include/asm/e820.h +++ b/arch/x86/include/asm/e820.h @@ -12,7 +12,7 @@ #ifndef __ASSEMBLY__ #include <linux/types.h> -struct e820entry { +struct e820_entry { __u64 addr; /* start of memory segment */ __u64 size; /* size of memory segment */ __u32 type; /* type of memory segment */ @@ -24,6 +24,7 @@ struct e820entry { #endif /* __ASSEMBLY__ */ /* Implementation defined function to install an e820 map */ -unsigned install_e820_map(unsigned max_entries, struct e820entry *); +unsigned int install_e820_map(unsigned int max_entries, + struct e820_entry *); #endif /* _ASM_X86_E820_H */ diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 263dd8fd17..d1aaa5fc78 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -61,49 +61,53 @@ #define readb(addr) (*(volatile unsigned char *) (addr)) #define readw(addr) (*(volatile unsigned short *) (addr)) #define readl(addr) (*(volatile unsigned int *) (addr)) +#define readq(addr) (*(volatile unsigned long long *) (addr)) #define __raw_readb readb #define __raw_readw readw #define __raw_readl readl +#define __raw_readq readq #define writeb(b,addr) (*(volatile unsigned char *) (addr) = (b)) #define writew(b,addr) (*(volatile unsigned short *) (addr) = (b)) #define writel(b,addr) (*(volatile unsigned int *) (addr) = (b)) +#define writeq(b,addr) (*(volatile unsigned long long *) (addr) = (b)) #define __raw_writeb writeb #define __raw_writew writew #define __raw_writel writel +#define __raw_writeq writeq #define memset_io(a,b,c) memset((a),(b),(c)) #define memcpy_fromio(a,b,c) memcpy((a),(b),(c)) #define memcpy_toio(a,b,c) memcpy((a),(b),(c)) -#define write_arch(type, endian, a, v) __raw_write##type(cpu_to_##endian(v), a) -#define read_arch(type, endian, a) endian##_to_cpu(__raw_read##type(a)) +#define out_arch(type, endian, a, v) __raw_write##type(cpu_to_##endian(v), a) +#define in_arch(type, endian, a) endian##_to_cpu(__raw_read##type(a)) -#define write_le64(a, v) write_arch(q, le64, a, v) -#define write_le32(a, v) write_arch(l, le32, a, v) -#define write_le16(a, v) write_arch(w, le16, a, v) +#define out_le64(a, v) out_arch(q, le64, a, v) +#define out_le32(a, v) out_arch(l, le32, a, v) +#define out_le16(a, v) out_arch(w, le16, a, v) -#define read_le64(a) read_arch(q, le64, a) -#define read_le32(a) read_arch(l, le32, a) -#define read_le16(a) read_arch(w, le16, a) +#define in_le64(a) in_arch(q, le64, a) +#define in_le32(a) in_arch(l, le32, a) +#define in_le16(a) in_arch(w, le16, a) -#define write_be32(a, v) write_arch(l, be32, a, v) -#define write_be16(a, v) write_arch(w, be16, a, v) +#define out_be32(a, v) out_arch(l, be32, a, v) +#define out_be16(a, v) out_arch(w, be16, a, v) -#define read_be32(a) read_arch(l, be32, a) -#define read_be16(a) read_arch(w, be16, a) +#define in_be32(a) in_arch(l, be32, a) +#define in_be16(a) in_arch(w, be16, a) -#define write_8(a, v) __raw_writeb(v, a) -#define read_8(a) __raw_readb(a) +#define out_8(a, v) __raw_writeb(v, a) +#define in_8(a) __raw_readb(a) #define clrbits(type, addr, clear) \ - write_##type((addr), read_##type(addr) & ~(clear)) + out_##type((addr), in_##type(addr) & ~(clear)) #define setbits(type, addr, set) \ - write_##type((addr), read_##type(addr) | (set)) + out_##type((addr), in_##type(addr) | (set)) #define clrsetbits(type, addr, clear, set) \ - write_##type((addr), (read_##type(addr) & ~(clear)) | (set)) + out_##type((addr), (in_##type(addr) & ~(clear)) | (set)) #define clrbits_be32(addr, clear) clrbits(be32, addr, clear) #define setbits_be32(addr, set) setbits(be32, addr, set) |