Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758330Ab2HHNTG (ORCPT ); Wed, 8 Aug 2012 09:19:06 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:39166 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758270Ab2HHNTE (ORCPT ); Wed, 8 Aug 2012 09:19:04 -0400 Message-ID: <5022673A.7060407@ti.com> Date: Wed, 8 Aug 2012 09:18:50 -0400 From: Cyril Chemparathy Reply-To: Organization: Texas Instruments User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Nicolas Pitre CC: , , Arnd Bergmann , Catalin Marinas , Russell King - ARM Linux , Will Deacon Subject: Re: [PATCH 01/22] ARM: add mechanism for late code patching References: <1343775898-28345-1-git-send-email-cyril@ti.com> <1343775898-28345-2-git-send-email-cyril@ti.com> <50219C45.7030601@ti.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1086 Lines: 35 On 08/08/12 01:56, Nicolas Pitre wrote: > On Tue, 7 Aug 2012, Cyril Chemparathy wrote: [...] >> u32 arm_check[] = { >> 0xe2810041, 0xe2810082, 0xe2810f41, 0xe2810f82, 0xe2810e41, >> 0xe2810e82, 0xe2810d41, 0xe2810d82, 0xe2810c41, 0xe2810c82, >> 0xe2810b41, 0xe2810b82, 0xe2810a41, 0xe2810a82, 0xe2810941, >> 0xe2810982, 0xe2810841, 0xe2810882, 0xe2810741, 0xe2810782, >> 0xe2810641, 0xe2810682, 0xe2810541, 0xe2810582, 0xe2810441, >> }; > > Instead of using this array you could let the assembler do it for you > like this: > > asm (" \n\ > .arm \n\ > arm_check: \n\ > .set shft, 0 \n\ > .rep 12 \n\ > add r1, r2, #0x81 << \shft \n\ > .set shft, \shft + 2 \n\ > .endr \n\ > "); > Neat macro magic. Are you thinking that we build this in as a self test in the code? Thanks -- Cyril. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/