Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80929
b: refs/heads/master
c: 8c4ac09
h: refs/heads/master
i:
  80927: 6e9969f
v: v3
  • Loading branch information
Stefan Richter committed Jan 30, 2008
1 parent bc129ef commit 593ac1d
Show file tree
Hide file tree
Showing 184 changed files with 9,701 additions and 15,183 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: 5bdeae46be6dfe9efa44a548bd622af325f4bdb4
refs/heads/master: 8c4ac0949f7779cd4cc8c618f1b07e6113682010
8 changes: 1 addition & 7 deletions trunk/Documentation/DocBook/kernel-api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,7 @@ X!Edrivers/pnp/system.c

<chapter id="blkdev">
<title>Block Devices</title>
!Eblock/blk-core.c
!Eblock/blk-map.c
!Iblock/blk-sysfs.c
!Eblock/blk-settings.c
!Eblock/blk-exec.c
!Eblock/blk-barrier.c
!Eblock/blk-tag.c
!Eblock/ll_rw_blk.c
</chapter>

<chapter id="chrdev">
Expand Down
49 changes: 6 additions & 43 deletions trunk/Documentation/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ static void *guest_base;
/* The maximum guest physical address allowed, and maximum possible. */
static unsigned long guest_limit, guest_max;

/* a per-cpu variable indicating whose vcpu is currently running */
static unsigned int __thread cpu_id;

/* This is our list of devices. */
struct device_list
{
Expand Down Expand Up @@ -156,9 +153,6 @@ struct virtqueue
void (*handle_output)(int fd, struct virtqueue *me);
};

/* Remember the arguments to the program so we can "reboot" */
static char **main_args;

/* Since guest is UP and we don't run at the same time, we don't need barriers.
* But I include them in the code in case others copy it. */
#define wmb()
Expand Down Expand Up @@ -560,7 +554,7 @@ static void wake_parent(int pipefd, int lguest_fd)
else
FD_CLR(-fd - 1, &devices.infds);
} else /* Send LHREQ_BREAK command. */
pwrite(lguest_fd, args, sizeof(args), cpu_id);
write(lguest_fd, args, sizeof(args));
}
}

Expand Down Expand Up @@ -1495,9 +1489,7 @@ static void setup_block_file(const char *filename)

/* Create stack for thread and run it */
stack = malloc(32768);
/* SIGCHLD - We dont "wait" for our cloned thread, so prevent it from
* becoming a zombie. */
if (clone(io_thread, stack + 32768, CLONE_VM | SIGCHLD, dev) == -1)
if (clone(io_thread, stack + 32768, CLONE_VM, dev) == -1)
err(1, "Creating clone");

/* We don't need to keep the I/O thread's end of the pipes open. */
Expand All @@ -1507,21 +1499,7 @@ static void setup_block_file(const char *filename)
verbose("device %u: virtblock %llu sectors\n",
devices.device_num, cap);
}
/* That's the end of device setup. :*/

/* Reboot */
static void __attribute__((noreturn)) restart_guest(void)
{
unsigned int i;

/* Closing pipes causes the waker thread and io_threads to die, and
* closing /dev/lguest cleans up the Guest. Since we don't track all
* open fds, we simply close everything beyond stderr. */
for (i = 3; i < FD_SETSIZE; i++)
close(i);
execv(main_args[0], main_args);
err(1, "Could not exec %s", main_args[0]);
}
/* That's the end of device setup. */

/*L:220 Finally we reach the core of the Launcher, which runs the Guest, serves
* its input and output, and finally, lays it to rest. */
Expand All @@ -1533,8 +1511,7 @@ static void __attribute__((noreturn)) run_guest(int lguest_fd)
int readval;

/* We read from the /dev/lguest device to run the Guest. */
readval = pread(lguest_fd, &notify_addr,
sizeof(notify_addr), cpu_id);
readval = read(lguest_fd, &notify_addr, sizeof(notify_addr));

/* One unsigned long means the Guest did HCALL_NOTIFY */
if (readval == sizeof(notify_addr)) {
Expand All @@ -1544,23 +1521,16 @@ static void __attribute__((noreturn)) run_guest(int lguest_fd)
/* ENOENT means the Guest died. Reading tells us why. */
} else if (errno == ENOENT) {
char reason[1024] = { 0 };
pread(lguest_fd, reason, sizeof(reason)-1, cpu_id);
read(lguest_fd, reason, sizeof(reason)-1);
errx(1, "%s", reason);
/* ERESTART means that we need to reboot the guest */
} else if (errno == ERESTART) {
restart_guest();
/* EAGAIN means the Waker wanted us to look at some input.
* Anything else means a bug or incompatible change. */
} else if (errno != EAGAIN)
err(1, "Running guest failed");

/* Only service input on thread for CPU 0. */
if (cpu_id != 0)
continue;

/* Service input, then unset the BREAK to release the Waker. */
handle_input(lguest_fd);
if (pwrite(lguest_fd, args, sizeof(args), cpu_id) < 0)
if (write(lguest_fd, args, sizeof(args)) < 0)
err(1, "Resetting break");
}
}
Expand Down Expand Up @@ -1601,12 +1571,6 @@ int main(int argc, char *argv[])
/* If they specify an initrd file to load. */
const char *initrd_name = NULL;

/* Save the args: we "reboot" by execing ourselves again. */
main_args = argv;
/* We don't "wait" for the children, so prevent them from becoming
* zombies. */
signal(SIGCHLD, SIG_IGN);

/* First we initialize the device list. Since console and network
* device receive input from a file descriptor, we keep an fdset
* (infds) and the maximum fd number (max_infd) with the head of the
Expand All @@ -1618,7 +1582,6 @@ int main(int argc, char *argv[])
devices.lastdev = &devices.dev;
devices.next_irq = 1;

cpu_id = 0;
/* We need to know how much memory so we can set up the device
* descriptor and memory pages for the devices as we parse the command
* line. So we quickly look through the arguments to find the amount
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/ia64/hp/sim/simscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ static struct scsi_host_template driver_template = {
.max_sectors = 1024,
.cmd_per_lun = SIMSCSI_REQ_QUEUE_LEN,
.use_clustering = DISABLE_CLUSTERING,
.use_sg_chaining = ENABLE_SG_CHAINING,
};

static int __init
Expand Down
13 changes: 9 additions & 4 deletions trunk/arch/powerpc/kernel/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#include <asm/iseries/hv_call_xm.h>
#include <asm/iseries/iommu.h>

extern struct kset devices_subsys; /* needed for vio_find_name() */

static struct bus_type vio_bus_type;

static struct vio_dev vio_bus_device = { /* fake "parent" device */
Expand Down Expand Up @@ -359,16 +361,19 @@ EXPORT_SYMBOL(vio_get_attribute);
#ifdef CONFIG_PPC_PSERIES
/* vio_find_name() - internal because only vio.c knows how we formatted the
* kobject name
* XXX once vio_bus_type.devices is actually used as a kset in
* drivers/base/bus.c, this function should be removed in favor of
* "device_find(kobj_name, &vio_bus_type)"
*/
static struct vio_dev *vio_find_name(const char *name)
static struct vio_dev *vio_find_name(const char *kobj_name)
{
struct device *found;
struct kobject *found;

found = bus_find_device_by_name(&vio_bus_type, NULL, name);
found = kset_find_obj(&devices_subsys, kobj_name);
if (!found)
return NULL;

return to_vio_dev(found);
return to_vio_dev(container_of(found, struct device, kobj));
}

/**
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ config ARCH_SUPPORTS_OPROFILE
bool
default y

select HAVE_KVM

config ZONE_DMA32
bool
Expand Down Expand Up @@ -1599,6 +1598,4 @@ source "security/Kconfig"

source "crypto/Kconfig"

source "arch/x86/kvm/Kconfig"

source "lib/Kconfig"
2 changes: 0 additions & 2 deletions trunk/arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ else
KBUILD_DEFCONFIG := $(ARCH)_defconfig
endif

core-$(CONFIG_KVM) += arch/x86/kvm/

# BITS is used as extension for files which are available in a 32 bit
# and a 64 bit version to simplify shared Makefiles.
# e.g.: obj-y += foo_$(BITS).o
Expand Down
88 changes: 0 additions & 88 deletions trunk/arch/x86/kvm/irq.h

This file was deleted.

50 changes: 0 additions & 50 deletions trunk/arch/x86/kvm/lapic.h

This file was deleted.

Loading

0 comments on commit 593ac1d

Please sign in to comment.