From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E03D321504D for ; Thu, 23 Jan 2025 19:08:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737659301; cv=none; b=Ob5gkqWml3o7skZKiqOCgQMsHopmyhvgE+kjCcXFq9db3ILY9EVk9kSzaecK7VaD6RePAxLNekUUZY47xQUQzPUNHr2pkoeBDeVjU47qA2P3NM73b4ScsFRI19I/jDEwCfL8Wl4Z5JN4/9SCHUzm+BN7WGr3S/3lwNxOhuK7nVs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737659301; c=relaxed/simple; bh=TLLboa2onWAvydbiY/60N73N8Tj4Oda2dgjE0GX3TmU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AU6rt8Td9OukCG1vytWA8/EtymQAH19jknWA079fvBPHzVQlRwfbv9Tqv1K31vnhpdSp0KqIxHssRtI3tPyJvFtscizlczX01xCcykqbetq1q8heNPhIW9lW5xjwCDypHTBh8Tz3gbIkBn9uha3ZTW5ZZiz57ljjsFrWiCJgWP4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YD6sr0Rq; arc=none smtp.client-ip=209.85.222.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YD6sr0Rq" Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-7b702c3c021so120909485a.3 for ; Thu, 23 Jan 2025 11:08:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737659297; x=1738264097; darn=vger.kernel.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=Zt49qJ5WRNR5SppLzjPbVJiksJr5LusnDD+5sHwzSGo=; b=YD6sr0Rq3Vehozt2Wg1Gg56mltC6IMX9T3MfQI3Xe1Ene4/UgjQFfxa6lKn3dkI8p1 dsXFoyY+KgWx73+A2l6a/nH3HXK2/EtmiKhNbNcg48ftfnAfDPllDxNWGD5YhivEfzp6 rTkbAPzSLkjkH2lZv+pgNRyvJHeybyIzARm5fjsrx+F+t2drnDpA5uPMCTwe7UI6KlLA o4Uu3vu6/o+635WcV+wzULCUfioiKpUA1zPZToyNSaDF4jMpDc8UNK0GbUA6QbkM0dFq 8g0WubhgOL7jkU6erCp0uEEO4S3cj+Y6nMDqXt/PywQjRnQx7QcYmtcoZPgXywO3rPwP pSoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737659297; x=1738264097; 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=Zt49qJ5WRNR5SppLzjPbVJiksJr5LusnDD+5sHwzSGo=; b=e3IDVrWH30eHItlP3okX6aV3WETv49/65r7EoRXM3bb1j7DB62sljtk8KD8dj5XwX7 ZKTxwT/leXE9KgjWALY6Oyto4bOGNJ632tEg7pPFAW9U44/1XHXmiNPbfdyWooHBQz4m 14UdelJc3356HHsDvn9lXqOmulqVZ77QH2wwSIiF80WLqrMLDYsnwHJq4Pb3TeoOgG8O S1B6tDK8I/qofJRu0eBJaiGwDe8/cAy+ddz/G7KneKqytGj6Hd8tmvQnXrQIbHfyKejw pV//Gt/PerC24Kop7wXYdmuO+9dWnwr2io8M34DQ+BsWjEFlc4c8mL4/YvticrrfjCYW Uv6g== X-Gm-Message-State: AOJu0Yzhw1Osg1w8vJzMgNsvkXKZaIGl+xX9sGzDB4a8xSr8EaCPsD9c 56+4e1SzMYPWUkUYk+j0YyzN4elRZ3SyB6LfQetQmfm4a6CzwdlYTSO9 X-Gm-Gg: ASbGncsMXVjf6tpjfk6HdgvPyk10hI8zOCzAwS62StLoNbOqPK4DjMa7w6qbzkF8Rbl vnX/DkTUBYohuqdhQNRK5+drlQNvFPkRnpbo5CA9h7jaSoeLNH8QIhtN6IyOW3KRzADbYOELPCN /kZtg7qS9xQGxomZLFkpSn6CYfuv8IjOHWhSo6cgCYq3VVDVM90Pe+iRwrC7JbNToOrDPvg0iYQ 1hhjHeAiyuFvTYaLLClo5QqAWHWPr2DWTRqwND8hpPoXnowFwWLHASc8ivz+zGiT+lT/zo+ X-Google-Smtp-Source: AGHT+IHMeGX/MOhGipGR+kDP+MbuGAd886iBj7kejr8e33c8YzLoF95ejd9nFSFm3v3eX5cy9tQ7Vw== X-Received: by 2002:a05:622a:15cd:b0:467:7745:f0a9 with SMTP id d75a77b69052e-46e12a0d2bamr442281271cf.4.1737659297162; Thu, 23 Jan 2025 11:08:17 -0800 (PST) Received: from citadel.lan ([2600:6c4a:4d3f:6d5c::1019]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-46e66b880b6sm1768021cf.69.2025.01.23.11.08.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2025 11:08:16 -0800 (PST) From: Brian Gerst To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Ingo Molnar , "H . Peter Anvin" , Thomas Gleixner , Borislav Petkov , Ard Biesheuvel , Uros Bizjak , Brian Gerst Subject: [PATCH v6 14/15] percpu: Remove __per_cpu_load Date: Thu, 23 Jan 2025 14:07:46 -0500 Message-ID: <20250123190747.745588-15-brgerst@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250123190747.745588-1-brgerst@gmail.com> References: <20250123190747.745588-1-brgerst@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit __per_cpu_load is now always equal to __per_cpu_start. Signed-off-by: Brian Gerst Reviewed-by: Ard Biesheuvel --- include/asm-generic/sections.h | 2 +- include/asm-generic/vmlinux.lds.h | 1 - mm/percpu.c | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index c768de6f19a9..0755bc39b0d8 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h @@ -39,7 +39,7 @@ extern char __init_begin[], __init_end[]; extern char _sinittext[], _einittext[]; extern char __start_ro_after_init[], __end_ro_after_init[]; extern char _end[]; -extern char __per_cpu_load[], __per_cpu_start[], __per_cpu_end[]; +extern char __per_cpu_start[], __per_cpu_end[]; extern char __kprobes_text_start[], __kprobes_text_end[]; extern char __entry_text_start[], __entry_text_end[]; extern char __start_rodata[], __end_rodata[]; diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index b2cbc1628118..c616749ebcf7 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -1083,7 +1083,6 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG) #define PERCPU_SECTION(cacheline) \ . = ALIGN(PAGE_SIZE); \ .data..percpu : AT(ADDR(.data..percpu) - LOAD_OFFSET) { \ - __per_cpu_load = .; \ PERCPU_INPUT(cacheline) \ } diff --git a/mm/percpu.c b/mm/percpu.c index d8dd31a2e407..8c9f2164cea9 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -3099,7 +3099,7 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, continue; } /* copy and return the unused part */ - memcpy(ptr, __per_cpu_load, ai->static_size); + memcpy(ptr, __per_cpu_start, ai->static_size); pcpu_fc_free(ptr + size_sum, ai->unit_size - size_sum); } } @@ -3282,7 +3282,7 @@ int __init pcpu_page_first_chunk(size_t reserved_size, pcpu_fc_cpu_to_node_fn_t flush_cache_vmap_early(unit_addr, unit_addr + ai->unit_size); /* copy static data */ - memcpy((void *)unit_addr, __per_cpu_load, ai->static_size); + memcpy((void *)unit_addr, __per_cpu_start, ai->static_size); } /* we're ready, commit */ -- 2.47.1