The need for this series arose from a completely unrelated series [1].
Long story short, that series causes <linux/mm.h> to include
<linux/set_memory.h>, which doesn't feel too unreasonable.
That works fine on arm64 and probably most other architectures, but not
on x86 [2]: <asm/set_memory.h> itself includes <linux/mm.h>, creating a
circular dependency.
set_memory.h doesn't really need <linux/mm.h>, so removing that include
seems like the right thing to do. That turned out to be a little more
involved than expected, hence this series:
* Patch 1-2 ensure that code doesn't rely on <asm/set_memory.h>
including <linux/mm.h>. The errors that these patches fix are included
at the end of this email.
* Patch 3 removes an unused function whose declaration relied on
<linux/mm.h> being included.
* Patch 4 actually remove the include.
I've build-tested this series with x86_64_defconfig and allyesconfig.
- Kevin
[1] https://lore.kernel.org/linux-hardening/20241206101110.1646108-1-kevin.brodsky@xxxxxxx/
[2] https://lore.kernel.org/oe-kbuild-all/202412062006.C23V9ESs-lkp@xxxxxxxxx/
Cc: bp@xxxxxxxxx
Cc: dan.j.williams@xxxxxxxxx
Cc: dave.hansen@xxxxxxxxxxxxxxx
Cc: david@xxxxxxxxxx
Cc: jane.chu@xxxxxxxxxx
Cc: osalvador@xxxxxxx
Cc: tglx@xxxxxxxxxxxxx
---