diff options
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/bootparam.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/device.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/dma-mapping.h | 9 | ||||
-rw-r--r-- | arch/x86/include/asm/kbdleds.h | 17 |
4 files changed, 29 insertions, 4 deletions
diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h index 2f90c51cc49..eb45aa6b1f2 100644 --- a/arch/x86/include/asm/bootparam.h +++ b/arch/x86/include/asm/bootparam.h | |||
@@ -112,7 +112,8 @@ struct boot_params { | |||
112 | __u8 e820_entries; /* 0x1e8 */ | 112 | __u8 e820_entries; /* 0x1e8 */ |
113 | __u8 eddbuf_entries; /* 0x1e9 */ | 113 | __u8 eddbuf_entries; /* 0x1e9 */ |
114 | __u8 edd_mbr_sig_buf_entries; /* 0x1ea */ | 114 | __u8 edd_mbr_sig_buf_entries; /* 0x1ea */ |
115 | __u8 _pad6[6]; /* 0x1eb */ | 115 | __u8 kbd_status; /* 0x1eb */ |
116 | __u8 _pad6[5]; /* 0x1ec */ | ||
116 | struct setup_header hdr; /* setup header */ /* 0x1f1 */ | 117 | struct setup_header hdr; /* setup header */ /* 0x1f1 */ |
117 | __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; | 118 | __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; |
118 | __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ | 119 | __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ |
diff --git a/arch/x86/include/asm/device.h b/arch/x86/include/asm/device.h index 63a2a03d7d5..93e1c55f14a 100644 --- a/arch/x86/include/asm/device.h +++ b/arch/x86/include/asm/device.h | |||
@@ -5,8 +5,8 @@ struct dev_archdata { | |||
5 | #ifdef CONFIG_ACPI | 5 | #ifdef CONFIG_ACPI |
6 | void *acpi_handle; | 6 | void *acpi_handle; |
7 | #endif | 7 | #endif |
8 | #ifdef CONFIG_X86_64 | 8 | #ifdef CONFIG_X86_DEV_DMA_OPS |
9 | struct dma_map_ops *dma_ops; | 9 | struct dma_map_ops *dma_ops; |
10 | #endif | 10 | #endif |
11 | #if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU) | 11 | #if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU) |
12 | void *iommu; /* hook for IOMMU specific extension */ | 12 | void *iommu; /* hook for IOMMU specific extension */ |
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 4b4331d7193..61c0bd25845 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h | |||
@@ -30,7 +30,7 @@ extern struct dma_map_ops *dma_ops; | |||
30 | 30 | ||
31 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) | 31 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) |
32 | { | 32 | { |
33 | #ifdef CONFIG_X86_32 | 33 | #ifndef CONFIG_X86_DEV_DMA_OPS |
34 | return dma_ops; | 34 | return dma_ops; |
35 | #else | 35 | #else |
36 | if (unlikely(!dev) || !dev->archdata.dma_ops) | 36 | if (unlikely(!dev) || !dev->archdata.dma_ops) |
@@ -62,6 +62,12 @@ extern void *dma_generic_alloc_coherent(struct device *dev, size_t size, | |||
62 | dma_addr_t *dma_addr, gfp_t flag, | 62 | dma_addr_t *dma_addr, gfp_t flag, |
63 | struct dma_attrs *attrs); | 63 | struct dma_attrs *attrs); |
64 | 64 | ||
65 | #ifdef CONFIG_X86_DMA_REMAP /* Platform code defines bridge-specific code */ | ||
66 | extern bool dma_capable(struct device *dev, dma_addr_t addr, size_t size); | ||
67 | extern dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr); | ||
68 | extern phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr); | ||
69 | #else | ||
70 | |||
65 | static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) | 71 | static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) |
66 | { | 72 | { |
67 | if (!dev->dma_mask) | 73 | if (!dev->dma_mask) |
@@ -79,6 +85,7 @@ static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) | |||
79 | { | 85 | { |
80 | return daddr; | 86 | return daddr; |
81 | } | 87 | } |
88 | #endif /* CONFIG_X86_DMA_REMAP */ | ||
82 | 89 | ||
83 | static inline void | 90 | static inline void |
84 | dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 91 | dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
diff --git a/arch/x86/include/asm/kbdleds.h b/arch/x86/include/asm/kbdleds.h new file mode 100644 index 00000000000..f27ac5ff597 --- /dev/null +++ b/arch/x86/include/asm/kbdleds.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef _ASM_X86_KBDLEDS_H | ||
2 | #define _ASM_X86_KBDLEDS_H | ||
3 | |||
4 | /* | ||
5 | * Some laptops take the 789uiojklm,. keys as number pad when NumLock is on. | ||
6 | * This seems a good reason to start with NumLock off. That's why on X86 we | ||
7 | * ask the bios for the correct state. | ||
8 | */ | ||
9 | |||
10 | #include <asm/setup.h> | ||
11 | |||
12 | static inline int kbd_defleds(void) | ||
13 | { | ||
14 | return boot_params.kbd_status & 0x20 ? (1 << VC_NUMLOCK) : 0; | ||
15 | } | ||
16 | |||
17 | #endif /* _ASM_X86_KBDLEDS_H */ | ||