Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62833
b: refs/heads/master
c: 1e66239
h: refs/heads/master
i:
  62831: c3fbfd4
v: v3
  • Loading branch information
Linus Torvalds committed Jul 24, 2007
1 parent 18239b3 commit f3cfc06
Show file tree
Hide file tree
Showing 155 changed files with 1,574 additions and 1,023 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: 64a8170975947978ea4094dd6c4b1f41119d6ae6
refs/heads/master: 1e66239e23dd0422baf891bf6af0b65ac632b676
6 changes: 3 additions & 3 deletions trunk/Documentation/block/barrier.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ and how to prepare flush requests. Note that the term 'ordered' is
used to indicate the whole sequence of performing barrier requests
including draining and flushing.

typedef void (prepare_flush_fn)(request_queue_t *q, struct request *rq);
typedef void (prepare_flush_fn)(struct request_queue *q, struct request *rq);

int blk_queue_ordered(request_queue_t *q, unsigned ordered,
int blk_queue_ordered(struct request_queue *q, unsigned ordered,
prepare_flush_fn *prepare_flush_fn);

@q : the queue in question
Expand All @@ -92,7 +92,7 @@ int blk_queue_ordered(request_queue_t *q, unsigned ordered,
For example, SCSI disk driver's prepare_flush_fn looks like the
following.

static void sd_prepare_flush(request_queue_t *q, struct request *rq)
static void sd_prepare_flush(struct request_queue *q, struct request *rq)
{
memset(rq->cmd, 0, sizeof(rq->cmd));
rq->cmd_type = REQ_TYPE_BLOCK_PC;
Expand Down
10 changes: 5 additions & 5 deletions trunk/Documentation/block/biodoc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -740,12 +740,12 @@ Block now offers some simple generic functionality to help support command
queueing (typically known as tagged command queueing), ie manage more than
one outstanding command on a queue at any given time.

blk_queue_init_tags(request_queue_t *q, int depth)
blk_queue_init_tags(struct request_queue *q, int depth)

Initialize internal command tagging structures for a maximum
depth of 'depth'.

blk_queue_free_tags((request_queue_t *q)
blk_queue_free_tags((struct request_queue *q)

Teardown tag info associated with the queue. This will be done
automatically by block if blk_queue_cleanup() is called on a queue
Expand All @@ -754,15 +754,15 @@ one outstanding command on a queue at any given time.
The above are initialization and exit management, the main helpers during
normal operations are:

blk_queue_start_tag(request_queue_t *q, struct request *rq)
blk_queue_start_tag(struct request_queue *q, struct request *rq)

Start tagged operation for this request. A free tag number between
0 and 'depth' is assigned to the request (rq->tag holds this number),
and 'rq' is added to the internal tag management. If the maximum depth
for this queue is already achieved (or if the tag wasn't started for
some other reason), 1 is returned. Otherwise 0 is returned.

blk_queue_end_tag(request_queue_t *q, struct request *rq)
blk_queue_end_tag(struct request_queue *q, struct request *rq)

End tagged operation on this request. 'rq' is removed from the internal
book keeping structures.
Expand All @@ -781,7 +781,7 @@ queue. For instance, on IDE any tagged request error needs to clear both
the hardware and software block queue and enable the driver to sanely restart
all the outstanding requests. There's a third helper to do that:

blk_queue_invalidate_tags(request_queue_t *q)
blk_queue_invalidate_tags(struct request_queue *q)

Clear the internal block tag queue and re-add all the pending requests
to the request queue. The driver will receive them again on the
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/block/request.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ struct bio *bio DBI First bio in request

struct bio *biotail DBI Last bio in request

request_queue_t *q DB Request queue this request belongs to
struct request_queue *q DB Request queue this request belongs to

struct request_list *rl B Request list this request came from
4 changes: 2 additions & 2 deletions trunk/Documentation/gpio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pin ... that won't always match the specified output value, because of
issues including wire-OR and output latencies.

The get/set calls have no error returns because "invalid GPIO" should have
been reported earlier in gpio_set_direction(). However, note that not all
been reported earlier from gpio_direction_*(). However, note that not all
platforms can read the value of output pins; those that can't should always
return zero. Also, using these calls for GPIOs that can't safely be accessed
without sleeping (see below) is an error.
Expand Down Expand Up @@ -239,7 +239,7 @@ map between them using calls like:
Those return either the corresponding number in the other namespace, or
else a negative errno code if the mapping can't be done. (For example,
some GPIOs can't used as IRQs.) It is an unchecked error to use a GPIO
number that hasn't been marked as an input using gpio_set_direction(), or
number that wasn't set up as an input using gpio_direction_input(), or
to use an IRQ number that didn't originally come from gpio_to_irq().

These two mapping calls are expected to cost on the order of a single
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/iostats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Field 8 -- # of milliseconds spent writing
measured from __make_request() to end_that_request_last()).
Field 9 -- # of I/Os currently in progress
The only field that should go to zero. Incremented as requests are
given to appropriate request_queue_t and decremented as they finish.
given to appropriate struct request_queue and decremented as they finish.
Field 10 -- # of milliseconds spent doing I/Os
This field is increases so long as field 9 is nonzero.
Field 11 -- weighted # of milliseconds spent doing I/Os
Expand Down
3 changes: 1 addition & 2 deletions trunk/Documentation/lguest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ endif
include $(KBUILD_OUTPUT)/.config
LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000)

CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 \
-static -DLGUEST_GUEST_TOP="$(LGUEST_GUEST_TOP)" -Wl,-T,lguest.lds
CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -Wl,-T,lguest.lds
LDLIBS:=-lz

all: lguest.lds lguest
Expand Down
84 changes: 34 additions & 50 deletions trunk/Documentation/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ static bool verbose;
#define verbose(args...) \
do { if (verbose) printf(args); } while(0)
static int waker_fd;
static u32 top;

struct device_list
{
fd_set infds;
int max_infd;

struct lguest_device_desc *descs;
struct device *dev;
struct device **lastdev;
};
Expand Down Expand Up @@ -324,8 +326,7 @@ static void concat(char *dst, char *args[])
static int tell_kernel(u32 pgdir, u32 start, u32 page_offset)
{
u32 args[] = { LHREQ_INITIALIZE,
LGUEST_GUEST_TOP/getpagesize(), /* Just below us */
pgdir, start, page_offset };
top/getpagesize(), pgdir, start, page_offset };
int fd;

fd = open_or_die("/dev/lguest", O_RDWR);
Expand Down Expand Up @@ -382,7 +383,7 @@ static int setup_waker(int lguest_fd, struct device_list *device_list)
static void *_check_pointer(unsigned long addr, unsigned int size,
unsigned int line)
{
if (addr >= LGUEST_GUEST_TOP || addr + size >= LGUEST_GUEST_TOP)
if (addr >= top || addr + size >= top)
errx(1, "%s:%i: Invalid address %li", __FILE__, line, addr);
return (void *)addr;
}
Expand Down Expand Up @@ -629,24 +630,26 @@ static void handle_input(int fd, struct device_list *devices)
}
}

static struct lguest_device_desc *new_dev_desc(u16 type, u16 features,
u16 num_pages)
static struct lguest_device_desc *
new_dev_desc(struct lguest_device_desc *descs,
u16 type, u16 features, u16 num_pages)
{
static unsigned long top = LGUEST_GUEST_TOP;
struct lguest_device_desc *desc;
unsigned int i;

desc = malloc(sizeof(*desc));
desc->type = type;
desc->num_pages = num_pages;
desc->features = features;
desc->status = 0;
if (num_pages) {
top -= num_pages*getpagesize();
map_zeroed_pages(top, num_pages);
desc->pfn = top / getpagesize();
} else
desc->pfn = 0;
return desc;
for (i = 0; i < LGUEST_MAX_DEVICES; i++) {
if (!descs[i].type) {
descs[i].type = type;
descs[i].features = features;
descs[i].num_pages = num_pages;
if (num_pages) {
map_zeroed_pages(top, num_pages);
descs[i].pfn = top/getpagesize();
top += num_pages*getpagesize();
}
return &descs[i];
}
}
errx(1, "too many devices");
}

static struct device *new_device(struct device_list *devices,
Expand All @@ -669,7 +672,7 @@ static struct device *new_device(struct device_list *devices,
dev->fd = fd;
if (handle_input)
set_fd(dev->fd, devices);
dev->desc = new_dev_desc(type, features, num_pages);
dev->desc = new_dev_desc(devices->descs, type, features, num_pages);
dev->mem = (void *)(dev->desc->pfn * getpagesize());
dev->handle_input = handle_input;
dev->watch_key = (unsigned long)dev->mem + watch_off;
Expand Down Expand Up @@ -866,30 +869,6 @@ static void setup_tun_net(const char *arg, struct device_list *devices)
verbose("attached to bridge: %s\n", br_name);
}

/* Now we know how much memory we have, we copy in device descriptors */
static void map_device_descriptors(struct device_list *devs, unsigned long mem)
{
struct device *i;
unsigned int num;
struct lguest_device_desc *descs;

/* Device descriptor array sits just above top of normal memory */
descs = map_zeroed_pages(mem, 1);

for (i = devs->dev, num = 0; i; i = i->next, num++) {
if (num == LGUEST_MAX_DEVICES)
errx(1, "too many devices");
verbose("Device %i: %s\n", num,
i->desc->type == LGUEST_DEVICE_T_NET ? "net"
: i->desc->type == LGUEST_DEVICE_T_CONSOLE ? "console"
: i->desc->type == LGUEST_DEVICE_T_BLOCK ? "block"
: "unknown");
descs[num] = *i->desc;
free(i->desc);
i->desc = &descs[num];
}
}

static void __attribute__((noreturn))
run_guest(int lguest_fd, struct device_list *device_list)
{
Expand Down Expand Up @@ -934,8 +913,8 @@ static void usage(void)

int main(int argc, char *argv[])
{
unsigned long mem, pgdir, start, page_offset, initrd_size = 0;
int c, lguest_fd;
unsigned long mem = 0, pgdir, start, page_offset, initrd_size = 0;
int i, c, lguest_fd;
struct device_list device_list;
void *boot = (void *)0;
const char *initrd_name = NULL;
Expand All @@ -945,6 +924,15 @@ int main(int argc, char *argv[])
device_list.lastdev = &device_list.dev;
FD_ZERO(&device_list.infds);

/* We need to know how much memory so we can allocate devices. */
for (i = 1; i < argc; i++) {
if (argv[i][0] != '-') {
mem = top = atoi(argv[i]) * 1024 * 1024;
device_list.descs = map_zeroed_pages(top, 1);
top += getpagesize();
break;
}
}
while ((c = getopt_long(argc, argv, "v", opts, NULL)) != EOF) {
switch (c) {
case 'v':
Expand Down Expand Up @@ -974,16 +962,12 @@ int main(int argc, char *argv[])
setup_console(&device_list);

/* First we map /dev/zero over all of guest-physical memory. */
mem = atoi(argv[optind]) * 1024 * 1024;
map_zeroed_pages(0, mem / getpagesize());

/* Now we load the kernel */
start = load_kernel(open_or_die(argv[optind+1], O_RDONLY),
&page_offset);

/* Write the device descriptors into memory. */
map_device_descriptors(&device_list, mem);

/* Map the initrd image if requested */
if (initrd_name) {
initrd_size = load_initrd(initrd_name, mem);
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/arm/plat-omap/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ static void mbox_rx_work(struct work_struct *work)
/*
* Mailbox interrupt handler
*/
static void mbox_txq_fn(request_queue_t * q)
static void mbox_txq_fn(struct request_queue * q)
{
}

static void mbox_rxq_fn(request_queue_t * q)
static void mbox_rxq_fn(struct request_queue * q)
{
}

Expand All @@ -180,7 +180,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox)
{
struct request *rq;
mbox_msg_t msg;
request_queue_t *q = mbox->rxq->queue;
struct request_queue *q = mbox->rxq->queue;

disable_mbox_irq(mbox, IRQ_RX);

Expand Down Expand Up @@ -297,7 +297,7 @@ static struct omap_mbox_queue *mbox_queue_alloc(struct omap_mbox *mbox,
request_fn_proc * proc,
void (*work) (struct work_struct *))
{
request_queue_t *q;
struct request_queue *q;
struct omap_mbox_queue *mq;

mq = kzalloc(sizeof(struct omap_mbox_queue), GFP_KERNEL);
Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/powerpc/platforms/cell/spufs/spufs.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@ enum {
struct spu_context_ops;
struct spu_gang;

enum {
SPU_SCHED_WAS_ACTIVE, /* was active upon spu_acquire_saved() */
};

/* ctx->sched_flags */
enum {
SPU_SCHED_NOTIFY_ACTIVE,
SPU_SCHED_WAS_ACTIVE, /* was active upon spu_acquire_saved() */
};

struct spu_context {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_IPMI_HANDLER is not set
# CONFIG_WATCHDOG is not set
CONFIG_HW_RANDOM=m
CONFIG_RTC=m
CONFIG_JS_RTC=m
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_DRM is not set
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/sparc/kernel/sparc_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one));
EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl));
EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one));

EXPORT_SYMBOL(BTFIXUP_CALL(pgprot_noncached));

#ifdef CONFIG_SBUS
EXPORT_SYMBOL(sbus_root);
EXPORT_SYMBOL(dma_chain);
Expand Down Expand Up @@ -260,6 +262,7 @@ EXPORT_SYMBOL(__memmove);
/* Moving data to/from userspace. */
EXPORT_SYMBOL(__copy_user);
EXPORT_SYMBOL(__strncpy_from_user);
EXPORT_SYMBOL(__strnlen_user);

/* Networking helper routines. */
EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/sparc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ SECTIONS
__ex_table : { *(__ex_table) }
__stop___ex_table = .;

NOTES

. = ALIGN(4096);
__init_begin = .;
_sinittext = .;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/lib/memset.S
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ __bzero:
8:
add %o0, 1, %o0
subcc %o1, 1, %o1
bne,a 8b
bne 8b
EX(stb %g3, [%o0 - 1], add %o1, 1)
0:
retl
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/sparc/prom/printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/

#include <linux/kernel.h>
#include <linux/module.h>

#include <asm/openprom.h>
#include <asm/oplib.h>
Expand Down Expand Up @@ -44,3 +45,4 @@ prom_printf(char *fmt, ...)

prom_write(ppbuf, i);
}
EXPORT_SYMBOL(prom_printf);
Loading

0 comments on commit f3cfc06

Please sign in to comment.