[PATCH v5 14/18] cxl: Support to flash a new image on the adapter from a guest
Manoj Kumar
manoj at linux.vnet.ibm.com
Thu Feb 25 07:03:10 AEDT 2016
Fred, Christophe:
See comments below.
--
Manoj Kumar
On 2/23/2016 10:21 AM, Frederic Barrat wrote:
> From: Christophe Lombard <clombard at linux.vnet.ibm.com>
>
> +#define CXL_DEV_MINORS 13 /* 1 control + 4 AFUs * 3 (dedicated/master/shared) */
Where does this limit of 4 AFUs come from?
Is this related to CXL_MAX_SLICES?
Should this be a computed value, in case the number of AFUs/slices
is increased at a future date?
> +static int update_node(__be32 phandle, s32 scope)
> +{
> + struct update_props_workarea *upwa;
> + struct device_node *dn;
> + int i, rc, ret;
> + char *prop_data;
> + char *buf;
> + int token;
> + u32 nprops;
> + u32 vd;
> +
> + token = rtas_token("ibm,update-properties");
> + if (token == RTAS_UNKNOWN_SERVICE)
> + return -EINVAL;
> +
> + buf = kzalloc(RTAS_DATA_BUF_SIZE, GFP_KERNEL);
> + if (!buf)
> + return -ENOMEM;
> + memset(buf, 0, RTAS_DATA_BUF_SIZE);
memset(0) after kzalloc() is redundant.
> +static int update_devicetree(struct cxl *adapter, s32 scope)
> +{
> + struct update_nodes_workarea *unwa;
> + u32 action, node_count;
> + int token, rc, i;
> + __be32 *data, drc_index, phandle;
> + char *buf;
> +
> + token = rtas_token("ibm,update-nodes");
> + if (token == RTAS_UNKNOWN_SERVICE)
> + return -EINVAL;
> +
> + buf = kzalloc(RTAS_DATA_BUF_SIZE, GFP_KERNEL);
> + if (!buf)
> + return -ENOMEM;
> + memset(buf, 0, RTAS_DATA_BUF_SIZE);
Same as above
More information about the Linuxppc-dev
mailing list