diff for duplicates of <1497732627.2897.128.camel@kernel.crashing.org> diff --git a/a/1.txt b/N1/1.txt index 5be8327..efaf6d2 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -36,7 +36,7 @@ Ben. > > -static int dma_fixed_dma_supported(struct device *dev, u64 mask) > -{ -> - return mask == DMA_BIT_MASK(64); +> - return mask = DMA_BIT_MASK(64); > -} > - > -static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask); @@ -63,7 +63,7 @@ Ben. > - if (!dev->dma_mask || !dma_supported(dev, dma_mask)) > - return -EIO; > - -> if (dma_mask == DMA_BIT_MASK(64) && +> if (dma_mask = DMA_BIT_MASK(64) && > cell_iommu_get_fixed_address(dev) != OF_BAD_ADDR) { > u64 addr = cell_iommu_get_fixed_address(dev) + > @@ -965,14 +956,16 @@ static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask) diff --git a/a/content_digest b/N1/content_digest index 78e4002..4e5fe3f 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,7 +2,7 @@ "ref\020170616181059.19206-43-hch@lst.de\0" "From\0Benjamin Herrenschmidt <benh@kernel.crashing.org>\0" "Subject\0Re: [PATCH 42/44] powerpc/cell: use the dma_supported method for ops switching\0" - "Date\0Sun, 18 Jun 2017 06:50:27 +1000\0" + "Date\0Sat, 17 Jun 2017 20:50:27 +0000\0" "To\0Christoph Hellwig <hch@lst.de>" x86@kernel.org linux-arm-kernel@lists.infradead.org @@ -64,7 +64,7 @@ "> \n" "> -static int dma_fixed_dma_supported(struct device *dev, u64 mask)\n" "> -{\n" - "> -\treturn mask == DMA_BIT_MASK(64);\n" + "> -\treturn mask = DMA_BIT_MASK(64);\n" "> -}\n" "> -\n" "> -static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);\n" @@ -91,7 +91,7 @@ "> -\tif (!dev->dma_mask || !dma_supported(dev, dma_mask))\n" "> -\t\treturn -EIO;\n" "> -\n" - "> \tif (dma_mask == DMA_BIT_MASK(64) &&\n" + "> \tif (dma_mask = DMA_BIT_MASK(64) &&\n" "> \t cell_iommu_get_fixed_address(dev) != OF_BAD_ADDR) {\n" "> \t\tu64 addr = cell_iommu_get_fixed_address(dev) +\n" "> @@ -965,14 +956,16 @@ static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask)\n" @@ -124,4 +124,4 @@ "> \n" "> \treturn 0;" -79393173d92f3ce618112dc5e0d50efb0e8e89442c2231864f9ca7302d229ee8 +fdf192a78bb84c329abc124f0fb78ae1c69087783b0d313bb1b2045cf410e7fa
diff --git a/a/1.txt b/N2/1.txt index 5be8327..cffd2ae 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -16,7 +16,7 @@ then *must* set the corresponding mask and use that ? I don't like a function that is a "boolean query" like this one to have such a major side effect. -From an API standpoint, dma_set_mask() is when the mask is established, +>From an API standpoint, dma_set_mask() is when the mask is established, and thus when the ops switch should happen. Ben. diff --git a/a/content_digest b/N2/content_digest index 78e4002..d639ad6 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -44,7 +44,7 @@ "I don't like a function that is a \"boolean query\" like this one to have\n" "such a major side effect.\n" "\n" - "From an API standpoint, dma_set_mask() is when the mask is established,\n" + ">From an API standpoint, dma_set_mask() is when the mask is established,\n" "and thus when the ops switch should happen.\n" "\n" "Ben.\n" @@ -124,4 +124,4 @@ "> \n" "> \treturn 0;" -79393173d92f3ce618112dc5e0d50efb0e8e89442c2231864f9ca7302d229ee8 +f386e22476fa1a1108a8f19d504e0403d153869881473564e57b08373bfb582c
diff --git a/a/1.txt b/N3/1.txt index 5be8327..fef2e28 100644 --- a/a/1.txt +++ b/N3/1.txt @@ -15,83 +15,3 @@ then *must* set the corresponding mask and use that ? I don't like a function that is a "boolean query" like this one to have such a major side effect. - -From an API standpoint, dma_set_mask() is when the mask is established, -and thus when the ops switch should happen. - -Ben. - -> Signed-off-by: Christoph Hellwig <hch@lst.de> -> --- -> arch/powerpc/platforms/cell/iommu.c | 25 +++++++++---------------- -> 1 file changed, 9 insertions(+), 16 deletions(-) -> -> diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c -> index 497bfbdbd967..29d4f96ed33e 100644 -> --- a/arch/powerpc/platforms/cell/iommu.c -> +++ b/arch/powerpc/platforms/cell/iommu.c -> @@ -644,20 +644,14 @@ static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg, -> direction, attrs); -> } -> -> -static int dma_fixed_dma_supported(struct device *dev, u64 mask) -> -{ -> - return mask == DMA_BIT_MASK(64); -> -} -> - -> -static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask); -> +static int dma_suported_and_switch(struct device *dev, u64 dma_mask); -> -> static const struct dma_map_ops dma_iommu_fixed_ops = { -> .alloc = dma_fixed_alloc_coherent, -> .free = dma_fixed_free_coherent, -> .map_sg = dma_fixed_map_sg, -> .unmap_sg = dma_fixed_unmap_sg, -> - .dma_supported = dma_fixed_dma_supported, -> - .set_dma_mask = dma_set_mask_and_switch, -> + .dma_supported = dma_suported_and_switch, -> .map_page = dma_fixed_map_page, -> .unmap_page = dma_fixed_unmap_page, -> .mapping_error = dma_iommu_mapping_error, -> @@ -952,11 +946,8 @@ static u64 cell_iommu_get_fixed_address(struct device *dev) -> return dev_addr; -> } -> -> -static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask) -> +static int dma_suported_and_switch(struct device *dev, u64 dma_mask) -> { -> - if (!dev->dma_mask || !dma_supported(dev, dma_mask)) -> - return -EIO; -> - -> if (dma_mask == DMA_BIT_MASK(64) && -> cell_iommu_get_fixed_address(dev) != OF_BAD_ADDR) { -> u64 addr = cell_iommu_get_fixed_address(dev) + -> @@ -965,14 +956,16 @@ static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask) -> dev_dbg(dev, "iommu: fixed addr = %llx\n", addr); -> set_dma_ops(dev, &dma_iommu_fixed_ops); -> set_dma_offset(dev, addr); -> - } else { -> + return 1; -> + } -> + -> + if (dma_iommu_dma_supported(dev, dma_mask)) { -> dev_dbg(dev, "iommu: not 64-bit, using default ops\n"); -> set_dma_ops(dev, get_pci_dma_ops()); -> cell_dma_dev_setup(dev); -> + return 1; -> } -> -> - *dev->dma_mask = dma_mask; -> - -> return 0; -> } -> -> @@ -1127,7 +1120,7 @@ static int __init cell_iommu_fixed_mapping_init(void) -> cell_iommu_setup_window(iommu, np, dbase, dsize, 0); -> } -> -> - dma_iommu_ops.set_dma_mask = dma_set_mask_and_switch; -> + dma_iommu_ops.dma_supported = dma_suported_and_switch; -> set_pci_dma_ops(&dma_iommu_ops); -> -> return 0; diff --git a/a/content_digest b/N3/content_digest index 78e4002..3d14dd2 100644 --- a/a/content_digest +++ b/N3/content_digest @@ -42,86 +42,6 @@ "then *must* set the corresponding mask and use that ?\n" "\n" "I don't like a function that is a \"boolean query\" like this one to have\n" - "such a major side effect.\n" - "\n" - "From an API standpoint, dma_set_mask() is when the mask is established,\n" - "and thus when the ops switch should happen.\n" - "\n" - "Ben.\n" - "\n" - "> Signed-off-by: Christoph Hellwig <hch@lst.de>\n" - "> ---\n" - "> arch/powerpc/platforms/cell/iommu.c | 25 +++++++++----------------\n" - "> 1 file changed, 9 insertions(+), 16 deletions(-)\n" - "> \n" - "> diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c\n" - "> index 497bfbdbd967..29d4f96ed33e 100644\n" - "> --- a/arch/powerpc/platforms/cell/iommu.c\n" - "> +++ b/arch/powerpc/platforms/cell/iommu.c\n" - "> @@ -644,20 +644,14 @@ static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg,\n" - "> \t\t\t\t direction, attrs);\n" - "> }\n" - "> \n" - "> -static int dma_fixed_dma_supported(struct device *dev, u64 mask)\n" - "> -{\n" - "> -\treturn mask == DMA_BIT_MASK(64);\n" - "> -}\n" - "> -\n" - "> -static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);\n" - "> +static int dma_suported_and_switch(struct device *dev, u64 dma_mask);\n" - "> \n" - "> static const struct dma_map_ops dma_iommu_fixed_ops = {\n" - "> \t.alloc = dma_fixed_alloc_coherent,\n" - "> \t.free = dma_fixed_free_coherent,\n" - "> \t.map_sg = dma_fixed_map_sg,\n" - "> \t.unmap_sg = dma_fixed_unmap_sg,\n" - "> -\t.dma_supported = dma_fixed_dma_supported,\n" - "> -\t.set_dma_mask = dma_set_mask_and_switch,\n" - "> +\t.dma_supported = dma_suported_and_switch,\n" - "> \t.map_page = dma_fixed_map_page,\n" - "> \t.unmap_page = dma_fixed_unmap_page,\n" - "> \t.mapping_error\t= dma_iommu_mapping_error,\n" - "> @@ -952,11 +946,8 @@ static u64 cell_iommu_get_fixed_address(struct device *dev)\n" - "> \treturn dev_addr;\n" - "> }\n" - "> \n" - "> -static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask)\n" - "> +static int dma_suported_and_switch(struct device *dev, u64 dma_mask)\n" - "> {\n" - "> -\tif (!dev->dma_mask || !dma_supported(dev, dma_mask))\n" - "> -\t\treturn -EIO;\n" - "> -\n" - "> \tif (dma_mask == DMA_BIT_MASK(64) &&\n" - "> \t cell_iommu_get_fixed_address(dev) != OF_BAD_ADDR) {\n" - "> \t\tu64 addr = cell_iommu_get_fixed_address(dev) +\n" - "> @@ -965,14 +956,16 @@ static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask)\n" - "> \t\tdev_dbg(dev, \"iommu: fixed addr = %llx\\n\", addr);\n" - "> \t\tset_dma_ops(dev, &dma_iommu_fixed_ops);\n" - "> \t\tset_dma_offset(dev, addr);\n" - "> -\t} else {\n" - "> +\t\treturn 1;\n" - "> +\t}\n" - "> +\n" - "> +\tif (dma_iommu_dma_supported(dev, dma_mask)) {\n" - "> \t\tdev_dbg(dev, \"iommu: not 64-bit, using default ops\\n\");\n" - "> \t\tset_dma_ops(dev, get_pci_dma_ops());\n" - "> \t\tcell_dma_dev_setup(dev);\n" - "> +\t\treturn 1;\n" - "> \t}\n" - "> \n" - "> -\t*dev->dma_mask = dma_mask;\n" - "> -\n" - "> \treturn 0;\n" - "> }\n" - "> \n" - "> @@ -1127,7 +1120,7 @@ static int __init cell_iommu_fixed_mapping_init(void)\n" - "> \t\tcell_iommu_setup_window(iommu, np, dbase, dsize, 0);\n" - "> \t}\n" - "> \n" - "> -\tdma_iommu_ops.set_dma_mask = dma_set_mask_and_switch;\n" - "> +\tdma_iommu_ops.dma_supported = dma_suported_and_switch;\n" - "> \tset_pci_dma_ops(&dma_iommu_ops);\n" - "> \n" - "> \treturn 0;" + such a major side effect. -79393173d92f3ce618112dc5e0d50efb0e8e89442c2231864f9ca7302d229ee8 +a036fc0477e61e89743314e04049e1aa0ec5a9ac7ac8a7836f3c23fa52adc54f
diff --git a/a/1.txt b/N4/1.txt index 5be8327..cffd2ae 100644 --- a/a/1.txt +++ b/N4/1.txt @@ -16,7 +16,7 @@ then *must* set the corresponding mask and use that ? I don't like a function that is a "boolean query" like this one to have such a major side effect. -From an API standpoint, dma_set_mask() is when the mask is established, +>From an API standpoint, dma_set_mask() is when the mask is established, and thus when the ops switch should happen. Ben. diff --git a/a/content_digest b/N4/content_digest index 78e4002..cb7d611 100644 --- a/a/content_digest +++ b/N4/content_digest @@ -1,29 +1,9 @@ "ref\020170616181059.19206-1-hch@lst.de\0" "ref\020170616181059.19206-43-hch@lst.de\0" - "From\0Benjamin Herrenschmidt <benh@kernel.crashing.org>\0" - "Subject\0Re: [PATCH 42/44] powerpc/cell: use the dma_supported method for ops switching\0" + "From\0benh@kernel.crashing.org (Benjamin Herrenschmidt)\0" + "Subject\0[PATCH 42/44] powerpc/cell: use the dma_supported method for ops switching\0" "Date\0Sun, 18 Jun 2017 06:50:27 +1000\0" - "To\0Christoph Hellwig <hch@lst.de>" - x86@kernel.org - linux-arm-kernel@lists.infradead.org - xen-devel@lists.xenproject.org - linux-c6x-dev@linux-c6x.org - linux-hexagon@vger.kernel.org - linux-ia64@vger.kernel.org - linux-mips@linux-mips.org - openrisc@lists.librecores.org - linuxppc-dev@lists.ozlabs.org - linux-s390@vger.kernel.org - linux-sh@vger.kernel.org - sparclinux@vger.kernel.org - linux-xtensa@linux-xtensa.org - dmaengine@vger.kernel.org - linux-tegra@vger.kernel.org - dri-devel@lists.freedesktop.org - linux-samsung-soc@vger.kernel.org - iommu@lists.linux-foundation.org - " netdev@vger.kernel.org\0" - "Cc\0linux-kernel@vger.kernel.org\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "On Fri, 2017-06-16 at 20:10 +0200, Christoph Hellwig wrote:\n" @@ -44,7 +24,7 @@ "I don't like a function that is a \"boolean query\" like this one to have\n" "such a major side effect.\n" "\n" - "From an API standpoint, dma_set_mask() is when the mask is established,\n" + ">From an API standpoint, dma_set_mask() is when the mask is established,\n" "and thus when the ops switch should happen.\n" "\n" "Ben.\n" @@ -124,4 +104,4 @@ "> \n" "> \treturn 0;" -79393173d92f3ce618112dc5e0d50efb0e8e89442c2231864f9ca7302d229ee8 +fa0ac27a0024953827b45d0b1770dbec8ea01d7e5b851d46c20a321d8e233bdd
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.