Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1065622ybl; Wed, 14 Aug 2019 10:09:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLtzUgxMdJ/OdEYvzMu2689mg9WvTxaXT9mGrzjfNrea/8PdCzmZnKFvhinDMHVPRPO6As X-Received: by 2002:a62:db86:: with SMTP id f128mr933935pfg.159.1565802549811; Wed, 14 Aug 2019 10:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802549; cv=none; d=google.com; s=arc-20160816; b=vFxMVr4voVj1STNA2qZzHkxHDk9vOOy0oxGBR5mTm+cHFvitBHoGp3FNeZ2BgFWEfr azWJsS/y505xKVUswYV7USEpSczPdykCMH6DeI1lK2/2iVvTD3iKiQT8y7cQf//KPVAA BeP9eXqkdLKuEurYAL847Na0CKXQr3kBHGV4/LSh8Ury3Z9WTlTCobIdwYINeW6NdTa0 AotR4HbCHvgSbO8hMnbbbI5dqdumgF8qAqpZCvcZ+HLhmZ3/5vADBwEiDJLrRvfYgp3m JWpqZhZrqgrSelEXlCh69//g+SJr2vU/4SDzx5zYC36b4xbGdQ74PFdxNUiAFVRGXoTW vRfA== 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=zStwgBXAKQEOj/LH9gBLefdE8WQoYRXXfhfJgl9v+J0=; b=kfK0NwmDiCLO73LVQbZKPkwzJiqWEJq1u9kV8haALsIcdTmaMcM2XxKp3Soc5cdEqa crrFIkjHSmIWGb41MGH68s6j+15Ofj76cDWyu4zBbpc01apBfLyczfCBEzvuVPjFPwUM gdtka2HDNpg148fYvsfAUZk++N+ATpETHNGT3ezZUh/vH6QwUKQWyxPjvco3i7nPxDqu tnQWfJwSLo1vDMlyJdOQJqoPixvfMg1/5B6tzYXFYrKaJkJj/M7D6oZ4PYnrh+I/y3Qw RRp8LDjVUXVW0DdBZc6q6z97m1pwFQlzuiQbPTrNZLamB3sCLV78MUGtoIIVdeMUi13W 8t2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dRnzMx4V; 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 v8si90420pfm.83.2019.08.14.10.08.53; Wed, 14 Aug 2019 10:09:09 -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=dRnzMx4V; 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 S1728463AbfHNRHk (ORCPT + 99 others); Wed, 14 Aug 2019 13:07:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:57210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729146AbfHNRHi (ORCPT ); Wed, 14 Aug 2019 13:07:38 -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 0346D2173E; Wed, 14 Aug 2019 17:07:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802457; bh=0Vp4UWZHnthpVFQDM/7UKuuzPZZ4o4H7ERW+zQ1yIRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dRnzMx4VFb2rnnEY/y1aOoUhrE9qB3SGmagHwCGyJ68YOInKcvpmHvo5ol1Y7MtZp X5QEGYJPJeHDpa8leao+xbgDR2FBQNe7EP2TASqqrQ/MhiZkvvdcoUJyS0+4600jH/ kNwTWh9fwVkvAQgv52IxaREX6uelopFcpsG6LkpI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Halil Pasic , Petr Tesarik , Heiko Carstens , Sasha Levin Subject: [PATCH 5.2 116/144] s390/dma: provide proper ARCH_ZONE_DMA_BITS value Date: Wed, 14 Aug 2019 19:01:12 +0200 Message-Id: <20190814165804.781212788@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@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 [ Upstream commit 1a2dcff881059dedc14fafc8a442664c8dbd60f1 ] On s390 ZONE_DMA is up to 2G, i.e. ARCH_ZONE_DMA_BITS should be 31 bits. The current value is 24 and makes __dma_direct_alloc_pages() take a wrong turn first (but __dma_direct_alloc_pages() recovers then). Let's correct ARCH_ZONE_DMA_BITS value and avoid wrong turns. Signed-off-by: Halil Pasic Reported-by: Petr Tesarik Fixes: c61e9637340e ("dma-direct: add support for allocation from ZONE_DMA and ZONE_DMA32") Signed-off-by: Heiko Carstens Signed-off-by: Sasha Levin --- arch/s390/include/asm/page.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index a4d38092530ab..823578c6b9e2c 100644 --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h @@ -177,6 +177,8 @@ static inline int devmem_is_allowed(unsigned long pfn) #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) +#define ARCH_ZONE_DMA_BITS 31 + #include #include -- 2.20.1