Backports Archive on lore.kernel.org
 help / Atom feed
* [PATCH] backport: check Ubuntu kernel for u64_stats_update_begin_irqsave()
@ 2018-10-01  7:26 Luca Coelho
  0 siblings, 0 replies; 1+ messages in thread
From: Luca Coelho @ 2018-10-01  7:26 UTC (permalink / raw)
  To: backports; +Cc: Luca Coelho

From: Luca Coelho <luciano.coelho@intel.com>

Ubuntu cherry-picked the patch that added
u64_stat_update_begin_irqsave() in their 4.15 kernel, so we get a
redefinition compilation error if we try to compile against that.

To solve this, check UTS_UBUNTU_RELEASE_ABI and don't define our
backported function if it's 33 or higher.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 backport/backport-include/linux/u64_stats_sync.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/backport/backport-include/linux/u64_stats_sync.h b/backport/backport-include/linux/u64_stats_sync.h
index 0d2212382db7..251373a74139 100644
--- a/backport/backport-include/linux/u64_stats_sync.h
+++ b/backport/backport-include/linux/u64_stats_sync.h
@@ -152,7 +152,8 @@ static inline bool u64_stats_fetch_retry_irq(const struct u64_stats_sync *syncp,
 #endif /* LINUX_VERSION_IS_LESS(3,13,0) */
 
 #if LINUX_VERSION_IS_LESS(4,16,0) && \
-    !LINUX_VERSION_IN_RANGE(4,14,44, 4,15,0)
+    !LINUX_VERSION_IN_RANGE(4,14,44, 4,15,0) && \
+    !(LINUX_VERSION_IS_GEQ(4,15,18) && UTS_UBUNTU_RELEASE_ABI >= 33)
 static inline unsigned long
 u64_stats_update_begin_irqsave(struct u64_stats_sync *syncp)
 {
-- 
2.19.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-01  7:26 [PATCH] backport: check Ubuntu kernel for u64_stats_update_begin_irqsave() Luca Coelho

Backports Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/backports/0 backports/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 backports backports/ https://lore.kernel.org/backports \
		backports@vger.kernel.org backports@archiver.kernel.org
	public-inbox-index backports


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.backports


AGPL code for this site: git clone https://public-inbox.org/ public-inbox