From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28750 invoked by alias); 5 Feb 2014 16:50:11 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 28739 invoked by uid 89); 5 Feb 2014 16:50:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Feb 2014 16:50:10 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1WB5fr-0002NK-7T from joseph_myers@mentor.com ; Wed, 05 Feb 2014 08:50:07 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 5 Feb 2014 08:50:07 -0800 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Wed, 5 Feb 2014 16:50:04 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1WB5fn-0002WD-F8; Wed, 05 Feb 2014 16:50:03 +0000 Date: Wed, 05 Feb 2014 16:50:00 -0000 From: "Joseph S. Myers" To: David Holsgrove CC: Subject: Re: [PATCH, COMMITTED] [MicroBlaze BZ #15705] Define MMAP2_PAGE_SHIFT In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-02/txt/msg00005.txt.bz2 On Wed, 5 Feb 2014, David Holsgrove wrote: > +/* Microblaze kernel has PAGE_SHIFT set to 12. > + Determine the shift dynamically with getpagesize. */ The comment "has PAGE_SHIFT set to 12" seems inaccurate. The reason you need to determine it dynamically is that the kernel (arch/microblaze/include/asm/page.h) may define it to any of 12, 14 or 16, depending on configuration options. If it were constant, you could just use a suitable constant value here instead of -1. -- Joseph S. Myers joseph@codesourcery.com