Re: [PATCH] CMA: generalize CMA reserved area management functionality (fixup)

2014-07-18 Thread Marek Szyprowski

Hello,

On 2014-07-18 00:06, Andrew Morton wrote:

On Thu, 17 Jul 2014 11:36:07 +0200 Marek Szyprowski m.szyprow...@samsung.com 
wrote:


MAX_CMA_AREAS is used by other subsystems (i.e. arch/arm/mm/dma-mapping.c),
so we need to provide correct definition even if CMA is disabled.
This patch fixes this issue.

Reported-by: Sylwester Nawrocki s.nawro...@samsung.com
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
  include/linux/cma.h | 4 
  1 file changed, 4 insertions(+)

diff --git a/include/linux/cma.h b/include/linux/cma.h
index 9a18a2b1934c..c077635cad76 100644
--- a/include/linux/cma.h
+++ b/include/linux/cma.h
@@ -5,7 +5,11 @@
   * There is always at least global CMA area and a few optional
   * areas configured in kernel .config.
   */
+#ifdef CONFIG_CMA
  #define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS)
+#else
+#define MAX_CMA_AREAS  (0)
+#endif
  
  struct cma;

Joonsoo already fixed this up, a bit differently:
http://ozlabs.org/~akpm/mmots/broken-out/cma-generalize-cma-reserved-area-management-functionality-fix.patch

Which approach makes more sense?


CMA_AREAS depends on CMA being enabled, so both approaches works exactly
the same way. Please keep Joonsoo's patch and just ignore mine to avoid
confusing others by disappearing patches. I'm sorry that I've missed it
before sending mine.


From: Joonsoo Kim iamjoonsoo@lge.com
Subject: CMA: fix ARM build failure related to MAX_CMA_AREAS definition

If CMA is disabled, CONFIG_CMA_AREAS isn't defined so compile error
happens. To fix it, define MAX_CMA_AREAS if CONFIG_CMA_AREAS
isn't defined.

Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
Reported-by: Stephen Rothwell s...@canb.auug.org.au
Signed-off-by: Andrew Morton a...@linux-foundation.org
---

  include/linux/cma.h |6 ++
  1 file changed, 6 insertions(+)

diff -puN 
include/linux/cma.h~cma-generalize-cma-reserved-area-management-functionality-fix
 include/linux/cma.h
--- 
a/include/linux/cma.h~cma-generalize-cma-reserved-area-management-functionality-fix
+++ a/include/linux/cma.h
@@ -5,8 +5,14 @@
   * There is always at least global CMA area and a few optional
   * areas configured in kernel .config.
   */
+#ifdef CONFIG_CMA_AREAS
  #define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS)
  
+#else

+#define MAX_CMA_AREAS  (0)
+
+#endif
+
  struct cma;
  
  extern phys_addr_t cma_get_base(struct cma *cma);

_


Best regards
--
Marek Szyprowski, PhD
Samsung RD Institute Poland

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] CMA: generalize CMA reserved area management functionality (fixup)

2014-07-18 Thread Marek Szyprowski

Hello,

On 2014-07-18 00:06, Andrew Morton wrote:

On Thu, 17 Jul 2014 11:36:07 +0200 Marek Szyprowski m.szyprow...@samsung.com 
wrote:


MAX_CMA_AREAS is used by other subsystems (i.e. arch/arm/mm/dma-mapping.c),
so we need to provide correct definition even if CMA is disabled.
This patch fixes this issue.

Reported-by: Sylwester Nawrocki s.nawro...@samsung.com
Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
  include/linux/cma.h | 4 
  1 file changed, 4 insertions(+)

diff --git a/include/linux/cma.h b/include/linux/cma.h
index 9a18a2b1934c..c077635cad76 100644
--- a/include/linux/cma.h
+++ b/include/linux/cma.h
@@ -5,7 +5,11 @@
   * There is always at least global CMA area and a few optional
   * areas configured in kernel .config.
   */
+#ifdef CONFIG_CMA
  #define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS)
+#else
+#define MAX_CMA_AREAS  (0)
+#endif
  
  struct cma;

Joonsoo already fixed this up, a bit differently:
http://ozlabs.org/~akpm/mmots/broken-out/cma-generalize-cma-reserved-area-management-functionality-fix.patch

Which approach makes more sense?


CMA_AREAS depends on CMA being enabled, so both approaches works exactly
the same way. Please keep Joonsoo's patch and just ignore mine to avoid
confusing others by disappearing patches. I'm sorry that I've missed it
before sending mine.


From: Joonsoo Kim iamjoonsoo@lge.com
Subject: CMA: fix ARM build failure related to MAX_CMA_AREAS definition

If CMA is disabled, CONFIG_CMA_AREAS isn't defined so compile error
happens. To fix it, define MAX_CMA_AREAS if CONFIG_CMA_AREAS
isn't defined.

Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
Reported-by: Stephen Rothwell s...@canb.auug.org.au
Signed-off-by: Andrew Morton a...@linux-foundation.org
---

  include/linux/cma.h |6 ++
  1 file changed, 6 insertions(+)

diff -puN 
include/linux/cma.h~cma-generalize-cma-reserved-area-management-functionality-fix
 include/linux/cma.h
--- 
a/include/linux/cma.h~cma-generalize-cma-reserved-area-management-functionality-fix
+++ a/include/linux/cma.h
@@ -5,8 +5,14 @@
   * There is always at least global CMA area and a few optional
   * areas configured in kernel .config.
   */
+#ifdef CONFIG_CMA_AREAS
  #define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS)
  
+#else

+#define MAX_CMA_AREAS  (0)
+
+#endif
+
  struct cma;
  
  extern phys_addr_t cma_get_base(struct cma *cma);

_


Best regards
--
Marek Szyprowski, PhD
Samsung RD Institute Poland

--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] CMA: generalize CMA reserved area management functionality (fixup)

2014-07-17 Thread Andrew Morton
On Thu, 17 Jul 2014 11:36:07 +0200 Marek Szyprowski m.szyprow...@samsung.com 
wrote:

 MAX_CMA_AREAS is used by other subsystems (i.e. arch/arm/mm/dma-mapping.c),
 so we need to provide correct definition even if CMA is disabled.
 This patch fixes this issue.
 
 Reported-by: Sylwester Nawrocki s.nawro...@samsung.com
 Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
 ---
  include/linux/cma.h | 4 
  1 file changed, 4 insertions(+)
 
 diff --git a/include/linux/cma.h b/include/linux/cma.h
 index 9a18a2b1934c..c077635cad76 100644
 --- a/include/linux/cma.h
 +++ b/include/linux/cma.h
 @@ -5,7 +5,11 @@
   * There is always at least global CMA area and a few optional
   * areas configured in kernel .config.
   */
 +#ifdef CONFIG_CMA
  #define MAX_CMA_AREAS(1 + CONFIG_CMA_AREAS)
 +#else
 +#define MAX_CMA_AREAS(0)
 +#endif
  
  struct cma;

Joonsoo already fixed this up, a bit differently:
http://ozlabs.org/~akpm/mmots/broken-out/cma-generalize-cma-reserved-area-management-functionality-fix.patch

Which approach makes more sense?



From: Joonsoo Kim iamjoonsoo@lge.com
Subject: CMA: fix ARM build failure related to MAX_CMA_AREAS definition

If CMA is disabled, CONFIG_CMA_AREAS isn't defined so compile error
happens. To fix it, define MAX_CMA_AREAS if CONFIG_CMA_AREAS
isn't defined.

Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
Reported-by: Stephen Rothwell s...@canb.auug.org.au
Signed-off-by: Andrew Morton a...@linux-foundation.org
---

 include/linux/cma.h |6 ++
 1 file changed, 6 insertions(+)

diff -puN 
include/linux/cma.h~cma-generalize-cma-reserved-area-management-functionality-fix
 include/linux/cma.h
--- 
a/include/linux/cma.h~cma-generalize-cma-reserved-area-management-functionality-fix
+++ a/include/linux/cma.h
@@ -5,8 +5,14 @@
  * There is always at least global CMA area and a few optional
  * areas configured in kernel .config.
  */
+#ifdef CONFIG_CMA_AREAS
 #define MAX_CMA_AREAS  (1 + CONFIG_CMA_AREAS)
 
+#else
+#define MAX_CMA_AREAS  (0)
+
+#endif
+
 struct cma;
 
 extern phys_addr_t cma_get_base(struct cma *cma);
_


--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] CMA: generalize CMA reserved area management functionality (fixup)

2014-07-17 Thread Andrew Morton
On Thu, 17 Jul 2014 11:36:07 +0200 Marek Szyprowski m.szyprow...@samsung.com 
wrote:

 MAX_CMA_AREAS is used by other subsystems (i.e. arch/arm/mm/dma-mapping.c),
 so we need to provide correct definition even if CMA is disabled.
 This patch fixes this issue.
 
 Reported-by: Sylwester Nawrocki s.nawro...@samsung.com
 Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
 ---
  include/linux/cma.h | 4 
  1 file changed, 4 insertions(+)
 
 diff --git a/include/linux/cma.h b/include/linux/cma.h
 index 9a18a2b1934c..c077635cad76 100644
 --- a/include/linux/cma.h
 +++ b/include/linux/cma.h
 @@ -5,7 +5,11 @@
   * There is always at least global CMA area and a few optional
   * areas configured in kernel .config.
   */
 +#ifdef CONFIG_CMA
  #define MAX_CMA_AREAS(1 + CONFIG_CMA_AREAS)
 +#else
 +#define MAX_CMA_AREAS(0)
 +#endif
  
  struct cma;

Joonsoo already fixed this up, a bit differently:
http://ozlabs.org/~akpm/mmots/broken-out/cma-generalize-cma-reserved-area-management-functionality-fix.patch

Which approach makes more sense?



From: Joonsoo Kim iamjoonsoo@lge.com
Subject: CMA: fix ARM build failure related to MAX_CMA_AREAS definition

If CMA is disabled, CONFIG_CMA_AREAS isn't defined so compile error
happens. To fix it, define MAX_CMA_AREAS if CONFIG_CMA_AREAS
isn't defined.

Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
Reported-by: Stephen Rothwell s...@canb.auug.org.au
Signed-off-by: Andrew Morton a...@linux-foundation.org
---

 include/linux/cma.h |6 ++
 1 file changed, 6 insertions(+)

diff -puN 
include/linux/cma.h~cma-generalize-cma-reserved-area-management-functionality-fix
 include/linux/cma.h
--- 
a/include/linux/cma.h~cma-generalize-cma-reserved-area-management-functionality-fix
+++ a/include/linux/cma.h
@@ -5,8 +5,14 @@
  * There is always at least global CMA area and a few optional
  * areas configured in kernel .config.
  */
+#ifdef CONFIG_CMA_AREAS
 #define MAX_CMA_AREAS  (1 + CONFIG_CMA_AREAS)
 
+#else
+#define MAX_CMA_AREAS  (0)
+
+#endif
+
 struct cma;
 
 extern phys_addr_t cma_get_base(struct cma *cma);
_


--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html