Skip to content

Commit 2891e8e

Browse files
committed
Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cleanups from Ingo Molnar: "Two small cleanups" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/traps: Get rid of unnecessary preempt_disable/preempt_enable_no_resched x86/pci-calgary: Fix iommu_free() comparison of unsigned expression >= 0
2 parents 292d386 + 07d495d commit 2891e8e

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

arch/x86/kernel/pci-calgary_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
296296

297297
/* were we called with bad_dma_address? */
298298
badend = DMA_ERROR_CODE + (EMERGENCY_PAGES * PAGE_SIZE);
299-
if (unlikely((dma_addr >= DMA_ERROR_CODE) && (dma_addr < badend))) {
299+
if (unlikely(dma_addr < badend)) {
300300
WARN(1, KERN_ERR "Calgary: driver tried unmapping bad DMA "
301301
"address 0x%Lx\n", dma_addr);
302302
return;

arch/x86/kernel/traps.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -563,11 +563,9 @@ dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
563563
* as we may switch to the interrupt stack.
564564
*/
565565
debug_stack_usage_inc();
566-
preempt_disable();
567566
cond_local_irq_enable(regs);
568567
do_trap(X86_TRAP_BP, SIGTRAP, "int3", regs, error_code, NULL);
569568
cond_local_irq_disable(regs);
570-
preempt_enable_no_resched();
571569
debug_stack_usage_dec();
572570
exit:
573571
ist_exit(regs);
@@ -742,14 +740,12 @@ dotraplinkage void do_debug(struct pt_regs *regs, long error_code)
742740
debug_stack_usage_inc();
743741

744742
/* It's safe to allow irq's after DR6 has been saved */
745-
preempt_disable();
746743
cond_local_irq_enable(regs);
747744

748745
if (v8086_mode(regs)) {
749746
handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code,
750747
X86_TRAP_DB);
751748
cond_local_irq_disable(regs);
752-
preempt_enable_no_resched();
753749
debug_stack_usage_dec();
754750
goto exit;
755751
}
@@ -769,7 +765,6 @@ dotraplinkage void do_debug(struct pt_regs *regs, long error_code)
769765
if (tsk->thread.debugreg6 & (DR_STEP | DR_TRAP_BITS) || user_icebp)
770766
send_sigtrap(tsk, regs, error_code, si_code);
771767
cond_local_irq_disable(regs);
772-
preempt_enable_no_resched();
773768
debug_stack_usage_dec();
774769

775770
exit:

0 commit comments

Comments
 (0)