| .. | .. | 
|---|
| 24 | 24 |  KBUILD_IMAGE := vmlinuz | 
|---|
| 25 | 25 |  endif | 
|---|
| 26 | 26 |   | 
|---|
| 27 |  | -KBUILD_DEFCONFIG := default_defconfig  | 
|---|
| 28 |  | -  | 
|---|
| 29 | 27 |  NM		= sh $(srctree)/arch/parisc/nm | 
|---|
| 30 | 28 |  CHECKFLAGS	+= -D__hppa__=1 | 
|---|
| 31 |  | -LIBGCC		= $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)  | 
|---|
| 32 |  | -export LIBGCC  | 
|---|
| 33 | 29 |   | 
|---|
| 34 | 30 |  ifdef CONFIG_64BIT | 
|---|
| 35 | 31 |  UTS_MACHINE	:= parisc64 | 
|---|
| .. | .. | 
|---|
| 41 | 37 |  LD_BFD		:= elf32-hppa-linux | 
|---|
| 42 | 38 |  endif | 
|---|
| 43 | 39 |   | 
|---|
 | 40 | +# select defconfig based on actual architecture  | 
|---|
 | 41 | +ifeq ($(shell uname -m),parisc64)  | 
|---|
 | 42 | +	KBUILD_DEFCONFIG := generic-64bit_defconfig  | 
|---|
 | 43 | +else  | 
|---|
 | 44 | +	KBUILD_DEFCONFIG := generic-32bit_defconfig  | 
|---|
 | 45 | +endif  | 
|---|
 | 46 | +  | 
|---|
| 44 | 47 |  export LD_BFD | 
|---|
| 45 | 48 |   | 
|---|
| 46 | 49 |  ifneq ($(SUBARCH),$(UTS_MACHINE)) | 
|---|
| .. | .. | 
|---|
| 50 | 53 |  			$(foreach a,$(CC_ARCHES), \ | 
|---|
| 51 | 54 |  			$(foreach s,$(CC_SUFFIXES),$(a)-$(s)-))) | 
|---|
| 52 | 55 |  	endif | 
|---|
 | 56 | +endif  | 
|---|
 | 57 | +  | 
|---|
 | 58 | +ifdef CONFIG_DYNAMIC_FTRACE  | 
|---|
 | 59 | +ifdef CONFIG_64BIT  | 
|---|
 | 60 | +NOP_COUNT := 8  | 
|---|
 | 61 | +else  | 
|---|
 | 62 | +NOP_COUNT := 5  | 
|---|
 | 63 | +endif  | 
|---|
 | 64 | +  | 
|---|
 | 65 | +export CC_USING_RECORD_MCOUNT:=1  | 
|---|
 | 66 | +export CC_USING_PATCHABLE_FUNCTION_ENTRY:=1  | 
|---|
 | 67 | +  | 
|---|
 | 68 | +KBUILD_AFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY=1  | 
|---|
 | 69 | +KBUILD_CFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY=1 \  | 
|---|
 | 70 | +		 -DFTRACE_PATCHABLE_FUNCTION_SIZE=$(NOP_COUNT)  | 
|---|
 | 71 | +  | 
|---|
 | 72 | +CC_FLAGS_FTRACE := -fpatchable-function-entry=$(NOP_COUNT),$(shell echo $$(($(NOP_COUNT)-1)))  | 
|---|
| 53 | 73 |  endif | 
|---|
| 54 | 74 |   | 
|---|
| 55 | 75 |  OBJCOPY_FLAGS =-O binary -R .note -R .comment -S | 
|---|
| .. | .. | 
|---|
| 93 | 113 |  head-y			:= arch/parisc/kernel/head.o  | 
|---|
| 94 | 114 |   | 
|---|
| 95 | 115 |  KBUILD_CFLAGS	+= $(cflags-y) | 
|---|
 | 116 | +LIBGCC		:= $(shell $(CC) -print-libgcc-file-name)  | 
|---|
 | 117 | +export LIBGCC  | 
|---|
| 96 | 118 |   | 
|---|
| 97 | 119 |  kernel-y			:= mm/ kernel/ math-emu/ | 
|---|
| 98 | 120 |   | 
|---|
| .. | .. | 
|---|
| 107 | 129 |  	elif [ -x /sbin/palo ]; then echo /sbin/palo; \ | 
|---|
| 108 | 130 |  	fi) | 
|---|
| 109 | 131 |   | 
|---|
| 110 |  | -PALOCONF := $(shell if [ -f $(src)/palo.conf ]; then echo $(src)/palo.conf; \  | 
|---|
| 111 |  | -	else echo $(obj)/palo.conf; \  | 
|---|
 | 132 | +PALOCONF := $(shell if [ -f $(srctree)/palo.conf ]; then echo $(srctree)/palo.conf; \  | 
|---|
 | 133 | +	else echo $(objtree)/palo.conf; \  | 
|---|
| 112 | 134 |  	fi) | 
|---|
| 113 | 135 |   | 
|---|
| 114 | 136 |  palo lifimage: vmlinuz | 
|---|
| .. | .. | 
|---|
| 118 | 140 |  		false; \ | 
|---|
| 119 | 141 |  	fi | 
|---|
| 120 | 142 |  	@if test ! -f "$(PALOCONF)"; then \ | 
|---|
| 121 |  | -		cp $(src)/arch/parisc/defpalo.conf $(obj)/palo.conf; \  | 
|---|
| 122 |  | -		echo 'A generic palo config file ($(obj)/palo.conf) has been created for you.'; \  | 
|---|
 | 143 | +		cp $(srctree)/arch/parisc/defpalo.conf $(objtree)/palo.conf; \  | 
|---|
 | 144 | +		echo 'A generic palo config file ($(objree)/palo.conf) has been created for you.'; \  | 
|---|
| 123 | 145 |  		echo 'You should check it and re-run "make palo".'; \ | 
|---|
| 124 | 146 |  		echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \ | 
|---|
| 125 | 147 |  		false; \ | 
|---|
| .. | .. | 
|---|
| 145 | 167 |  	$(OBJCOPY) $(boot)/bzImage $@ | 
|---|
| 146 | 168 |  else | 
|---|
| 147 | 169 |  vmlinuz: vmlinux | 
|---|
| 148 |  | -	@gzip -cf -9 $< > $@  | 
|---|
 | 170 | +	@$(KGZIP) -cf -9 $< > $@  | 
|---|
| 149 | 171 |  endif | 
|---|
| 150 | 172 |   | 
|---|
| 151 | 173 |  install: | 
|---|
| 152 |  | -	$(CONFIG_SHELL) $(src)/arch/parisc/install.sh \  | 
|---|
 | 174 | +	$(CONFIG_SHELL) $(srctree)/arch/parisc/install.sh \  | 
|---|
| 153 | 175 |  			$(KERNELRELEASE) vmlinux System.map "$(INSTALL_PATH)" | 
|---|
| 154 | 176 |  zinstall: | 
|---|
| 155 |  | -	$(CONFIG_SHELL) $(src)/arch/parisc/install.sh \  | 
|---|
 | 177 | +	$(CONFIG_SHELL) $(srctree)/arch/parisc/install.sh \  | 
|---|
| 156 | 178 |  			$(KERNELRELEASE) vmlinuz System.map "$(INSTALL_PATH)" | 
|---|
| 157 | 179 |   | 
|---|
| 158 | 180 |  CLEAN_FILES	+= lifimage | 
|---|
| .. | .. | 
|---|
| 169 | 191 |  	@echo  '  zinstall	- Install compressed vmlinuz kernel' | 
|---|
| 170 | 192 |  endef | 
|---|
| 171 | 193 |   | 
|---|
| 172 |  | -# we require gcc 3.3 or above to compile the kernel  | 
|---|
| 173 |  | -archprepare: checkbin  | 
|---|
| 174 |  | -checkbin:  | 
|---|
| 175 |  | -	@if test "$(cc-version)" -lt "0303"; then \  | 
|---|
| 176 |  | -		echo -n "Sorry, GCC v3.3 or above is required to build " ; \  | 
|---|
| 177 |  | -		echo "the kernel." ; \  | 
|---|
| 178 |  | -		false ; \  | 
|---|
| 179 |  | -	fi  | 
|---|
 | 194 | +archclean:  | 
|---|
 | 195 | +	$(Q)$(MAKE) $(clean)=$(boot)  | 
|---|
 | 196 | +  | 
|---|
 | 197 | +archheaders:  | 
|---|
 | 198 | +	$(Q)$(MAKE) $(build)=arch/parisc/kernel/syscalls all  | 
|---|