Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Sep 2019 00:39:25 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r512084 - in head/emulators/rpcs3: . files
Message-ID:  <201909150039.x8F0dPoa036010@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sun Sep 15 00:39:25 2019
New Revision: 512084
URL: https://svnweb.freebsd.org/changeset/ports/512084

Log:
  emulators/rpcs3: update to 0.0.6.8710
  
  Changes:	https://github.com/RPCS3/rpcs3/compare/27af75fe7...fb8e70d7f

Modified:
  head/emulators/rpcs3/Makefile   (contents, props changed)
  head/emulators/rpcs3/distinfo   (contents, props changed)
  head/emulators/rpcs3/files/extra-patch-revert-4504ac2d1248   (contents, props changed)
  head/emulators/rpcs3/files/extra-patch-revert-5bd17a44c972   (contents, props changed)

Modified: head/emulators/rpcs3/Makefile
==============================================================================
--- head/emulators/rpcs3/Makefile	Sun Sep 15 00:39:24 2019	(r512083)
+++ head/emulators/rpcs3/Makefile	Sun Sep 15 00:39:25 2019	(r512084)
@@ -2,8 +2,8 @@
 
 PORTNAME=	rpcs3
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.0.7-8690 # git rev-list --count HEAD
-DISTVERSIONSUFFIX=	-g27af75fe7
+DISTVERSION=	0.0.7-8710 # git rev-list --count HEAD
+DISTVERSIONSUFFIX=	-gfb8e70d7f
 CATEGORIES=	emulators
 
 MAINTAINER=	jbeich@FreeBSD.org

Modified: head/emulators/rpcs3/distinfo
==============================================================================
--- head/emulators/rpcs3/distinfo	Sun Sep 15 00:39:24 2019	(r512083)
+++ head/emulators/rpcs3/distinfo	Sun Sep 15 00:39:25 2019	(r512084)
@@ -1,6 +1,6 @@
-TIMESTAMP = 1568233855
-SHA256 (RPCS3-rpcs3-v0.0.7-8690-g27af75fe7_GH0.tar.gz) = b61ee696f3f555efaee90fef8fe49a1280d146a8029d53b76f848383c39dac50
-SIZE (RPCS3-rpcs3-v0.0.7-8690-g27af75fe7_GH0.tar.gz) = 5573156
+TIMESTAMP = 1568408568
+SHA256 (RPCS3-rpcs3-v0.0.7-8710-gfb8e70d7f_GH0.tar.gz) = 2dbb436a07c7efabae81de76037106b2ba5151afe4e7bc2f2260a15e813a41b2
+SIZE (RPCS3-rpcs3-v0.0.7-8710-gfb8e70d7f_GH0.tar.gz) = 5580036
 SHA256 (RPCS3-hidapi-hidapi-0.8.0-rc1-27-g9220f5e_GH0.tar.gz) = 3120e0b701943f452760e45f9fc1ac50bab356ad4c807b4cac4598041c5ca1a5
 SIZE (RPCS3-hidapi-hidapi-0.8.0-rc1-27-g9220f5e_GH0.tar.gz) = 105400
 SHA256 (RPCS3-llvm-b860b5e8f4ee_GH0.tar.gz) = c151972a0c8ceac568c24b61e63d2ecbdac0f125185e23fc2238e0a14048256e

Modified: head/emulators/rpcs3/files/extra-patch-revert-4504ac2d1248
==============================================================================
--- head/emulators/rpcs3/files/extra-patch-revert-4504ac2d1248	Sun Sep 15 00:39:24 2019	(r512083)
+++ head/emulators/rpcs3/files/extra-patch-revert-4504ac2d1248	Sun Sep 15 00:39:25 2019	(r512084)
@@ -8,27 +8,27 @@ rpcs3/util/atomic.cpp:307:5: error: use of undeclared 
                                 fallback_notify_all(data);
                                 ^
 
---- rpcs3/util/atomic.cpp.orig	2019-09-10 16:25:39 UTC
+--- rpcs3/util/atomic.cpp.orig	2019-09-13 21:02:48 UTC
 +++ rpcs3/util/atomic.cpp
-@@ -15,14 +15,11 @@
+@@ -15,14 +15,11 @@ static atomic_t<u64> s_hashtable[s_hashtable_size];
  // Pointer mask without bits used as hash, assuming signed 48-bit pointers
- static constexpr u64 s_pointer_mask = 0xffff'ffff'ffff & ~(s_hashtable_size - 1);
+ static constexpr u64 s_pointer_mask = 0xffff'ffff'ffff & (~(s_hashtable_size - 1) << 2);
  
 -// Max number of waiters is 32767
 -static constexpr u64 s_waiter_mask = 0x7fff'0000'0000'0000;
--
--//
--static constexpr u64 s_collision_bit = 0x8000'0000'0000'0000;
 +// Max number of waiters is 65535
 +static constexpr u64 s_waiter_mask = 0xffff'0000'0000'0000;
  
+-//
+-static constexpr u64 s_collision_bit = 0x8000'0000'0000'0000;
+-
  // Implementation detail (remaining bits out of 32 available for futex)
 -static constexpr u64 s_signal_mask = 0xffffffff & ~(s_waiter_mask | s_pointer_mask | s_collision_bit);
 +static constexpr u64 s_signal_mask = 0xffffffff & ~(s_waiter_mask | s_pointer_mask);
  
  // Callback for wait() function, returns false if wait should return
  static thread_local bool(*s_tls_wait_cb)(const void* data) = [](const void*)
-@@ -182,8 +179,6 @@
+@@ -182,8 +179,6 @@ void atomic_storage_futex::wait(const void* data, std:
  
  	u32 new_value = 0;
  
@@ -37,7 +37,7 @@ rpcs3/util/atomic.cpp:307:5: error: use of undeclared 
  	const auto [_, ok] = entry.fetch_op([&](u64& value)
  	{
  		if ((value & s_waiter_mask) == s_waiter_mask || (value & s_signal_mask) == s_signal_mask)
-@@ -196,17 +191,11 @@
+@@ -196,17 +191,11 @@ void atomic_storage_futex::wait(const void* data, std:
  		{
  			// Store pointer bits
  			value |= (iptr & s_pointer_mask);
@@ -57,20 +57,21 @@ rpcs3/util/atomic.cpp:307:5: error: use of undeclared 
  		}
  
  		// Add waiter
-@@ -220,11 +209,7 @@
+@@ -220,12 +209,8 @@ void atomic_storage_futex::wait(const void* data, std:
  		return;
  	}
  
 -	if (fallback)
--	{
--		fallback_wait(data, size, old_value, timeout);
--	}
--	else if (ptr_cmp(data, size, old_value) && s_tls_wait_cb(data))
-+	if (ptr_cmp(data, size, old_value) && s_tls_wait_cb(data))
++	if (ptr_cmp(data, size, old_value, mask) && s_tls_wait_cb(data))
  	{
+-		fallback_wait(data, size, old_value, timeout, mask);
+-	}
+-	else if (ptr_cmp(data, size, old_value, mask) && s_tls_wait_cb(data))
+-	{
  #ifdef _WIN32
  		LARGE_INTEGER qw;
-@@ -260,13 +245,6 @@
+ 		qw.QuadPart = -static_cast<s64>(timeout / 100);
+@@ -260,13 +245,6 @@ void atomic_storage_futex::wait(const void* data, std:
  			{
  				value -= s_waiter_mask & -s_waiter_mask;
  
@@ -84,7 +85,7 @@ rpcs3/util/atomic.cpp:307:5: error: use of undeclared 
  				if ((value & s_waiter_mask) == 0)
  				{
  					// Reset on last waiter
-@@ -279,7 +257,7 @@
+@@ -279,7 +257,7 @@ void atomic_storage_futex::wait(const void* data, std:
  			return false;
  		});
  
@@ -93,9 +94,9 @@ rpcs3/util/atomic.cpp:307:5: error: use of undeclared 
  		{
  			break;
  		}
-@@ -306,20 +284,15 @@
+@@ -306,20 +284,15 @@ void atomic_storage_futex::notify_one(const void* data
  
- 	atomic_t<u64>& entry = s_hashtable[iptr % s_hashtable_size];
+ 	atomic_t<u64>& entry = s_hashtable[(iptr >> 2) % s_hashtable_size];
  
 +	bool fallback = false;
 +
@@ -117,7 +118,7 @@ rpcs3/util/atomic.cpp:307:5: error: use of undeclared 
  
  			if ((value & s_waiter_mask) == 0)
  			{
-@@ -337,22 +310,30 @@
+@@ -337,22 +310,30 @@ void atomic_storage_futex::notify_one(const void* data
  
  			if ((value & s_signal_mask) == s_signal_mask)
  			{
@@ -153,7 +154,7 @@ rpcs3/util/atomic.cpp:307:5: error: use of undeclared 
  	if (ok)
  	{
  #ifdef _WIN32
-@@ -375,32 +356,11 @@
+@@ -375,32 +356,11 @@ void atomic_storage_futex::notify_all(const void* data
  	{
  		if (value & s_waiter_mask)
  		{
@@ -188,7 +189,7 @@ rpcs3/util/atomic.cpp:307:5: error: use of undeclared 
  		}
  
  		return false;
-@@ -411,7 +371,7 @@
+@@ -411,7 +371,7 @@ void atomic_storage_futex::notify_all(const void* data
  		return;
  	}
  
@@ -197,7 +198,7 @@ rpcs3/util/atomic.cpp:307:5: error: use of undeclared 
  	{
  		NtReleaseKeyedEvent(nullptr, &entry, false, nullptr);
  	}
-@@ -426,17 +386,11 @@
+@@ -426,16 +386,10 @@ void atomic_storage_futex::notify_all(const void* data
  				return false;
  			}
  
@@ -206,13 +207,12 @@ rpcs3/util/atomic.cpp:307:5: error: use of undeclared 
  			{
  				value += s_signal_mask & -s_signal_mask;
  				return true;
- 			}
+-			}
 -
 -			if (value & s_collision_bit)
 -			{
 -				fallback_notify_all(data);
 -				return false;
--			}
+ 			}
  		}
  
- 		return false;

Modified: head/emulators/rpcs3/files/extra-patch-revert-5bd17a44c972
==============================================================================
--- head/emulators/rpcs3/files/extra-patch-revert-5bd17a44c972	Sun Sep 15 00:39:24 2019	(r512083)
+++ head/emulators/rpcs3/files/extra-patch-revert-5bd17a44c972	Sun Sep 15 00:39:25 2019	(r512084)
@@ -25,7 +25,7 @@ rpcs3/util/atomic.cpp:94:7: error: member reference ba
                 ptls->mapped().cond.notify_one();
                 ~~~~^ ~~~~~~
 
---- rpcs3/util/atomic.cpp.orig	2019-09-10 16:25:39 UTC
+--- rpcs3/util/atomic.cpp.orig	2019-09-13 21:02:48 UTC
 +++ rpcs3/util/atomic.cpp
 @@ -2,10 +2,6 @@
  
@@ -35,8 +35,8 @@ rpcs3/util/atomic.cpp:94:7: error: member reference ba
 -#include <mutex>
 -#include <condition_variable>
 -
- // Should be at least 65536, currently 2097152.
- static constexpr std::uintptr_t s_hashtable_size = 1u << 21;
+ // Total number of entries, should be a power of 2.
+ static constexpr std::uintptr_t s_hashtable_size = 1u << 22;
  
 @@ -40,134 +36,8 @@ static inline bool ptr_cmp(const void* data, std::size
  	return false;
@@ -77,7 +77,7 @@ rpcs3/util/atomic.cpp:94:7: error: member reference ba
 -		return s_waiter_maps[std::hash<const void*>()(ptr) % std::size(s_waiter_maps)];
 -	}
 -
--	void fallback_wait(const void* data, std::size_t size, u64 old_value, u64 timeout)
+-	void fallback_wait(const void* data, std::size_t size, u64 old_value, u64 timeout, u64 mask)
 -	{
 -		auto& wmap = get_fallback_map(data);
 -
@@ -89,7 +89,7 @@ rpcs3/util/atomic.cpp:94:7: error: member reference ba
 -		// Update node key
 -		s_tls_waiter.key() = data;
 -
--		if (std::unique_lock lock(wmap.mutex); ptr_cmp(data, size, old_value) && s_tls_wait_cb(data))
+-		if (std::unique_lock lock(wmap.mutex); ptr_cmp(data, size, old_value, mask) && s_tls_wait_cb(data))
 -		{
 -			// Add node to the waiter list
 -			const auto iter = wmap.list.insert(std::move(s_tls_waiter));
@@ -151,9 +151,9 @@ rpcs3/util/atomic.cpp:94:7: error: member reference ba
 -
 -#if !defined(_WIN32) && !defined(__linux__)
 -
- void atomic_storage_futex::wait(const void* data, std::size_t size, u64 old_value, u64 timeout)
+ void atomic_storage_futex::wait(const void* data, std::size_t size, u64 old_value, u64 timeout, u64 mask)
  {
--	fallback_wait(data, size, old_value, timeout);
+-	fallback_wait(data, size, old_value, timeout, mask);
 -}
 -
 -void atomic_storage_futex::notify_one(const void* data)
@@ -168,7 +168,7 @@ rpcs3/util/atomic.cpp:94:7: error: member reference ba
 -
 -#else
 -
--void atomic_storage_futex::wait(const void* data, std::size_t size, u64 old_value, u64 timeout)
+-void atomic_storage_futex::wait(const void* data, std::size_t size, u64 old_value, u64 timeout, u64 mask)
 -{
  	if (!timeout)
  	{



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909150039.x8F0dPoa036010>