Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp663345ybi; Fri, 12 Jul 2019 02:39:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWt1G64m3CfjoFJHOKkgBUsAky4ROMwWJOmV2ix7UdPz13G5aZFmA9DCo6PwuG/US/AH95 X-Received: by 2002:a63:484d:: with SMTP id x13mr9651109pgk.122.1562924371082; Fri, 12 Jul 2019 02:39:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562924371; cv=none; d=google.com; s=arc-20160816; b=Dr8ztE+m+oLlfKBt3f/dyd+FU39aHgvP7PCpuZY1+T30kAdlxHoeeP6MHXdY8tT1ZE 3xcCnGirOkymuHRTBWh9GCr4zhjDskLdSbig0vSpPQ2Z4BGTDaNX1GgtngNvXRehvd/5 gCxmstR3cbPi/0aggqt8jlL9MOYek4epTVxTBZmy379XCPca6RDJFBg9ifU/7/YmKWA3 1tUf61I9Rs10vLYx3T4JOWgb08N/yGfRDh5N+SkLoCKX7IC45vtRdnbqlQPDu3mysfcW vkFlvRA8BJdEsZGLqC42dIaxEPAf3lz7AWuzajkGLI6qZGpA3UA56+cZBS/ikvarlPPI vWWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=TBqPqrIErIWZwwZfhT9CiRsS9uD7gYpawPIJPRNLNhU=; b=0rlmP1HyPTJNu+gHUI3K48kKywvecsc/noCH1X0yB5+7YfVr2K8wixvwXbLJ/LIqTG HKknJJdD/R4MyvI4fd+mHrbzkc1668G6oDbLzSlcI28CNbeNooh6UMFxLj6Hm6bG7O4v g9G6baiDLp4yz9GNkmnVvFY/hXNGYJetIhaCyHL2v2ooluc+T4MVSofcwXYoR5cD/aX1 Ac0RO1km3pznJ6TlKzs13wRVRd8BVBtt17dmUJrPqMeu5wbbbnJ+z6rYTrZRHaAKxKAO MOJUt3BmFLnElOz63yH3jSNdxaHu/BKWjjZ4J8rf37lXdAkjHjk2ktnb3nFI1D6C6WNY rM5A== ARC-Authentication-Results: i=1; mx.google.com; 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 x125si5773339pgx.332.2019.07.12.02.39.15; Fri, 12 Jul 2019 02:39:31 -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; 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 S1726692AbfGLJiQ (ORCPT + 99 others); Fri, 12 Jul 2019 05:38:16 -0400 Received: from ozlabs.ru ([107.173.13.209]:58430 "EHLO ozlabs.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbfGLJiQ (ORCPT ); Fri, 12 Jul 2019 05:38:16 -0400 X-Greylist: delayed 493 seconds by postgrey-1.27 at vger.kernel.org; Fri, 12 Jul 2019 05:38:15 EDT Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 90D15AE80571; Fri, 12 Jul 2019 05:29:58 -0400 (EDT) From: Alexey Kardashevskiy To: linux-kernel@vger.kernel.org Cc: "Oliver O'Halloran" , David Gibson , Sam Bobroff , Alistair Popple , Alexey Kardashevskiy Subject: [PATCH kernel v4 0/4] powerpc/ioda2: Yet another attempt to allow DMA masks between 32 and 59 Date: Fri, 12 Jul 2019 19:29:51 +1000 Message-Id: <20190712092955.56218-1-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an attempt to allow DMA masks between 32..59 which are not large enough to use either a PHB3 bypass mode or a sketchy bypass. Depending on the max order, up to 40 is usually available. This is based on sha1 a2b6f26c264e Christophe Leroy "powerpc/module64: Use symbolic instructions names.". Please comment. Thanks. Alexey Kardashevskiy (4): powerpc/powernv/ioda: Fix race in TCE level allocation powerpc/iommu: Allow bypass-only for DMA powerpc/powernv/ioda2: Allocate TCE table levels on demand for default DMA window powerpc/powernv/ioda2: Create bigger default window with 64k IOMMU pages arch/powerpc/include/asm/iommu.h | 8 +- arch/powerpc/platforms/powernv/pci.h | 2 +- arch/powerpc/kernel/dma-iommu.c | 11 ++- arch/powerpc/kernel/iommu.c | 74 +++++++++++++------ arch/powerpc/platforms/powernv/pci-ioda-tce.c | 38 ++++++---- arch/powerpc/platforms/powernv/pci-ioda.c | 40 ++++++++-- 6 files changed, 121 insertions(+), 52 deletions(-) -- 2.17.1