Index: sys/dev/ena/ena.c =================================================================== --- sys/dev/ena/ena.c +++ sys/dev/ena/ena.c @@ -3309,19 +3309,24 @@ static int ena_enable_wc(struct resource *res) { -#if defined(__i386) || defined(__amd64) +#if defined(__i386) || defined(__amd64) || defined(__aarch64__) vm_offset_t va; vm_size_t len; - int rc; va = (vm_offset_t)rman_get_virtual(res); len = rman_get_size(res); - /* Enable write combining */ +#endif +#if defined(__i386) || defined(__amd64) + int rc; rc = pmap_change_attr(va, len, PAT_WRITE_COMBINING); - if (unlikely(rc != 0)) { + if (unlikely(rc != 0)) ena_trace(ENA_ALERT, "pmap_change_attr failed, %d\n", rc); - return (rc); - } + + return (rc); +#elif defined(__aarch64__) + vm_paddr_t pa; + pa = rman_get_start(res); + pmap_kenter(va, len, pa); return (0); #endif @@ -4352,14 +4357,6 @@ set_default_llq_configurations(&llq_config); -#if defined(__arm__) || defined(__aarch64__) - /* - * Force LLQ disable, as the driver is not supporting WC enablement - * on the ARM architecture. Using LLQ without WC would affect - * performance in a negative way. - */ - ena_dev->supported_features &= ~(1 << ENA_ADMIN_LLQ); -#endif rc = ena_set_queues_placement_policy(pdev, ena_dev, &get_feat_ctx.llq, &llq_config); if (unlikely(rc != 0)) { @@ -4661,5 +4658,8 @@ nitems(ena_vendor_info_array) - 1); MODULE_DEPEND(ena, pci, 1, 1, 1); MODULE_DEPEND(ena, ether, 1, 1, 1); +#ifdef DEV_NETMAP +MODULE_DEPEND(ena, netmap, 1, 1, 1); +#endif /* DEV_NETMAP */ /*********************************************************************/