Lines Matching +full:used +full:- +full:by +full:- +full:rtas

1 // SPDX-License-Identifier: GPL-2.0-or-later
14 * keyword - value pairs that specify the configuration of the partition.
29 #include <asm/rtas.h>
50 * Track sum of all purrs across all processors. This is used to further
51 * calculate usage values by different applications
70 * Methods used to fetch LPAR data when running on a pSeries platform.
96 * XXXX - reserved (0)
97 * XXXX - reserved (0)
98 * XXXX - Group Number
99 * XXXX - Pool Number.
101 * XX - reserved. (0)
102 * XX - bit 0-6 reserved (0). bit 7 is Capped indicator.
103 * XX - variable processor Capacity Weight
104 * XX - Unallocated Variable Processor Capacity Weight.
105 * XXXX - Active processors in Physical Processor Pool.
106 * XXXX - Processors active on platform.
107 * R8 (QQQQRRRRRRSSSSSS). if ibm,partition-performance-parameters-level >= 1
108 * XXXX - Physical platform procs allocated to virtualization.
109 * XXXXXX - Max procs capacity % available to the partitions pool.
110 * XXXXXX - Entitled procs capacity % available to the
120 ppp_data->entitlement = retbuf[0]; in h_get_ppp()
121 ppp_data->unallocated_entitlement = retbuf[1]; in h_get_ppp()
123 ppp_data->group_num = (retbuf[2] >> 2 * 8) & 0xffff; in h_get_ppp()
124 ppp_data->pool_num = retbuf[2] & 0xffff; in h_get_ppp()
126 ppp_data->capped = (retbuf[3] >> 6 * 8) & 0x01; in h_get_ppp()
127 ppp_data->weight = (retbuf[3] >> 5 * 8) & 0xff; in h_get_ppp()
128 ppp_data->unallocated_weight = (retbuf[3] >> 4 * 8) & 0xff; in h_get_ppp()
129 ppp_data->active_procs_in_pool = (retbuf[3] >> 2 * 8) & 0xffff; in h_get_ppp()
130 ppp_data->active_system_procs = retbuf[3] & 0xffff; in h_get_ppp()
132 ppp_data->phys_platform_procs = retbuf[4] >> 6 * 8; in h_get_ppp()
133 ppp_data->max_proc_cap_avail = (retbuf[4] >> 3 * 8) & 0xffffff; in h_get_ppp()
134 ppp_data->entitled_proc_cap_avail = retbuf[4] & 0xffffff; in h_get_ppp()
155 memset(&buf->params, 0, sizeof(buf->params)); in show_gpci_data()
156 buf->params.counter_request = cpu_to_be32(0xB1); in show_gpci_data()
157 buf->params.starting_index = cpu_to_be32(-1); /* local LPAR */ in show_gpci_data()
158 buf->params.counter_info_version_in = 0x5; /* v5+ for score */ in show_gpci_data()
163 ret, be32_to_cpu(buf->params.detail_rc)); in show_gpci_data()
166 affinity_score = buf->bytes[0xB]; in show_gpci_data()
230 * valid if the ibm,partition-performance-parameters-level in parse_ppp_data()
236 "ibm,partition-performance-parameters-level", in parse_ppp_data()
267 if (mpp_data.mapped_mem != -1) in parse_mpp_data()
280 if (mpp_data.pool_size != -1) in parse_mpp_data()
325 * Read the lpar name using the RTAS ibm,get-system-parameter call.
327 * The name read through this call is updated if changes are made by the end
340 char name[GET_SYS_PARM_BUF_SIZE-2]; in read_rtas_lpar_name()
344 token = rtas_token("ibm,get-system-parameter"); in read_rtas_lpar_name()
346 return -EINVAL; in read_rtas_lpar_name()
350 return -ENOMEM; in read_rtas_lpar_name()
358 memcpy(local_buffer->raw_buffer, rtas_data_buf, in read_rtas_lpar_name()
359 sizeof(local_buffer->raw_buffer)); in read_rtas_lpar_name()
365 len = min((int) be16_to_cpu(local_buffer->len), in read_rtas_lpar_name()
366 (int) sizeof(local_buffer->name)-1); in read_rtas_lpar_name()
367 local_buffer->name[len] = '\0'; in read_rtas_lpar_name()
369 seq_printf(m, "partition_name=%s\n", local_buffer->name); in read_rtas_lpar_name()
371 rc = -ENODATA; in read_rtas_lpar_name()
380 * The value read in the DT is not updated if the end-user is touching the LPAR
387 if (of_property_read_string(of_root, "ibm,partition-name", &name)) in read_dt_lpar_name()
388 return -ENOENT; in read_dt_lpar_name()
406 * through the get-system-parameter rtas call. Replace keyword strings as
422 call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1, in parse_system_parameter_string()
428 local_buffer[SPLPAR_MAXLENGTH - 1] = '\0'; in parse_system_parameter_string()
433 "%s %s Error calling get-system-parameter (0x%x)\n", in parse_system_parameter_string()
446 printk(KERN_INFO "success calling get-system-parameter\n"); in parse_system_parameter_string()
481 local_buffer -= 2; /* back up over strlen value */ in parse_system_parameter_string()
557 maxmem += (unsigned long)drmem_info->n_lmbs * drmem_info->lmb_size; in maxmem_data()
570 rtas_node = of_find_node_by_path("/rtas"); in pseries_lparcfg_data()
572 lrdrp = of_get_property(rtas_node, "ibm,lrdr-capacity", NULL); in pseries_lparcfg_data()
575 partition_potential_processors = vdso_data->processorCount; in pseries_lparcfg_data()
584 /* this call handles the ibm,get-system-parameter contents */ in pseries_lparcfg_data()
652 return -EINVAL; in update_ppp()
698 return -EINVAL; in update_mpp()
730 return -EINVAL; in lparcfg_write()
733 return -EINVAL; in lparcfg_write()
736 return -EFAULT; in lparcfg_write()
738 kbuf[count - 1] = '\0'; in lparcfg_write()
741 return -EINVAL; in lparcfg_write()
749 return -EINVAL; in lparcfg_write()
766 return -EINVAL; in lparcfg_write()
773 return -EINVAL; in lparcfg_write()
780 return -EINVAL; in lparcfg_write()
784 return -EINVAL; in lparcfg_write()
789 retval = -EBUSY; in lparcfg_write()
791 retval = -EIO; in lparcfg_write()
793 retval = -EINVAL; in lparcfg_write()
815 tmp = of_get_property(rootdn, "system-id", NULL); in lparcfg_data()
818 lp_index_ptr = of_get_property(rootdn, "ibm,partition-no", in lparcfg_data()
854 return -EIO; in lparcfg_init()