setup.c (cdb4913293897dde0df522ed5789ba016f3b9157) | setup.c (2ab2d5794f14c08676690bf0859f16cc768bb3a4) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * 64-bit pSeries and RS/6000 setup code. 4 * 5 * Copyright (C) 1995 Linus Torvalds 6 * Adapted from 'alpha' version by Gary Thomas 7 * Modified by Cort Dougan (cort@cs.nmt.edu) 8 * Modified by PPC64 Team, IBM Corp --- 22 unchanged lines hidden (view full) --- 31#include <linux/utsname.h> 32#include <linux/adb.h> 33#include <linux/export.h> 34#include <linux/delay.h> 35#include <linux/irq.h> 36#include <linux/seq_file.h> 37#include <linux/root_dev.h> 38#include <linux/of.h> | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * 64-bit pSeries and RS/6000 setup code. 4 * 5 * Copyright (C) 1995 Linus Torvalds 6 * Adapted from 'alpha' version by Gary Thomas 7 * Modified by Cort Dougan (cort@cs.nmt.edu) 8 * Modified by PPC64 Team, IBM Corp --- 22 unchanged lines hidden (view full) --- 31#include <linux/utsname.h> 32#include <linux/adb.h> 33#include <linux/export.h> 34#include <linux/delay.h> 35#include <linux/irq.h> 36#include <linux/seq_file.h> 37#include <linux/root_dev.h> 38#include <linux/of.h> |
39#include <linux/of_irq.h> |
|
39#include <linux/of_pci.h> 40#include <linux/memblock.h> 41#include <linux/swiotlb.h> 42 43#include <asm/mmu.h> 44#include <asm/processor.h> 45#include <asm/io.h> | 40#include <linux/of_pci.h> 41#include <linux/memblock.h> 42#include <linux/swiotlb.h> 43 44#include <asm/mmu.h> 45#include <asm/processor.h> 46#include <asm/io.h> |
46#include <asm/prom.h> | |
47#include <asm/rtas.h> 48#include <asm/pci-bridge.h> 49#include <asm/iommu.h> 50#include <asm/dma.h> 51#include <asm/machdep.h> 52#include <asm/irq.h> 53#include <asm/time.h> 54#include <asm/nvram.h> --- 361 unchanged lines hidden (view full) --- 416 if (rc == H_SUCCESS) 417 pseries_reloc_on_exception_enabled = false; 418 else 419 pr_warn("Warning: Failed to disable relocation on exceptions: %ld\n", 420 rc); 421} 422EXPORT_SYMBOL(pseries_disable_reloc_on_exc); 423 | 47#include <asm/rtas.h> 48#include <asm/pci-bridge.h> 49#include <asm/iommu.h> 50#include <asm/dma.h> 51#include <asm/machdep.h> 52#include <asm/irq.h> 53#include <asm/time.h> 54#include <asm/nvram.h> --- 361 unchanged lines hidden (view full) --- 416 if (rc == H_SUCCESS) 417 pseries_reloc_on_exception_enabled = false; 418 else 419 pr_warn("Warning: Failed to disable relocation on exceptions: %ld\n", 420 rc); 421} 422EXPORT_SYMBOL(pseries_disable_reloc_on_exc); 423 |
424#ifdef CONFIG_KEXEC_CORE 425static void pSeries_machine_kexec(struct kimage *image) 426{ 427 if (firmware_has_feature(FW_FEATURE_SET_MODE)) 428 pseries_disable_reloc_on_exc(); 429 430 default_machine_kexec(image); 431} 432#endif 433 | |
434#ifdef __LITTLE_ENDIAN__ 435void pseries_big_endian_exceptions(void) 436{ 437 long rc; 438 439 while (1) { 440 rc = enable_big_endian_exceptions(); 441 if (!H_IS_LONG_BUSY(rc)) --- 211 unchanged lines hidden (view full) --- 653 654 /* 655 * First element in the array is the number of Bars 656 * returned. Search through the list to find the matching 657 * bar 658 */ 659 num_res = of_read_number(&indexes[NUM_RES_PROPERTY], 1); 660 if (resno >= num_res) | 424#ifdef __LITTLE_ENDIAN__ 425void pseries_big_endian_exceptions(void) 426{ 427 long rc; 428 429 while (1) { 430 rc = enable_big_endian_exceptions(); 431 if (!H_IS_LONG_BUSY(rc)) --- 211 unchanged lines hidden (view full) --- 643 644 /* 645 * First element in the array is the number of Bars 646 * returned. Search through the list to find the matching 647 * bar 648 */ 649 num_res = of_read_number(&indexes[NUM_RES_PROPERTY], 1); 650 if (resno >= num_res) |
661 return 0; /* or an errror */ | 651 return 0; /* or an error */ |
662 663 i = START_OF_ENTRIES + NEXT_ENTRY * resno; 664 switch (value) { 665 case BAR_ADDRS: 666 ret = of_read_number(&indexes[i], 2); 667 break; 668 case APERTURE_SIZE: 669 ret = of_read_number(&indexes[i + APERTURE_PROPERTY], 2); --- 87 unchanged lines hidden (view full) --- 757 758static void pseries_pci_fixup_iov_resources(struct pci_dev *pdev) 759{ 760 const int *indexes; 761 struct device_node *dn = pci_device_to_OF_node(pdev); 762 763 if (!pdev->is_physfn) 764 return; | 652 653 i = START_OF_ENTRIES + NEXT_ENTRY * resno; 654 switch (value) { 655 case BAR_ADDRS: 656 ret = of_read_number(&indexes[i], 2); 657 break; 658 case APERTURE_SIZE: 659 ret = of_read_number(&indexes[i + APERTURE_PROPERTY], 2); --- 87 unchanged lines hidden (view full) --- 747 748static void pseries_pci_fixup_iov_resources(struct pci_dev *pdev) 749{ 750 const int *indexes; 751 struct device_node *dn = pci_device_to_OF_node(pdev); 752 753 if (!pdev->is_physfn) 754 return; |
765 /*Firmware must support open sriov otherwise dont configure*/ | 755 /*Firmware must support open sriov otherwise don't configure*/ |
766 indexes = of_get_property(dn, "ibm,open-sriov-vf-bar-info", NULL); 767 if (indexes) 768 of_pci_parse_iov_addrs(pdev, indexes); 769 else 770 pseries_disable_sriov_resources(pdev); 771} 772 773static resource_size_t pseries_pci_iov_resource_alignment(struct pci_dev *pdev, --- 320 unchanged lines hidden (view full) --- 1094 .set_rtc_time = rtas_set_rtc_time, 1095 .calibrate_decr = generic_calibrate_decr, 1096 .progress = rtas_progress, 1097 .system_reset_exception = pSeries_system_reset_exception, 1098 .machine_check_early = pseries_machine_check_realmode, 1099 .machine_check_exception = pSeries_machine_check_exception, 1100 .machine_check_log_err = pSeries_machine_check_log_err, 1101#ifdef CONFIG_KEXEC_CORE | 756 indexes = of_get_property(dn, "ibm,open-sriov-vf-bar-info", NULL); 757 if (indexes) 758 of_pci_parse_iov_addrs(pdev, indexes); 759 else 760 pseries_disable_sriov_resources(pdev); 761} 762 763static resource_size_t pseries_pci_iov_resource_alignment(struct pci_dev *pdev, --- 320 unchanged lines hidden (view full) --- 1084 .set_rtc_time = rtas_set_rtc_time, 1085 .calibrate_decr = generic_calibrate_decr, 1086 .progress = rtas_progress, 1087 .system_reset_exception = pSeries_system_reset_exception, 1088 .machine_check_early = pseries_machine_check_realmode, 1089 .machine_check_exception = pSeries_machine_check_exception, 1090 .machine_check_log_err = pSeries_machine_check_log_err, 1091#ifdef CONFIG_KEXEC_CORE |
1102 .machine_kexec = pSeries_machine_kexec, | 1092 .machine_kexec = pseries_machine_kexec, |
1103 .kexec_cpu_down = pseries_kexec_cpu_down, 1104#endif 1105#ifdef CONFIG_MEMORY_HOTPLUG 1106 .memory_block_size = pseries_memory_block_size, 1107#endif 1108}; | 1093 .kexec_cpu_down = pseries_kexec_cpu_down, 1094#endif 1095#ifdef CONFIG_MEMORY_HOTPLUG 1096 .memory_block_size = pseries_memory_block_size, 1097#endif 1098}; |