linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: tidspbridge for 2.6.38
@ 2011-01-14  5:34 Omar Ramirez Luna
  2011-01-14  5:34 ` [PATCH 1/2] staging: tidspbridge: configure full L1 MMU range Omar Ramirez Luna
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Omar Ramirez Luna @ 2011-01-14  5:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Felipe Contreras, Omar Ramirez Luna, Fernando Guzman Lugo,
	Rene Sapiens, devel, linux-kernel

Set of important changes for 2.6.38, to fix a critical bug (1) and a
compile break (2).

Guzman Lugo, Fernando (1):
  staging: tidspbridge: configure full L1 MMU range

Omar Ramirez Luna (1):
  staging: tidspbridge: replace mbox callback with notifier_call

 drivers/staging/tidspbridge/core/tiomap3430.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] staging: tidspbridge: configure full L1 MMU range
  2011-01-14  5:34 [PATCH 0/2] staging: tidspbridge for 2.6.38 Omar Ramirez Luna
@ 2011-01-14  5:34 ` Omar Ramirez Luna
  2011-01-14  5:34 ` [PATCH 2/2] staging: tidspbridge: replace mbox callback with notifier_call Omar Ramirez Luna
  2011-01-19 17:01 ` [PATCH 0/2] staging: tidspbridge for 2.6.38 Ramirez Luna, Omar
  2 siblings, 0 replies; 6+ messages in thread
From: Omar Ramirez Luna @ 2011-01-14  5:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Felipe Contreras, Omar Ramirez Luna, Fernando Guzman Lugo,
	Rene Sapiens, devel, linux-kernel

From: Guzman Lugo, Fernando <fernando.lugo@ti.com>

IVA MMU can manage up to 4GB of address space through its page tables,
given that it's L1 is divided into 1MB sections it requires at least
16KB for its table which represents 4096 entries of 32 bits each.

Previously, only 1GB was being handled by setting the page table size
to 4KB, any virtual address beyond of the L1 size used, would fall
into memory that does not belong to L1 translation tables, leading to
unpredictable results.

So, set the L1 table size to cover the entire MMU range (4GB) whether
is meant to be used or not.

Reported-by: Felipe Contreras <felipe.contreras@nokia.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Felipe Contreras <felipe.contreras@nokia.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 drivers/staging/tidspbridge/core/tiomap3430.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index 1be081f..d6f333e 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -786,10 +786,7 @@ static int bridge_dev_create(struct bridge_dev_context
 
 	pt_attrs = kzalloc(sizeof(struct pg_table_attrs), GFP_KERNEL);
 	if (pt_attrs != NULL) {
-		/* Assuming that we use only DSP's memory map
-		 * until 0x4000:0000 , we would need only 1024
-		 * L1 enties i.e L1 size = 4K */
-		pt_attrs->l1_size = 0x1000;
+		pt_attrs->l1_size = SZ_16K; /* 4096 entries of 32 bits */
 		align_size = pt_attrs->l1_size;
 		/* Align sizes are expected to be power of 2 */
 		/* we like to get aligned on L1 table size */
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] staging: tidspbridge: replace mbox callback with notifier_call
  2011-01-14  5:34 [PATCH 0/2] staging: tidspbridge for 2.6.38 Omar Ramirez Luna
  2011-01-14  5:34 ` [PATCH 1/2] staging: tidspbridge: configure full L1 MMU range Omar Ramirez Luna
@ 2011-01-14  5:34 ` Omar Ramirez Luna
  2011-01-14 22:53   ` Ramirez Luna, Omar
  2011-01-19 17:01 ` [PATCH 0/2] staging: tidspbridge for 2.6.38 Ramirez Luna, Omar
  2 siblings, 1 reply; 6+ messages in thread
From: Omar Ramirez Luna @ 2011-01-14  5:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Felipe Contreras, Omar Ramirez Luna, Fernando Guzman Lugo,
	Rene Sapiens, devel, linux-kernel

Lately, mailbox callbacks have been replaced by notifier block
call chains, this needs to be changed in the users of mailbox,
otherwise compilation will break due to missing parameters.

Reported-by: Hari Kanigeri <h-kanigeri2@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 drivers/staging/tidspbridge/core/tiomap3430.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index d6f333e..7652c06 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -223,6 +223,10 @@ static struct bridge_drv_interface drv_interface_fxns = {
 	bridge_msg_set_queue_id,
 };
 
+static struct notifier_block dsp_mbox_notifier = {
+	.notifier_call = io_mbox_msg,
+};
+
 static inline void flush_all(struct bridge_dev_context *dev_context)
 {
 	if (dev_context->dw_brd_state == BRD_DSP_HIBERNATION ||
@@ -553,7 +557,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
 		 * Enable Mailbox events and also drain any pending
 		 * stale messages.
 		 */
-		dev_context->mbox = omap_mbox_get("dsp");
+		dev_context->mbox = omap_mbox_get("dsp", &dsp_mbox_notifier);
 		if (IS_ERR(dev_context->mbox)) {
 			dev_context->mbox = NULL;
 			pr_err("%s: Failed to get dsp mailbox handle\n",
@@ -563,8 +567,6 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
 
 	}
 	if (!status) {
-		dev_context->mbox->rxq->callback = (int (*)(void *))io_mbox_msg;
-
 /*PM_IVA2GRPSEL_PER = 0xC0;*/
 		temp = readl(resources->dw_per_pm_base + 0xA8);
 		temp = (temp & 0xFFFFFF30) | 0xC0;
@@ -685,7 +687,7 @@ static int bridge_brd_stop(struct bridge_dev_context *dev_ctxt)
 	/* Disable the mailbox interrupts */
 	if (dev_context->mbox) {
 		omap_mbox_disable_irq(dev_context->mbox, IRQ_RX);
-		omap_mbox_put(dev_context->mbox);
+		omap_mbox_put(dev_context->mbox, &dsp_mbox_notifier);
 		dev_context->mbox = NULL;
 	}
 	/* Reset IVA2 clocks*/
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] staging: tidspbridge: replace mbox callback with notifier_call
  2011-01-14  5:34 ` [PATCH 2/2] staging: tidspbridge: replace mbox callback with notifier_call Omar Ramirez Luna
@ 2011-01-14 22:53   ` Ramirez Luna, Omar
  2011-01-20 19:52     ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Ramirez Luna, Omar @ 2011-01-14 22:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Felipe Contreras, Omar Ramirez Luna, Fernando Guzman Lugo, devel,
	linux-kernel

On Thu, Jan 13, 2011 at 11:34 PM, Omar Ramirez Luna <omar.ramirez@ti.com> wrote:
> Lately, mailbox callbacks have been replaced by notifier block
> call chains, this needs to be changed in the users of mailbox,
> otherwise compilation will break due to missing parameters.

Please hold on applying this patch, it is not right as io_mbx_msg
differs on what a notifier_call parameters and type should be.

Regards,

Omar

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] staging: tidspbridge for 2.6.38
  2011-01-14  5:34 [PATCH 0/2] staging: tidspbridge for 2.6.38 Omar Ramirez Luna
  2011-01-14  5:34 ` [PATCH 1/2] staging: tidspbridge: configure full L1 MMU range Omar Ramirez Luna
  2011-01-14  5:34 ` [PATCH 2/2] staging: tidspbridge: replace mbox callback with notifier_call Omar Ramirez Luna
@ 2011-01-19 17:01 ` Ramirez Luna, Omar
  2 siblings, 0 replies; 6+ messages in thread
From: Ramirez Luna, Omar @ 2011-01-19 17:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Felipe Contreras, Omar Ramirez Luna, Fernando Guzman Lugo, devel,
	linux-kernel

Hi Greg,

On Thu, Jan 13, 2011 at 11:34 PM, Omar Ramirez Luna <omar.ramirez@ti.com> wrote:
> Set of important changes for 2.6.38, to fix a critical bug (1) and a
> compile break (2).
>
> Guzman Lugo, Fernando (1):
>  staging: tidspbridge: configure full L1 MMU range
>
> Omar Ramirez Luna (1):
>  staging: tidspbridge: replace mbox callback with notifier_call
>
>  drivers/staging/tidspbridge/core/tiomap3430.c |   15 +++++++--------
>  1 files changed, 7 insertions(+), 8 deletions(-)

Ping... to include these critical fixes, I made a correction on my
patch and sent v2, please let me know if you want me to send the two
patches again.

Regards,

Omar

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] staging: tidspbridge: replace mbox callback with notifier_call
  2011-01-14 22:53   ` Ramirez Luna, Omar
@ 2011-01-20 19:52     ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2011-01-20 19:52 UTC (permalink / raw)
  To: Ramirez Luna, Omar
  Cc: Greg Kroah-Hartman, devel, linux-kernel, Fernando Guzman Lugo,
	Felipe Contreras

On Fri, Jan 14, 2011 at 04:53:25PM -0600, Ramirez Luna, Omar wrote:
> On Thu, Jan 13, 2011 at 11:34 PM, Omar Ramirez Luna <omar.ramirez@ti.com> wrote:
> > Lately, mailbox callbacks have been replaced by notifier block
> > call chains, this needs to be changed in the users of mailbox,
> > otherwise compilation will break due to missing parameters.
> 
> Please hold on applying this patch, it is not right as io_mbx_msg
> differs on what a notifier_call parameters and type should be.

Ok, I'll just queue up the 1st patch in this series.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-20 20:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-14  5:34 [PATCH 0/2] staging: tidspbridge for 2.6.38 Omar Ramirez Luna
2011-01-14  5:34 ` [PATCH 1/2] staging: tidspbridge: configure full L1 MMU range Omar Ramirez Luna
2011-01-14  5:34 ` [PATCH 2/2] staging: tidspbridge: replace mbox callback with notifier_call Omar Ramirez Luna
2011-01-14 22:53   ` Ramirez Luna, Omar
2011-01-20 19:52     ` Greg KH
2011-01-19 17:01 ` [PATCH 0/2] staging: tidspbridge for 2.6.38 Ramirez Luna, Omar

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).