Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/spe/arm_spe_dev.c
| Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Lines | |||||
| static int | static int | ||||
| arm_spe_intr(void *arg) | arm_spe_intr(void *arg) | ||||
| { | { | ||||
| int cpu_id = PCPU_GET(cpuid); | int cpu_id = PCPU_GET(cpuid); | ||||
| struct arm_spe_softc *sc = arg; | struct arm_spe_softc *sc = arg; | ||||
| uint64_t pmbsr; | uint64_t pmbsr; | ||||
| uint64_t base, limit; | uint64_t base, limit; | ||||
| uint8_t ec; | uint8_t ec; | ||||
| struct arm_spe_info *info = &sc->spe_info[cpu_id]; | struct arm_spe_info *info = sc->spe_info[cpu_id]; | ||||
| uint8_t i = info->buf_idx; | uint8_t i = info->buf_idx; | ||||
| struct arm_spe_buf_info *buf = &info->buf_info[i]; | struct arm_spe_buf_info *buf = &info->buf_info[i]; | ||||
| struct arm_spe_buf_info *prev_buf = &info->buf_info[!i]; | struct arm_spe_buf_info *prev_buf = &info->buf_info[!i]; | ||||
| device_t dev = sc->dev; | device_t dev = sc->dev; | ||||
| /* Make sure the profiling data is visible to the CPU */ | /* Make sure the profiling data is visible to the CPU */ | ||||
| psb_csync(); | psb_csync(); | ||||
| dsb(nsh); | dsb(nsh); | ||||
| ▲ Show 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | |||||
| static void | static void | ||||
| arm_spe_error(void *arg, int pending __unused) | arm_spe_error(void *arg, int pending __unused) | ||||
| { | { | ||||
| struct hwt_context *ctx = arg; | struct hwt_context *ctx = arg; | ||||
| struct kevent kev; | struct kevent kev; | ||||
| int ret; | int ret; | ||||
| if (!CPU_EMPTY(&ctx->cpu_map)) | |||||
| smp_rendezvous_cpus(ctx->cpu_map, smp_no_rendezvous_barrier, | smp_rendezvous_cpus(ctx->cpu_map, smp_no_rendezvous_barrier, | ||||
| arm_spe_disable, smp_no_rendezvous_barrier, NULL); | arm_spe_disable, smp_no_rendezvous_barrier, NULL); | ||||
| EV_SET(&kev, ARM_SPE_KQ_SHUTDOWN, EVFILT_USER, 0, NOTE_TRIGGER, 0, NULL); | EV_SET(&kev, ARM_SPE_KQ_SHUTDOWN, EVFILT_USER, 0, NOTE_TRIGGER, 0, NULL); | ||||
| ret = kqfd_register(ctx->kqueue_fd, &kev, ctx->hwt_td, M_WAITOK); | ret = kqfd_register(ctx->kqueue_fd, &kev, ctx->hwt_td, M_WAITOK); | ||||
| if (ret) | if (ret) | ||||
| dprintf("%s kqfd_register ret:%d\n", __func__, ret); | dprintf("%s kqfd_register ret:%d\n", __func__, ret); | ||||
| } | } | ||||
| MODULE_DEPEND(spe, hwt, 1, 1, 1); | MODULE_DEPEND(spe, hwt, 1, 1, 1); | ||||
| MODULE_VERSION(spe, 1); | MODULE_VERSION(spe, 1); | ||||