Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp442919pxb; Wed, 25 Aug 2021 06:57:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKKHzBStrsllozAhGwyb1cv3SNkKJMzyi7vLAyVNGifVkYi9XM0BoiaQ6whSur3wvn7cry X-Received: by 2002:a05:6402:3589:: with SMTP id y9mr49181939edc.247.1629899859117; Wed, 25 Aug 2021 06:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629899859; cv=none; d=google.com; s=arc-20160816; b=FG3sRh8AkA/UAW1OZF7h5RQAvqeHzJHFHI+7TNGFQDsRusI4KK1v4YsUAP61Tbl9Vf WqNJsb5WBRRjPWAa5xtLEoI31IJP7VmAR6NwOzzt57RlUfhWhV/P/Jex+o2z6BBiG7Bw GL2KGTfIOPhPyryYjQ6msjvaTZfozAi2gnNujM1hST1IBx21Qq5iHfnw1aGkMObVwv0m ht/JHgYSc3m5RNC+kpIZ31vIb2/tauxWMQ5IRuSU3TVt4HiQPB14IJmfgtTYJAFrIU4S wZPHQ/jxoHBB6TApPHcmvtTDIf4oA8DpL5OgYgzyoK8uoBeYIyCKYyO0p65W/1Uzbupj SG8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:cc:to:subject:from:message-id; bh=5yORGtG0INSA0A2h9XljS3/4+KDiugrxyvNbjWPokkg=; b=tWwAKoeA7bBD5Yfn/+q7VhmAJ8BIQmp7Mz94eEhz+61U+lAMg16oHFox5fuFl2SEZm 2lWt1r8waSqpFpoKFse2uX/gVvAZDHntki9OP8qFqP8AYM5u/E+H2YcCNFQW8PHueNik NCmybtl6uqZJiTZGu692vllDN2usSFHcPR2222VzLnxzle+VJLjoKgC789+X7rrjvMxB dD163hF7MOvGpCoeqINYlFX7U1SUxq65pWx7c1mVYfFrAsuAR84pijByvM1QmJ1ZrsTs epCGCR3/MdqdydzOxGtFlVy3FkYdR6fgNz+gMZQbc8lBPW8h7sZfhBlSZrOb6ZizNUdf Alpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si19808567ejm.446.2021.08.25.06.57.14; Wed, 25 Aug 2021 06:57:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241256AbhHYNfd (ORCPT + 99 others); Wed, 25 Aug 2021 09:35:33 -0400 Received: from pegase2.c-s.fr ([93.17.235.10]:44021 "EHLO pegase2.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240898AbhHYNfc (ORCPT ); Wed, 25 Aug 2021 09:35:32 -0400 Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4Gvn5d6S7Kz9sTj; Wed, 25 Aug 2021 15:34:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xfO4z1aiVt8q; Wed, 25 Aug 2021 15:34:45 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4Gvn5d5WY9z9sTW; Wed, 25 Aug 2021 15:34:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A348F8B85B; Wed, 25 Aug 2021 15:34:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id JgIVHkcI2S1c; Wed, 25 Aug 2021 15:34:45 +0200 (CEST) Received: from po18078vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5BD9B8B858; Wed, 25 Aug 2021 15:34:45 +0200 (CEST) Received: by po18078vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 29D996BC7B; Wed, 25 Aug 2021 13:34:45 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [PATCH] powerpc: Redefine HMT_xxx macros as empty on PPC32 To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Wed, 25 Aug 2021 13:34:45 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org HMT_xxx macros are macros for adjusting thread priority (hardware multi-threading) are macros inherited from PPC64 via commit 5f7c690728ac ("[PATCH] powerpc: Merged ppc_asm.h") Those instructions are pointless on PPC32, but some common fonctions like arch_cpu_idle() use them. So make them empty on PPC32 to avoid those instructions. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/vdso/processor.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/include/asm/vdso/processor.h b/arch/powerpc/include/asm/vdso/processor.h index e072577bc7c0..8d79f994b4aa 100644 --- a/arch/powerpc/include/asm/vdso/processor.h +++ b/arch/powerpc/include/asm/vdso/processor.h @@ -5,12 +5,21 @@ #ifndef __ASSEMBLY__ /* Macros for adjusting thread priority (hardware multi-threading) */ +#ifdef CONFIG_PPC64 #define HMT_very_low() asm volatile("or 31, 31, 31 # very low priority") #define HMT_low() asm volatile("or 1, 1, 1 # low priority") #define HMT_medium_low() asm volatile("or 6, 6, 6 # medium low priority") #define HMT_medium() asm volatile("or 2, 2, 2 # medium priority") #define HMT_medium_high() asm volatile("or 5, 5, 5 # medium high priority") #define HMT_high() asm volatile("or 3, 3, 3 # high priority") +#else +#define HMT_very_low() +#define HMT_low() +#define HMT_medium_low() +#define HMT_medium() +#define HMT_medium_high() +#define HMT_high() +#endif #ifdef CONFIG_PPC64 #define cpu_relax() do { HMT_low(); HMT_medium(); barrier(); } while (0) -- 2.25.0