From patchwork Tue May 23 13:47:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 684934 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1729982wrt; Tue, 23 May 2023 06:51:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ62CeMDk09YShUG8GYMpfwFNp1ykYeXnvet6iuGYBiKeUazGcWQ4/wnnd9qielMw9HYCemg X-Received: by 2002:ac8:5fc3:0:b0:3f6:a9bb:85be with SMTP id k3-20020ac85fc3000000b003f6a9bb85bemr10622356qta.67.1684849877880; Tue, 23 May 2023 06:51:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684849877; cv=none; d=google.com; s=arc-20160816; b=rM7PQpiP1H5NkEu02o4l68OTF7IdhyduSDFYAuJHE1mZh8QwVE7E2Ofk5MogCr1fCI oC24Jmd3mcb2SCU3WUEabthqgrSGmLSYt14qjvz4WJSqAuHkRVY40h81/C5k9UgfetQy UaSXnk7mHvxDKcJUUSlePkUrhhFIm5eUZIs7pebhVWZUmdHW12usfZPMxl2ofTsVWTaS 5YE18//CWCYJLI4wziNfACp48AnVsBUrM+B11Bbs3t4GZMj5eS6Tmr3Yk7GhVbT3lI2A aSxjIcufgVfRKYAgfEmMVuLvbVmtqQwJVCavVIpYglvwqsVI9H1ADYHk2RtQdxfjC3aM uKKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=S2ONWtUa3lpwntXaI3kn7ynLd1Z1O2L+f7C0TvCO4wU=; b=A+LWmv6kLTE+46i8H49q5nQH0LSYroZfabmYx+jPnHvwEvk2AyxVWhPrg6+/NnjDGx tkZYBQtSU/YU8lSEou2ctZ+FQUoSMZWh3giUal/W8+yeU5yelhDf/hP5K0WV8O4/mNE/ UJO2Y5NduJkRo0QqOaCTuQsEjjHZty16LomV90NZ/bZvxZlMEh8xAjQyBZBcjQeCwHNh QezzZ6APcjdKhjOWmX3EW9nFOXyA9xElEhvOeyO/QePIgNJo1C+uXKBpx7ZoC2muogNG dDTS9wRnT1Qw+iqlkFe4StOJ+UJxA2tA3c/TvxWC1YBT3lFmL1JjHKsyNQWURxlxANUx avVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cqzGhOzm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t10-20020a05622a01ca00b003e38e551e6asi5298292qtw.358.2023.05.23.06.51.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 06:51:17 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cqzGhOzm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1SMW-0008A1-7U; Tue, 23 May 2023 09:47:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1SMV-00089S-5J for qemu-devel@nongnu.org; Tue, 23 May 2023 09:47:39 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1SMT-000136-J4 for qemu-devel@nongnu.org; Tue, 23 May 2023 09:47:38 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-64d2b42a8f9so4260844b3a.3 for ; Tue, 23 May 2023 06:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684849656; x=1687441656; 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=S2ONWtUa3lpwntXaI3kn7ynLd1Z1O2L+f7C0TvCO4wU=; b=cqzGhOzm1eS7GSolGIZ6egzVxNRnL09T2h/sjV+t8QzzkvNM7ZTjqMCRy1T4GjmM/z a7KXwAkl+f5ZKNcfLK9irey1pbEShZn1+i6RtnypD8saI65zwlcFFkthVUxS3w8dbJzN UgGm+b/f2w7MI82AJCE8g35fOqzH0DOcz1FZaNetBPKSJ3QW4/Ig7Cu2/4Dh6mt61/NT 2uuaTlkbB/SWHsJGGmjixYwdNjKxDoM1AcMKb9s97qgy2M5T5UK61OoQGSSEJdn+xmjs Gnd/NvHYD2Bw3cGjx8HMAIMJy9aCOb/lMxFkNRW37s9amzUd8VaX61UA69eYvqSUVXX6 ddFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684849656; x=1687441656; 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=S2ONWtUa3lpwntXaI3kn7ynLd1Z1O2L+f7C0TvCO4wU=; b=dAhkmUWFvfs7tgXqVwMtimQWro21vkNHNrnmSa/vQ6q8MYeOcd3U2VVtRc2pf+EJUg gsXQI+gVlAvzgGa/LlGNjv8u1oFfMa9XxbHJMtPPqZuntd9E509b0kOlLiQr/XUmxQAm +aE8XCbDJT3whzgWpRk72TEU36+wGfbaTtpDOPy5m7tlMDi33UwXaUVtstQOAby7l8sr OACUJFkZlwxt+gQqytzgwDQZ3dd1Ksd/rpISbCjTWP1EeccsfPgcPN5/jFAWzzmxA7T1 y/yf3ivlWPuwBR6srrQMsvs3uQ1h+eRZM4H/TlXlfmeKg/4PROTFaoN5nIqI1ZiotvQs TjuQ== X-Gm-Message-State: AC+VfDyiMVOdRBRmnK5P/fuDrUaEg/rfaEs6VnfL20RzX4TA39L9vJjJ Nsz9m0rEmK8K5kZXcu17cUyfWHpp2YxAd+F0Rck= X-Received: by 2002:a05:6a00:2d26:b0:643:b489:246d with SMTP id fa38-20020a056a002d2600b00643b489246dmr18078532pfb.3.1684849655941; Tue, 23 May 2023 06:47:35 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:c13a:d73:4f88:3654]) by smtp.gmail.com with ESMTPSA id j4-20020aa79284000000b0064d1349dc31sm5737122pfa.199.2023.05.23.06.47.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 06:47:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Juan Quintela Subject: [PATCH v2 01/27] util: Introduce host-specific cpuinfo.h Date: Tue, 23 May 2023 06:47:07 -0700 Message-Id: <20230523134733.678646-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230523134733.678646-1-richard.henderson@linaro.org> References: <20230523134733.678646-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The entire contents of the header is host-specific, but the existence of such a header is not, which could prevent some host specific ifdefs at the top of the file for the include. Add host/include/{arch,generic} to the project arguments. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --- host/include/generic/host/cpuinfo.h | 4 ++++ meson.build | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 host/include/generic/host/cpuinfo.h diff --git a/host/include/generic/host/cpuinfo.h b/host/include/generic/host/cpuinfo.h new file mode 100644 index 0000000000..eca672064a --- /dev/null +++ b/host/include/generic/host/cpuinfo.h @@ -0,0 +1,4 @@ +/* + * No host specific cpu indentification. + * SPDX-License-Identifier: GPL-2.0-or-later + */ diff --git a/meson.build b/meson.build index 0a5cdefd4d..c516b911d9 100644 --- a/meson.build +++ b/meson.build @@ -512,6 +512,16 @@ add_project_arguments('-iquote', '.', '-iquote', meson.current_source_dir() / 'include', language: all_languages) +# If a host-specific include directory exists, list that first... +host_include = meson.current_source_dir() / 'host/include/' +if fs.is_dir(host_include / host_arch) + add_project_arguments('-iquote', host_include / host_arch, + language: all_languages) +endif +# ... followed by the generic fallback. +add_project_arguments('-iquote', host_include / 'generic', + language: all_languages) + sparse = find_program('cgcc', required: get_option('sparse')) if sparse.found() run_target('sparse',