mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Max Filippov <jcmvbkbc@gmail.com>, linux-xtensa@linux-xtensa.org
Cc: Chris Zankel <chris@zankel.net>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] xtensa: fix broken TIF_NOTIFY_SIGNAL assembly
Date: Wed, 11 Nov 2020 14:05:42 -0700	[thread overview]
Message-ID: <faf78325-3aef-e4aa-ddc6-c21e84a8c7ef@kernel.dk> (raw)
In-Reply-To: <20201111205349.24815-1-jcmvbkbc@gmail.com>

On 11/11/20 1:53 PM, Max Filippov wrote:
> TIF_NOTIFY_SIGNAL handling in xtensa assembly is implemented
> incorrectly: there should be a call to do_notify_resume when either
> TIF_SIGPENDING, TIF_NOTIFY_RESUME or TIF_NOTIFY_SIGNAL bit is set in the
> thread_info::flags. The straightforward way to do it would be
> 
>     _bbsi.l a4, TIF_NEED_RESCHED, 3f
>     _bbsi.l a4, TIF_NOTIFY_RESUME, 2f
>     _bbsi.l a4, TIF_NOTIFY_SIGNAL, 2f
>     _bbci.l a4, TIF_SIGPENDING, 5f
> 
> Optimize it a little bit and use bit mask and bnone opcode to skip
> do_notify_resume invocation. Shuffle _TIF_* flags a bit so that used bit
> mask fits into the immediate field of movi opcode.

Thanks - do you mind if I fold this in with a reference to your
changes? Seems like that'd be a better option than leaving it
broken for a bit.

-- 
Jens Axboe


  reply	other threads:[~2020-11-11 21:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 20:53 Max Filippov
2020-11-11 21:05 ` Jens Axboe [this message]
2020-11-12  9:12   ` Max Filippov
2020-11-12 15:45     ` Jens Axboe

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=faf78325-3aef-e4aa-ddc6-c21e84a8c7ef@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=chris@zankel.net \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.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

Powered by JetHome