|
@@ -512,7 +512,6 @@ static inline void napi_enable(struct napi_struct *n)
|
|
clear_bit(NAPI_STATE_NPSVC, &n->state);
|
|
clear_bit(NAPI_STATE_NPSVC, &n->state);
|
|
}
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_SMP
|
|
|
|
/**
|
|
/**
|
|
* napi_synchronize - wait until NAPI is not running
|
|
* napi_synchronize - wait until NAPI is not running
|
|
* @n: napi context
|
|
* @n: napi context
|
|
@@ -523,12 +522,12 @@ static inline void napi_enable(struct napi_struct *n)
|
|
*/
|
|
*/
|
|
static inline void napi_synchronize(const struct napi_struct *n)
|
|
static inline void napi_synchronize(const struct napi_struct *n)
|
|
{
|
|
{
|
|
- while (test_bit(NAPI_STATE_SCHED, &n->state))
|
|
|
|
- msleep(1);
|
|
|
|
|
|
+ if (IS_ENABLED(CONFIG_SMP))
|
|
|
|
+ while (test_bit(NAPI_STATE_SCHED, &n->state))
|
|
|
|
+ msleep(1);
|
|
|
|
+ else
|
|
|
|
+ barrier();
|
|
}
|
|
}
|
|
-#else
|
|
|
|
-# define napi_synchronize(n) barrier()
|
|
|
|
-#endif
|
|
|
|
|
|
|
|
enum netdev_queue_state_t {
|
|
enum netdev_queue_state_t {
|
|
__QUEUE_STATE_DRV_XOFF,
|
|
__QUEUE_STATE_DRV_XOFF,
|