On Wed, Jul 25, 2012 at 01:18:39AM -0700, Joe Perches wrote:
> On Wed, 2012-07-25 at 16:06 +0800, Fengguang Wu wrote:
> > The macro name is too generic and conflicts with
> > snd_soc_dai_link.platform_name, which triggers lots of ALSA build errors.
> 
> Is platform_name particularly special?
> 
> Perhaps it's be better to rename all the other
> platform_<foo> uses to ia64_platform_<foo>

That's good point in general, oh well I just wanted to make the minimal change..

> []
> 
> > diff --git a/arch/ia64/include/asm/machvec.h 
> > b/arch/ia64/include/asm/machvec.h
> []
> > @@ -120,7 +120,7 @@ extern void machvec_tlb_migrate_finish (struct 
> > mm_struct *);
> >  # ifdef MACHVEC_PLATFORM_HEADER
> >  #  include MACHVEC_PLATFORM_HEADER
> >  # else
> > -#  define platform_name            ia64_mv.name
> > +#  define ia64_platform_name       ia64_mv.name
> >  #  define platform_setup   ia64_mv.setup
> >  #  define platform_cpu_init        ia64_mv.cpu_init
> >  #  define platform_irq_init        ia64_mv.irq_init
> 
> Maybe something like:
> 
> $ git ls-files arch/ia64 | \
>   xargs sed -r -i 's/\bplatform_([a-z_]+)\b/ia64_platform_\1/g'

Thanks! To avoid some undesired changes, I ended up with the below script :)

Thanks,
Fengguang
---
>From a099f447c2718ee9416dbdb24dd18789ebabfc5c Mon Sep 17 00:00:00 2001
From: Fengguang Wu <fengguang...@intel.com>
Date: Wed, 25 Jul 2012 20:24:28 +0800
Subject: [PATCH] ia64: rename platform_* to ia64_platform_*

The macro names are a bit too generic. In particular, platform_name
conflicts with snd_soc_dai_link.platform_name, which triggers lots of
ALSA build errors.

Generated by script, manual fixed indents and compile tested.

sed -r -i 
's/\b(platform_name|platform_pci_fixup|platform_setup|platform_cpu_init|platform_irq_init|platform_send_ipi|platform_timer_interrupt|platform_global_tlb_purge|platform_tlb_migrate_finish|platform_dma_init|platform_dma_get_required_mask|platform_dma_get_ops|platform_irq_to_vector|platform_local_vector_to_irq|platform_pci_get_legacy_mem|platform_pci_legacy_read|platform_pci_legacy_write|platform_inb|platform_inw|platform_inl|platform_outb|platform_outw|platform_outl|platform_mmiowb|platform_readb|platform_readw|platform_readl|platform_readq|platform_readb_relaxed|platform_readw_relaxed|platform_readl_relaxed|platform_readq_relaxed|platform_migrate|platform_setup_msi_irq|platform_teardown_msi_irq|platform_pci_fixup_bus|platform_kernel_launch_event)\b/ia64_\1/g'
 $(grep -r --files-with-matches '\<platform_' arch/ia64)

Suggested-by: Joe Perches <j...@perches.com>
Signed-off-by: Fengguang Wu <fengguang...@intel.com>
---
 arch/ia64/include/asm/dma-mapping.h           |   10 +-
 arch/ia64/include/asm/hw_irq.h                |    6 +-
 arch/ia64/include/asm/io.h                    |   42 ++--
 arch/ia64/include/asm/machvec.h               |  282 ++++++++++++-------------
 arch/ia64/include/asm/machvec_dig.h           |    4 +-
 arch/ia64/include/asm/machvec_dig_vtd.h       |    6 +-
 arch/ia64/include/asm/machvec_hpsim.h         |   10 +-
 arch/ia64/include/asm/machvec_hpzx1.h         |    6 +-
 arch/ia64/include/asm/machvec_hpzx1_swiotlb.h |   12 +-
 arch/ia64/include/asm/machvec_sn2.h           |  128 +++++------
 arch/ia64/include/asm/machvec_uv.h            |    6 +-
 arch/ia64/include/asm/machvec_xen.h           |   10 +-
 arch/ia64/include/asm/pci.h                   |    6 +-
 arch/ia64/include/asm/processor.h             |    2 +-
 arch/ia64/include/asm/switch_to.h             |    2 +-
 arch/ia64/include/asm/tlb.h                   |    2 +-
 arch/ia64/kernel/iosapic.c                    |    6 +-
 arch/ia64/kernel/irq_ia64.c                   |    7 +-
 arch/ia64/kernel/machine_kexec.c              |    2 +-
 arch/ia64/kernel/mca.c                        |   12 +-
 arch/ia64/kernel/msi_ia64.c                   |    8 +-
 arch/ia64/kernel/sal.c                        |    2 +-
 arch/ia64/kernel/setup.c                      |    4 +-
 arch/ia64/kernel/smp.c                        |   10 +-
 arch/ia64/kernel/smpboot.c                    |    2 +-
 arch/ia64/kernel/time.c                       |    2 +-
 arch/ia64/mm/discontig.c                      |    2 +-
 arch/ia64/mm/init.c                           |    2 +-
 arch/ia64/mm/tlb.c                            |    2 +-
 arch/ia64/pci/fixup.c                         |    4 +-
 arch/ia64/pci/pci.c                           |    4 +-
 arch/ia64/sn/kernel/setup.c                   |    2 +-
 32 files changed, 304 insertions(+), 301 deletions(-)

diff --git a/arch/ia64/include/asm/dma-mapping.h 
b/arch/ia64/include/asm/dma-mapping.h
index 4f5e814..4543953 100644
--- a/arch/ia64/include/asm/dma-mapping.h
+++ b/arch/ia64/include/asm/dma-mapping.h
@@ -29,7 +29,7 @@ static inline void *dma_alloc_attrs(struct device *dev, 
size_t size,
                                    dma_addr_t *daddr, gfp_t gfp,
                                    struct dma_attrs *attrs)
 {
-       struct dma_map_ops *ops = platform_dma_get_ops(dev);
+       const struct dma_map_ops *ops = ia64_platform_dma_get_ops(dev);
        void *caddr;
 
        caddr = ops->alloc(dev, size, daddr, gfp, attrs);
@@ -43,7 +43,7 @@ static inline void dma_free_attrs(struct device *dev, size_t 
size,
                                  void *caddr, dma_addr_t daddr,
                                  struct dma_attrs *attrs)
 {
-       struct dma_map_ops *ops = platform_dma_get_ops(dev);
+       const struct dma_map_ops *ops = ia64_platform_dma_get_ops(dev);
        debug_dma_free_coherent(dev, size, caddr, daddr);
        ops->free(dev, size, caddr, daddr, attrs);
 }
@@ -51,19 +51,19 @@ static inline void dma_free_attrs(struct device *dev, 
size_t size,
 #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
 
-#define get_dma_ops(dev) platform_dma_get_ops(dev)
+#define get_dma_ops(dev) ia64_platform_dma_get_ops(dev)
 
 #include <asm-generic/dma-mapping-common.h>
 
 static inline int dma_mapping_error(struct device *dev, dma_addr_t daddr)
 {
-       struct dma_map_ops *ops = platform_dma_get_ops(dev);
+       const struct dma_map_ops *ops = ia64_platform_dma_get_ops(dev);
        return ops->mapping_error(dev, daddr);
 }
 
 static inline int dma_supported(struct device *dev, u64 mask)
 {
-       struct dma_map_ops *ops = platform_dma_get_ops(dev);
+       const struct dma_map_ops *ops = ia64_platform_dma_get_ops(dev);
        return ops->dma_supported(dev, mask);
 }
 
diff --git a/arch/ia64/include/asm/hw_irq.h b/arch/ia64/include/asm/hw_irq.h
index a681d02..42ce941 100644
--- a/arch/ia64/include/asm/hw_irq.h
+++ b/arch/ia64/include/asm/hw_irq.h
@@ -145,7 +145,7 @@ static inline void irq_complete_move(unsigned int irq) {}
 
 static inline void ia64_native_resend_irq(unsigned int vector)
 {
-       platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0);
+       ia64_platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0);
 }
 
 /*
@@ -178,7 +178,7 @@ __ia64_local_vector_to_irq (ia64_vector vec)
 static inline ia64_vector
 irq_to_vector (int irq)
 {
-       return platform_irq_to_vector(irq);
+       return ia64_platform_irq_to_vector(irq);
 }
 
 /*
@@ -189,7 +189,7 @@ irq_to_vector (int irq)
 static inline unsigned int
 local_vector_to_irq (ia64_vector vec)
 {
-       return platform_local_vector_to_irq(vec);
+       return ia64_platform_local_vector_to_irq(vec);
 }
 
 #endif /* _ASM_IA64_HW_IRQ_H */
diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h
index 2c26321..8250b23 100644
--- a/arch/ia64/include/asm/io.h
+++ b/arch/ia64/include/asm/io.h
@@ -233,7 +233,7 @@ __insb (unsigned long port, void *dst, unsigned long count)
        unsigned char *dp = dst;
 
        while (count--)
-               *dp++ = platform_inb(port);
+               *dp++ = ia64_platform_inb(port);
 }
 
 static inline void
@@ -242,7 +242,7 @@ __insw (unsigned long port, void *dst, unsigned long count)
        unsigned short *dp = dst;
 
        while (count--)
-               put_unaligned(platform_inw(port), dp++);
+               put_unaligned(ia64_platform_inw(port), dp++);
 }
 
 static inline void
@@ -251,7 +251,7 @@ __insl (unsigned long port, void *dst, unsigned long count)
        unsigned int *dp = dst;
 
        while (count--)
-               put_unaligned(platform_inl(port), dp++);
+               put_unaligned(ia64_platform_inl(port), dp++);
 }
 
 static inline void
@@ -260,7 +260,7 @@ __outsb (unsigned long port, const void *src, unsigned long 
count)
        const unsigned char *sp = src;
 
        while (count--)
-               platform_outb(*sp++, port);
+               ia64_platform_outb(*sp++, port);
 }
 
 static inline void
@@ -269,7 +269,7 @@ __outsw (unsigned long port, const void *src, unsigned long 
count)
        const unsigned short *sp = src;
 
        while (count--)
-               platform_outw(get_unaligned(sp++), port);
+               ia64_platform_outw(get_unaligned(sp++), port);
 }
 
 static inline void
@@ -278,7 +278,7 @@ __outsl (unsigned long port, const void *src, unsigned long 
count)
        const unsigned int *sp = src;
 
        while (count--)
-               platform_outl(get_unaligned(sp++), port);
+               ia64_platform_outl(get_unaligned(sp++), port);
 }
 
 /*
@@ -286,13 +286,13 @@ __outsl (unsigned long port, const void *src, unsigned 
long count)
  * specification regarding legacy I/O support.  Thus, we have to make these 
operations
  * platform dependent...
  */
-#define __inb          platform_inb
-#define __inw          platform_inw
-#define __inl          platform_inl
-#define __outb         platform_outb
-#define __outw         platform_outw
-#define __outl         platform_outl
-#define __mmiowb       platform_mmiowb
+#define __inb          ia64_platform_inb
+#define __inw          ia64_platform_inw
+#define __inl          ia64_platform_inl
+#define __outb         ia64_platform_outb
+#define __outw         ia64_platform_outw
+#define __outl         ia64_platform_outl
+#define __mmiowb       ia64_platform_mmiowb
 
 #define inb(p)         __inb(p)
 #define inw(p)         __inw(p)
@@ -364,14 +364,14 @@ __writeq (unsigned long val, volatile void __iomem *addr)
        *(volatile unsigned long __force *) addr = val;
 }
 
-#define __readb                platform_readb
-#define __readw                platform_readw
-#define __readl                platform_readl
-#define __readq                platform_readq
-#define __readb_relaxed        platform_readb_relaxed
-#define __readw_relaxed        platform_readw_relaxed
-#define __readl_relaxed        platform_readl_relaxed
-#define __readq_relaxed        platform_readq_relaxed
+#define __readb                ia64_platform_readb
+#define __readw                ia64_platform_readw
+#define __readl                ia64_platform_readl
+#define __readq                ia64_platform_readq
+#define __readb_relaxed        ia64_platform_readb_relaxed
+#define __readw_relaxed        ia64_platform_readw_relaxed
+#define __readl_relaxed        ia64_platform_readl_relaxed
+#define __readq_relaxed        ia64_platform_readq_relaxed
 
 #define readb(a)       __readb((a))
 #define readw(a)       __readw((a))
diff --git a/arch/ia64/include/asm/machvec.h b/arch/ia64/include/asm/machvec.h
index 367d299..b092c1c 100644
--- a/arch/ia64/include/asm/machvec.h
+++ b/arch/ia64/include/asm/machvec.h
@@ -120,42 +120,42 @@ extern void machvec_tlb_migrate_finish (struct mm_struct 
*);
 # ifdef MACHVEC_PLATFORM_HEADER
 #  include MACHVEC_PLATFORM_HEADER
 # else
-#  define platform_name                ia64_mv.name
-#  define platform_setup       ia64_mv.setup
-#  define platform_cpu_init    ia64_mv.cpu_init
-#  define platform_irq_init    ia64_mv.irq_init
-#  define platform_send_ipi    ia64_mv.send_ipi
-#  define platform_timer_interrupt     ia64_mv.timer_interrupt
-#  define platform_global_tlb_purge    ia64_mv.global_tlb_purge
-#  define platform_tlb_migrate_finish  ia64_mv.tlb_migrate_finish
-#  define platform_dma_init            ia64_mv.dma_init
-#  define platform_dma_get_required_mask ia64_mv.dma_get_required_mask
-#  define platform_dma_get_ops         ia64_mv.dma_get_ops
-#  define platform_irq_to_vector       ia64_mv.irq_to_vector
-#  define platform_local_vector_to_irq ia64_mv.local_vector_to_irq
-#  define platform_pci_get_legacy_mem  ia64_mv.pci_get_legacy_mem
-#  define platform_pci_legacy_read     ia64_mv.pci_legacy_read
-#  define platform_pci_legacy_write    ia64_mv.pci_legacy_write
-#  define platform_inb         ia64_mv.inb
-#  define platform_inw         ia64_mv.inw
-#  define platform_inl         ia64_mv.inl
-#  define platform_outb                ia64_mv.outb
-#  define platform_outw                ia64_mv.outw
-#  define platform_outl                ia64_mv.outl
-#  define platform_mmiowb      ia64_mv.mmiowb
-#  define platform_readb        ia64_mv.readb
-#  define platform_readw        ia64_mv.readw
-#  define platform_readl        ia64_mv.readl
-#  define platform_readq        ia64_mv.readq
-#  define platform_readb_relaxed        ia64_mv.readb_relaxed
-#  define platform_readw_relaxed        ia64_mv.readw_relaxed
-#  define platform_readl_relaxed        ia64_mv.readl_relaxed
-#  define platform_readq_relaxed        ia64_mv.readq_relaxed
-#  define platform_migrate             ia64_mv.migrate
-#  define platform_setup_msi_irq       ia64_mv.setup_msi_irq
-#  define platform_teardown_msi_irq    ia64_mv.teardown_msi_irq
-#  define platform_pci_fixup_bus       ia64_mv.pci_fixup_bus
-#  define platform_kernel_launch_event ia64_mv.kernel_launch_event
+#  define ia64_platform_name                   ia64_mv.name
+#  define ia64_platform_setup                  ia64_mv.setup
+#  define ia64_platform_cpu_init               ia64_mv.cpu_init
+#  define ia64_platform_irq_init               ia64_mv.irq_init
+#  define ia64_platform_send_ipi               ia64_mv.send_ipi
+#  define ia64_platform_timer_interrupt                ia64_mv.timer_interrupt
+#  define ia64_platform_global_tlb_purge       ia64_mv.global_tlb_purge
+#  define ia64_platform_tlb_migrate_finish     ia64_mv.tlb_migrate_finish
+#  define ia64_platform_dma_init               ia64_mv.dma_init
+#  define ia64_platform_dma_get_required_mask  ia64_mv.dma_get_required_mask
+#  define ia64_platform_dma_get_ops            ia64_mv.dma_get_ops
+#  define ia64_platform_irq_to_vector          ia64_mv.irq_to_vector
+#  define ia64_platform_local_vector_to_irq    ia64_mv.local_vector_to_irq
+#  define ia64_platform_pci_get_legacy_mem     ia64_mv.pci_get_legacy_mem
+#  define ia64_platform_pci_legacy_read                ia64_mv.pci_legacy_read
+#  define ia64_platform_pci_legacy_write       ia64_mv.pci_legacy_write
+#  define ia64_platform_inb                    ia64_mv.inb
+#  define ia64_platform_inw                    ia64_mv.inw
+#  define ia64_platform_inl                    ia64_mv.inl
+#  define ia64_platform_outb                   ia64_mv.outb
+#  define ia64_platform_outw                   ia64_mv.outw
+#  define ia64_platform_outl                   ia64_mv.outl
+#  define ia64_platform_mmiowb                 ia64_mv.mmiowb
+#  define ia64_platform_readb                  ia64_mv.readb
+#  define ia64_platform_readw                  ia64_mv.readw
+#  define ia64_platform_readl                  ia64_mv.readl
+#  define ia64_platform_readq                  ia64_mv.readq
+#  define ia64_platform_readb_relaxed          ia64_mv.readb_relaxed
+#  define ia64_platform_readw_relaxed          ia64_mv.readw_relaxed
+#  define ia64_platform_readl_relaxed          ia64_mv.readl_relaxed
+#  define ia64_platform_readq_relaxed          ia64_mv.readq_relaxed
+#  define ia64_platform_migrate                        ia64_mv.migrate
+#  define ia64_platform_setup_msi_irq          ia64_mv.setup_msi_irq
+#  define ia64_platform_teardown_msi_irq       ia64_mv.teardown_msi_irq
+#  define ia64_platform_pci_fixup_bus          ia64_mv.pci_fixup_bus
+#  define ia64_platform_kernel_launch_event    ia64_mv.kernel_launch_event
 # endif
 
 /* __attribute__((__aligned__(16))) is required to make size of the
@@ -205,41 +205,41 @@ struct ia64_machine_vector {
 #define MACHVEC_INIT(name)                     \
 {                                              \
        #name,                                  \
-       platform_setup,                         \
-       platform_cpu_init,                      \
-       platform_irq_init,                      \
-       platform_send_ipi,                      \
-       platform_timer_interrupt,               \
-       platform_global_tlb_purge,              \
-       platform_tlb_migrate_finish,            \
-       platform_dma_init,                      \
-       platform_dma_get_required_mask,         \
-       platform_dma_get_ops,                   \
-       platform_irq_to_vector,                 \
-       platform_local_vector_to_irq,           \
-       platform_pci_get_legacy_mem,            \
-       platform_pci_legacy_read,               \
-       platform_pci_legacy_write,              \
-       platform_inb,                           \
-       platform_inw,                           \
-       platform_inl,                           \
-       platform_outb,                          \
-       platform_outw,                          \
-       platform_outl,                          \
-       platform_mmiowb,                        \
-       platform_readb,                         \
-       platform_readw,                         \
-       platform_readl,                         \
-       platform_readq,                         \
-       platform_readb_relaxed,                 \
-       platform_readw_relaxed,                 \
-       platform_readl_relaxed,                 \
-       platform_readq_relaxed,                 \
-       platform_migrate,                       \
-       platform_setup_msi_irq,                 \
-       platform_teardown_msi_irq,              \
-       platform_pci_fixup_bus,                 \
-       platform_kernel_launch_event            \
+       ia64_platform_setup,                    \
+       ia64_platform_cpu_init,                 \
+       ia64_platform_irq_init,                 \
+       ia64_platform_send_ipi,                 \
+       ia64_platform_timer_interrupt,          \
+       ia64_platform_global_tlb_purge,         \
+       ia64_platform_tlb_migrate_finish,       \
+       ia64_platform_dma_init,                 \
+       ia64_platform_dma_get_required_mask,    \
+       ia64_platform_dma_get_ops,              \
+       ia64_platform_irq_to_vector,            \
+       ia64_platform_local_vector_to_irq,      \
+       ia64_platform_pci_get_legacy_mem,       \
+       ia64_platform_pci_legacy_read,          \
+       ia64_platform_pci_legacy_write,         \
+       ia64_platform_inb,                      \
+       ia64_platform_inw,                      \
+       ia64_platform_inl,                      \
+       ia64_platform_outb,                     \
+       ia64_platform_outw,                     \
+       ia64_platform_outl,                     \
+       ia64_platform_mmiowb,                   \
+       ia64_platform_readb,                    \
+       ia64_platform_readw,                    \
+       ia64_platform_readl,                    \
+       ia64_platform_readq,                    \
+       ia64_platform_readb_relaxed,            \
+       ia64_platform_readw_relaxed,            \
+       ia64_platform_readl_relaxed,            \
+       ia64_platform_readq_relaxed,            \
+       ia64_platform_migrate,                  \
+       ia64_platform_setup_msi_irq,            \
+       ia64_platform_teardown_msi_irq,         \
+       ia64_platform_pci_fixup_bus,            \
+       ia64_platform_kernel_launch_event       \
 }
 
 extern struct ia64_machine_vector ia64_mv;
@@ -257,113 +257,113 @@ extern struct dma_map_ops *dma_get_ops(struct device *);
  * Define default versions so we can extend machvec for new platforms without 
having
  * to update the machvec files for all existing platforms.
  */
-#ifndef platform_setup
-# define platform_setup                        machvec_setup
+#ifndef ia64_platform_setup
+# define ia64_platform_setup                   machvec_setup
 #endif
-#ifndef platform_cpu_init
-# define platform_cpu_init             machvec_noop
+#ifndef ia64_platform_cpu_init
+# define ia64_platform_cpu_init                        machvec_noop
 #endif
-#ifndef platform_irq_init
-# define platform_irq_init             machvec_noop
+#ifndef ia64_platform_irq_init
+# define ia64_platform_irq_init                        machvec_noop
 #endif
 
-#ifndef platform_send_ipi
-# define platform_send_ipi             ia64_send_ipi   /* default to 
architected version */
+#ifndef ia64_platform_send_ipi
+# define ia64_platform_send_ipi                        ia64_send_ipi   /* 
default to architected version */
 #endif
-#ifndef platform_timer_interrupt
-# define platform_timer_interrupt      machvec_timer_interrupt
+#ifndef ia64_platform_timer_interrupt
+# define ia64_platform_timer_interrupt                 machvec_timer_interrupt
 #endif
-#ifndef platform_global_tlb_purge
-# define platform_global_tlb_purge     ia64_global_tlb_purge /* default to 
architected version */
+#ifndef ia64_platform_global_tlb_purge
+# define ia64_platform_global_tlb_purge                ia64_global_tlb_purge 
/* default to architected version */
 #endif
-#ifndef platform_tlb_migrate_finish
-# define platform_tlb_migrate_finish   machvec_noop_mm
+#ifndef ia64_platform_tlb_migrate_finish
+# define ia64_platform_tlb_migrate_finish      machvec_noop_mm
 #endif
-#ifndef platform_kernel_launch_event
-# define platform_kernel_launch_event  machvec_noop
+#ifndef ia64_platform_kernel_launch_event
+# define ia64_platform_kernel_launch_event     machvec_noop
 #endif
-#ifndef platform_dma_init
-# define platform_dma_init             swiotlb_dma_init
+#ifndef ia64_platform_dma_init
+# define ia64_platform_dma_init                        swiotlb_dma_init
 #endif
-#ifndef platform_dma_get_ops
-# define platform_dma_get_ops          dma_get_ops
+#ifndef ia64_platform_dma_get_ops
+# define ia64_platform_dma_get_ops             dma_get_ops
 #endif
-#ifndef platform_dma_get_required_mask
-# define  platform_dma_get_required_mask       ia64_dma_get_required_mask
+#ifndef ia64_platform_dma_get_required_mask
+# define  ia64_platform_dma_get_required_mask  ia64_dma_get_required_mask
 #endif
-#ifndef platform_irq_to_vector
-# define platform_irq_to_vector                __ia64_irq_to_vector
+#ifndef ia64_platform_irq_to_vector
+# define ia64_platform_irq_to_vector           __ia64_irq_to_vector
 #endif
-#ifndef platform_local_vector_to_irq
-# define platform_local_vector_to_irq  __ia64_local_vector_to_irq
+#ifndef ia64_platform_local_vector_to_irq
+# define ia64_platform_local_vector_to_irq     __ia64_local_vector_to_irq
 #endif
-#ifndef platform_pci_get_legacy_mem
-# define platform_pci_get_legacy_mem   ia64_pci_get_legacy_mem
+#ifndef ia64_platform_pci_get_legacy_mem
+# define ia64_platform_pci_get_legacy_mem      ia64_pci_get_legacy_mem
 #endif
-#ifndef platform_pci_legacy_read
-# define platform_pci_legacy_read      ia64_pci_legacy_read
+#ifndef ia64_platform_pci_legacy_read
+# define ia64_platform_pci_legacy_read         ia64_pci_legacy_read
 extern int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 
size);
 #endif
-#ifndef platform_pci_legacy_write
-# define platform_pci_legacy_write     ia64_pci_legacy_write
+#ifndef ia64_platform_pci_legacy_write
+# define ia64_platform_pci_legacy_write                ia64_pci_legacy_write
 extern int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 
size);
 #endif
-#ifndef platform_inb
-# define platform_inb          __ia64_inb
+#ifndef ia64_platform_inb
+# define ia64_platform_inb                     __ia64_inb
 #endif
-#ifndef platform_inw
-# define platform_inw          __ia64_inw
+#ifndef ia64_platform_inw
+# define ia64_platform_inw                     __ia64_inw
 #endif
-#ifndef platform_inl
-# define platform_inl          __ia64_inl
+#ifndef ia64_platform_inl
+# define ia64_platform_inl                     __ia64_inl
 #endif
-#ifndef platform_outb
-# define platform_outb         __ia64_outb
+#ifndef ia64_platform_outb
+# define ia64_platform_outb                    __ia64_outb
 #endif
-#ifndef platform_outw
-# define platform_outw         __ia64_outw
+#ifndef ia64_platform_outw
+# define ia64_platform_outw                    __ia64_outw
 #endif
-#ifndef platform_outl
-# define platform_outl         __ia64_outl
+#ifndef ia64_platform_outl
+# define ia64_platform_outl                    __ia64_outl
 #endif
-#ifndef platform_mmiowb
-# define platform_mmiowb       __ia64_mmiowb
+#ifndef ia64_platform_mmiowb
+# define ia64_platform_mmiowb                  __ia64_mmiowb
 #endif
-#ifndef platform_readb
-# define platform_readb                __ia64_readb
+#ifndef ia64_platform_readb
+# define ia64_platform_readb                   __ia64_readb
 #endif
-#ifndef platform_readw
-# define platform_readw                __ia64_readw
+#ifndef ia64_platform_readw
+# define ia64_platform_readw                   __ia64_readw
 #endif
-#ifndef platform_readl
-# define platform_readl                __ia64_readl
+#ifndef ia64_platform_readl
+# define ia64_platform_readl                   __ia64_readl
 #endif
-#ifndef platform_readq
-# define platform_readq                __ia64_readq
+#ifndef ia64_platform_readq
+# define ia64_platform_readq                   __ia64_readq
 #endif
-#ifndef platform_readb_relaxed
-# define platform_readb_relaxed        __ia64_readb_relaxed
+#ifndef ia64_platform_readb_relaxed
+# define ia64_platform_readb_relaxed           __ia64_readb_relaxed
 #endif
-#ifndef platform_readw_relaxed
-# define platform_readw_relaxed        __ia64_readw_relaxed
+#ifndef ia64_platform_readw_relaxed
+# define ia64_platform_readw_relaxed           __ia64_readw_relaxed
 #endif
-#ifndef platform_readl_relaxed
-# define platform_readl_relaxed        __ia64_readl_relaxed
+#ifndef ia64_platform_readl_relaxed
+# define ia64_platform_readl_relaxed           __ia64_readl_relaxed
 #endif
-#ifndef platform_readq_relaxed
-# define platform_readq_relaxed        __ia64_readq_relaxed
+#ifndef ia64_platform_readq_relaxed
+# define ia64_platform_readq_relaxed           __ia64_readq_relaxed
 #endif
-#ifndef platform_migrate
-# define platform_migrate machvec_noop_task
+#ifndef ia64_platform_migrate
+# define ia64_platform_migrate                 machvec_noop_task
 #endif
-#ifndef platform_setup_msi_irq
-# define platform_setup_msi_irq                ((ia64_mv_setup_msi_irq_t*)NULL)
+#ifndef ia64_platform_setup_msi_irq
+# define ia64_platform_setup_msi_irq           ((ia64_mv_setup_msi_irq_t 
*)NULL)
 #endif
-#ifndef platform_teardown_msi_irq
-# define platform_teardown_msi_irq     ((ia64_mv_teardown_msi_irq_t*)NULL)
+#ifndef ia64_platform_teardown_msi_irq
+# define ia64_platform_teardown_msi_irq                
((ia64_mv_teardown_msi_irq_t *)NULL)
 #endif
-#ifndef platform_pci_fixup_bus
-# define platform_pci_fixup_bus        machvec_noop_bus
+#ifndef ia64_platform_pci_fixup_bus
+# define ia64_platform_pci_fixup_bus           machvec_noop_bus
 #endif
 
 #endif /* _ASM_IA64_MACHVEC_H */
diff --git a/arch/ia64/include/asm/machvec_dig.h 
b/arch/ia64/include/asm/machvec_dig.h
index 8a0752f..1b6aff6 100644
--- a/arch/ia64/include/asm/machvec_dig.h
+++ b/arch/ia64/include/asm/machvec_dig.h
@@ -10,7 +10,7 @@ extern ia64_mv_setup_t dig_setup;
  * platform's machvec structure.  When compiling a non-generic kernel,
  * the macros are used directly.
  */
-#define platform_name          "dig"
-#define platform_setup         dig_setup
+#define ia64_platform_name             "dig"
+#define ia64_platform_setup            dig_setup
 
 #endif /* _ASM_IA64_MACHVEC_DIG_h */
diff --git a/arch/ia64/include/asm/machvec_dig_vtd.h 
b/arch/ia64/include/asm/machvec_dig_vtd.h
index 6ab1de5..dca54c7 100644
--- a/arch/ia64/include/asm/machvec_dig_vtd.h
+++ b/arch/ia64/include/asm/machvec_dig_vtd.h
@@ -11,8 +11,8 @@ extern ia64_mv_dma_init                       pci_iommu_alloc;
  * platform's machvec structure.  When compiling a non-generic kernel,
  * the macros are used directly.
  */
-#define platform_name                          "dig_vtd"
-#define platform_setup                         dig_setup
-#define platform_dma_init                      pci_iommu_alloc
+#define ia64_platform_name             "dig_vtd"
+#define ia64_platform_setup            dig_setup
+#define ia64_platform_dma_init         pci_iommu_alloc
 
 #endif /* _ASM_IA64_MACHVEC_DIG_VTD_h */
diff --git a/arch/ia64/include/asm/machvec_hpsim.h 
b/arch/ia64/include/asm/machvec_hpsim.h
index cf72fc8..e594b77 100644
--- a/arch/ia64/include/asm/machvec_hpsim.h
+++ b/arch/ia64/include/asm/machvec_hpsim.h
@@ -1,8 +1,8 @@
 #ifndef _ASM_IA64_MACHVEC_HPSIM_h
 #define _ASM_IA64_MACHVEC_HPSIM_h
 
-extern ia64_mv_setup_t hpsim_setup;
-extern ia64_mv_irq_init_t hpsim_irq_init;
+extern ia64_mv_setup_t                 hpsim_setup;
+extern ia64_mv_irq_init_t              hpsim_irq_init;
 
 /*
  * This stuff has dual use!
@@ -11,8 +11,8 @@ extern ia64_mv_irq_init_t hpsim_irq_init;
  * platform's machvec structure.  When compiling a non-generic kernel,
  * the macros are used directly.
  */
-#define platform_name          "hpsim"
-#define platform_setup         hpsim_setup
-#define platform_irq_init      hpsim_irq_init
+#define ia64_platform_name             "hpsim"
+#define ia64_platform_setup            hpsim_setup
+#define ia64_platform_irq_init         hpsim_irq_init
 
 #endif /* _ASM_IA64_MACHVEC_HPSIM_h */
diff --git a/arch/ia64/include/asm/machvec_hpzx1.h 
b/arch/ia64/include/asm/machvec_hpzx1.h
index 3bd83d7..869d9a7 100644
--- a/arch/ia64/include/asm/machvec_hpzx1.h
+++ b/arch/ia64/include/asm/machvec_hpzx1.h
@@ -11,8 +11,8 @@ extern ia64_mv_dma_init                       sba_dma_init;
  * platform's machvec structure.  When compiling a non-generic kernel,
  * the macros are used directly.
  */
-#define platform_name                          "hpzx1"
-#define platform_setup                         dig_setup
-#define platform_dma_init                      sba_dma_init
+#define ia64_platform_name             "hpzx1"
+#define ia64_platform_setup            dig_setup
+#define ia64_platform_dma_init         sba_dma_init
 
 #endif /* _ASM_IA64_MACHVEC_HPZX1_h */
diff --git a/arch/ia64/include/asm/machvec_hpzx1_swiotlb.h 
b/arch/ia64/include/asm/machvec_hpzx1_swiotlb.h
index 1091ac3..fedafba 100644
--- a/arch/ia64/include/asm/machvec_hpzx1_swiotlb.h
+++ b/arch/ia64/include/asm/machvec_hpzx1_swiotlb.h
@@ -1,8 +1,8 @@
 #ifndef _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h
 #define _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h
 
-extern ia64_mv_setup_t                         dig_setup;
-extern ia64_mv_dma_get_ops                     hwsw_dma_get_ops;
+extern ia64_mv_setup_t                 dig_setup;
+extern ia64_mv_dma_get_ops             hwsw_dma_get_ops;
 
 /*
  * This stuff has dual use!
@@ -11,9 +11,9 @@ extern ia64_mv_dma_get_ops                    
hwsw_dma_get_ops;
  * platform's machvec structure.  When compiling a non-generic kernel,
  * the macros are used directly.
  */
-#define platform_name                          "hpzx1_swiotlb"
-#define platform_setup                         dig_setup
-#define platform_dma_init                      machvec_noop
-#define platform_dma_get_ops                   hwsw_dma_get_ops
+#define ia64_platform_name             "hpzx1_swiotlb"
+#define ia64_platform_setup            dig_setup
+#define ia64_platform_dma_init         machvec_noop
+#define ia64_platform_dma_get_ops      hwsw_dma_get_ops
 
 #endif /* _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h */
diff --git a/arch/ia64/include/asm/machvec_sn2.h 
b/arch/ia64/include/asm/machvec_sn2.h
index f061a30..d913858 100644
--- a/arch/ia64/include/asm/machvec_sn2.h
+++ b/arch/ia64/include/asm/machvec_sn2.h
@@ -28,33 +28,33 @@
 #ifndef _ASM_IA64_MACHVEC_SN2_H
 #define _ASM_IA64_MACHVEC_SN2_H
 
-extern ia64_mv_setup_t sn_setup;
-extern ia64_mv_cpu_init_t sn_cpu_init;
-extern ia64_mv_irq_init_t sn_irq_init;
-extern ia64_mv_send_ipi_t sn2_send_IPI;
-extern ia64_mv_timer_interrupt_t sn_timer_interrupt;
-extern ia64_mv_global_tlb_purge_t sn2_global_tlb_purge;
+extern ia64_mv_setup_t                 sn_setup;
+extern ia64_mv_cpu_init_t              sn_cpu_init;
+extern ia64_mv_irq_init_t              sn_irq_init;
+extern ia64_mv_send_ipi_t              sn2_send_IPI;
+extern ia64_mv_timer_interrupt_t       sn_timer_interrupt;
+extern ia64_mv_global_tlb_purge_t      sn2_global_tlb_purge;
 extern ia64_mv_tlb_migrate_finish_t    sn_tlb_migrate_finish;
-extern ia64_mv_irq_to_vector sn_irq_to_vector;
-extern ia64_mv_local_vector_to_irq sn_local_vector_to_irq;
-extern ia64_mv_pci_get_legacy_mem_t sn_pci_get_legacy_mem;
-extern ia64_mv_pci_legacy_read_t sn_pci_legacy_read;
-extern ia64_mv_pci_legacy_write_t sn_pci_legacy_write;
-extern ia64_mv_inb_t __sn_inb;
-extern ia64_mv_inw_t __sn_inw;
-extern ia64_mv_inl_t __sn_inl;
-extern ia64_mv_outb_t __sn_outb;
-extern ia64_mv_outw_t __sn_outw;
-extern ia64_mv_outl_t __sn_outl;
-extern ia64_mv_mmiowb_t __sn_mmiowb;
-extern ia64_mv_readb_t __sn_readb;
-extern ia64_mv_readw_t __sn_readw;
-extern ia64_mv_readl_t __sn_readl;
-extern ia64_mv_readq_t __sn_readq;
-extern ia64_mv_readb_t __sn_readb_relaxed;
-extern ia64_mv_readw_t __sn_readw_relaxed;
-extern ia64_mv_readl_t __sn_readl_relaxed;
-extern ia64_mv_readq_t __sn_readq_relaxed;
+extern ia64_mv_irq_to_vector           sn_irq_to_vector;
+extern ia64_mv_local_vector_to_irq     sn_local_vector_to_irq;
+extern ia64_mv_pci_get_legacy_mem_t    sn_pci_get_legacy_mem;
+extern ia64_mv_pci_legacy_read_t       sn_pci_legacy_read;
+extern ia64_mv_pci_legacy_write_t      sn_pci_legacy_write;
+extern ia64_mv_inb_t                   __sn_inb;
+extern ia64_mv_inw_t                   __sn_inw;
+extern ia64_mv_inl_t                   __sn_inl;
+extern ia64_mv_outb_t                  __sn_outb;
+extern ia64_mv_outw_t                  __sn_outw;
+extern ia64_mv_outl_t                  __sn_outl;
+extern ia64_mv_mmiowb_t                        __sn_mmiowb;
+extern ia64_mv_readb_t                 __sn_readb;
+extern ia64_mv_readw_t                 __sn_readw;
+extern ia64_mv_readl_t                 __sn_readl;
+extern ia64_mv_readq_t                 __sn_readq;
+extern ia64_mv_readb_t                 __sn_readb_relaxed;
+extern ia64_mv_readw_t                 __sn_readw_relaxed;
+extern ia64_mv_readl_t                 __sn_readl_relaxed;
+extern ia64_mv_readq_t                 __sn_readq_relaxed;
 extern ia64_mv_dma_get_required_mask   sn_dma_get_required_mask;
 extern ia64_mv_dma_init                        sn_dma_init;
 extern ia64_mv_migrate_t               sn_migrate;
@@ -71,47 +71,47 @@ extern ia64_mv_pci_fixup_bus_t              
sn_pci_fixup_bus;
  * platform's machvec structure.  When compiling a non-generic kernel,
  * the macros are used directly.
  */
-#define platform_name                  "sn2"
-#define platform_setup                 sn_setup
-#define platform_cpu_init              sn_cpu_init
-#define platform_irq_init              sn_irq_init
-#define platform_send_ipi              sn2_send_IPI
-#define platform_timer_interrupt       sn_timer_interrupt
-#define platform_global_tlb_purge       sn2_global_tlb_purge
-#define platform_tlb_migrate_finish    sn_tlb_migrate_finish
-#define platform_pci_fixup             sn_pci_fixup
-#define platform_inb                   __sn_inb
-#define platform_inw                   __sn_inw
-#define platform_inl                   __sn_inl
-#define platform_outb                  __sn_outb
-#define platform_outw                  __sn_outw
-#define platform_outl                  __sn_outl
-#define platform_mmiowb                        __sn_mmiowb
-#define platform_readb                 __sn_readb
-#define platform_readw                 __sn_readw
-#define platform_readl                 __sn_readl
-#define platform_readq                 __sn_readq
-#define platform_readb_relaxed         __sn_readb_relaxed
-#define platform_readw_relaxed         __sn_readw_relaxed
-#define platform_readl_relaxed         __sn_readl_relaxed
-#define platform_readq_relaxed         __sn_readq_relaxed
-#define platform_irq_to_vector         sn_irq_to_vector
-#define platform_local_vector_to_irq   sn_local_vector_to_irq
-#define platform_pci_get_legacy_mem    sn_pci_get_legacy_mem
-#define platform_pci_legacy_read       sn_pci_legacy_read
-#define platform_pci_legacy_write      sn_pci_legacy_write
-#define platform_dma_get_required_mask sn_dma_get_required_mask
-#define platform_dma_init              sn_dma_init
-#define platform_migrate               sn_migrate
-#define platform_kernel_launch_event    sn_kernel_launch_event
+#define ia64_platform_name                     "sn2"
+#define ia64_platform_setup                    sn_setup
+#define ia64_platform_cpu_init                 sn_cpu_init
+#define ia64_platform_irq_init                 sn_irq_init
+#define ia64_platform_send_ipi                 sn2_send_IPI
+#define ia64_platform_timer_interrupt          sn_timer_interrupt
+#define ia64_platform_global_tlb_purge         sn2_global_tlb_purge
+#define ia64_platform_tlb_migrate_finish       sn_tlb_migrate_finish
+#define ia64_platform_pci_fixup                        sn_pci_fixup
+#define ia64_platform_inb                      __sn_inb
+#define ia64_platform_inw                      __sn_inw
+#define ia64_platform_inl                      __sn_inl
+#define ia64_platform_outb                     __sn_outb
+#define ia64_platform_outw                     __sn_outw
+#define ia64_platform_outl                     __sn_outl
+#define ia64_platform_mmiowb                   __sn_mmiowb
+#define ia64_platform_readb                    __sn_readb
+#define ia64_platform_readw                    __sn_readw
+#define ia64_platform_readl                    __sn_readl
+#define ia64_platform_readq                    __sn_readq
+#define ia64_platform_readb_relaxed            __sn_readb_relaxed
+#define ia64_platform_readw_relaxed            __sn_readw_relaxed
+#define ia64_platform_readl_relaxed            __sn_readl_relaxed
+#define ia64_platform_readq_relaxed            __sn_readq_relaxed
+#define ia64_platform_irq_to_vector            sn_irq_to_vector
+#define ia64_platform_local_vector_to_irq      sn_local_vector_to_irq
+#define ia64_platform_pci_get_legacy_mem       sn_pci_get_legacy_mem
+#define ia64_platform_pci_legacy_read          sn_pci_legacy_read
+#define ia64_platform_pci_legacy_write         sn_pci_legacy_write
+#define ia64_platform_dma_get_required_mask    sn_dma_get_required_mask
+#define ia64_platform_dma_init                 sn_dma_init
+#define ia64_platform_migrate                  sn_migrate
+#define ia64_platform_kernel_launch_event      sn_kernel_launch_event
 #ifdef CONFIG_PCI_MSI
-#define platform_setup_msi_irq         sn_setup_msi_irq
-#define platform_teardown_msi_irq      sn_teardown_msi_irq
+#define ia64_platform_setup_msi_irq            sn_setup_msi_irq
+#define ia64_platform_teardown_msi_irq         sn_teardown_msi_irq
 #else
-#define platform_setup_msi_irq         ((ia64_mv_setup_msi_irq_t*)NULL)
-#define platform_teardown_msi_irq      ((ia64_mv_teardown_msi_irq_t*)NULL)
+#define ia64_platform_setup_msi_irq            ((ia64_mv_setup_msi_irq_t 
*)NULL)
+#define ia64_platform_teardown_msi_irq         ((ia64_mv_teardown_msi_irq_t 
*)NULL)
 #endif
-#define platform_pci_fixup_bus         sn_pci_fixup_bus
+#define ia64_platform_pci_fixup_bus            sn_pci_fixup_bus
 
 #include <asm/sn/io.h>
 
diff --git a/arch/ia64/include/asm/machvec_uv.h 
b/arch/ia64/include/asm/machvec_uv.h
index 2931447..3d2b7bb 100644
--- a/arch/ia64/include/asm/machvec_uv.h
+++ b/arch/ia64/include/asm/machvec_uv.h
@@ -11,7 +11,7 @@
 #ifndef _ASM_IA64_MACHVEC_UV_H
 #define _ASM_IA64_MACHVEC_UV_H
 
-extern ia64_mv_setup_t uv_setup;
+extern ia64_mv_setup_t                 uv_setup;
 
 /*
  * This stuff has dual use!
@@ -20,7 +20,7 @@ extern ia64_mv_setup_t uv_setup;
  * platform's machvec structure.  When compiling a non-generic kernel,
  * the macros are used directly.
  */
-#define platform_name                  "uv"
-#define platform_setup                 uv_setup
+#define ia64_platform_name             "uv"
+#define ia64_platform_setup            uv_setup
 
 #endif /* _ASM_IA64_MACHVEC_UV_H */
diff --git a/arch/ia64/include/asm/machvec_xen.h 
b/arch/ia64/include/asm/machvec_xen.h
index 55f9228..efdd540 100644
--- a/arch/ia64/include/asm/machvec_xen.h
+++ b/arch/ia64/include/asm/machvec_xen.h
@@ -13,10 +13,10 @@ extern ia64_mv_send_ipi_t           xen_platform_send_ipi;
  * platform's machvec structure.  When compiling a non-generic kernel,
  * the macros are used directly.
  */
-#define platform_name                          "xen"
-#define platform_setup                         dig_setup
-#define platform_cpu_init                      xen_cpu_init
-#define platform_irq_init                      xen_irq_init
-#define platform_send_ipi                      xen_platform_send_ipi
+#define ia64_platform_name             "xen"
+#define ia64_platform_setup            dig_setup
+#define ia64_platform_cpu_init         xen_cpu_init
+#define ia64_platform_irq_init         xen_irq_init
+#define ia64_platform_send_ipi         xen_platform_send_ipi
 
 #endif /* _ASM_IA64_MACHVEC_XEN_h */
diff --git a/arch/ia64/include/asm/pci.h b/arch/ia64/include/asm/pci.h
index 5e04b59..0de15ed 100644
--- a/arch/ia64/include/asm/pci.h
+++ b/arch/ia64/include/asm/pci.h
@@ -85,9 +85,9 @@ extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
                                      struct vm_area_struct *vma,
                                      enum pci_mmap_state mmap_state);
 
-#define pci_get_legacy_mem platform_pci_get_legacy_mem
-#define pci_legacy_read platform_pci_legacy_read
-#define pci_legacy_write platform_pci_legacy_write
+#define pci_get_legacy_mem     ia64_platform_pci_get_legacy_mem
+#define pci_legacy_read                ia64_platform_pci_legacy_read
+#define pci_legacy_write       ia64_platform_pci_legacy_write
 
 struct pci_window {
        struct resource resource;
diff --git a/arch/ia64/include/asm/processor.h 
b/arch/ia64/include/asm/processor.h
index 832dd37..944152a 100644
--- a/arch/ia64/include/asm/processor.h
+++ b/arch/ia64/include/asm/processor.h
@@ -719,7 +719,7 @@ enum idle_boot_override {IDLE_NO_OVERRIDE=0, IDLE_HALT, 
IDLE_FORCE_MWAIT,
 
 void default_idle(void);
 
-#define ia64_platform_is(x) (strcmp(x, platform_name) == 0)
+#define ia64_platform_is(x) (strcmp(x, ia64_platform_name) == 0)
 
 #endif /* !__ASSEMBLY__ */
 
diff --git a/arch/ia64/include/asm/switch_to.h 
b/arch/ia64/include/asm/switch_to.h
index cb2412f..0e08540 100644
--- a/arch/ia64/include/asm/switch_to.h
+++ b/arch/ia64/include/asm/switch_to.h
@@ -76,7 +76,7 @@ extern void ia64_account_on_switch (struct task_struct *prev, 
struct task_struct
        if (unlikely((current->thread.flags & IA64_THREAD_MIGRATION) &&        \
                     (task_cpu(current) !=                                     \
                                      task_thread_info(current)->last_cpu))) { \
-               platform_migrate(current);                                     \
+               ia64_platform_migrate(current);                                \
                task_thread_info(current)->last_cpu = task_cpu(current);       \
        }                                                                      \
 } while (0)
diff --git a/arch/ia64/include/asm/tlb.h b/arch/ia64/include/asm/tlb.h
index c3ffe3e..fdf6595 100644
--- a/arch/ia64/include/asm/tlb.h
+++ b/arch/ia64/include/asm/tlb.h
@@ -251,7 +251,7 @@ __tlb_remove_tlb_entry (struct mmu_gather *tlb, pte_t 
*ptep, unsigned long addre
        tlb->end_addr = address + PAGE_SIZE;
 }
 
-#define tlb_migrate_finish(mm) platform_tlb_migrate_finish(mm)
+#define tlb_migrate_finish(mm) ia64_platform_tlb_migrate_finish(mm)
 
 #define tlb_start_vma(tlb, vma)                        do { } while (0)
 #define tlb_end_vma(tlb, vma)                  do { } while (0)
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index ef4b5d8..afff6e1 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -67,9 +67,9 @@
  *     As an IRQ is a number, we have to have
  *     IA-64 interrupt vector number <-> IRQ number mapping.  On smaller
  *     systems, we use one-to-one mapping between IA-64 vector and IRQ.  A
- *     platform can implement platform_irq_to_vector(irq) and
- *     platform_local_vector_to_irq(vector) APIs to differentiate the mapping.
- *     Please see also arch/ia64/include/asm/hw_irq.h for those APIs.
+ *     platform can implement ia64_platform_irq_to_vector(irq) and
+ *     ia64_platform_local_vector_to_irq(vector) APIs to differentiate the
+ *     mapping. Please see also arch/ia64/include/asm/hw_irq.h for those APIs.
  *
  * To sum up, there are three levels of mappings involved:
  *
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 5c3e088..3379a2a 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -53,7 +53,7 @@
 #define IRQ_USED               (1)
 #define IRQ_RSVD               (2)
 
-/* These can be overridden in platform_irq_init */
+/* These can be overridden in ia64_platform_irq_init */
 int ia64_first_device_vector = IA64_DEF_FIRST_DEVICE_VECTOR;
 int ia64_last_device_vector = IA64_DEF_LAST_DEVICE_VECTOR;
 
@@ -324,7 +324,8 @@ void irq_complete_move(unsigned irq)
        cpumask_and(&cleanup_mask, &cfg->old_domain, cpu_online_mask);
        cfg->move_cleanup_count = cpus_weight(cleanup_mask);
        for_each_cpu_mask(i, cleanup_mask)
-               platform_send_ipi(i, IA64_IRQ_MOVE_VECTOR, IA64_IPI_DM_INT, 0);
+               ia64_platform_send_ipi(i, IA64_IRQ_MOVE_VECTOR,
+                                      IA64_IPI_DM_INT, 0);
        cfg->move_in_progress = 0;
 }
 
@@ -665,7 +666,7 @@ init_IRQ (void)
 #ifdef CONFIG_PERFMON
        pfm_init_percpu();
 #endif
-       platform_irq_init();
+       ia64_platform_irq_init();
 }
 
 void
diff --git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c
index 070e8ef..e5e768c 100644
--- a/arch/ia64/kernel/machine_kexec.c
+++ b/arch/ia64/kernel/machine_kexec.c
@@ -128,7 +128,7 @@ static void ia64_machine_kexec(struct unw_frame_info *info, 
void *arg)
        ia64_srlz_d();
        while (ia64_get_ivr() != IA64_SPURIOUS_INT_VECTOR)
                ia64_eoi();
-       platform_kernel_launch_event();
+       ia64_platform_kernel_launch_event();
        rnk = (relocate_new_kernel_t)&code_addr;
        (*rnk)(image->head, image->start, ia64_boot_param,
                     GRANULEROUNDDOWN((unsigned long) pal_addr));
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 65bf9cd..80ad174 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -735,7 +735,7 @@ ia64_mca_cmc_vector_enable_keventd(struct work_struct 
*unused)
 static void
 ia64_mca_wakeup(int cpu)
 {
-       platform_send_ipi(cpu, IA64_MCA_WAKEUP_VECTOR, IA64_IPI_DM_INT, 0);
+       ia64_platform_send_ipi(cpu, IA64_MCA_WAKEUP_VECTOR, IA64_IPI_DM_INT, 0);
 }
 
 /*
@@ -1481,7 +1481,8 @@ ia64_mca_cmc_int_caller(int cmc_irq, void *arg)
        cpuid = cpumask_next(cpuid+1, cpu_online_mask);
 
        if (cpuid < nr_cpu_ids) {
-               platform_send_ipi(cpuid, IA64_CMCP_VECTOR, IA64_IPI_DM_INT, 0);
+               ia64_platform_send_ipi(cpuid, IA64_CMCP_VECTOR,
+                                      IA64_IPI_DM_INT, 0);
        } else {
                /* If no log record, switch out of polling mode */
                if (start_count == IA64_LOG_COUNT(SAL_INFO_TYPE_CMC)) {
@@ -1514,7 +1515,7 @@ static void
 ia64_mca_cmc_poll (unsigned long dummy)
 {
        /* Trigger a CMC interrupt cascade  */
-       platform_send_ipi(cpumask_first(cpu_online_mask), IA64_CMCP_VECTOR,
+       ia64_platform_send_ipi(cpumask_first(cpu_online_mask), IA64_CMCP_VECTOR,
                                                        IA64_IPI_DM_INT, 0);
 }
 
@@ -1551,7 +1552,8 @@ ia64_mca_cpe_int_caller(int cpe_irq, void *arg)
        cpuid = cpumask_next(cpuid+1, cpu_online_mask);
 
        if (cpuid < NR_CPUS) {
-               platform_send_ipi(cpuid, IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0);
+               ia64_platform_send_ipi(cpuid, IA64_CPEP_VECTOR,
+                                      IA64_IPI_DM_INT, 0);
        } else {
                /*
                 * If a log was recorded, increase our polling frequency,
@@ -1591,7 +1593,7 @@ static void
 ia64_mca_cpe_poll (unsigned long dummy)
 {
        /* Trigger a CPE interrupt cascade  */
-       platform_send_ipi(cpumask_first(cpu_online_mask), IA64_CPEP_VECTOR,
+       ia64_platform_send_ipi(cpumask_first(cpu_online_mask), IA64_CPEP_VECTOR,
                                                        IA64_IPI_DM_INT, 0);
 }
 
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c
index fb2f1e6..0a8f621 100644
--- a/arch/ia64/kernel/msi_ia64.c
+++ b/arch/ia64/kernel/msi_ia64.c
@@ -117,16 +117,16 @@ static struct irq_chip ia64_msi_chip = {
 
 int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
 {
-       if (platform_setup_msi_irq)
-               return platform_setup_msi_irq(pdev, desc);
+       if (ia64_platform_setup_msi_irq)
+               return ia64_platform_setup_msi_irq(pdev, desc);
 
        return ia64_setup_msi_irq(pdev, desc);
 }
 
 void arch_teardown_msi_irq(unsigned int irq)
 {
-       if (platform_teardown_msi_irq)
-               return platform_teardown_msi_irq(irq);
+       if (ia64_platform_teardown_msi_irq)
+               return ia64_platform_teardown_msi_irq(irq);
 
        return ia64_teardown_msi_irq(irq);
 }
diff --git a/arch/ia64/kernel/sal.c b/arch/ia64/kernel/sal.c
index 0464173..ceb70f7 100644
--- a/arch/ia64/kernel/sal.c
+++ b/arch/ia64/kernel/sal.c
@@ -255,7 +255,7 @@ check_sal_cache_flush (void)
         * Send ourselves a timer interrupt, wait until it's reported, and see
         * if SAL_CACHE_FLUSH drops it.
         */
-       platform_send_ipi(cpu, IA64_TIMER_VECTOR, IA64_IPI_DM_INT, 0);
+       ia64_platform_send_ipi(cpu, IA64_TIMER_VECTOR, IA64_IPI_DM_INT, 0);
 
        while (!ia64_get_irr(IA64_TIMER_VECTOR))
                cpu_relax();
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index aaefd9b..cab48af 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -621,7 +621,7 @@ setup_arch (char **cmdline_p)
        if (!nomca)
                ia64_mca_init();
 
-       platform_setup(cmdline_p);
+       ia64_platform_setup(cmdline_p);
 #ifndef CONFIG_IA64_HP_SIM
        check_sal_cache_flush();
 #endif
@@ -1050,7 +1050,7 @@ cpu_init (void)
                ia64_patch_phys_stack_reg(num_phys_stacked*8 + 8);
                max_num_phys_stacked = num_phys_stacked;
        }
-       platform_cpu_init();
+       ia64_platform_cpu_init();
        pm_idle = default_idle;
 }
 
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 9fcd4e6..6f235a9 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -145,7 +145,7 @@ static inline void
 send_IPI_single (int dest_cpu, int op)
 {
        set_bit(op, &per_cpu(ipi_operation, dest_cpu));
-       platform_send_ipi(dest_cpu, IA64_IPI_VECTOR, IA64_IPI_DM_INT, 0);
+       ia64_platform_send_ipi(dest_cpu, IA64_IPI_VECTOR, IA64_IPI_DM_INT, 0);
 }
 
 /*
@@ -211,8 +211,8 @@ kdump_smp_send_init(void)
        self_cpu = smp_processor_id();
        for_each_online_cpu(cpu) {
                if (cpu != self_cpu) {
-                       if(kdump_status[cpu] == 0)
-                               platform_send_ipi(cpu, 0, IA64_IPI_DM_INIT, 0);
+                       if (kdump_status[cpu] == 0)
+                               ia64_platform_send_ipi(cpu, 0, 
IA64_IPI_DM_INIT, 0);
                }
        }
 }
@@ -223,7 +223,7 @@ kdump_smp_send_init(void)
 void
 smp_send_reschedule (int cpu)
 {
-       platform_send_ipi(cpu, IA64_IPI_RESCHEDULE, IA64_IPI_DM_INT, 0);
+       ia64_platform_send_ipi(cpu, IA64_IPI_RESCHEDULE, IA64_IPI_DM_INT, 0);
 }
 EXPORT_SYMBOL_GPL(smp_send_reschedule);
 
@@ -233,7 +233,7 @@ EXPORT_SYMBOL_GPL(smp_send_reschedule);
 static void
 smp_send_local_flush_tlb (int cpu)
 {
-       platform_send_ipi(cpu, IA64_IPI_LOCAL_TLB_FLUSH, IA64_IPI_DM_INT, 0);
+       ia64_platform_send_ipi(cpu, IA64_IPI_LOCAL_TLB_FLUSH, IA64_IPI_DM_INT, 
0);
 }
 
 void
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 963d2db..e26431e 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -474,7 +474,7 @@ do_boot_cpu (int sapicid, int cpu, struct task_struct *idle)
        Dprintk("Sending wakeup vector %lu to AP 0x%x/0x%x.\n", 
ap_wakeup_vector, cpu, sapicid);
 
        set_brendez_area(cpu);
-       platform_send_ipi(cpu, ap_wakeup_vector, IA64_IPI_DM_INT, 0);
+       ia64_platform_send_ipi(cpu, ap_wakeup_vector, IA64_IPI_DM_INT, 0);
 
        /*
         * Wait 10s total for the AP to start
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index ecc904b..64ea49d 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -167,7 +167,7 @@ timer_interrupt (int irq, void *dev_id)
                return IRQ_HANDLED;
        }
 
-       platform_timer_interrupt(irq, dev_id);
+       ia64_platform_timer_interrupt(irq, dev_id);
 
        new_itm = local_cpu_data->itm_next;
 
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index c641333..03d3bde 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -439,7 +439,7 @@ static void __meminit scatter_node_data(void)
  * Each node's per-node area has a copy of the global pg_data_t list, so
  * we copy that to each node here, as well as setting the per-cpu pointer
  * to the local node data structure.  The active_cpus field of the per-node
- * structure gets setup by the platform_cpu_init() function later.
+ * structure gets setup by the ia64_platform_cpu_init() function later.
  */
 static void __init initialize_pernode_data(void)
 {
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 0eab454..61684a7 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -626,7 +626,7 @@ mem_init (void)
         * any drivers that may need the PCI DMA interface are initialized or 
bootmem has
         * been freed.
         */
-       platform_dma_init();
+       ia64_platform_dma_init();
 #endif
 
 #ifdef CONFIG_FLATMEM
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c
index 7b3cdc6..e91db3b 100644
--- a/arch/ia64/mm/tlb.c
+++ b/arch/ia64/mm/tlb.c
@@ -323,7 +323,7 @@ flush_tlb_range (struct vm_area_struct *vma, unsigned long 
start,
        preempt_disable();
 #ifdef CONFIG_SMP
        if (mm != current->active_mm || cpumask_weight(mm_cpumask(mm)) != 1) {
-               platform_global_tlb_purge(mm, start, end, nbits);
+               ia64_platform_global_tlb_purge(mm, start, end, nbits);
                preempt_enable();
                return;
        }
diff --git a/arch/ia64/pci/fixup.c b/arch/ia64/pci/fixup.c
index f5959c0..eab28e3 100644
--- a/arch/ia64/pci/fixup.c
+++ b/arch/ia64/pci/fixup.c
@@ -30,8 +30,8 @@ static void __devinit pci_fixup_video(struct pci_dev *pdev)
        struct pci_bus *bus;
        u16 config;
 
-       if ((strcmp(platform_name, "dig") != 0)
-           && (strcmp(platform_name, "hpzx1")  != 0))
+       if ((strcmp(ia64_platform_name, "dig") != 0)
+           && (strcmp(ia64_platform_name, "hpzx1")  != 0))
                return;
        /* Maybe, this machine supports legacy memory map. */
 
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 81acc7a..f40fd52 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -453,7 +453,7 @@ pcibios_fixup_bus (struct pci_bus *b)
        }
        list_for_each_entry(dev, &b->devices, bus_list)
                pcibios_fixup_device_resources(dev);
-       platform_pci_fixup_bus(b);
+       ia64_platform_pci_fixup_bus(b);
 }
 
 void pcibios_set_master (struct pci_dev *dev)
@@ -723,7 +723,7 @@ EXPORT_SYMBOL_GPL(ia64_dma_get_required_mask);
 
 u64 dma_get_required_mask(struct device *dev)
 {
-       return platform_dma_get_required_mask(dev);
+       return ia64_platform_dma_get_required_mask(dev);
 }
 EXPORT_SYMBOL_GPL(dma_get_required_mask);
 
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index f82e7b4..26eefee 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -556,7 +556,7 @@ static void __init sn_init_pdas(char **cmdline_p)
  * Called during cpu initialization on each cpu as it starts.
  * Currently, initializes the per-cpu data area for SNIA.
  * Also sets up a few fields in the nodepda.  Also known as
- * platform_cpu_init() by the ia64 machvec code.
+ * ia64_platform_cpu_init() by the ia64 machvec code.
  */
 void __cpuinit sn_cpu_init(void)
 {
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to