linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Omar Ramirez Luna <omar.ramirez@copitl.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Victor Manuel Jaquez Leal <vjaquez@igalia.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Omar Ramirez Luna <omar.ramirez@copitl.com>
Subject: [PATCH 5/6] staging: tidspbridge: ioremap physical address of the stack segment in shm
Date: Wed, 24 Oct 2012 17:09:19 -0500	[thread overview]
Message-ID: <1351116560-6918-6-git-send-email-omar.ramirez@copitl.com> (raw)
In-Reply-To: <1351116560-6918-1-git-send-email-omar.ramirez@copitl.com>

Due to data type change, readl can no longer receive a u32.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
---

Intended for 3.7 due to code changes during rc1.

 drivers/staging/tidspbridge/rmgr/node.c |   21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index c2fc613..294e9b4 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -304,8 +304,7 @@ int node_allocate(struct proc_object *hprocessor,
 	u32 pul_value;
 	u32 dynext_base;
 	u32 off_set = 0;
-	u32 ul_stack_seg_addr, ul_stack_seg_val;
-	u32 ul_gpp_mem_base;
+	u32 ul_stack_seg_val;
 	struct cfg_hostres *host_res;
 	struct bridge_dev_context *pbridge_context;
 	u32 mapped_addr = 0;
@@ -581,6 +580,9 @@ func_cont:
 		if (strcmp((char *)
 			   pnode->dcd_props.obj_data.node_obj.ndb_props.
 			   stack_seg_name, STACKSEGLABEL) == 0) {
+			void __iomem *stack_seg;
+			u32 stack_seg_pa;
+
 			status =
 			    hnode_mgr->nldr_fxns.
 			    get_fxn_addr(pnode->nldr_node_obj, "DYNEXT_BEG",
@@ -608,14 +610,21 @@ func_cont:
 				goto func_end;
 			}
 
-			ul_gpp_mem_base = (u32) host_res->mem_base[1];
 			off_set = pul_value - dynext_base;
-			ul_stack_seg_addr = ul_gpp_mem_base + off_set;
-			ul_stack_seg_val = readl(ul_stack_seg_addr);
+			stack_seg_pa = host_res->mem_phys[1] + off_set;
+			stack_seg = ioremap(stack_seg_pa, SZ_32);
+			if (!stack_seg) {
+				status = -ENOMEM;
+				goto func_end;
+			}
+
+			ul_stack_seg_val = readl(stack_seg);
+
+			iounmap(stack_seg);
 
 			dev_dbg(bridge, "%s: StackSegVal = 0x%x, StackSegAddr ="
 				" 0x%x\n", __func__, ul_stack_seg_val,
-				ul_stack_seg_addr);
+				host_res->mem_base[1] + off_set);
 
 			pnode->create_args.asa.task_arg_obj.stack_seg =
 			    ul_stack_seg_val;
-- 
1.7.9.5


  parent reply	other threads:[~2012-10-24 22:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 22:09 [PATCH 0/6] staging: tidspbridge fixes for 3.7 Omar Ramirez Luna
2012-10-24 22:09 ` [PATCH 1/6] staging: tidspbridge: request the right irq for mmu Omar Ramirez Luna
2012-10-24 22:09 ` [PATCH 2/6] staging: tidspbridge: drop const from custom mmu implementation Omar Ramirez Luna
2012-10-24 22:09 ` [PATCH 3/6] staging: tidspbridge: change type to __iomem for per and core addresses Omar Ramirez Luna
2012-10-24 22:09 ` [PATCH 4/6] staging: tidspbridge: ioremap dsp sync addr Omar Ramirez Luna
2012-10-24 22:09 ` Omar Ramirez Luna [this message]
2012-10-24 22:09 ` [PATCH 6/6] staging: tidspbridge: delete unused mmu functions Omar Ramirez Luna
2012-10-24 22:28 ` [PATCH 0/6] staging: tidspbridge fixes for 3.7 Greg Kroah-Hartman
2012-10-24 23:25   ` Omar Ramirez Luna
2012-10-24 23:35     ` Greg Kroah-Hartman

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=1351116560-6918-6-git-send-email-omar.ramirez@copitl.com \
    --to=omar.ramirez@copitl.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vjaquez@igalia.com \
    /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 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).