9 #include <linux/types.h>
23 u64 *ate = ate_resource->
ate;
27 for (index = start; length < number; index++, length++)
38 u64 *ate = ate_resource->
ate;
42 for (index = start; index < ate_resource->
num_ate;) {
48 for (i = start_free; i < ate_resource->
num_ate; i++) {
69 static inline void free_ate_resource(
struct ate_resource *ate_resource,
72 mark_ate(ate_resource, start, ate_resource->
ate[start], 0);
81 static inline int alloc_ate_resource(
struct ate_resource *ate_resource,
99 mark_ate(ate_resource, start_index, ate_needed, ate_needed);
122 spin_unlock_irqrestore(&pcibus_info->
pbi_lock, flags);
134 if (ate_index < pcibus_info->pbi_int_ate_size) {
137 panic(
"pcibr_ate_addr: invalid ate_index 0x%x", ate_index);
144 ate_write(
struct pcibus_info *pcibus_info,
int ate_index,
int count,
147 while (count-- > 0) {
148 if (ate_index < pcibus_info->pbi_int_ate_size) {
151 panic(
"ate_write: invalid ate_index 0x%x", ate_index);
169 ate = *pcibr_ate_addr(pcibus_info, index);
176 spin_unlock_irqrestore(&pcibus_info->
pbi_lock, flags);