public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Max Filippov <jcmvbkbc@gmail.com>, linux-xtensa@linux-xtensa.org
Cc: Chris Zankel <chris@zankel.net>,
	linux-kernel@vger.kernel.org, Max Filippov <jcmvbkbc@gmail.com>
Subject: Re: [PATCH v2] xtensa/mm/highmem: Make generic kmap_atomic() work correctly
Date: Mon, 16 Nov 2020 21:16:34 +0100	[thread overview]
Message-ID: <87pn4dxdjx.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20201116193253.23875-1-jcmvbkbc@gmail.com>

On Mon, Nov 16 2020 at 11:32, Max Filippov wrote:
> From: Thomas Gleixner <tglx@linutronix.de>
>
> The conversion to the generic kmap_atomic() implementation missed the fact
> that xtensa's fixmap works bottom up while all other implementations work
> top down. There is no real reason why xtensa needs to work that way.
>
> Cure it by:
>
>   - Using the generic fix_to_virt()/virt_to_fix() functions which work top
>     down
>   - Adjusting the mapping defines
>   - Using the generic index calculation for the non cache aliasing case
>   - Making the cache colour offset reverse so the effective index is correct
>
> While at it, remove the outdated and misleading comment above the fixmap
> enum which originates from the initial copy&pasta of this code from i386.
>
> Reported-by: Max Filippov <jcmvbkbc@gmail.com>
> Fixes: 629ed3f7dad2 ("xtensa/mm/highmem: Switch to generic kmap atomic")
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> Tested-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
> Changes v1->v2:
> - fix off-by-one error in kmap_idx calculation

Duh. Indeed.

Thanks for following up and helping with this. Much appreciated!

     tglx

  reply	other threads:[~2020-11-16 20:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 19:32 [PATCH v2] xtensa/mm/highmem: Make generic kmap_atomic() work correctly Max Filippov
2020-11-16 20:16 ` Thomas Gleixner [this message]
2020-11-16 20:24 ` [tip: core/mm] " tip-bot2 for Thomas Gleixner

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=87pn4dxdjx.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --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