]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ARC: Fix CONFIG_SWAP
authorAlexey Brodkin <abrodkin@synopsys.com>
Thu, 28 Jun 2018 23:59:14 +0000 (16:59 -0700)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Feb 2019 04:53:01 +0000 (04:53 +0000)
commita89280eada16c1d40c0144e2173cbbe2f7f2948b
treed5bf0f31002aa231fd53f87fc657ab90f2ce8eb9
parenta05e9df6bc8cef52c6f1d8445cc18cb4cdea77a2
ARC: Fix CONFIG_SWAP

BugLink: http://bugs.launchpad.net/bugs/1812229
commit 6e3761145a9ba3ce267c330b6bff51cf6a057b06 upstream.

swap was broken on ARC due to silly copy-paste issue.

We encode offset from swapcache page in __swp_entry() as (off << 13) but
were not decoding back in __swp_offset() as (off >> 13) - it was still
(off << 13).

This finally fixes swap usage on ARC.

| # mkswap /dev/sda2
|
| # swapon -a -e /dev/sda2
| Adding 500728k swap on /dev/sda2.  Priority:-2 extents:1 across:500728k
|
| # free
|              total       used       free     shared    buffers     cached
| Mem:        765104      13456     751648       4736          8       4736
| -/+ buffers/cache:       8712     756392
| Swap:       500728          0     500728

Cc: stable@vger.kernel.org
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/arc/include/asm/pgtable.h