Skip to content

Commit

Permalink
alpha: compile fixes
Browse files Browse the repository at this point in the history
- jensen build: fix conflicting declarations for pci_alloc_consistent()
  and undefined virt_to_phys();

- SMP: arch/alpha/kernel/smp.c:124: warning: passing argument 2
       of '__cpu_test_and_set' discards qualifiers from pointer target type
  Interestingly, this only happens with gcc-4.2; gcc <= 4.1 and gcc-4.3
  are OK. Fixed with extra assignment.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Ivan Kokshaysky authored and Linus Torvalds committed Jan 30, 2009
1 parent e5d9a90 commit ee0c468
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions arch/alpha/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

#else /* no PCI - no IOMMU. */

#include <asm/io.h> /* for virt_to_phys() */

struct scatterlist;
void *dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t gfp);
Expand Down
3 changes: 2 additions & 1 deletion arch/alpha/kernel/pci-noop.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn,
/* Stubs for the routines in pci_iommu.c: */

void *
pci_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_addrp)
__pci_alloc_consistent(struct pci_dev *pdev, size_t size,
dma_addr_t *dma_addrp, gfp_t gfp)
{
return NULL;
}
Expand Down
3 changes: 2 additions & 1 deletion arch/alpha/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ void __cpuinit
smp_callin(void)
{
int cpuid = hard_smp_processor_id();
cpumask_t mask = cpu_online_map;

if (cpu_test_and_set(cpuid, cpu_online_map)) {
if (cpu_test_and_set(cpuid, mask)) {
printk("??, cpu 0x%x already present??\n", cpuid);
BUG();
}
Expand Down

0 comments on commit ee0c468

Please sign in to comment.