Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115501
b: refs/heads/master
c: 6388a38
h: refs/heads/master
i:
  115499: e9f37a6
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Oct 17, 2008
1 parent 0b07f2a commit 880a54c
Show file tree
Hide file tree
Showing 126 changed files with 1,325 additions and 8,480 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8eb88c80d444fd249edaa7d895666cde79e7b3b8
refs/heads/master: 6388a388ffb720f40fc8046c261252ea2be9c12f
2 changes: 0 additions & 2 deletions trunk/arch/cris/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# License. See the file "COPYING" in the main directory of this archive
# for more details.

KBUILD_DEFCONFIG := etrax-100lx_v2_defconfig

arch-y := v10
arch-$(CONFIG_ETRAX_ARCH_V10) := v10
arch-$(CONFIG_ETRAX_ARCH_V32) := v32
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/cris/arch-v10/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

asflags-y += $(LINUXINCLUDE)
ccflags-y += -O2 $(LINUXINCLUDE)
ldflags-y += -T $(srctree)/$(src)/decompress.lds
ldflags-y += -T $(srctree)/$(obj)/decompress.ld
OBJECTS = $(obj)/head.o $(obj)/misc.o
OBJCOPYFLAGS = -O binary --remove-section=.bss

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/cris/arch-v10/boot/rescue/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

ccflags-y += -O2 $(LINUXINCLUDE)
asflags-y += $(LINUXINCLUDE)
ldflags-y += -T $(srctree)/$(src)/rescue.lds
ldflags-y += -T $(srctree)/$(obj)/rescue.ld
OBJCOPYFLAGS = -O binary --remove-section=.bss
obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
OBJECT := $(obj)/head.o
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion trunk/arch/cris/arch-v32/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

asflags-y += -I $(srctree)/include/asm/mach/ -I $(srctree)/include/asm/arch
ccflags-y += -O2 -I $(srctree)/include/asm/mach/ -I $(srctree)/include/asm/arch
ldflags-y += -T $(srctree)/$(src)/decompress.lds
ldflags-y += -T $(srctree)/$(obj)/decompress.ld
OBJECTS = $(obj)/head.o $(obj)/misc.o
OBJCOPYFLAGS = -O binary --remove-section=.bss

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/cris/arch-v32/boot/rescue/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ccflags-y += -O2 -I $(srctree)/include/asm/arch/mach/ \
-I $(srctree)/include/asm/arch
asflags-y += -I $(srctree)/include/asm/arch/mach/ -I $(srctree)/include/asm/arch
LD = gcc-cris -mlinux -march=v32 -nostdlib
ldflags-y += -T $(srctree)/$(src)/rescue.lds
ldflags-y += -T $(srctree)/$(obj)/rescue.ld
LDPOSTFLAGS = -lgcc
OBJCOPYFLAGS = -O binary --remove-section=.bss
obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
37 changes: 7 additions & 30 deletions trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ void __generic_unplug_device(struct request_queue *q)

q->request_fn(q);
}
EXPORT_SYMBOL(__generic_unplug_device);

/**
* generic_unplug_device - fire a request queue
Expand Down Expand Up @@ -324,9 +325,6 @@ EXPORT_SYMBOL(blk_unplug);

static void blk_invoke_request_fn(struct request_queue *q)
{
if (unlikely(blk_queue_stopped(q)))
return;

/*
* one level of recursion is ok and is much faster than kicking
* the unplug handling
Expand Down Expand Up @@ -401,13 +399,8 @@ void blk_sync_queue(struct request_queue *q)
EXPORT_SYMBOL(blk_sync_queue);

/**
* __blk_run_queue - run a single device queue
* blk_run_queue - run a single device queue
* @q: The queue to run
*
* Description:
* See @blk_run_queue. This variant must be called with the queue lock
* held and interrupts disabled.
*
*/
void __blk_run_queue(struct request_queue *q)
{
Expand All @@ -425,12 +418,6 @@ EXPORT_SYMBOL(__blk_run_queue);
/**
* blk_run_queue - run a single device queue
* @q: The queue to run
*
* Description:
* Invoke request handling on this queue, if it has pending work to do.
* May be used to restart queueing when a request has completed. Also
* See @blk_start_queueing.
*
*/
void blk_run_queue(struct request_queue *q)
{
Expand Down Expand Up @@ -514,7 +501,6 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
init_timer(&q->unplug_timer);
setup_timer(&q->timeout, blk_rq_timed_out_timer, (unsigned long) q);
INIT_LIST_HEAD(&q->timeout_list);
INIT_WORK(&q->unplug_work, blk_unplug_work);

kobject_init(&q->kobj, &blk_queue_ktype);

Expand Down Expand Up @@ -898,8 +884,7 @@ EXPORT_SYMBOL(blk_get_request);
*
* This is basically a helper to remove the need to know whether a queue
* is plugged or not if someone just wants to initiate dispatch of requests
* for this queue. Should be used to start queueing on a device outside
* of ->request_fn() context. Also see @blk_run_queue.
* for this queue.
*
* The queue lock must be held with interrupts disabled.
*/
Expand Down Expand Up @@ -1018,9 +1003,8 @@ static void part_round_stats_single(int cpu, struct hd_struct *part,
}

/**
* part_round_stats() - Round off the performance stats on a struct disk_stats.
* @cpu: cpu number for stats access
* @part: target partition
* part_round_stats() - Round off the performance stats on a struct
* disk_stats.
*
* The average IO queue length and utilisation statistics are maintained
* by observing the current state of the queue length and the amount of
Expand Down Expand Up @@ -1091,15 +1075,8 @@ void init_request_from_bio(struct request *req, struct bio *bio)
/*
* inherit FAILFAST from bio (for read-ahead, and explicit FAILFAST)
*/
if (bio_rw_ahead(bio))
req->cmd_flags |= (REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
REQ_FAILFAST_DRIVER);
if (bio_failfast_dev(bio))
req->cmd_flags |= REQ_FAILFAST_DEV;
if (bio_failfast_transport(bio))
req->cmd_flags |= REQ_FAILFAST_TRANSPORT;
if (bio_failfast_driver(bio))
req->cmd_flags |= REQ_FAILFAST_DRIVER;
if (bio_rw_ahead(bio) || bio_failfast(bio))
req->cmd_flags |= REQ_FAILFAST;

/*
* REQ_BARRIER implies no merging, but lets make it explicit
Expand Down
20 changes: 2 additions & 18 deletions trunk/block/blk-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,12 @@ void blk_recalc_rq_segments(struct request *rq)
continue;
}
new_segment:
if (nr_phys_segs == 1 && seg_size > rq->bio->bi_seg_front_size)
rq->bio->bi_seg_front_size = seg_size;

nr_phys_segs++;
bvprv = bv;
seg_size = bv->bv_len;
highprv = high;
}

if (nr_phys_segs == 1 && seg_size > rq->bio->bi_seg_front_size)
rq->bio->bi_seg_front_size = seg_size;
if (seg_size > rq->biotail->bi_seg_back_size)
rq->biotail->bi_seg_back_size = seg_size;

rq->nr_phys_segments = nr_phys_segs;
}

Expand All @@ -114,8 +106,7 @@ static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio,
if (!test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags))
return 0;

if (bio->bi_seg_back_size + nxt->bi_seg_front_size >
q->max_segment_size)
if (bio->bi_size + nxt->bi_size > q->max_segment_size)
return 0;

if (!bio_has_data(bio))
Expand Down Expand Up @@ -318,8 +309,6 @@ static int ll_merge_requests_fn(struct request_queue *q, struct request *req,
struct request *next)
{
int total_phys_segments;
unsigned int seg_size =
req->biotail->bi_seg_back_size + next->bio->bi_seg_front_size;

/*
* First check if the either of the requests are re-queued
Expand All @@ -335,13 +324,8 @@ static int ll_merge_requests_fn(struct request_queue *q, struct request *req,
return 0;

total_phys_segments = req->nr_phys_segments + next->nr_phys_segments;
if (blk_phys_contig_segment(q, req->biotail, next->bio)) {
if (req->nr_phys_segments == 1)
req->bio->bi_seg_front_size = seg_size;
if (next->nr_phys_segments == 1)
next->biotail->bi_seg_back_size = seg_size;
if (blk_phys_contig_segment(q, req->biotail, next->bio))
total_phys_segments--;
}

if (total_phys_segments > q->max_phys_segments)
return 0;
Expand Down
2 changes: 2 additions & 0 deletions trunk/block/blk-settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn)
if (q->unplug_delay == 0)
q->unplug_delay = 1;

INIT_WORK(&q->unplug_work, blk_unplug_work);

q->unplug_timer.function = blk_unplug_timeout;
q->unplug_timer.data = (unsigned long)q;

Expand Down
1 change: 0 additions & 1 deletion trunk/block/blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ void blk_unplug_timeout(unsigned long data);
void blk_rq_timed_out_timer(unsigned long data);
void blk_delete_timer(struct request *);
void blk_add_timer(struct request *);
void __generic_unplug_device(struct request_queue *);

/*
* Internal atomic flags for request handling
Expand Down
16 changes: 11 additions & 5 deletions trunk/block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ void elv_insert(struct request_queue *q, struct request *rq, int where)
* processing.
*/
blk_remove_plug(q);
blk_start_queueing(q);
q->request_fn(q);
break;

case ELEVATOR_INSERT_SORT:
Expand Down Expand Up @@ -950,7 +950,7 @@ void elv_completed_request(struct request_queue *q, struct request *rq)
blk_ordered_cur_seq(q) == QUEUE_ORDSEQ_DRAIN &&
blk_ordered_req_seq(first_rq) > QUEUE_ORDSEQ_DRAIN) {
blk_ordered_complete_seq(q, QUEUE_ORDSEQ_DRAIN, 0);
blk_start_queueing(q);
q->request_fn(q);
}
}
}
Expand Down Expand Up @@ -1109,7 +1109,8 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e)
elv_drain_elevator(q);

while (q->rq.elvpriv) {
blk_start_queueing(q);
blk_remove_plug(q);
q->request_fn(q);
spin_unlock_irq(q->queue_lock);
msleep(10);
spin_lock_irq(q->queue_lock);
Expand Down Expand Up @@ -1165,10 +1166,15 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name,
size_t count)
{
char elevator_name[ELV_NAME_MAX];
size_t len;
struct elevator_type *e;

strlcpy(elevator_name, name, sizeof(elevator_name));
strstrip(elevator_name);
elevator_name[sizeof(elevator_name) - 1] = '\0';
strncpy(elevator_name, name, sizeof(elevator_name) - 1);
len = strlen(elevator_name);

if (len && elevator_name[len - 1] == '\n')
elevator_name[len - 1] = '\0';

e = elevator_get(elevator_name);
if (!e) {
Expand Down
3 changes: 2 additions & 1 deletion trunk/block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ static int blk_mangle_minor(int minor)
/**
* blk_alloc_devt - allocate a dev_t for a partition
* @part: partition to allocate dev_t for
* @gfp_mask: memory allocation flag
* @devt: out parameter for resulting dev_t
*
* Allocate a dev_t for block device.
Expand Down Expand Up @@ -534,7 +535,7 @@ void unlink_gendisk(struct gendisk *disk)
/**
* get_gendisk - get partitioning information for a given device
* @devt: device to get partitioning information for
* @partno: returned partition index
* @part: returned partition index
*
* This function gets the structure containing partitioning
* information for the given device @devt.
Expand Down
72 changes: 43 additions & 29 deletions trunk/drivers/hwmon/lm90.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* lm90.c - Part of lm_sensors, Linux kernel modules for hardware
* monitoring
* Copyright (C) 2003-2006 Jean Delvare <khali@linux-fr.org>
* Copyright (C) 2003-2008 Jean Delvare <khali@linux-fr.org>
*
* Based on the lm83 driver. The LM90 is a sensor chip made by National
* Semiconductor. It reports up to two temperatures (its own plus up to
Expand Down Expand Up @@ -736,6 +736,38 @@ static int lm90_remove(struct i2c_client *client)
return 0;
}

static int lm90_read16(struct i2c_client *client, u8 regh, u8 regl, u16 *value)
{
int err;
u8 oldh, newh, l;

/*
* There is a trick here. We have to read two registers to have the
* sensor temperature, but we have to beware a conversion could occur
* inbetween the readings. The datasheet says we should either use
* the one-shot conversion register, which we don't want to do
* (disables hardware monitoring) or monitor the busy bit, which is
* impossible (we can't read the values and monitor that bit at the
* exact same time). So the solution used here is to read the high
* byte once, then the low byte, then the high byte again. If the new
* high byte matches the old one, then we have a valid reading. Else
* we have to read the low byte again, and now we believe we have a
* correct reading.
*/
if ((err = lm90_read_reg(client, regh, &oldh))
|| (err = lm90_read_reg(client, regl, &l))
|| (err = lm90_read_reg(client, regh, &newh)))
return err;
if (oldh != newh) {
err = lm90_read_reg(client, regl, &l);
if (err)
return err;
}
*value = (newh << 8) | l;

return 0;
}

static struct lm90_data *lm90_update_device(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
Expand All @@ -744,7 +776,7 @@ static struct lm90_data *lm90_update_device(struct device *dev)
mutex_lock(&data->update_lock);

if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) {
u8 oldh, newh, l;
u8 h, l;

dev_dbg(&client->dev, "Updating lm90 data.\n");
lm90_read_reg(client, LM90_REG_R_LOCAL_TEMP, &data->temp8[0]);
Expand All @@ -754,39 +786,21 @@ static struct lm90_data *lm90_update_device(struct device *dev)
lm90_read_reg(client, LM90_REG_R_REMOTE_CRIT, &data->temp8[4]);
lm90_read_reg(client, LM90_REG_R_TCRIT_HYST, &data->temp_hyst);

/*
* There is a trick here. We have to read two registers to
* have the remote sensor temperature, but we have to beware
* a conversion could occur inbetween the readings. The
* datasheet says we should either use the one-shot
* conversion register, which we don't want to do (disables
* hardware monitoring) or monitor the busy bit, which is
* impossible (we can't read the values and monitor that bit
* at the exact same time). So the solution used here is to
* read the high byte once, then the low byte, then the high
* byte again. If the new high byte matches the old one,
* then we have a valid reading. Else we have to read the low
* byte again, and now we believe we have a correct reading.
*/
if (lm90_read_reg(client, LM90_REG_R_REMOTE_TEMPH, &oldh) == 0
&& lm90_read_reg(client, LM90_REG_R_REMOTE_TEMPL, &l) == 0
&& lm90_read_reg(client, LM90_REG_R_REMOTE_TEMPH, &newh) == 0
&& (newh == oldh
|| lm90_read_reg(client, LM90_REG_R_REMOTE_TEMPL, &l) == 0))
data->temp11[0] = (newh << 8) | l;

if (lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH, &newh) == 0
lm90_read16(client, LM90_REG_R_REMOTE_TEMPH,
LM90_REG_R_REMOTE_TEMPL, &data->temp11[0]);

if (lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH, &h) == 0
&& lm90_read_reg(client, LM90_REG_R_REMOTE_LOWL, &l) == 0)
data->temp11[1] = (newh << 8) | l;
if (lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHH, &newh) == 0
data->temp11[1] = (h << 8) | l;
if (lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHH, &h) == 0
&& lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHL, &l) == 0)
data->temp11[2] = (newh << 8) | l;
data->temp11[2] = (h << 8) | l;
if (data->kind != max6657) {
if (lm90_read_reg(client, LM90_REG_R_REMOTE_OFFSH,
&newh) == 0
&h) == 0
&& lm90_read_reg(client, LM90_REG_R_REMOTE_OFFSL,
&l) == 0)
data->temp11[3] = (newh << 8) | l;
data->temp11[3] = (h << 8) | l;
}
lm90_read_reg(client, LM90_REG_R_STATUS, &data->alarms);

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1493,8 +1493,8 @@ void ide_do_drive_cmd(ide_drive_t *drive, struct request *rq)

spin_lock_irqsave(&ide_lock, flags);
hwgroup->rq = NULL;
__elv_add_request(drive->queue, rq, ELEVATOR_INSERT_FRONT, 0);
blk_start_queueing(drive->queue);
__elv_add_request(drive->queue, rq, ELEVATOR_INSERT_FRONT, 1);
__generic_unplug_device(drive->queue);
spin_unlock_irqrestore(&ide_lock, flags);
}

Expand Down
Loading

0 comments on commit 880a54c

Please sign in to comment.