/drivers/include/drm/drmP.h |
---|
74,9 → 74,6 |
//#include <linux/poll.h> |
//#include <asm/pgalloc.h> |
#include <linux/workqueue.h> |
#include "drm.h" |
#include <linux/idr.h> |
975,7 → 972,6 |
void (*gem_free_object) (struct drm_gem_object *obj); |
int (*gem_open_object) (struct drm_gem_object *, struct drm_file *); |
void (*gem_close_object) (struct drm_gem_object *, struct drm_file *); |
u32 driver_features; |
}; |
1208,11 → 1204,6 |
#define DRM_SWITCH_POWER_OFF 1 |
#define DRM_SWITCH_POWER_CHANGING 2 |
static __inline__ int drm_core_check_feature(struct drm_device *dev, |
int feature) |
{ |
return ((dev->driver->driver_features & feature) ? 1 : 0); |
} |
static inline int drm_dev_to_irq(struct drm_device *dev) |
{ |
/drivers/include/linux/workqueue.h |
---|
File deleted |
/drivers/include/linux/bug.h |
---|
62,18 → 62,4 |
BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) |
#define printk_once(fmt, ...) \ |
({ \ |
static bool __print_once; \ |
\ |
if (!__print_once) { \ |
__print_once = true; \ |
printk(fmt, ##__VA_ARGS__); \ |
} \ |
}) |
#define pr_warn_once(fmt, ...) \ |
printk_once(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) |
#endif |
/drivers/include/linux/kernel.h |
---|
411,12 → 411,5 |
(p) = (v); \ |
}) |
unsigned int hweight16(unsigned int w); |
#define cpufreq_quick_get_max(x) GetCpuFreq() |
extern unsigned int tsc_khz; |
#endif |
/drivers/include/linux/wait.h |
---|
27,7 → 27,7 |
list_add(&new->task_list, &head->task_list); |
} |
/* |
#define __wait_event(wq, condition) \ |
do { \ |
DEFINE_WAIT(__wait); \ |
41,8 → 41,8 |
finish_wait(&wq, &__wait); \ |
} while (0) |
*/ |
#define wait_event_timeout(wq, condition, timeout) \ |
({ \ |
long __ret = timeout; \ |
133,6 → 133,76 |
}; |
/* |
* Workqueue flags and constants. For details, please refer to |
* Documentation/workqueue.txt. |
*/ |
enum { |
WQ_NON_REENTRANT = 1 << 0, /* guarantee non-reentrance */ |
WQ_UNBOUND = 1 << 1, /* not bound to any cpu */ |
WQ_FREEZABLE = 1 << 2, /* freeze during suspend */ |
WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ |
WQ_HIGHPRI = 1 << 4, /* high priority */ |
WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ |
WQ_DRAINING = 1 << 6, /* internal: workqueue is draining */ |
WQ_RESCUER = 1 << 7, /* internal: workqueue has rescuer */ |
WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ |
WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ |
WQ_DFL_ACTIVE = WQ_MAX_ACTIVE / 2, |
}; |
struct work_struct; |
struct workqueue_struct { |
spinlock_t lock; |
struct list_head worklist; |
}; |
typedef void (*work_func_t)(struct work_struct *work); |
struct work_struct { |
struct list_head entry; |
struct workqueue_struct *data; |
work_func_t func; |
}; |
struct delayed_work { |
struct work_struct work; |
}; |
static inline struct delayed_work *to_delayed_work(struct work_struct *work) |
{ |
return container_of(work, struct delayed_work, work); |
} |
struct workqueue_struct *alloc_workqueue_key(const char *fmt, |
unsigned int flags, int max_active); |
#define alloc_ordered_workqueue(fmt, flags, args...) \ |
alloc_workqueue(fmt, WQ_UNBOUND | (flags), 1, ##args) |
int queue_delayed_work(struct workqueue_struct *wq, |
struct delayed_work *dwork, unsigned long delay); |
#define INIT_WORK(_work, _func) \ |
do { \ |
INIT_LIST_HEAD(&(_work)->entry); \ |
(_work)->func = _func; \ |
} while (0) |
#define INIT_DELAYED_WORK(_work, _func) \ |
do { \ |
INIT_LIST_HEAD(&(_work)->work.entry); \ |
(_work)->work.func = _func; \ |
} while (0) |
struct completion { |
unsigned int done; |
wait_queue_head_t wait; |
151,5 → 221,7 |
#define DEFINE_WAIT(name) DEFINE_WAIT_FUNC(name, autoremove_wake_function) |
#endif |
/drivers/include/linux/jiffies.h |
---|
302,35 → 302,6 |
extern u64 nsecs_to_jiffies64(u64 n); |
extern unsigned long nsecs_to_jiffies(u64 n); |
static unsigned long round_jiffies_common(unsigned long j, bool force_up) |
{ |
int rem; |
unsigned long original = j; |
rem = j % HZ; |
/* |
* If the target jiffie is just after a whole second (which can happen |
* due to delays of the timer irq, long irq off times etc etc) then |
* we should round down to the whole second, not up. Use 1/4th second |
* as cutoff for this rounding as an extreme upper bound for this. |
* But never round down if @force_up is set. |
*/ |
if (rem < HZ/4 && !force_up) /* round down */ |
j = j - rem; |
else /* round up */ |
j = j - rem + HZ; |
if (j <= GetTimerTicks()) /* rounding ate our timeout entirely; */ |
return original; |
return j; |
} |
unsigned long round_jiffies_up_relative(unsigned long j); |
#define TIMESTAMP_SIZE 30 |
#endif |
/drivers/include/syscall.h |
---|
58,8 → 58,6 |
u32 STDCALL TimerHs(u32 delay, u32 interval, |
void *fn, void *data)asm("TimerHs"); |
u64 IMPORT GetCpuFreq()__asm__("GetCpuFreq"); |
/////////////////////////////////////////////////////////////////////////////// |
void STDCALL SetMouseData(int btn, int x, int y, |