id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
1d40ddd10dab332456e3863fed2a6e71aa6635ab
Analyze and fix the following issue in the Linux kernel code: MTD: fix pismo build error
Problem Details: Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/mtd/maps/pismo.c b/drivers/mtd/maps/pismo.c index c48cad271f5d..30e12c88d1da 100644 --- a/drivers/mtd/maps/pismo.c +++ b/drivers/mtd/maps/pismo.c @@ -118,7 +118,7 @@ static int __devinit pismo_add_device(struct pismo_data *pismo, int i, { struct platform_device *dev; struct resource re...
e54cfa97a9ca9a544a7257b89b530b505ae1b892
Analyze and fix the following issue in the Linux kernel code: KVM: Fix emulate_sys[call, enter, exit]()'s fault handling
Problem Details: This patch fixes emulate_syscall(), emulate_sysenter() and emulate_sysexit() to handle injected faults properly. Even though original code injects faults in these functions, we cannot handle these unless we use the different return value from the UNHANDLEABLE case. So this patch use X86EMUL_* codes in...
```diff diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index a1a7b27adf41..4dade6ac0827 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -1599,7 +1599,7 @@ emulate_syscall(struct x86_emulate_ctxt *ctxt) /* syscall is not available in real mode */ if (ctxt->mode == X86EMUL_MODE_REA...
c697518a861e6c43b92b848895f9926580ee63c3
Analyze and fix the following issue in the Linux kernel code: KVM: Fix segment descriptor loading
Problem Details: Add proper error and permission checking. This patch also change task switching code to load segment selectors before segment descriptors, like SDM requires, otherwise permission checking during segment descriptor loading will be incorrect. Cc: stable@kernel.org (2.6.33, 2.6.32) Signed-off-by: Gleb Na...
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index f9a2f66530cf..06d9e79ca37d 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -614,8 +614,7 @@ int emulator_set_dr(struct x86_emulate_ctxt *ctxt, int dr, unsigned long value); void k...
6f550484a15ea1b468665cdf59f020bf08ccb292
Analyze and fix the following issue in the Linux kernel code: KVM: Fix load_guest_segment_descriptor() to inject page fault
Problem Details: This patch injects page fault when reading descriptor in load_guest_segment_descriptor() fails with FAULT. Effects of this injection: This function is used by kvm_load_segment_descriptor() which is necessary for the following instructions: - mov seg,r/m16 - jmp far - pop ?s This patch makes it po...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f6ae4875d9d0..203ee7d0ed58 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4713,6 +4713,9 @@ static int load_guest_segment_descriptor(struct kvm_vcpu *vcpu, u16 selector, { struct descriptor_table dtable; u16 index = selector >> 3; + i...
d380a5e4022a5c63a6c5ac631e48c752ba7f1e4f
Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: Add LOCK prefix validity checking
Problem Details: Instructions which are not allowed to have LOCK prefix should generate #UD if one is used. [avi: fold opcode 82 fix from another patch] Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index d63211169ac1..c2de9f03da84 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -76,6 +76,7 @@ #define GroupDual (1<<15) /* Alternate decoding of mod == 3 */ #define GroupMask 0xff /* Group number stored in bits 0...
d4c6a1549c056f1d817e8f6f2f97d8b44933472f
Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: Fix popf emulation
Problem Details: POPF behaves differently depending on current CPU mode. Emulate correct logic to prevent guest from changing flags that it can't change otherwise. Signed-off-by: Gleb Natapov <gleb@redhat.com> Cc: stable@kernel.org Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 296e8519dc53..1782387c069e 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -343,11 +343,18 @@ static u32 group2_table[] = { }; /* EFLAGS bit definitions. */ +#define EFLG_ID (1<<21) +#define EFLG_VIP (1<<20) +#define EFLG...
1871c6020d7308afb99127bba51f04548e7ca84e
Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: fix memory access during x86 emulation
Problem Details: Currently when x86 emulator needs to access memory, page walk is done with broadest permission possible, so if emulated instruction was executed by userspace process it can still access kernel memory. Fix that by providing correct memory access to page walker during emulation. Signed-off-by: Gleb Nata...
```diff diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index 784d7c586d8e..7a6f54fa13ba 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h @@ -54,13 +54,23 @@ struct x86_emulate_ctxt; struct x86_emulate_ops { /* * read_std: Read bytes of ...
43db669730743fcc2a74b641ff4d77781eb15bfa
Analyze and fix the following issue in the Linux kernel code: KVM: Fix Codestyle in virt/kvm/coalesced_mmio.c
Problem Details: Fixed 2 codestyle issues in virt/kvm/coalesced_mmio.c Signed-off-by: Jochen Maes <jochen.maes@sejo.be> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c index 5de6594260cb..5169736377a3 100644 --- a/virt/kvm/coalesced_mmio.c +++ b/virt/kvm/coalesced_mmio.c @@ -133,7 +133,7 @@ void kvm_coalesced_mmio_free(struct kvm *kvm) } int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm, - ...
16fbb5eecc4ab8d4eb4d2a683d7fd74ccacc890b
Analyze and fix the following issue in the Linux kernel code: KVM: ia64: Fix string literal continuation lines
Problem Details: String constants that are continued on subsequent lines with \ are not good. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/ia64/kvm/mmio.c b/arch/ia64/kvm/mmio.c index 9bf55afd08d0..fb8f9f59a1ed 100644 --- a/arch/ia64/kvm/mmio.c +++ b/arch/ia64/kvm/mmio.c @@ -316,8 +316,8 @@ void emulate_io_inst(struct kvm_vcpu *vcpu, u64 padr, u64 ma) return; } else { inst_type = -1; - panic_vm(vcpu, "Unsupported MMIO ac...
7edcface95c6e593faa40c70e0464500515db573
Analyze and fix the following issue in the Linux kernel code: KVM: fix kvm_fix_hypercall() to return X86EMUL_*
Problem Details: This patch fixes kvm_fix_hypercall() to propagate X86EMUL_* info generated by emulator_write_emulated() to its callers: suggested by Marcelo. The effect of this is x86_emulate_insn() will begin to handle the page faults which occur in emulator_write_emulated(): this should be OK because emulator_write...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 01f0b037092e..c91007f81660 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3888,10 +3888,8 @@ EXPORT_SYMBOL_GPL(kvm_emulate_hypercall); int kvm_fix_hypercall(struct kvm_vcpu *vcpu) { char instruction[3]; - int ret = 0; unsigned long r...
c125c607326928001983f51109c3d0c190f0a8bb
Analyze and fix the following issue in the Linux kernel code: KVM: fix load_guest_segment_descriptor() to return X86EMUL_*
Problem Details: This patch fixes load_guest_segment_descriptor() to return X86EMUL_PROPAGATE_FAULT when it tries to access the descriptor table beyond the limit of it: suggested by Marcelo. I have checked current callers of this helper function, - kvm_load_segment_descriptor() - kvm_task_switch() and confirmed th...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0bf3df527afc..01f0b037092e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4663,7 +4663,7 @@ static int load_guest_segment_descriptor(struct kvm_vcpu *vcpu, u16 selector, if (dtable.limit < index * 8 + 7) { kvm_queue_exception_e(vcpu...
6e7d15296773f7a479072ec7f3248f51d01e1fad
Analyze and fix the following issue in the Linux kernel code: KVM: Fix msr trace
Problem Details: - data is 64 bits wide, not unsigned long - rw is confusingly named Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h index 1cb3d0e990f3..45903a926372 100644 --- a/arch/x86/kvm/trace.h +++ b/arch/x86/kvm/trace.h @@ -246,23 +246,23 @@ TRACE_EVENT(kvm_page_fault, * Tracepoint for guest MSR access. */ TRACE_EVENT(kvm_msr, - TP_PROTO(unsigned int rw, unsigned int ecx, u...
81231c698a71af6e1815df72c06685d295e1cc1d
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Pass cr0.mp through to the guest when the fpu is active
Problem Details: When cr0.mp is clear, the guest doesn't expect a #NM in response to a WAIT instruction. Because we always keep cr0.mp set, it will get a #NM, and potentially be confused. Fix by keeping cr0.mp set only when the fpu is inactive, and passing it through when inactive. Reported-by: Lorenzo Martignoni <m...
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a680d939546f..7a56879a058c 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -66,7 +66,7 @@ module_param(emulate_invalid_guest_state, bool, S_IRUGO); #define KVM_GUEST_CR0_MASK \ (KVM_GUEST_CR0_MASK_UNRESTRICTED_GUEST | X86_CR0_PG | X8...
da15bf436bc9586603b47b39244157431fa38b56
Analyze and fix the following issue in the Linux kernel code: KVM: PPC E500: fix tlbcfg emulation
Problem Details: commit 55fb1027c1cf9797dbdeab48180da530e81b1c39 doesn't update tlbcfg correctly. Fix it. And since guest OS likes 'fixed' hardware, initialize tlbcfg everytime when guest access is useless. So move this part to init code. Signed-off-by: Liu Yu <yu.liu@freescale.com> Acked-by: Alexander Graf <agraf@su...
```diff diff --git a/arch/powerpc/include/asm/kvm_e500.h b/arch/powerpc/include/asm/kvm_e500.h index 569dfd31ee79..7fea26fffb25 100644 --- a/arch/powerpc/include/asm/kvm_e500.h +++ b/arch/powerpc/include/asm/kvm_e500.h @@ -56,6 +56,8 @@ struct kvmppc_vcpu_e500 { u32 l1csr1; u32 hid0; u32 hid1; + u32 tlb0cfg; + u3...
f6801dff23bd1902473902194667f4ac1eb6ea26
Analyze and fix the following issue in the Linux kernel code: KVM: Rename vcpu->shadow_efer to efer
Problem Details: None of the other registers have the shadow_ prefix. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 7ebf9fe670cd..152233723844 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -277,7 +277,7 @@ struct kvm_vcpu_arch { unsigned long cr8; u32 hflags; u64 pdptrs[4]; /* pae */ - u64 shadow...
ab344828ebe729e52949d64046adaa196f6b9dbe
Analyze and fix the following issue in the Linux kernel code: KVM: x86: fix checking of cr0 validity
Problem Details: Move to/from Control Registers chapter of Intel SDM says. "Reserved bits in CR0 remain clear after any load of those registers; attempts to set them have no impact". Control Register chapter says "Bits 63:32 of CR0 are reserved and must be written with zeros. Writing a nonzero value to any of the uppe...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index fd5101b57fa3..ce267d9f0305 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -430,12 +430,16 @@ void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) { cr0 |= X86_CR0_ET; - if (cr0 & CR0_RESERVED_BITS) { +#ifdef CONFIG_X86_64 + if (c...
f0f4b930900ffa8daddb5262522c3e5c67ee1835
Analyze and fix the following issue in the Linux kernel code: KVM: Fix kvm_coalesced_mmio_ring duplicate allocation
Problem Details: The commit 0953ca73 "KVM: Simplify coalesced mmio initialization" allocate kvm_coalesced_mmio_ring in the kvm_coalesced_mmio_init(), but didn't discard the original allocation... Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 7c5c873812ff..2b0974a14835 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -371,9 +371,6 @@ static struct kvm *kvm_create_vm(void) { int r = 0, i; struct kvm *kvm = kvm_arch_create_vm(); -#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET - stru...
727f5a23e2080b19da392f17fa3158a0941f81f5
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Trap all debug register accesses
Problem Details: To enable proper debug register emulation under all conditions, trap access to all DR0..7. This may be optimized later on. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 4295dfcc6031..a281368c3b96 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -554,13 +554,19 @@ static void init_vmcb(struct vcpu_svm *svm) control->intercept_dr_read = INTERCEPT_DR0_MASK | INTERCEPT_DR1_MASK | INTERCEPT_DR2_MAS...
c76de350c8a3ba770becc17eaa744dc3c7642295
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Clean up and enhance mov dr emulation
Problem Details: Enhance mov dr instruction emulation used by SVM so that it properly handles dr4/5: alias to dr6/7 if cr4.de is cleared. Otherwise return EMULATE_FAIL which will let our only possible caller in that scenario, ud_interception, re-inject UD. We do not need to inject faults, SVM does this for us (excepti...
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index a1f0b5dd7d75..d73ed48587e4 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -506,9 +506,8 @@ struct kvm_x86_ops { void (*set_idt)(struct kvm_vcpu *vcpu, struct descriptor_table *dt); voi...
fd7373cce767a8803e79f51bd3fc5f531234657f
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Clean up DR6 emulation
Problem Details: As we trap all debug register accesses, we do not need to switch real DR6 at all. Clean up update_exception_bitmap at this chance, too. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index c7b99e1f8aae..b7e812e9c299 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -579,17 +579,12 @@ static void update_exception_bitmap(struct kvm_vcpu *vcpu) { u32 eb; - eb = (1u << PF_VECTOR) | (1u << UD_VECTOR) | (1u << MC_VECTOR) - | (1u...
138ac8d88f91e2a6a278aa5cee9120c714c4ce2d
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix emulation of DR4 and DR5
Problem Details: Make sure DR4 and DR5 are aliased to DR6 and DR7, respectively, if CR4.DE is not set. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 9727773f24b7..c7b99e1f8aae 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3039,6 +3039,15 @@ static int handle_cr(struct kvm_vcpu *vcpu) return 0; } +static int check_dr_alias(struct kvm_vcpu *vcpu) +{ + if (kvm_read_cr4_bits(vcpu, X8...
f2483415293b180945da707e7dbe74e5daa72651
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix exceptions of mov to dr
Problem Details: Injecting GP without an error code is a bad idea (causes unhandled guest exits). Moreover, we must not skip the instruction if we injected an exception. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 516084f3c6d8..9727773f24b7 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3045,6 +3045,7 @@ static int handle_dr(struct kvm_vcpu *vcpu) unsigned long val; int dr, reg; + /* Do not handle if the CPL > 0, will trigger GP on re-entry */...
647492047763c3ee8fe51ecf9a04f39040aa495b
Analyze and fix the following issue in the Linux kernel code: KVM: fix cleanup_srcu_struct on vm destruction
Problem Details: cleanup_srcu_struct on VM destruction remains broken: BUG: unable to handle kernel paging request at ffffffffffffffff IP: [<ffffffff802533d2>] srcu_read_lock+0x16/0x21 RIP: 0010:[<ffffffff802533d2>] [<ffffffff802533d2>] srcu_read_lock+0x16/0x21 Call Trace: [<ffffffffa05354c4>] kvm_arch_vcpu_uninit+0...
```diff diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index e6ac549f8d55..06188988ed27 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c @@ -1404,6 +1404,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm) kfree(kvm->arch.vioapic); kvm_release_vm_pages(kvm); kvm_free_physmem(kvm);...
ccd469362e826261ccc261c4c36fb0a346338222
Analyze and fix the following issue in the Linux kernel code: KVM: fix Hyper-V hypercall warnings and wrong mask value
Problem Details: Fix compilation warnings and wrong mask value. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 9f72a443455b..9b0758b4d550 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3806,12 +3806,12 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu) longmode = is_long_mode(vcpu) && cs_l == 1; if (!longmode) { - param = (kvm_register_read(vcpu...
55cd8e5a4edb8e235163ffe8264b9aaa8d7c050f
Analyze and fix the following issue in the Linux kernel code: KVM: Implement bare minimum of HYPER-V MSRs
Problem Details: Minimum HYPER-V implementation should have GUEST_OS_ID, HYPERCALL and VP_INDEX MSRs. [avi: fix build on i386] Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Vadim Rozenfeld <vrozenfe@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 93bee7abb71c..67d19e422006 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -413,6 +413,10 @@ struct kvm_arch { s64 kvmclock_offset; struct kvm_xen_hvm_config xen_hvm_config; + + /* fi...
1c0006d8d131585095c4a27dbfcfb3970807a35e
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Fix initial GPR settings
Problem Details: Commit 7d01b4c3ed2bb33ceaf2d270cb4831a67a76b51b introduced PACA backed vcpu values. With this patch, when a userspace app was setting GPRs before it was actually first loaded, the set values get discarded. This is because vcpu_load loads them from the vcpu backing store that we use whenever we're not ...
```diff diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h index e1b441cce416..db7db0a96967 100644 --- a/arch/powerpc/include/asm/kvm_book3s.h +++ b/arch/powerpc/include/asm/kvm_book3s.h @@ -22,7 +22,6 @@ #include <linux/types.h> #include <linux/kvm_host.h> -#include <asm/kvm...
0f0412c1a734700fb8ccccb1c09371642e029e2e
Analyze and fix the following issue in the Linux kernel code: KVM: ia64: remove redundant kvm_get_exit_data() NULL tests
Problem Details: kvm_get_exit_data() cannot return a NULL pointer. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/ia64/kvm/kvm_fw.c b/arch/ia64/kvm/kvm_fw.c index e4b82319881d..cb548ee9fcae 100644 --- a/arch/ia64/kvm/kvm_fw.c +++ b/arch/ia64/kvm/kvm_fw.c @@ -75,7 +75,7 @@ static void set_pal_result(struct kvm_vcpu *vcpu, struct exit_ctl_data *p; p = kvm_get_exit_data(vcpu); - if (p && p->exit_reason...
dc77270f960a8b3cc39a6349a9fad58cc6053d53
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Fix SVM_CR0_SELECTIVE_MASK
Problem Details: Instead of selecting TS and MP as the comments say, the macro included TS and PE. Luckily the macro is unused now, but fix in order to save a few hours of debugging from anyone who attempts to use it. Acked-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index 1fecb7e61130..38638cd2fa4c 100644 --- a/arch/x86/include/asm/svm.h +++ b/arch/x86/include/asm/svm.h @@ -313,7 +313,7 @@ struct __attribute__ ((__packed__)) vmcb { #define SVM_EXIT_ERR -1 -#define SVM_CR0_SELECTIVE_MASK (1 << 3 | 1)...
edcafe3c5a06f46407c3f60145a36f269e56ff7f
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Give the guest ownership of cr0.ts when the fpu is active
Problem Details: If the guest fpu is loaded, there is nothing interesing about cr0.ts; let the guest play with it as it will. This makes context switches between fpu intensive guest processes faster, as we won't trap the clts and cr0 write instructions. [marcelo: fix cr0 read shadow update on fpu deactivation; kills ...
```diff diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d11be3fb7c80..fc1964d5e97c 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -803,12 +803,20 @@ static void vmx_fpu_activate(struct kvm_vcpu *vcpu) if (kvm_read_cr0_bits(vcpu, X86_CR0_TS)) vmcs_set_bits(GUEST_CR0, X86_CR0_TS); update_ex...
d35feb26ef7e9fbef7643051be5f0773662b1f91
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Fix HID5 setting code
Problem Details: The code to unset HID5.dcbz32 is broken. This patch makes it do the right rotate magic. Signed-off-by: Alexander Graf <agraf@suse.de> Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/powerpc/kvm/book3s_64_interrupts.S b/arch/powerpc/kvm/book3s_64_interrupts.S index 33aef5345f6b..2ff0b2137e6f 100644 --- a/arch/powerpc/kvm/book3s_64_interrupts.S +++ b/arch/powerpc/kvm/book3s_64_interrupts.S @@ -177,8 +177,9 @@ kvmppc_handler_highmem: rldicl. r5, r5, 0, 63 /* CR = ((r5 & 1...
992b5b29b5ae254c416c62faf98d59a6cf970027
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Add helpers for CR, XER
Problem Details: We now have helpers for the GPRs, so let's also add some for CR and XER. Having them in the PACA simplifies code a lot, as we don't need to care about where to store CC or not to overflow any integers. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h index ba01b9c1d388..d60b2f0cdcf2 100644 --- a/arch/powerpc/include/asm/kvm_ppc.h +++ b/arch/powerpc/include/asm/kvm_ppc.h @@ -108,6 +108,26 @@ static inline ulong kvmppc_get_gpr(struct kvm_vcpu *vcpu, int num) return vcpu->ar...
0d178975d0a5afe5e0fd3211bd1397905b225be5
Analyze and fix the following issue in the Linux kernel code: KVM: Fix the explanation of write_emulated
Problem Details: The explanation of write_emulated is confused with that of read_emulated. This patch fix it. Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index 7c18e1230f54..9b697c2735d9 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h @@ -74,7 +74,7 @@ struct x86_emulate_ops { struct kvm_vcpu *vcpu); /* - * write_emulated: R...
97c4cfbe890a4ad82dde8660008d42b7b05dc488
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Enable lightweight exits again
Problem Details: The PowerPC C ABI defines that registers r14-r31 need to be preserved across function calls. Since our exit handler is written in C, we can make use of that and don't need to reload r14-r31 on every entry/exit cycle. This technique is also used in the BookE code and is called "lightweight exits" there...
```diff diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 492dcc198dd3..fd2a4d531582 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c @@ -539,8 +539,6 @@ int kvmppc_handle_pagefault(struct kvm_run *run, struct kvm_vcpu *vcpu, r = kvmppc_emulate_mmio(run, vcpu); if ( r ...
b480f780f071a068810ccd0e49c1daa210bfbeab
Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Fix typo in rebolting code
Problem Details: When we're loading bolted entries into the SLB again, we're checking if an entry is in use and only slbmte it when it is. Unfortunately, the check always goes to the skip label of the first entry, resulting in an endless loop when it actually gets triggered. Signed-off-by: Alexander Graf <agraf@suse....
```diff diff --git a/arch/powerpc/kvm/book3s_64_slb.S b/arch/powerpc/kvm/book3s_64_slb.S index ecd237a03fd0..8e4478866669 100644 --- a/arch/powerpc/kvm/book3s_64_slb.S +++ b/arch/powerpc/kvm/book3s_64_slb.S @@ -31,7 +31,7 @@ #define REBOLT_SLB_ENTRY(num) \ ld r10, SHADOW_SLB_ESID(num)(r11); \ cmpdi r10, 0; \ - beq...
46a26bf55714c1e2f17e34683292a389acb8e601
Analyze and fix the following issue in the Linux kernel code: KVM: modify memslots layout in struct kvm
Problem Details: Have a pointer to an allocated region inside struct kvm. [alex: fix ppc book 3s] Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 5fdeec5fddcf..1ca1dbf48117 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c @@ -1377,12 +1377,14 @@ static void free_kvm(struct kvm *kvm) static void kvm_release_vm_pages(struct kvm *kvm) { + struct kvm_memslots *slot...
2044892d4a005a78796c92fd1aef4633be896698
Analyze and fix the following issue in the Linux kernel code: KVM: trivial document fixes
Problem Details: Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index 2811e452f756..c6416a398163 100644 --- a/Documentation/kvm/api.txt +++ b/Documentation/kvm/api.txt @@ -23,12 +23,12 @@ of a virtual machine. The ioctls belong to three classes Only run vcpu ioctls from the same thread that was used to ...
186a3e526ac1b4063a723f90ae4893beedb24fc6
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Report spte not found in rmap before BUG()
Problem Details: In the past we've had errors of single-bit in the other two cases; the printk() may confirm it for the third case (many->many). Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 89a49fb46a27..4f499d7f7106 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -662,6 +662,7 @@ static void rmap_remove(struct kvm *kvm, u64 *spte) prev_desc = desc; desc = desc->more; } + pr_err("rmap_remove: %p %llx many->many\n", ...
b466301b842f3a54e219b5cc587f22233ecb1345
Analyze and fix the following issue in the Linux kernel code: toshiba-acpi: fix multimedia keys on some machines
Problem Details: Some Toshibas only send ACPI events on key down, not key release. Ignore any release events and send key down and key up events on every ACPI key down event. Signed-off-by: Frans Pop <elendil@planet.nl>
```diff diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 26c211724acf..405b969734d6 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -814,21 +814,23 @@ static void toshiba_acpi_notify(acpi_handle handle, u32 event, void *context) ...
92e00e47b61f558009ff81be42b412a76fd89d84
Analyze and fix the following issue in the Linux kernel code: dell-laptop: Fix errors on failure and exit paths
Problem Details: Make sure that work is cancelled after removing the i8042 filter, and unregister the platform device rather than deleting it. Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
```diff diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index 29d96a4f5769..ef614979afe9 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c @@ -580,6 +580,7 @@ static int __init dell_init(void) fail_backlight: i8042_remove_filter(dell_lapto...
94d8f785dd1f021c1971df73e6437f000c0d9449
Analyze and fix the following issue in the Linux kernel code: dell-laptop: Fix build error by making buffer_mutex static
Problem Details: The following build bug (x86, allyesconfig): arch/x86/oprofile/built-in.o:(.data+0x250): multiple definition of `buffer_mutex' Was triggered in -tip testing, caused by this upstream commit: 116ee77: dell-laptop: Use buffer with 32-bit physical address There's multiple buffer_mutex's in the kern...
```diff diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index b7f4d2705916..29d96a4f5769 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c @@ -132,8 +132,8 @@ static struct dmi_system_id __devinitdata dell_blacklist[] = { }; static struct c...
1ccaba3056796ab1f933736d763ffcd1958866cd
Analyze and fix the following issue in the Linux kernel code: GFS2: Remove old, unused linked list code from quota
Problem Details: This is the kernel portion of the patch-set for upstream gfs2, to remove the quota-linked-list stuff and replace it with fiemap-based traversal of the quota file. The corresponding userland fixes have been pushed to STABLE3 and master branches of cluster.git and gfs2-utils.git respectively (Refer Red ...
```diff diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index 81f90a59cda6..4f4462974c14 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h @@ -179,33 +179,6 @@ struct gfs2_rgrp { __u8 rg_reserved[80]; /* Several fields from gfs1 now reserved */ }; -/* - * quota linke...
04e856c072b84042bb56c487c2868638bb3f78db
Analyze and fix the following issue in the Linux kernel code: x86/amd-iommu: Pt mode fix for domain_destroy
Problem Details: After a guest is shutdown, assigned devices are not properly returned to the pt domain. This can leave the device using stale cached IOMMU data, and result in a non-functional device after it's re-bound to the host driver. For example, I see this upon rebinding: AMD-Vi: Event logged [IO_PAGE_FAULT ...
```diff diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index b97f2f1c449a..0c0425436a73 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -2298,7 +2298,7 @@ static void cleanup_domain(struct protection_domain *domain) list_for_each_entry_safe(dev_data, next, &domain...
1189b7ff6485ebf1039440c34150360fab7cfb01
Analyze and fix the following issue in the Linux kernel code: OMAP: DSS2: Taal: Fix ESD check
Problem Details: Using taal_enable_te() when DSI bus was locked caused a deadlock. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
```diff diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index a722733106b1..2b5777621779 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c @@ -1055,8 +1055,11 @@ static void taal_esd_work(struct work_struct *work) ...
8edb381d6705811b278527907a5ae2a9c4db8074
Analyze and fix the following issue in the Linux kernel code: vga_switcheroo: fix build on platforms with no ACPI
Problem Details: radeon was always including the atpx code unnecessarily, also core switcheroo was including acpi headers. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index a2e24f252e84..f5b3cbe7dc80 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -852,8 +852,13 @@ extern int nouveau_dma_init(struct nouveau_channel *); extern int nou...
55a5cb5d594c18b3147a2288b00ea359c1a38cf8
Analyze and fix the following issue in the Linux kernel code: drm/radeon: Fix printf type warning in 64bit system.
Problem Details: Type of iterator was promoted to unsigned long in 64bit systems. *header is small structure so it is alwas safe to cast return value of sizeof operator to int. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
```diff diff --git a/drivers/gpu/drm/radeon/r300_cmdbuf.c b/drivers/gpu/drm/radeon/r300_cmdbuf.c index 7f59352cd637..ea46d558e8f3 100644 --- a/drivers/gpu/drm/radeon/r300_cmdbuf.c +++ b/drivers/gpu/drm/radeon/r300_cmdbuf.c @@ -767,7 +767,7 @@ static __inline__ int r300_emit_packet3(drm_radeon_private_t *dev_priv, de...
91f63d0efa1b2ff3f8773aad61c2970f097232aa
Analyze and fix the following issue in the Linux kernel code: block: fix for "Consolidate phys_segment and hw_segment limits"
Problem Details: Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index 83ebb390b164..e44608229972 100644 --- a/drivers/block/ps3vram.c +++ b/drivers/block/ps3vram.c @@ -751,7 +751,7 @@ static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev) priv->queue = queue; queue->queuedata = dev; blk_queu...
90a6501f94aedd7fb40f5556334843194fb598be
Analyze and fix the following issue in the Linux kernel code: sched, rcu: Fix rcu_dereference() for RCU-lockdep
Problem Details: Make rcu_dereference() of runqueue data structures be rcu_dereference_sched(). Located-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: laijs@cn.fujitsu.com Cc: dipankar@in.ibm.com Cc: mathieu.desnoyers@polymtl.ca Cc: josh@joshtriplett.org Cc: dvhltc@us....
```diff diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 3e1fd96c6cf9..5a5ea2cd924f 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -3476,7 +3476,7 @@ static void run_rebalance_domains(struct softirq_action *h) static inline int on_null_domain(int cpu) { - return !rcu_dereference(cpu_rq(cp...
3464f114967b2f98f1bfe0eaf0a413bb51b4df1d
Analyze and fix the following issue in the Linux kernel code: Revert "drm/radeon/kms: disable HDMI audio for now on rv710/rv730"
Problem Details: This commit "disabled" audio on RV710 and RV740 only, leaving RV770 and RV730. The order is: CHIP_RV770 < CHIP_RV730 < CHIP_RV710 < CHIP_RV740. It is not needed anway, as we do not even try to enable audio on RV770 and newer. We call initializing function in r600.c only, not in rv770.c. If there is s...
```diff diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c index 668ff4b11c60..58c3cb32f7b0 100644 --- a/drivers/gpu/drm/radeon/r600_audio.c +++ b/drivers/gpu/drm/radeon/r600_audio.c @@ -35,7 +35,7 @@ */ static int r600_audio_chipset_supported(struct radeon_device *rdev) { - retu...
566d84d172161cb6c0c4dd834c34abbac6bf7b38
Analyze and fix the following issue in the Linux kernel code: drm/radeon: r100/r200 ums: block ability for userspace app to trash 0 page and beyond
Problem Details: radeon's have a special ability to passthrough writes in their internal memory space directly to PCI, this ability means that if some of the internal surfaces like the depth buffer point at 0x0, any writes to these will go directly to RAM at 0x0 via PCI busmastering. Now mesa used to always emit clear...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index 06123ba31d31..dc6eba6b96dd 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c @@ -1644,6 +1644,7 @@ static int radeon_do_resume_cp(struct drm_device *dev, struct drm_file *file_pri ...
a55e8d452ed2f6bbecda1a3039e82cd05244be3d
Analyze and fix the following issue in the Linux kernel code: drm/ttm: fix function prototype to match implementation
Problem Details: Fix function prototype to match its actual usage and implementation. drivers/gpu/drm/ttm/ttm_bo_util.c:341:10: error: symbol 'ttm_io_prot' redeclared with different type (originally declared at include/drm/ttm/ttm_bo_driver.h:911) - incompatible argument 1 (different signedness) Signed-off-by: Randy ...
```diff diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 4c4e0f8375b3..e3f1b4a4b601 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h @@ -908,7 +908,7 @@ extern int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, * Utility function that retu...
67b9124f734b22b30d9adf18c39fe795e2901070
Analyze and fix the following issue in the Linux kernel code: dmatest: fix handling of an even number of xor_sources
Problem Details: Just like commit ac5d73fc, we need to be careful to use 'src_cnt' as it contains the fixed up number of xor sources (forced odd) to meet dmatest's data verification scheme. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
```diff diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index cc0f3294a766..8e409fb50fc0 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -347,7 +347,7 @@ static int dmatest_func(void *data) else if (thread->type == DMA_XOR) tx = dev->device_prep_dma_xor(chan, dma_dsts[0]...
94de648d72c8bc833590523f22386d4babbea988
Analyze and fix the following issue in the Linux kernel code: dmatest: correct raid6 PQ test
Problem Details: The number of PQ sources specified by module parameter "pq_sources" is always forced odd to fit into dmatest's destination verificaton scheme. But number of PQ sources and coefficients as passed to the driver's prep_dma_pq() is not adjusted accordingly. Fix it now to get correct PQ testing results in ...
```diff diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 8b905161fbf4..cc0f3294a766 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -237,7 +237,7 @@ static int dmatest_func(void *data) dma_cookie_t cookie; enum dma_status status; enum dma_ctrl_flags flags; - u8 pq_coefs[pq_s...
76bd061f5c7b7550cdaed68ad6219ea7cee288fc
Analyze and fix the following issue in the Linux kernel code: fsldma: Fix cookie issues
Problem Details: fsl_dma_update_completed_cookie() appears to calculate the last completed cookie incorrectly in the corner case where DMA on cookie 1 is in progress just following a cookie wrap. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Acked-by: Ira W. Snyder <iws@ovro.caltech.edu> [dan.j.williams@int...
```diff diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 6541ebf8bf63..bbb4be5a3ff4 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -819,8 +819,11 @@ static void fsl_dma_update_completed_cookie(struct fsldma_chan *chan) desc = to_fsl_desc(chan->ld_running.prev); if (dma_is_idle(chan)) ...
301e99ce4a2f42a317129230fd42e6cd874c64b0
Analyze and fix the following issue in the Linux kernel code: nfsd: ensure sockets are closed on error
Problem Details: One the changes in commit d7979ae4a "svc: Move close processing to a single place" is: err_delete: - svc_delete_socket(svsk); + set_bit(SK_CLOSE, &svsk->sk_flags); return -EAGAIN; This is insufficient. The recvfrom methods must always call svc_xprt_received on completion so that...
```diff diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 9e093910c479..a29f259204e6 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -968,6 +968,7 @@ static int svc_tcp_recv_record(struct svc_sock *svsk, struct svc_rqst *rqstp) return len; err_delete: set_bit(XPT_CLOSE, &svsk->sk_xprt...
6ca3a7a96e91b1aa8c704153c992b191d35b5747
Analyze and fix the following issue in the Linux kernel code: fsldma: Fix cookie issues
Problem Details: fsl_dma_tx_submit() only sets the cookie on the first descriptor of a transaction. It should set the cookie on all. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Acked-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
```diff diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 92efa87258b9..6541ebf8bf63 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -362,7 +362,7 @@ static dma_cookie_t fsl_dma_tx_submit(struct dma_async_tx_descriptor *tx) if (cookie < 0) cookie = 1; - desc->async_tx.cookie = coo...
c16cc0b464b8876cfd57ce1c1dbcb6f9a6a0bce3
Analyze and fix the following issue in the Linux kernel code: bnx2x: Tx barriers and locks
Problem Details: [Resending with the proper subject. Sorry for the mess. ] This patch is based on the RFC of Stanislaw Gruszka. More specifically it fixes two possible races: - One, described by Stanislaw, may lead to permanent disabling of the Tx queue. This is fixed by adding the smp_wmb() to propagate the BD consu...
```diff diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 5adf2a05246f..ed785a30e98b 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -57,8 +57,8 @@ #include "bnx2x_init_ops.h" #include "bnx2x_dump.h" -#define DRV_MODULE_VERSION "1.52.1-6" -#define DRV_MODULE_RELDATE "201...
f5822754ea006563e1bf0a1f43faaad49c0d8bb2
Analyze and fix the following issue in the Linux kernel code: Revert "sunrpc: fix peername failed on closed listener"
Problem Details: This reverts commit b292cf9ce70d221c3f04ff62db5ab13d9a249ca8. The commit that it attempted to patch up, b0401d725334a94d57335790b8ac2404144748ee, was fundamentally wrong, and will also be reverted. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
```diff diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 09838300dac4..818c4c365b28 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -706,8 +706,7 @@ int svc_recv(struct svc_rqst *rqstp, long timeout) spin_unlock_bh(&pool->sp_lock); len = 0; - if (test_bit(XPT_LISTENER, &xprt->xpt...
9f7cdbc33f36d28e57eaba0093f68f0d14c38c5b
Analyze and fix the following issue in the Linux kernel code: blkdev: fix merge_bvec_fn return value checks
Problem Details: merge_bvec_fn() returns bvec->bv_len on success. So we have to check against this value. But in case of fs_optimization merge we compare with wrong value. This patch must be included in b428cd6da7e6559aca69aa2e3a526037d3f20403 But accidentally i've forgot to add this in the initial patch. To make thin...
```diff diff --git a/fs/bio.c b/fs/bio.c index dc17afd672e3..0bda289f86fc 100644 --- a/fs/bio.c +++ b/fs/bio.c @@ -555,7 +555,7 @@ static int __bio_add_page(struct request_queue *q, struct bio *bio, struct page .bi_rw = bio->bi_rw, }; - if (q->merge_bvec_fn(q, &bvm, prev) < len) { + if (q->merge_bvec...
87c3a922a7ee8cfb9ab837f4ae38c993e9b30711
Analyze and fix the following issue in the Linux kernel code: cciss: Fix problem with scatter gather elements in the scsi half of the driver
Problem Details: cciss: Fix problem with scatter gather elements in the scsi half of the driver When support for more than 31 scatter gather elements was added to the block half of the driver, the SCSI half of the driver was not addressed, and the bump from 31 to 32 scatter gather elements in the command block itself (...
```diff diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c index 6dc15b669694..e1d0e2cfec72 100644 --- a/drivers/block/cciss_scsi.c +++ b/drivers/block/cciss_scsi.c @@ -84,7 +84,6 @@ static struct scsi_host_template cciss_driver_template = { .queuecommand = cciss_scsi_queue_command, .can_queue =...
2ad6cdc20fbeea1e1744190c00cebb64e4b4c491
Analyze and fix the following issue in the Linux kernel code: cciss: fix scatter gather chain block dma direction kludge
Problem Details: cciss: fix scatter gather chain block dma direction kludge The data direction for the chained block of scatter gather elements should always be PCI_DMA_TODEVICE, but was mistakenly set to the direction of the data transfer, then a kludge to fix it was added, in which pci_dma_sync_single_for_device or p...
```diff diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index adc517c1381c..c0d794ce69c6 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1717,10 +1717,8 @@ static void cciss_softirq_done(struct request *rq) if (curr_sg[sg_index].Ext == CCISS_SG_CHAIN) { temp64.val32.lower = cmd->SG[...
1b7d0d28ad82cbd5650c26ec8e370176b112e407
Analyze and fix the following issue in the Linux kernel code: cciss: detect bad alignment of scsi commands at build time
Problem Details: cciss: detect bad alignment of scsi commands at build time Incidentally fix some nearby c++ style comments. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index a29e69418a03..cd8c7c20b1c3 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -4496,7 +4496,7 @@ static int __init cciss_init(void) * boundary. Given that we use pci_alloc_consistent() to allocate an * array of them, the size ...
3dde36ddea3e07dd025c4c1ba47edec91606fec0
Analyze and fix the following issue in the Linux kernel code: cfq-iosched: rework seeky detection
Problem Details: Current seeky detection is based on average seek lenght. This is suboptimal, since the average will not distinguish between: * a process doing medium sized seeks * a process doing some sequential requests interleaved with larger seeks and even a medium seek can take lot of time, if the requested sector...
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 10eb286f1f49..3fd8afc2174e 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -46,8 +46,8 @@ static const int cfq_hist_divisor = 4; #define CFQ_HW_QUEUE_MIN (5) #define CFQ_SERVICE_SHIFT 12 -#define CFQQ_SEEK_THR 8 * 1024 -#defin...
3119815912a220bdac943dfbdfee640414c0c611
Analyze and fix the following issue in the Linux kernel code: virtio: fix out of range array access
Problem Details: I have observed the following error on virtio-net module unload: ------------[ cut here ]------------ WARNING: at kernel/irq/manage.c:858 __free_irq+0xa0/0x14c() Hardware name: Bochs Trying to free already-free IRQ 0 Modules linked in: virtio_net(-) virtio_blk virtio_pci virtio_ring virtio af_packet e...
```diff diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 1d5191fab62e..1b6573216998 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -473,7 +473,8 @@ static void vp_del_vqs(struct virtio_device *vdev) list_for_each_entry_safe(vq, n, &vdev->vqs, list) { inf...
060cbce6c4431465e83907102e1903ecea366db5
Analyze and fix the following issue in the Linux kernel code: asus-laptop: fix style problems reported by checkpath.pl
Problem Details: Signed-off-by: Corentin Chary <corentincj@iksaif.net>
```diff diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index d0d117b0cf79..791fcf321506 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -45,12 +45,12 @@ #include <linux/fb.h> #include <linux/leds.h> #include <linux/platform_device.h> -...
75747129a994463e36c2516e8071771427d8494b
Analyze and fix the following issue in the Linux kernel code: asus-laptop: leds, remove dead code and fix asus_led_exit()/asus_led_init()
Problem Details: These bug where introduced in "asus-laptop: code movement". Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
```diff diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 516add3c340e..ca144d251b00 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -371,13 +371,7 @@ static int asus_led_set(struct asus_laptop *asus, char *method, enum led_b...
39286fa41a8b2c6a9c1f656a7b3c3efca95bc1b9
Analyze and fix the following issue in the Linux kernel code: vhost-net: restart tx poll on sk_sndbuf full
Problem Details: guest to remote communication with vhost net sometimes stops until guest driver is restarted. This happens when we get guest kick precisely when the backend send queue is full, as a result handle_tx() returns without polling backend. This patch fixes this by restarting tx poll on this condition. Signe...
```diff diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 91a324cc2298..ad37da2b6cb5 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -114,8 +114,12 @@ static void handle_tx(struct vhost_net *net) return; wmem = atomic_read(&sock->sk->sk_wmem_alloc); - if (wmem >= sock->sk->sk_sndbuf) + i...
d6db3f5c11dc7ed5712d5d5682aa34025ee5248e
Analyze and fix the following issue in the Linux kernel code: vhost: fix get_user_pages_fast error handling
Problem Details: get_user_pages_fast returns number of pages on success, negative value on failure, but never 0. Fix vhost code to match this logic. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
```diff diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 6c31c0c9bbb9..7cd55e078794 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -646,8 +646,9 @@ static int set_bit_to_user(int nr, void __user *addr) int bit = nr + (log % PAGE_SIZE) * 8; int r; r = get_user_pages_fast(log, 1, ...
86e9424d7252bae5ad1c17b4b8088193e6b27cbe
Analyze and fix the following issue in the Linux kernel code: vhost: logging thinko fix
Problem Details: vhost was dong some complex math to get offset to log at, and got it wrong by a couple of bytes, while in fact it's simple: get address where we write, subtract start of buffer, add log base. Do it this way. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redha...
```diff diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 6eb15259f5ae..db21518f7e8d 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1004,10 +1004,14 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len) if (unlikely(vq->log_used)) { /* Make sure data is se...
5d952b8391692553c31e620a92d6e09262a9a307
Analyze and fix the following issue in the Linux kernel code: exofs: RAID0 support
Problem Details: We now support striping over mirror devices. Including variable sized stripe_unit. Some limits: * stripe_unit must be a multiple of PAGE_SIZE * stripe_unit * stripe_count is maximum upto 32-bit (4Gb) Tested RAID0 over mirrors, RAID0 only, mirrors only. All check. Design notes: * I'm not using a vect...
```diff diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h index 09e331935514..0d8a34b21ae1 100644 --- a/fs/exofs/exofs.h +++ b/fs/exofs/exofs.h @@ -58,6 +58,14 @@ struct exofs_layout { osd_id s_pid; /* partition ID of file system*/ + /* Our way of looking at the data_map */ + unsigned stripe_unit; + unsigned mir...
34ce4e7c23e3da578e459b05c6fb17edecb19e6b
Analyze and fix the following issue in the Linux kernel code: exofs: debug print even less
Problem Details: * Last debug trimming left in some stupid print, remove them. Fixup some other prints * Shift printing from inode.c to ios.c * Add couple of prints when memory allocation fails. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
```diff diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index 2afbcebeda71..c88a0c5250cb 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c @@ -193,7 +193,7 @@ static int __readpages_done(struct page_collect *pcol, bool do_unlock) else good_bytes = pcol->length - resid; - EXOFS_DBGMSG("readpages_done(0x%lx) g...
9675478bbafed08848bf8d7e28400d5e46330b23
Analyze and fix the following issue in the Linux kernel code: ethtool: do not set some flags, if others failed
Problem Details: NETIF_F_NTUPLE flag setting introduced a bug: non-ntuple flags like LRO may be successfully set, before ioctl(2) returns failure to userspace. The set-flags operation should be all-or-none, rather than leaving things in an inconsistent state prior to reporting failure to userspace. Signed-off-by: Je...
```diff diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 31b1eddc1b84..0f2f82185ec4 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -135,21 +135,23 @@ u32 ethtool_op_get_flags(struct net_device *dev) int ethtool_op_set_flags(struct net_device *dev, u32 data) { const struct ethtool_ops *ops = d...
fad539956c9e69749a03f7817d22d1bab87657bf
Analyze and fix the following issue in the Linux kernel code: x86: Fix out of order of gsi
Problem Details: Iranna D Ankad reported that IBM x3950 systems have boot problems after this commit: | | commit b9c61b70075c87a8612624736faf4a2de5b1ed30 | | x86/pci: update pirq_enable_irq() to setup io apic routing | The problem is that with the patch, the machine freezes when console=ttyS0,... kernel seria...
```diff diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 72ac2a332993..97e1e3ec2edf 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -1475,7 +1475,7 @@ static struct { static void __init setup_IO_APIC_irqs(void) { - int apic_id = 0, pin, idx, irq;...
f6e623a65cb301088bd04794043e82bfc996c512
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix out of scope variable access in hci_sock_cmsg()
Problem Details: The pointer data can point to the variable ctv. Access to data happens when ctv is already out of scope. Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 688cfebfbee0..38f08f6b86f6 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c @@ -329,6 +329,9 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_ } if (mask & HCI_CMSG_TSTAMP) { +#ifde...
622ea685f1fafdf84d612440535c84341f0860b8
Analyze and fix the following issue in the Linux kernel code: rcu: Fix holdoff for accelerated GPs for last non-dynticked CPU
Problem Details: Make the holdoff only happen when the full number of attempts have been made. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: laijs@cn.fujitsu.com Cc: dipankar@in.ibm.com Cc: mathieu.desnoyers@polymtl.ca Cc: josh@joshtriplett.org Cc: dvhltc@us.ibm.com Cc: niv@us.ibm.com Cc: peterz@inf...
```diff diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index 464ad2cdee00..79b53bda8943 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h @@ -1010,6 +1010,10 @@ int rcu_needs_cpu(int cpu) int c = 0; int thatcpu; + /* Check for being in the holdoff period. */ + if (per_cpu(rcu_dynt...
88cc83772a3c7756b9f2b4ba835545ad90a08409
Analyze and fix the following issue in the Linux kernel code: thinkpad-acpi: fix ALSA callback return status
Problem Details: Clemens Ladisch reports that thinkpad-acpi improperly implements the ALSA API, and always returns 0 for success for the "put" callbacks while the API requires it to return "1" when the control value has been changed in the hardware/firmware. Rework the volume subdriver to be able to properly implement...
```diff diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 5d02cc06d1a7..e7b0c3bcef89 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -6541,7 +6541,8 @@ static int volume_set_status(const u8 status) return volume_set_status_ec...
99e11ab20b26b3236490ae687ab309c2601d180b
Analyze and fix the following issue in the Linux kernel code: macfb: fix 24-bit visual and stuff
Problem Details: Lots of changes. Remove volatile keywords. Take the advice in the comments and change video_slot to slot_addr. Factor out fifteen or so "channel >> 8" shifts into three shifts higher up the call graph. Make csc_setpalette() atomic, pass the correct color values. Check for ioremap() failure. Add missing...
```diff diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c index 8b246ee7c069..43207cc6cc19 100644 --- a/drivers/video/macfb.c +++ b/drivers/video/macfb.c @@ -120,8 +120,6 @@ struct jet_cmap_regs { #define PIXEL_TO_MM(a) (((a)*10)/28) /* width in mm at 72 dpi */ -static int video_slot = 0; - static struc...
11e8faca2e501c25d2f98c1b9534776a9a9704c5
Analyze and fix the following issue in the Linux kernel code: valkyriefb: various fixes
Problem Details: Valkyriefb and macfb will adopt the same card if they get the chance, so remove valkyrie support from macfb. Also fix the "valkyriefb: can't do 832x624x8" problem reported by Raylynn Knight some time ago, by adding vmode 13 support for CONFIG_MAC. Also add vmode 11 since that works too. Make use of the...
```diff diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c index d66887e8cbb1..a92322558ec0 100644 --- a/drivers/video/macfb.c +++ b/drivers/video/macfb.c @@ -55,9 +55,6 @@ static int (*macfb_setpalette) (unsigned int regno, unsigned int red, unsigned int green, unsigned int blue, struct fb_info *inf...
d876c11a0fd40993136f5cc1e81371ccc6c21a63
Analyze and fix the following issue in the Linux kernel code: fbdev: mac_var_to_mode() fix
Problem Details: The valkyriefb driver assumes that this logic holds: mac_vmode_to_var(X, cmode, &var); mac_var_to_vmode(&var, &vmode, &cmode); assert(vmode == X); But it doesn't hold because mac_var_to_vmode() can return a mode with a slower pixel clock, even when a match is available. So we end up with this failure...
```diff diff --git a/drivers/video/macmodes.c b/drivers/video/macmodes.c index 083f60321ed8..3e11f7425aef 100644 --- a/drivers/video/macmodes.c +++ b/drivers/video/macmodes.c @@ -134,7 +134,7 @@ static const struct fb_videomode mac_modedb[] = { * * These MUST be ordered in * - increasing resolutio...
1f7b5fff505232521a7a770a639b63cd17636549
Analyze and fix the following issue in the Linux kernel code: pmac-zilog: cleanup
Problem Details: Whitespace cleanups and comment typo fix. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
```diff diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 3e2ae4807ae2..1c8afd98e14e 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c @@ -153,8 +153,8 @@ static void pmz_load_zsregs(struct uart_pmac_port *uap, u8 *regs) write_zsreg(uap, R10, regs[R10]); /* Set ...
88cb773c5f8e45e48f3a89480610448974337cb0
Analyze and fix the following issue in the Linux kernel code: m68k: Allow ioremapping top of memory
Problem Details: The test in __ioremap to reject memory ranges crossing the 0 boundary rejects also memory ranges ending at the end of the memory. Fix that. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
```diff diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c index df620ac2a296..cf93cdd515c5 100644 --- a/arch/m68k/mm/kmap.c +++ b/arch/m68k/mm/kmap.c @@ -116,7 +116,7 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla /* * Don't allow mappings that wrap.. */ - if (!size || ...
145452649d035e4e5152f6c4e6798c41960cad3e
Analyze and fix the following issue in the Linux kernel code: m68k: Fix asm/swab.h for ColdFire
Problem Details: Make asm/swab.h compatible with ColdFire ISA_B CPUs. Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
```diff diff --git a/arch/m68k/include/asm/swab.h b/arch/m68k/include/asm/swab.h index 5b754aace744..b7b37a40defc 100644 --- a/arch/m68k/include/asm/swab.h +++ b/arch/m68k/include/asm/swab.h @@ -14,7 +14,7 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 val) } #define __arch_swab32 __arch_swab32 -#el...
84c6f88fc8265d7a712d7d6ed8fc1a878dfc84d1
Analyze and fix the following issue in the Linux kernel code: perf lock: Fix and add misc documentally things
Problem Details: I've forgot to add 'perf lock' line to command-list.txt, so users of perf could not find perf lock when they type 'perf'. Fixing command-list.txt requires document (tools/perf/Documentation/perf-lock.txt). But perf lock is too much "under construction" to write a stable document, so this is something ...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 25c3ed594c54..65f964e7fe78 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -520,6 +520,12 @@ config LOCK_STAT For more details, see Documentation/lockstat.txt + You can analyze lock events with "perf lock", subcommand of perf. + If you ...
afbc74fdc5b96552c384e57119b3cc13c840bf06
Analyze and fix the following issue in the Linux kernel code: power_supply: bq27x00: fix voltage and current units
Problem Details: The chip returns voltage and current in mV and mA, but power supply class uses uV and uA, so add missing conversion. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
```diff diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c index 5d940fad8d43..bece33ed873c 100644 --- a/drivers/power/bq27x00_battery.c +++ b/drivers/power/bq27x00_battery.c @@ -125,7 +125,7 @@ static int bq27x00_battery_voltage(struct bq27x00_device_info *di) return ret; } - return ...
b914a250e7b390c713b36a9405a39c4c11abad80
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Convert Marvell driver to use per adapter debugfs
Problem Details: The debugfs support of the Marvell driver is buggy. It is limited to one controller per system. Fix this by using the controller specific debugfs directory as parent. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
```diff diff --git a/drivers/bluetooth/btmrvl_debugfs.c b/drivers/bluetooth/btmrvl_debugfs.c index d43b5cb864ef..3126a3d0c45c 100644 --- a/drivers/bluetooth/btmrvl_debugfs.c +++ b/drivers/bluetooth/btmrvl_debugfs.c @@ -26,7 +26,8 @@ #include "btmrvl_drv.h" struct btmrvl_debugfs_data { - struct dentry *root_dir, *co...
acc4d245a70615755cab8bace7f0f87870fc99d9
Analyze and fix the following issue in the Linux kernel code: MIPS: Alchemy: Fix Au1100 ethernet build failure
Problem Details: Don't define platform info for second mac on au1100 (which only has a single mac). Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> To: Linux-MIPS <linux-mips@linux-mips.org> Patchwork: http://patchwork.linux-mips.org/patch/1004/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c index 3fbe30c1fd9a..2580e77624d2 100644 --- a/arch/mips/alchemy/common/platform.c +++ b/arch/mips/alchemy/common/platform.c @@ -357,15 +357,6 @@ static struct resource au1xxx_eth0_resources[] = { #endif }; -static struct ...
8190471087b59ff63a8db125953ae612b7a8b8b5
Analyze and fix the following issue in the Linux kernel code: MIPS: Cobalt: convert legacy port addresses to GT-64111 bus addresses
Problem Details: The GT-64111 PCI host bridge has no address translation mechanism, so it can't generate legacy port accesses. This quirk fixes legacy device port resources to contain the bus addresses actually generated by the GT-64111. I think this is the approach Ben Herrenschmidt suggested long ago: http://ma...
```diff diff --git a/arch/mips/pci/fixup-cobalt.c b/arch/mips/pci/fixup-cobalt.c index 9553b14002dd..acacd1407c63 100644 --- a/arch/mips/pci/fixup-cobalt.c +++ b/arch/mips/pci/fixup-cobalt.c @@ -51,6 +51,67 @@ static void qube_raq_galileo_early_fixup(struct pci_dev *dev) DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_MARVELL, ...
b9b37787d24cca9fbd63f767663e9439fa69aa22
Analyze and fix the following issue in the Linux kernel code: MIPS: Cobalt: Fix theoretical port aliasing issue
Problem Details: Because the VIA SuperIO chip only decodes 24 bits of address space but port address space currently being configured as 32MB there is the theoretical possibility of aliases within the I/O port address range. The complicated solution is to reserve all address range that potencially could cause such ali...
```diff diff --git a/arch/mips/cobalt/pci.c b/arch/mips/cobalt/pci.c index cfce7af1bca9..85ec9cc31d66 100644 --- a/arch/mips/cobalt/pci.c +++ b/arch/mips/cobalt/pci.c @@ -25,7 +25,7 @@ static struct resource cobalt_mem_resource = { static struct resource cobalt_io_resource = { .start = 0x1000, - .end = GT_DEF_PCI0...
bba90760582d2563b28a4738fb785185a59e9e71
Analyze and fix the following issue in the Linux kernel code: MIPS: Crazy spinlock speed test.
Problem Details: This is just a test program for raw_spinlocks. The main reason I wrote it is to validate my spinlock changes that I sent in a previous patch. To use it enable CONFIG_DEBUG_FS and CONFIG_SPINLOCK_TEST then at run time do: # mount -t debugfs none /sys/kernel/debug/ # cat /sys/kernel/debug/mips/spin_si...
```diff diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug index 32a010d5edb9..43dc27997730 100644 --- a/arch/mips/Kconfig.debug +++ b/arch/mips/Kconfig.debug @@ -121,4 +121,11 @@ config DEBUG_ZBOOT to reduce the kernel image size and speed up the booting procedure a little. +config SPINLOCK_TEST ...
e275ed5ee94b358964a0dae1c8b49f0bff260b60
Analyze and fix the following issue in the Linux kernel code: MIPS: Alchemy: devboard PM needs to save CPLD registers.
Problem Details: Save/restore CPLD registers when doing suspend-to-ram; this fixes issues with harddisk and ethernet not working correctly when resuming on DB1200. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> To: Linux-MIPS <linux-mips@linux-mips.org> Patchwork: http://patchwork.linux-mips.org/patch/986/ Signe...
```diff diff --git a/arch/mips/alchemy/devboards/pm.c b/arch/mips/alchemy/devboards/pm.c index 632f9862a0fb..4bbd3133e451 100644 --- a/arch/mips/alchemy/devboards/pm.c +++ b/arch/mips/alchemy/devboards/pm.c @@ -10,6 +10,7 @@ #include <linux/sysfs.h> #include <asm/mach-au1x00/au1000.h> #include <asm/mach-au1x00/gpio....
1a73f0478a289ee5bb2e4f44a6ecf1d6d6410eab
Analyze and fix the following issue in the Linux kernel code: MIPS: Alchemy: Remove time_lock.
Problem Details: The sole user is au1xxx_calc_clock() which is only used in early bootup where the is no paralellism thus no race condition to protect against. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: Manuel Lauss <manuel.lauss@googlemail.com>
```diff diff --git a/arch/mips/alchemy/common/clocks.c b/arch/mips/alchemy/common/clocks.c index d8991854530e..460c6285c1bb 100644 --- a/arch/mips/alchemy/common/clocks.c +++ b/arch/mips/alchemy/common/clocks.c @@ -40,8 +40,6 @@ static unsigned int au1x00_clock; /* Hz */ static unsigned long uart_baud_base; -stati...
f86a69b15f60965a224e7e2516ad41070692cc19
Analyze and fix the following issue in the Linux kernel code: MIPS: Make the debugging of compressed kernel configurable
Problem Details: This patch adds a new DEBUG_ZBOOT option to allow the users to enable it to debug the compressed kernel support for a new board and this optoin should be disabled to reduce the kernel image size and speed up the kernel booting procedure when the compressed kernel support is stable. Signed-off-by: Wu Z...
```diff diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug index d2b88a0be519..32a010d5edb9 100644 --- a/arch/mips/Kconfig.debug +++ b/arch/mips/Kconfig.debug @@ -102,4 +102,23 @@ config RUNTIME_DEBUG arch/mips/include/asm/debug.h for debugging macros. If unsure, say N. +config DEBUG_ZBOOT + bool ...
b66bb6090d9aa36931911e34d3f069932934b6fe
Analyze and fix the following issue in the Linux kernel code: MIPS: Remove #if 0 r4k_update_mmu_cache_hwbug
Problem Details: The function is #if 0ed out. There are no other occurrences of its name in the tree. It is safe to remove. Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/936/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 45b7c35950c4..21d04dfa11db 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c @@ -337,40 +337,6 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte) EXIT_CRITICAL(flags); } -#if 0 -static void r4...
632b629c0c4b0f8caaf7f2b448911d03859fda59
Analyze and fix the following issue in the Linux kernel code: MIPS: AR7: Fix USB slave mem range typo
Problem Details: Signed-off-by: Alexander Clouter <alex@digriz.org.uk> To: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/919/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index 76a358ec15f0..65facecb3ffb 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c @@ -348,7 +348,7 @@ static struct resource usb_res[] = { .name = "mem", .flags = IORESOURCE_MEM, .start = 0x03400000, - .end = 0x034001...
aae7e8da806e1536fdee0632a40aaaeed97a2f1b
Analyze and fix the following issue in the Linux kernel code: MIPS: Alchemy: debug output for compressed kernels
Problem Details: Hook up the compressed debug output for all Alchemy systems supported by current kernel codebase. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> To: Linux-MIPS <linux-mips@linux-mips.org> Cc: Wu Zhangjin <wuzhangjin@gmail.com> Patchwork: http://patchwork.linux-mips.org/patch/879/ Signed-off-by: ...
```diff diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index b798830b7730..76d69303b833 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -36,6 +36,7 @@ KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ obj-y := $(obj)/hea...
f868ba29723be46e0981226d7455090d515b08ef
Analyze and fix the following issue in the Linux kernel code: MIPS: add readl/write_be accessors
Problem Details: MIPS currently lacks the readl_be and writel_be accessors which are required by BCM63xx for OHCI and EHCI support. Let's define them globally for MIPS. This also fixes the compilation of the bcm63xx defconfig against USB. Signed-off-by: Florian Fainelli <ffainelli@freebox.fr> Cc: Geert Uytterhoeven <g...
```diff diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index 436878e4e063..c98bf514ec7d 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -447,6 +447,24 @@ __BUILDIO(q, u64) #define readl_relaxed readl #define readq_relaxed readq +#define readb_be(addr) \ + ...
c7e8c668b09a27879e8b45d2a613fb5acdf9f8a3
Analyze and fix the following issue in the Linux kernel code: MIPS: Loongson: Remove the serial port output of compressed kernel support
Problem Details: The compressed kernel support on loongson family machines is stable now, so, remove the debug information via using SYS_SUPPORTS_ZBOOT instead of SYS_SUPPORTS_ZBOOT_UART16550. This may reduce the image size and speedup the booting. Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Cc: linux-mips@linux...
```diff diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 70376e586315..874167153880 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -180,7 +180,7 @@ config LASAT config MACH_LOONGSON bool "Loongson family of machines" - select SYS_SUPPORTS_ZBOOT_UART16550 + select SYS_SUPPORTS_ZBOOT help Th...
166bdaa9aad9903bf4330ef68feb37f220c9eac8
Analyze and fix the following issue in the Linux kernel code: Staging: Octeon Ethernet: Fix memory allocation.
Problem Details: After aligning the blocks returned by kmalloc, we need to save the original pointer so they can be correctly freed. There are no guarantees about the alignment of SKB data, so we need to handle worst case alignment. Since right shifts over subtraction have no distributive property, we need to fix the...
```diff diff --git a/drivers/staging/octeon/ethernet-mem.c b/drivers/staging/octeon/ethernet-mem.c index 7090521471b2..53ed2f7ffdfd 100644 --- a/drivers/staging/octeon/ethernet-mem.c +++ b/drivers/staging/octeon/ethernet-mem.c @@ -4,7 +4,7 @@ * Contact: support@caviumnetworks.com * This file is part of the OCTEON S...
dbb103b243e09475c84df2b8ef17615975593761
Analyze and fix the following issue in the Linux kernel code: MIPS: Octeon: Fix EOI handling.
Problem Details: If an interrupt handler disables interrupts, the EOI function will just reenable them. This will put us in an endless loop when the upcoming Ethernet driver patches are applied. Only reenable the interrupt on EOI if it is not IRQ_DISABLED. This requires that the EOI function be separate from the ENA...
```diff diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c index 6f2acf09328d..1460d0836dc0 100644 --- a/arch/mips/cavium-octeon/octeon-irq.c +++ b/arch/mips/cavium-octeon/octeon-irq.c @@ -193,7 +193,7 @@ static void octeon_irq_ciu0_enable_v2(unsigned int irq) * Disable the irq o...
b2b13cdfd05ec331e1be3bbdd593d66840c0b688
Analyze and fix the following issue in the Linux kernel code: SERIAL 8250: Fixes for Alchemy UARTs.
Problem Details: Limit the amount of address space claimed for Alchemy serial ports to 0x1000. On the Au1300, ports are only 0x1000 apart, and the registers only extend to 0x110 at most on all supported alchemy models. On the Au1300 the autodetect logic no longer works and this makes it necessary to specify the port ...
```diff diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index e9b15c3746fa..a81ff7bc5fa1 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -1217,12 +1217,6 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags) } #endif -#ifdef CONFIG_SERIAL_8250_AU1X00 - /* if acc...
32fc0adeb89c7e1e592bf31b7158ddc154298207
Analyze and fix the following issue in the Linux kernel code: MIPS: Alchemy: Fix warnings in DB1x00 / PB1000 / PB1550 board setup code
Problem Details: This patch fixes warnings due to potentially unused variables in board setup code or mixed variables declaration and code (forbidden by ISO C90). Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/alchemy/devboards/db1x00/board_setup.c b/arch/mips/alchemy/devboards/db1x00/board_setup.c index 64eb26ffd088..7aee14d78eea 100644 --- a/arch/mips/alchemy/devboards/db1x00/board_setup.c +++ b/arch/mips/alchemy/devboards/db1x00/board_setup.c @@ -85,12 +85,14 @@ void board_reset(void) void ...