Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95996
b: refs/heads/master
c: 36bbfe2
h: refs/heads/master
v: v3
  • Loading branch information
Adrian Bunk authored and H. Peter Anvin committed May 4, 2008
1 parent c207439 commit 6f17841
Show file tree
Hide file tree
Showing 40 changed files with 195 additions and 653 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: 45ea2103d8856454503b30464cc1dba378748d00
refs/heads/master: 36bbfe2f097d5e09e8e9c83f55264bd538a0ebe1
24 changes: 24 additions & 0 deletions trunk/Documentation/kbuild/kconfig-language.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,3 +377,27 @@ 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: 0 additions & 6 deletions trunk/arch/powerpc/kvm/booke_guest.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ 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 @@ -339,11 +338,6 @@ 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: 3 additions & 17 deletions trunk/arch/powerpc/kvm/powerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn)

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

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


Expand Down Expand Up @@ -213,11 +214,6 @@ 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 @@ -343,8 +339,6 @@ 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 @@ -369,20 +363,12 @@ 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: 1 addition & 4 deletions trunk/arch/um/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ 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)
# 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 ;)
KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,)

PHONY += linux

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1661,7 +1661,6 @@ 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, SELFMAG) != 0) {
if (memcmp(ehdr.e_ident, ELFMAG, 4) != 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: 2 additions & 3 deletions trunk/arch/x86/kernel/acpi/realmode/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
# for more details.
#

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

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

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

CPPFLAGS_wakeup.lds += -P -C

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

OBJCOPYFLAGS_wakeup.bin := -O binary
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/x86/kernel/kvmclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ 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 @@ -144,7 +143,6 @@ 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 @@ -179,9 +177,7 @@ 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: 2 additions & 5 deletions trunk/arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,11 +794,6 @@ 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 @@ -914,6 +909,8 @@ 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: 1 addition & 0 deletions trunk/arch/x86/kernel/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ 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 %zd bytes of per cpu data\n",
printk(KERN_INFO "PERCPU: Allocating %lu 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.
*/
static void __cpuinit start_secondary(void *unused)
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);
}

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

static __init int setup_additional_cpus(char *s)
{
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/x86/kvm/i8254.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,6 @@ 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 6f17841

Please sign in to comment.