aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 16:56:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 16:56:39 -0400
commitd3ec4844d449cf7af9e749f73ba2052fb7b72fc2 (patch)
treec515913e85f7e50878c83da2a88bc5a7269d087c /arch/sparc
parent0003230e8200699860f0b10af524dc47bf8aecad (diff)
parentdf2e301fee3c2c2a87592151397ad7699bb14c37 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) fs: Merge split strings treewide: fix potentially dangerous trailing ';' in #defined values/expressions uwb: Fix misspelling of neighbourhood in comment net, netfilter: Remove redundant goto in ebt_ulog_packet trivial: don't touch files that are removed in the staging tree lib/vsprintf: replace link to Draft by final RFC number doc: Kconfig: `to be' -> `be' doc: Kconfig: Typo: square -> squared doc: Konfig: Documentation/power/{pm => apm-acpi}.txt drivers/net: static should be at beginning of declaration drivers/media: static should be at beginning of declaration drivers/i2c: static should be at beginning of declaration XTENSA: static should be at beginning of declaration SH: static should be at beginning of declaration MIPS: static should be at beginning of declaration ARM: static should be at beginning of declaration rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check Update my e-mail address PCIe ASPM: forcedly -> forcibly gma500: push through device driver tree ... Fix up trivial conflicts: - arch/arm/mach-ep93xx/dma-m2p.c (deleted) - drivers/gpio/gpio-ep93xx.c (renamed and context nearby) - drivers/net/r8169.c (just context changes)
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/elf_64.h2
-rw-r--r--arch/sparc/kernel/ioport.c12
-rw-r--r--arch/sparc/kernel/pci.c6
3 files changed, 9 insertions, 11 deletions
diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h
index e67880381b84..cfa9cd2e5519 100644
--- a/arch/sparc/include/asm/elf_64.h
+++ b/arch/sparc/include/asm/elf_64.h
@@ -186,7 +186,7 @@ static inline unsigned int sparc64_elf_hwcap(void)
186 return cap; 186 return cap;
187} 187}
188 188
189#define ELF_HWCAP sparc64_elf_hwcap(); 189#define ELF_HWCAP sparc64_elf_hwcap()
190 190
191/* This yields a string that ld.so will use to load implementation 191/* This yields a string that ld.so will use to load implementation
192 specific libraries for optimization. This is more specific in 192 specific libraries for optimization. This is more specific in
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 1c9c80a1a86a..6ffccd6e0156 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -228,7 +228,7 @@ _sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz)
228 } 228 }
229 229
230 pa &= PAGE_MASK; 230 pa &= PAGE_MASK;
231 sparc_mapiorange(bus, pa, res->start, res->end - res->start + 1); 231 sparc_mapiorange(bus, pa, res->start, resource_size(res));
232 232
233 return (void __iomem *)(unsigned long)(res->start + offset); 233 return (void __iomem *)(unsigned long)(res->start + offset);
234} 234}
@@ -240,7 +240,7 @@ static void _sparc_free_io(struct resource *res)
240{ 240{
241 unsigned long plen; 241 unsigned long plen;
242 242
243 plen = res->end - res->start + 1; 243 plen = resource_size(res);
244 BUG_ON((plen & (PAGE_SIZE-1)) != 0); 244 BUG_ON((plen & (PAGE_SIZE-1)) != 0);
245 sparc_unmapiorange(res->start, plen); 245 sparc_unmapiorange(res->start, plen);
246 release_resource(res); 246 release_resource(res);
@@ -331,9 +331,9 @@ static void sbus_free_coherent(struct device *dev, size_t n, void *p,
331 } 331 }
332 332
333 n = PAGE_ALIGN(n); 333 n = PAGE_ALIGN(n);
334 if ((res->end-res->start)+1 != n) { 334 if (resource_size(res) != n) {
335 printk("sbus_free_consistent: region 0x%lx asked 0x%zx\n", 335 printk("sbus_free_consistent: region 0x%lx asked 0x%zx\n",
336 (long)((res->end-res->start)+1), n); 336 (long)resource_size(res), n);
337 return; 337 return;
338 } 338 }
339 339
@@ -504,9 +504,9 @@ static void pci32_free_coherent(struct device *dev, size_t n, void *p,
504 } 504 }
505 505
506 n = PAGE_ALIGN(n); 506 n = PAGE_ALIGN(n);
507 if ((res->end-res->start)+1 != n) { 507 if (resource_size(res) != n) {
508 printk("pci_free_consistent: region 0x%lx asked 0x%lx\n", 508 printk("pci_free_consistent: region 0x%lx asked 0x%lx\n",
509 (long)((res->end-res->start)+1), (long)n); 509 (long)resource_size(res), (long)n);
510 return; 510 return;
511 } 511 }
512 512
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 80a87e2a3e7c..1e94f946570e 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -820,11 +820,9 @@ static int __pci_mmap_make_offset_bus(struct pci_dev *pdev, struct vm_area_struc
820 unsigned long space_size, user_offset, user_size; 820 unsigned long space_size, user_offset, user_size;
821 821
822 if (mmap_state == pci_mmap_io) { 822 if (mmap_state == pci_mmap_io) {
823 space_size = (pbm->io_space.end - 823 space_size = resource_size(&pbm->io_space);
824 pbm->io_space.start) + 1;
825 } else { 824 } else {
826 space_size = (pbm->mem_space.end - 825 space_size = resource_size(&pbm->mem_space);
827 pbm->mem_space.start) + 1;
828 } 826 }
829 827
830 /* Make sure the request is in range. */ 828 /* Make sure the request is in range. */