Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62911
b: refs/heads/master
c: a4fb212
h: refs/heads/master
i:
  62909: 3f8c93d
  62907: 0f3eee2
  62903: 6b88887
  62895: 1d2c0c8
  62879: 9f8b589
  62847: 738901c
v: v3
  • Loading branch information
Linus Torvalds committed Jul 25, 2007
1 parent cb8045f commit 00e8fd3
Show file tree
Hide file tree
Showing 260 changed files with 3,516 additions and 2,281 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: 323ef30af3a0da47cc761b04b262d98d0fe79126
refs/heads/master: a4fb2122f1fc4a22bd6a5b8a195b952c2d31c54d
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
24 changes: 24 additions & 0 deletions trunk/arch/m68knommu/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,18 @@ config XCOPILOT_BUGS
help
Support the bugs of Xcopilot.

config UC5272
bool 'Arcturus Networks uC5272 dimm board support'
depends on M5272
help
Support for the Arcturus Networks uC5272 dimm board.

config UC5282
bool "Arcturus Networks uC5282 board support"
depends on M528x
help
Support for the Arcturus Networks uC5282 dimm board.

config UCSIMM
bool "uCsimm module support"
depends on M68EZ328
Expand Down Expand Up @@ -342,6 +354,18 @@ config SOM5282EM
depends on M528x
help
Support for the EMAC.Inc SOM5282EM module.

config WILDFIRE
bool "Intec Automation Inc. WildFire board support"
depends on M528x
help
Support for the Intec Automation Inc. WildFire.

config WILDFIREMOD
bool "Intec Automation Inc. WildFire module support"
depends on M528x
help
Support for the Intec Automation Inc. WildFire module.

config ARN5307
bool "Arnewsh 5307 board support"
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/m68knommu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ platform-$(CONFIG_M5407) := 5407
PLATFORM := $(platform-y)

board-$(CONFIG_PILOT) := pilot
board-$(CONFIG_UC5272) := UC5272
board-$(CONFIG_UC5282) := UC5282
board-$(CONFIG_UCSIMM) := ucsimm
board-$(CONFIG_UCDIMM) := ucdimm
board-$(CONFIG_UCQUICC) := uCquicc
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/m68knommu/kernel/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/device.h>
#include <asm/io.h>

void *dma_alloc_coherent(struct device *dev, size_t size,
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/m68knommu/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ void setup_arch(char **cmdline_p)

config_BSP(&command_line[0], sizeof(command_line));

#if defined(CONFIG_BOOTPARAM)
strncpy(&command_line[0], CONFIG_BOOTPARAM_STRING, sizeof(command_line));
command_line[sizeof(command_line) - 1] = 0;
#endif

printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n");

#ifdef CONFIG_UCDIMM
Expand Down
8 changes: 0 additions & 8 deletions trunk/arch/m68knommu/platform/5206/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,6 @@ int mcf_timerirqpending(int timer)
void config_BSP(char *commandp, int size)
{
mcf_setimr(MCFSIM_IMR_MASKALL);

#if defined(CONFIG_BOOTPARAM)
strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
commandp[size-1] = 0;
#else
memset(commandp, 0, size);
#endif

mach_sched_init = coldfire_timer_init;
mach_tick = coldfire_tick;
mach_gettimeoffset = coldfire_timer_offset;
Expand Down
Loading

0 comments on commit 00e8fd3

Please sign in to comment.