From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 659872C0091 for ; Sun, 23 Sep 2012 05:55:50 +1000 (EST) Message-ID: <1348343737.1132.74.camel@pasglop> Subject: Re: Probing for native availability of isel from userspace From: Benjamin Herrenschmidt To: Segher Boessenkool Date: Sun, 23 Sep 2012 05:55:37 +1000 In-Reply-To: References: <50EE7AAC-3080-4B1B-B741-E3F7F5A57A73@kernel.crashing.org> <20120922102151.GA31314@visitor2.iram.es> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Cc: linuxppc-dev@lists.ozlabs.org, malc , hollis@penguinppc.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sat, 2012-09-22 at 21:08 +0200, Segher Boessenkool wrote: > > Thanks for suggestion, but i'd rather not play with heuristics. > > Have a look at /sys/kernel/debug/powerpc/emulated_instructions/ then? Userspace should *NEVER* rely on the content of debugfs, it will change with time, it is not a guaranteed ABI, it's purely for people to look at... for debugging. Unfortunately we don't expose ISEL support via features (maybe we should, this is reasonably easy to fix, except that we are running short on feature bits and adding a new set of bits isn't totally trivial). At this stage I would recommend using arch 2.06 as your key/trigger and either add a handful of known PVR values (mfpvr is emulated) for other CPUs you know support it (there shouldn't be that many), or just do the heuristic :-( Cheers, Ben.