Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1070270ybl; Wed, 14 Aug 2019 10:12:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRBL6AtYxSNqVZW4WnKgvT+/LVObIayeN1Zqs5Up5d7Qo7tr9fMsXBAOOrod9G7OOSCGQX X-Received: by 2002:a17:90a:d58c:: with SMTP id v12mr725521pju.7.1565802779649; Wed, 14 Aug 2019 10:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802779; cv=none; d=google.com; s=arc-20160816; b=elA5MxDmNS4U+Zw7hqgLqa8TF7Ej1+iZB8/1lAYQoL/6+hRrcarpK2/6RIJkb68E/X wfony9Z66fVdgWjt32wrc323aYTx3vXEhC3do9uMbPe6ntsRbGO5tKUVieOquUH2bElv CoUJD9ujiLrqar0iJ7d8JhvtQ0bSt/Zq4ZzbQ02+DPIZvy5gW2Pr/jDRqpWXAwJYTOuX 1/v7oLAE31Goo/bVTDR5ATMfPinMp4BE5mSOvKX3QN7hhQ8GzL1wuYUpli1IlqIPLbst /xjvN5uChqvN+HLXly14G5bnWwFBm8FrBqyujs7H216ozzu9zAXG12oK/uF2m8NpEdHG UBEg== 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=VWacm6Anh5C9gVOTRtw/vNWDnWKUaT3v8pOw3uz98ko=; b=OqozVFu1w+AhuHtrzxOuzuzRmDEdpKYZWIC4J8acx7ZAnC1ULNZ2xzq4Ia+V1sU0c/ o0cGf+NWHCO2C+phhb1MSg/zkGHbS7eJEV/+gg10C0jtkQ/LRF5iMmv4HimwV6rYmyWa fRREupkymD6svC5sUCi3p0xSQP+8ZMVDA/SffVXSJiSk85dphkAFhLUfJ1/OFT17CcTf bTfSzmuW28mEcesFig5wiwF9KmghmRFCgKLnEijfa/5KPLMRFUPLkCDzybKoyt6aQRDn GWalSC4/nv8giN1enFtHxxG8uqTcU4W2enF+djfHqUtiPWwXM9B7FcGOvP1SG8SwHZRI 3yMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YtvWxvHe; 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 u3si243443plq.143.2019.08.14.10.12.44; Wed, 14 Aug 2019 10:12:59 -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=YtvWxvHe; 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 S1730693AbfHNRMN (ORCPT + 99 others); Wed, 14 Aug 2019 13:12:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:35896 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730527AbfHNRML (ORCPT ); Wed, 14 Aug 2019 13:12:11 -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 72A1B216F4; Wed, 14 Aug 2019 17:12:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802730; bh=WxNqavY8+WLPdEEfFVrqo9hF2HEFECHIJ4G1X/i8P+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YtvWxvHeMZWisQadXfyJSl4bTi79TjCXz+/Bw+5I7+E3kMQ0lmeCe9F+FsVl4m4I2 Tv+yU5TCWhfk+EdkMGoimDOIMpGw80cxvl8D8Swejr2wd1BmoiuJ1LcpskVTG7SOvk ch+Cnv9+x7782vAi6CFW6zxYuqNIaUKdHe3F+GgA= 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 4.19 69/91] s390/dma: provide proper ARCH_ZONE_DMA_BITS value Date: Wed, 14 Aug 2019 19:01:32 +0200 Message-Id: <20190814165752.562527266@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165748.991235624@linuxfoundation.org> References: <20190814165748.991235624@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 41e3908b397f8..0d753291c43c0 100644 --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h @@ -176,6 +176,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