Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp441574lqt; Mon, 18 Mar 2024 12:14:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX5Vn2yp7zN8aF+ycegAp4BTBeNFmcx1wxIAuqMay85jQyIe62b3eY1R0Hh0QfdXjOiX381Ltpgg0nymEAmwXuwrn5bfqWqbh8gffXImA== X-Google-Smtp-Source: AGHT+IHNAN+RpFu6qRfrofSBLRMNky7y+tgqUlcKXj/NqKcuTN4sYqliGiE/Eva06FHqRRpVovHt X-Received: by 2002:a05:6a20:1e56:b0:1a3:6f66:5c88 with SMTP id cy22-20020a056a201e5600b001a36f665c88mr895782pzb.14.1710789272258; Mon, 18 Mar 2024 12:14:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710789272; cv=pass; d=google.com; s=arc-20160816; b=mZzzp2OEIINGlJDipXvMAd++Fny0habt5wBh6/2RG87ulKgi2u9YjpUMiHYxdJLOuT cOkxa1Yk3lmbZgzbXEdeuvv/cvr43n7jjleny88Q+XHDkgDNQ7MGnH6lBivIwTdqY8Zp roI0Aqwffv7mEC0fNd0B+0IJo0+Gvr9a+QgViVUiTz91Fctr1AgESp+kRPw+e6oe4r+w 6gmnoOJIMMpni4nOlNOy4bD7JgpzjhPjB+92gQ6+xWTTpxBNPFZ9UjQf0Ybin3zfHTNv W2qP+fZtfXTu9UBKYW0OXEnXL7yP6W5k8/TiNS1thAI81LnaBMf2KqtOBNLav04E0YK/ PkSQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Kx4sCSV1ia6WT0Nl13P2XVmZMbyftmVwDB4C3GdXgi8=; fh=U8b6s1KBivChBrzOjSChr/OrSV0QBxvtxXCCRcQP5rk=; b=C1UrbaQsNCVwQp5ANecji+mZJnFpc7rm1Hn4rlCRrOTL9CiPoAwZMJaDJDHpJAZSWX NuZfM4jjxeOBzKvBISBpxt1Tx9fYIv7QccE9Gky9mzMDi+0uYpUyP8ElhqWeqgpKpXTF 8TeSAbl7HGjoiPTrwyggipT9XlPSodMYxXweOwrV82BK0Ili//VYLR4AE9+qNNLr7L8m 52fG/72NS9KoiZXRi9dlvVi5BZLAFe6wlm6Cb3etcuU5dNyf/N6snrUodIXVDgeaH9pE 8NEfaatUnZsSGmQDlMrKP82i6DlRuwi5dhyfJp7SR5MqJqU8oLlbdMtonx0jB2x7EFFr cAeg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rjwysocki.net header.s=dkim header.b=YxNpQkjr; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net dkim=pass dkdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-106557-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106557-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c11-20020a65674b000000b005cdf992367dsi9157673pgu.730.2024.03.18.12.14.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 12:14:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106557-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@rjwysocki.net header.s=dkim header.b=YxNpQkjr; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net dkim=pass dkdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-106557-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106557-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E52DC284858 for ; Mon, 18 Mar 2024 19:13:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EE18F57884; Mon, 18 Mar 2024 19:12:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b="YxNpQkjr" Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (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 A436D57881 for ; Mon, 18 Mar 2024 19:12:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.96.170.134 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710789171; cv=none; b=RwI7K9rBFQwYb+6Z/GH92Xc7UbQSloAahtXGl/nIEeNsEQ5BQkP1vsUEoxrKgqFxk0fXKyI9J6KfKvwJ8NWc6ONvydaNyJS6DlXfaf8nLZBuyF7qb381GlUhbH/CAufjEYosWdJzLRbvbMTsGHelthPJdq+UucT3dsPGmfQtMJ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710789171; c=relaxed/simple; bh=BRzAVB64xba4LajsrQesEnO3VNhDC6VLDMobsb0exZQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=OwzfGG9xkP2F7S/X4QsyjbMNBpKcydQfdY0qVy/N/NWOwIxm6a9cFxjt3K7XAKOaoHlUI+JFPQ3MARGDY/X+PAV7dBAN6u1OZLSKJyNlDs4xaYNTN7MsfCWAGWPyyf+Dp7z7+K5yJYTaYQcWEDC9dqc09wU4LaZWTkHUadKD2Jg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net; spf=pass smtp.mailfrom=rjwysocki.net; dkim=pass (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b=YxNpQkjr; arc=none smtp.client-ip=79.96.170.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.4.0) id 088c641c652891ff; Mon, 18 Mar 2024 19:12:46 +0100 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cloudserver094114.home.pl (Postfix) with ESMTPSA id 1DB7C66B492; Mon, 18 Mar 2024 19:12:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rjwysocki.net; s=dkim; t=1710785566; bh=BRzAVB64xba4LajsrQesEnO3VNhDC6VLDMobsb0exZQ=; h=From:To:Cc:Subject:Date; b=YxNpQkjrXnpoUqSEXOE1pYdXAuD1eQ2+smUsMNnvoMUI7DNIsnJRQKXsFlxCnWi4K cRBc5EzWHw2jrZoWn57APymPLEe3h8ZIiBc2lUGN/hz/f8R29J1Dm5L8OpRKS1tP8e INWnYGp2rlJU640mbMeplMPO2tFiaE63LL7xC2lGM7+VH7l/F4d/THjpaeSPbc3EbU TtJYkoHnUMo8gJFl0ORtj46Cxr9JpX66Sos4vEVsfRhJEZvBJkRqCAOEKvx+b7/8a2 ALnQDp49YVVOrtnaWgUPwFnZJNiDTfC3auTGNVJtyXKvCnpcktanee2g2ozDpxq4XR 0Ou9r4YtYztAA== From: "Rafael J. Wysocki" To: x86 Maintainers Cc: LKML , "Rafael J. Wysocki" , Thomas Gleixner , Dave Hansen , Borislav Petkov Subject: [PATCH v1] arch: x86: kernel: Remove leftover contents of topology.c Date: Mon, 18 Mar 2024 19:12:45 +0100 Message-ID: <12422874.O9o76ZdvQC@kreacher> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrkeejgdduuddtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepffffffekgfehheffleetieevfeefvefhleetjedvvdeijeejledvieehueevueffnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepiedprhgtphhtthhopeigkeeisehkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehrrghfrggvlheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepthhglhigsehlihhnuhhtrhhonhhigidruggvpdhrtghpthhtohepuggrvhgvrdhhrghnshgvnheslhhinhhugidrihhnthgvlhdr tghomhdprhgtphhtthhopegsphesrghlihgvnhekrdguvg X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 From: Rafael J. Wysocki The only useful piece of arch/x86/kernel/topology.c is the definition of arch_cpu_is_hotpluggable() that can be moved elsewhere (other architectures tend to put it into setup.c), so do that and delete the rest of the file. Signed-off-by: Rafael J. Wysocki --- arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/setup.c | 8 ++++++++ arch/x86/kernel/topology.c | 43 ------------------------------------------- 3 files changed, 9 insertions(+), 44 deletions(-) Index: linux-pm/arch/x86/kernel/setup.c =================================================================== --- linux-pm.orig/arch/x86/kernel/setup.c +++ linux-pm/arch/x86/kernel/setup.c @@ -7,6 +7,7 @@ */ #include #include +#include #include #include #include @@ -1222,3 +1223,10 @@ static int __init register_kernel_offset return 0; } __initcall(register_kernel_offset_dumper); + +#ifdef CONFIG_HOTPLUG_CPU +bool arch_cpu_is_hotpluggable(int cpu) +{ + return cpu > 0; +} +#endif /* CONFIG_HOTPLUG_CPU */ Index: linux-pm/arch/x86/kernel/topology.c =================================================================== --- linux-pm.orig/arch/x86/kernel/topology.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Populate sysfs with topology information - * - * Written by: Matthew Dobson, IBM Corporation - * Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL - * - * Copyright (C) 2002, IBM Corp. - * - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or - * NON INFRINGEMENT. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Send feedback to - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CONFIG_HOTPLUG_CPU -bool arch_cpu_is_hotpluggable(int cpu) -{ - return cpu > 0; -} -#endif /* CONFIG_HOTPLUG_CPU */ Index: linux-pm/arch/x86/kernel/Makefile =================================================================== --- linux-pm.orig/arch/x86/kernel/Makefile +++ linux-pm/arch/x86/kernel/Makefile @@ -60,7 +60,7 @@ obj-$(CONFIG_X86_64) += sys_x86_64.o obj-$(CONFIG_X86_ESPFIX64) += espfix_64.o obj-$(CONFIG_SYSFS) += ksysfs.o obj-y += bootflag.o e820.o -obj-y += pci-dma.o quirks.o topology.o kdebugfs.o +obj-y += pci-dma.o quirks.o kdebugfs.o obj-y += alternative.o i8253.o hw_breakpoint.o obj-y += tsc.o tsc_msr.o io_delay.o rtc.o obj-y += resource.o