linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Sean Christopherson <sean.j.christopherson@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"the arch/x86 maintainers" <x86@kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	Tony Luck <tony.luck@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ard Biesheuvel <ardb@kernel.org>,
	Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andy@infradead.org>,
	Nadav Amit <namit@vmware.com>,
	"VMware, Inc." <pv-drivers@vmware.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hans de Goede <hdegoede@redhat.com>,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Jie Yang <yang.jie@linux.intel.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	linux-ia64@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-pm <linux-pm@vger.kernel.org>,
	linux-efi <linux-efi@vger.kernel.org>,
	platform-driver-x86@vger.kernel.org,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH 00/12] treewide: break dependencies on x86's RM header
Date: Tue, 19 Nov 2019 13:33:09 +0100	[thread overview]
Message-ID: <CAKv+Gu8XY_VCyi0bRqf2E7g_PXyHU83w-e+JvzeCBc+X1Xcrbg@mail.gmail.com> (raw)
In-Reply-To: <20191119122217.GA24878@gmail.com>

On Tue, 19 Nov 2019 at 13:22, Ingo Molnar <mingo@kernel.org> wrote:
>
>
> * Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> > On Tue, 19 Nov 2019 at 12:10, Ingo Molnar <mingo@kernel.org> wrote:
> > >
> > >
> > > * Sean Christopherson <sean.j.christopherson@intel.com> wrote:
> > >
> > > > x86's asm/realmode.h, which defines low level structures, variables and
> > > > helpers used to bring up APs during SMP boot, ends up getting included in
> > > > practically every nook and cranny of the kernel because the address used
> > > > by ACPI for resuming from S3 also happens to be stored in the real mode
> > > > header, and ACPI bleeds the dependency into its widely included headers.
> > > >
> > > > As a result, modifying realmode.h for even the most trivial change to the
> > > > boot code triggers a full kernel rebuild, which is frustrating to say the
> > > > least as it some of the most difficult code to get exactly right *and* is
> > > > also some of the most functionally isolated code in the kernel.
> > > >
> > > > To break the kernel's widespread dependency on realmode.h, add a wrapper
> > > > in the aforementioned ACPI S3 code to access the real mode header instead
> > > > of derefencing the header directly in asm/acpi.h and thereby exposing it
> > > > to the world via linux/acpi.h.
> > > >
> > > > Build tested on x86 with allyesconfig and allmodconfig, so hopefully there
> > > > aren't more build issues lurking, but at this point it wouldn't surprise
> > > > me in the least if this somehow manages to break the build.
> > > >
> > > > Based on tip/master, commit ceceaf1f12ba ("Merge branch 'WIP.x86/cleanups'").
> > > >
> > > > Patch Synopsis:
> > > >   - Patches 01-09 fix a variety of build errors that arise when patch 12
> > > >     drops realmode.h from asm/acpi.h.  Most of the errors are quite absurb
> > > >     as they have no relation whatsoever to x86's RM boot code, but occur
> > > >     because realmode.h happens to include asm/io.h.
> > >
> > > Yeah, these kind of parasitic header dependencies are the main driving
> > > force behind kernel header spaghetti hell: it's super easy to add a new
> > > header, but very hard to remove them...
> > >
> > > Hence they practically only accumulate.
> > >
> > > As a result header removal patches get priority, from me at least. :-)
> > >
> > > >   - Patch 10 removes a spurious include of realmode.h from an ACPI header.
> > > >
> > > >   - Patches 11 and 12 implement the wrapper and move it out of acpi.h.
> > >
> > > So if the ACPI maintainers are fine with -tip carrying patches #11 and #12
> > > then I'd be glad to route these patches upstream.
> > >
> > > I've applied them to tip:WIP.core/headers as a work-in-progress tree, and
> > > I'm testing them on randconfigs to make sure there's no broken
> > > dependencies. I'll wait for the ACPI acks.
> > >
> > > I edited the title of patch 12 slightly, to:
> > >
> > >    c8bceb321209: x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c, remove <asm/realmode.h> from <asm/acpi.h>
> > >
> > > to make sure the big header dependency change is obvious at first sight.
> > >
> >
> > I'm fine with the patches but can we drop the fixes headers please?
> > This doesn't actually fix anything, and touching early boot stuff for
> > no good reason should be avoided imo.
>
> Agreed and done.
>

Thanks Ingo

      reply	other threads:[~2019-11-19 12:33 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
2019-11-19  0:21 ` [PATCH 01/12] x86/efi: Explicitly include realmode.h to handle RM trampoline quirk Sean Christopherson
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 02/12] x86/boot: Explicitly include realmode.h to handle RM reservations Sean Christopherson
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 03/12] x86/ftrace: Explicitly include vmalloc.h for set_vm_flush_reset_perms() Sean Christopherson
2019-11-22  2:11   ` Steven Rostedt
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 04/12] x86/kprobes: " Sean Christopherson
2019-11-22  2:12   ` Steven Rostedt
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 05/12] perf/x86/intel: Explicitly include asm/io.h to use virt_to_phys() Sean Christopherson
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 06/12] efi/capsule-loader: Explicitly include linux/io.h for page_to_phys() Sean Christopherson
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 07/12] virt: vbox: Explicitly include linux/io.h to pick up various defs Sean Christopherson
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 08/12] vmw_balloon: Explicitly include linux/io.h for virt_to_phys() Sean Christopherson
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 09/12] ASoC: Intel: Skylake: " Sean Christopherson
2019-11-19 12:00   ` Mark Brown
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 10/12] x86/ACPI/sleep: Remove an unnecessary include of asm/realmode.h Sean Christopherson
2019-11-20 10:59   ` Rafael J. Wysocki
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function Sean Christopherson
2019-11-20 10:58   ` Rafael J. Wysocki
2019-11-25 10:48     ` Pavel Machek
2019-11-25 17:00       ` Sean Christopherson
2019-11-26 11:16         ` Ingo Molnar
2019-11-26 11:25           ` Ingo Molnar
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 12/12] x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c Sean Christopherson
2019-11-20 11:00   ` Rafael J. Wysocki
2019-11-26  8:00   ` [tip: core/headers] x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c, remove <asm/realmode.h> from <asm/acpi.h> tip-bot2 for Sean Christopherson
2019-11-19 11:10 ` [PATCH 00/12] treewide: break dependencies on x86's RM header Ingo Molnar
2019-11-19 12:06   ` [PATCH] x86/platform/intel/quark: Explicitly include linux/io.h for virt_to_phys() Ingo Molnar
2019-11-19 12:38     ` Andy Shevchenko
2019-11-19 12:09   ` [PATCH 00/12] treewide: break dependencies on x86's RM header Ard Biesheuvel
2019-11-19 12:22     ` Ingo Molnar
2019-11-19 12:33       ` Ard Biesheuvel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKv+Gu8XY_VCyi0bRqf2E7g_PXyHU83w-e+JvzeCBc+X1Xcrbg@mail.gmail.com \
    --to=ard.biesheuvel@linaro.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andy@infradead.org \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=dvhart@infradead.org \
    --cc=fenghua.yu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=len.brown@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=namit@vmware.com \
    --cc=pavel@ucw.cz \
    --cc=perex@perex.cz \
    --cc=peterz@infradead.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    --cc=rjw@rjwysocki.net \
    --cc=rostedt@goodmis.org \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.com \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=yang.jie@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).