Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc

* master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc:
[PATCH] powerpc: iSeries needs slb_initialize to be called
powerpc: hook up the splice syscall
[PATCH] powerpc/cell: compile fixes
[PATCH] powerpc: trivial spelling fixes in fault.c
[PATCH] powerpc/pseries: EEH Cleanup
[PATCH] powerpc/pseries: misc lparcfg fixes
[PATCH] powerpc/pseries: fix device name printing, again.
[PATCH] powerpc: Extends HCALL interface for InfiniBand usage
[PATCH] powerpc/pseries: Change H_StudlyCaps to H_SHOUTING_CAPS
[PATCH] powerpc/pseries: print message if EEH recovery fails
[PATCH] powerpc/pseries: mutex lock to serialize EEH event processing
powerpc: converted embedded platforms to use new define_machine support
powerpc: merge machine_check_exception between ppc32 & ppc64

+440 -247
+16 -15
arch/powerpc/kernel/lparcfg.c
··· 37 37 #include <asm/prom.h> 38 38 #include <asm/vdso_datapage.h> 39 39 40 - #define MODULE_VERS "1.6" 40 + #define MODULE_VERS "1.7" 41 41 #define MODULE_NAME "lparcfg" 42 42 43 43 /* #define LPARCFG_DEBUG */ ··· 149 149 if (rc == 0) /* success, return */ 150 150 return; 151 151 /* check for null tag ? */ 152 - if (rc == H_Hardware) 152 + if (rc == H_HARDWARE) 153 153 printk(KERN_INFO 154 154 "plpar-hcall (%s) failed with hardware fault\n", tag); 155 - else if (rc == H_Function) 155 + else if (rc == H_FUNCTION) 156 156 printk(KERN_INFO 157 157 "plpar-hcall (%s) failed; function not allowed\n", tag); 158 - else if (rc == H_Authority) 158 + else if (rc == H_AUTHORITY) 159 159 printk(KERN_INFO 160 - "plpar-hcall (%s) failed; not authorized to this function\n", 161 - tag); 162 - else if (rc == H_Parameter) 160 + "plpar-hcall (%s) failed; not authorized to this" 161 + " function\n", tag); 162 + else if (rc == H_PARAMETER) 163 163 printk(KERN_INFO "plpar-hcall (%s) failed; Bad parameter(s)\n", 164 164 tag); 165 165 else ··· 209 209 unsigned long dummy; 210 210 rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy); 211 211 212 - if (rc != H_Authority) 212 + if (rc != H_AUTHORITY) 213 213 log_plpar_hcall_return(rc, "H_PIC"); 214 214 } 215 215 ··· 242 242 { 243 243 int call_status; 244 244 245 - char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); 245 + unsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); 246 246 if (!local_buffer) { 247 247 printk(KERN_ERR "%s %s kmalloc failure at line %d \n", 248 248 __FILE__, __FUNCTION__, __LINE__); ··· 254 254 call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1, 255 255 NULL, 256 256 SPLPAR_CHARACTERISTICS_TOKEN, 257 - __pa(rtas_data_buf)); 257 + __pa(rtas_data_buf), 258 + RTAS_DATA_BUF_SIZE); 258 259 memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH); 259 260 spin_unlock(&rtas_data_buf_lock); 260 261 ··· 276 275 #ifdef LPARCFG_DEBUG 277 276 printk(KERN_INFO "success calling get-system-parameter \n"); 278 277 #endif 279 - splpar_strlen = local_buffer[0] * 16 + local_buffer[1]; 278 + splpar_strlen = local_buffer[0] * 256 + local_buffer[1]; 280 279 local_buffer += 2; /* step over strlen value */ 281 280 282 281 memset(workbuffer, 0, SPLPAR_MAXLENGTH); ··· 530 529 retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr, 531 530 *new_weight_ptr); 532 531 533 - if (retval == H_Success || retval == H_Constrained) { 532 + if (retval == H_SUCCESS || retval == H_CONSTRAINED) { 534 533 retval = count; 535 - } else if (retval == H_Busy) { 534 + } else if (retval == H_BUSY) { 536 535 retval = -EBUSY; 537 - } else if (retval == H_Hardware) { 536 + } else if (retval == H_HARDWARE) { 538 537 retval = -EIO; 539 - } else if (retval == H_Parameter) { 538 + } else if (retval == H_PARAMETER) { 540 539 retval = -EINVAL; 541 540 } else { 542 541 printk(KERN_WARNING "%s: received unknown hv return code %ld",
+6 -6
arch/powerpc/kernel/rtas.c
··· 578 578 * We use "waiting" to indicate our state. As long 579 579 * as it is >0, we are still trying to all join up. 580 580 * If it goes to 0, we have successfully joined up and 581 - * one thread got H_Continue. If any error happens, 581 + * one thread got H_CONTINUE. If any error happens, 582 582 * we set it to <0. 583 583 */ 584 584 local_irq_save(flags); 585 585 do { 586 586 rc = plpar_hcall_norets(H_JOIN); 587 587 smp_rmb(); 588 - } while (rc == H_Success && data->waiting > 0); 589 - if (rc == H_Success) 588 + } while (rc == H_SUCCESS && data->waiting > 0); 589 + if (rc == H_SUCCESS) 590 590 goto out; 591 591 592 - if (rc == H_Continue) { 592 + if (rc == H_CONTINUE) { 593 593 data->waiting = 0; 594 594 data->args->args[data->args->nargs] = 595 595 rtas_call(ibm_suspend_me_token, 0, 1, NULL); ··· 597 597 plpar_hcall_norets(H_PROD,i); 598 598 } else { 599 599 data->waiting = -EBUSY; 600 - printk(KERN_ERR "Error on H_Join hypervisor call\n"); 600 + printk(KERN_ERR "Error on H_JOIN hypervisor call\n"); 601 601 } 602 602 603 603 out: ··· 624 624 printk(KERN_ERR "Error doing global join\n"); 625 625 626 626 /* Prod each CPU. This won't hurt, and will wake 627 - * anyone we successfully put to sleep with H_Join 627 + * anyone we successfully put to sleep with H_JOIN. 628 628 */ 629 629 for_each_possible_cpu(i) 630 630 plpar_hcall_norets(H_PROD, i);
-6
arch/powerpc/kernel/setup_32.c
··· 50 50 #include <asm/kgdb.h> 51 51 #endif 52 52 53 - extern void platform_init(void); 54 53 extern void bootx_init(unsigned long r4, unsigned long phys); 55 54 56 55 boot_infos_t *boot_infos; ··· 137 138 strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); 138 139 #endif /* CONFIG_CMDLINE */ 139 140 140 - #ifdef CONFIG_PPC_MULTIPLATFORM 141 141 probe_machine(); 142 - #else 143 - /* Base init based on machine type. Obsoloete, please kill ! */ 144 - platform_init(); 145 - #endif 146 142 147 143 #ifdef CONFIG_6xx 148 144 if (cpu_has_feature(CPU_FTR_CAN_DOZE) ||
+4 -6
arch/powerpc/kernel/setup_64.c
··· 215 215 /* 216 216 * Initialize stab / SLB management except on iSeries 217 217 */ 218 - if (!firmware_has_feature(FW_FEATURE_ISERIES)) { 219 - if (cpu_has_feature(CPU_FTR_SLB)) 220 - slb_initialize(); 221 - else 222 - stab_initialize(get_paca()->stab_real); 223 - } 218 + if (cpu_has_feature(CPU_FTR_SLB)) 219 + slb_initialize(); 220 + else if (!firmware_has_feature(FW_FEATURE_ISERIES)) 221 + stab_initialize(get_paca()->stab_real); 224 222 225 223 DBG(" <- early_setup()\n"); 226 224 }
+3 -6
arch/powerpc/kernel/traps.c
··· 228 228 */ 229 229 static inline int check_io_access(struct pt_regs *regs) 230 230 { 231 - #ifdef CONFIG_PPC_PMAC 231 + #if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32) 232 232 unsigned long msr = regs->msr; 233 233 const struct exception_table_entry *entry; 234 234 unsigned int *nip = (unsigned int *)regs->nip; ··· 261 261 return 1; 262 262 } 263 263 } 264 - #endif /* CONFIG_PPC_PMAC */ 264 + #endif /* CONFIG_PPC_PMAC && CONFIG_PPC32 */ 265 265 return 0; 266 266 } 267 267 ··· 308 308 309 309 void machine_check_exception(struct pt_regs *regs) 310 310 { 311 - #ifdef CONFIG_PPC64 312 311 int recover = 0; 312 + unsigned long reason = get_mc_reason(regs); 313 313 314 314 /* See if any machine dependent calls */ 315 315 if (ppc_md.machine_check_exception) ··· 317 317 318 318 if (recover) 319 319 return; 320 - #else 321 - unsigned long reason = get_mc_reason(regs); 322 320 323 321 if (user_mode(regs)) { 324 322 regs->msr |= MSR_RI; ··· 460 462 * additional info, e.g. bus error registers. 461 463 */ 462 464 platform_machine_check(regs); 463 - #endif /* CONFIG_PPC64 */ 464 465 465 466 if (debugger_fault_handler(regs)) 466 467 return;
+3 -3
arch/powerpc/mm/fault.c
··· 177 177 178 178 /* When running in the kernel we expect faults to occur only to 179 179 * addresses in user space. All other faults represent errors in the 180 - * kernel and should generate an OOPS. Unfortunatly, in the case of an 181 - * erroneous fault occuring in a code path which already holds mmap_sem 180 + * kernel and should generate an OOPS. Unfortunately, in the case of an 181 + * erroneous fault occurring in a code path which already holds mmap_sem 182 182 * we will deadlock attempting to validate the fault against the 183 183 * address space. Luckily the kernel only validly references user 184 184 * space from well defined areas of code, which are listed in the 185 185 * exceptions table. 186 186 * 187 187 * As the vast majority of faults will be valid we will only perform 188 - * the source reference check when there is a possibilty of a deadlock. 188 + * the source reference check when there is a possibility of a deadlock. 189 189 * Attempt to lock the address space, if we cannot we then validate the 190 190 * source. If this is invalid we can skip the address space check, 191 191 * thus avoiding the deadlock.
+20 -20
arch/powerpc/platforms/83xx/mpc834x_sys.c
··· 158 158 late_initcall(mpc834x_rtc_hookup); 159 159 #endif 160 160 161 - void __init platform_init(void) 161 + /* 162 + * Called very early, MMU is off, device-tree isn't unflattened 163 + */ 164 + static int __init mpc834x_sys_probe(void) 162 165 { 163 - /* setup the PowerPC module struct */ 164 - ppc_md.setup_arch = mpc834x_sys_setup_arch; 165 - 166 - ppc_md.init_IRQ = mpc834x_sys_init_IRQ; 167 - ppc_md.get_irq = ipic_get_irq; 168 - 169 - ppc_md.restart = mpc83xx_restart; 170 - 171 - ppc_md.time_init = mpc83xx_time_init; 172 - ppc_md.set_rtc_time = NULL; 173 - ppc_md.get_rtc_time = NULL; 174 - ppc_md.calibrate_decr = generic_calibrate_decr; 175 - 176 - ppc_md.progress = udbg_progress; 177 - 178 - if (ppc_md.progress) 179 - ppc_md.progress("mpc834x_sys_init(): exit", 0); 180 - 181 - return; 166 + /* We always match for now, eventually we should look at the flat 167 + dev tree to ensure this is the board we are suppose to run on 168 + */ 169 + return 1; 182 170 } 171 + 172 + define_machine(mpc834x_sys) { 173 + .name = "MPC834x SYS", 174 + .probe = mpc834x_sys_probe, 175 + .setup_arch = mpc834x_sys_setup_arch, 176 + .init_IRQ = mpc834x_sys_init_IRQ, 177 + .get_irq = ipic_get_irq, 178 + .restart = mpc83xx_restart, 179 + .time_init = mpc83xx_time_init, 180 + .calibrate_decr = generic_calibrate_decr, 181 + .progress = udbg_progress, 182 + };
+20 -20
arch/powerpc/platforms/85xx/mpc85xx_ads.c
··· 220 220 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); 221 221 } 222 222 223 - void __init platform_init(void) 223 + /* 224 + * Called very early, device-tree isn't unflattened 225 + */ 226 + static int __init mpc85xx_ads_probe(void) 224 227 { 225 - ppc_md.setup_arch = mpc85xx_ads_setup_arch; 226 - ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo; 227 - 228 - ppc_md.init_IRQ = mpc85xx_ads_pic_init; 229 - ppc_md.get_irq = mpic_get_irq; 230 - 231 - ppc_md.restart = mpc85xx_restart; 232 - ppc_md.power_off = NULL; 233 - ppc_md.halt = NULL; 234 - 235 - ppc_md.time_init = NULL; 236 - ppc_md.set_rtc_time = NULL; 237 - ppc_md.get_rtc_time = NULL; 238 - ppc_md.calibrate_decr = generic_calibrate_decr; 239 - 240 - ppc_md.progress = udbg_progress; 241 - 242 - if (ppc_md.progress) 243 - ppc_md.progress("mpc85xx_ads platform_init(): exit", 0); 228 + /* We always match for now, eventually we should look at the flat 229 + dev tree to ensure this is the board we are suppose to run on 230 + */ 231 + return 1; 244 232 } 233 + 234 + define_machine(mpc85xx_ads) { 235 + .name = "MPC85xx ADS", 236 + .probe = mpc85xx_ads_probe, 237 + .setup_arch = mpc85xx_ads_setup_arch, 238 + .init_IRQ = mpc85xx_ads_pic_init, 239 + .show_cpuinfo = mpc85xx_ads_show_cpuinfo, 240 + .get_irq = mpic_get_irq, 241 + .restart = mpc85xx_restart, 242 + .calibrate_decr = generic_calibrate_decr, 243 + .progress = udbg_progress, 244 + };
+1
arch/powerpc/platforms/cell/spu_callbacks.c
··· 316 316 [__NR_pselect6] sys_ni_syscall, /* sys_pselect */ 317 317 [__NR_ppoll] sys_ni_syscall, /* sys_ppoll */ 318 318 [__NR_unshare] sys_unshare, 319 + [__NR_splice] sys_splice, 319 320 }; 320 321 321 322 long spu_sys_callback(struct spu_syscall_block *s)
+1
arch/powerpc/platforms/cell/spufs/run.c
··· 2 2 #include <linux/ptrace.h> 3 3 4 4 #include <asm/spu.h> 5 + #include <asm/unistd.h> 5 6 6 7 #include "spufs.h" 7 8
+30 -32
arch/powerpc/platforms/pseries/eeh.c
··· 865 865 * on the CEC architecture, type of the device, on earlier boot 866 866 * command-line arguments & etc. 867 867 */ 868 - void eeh_add_device_early(struct device_node *dn) 868 + static void eeh_add_device_early(struct device_node *dn) 869 869 { 870 870 struct pci_controller *phb; 871 871 struct eeh_early_enable_info info; ··· 882 882 info.buid_lo = BUID_LO(phb->buid); 883 883 early_enable_eeh(dn, &info); 884 884 } 885 - EXPORT_SYMBOL_GPL(eeh_add_device_early); 886 885 887 886 void eeh_add_device_tree_early(struct device_node *dn) 888 887 { ··· 892 893 } 893 894 EXPORT_SYMBOL_GPL(eeh_add_device_tree_early); 894 895 895 - void eeh_add_device_tree_late(struct pci_bus *bus) 896 - { 897 - struct pci_dev *dev; 898 - 899 - list_for_each_entry(dev, &bus->devices, bus_list) { 900 - eeh_add_device_late(dev); 901 - if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { 902 - struct pci_bus *subbus = dev->subordinate; 903 - if (subbus) 904 - eeh_add_device_tree_late(subbus); 905 - } 906 - } 907 - } 908 - 909 896 /** 910 897 * eeh_add_device_late - perform EEH initialization for the indicated pci device 911 898 * @dev: pci device for which to set up EEH ··· 899 914 * This routine must be used to complete EEH initialization for PCI 900 915 * devices that were added after system boot (e.g. hotplug, dlpar). 901 916 */ 902 - void eeh_add_device_late(struct pci_dev *dev) 917 + static void eeh_add_device_late(struct pci_dev *dev) 903 918 { 904 919 struct device_node *dn; 905 920 struct pci_dn *pdn; ··· 918 933 919 934 pci_addr_cache_insert_device (dev); 920 935 } 921 - EXPORT_SYMBOL_GPL(eeh_add_device_late); 936 + 937 + void eeh_add_device_tree_late(struct pci_bus *bus) 938 + { 939 + struct pci_dev *dev; 940 + 941 + list_for_each_entry(dev, &bus->devices, bus_list) { 942 + eeh_add_device_late(dev); 943 + if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { 944 + struct pci_bus *subbus = dev->subordinate; 945 + if (subbus) 946 + eeh_add_device_tree_late(subbus); 947 + } 948 + } 949 + } 950 + EXPORT_SYMBOL_GPL(eeh_add_device_tree_late); 922 951 923 952 /** 924 953 * eeh_remove_device - undo EEH setup for the indicated pci device 925 954 * @dev: pci device to be removed 926 955 * 927 - * This routine should be when a device is removed from a running 928 - * system (e.g. by hotplug or dlpar). 956 + * This routine should be called when a device is removed from 957 + * a running system (e.g. by hotplug or dlpar). It unregisters 958 + * the PCI device from the EEH subsystem. I/O errors affecting 959 + * this device will no longer be detected after this call; thus, 960 + * i/o errors affecting this slot may leave this device unusable. 929 961 */ 930 - void eeh_remove_device(struct pci_dev *dev) 962 + static void eeh_remove_device(struct pci_dev *dev) 931 963 { 932 964 struct device_node *dn; 933 965 if (!dev || !eeh_subsystem_enabled) ··· 960 958 PCI_DN(dn)->pcidev = NULL; 961 959 pci_dev_put (dev); 962 960 } 963 - EXPORT_SYMBOL_GPL(eeh_remove_device); 964 961 965 962 void eeh_remove_bus_device(struct pci_dev *dev) 966 963 { 964 + struct pci_bus *bus = dev->subordinate; 965 + struct pci_dev *child, *tmp; 966 + 967 967 eeh_remove_device(dev); 968 - if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { 969 - struct pci_bus *bus = dev->subordinate; 970 - struct list_head *ln; 971 - if (!bus) 972 - return; 973 - for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { 974 - struct pci_dev *pdev = pci_dev_b(ln); 975 - if (pdev) 976 - eeh_remove_bus_device(pdev); 977 - } 968 + 969 + if (bus && dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { 970 + list_for_each_entry_safe(child, tmp, &bus->devices, bus_list) 971 + eeh_remove_bus_device(child); 978 972 } 979 973 } 980 974 EXPORT_SYMBOL_GPL(eeh_remove_bus_device);
+14 -5
arch/powerpc/platforms/pseries/eeh_driver.c
··· 293 293 frozen_pdn = PCI_DN(frozen_dn); 294 294 frozen_pdn->eeh_freeze_count++; 295 295 296 - pci_str = pci_name (frozen_pdn->pcidev); 297 - drv_str = pcid_name (frozen_pdn->pcidev); 298 - if (!pci_str) { 296 + if (frozen_pdn->pcidev) { 297 + pci_str = pci_name (frozen_pdn->pcidev); 298 + drv_str = pcid_name (frozen_pdn->pcidev); 299 + } else { 299 300 pci_str = pci_name (event->dev); 300 301 drv_str = pcid_name (event->dev); 301 302 } 302 303 303 304 if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES) 304 - goto hard_fail; 305 + goto excess_failures; 305 306 306 307 /* If the reset state is a '5' and the time to reset is 0 (infinity) 307 308 * or is more then 15 seconds, then mark this as a permanent failure. ··· 357 356 358 357 return; 359 358 360 - hard_fail: 359 + excess_failures: 361 360 /* 362 361 * About 90% of all real-life EEH failures in the field 363 362 * are due to poorly seated PCI cards. Only 10% or so are ··· 368 367 "and has been permanently disabled. Please try reseating\n" 369 368 "this device or replacing it.\n", 370 369 drv_str, pci_str, frozen_pdn->eeh_freeze_count); 370 + goto perm_error; 371 371 372 + hard_fail: 373 + printk(KERN_ERR 374 + "EEH: Unable to recover from failure of PCI device %s - %s\n" 375 + "Please try reseating this device or replacing it.\n", 376 + drv_str, pci_str); 377 + 378 + perm_error: 372 379 eeh_slot_error_detail(frozen_pdn, 2 /* Permanent Error */); 373 380 374 381 /* Notify all devices that they're about to go down. */
+18 -12
arch/powerpc/platforms/pseries/eeh_event.c
··· 19 19 */ 20 20 21 21 #include <linux/list.h> 22 + #include <linux/mutex.h> 22 23 #include <linux/pci.h> 24 + #include <linux/workqueue.h> 23 25 #include <asm/eeh_event.h> 24 26 #include <asm/ppc-pci.h> 25 27 ··· 39 37 static void eeh_thread_launcher(void *); 40 38 DECLARE_WORK(eeh_event_wq, eeh_thread_launcher, NULL); 41 39 40 + /* Serialize reset sequences for a given pci device */ 41 + DEFINE_MUTEX(eeh_event_mutex); 42 + 42 43 /** 43 - * eeh_event_handler - dispatch EEH events. The detection of a frozen 44 - * slot can occur inside an interrupt, where it can be hard to do 45 - * anything about it. The goal of this routine is to pull these 46 - * detection events out of the context of the interrupt handler, and 47 - * re-dispatch them for processing at a later time in a normal context. 48 - * 44 + * eeh_event_handler - dispatch EEH events. 49 45 * @dummy - unused 46 + * 47 + * The detection of a frozen slot can occur inside an interrupt, 48 + * where it can be hard to do anything about it. The goal of this 49 + * routine is to pull these detection events out of the context 50 + * of the interrupt handler, and re-dispatch them for processing 51 + * at a later time in a normal context. 50 52 */ 51 53 static int eeh_event_handler(void * dummy) 52 54 { ··· 70 64 event = list_entry(eeh_eventlist.next, struct eeh_event, list); 71 65 list_del(&event->list); 72 66 } 73 - 74 - if (event) 75 - eeh_mark_slot(event->dn, EEH_MODE_RECOVERING); 76 - 77 67 spin_unlock_irqrestore(&eeh_eventlist_lock, flags); 68 + 78 69 if (event == NULL) 79 70 break; 71 + 72 + /* Serialize processing of EEH events */ 73 + mutex_lock(&eeh_event_mutex); 74 + eeh_mark_slot(event->dn, EEH_MODE_RECOVERING); 80 75 81 76 printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n", 82 77 pci_name(event->dev)); ··· 85 78 handle_eeh_events(event); 86 79 87 80 eeh_clear_slot(event->dn, EEH_MODE_RECOVERING); 88 - 89 81 pci_dev_put(event->dev); 90 82 kfree(event); 83 + mutex_unlock(&eeh_event_mutex); 91 84 } 92 85 93 86 return 0; ··· 95 88 96 89 /** 97 90 * eeh_thread_launcher 98 - * 99 91 * @dummy - unused 100 92 */ 101 93 static void eeh_thread_launcher(void *dummy)
+100
arch/powerpc/platforms/pseries/hvCall.S
··· 127 127 128 128 mtcrf 0xff,r0 129 129 blr /* return r3 = status */ 130 + 131 + /* plpar_hcall_7arg_7ret(unsigned long opcode, R3 132 + unsigned long arg1, R4 133 + unsigned long arg2, R5 134 + unsigned long arg3, R6 135 + unsigned long arg4, R7 136 + unsigned long arg5, R8 137 + unsigned long arg6, R9 138 + unsigned long arg7, R10 139 + unsigned long *out1, 112(R1) 140 + unsigned long *out2, 110(R1) 141 + unsigned long *out3, 108(R1) 142 + unsigned long *out4, 106(R1) 143 + unsigned long *out5, 104(R1) 144 + unsigned long *out6, 102(R1) 145 + unsigned long *out7); 100(R1) 146 + */ 147 + _GLOBAL(plpar_hcall_7arg_7ret) 148 + HMT_MEDIUM 149 + 150 + mfcr r0 151 + stw r0,8(r1) 152 + 153 + HVSC /* invoke the hypervisor */ 154 + 155 + lwz r0,8(r1) 156 + 157 + ld r11,STK_PARM(r11)(r1) /* Fetch r4 ret arg */ 158 + std r4,0(r11) 159 + ld r11,STK_PARM(r12)(r1) /* Fetch r5 ret arg */ 160 + std r5,0(r11) 161 + ld r11,STK_PARM(r13)(r1) /* Fetch r6 ret arg */ 162 + std r6,0(r11) 163 + ld r11,STK_PARM(r14)(r1) /* Fetch r7 ret arg */ 164 + std r7,0(r11) 165 + ld r11,STK_PARM(r15)(r1) /* Fetch r8 ret arg */ 166 + std r8,0(r11) 167 + ld r11,STK_PARM(r16)(r1) /* Fetch r9 ret arg */ 168 + std r9,0(r11) 169 + ld r11,STK_PARM(r17)(r1) /* Fetch r10 ret arg */ 170 + std r10,0(r11) 171 + 172 + mtcrf 0xff,r0 173 + 174 + blr /* return r3 = status */ 175 + 176 + /* plpar_hcall_9arg_9ret(unsigned long opcode, R3 177 + unsigned long arg1, R4 178 + unsigned long arg2, R5 179 + unsigned long arg3, R6 180 + unsigned long arg4, R7 181 + unsigned long arg5, R8 182 + unsigned long arg6, R9 183 + unsigned long arg7, R10 184 + unsigned long arg8, 112(R1) 185 + unsigned long arg9, 110(R1) 186 + unsigned long *out1, 108(R1) 187 + unsigned long *out2, 106(R1) 188 + unsigned long *out3, 104(R1) 189 + unsigned long *out4, 102(R1) 190 + unsigned long *out5, 100(R1) 191 + unsigned long *out6, 98(R1) 192 + unsigned long *out7); 96(R1) 193 + unsigned long *out8, 94(R1) 194 + unsigned long *out9, 92(R1) 195 + */ 196 + _GLOBAL(plpar_hcall_9arg_9ret) 197 + HMT_MEDIUM 198 + 199 + mfcr r0 200 + stw r0,8(r1) 201 + 202 + ld r11,STK_PARM(r11)(r1) /* put arg8 in R11 */ 203 + ld r12,STK_PARM(r12)(r1) /* put arg9 in R12 */ 204 + 205 + HVSC /* invoke the hypervisor */ 206 + 207 + ld r0,STK_PARM(r13)(r1) /* Fetch r4 ret arg */ 208 + stdx r4,r0,r0 209 + ld r0,STK_PARM(r14)(r1) /* Fetch r5 ret arg */ 210 + stdx r5,r0,r0 211 + ld r0,STK_PARM(r15)(r1) /* Fetch r6 ret arg */ 212 + stdx r6,r0,r0 213 + ld r0,STK_PARM(r16)(r1) /* Fetch r7 ret arg */ 214 + stdx r7,r0,r0 215 + ld r0,STK_PARM(r17)(r1) /* Fetch r8 ret arg */ 216 + stdx r8,r0,r0 217 + ld r0,STK_PARM(r18)(r1) /* Fetch r9 ret arg */ 218 + stdx r9,r0,r0 219 + ld r0,STK_PARM(r19)(r1) /* Fetch r10 ret arg */ 220 + stdx r10,r0,r0 221 + ld r0,STK_PARM(r20)(r1) /* Fetch r11 ret arg */ 222 + stdx r11,r0,r0 223 + ld r0,STK_PARM(r21)(r1) /* Fetch r12 ret arg */ 224 + stdx r12,r0,r0 225 + 226 + lwz r0,8(r1) 227 + mtcrf 0xff,r0 228 + 229 + blr /* return r3 = status */
+3 -3
arch/powerpc/platforms/pseries/hvconsole.c
··· 41 41 unsigned long got; 42 42 43 43 if (plpar_hcall(H_GET_TERM_CHAR, vtermno, 0, 0, 0, &got, 44 - (unsigned long *)buf, (unsigned long *)buf+1) == H_Success) 44 + (unsigned long *)buf, (unsigned long *)buf+1) == H_SUCCESS) 45 45 return got; 46 46 return 0; 47 47 } ··· 69 69 70 70 ret = plpar_hcall_norets(H_PUT_TERM_CHAR, vtermno, count, lbuf[0], 71 71 lbuf[1]); 72 - if (ret == H_Success) 72 + if (ret == H_SUCCESS) 73 73 return count; 74 - if (ret == H_Busy) 74 + if (ret == H_BUSY) 75 75 return 0; 76 76 return -EIO; 77 77 }
+11 -11
arch/powerpc/platforms/pseries/hvcserver.c
··· 43 43 static int hvcs_convert(long to_convert) 44 44 { 45 45 switch (to_convert) { 46 - case H_Success: 46 + case H_SUCCESS: 47 47 return 0; 48 - case H_Parameter: 48 + case H_PARAMETER: 49 49 return -EINVAL; 50 - case H_Hardware: 50 + case H_HARDWARE: 51 51 return -EIO; 52 - case H_Busy: 53 - case H_LongBusyOrder1msec: 54 - case H_LongBusyOrder10msec: 55 - case H_LongBusyOrder100msec: 56 - case H_LongBusyOrder1sec: 57 - case H_LongBusyOrder10sec: 58 - case H_LongBusyOrder100sec: 52 + case H_BUSY: 53 + case H_LONG_BUSY_ORDER_1_MSEC: 54 + case H_LONG_BUSY_ORDER_10_MSEC: 55 + case H_LONG_BUSY_ORDER_100_MSEC: 56 + case H_LONG_BUSY_ORDER_1_SEC: 57 + case H_LONG_BUSY_ORDER_10_SEC: 58 + case H_LONG_BUSY_ORDER_100_SEC: 59 59 return -EBUSY; 60 - case H_Function: /* fall through */ 60 + case H_FUNCTION: /* fall through */ 61 61 default: 62 62 return -EPERM; 63 63 }
+16 -15
arch/powerpc/platforms/pseries/lpar.c
··· 54 54 EXPORT_SYMBOL(plpar_hcall_4out); 55 55 EXPORT_SYMBOL(plpar_hcall_norets); 56 56 EXPORT_SYMBOL(plpar_hcall_8arg_2ret); 57 - 57 + EXPORT_SYMBOL(plpar_hcall_7arg_7ret); 58 + EXPORT_SYMBOL(plpar_hcall_9arg_9ret); 58 59 extern void pSeries_find_serial_port(void); 59 60 60 61 ··· 73 72 74 73 do { 75 74 rc = plpar_put_term_char(vtermno, sizeof(packet), packet); 76 - } while (rc == H_Busy); 75 + } while (rc == H_BUSY); 77 76 } 78 77 79 78 static long hvsi_udbg_buf_len; ··· 86 85 87 86 if (hvsi_udbg_buf_len == 0) { 88 87 rc = plpar_get_term_char(vtermno, &hvsi_udbg_buf_len, hvsi_udbg_buf); 89 - if (rc != H_Success || hvsi_udbg_buf[0] != 0xff) { 88 + if (rc != H_SUCCESS || hvsi_udbg_buf[0] != 0xff) { 90 89 /* bad read or non-data packet */ 91 90 hvsi_udbg_buf_len = 0; 92 91 } else { ··· 140 139 buf[0] = c; 141 140 do { 142 141 rc = plpar_put_term_char(vtermno, 1, buf); 143 - } while(rc == H_Busy); 142 + } while(rc == H_BUSY); 144 143 } 145 144 146 145 /* Buffered chars getc */ ··· 159 158 /* get some more chars. */ 160 159 inbuflen = 0; 161 160 rc = plpar_get_term_char(vtermno, &inbuflen, buf); 162 - if (rc != H_Success) 161 + if (rc != H_SUCCESS) 163 162 inbuflen = 0; /* otherwise inbuflen is garbage */ 164 163 } 165 164 if (inbuflen <= 0 || inbuflen > 16) { ··· 305 304 306 305 lpar_rc = plpar_hcall(H_ENTER, flags, hpte_group, hpte_v, 307 306 hpte_r, &slot, &dummy0, &dummy1); 308 - if (unlikely(lpar_rc == H_PTEG_Full)) { 307 + if (unlikely(lpar_rc == H_PTEG_FULL)) { 309 308 if (!(vflags & HPTE_V_BOLTED)) 310 309 DBG_LOW(" full\n"); 311 310 return -1; ··· 316 315 * will fail. However we must catch the failure in hash_page 317 316 * or we will loop forever, so return -2 in this case. 318 317 */ 319 - if (unlikely(lpar_rc != H_Success)) { 318 + if (unlikely(lpar_rc != H_SUCCESS)) { 320 319 if (!(vflags & HPTE_V_BOLTED)) 321 320 DBG_LOW(" lpar err %d\n", lpar_rc); 322 321 return -2; ··· 347 346 /* don't remove a bolted entry */ 348 347 lpar_rc = plpar_pte_remove(H_ANDCOND, hpte_group + slot_offset, 349 348 (0x1UL << 4), &dummy1, &dummy2); 350 - if (lpar_rc == H_Success) 349 + if (lpar_rc == H_SUCCESS) 351 350 return i; 352 - BUG_ON(lpar_rc != H_Not_Found); 351 + BUG_ON(lpar_rc != H_NOT_FOUND); 353 352 354 353 slot_offset++; 355 354 slot_offset &= 0x7; ··· 392 391 393 392 lpar_rc = plpar_pte_protect(flags, slot, want_v & HPTE_V_AVPN); 394 393 395 - if (lpar_rc == H_Not_Found) { 394 + if (lpar_rc == H_NOT_FOUND) { 396 395 DBG_LOW("not found !\n"); 397 396 return -1; 398 397 } 399 398 400 399 DBG_LOW("ok\n"); 401 400 402 - BUG_ON(lpar_rc != H_Success); 401 + BUG_ON(lpar_rc != H_SUCCESS); 403 402 404 403 return 0; 405 404 } ··· 418 417 419 418 lpar_rc = plpar_pte_read(flags, slot, &dword0, &dummy_word1); 420 419 421 - BUG_ON(lpar_rc != H_Success); 420 + BUG_ON(lpar_rc != H_SUCCESS); 422 421 423 422 return dword0; 424 423 } ··· 469 468 flags = newpp & 7; 470 469 lpar_rc = plpar_pte_protect(flags, slot, 0); 471 470 472 - BUG_ON(lpar_rc != H_Success); 471 + BUG_ON(lpar_rc != H_SUCCESS); 473 472 } 474 473 475 474 static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va, ··· 485 484 want_v = hpte_encode_v(va, psize); 486 485 lpar_rc = plpar_pte_remove(H_AVPN, slot, want_v & HPTE_V_AVPN, 487 486 &dummy1, &dummy2); 488 - if (lpar_rc == H_Not_Found) 487 + if (lpar_rc == H_NOT_FOUND) 489 488 return; 490 489 491 - BUG_ON(lpar_rc != H_Success); 490 + BUG_ON(lpar_rc != H_SUCCESS); 492 491 } 493 492 494 493 /*
+1 -1
arch/powerpc/platforms/pseries/setup.c
··· 463 463 * very low priority. The cede enables interrupts, which 464 464 * doesn't matter here. 465 465 */ 466 - if (!lppaca[cpu ^ 1].idle || poll_pending() == H_Pending) 466 + if (!lppaca[cpu ^ 1].idle || poll_pending() == H_PENDING) 467 467 cede_processor(); 468 468 469 469 out:
+2 -2
arch/powerpc/platforms/pseries/vio.c
··· 258 258 int vio_enable_interrupts(struct vio_dev *dev) 259 259 { 260 260 int rc = h_vio_signal(dev->unit_address, VIO_IRQ_ENABLE); 261 - if (rc != H_Success) 261 + if (rc != H_SUCCESS) 262 262 printk(KERN_ERR "vio: Error 0x%x enabling interrupts\n", rc); 263 263 return rc; 264 264 } ··· 267 267 int vio_disable_interrupts(struct vio_dev *dev) 268 268 { 269 269 int rc = h_vio_signal(dev->unit_address, VIO_IRQ_DISABLE); 270 - if (rc != H_Success) 270 + if (rc != H_SUCCESS) 271 271 printk(KERN_ERR "vio: Error 0x%x disabling interrupts\n", rc); 272 272 return rc; 273 273 }
+4 -4
arch/powerpc/platforms/pseries/xics.c
··· 168 168 unsigned long return_value; 169 169 170 170 lpar_rc = plpar_xirr(&return_value); 171 - if (lpar_rc != H_Success) 171 + if (lpar_rc != H_SUCCESS) 172 172 panic(" bad return code xirr - rc = %lx \n", lpar_rc); 173 173 return (int)return_value; 174 174 } ··· 179 179 unsigned long val64 = value & 0xffffffff; 180 180 181 181 lpar_rc = plpar_eoi(val64); 182 - if (lpar_rc != H_Success) 182 + if (lpar_rc != H_SUCCESS) 183 183 panic("bad return code EOI - rc = %ld, value=%lx\n", lpar_rc, 184 184 val64); 185 185 } ··· 189 189 unsigned long lpar_rc; 190 190 191 191 lpar_rc = plpar_cppr(value); 192 - if (lpar_rc != H_Success) 192 + if (lpar_rc != H_SUCCESS) 193 193 panic("bad return code cppr - rc = %lx\n", lpar_rc); 194 194 } 195 195 ··· 198 198 unsigned long lpar_rc; 199 199 200 200 lpar_rc = plpar_ipi(get_hard_smp_processor_id(n_cpu), value); 201 - if (lpar_rc != H_Success) 201 + if (lpar_rc != H_SUCCESS) 202 202 panic("bad return code qirr - rc = %lx\n", lpar_rc); 203 203 } 204 204
+1 -1
drivers/char/hvcs.c
··· 904 904 * It is possible the vty-server was removed after the irq was 905 905 * requested but before we have time to enable interrupts. 906 906 */ 907 - if (vio_enable_interrupts(vdev) == H_Success) 907 + if (vio_enable_interrupts(vdev) == H_SUCCESS) 908 908 return 0; 909 909 else { 910 910 printk(KERN_ERR "HVCS: int enable failed for"
+15 -15
drivers/net/ibmveth.c
··· 235 235 236 236 lpar_rc = h_add_logical_lan_buffer(adapter->vdev->unit_address, desc.desc); 237 237 238 - if(lpar_rc != H_Success) { 238 + if(lpar_rc != H_SUCCESS) { 239 239 pool->free_map[free_index] = index; 240 240 pool->skbuff[index] = NULL; 241 241 pool->consumer_index--; ··· 373 373 374 374 lpar_rc = h_add_logical_lan_buffer(adapter->vdev->unit_address, desc.desc); 375 375 376 - if(lpar_rc != H_Success) { 376 + if(lpar_rc != H_SUCCESS) { 377 377 ibmveth_debug_printk("h_add_logical_lan_buffer failed during recycle rc=%ld", lpar_rc); 378 378 ibmveth_remove_buffer_from_pool(adapter, adapter->rx_queue.queue_addr[adapter->rx_queue.index].correlator); 379 379 } ··· 511 511 adapter->filter_list_dma, 512 512 mac_address); 513 513 514 - if(lpar_rc != H_Success) { 514 + if(lpar_rc != H_SUCCESS) { 515 515 ibmveth_error_printk("h_register_logical_lan failed with %ld\n", lpar_rc); 516 516 ibmveth_error_printk("buffer TCE:0x%lx filter TCE:0x%lx rxq desc:0x%lx MAC:0x%lx\n", 517 517 adapter->buffer_list_dma, ··· 527 527 ibmveth_error_printk("unable to request irq 0x%x, rc %d\n", netdev->irq, rc); 528 528 do { 529 529 rc = h_free_logical_lan(adapter->vdev->unit_address); 530 - } while (H_isLongBusy(rc) || (rc == H_Busy)); 530 + } while (H_IS_LONG_BUSY(rc) || (rc == H_BUSY)); 531 531 532 532 ibmveth_cleanup(adapter); 533 533 return rc; ··· 556 556 557 557 do { 558 558 lpar_rc = h_free_logical_lan(adapter->vdev->unit_address); 559 - } while (H_isLongBusy(lpar_rc) || (lpar_rc == H_Busy)); 559 + } while (H_IS_LONG_BUSY(lpar_rc) || (lpar_rc == H_BUSY)); 560 560 561 - if(lpar_rc != H_Success) 561 + if(lpar_rc != H_SUCCESS) 562 562 { 563 563 ibmveth_error_printk("h_free_logical_lan failed with %lx, continuing with close\n", 564 564 lpar_rc); ··· 693 693 desc[4].desc, 694 694 desc[5].desc, 695 695 correlator); 696 - } while ((lpar_rc == H_Busy) && (retry_count--)); 696 + } while ((lpar_rc == H_BUSY) && (retry_count--)); 697 697 698 - if(lpar_rc != H_Success && lpar_rc != H_Dropped) { 698 + if(lpar_rc != H_SUCCESS && lpar_rc != H_DROPPED) { 699 699 int i; 700 700 ibmveth_error_printk("tx: h_send_logical_lan failed with rc=%ld\n", lpar_rc); 701 701 for(i = 0; i < 6; i++) { ··· 786 786 /* we think we are done - reenable interrupts, then check once more to make sure we are done */ 787 787 lpar_rc = h_vio_signal(adapter->vdev->unit_address, VIO_IRQ_ENABLE); 788 788 789 - ibmveth_assert(lpar_rc == H_Success); 789 + ibmveth_assert(lpar_rc == H_SUCCESS); 790 790 791 791 netif_rx_complete(netdev); 792 792 793 793 if(ibmveth_rxq_pending_buffer(adapter) && netif_rx_reschedule(netdev, frames_processed)) 794 794 { 795 795 lpar_rc = h_vio_signal(adapter->vdev->unit_address, VIO_IRQ_DISABLE); 796 - ibmveth_assert(lpar_rc == H_Success); 796 + ibmveth_assert(lpar_rc == H_SUCCESS); 797 797 more_work = 1; 798 798 goto restart_poll; 799 799 } ··· 813 813 814 814 if(netif_rx_schedule_prep(netdev)) { 815 815 lpar_rc = h_vio_signal(adapter->vdev->unit_address, VIO_IRQ_DISABLE); 816 - ibmveth_assert(lpar_rc == H_Success); 816 + ibmveth_assert(lpar_rc == H_SUCCESS); 817 817 __netif_rx_schedule(netdev); 818 818 } 819 819 return IRQ_HANDLED; ··· 835 835 IbmVethMcastEnableRecv | 836 836 IbmVethMcastDisableFiltering, 837 837 0); 838 - if(lpar_rc != H_Success) { 838 + if(lpar_rc != H_SUCCESS) { 839 839 ibmveth_error_printk("h_multicast_ctrl rc=%ld when entering promisc mode\n", lpar_rc); 840 840 } 841 841 } else { ··· 847 847 IbmVethMcastDisableFiltering | 848 848 IbmVethMcastClearFilterTable, 849 849 0); 850 - if(lpar_rc != H_Success) { 850 + if(lpar_rc != H_SUCCESS) { 851 851 ibmveth_error_printk("h_multicast_ctrl rc=%ld when attempting to clear filter table\n", lpar_rc); 852 852 } 853 853 /* add the addresses to the filter table */ ··· 858 858 lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address, 859 859 IbmVethMcastAddFilter, 860 860 mcast_addr); 861 - if(lpar_rc != H_Success) { 861 + if(lpar_rc != H_SUCCESS) { 862 862 ibmveth_error_printk("h_multicast_ctrl rc=%ld when adding an entry to the filter table\n", lpar_rc); 863 863 } 864 864 } ··· 867 867 lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address, 868 868 IbmVethMcastEnableFiltering, 869 869 0); 870 - if(lpar_rc != H_Success) { 870 + if(lpar_rc != H_SUCCESS) { 871 871 ibmveth_error_printk("h_multicast_ctrl rc=%ld when enabling filtering\n", lpar_rc); 872 872 } 873 873 }
+5 -5
drivers/scsi/ibmvscsi/rpa_vscsi.c
··· 80 80 tasklet_kill(&hostdata->srp_task); 81 81 do { 82 82 rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address); 83 - } while ((rc == H_Busy) || (H_isLongBusy(rc))); 83 + } while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc))); 84 84 dma_unmap_single(hostdata->dev, 85 85 queue->msg_token, 86 86 queue->size * sizeof(*queue->msgs), DMA_BIDIRECTIONAL); ··· 230 230 rc = plpar_hcall_norets(H_REG_CRQ, 231 231 vdev->unit_address, 232 232 queue->msg_token, PAGE_SIZE); 233 - if (rc == H_Resource) 233 + if (rc == H_RESOURCE) 234 234 /* maybe kexecing and resource is busy. try a reset */ 235 235 rc = ibmvscsi_reset_crq_queue(queue, 236 236 hostdata); ··· 269 269 req_irq_failed: 270 270 do { 271 271 rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address); 272 - } while ((rc == H_Busy) || (H_isLongBusy(rc))); 272 + } while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc))); 273 273 reg_crq_failed: 274 274 dma_unmap_single(hostdata->dev, 275 275 queue->msg_token, ··· 295 295 /* Re-enable the CRQ */ 296 296 do { 297 297 rc = plpar_hcall_norets(H_ENABLE_CRQ, vdev->unit_address); 298 - } while ((rc == H_InProgress) || (rc == H_Busy) || (H_isLongBusy(rc))); 298 + } while ((rc == H_IN_PROGRESS) || (rc == H_BUSY) || (H_IS_LONG_BUSY(rc))); 299 299 300 300 if (rc) 301 301 printk(KERN_ERR "ibmvscsi: Error %d enabling adapter\n", rc); ··· 317 317 /* Close the CRQ */ 318 318 do { 319 319 rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address); 320 - } while ((rc == H_Busy) || (H_isLongBusy(rc))); 320 + } while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc))); 321 321 322 322 /* Clean out the queue */ 323 323 memset(queue->msgs, 0x00, PAGE_SIZE);
-20
include/asm-powerpc/eeh.h
··· 60 60 * device (including config space i/o). Call eeh_add_device_late 61 61 * to finish the eeh setup for this device. 62 62 */ 63 - void eeh_add_device_early(struct device_node *); 64 - void eeh_add_device_late(struct pci_dev *dev); 65 63 void eeh_add_device_tree_early(struct device_node *); 66 64 void eeh_add_device_tree_late(struct pci_bus *); 67 - 68 - /** 69 - * eeh_remove_device - undo EEH setup for the indicated pci device 70 - * @dev: pci device to be removed 71 - * 72 - * This routine should be called when a device is removed from 73 - * a running system (e.g. by hotplug or dlpar). It unregisters 74 - * the PCI device from the EEH subsystem. I/O errors affecting 75 - * this device will no longer be detected after this call; thus, 76 - * i/o errors affecting this slot may leave this device unusable. 77 - */ 78 - void eeh_remove_device(struct pci_dev *); 79 65 80 66 /** 81 67 * eeh_remove_device_recursive - undo EEH for device & children. ··· 101 115 } 102 116 103 117 static inline void pci_addr_cache_build(void) { } 104 - 105 - static inline void eeh_add_device_early(struct device_node *dn) { } 106 - 107 - static inline void eeh_add_device_late(struct pci_dev *dev) { } 108 - 109 - static inline void eeh_remove_device(struct pci_dev *dev) { } 110 118 111 119 static inline void eeh_add_device_tree_early(struct device_node *dn) { } 112 120
+146 -39
include/asm-powerpc/hvcall.h
··· 4 4 5 5 #define HVSC .long 0x44000022 6 6 7 - #define H_Success 0 8 - #define H_Busy 1 /* Hardware busy -- retry later */ 9 - #define H_Closed 2 /* Resource closed */ 10 - #define H_Constrained 4 /* Resource request constrained to max allowed */ 11 - #define H_InProgress 14 /* Kind of like busy */ 12 - #define H_Pending 17 /* returned from H_POLL_PENDING */ 13 - #define H_Continue 18 /* Returned from H_Join on success */ 14 - #define H_LongBusyStartRange 9900 /* Start of long busy range */ 15 - #define H_LongBusyOrder1msec 9900 /* Long busy, hint that 1msec is a good time to retry */ 16 - #define H_LongBusyOrder10msec 9901 /* Long busy, hint that 10msec is a good time to retry */ 17 - #define H_LongBusyOrder100msec 9902 /* Long busy, hint that 100msec is a good time to retry */ 18 - #define H_LongBusyOrder1sec 9903 /* Long busy, hint that 1sec is a good time to retry */ 19 - #define H_LongBusyOrder10sec 9904 /* Long busy, hint that 10sec is a good time to retry */ 20 - #define H_LongBusyOrder100sec 9905 /* Long busy, hint that 100sec is a good time to retry */ 21 - #define H_LongBusyEndRange 9905 /* End of long busy range */ 22 - #define H_Hardware -1 /* Hardware error */ 23 - #define H_Function -2 /* Function not supported */ 24 - #define H_Privilege -3 /* Caller not privileged */ 25 - #define H_Parameter -4 /* Parameter invalid, out-of-range or conflicting */ 26 - #define H_Bad_Mode -5 /* Illegal msr value */ 27 - #define H_PTEG_Full -6 /* PTEG is full */ 28 - #define H_Not_Found -7 /* PTE was not found" */ 29 - #define H_Reserved_DABR -8 /* DABR address is reserved by the hypervisor on this processor" */ 30 - #define H_NoMem -9 31 - #define H_Authority -10 32 - #define H_Permission -11 33 - #define H_Dropped -12 34 - #define H_SourceParm -13 35 - #define H_DestParm -14 36 - #define H_RemoteParm -15 37 - #define H_Resource -16 7 + #define H_SUCCESS 0 8 + #define H_BUSY 1 /* Hardware busy -- retry later */ 9 + #define H_CLOSED 2 /* Resource closed */ 10 + #define H_NOT_AVAILABLE 3 11 + #define H_CONSTRAINED 4 /* Resource request constrained to max allowed */ 12 + #define H_PARTIAL 5 13 + #define H_IN_PROGRESS 14 /* Kind of like busy */ 14 + #define H_PAGE_REGISTERED 15 15 + #define H_PARTIAL_STORE 16 16 + #define H_PENDING 17 /* returned from H_POLL_PENDING */ 17 + #define H_CONTINUE 18 /* Returned from H_Join on success */ 18 + #define H_LONG_BUSY_START_RANGE 9900 /* Start of long busy range */ 19 + #define H_LONG_BUSY_ORDER_1_MSEC 9900 /* Long busy, hint that 1msec \ 20 + is a good time to retry */ 21 + #define H_LONG_BUSY_ORDER_10_MSEC 9901 /* Long busy, hint that 10msec \ 22 + is a good time to retry */ 23 + #define H_LONG_BUSY_ORDER_100_MSEC 9902 /* Long busy, hint that 100msec \ 24 + is a good time to retry */ 25 + #define H_LONG_BUSY_ORDER_1_SEC 9903 /* Long busy, hint that 1sec \ 26 + is a good time to retry */ 27 + #define H_LONG_BUSY_ORDER_10_SEC 9904 /* Long busy, hint that 10sec \ 28 + is a good time to retry */ 29 + #define H_LONG_BUSY_ORDER_100_SEC 9905 /* Long busy, hint that 100sec \ 30 + is a good time to retry */ 31 + #define H_LONG_BUSY_END_RANGE 9905 /* End of long busy range */ 32 + #define H_HARDWARE -1 /* Hardware error */ 33 + #define H_FUNCTION -2 /* Function not supported */ 34 + #define H_PRIVILEGE -3 /* Caller not privileged */ 35 + #define H_PARAMETER -4 /* Parameter invalid, out-of-range or conflicting */ 36 + #define H_BAD_MODE -5 /* Illegal msr value */ 37 + #define H_PTEG_FULL -6 /* PTEG is full */ 38 + #define H_NOT_FOUND -7 /* PTE was not found" */ 39 + #define H_RESERVED_DABR -8 /* DABR address is reserved by the hypervisor on this processor" */ 40 + #define H_NO_MEM -9 41 + #define H_AUTHORITY -10 42 + #define H_PERMISSION -11 43 + #define H_DROPPED -12 44 + #define H_SOURCE_PARM -13 45 + #define H_DEST_PARM -14 46 + #define H_REMOTE_PARM -15 47 + #define H_RESOURCE -16 48 + #define H_ADAPTER_PARM -17 49 + #define H_RH_PARM -18 50 + #define H_RCQ_PARM -19 51 + #define H_SCQ_PARM -20 52 + #define H_EQ_PARM -21 53 + #define H_RT_PARM -22 54 + #define H_ST_PARM -23 55 + #define H_SIGT_PARM -24 56 + #define H_TOKEN_PARM -25 57 + #define H_MLENGTH_PARM -27 58 + #define H_MEM_PARM -28 59 + #define H_MEM_ACCESS_PARM -29 60 + #define H_ATTR_PARM -30 61 + #define H_PORT_PARM -31 62 + #define H_MCG_PARM -32 63 + #define H_VL_PARM -33 64 + #define H_TSIZE_PARM -34 65 + #define H_TRACE_PARM -35 66 + 67 + #define H_MASK_PARM -37 68 + #define H_MCG_FULL -38 69 + #define H_ALIAS_EXIST -39 70 + #define H_P_COUNTER -40 71 + #define H_TABLE_FULL -41 72 + #define H_ALT_TABLE -42 73 + #define H_MR_CONDITION -43 74 + #define H_NOT_ENOUGH_RESOURCES -44 75 + #define H_R_STATE -45 76 + #define H_RESCINDEND -46 77 + 38 78 39 79 /* Long Busy is a condition that can be returned by the firmware 40 80 * when a call cannot be completed now, but the identical call 41 81 * should be retried later. This prevents calls blocking in the 42 - * firmware for long periods of time. Annoyingly the firmware can return 82 + * firmware for long periods of time. Annoyingly the firmware can return 43 83 * a range of return codes, hinting at how long we should wait before 44 84 * retrying. If you don't care for the hint, the macro below is a good 45 85 * way to check for the long_busy return codes 46 86 */ 47 - #define H_isLongBusy(x) ((x >= H_LongBusyStartRange) && (x <= H_LongBusyEndRange)) 87 + #define H_IS_LONG_BUSY(x) ((x >= H_LONG_BUSY_START_RANGE) \ 88 + && (x <= H_LONG_BUSY_END_RANGE)) 48 89 49 90 /* Flags */ 50 91 #define H_LARGE_PAGE (1UL<<(63-16)) ··· 106 65 #define H_DABRX_HYPERVISOR (1UL<<(63-61)) 107 66 #define H_DABRX_KERNEL (1UL<<(63-62)) 108 67 #define H_DABRX_USER (1UL<<(63-63)) 68 + 69 + /* Each control block has to be on a 4K bondary */ 70 + #define H_CB_ALIGNMENT 4096 109 71 110 72 /* pSeries hypervisor opcodes */ 111 73 #define H_REMOVE 0x04 ··· 143 99 #define H_PERFMON 0x7c 144 100 #define H_MIGRATE_DMA 0x78 145 101 #define H_REGISTER_VPA 0xDC 146 - #define H_CEDE 0xE0 102 + #define H_CEDE 0xE0 147 103 #define H_CONFER 0xE4 148 - #define H_PROD 0xE8 104 + #define H_PROD 0xE8 149 105 #define H_GET_PPP 0xEC 150 106 #define H_SET_PPP 0xF0 151 107 #define H_PURR 0xF4 152 - #define H_PIC 0xF8 108 + #define H_PIC 0xF8 153 109 #define H_REG_CRQ 0xFC 154 110 #define H_FREE_CRQ 0x100 155 111 #define H_VIO_SIGNAL 0x104 156 112 #define H_SEND_CRQ 0x108 157 - #define H_COPY_RDMA 0x110 113 + #define H_COPY_RDMA 0x110 158 114 #define H_SET_XDABR 0x134 159 115 #define H_STUFF_TCE 0x138 160 116 #define H_PUT_TCE_INDIRECT 0x13C 161 117 #define H_VTERM_PARTNER_INFO 0x150 162 118 #define H_REGISTER_VTERM 0x154 163 119 #define H_FREE_VTERM 0x158 164 - #define H_POLL_PENDING 0x1D8 120 + #define H_RESET_EVENTS 0x15C 121 + #define H_ALLOC_RESOURCE 0x160 122 + #define H_FREE_RESOURCE 0x164 123 + #define H_MODIFY_QP 0x168 124 + #define H_QUERY_QP 0x16C 125 + #define H_REREGISTER_PMR 0x170 126 + #define H_REGISTER_SMR 0x174 127 + #define H_QUERY_MR 0x178 128 + #define H_QUERY_MW 0x17C 129 + #define H_QUERY_HCA 0x180 130 + #define H_QUERY_PORT 0x184 131 + #define H_MODIFY_PORT 0x188 132 + #define H_DEFINE_AQP1 0x18C 133 + #define H_GET_TRACE_BUFFER 0x190 134 + #define H_DEFINE_AQP0 0x194 135 + #define H_RESIZE_MR 0x198 136 + #define H_ATTACH_MCQP 0x19C 137 + #define H_DETACH_MCQP 0x1A0 138 + #define H_CREATE_RPT 0x1A4 139 + #define H_REMOVE_RPT 0x1A8 140 + #define H_REGISTER_RPAGES 0x1AC 141 + #define H_DISABLE_AND_GETC 0x1B0 142 + #define H_ERROR_DATA 0x1B4 143 + #define H_GET_HCA_INFO 0x1B8 144 + #define H_GET_PERF_COUNT 0x1BC 145 + #define H_MANAGE_TRACE 0x1C0 146 + #define H_QUERY_INT_STATE 0x1E4 147 + #define H_POLL_PENDING 0x1D8 165 148 #define H_JOIN 0x298 166 149 #define H_ENABLE_CRQ 0x2B0 167 150 ··· 223 152 */ 224 153 long plpar_hcall_8arg_2ret(unsigned long opcode, 225 154 unsigned long arg1, 226 - unsigned long arg2, 155 + unsigned long arg2, 227 156 unsigned long arg3, 228 157 unsigned long arg4, 229 158 unsigned long arg5, ··· 246 175 unsigned long *out2, 247 176 unsigned long *out3, 248 177 unsigned long *out4); 178 + 179 + long plpar_hcall_7arg_7ret(unsigned long opcode, 180 + unsigned long arg1, 181 + unsigned long arg2, 182 + unsigned long arg3, 183 + unsigned long arg4, 184 + unsigned long arg5, 185 + unsigned long arg6, 186 + unsigned long arg7, 187 + unsigned long *out1, 188 + unsigned long *out2, 189 + unsigned long *out3, 190 + unsigned long *out4, 191 + unsigned long *out5, 192 + unsigned long *out6, 193 + unsigned long *out7); 194 + 195 + long plpar_hcall_9arg_9ret(unsigned long opcode, 196 + unsigned long arg1, 197 + unsigned long arg2, 198 + unsigned long arg3, 199 + unsigned long arg4, 200 + unsigned long arg5, 201 + unsigned long arg6, 202 + unsigned long arg7, 203 + unsigned long arg8, 204 + unsigned long arg9, 205 + unsigned long *out1, 206 + unsigned long *out2, 207 + unsigned long *out3, 208 + unsigned long *out4, 209 + unsigned long *out5, 210 + unsigned long *out6, 211 + unsigned long *out7, 212 + unsigned long *out8, 213 + unsigned long *out9); 249 214 250 215 #endif /* __ASSEMBLY__ */ 251 216 #endif /* __KERNEL__ */