Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2045946ybk; Sun, 17 May 2020 08:31:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDxwFgkWH2DfnfmKaGZsG6RKqN2Y59Xfz7cTHGi3FVBUwqbcMYkjOjqVnmKfqA+zHruDne X-Received: by 2002:a05:6402:3076:: with SMTP id bs22mr909498edb.161.1589729472945; Sun, 17 May 2020 08:31:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589729472; cv=none; d=google.com; s=arc-20160816; b=t81U6II2kkYhJvX+q9GPy2grnXFCLyHIVhIZQSQfvQ8gff1pVoW5Mlc6MnYk5kY4G7 +B4qaZvRCI0wrvlgfR6Q0v7qIcr+dZetk+dnfafAiz0z4BHBd2DKYLCMQP4Bn8t17xKi Pw0MeAH+aohbUPQsQQGlRZbDQgNXa1NogIRho7L6u+q0H9d/7GOYKxHj97onJ5xTTwJ0 xw+UNas/3quHJLDcKrsAT3Qqml0VVVhatqD4udqGUTk7bbR5ntriON1ucOo/Q6W4pLso T7scCJkDEbIaSjGknQjAYSu8TTafDH0+UI0DIZmlRnhSeaEkx62GymOcSR/5iV2Q4DcY sk5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=szUtt2uCBtb9BFKIo6+avFuxCN1c4bm+vBn/5FwTe+c=; b=R/WSdXuy1OzB+SJUkdkgOYLGvasn0obCYChupEbKjU6XoCDnZY873ooo5XwZjScjll 8jdAIVaHUkwBgJH4kYtgIvQXVfCWVua8kJbyYy+rfBFBvw/EODW9wLyTZJbbMvRmwlB7 EfkC6VZ3djVui3sgQFvYNCcQdzB2x1N2V5PsHRGFtfLHf4TOO8vIHEAAoAw/wH3azpub fVphowWHy/miTUXsB1ApdvbPcp4K9B9EDn1tBo6qWOlS/B2eDysprlxjqwSrPgPyqxJV STjkx/j0u43N0dA40RpT0Z4FaTi0K834DP0vs1XDGyBfRIFhKzjRlHrn4/oFvJs64caO BwbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ro177boz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ov4si4812506ejb.237.2020.05.17.08.30.49; Sun, 17 May 2020 08:31:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ro177boz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728056AbgEQP30 (ORCPT + 99 others); Sun, 17 May 2020 11:29:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728025AbgEQP3Z (ORCPT ); Sun, 17 May 2020 11:29:25 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7490FC061A0C for ; Sun, 17 May 2020 08:29:25 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id z80so7738286qka.0 for ; Sun, 17 May 2020 08:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=szUtt2uCBtb9BFKIo6+avFuxCN1c4bm+vBn/5FwTe+c=; b=ro177bozlMYOqTu76KMW9NsVAYa5XSQorch1+u3k+QqmVzF1RqWo5eo9mAf7Y9Oxoi kN1oDBIRZa65ECDSLxXDjSYDpdZUeX8eK4qHp1RvsO9KZvsQw8O8fF4e1tB7/zMWy2fh ccL5U+leW9baHohU23Zx1M8ULOmKl+U/ZPu2QF7+4IrRXZPw/syR3iiisfUEnz/xrFRf tWx7mBSefvdIdLGVfDUoDh0Uy0ryV+kvuL4eXOK93qjkBMdKZIftuvcUWNtuq2uwyIKF xOq+yS/PoTz56cfgJGr3+/tC3xs9NPfHUENf6a3D1p+6tS8AIJvpaNcneUkx/F+qZHNI QhFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=szUtt2uCBtb9BFKIo6+avFuxCN1c4bm+vBn/5FwTe+c=; b=Qvxiyxqqyzuly/1hH1WrFMQAxGkJH0nxl3HX9+VIyFqOMENJNRoUFMKF53wMBt0gEJ bOKEKHop42NmPuvT9/SJ/6QtA/lJsA6QNPtpY1mEU4jhHSLX+o0f3+ZaMwaMxgsTxzRY LX3Zaijjlj+zKTC/rj1r6NS7oyVGwAevhKyjqh+2nsFgnD6k5VE4cIlZqQ6pErfaRaih mitU9sLKsWV+0swBA6rgQAFC3BoZJsd0eAU0fbsgIADVjkVhjfWACyedW2Ube5qNDLev MpUvnKeUlasu2Pc+rC6qwUv/S8QqhRnCGE2gFLr5bOrhPQqQwwwhHGq5oeNwX5LoHAPg FnaA== X-Gm-Message-State: AOAM532y2yIN+BacYspD6cmdujoQlQkCyGhMUjvnKxJ1f7e0Meg8T3cG TCAdrX2oqdKP5oZ4wx4GLHj08iT7zA== X-Received: by 2002:a37:d85:: with SMTP id 127mr12277923qkn.205.1589729364474; Sun, 17 May 2020 08:29:24 -0700 (PDT) Received: from localhost.localdomain (174-084-153-250.res.spectrum.com. [174.84.153.250]) by smtp.gmail.com with ESMTPSA id 63sm6234335qkh.120.2020.05.17.08.29.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 08:29:23 -0700 (PDT) From: Brian Gerst To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Nick Desaulniers , Brian Gerst Subject: [PATCH 0/7] x86: Clean up percpu operations Date: Sun, 17 May 2020 11:29:09 -0400 Message-Id: <20200517152916.3146539-1-brgerst@gmail.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The core percpu operations already have a switch on the width of the data type, which resulted in an extra amount of dead code being generated with the x86 operations having another switch. This patch set rewrites the x86 ops to remove the switch. Additional cleanups are to use named assembly operands, and to cast variables to the width used in the assembly to make Clang happy. Brian Gerst (7): x86/percpu: Introduce size abstraction macros x86/percpu: Clean up percpu_to_op() x86/percpu: Clean up percpu_from_op() x86/percpu: Clean up percpu_add_op() x86/percpu: Clean up percpu_add_return_op() x86/percpu: Clean up percpu_xchg_op() x86/percpu: Clean up percpu_cmpxchg_op() arch/x86/include/asm/percpu.h | 447 ++++++++++++---------------------- 1 file changed, 158 insertions(+), 289 deletions(-) -- 2.25.4