Received: from mail.onstor.com ([66.201.51.107]) by onstor-exch02.onstor.net with Microsoft SMTPSVC(6.0.3790.3959);
	 Wed, 10 Sep 2008 23:49:05 -0700
Received: from dalesmta2-3.messageone.com ([129.41.169.249]) by mail.onstor.com with Microsoft SMTPSVC(6.0.3790.3959);
	 Wed, 10 Sep 2008 23:49:04 -0700
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])
	by dalesmta2-3.messageone.com (8.13.8/8.13.8) with ESMTP id m8B6mssD025710
	for <andy.sharp@onstor.com>; Thu, 11 Sep 2008 01:49:03 -0500
Received: from localhost.localdomain ([127.0.0.1]:2735 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP
	id S20136897AbYIKGHZ (ORCPT <rfc822;andy.sharp@onstor.com>);
	Thu, 11 Sep 2008 07:07:25 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 11 Sep 2008 07:07:06 +0100 (BST)
Received: from smtp1.dnsmadeeasy.com ([205.234.170.134]:60634 "EHLO
	smtp1.dnsmadeeasy.com") by ftp.linux-mips.org with ESMTP
	id S62089637AbYIKGCH (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Thu, 11 Sep 2008 07:02:07 +0100
Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1])
	by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id 728373203EC;
	Thu, 11 Sep 2008 06:02:03 +0000 (UTC)
X-Authenticated-Name: js.dnsmadeeasy
X-Transit-System: In case of SPAM please contact abuse@dnsmadeeasy.com
Received: from avtrex.com (unknown [173.8.135.205])
	by smtp1.dnsmadeeasy.com (Postfix) with ESMTP;
	Thu, 11 Sep 2008 06:02:03 +0000 (UTC)
Received: from silver64.hq2.avtrex.com ([192.168.7.222]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830);
	 Wed, 10 Sep 2008 23:02:00 -0700
Message-ID: <48C8B457.3020308@avtrex.com>
Date: 	Wed, 10 Sep 2008 23:01:59 -0700
From: David Daney <ddaney@avtrex.com>
User-Agent: Thunderbird 2.0.0.16 (X11/20080723)
MIME-Version: 1.0
To: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Subject: [Patch 5/6] MIPS: Scheduler support for HARDWARE_WATCHPOINTS.
References: <48C8ADEF.9020305@avtrex.com>
In-Reply-To: <48C8ADEF.9020305@avtrex.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 11 Sep 2008 06:02:00.0342 (UTC) FILETIME=[E7B86B60:01C913D3]
X-archive-position: 20453
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ddaney@avtrex.com
Precedence: bulk
X-list: 	linux-mips
X-MessageOne-Virus-Version: vendor=fsecure engine=4.65.7161:2.4.4,1.2.40,4.0.164 definitions=2008-09-11_01:2008-09-02,2008-09-11,2008-09-11 signatures=0
X-MessageOne-Virus-Scanned: Clean
X-MessageOne-Envelope-Sender: linux-mips-bounce@linux-mips.org
X-MessageOne-Spam-Details: rule=m773emszm_notspam policy=m773emszm score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0805090000 definitions=main-0809100249
X-MessageOne-Spam-Score: 0
X-MessageOne-Spam-Bar: 
Return-Path: linux-mips-bounce@linux-mips.org

Scheduler support for HARDWARE_WATCHPOINTS.

Here we hook up the scheduler.  Whenever we switch to a new process,
we check to see if the watch registers should be installed, and do it
if needed.

Signed-off-by: David Daney <ddaney@avtrex.com>
---
 include/asm-mips/system.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h
index a944eda..cd30f83 100644
--- a/include/asm-mips/system.h
+++ b/include/asm-mips/system.h
@@ -20,6 +20,7 @@
 #include <asm/cmpxchg.h>
 #include <asm/cpu-features.h>
 #include <asm/dsp.h>
+#include <asm/watch.h>
 #include <asm/war.h>
 
 
@@ -76,6 +77,7 @@ do {									\
 		__restore_dsp(current);					\
 	if (cpu_has_userlocal)						\
 		write_c0_userlocal(current_thread_info()->tp_value);	\
+	__restore_watch();						\
 } while (0)
 
 static inline unsigned long __xchg_u32(volatile int * m, unsigned int val)
-- 
1.5.5.1


