From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753202AbcHPAup (ORCPT ); Mon, 15 Aug 2016 20:50:45 -0400 Received: from ipmail05.adl6.internode.on.net ([150.101.137.143]:37817 "EHLO ipmail05.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753175AbcHPAun (ORCPT ); Mon, 15 Aug 2016 20:50:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DLAQBSYrJXfQpSY3peij22HoYdAoIMEAIBAQEBAQEBEwEBFisvhF8BBTo/BQsLIRUQDwFHiEm+dIp3ihsFmUCPfoEEjViGZIlLNYQrKoddAQEB From: Alistair Popple To: bsingharora@gmail.com Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org, benh@kernel.crashing.org, stewart@linux.vnet.ibm.com, mpe@ellerman.id.au Subject: Re: [PATCH] powerpc/powernv: Initialise nest mmu Date: Tue, 16 Aug 2016 10:37:58 +1000 Message-ID: <1989530.M5axb7bib9@new-mexico> User-Agent: KMail/4.14.1 (Linux/4.2.0-0.bpo.1-amd64; KDE/4.14.2; x86_64; ; ) In-Reply-To: <20160815072240.GA21080@balbir.ozlabs.ibm.com> References: <1471243919-18362-1-git-send-email-alistair@popple.id.au> <20160815072240.GA21080@balbir.ozlabs.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > I think we should definitely try and become hotplug aware from the OS > view point and drive it from the OS > > What do you think? > > Balbir Singh.