Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98042
b: refs/heads/master
c: cbfa66b
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jun 12, 2008
1 parent d9d949c commit 2f83eaf
Show file tree
Hide file tree
Showing 151 changed files with 1,310 additions and 1,066 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: f8a45704f5bd5f037c8e4a75172cab1476fc0447
refs/heads/master: cbfa66b88d5720b81b75e72e7de8116d338e6b30
2 changes: 1 addition & 1 deletion trunk/Documentation/kobject.txt
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ should not be manipulated by any other user.

A kset keeps its children in a standard kernel linked list. Kobjects point
back to their containing kset via their kset field. In almost all cases,
the kobjects belonging to a ket have that kset (or, strictly, its embedded
the kobjects belonging to a kset have that kset (or, strictly, its embedded
kobject) in their parent.

As a kset contains a kobject within it, it should always be dynamically
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/laptops/thinkpad-acpi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ generate input device EV_KEY events.
In addition to the EV_KEY events, thinkpad-acpi may also issue EV_SW
events for switches:

SW_RADIO T60 and later hardare rfkill rocker switch
SW_RFKILL_ALL T60 and later hardare rfkill rocker switch
SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A

Non hot-key ACPI HKEY event map:
Expand Down
17 changes: 5 additions & 12 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -228,21 +228,21 @@ ACPI BATTERY DRIVERS
P: Alexey Starikovskiy
M: astarikovskiy@suse.de
L: linux-acpi@vger.kernel.org
W: http://acpi.sourceforge.net/
W: http://www.lesswatts.org/projects/acpi/
S: Supported

ACPI EC DRIVER
P: Alexey Starikovskiy
M: astarikovskiy@suse.de
L: linux-acpi@vger.kernel.org
W: http://acpi.sourceforge.net/
W: http://www.lesswatts.org/projects/acpi/
S: Supported

ACPI FAN DRIVER
P: Len Brown
M: len.brown@intel.com
L: linux-acpi@vger.kernel.org
W: http://acpi.sourceforge.net/
W: http://www.lesswatts.org/projects/acpi/
S: Supported

ACPI PCI HOTPLUG DRIVER
Expand All @@ -255,14 +255,14 @@ ACPI THERMAL DRIVER
P: Len Brown
M: len.brown@intel.com
L: linux-acpi@vger.kernel.org
W: http://acpi.sourceforge.net/
W: http://www.lesswatts.org/projects/acpi/
S: Supported

ACPI VIDEO DRIVER
P: Rui Zhang
M: rui.zhang@intel.com
L: linux-acpi@vger.kernel.org
W: http://acpi.sourceforge.net/
W: http://www.lesswatts.org/projects/acpi/
S: Supported

ACPI WMI DRIVER
Expand Down Expand Up @@ -3658,13 +3658,6 @@ M: romieu@fr.zoreil.com
L: netdev@vger.kernel.org
S: Maintained

SIS 5513 IDE CONTROLLER DRIVER
P: Lionel Bouton
M: Lionel.Bouton@inet6.fr
W: http://inet6.dyn.dhs.org/sponsoring/sis5513/index.html
W: http://gyver.homeip.net/sis5513/index.html
S: Maintained

SIS 900/7016 FAST ETHERNET DRIVER
P: Daniele Venzano
M: venza@brownhat.org
Expand Down
9 changes: 7 additions & 2 deletions trunk/arch/ia64/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
printk(KERN_ERR
"ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n",
len, slit->header.length);
memset(numa_slit, 10, sizeof(numa_slit));
return;
}
slit_table = slit;
Expand Down Expand Up @@ -574,8 +573,14 @@ void __init acpi_numa_arch_fixup(void)
printk(KERN_INFO "Number of memory chunks in system = %d\n",
num_node_memblks);

if (!slit_table)
if (!slit_table) {
for (i = 0; i < MAX_NUMNODES; i++)
for (j = 0; j < MAX_NUMNODES; j++)
node_distance(i, j) = i == j ? LOCAL_DISTANCE :
REMOTE_DISTANCE;
return;
}

memset(numa_slit, -1, sizeof(numa_slit));
for (i = 0; i < slit_table->locality_count; i++) {
if (!pxm_bit_test(i))
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/ia64/kvm/mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ static void mmio_access(struct kvm_vcpu *vcpu, u64 src_pa, u64 *dest,

if (p->u.ioreq.state == STATE_IORESP_READY) {
if (dir == IOREQ_READ)
*dest = p->u.ioreq.data;
/* it's necessary to ensure zero extending */
*dest = p->u.ioreq.data & (~0UL >> (64-(s*8)));
} else
panic_vm(vcpu);
out:
Expand Down
9 changes: 4 additions & 5 deletions trunk/arch/powerpc/kvm/44x_tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ static void kvmppc_44x_shadow_release(struct kvm_vcpu *vcpu,
struct tlbe *stlbe = &vcpu->arch.shadow_tlb[index];
struct page *page = vcpu->arch.shadow_pages[index];

kunmap(vcpu->arch.shadow_pages[index]);

if (get_tlb_v(stlbe)) {
if (kvmppc_44x_tlbe_is_writable(stlbe))
kvm_release_page_dirty(page);
Expand All @@ -144,18 +142,19 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, u64 asid,
stlbe = &vcpu->arch.shadow_tlb[victim];

/* Get reference to new page. */
down_write(&current->mm->mmap_sem);
down_read(&current->mm->mmap_sem);
new_page = gfn_to_page(vcpu->kvm, gfn);
if (is_error_page(new_page)) {
printk(KERN_ERR "Couldn't get guest page!\n");
printk(KERN_ERR "Couldn't get guest page for gfn %lx!\n", gfn);
kvm_release_page_clean(new_page);
up_read(&current->mm->mmap_sem);
return;
}
hpaddr = page_to_phys(new_page);

/* Drop reference to old page. */
kvmppc_44x_shadow_release(vcpu, victim);
up_write(&current->mm->mmap_sem);
up_read(&current->mm->mmap_sem);

vcpu->arch.shadow_pages[victim] = new_page;

Expand Down
33 changes: 0 additions & 33 deletions trunk/arch/powerpc/kvm/booke_guest.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,39 +227,6 @@ void kvmppc_check_and_deliver_interrupts(struct kvm_vcpu *vcpu)
}
}

static int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu)
{
enum emulation_result er;
int r;

er = kvmppc_emulate_instruction(run, vcpu);
switch (er) {
case EMULATE_DONE:
/* Future optimization: only reload non-volatiles if they were
* actually modified. */
r = RESUME_GUEST_NV;
break;
case EMULATE_DO_MMIO:
run->exit_reason = KVM_EXIT_MMIO;
/* We must reload nonvolatiles because "update" load/store
* instructions modify register state. */
/* Future optimization: only reload non-volatiles if they were
* actually modified. */
r = RESUME_HOST_NV;
break;
case EMULATE_FAIL:
/* XXX Deliver Program interrupt to guest. */
printk(KERN_EMERG "%s: emulation failed (%08x)\n", __func__,
vcpu->arch.last_inst);
r = RESUME_HOST;
break;
default:
BUG();
}

return r;
}

/**
* kvmppc_handle_exit
*
Expand Down
12 changes: 12 additions & 0 deletions trunk/arch/powerpc/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
case 31:
switch (get_xop(inst)) {

case 23: /* lwzx */
rt = get_rt(inst);
emulated = kvmppc_handle_load(run, vcpu, rt, 4, 1);
break;

case 83: /* mfmsr */
rt = get_rt(inst);
vcpu->arch.gpr[rt] = vcpu->arch.msr;
Expand All @@ -267,6 +272,13 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
kvmppc_set_msr(vcpu, vcpu->arch.gpr[rs]);
break;

case 151: /* stwx */
rs = get_rs(inst);
emulated = kvmppc_handle_store(run, vcpu,
vcpu->arch.gpr[rs],
4, 1);
break;

case 163: /* wrteei */
vcpu->arch.msr = (vcpu->arch.msr & ~MSR_EE)
| (inst & MSR_EE);
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ config ARCH_SPARSEMEM_ENABLE
def_bool y
select SPARSEMEM_VMEMMAP_ENABLE
select SPARSEMEM_VMEMMAP
select SPARSEMEM_STATIC if !64BIT

config ARCH_SPARSEMEM_DEFAULT
def_bool y
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
memset(sf, 0, sizeof(struct stack_frame));
sf->gprs[9] = (unsigned long) sf;
cpu_lowcore->save_area[15] = (unsigned long) sf;
__ctl_store(cpu_lowcore->cregs_save_area[0], 0, 15);
__ctl_store(cpu_lowcore->cregs_save_area, 0, 15);
asm volatile(
" stam 0,15,0(%0)"
: : "a" (&cpu_lowcore->access_regs_save_area) : "memory");
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/s390/kvm/diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static int __diag_time_slice_end(struct kvm_vcpu *vcpu)
VCPU_EVENT(vcpu, 5, "%s", "diag time slice end");
vcpu->stat.diagnose_44++;
vcpu_put(vcpu);
schedule();
yield();
vcpu_load(vcpu);
return 0;
}
Expand Down
7 changes: 5 additions & 2 deletions trunk/arch/s390/kvm/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,11 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu)
if (kvm_cpu_has_interrupt(vcpu))
return 0;

__set_cpu_idle(vcpu);
spin_lock_bh(&vcpu->arch.local_int.lock);
vcpu->arch.local_int.timer_due = 0;
spin_unlock_bh(&vcpu->arch.local_int.lock);

if (psw_interrupts_disabled(vcpu)) {
VCPU_EVENT(vcpu, 3, "%s", "disabled wait");
__unset_cpu_idle(vcpu);
Expand Down Expand Up @@ -366,8 +371,6 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu)
no_timer:
spin_lock_bh(&vcpu->arch.local_int.float_int->lock);
spin_lock_bh(&vcpu->arch.local_int.lock);
__set_cpu_idle(vcpu);
vcpu->arch.local_int.timer_due = 0;
add_wait_queue(&vcpu->arch.local_int.wq, &wait);
while (list_empty(&vcpu->arch.local_int.list) &&
list_empty(&vcpu->arch.local_int.float_int->list) &&
Expand Down
13 changes: 11 additions & 2 deletions trunk/arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,20 +423,30 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,
return -EINVAL; /* not implemented yet */
}

extern void s390_handle_mcck(void);

static void __vcpu_run(struct kvm_vcpu *vcpu)
{
memcpy(&vcpu->arch.sie_block->gg14, &vcpu->arch.guest_gprs[14], 16);

if (need_resched())
schedule();

if (test_thread_flag(TIF_MCCK_PENDING))
s390_handle_mcck();

kvm_s390_deliver_pending_interrupts(vcpu);

vcpu->arch.sie_block->icptcode = 0;
local_irq_disable();
kvm_guest_enter();
local_irq_enable();
VCPU_EVENT(vcpu, 6, "entering sie flags %x",
atomic_read(&vcpu->arch.sie_block->cpuflags));
sie64a(vcpu->arch.sie_block, vcpu->arch.guest_gprs);
if (sie64a(vcpu->arch.sie_block, vcpu->arch.guest_gprs)) {
VCPU_EVENT(vcpu, 3, "%s", "fault in sie instruction");
kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING);
}
VCPU_EVENT(vcpu, 6, "exit sie icptcode %d",
vcpu->arch.sie_block->icptcode);
local_irq_disable();
Expand Down Expand Up @@ -475,7 +485,6 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
might_sleep();

do {
kvm_s390_deliver_pending_interrupts(vcpu);
__vcpu_run(vcpu);
rc = kvm_handle_sie_intercept(vcpu);
} while (!signal_pending(current) && !rc);
Expand Down
44 changes: 27 additions & 17 deletions trunk/arch/s390/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,36 +254,46 @@ void disable_noexec(struct mm_struct *mm, struct task_struct *tsk)
int s390_enable_sie(void)
{
struct task_struct *tsk = current;
struct mm_struct *mm;
int rc;
struct mm_struct *mm, *old_mm;

task_lock(tsk);

rc = 0;
/* Do we have pgstes? if yes, we are done */
if (tsk->mm->context.pgstes)
goto unlock;
return 0;

rc = -EINVAL;
/* lets check if we are allowed to replace the mm */
task_lock(tsk);
if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
tsk->mm != tsk->active_mm || tsk->mm->ioctx_list)
goto unlock;
tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) {
task_unlock(tsk);
return -EINVAL;
}
task_unlock(tsk);

tsk->mm->context.pgstes = 1; /* dirty little tricks .. */
/* we copy the mm with pgstes enabled */
tsk->mm->context.pgstes = 1;
mm = dup_mm(tsk);
tsk->mm->context.pgstes = 0;

rc = -ENOMEM;
if (!mm)
goto unlock;
mmput(tsk->mm);
return -ENOMEM;

/* Now lets check again if somebody attached ptrace etc */
task_lock(tsk);
if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) {
mmput(mm);
task_unlock(tsk);
return -EINVAL;
}

/* ok, we are alone. No ptrace, no threads, etc. */
old_mm = tsk->mm;
tsk->mm = tsk->active_mm = mm;
preempt_disable();
update_mm(mm, tsk);
cpu_set(smp_processor_id(), mm->cpu_vm_mask);
preempt_enable();
rc = 0;
unlock:
task_unlock(tsk);
return rc;
mmput(old_mm);
return 0;
}
EXPORT_SYMBOL_GPL(s390_enable_sie);
2 changes: 1 addition & 1 deletion trunk/arch/s390/mm/vmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ static int insert_memory_segment(struct memory_segment *seg)
{
struct memory_segment *tmp;

if (seg->start + seg->size >= VMEM_MAX_PHYS ||
if (seg->start + seg->size > VMEM_MAX_PHYS ||
seg->start + seg->size < seg->start)
return -ERANGE;

Expand Down
14 changes: 13 additions & 1 deletion trunk/arch/x86/kvm/i8254.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ int __pit_timer_fn(struct kvm_kpit_state *ps)

atomic_inc(&pt->pending);
smp_mb__after_atomic_inc();
/* FIXME: handle case where the guest is in guest mode */
if (vcpu0 && waitqueue_active(&vcpu0->wq)) {
vcpu0->arch.mp_state = KVM_MP_STATE_RUNNABLE;
wake_up_interruptible(&vcpu0->wq);
Expand Down Expand Up @@ -237,6 +236,19 @@ static enum hrtimer_restart pit_timer_fn(struct hrtimer *data)
return HRTIMER_NORESTART;
}

void __kvm_migrate_pit_timer(struct kvm_vcpu *vcpu)
{
struct kvm_pit *pit = vcpu->kvm->arch.vpit;
struct hrtimer *timer;

if (vcpu->vcpu_id != 0 || !pit)
return;

timer = &pit->pit_state.pit_timer.timer;
if (hrtimer_cancel(timer))
hrtimer_start(timer, timer->expires, HRTIMER_MODE_ABS);
}

static void destroy_pit_timer(struct kvm_kpit_timer *pt)
{
pr_debug("pit: execute del timer!\n");
Expand Down
Loading

0 comments on commit 2f83eaf

Please sign in to comment.