Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9266909rwl; Wed, 11 Jan 2023 03:43:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXur4LVPRAU16nOIEwP6VpeZHF1lrv/xZn/ymZ6EoGWWJOTHPwDnCGTYbqrD9A9axLcdigqa X-Received: by 2002:a17:906:a14c:b0:7c0:b4bb:919 with SMTP id bu12-20020a170906a14c00b007c0b4bb0919mr67835298ejb.10.1673437397006; Wed, 11 Jan 2023 03:43:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673437396; cv=none; d=google.com; s=arc-20160816; b=hcNt5tdTZA67fh91vasLkMP30ycr0FaAn8Znk0dnzSL572sZIS68M1hu6ZPB9XCMq5 JIy9Y2wLIOFx4H47qYMS00ktztKW5A4RBYBH5+gOPBxIDl/0eEJLwigNCFm6iVsddSZ2 3B2rS8aJsl1HZ/P/D1pdBJjwGY7HtiCjLJ4NvUtTZNSB0oscZW1WH8tVz0kOJf2uotjx JlMIeBa7YNj3fYxYHCpaN8RBUAoP26T69xruI69B8FjFo0bz9fxwE2wG4KKQro95PL7K sHYC7318P7WyDv4EKiQ4xoWhPlpUUFFjeazS1ryaq4456jwfj82kw2CP7mtF6K7TQYqP r6Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=GJL4JwJDV0q5kClOGrF7cHQgfgnpbTSYNoku+rK/eW0=; b=k/N5AeZctCmc+X+94ZRz1q07FdbZ3An+Z7NhSQjohf2/XP86CtO+MwTDizuQLIsC+C b8wKFzvhFGTZ3SAW5dRg9HBuj5/GnygiZrf23cFLwM5IFnNls2u/YoaVQe7R3pzKTkkM uHgKGlvaPDQEYVnASSOTHJy7K9EYX7gF6Hh7FizMLh/wGdoVf/mm5CCNxDgqDMwBz80X RYMBNQmEceazFn1x8tqq3SgZw5dR3ZyK7xYthIftcZ1lfr1+JG+IKcCvNxtOsvQ55yDD ii8kP/+VGEQNUPY7onAw9GkMwt/Z5DtKIhih+f37qeI2OEd0+awjk5KOsuZpsBjVq7aK W7Rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wv4-20020a170907080400b007c18e1ecaf5si16306883ejb.654.2023.01.11.03.43.04; Wed, 11 Jan 2023 03:43:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234269AbjAKLkm (ORCPT + 53 others); Wed, 11 Jan 2023 06:40:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236157AbjAKLj6 (ORCPT ); Wed, 11 Jan 2023 06:39:58 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 076B9C1C; Wed, 11 Jan 2023 03:39:15 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CFDBBFEC; Wed, 11 Jan 2023 03:39:56 -0800 (PST) Received: from FVFF77S0Q05N (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 70C6A3F587; Wed, 11 Jan 2023 03:39:12 -0800 (PST) Date: Wed, 11 Jan 2023 11:39:02 +0000 From: Mark Rutland To: Will Deacon Cc: Peter Zijlstra , linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, mhiramat@kernel.org, ndesaulniers@google.com, ojeda@kernel.org, rafael.j.wysocki@intel.com, revest@chromium.org, robert.moore@intel.com, rostedt@goodmis.org Subject: Re: [PATCH 3/8] arm64: Extend support for CONFIG_FUNCTION_ALIGNMENT Message-ID: References: <20230109135828.879136-1-mark.rutland@arm.com> <20230109135828.879136-4-mark.rutland@arm.com> <20230110204320.GA9739@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230110204320.GA9739@willie-the-truck> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 10, 2023 at 08:43:20PM +0000, Will Deacon wrote: > On Tue, Jan 10, 2023 at 09:35:18PM +0100, Peter Zijlstra wrote: > > On Mon, Jan 09, 2023 at 01:58:23PM +0000, Mark Rutland wrote: > > > > > diff --git a/arch/arm64/include/asm/linkage.h b/arch/arm64/include/asm/linkage.h > > > index 1436fa1cde24d..df18a3446ce82 100644 > > > --- a/arch/arm64/include/asm/linkage.h > > > +++ b/arch/arm64/include/asm/linkage.h > > > @@ -5,8 +5,14 @@ > > > #include > > > #endif > > > > > > -#define __ALIGN .align 2 > > > -#define __ALIGN_STR ".align 2" > > > +#if CONFIG_FUNCTION_ALIGNMENT > 0 > > > +#define ARM64_FUNCTION_ALIGNMENT CONFIG_FUNCTION_ALIGNMENT > > > +#else > > > +#define ARM64_FUNCTION_ALIGNMENT 4 > > > +#endif > > > + > > > +#define __ALIGN .balign ARM64_FUNCTION_ALIGNMENT > > > +#define __ALIGN_STR ".balign " #ARM64_FUNCTION_ALIGNMENT > > > > Isn't that much the same as having ARM64 select FUNCTION_ALIGNMENT_4B > > and simply removing all these lines and relying on the default > > behaviour? > > There's a proposal (with some rough performance claims) to select > FUNCTION_ALIGNMENT_16B over at: > > https://lore.kernel.org/r/20221208053649.540891-1-almasrymina@google.com > > so we could just go with that? I reckon it'd be worth having that as a separate patch atop, to split the infrastructure from the actual change, but I'm happy to go with 16B immediately if you'd prefer. It'd be nice if we could get some numbers... Thanks, Mark.