From: Greg Kroah-Hartman Date: Wed, 8 Aug 2012 23:02:03 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.5.1~2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42d00531c8c3add25be49c3abba680c171c6bedb;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: mm-fix-wrong-argument-of-migrate_huge_pages-in-soft_offline_huge_page.patch pcdp-use-early_ioremap-early_iounmap-to-access-pcdp-table.patch --- diff --git a/queue-3.4/mm-fix-wrong-argument-of-migrate_huge_pages-in-soft_offline_huge_page.patch b/queue-3.4/mm-fix-wrong-argument-of-migrate_huge_pages-in-soft_offline_huge_page.patch new file mode 100644 index 00000000000..19b26981229 --- /dev/null +++ b/queue-3.4/mm-fix-wrong-argument-of-migrate_huge_pages-in-soft_offline_huge_page.patch @@ -0,0 +1,55 @@ +From dc32f63453f56d07a1073a697dcd843dd3098c09 Mon Sep 17 00:00:00 2001 +From: Joonsoo Kim +Date: Mon, 30 Jul 2012 14:39:04 -0700 +Subject: mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page() + +From: Joonsoo Kim + +commit dc32f63453f56d07a1073a697dcd843dd3098c09 upstream. + +Commit a6bc32b89922 ("mm: compaction: introduce sync-light migration for +use by compaction") changed the declaration of migrate_pages() and +migrate_huge_pages(). + +But it missed changing the argument of migrate_huge_pages() in +soft_offline_huge_page(). In this case, we should call +migrate_huge_pages() with MIGRATE_SYNC. + +Additionally, there is a mismatch between type the of argument and the +function declaration for migrate_pages(). + +Signed-off-by: Joonsoo Kim +Cc: Christoph Lameter +Cc: Mel Gorman +Acked-by: David Rientjes +Cc: "Aneesh Kumar K.V" +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/memory-failure.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/mm/memory-failure.c ++++ b/mm/memory-failure.c +@@ -1431,8 +1431,8 @@ static int soft_offline_huge_page(struct + /* Keep page count to indicate a given hugepage is isolated. */ + + list_add(&hpage->lru, &pagelist); +- ret = migrate_huge_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, 0, +- true); ++ ret = migrate_huge_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, false, ++ MIGRATE_SYNC); + if (ret) { + struct page *page1, *page2; + list_for_each_entry_safe(page1, page2, &pagelist, lru) +@@ -1561,7 +1561,7 @@ int soft_offline_page(struct page *page, + page_is_file_cache(page)); + list_add(&page->lru, &pagelist); + ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, +- 0, MIGRATE_SYNC); ++ false, MIGRATE_SYNC); + if (ret) { + putback_lru_pages(&pagelist); + pr_info("soft offline: %#lx: migration failed %d, type %lx\n", diff --git a/queue-3.4/pcdp-use-early_ioremap-early_iounmap-to-access-pcdp-table.patch b/queue-3.4/pcdp-use-early_ioremap-early_iounmap-to-access-pcdp-table.patch new file mode 100644 index 00000000000..8d1f21e2145 --- /dev/null +++ b/queue-3.4/pcdp-use-early_ioremap-early_iounmap-to-access-pcdp-table.patch @@ -0,0 +1,70 @@ +From 6c4088ac3a4d82779903433bcd5f048c58fb1aca Mon Sep 17 00:00:00 2001 +From: Greg Pearson +Date: Mon, 30 Jul 2012 14:39:05 -0700 +Subject: pcdp: use early_ioremap/early_iounmap to access pcdp table + +From: Greg Pearson + +commit 6c4088ac3a4d82779903433bcd5f048c58fb1aca upstream. + +efi_setup_pcdp_console() is called during boot to parse the HCDP/PCDP +EFI system table and setup an early console for printk output. The +routine uses ioremap/iounmap to setup access to the HCDP/PCDP table +information. + +The call to ioremap is happening early in the boot process which leads +to a panic on x86_64 systems: + + panic+0x01ca + do_exit+0x043c + oops_end+0x00a7 + no_context+0x0119 + __bad_area_nosemaphore+0x0138 + bad_area_nosemaphore+0x000e + do_page_fault+0x0321 + page_fault+0x0020 + reserve_memtype+0x02a1 + __ioremap_caller+0x0123 + ioremap_nocache+0x0012 + efi_setup_pcdp_console+0x002b + setup_arch+0x03a9 + start_kernel+0x00d4 + x86_64_start_reservations+0x012c + x86_64_start_kernel+0x00fe + +This replaces the calls to ioremap/iounmap in efi_setup_pcdp_console() +with calls to early_ioremap/early_iounmap which can be called during +early boot. + +This patch was tested on an x86_64 prototype system which uses the +HCDP/PCDP table for early console setup. + +Signed-off-by: Greg Pearson +Acked-by: Khalid Aziz +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/firmware/pcdp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/firmware/pcdp.c ++++ b/drivers/firmware/pcdp.c +@@ -95,7 +95,7 @@ efi_setup_pcdp_console(char *cmdline) + if (efi.hcdp == EFI_INVALID_TABLE_ADDR) + return -ENODEV; + +- pcdp = ioremap(efi.hcdp, 4096); ++ pcdp = early_ioremap(efi.hcdp, 4096); + printk(KERN_INFO "PCDP: v%d at 0x%lx\n", pcdp->rev, efi.hcdp); + + if (strstr(cmdline, "console=hcdp")) { +@@ -131,6 +131,6 @@ efi_setup_pcdp_console(char *cmdline) + } + + out: +- iounmap(pcdp); ++ early_iounmap(pcdp, 4096); + return rc; + } diff --git a/queue-3.4/series b/queue-3.4/series index a4fc6380ec3..1a3fb8f5778 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -4,3 +4,5 @@ sunrpc-clnt-add-missing-braces.patch sunrpc-return-negative-value-in-case-rpcbind-client-creation-error.patch nilfs2-fix-deadlock-issue-between-chcp-and-thaw-ioctls.patch media-ene_ir-fix-driver-initialisation.patch +pcdp-use-early_ioremap-early_iounmap-to-access-pcdp-table.patch +mm-fix-wrong-argument-of-migrate_huge_pages-in-soft_offline_huge_page.patch