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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A0A5C4332F for ; Thu, 22 Dec 2022 10:47:05 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8J5z-0001zF-3b; Thu, 22 Dec 2022 05:46:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8J5x-0001y7-KB for qemu-devel@nongnu.org; Thu, 22 Dec 2022 05:46:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8J5v-0006VD-CI for qemu-devel@nongnu.org; Thu, 22 Dec 2022 05:46:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671705993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KaY0/6O111T/px4XFe1x+6bXkBTtiyj2OjerPk9Ar+Y=; b=PQfp70fO4qawLMpC8/V63tVMO5wEO0W1hOTJu7XpFoQiGqYIsBtrRJGY1naASsT91St+/q OHZJ5z02hMZ8BpYAYIRWT9bEE83sRXbBKsRYrLG2hVUnOGAlzLo9REAIw2s4fyUb+n06fu hj+U7gHHReD7D6j/2gzbXLgGRvhxl2s= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-437-kzPHc1bpMoa3VuBxvPPfjQ-1; Thu, 22 Dec 2022 05:46:30 -0500 X-MC-Unique: kzPHc1bpMoa3VuBxvPPfjQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B8A45811E9C; Thu, 22 Dec 2022 10:46:29 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.195.91]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9514214152F4; Thu, 22 Dec 2022 10:46:29 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 68CCD21E691D; Thu, 22 Dec 2022 11:46:28 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: clg@kaod.org, qemu-ppc@nongnu.org, philmd@linaro.org Subject: [PATCH v2 0/4] hw/ppc: Clean up includes Date: Thu, 22 Dec 2022 11:46:24 +0100 Message-Id: <20221222104628.659681-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Back in 2016, we discussed[1] rules for headers, and these were generally liked: 1. Have a carefully curated header that's included everywhere first. We got that already thanks to Peter: osdep.h. 2. Headers should normally include everything they need beyond osdep.h. If exceptions are needed for some reason, they must be documented in the header. If all that's needed from a header is typedefs, put those into qemu/typedefs.h instead of including the header. 3. Cyclic inclusion is forbidden. After this series, include/hw/ppc and include/hw/pci-host/pnv* conform to these rules. It is based on [PATCH v2 0/7] include/hw/pci include/hw/cxl: Clean up includes [PATCH v2 0/3] block: Clean up includes [PATCH v3 0/5] coroutine: Clean up includes v2: * PATCH 3: Drop an #include [Cédric] * PATCH 4: Add it back, because now we actually need it [1] Message-ID: <87h9g8j57d.fsf@blackfin.pond.sub.org> https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html Based-on: <20221222100330.380143-1-armbru@redhat.com> Markus Armbruster (4): include/hw/ppc: Split pnv_chip.h off pnv.h include/hw/ppc: Supply a few missing includes include/hw/ppc: Don't include hw/pci-host/pnv_phb.h from pnv.h include/hw/ppc include/hw/pci-host: Drop extra typedefs hw/pci-host/pnv_phb.h | 2 +- include/hw/pci-host/pnv_phb3.h | 1 - include/hw/pci-host/pnv_phb4.h | 5 +- include/hw/ppc/pnv.h | 146 +------------------------------- include/hw/ppc/pnv_chip.h | 147 +++++++++++++++++++++++++++++++++ include/hw/ppc/pnv_core.h | 3 +- include/hw/ppc/pnv_homer.h | 2 +- include/hw/ppc/pnv_lpc.h | 11 +-- include/hw/ppc/pnv_occ.h | 3 +- include/hw/ppc/pnv_pnor.h | 2 +- include/hw/ppc/pnv_sbe.h | 3 +- include/hw/ppc/pnv_xive.h | 7 +- include/hw/ppc/pnv_xscom.h | 3 +- include/hw/ppc/xive2.h | 2 + include/hw/ppc/xive2_regs.h | 2 + hw/intc/pnv_xive.c | 1 + hw/intc/pnv_xive2.c | 1 + hw/pci-host/pnv_phb3.c | 1 + hw/pci-host/pnv_phb4_pec.c | 1 + hw/ppc/pnv.c | 3 + hw/ppc/pnv_core.c | 1 + hw/ppc/pnv_homer.c | 1 + hw/ppc/pnv_lpc.c | 1 + hw/ppc/pnv_psi.c | 1 + hw/ppc/pnv_xscom.c | 1 + 25 files changed, 186 insertions(+), 165 deletions(-) create mode 100644 include/hw/ppc/pnv_chip.h -- 2.38.1