Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1624771ybm; Sat, 30 May 2020 15:13:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVyWr/EAe/DX2UyktEejiFxxVSjEQ0fI5Atx735urEBpFZ6s1HP93r0doMOwzOLXxtnF1X X-Received: by 2002:aa7:cb53:: with SMTP id w19mr14158490edt.328.1590876833018; Sat, 30 May 2020 15:13:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590876833; cv=none; d=google.com; s=arc-20160816; b=cUkyG58hzyzWhFh7+C4Pjb1BnDdMRby9Fz6RbU4gC0wNWM2Q9it270vfnW048nUuhD /0bJsgzYKPTLQIo3Rju0pBQx1mD6E5s05CsHmeGFqwxYmwlObMN3XeeruCmp0uyljqqo I1Tu3fJlEQCD7do5mYITvBzU3oj5BeBd0sN4HmoS4DiJ4YitQABaK4aRidL2r5RT/xmq 0ZrERgI2ze97W7vvsZI/o8wTW6vtgiDE0V/ZuW7WdA0WucVq9IjxOHMjME0N5jQ6NTdG EPDt9oQqTLOhkvJ+sJoWUIObOi2Lo4osFbDA++rCKXSW3lBclF5qzc3X+hXn/vZLdMzR wYnA== 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=NXcAedOSwrxhkrQYcHCK2xCwI1oS7g32dLAN0Oi8AdQ=; b=WUV2nXXf9MJJdz1tct3wDml3+jgfG/Gs0Zrk5AI1zhvGDZ2MzEvUFstG6Z5xChzIRG 6eSbAB9JWjTR4n06VLEc9t0iJV7BynJNK6PLj2CBpnSydX5QDJGJjMRNhsxHTrjybjI0 1Y/rMDwexOqh2MWRcxwSKRfHRAeZirR1ERPnHkTNKJWVPnot8skIvUBM5STkyQtFVhGj h+cp3c8Zq+qgIh33sW2U/Mfi50SbUhKMGapt5AIeHusu2wxnoKGDGYfKuBZ/Q4XRpdzs vf85rZ3dwOvHtIkw7aJTcvM+cHty4FX2SuTSMJc+iar4eAiYa2WFM0DXKFL1OWh21cV0 yBdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Of565f9X; 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 s24si7068703edx.192.2020.05.30.15.13.27; Sat, 30 May 2020 15:13:53 -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=Of565f9X; 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 S1729377AbgE3WLl (ORCPT + 99 others); Sat, 30 May 2020 18:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729083AbgE3WLk (ORCPT ); Sat, 30 May 2020 18:11:40 -0400 Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DD42C03E969 for ; Sat, 30 May 2020 15:11:40 -0700 (PDT) Received: by mail-il1-x12e.google.com with SMTP id a14so5977840ilk.2 for ; Sat, 30 May 2020 15:11:40 -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=NXcAedOSwrxhkrQYcHCK2xCwI1oS7g32dLAN0Oi8AdQ=; b=Of565f9XHR6akMVBVKeYCt0KqgsBPBOd8tPl9chf1LTHcHZHyMIMwVfqOsD9YiDB2g BF621G1rjH5z+a2waS2qHNz/smsgukpCnWV1Hto0UywsiW7DtTcKP/33Z3RxvAMlSOkg o2l2HMw7FLpJzpXAyApteISfXgwdHuodppWy2SBJPy6JCRUPa3toliwdpfqb0hXao+KT Sf+k5WuX/57tGton3e0mXfR7NPR/kgW+dlU3UQIeURwHJWXRpaTwxEAAkRy7VqIYb6SO Q55ETphUucl2yXZUg07oOcgCvcyQvSUmmZ82cVZC0vYTPvY7KUorwOXcenhVDKM5/5xi 7jTw== 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=NXcAedOSwrxhkrQYcHCK2xCwI1oS7g32dLAN0Oi8AdQ=; b=UXu5DLNljyAQWYFBO97NplVPbkfI8LAlXNKMvxYFrxQ/eGQzaBEretkbvy2OQjbivE RL3HgHbKaE0MfLNFNpE18hz7o2SF2w9INYv1Mzsxli6rlcRkXF+apY67Cu74B7M2qnmk PshTAPAZ4OTjv6xEjsk/XKe2FObCORj4XRhr8oWDOdnF0OGp7ivebI2/jMmtlPXCDNad 0efPYfmeu6bfsvr+y3K7Z3KYeW4PM2SowlPQ6qM8I4v7v6SpDp/ZNXd+XYPmY1Uj0pGy ER4TiF/ySoGSg3pxSboQ0Zg7xlLeQqMxqmhLbyW048lnFuTVji+aTcvQt1Wqydo+y7sx U1dQ== X-Gm-Message-State: AOAM530oJ0WydR91n/5mhWyLfTQy+DNDEMVzCebi6UsfJwBbIx7YEhvf 4cpSAL+VC7LNqHtLdPUH+Pd/yMlXWg== X-Received: by 2002:a92:4015:: with SMTP id n21mr14454647ila.137.1590876699825; Sat, 30 May 2020 15:11:39 -0700 (PDT) Received: from localhost.localdomain (174-084-153-250.res.spectrum.com. [174.84.153.250]) by smtp.gmail.com with ESMTPSA id w78sm2735698ilk.14.2020.05.30.15.11.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 May 2020 15:11:39 -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 v2 00/10] x86: Clean up percpu operations Date: Sat, 30 May 2020 18:11:17 -0400 Message-Id: <20200530221127.459704-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. Changes from v1: - Add separate patch for XADD constraint fix - Fixed sparse truncation warning - Add cleanup of percpu_stable_op() - Add patch to Remove PER_CPU() Brian Gerst (10): 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: Remove "e" constraint from XADD x86/percpu: Clean up percpu_add_return_op() x86/percpu: Clean up percpu_xchg_op() x86/percpu: Clean up percpu_cmpxchg_op() x86/percpu: Clean up percpu_stable_op() x86/percpu: Remove unused PER_CPU() macro arch/x86/include/asm/percpu.h | 510 ++++++++++++---------------------- 1 file changed, 172 insertions(+), 338 deletions(-) base-commit: 229aaa8c059f2c908e0561453509f996f2b2d5c4 -- 2.25.4