diff --git a/TODO b/TODO index 4ff776fe265f441d78f70e8d915ed1706f654b82..3d88c4a167819490f8ff7ac39bf8bd9050958ec1 100644 --- a/TODO +++ b/TODO @@ -25,8 +25,6 @@ Version 1.4.0: * List of commands that require a slave. * Remove configs_attached flag. * Remove EC_IOCTL_DOMAIN_COUNT. -* Remove ATOMIC allocations. -* Clear FMMU configs. * Rename master MODE to STATE. Future issues: diff --git a/master/datagram.c b/master/datagram.c index 3fe4891f6f689f431b765bb17a2f5d821bef336e..3a5c938c14dce670d6b8a1094ad4071d316d32d6 100644 --- a/master/datagram.c +++ b/master/datagram.c @@ -146,7 +146,7 @@ int ec_datagram_prealloc( datagram->mem_size = 0; } - if (!(datagram->data = kmalloc(size, GFP_ATOMIC))) { + if (!(datagram->data = kmalloc(size, GFP_KERNEL))) { EC_ERR("Failed to allocate %u bytes of datagram memory!\n", size); return -1; } diff --git a/master/fsm_coe.c b/master/fsm_coe.c index 866fc08b0b472c72adaf8012fb1127525e2ed3e9..9e5feaf11ee200bc4427a0d81260c23518a6816c 100644 --- a/master/fsm_coe.c +++ b/master/fsm_coe.c @@ -466,7 +466,7 @@ void ec_fsm_coe_dict_response(ec_fsm_coe_t *fsm /**< finite state machine */) continue; } - if (!(sdo = (ec_sdo_t *) kmalloc(sizeof(ec_sdo_t), GFP_ATOMIC))) { + if (!(sdo = (ec_sdo_t *) kmalloc(sizeof(ec_sdo_t), GFP_KERNEL))) { EC_ERR("Failed to allocate memory for Sdo!\n"); fsm->state = ec_fsm_coe_error; return; @@ -689,7 +689,7 @@ void ec_fsm_coe_dict_desc_response(ec_fsm_coe_t *fsm name_size = rec_size - 12; if (name_size) { - if (!(sdo->name = kmalloc(name_size + 1, GFP_ATOMIC))) { + if (!(sdo->name = kmalloc(name_size + 1, GFP_KERNEL))) { EC_ERR("Failed to allocate Sdo name!\n"); fsm->state = ec_fsm_coe_error; return; @@ -904,7 +904,7 @@ void ec_fsm_coe_dict_entry_response(ec_fsm_coe_t *fsm data_size = rec_size - 16; if (!(entry = (ec_sdo_entry_t *) - kmalloc(sizeof(ec_sdo_entry_t), GFP_ATOMIC))) { + kmalloc(sizeof(ec_sdo_entry_t), GFP_KERNEL))) { EC_ERR("Failed to allocate entry!\n"); fsm->state = ec_fsm_coe_error; return; @@ -916,7 +916,7 @@ void ec_fsm_coe_dict_entry_response(ec_fsm_coe_t *fsm if (data_size) { uint8_t *desc; - if (!(desc = kmalloc(data_size + 1, GFP_ATOMIC))) { + if (!(desc = kmalloc(data_size + 1, GFP_KERNEL))) { EC_ERR("Failed to allocate Sdo entry name!\n"); fsm->state = ec_fsm_coe_error; return; diff --git a/master/fsm_master.c b/master/fsm_master.c index 0bd635b373127ff6fc9aff2812f5a9b9232055e6..b92d3f152817739720a0ed9825e5ed83fe57048d 100644 --- a/master/fsm_master.c +++ b/master/fsm_master.c @@ -243,8 +243,8 @@ void ec_fsm_master_state_broadcast( // init slaves for (i = 0; i < master->slave_count; i++) { - if (!(slave = (ec_slave_t *) kmalloc(sizeof(ec_slave_t), - GFP_ATOMIC))) { + if (!(slave = (ec_slave_t *) + kmalloc(sizeof(ec_slave_t), GFP_KERNEL))) { EC_ERR("Failed to allocate slave %u!\n", i); ec_master_clear_slaves(master); master->scan_busy = 0; diff --git a/master/fsm_slave_scan.c b/master/fsm_slave_scan.c index 77e6e7d9d3aed3ec30b7ab68a3cd79909b5fa6cb..9ebb990e02a88c0c0a01fb75b45cb083d7dd76df 100644 --- a/master/fsm_slave_scan.c +++ b/master/fsm_slave_scan.c @@ -404,7 +404,7 @@ alloc_sii: } if (!(slave->sii_words = - (uint16_t *) kmalloc(slave->sii_nwords * 2, GFP_ATOMIC))) { + (uint16_t *) kmalloc(slave->sii_nwords * 2, GFP_KERNEL))) { EC_ERR("Failed to allocate %u words of SII data for slave %u.\n", slave->sii_nwords, slave->ring_position); slave->sii_nwords = 0;