Merge remote-tracking branch 'up/master' into master-riscv64

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
David Abdurachmanov 2019-04-03 22:20:03 +02:00
commit da7a473ed6
Signed by: davidlt
GPG Key ID: 7108702C938B13C1
131 changed files with 2842 additions and 462 deletions

View File

@ -0,0 +1,113 @@
From patchwork Wed Mar 27 08:54:24 2019
Date: Wed, 27 Mar 2019 08:54:24 +0000
From: Mel Gorman <mgorman@techsingularity.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>,
Daniel Jordan <daniel.m.jordan@oracle.com>, Qian Cai <cai@lca.pw>,
linux-mm@kvack.org, vbabka@suse.cz, linux-kernel@vger.kernel.org
Subject: [PATCH] Correct zone boundary handling when resetting pageblock skip
hints
Mikhail Gavrilo reported the following bug being triggered in a Fedora
kernel based on 5.1-rc1 but it is relevant to a vanilla kernel.
kernel: page dumped because: VM_BUG_ON_PAGE(PagePoisoned(p))
kernel: ------------[ cut here ]------------
kernel: kernel BUG at include/linux/mm.h:1021!
kernel: invalid opcode: 0000 [#1] SMP NOPTI
kernel: CPU: 6 PID: 116 Comm: kswapd0 Tainted: G C 5.1.0-0.rc1.git1.3.fc31.x86_64 #1
kernel: Hardware name: System manufacturer System Product Name/ROG STRIX X470-I GAMING, BIOS 1201 12/07/2018
kernel: RIP: 0010:__reset_isolation_pfn+0x244/0x2b0
kernel: Code: fe 06 e8 0f 8e fc ff 44 0f b6 4c 24 04 48 85 c0 0f 85 dc fe ff ff e9 68 fe ff ff 48 c7 c6 58 b7 2e 8c 4c 89 ff e8 0c 75 00 00 <0f> 0b 48 c7 c6 58 b7 2e 8c e8 fe 74 00 00 0f 0b 48 89 fa 41 b8 01
kernel: RSP: 0018:ffff9e2d03f0fde8 EFLAGS: 00010246
kernel: RAX: 0000000000000034 RBX: 000000000081f380 RCX: ffff8cffbddd6c20
kernel: RDX: 0000000000000000 RSI: 0000000000000006 RDI: ffff8cffbddd6c20
kernel: RBP: 0000000000000001 R08: 0000009898b94613 R09: 0000000000000000
kernel: R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000100000
kernel: R13: 0000000000100000 R14: 0000000000000001 R15: ffffca7de07ce000
kernel: FS: 0000000000000000(0000) GS:ffff8cffbdc00000(0000) knlGS:0000000000000000
kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: 00007fc1670e9000 CR3: 00000007f5276000 CR4: 00000000003406e0
kernel: Call Trace:
kernel: __reset_isolation_suitable+0x62/0x120
kernel: reset_isolation_suitable+0x3b/0x40
kernel: kswapd+0x147/0x540
kernel: ? finish_wait+0x90/0x90
kernel: kthread+0x108/0x140
kernel: ? balance_pgdat+0x560/0x560
kernel: ? kthread_park+0x90/0x90
kernel: ret_from_fork+0x27/0x50
He bisected it down to commit e332f741a8dd ("mm, compaction: be selective
about what pageblocks to clear skip hints"). The problem is that the patch
in question was sloppy with respect to the handling of zone boundaries. In
some instances, it was possible for PFNs outside of a zone to be examined
and if those were not properly initialised or poisoned then it would
trigger the VM_BUG_ON. This patch corrects the zone boundary issues when
resetting pageblock skip hints and Mikhail reported that the bug did not
trigger after 30 hours of testing.
Fixes: e332f741a8dd ("mm, compaction: be selective about what pageblocks to clear skip hints")
Reported-and-tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
mm/compaction.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/mm/compaction.c b/mm/compaction.c
index f171a83707ce..b4930bf93c8a 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -242,6 +242,7 @@ __reset_isolation_pfn(struct zone *zone, unsigned long pfn, bool check_source,
bool check_target)
{
struct page *page = pfn_to_online_page(pfn);
+ struct page *block_page;
struct page *end_page;
unsigned long block_pfn;
@@ -267,20 +268,26 @@ __reset_isolation_pfn(struct zone *zone, unsigned long pfn, bool check_source,
get_pageblock_migratetype(page) != MIGRATE_MOVABLE)
return false;
+ /* Ensure the start of the pageblock or zone is online and valid */
+ block_pfn = pageblock_start_pfn(pfn);
+ block_page = pfn_to_online_page(max(block_pfn, zone->zone_start_pfn));
+ if (block_page) {
+ page = block_page;
+ pfn = block_pfn;
+ }
+
+ /* Ensure the end of the pageblock or zone is online and valid */
+ block_pfn += pageblock_nr_pages;
+ block_pfn = min(block_pfn, zone_end_pfn(zone) - 1);
+ end_page = pfn_to_online_page(block_pfn);
+ if (!end_page)
+ return false;
+
/*
* Only clear the hint if a sample indicates there is either a
* free page or an LRU page in the block. One or other condition
* is necessary for the block to be a migration source/target.
*/
- block_pfn = pageblock_start_pfn(pfn);
- pfn = max(block_pfn, zone->zone_start_pfn);
- page = pfn_to_page(pfn);
- if (zone != page_zone(page))
- return false;
- pfn = block_pfn + pageblock_nr_pages;
- pfn = min(pfn, zone_end_pfn(zone));
- end_page = pfn_to_page(pfn);
-
do {
if (pfn_valid_within(pfn)) {
if (check_source && PageLRU(page)) {
@@ -309,7 +316,7 @@ __reset_isolation_pfn(struct zone *zone, unsigned long pfn, bool check_source,
static void __reset_isolation_suitable(struct zone *zone)
{
unsigned long migrate_pfn = zone->zone_start_pfn;
- unsigned long free_pfn = zone_end_pfn(zone);
+ unsigned long free_pfn = zone_end_pfn(zone) - 1;
unsigned long reset_migrate = free_pfn;
unsigned long reset_free = migrate_pfn;
bool source_set = false;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,68 @@
From 005e0b987019fff6013dff99f44d9f6ce68f08ad Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Sat, 23 Mar 2019 17:42:18 +0000
Subject: [PATCH 1/3] arm64: tegra210: Jetson TX1: disable WP to make SD card
work
There's some issue with Write Protect detection on the Jetson TX1
so just apply a quirk to disable the check for the time being.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
index a96e6ee70c21..072788646cbf 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
@@ -1456,6 +1456,7 @@
sdhci@700b0000 {
status = "okay";
bus-width = <4>;
+ disable-wp;
cd-gpios = <&gpio TEGRA_GPIO(Z, 1) GPIO_ACTIVE_LOW>;
--
2.20.1
From aea4a7a551fd7342299d34f04a8b75f58644ac07 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Sat, 23 Mar 2019 17:45:10 +0000
Subject: [PATCH 2/3] arm64: tegra210: Jetson TX1: disable display panel and
associated backlight
The Jetson TX1 dev kit doesn't ship with a screen by default and if
it's not there it appears to crash on boot so disable them both by
default until we work out the problem.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts b/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts
index 37e3c46e753f..a16f24f1d5ff 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts
@@ -36,7 +36,7 @@
host1x@50000000 {
dsi@54300000 {
- status = "okay";
+ status = "disabled";
avdd-dsi-csi-supply = <&vdd_dsi_csi>;
@@ -54,6 +54,8 @@
i2c@7000c400 {
backlight: backlight@2c {
+ status = "disabled";
+
compatible = "ti,lp8557";
reg = <0x2c>;
--
2.20.1

View File

@ -1 +0,0 @@
# CONFIG_AD7152 is not set

View File

@ -0,0 +1 @@
CONFIG_CHARLCD_BL_FLASH=y

View File

@ -0,0 +1 @@
# CONFIG_CHARLCD_BL_OFF is not set

View File

@ -0,0 +1 @@
# CONFIG_CHARLCD_BL_ON is not set

View File

@ -1 +0,0 @@
# CONFIG_EXOFS_FS is not set

View File

@ -1 +0,0 @@
CONFIG_EXT4_ENCRYPTION=y

View File

@ -1 +0,0 @@
# CONFIG_F2FS_FS_ENCRYPTION is not set

View File

@ -1 +0,0 @@
# CONFIG_FB_LOGO_CENTER is not set

View File

@ -1 +0,0 @@
# CONFIG_FB_XGI is not set

View File

@ -1 +1 @@
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_FILTER=m

View File

@ -1 +1 @@
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_IPTABLES=m

View File

@ -1 +1 @@
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_REJECT=m

View File

@ -1 +0,0 @@
CONFIG_NFT_CHAIN_NAT_IPV4=m

View File

@ -1 +0,0 @@
CONFIG_NFT_CHAIN_NAT_IPV6=m

View File

@ -1 +0,0 @@
CONFIG_NFT_MASQ_IPV4=m

View File

@ -1 +0,0 @@
CONFIG_NFT_MASQ_IPV6=m

View File

@ -1 +0,0 @@
CONFIG_NFT_REDIR_IPV4=m

View File

@ -1 +0,0 @@
CONFIG_NFT_REDIR_IPV6=m

View File

@ -0,0 +1 @@
CONFIG_NF_REJECT_IPV4=m

View File

@ -0,0 +1 @@
# CONFIG_PANEL_CHANGE_MESSAGE is not set

View File

@ -0,0 +1 @@
# CONFIG_PARPORT_PANEL is not set

View File

@ -1 +0,0 @@
# CONFIG_SCSI_OSD_DEBUG is not set

View File

@ -1 +0,0 @@
CONFIG_SCSI_OSD_DPRINT_SENSE=1

View File

@ -1 +0,0 @@
CONFIG_SCSI_OSD_INITIATOR=m

View File

@ -1 +0,0 @@
CONFIG_SCSI_OSD_ULD=m

View File

@ -1 +0,0 @@
CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1

View File

@ -1 +0,0 @@
# CONFIG_SND_AUDIO_GRAPH_SCU_CARD is not set

View File

@ -1 +0,0 @@
CONFIG_SND_SIMPLE_SCU_CARD=m

View File

@ -1 +0,0 @@
# CONFIG_SPI_FSL_QUADSPI is not set

View File

@ -1 +0,0 @@
CONFIG_UBIFS_FS_ENCRYPTION=y

View File

@ -0,0 +1 @@
# CONFIG_ARM_IMX6Q_CPUFREQ is not set

View File

@ -0,0 +1 @@
# CONFIG_CRYPTO_DEV_MXS_DCP is not set

View File

@ -0,0 +1 @@
# CONFIG_CRYPTO_DEV_SAHARA is not set

View File

@ -1 +1 @@
# CONFIG_DWMAC_DWC_QOS_ETH is not set
CONFIG_DWMAC_DWC_QOS_ETH=m

View File

@ -0,0 +1 @@
# CONFIG_FB_MX3 is not set

View File

@ -0,0 +1 @@
# CONFIG_IMX_DMA is not set

View File

@ -0,0 +1 @@
# CONFIG_IMX_WEIM is not set

View File

@ -0,0 +1 @@
# CONFIG_KEYBOARD_IMX is not set

View File

@ -0,0 +1 @@
# CONFIG_MMC_MXC is not set

View File

@ -0,0 +1 @@
# CONFIG_MXS_DMA is not set

View File

@ -0,0 +1 @@
# CONFIG_NVMEM_IMX_IIM is not set

View File

@ -0,0 +1 @@
# CONFIG_PATA_IMX is not set

View File

@ -1 +1 @@
# CONFIG_REGULATOR_ANATOP is not set
CONFIG_REGULATOR_ANATOP=m

View File

@ -0,0 +1 @@
# CONFIG_RTC_DRV_IMXDI is not set

View File

@ -0,0 +1 @@
# CONFIG_RTC_DRV_MXC is not set

View File

@ -0,0 +1 @@
# CONFIG_RTC_DRV_MXC_V2 is not set

View File

@ -0,0 +1 @@
CONFIG_SERIAL_FSL_LPUART=y

View File

@ -0,0 +1 @@
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y

View File

@ -0,0 +1 @@
# CONFIG_W1_MASTER_MXC is not set

View File

@ -0,0 +1 @@
CONFIG_ARCH_MXC=y

View File

@ -0,0 +1 @@
CONFIG_CLK_IMX8MM=y

View File

@ -0,0 +1 @@
CONFIG_CLK_IMX8MQ=y

View File

@ -0,0 +1 @@
CONFIG_CLK_IMX8QXP=y

View File

@ -1 +1 @@
CONFIG_GPIO_MAX77620=m
CONFIG_GPIO_MAX77620=y

View File

@ -0,0 +1 @@
# CONFIG_IMX_THERMAL is not set

View File

@ -0,0 +1 @@
CONFIG_PHY_FSL_IMX8MQ_USB=m

View File

@ -0,0 +1 @@
CONFIG_PINCTRL_IMX8MM=y

View File

@ -0,0 +1 @@
CONFIG_PINCTRL_IMX8MQ=y

View File

@ -0,0 +1 @@
CONFIG_PINCTRL_IMX8QM=y

View File

@ -0,0 +1 @@
CONFIG_PINCTRL_IMX8QXP=y

View File

@ -1 +1 @@
CONFIG_PINCTRL_MAX77620=m
CONFIG_PINCTRL_MAX77620=y

View File

@ -1 +1 @@
CONFIG_REGULATOR_MAX77620=m
CONFIG_REGULATOR_MAX77620=y

View File

@ -0,0 +1 @@
# CONFIG_SND_IMX_SOC is not set

View File

@ -1 +0,0 @@
CONFIG_SUN50I_A64_UNSTABLE_TIMER=y

View File

@ -0,0 +1 @@
# CONFIG_USB_EHCI_MXC is not set

View File

@ -0,0 +1 @@
# CONFIG_USB_FSL_USB2 is not set

View File

@ -0,0 +1 @@
# CONFIG_USB_MXS_PHY is not set

Some files were not shown because too many files have changed in this diff Show More