Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95998
b: refs/heads/master
c: f74d505
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed May 5, 2008
1 parent 3954b12 commit 4427fbf
Show file tree
Hide file tree
Showing 39 changed files with 653 additions and 189 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: 2961b423037da60a8cb230963ee0d8c04473d73b
refs/heads/master: f74d505b58d36ceeef10e459094f0eb760681165
24 changes: 0 additions & 24 deletions trunk/Documentation/kbuild/kconfig-language.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,27 +377,3 @@ config FOO

limits FOO to module (=m) or disabled (=n).


Build limited by a third config symbol which may be =y or =m
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A common idiom that we see (and sometimes have problems with) is this:

When option C in B (module or subsystem) uses interfaces from A (module
or subsystem), and both A and B are tristate (could be =y or =m if they
were independent of each other, but they aren't), then we need to limit
C such that it cannot be built statically if A is built as a loadable
module. (C already depends on B, so there is no dependency issue to
take care of here.)

If A is linked statically into the kernel image, C can be built
statically or as loadable module(s). However, if A is built as loadable
module(s), then C must be restricted to loadable module(s) also. This
can be expressed in kconfig language as:

config C
depends on A = y || A = B

or for real examples, use this command in a kernel tree:

$ find . -name Kconfig\* | xargs grep -ns "depends on.*=.*||.*=" | grep -v orig

6 changes: 6 additions & 0 deletions trunk/arch/powerpc/kvm/booke_guest.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
{ "inst_emu", VCPU_STAT(emulated_inst_exits) },
{ "dec", VCPU_STAT(dec_exits) },
{ "ext_intr", VCPU_STAT(ext_intr_exits) },
{ "halt_wakeup", VCPU_STAT(halt_wakeup) },
{ NULL }
};

Expand Down Expand Up @@ -338,6 +339,11 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
}
break;

case BOOKE_INTERRUPT_FP_UNAVAIL:
kvmppc_queue_exception(vcpu, exit_nr);
r = RESUME_GUEST;
break;

case BOOKE_INTERRUPT_DATA_STORAGE:
vcpu->arch.dear = vcpu->arch.fault_dear;
vcpu->arch.esr = vcpu->arch.fault_esr;
Expand Down
20 changes: 17 additions & 3 deletions trunk/arch/powerpc/kvm/powerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn)

int kvm_cpu_has_interrupt(struct kvm_vcpu *v)
{
/* XXX implement me */
return 0;
return !!(v->arch.pending_exceptions);
}

int kvm_arch_vcpu_runnable(struct kvm_vcpu *v)
{
return 1;
return !(v->arch.msr & MSR_WE);
}


Expand Down Expand Up @@ -214,6 +213,11 @@ static void kvmppc_decrementer_func(unsigned long data)
struct kvm_vcpu *vcpu = (struct kvm_vcpu *)data;

kvmppc_queue_exception(vcpu, BOOKE_INTERRUPT_DECREMENTER);

if (waitqueue_active(&vcpu->wq)) {
wake_up_interruptible(&vcpu->wq);
vcpu->stat.halt_wakeup++;
}
}

int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
Expand Down Expand Up @@ -339,6 +343,8 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
int r;
sigset_t sigsaved;

vcpu_load(vcpu);

if (vcpu->sigset_active)
sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved);

Expand All @@ -363,12 +369,20 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
if (vcpu->sigset_active)
sigprocmask(SIG_SETMASK, &sigsaved, NULL);

vcpu_put(vcpu);

return r;
}

int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu, struct kvm_interrupt *irq)
{
kvmppc_queue_exception(vcpu, BOOKE_INTERRUPT_EXTERNAL);

if (waitqueue_active(&vcpu->wq)) {
wake_up_interruptible(&vcpu->wq);
vcpu->stat.halt_wakeup++;
}

return 0;
}

Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/um/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
-Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES))
KBUILD_CFLAGS += $(KERNEL_DEFINES)
KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
# a lot more stack due to the lack of sharing of stacklots:
KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \
echo $(call cc-option,-fno-unit-at-a-time); fi ;)

PHONY += linux

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1661,6 +1661,7 @@ config GEODE_MFGPT_TIMER

config OLPC
bool "One Laptop Per Child support"
depends on MGEODE_LX
default n
help
Add support for detecting the unique features of the OLPC
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/boot/compressed/relocs.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static void read_ehdr(FILE *fp)
die("Cannot read ELF header: %s\n",
strerror(errno));
}
if (memcmp(ehdr.e_ident, ELFMAG, 4) != 0) {
if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) {
die("No ELF magic\n");
}
if (ehdr.e_ident[EI_CLASS] != ELFCLASS32) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/acpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ endif
$(obj)/wakeup_rm.o: $(obj)/realmode/wakeup.bin

$(obj)/realmode/wakeup.bin: FORCE
$(Q)$(MAKE) $(build)=$(obj)/realmode $@
$(Q)$(MAKE) $(build)=$(obj)/realmode

5 changes: 3 additions & 2 deletions trunk/arch/x86/kernel/acpi/realmode/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# for more details.
#

targets := wakeup.bin wakeup.elf
always := wakeup.bin
targets := wakeup.elf wakeup.lds

wakeup-y += wakeup.o wakemain.o video-mode.o copy.o

Expand Down Expand Up @@ -48,7 +49,7 @@ LDFLAGS_wakeup.elf := -T

CPPFLAGS_wakeup.lds += -P -C

$(obj)/wakeup.elf: $(src)/wakeup.lds $(WAKEUP_OBJS) FORCE
$(obj)/wakeup.elf: $(obj)/wakeup.lds $(WAKEUP_OBJS) FORCE
$(call if_changed,ld)

OBJCOPYFLAGS_wakeup.bin := -O binary
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/x86/kernel/kvmclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ static int kvm_register_clock(void)
return native_write_msr_safe(MSR_KVM_SYSTEM_TIME, low, high);
}

#ifdef CONFIG_X86_LOCAL_APIC
static void kvm_setup_secondary_clock(void)
{
/*
Expand All @@ -143,6 +144,7 @@ static void kvm_setup_secondary_clock(void)
/* ok, done with our trickery, call native */
setup_secondary_APIC_clock();
}
#endif

/*
* After the clock is registered, the host will keep writing to the
Expand Down Expand Up @@ -177,7 +179,9 @@ void __init kvmclock_init(void)
pv_time_ops.get_wallclock = kvm_get_wallclock;
pv_time_ops.set_wallclock = kvm_set_wallclock;
pv_time_ops.sched_clock = kvm_clock_read;
#ifdef CONFIG_X86_LOCAL_APIC
pv_apic_ops.setup_secondary_clock = kvm_setup_secondary_clock;
#endif
machine_ops.shutdown = kvm_shutdown;
#ifdef CONFIG_KEXEC
machine_ops.crash_shutdown = kvm_crash_shutdown;
Expand Down
7 changes: 5 additions & 2 deletions trunk/arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,11 @@ void __init find_smp_config(void)
ACPI-based MP Configuration
-------------------------------------------------------------------------- */

/*
* Keep this outside and initialized to 0, for !CONFIG_ACPI builds:
*/
int es7000_plat;

#ifdef CONFIG_ACPI

#ifdef CONFIG_X86_IO_APIC
Expand Down Expand Up @@ -909,8 +914,6 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi)
MP_intsrc_info(&intsrc);
}

int es7000_plat;

void __init mp_config_acpi_legacy_irqs(void)
{
struct mpc_config_intsrc intsrc;
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
DMI_MATCH(DMI_BOARD_NAME, "0WF810"),
},
},
{ /* Handle problems with rebooting on Dell Optiplex 745's DFF*/
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void __init setup_per_cpu_areas(void)

/* Copy section for each CPU (we discard the original) */
size = PERCPU_ENOUGH_ROOM;
printk(KERN_INFO "PERCPU: Allocating %lu bytes of per cpu data\n",
printk(KERN_INFO "PERCPU: Allocating %zd bytes of per cpu data\n",
size);

for_each_possible_cpu(i) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static void __cpuinit smp_callin(void)
/*
* Activate a secondary processor.
*/
void __cpuinit start_secondary(void *unused)
static void __cpuinit start_secondary(void *unused)
{
/*
* Don't put *anything* before cpu_init(), SMP booting is too
Expand Down Expand Up @@ -1306,7 +1306,7 @@ static void remove_siblinginfo(int cpu)
cpu_clear(cpu, cpu_sibling_setup_map);
}

int additional_cpus __initdata = -1;
static int additional_cpus __initdata = -1;

static __init int setup_additional_cpus(char *s)
{
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/kvm/i8254.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ static void pit_load_count(struct kvm *kvm, int channel, u32 val)
* mode 1 is one shot, mode 2 is period, otherwise del timer */
switch (ps->channels[0].mode) {
case 1:
/* FIXME: enhance mode 4 precision */
case 4:
create_pit_timer(&ps->pit_timer, val, 0);
break;
case 2:
Expand Down
Loading

0 comments on commit 4427fbf

Please sign in to comment.