All of lore.kernel.org
 help / color / mirror / Atom feed
From: git@arago-project.org (Arago Project git)
To: meta-ti@yoctoproject.org
Subject: Enric Balletbo i Serra : ti-linuxutils: Fix build problems for kernel up to 3.17
Date: Wed,  8 Oct 2014 18:10:03 +0000 (UTC)	[thread overview]
Message-ID: <20141008181003.2ABDD52973@arago-project.org> (raw)

Module: meta-ti
Branch: daisy
Commit: cbd2f82aad2a29415cd483ccd9fa9b394ae74bbf
URL:    http://arago-project.org/git/meta-ti.git?a=commit;h=cbd2f82aad2a29415cd483ccd9fa9b394ae74bbf

Author: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Date:   Wed Oct  8 19:47:46 2014 +0000

ti-linuxutils: Fix build problems for kernel up to 3.17

Add to patches to fix the build of cmemk and sdmak kernel modules.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>

---

 recipes-ti/linuxutils/ti-linuxutils.inc            |    2 +-
 .../linuxutils_2_26-cmemk-fixes.patch              |   59 ++++++++++++++++++++
 .../linuxutils_2_26-sdmak-fixes.patch              |   25 ++++++++
 recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb  |    5 +-
 4 files changed, 89 insertions(+), 2 deletions(-)

diff --git a/recipes-ti/linuxutils/ti-linuxutils.inc b/recipes-ti/linuxutils/ti-linuxutils.inc
index dba485b..c8f9320 100644
--- a/recipes-ti/linuxutils/ti-linuxutils.inc
+++ b/recipes-ti/linuxutils/ti-linuxutils.inc
@@ -15,7 +15,7 @@ require recipes-ti/includes/ti-staging.inc
 PR = "${MACHINE_KERNEL_PR}"
 
 #This is a kernel module, don't set PR directly
-MACHINE_KERNEL_PR_append = "e"
+MACHINE_KERNEL_PR_append = "f"
 
 inherit module
 
diff --git a/recipes-ti/linuxutils/ti-linuxutils/linuxutils_2_26-cmemk-fixes.patch b/recipes-ti/linuxutils/ti-linuxutils/linuxutils_2_26-cmemk-fixes.patch
new file mode 100644
index 0000000..3ce66f8
--- /dev/null
+++ b/recipes-ti/linuxutils/ti-linuxutils/linuxutils_2_26-cmemk-fixes.patch
@@ -0,0 +1,59 @@
+Index: linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
+===================================================================
+--- linuxutils_2_26_01_02.orig/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
++++ linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
+@@ -31,6 +31,7 @@
+ #include <linux/seq_file.h>
+ #include <linux/vmalloc.h>
+ #include <linux/sched.h>
++#include <linux/slab.h>
+ #include <asm/cacheflush.h>
+ #include <asm/uaccess.h>
+ #include <asm/pgtable.h>
+@@ -1072,7 +1073,7 @@ static int set_noncached(struct vm_area_
+ {
+     vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+ 
+-    vma->vm_flags |= VM_RESERVED | VM_IO;
++    vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP | VM_IO;
+ 
+     if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
+                         vma->vm_end - vma->vm_start, vma->vm_page_prot)) {
+@@ -1095,7 +1096,7 @@ static int set_cached(struct vm_area_str
+                                 );
+ #endif
+ 
+-    vma->vm_flags |= VM_RESERVED | VM_IO;
++    vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP | VM_IO;
+ 
+     if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
+                         vma->vm_end - vma->vm_start, vma->vm_page_prot)) {
+@@ -2062,8 +2063,13 @@ int __init cmem_init(void)
+         block_avail_size[bi] = length;
+ 
+         /* attempt to determine the end of Linux kernel memory */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0)
+         phys_end_kernel = virt_to_phys((void *)PAGE_OFFSET) +
+                    (num_physpages << PAGE_SHIFT);
++#else
++        phys_end_kernel = virt_to_phys((void *)PAGE_OFFSET) +
++                   (get_num_physpages() << PAGE_SHIFT);
++#endif
+ 
+         if (phys_end_kernel > block_start[bi]) {
+             if (allowOverlap == 0) {
+@@ -2186,10 +2192,14 @@ int __init cmem_init(void)
+     }
+ 
+     /* Create the /proc entry */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+     cmem_proc_entry = create_proc_entry("cmem", 0, NULL);
+     if (cmem_proc_entry) {
+         cmem_proc_entry->proc_fops = &cmem_proc_ops;
+     }
++#else
++    cmem_proc_entry = proc_create_data("cmem", 0, NULL, &cmem_proc_ops, NULL);
++#endif
+ 
+     mutex_init(&cmem_mutex);
+ 
diff --git a/recipes-ti/linuxutils/ti-linuxutils/linuxutils_2_26-sdmak-fixes.patch b/recipes-ti/linuxutils/ti-linuxutils/linuxutils_2_26-sdmak-fixes.patch
new file mode 100644
index 0000000..5ec85fc
--- /dev/null
+++ b/recipes-ti/linuxutils/ti-linuxutils/linuxutils_2_26-sdmak-fixes.patch
@@ -0,0 +1,25 @@
+Index: linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c
+===================================================================
+--- linuxutils_2_26_01_02.orig/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c
++++ linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c
+@@ -44,7 +44,7 @@
+ #include <mach/hardware.h>
+ #include <mach/dma.h>
+ #include <mach/tc.h>
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+ #include <plat/hardware.h>
+ #include <plat/dma.h>
+ #include <plat/tc.h>
+@@ -97,6 +97,11 @@
+ 
+ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) */
+ 
++#ifndef OMAP_DMA_NO_DEVICE
++#include <linux/omap-dma.h>
++#define OMAP_DMA_NO_DEVICE	0
++#endif
++
+ #include "../interface/sdma.h"
+ 
+ struct channel {
diff --git a/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb b/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb
index 75a32da..1a56d1d 100644
--- a/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb
+++ b/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb
@@ -1,6 +1,9 @@
 require ti-linuxutils.inc
 
-SRC_URI += "file://linuxutils-BKL-fix-2.patch"
+SRC_URI += "file://linuxutils-BKL-fix-2.patch \
+			file://linuxutils_2_26-cmemk-fixes.patch \
+			file://linuxutils_2_26-sdmak-fixes.patch \
+	"
 
 PE = "1"
 PV = "2_26_01_02"



             reply	other threads:[~2014-10-08 18:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08 18:10 Arago Project git [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-10-08 18:09 Enric Balletbo i Serra : ti-linuxutils: Fix build problems for kernel up to 3.17 Arago Project git

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141008181003.2ABDD52973@arago-project.org \
    --to=git@arago-project.org \
    --cc=meta-ti@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.