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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DC4AC433FF for ; Fri, 2 Aug 2019 09:33:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57E6A217D4 for ; Fri, 2 Aug 2019 09:33:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564738387; bh=vgCLMKW+NQvuHw3CHGVcHXOkLZcyuLSi4AZxwb9uRkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ew0ftIHCY80iYgU+S/SB/BgNt9qnmL8wXsL+EzWGxlWCgaY/c9bdfZFNnTY7AIxbM AuAFdPziX5gCsc5Hnp3X3gQmeyQkjyzYRc4EoLiguBnY8XevvYlLzKEOh5y6bCVi12 yRzOVtLw3E3hevER4oW/Hho12DpK7R5IV9mN+RMc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730769AbfHBJdF (ORCPT ); Fri, 2 Aug 2019 05:33:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:60340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404773AbfHBJdD (ORCPT ); Fri, 2 Aug 2019 05:33:03 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CF2B8217D7; Fri, 2 Aug 2019 09:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564738382; bh=vgCLMKW+NQvuHw3CHGVcHXOkLZcyuLSi4AZxwb9uRkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o60p+NQKJi9Sth+Tkvlobfp82u9Is+ouUJCPMmUt2sq6Nvvk8jBe/ltNOcR8v/GLR 8eugv/NsPaK/HfeRCVw4gJklgkN4X8OaL2Lm/Nkoq/MIhwGJOogUUqF6Hjhv9GWWFI ThmFsIXBWTd2ZD/jVpNI+LAhE1xc+ZruZONUoNsQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Shishkin , Andy Shevchenko , Ammy Yi Subject: [PATCH 4.4 082/158] intel_th: msu: Fix single mode with disabled IOMMU Date: Fri, 2 Aug 2019 11:28:23 +0200 Message-Id: <20190802092220.878378356@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092203.671944552@linuxfoundation.org> References: <20190802092203.671944552@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Alexander Shishkin commit 918b8646497b5dba6ae82d4a7325f01b258972b9 upstream. Commit 4e0eaf239fb3 ("intel_th: msu: Fix single mode with IOMMU") switched the single mode code to use dma mapping pages obtained from the page allocator, but with IOMMU disabled, that may lead to using SWIOTLB bounce buffers and without additional sync'ing, produces empty trace buffers. Fix this by using a DMA32 GFP flag to the page allocation in single mode, as the device supports full 32-bit DMA addressing. Signed-off-by: Alexander Shishkin Fixes: 4e0eaf239fb3 ("intel_th: msu: Fix single mode with IOMMU") Reviewed-by: Andy Shevchenko Reported-by: Ammy Yi Cc: stable Link: https://lore.kernel.org/r/20190621161930.60785-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/hwtracing/intel_th/msu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hwtracing/intel_th/msu.c +++ b/drivers/hwtracing/intel_th/msu.c @@ -625,7 +625,7 @@ static int msc_buffer_contig_alloc(struc goto err_out; ret = -ENOMEM; - page = alloc_pages(GFP_KERNEL | __GFP_ZERO, order); + page = alloc_pages(GFP_KERNEL | __GFP_ZERO | GFP_DMA32, order); if (!page) goto err_free_sgt;