]> git.neil.brown.name Git - history.git/commitdiff
Import 2.4.0-test2pre12 2.4.0-test2pre12
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:35:53 +0000 (15:35 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:35:53 +0000 (15:35 -0500)
arch/i386/kernel/pci-irq.c
drivers/block/elevator.c
drivers/block/ll_rw_blk.c
include/asm-i386/io_apic.h

index 56dd411b685a4a561a522e88fdf075f9a1e44ba8..933d6c3c9894bc00a5584631401557e216443567 100644 (file)
@@ -128,14 +128,13 @@ static void eisa_set_level_irq(unsigned int irq)
 static int pirq_ali_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
 {
        static unsigned char irqmap[16] = { 0, 9, 3, 10, 4, 5, 7, 6, 1, 11, 0, 12, 0, 14, 0, 15 };
+       u8 x;
+       unsigned reg;
+
        pirq--;
-       if (pirq < 8) {
-               u8 x;
-               unsigned reg = 0x48 + (pirq >> 1);
-               pci_read_config_byte(router, reg, &x);
-               return irqmap[(pirq & 1) ? (x >> 4) : (x & 0x0f)];
-       }
-       return 0;
+       reg = 0x48 + (pirq >> 1);
+       pci_read_config_byte(router, reg, &x);
+       return irqmap[(pirq & 1) ? (x >> 4) : (x & 0x0f)];
 }
 
 static int pirq_ali_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
@@ -143,7 +142,7 @@ static int pirq_ali_set(struct pci_dev *router, struct pci_dev *dev, int pirq, i
        static unsigned char irqmap[16] = { 0, 8, 0, 2, 4, 5, 7, 6, 0, 1, 3, 9, 11, 0, 13, 15 };
        unsigned int val = irqmap[irq];
        pirq--;
-       if (val && pirq < 8) {
+       if (val) {
                u8 x;
                unsigned reg = 0x48 + (pirq >> 1);
                pci_read_config_byte(router, reg, &x);
index f004960a033a93632ea9b3f7077443b7a7c1d0b7..2bf92251c8503fefa2690fb71203de51c7599915 100644 (file)
@@ -83,10 +83,10 @@ int elevator_default_merge(request_queue_t *q, struct request **req,
        latency = orig_latency = elevator_request_latency(elevator, rw);
        sequence = elevator->sequence;
        
+       entry = head;
        if (q->head_active && !q->plugged)
                head = head->next;
 
-       entry = head;
        while ((entry = entry->prev) != head && !starving) {
                *req = blkdev_entry_to_request(entry);
                latency += (*req)->nr_segments;
@@ -161,10 +161,10 @@ int elevator_linus_merge(request_queue_t *q, struct request **req,
        struct list_head *entry, *head = &q->queue_head;
        unsigned int count = bh->b_size >> 9;
 
+       entry = head;
        if (q->head_active && !q->plugged)
                head = head->next;
 
-       entry = head;
        while ((entry = entry->prev) != head) {
                *req = blkdev_entry_to_request(entry);
                if (!(*req)->elevator_sequence)
index abe335a9b71f5effc5f0d95af275075c63f9f673..2ed93b30079eb43d0f20c128fc2ef8ee0ae24a48 100644 (file)
@@ -709,16 +709,12 @@ get_rq:
 
                req = __get_request_wait(q, rw);
                spin_lock_irq(&io_request_lock);
-
-               /*
-                * revalidate elevator, queue request_lock was dropped
-                */
-               head = &q->queue_head;
-               if (q->head_active && !q->plugged)
-                       head = head->next;
-
        }
 
+       head = &q->queue_head;
+       if (q->head_active && !q->plugged)
+               head = head->next;
+
 /* fill up the request-info, and add it to the queue */
        req->cmd = rw;
        req->errors = 0;
index bb4038c154787c21940b95639d22c488703d5224..98358424439ce852f3cf94e0746aaa7633fbb327 100644 (file)
@@ -136,7 +136,7 @@ extern void IO_APIC_init_uniprocessor (void);
  * If we use the IO-APIC for IRQ routing, disable automatic
  * assignment of PCI IRQ's.
  */
-#define io_apic_assign_pci_irqs (!mp_irq_entries)
+#define io_apic_assign_pci_irqs (mp_irq_entries != 0)
 
 #else  /* !CONFIG_X86_IO_APIC */
 #define io_apic_assign_pci_irqs 0