bk://linux-dj.bkbits.net/agpgart davej@redhat.com|ChangeSet|20041212010459|00094 davej # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/12/12 17:44:44-08:00 akpm@bix.(none) # Merge bk://linux-dj.bkbits.net/agpgart # into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/12/12 17:44:40-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/char/agp/intel-agp.c # 2004/12/12 17:44:39-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/12/11 20:04:59-05:00 davej@redhat.com # [AGPGART] Fix TLB flushing issues with change_page_attr() # # Calls to change_page_attr() need an explicit call to # global_flush_tlb() afterwards. The AGP code didn't # do this in a number of cases. This patch makes # map_page_into_agp/unmap_page_from_agp do the calls # themselves, which takes care of most of the problem. # # The Intel AGP driver also has some slightly different calls to what # map_page_into_agp() does, as it changes 4 contiguous pages. # Introduce explicit flushes afterwards there too. # # Thanks to Alan Cox for pointing this out. # # Signed-off-by: Dave Jones # # include/asm-x86_64/agp.h # 2004/12/11 20:04:40-05:00 davej@redhat.com +2 -3 # [AGPGART] Fix TLB flushing issues with change_page_attr() # # Calls to change_page_attr() need an explicit call to # global_flush_tlb() afterwards. The AGP code didn't # do this in a number of cases. This patch makes # map_page_into_agp/unmap_page_from_agp do the calls # themselves, which takes care of most of the problem. # # The Intel AGP driver also has some slightly different calls to what # map_page_into_agp() does, as it changes 4 contiguous pages. # Introduce explicit flushes afterwards there too. # # Thanks to Alan Cox for pointing this out. # # Signed-off-by: Dave Jones # # include/asm-i386/agp.h # 2004/12/11 20:04:40-05:00 davej@redhat.com +2 -2 # [AGPGART] Fix TLB flushing issues with change_page_attr() # # Calls to change_page_attr() need an explicit call to # global_flush_tlb() afterwards. The AGP code didn't # do this in a number of cases. This patch makes # map_page_into_agp/unmap_page_from_agp do the calls # themselves, which takes care of most of the problem. # # The Intel AGP driver also has some slightly different calls to what # map_page_into_agp() does, as it changes 4 contiguous pages. # Introduce explicit flushes afterwards there too. # # Thanks to Alan Cox for pointing this out. # # Signed-off-by: Dave Jones # # drivers/char/agp/intel-agp.c # 2004/12/11 20:04:40-05:00 davej@redhat.com +5 -2 # [AGPGART] Fix TLB flushing issues with change_page_attr() # # Calls to change_page_attr() need an explicit call to # global_flush_tlb() afterwards. The AGP code didn't # do this in a number of cases. This patch makes # map_page_into_agp/unmap_page_from_agp do the calls # themselves, which takes care of most of the problem. # # The Intel AGP driver also has some slightly different calls to what # map_page_into_agp() does, as it changes 4 contiguous pages. # Introduce explicit flushes afterwards there too. # # Thanks to Alan Cox for pointing this out. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2004/12/11 20:04:40-05:00 davej@redhat.com +23 -0 # [AGPGART] Fix TLB flushing issues with change_page_attr() # # Calls to change_page_attr() need an explicit call to # global_flush_tlb() afterwards. The AGP code didn't # do this in a number of cases. This patch makes # map_page_into_agp/unmap_page_from_agp do the calls # themselves, which takes care of most of the problem. # # The Intel AGP driver also has some slightly different calls to what # map_page_into_agp() does, as it changes 4 contiguous pages. # Introduce explicit flushes afterwards there too. # # Thanks to Alan Cox for pointing this out. # # Signed-off-by: Dave Jones # # drivers/char/agp/ati-agp.c # 2004/12/11 20:04:40-05:00 davej@redhat.com +0 -3 # [AGPGART] Fix TLB flushing issues with change_page_attr() # # Calls to change_page_attr() need an explicit call to # global_flush_tlb() afterwards. The AGP code didn't # do this in a number of cases. This patch makes # map_page_into_agp/unmap_page_from_agp do the calls # themselves, which takes care of most of the problem. # # The Intel AGP driver also has some slightly different calls to what # map_page_into_agp() does, as it changes 4 contiguous pages. # Introduce explicit flushes afterwards there too. # # Thanks to Alan Cox for pointing this out. # # Signed-off-by: Dave Jones # # ChangeSet # 2004/12/11 19:55:36-05:00 davej@new-host-2.kernelslacker.org # Cset exclude: davej@redhat.com|ChangeSet|20041211003247|00906 # # include/asm-x86_64/agp.h # 2004/12/11 19:55:30-05:00 davej@new-host-2.kernelslacker.org +0 -0 # Exclude # # include/asm-i386/agp.h # 2004/12/11 19:55:30-05:00 davej@new-host-2.kernelslacker.org +0 -0 # Exclude # # drivers/char/agp/intel-agp.c # 2004/12/11 19:55:30-05:00 davej@new-host-2.kernelslacker.org +0 -0 # Exclude # # drivers/char/agp/ati-agp.c # 2004/12/11 19:55:30-05:00 davej@new-host-2.kernelslacker.org +0 -0 # Exclude # # ChangeSet # 2004/12/10 23:30:59-05:00 davej@redhat.com # [AGPGART] Add support for ALI M1681/M1683 # # Signed-off-by: Dave Jones # # include/linux/pci_ids.h # 2004/12/10 23:30:49-05:00 davej@redhat.com +3 -1 # [AGPGART] Add support for ALI M1681/M1683 # # Signed-off-by: Dave Jones # # drivers/char/agp/ali-agp.c # 2004/12/10 23:30:49-05:00 davej@redhat.com +9 -0 # [AGPGART] Add support for ALI M1681/M1683 # # Signed-off-by: Dave Jones # # ChangeSet # 2004/12/10 19:07:28-05:00 davej@redhat.com # [AGPGART] Simplify global_cache_flush # # on_each_cpu does the right thing in the UP case, so we can # kill those ugly ifdefs. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2004/12/10 19:07:21-05:00 davej@redhat.com +0 -6 # [AGPGART] Simplify global_cache_flush # # on_each_cpu does the right thing in the UP case, so we can # kill those ugly ifdefs. # # Signed-off-by: Dave Jones # # ChangeSet # 2004/12/06 14:22:48-08:00 akpm@bix.(none) # Merge bk://linux-dj.bkbits.net/agpgart # into bix.(none):/usr/src/bk-agpgart # # drivers/char/agp/sis-agp.c # 2004/12/06 14:22:45-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/12/05 00:24:18-05:00 davej@new-host-2.kernelslacker.org # Merge new-host-2.kernelslacker.org:/home/davej/bk/bk-linus # into new-host-2.kernelslacker.org:/home/davej/bk/agpgart # # drivers/char/agp/sis-agp.c # 2004/12/05 00:24:08-05:00 davej@new-host-2.kernelslacker.org +0 -1 # Auto merged # # ChangeSet # 2004/12/01 00:37:29-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/12/01 00:37:24-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/22 12:52:55-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/11/22 12:52:50-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/21 19:49:59-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/11/21 19:49:55-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/19 19:48:45-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/11/19 19:48:40-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/15 20:48:10-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/11/15 20:48:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/13 14:19:54-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/11/13 14:19:49-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/char/agp/sis-agp.c # 2004/11/13 14:19:49-08:00 akpm@bix.(none) +0 -1 # Auto merged # # ChangeSet # 2004/11/03 13:08:01-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/11/03 13:07:57-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/01 16:07:39-05:00 davej@dhcp83-103.boston.redhat.com # Cset exclude: davej@redhat.com|ChangeSet|20041028185758|54148 # # drivers/char/agp/generic.c # 2004/11/01 16:07:37-05:00 davej@dhcp83-103.boston.redhat.com +0 -0 # Exclude # # drivers/char/agp/backend.c # 2004/11/01 16:07:37-05:00 davej@dhcp83-103.boston.redhat.com +0 -0 # Exclude # # ChangeSet # 2004/10/28 14:40:59-07:00 akpm@bix.(none) # Merge bk://linux-dj.bkbits.net/agpgart # into bix.(none):/usr/src/bk-agpgart # # drivers/char/agp/intel-mch-agp.c # 2004/10/28 14:40:56-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/char/agp/intel-agp.c # 2004/10/28 14:40:56-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/10/28 15:13:09-04:00 davej@redhat.com # [AGPGART] sis-agp.c: replace pci_find_device with pci_get_device # # As pci_find_device is going away soon I have converted this file to use # pci_get_device instead. for_each_pci_dev is a macro wrapper around # pci_get_device. I have compile tested it. If anyone has this hardware # and could test it that would be great. # # Signed-off-by: Hanna Linder # Signed-off-by: Dave Jones # # drivers/char/agp/sis-agp.c # 2004/10/28 15:13:02-04:00 davej@redhat.com +1 -1 # [AGPGART] sis-agp.c: replace pci_find_device with pci_get_device # # As pci_find_device is going away soon I have converted this file to use # pci_get_device instead. for_each_pci_dev is a macro wrapper around # pci_get_device. I have compile tested it. If anyone has this hardware # and could test it that would be great. # # Signed-off-by: Hanna Linder # Signed-off-by: Dave Jones # # ChangeSet # 2004/10/28 15:12:23-04:00 davej@redhat.com # [AGPGART] isoch.c: replace pci_find_device with pci_get_device # # As pci_find_device is going away soon I have converted this file to use # pci_get_device instead. for_each_pci_dev is just a macro wrapper around # pci_get_device. I have compile tested it. If anyone has this hardware # and could test it that would be great. # # Signed-off-by: Hanna Linder # Signed-off-by: Dave Jones # # drivers/char/agp/isoch.c # 2004/10/28 15:12:17-04:00 davej@redhat.com +1 -1 # [AGPGART] isoch.c: replace pci_find_device with pci_get_device # # As pci_find_device is going away soon I have converted this file to use # pci_get_device instead. for_each_pci_dev is just a macro wrapper around # pci_get_device. I have compile tested it. If anyone has this hardware # and could test it that would be great. # # Signed-off-by: Hanna Linder # Signed-off-by: Dave Jones # # ChangeSet # 2004/10/28 15:11:35-04:00 davej@redhat.com # [AGPGART] intel-mch-agp.c: replace pci_find_device with pci_get_device # # As pci_find_device is going away soon I have converted this file to use # pci_get_device instead. I have compile tested it. If anyone has this hardware # and could test it that would be great. # # Signed-off-by: Hanna Linder # Signed-off-by: Dave Jones # # drivers/char/agp/intel-mch-agp.c # 2004/10/28 15:11:29-04:00 davej@redhat.com +3 -2 # [AGPGART] intel-mch-agp.c: replace pci_find_device with pci_get_device # # As pci_find_device is going away soon I have converted this file to use # pci_get_device instead. I have compile tested it. If anyone has this hardware # and could test it that would be great. # # Signed-off-by: Hanna Linder # Signed-off-by: Dave Jones # # ChangeSet # 2004/10/28 15:10:52-04:00 davej@redhat.com # [AGPGART] intel-agp.c: replace pci_find_device with pci_get_device # # As pci_find_device is going away soon I have converted this file to use # pci_get_device instead. I have compile tested it. If anyone has this hardware # and could test it that would be great. # # Signed-off-by: Hanna Linder # Signed-off-by: Dave Jones # # drivers/char/agp/intel-agp.c # 2004/10/28 15:10:46-04:00 davej@redhat.com +4 -3 # [AGPGART] intel-agp.c: replace pci_find_device with pci_get_device # # As pci_find_device is going away soon I have converted this file to use # pci_get_device instead. I have compile tested it. If anyone has this hardware # and could test it that would be great. # # Signed-off-by: Hanna Linder # Signed-off-by: Dave Jones # # ChangeSet # 2004/10/28 15:10:07-04:00 davej@redhat.com # [AGPGART] generic.c: replace pci_find_device with pci_get_device # # As pci_find_device is going away soon I have converted this file to use # pci_get_device instead. I have compile tested it. If anyone has this hardware # and could test it that would be great. # # # Signed-off-by: Hanna Linder # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2004/10/28 15:10:01-04:00 davej@redhat.com +2 -2 # [AGPGART] generic.c: replace pci_find_device with pci_get_device # # As pci_find_device is going away soon I have converted this file to use # pci_get_device instead. I have compile tested it. If anyone has this hardware # and could test it that would be great. # # # Signed-off-by: Hanna Linder # Signed-off-by: Dave Jones # # ChangeSet # 2004/10/28 15:09:04-04:00 davej@redhat.com # [AGPGART] amd64-agp.c replace pci_find_device with pci_get_device # As pci_find_device is going away soon I have converted this file to use # pci_get_device instead. I have compile tested it. If anyone has this hardware # and could test it that would be great. # # Signed-off-by: Hanna Linder # Signed-off-by: Dave Jones # # drivers/char/agp/amd64-agp.c # 2004/10/28 15:08:58-04:00 davej@redhat.com +8 -3 # [AGPGART] amd64-agp.c replace pci_find_device with pci_get_device # As pci_find_device is going away soon I have converted this file to use # pci_get_device instead. I have compile tested it. If anyone has this hardware # and could test it that would be great. # # Signed-off-by: Hanna Linder # Signed-off-by: Dave Jones # # ChangeSet # 2004/10/20 23:57:28-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/10/20 23:57:22-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/10/19 20:27:26-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/10/19 20:27:22-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/char/agp/intel-mch-agp.c # 2004/10/19 20:27:22-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/char/agp/intel-agp.c # 2004/10/19 20:27:22-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/10/19 16:55:15-07:00 akpm@bix.(none) # Merge bk://linux-dj.bkbits.net/agpgart # into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/10/19 16:55:10-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/10/19 16:52:39-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/10/19 16:52:35-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/char/agp/intel-agp.c # 2004/10/19 16:52:35-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/10/18 20:03:35-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # drivers/char/agp/intel-agp.c # 2004/10/18 20:03:32-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/10/06 13:49:40-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # drivers/char/agp/intel-agp.c # 2004/10/06 13:49:37-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/09/30 13:08:14-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/09/30 13:08:10-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/09/15 12:18:56-07:00 akpm@bix.(none) # Merge bk://linux-dj.bkbits.net/agpgart # into bix.(none):/usr/src/bk-agpgart # # drivers/char/agp/intel-mch-agp.c # 2004/09/15 12:18:52-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/char/agp/intel-agp.c # 2004/09/15 12:18:52-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/09/11 14:55:59-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # drivers/char/agp/intel-agp.c # 2004/09/11 14:55:52-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/28 16:13:58-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/08/28 16:13:54-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/27 14:50:58-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/08/27 14:50:54-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/27 13:06:31-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/08/27 13:06:28-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/23 21:23:08-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # ChangeSet # 2004/08/23 16:27:14-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # drivers/char/agp/intel-mch-agp.c # 2004/08/23 21:23:03-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/char/agp/intel-agp.c # 2004/08/23 21:23:03-07:00 akpm@bix.(none) +0 -0 # Auto merged # # include/linux/pci_ids.h # 2004/08/23 16:27:09-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/23 13:42:56-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/08/23 13:42:52-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/22 21:03:23-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/08/22 21:03:19-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/05 12:39:41-07:00 akpm@bix.(none) # Merge bk://linux-dj.bkbits.net/agpgart # into bix.(none):/usr/src/bk-agpgart # # drivers/char/agp/intel-agp.c # 2004/08/05 12:39:37-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/04 02:37:29-07:00 akpm@bix.(none) # Merge bk://linux-dj.bkbits.net/agpgart # into bix.(none):/usr/src/bk-agpgart # # drivers/char/agp/intel-mch-agp.c # 2004/08/04 02:37:25-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/char/agp/intel-agp.c # 2004/08/04 02:37:25-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/07/31 23:52:37-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/07/31 23:52:34-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/07/30 22:16:17-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/07/30 22:16:14-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/char/agp/intel-agp.c # 2004/07/30 22:16:14-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/07/27 13:18:37-07:00 akpm@bix.(none) # Merge bk://linux-dj.bkbits.net/agpgart # into bix.(none):/usr/src/bk-agpgart # # include/linux/pci_ids.h # 2004/07/27 13:18:32-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/char/agp/intel-agp.c # 2004/07/27 13:18:32-07:00 akpm@bix.(none) +0 -0 # Auto merged # diff -Nru a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c --- a/drivers/char/agp/ali-agp.c 2004-12-12 17:47:10 -08:00 +++ b/drivers/char/agp/ali-agp.c 2004-12-12 17:47:10 -08:00 @@ -277,6 +277,15 @@ .device_id = PCI_DEVICE_ID_AL_M1671, .chipset_name = "M1671", }, + { + .device_id = PCI_DEVICE_ID_AL_M1681, + .chipset_name = "M1681", + }, + { + .device_id = PCI_DEVICE_ID_AL_M1683, + .chipset_name = "M1683", + }, + { }, /* dummy final entry, always present */ }; diff -Nru a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c --- a/drivers/char/agp/amd64-agp.c 2004-12-12 17:47:10 -08:00 +++ b/drivers/char/agp/amd64-agp.c 2004-12-12 17:47:10 -08:00 @@ -355,7 +355,7 @@ int i = 0; /* cache pci_devs of northbridges. */ - while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev)) + while ((loop_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev)) != NULL) { if (i == MAX_HAMMER_GARTS) { printk(KERN_ERR PFX "Too many northbridges for AGP\n"); @@ -625,6 +625,11 @@ int __init agp_amd64_init(void) { int err = 0; + static struct pci_device_id amd64nb[] = { + { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1103) }, + { }, + }; + if (agp_off) return -EINVAL; if (pci_module_init(&agp_amd64_pci_driver) > 0) { @@ -640,13 +645,13 @@ } /* First check that we have at least one AMD64 NB */ - if (!pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, NULL)) + if (!pci_dev_present(amd64nb)) return -ENODEV; /* Look for any AGP bridge */ dev = NULL; err = -ENODEV; - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev))) { + for_each_pci_dev(dev) { if (!pci_find_capability(dev, PCI_CAP_ID_AGP)) continue; /* Only one bridge supported right now */ diff -Nru a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c --- a/drivers/char/agp/ati-agp.c 2004-12-12 17:47:10 -08:00 +++ b/drivers/char/agp/ati-agp.c 2004-12-12 17:47:10 -08:00 @@ -61,9 +61,6 @@ SetPageReserved(virt_to_page(page_map->real)); err = map_page_into_agp(virt_to_page(page_map->real)); - - /* CACHE_FLUSH(); */ - global_cache_flush(); page_map->remapped = ioremap_nocache(virt_to_phys(page_map->real), PAGE_SIZE); if (page_map->remapped == NULL || err) { diff -Nru a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c --- a/drivers/char/agp/generic.c 2004-12-12 17:47:10 -08:00 +++ b/drivers/char/agp/generic.c 2004-12-12 17:47:10 -08:00 @@ -35,7 +35,10 @@ #include #include #include +#include #include +#include +#include #include "agp.h" __u32 *agp_gatt_table; @@ -47,6 +50,26 @@ */ EXPORT_SYMBOL_GPL(agp_memory_reserved); +#if defined(CONFIG_X86) +int map_page_into_agp(struct page *page) +{ + int i; + i = change_page_attr(page, 1, PAGE_KERNEL_NOCACHE); + global_flush_tlb(); + return i; +} +EXPORT_SYMBOL_GPL(map_page_into_agp); + +int unmap_page_from_agp(struct page *page) +{ + int i; + i = change_page_attr(page, 1, PAGE_KERNEL); + global_flush_tlb(); + return i; +} +EXPORT_SYMBOL_GPL(unmap_page_from_agp); +#endif + /* * Generic routines for handling agp_memory structures - * They use the basic page allocation routines to do the brunt of the work. @@ -507,7 +530,7 @@ u32 tmp; u32 agp3; - while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL) { + for_each_pci_dev(device) { cap_ptr = pci_find_capability(device, PCI_CAP_ID_AGP); if (!cap_ptr) continue; @@ -551,7 +574,7 @@ if (agp_v3) mode *= 4; - while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL) { + for_each_pci_dev(device) { u8 agp = pci_find_capability(device, PCI_CAP_ID_AGP); if (!agp) continue; @@ -958,21 +981,15 @@ EXPORT_SYMBOL(agp_enable); -#ifdef CONFIG_SMP static void ipi_handler(void *null) { flush_agp_cache(); } -#endif void global_cache_flush(void) { -#ifdef CONFIG_SMP if (on_each_cpu(ipi_handler, NULL, 1, 1) != 0) panic(PFX "timed out waiting for the other CPUs!\n"); -#else - flush_agp_cache(); -#endif } EXPORT_SYMBOL(global_cache_flush); diff -Nru a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c --- a/drivers/char/agp/intel-agp.c 2004-12-12 17:47:10 -08:00 +++ b/drivers/char/agp/intel-agp.c 2004-12-12 17:47:10 -08:00 @@ -161,13 +161,15 @@ struct page * page; page = alloc_pages(GFP_KERNEL, 2); - if (page == NULL) { + if (page == NULL) return NULL; - } + if (change_page_attr(page, 4, PAGE_KERNEL_NOCACHE) < 0) { + global_flush_tlb(); __free_page(page); return NULL; } + global_flush_tlb(); get_page(page); SetPageLocked(page); atomic_inc(&agp_bridge->current_memory_agp); @@ -183,6 +185,7 @@ page = virt_to_page(addr); change_page_attr(page, 4, PAGE_KERNEL); + global_flush_tlb(); put_page(page); unlock_page(page); free_pages((unsigned long)addr, 2); @@ -1493,7 +1496,7 @@ { struct pci_dev *i810_dev; - i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL, device, NULL); + i810_dev = pci_get_device(PCI_VENDOR_ID_INTEL, device, NULL); if (!i810_dev) return 0; intel_i810_private.i810_dev = i810_dev; @@ -1504,9 +1507,9 @@ { struct pci_dev *i830_dev; - i830_dev = pci_find_device(PCI_VENDOR_ID_INTEL, device, NULL); + i830_dev = pci_get_device(PCI_VENDOR_ID_INTEL, device, NULL); if (i830_dev && PCI_FUNC(i830_dev->devfn) != 0) { - i830_dev = pci_find_device(PCI_VENDOR_ID_INTEL, + i830_dev = pci_get_device(PCI_VENDOR_ID_INTEL, device, i830_dev); } @@ -1715,6 +1718,7 @@ { struct agp_bridge_data *bridge = pci_get_drvdata(pdev); + pci_dev_put(pdev); agp_remove_bridge(bridge); agp_put_bridge(bridge); } diff -Nru a/drivers/char/agp/intel-mch-agp.c b/drivers/char/agp/intel-mch-agp.c --- a/drivers/char/agp/intel-mch-agp.c 2004-12-12 17:47:10 -08:00 +++ b/drivers/char/agp/intel-mch-agp.c 2004-12-12 17:47:10 -08:00 @@ -470,9 +470,9 @@ { struct pci_dev *i830_dev; - i830_dev = pci_find_device(PCI_VENDOR_ID_INTEL, device, NULL); + i830_dev = pci_get_device(PCI_VENDOR_ID_INTEL, device, NULL); if (i830_dev && PCI_FUNC(i830_dev->devfn) != 0) { - i830_dev = pci_find_device(PCI_VENDOR_ID_INTEL, + i830_dev = pci_get_device(PCI_VENDOR_ID_INTEL, device, i830_dev); } @@ -565,6 +565,7 @@ { struct agp_bridge_data *bridge = pci_get_drvdata(pdev); + pci_dev_put(pdev); agp_remove_bridge(bridge); agp_put_bridge(bridge); } diff -Nru a/drivers/char/agp/isoch.c b/drivers/char/agp/isoch.c --- a/drivers/char/agp/isoch.c 2004-12-12 17:47:10 -08:00 +++ b/drivers/char/agp/isoch.c 2004-12-12 17:47:10 -08:00 @@ -347,7 +347,7 @@ INIT_LIST_HEAD(head); /* Find all AGP devices, and add them to dev_list. */ - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { + for_each_pci_dev(dev) { mcapndx = pci_find_capability(dev, PCI_CAP_ID_AGP); if (mcapndx == 0) continue; diff -Nru a/include/asm-i386/agp.h b/include/asm-i386/agp.h --- a/include/asm-i386/agp.h 2004-12-12 17:47:10 -08:00 +++ b/include/asm-i386/agp.h 2004-12-12 17:47:10 -08:00 @@ -12,8 +12,8 @@ * data corruption on some CPUs. */ -#define map_page_into_agp(page) change_page_attr(page, 1, PAGE_KERNEL_NOCACHE) -#define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL) +int map_page_into_agp(struct page *page); +int unmap_page_from_agp(struct page *page); #define flush_agp_mappings() global_flush_tlb() /* Could use CLFLUSH here if the cpu supports it. But then it would diff -Nru a/include/asm-x86_64/agp.h b/include/asm-x86_64/agp.h --- a/include/asm-x86_64/agp.h 2004-12-12 17:47:10 -08:00 +++ b/include/asm-x86_64/agp.h 2004-12-12 17:47:10 -08:00 @@ -10,9 +10,8 @@ * with different cachability attributes for the same page. */ -#define map_page_into_agp(page) \ - change_page_attr(page, 1, PAGE_KERNEL_NOCACHE) -#define unmap_page_from_agp(page) change_page_attr(page, 1, PAGE_KERNEL) +int map_page_into_agp(struct page *page); +int unmap_page_from_agp(struct page *page); #define flush_agp_mappings() global_flush_tlb() /* Could use CLFLUSH here if the cpu supports it. But then it would diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h --- a/include/linux/pci_ids.h 2004-12-12 17:47:10 -08:00 +++ b/include/linux/pci_ids.h 2004-12-12 17:47:10 -08:00 @@ -1016,6 +1016,7 @@ #define PCI_DEVICE_ID_AL_M1531 0x1531 #define PCI_DEVICE_ID_AL_M1533 0x1533 #define PCI_DEVICE_ID_AL_M1541 0x1541 +#define PCI_DEVICE_ID_AL_M1543 0x1543 #define PCI_DEVICE_ID_AL_M1563 0x1563 #define PCI_DEVICE_ID_AL_M1621 0x1621 #define PCI_DEVICE_ID_AL_M1631 0x1631 @@ -1025,7 +1026,8 @@ #define PCI_DEVICE_ID_AL_M1647 0x1647 #define PCI_DEVICE_ID_AL_M1651 0x1651 #define PCI_DEVICE_ID_AL_M1671 0x1671 -#define PCI_DEVICE_ID_AL_M1543 0x1543 +#define PCI_DEVICE_ID_AL_M1681 0x1681 +#define PCI_DEVICE_ID_AL_M1683 0x1683 #define PCI_DEVICE_ID_AL_M3307 0x3307 #define PCI_DEVICE_ID_AL_M4803 0x5215 #define PCI_DEVICE_ID_AL_M5219 0x5219