From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752206AbcBLK5r (ORCPT ); Fri, 12 Feb 2016 05:57:47 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:58346 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751992AbcBLK5q (ORCPT ); Fri, 12 Feb 2016 05:57:46 -0500 Date: Fri, 12 Feb 2016 11:57:36 +0100 From: Ralf Baechle To: "Maciej W. Rozycki" Cc: Paul Burton , linux-mips@linux-mips.org, "Steven J. Hill" , Joshua Kinard , linux-kernel@vger.kernel.org, =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , James Hogan , Markos Chandras Subject: Re: [PATCH] MIPS: tlb-r4k: panic if the MMU doesn't support PAGE_SIZE Message-ID: <20160212105736.GA11854@linux-mips.org> References: <1436803964-29820-1-git-send-email-paul.burton@imgtec.com> <20160210221049.GA26712@NP-P-BURTON> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 11, 2016 at 07:37:12PM +0000, Maciej W. Rozycki wrote: > > > index 08318ec..4330315 100644 > > > --- a/arch/mips/mm/tlb-r4k.c > > > +++ b/arch/mips/mm/tlb-r4k.c > > > @@ -486,6 +487,10 @@ static void r4k_tlb_configure(void) > > > * be set to fixed-size pages. > > > */ > > > write_c0_pagemask(PM_DEFAULT_MASK); > > > + back_to_back_c0_hazard(); > > > + if (read_c0_pagemask() != PM_DEFAULT_MASK) > > > + panic("MMU doesn't support PAGE_SIZE=0x%lx", PAGE_SIZE); > > I think it would make sense to report here what the minimum/maximum page > size actually supported is, so that the users know what there might be > after. This is a very unlikely error condition to be hit so I'd rather keep it simple. Even just BUG_ON() would suffice. Ralf