Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Russell King - ARM Linux Newsgroups: linux.kernel Subject: Re: [PATCH 1/3] ARM: Generalize fncpy implementation Date: Fri, 16 Jun 2017 14:00:01 +0200 Message-ID: References: Dkim-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=ElhgCbjza6J9hOKVCCub1X3ktd9Rn55jppwH2TbEWD8=; b=HzQl/Wa7P6oUyzyg9t2YRD8XCDQh81l5S9/GOZbf/+JmnVvpoh9jKOcY/g8PpeguOjFGgTupvCmOkY2KX0cxTo/SbucKYaRJtAqNY+cyGoXDIYNFIJ7aec/X7dzXPJ212ZQHzI01JtBnnXSGp0lbsxtu/2/0ES26gcQ4LBWONUo=; MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 21 Organization: linux.* mail to news gateway X-Original-Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Arnd Bergmann , Greg Kroah-Hartman , open list , "open list:GENERIC INCLUDE/ASM HEADER FILES" , Dave Gerlach , Tony Lindgren , Keerthy J , Alexandre Belloni , linux-omap@vger.kernel.org, Shawn Guo X-Original-Date: Fri, 16 Jun 2017 12:58:34 +0100 X-Original-Message-ID: <20170616115834.GZ23750@n2100.armlinux.org.uk> X-Original-References: <20170615232117.29727-1-f.fainelli@gmail.com> <20170615232117.29727-2-f.fainelli@gmail.com> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1667663 On Thu, Jun 15, 2017 at 04:21:15PM -0700, Florian Fainelli wrote: > ARM's fncpy implementation is actually suitable for a large number of > platforms since the only assumption it makes is just the function's > alignment (8 bytes) which also happens to fulfil other architectures, > including but not limited to ARM64. NAK. This is really not "generic" because the whole point of this is that it encapsulates architecture specific knowledge - in the case of ARM, the fact that bit 1 is used to indicate whether the code is to be run in Thumb mode or ARM mode. That clearly does not belong in an asm-generic version of this. I'm not saying "don't provide an asm-generic" version, I'm saying don't use the ARM version as an asm-generic implementation, because it is nothing of the sort. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.