summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2018-11-21 19:09:17 +0200
committerToomas Soome <tsoome@me.com>2019-11-22 20:47:42 +0200
commitd1f3e3c647f14e2496e646bb7ef0df729cbbf72a (patch)
tree651c3271b6a734b50f044a1d08975a634607fb23
parent027bcc9f64a0a5915089267b0dc54c9ee05782b0 (diff)
downloadillumos-joyent-d1f3e3c647f14e2496e646bb7ef0df729cbbf72a.tar.gz
11798 apix: cast between incompatible function types
Reviewed by: John Levon <john.levon@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/i86pc/io/apix/apix.c2
-rw-r--r--usr/src/uts/i86pc/io/hpet_acpi.c15
-rw-r--r--usr/src/uts/i86pc/io/pcplusmp/apic_common.c36
-rw-r--r--usr/src/uts/i86pc/sys/apic_common.h2
4 files changed, 24 insertions, 31 deletions
diff --git a/usr/src/uts/i86pc/io/apix/apix.c b/usr/src/uts/i86pc/io/apix/apix.c
index c87abc8ea5..18dee7499a 100644
--- a/usr/src/uts/i86pc/io/apix/apix.c
+++ b/usr/src/uts/i86pc/io/apix/apix.c
@@ -612,7 +612,7 @@ apix_picinit(void)
/* 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");
diff --git a/usr/src/uts/i86pc/io/hpet_acpi.c b/usr/src/uts/i86pc/io/hpet_acpi.c
index d65c514fe4..ac5a885a38 100644
--- a/usr/src/uts/i86pc/io/hpet_acpi.c
+++ b/usr/src/uts/i86pc/io/hpet_acpi.c
@@ -65,9 +65,8 @@ static int hpet_timer_available(uint32_t allocated_timers, uint32_t n);
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 @@ hpet_install_proxy(void)
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 @@ hpet_enable_timer(hpet_info_t *hip, uint32_t timer_n)
* 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 @@ hpet_cst_callback(uint32_t code)
* 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;
diff --git a/usr/src/uts/i86pc/io/pcplusmp/apic_common.c b/usr/src/uts/i86pc/io/pcplusmp/apic_common.c
index e74d8cbf80..e3a0f31cef 100644
--- a/usr/src/uts/i86pc/io/pcplusmp/apic_common.c
+++ b/usr/src/uts/i86pc/io/pcplusmp/apic_common.c
@@ -363,17 +363,17 @@ apic_cpcovf_mask_clear(void)
(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 @@ apic_cpu_send_SIPI(processorid_t cpun, boolean_t start)
/*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 @@ apic_cpu_start(processorid_t cpun, caddr_t arg)
*/
/*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 @@ apic_get_pir_ipivect(void)
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 @@ gethrtime_again:
}
/* 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 @@ apic_nmi_intr(caddr_t arg, struct regs *rp)
}
lock_clear(&apic_nmi_lock);
+ return (DDI_INTR_CLAIMED);
}
processorid_t
@@ -1285,7 +1283,7 @@ apic_clkinit(int hertz)
* 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 @@ apic_intrmap_init(int apic_mode)
}
}
-/*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) |
diff --git a/usr/src/uts/i86pc/sys/apic_common.h b/usr/src/uts/i86pc/sys/apic_common.h
index eeee3c8a6a..440f817beb 100644
--- a/usr/src/uts/i86pc/sys/apic_common.h
+++ b/usr/src/uts/i86pc/sys/apic_common.h
@@ -167,7 +167,7 @@ extern int apic_stretch_ISR; /* IPL of 3 matches nothing now */
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();