]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Michal Marek <mmarek@suse.cz> |
2 | Subject: preserve the kabi checksum of dma_get_required_mask on ia64 | |
3 | ||
4 | Signed-off-by: Michal Marek <mmarek@suse.cz> | |
5 | Signed-off-by: Jeff Mahoney <jeffm@suse.com> | |
6 | ||
7 | --- | |
8 | arch/ia64/include/asm/machvec.h | 8 +++++--- | |
9 | arch/ia64/pci/pci.c | 22 +++++++++++----------- | |
10 | drivers/base/platform.c | 9 +++++++++ | |
11 | 3 files changed, 25 insertions(+), 14 deletions(-) | |
12 | ||
13 | --- a/arch/ia64/include/asm/machvec.h | |
14 | +++ b/arch/ia64/include/asm/machvec.h | |
15 | @@ -210,7 +210,6 @@ struct ia64_machine_vector { | |
16 | ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device; | |
17 | ia64_mv_dma_mapping_error *dma_mapping_error; | |
18 | ia64_mv_dma_supported *dma_supported; | |
19 | - ia64_mv_dma_get_required_mask *dma_get_required_mask; | |
20 | ia64_mv_irq_to_vector *irq_to_vector; | |
21 | ia64_mv_local_vector_to_irq *local_vector_to_irq; | |
22 | ia64_mv_pci_get_legacy_mem_t *pci_get_legacy_mem; | |
23 | @@ -236,6 +235,9 @@ struct ia64_machine_vector { | |
24 | ia64_mv_teardown_msi_irq_t *teardown_msi_irq; | |
25 | ia64_mv_pci_fixup_bus_t *pci_fixup_bus; | |
26 | ia64_mv_kernel_launch_event_t *kernel_launch_event; | |
27 | +#ifndef __GENKSYMS__ | |
28 | + ia64_mv_dma_get_required_mask *dma_get_required_mask; | |
29 | +#endif | |
30 | } __attribute__((__aligned__(16))); /* align attrib? see above comment */ | |
31 | ||
32 | #define MACHVEC_INIT(name) \ | |
33 | @@ -261,7 +263,6 @@ struct ia64_machine_vector { | |
34 | platform_dma_sync_sg_for_device, \ | |
35 | platform_dma_mapping_error, \ | |
36 | platform_dma_supported, \ | |
37 | - platform_dma_get_required_mask, \ | |
38 | platform_irq_to_vector, \ | |
39 | platform_local_vector_to_irq, \ | |
40 | platform_pci_get_legacy_mem, \ | |
41 | @@ -286,7 +287,8 @@ struct ia64_machine_vector { | |
42 | platform_setup_msi_irq, \ | |
43 | platform_teardown_msi_irq, \ | |
44 | platform_pci_fixup_bus, \ | |
45 | - platform_kernel_launch_event \ | |
46 | + platform_kernel_launch_event, \ | |
47 | + platform_dma_get_required_mask \ | |
48 | } | |
49 | ||
50 | extern struct ia64_machine_vector ia64_mv; | |
51 | --- a/arch/ia64/pci/pci.c | |
52 | +++ b/arch/ia64/pci/pci.c | |
53 | @@ -19,7 +19,6 @@ | |
54 | #include <linux/ioport.h> | |
55 | #include <linux/slab.h> | |
56 | #include <linux/spinlock.h> | |
57 | -#include <linux/bootmem.h> | |
58 | ||
59 | #include <asm/machvec.h> | |
60 | #include <asm/page.h> | |
61 | @@ -744,6 +743,16 @@ static void __init set_pci_cacheline_siz | |
62 | pci_cache_line_size = (1 << cci.pcci_line_size) / 4; | |
63 | } | |
64 | ||
65 | +static int __init pcibios_init(void) | |
66 | +{ | |
67 | + set_pci_cacheline_size(); | |
68 | + return 0; | |
69 | +} | |
70 | + | |
71 | +subsys_initcall(pcibios_init); | |
72 | + | |
73 | +#include <linux/bootmem.h> | |
74 | + | |
75 | u64 ia64_dma_get_required_mask(struct device *dev) | |
76 | { | |
77 | u32 low_totalram = ((max_pfn - 1) << PAGE_SHIFT); | |
78 | @@ -764,16 +773,7 @@ u64 ia64_dma_get_required_mask(struct de | |
79 | } | |
80 | EXPORT_SYMBOL_GPL(ia64_dma_get_required_mask); | |
81 | ||
82 | -u64 dma_get_required_mask(struct device *dev) | |
83 | +u64 ia64_dma_get_required_mask_wrapper(struct device *dev) | |
84 | { | |
85 | return platform_dma_get_required_mask(dev); | |
86 | } | |
87 | -EXPORT_SYMBOL_GPL(dma_get_required_mask); | |
88 | - | |
89 | -static int __init pcibios_init(void) | |
90 | -{ | |
91 | - set_pci_cacheline_size(); | |
92 | - return 0; | |
93 | -} | |
94 | - | |
95 | -subsys_initcall(pcibios_init); | |
96 | --- a/drivers/base/platform.c | |
97 | +++ b/drivers/base/platform.c | |
98 | @@ -931,4 +931,13 @@ u64 dma_get_required_mask(struct device | |
99 | return mask; | |
100 | } | |
101 | EXPORT_SYMBOL_GPL(dma_get_required_mask); | |
102 | +#else | |
103 | +#ifdef __ia64__ | |
104 | +u64 ia64_dma_get_required_mask_wrapper(struct device *dev); | |
105 | +u64 dma_get_required_mask(struct device *dev) | |
106 | +{ | |
107 | + return ia64_dma_get_required_mask_wrapper(dev); | |
108 | +} | |
109 | +EXPORT_SYMBOL_GPL(dma_get_required_mask); | |
110 | +#endif | |
111 | #endif |