Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1034611ybi; Fri, 2 Aug 2019 08:17:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxV61w7z7lfBl5Jjy8b1uwxqkLW9XxWFLZr5Y5E+jHOldBQUKizpbpL8RCLzNXBIMD4d9Tw X-Received: by 2002:aa7:9834:: with SMTP id q20mr61009652pfl.196.1564759021560; Fri, 02 Aug 2019 08:17:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564759021; cv=none; d=google.com; s=arc-20160816; b=c6ipeIQtc+QlYyzcHKCaBEhPQHELoeQ/YYxCMjQmerywkqO3PjdKp26hvNRQdTAa57 gu1LbK6wPDpbJ4wuQtgUB7jzx2nFu5b74JSkQ8XbehWEOmh9ZkBgjQ5QWOGIrHRvk7Rr Qq+XwcHSwBFuEKKrMEQi4Dq9wxXLq8d7ybIdL9Tp5argvDFTlKMaqSSWppJ/F7SWBpZR DKUwB8ZlIbw9y/3bp7a75Ov4SKni0P97xqpltoMAfgk3/MDHSZiRwrXoYARntserPGtf /5ysu8F9593XlmkjFuE5P8k+n5SQmkPyi7JPJDaoKGgP50uEU1mO5jcfefG4A09sINyr LP7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=J94I4RVo+HlGJrEhMLi4W1IEiQSt/Qc3dQmaxLA0Tv0=; b=cE3K1y1B9IvKcvY+ym9GKYeWxsFUQytMWHeIGdacucKx4IoWK6sBDtfkdhCavWQUcB XtTyC43WRYRAhYPN+qBwJSNEYewaKq/7s3Ouw2bdznJgKvvJYyHPmG68IzuYGO4kAeaS PiDxzQjE5UlaCTVI7Di3AkAR3GRLSSC5bZsMGleQMnVJHF4cFMqn+6PhRgVmrfVP7jIH qO/DcE1ckhwyWdOMKlXnszVRMZw40G+wKLRfntVgc81HxFUYP4+DJlyHQp8n0eCFnZUK hBX+P6c8Xj7ji4OaFfp+UyVFi2WGB2Owt1wUnDvNpD+65ITFDO10Vu8UjszWyVpL1a4j S4oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o60p+NQK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q23si39222138pfc.179.2019.08.02.08.16.22; Fri, 02 Aug 2019 08:17:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o60p+NQK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390281AbfHBJdH (ORCPT + 99 others); Fri, 2 Aug 2019 05:33:07 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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;