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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06548C433EF for ; Wed, 27 Apr 2022 19:58:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 77FDF6B0071; Wed, 27 Apr 2022 15:58:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 72F9C6B0073; Wed, 27 Apr 2022 15:58:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5CF6A6B0074; Wed, 27 Apr 2022 15:58:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 4D6736B0071 for ; Wed, 27 Apr 2022 15:58:26 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 0C164816D2 for ; Wed, 27 Apr 2022 19:58:26 +0000 (UTC) X-FDA: 79403721012.21.D79C939 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf20.hostedemail.com (Postfix) with ESMTP id 0BAA61C0073 for ; Wed, 27 Apr 2022 19:58:21 +0000 (UTC) Received: by mail-yb1-f202.google.com with SMTP id d188-20020a25cdc5000000b00648429e5ab9so2612987ybf.13 for ; Wed, 27 Apr 2022 12:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=XcyimqZCgzNKPz0n6jeYchV2A0CiM03dMGsti55IHHA=; b=s02dGKNs5N9wITi7rLK6r0wHnOi9sVCax7ULGA2NwdsiQb4JBG5S6sUifvHUzlsP+s JQMkwbvLTHNVpZ5d2M2T18eXehKh37hy4yu+Wl46oiRt94FCdObnc9xrEiNwDX3hFqci UJQsrBd44/V04s0nxcZ+xzDoda9xt5xeFeWvTlEbhfSaAnw2q65HrpmVhVLTvrHZFJVD xwLy8iQmkExeBpM8uvvPoU8lhjeki5LzjnerCCpyBlB+1ebdiwXi8/IzIZhdXUUEhWwK 0Jfz2DFR5rqTo7C0rTLwdcm9gQ4z9DokGrRg2z2d6XeMpX6E2zoI4WoXs8uPvTgEBll4 TLqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=XcyimqZCgzNKPz0n6jeYchV2A0CiM03dMGsti55IHHA=; b=TFcnosaeNkQIsfKD58D/sdDA5oEXEZo0pXMyjkaoz98GJagElrWraDEgbfC97HAHkE whttxN9bfAoxrBrCkOPPCkLmueeTwwonq0zm9IOJJiP/ir8rZeUuvsKsJZJ8FdKPrhht FzdOzEvoMQnGPshkM7ZXlCXh87q2Dgl7/RaS0VY+7167CqY1HfpzvmgqDFLDKUgSqrDB u68FyidKZ43zwzNjg0j6nZNOFu9NCRg8HCj+T1G5TUcLvk9w2/LMXqbEZFbFpO4ajlaL dwktGgxruASxP5t0josHbTQuo811l00pvYIiGIUuilVeLZmQYwjlbI91Eg9f+FRs9Jix X9wQ== X-Gm-Message-State: AOAM533WT1WhywGGzI8l9sJU4q/0dNsBmoeMN8MLPxkhk4HNGJ/ttr+I y5EYpkKIxtt3JLZ6rPNEHqtYNnA= X-Google-Smtp-Source: ABdhPJwTnOgzyHrJ8E1iFAiir6PeHMoiemkC6w/nZnaRnH+NDqYyIBLFMruNHYrJdqIATkyGMvDpSWU= X-Received: from pcc-desktop.svl.corp.google.com ([2620:15c:2ce:200:7bf6:862b:86da:9ce1]) (user=pcc job=sendgmr) by 2002:a81:38d4:0:b0:2ea:ad04:a284 with SMTP id f203-20020a8138d4000000b002eaad04a284mr29122079ywa.139.1651089504681; Wed, 27 Apr 2022 12:58:24 -0700 (PDT) Date: Wed, 27 Apr 2022 12:58:19 -0700 Message-Id: <20220427195820.1716975-1-pcc@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.36.0.464.gb9c8b46e94-goog Subject: [PATCH v5 1/2] printk: stop including cache.h from printk.h From: Peter Collingbourne To: Andrey Konovalov , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Andrew Morton , Catalin Marinas Cc: Peter Collingbourne , Linux ARM , Linux Memory Management List , Linux Kernel Mailing List , vbabka@suse.cz, penberg@kernel.org, roman.gushchin@linux.dev, iamjoonsoo.kim@lge.com, rientjes@google.com, Herbert Xu , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , kasan-dev , Eric Biederman , Kees Cook Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 0BAA61C0073 X-Stat-Signature: ioop1xswzh3xqz41fjtoqcee8momma4y Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=s02dGKNs; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf20.hostedemail.com: domain of 3YKBpYgMKCGEOBBFNNFKD.BNLKHMTW-LLJU9BJ.NQF@flex--pcc.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3YKBpYgMKCGEOBBFNNFKD.BNLKHMTW-LLJU9BJ.NQF@flex--pcc.bounces.google.com X-Rspam-User: X-HE-Tag: 1651089501-460469 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: An inclusion of cache.h in printk.h was added in 2014 in commit c28aa1f0a847 ("printk/cache: mark printk_once test variable __read_mostly") in order to bring in the definition of __read_mostly. The usage of __read_mostly was later removed in commit 3ec25826ae33 ("printk: Tie printk_once / printk_deferred_once into .data.once for reset") which made the inclusion of cache.h unnecessary, so remove it. We have a small amount of code that depended on the inclusion of cache.h from printk.h; fix that code to include the appropriate header. This fixes a circular inclusion on arm64 (linux/printk.h -> linux/cache.h -> asm/cache.h -> linux/kasan-enabled.h -> linux/static_key.h -> linux/jump_label.h -> linux/bug.h -> asm/bug.h -> linux/printk.h) that would otherwise be introduced by the next patch. Build tested using {allyesconfig,defconfig} x {arm64,x86_64}. Link: https://linux-review.googlesource.com/id/I8fd51f72c9ef1f2d6afd3b2cbc875aa4792c1fba Signed-off-by: Peter Collingbourne --- v5: - fixes for arm randconfig and (tentatively) csky arch/arm64/include/asm/mte-kasan.h | 1 + arch/arm64/include/asm/percpu.h | 1 + arch/csky/include/asm/processor.h | 2 +- drivers/firmware/smccc/kvm_guest.c | 1 + include/linux/printk.h | 1 - kernel/bpf/bpf_lru_list.h | 1 + 6 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/mte-kasan.h b/arch/arm64/include/asm/mte-kasan.h index a857bcacf0fe..9f79425fc65a 100644 --- a/arch/arm64/include/asm/mte-kasan.h +++ b/arch/arm64/include/asm/mte-kasan.h @@ -6,6 +6,7 @@ #define __ASM_MTE_KASAN_H #include +#include #include #ifndef __ASSEMBLY__ diff --git a/arch/arm64/include/asm/percpu.h b/arch/arm64/include/asm/percpu.h index 8f1661603b78..b9ba19dbdb69 100644 --- a/arch/arm64/include/asm/percpu.h +++ b/arch/arm64/include/asm/percpu.h @@ -10,6 +10,7 @@ #include #include #include +#include static inline void set_my_cpu_offset(unsigned long off) { diff --git a/arch/csky/include/asm/processor.h b/arch/csky/include/asm/processor.h index 688c7548b559..9638206bc44f 100644 --- a/arch/csky/include/asm/processor.h +++ b/arch/csky/include/asm/processor.h @@ -4,9 +4,9 @@ #define __ASM_CSKY_PROCESSOR_H #include +#include #include #include -#include #include #include #include diff --git a/drivers/firmware/smccc/kvm_guest.c b/drivers/firmware/smccc/kvm_guest.c index 2d3e866decaa..89a68e7eeaa6 100644 --- a/drivers/firmware/smccc/kvm_guest.c +++ b/drivers/firmware/smccc/kvm_guest.c @@ -4,6 +4,7 @@ #include #include +#include #include #include diff --git a/include/linux/printk.h b/include/linux/printk.h index 1522df223c0f..8e8d74edf121 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -6,7 +6,6 @@ #include #include #include -#include #include #include diff --git a/kernel/bpf/bpf_lru_list.h b/kernel/bpf/bpf_lru_list.h index 6b12f06ee18c..4ea227c9c1ad 100644 --- a/kernel/bpf/bpf_lru_list.h +++ b/kernel/bpf/bpf_lru_list.h @@ -4,6 +4,7 @@ #ifndef __BPF_LRU_LIST_H_ #define __BPF_LRU_LIST_H_ +#include #include #include -- 2.36.0.464.gb9c8b46e94-goog