Browse Source

Auto-update from upstream

Tony Luck 20 years ago
parent
commit
067794a117
5 changed files with 36 additions and 21 deletions
  1. 0 5
      arch/i386/Kconfig
  2. 2 2
      drivers/input/keyboard/Kconfig
  3. 1 1
      drivers/input/mouse/Kconfig
  4. 32 12
      drivers/scsi/ide-scsi.c
  5. 1 1
      fs/fs-writeback.c

+ 0 - 5
arch/i386/Kconfig

@@ -1042,8 +1042,3 @@ config X86_TRAMPOLINE
 	bool
 	depends on X86_SMP || (X86_VOYAGER && SMP)
 	default y
-
-config PC
-	bool
-	depends on X86 && !EMBEDDED
-	default y

+ 2 - 2
drivers/input/keyboard/Kconfig

@@ -13,11 +13,11 @@ menuconfig INPUT_KEYBOARD
 if INPUT_KEYBOARD
 
 config KEYBOARD_ATKBD
-	tristate "AT keyboard" if !PC
+	tristate "AT keyboard" if !X86_PC
 	default y
 	select SERIO
 	select SERIO_LIBPS2
-	select SERIO_I8042 if PC
+	select SERIO_I8042 if X86_PC
 	select SERIO_GSCPS2 if GSC
 	help
 	  Say Y here if you want to use a standard AT or PS/2 keyboard. Usually

+ 1 - 1
drivers/input/mouse/Kconfig

@@ -17,7 +17,7 @@ config MOUSE_PS2
 	default y
 	select SERIO
 	select SERIO_LIBPS2
-	select SERIO_I8042 if PC
+	select SERIO_I8042 if X86_PC
 	select SERIO_GSCPS2 if GSC
 	---help---
 	  Say Y here if you have a PS/2 mouse connected to your system. This

+ 32 - 12
drivers/scsi/ide-scsi.c

@@ -180,12 +180,22 @@ static void idescsi_input_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsigne
 			return;
 		}
 		count = min(pc->sg->length - pc->b_count, bcount);
-		buf = kmap_atomic(pc->sg->page, KM_IRQ0);
-		drive->hwif->atapi_input_bytes(drive,
-				buf + pc->b_count + pc->sg->offset, count);
-		kunmap_atomic(buf, KM_IRQ0);
-		bcount -= count;
-		pc->b_count += count;
+		if (PageHighMem(pc->sg->page)) {
+			unsigned long flags;
+
+			local_irq_save(flags);
+			buf = kmap_atomic(pc->sg->page, KM_IRQ0) +
+					pc->sg->offset;
+			drive->hwif->atapi_input_bytes(drive,
+						buf + pc->b_count, count);
+			kunmap_atomic(buf - pc->sg->offset, KM_IRQ0);
+			local_irq_restore(flags);
+		} else {
+			buf = page_address(pc->sg->page) + pc->sg->offset;
+			drive->hwif->atapi_input_bytes(drive,
+						buf + pc->b_count, count);
+		}
+		bcount -= count; pc->b_count += count;
 		if (pc->b_count == pc->sg->length) {
 			pc->sg++;
 			pc->b_count = 0;
@@ -205,12 +215,22 @@ static void idescsi_output_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsign
 			return;
 		}
 		count = min(pc->sg->length - pc->b_count, bcount);
-		buf = kmap_atomic(pc->sg->page, KM_IRQ0);
-		drive->hwif->atapi_output_bytes(drive,
-				buf + pc->b_count + pc->sg->offset, count);
-		kunmap_atomic(buf, KM_IRQ0);
-		bcount -= count;
-		pc->b_count += count;
+		if (PageHighMem(pc->sg->page)) {
+			unsigned long flags;
+
+			local_irq_save(flags);
+			buf = kmap_atomic(pc->sg->page, KM_IRQ0) +
+						pc->sg->offset;
+			drive->hwif->atapi_output_bytes(drive,
+						buf + pc->b_count, count);
+			kunmap_atomic(buf - pc->sg->offset, KM_IRQ0);
+			local_irq_restore(flags);
+		} else {
+			buf = page_address(pc->sg->page) + pc->sg->offset;
+			drive->hwif->atapi_output_bytes(drive,
+						buf + pc->b_count, count);
+		}
+		bcount -= count; pc->b_count += count;
 		if (pc->b_count == pc->sg->length) {
 			pc->sg++;
 			pc->b_count = 0;

+ 1 - 1
fs/fs-writeback.c

@@ -247,7 +247,7 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
 	wait_queue_head_t *wqh;
 
 	if (!atomic_read(&inode->i_count))
-		WARN_ON(!(inode->i_state & I_WILL_FREE));
+		WARN_ON(!(inode->i_state & (I_WILL_FREE|I_FREEING)));
 	else
 		WARN_ON(inode->i_state & I_WILL_FREE);