From patchwork Mon Sep 9 11:03:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 13796642 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D7841ECE579 for ; Mon, 9 Sep 2024 11:03:52 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.794287.1203103 (Exim 4.92) (envelope-from ) id 1sncBL-0007rp-3x; Mon, 09 Sep 2024 11:03:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 794287.1203103; Mon, 09 Sep 2024 11:03:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sncBL-0007ri-1V; Mon, 09 Sep 2024 11:03:43 +0000 Received: by outflank-mailman (input) for mailman id 794287; Mon, 09 Sep 2024 11:03:42 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sncBJ-0007rV-Vz for xen-devel@lists.xenproject.org; Mon, 09 Sep 2024 11:03:42 +0000 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [2a00:1450:4864:20::135]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2b88493f-6e9b-11ef-99a1-01e77a169b0f; Mon, 09 Sep 2024 13:03:40 +0200 (CEST) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-52f01b8738dso2736349e87.1 for ; Mon, 09 Sep 2024 04:03:40 -0700 (PDT) Received: from fziglio-desktop.. ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25ce96a7sm324623966b.158.2024.09.09.04.03.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 04:03:38 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2b88493f-6e9b-11ef-99a1-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1725879819; x=1726484619; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IDoPRe5pKMPzPxX6feYXl4w8ZQX1Ods64y/fBaEdyn4=; b=ZE9gjVFRwtBEfywbrtyGs8JuQARZP7/gkcyCTGMGEGcNEjIj1ZPCzfpnG2Ain5wjq4 0ly10FBX13xfHg5phH+DKpwU0lbF8eUErVpea7k8f6Dyz4OTnd53ItFXTG0FtEpLCtyQ FE4vpZaRhakw1+78kJ1by/j5HngWYHmmCstCI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725879819; x=1726484619; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IDoPRe5pKMPzPxX6feYXl4w8ZQX1Ods64y/fBaEdyn4=; b=EmK+v6xGFsNuNBbdvm/nAoTrywuvvP4srJ0ClaD4keK3VRxhw5NvwC5n+EmjvfAIUy zEroz6m7c6Zt5ih78FsreNJXagjwWoaJJvMYiYUkge5Nplz/IgNwmdG9bIeOPj6YYTLF 0qZJOE75R3tgJeGdDcFe9qn3czJRgKBE1k252iUQihzqkv8KnRWVu0Ns1g3umMh6viaR HYFWYuM6WhOnSZK9ajadSiqf7BN4YOsSTCBDL6bLgwd23qZ1tYQvZVYUOvKLU4UHu7AS oZXG2wTldiWWcVNtPG/Nh+otEoUmGmQNfJPVjv78+5jRjFFEAXNdKXcnKocIaziy8qLC 49dQ== X-Gm-Message-State: AOJu0YwPXDI6DOVis7PEDHo0p8ZjbSPB3rCiK3EmHUum5Q+JEqHpQin2 bTmTF+GXTt9H2wY6cuo3QpmBDLH7WAzCJ1TY/mDN2xlIqV7gmxKCbBWelS1795gwBuasAoEkXpf C X-Google-Smtp-Source: AGHT+IHuw5VcMR2hvPT/qHePYFS5X3vGfSTCwWSpUdrqi3x/pAlxTgD53K6fYjSXD6vzNpi5hnzgUA== X-Received: by 2002:a05:6512:3c98:b0:530:abec:9a1b with SMTP id 2adb3069b0e04-536587aabdcmr7934679e87.13.1725879819138; Mon, 09 Sep 2024 04:03:39 -0700 (PDT) From: Frediano Ziglio To: xen-devel@lists.xenproject.org Cc: Frediano Ziglio Subject: [PATCH v3 1/2] x86/boot: Optimise 32 bit C source code Date: Mon, 9 Sep 2024 12:03:28 +0100 Message-Id: <20240909110329.84512-1-frediano.ziglio@cloud.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 The various filters are removing all optimisations. No need to have all optimisations turned off. Signed-off-by: Frediano Ziglio --- xen/arch/x86/boot/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- Changes since v2: - combine filter calls together; - added additional patch. diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 8f5bbff0cc..dfe3cb7034 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -15,7 +15,7 @@ CFLAGS_x86_32 := $(subst -m64,-m32 -march=i686,$(XEN_TREEWIDE_CFLAGS)) $(call cc-options-add,CFLAGS_x86_32,CC,$(EMBEDDED_EXTRA_CFLAGS)) CFLAGS_x86_32 += -Werror -fno-builtin -g0 -msoft-float -mregparm=3 CFLAGS_x86_32 += -nostdinc -include $(filter %/include/xen/config.h,$(XEN_CFLAGS)) -CFLAGS_x86_32 += $(filter -I%,$(XEN_CFLAGS)) +CFLAGS_x86_32 += $(filter -I% -O%,$(XEN_CFLAGS)) # override for 32bit binaries $(head-bin-objs): CFLAGS_stack_boundary := From patchwork Mon Sep 9 11:03:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 13796641 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 551F0ECE57A for ; Mon, 9 Sep 2024 11:03:51 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.794288.1203108 (Exim 4.92) (envelope-from ) id 1sncBL-0007uR-DM; Mon, 09 Sep 2024 11:03:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 794288.1203108; Mon, 09 Sep 2024 11:03:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sncBL-0007tJ-8m; Mon, 09 Sep 2024 11:03:43 +0000 Received: by outflank-mailman (input) for mailman id 794288; Mon, 09 Sep 2024 11:03:42 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sncBK-0007rV-M9 for xen-devel@lists.xenproject.org; Mon, 09 Sep 2024 11:03:42 +0000 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [2a00:1450:4864:20::635]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2be16a09-6e9b-11ef-99a1-01e77a169b0f; Mon, 09 Sep 2024 13:03:40 +0200 (CEST) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a8d24f98215so229025966b.1 for ; Mon, 09 Sep 2024 04:03:40 -0700 (PDT) Received: from fziglio-desktop.. ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25ce96a7sm324623966b.158.2024.09.09.04.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 04:03:39 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2be16a09-6e9b-11ef-99a1-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1725879820; x=1726484620; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TXUmWlwTdTjWYOzxS3av+DQ/P/2LExw+a7gF6NCKfWQ=; b=CGnaUTNlyHk5tN6Nq5C+nA95w50eBEGNDLlGHVYI6q7d2qB/7ydcqA2yPk7auKthpb zQWnmLHst4cy6XgF6k9Z7JbXaq7Z8wKewRJStqCJ/Z69p2J3VhpHko+9j2qGgmu7LDbq /t2XeyK5//YMdaDX3QmKOAl+rjm0fOW2S9dDA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725879820; x=1726484620; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TXUmWlwTdTjWYOzxS3av+DQ/P/2LExw+a7gF6NCKfWQ=; b=PoZkZe1o7JGP4jOoG8cQGv6RmUFO5lPuLCwqq4OsgChqutJjYPN1SQjbAL7/JohPDi 0nBMYi1ZG5ClLPonipa7zQf0N6sSfsXQYf7BjpoUh50EeM60ermaGPgoESa3qsiZWHya DUHnup9VrgYYnOvlyhxo+GKHfPdETrz4SFZYij13XRAktA89SZv6/n90oft5jXNRxCjH fcfer3HWgJuxNBj13H5HgwZLoijr/MoOexnHKcgFcomOasRq8P2RplJQ6LbgH2NfG70z mgUGBlpIVgHfIqLNXB1dSbP+4rKyT0eCNxpG/WBTxjYoMMyVLbwr7UuboXPMK4YYOpvC IhDw== X-Gm-Message-State: AOJu0YxDsAt17+I8cLZyd6pHdBsKA8J41bKngEUcjE5GEbfuxzG3nIEf L8KX3LyxVe0PEZvSW3jz5VtWjH8YMVHnJslS/RL2G+r7vddj38MsbFRkcGrFHfur3W6mDyywKUO U X-Google-Smtp-Source: AGHT+IH/KIOeTgpAuyHh+E8dBDOBbLzcEFrM3RU228z91O7leohp83aA60ojGDVibVd9xzwEVk1Kqg== X-Received: by 2002:a17:907:980e:b0:a77:cca9:b212 with SMTP id a640c23a62f3a-a8d248a611amr445920866b.45.1725879819783; Mon, 09 Sep 2024 04:03:39 -0700 (PDT) From: Frediano Ziglio To: xen-devel@lists.xenproject.org Cc: Frediano Ziglio Subject: [PATCH v3 2/2] x86/boot: Add missing __XEN__ definition Date: Mon, 9 Sep 2024 12:03:29 +0100 Message-Id: <20240909110329.84512-2-frediano.ziglio@cloud.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240909110329.84512-1-frediano.ziglio@cloud.com> References: <20240909110329.84512-1-frediano.ziglio@cloud.com> MIME-Version: 1.0 We are compiling Xen source code so we should define __XEN__ macro. Signed-off-by: Frediano Ziglio --- xen/arch/x86/boot/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index dfe3cb7034..ff0f965876 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -15,7 +15,7 @@ CFLAGS_x86_32 := $(subst -m64,-m32 -march=i686,$(XEN_TREEWIDE_CFLAGS)) $(call cc-options-add,CFLAGS_x86_32,CC,$(EMBEDDED_EXTRA_CFLAGS)) CFLAGS_x86_32 += -Werror -fno-builtin -g0 -msoft-float -mregparm=3 CFLAGS_x86_32 += -nostdinc -include $(filter %/include/xen/config.h,$(XEN_CFLAGS)) -CFLAGS_x86_32 += $(filter -I% -O%,$(XEN_CFLAGS)) +CFLAGS_x86_32 += $(filter -I% -O%,$(XEN_CFLAGS)) -D__XEN__ # override for 32bit binaries $(head-bin-objs): CFLAGS_stack_boundary :=