From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751810Ab3BQSRN (ORCPT ); Sun, 17 Feb 2013 13:17:13 -0500 Received: from mail-la0-f51.google.com ([209.85.215.51]:40671 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751439Ab3BQSRM (ORCPT ); Sun, 17 Feb 2013 13:17:12 -0500 MIME-Version: 1.0 In-Reply-To: References: <20130212193901.GA18906@redhat.com> <20130213004059.GA14451@redhat.com> <20130213041629.GA28622@redhat.com> <20130213193411.GA15928@redhat.com> <20130215011503.GA11914@redhat.com> <20130215174435.GA2792@linux.vnet.ibm.com> Date: Sun, 17 Feb 2013 19:17:09 +0100 Message-ID: Subject: Re: Debugging Thinkpad T430s occasional suspend failure. From: Frederic Weisbecker To: Linus Torvalds Cc: Paul McKenney , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Dave Jones , Hugh Dickins , Linux Kernel Mailing List , Paul McKenney Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2013/2/17 Linus Torvalds : > On Sun, Feb 17, 2013 at 7:11 AM, Frederic Weisbecker wrote: >> >> preempt_value_in_interrupt() looks buggy in your patch: it makes >> invoke_softirq() returning if (val & HARDIRQ_MASK). But that's always >> true since you have moved further the sub_preempt_count(IRQ_EXIT) >> further. > > No, that's not it. The value hasn't been written back yet, but it already did: > > + int offset = IRQ_EXIT_OFFSET; > + int count = preempt_count() - offset; > > so the 'count' has the IRQ_EXIT_OFFSET already subtracted. So no, > HARDIRQ_MASK is *not* always set. Ah right. I was confused.