From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 50856C54EE9 for ; Mon, 19 Sep 2022 18:09:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id CFFD5400BF; Mon, 19 Sep 2022 18:09:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org CFFD5400BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1663610951; bh=JVIWep77r4iBBHhEHKJlVBkCttfiliz3XvgppGA6x8k=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=qUsVwCqWwIl0UgPcMPaa8IqGUbtOVVm5cnKrlsP7QlxpM4V4crMaSTD7pDaG386fR CKfdXvbMVQWfvaazoeYEeP1uLcKP9YYvkCUe/GMKsZBMqPrjG/IQP9QKQoVFQeUHIq NfTA4BTGQqJOIhsjZMMb3SuT4pT/UjXu8gcJl5G0PRQwVuDSCvenkrJphT8yGEW96i J5i5kfXQpBxb4ZGa+GhGZbnolNmFjXFM4cN+K/s2Iv4xfmRD+kPJ2yc0VmEtNCnNxY E5HtYXDYVO0fdjcRqlQlXVF2wS+ayca795YJQVfNl/X/fiI4xN+iWcm9btwOFToR76 E3lmuPPRjuShw== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 79NO3_LYdQiE; Mon, 19 Sep 2022 18:09:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id C5444400C8; Mon, 19 Sep 2022 18:09:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org C5444400C8 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0BF051BF2F1 for ; Mon, 19 Sep 2022 18:09:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id DAB05817D3 for ; Mon, 19 Sep 2022 18:09:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org DAB05817D3 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eKnc2DtM_I-6 for ; Mon, 19 Sep 2022 18:09:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org BECB4817A8 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by smtp1.osuosl.org (Postfix) with ESMTPS id BECB4817A8 for ; Mon, 19 Sep 2022 18:09:05 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6500,9779,10475"; a="286522598" X-IronPort-AV: E=Sophos;i="5.93,328,1654585200"; d="scan'208";a="286522598" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2022 11:09:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,328,1654585200"; d="scan'208";a="569750806" Received: from avenkata-desk0.sc.intel.com ([172.25.112.42]) by orsmga003.jf.intel.com with ESMTP; 19 Sep 2022 11:09:04 -0700 From: Anirudh Venkataramanan To: intel-wired-lan@lists.osuosl.org Date: Mon, 19 Sep 2022 11:09:48 -0700 Message-Id: <20220919180949.388785-1-anirudh.venkataramanan@intel.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663610945; x=1695146945; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=JxNk4b08YANfDrhSKuHWd3HwdfM9UAqDTfPhTfQi6d8=; b=YVuieY5WCxoEOzPjMDM9sCa4NcA5yayxw9RQWbdPJY7xjJ5ykL/DQpfd P9+mHc5W1pwjFH5GdTqP8RfRg64C8J0d39jAOmEWO1+TNJgY97VzwwGGe 379mIyvy4lsb8EyPhb89jsNLsq/VsApMi0S1iT3dkMvhKlYaUfp49gZdM staaDOzomL5qh1vFsalDjxO42QC8G3OHsXlvK5TZBJQ+adjyTeFlGi8Ir o54AyLqpyFaywFJTzyAgAuY4oog4mWgnm+lbbyA0nXPVicMnDQDibjvGg gbDXrsic6nZYcdV7u2UBTJzPh4MgYVEzxtBIM2QPbBJ46niCUVuqO3umN g==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=YVuieY5W Subject: [Intel-wired-lan] [RESEND PATCH net-next 1/2] e1000: Remove unnecessary use of kmap_atomic() X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Fabio M . De Francesco" , Ira Weiny Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" buffer_info->rxbuf.page accessed in e1000_clean_jumbo_rx_irq() is allocated using GFP_ATOMIC. Pages allocated with GFP_ATOMIC can't come from highmem and so there's no need to kmap() them. Just use page_address(). I don't have access to a 32-bit system so did some limited testing on qemu (qemu-system-i386 -m 4096 -smp 4 -device e1000e) with a 32-bit Debian 11.04 image. Cc: Ira Weiny Cc: Fabio M. De Francesco Cc: Jesse Brandeburg Cc: Tony Nguyen Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Anirudh Venkataramanan --- drivers/net/ethernet/intel/e1000/e1000_main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index 23299fc..93e57b1 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c @@ -4229,8 +4229,6 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter, */ p = buffer_info->rxbuf.page; if (length <= copybreak) { - u8 *vaddr; - if (likely(!(netdev->features & NETIF_F_RXFCS))) length -= 4; skb = e1000_alloc_rx_skb(adapter, @@ -4238,10 +4236,9 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter, if (!skb) break; - vaddr = kmap_atomic(p); - memcpy(skb_tail_pointer(skb), vaddr, - length); - kunmap_atomic(vaddr); + memcpy(skb_tail_pointer(skb), + page_address(p), length); + /* re-use the page, so don't erase * buffer_info->rxbuf.page */ -- 2.37.2 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan