[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 3/8] lib: move list sorting code


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 9 Dec 2020 11:39:00 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A3BoWmywItlVr6Eflpd6/88DyyjdT9NO8dU6TUnBCDk=; b=nbfAy2edLYUFtxKO+xz4QBPuCSSq6yjIFmWsLBVcv2r6lG/rJgNITNV+nzKRnajDOuoPEZzv0SOZFjtnTpWKUwFRU7ojwTgMTg5aMfG04nE9qFNfi4oeOVRuI671w2o66e85cCgmLrAhlj0MbU53+f3zlXaiydvWiTfNRfG/fSvbNq1mwT+PpP++UHcNbV7qLhLdxiIszsq+l1UQIkenu1PKaenZElDzrXM5oSGejGyCVZImG3JJs3bio1A6e4cvBaE0OcJ4EHQPHfAoO/PjTFDIvemvxOgJi33UEdqfhUJKMbV60Ee1mStIGGuvrkC5sbUddepWU2Edg/7K8YOSSw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ms/w3Yx9qnayFBa39tWM3d5Dnh3hKVwvYiLGsIM0eMWJq500GHgYqCyl2gNt4zhSXyxN3HeqkAzELzdPPoCXHBUvlEARc6IDQxvEDx+n8XZ8VocHy+KOXBnhMVapFZVXjOEkiPioh7i+up5QkbKDYeydptqfgeXph1yocFC5Oc7a5snkdS0pER/clAAeCNT5dN/BQskdMFBG1xPo6AvF0LjAdpjlwSja3WX2fnfAvE8ijnlLeqSdiNxJFuPD0Co3WvoVR9s4YjBzrDKjQ3cqUNSRMregZ5Ka0X3adLB45294tyoSOZMDxELbFVyKWSBzahqI0ZbZwFUmT4Mv++bYAg==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Wed, 09 Dec 2020 11:39:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWwax1PUiQEQiqDESCXdsiG9mv36nuvGuA
  • Thread-topic: [PATCH v3 3/8] lib: move list sorting code


> On 23 Nov 2020, at 15:21, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> Build the source file always, as by putting it into an archive it still
> won't be linked into final binaries when not needed. This way possible
> build breakage will be easier to notice, and it's more consistent with
> us unconditionally building other library kind of code (e.g. sort() or
> bsearch()).
> 
> While moving the source file, take the opportunity and drop the
> pointless EXPORT_SYMBOL() and an unnecessary #include.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Cheers
Bertrand

> ---
> xen/arch/arm/Kconfig                        | 4 +---
> xen/common/Kconfig                          | 3 ---
> xen/common/Makefile                         | 1 -
> xen/lib/Makefile                            | 1 +
> xen/{common/list_sort.c => lib/list-sort.c} | 2 --
> 5 files changed, 2 insertions(+), 9 deletions(-)
> rename xen/{common/list_sort.c => lib/list-sort.c} (98%)
> 
> diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> index f5b1bcda0323..38b6c31ba5dd 100644
> --- a/xen/arch/arm/Kconfig
> +++ b/xen/arch/arm/Kconfig
> @@ -56,9 +56,7 @@ config HVM
>         def_bool y
> 
> config NEW_VGIC
> -     bool
> -     prompt "Use new VGIC implementation"
> -     select NEEDS_LIST_SORT
> +     bool "Use new VGIC implementation"
>       ---help---
> 
>       This is an alternative implementation of the ARM GIC interrupt
> diff --git a/xen/common/Kconfig b/xen/common/Kconfig
> index 3e2cf2508899..0661328a99e7 100644
> --- a/xen/common/Kconfig
> +++ b/xen/common/Kconfig
> @@ -66,9 +66,6 @@ config MEM_ACCESS
> config NEEDS_LIBELF
>       bool
> 
> -config NEEDS_LIST_SORT
> -     bool
> -
> menu "Speculative hardening"
> 
> config SPECULATIVE_HARDEN_ARRAY
> diff --git a/xen/common/Makefile b/xen/common/Makefile
> index d109f279a490..332e7d667cec 100644
> --- a/xen/common/Makefile
> +++ b/xen/common/Makefile
> @@ -21,7 +21,6 @@ obj-y += keyhandler.o
> obj-$(CONFIG_KEXEC) += kexec.o
> obj-$(CONFIG_KEXEC) += kimage.o
> obj-y += lib.o
> -obj-$(CONFIG_NEEDS_LIST_SORT) += list_sort.o
> obj-$(CONFIG_LIVEPATCH) += livepatch.o livepatch_elf.o
> obj-$(CONFIG_MEM_ACCESS) += mem_access.o
> obj-y += memory.o
> diff --git a/xen/lib/Makefile b/xen/lib/Makefile
> index b8814361d63e..764f3624b5f9 100644
> --- a/xen/lib/Makefile
> +++ b/xen/lib/Makefile
> @@ -1,3 +1,4 @@
> obj-$(CONFIG_X86) += x86/
> 
> lib-y += ctype.o
> +lib-y += list-sort.o
> diff --git a/xen/common/list_sort.c b/xen/lib/list-sort.c
> similarity index 98%
> rename from xen/common/list_sort.c
> rename to xen/lib/list-sort.c
> index af2b2f6519f1..f8d8bbf28178 100644
> --- a/xen/common/list_sort.c
> +++ b/xen/lib/list-sort.c
> @@ -15,7 +15,6 @@
>  * this program; If not, see <http://www.gnu.org/licenses/>.
>  */
> 
> -#include <xen/lib.h>
> #include <xen/list.h>
> 
> #define MAX_LIST_LENGTH_BITS 20
> @@ -154,4 +153,3 @@ void list_sort(void *priv, struct list_head *head,
> 
>       merge_and_restore_back_links(priv, cmp, head, part[max_lev], list);
> }
> -EXPORT_SYMBOL(list_sort);
> 
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.