[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-4.6 1/3] xen/x86/libxl: replace non-POSIX error codes used by PSR code
PSR was using EBADSLT and EUSERS which are not POSIX error codes, replace them with EINVAL and EOVERFLOW respectively. Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> Cc: Wei Liu <wei.liu2@xxxxxxxxxx> Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- tools/libxl/libxl_psr.c | 6 +++--- xen/arch/x86/psr.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/libxl/libxl_psr.c b/tools/libxl/libxl_psr.c index 2a07777..f64406a 100644 --- a/tools/libxl/libxl_psr.c +++ b/tools/libxl/libxl_psr.c @@ -31,7 +31,7 @@ static void libxl__psr_log_err_msg(libxl__gc *gc, int err) case ESRCH: msg = "invalid domain ID"; break; - case EBADSLT: + case EINVAL: msg = "socket is not supported"; break; case EFAULT: @@ -59,7 +59,7 @@ static void libxl__psr_cmt_log_err_msg(libxl__gc *gc, int err) case ENOENT: msg = "CMT is not attached to this domain"; break; - case EUSERS: + case EOVERFLOW: msg = "no free RMID available"; break; default: @@ -81,7 +81,7 @@ static void libxl__psr_cat_log_err_msg(libxl__gc *gc, int err) case ENOENT: msg = "CAT is not enabled on the socket"; break; - case EUSERS: + case EOVERFLOW: msg = "no free COS available"; break; case EEXIST: diff --git a/xen/arch/x86/psr.c b/xen/arch/x86/psr.c index 861683f..0185c45 100644 --- a/xen/arch/x86/psr.c +++ b/xen/arch/x86/psr.c @@ -176,7 +176,7 @@ int psr_alloc_rmid(struct domain *d) if ( rmid > psr_cmt->rmid_max ) { d->arch.psr_rmid = 0; - return -EUSERS; + return -EOVERFLOW; } d->arch.psr_rmid = rmid; @@ -251,7 +251,7 @@ static struct psr_cat_socket_info *get_cat_socket_info(unsigned int socket) return ERR_PTR(-ENODEV); if ( socket >= nr_sockets ) - return ERR_PTR(-EBADSLT); + return ERR_PTR(-EINVAL); if ( !test_bit(socket, cat_socket_enable) ) return ERR_PTR(-ENOENT); @@ -332,7 +332,7 @@ static int write_l3_cbm(unsigned int socket, unsigned int cos, uint64_t cbm) unsigned int cpu = get_socket_cpu(socket); if ( cpu >= nr_cpu_ids ) - return -EBADSLT; + return -EINVAL; on_selected_cpus(cpumask_of(cpu), do_write_l3_cbm, &info, 1); } @@ -381,7 +381,7 @@ int psr_set_l3_cbm(struct domain *d, unsigned int socket, uint64_t cbm) if ( !found ) { spin_unlock(&info->cbm_lock); - return -EUSERS; + return -EOVERFLOW; } cos = found - map; -- 1.9.5 (Apple Git-50.3) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |