Merge branch 'master'
This commit is contained in:
commit
85d6162d6c
@ -40,10 +40,6 @@ IOCTL_TABLE_START
|
||||
#define DECLARES
|
||||
#include "compat_ioctl.c"
|
||||
|
||||
/* Little p (/dev/rtc, /dev/envctrl, etc.) */
|
||||
COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
|
||||
COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
|
||||
|
||||
IOCTL_TABLE_END
|
||||
|
||||
int ioctl_table_size = ARRAY_SIZE(ioctl_start);
|
||||
|
@ -12,86 +12,10 @@
|
||||
#define INCLUDES
|
||||
#include "compat_ioctl.c"
|
||||
#include <linux/syscalls.h>
|
||||
#include <asm/fbio.h>
|
||||
|
||||
/* Use this to get at 32-bit user passed pointers.
|
||||
* See sys_sparc32.c for description about it.
|
||||
*/
|
||||
#define A(__x) compat_ptr(__x)
|
||||
|
||||
#define CODE
|
||||
#include "compat_ioctl.c"
|
||||
|
||||
struct fbcmap32 {
|
||||
int index; /* first element (0 origin) */
|
||||
int count;
|
||||
u32 red;
|
||||
u32 green;
|
||||
u32 blue;
|
||||
};
|
||||
|
||||
#define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32)
|
||||
#define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32)
|
||||
|
||||
static int fbiogetputcmap(unsigned int fd, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct fbcmap32 __user *argp = (void __user *)arg;
|
||||
struct fbcmap __user *p = compat_alloc_user_space(sizeof(*p));
|
||||
u32 addr;
|
||||
int ret;
|
||||
|
||||
ret = copy_in_user(p, argp, 2 * sizeof(int));
|
||||
ret |= get_user(addr, &argp->red);
|
||||
ret |= put_user(compat_ptr(addr), &p->red);
|
||||
ret |= get_user(addr, &argp->green);
|
||||
ret |= put_user(compat_ptr(addr), &p->green);
|
||||
ret |= get_user(addr, &argp->blue);
|
||||
ret |= put_user(compat_ptr(addr), &p->blue);
|
||||
if (ret)
|
||||
return -EFAULT;
|
||||
return sys_ioctl(fd, (cmd == FBIOPUTCMAP32) ? FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC, (unsigned long)p);
|
||||
}
|
||||
|
||||
struct fbcursor32 {
|
||||
short set; /* what to set, choose from the list above */
|
||||
short enable; /* cursor on/off */
|
||||
struct fbcurpos pos; /* cursor position */
|
||||
struct fbcurpos hot; /* cursor hot spot */
|
||||
struct fbcmap32 cmap; /* color map info */
|
||||
struct fbcurpos size; /* cursor bit map size */
|
||||
u32 image; /* cursor image bits */
|
||||
u32 mask; /* cursor mask bits */
|
||||
};
|
||||
|
||||
#define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32)
|
||||
#define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32)
|
||||
|
||||
static int fbiogscursor(unsigned int fd, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p));
|
||||
struct fbcursor32 __user *argp = (void __user *)arg;
|
||||
compat_uptr_t addr;
|
||||
int ret;
|
||||
|
||||
ret = copy_in_user(p, argp,
|
||||
2 * sizeof (short) + 2 * sizeof(struct fbcurpos));
|
||||
ret |= copy_in_user(&p->size, &argp->size, sizeof(struct fbcurpos));
|
||||
ret |= copy_in_user(&p->cmap, &argp->cmap, 2 * sizeof(int));
|
||||
ret |= get_user(addr, &argp->cmap.red);
|
||||
ret |= put_user(compat_ptr(addr), &p->cmap.red);
|
||||
ret |= get_user(addr, &argp->cmap.green);
|
||||
ret |= put_user(compat_ptr(addr), &p->cmap.green);
|
||||
ret |= get_user(addr, &argp->cmap.blue);
|
||||
ret |= put_user(compat_ptr(addr), &p->cmap.blue);
|
||||
ret |= get_user(addr, &argp->mask);
|
||||
ret |= put_user(compat_ptr(addr), &p->mask);
|
||||
ret |= get_user(addr, &argp->image);
|
||||
ret |= put_user(compat_ptr(addr), &p->image);
|
||||
if (ret)
|
||||
return -EFAULT;
|
||||
return sys_ioctl (fd, FBIOSCURSOR, (unsigned long)p);
|
||||
}
|
||||
|
||||
#define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl)
|
||||
#define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl_trans_handler_t)(handler), NULL },
|
||||
#define IOCTL_TABLE_START \
|
||||
@ -103,22 +27,6 @@ IOCTL_TABLE_START
|
||||
#include <linux/compat_ioctl.h>
|
||||
#define DECLARES
|
||||
#include "compat_ioctl.c"
|
||||
COMPATIBLE_IOCTL(FBIOGTYPE)
|
||||
COMPATIBLE_IOCTL(FBIOSATTR)
|
||||
COMPATIBLE_IOCTL(FBIOGATTR)
|
||||
COMPATIBLE_IOCTL(FBIOSVIDEO)
|
||||
COMPATIBLE_IOCTL(FBIOGVIDEO)
|
||||
COMPATIBLE_IOCTL(FBIOGCURSOR32) /* This is not implemented yet. Later it should be converted... */
|
||||
COMPATIBLE_IOCTL(FBIOSCURPOS)
|
||||
COMPATIBLE_IOCTL(FBIOGCURPOS)
|
||||
COMPATIBLE_IOCTL(FBIOGCURMAX)
|
||||
/* Little k */
|
||||
/* Little v, the video4linux ioctls */
|
||||
/* And these ioctls need translation */
|
||||
/* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */
|
||||
HANDLE_IOCTL(FBIOPUTCMAP32, fbiogetputcmap)
|
||||
HANDLE_IOCTL(FBIOGETCMAP32, fbiogetputcmap)
|
||||
HANDLE_IOCTL(FBIOSCURSOR32, fbiogscursor)
|
||||
#if 0
|
||||
HANDLE_IOCTL(RTC32_IRQP_READ, do_rtc_ioctl)
|
||||
HANDLE_IOCTL(RTC32_IRQP_SET, do_rtc_ioctl)
|
||||
|
@ -861,8 +861,8 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq,
|
||||
* store what was left of this slice, if the queue idled out
|
||||
* or was preempted
|
||||
*/
|
||||
if (time_after(now, cfqq->slice_end))
|
||||
cfqq->slice_left = now - cfqq->slice_end;
|
||||
if (time_after(cfqq->slice_end, now))
|
||||
cfqq->slice_left = cfqq->slice_end - now;
|
||||
else
|
||||
cfqq->slice_left = 0;
|
||||
|
||||
@ -999,7 +999,7 @@ cfq_prio_to_maxrq(struct cfq_data *cfqd, struct cfq_queue *cfqq)
|
||||
/*
|
||||
* get next queue for service
|
||||
*/
|
||||
static struct cfq_queue *cfq_select_queue(struct cfq_data *cfqd, int force)
|
||||
static struct cfq_queue *cfq_select_queue(struct cfq_data *cfqd)
|
||||
{
|
||||
unsigned long now = jiffies;
|
||||
struct cfq_queue *cfqq;
|
||||
@ -1023,7 +1023,7 @@ static struct cfq_queue *cfq_select_queue(struct cfq_data *cfqd, int force)
|
||||
*/
|
||||
if (!RB_EMPTY(&cfqq->sort_list))
|
||||
goto keep_queue;
|
||||
else if (!force && cfq_cfqq_class_sync(cfqq) &&
|
||||
else if (cfq_cfqq_class_sync(cfqq) &&
|
||||
time_before(now, cfqq->slice_end)) {
|
||||
if (cfq_arm_slice_timer(cfqd, cfqq))
|
||||
return NULL;
|
||||
@ -1091,6 +1091,42 @@ __cfq_dispatch_requests(struct cfq_data *cfqd, struct cfq_queue *cfqq,
|
||||
return dispatched;
|
||||
}
|
||||
|
||||
static int
|
||||
cfq_forced_dispatch_cfqqs(struct list_head *list)
|
||||
{
|
||||
int dispatched = 0;
|
||||
struct cfq_queue *cfqq, *next;
|
||||
struct cfq_rq *crq;
|
||||
|
||||
list_for_each_entry_safe(cfqq, next, list, cfq_list) {
|
||||
while ((crq = cfqq->next_crq)) {
|
||||
cfq_dispatch_insert(cfqq->cfqd->queue, crq);
|
||||
dispatched++;
|
||||
}
|
||||
BUG_ON(!list_empty(&cfqq->fifo));
|
||||
}
|
||||
return dispatched;
|
||||
}
|
||||
|
||||
static int
|
||||
cfq_forced_dispatch(struct cfq_data *cfqd)
|
||||
{
|
||||
int i, dispatched = 0;
|
||||
|
||||
for (i = 0; i < CFQ_PRIO_LISTS; i++)
|
||||
dispatched += cfq_forced_dispatch_cfqqs(&cfqd->rr_list[i]);
|
||||
|
||||
dispatched += cfq_forced_dispatch_cfqqs(&cfqd->busy_rr);
|
||||
dispatched += cfq_forced_dispatch_cfqqs(&cfqd->cur_rr);
|
||||
dispatched += cfq_forced_dispatch_cfqqs(&cfqd->idle_rr);
|
||||
|
||||
cfq_slice_expired(cfqd, 0);
|
||||
|
||||
BUG_ON(cfqd->busy_queues);
|
||||
|
||||
return dispatched;
|
||||
}
|
||||
|
||||
static int
|
||||
cfq_dispatch_requests(request_queue_t *q, int force)
|
||||
{
|
||||
@ -1100,7 +1136,10 @@ cfq_dispatch_requests(request_queue_t *q, int force)
|
||||
if (!cfqd->busy_queues)
|
||||
return 0;
|
||||
|
||||
cfqq = cfq_select_queue(cfqd, force);
|
||||
if (unlikely(force))
|
||||
return cfq_forced_dispatch(cfqd);
|
||||
|
||||
cfqq = cfq_select_queue(cfqd);
|
||||
if (cfqq) {
|
||||
int max_dispatch;
|
||||
|
||||
@ -1115,12 +1154,9 @@ cfq_dispatch_requests(request_queue_t *q, int force)
|
||||
cfq_clear_cfqq_wait_request(cfqq);
|
||||
del_timer(&cfqd->idle_slice_timer);
|
||||
|
||||
if (!force) {
|
||||
max_dispatch = cfqd->cfq_quantum;
|
||||
if (cfq_class_idle(cfqq))
|
||||
max_dispatch = 1;
|
||||
} else
|
||||
max_dispatch = INT_MAX;
|
||||
max_dispatch = cfqd->cfq_quantum;
|
||||
if (cfq_class_idle(cfqq))
|
||||
max_dispatch = 1;
|
||||
|
||||
return __cfq_dispatch_requests(cfqd, cfqq, max_dispatch);
|
||||
}
|
||||
|
@ -155,9 +155,10 @@ static void elevator_setup_default(void)
|
||||
/*
|
||||
* If the given scheduler is not available, fall back to no-op.
|
||||
*/
|
||||
if (!(e = elevator_find(chosen_elevator)))
|
||||
if ((e = elevator_find(chosen_elevator)))
|
||||
elevator_put(e);
|
||||
else
|
||||
strcpy(chosen_elevator, "noop");
|
||||
elevator_put(e);
|
||||
}
|
||||
|
||||
static int __init elevator_setup(char *str)
|
||||
@ -190,14 +191,14 @@ int elevator_init(request_queue_t *q, char *name)
|
||||
|
||||
eq = kmalloc(sizeof(struct elevator_queue), GFP_KERNEL);
|
||||
if (!eq) {
|
||||
elevator_put(e->elevator_type);
|
||||
elevator_put(e);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ret = elevator_attach(q, e, eq);
|
||||
if (ret) {
|
||||
kfree(eq);
|
||||
elevator_put(e->elevator_type);
|
||||
elevator_put(e);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@ -225,6 +226,7 @@ void elv_dispatch_sort(request_queue_t *q, struct request *rq)
|
||||
|
||||
if (q->last_merge == rq)
|
||||
q->last_merge = NULL;
|
||||
q->nr_sorted--;
|
||||
|
||||
boundary = q->end_sector;
|
||||
|
||||
@ -283,6 +285,7 @@ void elv_merge_requests(request_queue_t *q, struct request *rq,
|
||||
|
||||
if (e->ops->elevator_merge_req_fn)
|
||||
e->ops->elevator_merge_req_fn(q, rq, next);
|
||||
q->nr_sorted--;
|
||||
|
||||
q->last_merge = rq;
|
||||
}
|
||||
@ -314,6 +317,20 @@ void elv_requeue_request(request_queue_t *q, struct request *rq)
|
||||
__elv_add_request(q, rq, ELEVATOR_INSERT_FRONT, 0);
|
||||
}
|
||||
|
||||
static void elv_drain_elevator(request_queue_t *q)
|
||||
{
|
||||
static int printed;
|
||||
while (q->elevator->ops->elevator_dispatch_fn(q, 1))
|
||||
;
|
||||
if (q->nr_sorted == 0)
|
||||
return;
|
||||
if (printed++ < 10) {
|
||||
printk(KERN_ERR "%s: forced dispatching is broken "
|
||||
"(nr_sorted=%u), please report this\n",
|
||||
q->elevator->elevator_type->elevator_name, q->nr_sorted);
|
||||
}
|
||||
}
|
||||
|
||||
void __elv_add_request(request_queue_t *q, struct request *rq, int where,
|
||||
int plug)
|
||||
{
|
||||
@ -348,9 +365,7 @@ void __elv_add_request(request_queue_t *q, struct request *rq, int where,
|
||||
|
||||
case ELEVATOR_INSERT_BACK:
|
||||
rq->flags |= REQ_SOFTBARRIER;
|
||||
|
||||
while (q->elevator->ops->elevator_dispatch_fn(q, 1))
|
||||
;
|
||||
elv_drain_elevator(q);
|
||||
list_add_tail(&rq->queuelist, &q->queue_head);
|
||||
/*
|
||||
* We kick the queue here for the following reasons.
|
||||
@ -369,6 +384,7 @@ void __elv_add_request(request_queue_t *q, struct request *rq, int where,
|
||||
case ELEVATOR_INSERT_SORT:
|
||||
BUG_ON(!blk_fs_request(rq));
|
||||
rq->flags |= REQ_SORTED;
|
||||
q->nr_sorted++;
|
||||
if (q->last_merge == NULL && rq_mergeable(rq))
|
||||
q->last_merge = rq;
|
||||
/*
|
||||
@ -525,33 +541,19 @@ int elv_queue_empty(request_queue_t *q)
|
||||
|
||||
struct request *elv_latter_request(request_queue_t *q, struct request *rq)
|
||||
{
|
||||
struct list_head *next;
|
||||
|
||||
elevator_t *e = q->elevator;
|
||||
|
||||
if (e->ops->elevator_latter_req_fn)
|
||||
return e->ops->elevator_latter_req_fn(q, rq);
|
||||
|
||||
next = rq->queuelist.next;
|
||||
if (next != &q->queue_head && next != &rq->queuelist)
|
||||
return list_entry_rq(next);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct request *elv_former_request(request_queue_t *q, struct request *rq)
|
||||
{
|
||||
struct list_head *prev;
|
||||
|
||||
elevator_t *e = q->elevator;
|
||||
|
||||
if (e->ops->elevator_former_req_fn)
|
||||
return e->ops->elevator_former_req_fn(q, rq);
|
||||
|
||||
prev = rq->queuelist.prev;
|
||||
if (prev != &q->queue_head && prev != &rq->queuelist)
|
||||
return list_entry_rq(prev);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -691,13 +693,15 @@ static void elevator_switch(request_queue_t *q, struct elevator_type *new_e)
|
||||
|
||||
set_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags);
|
||||
|
||||
while (q->elevator->ops->elevator_dispatch_fn(q, 1))
|
||||
;
|
||||
elv_drain_elevator(q);
|
||||
|
||||
while (q->rq.elvpriv) {
|
||||
blk_remove_plug(q);
|
||||
q->request_fn(q);
|
||||
spin_unlock_irq(q->queue_lock);
|
||||
msleep(10);
|
||||
spin_lock_irq(q->queue_lock);
|
||||
elv_drain_elevator(q);
|
||||
}
|
||||
|
||||
spin_unlock_irq(q->queue_lock);
|
||||
@ -744,13 +748,15 @@ error:
|
||||
ssize_t elv_iosched_store(request_queue_t *q, const char *name, size_t count)
|
||||
{
|
||||
char elevator_name[ELV_NAME_MAX];
|
||||
size_t len;
|
||||
struct elevator_type *e;
|
||||
|
||||
memset(elevator_name, 0, sizeof(elevator_name));
|
||||
strncpy(elevator_name, name, sizeof(elevator_name));
|
||||
elevator_name[sizeof(elevator_name) - 1] = '\0';
|
||||
strncpy(elevator_name, name, sizeof(elevator_name) - 1);
|
||||
len = strlen(elevator_name);
|
||||
|
||||
if (elevator_name[strlen(elevator_name) - 1] == '\n')
|
||||
elevator_name[strlen(elevator_name) - 1] = '\0';
|
||||
if (len && elevator_name[len - 1] == '\n')
|
||||
elevator_name[len - 1] = '\0';
|
||||
|
||||
e = elevator_get(elevator_name);
|
||||
if (!e) {
|
||||
|
@ -391,12 +391,14 @@ static ssize_t disk_stats_read(struct gendisk * disk, char *page)
|
||||
"%8u %8u %8llu %8u "
|
||||
"%8u %8u %8u"
|
||||
"\n",
|
||||
disk_stat_read(disk, ios[0]), disk_stat_read(disk, merges[0]),
|
||||
(unsigned long long)disk_stat_read(disk, sectors[0]),
|
||||
jiffies_to_msecs(disk_stat_read(disk, ticks[0])),
|
||||
disk_stat_read(disk, ios[1]), disk_stat_read(disk, merges[1]),
|
||||
(unsigned long long)disk_stat_read(disk, sectors[1]),
|
||||
jiffies_to_msecs(disk_stat_read(disk, ticks[1])),
|
||||
disk_stat_read(disk, ios[READ]),
|
||||
disk_stat_read(disk, merges[READ]),
|
||||
(unsigned long long)disk_stat_read(disk, sectors[READ]),
|
||||
jiffies_to_msecs(disk_stat_read(disk, ticks[READ])),
|
||||
disk_stat_read(disk, ios[WRITE]),
|
||||
disk_stat_read(disk, merges[WRITE]),
|
||||
(unsigned long long)disk_stat_read(disk, sectors[WRITE]),
|
||||
jiffies_to_msecs(disk_stat_read(disk, ticks[WRITE])),
|
||||
disk->in_flight,
|
||||
jiffies_to_msecs(disk_stat_read(disk, io_ticks)),
|
||||
jiffies_to_msecs(disk_stat_read(disk, time_in_queue)));
|
||||
|
@ -7,21 +7,94 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
static void elevator_noop_add_request(request_queue_t *q, struct request *rq)
|
||||
struct noop_data {
|
||||
struct list_head queue;
|
||||
};
|
||||
|
||||
static void noop_merged_requests(request_queue_t *q, struct request *rq,
|
||||
struct request *next)
|
||||
{
|
||||
rq->flags |= REQ_NOMERGE;
|
||||
elv_dispatch_add_tail(q, rq);
|
||||
list_del_init(&next->queuelist);
|
||||
}
|
||||
|
||||
static int elevator_noop_dispatch(request_queue_t *q, int force)
|
||||
static int noop_dispatch(request_queue_t *q, int force)
|
||||
{
|
||||
struct noop_data *nd = q->elevator->elevator_data;
|
||||
|
||||
if (!list_empty(&nd->queue)) {
|
||||
struct request *rq;
|
||||
rq = list_entry(nd->queue.next, struct request, queuelist);
|
||||
list_del_init(&rq->queuelist);
|
||||
elv_dispatch_sort(q, rq);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void noop_add_request(request_queue_t *q, struct request *rq)
|
||||
{
|
||||
struct noop_data *nd = q->elevator->elevator_data;
|
||||
|
||||
list_add_tail(&rq->queuelist, &nd->queue);
|
||||
}
|
||||
|
||||
static int noop_queue_empty(request_queue_t *q)
|
||||
{
|
||||
struct noop_data *nd = q->elevator->elevator_data;
|
||||
|
||||
return list_empty(&nd->queue);
|
||||
}
|
||||
|
||||
static struct request *
|
||||
noop_former_request(request_queue_t *q, struct request *rq)
|
||||
{
|
||||
struct noop_data *nd = q->elevator->elevator_data;
|
||||
|
||||
if (rq->queuelist.prev == &nd->queue)
|
||||
return NULL;
|
||||
return list_entry(rq->queuelist.prev, struct request, queuelist);
|
||||
}
|
||||
|
||||
static struct request *
|
||||
noop_latter_request(request_queue_t *q, struct request *rq)
|
||||
{
|
||||
struct noop_data *nd = q->elevator->elevator_data;
|
||||
|
||||
if (rq->queuelist.next == &nd->queue)
|
||||
return NULL;
|
||||
return list_entry(rq->queuelist.next, struct request, queuelist);
|
||||
}
|
||||
|
||||
static int noop_init_queue(request_queue_t *q, elevator_t *e)
|
||||
{
|
||||
struct noop_data *nd;
|
||||
|
||||
nd = kmalloc(sizeof(*nd), GFP_KERNEL);
|
||||
if (!nd)
|
||||
return -ENOMEM;
|
||||
INIT_LIST_HEAD(&nd->queue);
|
||||
e->elevator_data = nd;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void noop_exit_queue(elevator_t *e)
|
||||
{
|
||||
struct noop_data *nd = e->elevator_data;
|
||||
|
||||
BUG_ON(!list_empty(&nd->queue));
|
||||
kfree(nd);
|
||||
}
|
||||
|
||||
static struct elevator_type elevator_noop = {
|
||||
.ops = {
|
||||
.elevator_dispatch_fn = elevator_noop_dispatch,
|
||||
.elevator_add_req_fn = elevator_noop_add_request,
|
||||
.elevator_merge_req_fn = noop_merged_requests,
|
||||
.elevator_dispatch_fn = noop_dispatch,
|
||||
.elevator_add_req_fn = noop_add_request,
|
||||
.elevator_queue_empty_fn = noop_queue_empty,
|
||||
.elevator_former_req_fn = noop_former_request,
|
||||
.elevator_latter_req_fn = noop_latter_request,
|
||||
.elevator_init_fn = noop_init_queue,
|
||||
.elevator_exit_fn = noop_exit_queue,
|
||||
},
|
||||
.elevator_name = "noop",
|
||||
.elevator_owner = THIS_MODULE,
|
||||
|
@ -99,7 +99,9 @@ struct smm_regs {
|
||||
|
||||
static inline char *i8k_get_dmi_data(int field)
|
||||
{
|
||||
return dmi_get_system_info(field) ? : "N/A";
|
||||
char *dmi_data = dmi_get_system_info(field);
|
||||
|
||||
return dmi_data && *dmi_data ? dmi_data : "?";
|
||||
}
|
||||
|
||||
/*
|
||||
@ -396,7 +398,7 @@ static int i8k_proc_show(struct seq_file *seq, void *offset)
|
||||
return seq_printf(seq, "%s %s %s %d %d %d %d %d %d %d\n",
|
||||
I8K_PROC_FMT,
|
||||
bios_version,
|
||||
dmi_get_system_info(DMI_PRODUCT_SERIAL) ? : "N/A",
|
||||
i8k_get_dmi_data(DMI_PRODUCT_SERIAL),
|
||||
cpu_temp,
|
||||
left_fan, right_fan, left_speed, right_speed,
|
||||
ac_power, fn_key);
|
||||
|
@ -7,6 +7,7 @@ config DVB_B2C2_FLEXCOP
|
||||
select DVB_NXT2002
|
||||
select DVB_STV0297
|
||||
select DVB_BCM3510
|
||||
select DVB_LGDT330X
|
||||
help
|
||||
Support for the digital TV receiver chip made by B2C2 Inc. included in
|
||||
Technisats PCI cards and USB boxes.
|
||||
|
@ -94,7 +94,7 @@ config MTD_NETSC520
|
||||
|
||||
config MTD_TS5500
|
||||
tristate "JEDEC Flash device mapped on Technologic Systems TS-5500"
|
||||
depends on ELAN
|
||||
depends on X86
|
||||
select MTD_PARTITIONS
|
||||
select MTD_JEDECPROBE
|
||||
select MTD_CFI_AMDSTD
|
||||
|
@ -210,27 +210,6 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||
}
|
||||
}
|
||||
|
||||
static long rtc_compat_ioctl(struct file *file, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
int rval = -ENOIOCTLCMD;
|
||||
|
||||
switch (cmd) {
|
||||
/*
|
||||
* These two are specific to this driver, the generic rtc ioctls
|
||||
* are hanlded elsewhere.
|
||||
*/
|
||||
case RTCGET:
|
||||
case RTCSET:
|
||||
lock_kernel();
|
||||
rval = rtc_ioctl(file->f_dentry->d_inode, file, cmd, arg);
|
||||
unlock_kernel();
|
||||
break;
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
static int rtc_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
int ret;
|
||||
@ -258,7 +237,6 @@ static struct file_operations rtc_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.llseek = no_llseek,
|
||||
.ioctl = rtc_ioctl,
|
||||
.compat_ioctl = rtc_compat_ioctl,
|
||||
.open = rtc_open,
|
||||
.release = rtc_release,
|
||||
};
|
||||
|
@ -532,8 +532,7 @@ void ata_tf_to_fis(const struct ata_taskfile *tf, u8 *fis, u8 pmp)
|
||||
* @fis: Buffer from which data will be input
|
||||
* @tf: Taskfile to output
|
||||
*
|
||||
* Converts a standard ATA taskfile to a Serial ATA
|
||||
* FIS structure (Register - Host to Device).
|
||||
* Converts a serial ATA FIS structure to a standard ATA taskfile.
|
||||
*
|
||||
* LOCKING:
|
||||
* Inherited from caller.
|
||||
|
@ -2276,6 +2276,12 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
|
||||
tf->device = scsicmd[8];
|
||||
tf->command = scsicmd[9];
|
||||
}
|
||||
/*
|
||||
* If slave is possible, enforce correct master/slave bit
|
||||
*/
|
||||
if (qc->ap->flags & ATA_FLAG_SLAVE_POSS)
|
||||
tf->device = qc->dev->devno ?
|
||||
tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1;
|
||||
|
||||
/*
|
||||
* Filter SET_FEATURES - XFER MODE command -- otherwise,
|
||||
|
@ -687,6 +687,7 @@ static void sil24_port_stop(struct ata_port *ap)
|
||||
struct sil24_port_priv *pp = ap->private_data;
|
||||
|
||||
sil24_cblk_free(pp, dev);
|
||||
ata_pad_free(ap, dev);
|
||||
kfree(pp);
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,9 @@ static struct fb_ops bw2_ops = {
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
.fb_mmap = bw2_mmap,
|
||||
.fb_ioctl = bw2_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.fb_compat_ioctl = sbusfb_compat_ioctl,
|
||||
#endif
|
||||
};
|
||||
|
||||
/* OBio addresses for the bwtwo registers */
|
||||
|
@ -49,6 +49,9 @@ static struct fb_ops cg14_ops = {
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
.fb_mmap = cg14_mmap,
|
||||
.fb_ioctl = cg14_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.fb_compat_ioctl = sbusfb_compat_ioctl,
|
||||
#endif
|
||||
};
|
||||
|
||||
#define CG14_MCR_INTENABLE_SHIFT 7
|
||||
|
@ -50,6 +50,9 @@ static struct fb_ops cg3_ops = {
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
.fb_mmap = cg3_mmap,
|
||||
.fb_ioctl = cg3_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.fb_compat_ioctl = sbusfb_compat_ioctl,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@ -54,6 +54,9 @@ static struct fb_ops cg6_ops = {
|
||||
.fb_sync = cg6_sync,
|
||||
.fb_mmap = cg6_mmap,
|
||||
.fb_ioctl = cg6_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.fb_compat_ioctl = sbusfb_compat_ioctl,
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Offset of interesting structures in the OBIO space */
|
||||
|
@ -215,12 +215,5 @@ config FONT_10x18
|
||||
big letters. It fits between the sun 12x22 and the normal 8x16 font.
|
||||
If other fonts are too big or too small for you, say Y, otherwise say N.
|
||||
|
||||
config FONT_RL
|
||||
bool "console Roman Large 8x16 font" if FONTS
|
||||
depends on FRAMEBUFFER_CONSOLE
|
||||
help
|
||||
This is the visually-appealing "RL" console font that is
|
||||
included with the kbd package.
|
||||
|
||||
endmenu
|
||||
|
||||
|
@ -15,7 +15,6 @@ font-objs-$(CONFIG_FONT_10x18) += font_10x18.o
|
||||
font-objs-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o
|
||||
font-objs-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o
|
||||
font-objs-$(CONFIG_FONT_MINI_4x6) += font_mini_4x6.o
|
||||
font-objs-$(CONFIG_FONT_RL) += font_rl.o
|
||||
|
||||
font-objs += $(font-objs-y)
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -64,10 +64,6 @@ static const struct font_desc *fonts[] = {
|
||||
#undef NO_FONTS
|
||||
&font_mini_4x6,
|
||||
#endif
|
||||
#ifdef CONFIG_FONT_RL
|
||||
#undef NO_FONTS
|
||||
&font_rl,
|
||||
#endif
|
||||
};
|
||||
|
||||
#define num_fonts (sizeof(fonts)/sizeof(*fonts))
|
||||
|
@ -57,6 +57,9 @@ static struct fb_ops ffb_ops = {
|
||||
.fb_sync = ffb_sync,
|
||||
.fb_mmap = ffb_mmap,
|
||||
.fb_ioctl = ffb_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.fb_compat_ioctl = sbusfb_compat_ioctl,
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Register layout and definitions */
|
||||
|
@ -51,6 +51,9 @@ static struct fb_ops leo_ops = {
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
.fb_mmap = leo_mmap,
|
||||
.fb_ioctl = leo_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.fb_compat_ioctl = sbusfb_compat_ioctl,
|
||||
#endif
|
||||
};
|
||||
|
||||
#define LEO_OFF_LC_SS0_KRN 0x00200000UL
|
||||
|
@ -48,6 +48,9 @@ static struct fb_ops p9100_ops = {
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
.fb_mmap = p9100_mmap,
|
||||
.fb_ioctl = p9100_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.fb_compat_ioctl = sbusfb_compat_ioctl,
|
||||
#endif
|
||||
};
|
||||
|
||||
/* P9100 control registers */
|
||||
|
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2003 David S. Miller (davem@redhat.com)
|
||||
*/
|
||||
|
||||
#include <linux/compat.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/string.h>
|
||||
@ -182,3 +183,109 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
|
||||
};
|
||||
}
|
||||
EXPORT_SYMBOL(sbusfb_ioctl_helper);
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
struct fbcmap32 {
|
||||
int index; /* first element (0 origin) */
|
||||
int count;
|
||||
u32 red;
|
||||
u32 green;
|
||||
u32 blue;
|
||||
};
|
||||
|
||||
#define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32)
|
||||
#define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32)
|
||||
|
||||
static int fbiogetputcmap(struct file *file, struct fb_info *info,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct fbcmap32 __user *argp = (void __user *)arg;
|
||||
struct fbcmap __user *p = compat_alloc_user_space(sizeof(*p));
|
||||
u32 addr;
|
||||
int ret;
|
||||
|
||||
ret = copy_in_user(p, argp, 2 * sizeof(int));
|
||||
ret |= get_user(addr, &argp->red);
|
||||
ret |= put_user(compat_ptr(addr), &p->red);
|
||||
ret |= get_user(addr, &argp->green);
|
||||
ret |= put_user(compat_ptr(addr), &p->green);
|
||||
ret |= get_user(addr, &argp->blue);
|
||||
ret |= put_user(compat_ptr(addr), &p->blue);
|
||||
if (ret)
|
||||
return -EFAULT;
|
||||
return info->fbops->fb_ioctl(file->f_dentry->d_inode, file,
|
||||
(cmd == FBIOPUTCMAP32) ?
|
||||
FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC,
|
||||
(unsigned long)p, info);
|
||||
}
|
||||
|
||||
struct fbcursor32 {
|
||||
short set; /* what to set, choose from the list above */
|
||||
short enable; /* cursor on/off */
|
||||
struct fbcurpos pos; /* cursor position */
|
||||
struct fbcurpos hot; /* cursor hot spot */
|
||||
struct fbcmap32 cmap; /* color map info */
|
||||
struct fbcurpos size; /* cursor bit map size */
|
||||
u32 image; /* cursor image bits */
|
||||
u32 mask; /* cursor mask bits */
|
||||
};
|
||||
|
||||
#define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32)
|
||||
#define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32)
|
||||
|
||||
static int fbiogscursor(struct file *file, struct fb_info *info,
|
||||
unsigned long arg)
|
||||
{
|
||||
struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p));
|
||||
struct fbcursor32 __user *argp = (void __user *)arg;
|
||||
compat_uptr_t addr;
|
||||
int ret;
|
||||
|
||||
ret = copy_in_user(p, argp,
|
||||
2 * sizeof (short) + 2 * sizeof(struct fbcurpos));
|
||||
ret |= copy_in_user(&p->size, &argp->size, sizeof(struct fbcurpos));
|
||||
ret |= copy_in_user(&p->cmap, &argp->cmap, 2 * sizeof(int));
|
||||
ret |= get_user(addr, &argp->cmap.red);
|
||||
ret |= put_user(compat_ptr(addr), &p->cmap.red);
|
||||
ret |= get_user(addr, &argp->cmap.green);
|
||||
ret |= put_user(compat_ptr(addr), &p->cmap.green);
|
||||
ret |= get_user(addr, &argp->cmap.blue);
|
||||
ret |= put_user(compat_ptr(addr), &p->cmap.blue);
|
||||
ret |= get_user(addr, &argp->mask);
|
||||
ret |= put_user(compat_ptr(addr), &p->mask);
|
||||
ret |= get_user(addr, &argp->image);
|
||||
ret |= put_user(compat_ptr(addr), &p->image);
|
||||
if (ret)
|
||||
return -EFAULT;
|
||||
return info->fbops->fb_ioctl(file->f_dentry->d_inode, file,
|
||||
FBIOSCURSOR, (unsigned long)p, info);
|
||||
}
|
||||
|
||||
long sbusfb_compat_ioctl(struct file *file, unsigned int cmd,
|
||||
unsigned long arg, struct fb_info *info)
|
||||
{
|
||||
switch (cmd) {
|
||||
case FBIOGTYPE:
|
||||
case FBIOSATTR:
|
||||
case FBIOGATTR:
|
||||
case FBIOSVIDEO:
|
||||
case FBIOGVIDEO:
|
||||
case FBIOGCURSOR32: /* This is not implemented yet.
|
||||
Later it should be converted... */
|
||||
case FBIOSCURPOS:
|
||||
case FBIOGCURPOS:
|
||||
case FBIOGCURMAX:
|
||||
return info->fbops->fb_ioctl(file->f_dentry->d_inode,
|
||||
file, cmd, arg, info);
|
||||
case FBIOPUTCMAP32:
|
||||
return fbiogetputcmap(file, info, cmd, arg);
|
||||
case FBIOGETCMAP32:
|
||||
return fbiogetputcmap(file, info, cmd, arg);
|
||||
case FBIOSCURSOR32:
|
||||
return fbiogscursor(file, info, arg);
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(sbusfb_compat_ioctl);
|
||||
#endif
|
||||
|
@ -20,5 +20,7 @@ extern int sbusfb_mmap_helper(struct sbus_mmap_map *map,
|
||||
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
|
||||
struct fb_info *info,
|
||||
int type, int fb_depth, unsigned long fb_size);
|
||||
long sbusfb_compat_ioctl(struct file *file, unsigned int cmd,
|
||||
unsigned long arg, struct fb_info *info);
|
||||
|
||||
#endif /* _SBUSLIB_H */
|
||||
|
@ -52,6 +52,9 @@ static struct fb_ops tcx_ops = {
|
||||
.fb_imageblit = cfb_imageblit,
|
||||
.fb_mmap = tcx_mmap,
|
||||
.fb_ioctl = tcx_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.fb_compat_ioctl = sbusfb_compat_ioctl,
|
||||
#endif
|
||||
};
|
||||
|
||||
/* THC definitions */
|
||||
|
@ -284,9 +284,6 @@ int jffs2_fill_scan_buf (struct jffs2_sb_info *c, void *buf,
|
||||
D1(printk(KERN_WARNING "Read at 0x%x gave only 0x%zx bytes\n", ofs, retlen));
|
||||
return -EIO;
|
||||
}
|
||||
D2(printk(KERN_DEBUG "Read 0x%x bytes from 0x%08x into buf\n", len, ofs));
|
||||
D2(printk(KERN_DEBUG "000: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7], buf[8], buf[9], buf[10], buf[11], buf[12], buf[13], buf[14], buf[15]));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1105,7 +1105,6 @@ static void time_out_leases(struct inode *inode)
|
||||
before = &fl->fl_next;
|
||||
continue;
|
||||
}
|
||||
printk(KERN_INFO "lease broken - owner pid = %d\n", fl->fl_pid);
|
||||
lease_modify(before, fl->fl_type & ~F_INPROGRESS);
|
||||
if (fl == *before) /* lease_modify may have freed fl */
|
||||
before = &fl->fl_next;
|
||||
@ -1430,7 +1429,7 @@ int fcntl_setlease(unsigned int fd, struct file *filp, long arg)
|
||||
lock_kernel();
|
||||
|
||||
error = __setlease(filp, arg, &flp);
|
||||
if (error)
|
||||
if (error || arg == F_UNLCK)
|
||||
goto out_unlock;
|
||||
|
||||
error = fasync_helper(fd, filp, 1, &flp->fl_fasync);
|
||||
|
@ -406,6 +406,7 @@ struct request_queue
|
||||
|
||||
atomic_t refcnt;
|
||||
|
||||
unsigned int nr_sorted;
|
||||
unsigned int in_flight;
|
||||
|
||||
/*
|
||||
@ -631,6 +632,7 @@ static inline void elv_dispatch_add_tail(struct request_queue *q,
|
||||
{
|
||||
if (q->last_merge == rq)
|
||||
q->last_merge = NULL;
|
||||
q->nr_sorted--;
|
||||
|
||||
q->end_sector = rq_end_sector(rq);
|
||||
q->boundary_rq = rq;
|
||||
|
@ -259,6 +259,14 @@ COMPATIBLE_IOCTL(RTC_RD_TIME)
|
||||
COMPATIBLE_IOCTL(RTC_SET_TIME)
|
||||
COMPATIBLE_IOCTL(RTC_WKALM_SET)
|
||||
COMPATIBLE_IOCTL(RTC_WKALM_RD)
|
||||
/*
|
||||
* These two are only for the sbus rtc driver, but
|
||||
* hwclock tries them on every rtc device first when
|
||||
* running on sparc. On other architectures the entries
|
||||
* are useless but harmless.
|
||||
*/
|
||||
COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
|
||||
COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
|
||||
/* Little m */
|
||||
COMPATIBLE_IOCTL(MTIOCTOP)
|
||||
/* Socket level stuff */
|
||||
|
@ -31,7 +31,6 @@ struct font_desc {
|
||||
#define SUN12x22_IDX 7
|
||||
#define ACORN8x8_IDX 8
|
||||
#define MINI4x6_IDX 9
|
||||
#define RL_IDX 10
|
||||
|
||||
extern const struct font_desc font_vga_8x8,
|
||||
font_vga_8x16,
|
||||
@ -42,7 +41,6 @@ extern const struct font_desc font_vga_8x8,
|
||||
font_sun_8x16,
|
||||
font_sun_12x22,
|
||||
font_acorn_8x8,
|
||||
font_rl,
|
||||
font_mini_4x6;
|
||||
|
||||
/* Find a font with a specific name */
|
||||
|
@ -78,7 +78,7 @@ struct hd_struct {
|
||||
sector_t start_sect;
|
||||
sector_t nr_sects;
|
||||
struct kobject kobj;
|
||||
unsigned ios[2], sectors[2];
|
||||
unsigned ios[2], sectors[2]; /* READs and WRITEs */
|
||||
int policy, partno;
|
||||
};
|
||||
|
||||
@ -89,7 +89,7 @@ struct hd_struct {
|
||||
#define GENHD_FL_SUPPRESS_PARTITION_INFO 32
|
||||
|
||||
struct disk_stats {
|
||||
unsigned sectors[2];
|
||||
unsigned sectors[2]; /* READs and WRITEs */
|
||||
unsigned ios[2];
|
||||
unsigned merges[2];
|
||||
unsigned ticks[2];
|
||||
|
@ -814,6 +814,7 @@ static u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] =
|
||||
{
|
||||
[TH_SYN] = 1,
|
||||
[TH_SYN|TH_ACK] = 1,
|
||||
[TH_SYN|TH_PUSH] = 1,
|
||||
[TH_SYN|TH_ACK|TH_PUSH] = 1,
|
||||
[TH_RST] = 1,
|
||||
[TH_RST|TH_ACK] = 1,
|
||||
|
@ -1701,10 +1701,8 @@ static void fib6_dump_end(struct netlink_callback *cb)
|
||||
fib6_walker_unlink(w);
|
||||
kfree(w);
|
||||
}
|
||||
if (cb->args[1]) {
|
||||
cb->done = (void*)cb->args[1];
|
||||
cb->args[1] = 0;
|
||||
}
|
||||
cb->done = (void*)cb->args[1];
|
||||
cb->args[1] = 0;
|
||||
}
|
||||
|
||||
static int fib6_dump_done(struct netlink_callback *cb)
|
||||
@ -1734,7 +1732,7 @@ int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
/*
|
||||
* 2. allocate and initialize walker.
|
||||
*/
|
||||
w = kmalloc(sizeof(*w), GFP_ATOMIC);
|
||||
w = kmalloc(sizeof(*w), GFP_KERNEL);
|
||||
if (w == NULL)
|
||||
return -ENOMEM;
|
||||
RT6_TRACE("dump<%p", w);
|
||||
|
@ -779,6 +779,7 @@ static u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] =
|
||||
{
|
||||
[TH_SYN] = 1,
|
||||
[TH_SYN|TH_ACK] = 1,
|
||||
[TH_SYN|TH_PUSH] = 1,
|
||||
[TH_SYN|TH_ACK|TH_PUSH] = 1,
|
||||
[TH_RST] = 1,
|
||||
[TH_RST|TH_ACK] = 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user