Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
* Tony Lindgren t...@atomide.com [121030 09:31]: OK so are people happy with the patches in this series? Please everybody ack if no more comments so we can move on towards getting CONFIG_MULTIPLATFORM to work for omaps. Looks like Joerg has a new email address, I'll send this series out one more time. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
Looks like the iommu framework does not have generic functions exported for all the needs yet. The hardware specific functions are defined in files like intel-iommu.h and amd-iommu.h. Follow the same standard for omap-iommu.h. This is needed because we are removing plat and mach includes for ARM common zImage support. Further work should continue in the iommu framework context as only pure platform data will be communicated from arch/arm/*omap*/* code to the iommu framework. Cc: Joerg Roedel j...@8bytes.org Cc: Ohad Ben-Cohen o...@wizery.com Cc: Ido Yariv i...@wizery.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Omar Ramirez Luna omar.l...@linaro.org Cc: linux-me...@vger.kernel.org Acked-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/iommu2.c |1 arch/arm/plat-omap/include/plat/iommu.h| 10 +-- arch/arm/plat-omap/include/plat/iovmm.h| 89 drivers/iommu/omap-iommu-debug.c |2 - drivers/iommu/omap-iommu.c |1 drivers/iommu/omap-iovmm.c | 46 ++ drivers/media/platform/omap3isp/isp.c |1 drivers/media/platform/omap3isp/isp.h |4 - drivers/media/platform/omap3isp/ispccdc.c |1 drivers/media/platform/omap3isp/ispstat.c |1 drivers/media/platform/omap3isp/ispvideo.c |2 - include/linux/omap-iommu.h | 52 12 files changed, 107 insertions(+), 103 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/iovmm.h create mode 100644 include/linux/omap-iommu.h diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index eefc379..e8116cf 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -15,6 +15,7 @@ #include linux/device.h #include linux/jiffies.h #include linux/module.h +#include linux/omap-iommu.h #include linux/slab.h #include linux/stringify.h diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 7e8c7b6..a4b71b1 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h @@ -216,13 +216,10 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev) #define MMU_RAM_PADDR_SHIFT12 #define MMU_RAM_PADDR_MASK \ ((~0UL MMU_RAM_PADDR_SHIFT) MMU_RAM_PADDR_SHIFT) -#define MMU_RAM_ENDIAN_SHIFT 9 + #define MMU_RAM_ENDIAN_MASK(1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_BIG (1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_LITTLE (0 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ELSZ_SHIFT 7 #define MMU_RAM_ELSZ_MASK (3 MMU_RAM_ELSZ_SHIFT) -#define MMU_RAM_ELSZ_8 (0 MMU_RAM_ELSZ_SHIFT) + #define MMU_RAM_ELSZ_16(1 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_32(2 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_NONE (3 MMU_RAM_ELSZ_SHIFT) @@ -269,9 +266,6 @@ extern int omap_iommu_set_isr(const char *name, void *priv), void *isr_priv); -extern void omap_iommu_save_ctx(struct device *dev); -extern void omap_iommu_restore_ctx(struct device *dev); - extern int omap_install_iommu_arch(const struct iommu_functions *ops); extern void omap_uninstall_iommu_arch(const struct iommu_functions *ops); diff --git a/arch/arm/plat-omap/include/plat/iovmm.h b/arch/arm/plat-omap/include/plat/iovmm.h deleted file mode 100644 index 498e57c..000 --- a/arch/arm/plat-omap/include/plat/iovmm.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * omap iommu: simple virtual address space management - * - * Copyright (C) 2008-2009 Nokia Corporation - * - * Written by Hiroshi DOYU hiroshi.d...@nokia.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef __IOMMU_MMAP_H -#define __IOMMU_MMAP_H - -#include linux/iommu.h - -struct iovm_struct { - struct omap_iommu *iommu; /* iommu object which this belongs to */ - u32 da_start; /* area definition */ - u32 da_end; - u32 flags; /* IOVMF_: see below */ - struct list_headlist; /* linked in ascending order */ - const struct sg_table *sgt; /* keep 'page' - 'da' mapping */ - void*va; /* mpu side mapped address */ -}; - -/* - * IOVMF_FLAGS: attribute for iommu virtual memory area(iovma) - * - * lower 16 bit is used for h/w and upper 16 bit is for s/w. - */ -#define IOVMF_SW_SHIFT 16 - -/* - * iovma: h/w flags derived from cam and ram attribute - */ -#define IOVMF_CAM_MASK (~((1 10) - 1)) -#define IOVMF_RAM_MASK (~IOVMF_CAM_MASK) - -#define IOVMF_PGSZ_MASK(3 0) -#define IOVMF_PGSZ_1M MMU_CAM_PGSZ_1M
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
* Tony Lindgren t...@atomide.com [121026 11:02]: * Ohad Ben-Cohen o...@wizery.com [121026 02:56]: Hi Laurent, On Fri, Oct 26, 2012 at 11:35 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: That's on my to-do list, as well as porting the OMAP3 ISP driver to videobuf2, adding DT support, moving to the common clock framework (when that will be available for the OMAP3), supporting missing V4L2 features, ... All this in my spare time of course, otherwise it wouldn't be fun, would it ? ;-) Hmm, seems like a short to-do list ;) Sounds Laurent will take care of it :) I would also like to move the tidspbridge to the DMA API, but I think we'll need to move step by step there, and using the OMAP IOMMU and IOVMM APIs as an intermediate step would allow splitting patches in reviewable chunks. I know it's a step backwards in term of OMAP IOMMU usage, but that's in my opinion a temporary nuisance to make the leap easier. Since tidspbridge is in staging I guess it's not a problem, though it sounds to me like using the correct API in the first place is going to make less churn. Not related to these patches, but also sounds like we may need to drop some staging/tidspbridge code to be able to move forward with the ARM common zImage plans. See the [GIT PULL] omap plat header removal for v3.8 merge window, part1 thread for more info. OK so are people happy with the patches in this series? Please everybody ack if no more comments so we can move on towards getting CONFIG_MULTIPLATFORM to work for omaps. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
Hi Ohad, On Friday 26 October 2012 07:50:56 Ohad Ben-Cohen wrote: On Thu, Oct 25, 2012 at 11:39 PM, Tony Lindgren t...@atomide.com wrote: Joerg and Ohad, do you have any opinions on this? I agree that there's some merit in having a separate header file for IOVMM, since it's a different layer from the IOMMU API. But in reality it's tightly coupled with OMAP's IOMMU, and ideally it really should go away and be replaced with the DMA API. For this reason, and for the fact that anyway there's only a single user for it (omap3isp) and there will never be any more, maybe we shouldn't pollute include/linux anymore. Anyone volunteering to remove IOVMM and adapt omap3isp to the DMA API instead ? ;) That's on my to-do list, as well as porting the OMAP3 ISP driver to videobuf2, adding DT support, moving to the common clock framework (when that will be available for the OMAP3), supporting missing V4L2 features, ... All this in my spare time of course, otherwise it wouldn't be fun, would it ? ;-) I would also like to move the tidspbridge to the DMA API, but I think we'll need to move step by step there, and using the OMAP IOMMU and IOVMM APIs as an intermediate step would allow splitting patches in reviewable chunks. I know it's a step backwards in term of OMAP IOMMU usage, but that's in my opinion a temporary nuisance to make the leap easier. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
* Ohad Ben-Cohen o...@wizery.com [121026 02:56]: Hi Laurent, On Fri, Oct 26, 2012 at 11:35 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: That's on my to-do list, as well as porting the OMAP3 ISP driver to videobuf2, adding DT support, moving to the common clock framework (when that will be available for the OMAP3), supporting missing V4L2 features, ... All this in my spare time of course, otherwise it wouldn't be fun, would it ? ;-) Hmm, seems like a short to-do list ;) Sounds Laurent will take care of it :) I would also like to move the tidspbridge to the DMA API, but I think we'll need to move step by step there, and using the OMAP IOMMU and IOVMM APIs as an intermediate step would allow splitting patches in reviewable chunks. I know it's a step backwards in term of OMAP IOMMU usage, but that's in my opinion a temporary nuisance to make the leap easier. Since tidspbridge is in staging I guess it's not a problem, though it sounds to me like using the correct API in the first place is going to make less churn. Not related to these patches, but also sounds like we may need to drop some staging/tidspbridge code to be able to move forward with the ARM common zImage plans. See the [GIT PULL] omap plat header removal for v3.8 merge window, part1 thread for more info. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
Hi Tony, Thanks for the patch. On Wednesday 24 October 2012 17:20:56 Tony Lindgren wrote: Looks like the iommu framework does not have generic functions exported for all the needs yet. The hardware specific functions are defined in files like intel-iommu.h and amd-iommu.h. Follow the same standard for omap-iommu.h. This is needed because we are removing plat and mach includes for ARM common zImage support. Further work should continue in the iommu framework context as only pure platform data will be communicated from arch/arm/*omap*/* code to the iommu framework. Cc: Joerg Roedel joerg.roe...@amd.com Cc: Ohad Ben-Cohen o...@wizery.com Cc: Ido Yariv i...@wizery.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Omar Ramirez Luna omar.l...@linaro.org Cc: linux-me...@vger.kernel.org Acked-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/iommu2.c |1 arch/arm/plat-omap/include/plat/iommu.h| 10 +-- arch/arm/plat-omap/include/plat/iovmm.h| 89 drivers/iommu/omap-iommu-debug.c | 2 - drivers/iommu/omap-iommu.c |1 drivers/iommu/omap-iovmm.c | 46 ++ drivers/media/platform/omap3isp/isp.c |1 drivers/media/platform/omap3isp/isp.h |4 - drivers/media/platform/omap3isp/ispccdc.c |1 drivers/media/platform/omap3isp/ispstat.c |1 drivers/media/platform/omap3isp/ispvideo.c |2 - include/linux/omap-iommu.h | 52 12 files changed, 107 insertions(+), 103 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/iovmm.h create mode 100644 include/linux/omap-iommu.h diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index eefc379..e8116cf 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -15,6 +15,7 @@ #include linux/device.h #include linux/jiffies.h #include linux/module.h +#include linux/omap-iommu.h #include linux/slab.h #include linux/stringify.h diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 7e8c7b6..a4b71b1 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h @@ -216,13 +216,10 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev) #define MMU_RAM_PADDR_SHIFT12 #define MMU_RAM_PADDR_MASK \ ((~0UL MMU_RAM_PADDR_SHIFT) MMU_RAM_PADDR_SHIFT) -#define MMU_RAM_ENDIAN_SHIFT 9 + #define MMU_RAM_ENDIAN_MASK (1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_BIG (1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_LITTLE(0 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ELSZ_SHIFT 7 #define MMU_RAM_ELSZ_MASK(3 MMU_RAM_ELSZ_SHIFT) -#define MMU_RAM_ELSZ_8 (0 MMU_RAM_ELSZ_SHIFT) + #define MMU_RAM_ELSZ_16 (1 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_32 (2 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_NONE(3 MMU_RAM_ELSZ_SHIFT) @@ -269,9 +266,6 @@ extern int omap_iommu_set_isr(const char *name, void *priv), void *isr_priv); -extern void omap_iommu_save_ctx(struct device *dev); -extern void omap_iommu_restore_ctx(struct device *dev); - extern int omap_install_iommu_arch(const struct iommu_functions *ops); extern void omap_uninstall_iommu_arch(const struct iommu_functions *ops); diff --git a/arch/arm/plat-omap/include/plat/iovmm.h b/arch/arm/plat-omap/include/plat/iovmm.h deleted file mode 100644 index 498e57c..000 --- a/arch/arm/plat-omap/include/plat/iovmm.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * omap iommu: simple virtual address space management - * - * Copyright (C) 2008-2009 Nokia Corporation - * - * Written by Hiroshi DOYU hiroshi.d...@nokia.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef __IOMMU_MMAP_H -#define __IOMMU_MMAP_H - -#include linux/iommu.h - -struct iovm_struct { - struct omap_iommu *iommu; /* iommu object which this belongs to */ - u32 da_start; /* area definition */ - u32 da_end; - u32 flags; /* IOVMF_: see below */ - struct list_headlist; /* linked in ascending order */ - const struct sg_table *sgt; /* keep 'page' - 'da' mapping */ - void*va; /* mpu side mapped address */ -}; - -/* - * IOVMF_FLAGS: attribute for iommu virtual memory area(iovma) - * - * lower 16 bit is used for h/w and upper 16 bit is for s/w. - */ -#define IOVMF_SW_SHIFT 16 - -/* - * iovma: h/w flags derived from cam and ram attribute - */ -#define
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
* Laurent Pinchart laurent.pinch...@ideasonboard.com [121025 01:39]: I still think you should split this in two files, omap-iommu.h and omap- iovmm.h. The later would just be arch/arm/plat-omap/include/plat/iovmm.h moved to include/linux.h. Can you please explain a bit more why you're thinking a separate omap-iovmm.h is needed in addtion to omap-iommu.h? My reasoning for not adding it is that neither intel nor amd needs more than intel-iommu.h and amd-iommu.h. And hopefully the iommu framework will eventually provide the API needed. And I'd rather not be the person introducing this second new file into include/linux :) Joerg and Ohad, do you have any opinions on this? Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
Hi Tony, On Thursday 25 October 2012 09:56:44 Tony Lindgren wrote: * Laurent Pinchart laurent.pinch...@ideasonboard.com [121025 01:39]: I still think you should split this in two files, omap-iommu.h and omap- iovmm.h. The later would just be arch/arm/plat-omap/include/plat/iovmm.h moved to include/linux.h. Can you please explain a bit more why you're thinking a separate omap-iovmm.h is needed in addtion to omap-iommu.h? The IOVMM API is layered top of the IOMMU API. It's really a separate API, so two header files make sense. This patch creates a hybrid omap-iommu.h header with mixed definitions, it just doesn't feel right :-) I won't insist for a split though, if you think it's better to have a single header we can keep it that way. My reasoning for not adding it is that neither intel nor amd needs more than intel-iommu.h and amd-iommu.h. And hopefully the iommu framework will eventually provide the API needed. And I'd rather not be the person introducing this second new file into include/linux :) Joerg and Ohad, do you have any opinions on this? -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
* Laurent Pinchart laurent.pinch...@ideasonboard.com [121025 13:23]: Hi Tony, On Thursday 25 October 2012 09:56:44 Tony Lindgren wrote: * Laurent Pinchart laurent.pinch...@ideasonboard.com [121025 01:39]: I still think you should split this in two files, omap-iommu.h and omap- iovmm.h. The later would just be arch/arm/plat-omap/include/plat/iovmm.h moved to include/linux.h. Can you please explain a bit more why you're thinking a separate omap-iovmm.h is needed in addtion to omap-iommu.h? The IOVMM API is layered top of the IOMMU API. It's really a separate API, so two header files make sense. This patch creates a hybrid omap-iommu.h header with mixed definitions, it just doesn't feel right :-) I won't insist for a split though, if you think it's better to have a single header we can keep it that way. Yes it's true it's a separate layer. But it's still iommu specific. The functions exported by omap-iovmm.c have iommu_ prefix in the name except for one: drivers/iommu/omap-iovmm.c:EXPORT_SYMBOL_GPL(omap_find_iovm_area); drivers/iommu/omap-iovmm.c:EXPORT_SYMBOL_GPL(omap_da_to_va); drivers/iommu/omap-iovmm.c:EXPORT_SYMBOL_GPL(omap_iommu_vmap); drivers/iommu/omap-iovmm.c:EXPORT_SYMBOL_GPL(omap_iommu_vunmap); drivers/iommu/omap-iovmm.c:EXPORT_SYMBOL_GPL(omap_iommu_vmalloc); drivers/iommu/omap-iovmm.c:EXPORT_SYMBOL_GPL(omap_iommu_vfree); So it should be OK to keep it all in omap-iommu.h file. Let's see hear what.. My reasoning for not adding it is that neither intel nor amd needs more than intel-iommu.h and amd-iommu.h. And hopefully the iommu framework will eventually provide the API needed. And I'd rather not be the person introducing this second new file into include/linux :) Joerg and Ohad, do you have any opinions on this? ..Joerg and Ohad say. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
On Thu, Oct 25, 2012 at 11:39 PM, Tony Lindgren t...@atomide.com wrote: Joerg and Ohad, do you have any opinions on this? I agree that there's some merit in having a separate header file for IOVMM, since it's a different layer from the IOMMU API. But in reality it's tightly coupled with OMAP's IOMMU, and ideally it really should go away and be replaced with the DMA API. For this reason, and for the fact that anyway there's only a single user for it (omap3isp) and there will never be any more, maybe we shouldn't pollute include/linux anymore. Anyone volunteering to remove IOVMM and adapt omap3isp to the DMA API instead ? ;) Thanks, Ohad. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
* Laurent Pinchart laurent.pinch...@ideasonboard.com [121019 02:41]: On Thursday 18 October 2012 13:28:42 Tony Lindgren wrote: --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -17,6 +17,7 @@ #include linux/module.h #include linux/slab.h #include linux/stringify.h +#include linux/omap-iommu.h Nitpicking, please keep the headers sorted alphabetically, here and in all locations below (especially the OMAP3 ISP driver). (OK, there's already one misplaced #include, but let's not make it worse :-)) This is fixed now. --- /dev/null +++ b/include/linux/omap-iommu.h @@ -0,0 +1,47 @@ +/* + * omap iommu: simple virtual address space management + * + * Copyright (C) 2008-2009 Nokia Corporation + * + * Written by Hiroshi DOYU hiroshi.d...@nokia.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ Missing #ifndef #define ... #endif I've added it as _OMAP_IOMMU_H_, looks like both intel-iommu.h and amd-iommu.h have it. Hopefully that's OK for you as a base to do further iommu patches on, updated patch below. BTW, doing a test compile on v3.7-rc2, I'm seeing the following warnings for omap3isp for isp_video_ioctl_ops: drivers/media/platform/omap3isp/ispvideo.c:1213: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/ispccdc.c:2303: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/ispccdc.c:2304: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isph3a_aewb.c:282: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isph3a_aewb.c:283: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isph3a_af.c:347: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isph3a_af.c:348: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isphist.c:453: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isphist.c:454: warning: initialization from incompatible pointer type Regards, Tony From: Tony Lindgren t...@atomide.com Date: Thu, 18 Oct 2012 11:03:16 -0700 Subject: [PATCH] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h Looks like the iommu framework does not have generic functions exported for all the needs yet. The hardware specific functions are defined in files like intel-iommu.h and amd-iommu.h. Follow the same standard for omap-iommu.h. This is needed because we are removing plat and mach includes for ARM common zImage support. Further work should continue in the iommu framework context as only pure platform data will be communicated from arch/arm/*omap*/* code to the iommu framework. Cc: Joerg Roedel joerg.roe...@amd.com Cc: Ohad Ben-Cohen o...@wizery.com Cc: Ido Yariv i...@wizery.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Omar Ramirez Luna omar.l...@linaro.org Cc: linux-me...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index eefc379..e8116cf 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -15,6 +15,7 @@ #include linux/device.h #include linux/jiffies.h #include linux/module.h +#include linux/omap-iommu.h #include linux/slab.h #include linux/stringify.h diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 7e8c7b6..a4b71b1 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h @@ -216,13 +216,10 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev) #define MMU_RAM_PADDR_SHIFT12 #define MMU_RAM_PADDR_MASK \ ((~0UL MMU_RAM_PADDR_SHIFT) MMU_RAM_PADDR_SHIFT) -#define MMU_RAM_ENDIAN_SHIFT 9 + #define MMU_RAM_ENDIAN_MASK(1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_BIG (1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_LITTLE (0 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ELSZ_SHIFT 7 #define MMU_RAM_ELSZ_MASK (3 MMU_RAM_ELSZ_SHIFT) -#define MMU_RAM_ELSZ_8 (0 MMU_RAM_ELSZ_SHIFT) + #define MMU_RAM_ELSZ_16(1 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_32(2 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_NONE (3 MMU_RAM_ELSZ_SHIFT) @@ -269,9 +266,6 @@ extern int omap_iommu_set_isr(const char *name, void *priv), void *isr_priv); -extern void omap_iommu_save_ctx(struct device *dev); -extern void omap_iommu_restore_ctx(struct device *dev); - extern int omap_install_iommu_arch(const struct iommu_functions *ops); extern void
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
Hi Tony, On Wednesday 24 October 2012 15:34:12 Tony Lindgren wrote: * Laurent Pinchart laurent.pinch...@ideasonboard.com [121019 02:41]: On Thursday 18 October 2012 13:28:42 Tony Lindgren wrote: --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -17,6 +17,7 @@ #include linux/module.h #include linux/slab.h #include linux/stringify.h +#include linux/omap-iommu.h Nitpicking, please keep the headers sorted alphabetically, here and in all locations below (especially the OMAP3 ISP driver). (OK, there's already one misplaced #include, but let's not make it worse :-)) This is fixed now. --- /dev/null +++ b/include/linux/omap-iommu.h @@ -0,0 +1,47 @@ +/* + * omap iommu: simple virtual address space management + * + * Copyright (C) 2008-2009 Nokia Corporation + * + * Written by Hiroshi DOYU hiroshi.d...@nokia.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ Missing #ifndef #define ... #endif I've added it as _OMAP_IOMMU_H_, looks like both intel-iommu.h and amd-iommu.h have it. Hopefully that's OK for you as a base to do further iommu patches on, updated patch below. BTW, doing a test compile on v3.7-rc2, I'm seeing the following warnings for omap3isp for isp_video_ioctl_ops: drivers/media/platform/omap3isp/ispvideo.c:1213: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/ispccdc.c:2303: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/ispccdc.c:2304: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isph3a_aewb.c:282: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isph3a_aewb.c:283: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isph3a_af.c:347: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isph3a_af.c:348: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isphist.c:453: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isphist.c:454: warning: initialization from incompatible pointer type I've just sent a pull request to linux-media for v3.7 with fixes for those. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
Looks like the iommu framework does not have generic functions exported for all the needs yet. The hardware specific functions are defined in files like intel-iommu.h and amd-iommu.h. Follow the same standard for omap-iommu.h. This is needed because we are removing plat and mach includes for ARM common zImage support. Further work should continue in the iommu framework context as only pure platform data will be communicated from arch/arm/*omap*/* code to the iommu framework. Cc: Joerg Roedel joerg.roe...@amd.com Cc: Ohad Ben-Cohen o...@wizery.com Cc: Ido Yariv i...@wizery.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Omar Ramirez Luna omar.l...@linaro.org Cc: linux-me...@vger.kernel.org Acked-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/iommu2.c |1 arch/arm/plat-omap/include/plat/iommu.h| 10 +-- arch/arm/plat-omap/include/plat/iovmm.h| 89 drivers/iommu/omap-iommu-debug.c |2 - drivers/iommu/omap-iommu.c |1 drivers/iommu/omap-iovmm.c | 46 ++ drivers/media/platform/omap3isp/isp.c |1 drivers/media/platform/omap3isp/isp.h |4 - drivers/media/platform/omap3isp/ispccdc.c |1 drivers/media/platform/omap3isp/ispstat.c |1 drivers/media/platform/omap3isp/ispvideo.c |2 - include/linux/omap-iommu.h | 52 12 files changed, 107 insertions(+), 103 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/iovmm.h create mode 100644 include/linux/omap-iommu.h diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index eefc379..e8116cf 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -15,6 +15,7 @@ #include linux/device.h #include linux/jiffies.h #include linux/module.h +#include linux/omap-iommu.h #include linux/slab.h #include linux/stringify.h diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 7e8c7b6..a4b71b1 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h @@ -216,13 +216,10 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev) #define MMU_RAM_PADDR_SHIFT12 #define MMU_RAM_PADDR_MASK \ ((~0UL MMU_RAM_PADDR_SHIFT) MMU_RAM_PADDR_SHIFT) -#define MMU_RAM_ENDIAN_SHIFT 9 + #define MMU_RAM_ENDIAN_MASK(1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_BIG (1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_LITTLE (0 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ELSZ_SHIFT 7 #define MMU_RAM_ELSZ_MASK (3 MMU_RAM_ELSZ_SHIFT) -#define MMU_RAM_ELSZ_8 (0 MMU_RAM_ELSZ_SHIFT) + #define MMU_RAM_ELSZ_16(1 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_32(2 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_NONE (3 MMU_RAM_ELSZ_SHIFT) @@ -269,9 +266,6 @@ extern int omap_iommu_set_isr(const char *name, void *priv), void *isr_priv); -extern void omap_iommu_save_ctx(struct device *dev); -extern void omap_iommu_restore_ctx(struct device *dev); - extern int omap_install_iommu_arch(const struct iommu_functions *ops); extern void omap_uninstall_iommu_arch(const struct iommu_functions *ops); diff --git a/arch/arm/plat-omap/include/plat/iovmm.h b/arch/arm/plat-omap/include/plat/iovmm.h deleted file mode 100644 index 498e57c..000 --- a/arch/arm/plat-omap/include/plat/iovmm.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * omap iommu: simple virtual address space management - * - * Copyright (C) 2008-2009 Nokia Corporation - * - * Written by Hiroshi DOYU hiroshi.d...@nokia.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef __IOMMU_MMAP_H -#define __IOMMU_MMAP_H - -#include linux/iommu.h - -struct iovm_struct { - struct omap_iommu *iommu; /* iommu object which this belongs to */ - u32 da_start; /* area definition */ - u32 da_end; - u32 flags; /* IOVMF_: see below */ - struct list_headlist; /* linked in ascending order */ - const struct sg_table *sgt; /* keep 'page' - 'da' mapping */ - void*va; /* mpu side mapped address */ -}; - -/* - * IOVMF_FLAGS: attribute for iommu virtual memory area(iovma) - * - * lower 16 bit is used for h/w and upper 16 bit is for s/w. - */ -#define IOVMF_SW_SHIFT 16 - -/* - * iovma: h/w flags derived from cam and ram attribute - */ -#define IOVMF_CAM_MASK (~((1 10) - 1)) -#define IOVMF_RAM_MASK (~IOVMF_CAM_MASK) - -#define IOVMF_PGSZ_MASK(3 0) -#define IOVMF_PGSZ_1M
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
* Laurent Pinchart laurent.pinch...@ideasonboard.com [121024 16:54]: On Wednesday 24 October 2012 15:34:12 Tony Lindgren wrote: BTW, doing a test compile on v3.7-rc2, I'm seeing the following warnings for omap3isp for isp_video_ioctl_ops: drivers/media/platform/omap3isp/ispvideo.c:1213: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/ispccdc.c:2303: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/ispccdc.c:2304: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isph3a_aewb.c:282: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isph3a_aewb.c:283: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isph3a_af.c:347: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isph3a_af.c:348: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isphist.c:453: warning: initialization from incompatible pointer type drivers/media/platform/omap3isp/isphist.c:454: warning: initialization from incompatible pointer type I've just sent a pull request to linux-media for v3.7 with fixes for those. OK thanks! Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
Hi Tony, Thanks for the patch. On Thursday 18 October 2012 13:28:42 Tony Lindgren wrote: Looks like the iommu framework does not have generic functions exported for all the needs yet. The hardware specific functions are defined in files like intel-iommu.h and amd-iommu.h. Follow the same standard for omap-iommu.h. This is needed because we are removing plat and mach includes for ARM common zImage support. Further work should continue in the iommu framework context as only pure platform data will be communicated from arch/arm/*omap*/* code to the iommu framework. Cc: Joerg Roedel joerg.roe...@amd.com Cc: Ohad Ben-Cohen o...@wizery.com Cc: Ido Yariv i...@wizery.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Omar Ramirez Luna omar.l...@linaro.org Cc: linux-me...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/iommu2.c |1 arch/arm/plat-omap/include/plat/iommu.h| 10 +-- arch/arm/plat-omap/include/plat/iovmm.h| 89 - drivers/iommu/omap-iommu-debug.c |2 - drivers/iommu/omap-iommu.c |1 drivers/iommu/omap-iovmm.c | 46 ++ drivers/media/platform/omap3isp/isp.c |1 drivers/media/platform/omap3isp/isp.h |2 - drivers/media/platform/omap3isp/ispccdc.c |1 drivers/media/platform/omap3isp/ispstat.c |1 drivers/media/platform/omap3isp/ispvideo.c |2 - include/linux/omap-iommu.h | 47 +++ 12 files changed, 101 insertions(+), 102 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/iovmm.h create mode 100644 include/linux/omap-iommu.h diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index eefc379..77cbf2f 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -17,6 +17,7 @@ #include linux/module.h #include linux/slab.h #include linux/stringify.h +#include linux/omap-iommu.h Nitpicking, please keep the headers sorted alphabetically, here and in all locations below (especially the OMAP3 ISP driver). (OK, there's already one misplaced #include, but let's not make it worse :-)) #include plat/iommu.h diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 7e8c7b6..a4b71b1 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h @@ -216,13 +216,10 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev) #define MMU_RAM_PADDR_SHIFT12 #define MMU_RAM_PADDR_MASK \ ((~0UL MMU_RAM_PADDR_SHIFT) MMU_RAM_PADDR_SHIFT) -#define MMU_RAM_ENDIAN_SHIFT 9 + #define MMU_RAM_ENDIAN_MASK (1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_BIG (1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_LITTLE(0 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ELSZ_SHIFT 7 #define MMU_RAM_ELSZ_MASK(3 MMU_RAM_ELSZ_SHIFT) -#define MMU_RAM_ELSZ_8 (0 MMU_RAM_ELSZ_SHIFT) + #define MMU_RAM_ELSZ_16 (1 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_32 (2 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_NONE(3 MMU_RAM_ELSZ_SHIFT) I plan to push cleanup patches for the staging tidspbridge driver that get rid of the local register definitions and use plat/iommu.h instead. That's obviously an interim solution as in the long run the driver should use the IOMMU API, but in the meantime it's a step in the right direction. Would it then make sense to move all those definitions to include/linux/omap-iommu.h, not just the ones used by the OMAP3 ISP driver ? @@ -269,9 +266,6 @@ extern int omap_iommu_set_isr(const char *name, void *priv), void *isr_priv); -extern void omap_iommu_save_ctx(struct device *dev); -extern void omap_iommu_restore_ctx(struct device *dev); - extern int omap_install_iommu_arch(const struct iommu_functions *ops); extern void omap_uninstall_iommu_arch(const struct iommu_functions *ops); diff --git a/arch/arm/plat-omap/include/plat/iovmm.h b/arch/arm/plat-omap/include/plat/iovmm.h deleted file mode 100644 index 498e57c..000 --- a/arch/arm/plat-omap/include/plat/iovmm.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * omap iommu: simple virtual address space management - * - * Copyright (C) 2008-2009 Nokia Corporation - * - * Written by Hiroshi DOYU hiroshi.d...@nokia.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef __IOMMU_MMAP_H -#define __IOMMU_MMAP_H - -#include linux/iommu.h - -struct iovm_struct { - struct omap_iommu *iommu; /* iommu object which this belongs to */ - u32
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
* Laurent Pinchart laurent.pinch...@ideasonboard.com [121019 02:41]: Nitpicking, please keep the headers sorted alphabetically, here and in all locations below (especially the OMAP3 ISP driver). (OK, there's already one misplaced #include, but let's not make it worse :-)) Sure I'll check that. I plan to push cleanup patches for the staging tidspbridge driver that get rid of the local register definitions and use plat/iommu.h instead. That's obviously an interim solution as in the long run the driver should use the IOMMU API, but in the meantime it's a step in the right direction. Would it then make sense to move all those definitions to include/linux/omap-iommu.h, not just the ones used by the OMAP3 ISP driver ? Well these patches are just intended to fix the platform data interface between core ARM code and iommu. At this point I really don't want to get involved in the iommu framework. What you are asking should be coordinated with Joerg and Ohad. Ideally the iommu framework would provide the API to the drivers to use, and there would not be any need to have include/linux/omap-iommu.h. If you ask me, I would just rip out the code that's not following the iommu API immediately and have it resubmitted in a sane way :) Shouldn't this header be split in include/linux/omap-iommu.h and include/linux/omap-iovmm.h ? I would also move all the hardware IOVMF flags to include/linux/omap-iovmm.h, not just the two currently used by the OMAP3 ISP driver. The software flags can be kept in drivers/iommu/omap-iovmm.c. I just fixed up things to follow what's being done with the iommu framework currently. Probably keeping only omap-iommu.h available is the best way to go until the iommu framework provides the interfaces, but again that's up to Joerg and Ohad. +extern void omap_iommu_save_ctx(struct device *dev); +extern void omap_iommu_restore_ctx(struct device *dev); Do we really need to prefix functions with 'extern' ? Yes since they are exported, I just moved them. Again, this is something that should be handled eventually via the iommu framework using runtime PM and not be exported at all. Again, I would just rip out that code if you ask me and replace it with comments until fixed. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
Looks like the iommu framework does not have generic functions exported for all the needs yet. The hardware specific functions are defined in files like intel-iommu.h and amd-iommu.h. Follow the same standard for omap-iommu.h. This is needed because we are removing plat and mach includes for ARM common zImage support. Further work should continue in the iommu framework context as only pure platform data will be communicated from arch/arm/*omap*/* code to the iommu framework. Cc: Joerg Roedel joerg.roe...@amd.com Cc: Ohad Ben-Cohen o...@wizery.com Cc: Ido Yariv i...@wizery.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Omar Ramirez Luna omar.l...@linaro.org Cc: linux-me...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/iommu2.c |1 arch/arm/plat-omap/include/plat/iommu.h| 10 +-- arch/arm/plat-omap/include/plat/iovmm.h| 89 drivers/iommu/omap-iommu-debug.c |2 - drivers/iommu/omap-iommu.c |1 drivers/iommu/omap-iovmm.c | 46 ++ drivers/media/platform/omap3isp/isp.c |1 drivers/media/platform/omap3isp/isp.h |2 - drivers/media/platform/omap3isp/ispccdc.c |1 drivers/media/platform/omap3isp/ispstat.c |1 drivers/media/platform/omap3isp/ispvideo.c |2 - include/linux/omap-iommu.h | 47 +++ 12 files changed, 101 insertions(+), 102 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/iovmm.h create mode 100644 include/linux/omap-iommu.h diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index eefc379..77cbf2f 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -17,6 +17,7 @@ #include linux/module.h #include linux/slab.h #include linux/stringify.h +#include linux/omap-iommu.h #include plat/iommu.h diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 7e8c7b6..a4b71b1 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h @@ -216,13 +216,10 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev) #define MMU_RAM_PADDR_SHIFT12 #define MMU_RAM_PADDR_MASK \ ((~0UL MMU_RAM_PADDR_SHIFT) MMU_RAM_PADDR_SHIFT) -#define MMU_RAM_ENDIAN_SHIFT 9 + #define MMU_RAM_ENDIAN_MASK(1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_BIG (1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_LITTLE (0 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ELSZ_SHIFT 7 #define MMU_RAM_ELSZ_MASK (3 MMU_RAM_ELSZ_SHIFT) -#define MMU_RAM_ELSZ_8 (0 MMU_RAM_ELSZ_SHIFT) + #define MMU_RAM_ELSZ_16(1 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_32(2 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_NONE (3 MMU_RAM_ELSZ_SHIFT) @@ -269,9 +266,6 @@ extern int omap_iommu_set_isr(const char *name, void *priv), void *isr_priv); -extern void omap_iommu_save_ctx(struct device *dev); -extern void omap_iommu_restore_ctx(struct device *dev); - extern int omap_install_iommu_arch(const struct iommu_functions *ops); extern void omap_uninstall_iommu_arch(const struct iommu_functions *ops); diff --git a/arch/arm/plat-omap/include/plat/iovmm.h b/arch/arm/plat-omap/include/plat/iovmm.h deleted file mode 100644 index 498e57c..000 --- a/arch/arm/plat-omap/include/plat/iovmm.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * omap iommu: simple virtual address space management - * - * Copyright (C) 2008-2009 Nokia Corporation - * - * Written by Hiroshi DOYU hiroshi.d...@nokia.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef __IOMMU_MMAP_H -#define __IOMMU_MMAP_H - -#include linux/iommu.h - -struct iovm_struct { - struct omap_iommu *iommu; /* iommu object which this belongs to */ - u32 da_start; /* area definition */ - u32 da_end; - u32 flags; /* IOVMF_: see below */ - struct list_headlist; /* linked in ascending order */ - const struct sg_table *sgt; /* keep 'page' - 'da' mapping */ - void*va; /* mpu side mapped address */ -}; - -/* - * IOVMF_FLAGS: attribute for iommu virtual memory area(iovma) - * - * lower 16 bit is used for h/w and upper 16 bit is for s/w. - */ -#define IOVMF_SW_SHIFT 16 - -/* - * iovma: h/w flags derived from cam and ram attribute - */ -#define IOVMF_CAM_MASK (~((1 10) - 1)) -#define IOVMF_RAM_MASK (~IOVMF_CAM_MASK) - -#define IOVMF_PGSZ_MASK(3 0) -#define IOVMF_PGSZ_1M MMU_CAM_PGSZ_1M -#define IOVMF_PGSZ_64K
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
Tony, Em Thu, 18 Oct 2012 13:28:42 -0700 Tony Lindgren t...@atomide.com escreveu: Looks like the iommu framework does not have generic functions exported for all the needs yet. The hardware specific functions are defined in files like intel-iommu.h and amd-iommu.h. Follow the same standard for omap-iommu.h. This is needed because we are removing plat and mach includes for ARM common zImage support. Further work should continue in the iommu framework context as only pure platform data will be communicated from arch/arm/*omap*/* code to the iommu framework. Cc: Joerg Roedel joerg.roe...@amd.com Cc: Ohad Ben-Cohen o...@wizery.com Cc: Ido Yariv i...@wizery.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Omar Ramirez Luna omar.l...@linaro.org Cc: linux-me...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/iommu2.c |1 arch/arm/plat-omap/include/plat/iommu.h| 10 +-- arch/arm/plat-omap/include/plat/iovmm.h| 89 drivers/iommu/omap-iommu-debug.c |2 - drivers/iommu/omap-iommu.c |1 drivers/iommu/omap-iovmm.c | 46 ++ drivers/media/platform/omap3isp/isp.c |1 drivers/media/platform/omap3isp/isp.h |2 - drivers/media/platform/omap3isp/ispccdc.c |1 drivers/media/platform/omap3isp/ispstat.c |1 drivers/media/platform/omap3isp/ispvideo.c |2 - Acked-by: Mauro Carvalho Chehab mche...@redhat.com It is better if you send this entire series through the ARM tree, keeping this hole series altogether (and avoiding the risk of breaking bisectability if it goes through separate trees). So, you can add my ack for those header moves for drivers/media/platform/*. Regards, Mauro -- Cheers, Mauro -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
* Mauro Carvalho Chehab mche...@redhat.com [121018 13:58]: Tony, Em Thu, 18 Oct 2012 13:28:42 -0700 Tony Lindgren t...@atomide.com escreveu: Looks like the iommu framework does not have generic functions exported for all the needs yet. The hardware specific functions are defined in files like intel-iommu.h and amd-iommu.h. Follow the same standard for omap-iommu.h. This is needed because we are removing plat and mach includes for ARM common zImage support. Further work should continue in the iommu framework context as only pure platform data will be communicated from arch/arm/*omap*/* code to the iommu framework. Cc: Joerg Roedel joerg.roe...@amd.com Cc: Ohad Ben-Cohen o...@wizery.com Cc: Ido Yariv i...@wizery.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Omar Ramirez Luna omar.l...@linaro.org Cc: linux-me...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/iommu2.c |1 arch/arm/plat-omap/include/plat/iommu.h| 10 +-- arch/arm/plat-omap/include/plat/iovmm.h| 89 drivers/iommu/omap-iommu-debug.c |2 - drivers/iommu/omap-iommu.c |1 drivers/iommu/omap-iovmm.c | 46 ++ drivers/media/platform/omap3isp/isp.c |1 drivers/media/platform/omap3isp/isp.h |2 - drivers/media/platform/omap3isp/ispccdc.c |1 drivers/media/platform/omap3isp/ispstat.c |1 drivers/media/platform/omap3isp/ispvideo.c |2 - Acked-by: Mauro Carvalho Chehab mche...@redhat.com It is better if you send this entire series through the ARM tree, keeping this hole series altogether (and avoiding the risk of breaking bisectability if it goes through separate trees). So, you can add my ack for those header moves for drivers/media/platform/*. Yes thanks. Once people are happy with these, I will push just these patches on v3.7-rc1 alone into omap-for-v3.8/cleanup-headers-iommu so both media and iommu tree can merge them in too as needed. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html