Message ID | 20150804121801.GA28571@dhcp22.suse.cz |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
Hi Michal, On Tue, Aug 4, 2015 at 10:18 PM, Michal Hocko <mhocko@kernel.org> wrote: > On Sat 01-08-15 20:02:20, Guenter Roeck wrote: >> Hi, >> >> Commit b65390c6c2178f ("memcg: export struct mem_cgroup") causes several >> build failures in -next (next-20150731) when trying to build >> sparc32:allmodconfig. >> >> Below are some of the errors, as well as a bisect log. >> >> Guenter >> >> --- >> In file included from include/linux/pid_namespace.h:6:0, >> from include/linux/ptrace.h:8, >> from include/linux/ftrace.h:13, >> from include/linux/init_task.h:8, >> from init/init_task.c:1: >> include/linux/mm.h: At top level: >> include/linux/mm.h:888:7: error: conflicting types for 'page_address' >> ./arch/sparc/include/asm/highmem.h:59:10: note: previous implicit declaration of 'page_address' was here > > This is weird: > * include/linux/mm.h:888 > > #if defined(HASHED_PAGE_VIRTUAL) > void *page_address(const struct page *page); > void set_page_address(struct page *page, void *virtual); > void page_address_init(void); > #endif > > * arch/sparc/include/asm/highmem.h:59 > static inline void *kmap(struct page *page) > { > BUG_ON(in_interrupt()); > if (!PageHighMem(page)) > return page_address(page); > return kmap_high(page); > } > > How come we have conflicting types here. page_address is clearly not > a function declaration in sparc code. Maybe something expands to an > incomplete c construct. > > I have tried to crosscompile with > https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/ but > failed with strange errors. > $ PATH=/mnt/share/devel/miso/crosstool/sparc/gcc-4.6.3-nolibc/x86_64-linux/bin:$PATH CROSS_COMPILE=x86_64-linux- ARCH=sparc32 make allmodconfig > warning: (USB_OTG_FSM && FSL_USB2_OTG && USB_MV_OTG) selects USB_OTG which has unmet direct dependencies (USB_SUPPORT && USB && PM) > warning: (MFD_CROS_EC) selects CHROME_PLATFORMS which has unmet direct dependencies (X86 || ARM) > warning: (SND_SOC_ROCKCHIP_MAX98090 && SND_SOC_ROCKCHIP_RT5645) selects SND_SOC_ROCKCHIP_I2S which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && CLKDEV_LOOKUP && SND_SOC_ROCKCHIP) > $ PATH=/mnt/share/devel/miso/crosstool/sparc/gcc-4.6.3-nolibc/x86_64-linux/bin:$PATH CROSS_COMPILE=x86_64-linux- ARCH=sparc32 make It's failing because you're trying to compile sparc32 code with an x86_64 compiler. Try something like: PATH=/mnt/share/devel/miso/crosstool/sparc/gcc-4.6.3-nolibc/x86_64-linux/bin:$PATH CROSS_COMPILE=sparc-linux- ARCH=sparc32 make Thanks,
On Tue 04-08-15 23:42:09, Julian Calaby wrote: > It's failing because you're trying to compile sparc32 code with an > x86_64 compiler. > > Try something like: > PATH=/mnt/share/devel/miso/crosstool/sparc/gcc-4.6.3-nolibc/x86_64-linux/bin:$PATH > CROSS_COMPILE=sparc-linux- ARCH=sparc32 make Ohh, right you are. I misunderstood and thought this was a x86 build of the compiler for sparc. This has worked out. It works now. Thanks a lot!
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h index f06b36a00a3b..df5c9b16ea12 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h @@ -348,22 +348,14 @@ void srmmu_mapiorange(unsigned int bus, unsigned long xpa, void srmmu_unmapiorange(unsigned long virt_addr, unsigned int len); /* Encode and de-code a swap entry */ -static inline unsigned long __swp_type(swp_entry_t entry) -{ - return (entry.val >> SRMMU_SWP_TYPE_SHIFT) & SRMMU_SWP_TYPE_MASK; -} - -static inline unsigned long __swp_offset(swp_entry_t entry) -{ - return (entry.val >> SRMMU_SWP_OFF_SHIFT) & SRMMU_SWP_OFF_MASK; -} - -static inline swp_entry_t __swp_entry(unsigned long type, unsigned long offset) -{ - return (swp_entry_t) { - (type & SRMMU_SWP_TYPE_MASK) << SRMMU_SWP_TYPE_SHIFT - | (offset & SRMMU_SWP_OFF_MASK) << SRMMU_SWP_OFF_SHIFT }; -} +#define __swp_type(entry) (((entry).val >> SRMMU_SWP_TYPE_MASK) & SRMMU_SWP_TYPE_MASK) +#define __swp_offset(entry) (((entry).val >> SRMMU_SWP_OFF_SHIFT) & SRMMU_SWP_OFF_MASK) +#define __swp_entry(type, offset) \ + ( (swp_entry_t) \ + { \ + (((type) & SRMMU_SWP_TYPE_MASK) << SRMMU_SWP_TYPE_SHIFT | \ + ((offset) & SRMMU_SWP_OFF_MASK) << SRMMU_SWP_OFF_SHIFT) \ + } ) #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) #define __swp_entry_to_pte(x) ((pte_t) { (x).val })