From patchwork Wed Sep 22 01:49:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 198422 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8M1o6BJ004063 for ; Wed, 22 Sep 2010 01:50:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756076Ab0IVBtj (ORCPT ); Tue, 21 Sep 2010 21:49:39 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:62232 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755547Ab0IVBtj (ORCPT ); Tue, 21 Sep 2010 21:49:39 -0400 Received: by pzk34 with SMTP id 34so9379pzk.19 for ; Tue, 21 Sep 2010 18:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=4BWHlr53NP1gSiLtw//TLXnHUwkQQkBd9ptA3VIWU8s=; b=lytkWjOYwN1JKMi8q/L4r3pW/HJWpKCX7xxFrWw255R32TCA79mPJ1+J+oFeIETAO3 j1SKTF+F+RlA3K2fqe6I4lKVBLHIi7NXhL8CQjH7YR+ztlv+6qH7eScktkvi4/Z5rylq vppiksYKedQmYsy4kbZ0qp59nO4uNOKJQ/UZs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=IdWYztz6MInD/LFl/HgauPlBed7fIQjRY1F/iego+bB6N9iUNrJGF0bKyL9KFsz+bq +5dHW4qpri70VZRrFTz4EBZxl9i4fmp5WXDyesjceUbkSHdRl0qB2MapPZXYssEbL1OZ Xm2mI9VJ5O4Kvf52ziQM9Vz6NJ2EhiK9Lq0ig= Received: by 10.114.131.8 with SMTP id e8mr12964787wad.43.1285120178315; Tue, 21 Sep 2010 18:49:38 -0700 (PDT) Received: from localhost ([183.16.44.137]) by mx.google.com with ESMTPS id o17sm16582407wal.9.2010.09.21.18.49.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 21 Sep 2010 18:49:37 -0700 (PDT) From: tom.leiming@gmail.com To: sameo@linux.intel.com Cc: linux-omap@vger.kernel.org, Ming Lei , Santosh Shilimkar , Balaji T K , Rajendra Nayak , Kevin Hilman , linux-kernel@vger.kernel.org Subject: [PATCH] mfd: speedup twl4030 irq response time and decrease irq disable time Date: Wed, 22 Sep 2010 09:49:31 +0800 Message-Id: <1285120171-3030-1-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.6.2.5 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 22 Sep 2010 01:50:07 +0000 (UTC) diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c index 097f24d..d1e0d80 100644 --- a/drivers/mfd/twl4030-irq.c +++ b/drivers/mfd/twl4030-irq.c @@ -286,8 +286,16 @@ static int twl4030_irq_thread(void *data) long irq = (long)data; static unsigned i2c_errors; static const unsigned max_i2c_errors = 100; - - + struct sched_param param = { + .sched_priority = MAX_USER_RT_PRIO/2 + 10, + }; + + /* Take higher priority than threaded irq to make us immune of + * preemption from twl4030 subchips's threaded irq handler, then + * we can complete all SIH irqs' handling and enable PIH irq + * again asap. + * */ + sched_setscheduler(current, SCHED_FIFO, ¶m); current->flags |= PF_NOFREEZE; while (!kthread_should_stop()) {