From: David S. Miller Date: Sat, 12 Sep 2009 03:35:13 +0000 (-0700) Subject: Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ X-Git-Tag: v2.6.32-rc1~702^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=cabc5c0f7fa1342049042d6e147db5a73773955b;p=linux.git Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ Conflicts: arch/sparc/Kconfig --- cabc5c0f7fa1342049042d6e147db5a73773955b diff --cc arch/sparc/Kconfig index 2aa7cd39b481,233cff53a623..2bd5c287538a --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@@ -25,7 -25,8 +25,9 @@@ config SPAR select ARCH_WANT_OPTIONAL_GPIOLIB select RTC_CLASS select RTC_DRV_M48T59 + select HAVE_PERF_COUNTERS + select HAVE_DMA_ATTRS + select HAVE_DMA_API_DEBUG config SPARC32 def_bool !64BIT diff --cc arch/sparc/kernel/ioport.c index e71ce79d8c15,edbea232c617..9f61fd8cbb7b --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c @@@ -659,19 -638,64 +639,59 @@@ static void pci32_sync_sg_for_device(st } } } - EXPORT_SYMBOL(pci_dma_sync_sg_for_device); + + struct dma_map_ops pci32_dma_ops = { + .alloc_coherent = pci32_alloc_coherent, + .free_coherent = pci32_free_coherent, + .map_page = pci32_map_page, + .map_sg = pci32_map_sg, + .unmap_sg = pci32_unmap_sg, + .sync_single_for_cpu = pci32_sync_single_for_cpu, + .sync_single_for_device = pci32_sync_single_for_device, + .sync_sg_for_cpu = pci32_sync_sg_for_cpu, + .sync_sg_for_device = pci32_sync_sg_for_device, + }; + EXPORT_SYMBOL(pci32_dma_ops); + #endif /* CONFIG_PCI */ + /* + * Return whether the given PCI device DMA address mask can be + * supported properly. For example, if your device can only drive the + * low 24-bits during PCI bus mastering, then you would pass + * 0x00ffffff as the mask to this function. + */ + int dma_supported(struct device *dev, u64 mask) + { + #ifdef CONFIG_PCI + if (dev->bus == &pci_bus_type) + return 1; + #endif + return 0; + } + EXPORT_SYMBOL(dma_supported); + + int dma_set_mask(struct device *dev, u64 dma_mask) + { + #ifdef CONFIG_PCI + if (dev->bus == &pci_bus_type) + return pci_set_dma_mask(to_pci_dev(dev), dma_mask); + #endif + return -EOPNOTSUPP; + } + EXPORT_SYMBOL(dma_set_mask); + + #ifdef CONFIG_PROC_FS -static int -_sparc_io_get_info(char *buf, char **start, off_t fpos, int length, int *eof, - void *data) +static int sparc_io_proc_show(struct seq_file *m, void *v) { - char *p = buf, *e = buf + length; - struct resource *r; + struct resource *root = m->private, *r; const char *nm; - for (r = ((struct resource *)data)->child; r != NULL; r = r->sibling) { - if (p + 32 >= e) /* Better than nothing */ - break; + for (r = root->child; r != NULL; r = r->sibling) { if ((nm = r->name) == 0) nm = "???"; - p += sprintf(p, "%016llx-%016llx: %s\n", + seq_printf(m, "%016llx-%016llx: %s\n", (unsigned long long)r->start, (unsigned long long)r->end, nm); }