* [PATCH] MIPS: Fix build failure for IP22
@ 2010-11-23 11:32 Dmitri Vorobiev
2010-11-23 12:05 ` Sergei Shtylyov
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Dmitri Vorobiev @ 2010-11-23 11:32 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Dmitri Vorobiev
Commit 48e1fd5a81416a037f5a48120bf281102f2584e2 changed the name
of the MIPS-specific dma_cache_sync() routine by prefixing it with
`mips_', and removed the export for its symbol. Two drivers, which
did use dma_cache_sync(), namely, sgiseeq and sgiwd93, were not
converted to use the new function, which led to build failure for
the IP22 platform.
This patch fixes the build failure by fixing the call sites of
mips_dma_cache_sync() and exporting the symbol for this routine as
a GPL symbol. While at it, some minor changes to improve Kconfig
help entries were done.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
---
arch/mips/include/asm/dma-mapping.h | 2 +-
arch/mips/mm/dma-default.c | 1 +
drivers/net/Kconfig | 3 +++
drivers/net/sgiseeq.c | 8 ++++----
drivers/scsi/Kconfig | 3 +++
drivers/scsi/sgiwd93.c | 2 +-
6 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h
index 655f849..ecf669d 100644
--- a/arch/mips/include/asm/dma-mapping.h
+++ b/arch/mips/include/asm/dma-mapping.h
@@ -52,7 +52,7 @@ dma_set_mask(struct device *dev, u64 mask)
return 0;
}
-extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
+extern void mips_dma_cache_sync(struct device *dev, void *vaddr, size_t size,
enum dma_data_direction direction);
static inline void *dma_alloc_coherent(struct device *dev, size_t size,
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index 4fc1a0f..114e9bb 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -297,6 +297,7 @@ void mips_dma_cache_sync(struct device *dev, void *vaddr, size_t size,
if (!plat_device_is_coherent(dev))
__dma_sync((unsigned long)vaddr, size, direction);
}
+EXPORT_SYMBOL_GPL(mips_dma_cache_sync);
static struct dma_map_ops mips_default_dma_map_ops = {
.alloc_coherent = mips_dma_alloc_coherent,
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index f6668cd..fe64edc 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1925,6 +1925,9 @@ config SGISEEQ
Say Y here if you have an Seeq based Ethernet network card. This is
used in many Silicon Graphics machines.
+ To compile this driver as a module, choose M here: the module
+ will be called sgiseeq.
+
config DECLANCE
tristate "DEC LANCE ethernet controller support"
depends on MACH_DECSTATION
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c
index 3a0cc63..6ecefd2 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -111,14 +111,14 @@ struct sgiseeq_private {
static inline void dma_sync_desc_cpu(struct net_device *dev, void *addr)
{
- dma_cache_sync(dev->dev.parent, addr, sizeof(struct sgiseeq_rx_desc),
- DMA_FROM_DEVICE);
+ mips_dma_cache_sync(dev->dev.parent, addr,
+ sizeof(struct sgiseeq_rx_desc), DMA_FROM_DEVICE);
}
static inline void dma_sync_desc_dev(struct net_device *dev, void *addr)
{
- dma_cache_sync(dev->dev.parent, addr, sizeof(struct sgiseeq_rx_desc),
- DMA_TO_DEVICE);
+ mips_dma_cache_sync(dev->dev.parent, addr,
+ sizeof(struct sgiseeq_rx_desc), DMA_TO_DEVICE);
}
static inline void hpc3_eth_reset(struct hpc3_ethregs *hregs)
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 8616496..2d868bf 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -390,6 +390,9 @@ config SGIWD93_SCSI
If you have a Western Digital WD93 SCSI controller on
an SGI MIPS system, say Y. Otherwise, say N.
+ To compile this driver as a module, choose M here: the
+ module will be called sgiwd93.
+
config BLK_DEV_3W_XXXX_RAID
tristate "3ware 5/6/7/8xxx ATA-RAID support"
depends on PCI && SCSI
diff --git a/drivers/scsi/sgiwd93.c b/drivers/scsi/sgiwd93.c
index fef0e3c..be9fc40 100644
--- a/drivers/scsi/sgiwd93.c
+++ b/drivers/scsi/sgiwd93.c
@@ -95,7 +95,7 @@ void fill_hpc_entries(struct ip22_hostdata *hd, struct scsi_cmnd *cmd, int din)
*/
hcp->desc.pbuf = 0;
hcp->desc.cntinfo = HPCDMA_EOX;
- dma_cache_sync(hd->dev, hd->cpu,
+ mips_dma_cache_sync(hd->dev, hd->cpu,
(unsigned long)(hcp + 1) - (unsigned long)hd->cpu,
DMA_TO_DEVICE);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] MIPS: Fix build failure for IP22
2010-11-23 11:32 [PATCH] MIPS: Fix build failure for IP22 Dmitri Vorobiev
@ 2010-11-23 12:05 ` Sergei Shtylyov
2010-11-23 17:11 ` Thomas Bogendoerfer
2010-12-09 18:46 ` Ralf Baechle
2 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2010-11-23 12:05 UTC (permalink / raw)
To: Dmitri Vorobiev; +Cc: linux-mips, ralf
Hello.
On 23-11-2010 14:32, Dmitri Vorobiev wrote:
> Commit 48e1fd5a81416a037f5a48120bf281102f2584e2 changed the name
Linus has asled to also specify the commit summary in parens.
> of the MIPS-specific dma_cache_sync() routine by prefixing it with
> `mips_', and removed the export for its symbol. Two drivers, which
> did use dma_cache_sync(), namely, sgiseeq and sgiwd93, were not
> converted to use the new function, which led to build failure for
> the IP22 platform.
> This patch fixes the build failure by fixing the call sites of
> mips_dma_cache_sync() and exporting the symbol for this routine as
> a GPL symbol. While at it, some minor changes to improve Kconfig
> help entries were done.
> Signed-off-by: Dmitri Vorobiev<dmitri.vorobiev@movial.com>
[...]
> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index f6668cd..fe64edc 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -1925,6 +1925,9 @@ config SGISEEQ
> Say Y here if you have an Seeq based Ethernet network card. This is
> used in many Silicon Graphics machines.
>
> + To compile this driver as a module, choose M here: the module
> + will be called sgiseeq.
> +
This change is not metioned in the patch description...
> diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
> index 8616496..2d868bf 100644
> --- a/drivers/scsi/Kconfig
> +++ b/drivers/scsi/Kconfig
> @@ -390,6 +390,9 @@ config SGIWD93_SCSI
> If you have a Western Digital WD93 SCSI controller on
> an SGI MIPS system, say Y. Otherwise, say N.
>
> + To compile this driver as a module, choose M here: the
> + module will be called sgiwd93.
> +
This change is not metioned in the patch description...
> diff --git a/drivers/scsi/sgiwd93.c b/drivers/scsi/sgiwd93.c
> index fef0e3c..be9fc40 100644
> --- a/drivers/scsi/sgiwd93.c
> +++ b/drivers/scsi/sgiwd93.c
> @@ -95,7 +95,7 @@ void fill_hpc_entries(struct ip22_hostdata *hd, struct scsi_cmnd *cmd, int din)
> */
> hcp->desc.pbuf = 0;
> hcp->desc.cntinfo = HPCDMA_EOX;
> - dma_cache_sync(hd->dev, hd->cpu,
> + mips_dma_cache_sync(hd->dev, hd->cpu,
> (unsigned long)(hcp + 1) - (unsigned long)hd->cpu,
> DMA_TO_DEVICE);
Don't you want to move the aboev 2 lines to the right also? You're
breaking the existing alignments and leaving alignment spaces intact...
WBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] MIPS: Fix build failure for IP22
2010-11-23 11:32 [PATCH] MIPS: Fix build failure for IP22 Dmitri Vorobiev
2010-11-23 12:05 ` Sergei Shtylyov
@ 2010-11-23 17:11 ` Thomas Bogendoerfer
2010-12-09 18:46 ` Ralf Baechle
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Bogendoerfer @ 2010-11-23 17:11 UTC (permalink / raw)
To: Dmitri Vorobiev; +Cc: linux-mips, ralf
On Tue, Nov 23, 2010 at 01:32:28PM +0200, Dmitri Vorobiev wrote:
> Commit 48e1fd5a81416a037f5a48120bf281102f2584e2 changed the name
> of the MIPS-specific dma_cache_sync() routine by prefixing it with
> `mips_', and removed the export for its symbol. Two drivers, which
Glancing at the mentioned patch IMHO it's better to use dma_sync_for_cpu/device
This way we could kill mips_dma_cache_sync() completely.
Thomas
--
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: Fix build failure for IP22
2010-11-23 11:32 [PATCH] MIPS: Fix build failure for IP22 Dmitri Vorobiev
2010-11-23 12:05 ` Sergei Shtylyov
2010-11-23 17:11 ` Thomas Bogendoerfer
@ 2010-12-09 18:46 ` Ralf Baechle
2010-12-09 20:34 ` Dmitri Vorobiev
2 siblings, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2010-12-09 18:46 UTC (permalink / raw)
To: Dmitri Vorobiev; +Cc: linux-mips
On Tue, Nov 23, 2010 at 01:32:28PM +0200, Dmitri Vorobiev wrote:
> Commit 48e1fd5a81416a037f5a48120bf281102f2584e2 changed the name
> of the MIPS-specific dma_cache_sync() routine by prefixing it with
> `mips_', and removed the export for its symbol. Two drivers, which
> did use dma_cache_sync(), namely, sgiseeq and sgiwd93, were not
> converted to use the new function, which led to build failure for
> the IP22 platform.
>
> This patch fixes the build failure by fixing the call sites of
> mips_dma_cache_sync() and exporting the symbol for this routine as
> a GPL symbol. While at it, some minor changes to improve Kconfig
> help entries were done.
dma_cache_sync isn't MIPS specific - mips_dma_cache_sync is but the
function wasn't renamed everywhere. Looking into what went wrong now
but your patch surely is not correct.
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: Fix build failure for IP22
2010-12-09 18:46 ` Ralf Baechle
@ 2010-12-09 20:34 ` Dmitri Vorobiev
0 siblings, 0 replies; 5+ messages in thread
From: Dmitri Vorobiev @ 2010-12-09 20:34 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Dmitri Vorobiev, linux-mips
On Thu, Dec 9, 2010 at 8:46 PM, Ralf Baechle <ralf@linux-mips.org> wrote:
> On Tue, Nov 23, 2010 at 01:32:28PM +0200, Dmitri Vorobiev wrote:
>
>> Commit 48e1fd5a81416a037f5a48120bf281102f2584e2 changed the name
>> of the MIPS-specific dma_cache_sync() routine by prefixing it with
>> `mips_', and removed the export for its symbol. Two drivers, which
>> did use dma_cache_sync(), namely, sgiseeq and sgiwd93, were not
>> converted to use the new function, which led to build failure for
>> the IP22 platform.
>>
>> This patch fixes the build failure by fixing the call sites of
>> mips_dma_cache_sync() and exporting the symbol for this routine as
>> a GPL symbol. While at it, some minor changes to improve Kconfig
>> help entries were done.
>
> dma_cache_sync isn't MIPS specific - mips_dma_cache_sync is but the
> function wasn't renamed everywhere. Looking into what went wrong now
> but your patch surely is not correct.
OK, the main thing would be that the build failure be fixed. Thanks
for looking into that.
Dmitri
>
> Ralf
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-09 20:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-23 11:32 [PATCH] MIPS: Fix build failure for IP22 Dmitri Vorobiev
2010-11-23 12:05 ` Sergei Shtylyov
2010-11-23 17:11 ` Thomas Bogendoerfer
2010-12-09 18:46 ` Ralf Baechle
2010-12-09 20:34 ` Dmitri Vorobiev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.