hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/ia64/pci/pci.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * pci.c - Low-Level PCI Access in IA-64
34 *
....@@ -20,10 +21,9 @@
2021 #include <linux/ioport.h>
2122 #include <linux/slab.h>
2223 #include <linux/spinlock.h>
23
-#include <linux/bootmem.h>
24
+#include <linux/memblock.h>
2425 #include <linux/export.h>
2526
26
-#include <asm/machvec.h>
2727 #include <asm/page.h>
2828 #include <asm/io.h>
2929 #include <asm/sal.h>
....@@ -371,7 +371,6 @@
371371 }
372372 list_for_each_entry(dev, &b->devices, bus_list)
373373 pcibios_fixup_device_resources(dev);
374
- platform_pci_fixup_bus(b);
375374 }
376375
377376 void pcibios_add_bus(struct pci_bus *bus)
....@@ -412,7 +411,7 @@
412411 }
413412
414413 /**
415
- * ia64_pci_get_legacy_mem - generic legacy mem routine
414
+ * pci_get_legacy_mem - generic legacy mem routine
416415 * @bus: bus to get legacy memory base address for
417416 *
418417 * Find the base of legacy memory for @bus. This is typically the first
....@@ -423,7 +422,7 @@
423422 * This is the ia64 generic version of this routine. Other platforms
424423 * are free to override it with a machine vector.
425424 */
426
-char *ia64_pci_get_legacy_mem(struct pci_bus *bus)
425
+char *pci_get_legacy_mem(struct pci_bus *bus)
427426 {
428427 return (char *)__IA64_UNCACHED_OFFSET;
429428 }
....@@ -449,7 +448,7 @@
449448 return -ENOSYS;
450449
451450 /*
452
- * Avoid attribute aliasing. See Documentation/ia64/aliasing.txt
451
+ * Avoid attribute aliasing. See Documentation/ia64/aliasing.rst
453452 * for more details.
454453 */
455454 if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size))
....@@ -472,7 +471,7 @@
472471 }
473472
474473 /**
475
- * ia64_pci_legacy_read - read from legacy I/O space
474
+ * pci_legacy_read - read from legacy I/O space
476475 * @bus: bus to read
477476 * @port: legacy port value
478477 * @val: caller allocated storage for returned value
....@@ -484,7 +483,7 @@
484483 * overridden by the platform. This is necessary on platforms that don't
485484 * support legacy I/O routing or that hard fail on legacy I/O timeouts.
486485 */
487
-int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
486
+int pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
488487 {
489488 int ret = size;
490489
....@@ -507,7 +506,7 @@
507506 }
508507
509508 /**
510
- * ia64_pci_legacy_write - perform a legacy I/O write
509
+ * pci_legacy_write - perform a legacy I/O write
511510 * @bus: bus pointer
512511 * @port: port to write
513512 * @val: value to write
....@@ -515,7 +514,7 @@
515514 *
516515 * Simply writes @size bytes of @val to @port.
517516 */
518
-int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
517
+int pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
519518 {
520519 int ret = size;
521520
....@@ -567,32 +566,6 @@
567566 }
568567 pci_dfl_cache_line_size = (1 << cci.pcci_line_size) / 4;
569568 }
570
-
571
-u64 ia64_dma_get_required_mask(struct device *dev)
572
-{
573
- u32 low_totalram = ((max_pfn - 1) << PAGE_SHIFT);
574
- u32 high_totalram = ((max_pfn - 1) >> (32 - PAGE_SHIFT));
575
- u64 mask;
576
-
577
- if (!high_totalram) {
578
- /* convert to mask just covering totalram */
579
- low_totalram = (1 << (fls(low_totalram) - 1));
580
- low_totalram += low_totalram - 1;
581
- mask = low_totalram;
582
- } else {
583
- high_totalram = (1 << (fls(high_totalram) - 1));
584
- high_totalram += high_totalram - 1;
585
- mask = (((u64)high_totalram) << 32) + 0xffffffff;
586
- }
587
- return mask;
588
-}
589
-EXPORT_SYMBOL_GPL(ia64_dma_get_required_mask);
590
-
591
-u64 dma_get_required_mask(struct device *dev)
592
-{
593
- return platform_dma_get_required_mask(dev);
594
-}
595
-EXPORT_SYMBOL_GPL(dma_get_required_mask);
596569
597570 static int __init pcibios_init(void)
598571 {