All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: linux-omap <linux-omap@vger.kernel.org>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	Omar Ramirez Luna <omar.ramirez@ti.com>, Greg KH <greg@kroah.com>,
	Felipe Contreras <felipe.contreras@gmail.com>
Subject: [PATCH 06/13] staging: ti dspbridge: deh: ensure only tlb #0 is enabled
Date: Sun,  4 Jul 2010 16:34:32 +0300	[thread overview]
Message-ID: <1278250479-16982-7-git-send-email-felipe.contreras@gmail.com> (raw)
In-Reply-To: <1278250479-16982-1-git-send-email-felipe.contreras@gmail.com>

We don't want the DSP to continue writing into other mapped pages, no
matter how unlikely.

Based on extensive discussion with Fernando Guzman Lugo.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 drivers/staging/tidspbridge/core/ue_deh.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/ue_deh.c b/drivers/staging/tidspbridge/core/ue_deh.c
index 06167ed..793e982 100644
--- a/drivers/staging/tidspbridge/core/ue_deh.c
+++ b/drivers/staging/tidspbridge/core/ue_deh.c
@@ -186,6 +186,14 @@ void bridge_deh_notify(struct deh_mgr *deh_mgr, u32 ulEventMask, u32 dwErrInfo)
 		print_dsp_trace_buffer(dev_context);
 		dump_dl_modules(dev_context);
 
+		/*
+		 * Before acking the MMU fault, let's make sure MMU can only
+		 * access entry #0. Then add a new entry so that the DSP OS
+		 * can continue in order to dump the stack.
+		 */
+		hw_mmu_twl_disable(resources->dw_dmmu_base);
+		hw_mmu_tlb_flush_all(resources->dw_dmmu_base);
+
 		hw_mmu_tlb_add(resources->dw_dmmu_base,
 				virt_to_phys(dummy_va_addr), fault_addr,
 				HW_PAGE_SIZE4KB, 1,
-- 
1.7.1


  parent reply	other threads:[~2010-07-04 13:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-04 13:34 [PATCH 00/13] staging: ti dspbridge: deh rewrite Felipe Contreras
2010-07-04 13:34 ` [PATCH 01/13] staging: ti dspbridge: deh: trivial cleanups Felipe Contreras
2010-07-04 13:34 ` [PATCH 02/13] staging: ti dspbridge: mmufault: " Felipe Contreras
2010-07-04 13:34 ` [PATCH 03/13] staging: ti dspbridge: deh: free dummy page immediately Felipe Contreras
2010-07-04 13:34 ` [PATCH 04/13] staging: ti dspbridge: remove unused code Felipe Contreras
2010-07-04 13:34 ` [PATCH 05/13] staging: ti dspbridge: mmu: add hw_mmu_tlb_flush_all() Felipe Contreras
2010-07-04 13:34 ` Felipe Contreras [this message]
2010-07-04 13:34 ` [PATCH 07/13] staging: ti dspbridge: deh: refactor in mmu_fault_print_stack() Felipe Contreras
2010-07-04 13:34 ` [PATCH 08/13] staging: ti dspbridge: deh: remove get_info Felipe Contreras
2010-07-04 13:34 ` [PATCH 09/13] staging: ti dspbridge: deh: remove err_info Felipe Contreras
2010-07-04 13:34 ` [PATCH 10/13] staging: ti dspbridge: access deh directly Felipe Contreras
2010-07-04 13:34 ` [PATCH 11/13] staging: ti dspbridge: move mmufault to deh Felipe Contreras
2010-07-04 13:34 ` [PATCH 12/13] staging: ti dspbridge: deh: tidying up Felipe Contreras
2010-07-04 13:34 ` [PATCH 13/13] staging: ti dspbridge: deh: update copyright notice Felipe Contreras

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=1278250479-16982-7-git-send-email-felipe.contreras@gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=greg@kroah.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=omar.ramirez@ti.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 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.