Commit 5c6af69abe9436c33b82a13623b38a4cc51e6464
Committed by
Linus Torvalds
1 parent
ebaf4fc13e
Exists in
master
and in
7 other branches
fix alpha ISA support
isa_bus_to_virt() is still needed in a few places (lance.c, at least). When we switch the kernel to using -Werror-implicit-function-declaration, the lack of isa_bus_to_virt() breaks alpha allmodconfig builds. Add isa_bus_to_virt() and deprecate the ezisting ISA APIs, though it might be better to define these functions as BUG(), since virt_to_bus/bus_to_virt just do wrong things on a number of machines. [akpm@linux-foundation.org: build fix] Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 10 additions and 3 deletions Side-by-side Diff
include/asm-alpha/io.h
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | #ifdef __KERNEL__ |
5 | 5 | |
6 | 6 | #include <linux/kernel.h> |
7 | +#include <linux/mm.h> | |
7 | 8 | #include <asm/compiler.h> |
8 | 9 | #include <asm/system.h> |
9 | 10 | #include <asm/pgtable.h> |
... | ... | @@ -90,6 +91,11 @@ |
90 | 91 | |
91 | 92 | #define page_to_phys(page) page_to_pa(page) |
92 | 93 | |
94 | +static inline dma_addr_t __deprecated isa_page_to_bus(struct page *page) | |
95 | +{ | |
96 | + return page_to_phys(page); | |
97 | +} | |
98 | + | |
93 | 99 | /* This depends on working iommu. */ |
94 | 100 | #define BIO_VMERGE_BOUNDARY (alpha_mv.mv_pci_tbi ? PAGE_SIZE : 0) |
95 | 101 | |
96 | 102 | |
... | ... | @@ -102,12 +108,12 @@ |
102 | 108 | * |
103 | 109 | * Note that this only works for a limited range of kernel addresses, |
104 | 110 | * and very well may not span all memory. Consider this interface |
105 | - * deprecated in favour of the mapping functions in <asm/pci.h>. | |
111 | + * deprecated in favour of the DMA-mapping API. | |
106 | 112 | */ |
107 | 113 | extern unsigned long __direct_map_base; |
108 | 114 | extern unsigned long __direct_map_size; |
109 | 115 | |
110 | -static inline unsigned long virt_to_bus(void *address) | |
116 | +static inline unsigned long __deprecated virt_to_bus(void *address) | |
111 | 117 | { |
112 | 118 | unsigned long phys = virt_to_phys(address); |
113 | 119 | unsigned long bus = phys + __direct_map_base; |
... | ... | @@ -115,7 +121,7 @@ |
115 | 121 | } |
116 | 122 | #define isa_virt_to_bus virt_to_bus |
117 | 123 | |
118 | -static inline void *bus_to_virt(unsigned long address) | |
124 | +static inline void * __deprecated bus_to_virt(unsigned long address) | |
119 | 125 | { |
120 | 126 | void *virt; |
121 | 127 | |
... | ... | @@ -126,6 +132,7 @@ |
126 | 132 | virt = phys_to_virt(address); |
127 | 133 | return (long)address <= 0 ? NULL : virt; |
128 | 134 | } |
135 | +#define isa_bus_to_virt bus_to_virt | |
129 | 136 | |
130 | 137 | /* |
131 | 138 | * There are different chipsets to interface the Alpha CPUs to the world. |