Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2180492rwa; Mon, 22 Aug 2022 03:43:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR5zpQs7Y3CkMRec0X3wXYOofTfiLstqnt1mU63J1DW2Gc5O+3g87LVC5aEdKioV7K/MhWE2 X-Received: by 2002:a05:6402:1d4e:b0:43d:9822:b4d1 with SMTP id dz14-20020a0564021d4e00b0043d9822b4d1mr15848324edb.212.1661165005704; Mon, 22 Aug 2022 03:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661165005; cv=none; d=google.com; s=arc-20160816; b=Imn8cbLctlw9Q9PiIxN0hJP/EJs3GP26ZEAuKgueLoXWpxHvt6GBNeioAzZbDQsPpw EN9fl0qaCB+tnTYNdzzRbJ+aqihTF1N4OfT63ntLy6ExeVhN8vCq3EfxD/wRMqm0CpM8 R9ugB4Z8cd7XrV0UH9I2S4i9t5+6RU+2Fl+XNI+aq/V6v9drR3ce39572q/xlwPZFlWV zpp41gtG8THOVHOiGIZmO7NB0Jll5AREOD/9mEMIAoFzs6WNwaXzfn3/0U1UIU1RL/m5 D+Cp3XJjJ5V+nHtHQFi2s0uQO3hLrmnb210vDNHkxwQ19NcKqoVfSrQE6c6gy3o+KNDv HuPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=4HGc3LZLIVD8kqIdt1raEGvcbUqauzF4BNbgPe7E/m4=; b=XggMxbgxq5kqHieBidxld6HfS4domLjbUoqsAiAbV6MwakflMinrLNkVS3R0mAvn8d 0tjdHtwatb4hpv88mC5jyi/EhtrBcray2PqEsNYXoEBgZL1omo/Ac2j2/0afb4OwVn+g sTAG+vV+rQ/CTRAmX9xy8C067ZbmgKN68XVsIhqhJPmcNTJXVPQhAUVvRlElTbosH0OV pbGjvBp1hzHnDggqY97D5LrobnHLJrO1hjIHLtK3Y5eOxJmVdmcoqVa+0fxbP6z5ITgb UZAent9gfzndffUjUNg3yrR+byNWj54InQ4/9+rPOpt8p/faS+6xAAzfeInDD2TJNJ64 wmjw== 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 hd34-20020a17090796a200b0073d5b609447si6914439ejc.324.2022.08.22.03.42.59; Mon, 22 Aug 2022 03:43:25 -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 S232953AbiHVJhJ (ORCPT + 99 others); Mon, 22 Aug 2022 05:37:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231577AbiHVJhG (ORCPT ); Mon, 22 Aug 2022 05:37:06 -0400 Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AFB631222; Mon, 22 Aug 2022 02:37:05 -0700 (PDT) Received: by mail-qv1-f54.google.com with SMTP id e4so7691203qvr.2; Mon, 22 Aug 2022 02:37:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=4HGc3LZLIVD8kqIdt1raEGvcbUqauzF4BNbgPe7E/m4=; b=C7ccB4CycVRJv72vSwLjvRDuXYNwbRaO9VvHK4Xdaerjtsy4KeGOjp0aFh770m4nu1 HALlZR9QvNJfiOsRO3ho0/XJxdEYmEuFUShdODqhABDdZcxYk/KvOKnZlG6CJ1GmMTp3 oM4oX2n3BcKGRICoPwzO9nGDIilquNXt6+p1eTgIRmWsjeYDOqOH2VVEkherztqYVDhD +kw9r0HAnQPafSAjUZ057D5EgDkGASae9QaIvs4La9CVKl3RNZapt493DCSm0VdhUHNE bxXF+YybYaLtcqp5vDLOlI6jVBm+FpsvLDMvoUOgp0JGht+638XGGiP7+UdEzlpkUWpI tEig== X-Gm-Message-State: ACgBeo389od51o0C2+KWag4vY2tB6lEGtxdqr7uVjEHBp6Y5HJrbpI7v bnrj1hY1sZKZAQ/mfGrdst/oH2HEXhaEgA== X-Received: by 2002:a0c:b31a:0:b0:473:8062:b1b4 with SMTP id s26-20020a0cb31a000000b004738062b1b4mr14902520qve.85.1661161024315; Mon, 22 Aug 2022 02:37:04 -0700 (PDT) Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com. [209.85.128.169]) by smtp.gmail.com with ESMTPSA id x2-20020ae9e642000000b006b5e50057basm10169314qkl.95.2022.08.22.02.37.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Aug 2022 02:37:03 -0700 (PDT) Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-3376851fe13so243520667b3.6; Mon, 22 Aug 2022 02:37:03 -0700 (PDT) X-Received: by 2002:a25:cbcf:0:b0:695:2d3b:366 with SMTP id b198-20020a25cbcf000000b006952d3b0366mr12458894ybg.365.1661161022925; Mon, 22 Aug 2022 02:37:02 -0700 (PDT) MIME-Version: 1.0 References: <20220821113512.2056409-1-mail@conchuod.ie> In-Reply-To: <20220821113512.2056409-1-mail@conchuod.ie> From: Geert Uytterhoeven Date: Mon, 22 Aug 2022 11:36:51 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/6] Add an asm-generic cpuinfo_op declaration To: Conor Dooley Cc: Michal Simek , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , "David S . Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "the arch/x86 maintainers" , "H . Peter Anvin" , Arnd Bergmann , Conor Dooley , Kees Cook , Peter Zijlstra , Linux Kernel Mailing List , linux-riscv , linux-s390 , Linux-sh list , sparclinux , Linux-Arch Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Conor, On Sun, Aug 21, 2022 at 1:36 PM Conor Dooley wrote: > From: Conor Dooley > > RISC-V is missing a prototype for cpuinfo_op. Rather than adding yet > another `extern const struct seq_operations cpuinfo_op;` to an arch > specific header file, create an asm-generic variant and migrate the > existing arch variants there too. Obv. there are other archs that use > cpuinfo_op but don't declare it and surely also have the same warning? > I went for the minimum change here, but would be perfectly happy to > extend the change to all archs if this change is worthwhile. Or just > make a header in arch/riscv, any of the three work for me! > > If this isn't the approach I should've gone for, any direction would > be great :) I tried pushing this last weekend to get LKP to test it but > I got neither a build success nor a build failure email from it, so > I figured I may as well just send the patches.. > > I wasn't too sure if this could be a single patch, so I split it out > into a patch fixing the issue on RISC-V & copy-paste patches for each > arch that I moved. Thanks for your series! > Conor Dooley (6): > asm-generic: add a cpuinfo_ops definition in shared code > microblaze: use the asm-generic version of cpuinfo_op > s390: use the asm-generic version of cpuinfo_op > sh: use the asm-generic version of cpuinfo_op > sparc: use the asm-generic version of cpuinfo_op > x86: use the asm-generic version of cpuinfo_op > > arch/microblaze/include/asm/processor.h | 2 +- > arch/riscv/include/asm/processor.h | 1 + > arch/s390/include/asm/processor.h | 2 +- > arch/sh/include/asm/processor.h | 2 +- > arch/sparc/include/asm/cpudata.h | 3 +-- > arch/x86/include/asm/processor.h | 2 +- > include/asm-generic/processor.h | 7 +++++++ > 7 files changed, 13 insertions(+), 6 deletions(-) > create mode 100644 include/asm-generic/processor.h I was a bit surprised not to find fs/proc/cpuinfo.c in the diffstat above. That file already has an external declaration for cpuinfo_op, and uses it rather unconditionally (that is, if CONFIG_PROC_FS=y) on all architectures. So I think you can just move that to include/linux/processor.h, include the latter everywhere, and drop all architecture-specific copies. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds