* [PATCH] powerpc: Move DMA64_PROPNAME define to a header
@ 2023-08-17 16:24 Michal Suchanek
2023-08-23 11:55 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Michal Suchanek @ 2023-08-17 16:24 UTC (permalink / raw)
To: linuxppc-dev
Cc: Rob Herring, Laurent Dufour, Gaurav Batra, Baoquan He,
Alexey Kardashevskiy, Russell Currey, Deming Wang,
Alex Williamson, linux-kernel, Jason Gunthorpe, Timothy Pearson,
Nicholas Piggin, Li Chen, Brian King, Sourabh Jain,
Michal Suchanek
Avoid redefining the same value in multiple source.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
arch/powerpc/include/asm/iommu.h | 3 +++
arch/powerpc/kexec/file_load_64.c | 5 +----
arch/powerpc/platforms/pseries/iommu.c | 2 --
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h
index 34e14dfd8e04..026695943550 100644
--- a/arch/powerpc/include/asm/iommu.h
+++ b/arch/powerpc/include/asm/iommu.h
@@ -28,6 +28,9 @@
#define IOMMU_PAGE_MASK(tblptr) (~((1 << (tblptr)->it_page_shift) - 1))
#define IOMMU_PAGE_ALIGN(addr, tblptr) ALIGN(addr, IOMMU_PAGE_SIZE(tblptr))
+#define DIRECT64_PROPNAME "linux,direct64-ddr-window-info"
+#define DMA64_PROPNAME "linux,dma64-ddr-window-info"
+
/* Boot time flags */
extern int iommu_is_off;
extern int iommu_force_on;
diff --git a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c
index 110d28bede2a..17f86f93da09 100644
--- a/arch/powerpc/kexec/file_load_64.c
+++ b/arch/powerpc/kexec/file_load_64.c
@@ -27,6 +27,7 @@
#include <asm/kexec_ranges.h>
#include <asm/crashdump-ppc64.h>
#include <asm/mmzone.h>
+#include <asm/iommu.h>
#include <asm/prom.h>
#include <asm/plpks.h>
@@ -1208,8 +1209,6 @@ int setup_new_fdt_ppc64(const struct kimage *image, void *fdt,
if (ret < 0)
goto out;
-#define DIRECT64_PROPNAME "linux,direct64-ddr-window-info"
-#define DMA64_PROPNAME "linux,dma64-ddr-window-info"
ret = update_pci_dma_nodes(fdt, DIRECT64_PROPNAME);
if (ret < 0)
goto out;
@@ -1217,8 +1216,6 @@ int setup_new_fdt_ppc64(const struct kimage *image, void *fdt,
ret = update_pci_dma_nodes(fdt, DMA64_PROPNAME);
if (ret < 0)
goto out;
-#undef DMA64_PROPNAME
-#undef DIRECT64_PROPNAME
/* Update memory reserve map */
ret = get_reserved_memory_ranges(&rmem);
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index d593a7227dc9..16d93b580f61 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -395,8 +395,6 @@ static LIST_HEAD(dma_win_list);
static DEFINE_SPINLOCK(dma_win_list_lock);
/* protects initializing window twice for same device */
static DEFINE_MUTEX(dma_win_init_mutex);
-#define DIRECT64_PROPNAME "linux,direct64-ddr-window-info"
-#define DMA64_PROPNAME "linux,dma64-ddr-window-info"
static int tce_clearrange_multi_pSeriesLP(unsigned long start_pfn,
unsigned long num_pfn, const void *arg)
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc: Move DMA64_PROPNAME define to a header
2023-08-17 16:24 [PATCH] powerpc: Move DMA64_PROPNAME define to a header Michal Suchanek
@ 2023-08-23 11:55 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2023-08-23 11:55 UTC (permalink / raw)
To: linuxppc-dev, Michal Suchanek
Cc: Rob Herring, Gaurav Batra, Baoquan He, Alexey Kardashevskiy,
Russell Currey, Deming Wang, Alex Williamson, linux-kernel,
Jason Gunthorpe, Timothy Pearson, Nicholas Piggin, Li Chen,
Brian King, Sourabh Jain, Laurent Dufour
On Thu, 17 Aug 2023 18:24:08 +0200, Michal Suchanek wrote:
> Avoid redefining the same value in multiple source.
>
>
Applied to powerpc/next.
[1/1] powerpc: Move DMA64_PROPNAME define to a header
https://git.kernel.org/powerpc/c/89c9ce1c99df553029fc4503506ff5a1793f3eaf
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-23 12:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 16:24 [PATCH] powerpc: Move DMA64_PROPNAME define to a header Michal Suchanek
2023-08-23 11:55 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).