LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: aneesh.kumar@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [bug report] powerpc/mm/radix: Add tlbflush routines
Date: Thu, 1 Feb 2018 12:21:23 +0300	[thread overview]
Message-ID: <20180201092123.hdjhvyuqni4oq5ut@mwanda> (raw)
In-Reply-To: <87fu6le25x.fsf@concordia.ellerman.id.au>

On Wed, Jan 31, 2018 at 08:58:50PM -0800, Michael Ellerman wrote:
> Dan Carpenter <dan.carpenter@oracle.com> writes:
> 
> > Hello Aneesh Kumar K.V,
> >
> > The patch 1a472c9dba6b: "powerpc/mm/radix: Add tlbflush routines"
> > from Apr 29, 2016, leads to the following static checker warning:
> >
> > 	arch/powerpc/mm/tlb_nohash.c:218 __local_flush_tlb_page()
> > 	warn: always true condition '(pid != ~0) => (0-u32max != u64max)'
> >
> > arch/powerpc/mm/tlb_nohash.c
> >    211  void __local_flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr,
> >    212                              int tsize, int ind)
> >    213  {
> >    214          unsigned int pid;
> >    215  
> >    216          preempt_disable();
> >    217          pid = mm ? mm->context.id : 0;
> >    218          if (pid != MMU_NO_CONTEXT)
> >                     ^^^^^^^^^^^^^^^^^^^^^
> >    219                  _tlbil_va(vmaddr, pid, tsize, ind);
> >    220          preempt_enable();
> >    221  }
> >
> > I don't know very much about PowerPC.  The static checker is guessing
> > which headers to pull in instead of relying on the build system so there
> > are a lot of false positives.
> 
> O_o 
> 
> That's a bit nuts ... :)
> 

Heh.

Thanks for looking into this.

regards,
dan carpenter

      reply	other threads:[~2018-02-01  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 15:45 [bug report] powerpc/mm/radix: Add tlbflush routines Dan Carpenter
2018-01-31 16:01 ` Christophe LEROY
2018-02-01  3:31   ` Aneesh Kumar K.V
2018-02-01  4:58 ` Michael Ellerman
2018-02-01  9:21   ` Dan Carpenter [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=20180201092123.hdjhvyuqni4oq5ut@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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