From edbe7075d144b35e8232ca32f373c1e0c26ff085 Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Thu, 20 Sep 2007 14:21:11 -0600 Subject: [IA64] abstract SAL_CALL wrapper to allow other firmware entry points SAL_CALL() always calls through the ia64_sal function pointer. I am adding new functionality that needs the same conventions as SAL_CALL (FP regs saved/restored, sal_lock acquired, etc), but doesn't use the ia64_sal function pointer. This patch pulls the body of SAL_CALL out into a new "IA64_FW_CALL" that takes care of these calling conventions, but allows the caller to specify either ia64_sal or some other firmware entry point. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown Signed-off-by: Tony Luck --- include/asm-ia64/sal.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h index 46cadf5aaac..1f5412d6f9b 100644 --- a/include/asm-ia64/sal.h +++ b/include/asm-ia64/sal.h @@ -46,25 +46,28 @@ extern spinlock_t sal_lock; /* SAL spec _requires_ eight args for each call. */ -#define __SAL_CALL(result,a0,a1,a2,a3,a4,a5,a6,a7) \ - result = (*ia64_sal)(a0,a1,a2,a3,a4,a5,a6,a7) +#define __IA64_FW_CALL(entry,result,a0,a1,a2,a3,a4,a5,a6,a7) \ + result = (*entry)(a0,a1,a2,a3,a4,a5,a6,a7) -# define SAL_CALL(result,args...) do { \ +# define IA64_FW_CALL(entry,result,args...) do { \ unsigned long __ia64_sc_flags; \ struct ia64_fpreg __ia64_sc_fr[6]; \ ia64_save_scratch_fpregs(__ia64_sc_fr); \ spin_lock_irqsave(&sal_lock, __ia64_sc_flags); \ - __SAL_CALL(result, args); \ + __IA64_FW_CALL(entry, result, args); \ spin_unlock_irqrestore(&sal_lock, __ia64_sc_flags); \ ia64_load_scratch_fpregs(__ia64_sc_fr); \ } while (0) +# define SAL_CALL(result,args...) \ + IA64_FW_CALL(ia64_sal, result, args); + # define SAL_CALL_NOLOCK(result,args...) do { \ unsigned long __ia64_scn_flags; \ struct ia64_fpreg __ia64_scn_fr[6]; \ ia64_save_scratch_fpregs(__ia64_scn_fr); \ local_irq_save(__ia64_scn_flags); \ - __SAL_CALL(result, args); \ + __IA64_FW_CALL(ia64_sal, result, args); \ local_irq_restore(__ia64_scn_flags); \ ia64_load_scratch_fpregs(__ia64_scn_fr); \ } while (0) @@ -73,7 +76,7 @@ extern spinlock_t sal_lock; struct ia64_fpreg __ia64_scs_fr[6]; \ ia64_save_scratch_fpregs(__ia64_scs_fr); \ preempt_disable(); \ - __SAL_CALL(result, args); \ + __IA64_FW_CALL(ia64_sal, result, args); \ preempt_enable(); \ ia64_load_scratch_fpregs(__ia64_scs_fr); \ } while (0) -- cgit v1.2.3 From ac542a513bd7905fa1a700881e0a40a94d3ed46a Mon Sep 17 00:00:00 2001 From: Kenji Kaneshige Date: Sat, 1 Sep 2007 16:36:26 +0900 Subject: [IA64] Fix kernel panic in kdump on INIT Fix the problem that kdump on INIT causes a kernel panic if kdump kernel image is not configured. The cause of this problem is machine_kexec_on_init() is using printk in INIT context. It should use ia64_mca_printk() instead. Signed-off-by: Kenji Kaneshige Signed-off-by: Tony Luck --- include/asm-ia64/mca.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h index edd5d01028d..823553bf12e 100644 --- a/include/asm-ia64/mca.h +++ b/include/asm-ia64/mca.h @@ -151,6 +151,8 @@ extern void ia64_mca_cmc_vector_setup(void); extern int ia64_reg_MCA_extension(int (*fn)(void *, struct ia64_sal_os_state *)); extern void ia64_unreg_MCA_extension(void); extern u64 ia64_get_rnat(u64 *); +extern void ia64_mca_printk(const char * fmt, ...) + __attribute__ ((format (printf, 1, 2))); struct ia64_mca_notify_die { struct ia64_sal_os_state *sos; -- cgit v1.2.3