linux/arch/arc
Alexey Brodkin 6e3761145a ARC: Fix CONFIG_SWAP
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>
2018-07-09 11:31:49 -07:00
..
boot kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers 2018-04-07 19:04:02 +09:00
configs ARC: configs: Remove CONFIG_INITRAMFS_SOURCE from defconfigs 2018-07-09 11:25:45 -07:00
include ARC: Fix CONFIG_SWAP 2018-07-09 11:31:49 -07:00
kernel ARC: Improve cmpxchg syscall implementation 2018-07-09 11:22:05 -07:00
lib ARC: dw2 unwind: enable cfi pseudo ops in string lib 2016-09-30 14:48:22 -07:00
mm mm: fix races between swapoff and flush dcache 2018-04-05 21:36:26 -07:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
plat-axs10x ARC: [plat-axs103] refactor the quad core DT quirk code 2017-12-20 12:41:45 -08:00
plat-eznps License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
plat-hsdk ARC: [plat-hsdk]: Configure APB GPIO controller on ARC HSDK platform 2018-07-09 11:21:21 -07:00
plat-sim ARC: [plat-sim] Include this platform unconditionally 2017-08-04 13:49:47 +05:30
plat-tb10x arc: select GPIOLIB directly 2016-04-26 14:07:59 +02:00
Kbuild
Kconfig ARC fixes for 4.16-rc4 2018-03-01 14:32:23 -08:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile ARC: Explicitly add -mmedium-calls to CFLAGS 2018-06-13 17:46:34 -07:00