From patchwork Fri Nov 8 19:58:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13868900 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 A4669D6408A for ; Fri, 8 Nov 2024 19:58:51 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.832772.1248055 (Exim 4.92) (envelope-from ) id 1t9V7q-0008Tq-6U; Fri, 08 Nov 2024 19:58:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 832772.1248055; Fri, 08 Nov 2024 19:58:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7q-0008Tj-3g; Fri, 08 Nov 2024 19:58:34 +0000 Received: by outflank-mailman (input) for mailman id 832772; Fri, 08 Nov 2024 19:58:33 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7p-0008TS-1R for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:33 +0000 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [2a00:1450:4864:20::631]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d2629bec-9e0b-11ef-a0c6-8be0dac302b0; Fri, 08 Nov 2024 20:58:28 +0100 (CET) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a86e9db75b9so407484366b.1 for ; Fri, 08 Nov 2024 11:58:28 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:26 -0800 (PST) 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: d2629bec-9e0b-11ef-a0c6-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzEiLCJoZWxvIjoibWFpbC1lajEteDYzMS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQyNjI5YmVjLTllMGItMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxMDk1OTA4LjUwNDU4Nywic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095907; x=1731700707; 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=bYie9AcBWI2S7AR0N11MSukBCPDyuxvyXWxJgl6q148=; b=Ce34HUJi51sY9h8GqrU1K0EhG99I1+zcKK5euEZUzoMHv6AJH/JvE/Q/cktReb9NXr N/gJ7ZpFL+iAqBK8DglC8yhoKk5EmWL+9/UjLKWO/WWPJ8rtZ5w8TSn5pcaMjYB2+uyY +6Igp8ARu3/Tisu0lbLSwKPf8uFXoNjcvAwP8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095907; x=1731700707; 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=bYie9AcBWI2S7AR0N11MSukBCPDyuxvyXWxJgl6q148=; b=fK9EfM2Ue8Dtm06NW8UCezWIYknL8RBsQnu4oXWi/zhCi5X3OL1tTBBE80AEXdSK1i jd4kNGdHppqHsDdVhX24gMNVZbuwCJjS1ijxrKpgRQjjws4tLQD2k4ACCOR6QTD/Dlxk KVXXJS1zt8kTE1RNtGHXEXVBpUFW6JlhfuTmIjAkqm6qv5olb3T6gu0DkXsCl9jjZq0s C1sxZ6QyhSjq2UDVn59jWoeV9ieOGJmDqXSuQwdb5s8bJr8sWHR3oY+SDtDwKCg3qYvn qtVy5Jz21IPrdijGjwR4wDhxoIRgk7yJZgoJpVT3OpvRqoNzkbvDhUtYPHtGvYBcU4QW 5tmA== X-Gm-Message-State: AOJu0YwR3DqiC6nvrMy6hFktJnBOwbzfuLVLNIk2Dpz5rGZNSap+KzlB xDjn+oPfVcjZ/+IOvziEq5m3e52YQRBw0Af3OordR2sjfTyv1W2k/GfoyBr93JEEodLcEgnHUsm a X-Google-Smtp-Source: AGHT+IFkwDRG0JuBnQUiz375sbx3PWclHmsV85IVLpeZpU/Z9XZFyOAYTDVEGQOuTd8OzCcEOvwLMw== X-Received: by 2002:a17:906:f598:b0:a9a:20b4:4078 with SMTP id a640c23a62f3a-a9eeff0da70mr350698466b.16.1731095907494; Fri, 08 Nov 2024 11:58:27 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH 01/10] VT-d: Drop includes of mach_apic.h Date: Fri, 8 Nov 2024 19:58:11 +0000 Message-Id: <20241108195820.789716-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Neither iommu.c nor quirks.c use any functionality. iommu.c only uses it to transitively include apic.h and io_apic.h, while quirks.c is only depending on the ACLINUX wrapping of strtoul() which we spell simple_strtoul() everywhere else in Xen. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/drivers/passthrough/vtd/iommu.c | 5 ++++- xen/drivers/passthrough/vtd/quirks.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index e13be244c130..27a4d1640189 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -31,12 +31,15 @@ #include #include #include + +#include +#include #include #include #include #include #include -#include + #include "iommu.h" #include "dmar.h" #include "extern.h" diff --git a/xen/drivers/passthrough/vtd/quirks.c b/xen/drivers/passthrough/vtd/quirks.c index 950dcd56ef8a..dc3dac749ce6 100644 --- a/xen/drivers/passthrough/vtd/quirks.c +++ b/xen/drivers/passthrough/vtd/quirks.c @@ -32,7 +32,7 @@ #include #include #include -#include + #include "iommu.h" #include "dmar.h" #include "extern.h" @@ -321,7 +321,7 @@ static int __init cf_check parse_snb_timeout(const char *s) else if ( strcmp(s, "cap") == 0 ) t = SNB_IGD_TIMEOUT; else - t = strtoul(s, &q, 0); + t = simple_strtoul(s, &q, 0); } else t = t ? SNB_IGD_TIMEOUT_LEGACY : 0; From patchwork Fri Nov 8 19:58:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13868894 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 B1ADDD64084 for ; Fri, 8 Nov 2024 19:58:47 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.832774.1248071 (Exim 4.92) (envelope-from ) id 1t9V7r-0000JY-Nk; Fri, 08 Nov 2024 19:58:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 832774.1248071; Fri, 08 Nov 2024 19:58:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7r-0000Id-HA; Fri, 08 Nov 2024 19:58:35 +0000 Received: by outflank-mailman (input) for mailman id 832774; Fri, 08 Nov 2024 19:58:33 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7p-0008TS-LG for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:33 +0000 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [2a00:1450:4864:20::636]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d3b31170-9e0b-11ef-a0c6-8be0dac302b0; Fri, 08 Nov 2024 20:58:30 +0100 (CET) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a9ef275b980so182263366b.0 for ; Fri, 08 Nov 2024 11:58:30 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:27 -0800 (PST) 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: d3b31170-9e0b-11ef-a0c6-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzYiLCJoZWxvIjoibWFpbC1lajEteDYzNi5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQzYjMxMTcwLTllMGItMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxMDk1OTEwLjY5MTQ5Nywic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095909; x=1731700709; 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=G+dFm0a0Fhh1qywKmm6kV9dHHbNP/gyGU4Edu50c+o8=; b=NDQv/yfhjL/mPnYvZESzX5bwfnOylZXbtS2WXzEHoXlElei9P85ky5cqIf+H06TxQ0 lu38xFp4dZusDq3lz4bw+MDGpIg0/G345oDbMG+Bjl6E6Gb1lTUcLEnHJuZEIQZL5fZ6 8+FDVkn39nqlnRH79qPbpDeFQqBPOYBUATUYY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095909; x=1731700709; 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=G+dFm0a0Fhh1qywKmm6kV9dHHbNP/gyGU4Edu50c+o8=; b=MqNZmvSE1/Fg/gu3pWpQ7WjVxRU9XkNyQckRr0rM1YlLqfYeGPmC5ClhcLmivaro4D WKRBqRFwBaTZXCheHe6hYXaiPMm/yEt6SIW2F1a/sLIr7Nu5KtiazS+7pMUpg22N0VcK o8+aHEZ88y8Pok67W70RnhCOAozHs/R/gYM/pyQDVRVV5KYYeEyb1Tn/ss7n301xOXQX JTioPOXTRdqYLNbQKLUfmgXpMEdTln1G/Ccbz5Pfnc9dC7bKkF6qGWZs2yGgwUmyOrsb I2Rd2ukacpzNxRmU57sNfEPajNbUnb40vlQp8CJtubkKbrXFSZatoY6bAci+82c6AnCs WKtg== X-Gm-Message-State: AOJu0YwDlOv2oAzd0Z5k/n+k4GOJ8C7l3AKUhaZLIs1v2hr6MqxrNCg1 AxnSC6IUh+VDlGtAE8sAlSGJMYd7G709eQ3EpO8ckJr2nLi10WzN8ZqFECtZ+tJ5OXxOgOqgvRG W X-Google-Smtp-Source: AGHT+IEOhqfnb4iyEIZTlMK8aPLGxI8ZmGPT7RBh1fXdTFrp3d4nBhxCGtT3Ce/bAkTP4y3ZJ54+5g== X-Received: by 2002:a17:907:3e1d:b0:a99:f861:ebd with SMTP id a640c23a62f3a-a9eefeebe5amr408994766b.14.1731095909312; Fri, 08 Nov 2024 11:58:29 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH 02/10] x86: Drop includes of mach_apic.h Date: Fri, 8 Nov 2024 19:58:12 +0000 Message-Id: <20241108195820.789716-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 A number of files don't need mach_apic.h at all, or only need transitive dependenices. Drop the includes. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/cpu/common.c | 1 - xen/arch/x86/cpu/intel.c | 2 -- xen/arch/x86/genapic/delivery.c | 3 ++- xen/arch/x86/hpet.c | 3 ++- xen/arch/x86/smp.c | 4 +++- xen/arch/x86/x86_64/acpi_mmcfg.c | 1 - 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c index ff4cd2289797..067d855badf0 100644 --- a/xen/arch/x86/cpu/common.c +++ b/xen/arch/x86/cpu/common.c @@ -18,7 +18,6 @@ #include #include #include -#include #include /* for XEN_INVALID_{SOCKET,CORE}_ID */ #include "cpu.h" diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c index 807b708217e9..6a7347968ba2 100644 --- a/xen/arch/x86/cpu/intel.c +++ b/xen/arch/x86/cpu/intel.c @@ -14,8 +14,6 @@ #include #include -#include - #include "cpu.h" /* diff --git a/xen/arch/x86/genapic/delivery.c b/xen/arch/x86/genapic/delivery.c index 3def78f380d3..7bb7bd658650 100644 --- a/xen/arch/x86/genapic/delivery.c +++ b/xen/arch/x86/genapic/delivery.c @@ -1,9 +1,10 @@ #include #include + +#include #include #include #include -#include /* * LOGICAL FLAT DELIVERY MODE (multicast via bitmask to <= 8 logical APIC IDs). diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index 2f54d3188966..51ff7f12f5c0 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -13,11 +13,12 @@ #include #include #include + +#include #include #include #include #include -#include #include #define MAX_DELTA_NS MILLISECS(10*1000) diff --git a/xen/arch/x86/smp.c b/xen/arch/x86/smp.c index 04c6a0572319..bd337e548c5a 100644 --- a/xen/arch/x86/smp.c +++ b/xen/arch/x86/smp.c @@ -14,7 +14,10 @@ #include #include #include + +#include #include +#include #include #include #include @@ -23,7 +26,6 @@ #include #include #include -#include /* Helper functions to prepare APIC register values. */ static unsigned int prepare_ICR(unsigned int shortcut, int vector) diff --git a/xen/arch/x86/x86_64/acpi_mmcfg.c b/xen/arch/x86/x86_64/acpi_mmcfg.c index 7b0904622931..7fe5663c5984 100644 --- a/xen/arch/x86/x86_64/acpi_mmcfg.c +++ b/xen/arch/x86/x86_64/acpi_mmcfg.c @@ -37,7 +37,6 @@ #include #include #include -#include #include "mmconfig.h" From patchwork Fri Nov 8 19:58:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13868901 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 A42ADD64084 for ; Fri, 8 Nov 2024 19:58:54 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.832775.1248078 (Exim 4.92) (envelope-from ) id 1t9V7s-0000Qt-61; Fri, 08 Nov 2024 19:58:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 832775.1248078; Fri, 08 Nov 2024 19:58:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7r-0000Ov-Rg; Fri, 08 Nov 2024 19:58:35 +0000 Received: by outflank-mailman (input) for mailman id 832775; Fri, 08 Nov 2024 19:58:34 +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 1t9V7q-0008TY-Kh for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:34 +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 d3fe9871-9e0b-11ef-99a3-01e77a169b0f; Fri, 08 Nov 2024 20:58:31 +0100 (CET) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a9a6acac4c3so398705466b.0 for ; Fri, 08 Nov 2024 11:58:31 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:29 -0800 (PST) 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: d3fe9871-9e0b-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzUiLCJoZWxvIjoibWFpbC1lajEteDYzNS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQzZmU5ODcxLTllMGItMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxMDk1OTExLjIxNjg2OCwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095910; x=1731700710; 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=8ANEYUxwjZbcuyDzK95iBxFnfD77BA80c4Ql6FKNyVY=; b=BzHdf4eau3mQ9MSmW+wGMIKnt/j/G8pRH8M0nzA4Ax0jiAuJH01aNrn38dElxJANyf x6d6pZKLauaBKloOatjT8Fsi7iiIrKrzYx0cpo848G8Fc6l6MWKjRlkTHjuO8PlPEBN2 BGPYueM7q7QcdpZvHw1UiFCPU1niCAmw/KGWw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095910; x=1731700710; 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=8ANEYUxwjZbcuyDzK95iBxFnfD77BA80c4Ql6FKNyVY=; b=cNGrbLLHq/lAwSVylnpjP3qEMmpkhW3Cy7hgfoCA0DiCcqWna8xvb7K48oTJxSrbQG ogmjPk/NWebNwQmicKdC36/0TdiOyVfKkrXjMcamCj24cg6R4pIydoNswdaaR6qx0AHx /0NTf5o5iPrj5IakPSikMt+83q/0Me05IRTuEqX6ZsJ3aJzocPNBnCVlGKFEaPrkXRpq Hh6l2QIymDro6oS5kIMvlhwLa77dsMcwWDqdYAUHg3OBvVE/WFNkBgvDaJR3WIxZEIkE ZL1+7l2bFSdN2k6jDbsb6wg1k0buAm9R4S0t1HBiFXmWjkAKx5vbEjpStmOM/Wr0PzAf Yhng== X-Gm-Message-State: AOJu0Yz1a7MaXmjRRmWpbQ6EBOKLhoTTlx845bnT+uWEq/Q38ykSE0es 86CHYSsJYiiG4KLlk1zxEsFR/sumFWhtTjrc8WtelQBxjq7pye6Rvq2FAxRGWhUY5qxZ0do8Ov4 / X-Google-Smtp-Source: AGHT+IFvX9tGeHDVwmSP4Z5fuOX3wsaPvxwmr8qKx24X2101fA9FQ0Q9PeAvSGbtqqCLnc23lSzhVw== X-Received: by 2002:a17:907:2da7:b0:a9e:edcf:b7c8 with SMTP id a640c23a62f3a-a9eeffd8f7cmr397363166b.44.1731095910024; Fri, 08 Nov 2024 11:58:30 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH 03/10] x86/mach-apic: Move generic_*_probe() declarations into genapic.h Date: Fri, 8 Nov 2024 19:58:13 +0000 Message-Id: <20241108195820.789716-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 ... as the implementations are in genapic/probe.c This covers the only functions that both setup.c and boot.c were including mach_apic.h for, although setup.c was depending on io_apic.h transitively too. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/acpi/boot.c | 2 +- xen/arch/x86/include/asm/genapic.h | 3 +++ xen/arch/x86/include/asm/mach-generic/mach_apic.h | 3 --- xen/arch/x86/setup.c | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c index 170f9783c55e..3901f9d9825b 100644 --- a/xen/arch/x86/acpi/boot.c +++ b/xen/arch/x86/acpi/boot.c @@ -38,7 +38,7 @@ #include #include #include /* for hpet_address */ -#include +#include #define PREFIX "ACPI: " diff --git a/xen/arch/x86/include/asm/genapic.h b/xen/arch/x86/include/asm/genapic.h index 4d39fb9a244b..6c8845d17d27 100644 --- a/xen/arch/x86/include/asm/genapic.h +++ b/xen/arch/x86/include/asm/genapic.h @@ -51,4 +51,7 @@ unsigned int cf_check cpu_mask_to_apicid_phys(const cpumask_t *cpumask); void cf_check send_IPI_mask_phys(const cpumask_t *mask, int vector); const cpumask_t *cf_check vector_allocation_cpumask_phys(int cpu); +void generic_apic_probe(void); +void generic_bigsmp_probe(void); + #endif diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x86/include/asm/mach-generic/mach_apic.h index c0d8b232c9eb..50f39b72ccfb 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -39,9 +39,6 @@ static inline int multi_timer_check(int apic, int irq) return 0; } -extern void generic_apic_probe(void); -extern void generic_bigsmp_probe(void); - /* * The following functions based around phys_cpu_present_map are disabled in * some i386 Linux subarchitectures, and in x86_64 'cluster' genapic mode. I'm diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index eac8488c4ca5..4feef9f2e05a 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -46,7 +46,8 @@ #include #include #include /* for bzimage_headroom */ -#include /* for generic_apic_probe */ +#include +#include #include #include #include From patchwork Fri Nov 8 19:58:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13868895 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 6D102D64085 for ; Fri, 8 Nov 2024 19:58:48 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.832777.1248105 (Exim 4.92) (envelope-from ) id 1t9V7t-0001Aq-VC; Fri, 08 Nov 2024 19:58:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 832777.1248105; Fri, 08 Nov 2024 19:58:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7t-0001A2-Oo; Fri, 08 Nov 2024 19:58:37 +0000 Received: by outflank-mailman (input) for mailman id 832777; Fri, 08 Nov 2024 19:58:35 +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 1t9V7r-0008TY-OG for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:35 +0000 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [2a00:1450:4864:20::631]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d4f1db93-9e0b-11ef-99a3-01e77a169b0f; Fri, 08 Nov 2024 20:58:32 +0100 (CET) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a99eb8b607aso355544466b.2 for ; Fri, 08 Nov 2024 11:58:32 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:30 -0800 (PST) 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: d4f1db93-9e0b-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzEiLCJoZWxvIjoibWFpbC1lajEteDYzMS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ0ZjFkYjkzLTllMGItMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxMDk1OTEyLjgwNjY3NCwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095911; x=1731700711; 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=A+Sj7fLqtLlYMTst58VusJVJ11oM18S4VDVx3DGpYgc=; b=cnmim8IgrX77bUd4N651Ed0MK7wWhtsWdadquSMzsih38NmdHU6S3niflAwgrYSp+j nHRaIbghcFa4AmpkI1GIvNYMu4hOw90lTxJB6ejtJ9LjDgD16yw1zHsDCu88OuvvPUUr /tKpcvEGxzCxRzkFYHqmLp0iYhUQ7pr3v53TE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095911; x=1731700711; 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=A+Sj7fLqtLlYMTst58VusJVJ11oM18S4VDVx3DGpYgc=; b=KEpbMIEa5Hsxemr6IN9uMc647la0LQ8qAMoT8q92dd6lUep0hUGbDx6qyypmomeEk8 BgJoi7eEc6tgYZrTd7bOQCWp7R6CpE43gsld23IsdNypy0EyltJq1SL8lRNJXQej7ZGA bHF9K/CN994Tp4wEh4U+rgbyddTS3S47dwxfDcmjMP6ZZwb115GiyymlabufGP3QIzUv JD5x/JWsMcQ0sEPu3pwa45fHu6Ue/0wzejLfYnCaJ68v9ovcuKMG0wczCTfwSO21qsIa q+fTvFdqFuL6DJxFa1ImT/MyKei4Ae67swbg32C6bBOT/3ur8AFOx4sew9ft6OJbKzNu uLsA== X-Gm-Message-State: AOJu0YzrsSNBKeElfNFxFOt+k/D5pkSNKcTt8EiR5MtgxnFwdfo1jfEm pSSe4ZrmYmdhqGQ0PSZAIvSlM5mDcbFViHpQggWftdl71jN/Bfef1tUVU5p29kvPcyFS9b4DbUc C X-Google-Smtp-Source: AGHT+IEN4P6UyfNPOw3vCYe1Veh/DK4NTalWMNlzUMfZW1t3VfRK37PAGzQr1hTa51LcRzqaABQFtQ== X-Received: by 2002:a17:907:7f1f:b0:a9a:9ab:6233 with SMTP id a640c23a62f3a-a9eeff44cfcmr446772166b.34.1731095911424; Fri, 08 Nov 2024 11:58:31 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH 04/10] x86/mach-apic: Drop apic_id_registered() Date: Fri, 8 Nov 2024 19:58:14 +0000 Message-Id: <20241108195820.789716-5-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 It's an unnecessary wrapper. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/apic.c | 3 +-- xen/arch/x86/include/asm/mach-generic/mach_apic.h | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 254ab5d388dc..9f3a374e9581 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -495,8 +495,7 @@ void setup_local_APIC(bool bsp) /* * Double-check whether this APIC is really registered. */ - if (!apic_id_registered()) - BUG(); + BUG_ON(!physid_isset(get_apic_id(), phys_cpu_present_map)); /* * Intel recommends to set DFR, LDR and TPR before enabling diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x86/include/asm/mach-generic/mach_apic.h index 50f39b72ccfb..3cf58d5f6b90 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -45,12 +45,6 @@ static inline int multi_timer_check(int apic, int irq) * really not sure why, since all local APICs should have distinct physical * IDs, and we need to know what they are. */ -static inline int apic_id_registered(void) -{ - return physid_isset(get_apic_id(), - phys_cpu_present_map); -} - static inline void ioapic_phys_id_map(physid_mask_t *map) { *map = phys_cpu_present_map; From patchwork Fri Nov 8 19:58:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13868898 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 84AE1D64087 for ; Fri, 8 Nov 2024 19:58:48 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.832776.1248084 (Exim 4.92) (envelope-from ) id 1t9V7s-0000VH-Cu; Fri, 08 Nov 2024 19:58:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 832776.1248084; Fri, 08 Nov 2024 19:58:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7s-0000UQ-5J; Fri, 08 Nov 2024 19:58:36 +0000 Received: by outflank-mailman (input) for mailman id 832776; Fri, 08 Nov 2024 19:58:35 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7r-0008TS-Bi for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:35 +0000 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [2a00:1450:4864:20::62e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d53e1047-9e0b-11ef-a0c6-8be0dac302b0; Fri, 08 Nov 2024 20:58:33 +0100 (CET) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a9a4031f69fso417234366b.0 for ; Fri, 08 Nov 2024 11:58:33 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:31 -0800 (PST) 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: d53e1047-9e0b-11ef-a0c6-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MmUiLCJoZWxvIjoibWFpbC1lajEteDYyZS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ1M2UxMDQ3LTllMGItMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxMDk1OTEzLjI3OTA3MSwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095912; x=1731700712; 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=AL3v6pBQgxthivHZltyBUNUpaHsfqdVQAfCymchp+Ls=; b=GPeGSjLNbMmKBkXbP3vf2ejXol5CH9kq7AXzreEtaCzeRvz4QOB4X4UZmyKMuztSzv gHadao1wWAiT/gcvmOsoNnPJHbbNAzo8fwcgQZlp6E5nrVzDPuVwW4eAKAjby7eW1eoQ E1v/8hYM2XfeUFHwZ1S8TxPdbHfeDJ1XiA39E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095912; x=1731700712; 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=AL3v6pBQgxthivHZltyBUNUpaHsfqdVQAfCymchp+Ls=; b=dLTPYz8Geu+Rpet6y9D6djQ3qaJU9HeSuYmGMRwVFz+xHFA4KvbVdxtwkKvMuYU7zN fqQG8rrCcRl1TeY78hT0Q0m4qnGzTGunaCrc9sLH3bxFUn0t6y7ZtK7s7jRrzs1vSCSD g11GbeDYT2cZn2rbkFhEn9A8dac4Yr8yetOWPuwWn/cZd/NBP0MmM0lh++KU2QCiQQTW 4EE0ufr9TepZGev5UU1iF814h32Alvf7+8QoIJeimlKrYWeFfzK8wst+6WMm+3IBPuxn RlOwrXZtGWssU7c9useGwPk77bIjxW2CJdrdMN+JHqXPY1lao24aaCtkhwoBQ+74LDKo uprA== X-Gm-Message-State: AOJu0YxxniZZSwL+EMFG6A6sT0zcPm1HPM+uMQ6IZD2YQhSAZwCD3Oox WQ6PH9eG3zVYZlkQhUeLbuJv9T4FHKT2agZNq2R+pBCub0HpFaBhfhB04GERYd0Cb9GkiwwIzFw m X-Google-Smtp-Source: AGHT+IHbxuNfLi3G8lUvZ+uWqI+pNZ9bkTPQHxt/iYne9UQjXwO0hWdMlmtUs9MHI5xVGNOJP9kFww== X-Received: by 2002:a17:906:c112:b0:a99:f4fd:31c8 with SMTP id a640c23a62f3a-a9eeff0e9b4mr368661666b.22.1731095912116; Fri, 08 Nov 2024 11:58:32 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH 05/10] x86/mach-apic: Drop ioapic_phys_id_map() Date: Fri, 8 Nov 2024 19:58:15 +0000 Message-Id: <20241108195820.789716-6-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 It's an unnecessary wrapper. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/include/asm/mach-generic/mach_apic.h | 5 ----- xen/arch/x86/io_apic.c | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x86/include/asm/mach-generic/mach_apic.h index 3cf58d5f6b90..b3e9ea6600ef 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -45,11 +45,6 @@ static inline int multi_timer_check(int apic, int irq) * really not sure why, since all local APICs should have distinct physical * IDs, and we need to know what they are. */ -static inline void ioapic_phys_id_map(physid_mask_t *map) -{ - *map = phys_cpu_present_map; -} - static inline int check_apicid_used(const physid_mask_t *map, int apicid) { return physid_isset(apicid, *map); diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 11b74d3eaf8a..0123edab649b 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1491,7 +1491,7 @@ static void __init setup_ioapic_ids_from_mpc(void) * This is broken; anything with a real cpu count has to * circumvent this idiocy regardless. */ - ioapic_phys_id_map(&phys_id_present_map); + phys_id_present_map = phys_cpu_present_map; /* * Set the IOAPIC ID to the value stored in the MPC table. @@ -2237,7 +2237,7 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id) */ if (physids_empty(apic_id_map)) - ioapic_phys_id_map(&apic_id_map); + apic_id_map = phys_cpu_present_map; spin_lock_irqsave(&ioapic_lock, flags); reg_00.raw = io_apic_read(ioapic, 0); From patchwork Fri Nov 8 19:58:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13868897 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 37A20D64088 for ; Fri, 8 Nov 2024 19:58:49 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.832778.1248110 (Exim 4.92) (envelope-from ) id 1t9V7u-0001Fo-96; Fri, 08 Nov 2024 19:58:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 832778.1248110; Fri, 08 Nov 2024 19:58:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7u-0001Eq-3l; Fri, 08 Nov 2024 19:58:38 +0000 Received: by outflank-mailman (input) for mailman id 832778; Fri, 08 Nov 2024 19:58:37 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7t-0008TS-8a for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:37 +0000 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [2a00:1450:4864:20::529]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d636ca00-9e0b-11ef-a0c6-8be0dac302b0; Fri, 08 Nov 2024 20:58:35 +0100 (CET) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5c9c28c1ecbso3208806a12.0 for ; Fri, 08 Nov 2024 11:58:34 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:32 -0800 (PST) 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: d636ca00-9e0b-11ef-a0c6-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo1MjkiLCJoZWxvIjoibWFpbC1lZDEteDUyOS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ2MzZjYTAwLTllMGItMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxMDk1OTE1LjAwNTc5NCwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095913; x=1731700713; 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=APtwUM4/DSKoYZ87C5Z8DIqnxYFMBxhhyq2sJc0n8KM=; b=d3p9iY8ymr6tzxXtKXIiy75Ez0+Qhpda3v/s2kflRh4rc9/ClPlzGXMPOvBmQxXmy3 NJ8T3nddltonGgH4lE4ritEBgVEl3GarWSdAEyx/VKVqFvsU90bglkowbk3TssYOSIaD aKk3n/N9ZnXz4DtX7PaKkEtxhF3K4VBLfaUgo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095913; x=1731700713; 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=APtwUM4/DSKoYZ87C5Z8DIqnxYFMBxhhyq2sJc0n8KM=; b=QOkrhgyh1C/W3mtKdZoQwYCGT0TmgbWitVCJ89Horgb5DGvMQou9Dxrbme3kzF4tm7 3cZD4SgmCVOJAffcxOZtVOmwuRlGVOk+nVXtwKZjtE39L6Q2BcR4MrujJ5nx+iw5jBfS b6n6rJ7cEkO9aLeeW7hM5lrQlbjzjWszM7lZwnI5som0Dg9ciko4L8vKberj41/9Ix9q rnRHd9NfLj8VuiqabSLPcxDPMEkNMmQ6TOxw+53BzkNn/nO+jFMTEatapfoWqdDq/74o ok05hhtx1QjGYlGin/t1T9fYS9j837kxb6TfiSv1wWWCCttdOlzTgIz8ZlV/5fJNA3Te 7QXQ== X-Gm-Message-State: AOJu0YwsEpSb/59nJHrWzE4pkh1+Dk2OhStVkwIf4fosEL7tOnmkkLoi PZA0kNmbZuTXCkewbp1ctwkR+MIFGJwDw7DCvovoXcQOUOP9ElwgvvaBwsd6wHNN1ruHClYuYDh D X-Google-Smtp-Source: AGHT+IFKGQL0b0X7k0u5px8jrCXQAxW6XKp1V2s6lzp7Hb41YROrnFFRf3etEXpuEfdEahMpEYcdJA== X-Received: by 2002:a17:907:6d1c:b0:a99:e67a:d12d with SMTP id a640c23a62f3a-a9eeffd93aamr380686466b.48.1731095913550; Fri, 08 Nov 2024 11:58:33 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH 06/10] x86/mach-apic: Drop check_apicid_used() Date: Fri, 8 Nov 2024 19:58:16 +0000 Message-Id: <20241108195820.789716-7-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 It's an unnecessary wrapper, and is longer than the operation it wraps. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/include/asm/mach-generic/mach_apic.h | 5 ----- xen/arch/x86/io_apic.c | 9 +++++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x86/include/asm/mach-generic/mach_apic.h index b3e9ea6600ef..c8e0637f4424 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -45,11 +45,6 @@ static inline int multi_timer_check(int apic, int irq) * really not sure why, since all local APICs should have distinct physical * IDs, and we need to know what they are. */ -static inline int check_apicid_used(const physid_mask_t *map, int apicid) -{ - return physid_isset(apicid, *map); -} - static inline int check_apicid_present(int apicid) { return physid_isset(apicid, phys_cpu_present_map); diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 0123edab649b..5a4d8597e07a 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1520,8 +1520,8 @@ static void __init setup_ioapic_ids_from_mpc(void) * system must have a unique ID or we get lots of nice * 'stuck on smp_invalidate_needed IPI wait' messages. */ - if (check_apicid_used(&phys_id_present_map, - mp_ioapics[apic].mpc_apicid)) { + if ( physid_isset(mp_ioapics[apic].mpc_apicid, phys_id_present_map) ) + { printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n", apic, mp_ioapics[apic].mpc_apicid); for (i = 0; i < get_physical_broadcast(); i++) @@ -2253,10 +2253,11 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id) * Every APIC in a system must have a unique ID or we get lots of nice * 'stuck on smp_invalidate_needed IPI wait' messages. */ - if (check_apicid_used(&apic_id_map, apic_id)) { + if ( physid_isset(apic_id, apic_id_map) ) + { for (i = 0; i < get_physical_broadcast(); i++) { - if (!check_apicid_used(&apic_id_map, i)) + if ( !physid_isset(i, apic_id_map) ) break; } From patchwork Fri Nov 8 19:58:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13868899 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 183D4D64085 for ; Fri, 8 Nov 2024 19:58:51 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.832779.1248126 (Exim 4.92) (envelope-from ) id 1t9V7v-0001kk-W1; Fri, 08 Nov 2024 19:58:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 832779.1248126; Fri, 08 Nov 2024 19:58:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7v-0001k0-Qi; Fri, 08 Nov 2024 19:58:39 +0000 Received: by outflank-mailman (input) for mailman id 832779; Fri, 08 Nov 2024 19:58:38 +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 1t9V7u-0008TY-Jq for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:38 +0000 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [2a00:1450:4864:20::52a]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d6820324-9e0b-11ef-99a3-01e77a169b0f; Fri, 08 Nov 2024 20:58:35 +0100 (CET) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5c9c28c1ecbso3208821a12.0 for ; Fri, 08 Nov 2024 11:58:35 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:33 -0800 (PST) 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: d6820324-9e0b-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo1MmEiLCJoZWxvIjoibWFpbC1lZDEteDUyYS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ2ODIwMzI0LTllMGItMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxMDk1OTE1LjQ1MjczLCJzZW5kZXIiOiJhbmRyZXcuY29vcGVyQGNsb3VkLmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095914; x=1731700714; 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=pYLPSJ4LnDxE4PBKWdzigEqbbkS/YUzGMHz1cObbzSM=; b=eBifqC7RNAJMGsWO7CQudZZviiY2nS6g/+7/m7BSi3Z5kzyjYf/oJ37ACQ5n465jCS 2VUotdoAXM9/k/hVPjSN7uiKJYuN64arypaYXAkXZ/Xk8htrHU2YkX+KX4vikohYcd3D r8Ez2/D5Mz+jtIraj79Dya+qjjgjzvUjUE+4s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095914; x=1731700714; 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=pYLPSJ4LnDxE4PBKWdzigEqbbkS/YUzGMHz1cObbzSM=; b=mRprT2knvG6XqjHca5W6s3/oS4xGw3RNYit1HXeCJ5hvJzTB+Du3IntSarZnOELpKk ckvh9+Hx8WBqX3Tyk9STrY2BmKwKRiy//OJQHV6G+QMZUZ25BjYMa4GESQNdcNupEqsO ZghUZRfvldJDkcEeammTI2IDsIJktHLNXHMDmPG5VWQVBuxpKKdB8+FGSFoDjGYiwAy6 PxE1D4DILVYoA5oGf9jNcEp3J0lY4ybDQ/J3i6xA7CLWwTlbpLat925fgB2AOMCC7Azc zW3KxB0BjJJx880FdXwvGGuMB9OrSdFt4Q1e8LCpBBGZH1yoXLczcfdt1PyzDgemwAX9 282Q== X-Gm-Message-State: AOJu0YwJMgoTqM7B8nOYfSEFiINkpCLa7lqKqXFuU6Jw3HsualqcAMNz oAYfZu+r3Vu3QARHcqt3n8H3UnbcyYxVlAB3seXZU3LkQhKYnO60QrHzJsGO4pXKklH1YYOpejU u X-Google-Smtp-Source: AGHT+IElLsSjvElF2qNR+EDaQMrF6EoirLU7rCR/THkONc3tstOEx2T9+EaQ1ce4ezkwyEMa0wfgnA== X-Received: by 2002:a17:907:7b88:b0:a9e:441c:f74d with SMTP id a640c23a62f3a-a9eefee456bmr320848366b.16.1731095914232; Fri, 08 Nov 2024 11:58:34 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH 07/10] x86/mach-apic: Drop check_apicid_present() Date: Fri, 8 Nov 2024 19:58:17 +0000 Message-Id: <20241108195820.789716-8-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 It's an unnecessary wrapper. It's also the only reason that smpboot.c includes mach_apic.h, other than for transitive dependencies. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/include/asm/mach-generic/mach_apic.h | 5 ----- xen/arch/x86/smpboot.c | 6 ++++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x86/include/asm/mach-generic/mach_apic.h index c8e0637f4424..7940c0234cb9 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -45,11 +45,6 @@ static inline int multi_timer_check(int apic, int irq) * really not sure why, since all local APICs should have distinct physical * IDs, and we need to know what they are. */ -static inline int check_apicid_present(int apicid) -{ - return physid_isset(apicid, phys_cpu_present_map); -} - static inline void set_apicid(int phys_apicid, physid_mask_t *map) { physid_set(phys_apicid, *map); diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index 9e79c1a6d6e6..42272a9844fa 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -20,6 +20,9 @@ #include #include #include + +#include +#include #include #include #include @@ -37,7 +40,6 @@ #include #include #include -#include unsigned long __read_mostly trampoline_phys; enum ap_boot_method __read_mostly ap_boot_method = AP_BOOT_NORMAL; @@ -1193,7 +1195,7 @@ void __init smp_prepare_cpus(void) * CPU too, but we do it for the sake of robustness anyway. * Makes no sense to do this check in clustered apic mode, so skip it */ - if ( !check_apicid_present(boot_cpu_physical_apicid) ) + if ( !physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map) ) { printk("weird, boot CPU (#%d) not listed by the BIOS.\n", boot_cpu_physical_apicid); From patchwork Fri Nov 8 19:58:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13868903 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 42A0ED64089 for ; Fri, 8 Nov 2024 19:58:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.832781.1248141 (Exim 4.92) (envelope-from ) id 1t9V7y-0002Bs-Nd; Fri, 08 Nov 2024 19:58:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 832781.1248141; Fri, 08 Nov 2024 19:58:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7y-0002AJ-Fm; Fri, 08 Nov 2024 19:58:42 +0000 Received: by outflank-mailman (input) for mailman id 832781; Fri, 08 Nov 2024 19:58:41 +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 1t9V7x-0008TY-Kt for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:41 +0000 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [2a00:1450:4864:20::634]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d778e7c9-9e0b-11ef-99a3-01e77a169b0f; Fri, 08 Nov 2024 20:58:37 +0100 (CET) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a9e44654ae3so347762166b.1 for ; Fri, 08 Nov 2024 11:58:37 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:34 -0800 (PST) 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: d778e7c9-9e0b-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzQiLCJoZWxvIjoibWFpbC1lajEteDYzNC5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ3NzhlN2M5LTllMGItMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxMDk1OTE3LjAyODE1Niwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095916; x=1731700716; 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=LUt6z7qotJTk+Jtsld6eOnMm4y4nkKlOfdMmgeqNQZs=; b=Xi2dX2gZJ1GAsaWPr8BLEA0xQkvRjtKRXZlhoVTTGzoiMCvfpePGJ8/WcPvAsC7dzo q0y9OEk8gasGS9a+2P+hnWJG4wrxwxNHQKr8DD61OmtsdJ2T0ZH+X/8lpy2qYWRb9P+N AYpis9D7Vr/HrpSWsdOMU0Zl5JC1zyT1FUfg8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095916; x=1731700716; 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=LUt6z7qotJTk+Jtsld6eOnMm4y4nkKlOfdMmgeqNQZs=; b=D9AjKbq364Y4rKuyjLn/xbuyI+ro6pW413q4DeUm1a8B3cwtVkrp0XF2Yb4GZCS7Vs S0g9DHlMxwrDyrANuJ2GUOu1R59DI6VlnImninsqX5a9HsAiWHpPrDTwgF3A1vpV81HD 7qUG+eff982esReUcLLCASDddye7r23QxcQHMVNWWtaVX7Mje84Nv8wJmEuElHaQAqhU 5ko5PvjHRy2v+CxuXO1b+ogWS7YXLp28El3Eb8uBBKRJrlGZ50XS1QXPyarL4kp+DP6K abRGuBPPYh5CFxjrnFd/1o/VdiGsXTNXsUrcO03SFgUzfS/5TDydFBE2t1TUw5JVK35o 9bcg== X-Gm-Message-State: AOJu0Yym8ds47TbGUJT0RnhlyPGAGf7BSWZMYDgGqqmI/ibmJAAzOFFz hD1ZesImncxSxSgJHToQII+6NUf9P1pIYlgUTUN8sdF+g6ZzV7EZCoZ/pGyw0LO0BG/YSY2ixG/ 4 X-Google-Smtp-Source: AGHT+IHcM9/g6UuN1NPBnHBdf2XO8eZElhhw83hxBGhwOm+YwzANwjNhHUrnnEvFQvs3nJMuqWdMug== X-Received: by 2002:a17:907:9288:b0:a9a:10c9:f4b8 with SMTP id a640c23a62f3a-a9ef0040b8amr345801966b.61.1731095915662; Fri, 08 Nov 2024 11:58:35 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH 08/10] x86/mach-apic: Drop set_apicid() Date: Fri, 8 Nov 2024 19:58:18 +0000 Message-Id: <20241108195820.789716-9-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 It's an unnecessary wrapper, and longer than the operation it wraps. It's also the only reason that mpparse.c includes mach_apic.h, other than for transitive dependencies. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/include/asm/mach-generic/mach_apic.h | 11 ----------- xen/arch/x86/io_apic.c | 4 ++-- xen/arch/x86/mpparse.c | 7 ++++--- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x86/include/asm/mach-generic/mach_apic.h index 7940c0234cb9..b4a2f0a0b068 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -39,15 +39,4 @@ static inline int multi_timer_check(int apic, int irq) return 0; } -/* - * The following functions based around phys_cpu_present_map are disabled in - * some i386 Linux subarchitectures, and in x86_64 'cluster' genapic mode. I'm - * really not sure why, since all local APICs should have distinct physical - * IDs, and we need to know what they are. - */ -static inline void set_apicid(int phys_apicid, physid_mask_t *map) -{ - physid_set(phys_apicid, *map); -} - #endif /* __ASM_MACH_APIC_H */ diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 5a4d8597e07a..2774cd45c091 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1537,7 +1537,7 @@ static void __init setup_ioapic_ids_from_mpc(void) "phys_id_present_map\n", mp_ioapics[apic].mpc_apicid); } - set_apicid(mp_ioapics[apic].mpc_apicid, &phys_id_present_map); + physid_set(mp_ioapics[apic].mpc_apicid, phys_id_present_map); /* * We need to adjust the IRQ routing table @@ -2270,7 +2270,7 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id) apic_id = i; } - set_apicid(apic_id, &apic_id_map); + physid_set(apic_id, apic_id_map); if (reg_00.bits.ID != apic_id) { reg_00.bits.ID = apic_id; diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c index e13b83bbe9dd..b16c105b18bf 100644 --- a/xen/arch/x86/mpparse.c +++ b/xen/arch/x86/mpparse.c @@ -20,8 +20,10 @@ #include #include #include - #include + +#include +#include #include #include #include @@ -29,7 +31,6 @@ #include #include -#include #include /* Have we found an MP table */ @@ -161,7 +162,7 @@ static int MP_processor_info_x(struct mpc_config_processor *m, } apic_version[apicid] = ver; - set_apicid(apicid, &phys_cpu_present_map); + physid_set(apicid, phys_cpu_present_map); if (num_processors >= nr_cpu_ids) { printk_once(XENLOG_WARNING From patchwork Fri Nov 8 19:58:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13868896 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 D13C4D64089 for ; Fri, 8 Nov 2024 19:58:49 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.832780.1248136 (Exim 4.92) (envelope-from ) id 1t9V7y-00027w-8N; Fri, 08 Nov 2024 19:58:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 832780.1248136; Fri, 08 Nov 2024 19:58:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7y-00027h-4N; Fri, 08 Nov 2024 19:58:42 +0000 Received: by outflank-mailman (input) for mailman id 832780; Fri, 08 Nov 2024 19:58:40 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7w-0008TS-Sr for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:40 +0000 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [2a00:1450:4864:20::629]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d86dd1cd-9e0b-11ef-a0c6-8be0dac302b0; Fri, 08 Nov 2024 20:58:38 +0100 (CET) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a9ed7d8c86cso445809066b.2 for ; Fri, 08 Nov 2024 11:58:38 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:35 -0800 (PST) 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: d86dd1cd-9e0b-11ef-a0c6-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MjkiLCJoZWxvIjoibWFpbC1lajEteDYyOS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ4NmRkMWNkLTllMGItMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxMDk1OTE4LjYxNzMzNywic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095916; x=1731700716; 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=y8X0HqMtDZiLrdBUx5d/OQYZukjUCR6KuzOBHabB77Y=; b=Gxxqe+rPQ60TkUJkNTPX1HrJyZVk4w1gSNN6R12jipRhZwDH/w5Ijm5L/n0xlpJmxx EmVxur2p8NSN8eS8WEOIrKqwhPL8vnFrF1s6wvnDR4wKOPzhj/QmJIfVjB7qlu03JpLN 75/bot+PFuDUo+xaeKoPv3WhC8HFjH1GPosF0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095916; x=1731700716; 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=y8X0HqMtDZiLrdBUx5d/OQYZukjUCR6KuzOBHabB77Y=; b=HJcBAihf+poLj1CwfhSwgMmnNyOE3LiyT/twd2vWNCtPP6nCcWxb8vPeSsRhU6BoEz i92DhyUiCZiDm8yw1siqlkTGTLePAd6OOlpUeIkLXKBuL2UlmoOnJw3IreRig8VonrGM FQBNMQfSCmmP1lZRbba++Ag3Pbb5qxERSoy2Q2HeyK1mO2k7rUMFUiysDV4sYevNITW5 c89xDpxQXdptzF4BByXf2KLugN9IfWYEjhiuqht6EusdpB40FiSth772yILRH5npeeNn 7IXM+c5FnASnq/vo5zikEL4+8g33FOgYN1zffuxo9XY1T6iycyWxzULpH7hAjHXFI+aC acxA== X-Gm-Message-State: AOJu0Yy1kOALwWuXOI4NmGXCx1azN7V+dGeK+PMdY2gC3JLdb8e+aqCQ 1ERWGQ8rPPoCs8EWhaLzq1lFmhsfkjAr0MsBzLZqy5gyEg7R6/HcuHLiw/ax56WcDPrVhechFfL d X-Google-Smtp-Source: AGHT+IGIq/AzlAScjGBIlnMvhuRaeruqGMKX3YDhzKpMJQ1Cd05P4q9EtKkfOePceh4UoLnR/A0Baw== X-Received: by 2002:a17:907:3d9f:b0:a9a:6633:3a90 with SMTP id a640c23a62f3a-a9eefeb157bmr395505966b.8.1731095916338; Fri, 08 Nov 2024 11:58:36 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH 09/10] x86/mach-apic: Move the genapic wrappers to genapic.h Date: Fri, 8 Nov 2024 19:58:19 +0000 Message-Id: <20241108195820.789716-10-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 This a better place for them to live. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/include/asm/genapic.h | 17 +++++++++++++++++ .../x86/include/asm/mach-generic/mach_apic.h | 18 ------------------ xen/arch/x86/irq.c | 6 +++++- xen/arch/x86/msi.c | 6 +++++- 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/xen/arch/x86/include/asm/genapic.h b/xen/arch/x86/include/asm/genapic.h index 6c8845d17d27..cf36d48f3b07 100644 --- a/xen/arch/x86/include/asm/genapic.h +++ b/xen/arch/x86/include/asm/genapic.h @@ -37,6 +37,23 @@ struct genapic { .name = aname, \ .probe = aprobe +#define INT_DELIVERY_MODE (genapic.int_delivery_mode) +#define INT_DEST_MODE (genapic.int_dest_mode) +#define TARGET_CPUS ((const typeof(cpu_online_map) *)&cpu_online_map) +#define init_apic_ldr() alternative_vcall(genapic.init_apic_ldr) +#define cpu_mask_to_apicid(mask) ({ \ + /* \ + * There are a number of places where the address of a local variable \ + * gets passed here. The use of ?: in alternative_call() triggers an \ + * "address of ... is always true" warning in such a case with at least \ + * gcc 7 and 8. Hence the seemingly pointless local variable here. \ + */ \ + const cpumask_t *m_ = (mask); \ + alternative_call(genapic.cpu_mask_to_apicid, m_); \ +}) +#define vector_allocation_cpumask(cpu) \ + alternative_call(genapic.vector_allocation_cpumask, cpu) + extern struct genapic genapic; extern const struct genapic apic_default; extern const struct genapic apic_bigsmp; diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x86/include/asm/mach-generic/mach_apic.h index b4a2f0a0b068..3e17c271d9ac 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -6,24 +6,6 @@ #include #include -/* The following are dependent on APIC delivery mode (logical vs. physical). */ -#define INT_DELIVERY_MODE (genapic.int_delivery_mode) -#define INT_DEST_MODE (genapic.int_dest_mode) -#define TARGET_CPUS ((const typeof(cpu_online_map) *)&cpu_online_map) -#define init_apic_ldr() alternative_vcall(genapic.init_apic_ldr) -#define cpu_mask_to_apicid(mask) ({ \ - /* \ - * There are a number of places where the address of a local variable \ - * gets passed here. The use of ?: in alternative_call() triggers an \ - * "address of ... is always true" warning in such a case with at least \ - * gcc 7 and 8. Hence the seemingly pointless local variable here. \ - */ \ - const cpumask_t *m_ = (mask); \ - alternative_call(genapic.cpu_mask_to_apicid, m_); \ -}) -#define vector_allocation_cpumask(cpu) \ - alternative_call(genapic.vector_allocation_cpumask, cpu) - static inline void enable_apic_mode(void) { /* Not needed for modern ES7000 which boot in Virtual Wire mode. */ diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 0001e93ba8ac..6340cd6dd73d 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -21,10 +21,14 @@ #include #include #include + +#include +#include +#include #include #include #include -#include + #include #include diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index 677fd83218d4..68d6e25178a9 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -21,13 +21,17 @@ #include #include #include + +#include +#include #include +#include #include #include #include #include #include -#include + #include #include #include From patchwork Fri Nov 8 19:58:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13868902 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 E9AA2D64085 for ; Fri, 8 Nov 2024 19:58:55 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.832783.1248156 (Exim 4.92) (envelope-from ) id 1t9V81-0002kT-5U; Fri, 08 Nov 2024 19:58:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 832783.1248156; Fri, 08 Nov 2024 19:58:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V80-0002kA-W5; Fri, 08 Nov 2024 19:58:44 +0000 Received: by outflank-mailman (input) for mailman id 832783; Fri, 08 Nov 2024 19:58:43 +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 1t9V7z-0008TY-60 for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:43 +0000 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [2a00:1450:4864:20::633]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d92719ef-9e0b-11ef-99a3-01e77a169b0f; Fri, 08 Nov 2024 20:58:39 +0100 (CET) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a9e8522445dso428872266b.1 for ; Fri, 08 Nov 2024 11:58:39 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:36 -0800 (PST) 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: d92719ef-9e0b-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzMiLCJoZWxvIjoibWFpbC1lajEteDYzMy5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ5MjcxOWVmLTllMGItMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxMDk1OTE5Ljg3MjY1NSwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095919; x=1731700719; 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=V7/2tyrjO+foQHdsyFkn3cPeL3RHFRZuXllVwsi5Vtc=; b=CkARgPquSLI8bUur+u8lLxcr6PPOnZ8vFsAupUvc40a2okHHbS84epkYTOJqC9sbwV xNV+vu/ZXQh4zWM/BF9NmB6QN5OjwZQdvCHYni7CJtLyIFTs0T9yar8nKTuvFEy5muhA HC1z3b6ptTx3POuJQiwW3W6ll4cafkJ2tHULo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095919; x=1731700719; 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=V7/2tyrjO+foQHdsyFkn3cPeL3RHFRZuXllVwsi5Vtc=; b=Zgj0arYIocY9j+P2DZ5HiCor8FCrAAGLMMcRD7wLEVM5CC/vIrf6rUudi/Sl+FtOhb tm+F2nxv1UI9CV3S6f6H5AOBEUKyyI5H4IzaO1SW/Q7sW9xOWxKCYBCHByNezCQr2wX5 BZhdkL9yK44hrwuadhZaEEJOXxQY4YUDc7QmdYRs8eS9DKObiuJw+ndhEcw/tsFQ4eJM 1chhH47jMIvCfQINhIP8ycCbSajTahHAqFQUGaNldDdocfss6asVS8FmQ12a9IX2d7m9 cY/KWbd+pD2F034EC5E7NjRst8aU/N4W1b8HcEC4MlMvBN+Ag8ZOjbPbbhNFm4rxnfGF Krsg== X-Gm-Message-State: AOJu0YxNPI6jwBf0v4AkhX8reGFkIRbZXXqM3ajYPXT8Hopa69zSAFHN 1GgCp7lC/a8WtIA/eOpamn7U0szzXWiMAK+LS/fEUWZZUTCzXUbX1ffu+8DRlZJvzMS/mJFzAUh 6 X-Google-Smtp-Source: AGHT+IH/oI66KdDWXrvpJYzMBjtAQSbLS30PUxc/CQOomyFvs4Uyw/JRJcbEoLqDDY/Ktm/JcrdwtA== X-Received: by 2002:a17:906:dc8a:b0:a9e:b090:e65d with SMTP id a640c23a62f3a-a9eeff383eemr334778266b.32.1731095918858; Fri, 08 Nov 2024 11:58:38 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Subject: [PATCH 10/10] x86: Delete mach_apic.h Date: Fri, 8 Nov 2024 19:58:20 +0000 Message-Id: <20241108195820.789716-11-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 All useful content has been moved elsewhere. Clean up the dregs, and remove the entire mach-generic include path. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/apic.c | 4 ++-- xen/arch/x86/arch.mk | 1 - .../x86/include/asm/mach-generic/mach_apic.h | 24 ------------------- xen/arch/x86/io_apic.c | 15 +++++------- 4 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 xen/arch/x86/include/asm/mach-generic/mach_apic.h diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 9f3a374e9581..8f192f80b852 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -35,7 +35,8 @@ #include #include #include -#include +#include + #include #include #include @@ -230,7 +231,6 @@ void __init connect_bsp_APIC(void) } printk("Enabling APIC mode. Using %d I/O APICs\n", nr_ioapics); - enable_apic_mode(); } void disconnect_bsp_APIC(int virt_wire_setup) diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 1460ecf30b9a..8f8aeda679d8 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -3,7 +3,6 @@ export XEN_IMG_OFFSET := 0x200000 -CFLAGS += -I$(srctree)/arch/x86/include/asm/mach-generic CFLAGS += -I$(srctree)/arch/x86/include/asm/mach-default CFLAGS += -DXEN_IMG_OFFSET=$(XEN_IMG_OFFSET) diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x86/include/asm/mach-generic/mach_apic.h deleted file mode 100644 index 3e17c271d9ac..000000000000 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __ASM_MACH_APIC_H -#define __ASM_MACH_APIC_H - -#include -#include -#include -#include - -static inline void enable_apic_mode(void) -{ - /* Not needed for modern ES7000 which boot in Virtual Wire mode. */ - /*es7000_sw_apic();*/ -} - -#define apicid_to_node(apicid) ((int)apicid_to_node[(u32)apicid]) - -extern u32 bios_cpu_apicid[]; - -static inline int multi_timer_check(int apic, int irq) -{ - return 0; -} - -#endif /* __ASM_MACH_APIC_H */ diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 2774cd45c091..13daebc10a97 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -31,13 +31,16 @@ #include #include +#include +#include #include +#include #include #include #include #include #include -#include + #include #include #include @@ -1104,14 +1107,8 @@ static void __init setup_IO_APIC_irqs(void) } irq = pin_2_irq(idx, apic, pin); - /* - * skip adding the timer int on secondary nodes, which causes - * a small but painful rift in the time-space continuum - */ - if (multi_timer_check(apic, irq)) - continue; - else - add_pin_to_irq(irq, apic, pin); + + add_pin_to_irq(irq, apic, pin); if (!IO_APIC_IRQ(irq)) continue;