From: Greg Kroah-Hartman Date: Tue, 5 Feb 2013 17:37:19 +0000 (-0800) Subject: 3.7-stable patches X-Git-Tag: v3.0.63~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79d5a6b8b6fb6dfa2fff550b9865a62bc332c029;p=thirdparty%2Fkernel%2Fstable-queue.git 3.7-stable patches added patches: drivers-rtc-rtc-isl1208.c-call-rtc_update_irq-from-the-alarm-irq-handler.patch drivers-rtc-rtc-pl031.c-fix-the-missing-operation-on-enable.patch mm-hugetlb-set-pte-as-huge-in-hugetlb_change_protection-and-remove_migration_pte.patch nilfs2-fix-fix-very-long-mount-time-issue.patch --- diff --git a/queue-3.7/drivers-rtc-rtc-isl1208.c-call-rtc_update_irq-from-the-alarm-irq-handler.patch b/queue-3.7/drivers-rtc-rtc-isl1208.c-call-rtc_update_irq-from-the-alarm-irq-handler.patch new file mode 100644 index 00000000000..d63e322570f --- /dev/null +++ b/queue-3.7/drivers-rtc-rtc-isl1208.c-call-rtc_update_irq-from-the-alarm-irq-handler.patch @@ -0,0 +1,42 @@ +From 72fca4a4b32dc778b5b885c3498700e42b610d49 Mon Sep 17 00:00:00 2001 +From: Jan Luebbe +Date: Mon, 4 Feb 2013 14:28:53 -0800 +Subject: drivers/rtc/rtc-isl1208.c: call rtc_update_irq() from the alarm irq handler + +From: Jan Luebbe + +commit 72fca4a4b32dc778b5b885c3498700e42b610d49 upstream. + +Previously the alarm event was not propagated into the RTC subsystem. +By adding a call to rtc_update_irq, this fixes a timeout problem with +the hwclock utility. + +Signed-off-by: Jan Luebbe +Cc: Alessandro Zummo +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/rtc/rtc-isl1208.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/rtc/rtc-isl1208.c ++++ b/drivers/rtc/rtc-isl1208.c +@@ -506,6 +506,7 @@ isl1208_rtc_interrupt(int irq, void *dat + { + unsigned long timeout = jiffies + msecs_to_jiffies(1000); + struct i2c_client *client = data; ++ struct rtc_device *rtc = i2c_get_clientdata(client); + int handled = 0, sr, err; + + /* +@@ -528,6 +529,8 @@ isl1208_rtc_interrupt(int irq, void *dat + if (sr & ISL1208_REG_SR_ALM) { + dev_dbg(&client->dev, "alarm!\n"); + ++ rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF); ++ + /* Clear the alarm */ + sr &= ~ISL1208_REG_SR_ALM; + sr = i2c_smbus_write_byte_data(client, ISL1208_REG_SR, sr); diff --git a/queue-3.7/drivers-rtc-rtc-pl031.c-fix-the-missing-operation-on-enable.patch b/queue-3.7/drivers-rtc-rtc-pl031.c-fix-the-missing-operation-on-enable.patch new file mode 100644 index 00000000000..33ce809a5c2 --- /dev/null +++ b/queue-3.7/drivers-rtc-rtc-pl031.c-fix-the-missing-operation-on-enable.patch @@ -0,0 +1,62 @@ +From e7e034e18a0ab6bafb2425c3242cac311164f4d6 Mon Sep 17 00:00:00 2001 +From: Haojian Zhuang +Date: Mon, 4 Feb 2013 14:28:54 -0800 +Subject: drivers/rtc/rtc-pl031.c: fix the missing operation on enable + +From: Haojian Zhuang + +commit e7e034e18a0ab6bafb2425c3242cac311164f4d6 upstream. + +The RTC control register should be enabled in the process of +initializing. + +Without this patch, I failed to enable RTC in Hisilicon Hi3620 SoC. The +register mapping section in RTC is always read as zero. So I doubt that +ST guys may already enable this register in bootloader. So they won't +meet this issue. + +Signed-off-by: Haojian Zhuang +Cc: Srinidhi Kasagar +Cc: Linus Walleij +Cc: Alessandro Zummo +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/rtc/rtc-pl031.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/drivers/rtc/rtc-pl031.c ++++ b/drivers/rtc/rtc-pl031.c +@@ -44,6 +44,7 @@ + #define RTC_YMR 0x34 /* Year match register */ + #define RTC_YLR 0x38 /* Year data load register */ + ++#define RTC_CR_EN (1 << 0) /* counter enable bit */ + #define RTC_CR_CWEN (1 << 26) /* Clockwatch enable bit */ + + #define RTC_TCR_EN (1 << 1) /* Periodic timer enable bit */ +@@ -320,7 +321,7 @@ static int pl031_probe(struct amba_devic + struct pl031_local *ldata; + struct pl031_vendor_data *vendor = id->data; + struct rtc_class_ops *ops = &vendor->ops; +- unsigned long time; ++ unsigned long time, data; + + ret = amba_request_regions(adev, NULL); + if (ret) +@@ -345,10 +346,11 @@ static int pl031_probe(struct amba_devic + dev_dbg(&adev->dev, "designer ID = 0x%02x\n", amba_manf(adev)); + dev_dbg(&adev->dev, "revision = 0x%01x\n", amba_rev(adev)); + ++ data = readl(ldata->base + RTC_CR); + /* Enable the clockwatch on ST Variants */ + if (vendor->clockwatch) +- writel(readl(ldata->base + RTC_CR) | RTC_CR_CWEN, +- ldata->base + RTC_CR); ++ data |= RTC_CR_CWEN; ++ writel(data | RTC_CR_EN, ldata->base + RTC_CR); + + /* + * On ST PL031 variants, the RTC reset value does not provide correct diff --git a/queue-3.7/mm-hugetlb-set-pte-as-huge-in-hugetlb_change_protection-and-remove_migration_pte.patch b/queue-3.7/mm-hugetlb-set-pte-as-huge-in-hugetlb_change_protection-and-remove_migration_pte.patch new file mode 100644 index 00000000000..c5b3f164c5d --- /dev/null +++ b/queue-3.7/mm-hugetlb-set-pte-as-huge-in-hugetlb_change_protection-and-remove_migration_pte.patch @@ -0,0 +1,50 @@ +From be7517d6ab9722f0abad6ba5ffd39cfced95549c Mon Sep 17 00:00:00 2001 +From: Tony Lu +Date: Mon, 4 Feb 2013 14:28:46 -0800 +Subject: mm/hugetlb: set PTE as huge in hugetlb_change_protection and remove_migration_pte + +From: Tony Lu + +commit be7517d6ab9722f0abad6ba5ffd39cfced95549c upstream. + +When setting a huge PTE, besides calling pte_mkhuge(), we also need to +call arch_make_huge_pte(), which we indeed do in make_huge_pte(), but we +forget to do in hugetlb_change_protection() and remove_migration_pte(). + +Signed-off-by: Zhigang Lu +Signed-off-by: Chris Metcalf +Reviewed-by: Michal Hocko +Acked-by: Hillf Danton +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/hugetlb.c | 1 + + mm/migrate.c | 4 +++- + 2 files changed, 4 insertions(+), 1 deletion(-) + +--- a/mm/hugetlb.c ++++ b/mm/hugetlb.c +@@ -3028,6 +3028,7 @@ void hugetlb_change_protection(struct vm + if (!huge_pte_none(huge_ptep_get(ptep))) { + pte = huge_ptep_get_and_clear(mm, address, ptep); + pte = pte_mkhuge(pte_modify(pte, newprot)); ++ pte = arch_make_huge_pte(pte, vma, NULL, 0); + set_huge_pte_at(mm, address, ptep, pte); + } + } +--- a/mm/migrate.c ++++ b/mm/migrate.c +@@ -143,8 +143,10 @@ static int remove_migration_pte(struct p + if (is_write_migration_entry(entry)) + pte = pte_mkwrite(pte); + #ifdef CONFIG_HUGETLB_PAGE +- if (PageHuge(new)) ++ if (PageHuge(new)) { + pte = pte_mkhuge(pte); ++ pte = arch_make_huge_pte(pte, vma, new, 0); ++ } + #endif + flush_cache_page(vma, addr, pte_pfn(pte)); + set_pte_at(mm, addr, ptep, pte); diff --git a/queue-3.7/nilfs2-fix-fix-very-long-mount-time-issue.patch b/queue-3.7/nilfs2-fix-fix-very-long-mount-time-issue.patch new file mode 100644 index 00000000000..d394890d687 --- /dev/null +++ b/queue-3.7/nilfs2-fix-fix-very-long-mount-time-issue.patch @@ -0,0 +1,80 @@ +From a9bae189542e71f91e61a4428adf6e5a7dfe8063 Mon Sep 17 00:00:00 2001 +From: Vyacheslav Dubeyko +Date: Mon, 4 Feb 2013 14:28:41 -0800 +Subject: nilfs2: fix fix very long mount time issue + +From: Vyacheslav Dubeyko + +commit a9bae189542e71f91e61a4428adf6e5a7dfe8063 upstream. + +There exists a situation when GC can work in background alone without +any other filesystem activity during significant time. + +The nilfs_clean_segments() method calls nilfs_segctor_construct() that +updates superblocks in the case of NILFS_SC_SUPER_ROOT and +THE_NILFS_DISCONTINUED flags are set. But when GC is working alone the +nilfs_clean_segments() is called with unset THE_NILFS_DISCONTINUED flag. +As a result, the update of superblocks doesn't occurred all this time +and in the case of SPOR superblocks keep very old values of last super +root placement. + +SYMPTOMS: + +Trying to mount a NILFS2 volume after SPOR in such environment ends with +very long mounting time (it can achieve about several hours in some +cases). + +REPRODUCING PATH: + +1. It needs to use external USB HDD, disable automount and doesn't + make any additional filesystem activity on the NILFS2 volume. + +2. Generate temporary file with size about 100 - 500 GB (for example, + dd if=/dev/zero of= bs=1073741824 count=200). The size of + file defines duration of GC working. + +3. Then it needs to delete file. + +4. Start GC manually by means of command "nilfs-clean -p 0". When you + start GC by means of such way then, at the end, superblocks is updated + by once. So, for simulation of SPOR, it needs to wait sometime (15 - + 40 minutes) and simply switch off USB HDD manually. + +5. Switch on USB HDD again and try to mount NILFS2 volume. As a + result, NILFS2 volume will mount during very long time. + +REPRODUCIBILITY: 100% + +FIX: + +This patch adds checking that superblocks need to update and set +THE_NILFS_DISCONTINUED flag before nilfs_clean_segments() call. + +Reported-by: Sergey Alexandrov +Signed-off-by: Vyacheslav Dubeyko +Tested-by: Vyacheslav Dubeyko +Acked-by: Ryusuke Konishi +Tested-by: Ryusuke Konishi +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nilfs2/ioctl.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/fs/nilfs2/ioctl.c ++++ b/fs/nilfs2/ioctl.c +@@ -664,8 +664,11 @@ static int nilfs_ioctl_clean_segments(st + if (ret < 0) + printk(KERN_ERR "NILFS: GC failed during preparation: " + "cannot read source blocks: err=%d\n", ret); +- else ++ else { ++ if (nilfs_sb_need_update(nilfs)) ++ set_nilfs_discontinued(nilfs); + ret = nilfs_clean_segments(inode->i_sb, argv, kbufs); ++ } + + nilfs_remove_all_gcinodes(nilfs); + clear_nilfs_gc_running(nilfs); diff --git a/queue-3.7/series b/queue-3.7/series index 249b4699ea2..d8dacaa71d3 100644 --- a/queue-3.7/series +++ b/queue-3.7/series @@ -11,3 +11,7 @@ drm-radeon-calling-object_unrefer-when-creating-fb-failure.patch x86-64-replace-left-over-sti-cli-in-ia32-audit-exit-code.patch sched-rt-use-root_domain-of-rt_rq-not-current-processor.patch mtd-davinci_nand-fix-modular-build-with-config_of-y.patch +nilfs2-fix-fix-very-long-mount-time-issue.patch +mm-hugetlb-set-pte-as-huge-in-hugetlb_change_protection-and-remove_migration_pte.patch +drivers-rtc-rtc-isl1208.c-call-rtc_update_irq-from-the-alarm-irq-handler.patch +drivers-rtc-rtc-pl031.c-fix-the-missing-operation-on-enable.patch