Commit 61d67f2e authored by Prarit Bhargava's avatar Prarit Bhargava Committed by Tony Luck

[IA64-SGI] Add PROM feature set for device flush list

Introduce PRF_DEVICE_FLUSH_LIST flag for older PROMs.
Signed-off-by: default avatarPrarit Bhargava <prarit@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 139366a0
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/nodemask.h> #include <linux/nodemask.h>
#include <asm/sn/types.h> #include <asm/sn/types.h>
#include <asm/sn/addrs.h> #include <asm/sn/addrs.h>
#include <asm/sn/sn_feature_sets.h>
#include <asm/sn/geo.h> #include <asm/sn/geo.h>
#include <asm/sn/io.h> #include <asm/sn/io.h>
#include <asm/sn/pcibr_provider.h> #include <asm/sn/pcibr_provider.h>
...@@ -173,7 +174,7 @@ sn_pcidev_info_get(struct pci_dev *dev) ...@@ -173,7 +174,7 @@ sn_pcidev_info_get(struct pci_dev *dev)
*/ */
static u8 war_implemented = 0; static u8 war_implemented = 0;
static void sn_device_fixup_war(u64 nasid, u64 widget, int device, static s64 sn_device_fixup_war(u64 nasid, u64 widget, int device,
struct sn_flush_device_common *common) struct sn_flush_device_common *common)
{ {
struct sn_flush_device_war *war_list; struct sn_flush_device_war *war_list;
...@@ -198,8 +199,9 @@ static void sn_device_fixup_war(u64 nasid, u64 widget, int device, ...@@ -198,8 +199,9 @@ static void sn_device_fixup_war(u64 nasid, u64 widget, int device,
dev_entry = war_list + device; dev_entry = war_list + device;
memcpy(common,dev_entry, sizeof(*common)); memcpy(common,dev_entry, sizeof(*common));
kfree(war_list); kfree(war_list);
return isrv.status;
} }
/* /*
...@@ -279,23 +281,21 @@ static void sn_fixup_ionodes(void) ...@@ -279,23 +281,21 @@ static void sn_fixup_ionodes(void)
memset(dev_entry->common, 0x0, sizeof(struct memset(dev_entry->common, 0x0, sizeof(struct
sn_flush_device_common)); sn_flush_device_common));
status = sal_get_device_dmaflush_list(nasid, if (sn_prom_feature_available(
PRF_DEVICE_FLUSH_LIST))
status = sal_get_device_dmaflush_list(
nasid,
widget, widget,
device, device,
(u64)(dev_entry->common)); (u64)(dev_entry->common));
if (status) { else
if (sn_sal_rev() < 0x0450) { status = sn_device_fixup_war(nasid,
/* shortlived WAR for older
* PROM images
*/
sn_device_fixup_war(nasid,
widget, widget,
device, device,
dev_entry->common); dev_entry->common);
} if (status != SALRET_OK)
else panic("SAL call failed: %s\n",
BUG(); ia64_sal_strerror(status));
}
spin_lock_init(&dev_entry->sfdl_flush_lock); spin_lock_init(&dev_entry->sfdl_flush_lock);
} }
......
...@@ -32,6 +32,7 @@ extern int sn_prom_feature_available(int id); ...@@ -32,6 +32,7 @@ extern int sn_prom_feature_available(int id);
*/ */
#define PRF_PAL_CACHE_FLUSH_SAFE 0 #define PRF_PAL_CACHE_FLUSH_SAFE 0
#define PRF_DEVICE_FLUSH_LIST 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment