aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/sn/kernel/io_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/sn/kernel/io_init.c')
-rw-r--r--arch/ia64/sn/kernel/io_init.c45
1 files changed, 26 insertions, 19 deletions
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
index 00700f7e6837..d7e4d79e16a8 100644
--- a/arch/ia64/sn/kernel/io_init.c
+++ b/arch/ia64/sn/kernel/io_init.c
@@ -10,6 +10,7 @@
10#include <linux/nodemask.h> 10#include <linux/nodemask.h>
11#include <asm/sn/types.h> 11#include <asm/sn/types.h>
12#include <asm/sn/addrs.h> 12#include <asm/sn/addrs.h>
13#include <asm/sn/sn_feature_sets.h>
13#include <asm/sn/geo.h> 14#include <asm/sn/geo.h>
14#include <asm/sn/io.h> 15#include <asm/sn/io.h>
15#include <asm/sn/pcibr_provider.h> 16#include <asm/sn/pcibr_provider.h>
@@ -173,8 +174,8 @@ sn_pcidev_info_get(struct pci_dev *dev)
173 */ 174 */
174static u8 war_implemented = 0; 175static u8 war_implemented = 0;
175 176
176static void sn_device_fixup_war(u64 nasid, u64 widget, int device, 177static s64 sn_device_fixup_war(u64 nasid, u64 widget, int device,
177 struct sn_flush_device_common *common) 178 struct sn_flush_device_common *common)
178{ 179{
179 struct sn_flush_device_war *war_list; 180 struct sn_flush_device_war *war_list;
180 struct sn_flush_device_war *dev_entry; 181 struct sn_flush_device_war *dev_entry;
@@ -198,15 +199,16 @@ static void sn_device_fixup_war(u64 nasid, u64 widget, int device,
198 199
199 dev_entry = war_list + device; 200 dev_entry = war_list + device;
200 memcpy(common,dev_entry, sizeof(*common)); 201 memcpy(common,dev_entry, sizeof(*common));
201
202 kfree(war_list); 202 kfree(war_list);
203
204 return isrv.status;
203} 205}
204 206
205/* 207/*
206 * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for 208 * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for
207 * each node in the system. 209 * each node in the system.
208 */ 210 */
209static void sn_fixup_ionodes(void) 211static void __init sn_fixup_ionodes(void)
210{ 212{
211 struct sn_flush_device_kernel *sn_flush_device_kernel; 213 struct sn_flush_device_kernel *sn_flush_device_kernel;
212 struct sn_flush_device_kernel *dev_entry; 214 struct sn_flush_device_kernel *dev_entry;
@@ -279,23 +281,21 @@ static void sn_fixup_ionodes(void)
279 memset(dev_entry->common, 0x0, sizeof(struct 281 memset(dev_entry->common, 0x0, sizeof(struct
280 sn_flush_device_common)); 282 sn_flush_device_common));
281 283
282 status = sal_get_device_dmaflush_list(nasid, 284 if (sn_prom_feature_available(
283 widget, 285 PRF_DEVICE_FLUSH_LIST))
284 device, 286 status = sal_get_device_dmaflush_list(
287 nasid,
288 widget,
289 device,
285 (u64)(dev_entry->common)); 290 (u64)(dev_entry->common));
286 if (status) { 291 else
287 if (sn_sal_rev() < 0x0450) { 292 status = sn_device_fixup_war(nasid,
288 /* shortlived WAR for older 293 widget,
289 * PROM images 294 device,
290 */
291 sn_device_fixup_war(nasid,
292 widget,
293 device,
294 dev_entry->common); 295 dev_entry->common);
295 } 296 if (status != SALRET_OK)
296 else 297 panic("SAL call failed: %s\n",
297 BUG(); 298 ia64_sal_strerror(status));
298 }
299 299
300 spin_lock_init(&dev_entry->sfdl_flush_lock); 300 spin_lock_init(&dev_entry->sfdl_flush_lock);
301 } 301 }
@@ -467,6 +467,13 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
467 pcidev_info->pdi_sn_irq_info = NULL; 467 pcidev_info->pdi_sn_irq_info = NULL;
468 kfree(sn_irq_info); 468 kfree(sn_irq_info);
469 } 469 }
470
471 /*
472 * MSI currently not supported on altix. Remove this when
473 * the MSI abstraction patches are integrated into the kernel
474 * (sometime after 2.6.16 releases)
475 */
476 dev->no_msi = 1;
470} 477}
471 478
472/* 479/*