linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Jacek Konieczny <jajcus@jajcus.net>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: RT kernel on Acer laptop unreliable
Date: Fri, 22 Sep 2017 09:40:50 +0200	[thread overview]
Message-ID: <20170922074050.pjtyzzd2n2khtxsn@linutronix.de> (raw)
In-Reply-To: <20170905091712.koywolqt5qwaslpk@linutronix.de>

On 2017-09-05 11:17:13 [+0200], To Jacek Konieczny wrote:
> I'm sorry, I missed that. What about this on-top?
> 
> diff --git a/include/linux/locallock.h b/include/linux/locallock.h
> index eeb1a66df402..298afcd8e219 100644
> --- a/include/linux/locallock.h
> +++ b/include/linux/locallock.h
> @@ -61,6 +61,9 @@ static inline int __local_trylock(struct local_irq_lock *lv)
>  		lv->owner = current;
>  		lv->nestcnt = 1;
>  		return 1;
> +	} else if (lv->owner == current) {
> +		lv->nestcnt++;
> +		return 1;
>  	}
>  	return 0;
>  }

I am going to split up that part out in a separate patch and also add
the !RT part to it.

--- a/include/linux/locallock.h
+++ b/include/linux/locallock.h
@@ -68,6 +68,9 @@ static inline int __local_trylock(struct
 		lv->owner = current;
 		lv->nestcnt = 1;
 		return 1;
+	} else if (lv->owner == current) {
+		lv->nestcnt++;
+		return 1;
 	}
 	return 0;
 }
@@ -238,6 +241,12 @@ static inline int __local_unlock_irqrest
 
 static inline void local_irq_lock_init(int lvar) { }
 
+#define local_trylock(lvar)					\
+	({							\
+		preempt_disable();				\
+		1;						\
+	})
+
 #define local_lock(lvar)			preempt_disable()
 #define local_unlock(lvar)			preempt_enable()
 #define local_lock_irq(lvar)			local_irq_disable()

      parent reply	other threads:[~2017-09-22  7:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-15 17:43 RT kernel on Acer laptop unreliable Jacek Konieczny
2017-07-17  6:21 ` Stéphane Ancelot
2017-07-17  6:31   ` Piotr Gregor
2017-07-17 15:06     ` Jacek Konieczny
2017-07-17 17:59       ` Piotr Gregor
2017-08-07 13:19 ` Sebastian Andrzej Siewior
2017-08-12 10:07   ` Jacek Konieczny
2017-08-14 18:03   ` Jacek Konieczny
2017-08-18 12:44     ` Sebastian Andrzej Siewior
2017-08-20 14:48       ` Jacek Konieczny
2017-08-21 13:12         ` Sebastian Andrzej Siewior
2017-08-23 17:04           ` Jacek Konieczny
2017-09-05  9:17             ` Sebastian Andrzej Siewior
2017-09-05 19:37               ` Jacek Konieczny
2017-09-10 12:49                 ` Jacek Konieczny
2017-09-11  7:17                   ` Sebastian Andrzej Siewior
2017-09-14 19:11                     ` Jacek Konieczny
2017-09-21 12:57                       ` Sebastian Andrzej Siewior
2017-09-22  7:40               ` Sebastian Andrzej Siewior [this message]

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=20170922074050.pjtyzzd2n2khtxsn@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=jajcus@jajcus.net \
    --cc=linux-rt-users@vger.kernel.org \
    /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).