Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3513105ioo; Wed, 25 May 2022 02:14:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwINrM7+DrFhqQ1eQsbdxOrixr18NphMx6BzfzLy5Q2Uhbk1PFq2MprKUe/RJXCv3xGHy+y X-Received: by 2002:a17:902:7e89:b0:161:f196:b4b with SMTP id z9-20020a1709027e8900b00161f1960b4bmr25175810pla.40.1653470083298; Wed, 25 May 2022 02:14:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653470083; cv=none; d=google.com; s=arc-20160816; b=LVtL2Tv831GKuLFM7cXp8F66a9+u1hT1G+PASEe2NDvyJB1ER2E6eaXLQ75jf73VTu txbr+C8RZEupM5n4AOqvdbRwcun6mysZzHaKigMh0NOY+xjnOc4CJbK00MNR0cuEmfVD WyoMpuz14uhIDbFLDszNzNpbVIHKdqXS/YGk8JFvG28G38WJnkxGuX3Diiy9l5YzOOYb rs+MvJQXNGRVxP+1PDsIa12IlV/AQE1UgHP5nQjQJx5SrOmFl3QnEIAdOhR6EdcGF6AG zlVAOTkT1BrrkPujpzt12n6lHMDbxc3gEU2zDBO4r974rYxE9gEyEHryi3Xm1rDaQNCR YZgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=zJPSod1V5zcR8y6YZqKxg7JZUly3yBAZob/Lr6HmDGA=; b=j7Lp0IBs5dCuU//iMm4Kfra7usDhz/FKKimQWzGmdN/tJ4DqjC+4S7Yo939wdH+4LU luaX7oauxWBYbEjUVgKaiDgcrwBBmqoukgu0SVTLOB2f4cUl2wkio6v1ZNRdThfgbUhX qPRO/N1Gpw8xu8cxrPlFrZtu1nt/jsCt89xRvuL1JlXTXTjmhivAYA37Ak4+FyjZtSJP pZxfXZiNrQ5TDPqINA2Uf4Qmxoni7W9aaAqyK0jGt7L6LYOrd0u2FSo964Cms6qaYaOQ 7JD4hklS1Mzw/PiXWQo+gMtYbluY5QK2ZI8ywZq1IIcSllzHmsZAu5b5RdQ+zVHmcWYD gWOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j3-20020a170902da8300b00161a0786fc3si17568790plx.60.2022.05.25.02.14.28; Wed, 25 May 2022 02:14:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237687AbiEXNSh (ORCPT + 99 others); Tue, 24 May 2022 09:18:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237682AbiEXNSa (ORCPT ); Tue, 24 May 2022 09:18:30 -0400 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72ED295A2A for ; Tue, 24 May 2022 06:18:24 -0700 (PDT) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4L6vs234XJz9t9f; Tue, 24 May 2022 15:18:14 +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 CZDRNg_Sdkka; Tue, 24 May 2022 15:18:14 +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 4L6vrx6rDRz9t9Y; Tue, 24 May 2022 15:18:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id D7AD28B77E; Tue, 24 May 2022 15:18:09 +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 3cUSbPJfi14L; Tue, 24 May 2022 15:18:09 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [192.168.203.153]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 270298B778; Tue, 24 May 2022 15:18:09 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 24ODHweB4109078 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 24 May 2022 15:17:58 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 24ODHrgG4109039; Tue, 24 May 2022 15:17:53 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , peterz@infradead.org, aik@ozlabs.ru, sv@linux.ibm.com, rostedt@goodmis.org, jpoimboe@redhat.com, naveen.n.rao@linux.vnet.ibm.com, mbenes@suse.cz Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH v2 0/7] objtool: Enable and implement --mcount option on powerpc Date: Tue, 24 May 2022 15:17:40 +0200 Message-Id: X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1653398264; l=2411; s=20211009; h=from:subject:message-id; bh=0ZNXCuiBgRE5WjN7Pu+KUYJi7sqbqa6P7glAMf8mJCI=; b=OZPPUGcyHGGs5pWJqq8fEg23Pp3xZvsEMrNv8e7xxZJsbvFLk5vwCGV7YJAU5tFdRhY09H8aAr9I +Yc4dyeYAyPIuBuoKbuqgB0WzzVliZwfk9tK6D0PzAlQiKSl+aZw X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This draft series adds PPC32 support to Sathvika's series. Verified on pmac32 on QEMU. It should in principle also work for PPC64 BE but for the time being something goes wrong. In the beginning I had a segfaut hence the first patch. But I still get no mcount section in the files. Christophe Leroy (3): objtool: Fix SEGFAULT objtool: Use target file endianness instead of a compiled constant objtool: Use target file class size instead of a compiled constant Sathvika Vasireddy (4): objtool: Add --mnop as an option to --mcount objtool: Enable objtool to run only on files with ftrace enabled objtool/powerpc: Enable objtool to be built on ppc objtool/powerpc: Add --mcount specific implementation Makefile | 4 +- arch/powerpc/Kconfig | 2 + arch/x86/Kconfig | 1 + scripts/Makefile.build | 5 +- tools/objtool/arch/powerpc/Build | 2 + tools/objtool/arch/powerpc/decode.c | 88 +++++++++++++++++++ .../arch/powerpc/include/arch/cfi_regs.h | 11 +++ tools/objtool/arch/powerpc/include/arch/elf.h | 8 ++ .../arch/powerpc/include/arch/special.h | 21 +++++ tools/objtool/arch/powerpc/special.c | 19 ++++ .../arch/x86/include/arch/endianness.h | 9 -- tools/objtool/builtin-check.c | 14 +++ tools/objtool/check.c | 51 ++++++----- tools/objtool/elf.c | 23 ++++- tools/objtool/include/objtool/builtin.h | 1 + tools/objtool/include/objtool/elf.h | 9 ++ tools/objtool/include/objtool/endianness.h | 29 +++--- tools/objtool/orc_dump.c | 11 ++- tools/objtool/orc_gen.c | 4 +- tools/objtool/special.c | 3 +- 20 files changed, 257 insertions(+), 58 deletions(-) create mode 100644 tools/objtool/arch/powerpc/Build create mode 100644 tools/objtool/arch/powerpc/decode.c create mode 100644 tools/objtool/arch/powerpc/include/arch/cfi_regs.h create mode 100644 tools/objtool/arch/powerpc/include/arch/elf.h create mode 100644 tools/objtool/arch/powerpc/include/arch/special.h create mode 100644 tools/objtool/arch/powerpc/special.c delete mode 100644 tools/objtool/arch/x86/include/arch/endianness.h -- 2.35.3