]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: set the ISCNTRLD bit for SP service handles
authorMenno Lageman <menno.lageman@oracle.com>
Tue, 2 May 2017 09:53:53 +0000 (05:53 -0400)
committerShannon Nelson <shannon.nelson@oracle.com>
Wed, 31 May 2017 23:43:52 +0000 (16:43 -0700)
Service handles generated by the ds driver can collide with service handles
generated by the SP, causing failures with Domain Services on the SP such
as 'ldom_req_sp_token: set-token failed: no reply' errors.

Ensure that service handles generated by the ds driver do not collide
with service handles generated by the SP by setting the ISCNTRLD bit in
the lower half of the service handle for SP Domain Services. This is
similar to what Solaris does.

Orabug: 25983868

Signed-off-by: Menno Lageman <menno.lageman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Aaron Young <aaron.young@oracle.com>
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
arch/sparc/kernel/ds.c

index 0493d825d938e4d2924b6c41ffe970921d366db9..f9ad22767615a598873c106610c55b2224c0846e 100644 (file)
@@ -2389,6 +2389,13 @@ static u64 ds_get_new_service_handle(struct ds_dev *ds, bool is_client)
        if (is_client)
                handle |= DS_HDL_ISCLIENT_BIT;
 
+       /*
+        * Set the ISCNTRLD bit for SP services to ensure the handle doesn't
+        * collide with a GM-generated handle.
+        */
+       if (ds->handle == DS_SP_DMN_HANDLE)
+               handle |= DS_HDL_ISCNTRLD_BIT;
+
        return handle;
 
 }