Skip to content

Commit 9daeaa3

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next
Pull sparc updates from David Miller: 1) Kill off support for sun4c and Cypress sun4m chips. And as a result we were able to also kill off that ugly btfixup thing that required multi-stage links of the final vmlinux image in the Kbuild system. This should make the kbuild maintainers really happy. Thanks a lot to Sam Ravnborg for his tireless efforts to get this going. 2) Convert sparc64 to nobootmem. I suspect now with sparc32 being a lot cleaner, it should be able to fall in line and modernize in this area too. 3) Make sparc32 use generic clockevents, from Tkhai Kirill. [ I fixed up the BPF rules, and tried to clean up the build rules too. But I don't have - or want - a sparc cross-build environment, so the BPF rule bug and the related build cleanup was all done with just a bare "make -n" pseudo-test. - Linus ] * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next: (110 commits) sparc32: use flushi when run-time patching in per_cpu_patch sparc32: fix cpuid_patch run-time patching sparc32: drop unused inline functions in srmmu.c sparc32: drop unused functions in pgtsrmmu.h sparc32,leon: move leon mmu functions to leon_mm.c sparc32,leon: remove duplicate definitions in leon.h sparc32,leon: remove duplicate UART register definitions sparc32,leon: move leon ASI definitions to asi.h sparc32: move trap table to a separate file sparc64: renamed ttable.S to ttable_64.S sparc32: Remove asm/sysen.h header. sparc32: Delete asm/smpprim.h sparc32: Remove unused empty_bad_page{,_table} declarations. sparc32: Kill boot_cpu_id4 sparc32: Move GET_PROCESSOR*_ID() out of asm/asmmacro.h sparc32: Remove completely unused code from asm/cache.h sparc32: Add ucmpdi2.o to obj-y instead of lib-y. sparc32: add ucmpdi2 sparc: introduce arch/sparc/Kbuild sparc: remove obsolete documentation ...
2 parents cb62ab7 + 1edc178 commit 9daeaa3

137 files changed

Lines changed: 2242 additions & 10772 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/sparc/README-2.5‎

Lines changed: 0 additions & 46 deletions
This file was deleted.

‎arch/sparc/Kbuild‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
# core part of the sparc kernel
3+
#
4+
5+
obj-y += kernel/
6+
obj-y += mm/
7+
obj-y += math-emu/
8+
obj-y += net/

‎arch/sparc/Kconfig‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ config SPARC
3030
select USE_GENERIC_SMP_HELPERS if SMP
3131
select GENERIC_PCI_IOMAP
3232
select HAVE_NMI_WATCHDOG if SPARC64
33-
select HAVE_BPF_JIT
33+
select HAVE_BPF_JIT if NET
3434

3535
config SPARC32
3636
def_bool !64BIT
@@ -62,6 +62,7 @@ config SPARC64
6262
select IRQ_PREFLOW_FASTEOI
6363
select ARCH_HAVE_NMI_SAFE_CMPXCHG
6464
select HAVE_C_RECORDMCOUNT
65+
select NO_BOOTMEM
6566

6667
config ARCH_DEFCONFIG
6768
string
@@ -74,17 +75,12 @@ config BITS
7475
default 32 if SPARC32
7576
default 64 if SPARC64
7677

77-
config ARCH_USES_GETTIMEOFFSET
78-
bool
79-
default y if SPARC32
80-
8178
config GENERIC_CMOS_UPDATE
8279
bool
8380
default y
8481

8582
config GENERIC_CLOCKEVENTS
86-
bool
87-
default y if SPARC64
83+
def_bool y
8884

8985
config IOMMU_HELPER
9086
bool
@@ -155,7 +151,7 @@ source "kernel/Kconfig.freezer"
155151
menu "Processor type and features"
156152

157153
config SMP
158-
bool "Symmetric multi-processing support (does not work on sun4/sun4c)"
154+
bool "Symmetric multi-processing support"
159155
---help---
160156
This enables support for systems with more than one CPU. If you have
161157
a system with only one CPU, say N. If you have a system with more

‎arch/sparc/Makefile‎

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,27 @@ ifeq ($(CONFIG_SPARC32),y)
1919
# sparc32
2020
#
2121

22-
#
23-
# Uncomment the first KBUILD_CFLAGS if you are doing kgdb source level
24-
# debugging of the kernel to get the proper debugging information.
25-
26-
AS := $(AS) -32
27-
LDFLAGS := -m elf32_sparc
2822
CHECKFLAGS += -D__sparc__
23+
LDFLAGS := -m elf32_sparc
2924
export BITS := 32
3025
UTS_MACHINE := sparc
3126

32-
#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
33-
KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
34-
KBUILD_AFLAGS += -m32 -Wa,-Av8
35-
36-
#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
37-
# Since 2.5.40, the first stage is left not btfix-ed.
38-
# Actual linking is done with "make image".
39-
LDFLAGS_vmlinux = -r
27+
KBUILD_CFLAGS += -m32 -mcpu=v8 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
28+
KBUILD_AFLAGS += -m32 -Wa,-Av8
4029

4130
else
4231
#####
4332
# sparc64
4433
#
4534

46-
CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64
35+
CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64
36+
LDFLAGS := -m elf64_sparc
37+
export BITS := 64
38+
UTS_MACHINE := sparc64
4739

48-
LDFLAGS := -m elf64_sparc
49-
export BITS := 64
50-
UTS_MACHINE := sparc64
51-
52-
KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
53-
-ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \
54-
-Wa,--undeclared-regs
40+
KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow
41+
KBUILD_CFLAGS += -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare
42+
KBUILD_CFLAGS += -Wa,--undeclared-regs
5543
KBUILD_CFLAGS += $(call cc-option,-mtune=ultrasparc3)
5644
KBUILD_AFLAGS += -m64 -mcpu=ultrasparc -Wa,--undeclared-regs
5745

@@ -64,26 +52,14 @@ endif
6452
head-y := arch/sparc/kernel/head_$(BITS).o
6553
head-y += arch/sparc/kernel/init_task.o
6654

67-
core-y += arch/sparc/kernel/
68-
core-y += arch/sparc/mm/ arch/sparc/math-emu/
69-
core-y += arch/sparc/net/
55+
# See arch/sparc/Kbuild for the core part of the kernel
56+
core-y += arch/sparc/
7057

7158
libs-y += arch/sparc/prom/
7259
libs-y += arch/sparc/lib/
7360

7461
drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/
7562

76-
# Export what is needed by arch/sparc/boot/Makefile
77-
export VMLINUX_INIT VMLINUX_MAIN
78-
VMLINUX_INIT := $(head-y) $(init-y)
79-
VMLINUX_MAIN := $(core-y) kernel/ mm/ fs/ ipc/ security/ crypto/ block/
80-
VMLINUX_MAIN += $(patsubst %/, %/lib.a, $(libs-y)) $(libs-y)
81-
VMLINUX_MAIN += $(drivers-y) $(net-y)
82-
83-
ifdef CONFIG_KALLSYMS
84-
export kallsyms.o := .tmp_kallsyms2.o
85-
endif
86-
8763
boot := arch/sparc/boot
8864

8965
# Default target

‎arch/sparc/boot/Makefile‎

Lines changed: 10 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
ROOT_IMG := /usr/src/root.img
77
ELFTOAOUT := elftoaout
88

9-
hostprogs-y := piggyback btfixupprep
10-
targets := tftpboot.img btfix.o btfix.S image zImage vmlinux.aout
9+
hostprogs-y := piggyback
10+
targets := tftpboot.img image zImage vmlinux.aout
1111
clean-files := System.map
1212

1313
quiet_cmd_elftoaout = ELFTOAOUT $@
@@ -17,58 +17,9 @@ quiet_cmd_piggy = PIGGY $@
1717
quiet_cmd_strip = STRIP $@
1818
cmd_strip = $(STRIP) -R .comment -R .note -K sun4u_init -K _end -K _start $< -o $@
1919

20-
ifeq ($(CONFIG_SPARC32),y)
21-
quiet_cmd_btfix = BTFIX $@
22-
cmd_btfix = $(OBJDUMP) -x vmlinux | $(obj)/btfixupprep > $@
23-
quiet_cmd_sysmap = SYSMAP $(obj)/System.map
24-
cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap
25-
quiet_cmd_image = LD $@
26-
cmd_image = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) -o $@
27-
28-
define rule_image
29-
$(if $($(quiet)cmd_image), \
30-
echo ' $($(quiet)cmd_image)' &&) \
31-
$(cmd_image); \
32-
$(if $($(quiet)cmd_sysmap), \
33-
echo ' $($(quiet)cmd_sysmap)' &&) \
34-
$(cmd_sysmap) $@ $(obj)/System.map; \
35-
if [ $$? -ne 0 ]; then \
36-
rm -f $@; \
37-
/bin/false; \
38-
fi; \
39-
echo 'cmd_$@ := $(cmd_image)' > $(@D)/.$(@F).cmd
40-
endef
41-
42-
BTOBJS := $(patsubst %/, %/built-in.o, $(VMLINUX_INIT))
43-
BTLIBS := $(patsubst %/, %/built-in.o, $(VMLINUX_MAIN))
44-
LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds $(BTOBJS) \
45-
--start-group $(BTLIBS) --end-group \
46-
$(kallsyms.o) $(obj)/btfix.o
47-
48-
# Link the final image including btfixup'ed symbols.
49-
# This is a replacement for the link done in the top-level Makefile.
50-
# Note: No dependency on the prerequisite files since that would require
51-
# make to try check if they are updated - and due to changes
52-
# in gcc options (path for example) this would result in
53-
# these files being recompiled for each build.
54-
$(obj)/image: $(obj)/btfix.o FORCE
55-
$(call if_changed_rule,image)
56-
57-
$(obj)/zImage: $(obj)/image
58-
$(call if_changed,strip)
59-
@echo ' kernel: $@ is ready'
60-
61-
$(obj)/btfix.S: $(obj)/btfixupprep vmlinux FORCE
62-
$(call if_changed,btfix)
63-
64-
endif
65-
6620
ifeq ($(CONFIG_SPARC64),y)
6721

6822
# Actual linking
69-
$(obj)/image: vmlinux FORCE
70-
$(call if_changed,strip)
71-
@echo ' kernel: $@ is ready'
7223

7324
$(obj)/zImage: $(obj)/image
7425
$(call if_changed,gzip)
@@ -79,6 +30,10 @@ $(obj)/vmlinux.aout: vmlinux FORCE
7930
@echo ' kernel: $@ is ready'
8031
else
8132

33+
$(obj)/zImage: $(obj)/image
34+
$(call if_changed,strip)
35+
@echo ' kernel: $@ is ready'
36+
8237
# The following lines make a readable image for U-Boot.
8338
# uImage - Binary file read by U-boot
8439
# uImage.o - object file of uImage for loading with a
@@ -107,6 +62,10 @@ $(obj)/uImage: $(obj)/image.gz
10762

10863
endif
10964

65+
$(obj)/image: vmlinux FORCE
66+
$(call if_changed,strip)
67+
@echo ' kernel: $@ is ready'
68+
11069
$(obj)/tftpboot.img: $(obj)/image $(obj)/piggyback System.map $(ROOT_IMG) FORCE
11170
$(call if_changed,elftoaout)
11271
$(call if_changed,piggy)

0 commit comments

Comments
 (0)