From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751532AbcHPEWl (ORCPT ); Tue, 16 Aug 2016 00:22:41 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35771 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750729AbcHPEWk (ORCPT ); Tue, 16 Aug 2016 00:22:40 -0400 Subject: Re: [PATCH] powerpc/powernv: Initialise nest mmu To: Alistair Popple References: <1471243919-18362-1-git-send-email-alistair@popple.id.au> <20160815072240.GA21080@balbir.ozlabs.ibm.com> <1989530.M5axb7bib9@new-mexico> Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org, benh@kernel.crashing.org, stewart@linux.vnet.ibm.com, mpe@ellerman.id.au From: Balbir Singh Message-ID: Date: Tue, 16 Aug 2016 14:22:33 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1989530.M5axb7bib9@new-mexico> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/08/16 10:37, Alistair Popple wrote: > Balbir, > > > >>> + /* Update partition table control register on all Nest MMUs */ >>> + opal_nmmu_set_ptcr(-1UL, __pa(partition_tb) | (PATB_SIZE_SHIFT - 12)); >>> + >> >> Just wondering if >> >> 1. Instead of using -1 for all cpus, we should do >> for_each_online_cpu() { >> opal_numm_set_ptcr(...) >> } > > Good question, but I don't think it makes sense to do that. The NMMU is > per-chip/socket rather than per-cpu so it shouldn't be tied to > onlining/offlining of individual CPUs. > >> 2. In cpu hotplug path do the same when onlining and set to NULL on >> offlining? > > Again, the nmmu isn't tied to a specific CPU but rather a chip/socket. So in > theory at least it's possible that all CPUs in a chip could be offline but > other units on the chip could still be using the nmmu so we wouldn't want to > disable the nmmu at that point. Fair enough Balbir Singh.