From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932450AbaHGRYL (ORCPT ); Thu, 7 Aug 2014 13:24:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14861 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757264AbaHGRYJ (ORCPT ); Thu, 7 Aug 2014 13:24:09 -0400 Message-ID: <1407432194.599.13.camel@deneb.redhat.com> Subject: Re: [PATCH 1/7] arm: use generic fixmap.h From: Mark Salter To: Max Filippov Cc: Nicolas Pitre , Rob Herring , Kees Cook , LKML , Liu hua , Rabin Vincent , Nikolay Borisov , Leif Lindholm , Tomasz Figa , Doug Anderson , Will Deacon , Laura Abbott , Catalin Marinas , Russell King - ARM Linux , "linux-arm-kernel@lists.infradead.org" Date: Thu, 07 Aug 2014 13:23:14 -0400 In-Reply-To: References: <1407353564-21478-1-git-send-email-keescook@chromium.org> <1407353564-21478-2-git-send-email-keescook@chromium.org> Organization: Red Hat, Inc Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2014-08-07 at 19:42 +0400, Max Filippov wrote: > On Thu, Aug 7, 2014 at 7:32 PM, Nicolas Pitre wrote: > > On Thu, 7 Aug 2014, Rob Herring wrote: > > > >> On Thu, Aug 7, 2014 at 10:15 AM, Max Filippov wrote: > >> > Hi, > >> > > >> > On Wed, Aug 6, 2014 at 11:32 PM, Kees Cook wrote: > >> >> ARM is different from other architectures in that fixmap pages are indexed > >> >> with a positive offset from FIXADDR_START. Other architectures index with > >> >> a negative offset from FIXADDR_TOP. In order to use the generic fixmap.h > >> > > >> > Does anybody know if there's any reason why generic fixmap.h uses negative > >> > offsets? It complicates things with no obvious benefit if you e.g. try to align > >> > virtual address in the fixmap region with physical page color (that's why I've > >> > switched xtensa to positive fixmap addressing in v3.17). > >> > >> No, but each arch doing it differently is even more annoying. > > > > Why not switching everybody to positive offsets then? > > I can cook a patch if people agree that that'd be good. > I think that would be fine. I think x86 was first and used a negative negative offset. Others that followed just copied that. When I did the generic fixmap patch, using a negative offset was the natural thing to do. Arm was only arch doing it differently. From mboxrd@z Thu Jan 1 00:00:00 1970 From: msalter@redhat.com (Mark Salter) Date: Thu, 07 Aug 2014 13:23:14 -0400 Subject: [PATCH 1/7] arm: use generic fixmap.h In-Reply-To: References: <1407353564-21478-1-git-send-email-keescook@chromium.org> <1407353564-21478-2-git-send-email-keescook@chromium.org> Message-ID: <1407432194.599.13.camel@deneb.redhat.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, 2014-08-07 at 19:42 +0400, Max Filippov wrote: > On Thu, Aug 7, 2014 at 7:32 PM, Nicolas Pitre wrote: > > On Thu, 7 Aug 2014, Rob Herring wrote: > > > >> On Thu, Aug 7, 2014 at 10:15 AM, Max Filippov wrote: > >> > Hi, > >> > > >> > On Wed, Aug 6, 2014 at 11:32 PM, Kees Cook wrote: > >> >> ARM is different from other architectures in that fixmap pages are indexed > >> >> with a positive offset from FIXADDR_START. Other architectures index with > >> >> a negative offset from FIXADDR_TOP. In order to use the generic fixmap.h > >> > > >> > Does anybody know if there's any reason why generic fixmap.h uses negative > >> > offsets? It complicates things with no obvious benefit if you e.g. try to align > >> > virtual address in the fixmap region with physical page color (that's why I've > >> > switched xtensa to positive fixmap addressing in v3.17). > >> > >> No, but each arch doing it differently is even more annoying. > > > > Why not switching everybody to positive offsets then? > > I can cook a patch if people agree that that'd be good. > I think that would be fine. I think x86 was first and used a negative negative offset. Others that followed just copied that. When I did the generic fixmap patch, using a negative offset was the natural thing to do. Arm was only arch doing it differently.