From patchwork Tue Feb 6 15:53:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 127022 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3041971ljc; Tue, 6 Feb 2018 07:55:57 -0800 (PST) X-Google-Smtp-Source: AH8x224u7VNwGx9P/MF7iuT7YKUeA7QqA1VxmRtYHSx0rkwLAFYWEb0wHhMyxJ0n9edS3TcfSN43 X-Received: by 10.36.84.85 with SMTP id t82mr3611215ita.3.1517932557292; Tue, 06 Feb 2018 07:55:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517932557; cv=none; d=google.com; s=arc-20160816; b=TvwRa1rBDhKZ+Vl4QvvRXyqFPhzi8VZgvnrAqIt8QjrD4d8Et6RHvnl3iiyn2GIIFH U+ixw+icoeaUXMCxPodmAuaIpfzlOHza/czfOb5JdF0HQA3ChrrDjq2XfmdhUkN1WGTN RpcGN2pWFmfDPulGkMHJwz565XaQgsi5uwEm3lrPhqPDwXwkJicwWE0dJScnud7oH1p7 Qdx2MD2U/reDh10DgQkIVZpFK4Yom6/wSihDFdE3upnLSdJC5A2Ni6tF1opbF6JCH4SM 1qv0VKhvO6lyt17CAxEReiDUDNs07ofHGWyv7UG0VX53t3zH5tjAb7/s58sWbH4wQpy5 mzhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=KYv3Els1sDPSx9hfY/gYZZyeFGhwoEOanmlXIxvXdYE=; b=ccX0CtfkaOxn6Oj5wTT+Ww/omgOsE64mX91AA7PGGLSfxMcXVVutKV7hJwzjzessZa ZwzMk85iXybjsZC+v5G+K1JxC2zizfSMa1D13+C3uMMyVj0f7dUPTEB8vU9caVuuRN3o YeqcRCHhKTTnW7Ma7PmNgP/GUBvIIIEG5+MQeuXP2D6Y6xtuMm/NYPEbYt1sBKhnLm4C 3CkhKCg1LgDFAd07huu3xwFXAPfrpu+8OSSDwznz6EVpEi7rmHAURFoyl8N+jKyH5vRm 7Puk127z5Kq82CbF/mNCTLxn4QBnVXQDuj4wmdhwqH7zQmo3tJKAxfygU1kKEva+6Lis 8tiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OLWo2yYI; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id x6si2099216itd.47.2018.02.06.07.55.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 07:55:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OLWo2yYI; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ej5Ys-0003Sx-Ki; Tue, 06 Feb 2018 15:53:34 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ej5Yr-0003Sf-DR for xen-devel@lists.xen.org; Tue, 06 Feb 2018 15:53:33 +0000 X-Inumbo-ID: d35b14fe-0b55-11e8-ba59-bc764e045a96 Received: from mail-wr0-x244.google.com (unknown [2a00:1450:400c:c0c::244]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id d35b14fe-0b55-11e8-ba59-bc764e045a96; Tue, 06 Feb 2018 16:53:08 +0100 (CET) Received: by mail-wr0-x244.google.com with SMTP id a43so2456213wrc.4 for ; Tue, 06 Feb 2018 07:53:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=x7Q0EkI6urPuL82QA2FYb5i+1aUaYcz5vrmPATaygoM=; b=OLWo2yYIcqezhjlRCDxePsFX7134mYE1c1tUQn1OvivYQZ9ww1oK/kwfNrvqexuzUD W1Xjo7JcOyxEK1YHkWLcnbEs3hd232KanxbNHmfaCpihiO8LpG4SI+L2H/BjU8REMrfI 6rfuNlkxEMvQrXsbsVH+r3bn8NsBNDxg8Drok= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=x7Q0EkI6urPuL82QA2FYb5i+1aUaYcz5vrmPATaygoM=; b=Xyk7yA+yjPt6qhFqiG0Xx/5NKHVAv5aMTptEgcFTALo+d1zL9CsXQb+2EJVOEHBn3G EW4jQzxBwGoF32ArVH+JojjxZkOVkjoCXFOoEBpd4hRREQdjTbYvvFvzVYVYlh57lkkG /5umx2RUWV882lLX1RRdMecV8MDRs99NGXvgpMsKjUCMWNPRWvUtCh39rfYsONWRVVGd nzpysS21gKad5UqsYfI805NoA/mQoq0Z8j1ZxbyGO0f9+JY36+uuIPosi5XOGzossQVj E+E16zqFPA1jRZYrayFktO3hJtUGz5eJ+j0/gYUBMNJMU2qWhe4u51RhSiUft38N6jOk bacg== X-Gm-Message-State: APf1xPAjJwLxrfcw8HjcZoqbWWK2cZ4oFGRZ91RB2WIhpWl/cpBWUeIS Lv6dLvtbvhh8KVvwpVdbUYBzibm/QRM= X-Received: by 10.223.148.33 with SMTP id 30mr2487383wrq.190.1517932411032; Tue, 06 Feb 2018 07:53:31 -0800 (PST) Received: from e108454-lin.cambridge.arm.com ([2001:41d0:1:6c23::1]) by smtp.gmail.com with ESMTPSA id n20sm14950391wrb.56.2018.02.06.07.53.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 07:53:30 -0800 (PST) From: Julien Grall To: xen-devel@lists.xen.org Date: Tue, 6 Feb 2018 15:53:23 +0000 Message-Id: <20180206155325.11703-2-julien.grall@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180206155325.11703-1-julien.grall@linaro.org> References: <20180206155325.11703-1-julien.grall@linaro.org> Cc: sstabellini@kernel.org, volodymyr_babchuk@epam.com, andre.przywara@linaro.org, Julien Grall Subject: [Xen-devel] [PATCH v3 1/3] xen/arm: vpsci: Removing dummy MIGRATE and MIGRATE_INFO_UP_CPU X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The PSCI call MIGRATE and MIGRATE_INFO_UP_CPU are optional and implemented as just returning PSCI_NOT_SUPPORTED (aka UNKNOWN_FUNCTION for SMCCC). The new SMCCC framework is able to deal with unimplemented function and return the proper error code. So remove the implementations for both function. Signed-off-by: Julien Grall Reviewed-by: Volodymyr Babchuk --- Changes in v3: - Add Volodymyr reviewed-by Changes in v2: - Remove define in psci.h - Update SSSC_SMCCC_FUNCTION_COUNT --- xen/arch/arm/vpsci.c | 10 ---------- xen/arch/arm/vsmc.c | 16 +--------------- xen/include/asm-arm/perfc_defn.h | 2 -- xen/include/asm-arm/psci.h | 4 ---- 4 files changed, 1 insertion(+), 31 deletions(-) diff --git a/xen/arch/arm/vpsci.c b/xen/arch/arm/vpsci.c index cd724904ef..979d32ed6d 100644 --- a/xen/arch/arm/vpsci.c +++ b/xen/arch/arm/vpsci.c @@ -172,21 +172,11 @@ int32_t do_psci_0_2_affinity_info(register_t target_affinity, return PSCI_0_2_AFFINITY_LEVEL_OFF; } -int32_t do_psci_0_2_migrate(uint32_t target_cpu) -{ - return PSCI_NOT_SUPPORTED; -} - uint32_t do_psci_0_2_migrate_info_type(void) { return PSCI_0_2_TOS_MP_OR_NOT_PRESENT; } -register_t do_psci_0_2_migrate_info_up_cpu(void) -{ - return PSCI_NOT_SUPPORTED; -} - void do_psci_0_2_system_off( void ) { struct domain *d = current->domain; diff --git a/xen/arch/arm/vsmc.c b/xen/arch/arm/vsmc.c index c9064de37a..997f2e0ebc 100644 --- a/xen/arch/arm/vsmc.c +++ b/xen/arch/arm/vsmc.c @@ -28,7 +28,7 @@ #define XEN_SMCCC_FUNCTION_COUNT 3 /* Number of functions currently supported by Standard Service Service Calls. */ -#define SSSC_SMCCC_FUNCTION_COUNT 13 +#define SSSC_SMCCC_FUNCTION_COUNT 11 static bool fill_uid(struct cpu_user_regs *regs, xen_uuid_t uuid) { @@ -157,11 +157,6 @@ static bool handle_sssc(struct cpu_user_regs *regs) PSCI_SET_RESULT(regs, do_psci_0_2_migrate_info_type()); return true; - case PSCI_0_2_FN_MIGRATE_INFO_UP_CPU: - perfc_incr(vpsci_migrate_info_up_cpu); - PSCI_SET_RESULT(regs, do_psci_0_2_migrate_info_up_cpu()); - return true; - case PSCI_0_2_FN_SYSTEM_OFF: perfc_incr(vpsci_system_off); do_psci_0_2_system_off(); @@ -206,15 +201,6 @@ static bool handle_sssc(struct cpu_user_regs *regs) return true; } - case PSCI_0_2_FN_MIGRATE: - { - uint32_t tcpu = PSCI_ARG32(regs, 1); - - perfc_incr(vpsci_cpu_migrate); - PSCI_SET_RESULT(regs, do_psci_0_2_migrate(tcpu)); - return true; - } - case ARM_SMCCC_FUNC_CALL_COUNT: return fill_function_call_count(regs, SSSC_SMCCC_FUNCTION_COUNT); diff --git a/xen/include/asm-arm/perfc_defn.h b/xen/include/asm-arm/perfc_defn.h index 5f957ee6ec..a7acb7d21c 100644 --- a/xen/include/asm-arm/perfc_defn.h +++ b/xen/include/asm-arm/perfc_defn.h @@ -27,12 +27,10 @@ PERFCOUNTER(vpsci_cpu_on, "vpsci: cpu_on") PERFCOUNTER(vpsci_cpu_off, "vpsci: cpu_off") PERFCOUNTER(vpsci_version, "vpsci: version") PERFCOUNTER(vpsci_migrate_info_type, "vpsci: migrate_info_type") -PERFCOUNTER(vpsci_migrate_info_up_cpu, "vpsci: migrate_info_up_cpu") PERFCOUNTER(vpsci_system_off, "vpsci: system_off") PERFCOUNTER(vpsci_system_reset, "vpsci: system_reset") PERFCOUNTER(vpsci_cpu_suspend, "vpsci: cpu_suspend") PERFCOUNTER(vpsci_cpu_affinity_info, "vpsci: cpu_affinity_info") -PERFCOUNTER(vpsci_cpu_migrate, "vpsci: cpu_migrate") PERFCOUNTER(vgicd_reads, "vgicd: read") PERFCOUNTER(vgicd_writes, "vgicd: write") diff --git a/xen/include/asm-arm/psci.h b/xen/include/asm-arm/psci.h index 635ea5dae4..32c1f81f21 100644 --- a/xen/include/asm-arm/psci.h +++ b/xen/include/asm-arm/psci.h @@ -37,9 +37,7 @@ int32_t do_psci_0_2_cpu_on(register_t target_cpu, register_t entry_point, register_t context_id); int32_t do_psci_0_2_affinity_info(register_t target_affinity, uint32_t lowest_affinity_level); -int32_t do_psci_0_2_migrate(uint32_t target_cpu); uint32_t do_psci_0_2_migrate_info_type(void); -register_t do_psci_0_2_migrate_info_up_cpu(void); void do_psci_0_2_system_off(void); void do_psci_0_2_system_reset(void); @@ -57,9 +55,7 @@ void do_psci_0_2_system_reset(void); #define PSCI_0_2_FN_CPU_OFF 2 #define PSCI_0_2_FN_CPU_ON 3 #define PSCI_0_2_FN_AFFINITY_INFO 4 -#define PSCI_0_2_FN_MIGRATE 5 #define PSCI_0_2_FN_MIGRATE_INFO_TYPE 6 -#define PSCI_0_2_FN_MIGRATE_INFO_UP_CPU 7 #define PSCI_0_2_FN_SYSTEM_OFF 8 #define PSCI_0_2_FN_SYSTEM_RESET 9