Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86 merge fallout: uml

Don't undef __i386__/__x86_64__ in uml anymore, make sure that (few) places
that required adjusting the ifdefs got those.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Al Viro and committed by
Linus Torvalds
ca5cd877 2a397e82

+13 -23
+1 -2
arch/um/Makefile-i386
··· 9 9 ELF_FORMAT := elf32-$(SUBARCH) 10 10 OBJCOPYFLAGS := -O binary -R .note -R .comment -S 11 11 HEADER_ARCH := x86 12 + CHECKFLAGS += -D__i386__ 12 13 13 14 ifeq ("$(origin SUBARCH)", "command line") 14 15 ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") ··· 26 25 AFLAGS += -DCONFIG_X86_32 27 26 CONFIG_X86_32 := y 28 27 export CONFIG_X86_32 29 - 30 - ARCH_KERNEL_DEFINES += -U__$(SUBARCH)__ -U$(SUBARCH) 31 28 32 29 # First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y. 33 30 include $(srctree)/arch/i386/Makefile.cpu
+1 -4
arch/um/Makefile-x86_64
··· 6 6 7 7 _extra_flags_ = -fno-builtin -m64 8 8 9 - #We #undef __x86_64__ for kernelspace, not for userspace where 10 - #it's needed for headers to work! 11 - ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__ 12 9 KBUILD_CFLAGS += $(_extra_flags_) 13 10 14 - CHECKFLAGS += -m64 11 + CHECKFLAGS += -m64 -D__x86_64__ 15 12 KBUILD_AFLAGS += -m64 16 13 LDFLAGS += -m elf_x86_64 17 14 KBUILD_CPPFLAGS += -m64
+2 -2
drivers/char/mem.c
··· 41 41 */ 42 42 static inline int uncached_access(struct file *file, unsigned long addr) 43 43 { 44 - #if defined(__i386__) 44 + #if defined(__i386__) && !defined(__arch_um__) 45 45 /* 46 46 * On the PPro and successors, the MTRRs are used to set 47 47 * memory types for physical addresses outside main memory, ··· 57 57 test_bit(X86_FEATURE_CYRIX_ARR, boot_cpu_data.x86_capability) || 58 58 test_bit(X86_FEATURE_CENTAUR_MCR, boot_cpu_data.x86_capability) ) 59 59 && addr >= __pa(high_memory); 60 - #elif defined(__x86_64__) 60 + #elif defined(__x86_64__) && !defined(__arch_um__) 61 61 /* 62 62 * This is broken because it can generate memory type aliases, 63 63 * which can cause cache corruptions
+2 -2
drivers/md/raid6algos.c
··· 52 52 &raid6_intx16, 53 53 &raid6_intx32, 54 54 #endif 55 - #if defined(__i386__) 55 + #if defined(__i386__) && !defined(__arch_um__) 56 56 &raid6_mmxx1, 57 57 &raid6_mmxx2, 58 58 &raid6_sse1x1, ··· 60 60 &raid6_sse2x1, 61 61 &raid6_sse2x2, 62 62 #endif 63 - #if defined(__x86_64__) 63 + #if defined(__x86_64__) && !defined(__arch_um__) 64 64 &raid6_sse2x1, 65 65 &raid6_sse2x2, 66 66 &raid6_sse2x4,
+1 -1
drivers/md/raid6mmx.c
··· 16 16 * MMX implementation of RAID-6 syndrome functions 17 17 */ 18 18 19 - #if defined(__i386__) 19 + #if defined(__i386__) && !defined(__arch_um__) 20 20 21 21 #include "raid6.h" 22 22 #include "raid6x86.h"
+1 -1
drivers/md/raid6sse1.c
··· 21 21 * worthwhile as a separate implementation. 22 22 */ 23 23 24 - #if defined(__i386__) 24 + #if defined(__i386__) && !defined(__arch_um__) 25 25 26 26 #include "raid6.h" 27 27 #include "raid6x86.h"
+2 -2
drivers/md/raid6sse2.c
··· 17 17 * 18 18 */ 19 19 20 - #if defined(__i386__) || defined(__x86_64__) 20 + #if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__) 21 21 22 22 #include "raid6.h" 23 23 #include "raid6x86.h" ··· 161 161 162 162 #endif 163 163 164 - #ifdef __x86_64__ 164 + #if defined(__x86_64__) && !defined(__arch_um__) 165 165 166 166 /* 167 167 * Unrolled-by-4 SSE2 implementation
+1 -1
drivers/md/raid6x86.h
··· 19 19 #ifndef LINUX_RAID_RAID6X86_H 20 20 #define LINUX_RAID_RAID6X86_H 21 21 22 - #if defined(__i386__) || defined(__x86_64__) 22 + #if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__) 23 23 24 24 #ifdef __KERNEL__ /* Real code */ 25 25
-1
include/asm-um/unistd.h
··· 14 14 15 15 #ifdef __KERNEL__ 16 16 /* We get __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 from the base arch */ 17 - #define __ARCH_WANT_IPC_PARSE_VERSION 18 17 #define __ARCH_WANT_OLD_READDIR 19 18 #define __ARCH_WANT_SYS_ALARM 20 19 #define __ARCH_WANT_SYS_GETHOSTNAME
+1 -6
include/linux/eventpoll.h
··· 32 32 * On x86-64 make the 64bit structure have the same alignment as the 33 33 * 32bit structure. This makes 32bit emulation easier. 34 34 * 35 - * UML/x86_64 needs the same packing as x86_64 - UML + UML_X86 + 36 - * 64_BIT adds up to UML/x86_64. 35 + * UML/x86_64 needs the same packing as x86_64 37 36 */ 38 37 #ifdef __x86_64__ 39 38 #define EPOLL_PACKED __attribute__((packed)) 40 39 #else 41 - #if defined(CONFIG_UML) && defined(CONFIG_UML_X86) && defined(CONFIG_64BIT) 42 - #define EPOLL_PACKED __attribute__((packed)) 43 - #else 44 40 #define EPOLL_PACKED 45 - #endif 46 41 #endif 47 42 48 43 struct epoll_event {
+1 -1
kernel/signal.c
··· 732 732 printk("%s/%d: potentially unexpected fatal signal %d.\n", 733 733 current->comm, task_pid_nr(current), signr); 734 734 735 - #ifdef __i386__ 735 + #if defined(__i386__) && !defined(__arch_um__) 736 736 printk("code at %08lx: ", regs->eip); 737 737 { 738 738 int i;