qcacld-3.0: Reject up-tree ops during transition

Currently, the Driver Synchronization Core (DSC) blocks transitions
up-tree and down-tree from a node currently undergoing a transition, but
only rejects operations down-tree from the current node. Instead, reject
new operations both up-tree and down-tree from the current node under
transition. This provides more forgiving safety guarantees to operation
implementations at the cost of a reduced amount of parallelism that can
be achieved.

Change-Id: I09e1c48f7030a2252380d172c1c00ee22eac39c5
CRs-Fixed: 2421786
This commit is contained in:
Dustin Brown
2019-03-22 13:18:27 -07:00
committed by nshrivas
parent 2a1755db02
commit 06878b3a80
5 changed files with 39 additions and 37 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -123,10 +123,7 @@ static bool __dsc_driver_trans_active_down_tree(struct dsc_driver *driver)
return false;
}
static bool __dsc_driver_can_op(struct dsc_driver *driver)
{
return !__dsc_trans_active_or_queued(&driver->trans);
}
#define __dsc_driver_can_op(driver) __dsc_driver_can_trans(driver)
static bool __dsc_driver_can_trans(struct dsc_driver *driver)
{

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -124,11 +124,7 @@ static bool __dsc_psoc_trans_active_down_tree(struct dsc_psoc *psoc)
return false;
}
static bool __dsc_psoc_can_op(struct dsc_psoc *psoc)
{
return !__dsc_trans_active_or_queued(&psoc->driver->trans) &&
!__dsc_trans_active_or_queued(&psoc->trans);
}
#define __dsc_psoc_can_op(psoc) __dsc_psoc_can_trans(psoc)
static bool __dsc_psoc_can_trans(struct dsc_psoc *psoc)
{

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -106,18 +106,15 @@ void dsc_vdev_destroy(struct dsc_vdev **out_vdev)
dsc_exit();
}
static bool __dsc_vdev_can_op(struct dsc_vdev *vdev)
#define __dsc_vdev_can_op(vdev) __dsc_vdev_can_trans(vdev)
static bool __dsc_vdev_can_trans(struct dsc_vdev *vdev)
{
return !__dsc_trans_active_or_queued(&vdev->psoc->driver->trans) &&
!__dsc_trans_active_or_queued(&vdev->psoc->trans) &&
!__dsc_trans_active_or_queued(&vdev->trans);
}
static bool __dsc_vdev_can_trans(struct dsc_vdev *vdev)
{
return __dsc_vdev_can_op(vdev);
}
static QDF_STATUS
__dsc_vdev_trans_start_nolock(struct dsc_vdev *vdev, const char *desc)
{