Mercurial > illumos > git > illumos-omnios
changeset 22413:194bdf0acf86
11798 apix: cast between incompatible function types
Reviewed by: John Levon <john.levon@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
author | Toomas Soome <tsoome@me.com> |
---|---|
date | Wed, 21 Nov 2018 19:09:17 +0200 |
parents | 1214efd2d210 |
children | b518a41cc88d |
files | usr/src/uts/i86pc/io/apix/apix.c usr/src/uts/i86pc/io/hpet_acpi.c usr/src/uts/i86pc/io/pcplusmp/apic_common.c usr/src/uts/i86pc/sys/apic_common.h |
diffstat | 4 files changed, 24 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/i86pc/io/apix/apix.c Mon Oct 22 12:33:03 2018 +0300 +++ b/usr/src/uts/i86pc/io/apix/apix.c Wed Nov 21 19:09:17 2018 +0200 @@ -612,7 +612,7 @@ /* add nmi handler - least priority nmi handler */ LOCK_INIT_CLEAR(&apic_nmi_lock); - if (!psm_add_nmintr(0, (avfunc) apic_nmi_intr, + if (!psm_add_nmintr(0, apic_nmi_intr, "apix NMI handler", (caddr_t)NULL)) cmn_err(CE_WARN, "apix: Unable to add nmi handler");
--- a/usr/src/uts/i86pc/io/hpet_acpi.c Mon Oct 22 12:33:03 2018 +0300 +++ b/usr/src/uts/i86pc/io/hpet_acpi.c Wed Nov 21 19:09:17 2018 +0200 @@ -65,9 +65,8 @@ static void hpet_timer_alloc(uint32_t *allocated_timers, uint32_t n); static void hpet_timer_set_up(hpet_info_t *hip, uint32_t timer_n, uint32_t interrupt); -static uint_t hpet_isr(char *arg); -static uint32_t hpet_install_interrupt_handler(uint_t (*func)(char *), - int vector); +static uint_t hpet_isr(caddr_t, caddr_t); +static uint32_t hpet_install_interrupt_handler(avfunc func, int vector); static void hpet_uninstall_interrupt_handler(void); static void hpet_expire_all(void); static boolean_t hpet_guaranteed_schedule(hrtime_t required_wakeup_time); @@ -350,8 +349,7 @@ static void hpet_uninstall_interrupt_handler(void) { - rem_avintr(NULL, CBE_HIGH_PIL, (avfunc)&hpet_isr, - hpet_info.cstate_timer.intr); + rem_avintr(NULL, CBE_HIGH_PIL, &hpet_isr, hpet_info.cstate_timer.intr); } static int @@ -610,11 +608,11 @@ * apic_init() psm_ops entry point. */ static uint32_t -hpet_install_interrupt_handler(uint_t (*func)(char *), int vector) +hpet_install_interrupt_handler(avfunc func, int vector) { uint32_t retval; - retval = add_avintr(NULL, CBE_HIGH_PIL, (avfunc)func, "HPET Timer", + retval = add_avintr(NULL, CBE_HIGH_PIL, func, "HPET Timer", vector, NULL, NULL, NULL, NULL); if (retval == 0) { cmn_err(CE_WARN, "!hpet_acpi: add_avintr() failed"); @@ -1001,9 +999,8 @@ * This ISR runs on one CPU which pokes other CPUs out of Deep C-state as * needed. */ -/* ARGSUSED */ static uint_t -hpet_isr(char *arg) +hpet_isr(caddr_t arg __unused, caddr_t arg1 __unused) { uint64_t timer_status; uint64_t timer_mask;
--- a/usr/src/uts/i86pc/io/pcplusmp/apic_common.c Mon Oct 22 12:33:03 2018 +0300 +++ b/usr/src/uts/i86pc/io/pcplusmp/apic_common.c Wed Nov 21 19:09:17 2018 +0200 @@ -363,17 +363,17 @@ (apic_reg_ops->apic_read(APIC_PCINT_VECT) & ~APIC_LVT_MASK)); } -/*ARGSUSED*/ static int -apic_cmci_enable(xc_arg_t arg1, xc_arg_t arg2, xc_arg_t arg3) +apic_cmci_enable(xc_arg_t arg1 __unused, xc_arg_t arg2 __unused, + xc_arg_t arg3 __unused) { apic_reg_ops->apic_write(APIC_CMCI_VECT, apic_cmci_vect); return (0); } -/*ARGSUSED*/ static int -apic_cmci_disable(xc_arg_t arg1, xc_arg_t arg2, xc_arg_t arg3) +apic_cmci_disable(xc_arg_t arg1 __unused, xc_arg_t arg2 __unused, + xc_arg_t arg3 __unused) { apic_reg_ops->apic_write(APIC_CMCI_VECT, apic_cmci_vect | AV_MASK); return (0); @@ -497,7 +497,7 @@ /*ARGSUSED1*/ int -apic_cpu_start(processorid_t cpun, caddr_t arg) +apic_cpu_start(processorid_t cpun, caddr_t arg __unused) { ASSERT(MUTEX_HELD(&cpu_lock)); @@ -523,7 +523,7 @@ */ /*ARGSUSED1*/ int -apic_cpu_stop(processorid_t cpun, caddr_t arg) +apic_cpu_stop(processorid_t cpun, caddr_t arg __unused) { int rc; cpu_t *cp; @@ -644,15 +644,13 @@ return (apic_pir_vect); } -/*ARGSUSED*/ void -apic_set_idlecpu(processorid_t cpun) +apic_set_idlecpu(processorid_t cpun __unused) { } -/*ARGSUSED*/ void -apic_unset_idlecpu(processorid_t cpun) +apic_unset_idlecpu(processorid_t cpun __unused) { } @@ -805,21 +803,20 @@ } /* apic NMI handler */ -/*ARGSUSED*/ -void -apic_nmi_intr(caddr_t arg, struct regs *rp) +uint_t +apic_nmi_intr(caddr_t arg __unused, caddr_t arg1 __unused) { nmi_action_t action = nmi_action; if (apic_shutdown_processors) { apic_disable_local_apic(); - return; + return (DDI_INTR_CLAIMED); } apic_error |= APIC_ERR_NMI; if (!lock_try(&apic_nmi_lock)) - return; + return (DDI_INTR_CLAIMED); apic_num_nmis++; /* @@ -860,6 +857,7 @@ } lock_clear(&apic_nmi_lock); + return (DDI_INTR_CLAIMED); } processorid_t @@ -1285,7 +1283,7 @@ * after filesystems are all unmounted. */ void -apic_preshutdown(int cmd, int fcn) +apic_preshutdown(int cmd __unused, int fcn __unused) { APIC_VERBOSE_POWEROFF(("apic_preshutdown(%d,%d); m=%d a=%d\n", cmd, fcn, apic_poweroff_method, apic_enable_acpi)); @@ -1639,16 +1637,14 @@ } } -/*ARGSUSED*/ static void -apic_record_ioapic_rdt(void *intrmap_private, ioapic_rdt_t *irdt) +apic_record_ioapic_rdt(void *intrmap_private __unused, ioapic_rdt_t *irdt) { irdt->ir_hi <<= APIC_ID_BIT_OFFSET; } -/*ARGSUSED*/ static void -apic_record_msi(void *intrmap_private, msi_regs_t *mregs) +apic_record_msi(void *intrmap_private __unused, msi_regs_t *mregs) { mregs->mr_addr = MSI_ADDR_HDR | (MSI_ADDR_RH_FIXED << MSI_ADDR_RH_SHIFT) |
--- a/usr/src/uts/i86pc/sys/apic_common.h Mon Oct 22 12:33:03 2018 +0300 +++ b/usr/src/uts/i86pc/sys/apic_common.h Wed Nov 21 19:09:17 2018 +0200 @@ -167,7 +167,7 @@ extern cyclic_id_t apic_cyclic_id; -extern void apic_nmi_intr(caddr_t arg, struct regs *rp); +extern uint_t apic_nmi_intr(caddr_t arg, caddr_t); extern int apic_clkinit(); extern hrtime_t apic_gettime(); extern hrtime_t apic_gethrtime();