1. 09 9月, 2021 1 次提交
    • D
      mm/memory_hotplug: remove nid parameter from remove_memory() and friends · e1c158e4
      David Hildenbrand 提交于
      There is only a single user remaining.  We can simply lookup the nid only
      used for node offlining purposes when walking our memory blocks.  We don't
      expect to remove multi-nid ranges; and if we'd ever do, we most probably
      don't care about removing multi-nid ranges that actually result in empty
      nodes.
      
      If ever required, we can detect the "multi-nid" scenario and simply try
      offlining all online nodes.
      
      Link: https://lkml.kernel.org/r/20210712124052.26491-4-david@redhat.comSigned-off-by: NDavid Hildenbrand <david@redhat.com>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Nathan Lynch <nathanl@linux.ibm.com>
      Cc: Laurent Dufour <ldufour@linux.ibm.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
      Cc: Scott Cheloha <cheloha@linux.ibm.com>
      Cc: Anton Blanchard <anton@ozlabs.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Ard Biesheuvel <ardb@kernel.org>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Christophe Leroy <christophe.leroy@c-s.fr>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jia He <justin.he@arm.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Michel Lespinasse <michel@lespinasse.org>
      Cc: Mike Rapoport <rppt@kernel.org>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Oscar Salvador <osalvador@suse.de>
      Cc: Pankaj Gupta <pankaj.gupta@ionos.com>
      Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
      Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Pierre Morel <pmorel@linux.ibm.com>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Sergei Trofimovich <slyfox@gentoo.org>
      Cc: Thiago Jung Bauermann <bauerman@linux.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e1c158e4
  2. 07 8月, 2021 1 次提交
  3. 29 7月, 2021 1 次提交
    • S
      powerpc/pseries: Fix regression while building external modules · 333cf507
      Srikar Dronamraju 提交于
      With commit c9f34013 ("powerpc: Always enable queued spinlocks for
      64s, disable for others") CONFIG_PPC_QUEUED_SPINLOCKS is always
      enabled on ppc64le, external modules that use spinlock APIs are
      failing.
      
        ERROR: modpost: GPL-incompatible module XXX.ko uses GPL-only symbol 'shared_processor'
      
      Before the above commit, modules were able to build without any
      issues. Also this problem is not seen on other architectures. This
      problem can be workaround if CONFIG_UNINLINE_SPIN_UNLOCK is enabled in
      the config. However CONFIG_UNINLINE_SPIN_UNLOCK is not enabled by
      default and only enabled in certain conditions like
      CONFIG_DEBUG_SPINLOCKS is set in the kernel config.
      
        #include <linux/module.h>
        spinlock_t spLock;
      
        static int __init spinlock_test_init(void)
        {
                spin_lock_init(&spLock);
                spin_lock(&spLock);
                spin_unlock(&spLock);
                return 0;
        }
      
        static void __exit spinlock_test_exit(void)
        {
        	printk("spinlock_test unloaded\n");
        }
        module_init(spinlock_test_init);
        module_exit(spinlock_test_exit);
      
        MODULE_DESCRIPTION ("spinlock_test");
        MODULE_LICENSE ("non-GPL");
        MODULE_AUTHOR ("Srikar Dronamraju");
      
      Given that spin locks are one of the basic facilities for module code,
      this effectively makes it impossible to build/load almost any non GPL
      modules on ppc64le.
      
      This was first reported at https://github.com/openzfs/zfs/issues/11172
      
      Currently shared_processor is exported as GPL only symbol.
      Fix this for parity with other architectures by exposing
      shared_processor to non-GPL modules too.
      
      Fixes: 14c73bd3 ("powerpc/vcpu: Assume dedicated processors as non-preempt")
      Cc: stable@vger.kernel.org # v5.5+
      Reported-by: marc.c.dionne@gmail.com
      Signed-off-by: NSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20210729060449.292780-1-srikar@linux.vnet.ibm.com
      333cf507
  4. 08 7月, 2021 1 次提交
  5. 25 6月, 2021 6 次提交
  6. 24 6月, 2021 5 次提交
  7. 21 6月, 2021 2 次提交
  8. 20 6月, 2021 5 次提交
  9. 10 6月, 2021 1 次提交
  10. 23 5月, 2021 6 次提交
  11. 17 5月, 2021 1 次提交
    • V
      powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible · f3f6d184
      Vaibhav Jain 提交于
      Currently drc_pmem_qeury_stats() generates a dev_err in case
      "Enable Performance Information Collection" feature is disabled from
      HMC or performance stats are not available for an nvdimm. The error is
      of the form below:
      
      papr_scm ibm,persistent-memory:ibm,pmemory@44104001: Failed to query
      	 performance stats, Err:-10
      
      This error message confuses users as it implies a possible problem
      with the nvdimm even though its due to a disabled/unavailable
      feature. We fix this by explicitly handling the H_AUTHORITY and
      H_UNSUPPORTED errors from the H_SCM_PERFORMANCE_STATS hcall.
      
      In case of H_AUTHORITY error an info message is logged instead of an
      error, saying that "Permission denied while accessing performance
      stats" and an EPERM error is returned back.
      
      In case of H_UNSUPPORTED error we return a EOPNOTSUPP error back from
      drc_pmem_query_stats() indicating that performance stats-query
      operation is not supported on this nvdimm.
      
      Fixes: 2d02bf83 ("powerpc/papr_scm: Fetch nvdimm performance stats from PHYP")
      Signed-off-by: NVaibhav Jain <vaibhav@linux.ibm.com>
      Reviewed-by: NIra Weiny <ira.weiny@intel.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20210508043642.114076-1-vaibhav@linux.ibm.com
      f3f6d184
  12. 12 5月, 2021 4 次提交
  13. 02 5月, 2021 1 次提交
  14. 27 4月, 2021 1 次提交
  15. 22 4月, 2021 1 次提交
  16. 21 4月, 2021 1 次提交
  17. 20 4月, 2021 2 次提交
    • M
      powerpc/pseries: Stop calling printk in rtas_stop_self() · ed8029d7
      Michael Ellerman 提交于
      RCU complains about us calling printk() from an offline CPU:
      
        =============================
        WARNING: suspicious RCU usage
        5.12.0-rc7-02874-g7cf90e481cb8 #1 Not tainted
        -----------------------------
        kernel/locking/lockdep.c:3568 RCU-list traversed in non-reader section!!
      
        other info that might help us debug this:
      
        RCU used illegally from offline CPU!
        rcu_scheduler_active = 2, debug_locks = 1
        no locks held by swapper/0/0.
      
        stack backtrace:
        CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.12.0-rc7-02874-g7cf90e481cb8 #1
        Call Trace:
          dump_stack+0xec/0x144 (unreliable)
          lockdep_rcu_suspicious+0x124/0x144
          __lock_acquire+0x1098/0x28b0
          lock_acquire+0x128/0x600
          _raw_spin_lock_irqsave+0x6c/0xc0
          down_trylock+0x2c/0x70
          __down_trylock_console_sem+0x60/0x140
          vprintk_emit+0x1a8/0x4b0
          vprintk_func+0xcc/0x200
          printk+0x40/0x54
          pseries_cpu_offline_self+0xc0/0x120
          arch_cpu_idle_dead+0x54/0x70
          do_idle+0x174/0x4a0
          cpu_startup_entry+0x38/0x40
          rest_init+0x268/0x388
          start_kernel+0x748/0x790
          start_here_common+0x1c/0x614
      
      Which happens because by the time we get to rtas_stop_self() we are
      already offline. In addition the message can be spammy, and is not that
      helpful for users, so remove it.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20210418135413.1204031-1-mpe@ellerman.id.au
      ed8029d7
    • T
      powerpc/pseries: Add shutdown() to vio_driver and vio_bus · 39d0099f
      Tyrel Datwyler 提交于
      Currently, neither the vio_bus or vio_driver structures provide support
      for a shutdown() routine.
      
      Add support for shutdown() by allowing drivers to provide a
      implementation via function pointer in their vio_driver struct and
      provide a proper implementation in the driver template for the vio_bus
      that calls a vio drivers shutdown() if defined.
      
      In the case that no shutdown() is defined by a vio driver and a kexec is
      in progress we implement a big hammer that calls remove() to ensure no
      further DMA for the devices is possible.
      Signed-off-by: NTyrel Datwyler <tyreld@linux.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20210402001325.939668-1-tyreld@linux.ibm.com
      39d0099f