From patchwork Fri Apr 19 12:57:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paluri, PavanKumar" X-Patchwork-Id: 13636350 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2056.outbound.protection.outlook.com [40.107.92.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E37BA4D137 for ; Fri, 19 Apr 2024 12:58:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713531513; cv=fail; b=JFhFXDAXAtsAqUFQEBsDIunAs6+pV8tf8SqgPA7/OMsLH668fABSV5w6Flhm8veJ3b276TWE6ypS4M7/zx4B5vbMNzeyVcZKy3snEbwf190zjPooJ03h9uup8gwWFQwpVDQnCdUa4xPoq2s9BBYO+q9wUSp8fNdGFO6wi1qAlPI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713531513; c=relaxed/simple; bh=MWPkL+iS0ocZhF6WRsVQ1ADM9sE4GrWZr6LPROuR94I=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=g2e2HBPq9fAKpxP9XV0PJASJX+fFl4FMQ1tDOkfuJL2Ik14i5dZ8ffg077iWRdGbC54Aeg5jxqhSGJsfHo8mcvmIU6k6SSafc8SjzgjSooYIQcFb+HP9CMid7c7XqZ/PC4NzBy7C+uKVtHT3Wvw0Af/slwNADJrUSklUYNHJeYQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=BKMx1iiV; arc=fail smtp.client-ip=40.107.92.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="BKMx1iiV" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bTGHOL+pvVR7RT/cW9nTEfA8A0sM+cK9yGhDJzHuKW47CB1KZ02BnWId6MVPMACDZoVl3yGy4QMCdUV1JX+l27F7cvVLAfIiSeBqykvrOttajBcrfENN1xm3bkZM5ru1CgR4Th2DdTpq4mkuZUfNp8UfXAgJ6iRlO3FEAGIsgr2VbUKK8E5A4BNusQCFaw8AB8xPa/KP4CSPI0kXDr32fFwobtmb62tc0hkDOOvo2IsRDwvOd88Ah3xJmMIvtuZMZJZbmPFx1jUQYB7WVMb+iZjmdYvlFheBlAsZXp75VSirNvrfbBhfhnhqJF/opWbxjbUjhXChZJnC8jffhOaTwg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LlgVMKaLpMaWyncrPGC59yU6ro+G1mB5s3dSNKwkVXk=; b=ktgmHaXNOwjbsqrBR2xMt/NYbqY4oZ+qQu1V+SYJXzHcZ8gWGTEfNSaoDnVpy41Rrs4O1TGoQKNmZJat+aYN3Cy9W36G1/nQFEZGNdsUHs05wkF0o4/XTwlqLsf/jT5lrMMj6LqabjEgPzRhV3pzyHroALVDKCbPHa+MHIjREfMWPJiypDtFVnFjLvilMDBLczkl2GMb5Pc9dcTBwBJ/2XX8GM9yLjtM0Q2kZN8VFpfbWfnv6pTyFULzBL5pFnmZ6spqKyKofNkhpG8ROsywGxTn9AMp/PXNOTKFbm2quWke3K0mBeKk/88jmixPJ4SPheBdGIYYUb2qU8UT9fj5XA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LlgVMKaLpMaWyncrPGC59yU6ro+G1mB5s3dSNKwkVXk=; b=BKMx1iiV3SjJeYe7l/waf6I+gfQS9Ng/CU5ZRVi90LF8RGzFfz/t21/P5boE7ygkil0bSN2jhlhGTunXdmz4hdtZxMGq5SZuNR+v0FCOqPywCPDA3y0FwCryHz4Okvba4rgPzS3U9+eh+E63XbrBUqbGiYhP7oBM1vrRA+/2eL4= Received: from SA0PR12CA0015.namprd12.prod.outlook.com (2603:10b6:806:6f::20) by PH7PR12MB8828.namprd12.prod.outlook.com (2603:10b6:510:26b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.43; Fri, 19 Apr 2024 12:58:25 +0000 Received: from SN1PEPF00036F3F.namprd05.prod.outlook.com (2603:10b6:806:6f:cafe::cb) by SA0PR12CA0015.outlook.office365.com (2603:10b6:806:6f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.30 via Frontend Transport; Fri, 19 Apr 2024 12:58:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF00036F3F.mail.protection.outlook.com (10.167.248.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7452.22 via Frontend Transport; Fri, 19 Apr 2024 12:58:25 +0000 Received: from ethanolx16dchost.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 19 Apr 2024 07:58:24 -0500 From: Pavan Kumar Paluri To: CC: Paolo Bonzini , Sean Christophersen , Michael Roth , Tom Lendacky , Pavan Kumar Paluri , "Kim Phillips" , Vasant Karasulli Subject: [kvm-unit-tests RFC PATCH 01/13] x86/apic: Include asm/io.h and use those definitions to avoid duplication Date: Fri, 19 Apr 2024 07:57:47 -0500 Message-ID: <20240419125759.242870-2-papaluri@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240419125759.242870-1-papaluri@amd.com> References: <20240419125759.242870-1-papaluri@amd.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00036F3F:EE_|PH7PR12MB8828:EE_ X-MS-Office365-Filtering-Correlation-Id: c3b168c2-d954-4263-385d-08dc607066ae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nzXLRBt99XC4YyW7lh0CGMECXWgQNiuT7byzWd5dJ4NCmWdi1pa701LHalB80IoAhZdijKLowRyr59VOhekMv3puAYFRCHtLCOGAiwhGt0tKf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50TVCzFJ+4WD7rxiEx/XTXQ/ui0mSvtVcTHbZ1Q9fxEHevFVQ3C8CS+C0jnUsWg3iKTvD/ObTy99IOuwHWS9oo7WRk25ycHjsX+FUiqDgVmHkKQ5k8pzroAmMusAH37JfwRlsJvIkyTf4jEUhyZkANfhmf7CPf5c9gO2gCppBjSdunCkakNHzQtwTdus/eNkPvPwiSmhC0= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(36860700004)(82310400014)(376005)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2024 12:58:25.3658 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3b168c2-d954-4263-385d-08dc607066ae X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF00036F3F.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8828 To avoid duplication, use outb() definition from asm/io.h. No functional change has been introduced in this patch. Signed-off-by: Pavan Kumar Paluri --- lib/x86/apic.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/x86/apic.c b/lib/x86/apic.c index 0d15147677dd..ed22820784cf 100644 --- a/lib/x86/apic.c +++ b/lib/x86/apic.c @@ -4,6 +4,7 @@ #include "processor.h" #include "smp.h" #include "asm/barrier.h" +#include "asm/io.h" /* xAPIC and I/O APIC are identify mapped, and never relocated. */ static void *g_apic = (void *)APIC_DEFAULT_PHYS_BASE; @@ -23,11 +24,6 @@ static struct apic_ops *get_apic_ops(void) return this_cpu_read_apic_ops(); } -static void outb(unsigned char data, unsigned short port) -{ - asm volatile ("out %0, %1" : : "a"(data), "d"(port)); -} - void eoi(void) { apic_write(APIC_EOI, 0);