// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2021 Broadcom. All Rights Reserved. The term * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. */ /* * LIBEFC LOCKING * * The critical sections protected by the efc's spinlock are quite broad and * may be improved upon in the future. The libefc code and its locking doesn't * influence the I/O path, so excessive locking doesn't impact I/O performance. * * The strategy is to lock whenever processing a request from user driver. This * means that the entry points into the libefc library are protected by efc * lock. So all the state machine transitions are protected. */ #include <linux/module.h> #include <linux/kernel.h> #include "efc.h" int efcport_init(struct efc *efc) { … } static void efc_purge_pending(struct efc *efc) { … } void efcport_destroy(struct efc *efc) { … }