Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5598579ybl; Tue, 27 Aug 2019 07:06:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUVu7d/h6LKyReEjOkl/yRZypeeHEIPncm6EsY9zpdq9WUBLVy1+9sPrEV+B9+A/t/Fejl X-Received: by 2002:a63:7205:: with SMTP id n5mr21167106pgc.443.1566914792219; Tue, 27 Aug 2019 07:06:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566914792; cv=none; d=google.com; s=arc-20160816; b=J8AegSGUN1RA48jNcFirWIJmRvBxElBHCfed/EYcfcc5CrgmidHP/+WMdSxdRwL8e0 /F96mbyd2FNjrqnX66FFA51DjpAWeUpjQZ41BFp0EoUD9yiSQbdo5DuZ3x8KVOKEpe+T 4qC/MRpPlHkrYJGQx6Twxsy6zFW/sM8oo9iy/5D3VfQHKagRyVxO+X0GRBEXsS15mK5i Cy6LktP33vI32PbxR5ceuA92Q93I9zRfgb8V15trDAdw2y6g1bCFdL/0SEF9EmAyt5Sj rd00/ie8Pnjp62/U4Sfkb5kgqw4u4jx3KCVX787DVuYvh9A7DUCg3I1SLkL2k1VbvRAA 58gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=t9xctO/WP/vM2N5V7/AvRgZTobzXsqkZj3kzkKzY+c8=; b=lU9g0m74GRrD2yrF5wCDOh8RVC12Yk+z7Wd8VS+2WTxonk6kJPNqY0BWzbqTGxaALY 8M8kvFcYmZjV4fxjaNODrTFbGCl0vH3TKgLa2FeomE2akXtNomCme2zn1xpxNjpSvSBo G5CNYsj309VYuXk6RI7Uk0wv3uX9Hj9LvLULJW9te2CxThyy8bc5BWRrvnbzqPTH0FaG MSw91hm1nNj9tOkhDr6TGB0xc8Sx4RWgafNMZktGKH08P35aBAmqQGg0Eu5pXUb0Wbzp 9dG0bay34xIYgbgg7l7T+899WFN9GRj2CPdTyPvMbJybvqqfUnTsuDhId0K1cJxzeUPV ZaiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axtens.net header.s=google header.b=f+5hfHZV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si2730186pjp.10.2019.08.27.07.05.58; Tue, 27 Aug 2019 07:06:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@axtens.net header.s=google header.b=f+5hfHZV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729225AbfH0OE6 (ORCPT + 99 others); Tue, 27 Aug 2019 10:04:58 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:35930 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726134AbfH0OE6 (ORCPT ); Tue, 27 Aug 2019 10:04:58 -0400 Received: by mail-pl1-f196.google.com with SMTP id f19so11842212plr.3 for ; Tue, 27 Aug 2019 07:04:58 -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=lRMls6vpdC5Q5F6jGDyyxylVwHLh5JNMnQIrqjeEHpuJ1RCIihwpQgRC+22NRt3H9O SB1wp3p2Wb6twrgKqlhI4yr9I/wv5cbn3c2nlMuRE+qS2+5dqUGjurtGKIfy3e2jBJ6n BL+lPPypqxsb4n7cbl9trLM1TcXzcyr3AcwKNSQiym1uOfnw/S7/Cutla5ilOpsFJ4OR pZ/m+F3Tsp4AsvLJ1RciPdhH3mwZaxhRJ0XuprTbUl7bNL0lnsaBali83WzjYmkKLzTP apzZndegdo97SRWYi/k1D7DFVb5NTjGVptkRVBUCPvekgCOIf7poDy7RHCuf0u61a3Hn HQEQ== X-Gm-Message-State: APjAAAWYfK5Wn9KLEXehHxeDxFZ7rg/aNdB/ge3sPPDyslReIrmGEWIE YtZifN6N1Y1mgfJeamfVVaf0ww== 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 Cc: Linux Kernel Mailing List 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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