From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754159AbcBAPM0 (ORCPT ); Mon, 1 Feb 2016 10:12:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53939 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752319AbcBAPMZ (ORCPT ); Mon, 1 Feb 2016 10:12:25 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <1454095114-4128-2-git-send-email-viro@ZenIV.linux.org.uk> References: <1454095114-4128-2-git-send-email-viro@ZenIV.linux.org.uk> <20160129191744.GB17997@ZenIV.linux.org.uk> To: Al Viro Cc: dhowells@redhat.com, linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/12] EXPORT_SYMBOL() for asm MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6927.1454339543.1@warthog.procyon.org.uk> Date: Mon, 01 Feb 2016 15:12:23 +0000 Message-ID: <6928.1454339543@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Al Viro wrote: > Add asm-usable variants of EXPORT_SYMBOL/EXPORT_SYMBOL_GPL. This > commit just adds the default implementation; most of the architectures > can simply add export.h to asm/Kbuild and start using > from assembler. The area where the things might diverge from default > is the alignment; normally it's 8 bytes on 64bit targets and 4 on > 32bit ones, both for unsigned long and for struct kernel_symbol. > > Unfortunately, amd64 and m68k are unusual - m68k aligns to 2 bytes > (for both) and amd64 aligns struct kernel_symbol to 16 bytes. For > those we'll need to have asm/export.h overriding the constants used > by generic version (KSYM_ALIGN and KCRC_ALIGN for kernel_symbol and > unsigned long resp.) and including asm-generic/export.h. > > And no, __alignof__ would not do the trick - on amd64 __alignof__ > of struct kernel_symbol is 8, not 16. > > Signed-off-by: Al Viro Acked-by: David Howells