[kernel] r22753 - in dists/sid/linux/debian: . config patches patches/debian

Ben Hutchings benh at moszumanska.debian.org
Tue Jun 16 19:18:40 UTC 2015


Author: benh
Date: Tue Jun 16 19:18:40 2015
New Revision: 22753

Log:
Fix/ignore ABI changes in 4.0.5 as appropriate

Added:
   dists/sid/linux/debian/patches/debian/ktime-fix-abi-change-in-4.0.5.patch
   dists/sid/linux/debian/patches/debian/revert-libata-ignore-spurious-phy-event-on-lpm-polic.patch
Modified:
   dists/sid/linux/debian/changelog
   dists/sid/linux/debian/config/defines
   dists/sid/linux/debian/patches/series

Modified: dists/sid/linux/debian/changelog
==============================================================================
--- dists/sid/linux/debian/changelog	Mon Jun 15 03:28:47 2015	(r22752)
+++ dists/sid/linux/debian/changelog	Tue Jun 16 19:18:40 2015	(r22753)
@@ -77,6 +77,8 @@
 
   [ Ben Hutchings ]
   * udeb: Remove i2o modules (fixes FTBFS on amd64) (Closes: #787004)
+  * Revert "libata: Ignore spurious PHY event on LPM policy change" to avoid
+    ABI change
 
   [ Ian Campbell ]
   * [armhf] Enable PCIe support for IMX6 boards. Patch from Vagrant

Modified: dists/sid/linux/debian/config/defines
==============================================================================
--- dists/sid/linux/debian/config/defines	Mon Jun 15 03:28:47 2015	(r22752)
+++ dists/sid/linux/debian/config/defines	Tue Jun 16 19:18:40 2015	(r22753)
@@ -1,5 +1,8 @@
 [abi]
 abiname: 2
+ignore-changes:
+# Should not be used from OOT
+ module:arch/x86/kvm/kvm
 
 [base]
 arches:

Added: dists/sid/linux/debian/patches/debian/ktime-fix-abi-change-in-4.0.5.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux/debian/patches/debian/ktime-fix-abi-change-in-4.0.5.patch	Tue Jun 16 19:18:40 2015	(r22753)
@@ -0,0 +1,52 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Tue, 16 Jun 2015 16:36:28 +0100
+Subject: ktime: Fix ABI change in 4.0.5
+Forwarded: not-needed
+
+Commit f7bcb70ebae0 ("ktime: Fix ktime_divns to do signed division")
+changed the return type of __ktime_divns() from u64 to s64.  As this
+is not called directly but only by an inline function which has had
+the same type change, it is safe to revert the change to
+__ktime_divns() and add casts.  (Actually, we could rely on
+implicit conversions but it seems better to be explicit.)
+
+--- a/include/linux/ktime.h
++++ b/include/linux/ktime.h
+@@ -166,7 +166,7 @@ static inline bool ktime_before(const kt
+ }
+ 
+ #if BITS_PER_LONG < 64
+-extern s64 __ktime_divns(const ktime_t kt, s64 div);
++extern u64 __ktime_divns(const ktime_t kt, s64 div);
+ static inline s64 ktime_divns(const ktime_t kt, s64 div)
+ {
+ 	/*
+@@ -181,7 +181,7 @@ static inline s64 ktime_divns(const ktim
+ 		do_div(tmp, div);
+ 		return ns < 0 ? -tmp : tmp;
+ 	} else {
+-		return __ktime_divns(kt, div);
++		return (s64)__ktime_divns(kt, div);
+ 	}
+ }
+ #else /* BITS_PER_LONG < 64 */
+--- a/kernel/time/hrtimer.c
++++ b/kernel/time/hrtimer.c
+@@ -266,7 +266,7 @@ lock_hrtimer_base(const struct hrtimer *
+ /*
+  * Divide a ktime value by a nanosecond value
+  */
+-s64 __ktime_divns(const ktime_t kt, s64 div)
++u64 __ktime_divns(const ktime_t kt, s64 div)
+ {
+ 	int sft = 0;
+ 	s64 dclc;
+@@ -282,7 +282,7 @@ s64 __ktime_divns(const ktime_t kt, s64
+ 	}
+ 	tmp >>= sft;
+ 	do_div(tmp, (unsigned long) div);
+-	return dclc < 0 ? -tmp : tmp;
++	return (u64)(dclc < 0 ? -tmp : tmp);
+ }
+ EXPORT_SYMBOL_GPL(__ktime_divns);
+ #endif /* BITS_PER_LONG >= 64 */

Added: dists/sid/linux/debian/patches/debian/revert-libata-ignore-spurious-phy-event-on-lpm-polic.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux/debian/patches/debian/revert-libata-ignore-spurious-phy-event-on-lpm-polic.patch	Tue Jun 16 19:18:40 2015	(r22753)
@@ -0,0 +1,89 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Mon, 15 Jun 2015 04:32:59 +0100
+Subject: [PATCH] Revert "libata: Ignore spurious PHY event on LPM policy
+ change"
+Forwarded: not-needed
+
+This reverts commit 09c5b4803a80a5451d950d6a539d2eb311dc0fb1, as
+it results in an unavoidable ABI change.
+---
+ drivers/ata/libata-core.c | 15 +--------------
+ drivers/ata/libata-eh.c   |  3 ---
+ include/linux/libata.h    |  9 ---------
+ 3 files changed, 1 insertion(+), 26 deletions(-)
+
+diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
+index 87b4b7f..3b6f197 100644
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -6742,21 +6742,8 @@ u32 ata_wait_register(struct ata_port *ap, void __iomem *reg, u32 mask, u32 val,
+  */
+ bool sata_lpm_ignore_phy_events(struct ata_link *link)
+ {
+-	unsigned long lpm_timeout = link->last_lpm_change +
+-				    msecs_to_jiffies(ATA_TMOUT_SPURIOUS_PHY);
+-
+ 	/* if LPM is enabled, PHYRDY doesn't mean anything */
+-	if (link->lpm_policy > ATA_LPM_MAX_POWER)
+-		return true;
+-
+-	/* ignore the first PHY event after the LPM policy changed
+-	 * as it is might be spurious
+-	 */
+-	if ((link->flags & ATA_LFLAG_CHANGED) &&
+-	    time_before(jiffies, lpm_timeout))
+-		return true;
+-
+-	return false;
++	return !!(link->lpm_policy > ATA_LPM_MAX_POWER);
+ }
+ EXPORT_SYMBOL_GPL(sata_lpm_ignore_phy_events);
+ 
+diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
+index 89c3d83..d2029a4 100644
+--- a/drivers/ata/libata-eh.c
++++ b/drivers/ata/libata-eh.c
+@@ -3489,9 +3489,6 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
+ 		}
+ 	}
+ 
+-	link->last_lpm_change = jiffies;
+-	link->flags |= ATA_LFLAG_CHANGED;
+-
+ 	return 0;
+ 
+ fail:
+diff --git a/include/linux/libata.h b/include/linux/libata.h
+index f8994b4..928a370 100644
+--- a/include/linux/libata.h
++++ b/include/linux/libata.h
+@@ -205,7 +205,6 @@ enum {
+ 	ATA_LFLAG_SW_ACTIVITY	= (1 << 7), /* keep activity stats */
+ 	ATA_LFLAG_NO_LPM	= (1 << 8), /* disable LPM on this link */
+ 	ATA_LFLAG_RST_ONCE	= (1 << 9), /* limit recovery to one reset */
+-	ATA_LFLAG_CHANGED	= (1 << 10), /* LPM state changed on this link */
+ 
+ 	/* struct ata_port flags */
+ 	ATA_FLAG_SLAVE_POSS	= (1 << 0), /* host supports slave dev */
+@@ -311,12 +310,6 @@ enum {
+ 	 */
+ 	ATA_TMOUT_PMP_SRST_WAIT	= 5000,
+ 
+-	/* When the LPM policy is set to ATA_LPM_MAX_POWER, there might
+-	 * be a spurious PHY event, so ignore the first PHY event that
+-	 * occurs within 10s after the policy change.
+-	 */
+-	ATA_TMOUT_SPURIOUS_PHY	= 10000,
+-
+ 	/* ATA bus states */
+ 	BUS_UNKNOWN		= 0,
+ 	BUS_DMA			= 1,
+@@ -796,8 +789,6 @@ struct ata_link {
+ 	struct ata_eh_context	eh_context;
+ 
+ 	struct ata_device	device[ATA_MAX_DEVICES];
+-
+-	unsigned long		last_lpm_change; /* when last LPM change happened */
+ };
+ #define ATA_LINK_CLEAR_BEGIN		offsetof(struct ata_link, active_tag)
+ #define ATA_LINK_CLEAR_END		offsetof(struct ata_link, device[0])

Modified: dists/sid/linux/debian/patches/series
==============================================================================
--- dists/sid/linux/debian/patches/series	Mon Jun 15 03:28:47 2015	(r22752)
+++ dists/sid/linux/debian/patches/series	Tue Jun 16 19:18:40 2015	(r22753)
@@ -76,3 +76,7 @@
 features/all/e1000e/0002-e1000e-fix-obscure-comments.patch
 features/all/e1000e/0003-e1000e-remove-calls-to-ioremap-unmap-for-nvm-addr.patch
 features/all/e1000e/0004-e1000e-nvm-write-protect-access-removed-from-spt-hw.patch
+
+# Fix ABI changes
+debian/revert-libata-ignore-spurious-phy-event-on-lpm-polic.patch
+debian/ktime-fix-abi-change-in-4.0.5.patch



More information about the Kernel-svn-changes mailing list