75f0379958f903f6d600826150593f18b2f1fa33
[sfrench/cifs-2.6.git] / arch / ia64 / sn / kernel / io_common.c
1 /*
2  * This file is subject to the terms and conditions of the GNU General Public
3  * License.  See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (C) 2006 Silicon Graphics, Inc. All rights reserved.
7  */
8
9 #include <linux/bootmem.h>
10 #include <asm/sn/types.h>
11 #include <asm/sn/addrs.h>
12 #include <asm/sn/sn_feature_sets.h>
13 #include <asm/sn/geo.h>
14 #include <asm/sn/io.h>
15 #include <asm/sn/l1.h>
16 #include <asm/sn/module.h>
17 #include <asm/sn/pcibr_provider.h>
18 #include <asm/sn/pcibus_provider_defs.h>
19 #include <asm/sn/pcidev.h>
20 #include <asm/sn/simulator.h>
21 #include <asm/sn/sn_sal.h>
22 #include <asm/sn/tioca_provider.h>
23 #include <asm/sn/tioce_provider.h>
24 #include "xtalk/hubdev.h"
25 #include "xtalk/xwidgetdev.h"
26 #include <linux/acpi.h>
27 #include <asm/sn/sn2/sn_hwperf.h>
28 #include <asm/sn/acpi.h>
29
30 extern void sn_init_cpei_timer(void);
31 extern void register_sn_procfs(void);
32 extern void sn_acpi_bus_fixup(struct pci_bus *);
33 extern void sn_bus_fixup(struct pci_bus *);
34 extern void sn_acpi_slot_fixup(struct pci_dev *, struct pcidev_info *);
35 extern void sn_more_slot_fixup(struct pci_dev *, struct pcidev_info *);
36 extern void sn_legacy_pci_window_fixup(struct pci_controller *, u64, u64);
37 extern void sn_io_acpi_init(void);
38 extern void sn_io_init(void);
39
40
41 static struct list_head sn_sysdata_list;
42
43 /* sysdata list struct */
44 struct sysdata_el {
45         struct list_head entry;
46         void *sysdata;
47 };
48
49 int sn_ioif_inited;             /* SN I/O infrastructure initialized? */
50
51 struct sn_pcibus_provider *sn_pci_provider[PCIIO_ASIC_MAX_TYPES];       /* indexed by asic type */
52
53 int sn_acpi_base_support(void)
54 {
55         struct acpi_table_header *header;
56         (void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header);
57         if (header && header->oem_revision >= 0x20101)
58                 return 1;
59         return 0;
60 }
61
62 /*
63  * Hooks and struct for unsupported pci providers
64  */
65
66 static dma_addr_t
67 sn_default_pci_map(struct pci_dev *pdev, unsigned long paddr, size_t size, int type)
68 {
69         return 0;
70 }
71
72 static void
73 sn_default_pci_unmap(struct pci_dev *pdev, dma_addr_t addr, int direction)
74 {
75         return;
76 }
77
78 static void *
79 sn_default_pci_bus_fixup(struct pcibus_bussoft *soft, struct pci_controller *controller)
80 {
81         return NULL;
82 }
83
84 static struct sn_pcibus_provider sn_pci_default_provider = {
85         .dma_map = sn_default_pci_map,
86         .dma_map_consistent = sn_default_pci_map,
87         .dma_unmap = sn_default_pci_unmap,
88         .bus_fixup = sn_default_pci_bus_fixup,
89 };
90
91 /*
92  * Retrieve the DMA Flush List given nasid, widget, and device.
93  * This list is needed to implement the WAR - Flush DMA data on PIO Reads.
94  */
95 static inline u64
96 sal_get_device_dmaflush_list(u64 nasid, u64 widget_num, u64 device_num,
97                              u64 address)
98 {
99         struct ia64_sal_retval ret_stuff;
100         ret_stuff.status = 0;
101         ret_stuff.v0 = 0;
102
103         SAL_CALL_NOLOCK(ret_stuff,
104                         (u64) SN_SAL_IOIF_GET_DEVICE_DMAFLUSH_LIST,
105                         (u64) nasid, (u64) widget_num,
106                         (u64) device_num, (u64) address, 0, 0, 0);
107         return ret_stuff.status;
108 }
109
110 /*
111  * Retrieve the pci device information given the bus and device|function number.
112  */
113 static inline u64
114 sal_get_pcidev_info(u64 segment, u64 bus_number, u64 devfn, u64 pci_dev,
115                     u64 sn_irq_info)
116 {
117         struct ia64_sal_retval ret_stuff;
118         ret_stuff.status = 0;
119         ret_stuff.v0 = 0;
120
121         SAL_CALL_NOLOCK(ret_stuff,
122                         (u64) SN_SAL_IOIF_GET_PCIDEV_INFO,
123                         (u64) segment, (u64) bus_number, (u64) devfn,
124                         (u64) pci_dev,
125                         sn_irq_info, 0, 0);
126         return ret_stuff.v0;
127 }
128
129 /*
130  * sn_pcidev_info_get() - Retrieve the pcidev_info struct for the specified
131  *                        device.
132  */
133 inline struct pcidev_info *
134 sn_pcidev_info_get(struct pci_dev *dev)
135 {
136         struct pcidev_info *pcidev;
137
138         list_for_each_entry(pcidev,
139                             &(SN_PLATFORM_DATA(dev)->pcidev_info), pdi_list) {
140                 if (pcidev->pdi_linux_pcidev == dev)
141                         return pcidev;
142         }
143         return NULL;
144 }
145
146 /* Older PROM flush WAR
147  *
148  * 01/16/06 -- This war will be in place until a new official PROM is released.
149  * Additionally note that the struct sn_flush_device_war also has to be
150  * removed from arch/ia64/sn/include/xtalk/hubdev.h
151  */
152 static u8 war_implemented = 0;
153
154 static s64 sn_device_fixup_war(u64 nasid, u64 widget, int device,
155                                struct sn_flush_device_common *common)
156 {
157         struct sn_flush_device_war *war_list;
158         struct sn_flush_device_war *dev_entry;
159         struct ia64_sal_retval isrv = {0,0,0,0};
160
161         if (!war_implemented) {
162                 printk(KERN_WARNING "PROM version < 4.50 -- implementing old "
163                        "PROM flush WAR\n");
164                 war_implemented = 1;
165         }
166
167         war_list = kzalloc(DEV_PER_WIDGET * sizeof(*war_list), GFP_KERNEL);
168         if (!war_list)
169                 BUG();
170
171         SAL_CALL_NOLOCK(isrv, SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST,
172                         nasid, widget, __pa(war_list), 0, 0, 0 ,0);
173         if (isrv.status)
174                 panic("sn_device_fixup_war failed: %s\n",
175                       ia64_sal_strerror(isrv.status));
176
177         dev_entry = war_list + device;
178         memcpy(common,dev_entry, sizeof(*common));
179         kfree(war_list);
180
181         return isrv.status;
182 }
183
184 /*
185  * sn_common_hubdev_init() - This routine is called to initialize the HUB data
186  *                           structure for each node in the system.
187  */
188 void __init
189 sn_common_hubdev_init(struct hubdev_info *hubdev)
190 {
191
192         struct sn_flush_device_kernel *sn_flush_device_kernel;
193         struct sn_flush_device_kernel *dev_entry;
194         s64 status;
195         int widget, device, size;
196
197         /* Attach the error interrupt handlers */
198         if (hubdev->hdi_nasid & 1)      /* If TIO */
199                 ice_error_init(hubdev);
200         else
201                 hub_error_init(hubdev);
202
203         for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++)
204                 hubdev->hdi_xwidget_info[widget].xwi_hubinfo = hubdev;
205
206         if (!hubdev->hdi_flush_nasid_list.widget_p)
207                 return;
208
209         size = (HUB_WIDGET_ID_MAX + 1) *
210                 sizeof(struct sn_flush_device_kernel *);
211         hubdev->hdi_flush_nasid_list.widget_p =
212                 kzalloc(size, GFP_KERNEL);
213         if (!hubdev->hdi_flush_nasid_list.widget_p)
214                 BUG();
215
216         for (widget = 0; widget <= HUB_WIDGET_ID_MAX; widget++) {
217                 size = DEV_PER_WIDGET *
218                         sizeof(struct sn_flush_device_kernel);
219                 sn_flush_device_kernel = kzalloc(size, GFP_KERNEL);
220                 if (!sn_flush_device_kernel)
221                         BUG();
222
223                 dev_entry = sn_flush_device_kernel;
224                 for (device = 0; device < DEV_PER_WIDGET;
225                      device++, dev_entry++) {
226                         size = sizeof(struct sn_flush_device_common);
227                         dev_entry->common = kzalloc(size, GFP_KERNEL);
228                         if (!dev_entry->common)
229                                 BUG();
230                         if (sn_prom_feature_available(PRF_DEVICE_FLUSH_LIST))
231                                 status = sal_get_device_dmaflush_list(
232                                              hubdev->hdi_nasid, widget, device,
233                                              (u64)(dev_entry->common));
234                         else
235                                 status = sn_device_fixup_war(hubdev->hdi_nasid,
236                                                              widget, device,
237                                                              dev_entry->common);
238                         if (status != SALRET_OK)
239                                 panic("SAL call failed: %s\n",
240                                       ia64_sal_strerror(status));
241
242                         spin_lock_init(&dev_entry->sfdl_flush_lock);
243                 }
244
245                 if (sn_flush_device_kernel)
246                         hubdev->hdi_flush_nasid_list.widget_p[widget] =
247                                                          sn_flush_device_kernel;
248         }
249 }
250
251 void sn_pci_unfixup_slot(struct pci_dev *dev)
252 {
253         struct pci_dev *host_pci_dev = SN_PCIDEV_INFO(dev)->host_pci_dev;
254
255         sn_irq_unfixup(dev);
256         pci_dev_put(host_pci_dev);
257         pci_dev_put(dev);
258 }
259
260 /*
261  * sn_pci_fixup_slot() - This routine sets up a slot's resources consistent
262  *                       with the Linux PCI abstraction layer. Resources
263  *                       acquired from our PCI provider include PIO maps
264  *                       to BAR space and interrupt objects.
265  */
266 void sn_pci_fixup_slot(struct pci_dev *dev)
267 {
268         int segment = pci_domain_nr(dev->bus);
269         int status = 0;
270         struct pcibus_bussoft *bs;
271         struct pci_bus *host_pci_bus;
272         struct pci_dev *host_pci_dev;
273         struct pcidev_info *pcidev_info;
274         struct sn_irq_info *sn_irq_info;
275         unsigned int bus_no, devfn;
276
277         pci_dev_get(dev); /* for the sysdata pointer */
278         pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);
279         if (!pcidev_info)
280                 BUG();          /* Cannot afford to run out of memory */
281
282         sn_irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
283         if (!sn_irq_info)
284                 BUG();          /* Cannot afford to run out of memory */
285
286         /* Call to retrieve pci device information needed by kernel. */
287         status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number,
288                                      dev->devfn,
289                                      (u64) __pa(pcidev_info),
290                                      (u64) __pa(sn_irq_info));
291         if (status)
292                 BUG(); /* Cannot get platform pci device information */
293
294         /* Add pcidev_info to list in pci_controller.platform_data */
295         list_add_tail(&pcidev_info->pdi_list,
296                       &(SN_PLATFORM_DATA(dev->bus)->pcidev_info));
297
298         if (SN_ACPI_BASE_SUPPORT())
299                 sn_acpi_slot_fixup(dev, pcidev_info);
300         else
301                 sn_more_slot_fixup(dev, pcidev_info);
302         /*
303          * Using the PROMs values for the PCI host bus, get the Linux
304          * PCI host_pci_dev struct and set up host bus linkages
305          */
306
307         bus_no = (pcidev_info->pdi_slot_host_handle >> 32) & 0xff;
308         devfn = pcidev_info->pdi_slot_host_handle & 0xffffffff;
309         host_pci_bus = pci_find_bus(segment, bus_no);
310         host_pci_dev = pci_get_slot(host_pci_bus, devfn);
311
312         pcidev_info->host_pci_dev = host_pci_dev;
313         pcidev_info->pdi_linux_pcidev = dev;
314         pcidev_info->pdi_host_pcidev_info = SN_PCIDEV_INFO(host_pci_dev);
315         bs = SN_PCIBUS_BUSSOFT(dev->bus);
316         pcidev_info->pdi_pcibus_info = bs;
317
318         if (bs && bs->bs_asic_type < PCIIO_ASIC_MAX_TYPES) {
319                 SN_PCIDEV_BUSPROVIDER(dev) = sn_pci_provider[bs->bs_asic_type];
320         } else {
321                 SN_PCIDEV_BUSPROVIDER(dev) = &sn_pci_default_provider;
322         }
323
324         /* Only set up IRQ stuff if this device has a host bus context */
325         if (bs && sn_irq_info->irq_irq) {
326                 pcidev_info->pdi_sn_irq_info = sn_irq_info;
327                 dev->irq = pcidev_info->pdi_sn_irq_info->irq_irq;
328                 sn_irq_fixup(dev, sn_irq_info);
329         } else {
330                 pcidev_info->pdi_sn_irq_info = NULL;
331                 kfree(sn_irq_info);
332         }
333 }
334
335 /*
336  * sn_common_bus_fixup - Perform platform specific bus fixup.
337  *                       Execute the ASIC specific fixup routine
338  *                       for this bus.
339  */
340 void
341 sn_common_bus_fixup(struct pci_bus *bus,
342                     struct pcibus_bussoft *prom_bussoft_ptr)
343 {
344         int cnode;
345         struct pci_controller *controller;
346         struct hubdev_info *hubdev_info;
347         int nasid;
348         void *provider_soft;
349         struct sn_pcibus_provider *provider;
350         struct sn_platform_data *sn_platform_data;
351
352         controller = PCI_CONTROLLER(bus);
353         /*
354          * Per-provider fixup.  Copies the bus soft structure from prom
355          * to local area and links SN_PCIBUS_BUSSOFT().
356          */
357
358         if (prom_bussoft_ptr->bs_asic_type >= PCIIO_ASIC_MAX_TYPES) {
359                 printk(KERN_WARNING "sn_common_bus_fixup: Unsupported asic type, %d",
360                        prom_bussoft_ptr->bs_asic_type);
361                 return;
362         }
363
364         if (prom_bussoft_ptr->bs_asic_type == PCIIO_ASIC_TYPE_PPB)
365                 return; /* no further fixup necessary */
366
367         provider = sn_pci_provider[prom_bussoft_ptr->bs_asic_type];
368         if (provider == NULL)
369                 panic("sn_common_bus_fixup: No provider registered for this asic type, %d",
370                       prom_bussoft_ptr->bs_asic_type);
371
372         if (provider->bus_fixup)
373                 provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr,
374                                  controller);
375         else
376                 provider_soft = NULL;
377
378         /*
379          * Generic bus fixup goes here.  Don't reference prom_bussoft_ptr
380          * after this point.
381          */
382         controller->platform_data = kzalloc(sizeof(struct sn_platform_data),
383                                             GFP_KERNEL);
384         if (controller->platform_data == NULL)
385                 BUG();
386         sn_platform_data =
387                         (struct sn_platform_data *) controller->platform_data;
388         sn_platform_data->provider_soft = provider_soft;
389         INIT_LIST_HEAD(&((struct sn_platform_data *)
390                          controller->platform_data)->pcidev_info);
391         nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base);
392         cnode = nasid_to_cnodeid(nasid);
393         hubdev_info = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo);
394         SN_PCIBUS_BUSSOFT(bus)->bs_xwidget_info =
395             &(hubdev_info->hdi_xwidget_info[SN_PCIBUS_BUSSOFT(bus)->bs_xid]);
396
397         /*
398          * If the node information we obtained during the fixup phase is
399          * invalid then set controller->node to -1 (undetermined)
400          */
401         if (controller->node >= num_online_nodes()) {
402                 struct pcibus_bussoft *b = SN_PCIBUS_BUSSOFT(bus);
403
404                 printk(KERN_WARNING "Device ASIC=%u XID=%u PBUSNUM=%u"
405                        "L_IO=%lx L_MEM=%lx BASE=%lx\n",
406                        b->bs_asic_type, b->bs_xid, b->bs_persist_busnum,
407                        b->bs_legacy_io, b->bs_legacy_mem, b->bs_base);
408                 printk(KERN_WARNING "on node %d but only %d nodes online."
409                        "Association set to undetermined.\n",
410                        controller->node, num_online_nodes());
411                 controller->node = -1;
412         }
413 }
414
415 void sn_bus_store_sysdata(struct pci_dev *dev)
416 {
417         struct sysdata_el *element;
418
419         element = kzalloc(sizeof(struct sysdata_el), GFP_KERNEL);
420         if (!element) {
421                 dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__);
422                 return;
423         }
424         element->sysdata = SN_PCIDEV_INFO(dev);
425         list_add(&element->entry, &sn_sysdata_list);
426 }
427
428 void sn_bus_free_sysdata(void)
429 {
430         struct sysdata_el *element;
431         struct list_head *list, *safe;
432
433         list_for_each_safe(list, safe, &sn_sysdata_list) {
434                 element = list_entry(list, struct sysdata_el, entry);
435                 list_del(&element->entry);
436                 list_del(&(((struct pcidev_info *)
437                              (element->sysdata))->pdi_list));
438                 kfree(element->sysdata);
439                 kfree(element);
440         }
441         return;
442 }
443
444 /*
445  * hubdev_init_node() - Creates the HUB data structure and link them to it's
446  *                      own NODE specific data area.
447  */
448 void hubdev_init_node(nodepda_t * npda, cnodeid_t node)
449 {
450         struct hubdev_info *hubdev_info;
451         int size;
452         pg_data_t *pg;
453
454         size = sizeof(struct hubdev_info);
455
456         if (node >= num_online_nodes()) /* Headless/memless IO nodes */
457                 pg = NODE_DATA(0);
458         else
459                 pg = NODE_DATA(node);
460
461         hubdev_info = (struct hubdev_info *)alloc_bootmem_node(pg, size);
462
463         npda->pdinfo = (void *)hubdev_info;
464 }
465
466 geoid_t
467 cnodeid_get_geoid(cnodeid_t cnode)
468 {
469         struct hubdev_info *hubdev;
470
471         hubdev = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo);
472         return hubdev->hdi_geoid;
473 }
474
475 void sn_generate_path(struct pci_bus *pci_bus, char *address)
476 {
477         nasid_t nasid;
478         cnodeid_t cnode;
479         geoid_t geoid;
480         moduleid_t moduleid;
481         u16 bricktype;
482
483         nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base);
484         cnode = nasid_to_cnodeid(nasid);
485         geoid = cnodeid_get_geoid(cnode);
486         moduleid = geo_module(geoid);
487
488         sprintf(address, "module_%c%c%c%c%.2d",
489                 '0'+RACK_GET_CLASS(MODULE_GET_RACK(moduleid)),
490                 '0'+RACK_GET_GROUP(MODULE_GET_RACK(moduleid)),
491                 '0'+RACK_GET_NUM(MODULE_GET_RACK(moduleid)),
492                 MODULE_GET_BTCHAR(moduleid), MODULE_GET_BPOS(moduleid));
493
494         /* Tollhouse requires slot id to be displayed */
495         bricktype = MODULE_GET_BTYPE(moduleid);
496         if ((bricktype == L1_BRICKTYPE_191010) ||
497             (bricktype == L1_BRICKTYPE_1932))
498                         sprintf(address, "%s^%d", address, geo_slot(geoid));
499 }
500
501 /*
502  * sn_pci_fixup_bus() - Perform SN specific setup of software structs
503  *                      (pcibus_bussoft, pcidev_info) and hardware
504  *                      registers, for the specified bus and devices under it.
505  */
506 void __devinit
507 sn_pci_fixup_bus(struct pci_bus *bus)
508 {
509
510         if (SN_ACPI_BASE_SUPPORT())
511                 sn_acpi_bus_fixup(bus);
512         else
513                 sn_bus_fixup(bus);
514 }
515
516 /*
517  * sn_io_early_init - Perform early IO (and some non-IO) initialization.
518  *                    In particular, setup the sn_pci_provider[] array.
519  *                    This needs to be done prior to any bus scanning
520  *                    (acpi_scan_init()) in the ACPI case, as the SN
521  *                    bus fixup code will reference the array.
522  */
523 static int __init
524 sn_io_early_init(void)
525 {
526         int i;
527
528         if (!ia64_platform_is("sn2") || IS_RUNNING_ON_FAKE_PROM())
529                 return 0;
530
531         /*
532          * prime sn_pci_provider[].  Individial provider init routines will
533          * override their respective default entries.
534          */
535
536         for (i = 0; i < PCIIO_ASIC_MAX_TYPES; i++)
537                 sn_pci_provider[i] = &sn_pci_default_provider;
538
539         pcibr_init_provider();
540         tioca_init_provider();
541         tioce_init_provider();
542
543         /*
544          * This is needed to avoid bounce limit checks in the blk layer
545          */
546         ia64_max_iommu_merge_mask = ~PAGE_MASK;
547
548         sn_irq_lh_init();
549         INIT_LIST_HEAD(&sn_sysdata_list);
550         sn_init_cpei_timer();
551
552 #ifdef CONFIG_PROC_FS
553         register_sn_procfs();
554 #endif
555
556         {
557                 struct acpi_table_header *header;
558                 (void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header);
559                 printk(KERN_INFO "ACPI  DSDT OEM Rev 0x%x\n",
560                         header->oem_revision);
561         }
562         if (SN_ACPI_BASE_SUPPORT())
563                 sn_io_acpi_init();
564         else
565                 sn_io_init();
566         return 0;
567 }
568
569 arch_initcall(sn_io_early_init);
570
571 /*
572  * sn_io_late_init() - Perform any final platform specific IO initialization.
573  */
574
575 int __init
576 sn_io_late_init(void)
577 {
578         struct pci_bus *bus;
579         struct pcibus_bussoft *bussoft;
580         cnodeid_t cnode;
581         nasid_t nasid;
582         cnodeid_t near_cnode;
583
584         if (!ia64_platform_is("sn2") || IS_RUNNING_ON_FAKE_PROM())
585                 return 0;
586
587         /*
588          * Setup closest node in pci_controller->node for
589          * PIC, TIOCP, TIOCE (TIOCA does it during bus fixup using
590          * info from the PROM).
591          */
592         bus = NULL;
593         while ((bus = pci_find_next_bus(bus)) != NULL) {
594                 bussoft = SN_PCIBUS_BUSSOFT(bus);
595                 nasid = NASID_GET(bussoft->bs_base);
596                 cnode = nasid_to_cnodeid(nasid);
597                 if ((bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCP) ||
598                     (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCE)) {
599                         /* TIO PCI Bridge: find nearest node with CPUs */
600                         int e = sn_hwperf_get_nearest_node(cnode, NULL,
601                                                            &near_cnode);
602                         if (e < 0) {
603                                 near_cnode = (cnodeid_t)-1; /* use any node */
604                                 printk(KERN_WARNING "pcibr_bus_fixup: failed "
605                                        "to find near node with CPUs to TIO "
606                                        "node %d, err=%d\n", cnode, e);
607                         }
608                         PCI_CONTROLLER(bus)->node = near_cnode;
609                 } else if (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_PIC) {
610                         PCI_CONTROLLER(bus)->node = cnode;
611                 }
612         }
613
614         sn_ioif_inited = 1;     /* SN I/O infrastructure now initialized */
615
616         return 0;
617 }
618
619 fs_initcall(sn_io_late_init);
620
621 EXPORT_SYMBOL(sn_pci_fixup_slot);
622 EXPORT_SYMBOL(sn_pci_unfixup_slot);
623 EXPORT_SYMBOL(sn_bus_store_sysdata);
624 EXPORT_SYMBOL(sn_bus_free_sysdata);
625 EXPORT_SYMBOL(sn_generate_path);
626