This is a note to let you know that I've just added the patch titled MIPS: Rewrite pfn_valid to work in modules, too. to the 3.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mips-rewrite-pfn_valid-to-work-in-modules-too.patch and it can be found in the queue-3.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From linux@xxxxxxxxxxxx Fri Aug 16 05:40:22 2013 From: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Date: Thu, 15 Aug 2013 22:35:53 -0700 Subject: MIPS: Rewrite pfn_valid to work in modules, too. To: linux-stable@xxxxxxxxxxxxxxx Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Ralf Baechle <ralf@xxxxxxxxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx> Message-ID: <1376631353-26726-1-git-send-email-linux@xxxxxxxxxxxx> From: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Upstream commit 8b9232141bf40788cce31f893c13f344ec31ee66. This fixes: MODPOST 393 modules ERROR: "min_low_pfn" [arch/mips/kvm/kvm.ko] undefined! make[3]: *** [__modpost] Error 1 It would have been possible to just export min_low_pfn but in the end pfn_valid should return 1 for any pfn argument for which a struct page exists so using min_low_pfn was wrong anyway. [Backport to 3.4 kernel. Applies cleanly on top of current 3.4 patch queue, and fixes "make ARCH=mips allmodconfig; make ARCH=mips" build problem. - Guenter] Signed-off-by: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/mips/include/asm/page.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h @@ -175,14 +175,15 @@ typedef struct { unsigned long pgprot; } #ifdef CONFIG_FLATMEM -#define pfn_valid(pfn) \ -({ \ - unsigned long __pfn = (pfn); \ - /* avoid <linux/bootmem.h> include hell */ \ - extern unsigned long min_low_pfn; \ - \ - __pfn >= min_low_pfn && __pfn < max_mapnr; \ -}) +#ifndef __ASSEMBLY__ +static inline int pfn_valid(unsigned long pfn) +{ + /* avoid <linux/mm.h> include hell */ + extern unsigned long max_mapnr; + + return pfn >= ARCH_PFN_OFFSET && pfn < max_mapnr; +} +#endif #elif defined(CONFIG_SPARSEMEM) Patches currently in stable-queue which might be from ralf@xxxxxxxxxxxxxx are queue-3.4/mips-expose-missing-pci_io-map-unmap-declarations.patch queue-3.4/sound-fix-make-allmodconfig-on-mips.patch queue-3.4/mips-rewrite-pfn_valid-to-work-in-modules-too.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html