Rev 1123 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1123 | Rev 1125 | ||
---|---|---|---|
Line 84... | Line 84... | ||
84 | #define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ |
84 | #define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ |
Line 85... | Line 85... | ||
85 | 85 | ||
Line 86... | Line -... | ||
86 | #define DRM_INFO(fmt, arg...) dbgprintf("DRM: "fmt , ##arg) |
- | |
87 | - | ||
88 | #define DRM_DEBUG(fmt, arg...) \ |
- | |
89 | printk(KERN_ERR "[" DRM_NAME ":%s] *ERROR* " fmt , __func__ , ##arg) |
86 | #define DRM_INFO(fmt, arg...) dbgprintf("DRM: "fmt , ##arg) |
90 | 87 | ||
Line 91... | Line 88... | ||
91 | #define DRM_ERROR(fmt, arg...) \ |
88 | #define DRM_ERROR(fmt, arg...) \ |
Line 228... | Line 225... | ||
228 | } |
225 | } |
229 | 226 | ||
Line 230... | Line 227... | ||
230 | #define EXPORT_SYMBOL(x) |
227 | #define EXPORT_SYMBOL(x) |
Line 231... | Line -... | ||
231 | - | ||
232 | #define IDR_BITS 5 |
- | |
233 | #define IDR_FULL 0xfffffffful |
- | |
234 | - | ||
235 | struct idr_layer { |
- | |
236 | unsigned long bitmap; /* A zero bit means "space here" */ |
- | |
237 | struct idr_layer *ary[1< |
- | |
238 | int count; /* When zero, we can release it */ |
- | |
239 | }; |
- | |
240 | - | ||
241 | struct idr { |
- | |
242 | struct idr_layer *top; |
- | |
243 | struct idr_layer *id_free; |
- | |
244 | int layers; |
- | |
245 | int id_free_cnt; |
- | |
246 | // spinlock_t lock; |
- | |
247 | }; |
- | |
248 | - | ||
249 | 228 | ||
250 | #define min(x,y) ({ \ |
229 | #define min(x,y) ({ \ |
251 | typeof(x) _x = (x); \ |
230 | typeof(x) _x = (x); \ |
252 | typeof(y) _y = (y); \ |
231 | typeof(y) _y = (y); \ |
253 | (void) (&_x == &_y); \ |
232 | (void) (&_x == &_y); \ |
Line 290... | Line 269... | ||
290 | static inline void *kcalloc(size_t n, size_t size, u32_t flags) |
269 | static inline void *kcalloc(size_t n, size_t size, u32_t flags) |
291 | { |
270 | { |
292 | if (n != 0 && size > ULONG_MAX / n) |
271 | if (n != 0 && size > ULONG_MAX / n) |
293 | return NULL; |
272 | return NULL; |
294 | return kmalloc(n * size, 0); |
273 | return kzalloc(n * size, 0); |
295 | } |
274 | } |
Line -... | Line 275... | ||
- | 275 | ||
- | 276 | #define ENTRY() dbgprintf("entry %s\n",__FUNCTION__) |
|
- | 277 | #define LEAVE() dbgprintf("leave %s\n",__FUNCTION__) |
|
296 | 278 |