From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70877C3A5A3 for ; Tue, 27 Aug 2019 14:27:34 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E733120828 for ; Tue, 27 Aug 2019 14:27:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=axtens.net header.i=@axtens.net header.b="f+5hfHZV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E733120828 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=axtens.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46Hrmy6v39zDqx1 for ; Wed, 28 Aug 2019 00:27:30 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=axtens.net (client-ip=2607:f8b0:4864:20::643; helo=mail-pl1-x643.google.com; envelope-from=dja@axtens.net; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=axtens.net Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=axtens.net header.i=@axtens.net header.b="f+5hfHZV"; dkim-atps=neutral Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46HrH14kTkzDqt3 for ; Wed, 28 Aug 2019 00:05:01 +1000 (AEST) Received: by mail-pl1-x643.google.com with SMTP id c2so11853027plz.13 for ; Tue, 27 Aug 2019 07:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=t9xctO/WP/vM2N5V7/AvRgZTobzXsqkZj3kzkKzY+c8=; b=f+5hfHZV3TLUfwm18/n69YUcml42uyWVJgGc8yRGKvJ6GLp8HQG9luHFUXoEWzxjW0 O+XZZG7YHbCih0Dy6sejyDN6Z6kupVnFkKcRAermqU4rEN0pwLnKx+WS9sM/p6T7fmmU L6JE3W2OMSlkM5Q39iwan4bJ/4NGnt+ah1qkE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=t9xctO/WP/vM2N5V7/AvRgZTobzXsqkZj3kzkKzY+c8=; b=jelDFMfr0Zb3XHZituHFKOW7yVg4w2TnYHnIODWnikgspAcXMaD6vYE0HGy2rIzTWS 73nnDMPCYvjOCJaKDw0ZCSGHIuP9oPtjJ09Mjfv/g1vUS++c0MCyLYw3Rp6vI4oArgYz IAP1rQM+g2bE1iCYUh7ST1SDqtRmRCK19tjwLRiwhdmAKbuhBV+Wl/Jce31IcOaM4S16 xQ8Swk6DKcka4g9Y/SfEa4B3JCNCTcqsxpHFA4k7xQrPTKBcabkyyzB9iWTSUtNbBp+e Mx7j1/HrfJWJqzwB8J6AbD+3CoV/1GMaNQpPI0MeN+ZeEDqYNmTXC5/cwuLMUstp9995 T0Tg== X-Gm-Message-State: APjAAAVqCzUjQ65jo8kCyCMKoKoRy1gAMEWGGrFtPQw8sFBoeIpdYp12 3ty0KVrmdF5EnzNPKVnYfv+pKQ== X-Google-Smtp-Source: APXvYqyj0rYfewcCj6c1ycF9gMEuwWvzV9FIgo+OumVuJdxKjZsukAJMiIcCF0D+WMeg/csHRIWD2A== X-Received: by 2002:a17:902:7d8b:: with SMTP id a11mr24484244plm.306.1566914697754; Tue, 27 Aug 2019 07:04:57 -0700 (PDT) Received: from localhost (ppp167-251-205.static.internode.on.net. [59.167.251.205]) by smtp.gmail.com with ESMTPSA id r61sm2282367pjb.7.2019.08.27.07.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2019 07:04:56 -0700 (PDT) From: Daniel Axtens To: Masahiro Yamada , Nicholas Piggin , Michael Ellerman , linuxppc-dev Subject: Re: powerpc asm-prototypes.h seems odd In-Reply-To: References: Date: Wed, 28 Aug 2019 00:04:38 +1000 Message-ID: <871rx64scp.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux Kernel Mailing List Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Masahiro Yamada writes: > Hi. > > Lots of powerpc files include , > and powerpc is the only architecture that does this. > > exists to support modversion for asm. > So, it is supposed to be parsed by genksysms, not to be > included from other files. Right? It exists to support sparse, squashing a bunch of sparse warnings. >From the commit where I introduced it: commit 42f5b4cacd783faf05e3ff8bf85e8be31f3dfa9d Author: Daniel Axtens Date: Wed May 18 11:16:50 2016 +1000 powerpc: Introduce asm-prototypes.h Sparse picked up a number of functions that are implemented in C and then only referred to in asm code. This introduces asm-prototypes.h, which provides a place for prototypes of these functions. This silences some sparse warnings. Signed-off-by: Daniel Axtens [mpe: Add include guards, clean up copyright & GPL text] Signed-off-by: Michael Ellerman Regards, Daniel > > > $ git grep asm/asm-prototypes.h > arch/arm64/include/asm/asm-prototypes.h: * ... kbuild will > automatically pick these up from and > arch/powerpc/kernel/early_32.c:#include > arch/powerpc/kernel/irq.c:#include > arch/powerpc/kernel/machine_kexec_64.c:#include > arch/powerpc/kernel/process.c:#include > arch/powerpc/kernel/prom_init.c:#include > arch/powerpc/kernel/ptrace.c:#include > arch/powerpc/kernel/security.c:#include > arch/powerpc/kernel/setup_32.c:#include > arch/powerpc/kernel/signal_32.c:#include > arch/powerpc/kernel/signal_64.c:#include > arch/powerpc/kernel/smp.c:#include > arch/powerpc/kernel/syscalls.c:#include > arch/powerpc/kernel/tau_6xx.c:#include > arch/powerpc/kernel/time.c:#include > arch/powerpc/kernel/trace/ftrace.c:#include > arch/powerpc/kernel/traps.c:#include > arch/powerpc/kvm/book3s_emulate.c:#include > arch/powerpc/kvm/book3s_hv.c:#include > arch/powerpc/kvm/book3s_hv_builtin.c:#include > arch/powerpc/kvm/book3s_hv_rm_xive.c:#include > arch/powerpc/kvm/book3s_pr.c:#include > arch/powerpc/lib/vmx-helper.c:#include > arch/powerpc/mm/book3s64/hash_utils.c:#include > arch/powerpc/mm/book3s64/slb.c:#include > arch/powerpc/platforms/powernv/idle.c:#include > arch/powerpc/platforms/powernv/opal-call.c:#include > arch/powerpc/platforms/powernv/opal-tracepoints.c:#include > > arch/powerpc/platforms/pseries/lpar.c:#include > scripts/Makefile.build:# .S file exports must have their C prototypes > defined in asm/asm-prototypes.h > scripts/Makefile.build: echo "\#include " ; > \ > scripts/Makefile.build:ASM_PROTOTYPES := $(wildcard > $(srctree)/arch/$(SRCARCH)/include/asm/asm-prototypes.h) > > > > -- > Best Regards > Masahiro Yamada