10 #include <linux/export.h>
11 #include <linux/slab.h>
12 #include <asm/sn/types.h>
13 #include <asm/sn/addrs.h>
16 #include <asm/sn/io.h>
76 .dma_map = sn_default_pci_map,
77 .dma_map_consistent = sn_default_pci_map,
78 .dma_unmap = sn_default_pci_unmap,
79 .bus_fixup = sn_default_pci_bus_fixup,
87 sal_get_device_dmaflush_list(
u64 nasid,
u64 widget_num,
u64 device_num,
96 (
u64) nasid, (
u64) widget_num,
97 (
u64) device_num, (
u64) address, 0, 0, 0);
98 return ret_stuff.status;
133 "PROM version < 4.50 -- implementing old PROM flush WAR\n");
139 nasid, widget,
__pa(war_list), 0, 0, 0 ,0);
141 panic(
"sn_device_fixup_war failed: %s\n",
144 dev_entry = war_list + device;
145 memcpy(common,dev_entry,
sizeof(*common));
160 struct sn_flush_device_kernel *dev_entry;
162 int widget, device,
size;
177 sizeof(
struct sn_flush_device_kernel *);
184 sizeof(
struct sn_flush_device_kernel);
185 sn_flush_device_kernel = kzalloc(size,
GFP_KERNEL);
186 BUG_ON(!sn_flush_device_kernel);
188 dev_entry = sn_flush_device_kernel;
190 device++, dev_entry++) {
195 status = sal_get_device_dmaflush_list(
199 status = sn_device_fixup_war(hubdev->
hdi_nasid,
203 panic(
"SAL call failed: %s\n",
209 if (sn_flush_device_kernel)
211 sn_flush_device_kernel;
233 unsigned int bus_no,
devfn;
262 if (bs && sn_irq_info->
irq_irq) {
304 provider = sn_pci_provider[prom_bussoft_ptr->
bs_asic_type];
305 if (provider ==
NULL)
306 panic(
"sn_common_bus_fixup: No provider registered for this asic type, %d",
310 provider_soft = (*provider->
bus_fixup) (prom_bussoft_ptr,
313 provider_soft =
NULL;
319 controller->
platform_data = kzalloc(
sizeof(
struct sn_platform_data),
325 INIT_LIST_HEAD(&((
struct sn_platform_data *)
329 hubdev_info = (
struct hubdev_info *)(
NODEPDA(cnode)->pdinfo);
341 "L_IO=%llx L_MEM=%llx BASE=%llx\n",
345 "Association set to undetermined.\n",
347 controller->
node = -1;
357 dev_dbg(&dev->
dev,
"%s: out of memory!\n", __func__);
361 list_add(&element->
entry, &sn_sysdata_list);
373 (element->
sysdata))->pdi_list));
390 size =
sizeof(
struct hubdev_info);
399 npda->
pdinfo = (
void *)hubdev_info;
422 moduleid = geo_module(geoid);
424 sprintf(address,
"module_%c%c%c%c%.2d",
456 sn_io_early_init(
void)
478 sn_pci_provider[i] = &sn_pci_default_provider;
490 INIT_LIST_HEAD(&sn_sysdata_list);
493 #ifdef CONFIG_PROC_FS
547 "to find near node with CPUs for "
548 "node %d, err=%d\n", cnode, e);