Commit 9dcb98f3 authored by David Mosberger's avatar David Mosberger

ia64: GCC v3.5 fixes.

GCC v3.5 doesn't like it when a function gets cast to a
function-pointer with a different signature.  In fact, it exterts
extreme prejudice in this case and replaces the call-site with a call
to __builtin_trap()!  Fix this by providing appropriately typed
dummy-functions for the macvec operations as needed.

While at it, also clean up some machvec handlers which weren't used anywhere.
parent 75b662dc
...@@ -50,8 +50,27 @@ machvec_noop (void) ...@@ -50,8 +50,27 @@ machvec_noop (void)
EXPORT_SYMBOL(machvec_noop); EXPORT_SYMBOL(machvec_noop);
void void
machvec_memory_fence (void) machvec_setup (char **arg)
{
}
EXPORT_SYMBOL(machvec_setup);
void
machvec_timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
{
}
EXPORT_SYMBOL(machvec_timer_interrupt);
void
machvec_dma_sync_single (struct device *hwdev, dma_addr_t dma_handle, size_t size, int dir)
{
mb();
}
EXPORT_SYMBOL(machvec_dma_sync_single);
void
machvec_dma_sync_sg (struct device *hwdev, struct scatterlist *sg, int n, int dir)
{ {
mb(); mb();
} }
EXPORT_SYMBOL(machvec_memory_fence); EXPORT_SYMBOL(machvec_dma_sync_sg);
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Copyright (C) 1999 Silicon Graphics, Inc. * Copyright (C) 1999 Silicon Graphics, Inc.
* Copyright (C) Srinivasa Thirumalachar <sprasad@engr.sgi.com> * Copyright (C) Srinivasa Thirumalachar <sprasad@engr.sgi.com>
* Copyright (C) Vijay Chander <vijay@engr.sgi.com> * Copyright (C) Vijay Chander <vijay@engr.sgi.com>
* Copyright (C) 1999-2001, 2003 Hewlett-Packard Co. * Copyright (C) 1999-2001, 2003-2004 Hewlett-Packard Co.
* David Mosberger-Tang <davidm@hpl.hp.com> * David Mosberger-Tang <davidm@hpl.hp.com>
*/ */
#ifndef _ASM_IA64_MACHVEC_H #ifndef _ASM_IA64_MACHVEC_H
...@@ -21,12 +21,8 @@ struct irq_desc; ...@@ -21,12 +21,8 @@ struct irq_desc;
struct page; struct page;
typedef void ia64_mv_setup_t (char **); typedef void ia64_mv_setup_t (char **);
typedef void ia64_mv_cpu_init_t(void); typedef void ia64_mv_cpu_init_t (void);
typedef void ia64_mv_irq_init_t (void); typedef void ia64_mv_irq_init_t (void);
typedef void ia64_mv_mca_init_t (void);
typedef void ia64_mv_mca_handler_t (void);
typedef void ia64_mv_cmci_handler_t (int, void *, struct pt_regs *);
typedef void ia64_mv_log_print_t (void);
typedef void ia64_mv_send_ipi_t (int, int, int, int); typedef void ia64_mv_send_ipi_t (int, int, int, int);
typedef void ia64_mv_timer_interrupt_t (int, void *, struct pt_regs *); typedef void ia64_mv_timer_interrupt_t (int, void *, struct pt_regs *);
typedef void ia64_mv_global_tlb_purge_t (unsigned long, unsigned long, unsigned long); typedef void ia64_mv_global_tlb_purge_t (unsigned long, unsigned long, unsigned long);
...@@ -73,7 +69,10 @@ typedef unsigned int ia64_mv_readl_relaxed_t (void *); ...@@ -73,7 +69,10 @@ typedef unsigned int ia64_mv_readl_relaxed_t (void *);
typedef unsigned long ia64_mv_readq_relaxed_t (void *); typedef unsigned long ia64_mv_readq_relaxed_t (void *);
extern void machvec_noop (void); extern void machvec_noop (void);
extern void machvec_memory_fence (void); extern void machvec_setup (char **);
extern void machvec_timer_interrupt (int, void *, struct pt_regs *);
extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int);
extern void machvec_dma_sync_sg (struct device *, struct scatterlist *, int, int);
# if defined (CONFIG_IA64_HP_SIM) # if defined (CONFIG_IA64_HP_SIM)
# include <asm/machvec_hpsim.h> # include <asm/machvec_hpsim.h>
...@@ -92,10 +91,6 @@ extern void machvec_memory_fence (void); ...@@ -92,10 +91,6 @@ extern void machvec_memory_fence (void);
# define platform_setup ia64_mv.setup # define platform_setup ia64_mv.setup
# define platform_cpu_init ia64_mv.cpu_init # define platform_cpu_init ia64_mv.cpu_init
# define platform_irq_init ia64_mv.irq_init # define platform_irq_init ia64_mv.irq_init
# define platform_mca_init ia64_mv.mca_init
# define platform_mca_handler ia64_mv.mca_handler
# define platform_cmci_handler ia64_mv.cmci_handler
# define platform_log_print ia64_mv.log_print
# define platform_send_ipi ia64_mv.send_ipi # define platform_send_ipi ia64_mv.send_ipi
# define platform_timer_interrupt ia64_mv.timer_interrupt # define platform_timer_interrupt ia64_mv.timer_interrupt
# define platform_global_tlb_purge ia64_mv.global_tlb_purge # define platform_global_tlb_purge ia64_mv.global_tlb_purge
...@@ -140,10 +135,6 @@ struct ia64_machine_vector { ...@@ -140,10 +135,6 @@ struct ia64_machine_vector {
ia64_mv_setup_t *setup; ia64_mv_setup_t *setup;
ia64_mv_cpu_init_t *cpu_init; ia64_mv_cpu_init_t *cpu_init;
ia64_mv_irq_init_t *irq_init; ia64_mv_irq_init_t *irq_init;
ia64_mv_mca_init_t *mca_init;
ia64_mv_mca_handler_t *mca_handler;
ia64_mv_cmci_handler_t *cmci_handler;
ia64_mv_log_print_t *log_print;
ia64_mv_send_ipi_t *send_ipi; ia64_mv_send_ipi_t *send_ipi;
ia64_mv_timer_interrupt_t *timer_interrupt; ia64_mv_timer_interrupt_t *timer_interrupt;
ia64_mv_global_tlb_purge_t *global_tlb_purge; ia64_mv_global_tlb_purge_t *global_tlb_purge;
...@@ -184,10 +175,6 @@ struct ia64_machine_vector { ...@@ -184,10 +175,6 @@ struct ia64_machine_vector {
platform_setup, \ platform_setup, \
platform_cpu_init, \ platform_cpu_init, \
platform_irq_init, \ platform_irq_init, \
platform_mca_init, \
platform_mca_handler, \
platform_cmci_handler, \
platform_log_print, \
platform_send_ipi, \ platform_send_ipi, \
platform_timer_interrupt, \ platform_timer_interrupt, \
platform_global_tlb_purge, \ platform_global_tlb_purge, \
...@@ -250,31 +237,20 @@ extern ia64_mv_dma_supported swiotlb_dma_supported; ...@@ -250,31 +237,20 @@ extern ia64_mv_dma_supported swiotlb_dma_supported;
* to update the machvec files for all existing platforms. * to update the machvec files for all existing platforms.
*/ */
#ifndef platform_setup #ifndef platform_setup
# define platform_setup ((ia64_mv_setup_t *) machvec_noop) # define platform_setup machvec_setup
#endif #endif
#ifndef platform_cpu_init #ifndef platform_cpu_init
# define platform_cpu_init ((ia64_mv_cpu_init_t *) machvec_noop) # define platform_cpu_init machvec_noop
#endif #endif
#ifndef platform_irq_init #ifndef platform_irq_init
# define platform_irq_init ((ia64_mv_irq_init_t *) machvec_noop) # define platform_irq_init machvec_noop
#endif
#ifndef platform_mca_init
# define platform_mca_init ((ia64_mv_mca_init_t *) machvec_noop)
#endif
#ifndef platform_mca_handler
# define platform_mca_handler ((ia64_mv_mca_handler_t *) machvec_noop)
#endif
#ifndef platform_cmci_handler
# define platform_cmci_handler ((ia64_mv_cmci_handler_t *) machvec_noop)
#endif
#ifndef platform_log_print
# define platform_log_print ((ia64_mv_log_print_t *) machvec_noop)
#endif #endif
#ifndef platform_send_ipi #ifndef platform_send_ipi
# define platform_send_ipi ia64_send_ipi /* default to architected version */ # define platform_send_ipi ia64_send_ipi /* default to architected version */
#endif #endif
#ifndef platform_timer_interrupt #ifndef platform_timer_interrupt
# define platform_timer_interrupt ((ia64_mv_timer_interrupt_t *) machvec_noop) # define platform_timer_interrupt machvec_timer_interrupt
#endif #endif
#ifndef platform_global_tlb_purge #ifndef platform_global_tlb_purge
# define platform_global_tlb_purge ia64_global_tlb_purge /* default to architected version */ # define platform_global_tlb_purge ia64_global_tlb_purge /* default to architected version */
......
...@@ -26,10 +26,10 @@ extern ia64_mv_dma_supported sba_dma_supported; ...@@ -26,10 +26,10 @@ extern ia64_mv_dma_supported sba_dma_supported;
#define platform_dma_unmap_single sba_unmap_single #define platform_dma_unmap_single sba_unmap_single
#define platform_dma_map_sg sba_map_sg #define platform_dma_map_sg sba_map_sg
#define platform_dma_unmap_sg sba_unmap_sg #define platform_dma_unmap_sg sba_unmap_sg
#define platform_dma_sync_single_for_cpu ((ia64_mv_dma_sync_single_for_cpu *) machvec_memory_fence) #define platform_dma_sync_single_for_cpu machvec_dma_sync_single
#define platform_dma_sync_sg_for_cpu ((ia64_mv_dma_sync_sg_for_cpu *) machvec_memory_fence) #define platform_dma_sync_sg_for_cpu machvec_dma_sync_sg
#define platform_dma_sync_single_for_device ((ia64_mv_dma_sync_single_for_device *) machvec_memory_fence) #define platform_dma_sync_single_for_device machvec_dma_sync_single
#define platform_dma_sync_sg_for_device ((ia64_mv_dma_sync_sg_for_device *) machvec_memory_fence) #define platform_dma_sync_sg_for_device machvec_dma_sync_sg
#define platform_dma_supported sba_dma_supported #define platform_dma_supported sba_dma_supported
#endif /* _ASM_IA64_MACHVEC_HPZX1_h */ #endif /* _ASM_IA64_MACHVEC_HPZX1_h */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment