diff options
Diffstat (limited to 'arch/powerpc/kernel')
| -rw-r--r-- | arch/powerpc/kernel/dma-iommu.c | 8 | ||||
| -rw-r--r-- | arch/powerpc/kernel/eeh_sysfs.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/entry_64.S | 6 | ||||
| -rw-r--r-- | arch/powerpc/kernel/fadump.c | 114 | ||||
| -rw-r--r-- | arch/powerpc/kernel/ftrace.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/iommu.c | 16 | ||||
| -rw-r--r-- | arch/powerpc/kernel/pci_64.c | 10 | ||||
| -rw-r--r-- | arch/powerpc/kernel/vdso32/getcpu.S | 4 |
8 files changed, 79 insertions, 83 deletions
diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c index 54d0116256f7..4c68bfe4108a 100644 --- a/arch/powerpc/kernel/dma-iommu.c +++ b/arch/powerpc/kernel/dma-iommu.c | |||
| @@ -60,16 +60,16 @@ static int dma_iommu_map_sg(struct device *dev, struct scatterlist *sglist, | |||
| 60 | int nelems, enum dma_data_direction direction, | 60 | int nelems, enum dma_data_direction direction, |
| 61 | struct dma_attrs *attrs) | 61 | struct dma_attrs *attrs) |
| 62 | { | 62 | { |
| 63 | return iommu_map_sg(dev, get_iommu_table_base(dev), sglist, nelems, | 63 | return ppc_iommu_map_sg(dev, get_iommu_table_base(dev), sglist, nelems, |
| 64 | device_to_mask(dev), direction, attrs); | 64 | device_to_mask(dev), direction, attrs); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | static void dma_iommu_unmap_sg(struct device *dev, struct scatterlist *sglist, | 67 | static void dma_iommu_unmap_sg(struct device *dev, struct scatterlist *sglist, |
| 68 | int nelems, enum dma_data_direction direction, | 68 | int nelems, enum dma_data_direction direction, |
| 69 | struct dma_attrs *attrs) | 69 | struct dma_attrs *attrs) |
| 70 | { | 70 | { |
| 71 | iommu_unmap_sg(get_iommu_table_base(dev), sglist, nelems, direction, | 71 | ppc_iommu_unmap_sg(get_iommu_table_base(dev), sglist, nelems, |
| 72 | attrs); | 72 | direction, attrs); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | /* We support DMA to/from any memory page via the iommu */ | 75 | /* We support DMA to/from any memory page via the iommu */ |
diff --git a/arch/powerpc/kernel/eeh_sysfs.c b/arch/powerpc/kernel/eeh_sysfs.c index f19b1e5cb060..1ceecdda810b 100644 --- a/arch/powerpc/kernel/eeh_sysfs.c +++ b/arch/powerpc/kernel/eeh_sysfs.c | |||
| @@ -65,7 +65,7 @@ static ssize_t eeh_pe_state_show(struct device *dev, | |||
| 65 | return -ENODEV; | 65 | return -ENODEV; |
| 66 | 66 | ||
| 67 | state = eeh_ops->get_state(edev->pe, NULL); | 67 | state = eeh_ops->get_state(edev->pe, NULL); |
| 68 | return sprintf(buf, "%0x08x %0x08x\n", | 68 | return sprintf(buf, "0x%08x 0x%08x\n", |
| 69 | state, edev->pe->state); | 69 | state, edev->pe->state); |
| 70 | } | 70 | } |
| 71 | 71 | ||
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 5bbd1bc8c3b0..0905c8da90f1 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
| @@ -659,7 +659,13 @@ _GLOBAL(ret_from_except_lite) | |||
| 659 | 3: | 659 | 3: |
| 660 | #endif | 660 | #endif |
| 661 | bl save_nvgprs | 661 | bl save_nvgprs |
| 662 | /* | ||
| 663 | * Use a non volatile GPR to save and restore our thread_info flags | ||
| 664 | * across the call to restore_interrupts. | ||
| 665 | */ | ||
| 666 | mr r30,r4 | ||
| 662 | bl restore_interrupts | 667 | bl restore_interrupts |
| 668 | mr r4,r30 | ||
| 663 | addi r3,r1,STACK_FRAME_OVERHEAD | 669 | addi r3,r1,STACK_FRAME_OVERHEAD |
| 664 | bl do_notify_resume | 670 | bl do_notify_resume |
| 665 | b ret_from_except | 671 | b ret_from_except |
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 742694c1d852..26d091a1a54c 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c | |||
| @@ -58,7 +58,7 @@ int __init early_init_dt_scan_fw_dump(unsigned long node, | |||
| 58 | const __be32 *sections; | 58 | const __be32 *sections; |
| 59 | int i, num_sections; | 59 | int i, num_sections; |
| 60 | int size; | 60 | int size; |
| 61 | const int *token; | 61 | const __be32 *token; |
| 62 | 62 | ||
| 63 | if (depth != 1 || strcmp(uname, "rtas") != 0) | 63 | if (depth != 1 || strcmp(uname, "rtas") != 0) |
| 64 | return 0; | 64 | return 0; |
| @@ -72,7 +72,7 @@ int __init early_init_dt_scan_fw_dump(unsigned long node, | |||
| 72 | return 1; | 72 | return 1; |
| 73 | 73 | ||
| 74 | fw_dump.fadump_supported = 1; | 74 | fw_dump.fadump_supported = 1; |
| 75 | fw_dump.ibm_configure_kernel_dump = *token; | 75 | fw_dump.ibm_configure_kernel_dump = be32_to_cpu(*token); |
| 76 | 76 | ||
| 77 | /* | 77 | /* |
| 78 | * The 'ibm,kernel-dump' rtas node is present only if there is | 78 | * The 'ibm,kernel-dump' rtas node is present only if there is |
| @@ -147,11 +147,11 @@ static unsigned long init_fadump_mem_struct(struct fadump_mem_struct *fdm, | |||
| 147 | memset(fdm, 0, sizeof(struct fadump_mem_struct)); | 147 | memset(fdm, 0, sizeof(struct fadump_mem_struct)); |
| 148 | addr = addr & PAGE_MASK; | 148 | addr = addr & PAGE_MASK; |
| 149 | 149 | ||
| 150 | fdm->header.dump_format_version = 0x00000001; | 150 | fdm->header.dump_format_version = cpu_to_be32(0x00000001); |
| 151 | fdm->header.dump_num_sections = 3; | 151 | fdm->header.dump_num_sections = cpu_to_be16(3); |
| 152 | fdm->header.dump_status_flag = 0; | 152 | fdm->header.dump_status_flag = 0; |
| 153 | fdm->header.offset_first_dump_section = | 153 | fdm->header.offset_first_dump_section = |
| 154 | (u32)offsetof(struct fadump_mem_struct, cpu_state_data); | 154 | cpu_to_be32((u32)offsetof(struct fadump_mem_struct, cpu_state_data)); |
| 155 | 155 | ||
| 156 | /* | 156 | /* |
| 157 | * Fields for disk dump option. | 157 | * Fields for disk dump option. |
| @@ -167,27 +167,27 @@ static unsigned long init_fadump_mem_struct(struct fadump_mem_struct *fdm, | |||
| 167 | 167 | ||
| 168 | /* Kernel dump sections */ | 168 | /* Kernel dump sections */ |
| 169 | /* cpu state data section. */ | 169 | /* cpu state data section. */ |
| 170 | fdm->cpu_state_data.request_flag = FADUMP_REQUEST_FLAG; | 170 | fdm->cpu_state_data.request_flag = cpu_to_be32(FADUMP_REQUEST_FLAG); |
| 171 | fdm->cpu_state_data.source_data_type = FADUMP_CPU_STATE_DATA; | 171 | fdm->cpu_state_data.source_data_type = cpu_to_be16(FADUMP_CPU_STATE_DATA); |
| 172 | fdm->cpu_state_data.source_address = 0; | 172 | fdm->cpu_state_data.source_address = 0; |
| 173 | fdm->cpu_state_data.source_len = fw_dump.cpu_state_data_size; | 173 | fdm->cpu_state_data.source_len = cpu_to_be64(fw_dump.cpu_state_data_size); |
| 174 | fdm->cpu_state_data.destination_address = addr; | 174 | fdm->cpu_state_data.destination_address = cpu_to_be64(addr); |
| 175 | addr += fw_dump.cpu_state_data_size; | 175 | addr += fw_dump.cpu_state_data_size; |
| 176 | 176 | ||
| 177 | /* hpte region section */ | 177 | /* hpte region section */ |
| 178 | fdm->hpte_region.request_flag = FADUMP_REQUEST_FLAG; | 178 | fdm->hpte_region.request_flag = cpu_to_be32(FADUMP_REQUEST_FLAG); |
| 179 | fdm->hpte_region.source_data_type = FADUMP_HPTE_REGION; | 179 | fdm->hpte_region.source_data_type = cpu_to_be16(FADUMP_HPTE_REGION); |
| 180 | fdm->hpte_region.source_address = 0; | 180 | fdm->hpte_region.source_address = 0; |
| 181 | fdm->hpte_region.source_len = fw_dump.hpte_region_size; | 181 | fdm->hpte_region.source_len = cpu_to_be64(fw_dump.hpte_region_size); |
| 182 | fdm->hpte_region.destination_address = addr; | 182 | fdm->hpte_region.destination_address = cpu_to_be64(addr); |
| 183 | addr += fw_dump.hpte_region_size; | 183 | addr += fw_dump.hpte_region_size; |
| 184 | 184 | ||
| 185 | /* RMA region section */ | 185 | /* RMA region section */ |
| 186 | fdm->rmr_region.request_flag = FADUMP_REQUEST_FLAG; | 186 | fdm->rmr_region.request_flag = cpu_to_be32(FADUMP_REQUEST_FLAG); |
| 187 | fdm->rmr_region.source_data_type = FADUMP_REAL_MODE_REGION; | 187 | fdm->rmr_region.source_data_type = cpu_to_be16(FADUMP_REAL_MODE_REGION); |
| 188 | fdm->rmr_region.source_address = RMA_START; | 188 | fdm->rmr_region.source_address = cpu_to_be64(RMA_START); |
| 189 | fdm->rmr_region.source_len = fw_dump.boot_memory_size; | 189 | fdm->rmr_region.source_len = cpu_to_be64(fw_dump.boot_memory_size); |
| 190 | fdm->rmr_region.destination_address = addr; | 190 | fdm->rmr_region.destination_address = cpu_to_be64(addr); |
| 191 | addr += fw_dump.boot_memory_size; | 191 | addr += fw_dump.boot_memory_size; |
| 192 | 192 | ||
| 193 | return addr; | 193 | return addr; |
| @@ -272,7 +272,7 @@ int __init fadump_reserve_mem(void) | |||
| 272 | * first kernel. | 272 | * first kernel. |
| 273 | */ | 273 | */ |
| 274 | if (fdm_active) | 274 | if (fdm_active) |
| 275 | fw_dump.boot_memory_size = fdm_active->rmr_region.source_len; | 275 | fw_dump.boot_memory_size = be64_to_cpu(fdm_active->rmr_region.source_len); |
| 276 | else | 276 | else |
| 277 | fw_dump.boot_memory_size = fadump_calculate_reserve_size(); | 277 | fw_dump.boot_memory_size = fadump_calculate_reserve_size(); |
| 278 | 278 | ||
| @@ -314,8 +314,8 @@ int __init fadump_reserve_mem(void) | |||
| 314 | (unsigned long)(base >> 20)); | 314 | (unsigned long)(base >> 20)); |
| 315 | 315 | ||
| 316 | fw_dump.fadumphdr_addr = | 316 | fw_dump.fadumphdr_addr = |
| 317 | fdm_active->rmr_region.destination_address + | 317 | be64_to_cpu(fdm_active->rmr_region.destination_address) + |
| 318 | fdm_active->rmr_region.source_len; | 318 | be64_to_cpu(fdm_active->rmr_region.source_len); |
| 319 | pr_debug("fadumphdr_addr = %p\n", | 319 | pr_debug("fadumphdr_addr = %p\n", |
| 320 | (void *) fw_dump.fadumphdr_addr); | 320 | (void *) fw_dump.fadumphdr_addr); |
| 321 | } else { | 321 | } else { |
| @@ -472,9 +472,9 @@ fadump_read_registers(struct fadump_reg_entry *reg_entry, struct pt_regs *regs) | |||
| 472 | { | 472 | { |
| 473 | memset(regs, 0, sizeof(struct pt_regs)); | 473 | memset(regs, 0, sizeof(struct pt_regs)); |
| 474 | 474 | ||
| 475 | while (reg_entry->reg_id != REG_ID("CPUEND")) { | 475 | while (be64_to_cpu(reg_entry->reg_id) != REG_ID("CPUEND")) { |
| 476 | fadump_set_regval(regs, reg_entry->reg_id, | 476 | fadump_set_regval(regs, be64_to_cpu(reg_entry->reg_id), |
| 477 | reg_entry->reg_value); | 477 | be64_to_cpu(reg_entry->reg_value)); |
| 478 | reg_entry++; | 478 | reg_entry++; |
| 479 | } | 479 | } |
| 480 | reg_entry++; | 480 | reg_entry++; |
| @@ -603,20 +603,20 @@ static int __init fadump_build_cpu_notes(const struct fadump_mem_struct *fdm) | |||
| 603 | if (!fdm->cpu_state_data.bytes_dumped) | 603 | if (!fdm->cpu_state_data.bytes_dumped) |
| 604 | return -EINVAL; | 604 | return -EINVAL; |
| 605 | 605 | ||
| 606 | addr = fdm->cpu_state_data.destination_address; | 606 | addr = be64_to_cpu(fdm->cpu_state_data.destination_address); |
| 607 | vaddr = __va(addr); | 607 | vaddr = __va(addr); |
| 608 | 608 | ||
| 609 | reg_header = vaddr; | 609 | reg_header = vaddr; |
| 610 | if (reg_header->magic_number != REGSAVE_AREA_MAGIC) { | 610 | if (be64_to_cpu(reg_header->magic_number) != REGSAVE_AREA_MAGIC) { |
| 611 | printk(KERN_ERR "Unable to read register save area.\n"); | 611 | printk(KERN_ERR "Unable to read register save area.\n"); |
| 612 | return -ENOENT; | 612 | return -ENOENT; |
| 613 | } | 613 | } |
| 614 | pr_debug("--------CPU State Data------------\n"); | 614 | pr_debug("--------CPU State Data------------\n"); |
| 615 | pr_debug("Magic Number: %llx\n", reg_header->magic_number); | 615 | pr_debug("Magic Number: %llx\n", be64_to_cpu(reg_header->magic_number)); |
| 616 | pr_debug("NumCpuOffset: %x\n", reg_header->num_cpu_offset); | 616 | pr_debug("NumCpuOffset: %x\n", be32_to_cpu(reg_header->num_cpu_offset)); |
| 617 | 617 | ||
| 618 | vaddr += reg_header->num_cpu_offset; | 618 | vaddr += be32_to_cpu(reg_header->num_cpu_offset); |
| 619 | num_cpus = *((u32 *)(vaddr)); | 619 | num_cpus = be32_to_cpu(*((__be32 *)(vaddr))); |
| 620 | pr_debug("NumCpus : %u\n", num_cpus); | 620 | pr_debug("NumCpus : %u\n", num_cpus); |
| 621 | vaddr += sizeof(u32); | 621 | vaddr += sizeof(u32); |
| 622 | reg_entry = (struct fadump_reg_entry *)vaddr; | 622 | reg_entry = (struct fadump_reg_entry *)vaddr; |
| @@ -639,13 +639,13 @@ static int __init fadump_build_cpu_notes(const struct fadump_mem_struct *fdm) | |||
| 639 | fdh = __va(fw_dump.fadumphdr_addr); | 639 | fdh = __va(fw_dump.fadumphdr_addr); |
| 640 | 640 | ||
| 641 | for (i = 0; i < num_cpus; i++) { | 641 | for (i = 0; i < num_cpus; i++) { |
| 642 | if (reg_entry->reg_id != REG_ID("CPUSTRT")) { | 642 | if (be64_to_cpu(reg_entry->reg_id) != REG_ID("CPUSTRT")) { |
| 643 | printk(KERN_ERR "Unable to read CPU state data\n"); | 643 | printk(KERN_ERR "Unable to read CPU state data\n"); |
| 644 | rc = -ENOENT; | 644 | rc = -ENOENT; |
| 645 | goto error_out; | 645 | goto error_out; |
| 646 | } | 646 | } |
| 647 | /* Lower 4 bytes of reg_value contains logical cpu id */ | 647 | /* Lower 4 bytes of reg_value contains logical cpu id */ |
| 648 | cpu = reg_entry->reg_value & FADUMP_CPU_ID_MASK; | 648 | cpu = be64_to_cpu(reg_entry->reg_value) & FADUMP_CPU_ID_MASK; |
| 649 | if (fdh && !cpumask_test_cpu(cpu, &fdh->cpu_online_mask)) { | 649 | if (fdh && !cpumask_test_cpu(cpu, &fdh->cpu_online_mask)) { |
| 650 | SKIP_TO_NEXT_CPU(reg_entry); | 650 | SKIP_TO_NEXT_CPU(reg_entry); |
| 651 | continue; | 651 | continue; |
| @@ -692,7 +692,7 @@ static int __init process_fadump(const struct fadump_mem_struct *fdm_active) | |||
| 692 | return -EINVAL; | 692 | return -EINVAL; |
| 693 | 693 | ||
| 694 | /* Check if the dump data is valid. */ | 694 | /* Check if the dump data is valid. */ |
| 695 | if ((fdm_active->header.dump_status_flag == FADUMP_ERROR_FLAG) || | 695 | if ((be16_to_cpu(fdm_active->header.dump_status_flag) == FADUMP_ERROR_FLAG) || |
| 696 | (fdm_active->cpu_state_data.error_flags != 0) || | 696 | (fdm_active->cpu_state_data.error_flags != 0) || |
| 697 | (fdm_active->rmr_region.error_flags != 0)) { | 697 | (fdm_active->rmr_region.error_flags != 0)) { |
| 698 | printk(KERN_ERR "Dump taken by platform is not valid\n"); | 698 | printk(KERN_ERR "Dump taken by platform is not valid\n"); |
| @@ -828,7 +828,7 @@ static void fadump_setup_crash_memory_ranges(void) | |||
| 828 | static inline unsigned long fadump_relocate(unsigned long paddr) | 828 | static inline unsigned long fadump_relocate(unsigned long paddr) |
| 829 | { | 829 | { |
| 830 | if (paddr > RMA_START && paddr < fw_dump.boot_memory_size) | 830 | if (paddr > RMA_START && paddr < fw_dump.boot_memory_size) |
| 831 | return fdm.rmr_region.destination_address + paddr; | 831 | return be64_to_cpu(fdm.rmr_region.destination_address) + paddr; |
| 832 | else | 832 | else |
| 833 | return paddr; | 833 | return paddr; |
| 834 | } | 834 | } |
| @@ -902,7 +902,7 @@ static int fadump_create_elfcore_headers(char *bufp) | |||
| 902 | * to the specified destination_address. Hence set | 902 | * to the specified destination_address. Hence set |
| 903 | * the correct offset. | 903 | * the correct offset. |
| 904 | */ | 904 | */ |
| 905 | phdr->p_offset = fdm.rmr_region.destination_address; | 905 | phdr->p_offset = be64_to_cpu(fdm.rmr_region.destination_address); |
| 906 | } | 906 | } |
| 907 | 907 | ||
| 908 | phdr->p_paddr = mbase; | 908 | phdr->p_paddr = mbase; |
| @@ -951,7 +951,7 @@ static void register_fadump(void) | |||
| 951 | 951 | ||
| 952 | fadump_setup_crash_memory_ranges(); | 952 | fadump_setup_crash_memory_ranges(); |
| 953 | 953 | ||
| 954 | addr = fdm.rmr_region.destination_address + fdm.rmr_region.source_len; | 954 | addr = be64_to_cpu(fdm.rmr_region.destination_address) + be64_to_cpu(fdm.rmr_region.source_len); |
| 955 | /* Initialize fadump crash info header. */ | 955 | /* Initialize fadump crash info header. */ |
| 956 | addr = init_fadump_header(addr); | 956 | addr = init_fadump_header(addr); |
| 957 | vaddr = __va(addr); | 957 | vaddr = __va(addr); |
| @@ -1023,7 +1023,7 @@ void fadump_cleanup(void) | |||
| 1023 | /* Invalidate the registration only if dump is active. */ | 1023 | /* Invalidate the registration only if dump is active. */ |
| 1024 | if (fw_dump.dump_active) { | 1024 | if (fw_dump.dump_active) { |
| 1025 | init_fadump_mem_struct(&fdm, | 1025 | init_fadump_mem_struct(&fdm, |
| 1026 | fdm_active->cpu_state_data.destination_address); | 1026 | be64_to_cpu(fdm_active->cpu_state_data.destination_address)); |
| 1027 | fadump_invalidate_dump(&fdm); | 1027 | fadump_invalidate_dump(&fdm); |
| 1028 | } | 1028 | } |
| 1029 | } | 1029 | } |
| @@ -1063,7 +1063,7 @@ static void fadump_invalidate_release_mem(void) | |||
| 1063 | return; | 1063 | return; |
| 1064 | } | 1064 | } |
| 1065 | 1065 | ||
| 1066 | destination_address = fdm_active->cpu_state_data.destination_address; | 1066 | destination_address = be64_to_cpu(fdm_active->cpu_state_data.destination_address); |
| 1067 | fadump_cleanup(); | 1067 | fadump_cleanup(); |
| 1068 | mutex_unlock(&fadump_mutex); | 1068 | mutex_unlock(&fadump_mutex); |
| 1069 | 1069 | ||
| @@ -1183,31 +1183,31 @@ static int fadump_region_show(struct seq_file *m, void *private) | |||
| 1183 | seq_printf(m, | 1183 | seq_printf(m, |
| 1184 | "CPU : [%#016llx-%#016llx] %#llx bytes, " | 1184 | "CPU : [%#016llx-%#016llx] %#llx bytes, " |
| 1185 | "Dumped: %#llx\n", | 1185 | "Dumped: %#llx\n", |
| 1186 | fdm_ptr->cpu_state_data.destination_address, | 1186 | be64_to_cpu(fdm_ptr->cpu_state_data.destination_address), |
| 1187 | fdm_ptr->cpu_state_data.destination_address + | 1187 | be64_to_cpu(fdm_ptr->cpu_state_data.destination_address) + |
| 1188 | fdm_ptr->cpu_state_data.source_len - 1, | 1188 | be64_to_cpu(fdm_ptr->cpu_state_data.source_len) - 1, |
| 1189 | fdm_ptr->cpu_state_data.source_len, | 1189 | be64_to_cpu(fdm_ptr->cpu_state_data.source_len), |
| 1190 | fdm_ptr->cpu_state_data.bytes_dumped); | 1190 | be64_to_cpu(fdm_ptr->cpu_state_data.bytes_dumped)); |
| 1191 | seq_printf(m, | 1191 | seq_printf(m, |
| 1192 | "HPTE: [%#016llx-%#016llx] %#llx bytes, " | 1192 | "HPTE: [%#016llx-%#016llx] %#llx bytes, " |
| 1193 | "Dumped: %#llx\n", | 1193 | "Dumped: %#llx\n", |
| 1194 | fdm_ptr->hpte_region.destination_address, | 1194 | be64_to_cpu(fdm_ptr->hpte_region.destination_address), |
| 1195 | fdm_ptr->hpte_region.destination_address + | 1195 | be64_to_cpu(fdm_ptr->hpte_region.destination_address) + |
| 1196 | fdm_ptr->hpte_region.source_len - 1, | 1196 | be64_to_cpu(fdm_ptr->hpte_region.source_len) - 1, |
| 1197 | fdm_ptr->hpte_region.source_len, | 1197 | be64_to_cpu(fdm_ptr->hpte_region.source_len), |
| 1198 | fdm_ptr->hpte_region.bytes_dumped); | 1198 | be64_to_cpu(fdm_ptr->hpte_region.bytes_dumped)); |
| 1199 | seq_printf(m, | 1199 | seq_printf(m, |
| 1200 | "DUMP: [%#016llx-%#016llx] %#llx bytes, " | 1200 | "DUMP: [%#016llx-%#016llx] %#llx bytes, " |
| 1201 | "Dumped: %#llx\n", | 1201 | "Dumped: %#llx\n", |
| 1202 | fdm_ptr->rmr_region.destination_address, | 1202 | be64_to_cpu(fdm_ptr->rmr_region.destination_address), |
| 1203 | fdm_ptr->rmr_region.destination_address + | 1203 | be64_to_cpu(fdm_ptr->rmr_region.destination_address) + |
| 1204 | fdm_ptr->rmr_region.source_len - 1, | 1204 | be64_to_cpu(fdm_ptr->rmr_region.source_len) - 1, |
| 1205 | fdm_ptr->rmr_region.source_len, | 1205 | be64_to_cpu(fdm_ptr->rmr_region.source_len), |
| 1206 | fdm_ptr->rmr_region.bytes_dumped); | 1206 | be64_to_cpu(fdm_ptr->rmr_region.bytes_dumped)); |
| 1207 | 1207 | ||
| 1208 | if (!fdm_active || | 1208 | if (!fdm_active || |
| 1209 | (fw_dump.reserve_dump_area_start == | 1209 | (fw_dump.reserve_dump_area_start == |
| 1210 | fdm_ptr->cpu_state_data.destination_address)) | 1210 | be64_to_cpu(fdm_ptr->cpu_state_data.destination_address))) |
| 1211 | goto out; | 1211 | goto out; |
| 1212 | 1212 | ||
| 1213 | /* Dump is active. Show reserved memory region. */ | 1213 | /* Dump is active. Show reserved memory region. */ |
| @@ -1215,10 +1215,10 @@ static int fadump_region_show(struct seq_file *m, void *private) | |||
| 1215 | " : [%#016llx-%#016llx] %#llx bytes, " | 1215 | " : [%#016llx-%#016llx] %#llx bytes, " |
| 1216 | "Dumped: %#llx\n", | 1216 | "Dumped: %#llx\n", |
| 1217 | (unsigned long long)fw_dump.reserve_dump_area_start, | 1217 | (unsigned long long)fw_dump.reserve_dump_area_start, |
| 1218 | fdm_ptr->cpu_state_data.destination_address - 1, | 1218 | be64_to_cpu(fdm_ptr->cpu_state_data.destination_address) - 1, |
| 1219 | fdm_ptr->cpu_state_data.destination_address - | 1219 | be64_to_cpu(fdm_ptr->cpu_state_data.destination_address) - |
| 1220 | fw_dump.reserve_dump_area_start, | 1220 | fw_dump.reserve_dump_area_start, |
| 1221 | fdm_ptr->cpu_state_data.destination_address - | 1221 | be64_to_cpu(fdm_ptr->cpu_state_data.destination_address) - |
| 1222 | fw_dump.reserve_dump_area_start); | 1222 | fw_dump.reserve_dump_area_start); |
| 1223 | out: | 1223 | out: |
| 1224 | if (fdm_active) | 1224 | if (fdm_active) |
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 390311c0f03d..e66af6d265e8 100644 --- a/arch/powerpc/kernel/ftrace.c +++ b/arch/powerpc/kernel/ftrace.c | |||
| @@ -449,7 +449,7 @@ void ftrace_replace_code(int enable) | |||
| 449 | rec = ftrace_rec_iter_record(iter); | 449 | rec = ftrace_rec_iter_record(iter); |
| 450 | ret = __ftrace_replace_code(rec, enable); | 450 | ret = __ftrace_replace_code(rec, enable); |
| 451 | if (ret) { | 451 | if (ret) { |
| 452 | ftrace_bug(ret, rec->ip); | 452 | ftrace_bug(ret, rec); |
| 453 | return; | 453 | return; |
| 454 | } | 454 | } |
| 455 | } | 455 | } |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index a10642a0d861..a83cf5ef6488 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
| @@ -428,10 +428,10 @@ static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, | |||
| 428 | ppc_md.tce_flush(tbl); | 428 | ppc_md.tce_flush(tbl); |
| 429 | } | 429 | } |
| 430 | 430 | ||
| 431 | int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | 431 | int ppc_iommu_map_sg(struct device *dev, struct iommu_table *tbl, |
| 432 | struct scatterlist *sglist, int nelems, | 432 | struct scatterlist *sglist, int nelems, |
| 433 | unsigned long mask, enum dma_data_direction direction, | 433 | unsigned long mask, enum dma_data_direction direction, |
| 434 | struct dma_attrs *attrs) | 434 | struct dma_attrs *attrs) |
| 435 | { | 435 | { |
| 436 | dma_addr_t dma_next = 0, dma_addr; | 436 | dma_addr_t dma_next = 0, dma_addr; |
| 437 | struct scatterlist *s, *outs, *segstart; | 437 | struct scatterlist *s, *outs, *segstart; |
| @@ -539,7 +539,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
| 539 | 539 | ||
| 540 | DBG("mapped %d elements:\n", outcount); | 540 | DBG("mapped %d elements:\n", outcount); |
| 541 | 541 | ||
| 542 | /* For the sake of iommu_unmap_sg, we clear out the length in the | 542 | /* For the sake of ppc_iommu_unmap_sg, we clear out the length in the |
| 543 | * next entry of the sglist if we didn't fill the list completely | 543 | * next entry of the sglist if we didn't fill the list completely |
| 544 | */ | 544 | */ |
| 545 | if (outcount < incount) { | 545 | if (outcount < incount) { |
| @@ -572,9 +572,9 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
| 572 | } | 572 | } |
| 573 | 573 | ||
| 574 | 574 | ||
| 575 | void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, | 575 | void ppc_iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, |
| 576 | int nelems, enum dma_data_direction direction, | 576 | int nelems, enum dma_data_direction direction, |
| 577 | struct dma_attrs *attrs) | 577 | struct dma_attrs *attrs) |
| 578 | { | 578 | { |
| 579 | struct scatterlist *sg; | 579 | struct scatterlist *sg; |
| 580 | 580 | ||
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 155013da27e0..b15194e2c5fc 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
| @@ -266,13 +266,3 @@ int pcibus_to_node(struct pci_bus *bus) | |||
| 266 | } | 266 | } |
| 267 | EXPORT_SYMBOL(pcibus_to_node); | 267 | EXPORT_SYMBOL(pcibus_to_node); |
| 268 | #endif | 268 | #endif |
| 269 | |||
| 270 | static void quirk_radeon_32bit_msi(struct pci_dev *dev) | ||
| 271 | { | ||
| 272 | struct pci_dn *pdn = pci_get_pdn(dev); | ||
| 273 | |||
| 274 | if (pdn) | ||
| 275 | pdn->force_32bit_msi = true; | ||
| 276 | } | ||
| 277 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi); | ||
| 278 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi); | ||
diff --git a/arch/powerpc/kernel/vdso32/getcpu.S b/arch/powerpc/kernel/vdso32/getcpu.S index 23eb9a9441bd..c62be60c7274 100644 --- a/arch/powerpc/kernel/vdso32/getcpu.S +++ b/arch/powerpc/kernel/vdso32/getcpu.S | |||
| @@ -30,8 +30,8 @@ | |||
| 30 | V_FUNCTION_BEGIN(__kernel_getcpu) | 30 | V_FUNCTION_BEGIN(__kernel_getcpu) |
| 31 | .cfi_startproc | 31 | .cfi_startproc |
| 32 | mfspr r5,SPRN_SPRG_VDSO_READ | 32 | mfspr r5,SPRN_SPRG_VDSO_READ |
| 33 | cmpdi cr0,r3,0 | 33 | cmpwi cr0,r3,0 |
| 34 | cmpdi cr1,r4,0 | 34 | cmpwi cr1,r4,0 |
| 35 | clrlwi r6,r5,16 | 35 | clrlwi r6,r5,16 |
| 36 | rlwinm r7,r5,16,31-15,31-0 | 36 | rlwinm r7,r5,16,31-15,31-0 |
| 37 | beq cr0,1f | 37 | beq cr0,1f |
