diff options
Diffstat (limited to 'arch')
86 files changed, 333 insertions, 556 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f45561d04695..4637eccd0d87 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -222,7 +222,7 @@ config SA1111 config FORCE_MAX_ZONEORDER int - depends on ASSABET_NEPONSET || SA1100_ADSBITSY || SA1100_BADGE4 || SA1100_CONSUS || SA1100_GRAPHICSMASTER || SA1100_JORNADA720 || ARCH_LUBBOCK || SA1100_PFS168 || SA1100_PT_SYSTEM3 || SA1100_XP860 + depends on SA1111 default "9" comment "Processor Type" @@ -1043,11 +1043,6 @@ config KBDMOUSE depends on ARCH_ACORN && BUSMOUSE=y && !ARCH_RPC default y -config RPCMOUSE - bool - depends on ARCH_ACORN && BUSMOUSE=y && ARCH_RPC - default y - source "drivers/media/Kconfig" source "fs/Kconfig" diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 1eab6ab76d79..ba4f87eef389 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -34,14 +34,12 @@ apcs-$(CONFIG_CPU_26) :=-mapcs-26 -mcpu=arm3 # Note that GCC is lame - it doesn't numerically define an # architecture version macro, but instead defines a whole # series of macros. -arch-y := arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4 arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 -march=armv5 arch-$(CONFIG_CPU_XSCALE) :=-D__LINUX_ARM_ARCH__=5 -march=armv4 -Wa,-mxscale #-march=armv5te # This selects how we optimise for the processor. -tune-y := tune-$(CONFIG_CPU_ARM610) :=-mtune=arm610 tune-$(CONFIG_CPU_ARM710) :=-mtune=arm710 tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi @@ -58,123 +56,67 @@ CFLAGS_BOOT :=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa, CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Wa,-mno-fpu AFLAGS +=$(apcs-y) $(arch-y) -mno-fpu -msoft-float -Wa,-mno-fpu +#Default value +DATAADDR := . + ifeq ($(CONFIG_CPU_26),y) PROCESSOR := armo HEAD := arch/arm/mach-arc/head.o arch/arm/kernel/init_task.o LDFLAGS_BLOB += --oformat elf26-littlearm ifeq ($(CONFIG_ROM_KERNEL),y) - DATAADDR = 0x02080000 - TEXTADDR = 0x03800000 + DATAADDR := 0x02080000 + textaddr-y := 0x03800000 else - TEXTADDR = 0x02080000 + textaddr-y := 0x02080000 endif endif ifeq ($(CONFIG_CPU_32),y) -PROCESSOR = armv +PROCESSOR := armv HEAD := arch/arm/kernel/head.o arch/arm/kernel/init_task.o -TEXTADDR = 0xC0008000 LDFLAGS_BLOB += --oformat elf32-littlearm -endif - -ifeq ($(CONFIG_ARCH_ARCA5K),y) -MACHINE = arc -endif - -ifeq ($(CONFIG_ARCH_RPC),y) -MACHINE = rpc -endif - -ifeq ($(CONFIG_ARCH_EBSA110),y) -MACHINE = ebsa110 -endif - -ifeq ($(CONFIG_ARCH_CLPS7500),y) -MACHINE = clps7500 -INCDIR = cl7500 -endif - -ifeq ($(CONFIG_FOOTBRIDGE),y) -MACHINE = footbridge -INCDIR = ebsa285 -endif - -ifeq ($(CONFIG_ARCH_CO285),y) -TEXTADDR = 0x60008000 -MACHINE = footbridge -INCDIR = ebsa285 -endif - -ifeq ($(CONFIG_ARCH_FTVPCI),y) -MACHINE = ftvpci -INCDIR = nexuspci -endif - -ifeq ($(CONFIG_ARCH_TBOX),y) -MACHINE = tbox -endif - -ifeq ($(CONFIG_ARCH_SHARK),y) -MACHINE = shark -endif - +textaddr-y := 0xC0008000 +endif + + machine-$(CONFIG_ARCH_ARCA5K) := arc + machine-$(CONFIG_ARCH_RPC) := rpc + machine-$(CONFIG_ARCH_EBSA110) := ebsa110 + machine-$(CONFIG_ARCH_CLPS7500) := clps7500 + incdir-$(CONFIG_ARCH_CLPS7500) := cl7500 + machine-$(CONFIG_FOOTBRIDGE) := footbridge + incdir-$(CONFIG_FOOTBRIDGE) := ebsa285 +textaddr-$(CONFIG_ARCH_CO285) := 0x60008000 + machine-$(CONFIG_ARCH_CO285) := footbridge + incdir-$(CONFIG_ARCH_CO285) := ebsa285 + machine-$(CONFIG_ARCH_FTVPCI) := ftvpci + incdir-$(CONFIG_ARCH_FTVPCI) := nexuspci + machine-$(CONFIG_ARCH_TBOX) := tbox + machine-$(CONFIG_ARCH_SHARK) := shark + machine-$(CONFIG_ARCH_SA1100) := sa1100 ifeq ($(CONFIG_ARCH_SA1100),y) -ifeq ($(CONFIG_SA1111),y) # SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory -TEXTADDR = 0xc0208000 -endif -MACHINE = sa1100 -endif - -ifeq ($(CONFIG_ARCH_PXA),y) -MACHINE = pxa -endif - -ifeq ($(CONFIG_ARCH_L7200),y) -MACHINE = l7200 -endif - -ifeq ($(CONFIG_ARCH_INTEGRATOR),y) -MACHINE = integrator -endif - -ifeq ($(CONFIG_ARCH_CAMELOT),y) -MACHINE = epxa10db -endif - -ifeq ($(CONFIG_ARCH_CLPS711X),y) -TEXTADDR = 0xc0028000 -MACHINE = clps711x -endif - -ifeq ($(CONFIG_ARCH_FORTUNET),y) -TEXTADDR = 0xc0008000 -endif - -ifeq ($(CONFIG_ARCH_ANAKIN),y) -MACHINE = anakin -endif - -ifeq ($(CONFIG_ARCH_IOP310),y) -MACHINE = iop310 -endif - -ifeq ($(CONFIG_ARCH_ADIFCC),y) -MACHINE = adifcc -endif - +textaddr-$(CONFIG_SA1111) := 0xc0208000 +endif + machine-$(CONFIG_ARCH_PXA) := pxa + machine-$(CONFIG_ARCH_L7200) := l7200 + machine-$(CONFIG_ARCH_INTEGRATOR) := integrator + machine-$(CONFIG_ARCH_CAMELOT) := epxa10db +textaddr-$(CONFIG_ARCH_CLPS711X) := 0xc0028000 + machine-$(CONFIG_ARCH_CLPS711X) := clps711x +textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000 + machine-$(CONFIG_ARCH_ANAKIN) := anakin + machine-$(CONFIG_ARCH_IOP310) := iop310 + machine-$(CONFIG_ARCH_ADIFCC) := adifcc + +MACHINE := $(machine-y) +TEXTADDR := $(textaddr-y) +ifeq ($(incdir-y),) +incdir-y := $(MACHINE) +endif +INCDIR := $(incdir-y) + export MACHINE PROCESSOR TEXTADDR GZFLAGS CFLAGS_BOOT -# Only set INCDIR if its not already defined above -# Grr, ?= doesn't work as all the other assignment operators do. Make bug? -ifeq ($(origin INCDIR), undefined) -INCDIR :=$(MACHINE) -endif - -ifeq ($(origin DATAADDR), undefined) -DATAADDR := . -endif - # Do we have FASTFPE? FASTFPE :=arch/arm/fastfpe ifeq ($(FASTFPE),$(wildcard $(FASTFPE))) @@ -194,7 +136,10 @@ drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/ libs-y += arch/arm/lib/ -makeboot = $(call descend,arch/arm/boot,$(1)) +# Default target when executing plain make +all: zImage + +makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/arm/boot $(1) # Update machine arch and proc symlinks if something which affects # them changed. We use .arch and .proc to indicate when they were @@ -217,13 +162,17 @@ prepare: maketools .PHONY: maketools FORCE maketools: include/asm-arm/.arch include/asm-arm/.proc \ include/asm-arm/constants.h include/linux/version.h FORCE - +@$(call descend,arch/arm/tools, include/asm-arm/mach-types.h) + $(Q)$(MAKE) -f scripts/Makefile.build obj=arch/arm/tools include/asm-arm/mach-types.h + +# Convert bzImage to zImage +bzImage: vmlinux + $(call makeboot,arch/arm/boot/zImage) zImage Image bootpImage: vmlinux - +@$(call makeboot,arch/arm/boot/$@) + $(call makeboot,arch/arm/boot/$@) -bzImage zinstall install: vmlinux - +@$(call makeboot,$@) +zinstall install: vmlinux + $(call makeboot,$@) MRPROPER_FILES += \ include/asm-arm/arch include/asm-arm/.arch \ @@ -233,15 +182,15 @@ MRPROPER_FILES += \ # We use MRPROPER_FILES and CLEAN_FILES now archmrproper: -archclean: FORCE - +@$(call makeboot,clean) +archclean: + $(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/arm/boot # My testing targets (that short circuit a few dependencies) -zImg:; +@$(call makeboot, zImage) -Img:; +@$(call makeboot, Image) -i:; +@$(call makeboot, install) -zi:; +@$(call makeboot, zinstall) -bp:; +@$(call makeboot, bootpImage) +zImg:; $(call makeboot, arch/arm/boot/zImage) +Img:; $(call makeboot, arch/arm/boot/Image) +bp:; $(call makeboot, arch/arm/boot/bootpImage) +i:; $(call makeboot, install) +zi:; $(call makeboot, zinstall) # # Configuration targets. Use these to select a @@ -261,10 +210,9 @@ bp:; +@$(call makeboot, bootpImage) arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ include/config/MARKER + @: -include/asm-$(ARCH)/constants.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s - @$(generate-asm-offsets.h) < $< > $@ - -include/asm-$(ARCH)/constants.h: include/asm-$(ARCH)/constants.h.tmp +include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s @echo -n ' Generating $@' + @$(generate-asm-offsets.h) < $< > $@.tmp @$(update-if-changed) diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 6c5a970afb58..61eeee5c544f 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile @@ -13,132 +13,81 @@ # PARAMS_PHYS must be with 4MB of ZRELADDR # INITRD_PHYS must be in RAM -ifeq ($(CONFIG_CPU_26),y) -ZRELADDR = 0x02080000 -PARAMS_PHYS = 0x0207c000 -INITRD_PHYS = 0x02180000 -endif - -ifeq ($(CONFIG_ARCH_RPC),y) -ZRELADDR = 0x10008000 -PARAMS_PHYS = 0x10000100 -INITRD_PHYS = 0x18000000 -endif - -ifeq ($(CONFIG_ARCH_CLPS7500),y) -ZRELADDR = 0x10008000 -endif - -ifeq ($(CONFIG_ARCH_EBSA110),y) -ZRELADDR = 0x00008000 -PARAMS_PHYS = 0x00000400 -INITRD_PHYS = 0x00800000 -endif - -ifeq ($(CONFIG_ARCH_SHARK),y) -ZTEXTADDR = 0x08508000 -ZRELADDR = 0x08008000 -endif - -ifeq ($(CONFIG_FOOTBRIDGE),y) -ZRELADDR = 0x00008000 -PARAMS_PHYS = 0x00000100 -INITRD_PHYS = 0x00800000 -endif - -ifeq ($(CONFIG_ARCH_INTEGRATOR),y) -ZRELADDR = 0x00008000 -PARAMS_PHYS = 0x00000100 -INITRD_PHYS = 0x00800000 -endif - -ifeq ($(CONFIG_ARCH_CAMELOT),y) -ZRELADDR = 0x00008000 -endif - -ifeq ($(CONFIG_ARCH_NEXUSPCI),y) -ZRELADDR = 0x40008000 -endif - -ifeq ($(CONFIG_ARCH_L7200),y) -ZRELADDR = 0xf0008000 -endif - + zreladdr-$(CONFIG_CPU_26) := 0x02080000 +params_phys-$(CONFIG_CPU_26) := 0x0207c000 +initrd_phys-$(CONFIG_CPU_26) := 0x02180000 + zreladdr-$(CONFIG_ARCH_RPC) := 0x10008000 +params_phys-$(CONFIG_ARCH_RPC) := 0x10000100 +initrd_phys-$(CONFIG_ARCH_RPC) := 0x18000000 + zreladdr-$(CONFIG_ARCH_CLPS7500) := 0x10008000 + zreladdr-$(CONFIG_ARCH_CLPS7500) := 0x10008000 + zreladdr-$(CONFIG_ARCH_EBSA110) := 0x00008000 +params_phys-$(CONFIG_ARCH_EBSA110) := 0x00000400 +initrd_phys-$(CONFIG_ARCH_EBSA110) := 0x00800000 + ztextaddr-$(CONFIG_ARCH_SHARK) := 0x08508000 + zreladdr-$(CONFIG_ARCH_SHARK) := 0x08008000 + zreladdr-$(CONFIG_FOOTBRIDGE) := 0x00008000 +params_phys-$(CONFIG_FOOTBRIDGE) := 0x00000100 +initrd_phys-$(CONFIG_FOOTBRIDGE) := 0x00800000 + zreladdr-$(CONFIG_ARCH_INTEGRATOR) := 0x00008000 +params_phys-$(CONFIG_ARCH_INTEGRATOR) := 0x00000100 +initrd_phys-$(CONFIG_ARCH_INTEGRATOR) := 0x00800000 + zreladdr-$(CONFIG_ARCH_CAMELOT) := 0x00008000 + zreladdr-$(CONFIG_ARCH_NEXUSPCI) := 0x40008000 + zreladdr-$(CONFIG_ARCH_L7200) := 0xf0008000 # The standard locations for stuff on CLPS711x type processors -ifeq ($(CONFIG_ARCH_CLPS711X),y) -ZRELADDR = 0xc0028000 -PARAMS_PHYS = 0xc0000100 -endif - + zreladdr-$(CONFIG_ARCH_CLPS711X) := 0xc0028000 +params_phys-$(CONFIG_ARCH_CLPS711X) := 0xc0000100 # Should probably have some agreement on these... -ifeq ($(CONFIG_ARCH_P720T),y) -INITRD_PHYS = 0xc0400000 -endif -ifeq ($(CONFIG_ARCH_CDB89712),y) -INITRD_PHYS = 0x00700000 -endif - +initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000 +initrd_phys-$(CONFIG_ARCH_CDB89712) := 0x00700000 + zreladdr-$(CONFIG_ARCH_SA1100) := 0xc0008000 ifeq ($(CONFIG_ARCH_SA1100),y) -ZRELADDR = 0xc0008000 -# No defconfig file to move this into... -#ifeq ($(CONFIG_SA1100_YOPY),y) -# ZTEXTADDR = 0x00080000 -# ZBSSADDR = 0xc0200000 -#endif -ifeq ($(CONFIG_SA1111),y) - ZRELADDR = 0xc0208000 -endif -endif - -ifeq ($(CONFIG_ARCH_PXA),y) -ZRELADDR = 0xa0008000 -endif - -ifeq ($(CONFIG_ARCH_ANAKIN),y) -ZRELADDR = 0x20008000 -endif - -ifeq ($(CONFIG_ARCH_IQ80310),y) -ZRELADDR = 0xa0008000 -endif - -ifeq ($(CONFIG_ARCH_ADIFCC),y) -ZRELADDR = 0xc0008000 + zreladdr-$(CONFIG_SA1111) := 0xc0208000 endif + zreladdr-$(CONFIG_ARCH_PXA) := 0xa0008000 + zreladdr-$(CONFIG_ARCH_ANAKIN) := 0x20008000 + zreladdr-$(CONFIG_ARCH_IQ80310) := 0xa0008000 + zreladdr-$(CONFIG_ARCH_ADIFCC) := 0xc0008000 +ZRELADDR := $(zreladdr-y) +ZTEXTADDR := $(ztextaddr-y) +PARAMS_PHYS := $(params_phys-y) +INITRD_PHYS := $(initrd_phys-y) # # We now have a PIC decompressor implementation. Decompressors running # from RAM should not define ZTEXTADDR. Decompressors running directly # from ROM or Flash must define ZTEXTADDR (preferably via the config) -# +# FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK ifeq ($(CONFIG_ZBOOT_ROM),y) -ZTEXTADDR =$(CONFIG_ZBOOT_ROM_TEXT) -ZBSSADDR =$(CONFIG_ZBOOT_ROM_BSS) +ZTEXTADDR := $(CONFIG_ZBOOT_ROM_TEXT) +ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS) else -ZTEXTADDR =0 -ZBSSADDR =ALIGN(4) +ZTEXTADDR := 0 +ZBSSADDR := ALIGN(4) endif export ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS PARAMS_PHYS -include $(TOPDIR)/Rules.make +EXTRA_TARGETS := Image zImage bootpImage $(obj)/Image: vmlinux FORCE $(call if_changed,objcopy) - -bzImage: $(obj)/zImage + @echo ' Kernel: $@ is ready' $(obj)/zImage: $(obj)/compressed/vmlinux FORCE $(call if_changed,objcopy) + @echo ' Kernel: $@ is ready' $(obj)/bootpImage: $(obj)/bootp/bootp FORCE $(call if_changed,objcopy) + @echo ' Kernel: $@ is ready' $(obj)/compressed/vmlinux: vmlinux FORCE - +@$(call descend,arch/arm/boot/compressed, $(obj)/compressed/vmlinux) + $(Q)$(MAKE) -f scripts/Makefile.build obj=$(obj)/compressed $@ $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE - +@$(call descend,arch/arm/boot/bootp, $(obj)/bootp/bootp) + $(Q)$(MAKE) -f scripts/Makefile.build obj=$(obj)/compressed $@ .PHONY: initrd initrd: @@ -157,19 +106,16 @@ zinstall: $(obj)/zImage $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) \ $(obj)/zImage System.map "$(INSTALL_PATH)" -clean: - $(RM) $(addprefix $(obj)/,Image zImage bootpImage) - +@$(call descend,arch/arm/boot/bootp, clean) - +@$(call descend,arch/arm/boot/compressed, clean) +clean-files := $(addprefix $(obj)/,Image zImage bootpImage) +subdir- := bootp compressed archhelp: - @echo '* bzImage/zImage- Compressed kernel image (arch/$(ARCH)/boot/zImage)' + @echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' @echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' @echo ' bootpImage - Combined zImage and initial RAM disk' + @echo ' initrd - Create an initial image' @echo ' install - Install uncompressed kernel' @echo ' zinstall - Install compressed kernel' @echo ' Install using (your) ~/bin/installkernel or' @echo ' (distribution) /sbin/installkernel or' @echo ' install to $$(INSTALL_PATH) and run lilo' - - diff --git a/arch/arm/boot/bootp/Makefile b/arch/arm/boot/bootp/Makefile index b4304dc33d55..f24cbc2be4ac 100644 --- a/arch/arm/boot/bootp/Makefile +++ b/arch/arm/boot/bootp/Makefile @@ -9,8 +9,6 @@ ZLDFLAGS =-p -X -T $(obj)/bootp.lds \ EXTRA_TARGETS := bootp -include $(TOPDIR)/Rules.make - # Note that bootp.lds picks up kernel.o and initrd.o $(obj)/bootp: $(addprefix $(obj)/,init.o kernel.o initrd.o bootp.lds) $(LD) $(ZLDFLAGS) -o $@ $(obj)/init.o @@ -22,5 +20,3 @@ $(obj)/initrd.o: $(INITRD) $(LD) -r -s -o $@ -b binary $(INITRD) .PHONY: $(INITRD) $(ZSYSTEM) - -clean:; $(RM) $(obj)/bootp diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 2afc113f2fbe..4b34de447ecf 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -63,28 +63,30 @@ ifeq ($(CONFIG_CPU_XSCALE),y) OBJS += head-xscale.o endif -SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;\ -s/BSS_START/$(ZBSSADDR)/;s#OBJ#$(obj)# +SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;s/BSS_START/$(ZBSSADDR)/ -EXTRA_TARGETS := vmlinux piggy.o font.o head.o $(OBJS) +EXTRA_TARGETS := vmlinux vmlinux.lds piggy piggy.gz\ + piggy.o font.o head.o $(OBJS) EXTRA_CFLAGS := $(CFLAGS_BOOT) -fpic EXTRA_AFLAGS := -traditional -include $(TOPDIR)/Rules.make - LDFLAGS_vmlinux := -p -X \ $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \ - $(addprefix $(obj)/, $(OBJS)) + $(addprefix $(obj)/, $(OBJS)) FORCE $(call if_changed,ld) + @: + +$(obj)/piggy: vmlinux FORCE + $(call if_changed,objcopy) -$(obj)/piggy: vmlinux; $(call if_changed,objcopy) -$(obj)/piggy.gz: $(obj)/piggy; $(call if_changed,gzip) +$(obj)/piggy.gz: $(obj)/piggy FORCE + $(call if_changed,gzip) LDFLAGS_piggy.o := -r -b binary -$(obj)/piggy.o: $(obj)/piggy.gz +$(obj)/piggy.o: $(obj)/piggy.gz FORCE $(call if_changed,ld) CFLAGS_font.o := -Dstatic= @@ -93,9 +95,7 @@ $(obj)/font.o: $(FONTC) $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in Makefile arch/arm/boot/Makefile .config @sed "$(SEDFLAGS)" < $< > $@ -.PHONY: clean -clean: - rm -f $(addprefix $(obj)/,vmlinux core piggy* vmlinux.lds) +clean-files := $(addprefix $(obj)/,vmlinux piggy* vmlinux.lds) $(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c diff --git a/arch/arm/kernel/dma-isa.c b/arch/arm/kernel/dma-isa.c index 2125bb6a1282..d75e8a9923e7 100644 --- a/arch/arm/kernel/dma-isa.c +++ b/arch/arm/kernel/dma-isa.c @@ -16,7 +16,6 @@ * arch/arm/kernel/dma-ebsa285.c * Copyright (C) 1998 Phil Blundell */ -#include <linux/sched.h> #include <linux/ioport.h> #include <linux/init.h> #include <linux/pci.h> diff --git a/arch/arm/kernel/dma.c b/arch/arm/kernel/dma.c index 6717f735136a..0e4b21e03427 100644 --- a/arch/arm/kernel/dma.c +++ b/arch/arm/kernel/dma.c @@ -13,7 +13,6 @@ */ #include <linux/module.h> #include <linux/slab.h> -#include <linux/sched.h> #include <linux/mman.h> #include <linux/init.h> #include <linux/spinlock.h> diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 2b291c31ff8b..1206e7d9fd66 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c @@ -989,42 +989,6 @@ nomem: return rc; } -static ecard_t *finding_pos; - -void ecard_startfind(void) -{ - finding_pos = NULL; -} - -ecard_t *ecard_find(int cid, const card_ids *cids) -{ - if (!finding_pos) - finding_pos = cards; - else - finding_pos = finding_pos->next; - - for (; finding_pos; finding_pos = finding_pos->next) { - if (finding_pos->claimed) - continue; - - if (finding_pos->dev.driver) - continue; - - if (!cids) { - if ((finding_pos->cid.id ^ cid) == 0) - break; - } else { - const struct ecard_id *id; - - id = ecard_match_device(cids, finding_pos); - if (id) - break; - } - } - - return finding_pos; -} - /* * Initialise the expansion card system. * Locate all hardware - interrupt management and @@ -1087,10 +1051,15 @@ static int ecard_drv_probe(struct device *dev) struct expansion_card *ec = ECARD_DEV(dev); struct ecard_driver *drv = ECARD_DRV(dev->driver); const struct ecard_id *id; + int ret; id = ecard_match_device(drv->id_table, ec); - return drv->probe(ec, id); + ecard_claim(ec); + ret = drv->probe(ec, id); + if (ret) + ecard_release(ec); + return ret; } static int ecard_drv_remove(struct device *dev) @@ -1099,6 +1068,7 @@ static int ecard_drv_remove(struct device *dev) struct ecard_driver *drv = ECARD_DRV(dev->driver); drv->remove(ec); + ecard_release(ec); return 0; } @@ -1144,12 +1114,8 @@ static int ecard_bus_init(void) postcore_initcall(ecard_bus_init); -EXPORT_SYMBOL(ecard_startfind); -EXPORT_SYMBOL(ecard_find); EXPORT_SYMBOL(ecard_readchunk); EXPORT_SYMBOL(ecard_address); - EXPORT_SYMBOL(ecard_register_driver); EXPORT_SYMBOL(ecard_remove_driver); - EXPORT_SYMBOL(ecard_bus_type); diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 1fa4f5fb25f7..a7cd6b892ffa 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -20,7 +20,6 @@ #include <linux/config.h> #include <linux/kernel_stat.h> #include <linux/signal.h> -#include <linux/sched.h> #include <linux/ioport.h> #include <linux/interrupt.h> #include <linux/ptrace.h> @@ -661,7 +660,7 @@ unsigned int probe_irq_mask(unsigned long irqs) unsigned int mask = 0, i; spin_lock_irq(&irq_controller_lock); - for(i = 0; i < 16 && i < NR_IRQS; i++) + for (i = 0; i < 16 && i < NR_IRQS; i++) if (irq_desc[i].probing && irq_desc[i].triggered) mask |= 1 << i; spin_unlock_irq(&irq_controller_lock); diff --git a/arch/arm/kernel/plx90x0.c b/arch/arm/kernel/plx90x0.c index f843e12267ed..60d7d3566af4 100644 --- a/arch/arm/kernel/plx90x0.c +++ b/arch/arm/kernel/plx90x0.c @@ -14,7 +14,6 @@ #include <linux/kernel.h> #include <linux/pci.h> #include <linux/init.h> -#include <linux/sched.h> #include <asm/hardware.h> #include <asm/io.h> diff --git a/arch/arm/kernel/time-acorn.c b/arch/arm/kernel/time-acorn.c index eb637801c7a5..8772035bfc7f 100644 --- a/arch/arm/kernel/time-acorn.c +++ b/arch/arm/kernel/time-acorn.c @@ -12,7 +12,6 @@ * 10-Oct-1996 RMK Brought up to date with arch-sa110eval * 04-Dec-1997 RMK Updated for new arch/arm/time.c */ -#include <linux/sched.h> #include <linux/interrupt.h> #include <linux/init.h> diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 655b7ed1c8e0..2af6dbda06d5 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -18,7 +18,6 @@ */ #include <linux/config.h> #include <linux/module.h> -#include <linux/sched.h> #include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/time.h> diff --git a/arch/arm/kernel/via82c505.c b/arch/arm/kernel/via82c505.c index 345b9b6c73da..a4ac16dbb756 100644 --- a/arch/arm/kernel/via82c505.c +++ b/arch/arm/kernel/via82c505.c @@ -1,5 +1,4 @@ #include <linux/config.h> -#include <linux/sched.h> #include <linux/kernel.h> #include <linux/pci.h> #include <linux/ptrace.h> diff --git a/arch/arm/mach-adifcc/arch.c b/arch/arm/mach-adifcc/arch.c index 9c715a9635fd..bfc59556d9da 100644 --- a/arch/arm/mach-adifcc/arch.c +++ b/arch/arm/mach-adifcc/arch.c @@ -11,7 +11,7 @@ #include <linux/init.h> #include <linux/major.h> #include <linux/fs.h> -#include <asm/types.h> + #include <asm/setup.h> #include <asm/memory.h> #include <asm/hardware.h> diff --git a/arch/arm/mach-adifcc/irq.c b/arch/arm/mach-adifcc/irq.c index e8e659a54ef4..29cd529832b8 100644 --- a/arch/arm/mach-adifcc/irq.c +++ b/arch/arm/mach-adifcc/irq.c @@ -13,7 +13,6 @@ * support for PCI though. */ #include <linux/init.h> -#include <linux/sched.h> #include <linux/interrupt.h> #include <asm/mach/irq.h> diff --git a/arch/arm/mach-anakin/irq.c b/arch/arm/mach-anakin/irq.c index 46cd97f56ff1..fcf335fadc58 100644 --- a/arch/arm/mach-anakin/irq.c +++ b/arch/arm/mach-anakin/irq.c @@ -12,7 +12,6 @@ */ #include <linux/ptrace.h> -#include <linux/sched.h> #include <linux/interrupt.h> #include <linux/init.h> diff --git a/arch/arm/mach-arc/dma.c b/arch/arm/mach-arc/dma.c index a49785206265..43c5a8d35210 100644 --- a/arch/arm/mach-arc/dma.c +++ b/arch/arm/mach-arc/dma.c @@ -10,7 +10,6 @@ * DMA functions specific to Archimedes and A5000 architecture */ #include <linux/config.h> -#include <linux/sched.h> #include <linux/init.h> #include <asm/dma.h> diff --git a/arch/arm/mach-arc/oldlatches.c b/arch/arm/mach-arc/oldlatches.c index c7237c40db92..5f797e6eee14 100644 --- a/arch/arm/mach-arc/oldlatches.c +++ b/arch/arm/mach-arc/oldlatches.c @@ -13,7 +13,6 @@ #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> -#include <linux/sched.h> #include <asm/io.h> #include <asm/hardware.h> diff --git a/arch/arm/mach-clps711x/autcpu12.c b/arch/arm/mach-clps711x/autcpu12.c index c4c28fb1a1ae..1cb34fa33d23 100644 --- a/arch/arm/mach-clps711x/autcpu12.c +++ b/arch/arm/mach-clps711x/autcpu12.c @@ -22,7 +22,6 @@ #include <linux/types.h> #include <linux/string.h> #include <linux/blk.h> -#include <linux/sched.h> #include <linux/mm.h> #include <asm/hardware.h> diff --git a/arch/arm/mach-clps711x/cdb89712.c b/arch/arm/mach-clps711x/cdb89712.c index 56083b9a5b08..d51668d267fa 100644 --- a/arch/arm/mach-clps711x/cdb89712.c +++ b/arch/arm/mach-clps711x/cdb89712.c @@ -21,7 +21,6 @@ #include <linux/init.h> #include <linux/types.h> #include <linux/string.h> -#include <linux/sched.h> #include <linux/mm.h> #include <asm/hardware.h> diff --git a/arch/arm/mach-clps711x/dma.c b/arch/arm/mach-clps711x/dma.c index 90857e1d452b..af5a4de38eac 100644 --- a/arch/arm/mach-clps711x/dma.c +++ b/arch/arm/mach-clps711x/dma.c @@ -17,17 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <linux/sched.h> -#include <linux/slab.h> -#include <linux/mman.h> #include <linux/init.h> -#include <asm/page.h> -#include <asm/pgtable.h> #include <asm/dma.h> -#include <asm/io.h> -#include <asm/hardware.h> - #include <asm/mach/dma.h> void __init arch_dma_init(dma_t *dma) diff --git a/arch/arm/mach-clps711x/fortunet.c b/arch/arm/mach-clps711x/fortunet.c index 8037ea85e489..31ea65434883 100644 --- a/arch/arm/mach-clps711x/fortunet.c +++ b/arch/arm/mach-clps711x/fortunet.c @@ -21,8 +21,6 @@ */ #include <linux/config.h> #include <linux/types.h> -#include <linux/sched.h> -#include <linux/interrupt.h> #include <linux/init.h> #include <linux/blk.h> @@ -32,7 +30,6 @@ #include <asm/mach-types.h> #include <asm/mach/arch.h> -#include <asm/mach/amba_kmi.h> extern void clps711x_map_io(void); extern void clps711x_init_irq(void); diff --git a/arch/arm/mach-clps711x/mm.c b/arch/arm/mach-clps711x/mm.c index a61e9b05dfb8..8c7d11e0be78 100644 --- a/arch/arm/mach-clps711x/mm.c +++ b/arch/arm/mach-clps711x/mm.c @@ -20,7 +20,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <linux/kernel.h> -#include <linux/sched.h> #include <linux/mm.h> #include <linux/init.h> #include <linux/config.h> diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c index 4de13d3d0f5d..b99cccfb773b 100644 --- a/arch/arm/mach-clps711x/p720t.c +++ b/arch/arm/mach-clps711x/p720t.c @@ -22,7 +22,6 @@ #include <linux/init.h> #include <linux/types.h> #include <linux/string.h> -#include <linux/sched.h> #include <linux/mm.h> #include <asm/hardware.h> diff --git a/arch/arm/mach-clps711x/time.c b/arch/arm/mach-clps711x/time.c index 30613131141c..caedd7b5bf23 100644 --- a/arch/arm/mach-clps711x/time.c +++ b/arch/arm/mach-clps711x/time.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <linux/sched.h> +#include <linux/timex.h> #include <linux/init.h> #include <asm/hardware.h> diff --git a/arch/arm/mach-ebsa110/time.c b/arch/arm/mach-ebsa110/time.c index c842f06b0e2a..989ab98a8d97 100644 --- a/arch/arm/mach-ebsa110/time.c +++ b/arch/arm/mach-ebsa110/time.c @@ -7,7 +7,6 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <linux/sched.h> #include <linux/init.h> #include <asm/io.h> diff --git a/arch/arm/mach-epxa10db/arch.c b/arch/arm/mach-epxa10db/arch.c index f30d0176784e..71c2257dfd50 100644 --- a/arch/arm/mach-epxa10db/arch.c +++ b/arch/arm/mach-epxa10db/arch.c @@ -19,12 +19,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <linux/types.h> -#include <linux/sched.h> -#include <linux/interrupt.h> #include <linux/init.h> #include <asm/hardware.h> -#include <asm/irq.h> #include <asm/setup.h> #include <asm/mach-types.h> diff --git a/arch/arm/mach-epxa10db/dma.c b/arch/arm/mach-epxa10db/dma.c index 2edf62a11fe0..0151e9f1c066 100644 --- a/arch/arm/mach-epxa10db/dma.c +++ b/arch/arm/mach-epxa10db/dma.c @@ -18,17 +18,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <linux/sched.h> -#include <linux/slab.h> -#include <linux/mman.h> #include <linux/init.h> -#include <asm/page.h> -#include <asm/pgtable.h> #include <asm/dma.h> -#include <asm/io.h> -#include <asm/hardware.h> - #include <asm/mach/dma.h> void __init arch_dma_init(dma_t *dma) diff --git a/arch/arm/mach-epxa10db/time.c b/arch/arm/mach-epxa10db/time.c index d4ca520e382f..0c8b9cf7c7b7 100644 --- a/arch/arm/mach-epxa10db/time.c +++ b/arch/arm/mach-epxa10db/time.c @@ -9,13 +9,11 @@ * published by the Free Software Foundation. */ #include <linux/kernel.h> -#include <linux/sched.h> #include <linux/init.h> #include <asm/hardware.h> - extern int (*set_rtc)(void); static int epxa10db_set_rtc(void) diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c index 160b0307fa92..0aec69fb00ad 100644 --- a/arch/arm/mach-footbridge/cats-hw.c +++ b/arch/arm/mach-footbridge/cats-hw.c @@ -5,7 +5,6 @@ * * Copyright (C) 1998, 1999 Russell King, Phil Blundell */ -#include <linux/sched.h> #include <linux/ioport.h> #include <linux/kernel.h> #include <linux/init.h> diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index cbe4ba754bdb..fb0ac649543f 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c @@ -8,7 +8,6 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <linux/sched.h> #include <linux/kernel.h> #include <linux/pci.h> #include <linux/ptrace.h> diff --git a/arch/arm/mach-footbridge/dma.c b/arch/arm/mach-footbridge/dma.c index 7cdbf92f1c83..a6b1396b0951 100644 --- a/arch/arm/mach-footbridge/dma.c +++ b/arch/arm/mach-footbridge/dma.c @@ -11,7 +11,6 @@ * ISA DMA controllers. */ #include <linux/config.h> -#include <linux/sched.h> #include <linux/init.h> #include <asm/dma.h> diff --git a/arch/arm/mach-footbridge/irq.c b/arch/arm/mach-footbridge/irq.c index df59f879d8fc..d4d2662ab040 100644 --- a/arch/arm/mach-footbridge/irq.c +++ b/arch/arm/mach-footbridge/irq.c @@ -14,9 +14,7 @@ * 26-Jan-1999 PJB Don't use IACK on CATS * 16-Mar-1999 RMK Added autodetect of ISA PICs */ -#include <linux/sched.h> #include <linux/ioport.h> -#include <linux/interrupt.h> #include <linux/init.h> #include <asm/mach/irq.h> diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c index 7808e0b2a9a7..1f021054d732 100644 --- a/arch/arm/mach-footbridge/isa-irq.c +++ b/arch/arm/mach-footbridge/isa-irq.c @@ -14,7 +14,6 @@ * 26-Jan-1999 PJB Don't use IACK on CATS * 16-Mar-1999 RMK Added autodetect of ISA PICs */ -#include <linux/sched.h> #include <linux/ioport.h> #include <linux/interrupt.h> #include <linux/init.h> diff --git a/arch/arm/mach-footbridge/mm.c b/arch/arm/mach-footbridge/mm.c index e9054bf77c2a..400932cfdead 100644 --- a/arch/arm/mach-footbridge/mm.c +++ b/arch/arm/mach-footbridge/mm.c @@ -11,7 +11,6 @@ */ #include <linux/config.h> #include <linux/kernel.h> -#include <linux/sched.h> #include <linux/mm.h> #include <linux/init.h> diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c index 587fb687476d..c81775b1a42d 100644 --- a/arch/arm/mach-footbridge/netwinder-hw.c +++ b/arch/arm/mach-footbridge/netwinder-hw.c @@ -7,7 +7,6 @@ */ #include <linux/config.h> #include <linux/module.h> -#include <linux/sched.h> #include <linux/ioport.h> #include <linux/kernel.h> #include <linux/delay.h> diff --git a/arch/arm/mach-ftvpci/core.c b/arch/arm/mach-ftvpci/core.c index 5fec4ef21b68..ea6d5c34e87f 100644 --- a/arch/arm/mach-ftvpci/core.c +++ b/arch/arm/mach-ftvpci/core.c @@ -9,7 +9,6 @@ * 2 of the License, or (at your option) any later version. */ #include <linux/kernel.h> -#include <linux/sched.h> #include <linux/mm.h> #include <linux/init.h> diff --git a/arch/arm/mach-integrator/arch.c b/arch/arm/mach-integrator/arch.c index be2ac9afcc96..0a1fd15cf64a 100644 --- a/arch/arm/mach-integrator/arch.c +++ b/arch/arm/mach-integrator/arch.c @@ -19,8 +19,6 @@ */ #include <linux/config.h> #include <linux/types.h> -#include <linux/sched.h> -#include <linux/interrupt.h> #include <linux/init.h> #include <asm/hardware.h> diff --git a/arch/arm/mach-integrator/dma.c b/arch/arm/mach-integrator/dma.c index a53feed419d2..aae6f23cd72b 100644 --- a/arch/arm/mach-integrator/dma.c +++ b/arch/arm/mach-integrator/dma.c @@ -18,7 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <linux/sched.h> #include <linux/slab.h> #include <linux/mman.h> #include <linux/init.h> diff --git a/arch/arm/mach-integrator/pci.c b/arch/arm/mach-integrator/pci.c index 0c23671a70e7..58683093b818 100644 --- a/arch/arm/mach-integrator/pci.c +++ b/arch/arm/mach-integrator/pci.c @@ -21,7 +21,6 @@ * * PCI functions for Integrator */ -#include <linux/sched.h> #include <linux/kernel.h> #include <linux/pci.h> #include <linux/ptrace.h> diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 7c87676a73d8..2abfa3b524d5 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c @@ -21,7 +21,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include <linux/config.h> -#include <linux/sched.h> #include <linux/kernel.h> #include <linux/pci.h> #include <linux/ptrace.h> diff --git a/arch/arm/mach-integrator/time.c b/arch/arm/mach-integrator/time.c index fc32a809d9f3..39606096fbd6 100644 --- a/arch/arm/mach-integrator/time.c +++ b/arch/arm/mach-integrator/time.c @@ -8,7 +8,7 @@ * published by the Free Software Foundation. */ #include <linux/kernel.h> -#include <linux/sched.h> +#include <linux/time.h> #include <linux/init.h> #include <asm/hardware.h> diff --git a/arch/arm/mach-iop310/arch.c b/arch/arm/mach-iop310/arch.c index 9ff7a4c2963c..401ef090e50d 100644 --- a/arch/arm/mach-iop310/arch.c +++ b/arch/arm/mach-iop310/arch.c @@ -13,7 +13,7 @@ #include <linux/init.h> #include <linux/major.h> #include <linux/fs.h> -#include <asm/types.h> + #include <asm/setup.h> #include <asm/system.h> #include <asm/memory.h> diff --git a/arch/arm/mach-iop310/iop310-irq.c b/arch/arm/mach-iop310/iop310-irq.c index 653482d1191a..67639c9142cc 100644 --- a/arch/arm/mach-iop310/iop310-irq.c +++ b/arch/arm/mach-iop310/iop310-irq.c @@ -14,7 +14,6 @@ * */ #include <linux/init.h> -#include <linux/sched.h> #include <linux/interrupt.h> #include <asm/mach/irq.h> diff --git a/arch/arm/mach-iop310/iop310-pci.c b/arch/arm/mach-iop310/iop310-pci.c index 50faa6fecfcd..d5585f12430c 100644 --- a/arch/arm/mach-iop310/iop310-pci.c +++ b/arch/arm/mach-iop310/iop310-pci.c @@ -11,10 +11,8 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include <linux/sched.h> #include <linux/kernel.h> #include <linux/pci.h> -#include <linux/interrupt.h> #include <linux/slab.h> #include <linux/mm.h> #include <linux/init.h> diff --git a/arch/arm/mach-iop310/iq80310-irq.c b/arch/arm/mach-iop310/iq80310-irq.c index e9ff595590e7..7fdd36e1c1f4 100644 --- a/arch/arm/mach-iop310/iq80310-irq.c +++ b/arch/arm/mach-iop310/iq80310-irq.c @@ -14,10 +14,6 @@ * Moved demux from asm to C - DS * Fixes for various revision boards - DS */ -#include <linux/kernel_stat.h> -#include <linux/sched.h> -#include <linux/interrupt.h> -#include <linux/smp.h> #include <linux/init.h> #include <asm/irq.h> diff --git a/arch/arm/mach-iop310/iq80310-time.c b/arch/arm/mach-iop310/iq80310-time.c index 1151c6b3db28..42311bca889d 100644 --- a/arch/arm/mach-iop310/iq80310-time.c +++ b/arch/arm/mach-iop310/iq80310-time.c @@ -11,14 +11,11 @@ * published by the Free Software Foundation. * */ -#include <linux/module.h> -#include <linux/sched.h> #include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/time.h> #include <linux/init.h> #include <linux/timex.h> -#include <linux/smp.h> #include <asm/hardware.h> #include <asm/io.h> diff --git a/arch/arm/mach-iop310/xs80200-irq.c b/arch/arm/mach-iop310/xs80200-irq.c index 2d3af7c6b02e..d5d5784df8f8 100644 --- a/arch/arm/mach-iop310/xs80200-irq.c +++ b/arch/arm/mach-iop310/xs80200-irq.c @@ -11,8 +11,6 @@ * published by the Free Software Foundation. */ #include <linux/init.h> -#include <linux/sched.h> -#include <linux/interrupt.h> #include <asm/mach/irq.h> #include <asm/irq.h> diff --git a/arch/arm/mach-pxa/dma.c b/arch/arm/mach-pxa/dma.c index e2c141ca9619..69ee386d94e6 100644 --- a/arch/arm/mach-pxa/dma.c +++ b/arch/arm/mach-pxa/dma.c @@ -15,7 +15,6 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/kernel.h> -#include <linux/sched.h> #include <linux/errno.h> #include <asm/system.h> diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index e07988986b17..71b64a6d9fcc 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c @@ -17,9 +17,7 @@ #include <linux/major.h> #include <linux/fs.h> #include <linux/interrupt.h> -#include <linux/sched.h> -#include <asm/types.h> #include <asm/setup.h> #include <asm/memory.h> #include <asm/mach-types.h> diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 67fdf38f8e69..81c6e8a72496 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -14,7 +14,6 @@ #include <linux/init.h> #include <linux/module.h> -#include <linux/sched.h> #include <linux/interrupt.h> #include <linux/ptrace.h> diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index c58183dc334d..336f55987d09 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c @@ -16,9 +16,7 @@ #include <linux/major.h> #include <linux/fs.h> #include <linux/interrupt.h> -#include <linux/sched.h> -#include <asm/types.h> #include <asm/setup.h> #include <asm/memory.h> #include <asm/mach-types.h> diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index a52714acfd8b..8e738ed14e12 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c @@ -15,7 +15,6 @@ #include <linux/init.h> #include <linux/pm.h> #include <linux/slab.h> -#include <linux/sched.h> #include <linux/interrupt.h> #include <linux/sysctl.h> #include <linux/errno.h> diff --git a/arch/arm/mach-rpc/dma.c b/arch/arm/mach-rpc/dma.c index e81acb720463..dab328a0d6ab 100644 --- a/arch/arm/mach-rpc/dma.c +++ b/arch/arm/mach-rpc/dma.c @@ -9,7 +9,6 @@ * * DMA functions specific to RiscPC architecture */ -#include <linux/sched.h> #include <linux/slab.h> #include <linux/mman.h> #include <linux/init.h> diff --git a/arch/arm/mach-sa1100/adsbitsy.c b/arch/arm/mach-sa1100/adsbitsy.c index d5eb9b677449..d677abeea697 100644 --- a/arch/arm/mach-sa1100/adsbitsy.c +++ b/arch/arm/mach-sa1100/adsbitsy.c @@ -11,8 +11,6 @@ */ #include <linux/kernel.h> #include <linux/init.h> -#include <linux/sched.h> -#include <linux/interrupt.h> #include <linux/ptrace.h> #include <linux/ioport.h> #include <linux/serial_core.h> diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index d538b98d4284..6d775017ab7b 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c @@ -13,7 +13,6 @@ #include <linux/config.h> #include <linux/init.h> #include <linux/kernel.h> -#include <linux/sched.h> #include <linux/tty.h> #include <linux/module.h> #include <linux/errno.h> diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c index 11e0121b1b84..8366f546a0d8 100644 --- a/arch/arm/mach-sa1100/dma.c +++ b/arch/arm/mach-sa1100/dma.c @@ -11,8 +11,8 @@ */ #include <linux/module.h> +#include <linux/interrupt.h> #include <linux/init.h> -#include <linux/sched.h> #include <linux/spinlock.h> #include <linux/errno.h> diff --git a/arch/arm/mach-sa1100/flexanet.c b/arch/arm/mach-sa1100/flexanet.c index 3135f09aa12e..0a40c7831515 100644 --- a/arch/arm/mach-sa1100/flexanet.c +++ b/arch/arm/mach-sa1100/flexanet.c @@ -11,7 +11,6 @@ */ #include <linux/init.h> #include <linux/kernel.h> -#include <linux/sched.h> #include <linux/tty.h> #include <linux/module.h> #include <linux/errno.h> diff --git a/arch/arm/mach-sa1100/graphicsclient.c b/arch/arm/mach-sa1100/graphicsclient.c index 9c69428bb048..eb420d53a93d 100644 --- a/arch/arm/mach-sa1100/graphicsclient.c +++ b/arch/arm/mach-sa1100/graphicsclient.c @@ -11,8 +11,6 @@ */ #include <linux/kernel.h> #include <linux/init.h> -#include <linux/sched.h> -#include <linux/interrupt.h> #include <linux/ptrace.h> #include <asm/hardware.h> diff --git a/arch/arm/mach-sa1100/graphicsmaster.c b/arch/arm/mach-sa1100/graphicsmaster.c index d3eddf63205e..db88613a49ce 100644 --- a/arch/arm/mach-sa1100/graphicsmaster.c +++ b/arch/arm/mach-sa1100/graphicsmaster.c @@ -9,8 +9,6 @@ */ #include <linux/kernel.h> #include <linux/init.h> -#include <linux/sched.h> -#include <linux/interrupt.h> #include <linux/ptrace.h> #include <linux/ioport.h> diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c index 41e19e37d0c0..dd875ba0b559 100644 --- a/arch/arm/mach-sa1100/h3600.c +++ b/arch/arm/mach-sa1100/h3600.c @@ -23,7 +23,6 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/tty.h> -#include <linux/sched.h> #include <linux/pm.h> #include <linux/serial_core.h> diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c index c0440f8c8c37..46f3baf9cabf 100644 --- a/arch/arm/mach-sa1100/irq.c +++ b/arch/arm/mach-sa1100/irq.c @@ -11,8 +11,6 @@ */ #include <linux/init.h> #include <linux/module.h> -#include <linux/sched.h> -#include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/ptrace.h> diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index 71c60c3c1467..23a681189b96 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c @@ -4,8 +4,6 @@ */ #include <linux/kernel.h> #include <linux/init.h> -#include <linux/sched.h> -#include <linux/interrupt.h> #include <linux/ptrace.h> #include <linux/tty.h> #include <linux/ioport.h> diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c index 76e0da5b973e..2e99c722be48 100644 --- a/arch/arm/mach-sa1100/pm.c +++ b/arch/arm/mach-sa1100/pm.c @@ -26,8 +26,6 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/pm.h> -#include <linux/sched.h> -#include <linux/interrupt.h> #include <linux/sysctl.h> #include <linux/errno.h> #include <linux/device.h> diff --git a/arch/arm/mach-sa1100/sa1111.c b/arch/arm/mach-sa1100/sa1111.c index 54a40462b2dc..3d2d93c6ea84 100644 --- a/arch/arm/mach-sa1100/sa1111.c +++ b/arch/arm/mach-sa1100/sa1111.c @@ -18,8 +18,6 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/delay.h> -#include <linux/sched.h> -#include <linux/interrupt.h> #include <linux/ptrace.h> #include <linux/errno.h> #include <linux/ioport.h> diff --git a/arch/arm/mach-sa1100/stork.c b/arch/arm/mach-sa1100/stork.c index 703a513a94d0..0c34c9d61bb8 100644 --- a/arch/arm/mach-sa1100/stork.c +++ b/arch/arm/mach-sa1100/stork.c @@ -14,7 +14,6 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/tty.h> -#include <linux/sched.h> #include <linux/delay.h> #include <asm/hardware.h> diff --git a/arch/arm/mach-sa1100/system3.c b/arch/arm/mach-sa1100/system3.c index d0dc614b0b87..6e47c1cda8eb 100644 --- a/arch/arm/mach-sa1100/system3.c +++ b/arch/arm/mach-sa1100/system3.c @@ -37,7 +37,6 @@ #include <linux/config.h> #include <linux/init.h> #include <linux/kernel.h> -#include <linux/sched.h> #include <linux/tty.h> #include <linux/module.h> #include <linux/errno.h> diff --git a/arch/arm/mach-shark/dma.c b/arch/arm/mach-shark/dma.c index 1a73aa9187ca..835989a02918 100644 --- a/arch/arm/mach-shark/dma.c +++ b/arch/arm/mach-shark/dma.c @@ -9,12 +9,9 @@ */ #include <linux/config.h> -#include <linux/sched.h> #include <linux/init.h> #include <asm/dma.h> -#include <asm/io.h> - #include <asm/mach/dma.h> void __init arch_dma_init(dma_t *dma) diff --git a/arch/arm/mach-tbox/core.c b/arch/arm/mach-tbox/core.c index 64555b92d34c..e9099444b2c2 100644 --- a/arch/arm/mach-tbox/core.c +++ b/arch/arm/mach-tbox/core.c @@ -7,7 +7,6 @@ * Extra MM routines for the Tbox architecture */ #include <linux/kernel.h> -#include <linux/sched.h> #include <linux/mm.h> #include <linux/init.h> diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index 88ca1a91ef0a..8d4045d105ee 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile @@ -22,24 +22,21 @@ obj-$(CONFIG_DISCONTIGMEM) += discontig.o p-$(CONFIG_CPU_26) += proc-arm2_3.o # ARMv3 -p-$(CONFIG_CPU_ARM610) += proc-arm6_7.o tlb-v3.o copypage-v3.o -p-$(CONFIG_CPU_ARM710) += proc-arm6_7.o tlb-v3.o copypage-v3.o +p-$(CONFIG_CPU_ARM610) += proc-arm6_7.o tlb-v3.o copypage-v3.o +p-$(CONFIG_CPU_ARM710) += proc-arm6_7.o tlb-v3.o copypage-v3.o # ARMv4 -p-$(CONFIG_CPU_ARM720T) += proc-arm720.o tlb-v4.o copypage-v4wt.o abort-lv4t.o -p-$(CONFIG_CPU_ARM920T) += proc-arm920.o tlb-v4wb.o copypage-v4wb.o abort-ev4t.o -p-$(CONFIG_CPU_ARM922T) += proc-arm922.o tlb-v4wb.o copypage-v4wb.o abort-ev4t.o -p-$(CONFIG_CPU_ARM1020) += proc-arm1020.o tlb-v4wb.o copypage-v4wb.o abort-ev4t.o -p-$(CONFIG_CPU_SA110) += proc-sa110.o tlb-v4wb.o copypage-v4wb.o abort-ev4.o minicache.o -p-$(CONFIG_CPU_SA1100) += proc-sa110.o tlb-v4wb.o copypage-v4mc.o abort-ev4.o minicache.o +p-$(CONFIG_CPU_ARM720T) += proc-arm720.o tlb-v4.o copypage-v4wt.o abort-lv4t.o +p-$(CONFIG_CPU_ARM920T) += proc-arm920.o tlb-v4wbi.o copypage-v4wb.o abort-ev4t.o +p-$(CONFIG_CPU_ARM922T) += proc-arm922.o tlb-v4wbi.o copypage-v4wb.o abort-ev4t.o +p-$(CONFIG_CPU_ARM1020) += proc-arm1020.o tlb-v4wbi.o copypage-v4wb.o abort-ev4t.o +p-$(CONFIG_CPU_SA110) += proc-sa110.o tlb-v4wb.o copypage-v4wb.o abort-ev4.o minicache.o +p-$(CONFIG_CPU_SA1100) += proc-sa110.o tlb-v4wb.o copypage-v4mc.o abort-ev4.o minicache.o # ARMv5 -p-$(CONFIG_CPU_ARM926T) += proc-arm926.o tlb-v4wb.o copypage-v4wb.o abort-ev5tej.o -p-$(CONFIG_CPU_XSCALE) += proc-xscale.o tlb-v4wb.o copypage-xscale.o abort-xscale.o minicache.o +p-$(CONFIG_CPU_ARM926T) += proc-arm926.o tlb-v4wbi.o copypage-v4wb.o abort-ev5tej.o +p-$(CONFIG_CPU_XSCALE) += proc-xscale.o tlb-v4wbi.o copypage-xscale.o abort-xscale.o minicache.o obj-y += $(sort $(p-y)) include $(TOPDIR)/Rules.make - -# Special dependencies -$(obj)/$(p-y): include/asm-arm/constants.h diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index db227d31264c..5c9ff8269e44 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c @@ -11,7 +11,6 @@ #include <linux/config.h> #include <linux/compiler.h> #include <linux/signal.h> -#include <linux/sched.h> #include <linux/kernel.h> #include <linux/errno.h> #include <linux/string.h> @@ -19,7 +18,6 @@ #include <linux/ptrace.h> #include <linux/mman.h> #include <linux/mm.h> -#include <linux/interrupt.h> #include <linux/proc_fs.h> #include <linux/bitops.h> #include <linux/init.h> diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index f8ad035fdf01..940b75d75bb9 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c @@ -131,21 +131,22 @@ do_PrefetchAbort(unsigned long addr, struct pt_regs *regs) * We take the easy way out of this problem - we make the * PTE uncacheable. However, we leave the write buffer on. */ -static void adjust_pte(struct vm_area_struct *vma, unsigned long address) +static int adjust_pte(struct vm_area_struct *vma, unsigned long address) { pgd_t *pgd; pmd_t *pmd; pte_t *pte, entry; + int ret = 0; pgd = pgd_offset(vma->vm_mm, address); if (pgd_none(*pgd)) - return; + goto no_pgd; if (pgd_bad(*pgd)) goto bad_pgd; pmd = pmd_offset(pgd, address); if (pmd_none(*pmd)) - return; + goto no_pmd; if (pmd_bad(*pmd)) goto bad_pmd; @@ -161,23 +162,64 @@ static void adjust_pte(struct vm_area_struct *vma, unsigned long address) pte_val(entry) &= ~L_PTE_CACHEABLE; set_pte(pte, entry); flush_tlb_page(vma, address); + ret = 1; } pte_unmap(pte); - return; + return ret; bad_pgd: pgd_ERROR(*pgd); pgd_clear(pgd); - return; +no_pgd: + return 0; bad_pmd: pmd_ERROR(*pmd); pmd_clear(pmd); - return; +no_pmd: + return 0; +} + +void __flush_dcache_page(struct page *page) +{ + struct mm_struct *mm = current->active_mm; + struct list_head *l; + unsigned long kaddr = (unsigned long)page_address(page); + + cpu_cache_clean_invalidate_range(kaddr, kaddr + PAGE_SIZE, 0); + + if (!page->mapping) + return; + + /* + * With a VIVT cache, we need to also write back + * and invalidate any user data. + */ + list_for_each(l, &page->mapping->i_mmap_shared) { + struct vm_area_struct *mpnt; + unsigned long off; + + mpnt = list_entry(l, struct vm_area_struct, shared); + + /* + * If this VMA is not in our MM, we can ignore it. + */ + if (mpnt->vm_mm != mm) + continue; + + if (page->index < mpnt->vm_pgoff) + continue; + + off = page->index - mpnt->vm_pgoff; + if (off >= (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT) + continue; + + flush_cache_page(mpnt, off); + } } static void -make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page) +make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page, int dirty) { struct list_head *l; struct mm_struct *mm = vma->vm_mm; @@ -213,14 +255,17 @@ make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page) if (off >= (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT) continue; + off = mpnt->vm_start + (off << PAGE_SHIFT); + /* * Ok, it is within mpnt. Fix it up. */ - adjust_pte(mpnt, mpnt->vm_start + (off << PAGE_SHIFT)); - aliases ++; + aliases += adjust_pte(mpnt, off); } if (aliases) adjust_pte(vma, addr); + else + flush_cache_page(vma, addr); } /* @@ -245,9 +290,12 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte) return; page = pfn_to_page(pfn); if (page->mapping) { - if (test_and_clear_bit(PG_dcache_dirty, &page->flags)) - __flush_dcache_page(page); + int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags); + unsigned long kaddr = (unsigned long)page_address(page); + + if (dirty) + cpu_cache_clean_invalidate_range(kaddr, kaddr + PAGE_SIZE, 0); - make_coherent(vma, addr, page); + make_coherent(vma, addr, page, dirty); } } diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index ff3347e2669f..2775beae8d03 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -9,7 +9,6 @@ */ #include <linux/config.h> #include <linux/signal.h> -#include <linux/sched.h> #include <linux/kernel.h> #include <linux/errno.h> #include <linux/string.h> diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index a0bc8550cf08..33e0237223f9 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c @@ -9,7 +9,6 @@ * * Page table sludge for ARM v3 and v4 processor architectures. */ -#include <linux/sched.h> #include <linux/mm.h> #include <linux/init.h> #include <linux/bootmem.h> @@ -166,14 +165,13 @@ free: static inline void alloc_init_section(unsigned long virt, unsigned long phys, int prot) { - pmd_t *pmdp, pmd; + pmd_t *pmdp; pmdp = pmd_offset(pgd_offset_k(virt), virt); if (virt & (1 << 20)) pmdp++; - pmd_val(pmd) = phys | prot; - set_pmd(pmdp, pmd); + set_pmd(pmdp, __pmd(phys | prot)); } /* @@ -186,19 +184,20 @@ alloc_init_section(unsigned long virt, unsigned long phys, int prot) static inline void alloc_init_page(unsigned long virt, unsigned long phys, unsigned int prot_l1, pgprot_t prot) { - pmd_t *pmdp, pmd; + pmd_t *pmdp; pte_t *ptep; pmdp = pmd_offset(pgd_offset_k(virt), virt); if (pmd_none(*pmdp)) { + unsigned long pmdval; ptep = alloc_bootmem_low_pages(2 * PTRS_PER_PTE * sizeof(pte_t)); - pmd_val(pmd) = __pa(ptep) | prot_l1; - set_pmd(pmdp, pmd); - pmd_val(pmd) += 256 * sizeof(pte_t); - set_pmd(pmdp + 1, pmd); + pmdval = __pa(ptep) | prot_l1; + pmdp[0] = __pmd(pmdval); + pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t)); + cpu_flush_pmd(pmdp); } ptep = pte_offset_kernel(pmdp, virt); @@ -360,8 +359,9 @@ static void __init create_mapping(struct map_desc *md) */ void setup_mm_for_reboot(char mode) { + unsigned long pmdval; pgd_t *pgd; - pmd_t pmd; + pmd_t *pmd; int i; if (current->mm && current->mm->pgd) @@ -370,10 +370,11 @@ void setup_mm_for_reboot(char mode) pgd = init_mm.pgd; for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++) { - pmd_val(pmd) = (i << PGDIR_SHIFT) | - PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | - PMD_TYPE_SECT; - set_pmd(pmd_offset(pgd + i, i << PGDIR_SHIFT), pmd); + pmdval = (i << PGDIR_SHIFT) | + PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | + PMD_BIT4 | PMD_TYPE_SECT; + pmd = pmd_offset(pgd + i, i << PGDIR_SHIFT); + set_pmd(pmd, __pmd(pmdval)); } } diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index c07da1b6e873..9e936e435f18 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S @@ -365,17 +365,15 @@ ENTRY(cpu_arm1020_set_pgd) mov pc, lr /* - * cpu_arm1020_set_pmd(pmdp, pmd) + * cpu_arm1020_flush_pmd(pmdp) * * Set a level 1 translation table entry, and clean it out of * any caches such that the MMUs can load it correctly. * * pmdp: pointer to PMD entry - * pmd: PMD value to store */ .align 5 -ENTRY(cpu_arm1020_set_pmd) - str r1, [r0] +ENTRY(cpu_arm1020_flush_pmd) #ifndef CONFIG_CPU_DCACHE_DISABLE mcr p15, 0, r0, c7, c10, 4 mcr p15, 0, r0, c7, c10, 1 @ clean D entry (drain is done by TLB fns) @@ -515,7 +513,7 @@ arm1020_processor_functions: /* pgtable */ .word cpu_arm1020_set_pgd - .word cpu_arm1020_set_pmd + .word cpu_arm1020_flush_pmd .word cpu_arm1020_set_pte .size arm1020_processor_functions, . - arm1020_processor_functions diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S index 1b1055d27614..0405e3b21603 100644 --- a/arch/arm/mm/proc-arm6_7.S +++ b/arch/arm/mm/proc-arm6_7.S @@ -234,34 +234,14 @@ ENTRY(cpu_arm7_set_pgd) mov pc, lr /* - * Function: arm6_set_pmd () + * Function: arm6_flush_pmd(pmdp) * * Params : r0 = Address to set - * : r1 = value to set - * - * Purpose : Set a PMD and flush it out of any WB cache - */ -ENTRY(cpu_arm6_set_pmd) - and r2, r1, #11 - teq r2, #1 - teqne r2, #9 - teqne r2, #10 - orreq r1, r1, #16 @ Updatable = 1 if Page table/Cacheable section - str r1, [r0] - mov pc, lr - -/* - * Function: arm7_set_pmd () - * - * Params : r0 = Address to set - * : r1 = value to set * * Purpose : Set a PMD and flush it out of any WB cache */ -ENTRY(cpu_arm7_set_pmd) - tst r1, #3 - orrne r1, r1, #16 @ Updatable bit is always set on ARM7 - str r1, [r0] +ENTRY(cpu_arm6_flush_pmd) +ENTRY(cpu_arm7_flush_pmd) mov pc, lr /* @@ -368,7 +348,7 @@ ENTRY(arm6_processor_functions) /* pgtable */ .word cpu_arm6_set_pgd - .word cpu_arm6_set_pmd + .word cpu_arm6_flush_pmd .word cpu_arm6_set_pte .size arm6_processor_functions, . - arm6_processor_functions @@ -402,7 +382,7 @@ ENTRY(arm7_processor_functions) /* pgtable */ .word cpu_arm7_set_pgd - .word cpu_arm7_set_pmd + .word cpu_arm7_flush_pmd .word cpu_arm7_set_pte .size arm7_processor_functions, . - arm7_processor_functions diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S index ab4152a7ed39..f3396cbdd79a 100644 --- a/arch/arm/mm/proc-arm720.S +++ b/arch/arm/mm/proc-arm720.S @@ -115,17 +115,13 @@ ENTRY(cpu_arm720_set_pgd) mov pc, lr /* - * Function: arm720_set_pmd () + * Function: arm720_flush_pmd(pmdp) * * Params : r0 = Address to set - * : r1 = value to set * * Purpose : Set a PMD and flush it out of any WB cache */ -ENTRY(cpu_arm720_set_pmd) - tst r1, #3 - orrne r1, r1, #16 @ Updatable bit is - str r1, [r0] @ always set on ARM720 +ENTRY(cpu_arm720_flush_pmd) mov pc, lr /* @@ -222,7 +218,7 @@ ENTRY(arm720_processor_functions) /* pgtable */ .word cpu_arm720_set_pgd - .word cpu_arm720_set_pmd + .word cpu_arm720_flush_pmd .word cpu_arm720_set_pte .size arm720_processor_functions, . - arm720_processor_functions diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index 59ebba740113..46206021205e 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S @@ -368,17 +368,15 @@ ENTRY(cpu_arm920_set_pgd) mov pc, lr /* - * cpu_arm920_set_pmd(pmdp, pmd) + * cpu_arm920_flush_pmd(pmdp) * * Set a level 1 translation table entry, and clean it out of * any caches such that the MMUs can load it correctly. * * pmdp: pointer to PMD entry - * pmd: PMD value to store */ .align 5 -ENTRY(cpu_arm920_set_pmd) - str r1, [r0] +ENTRY(cpu_arm920_flush_pmd) mcr p15, 0, r0, c7, c10, 1 @ clean D entry mcr p15, 0, r0, c7, c10, 4 @ drain WB mov pc, lr @@ -503,7 +501,7 @@ arm920_processor_functions: /* pgtable */ .word cpu_arm920_set_pgd - .word cpu_arm920_set_pmd + .word cpu_arm920_flush_pmd .word cpu_arm920_set_pte .size arm920_processor_functions, . - arm920_processor_functions diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S index e213895147f5..d74cf416cc27 100644 --- a/arch/arm/mm/proc-arm922.S +++ b/arch/arm/mm/proc-arm922.S @@ -369,17 +369,15 @@ ENTRY(cpu_arm922_set_pgd) mov pc, lr /* - * cpu_arm922_set_pmd(pmdp, pmd) + * cpu_arm922_flush_pmd(pmdp) * * Set a level 1 translation table entry, and clean it out of * any caches such that the MMUs can load it correctly. * * pmdp: pointer to PMD entry - * pmd: PMD value to store */ .align 5 -ENTRY(cpu_arm922_set_pmd) - str r1, [r0] +ENTRY(cpu_arm922_flush_pmd) mcr p15, 0, r0, c7, c10, 1 @ clean D entry mcr p15, 0, r0, c7, c10, 4 @ drain WB mov pc, lr @@ -502,7 +500,7 @@ arm922_processor_functions: /* pgtable */ .word cpu_arm922_set_pgd - .word cpu_arm922_set_pmd + .word cpu_arm922_flush_pmd .word cpu_arm922_set_pte .size arm922_processor_functions, . - arm922_processor_functions diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 78f6c9996290..766103efa986 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S @@ -350,17 +350,15 @@ ENTRY(cpu_arm926_set_pgd) mov pc, lr /* - * cpu_arm926_set_pmd(pmdp, pmd) + * cpu_arm926_flush_pmd(pmdp) * * Set a level 1 translation table entry, and clean it out of * any caches such that the MMUs can load it correctly. * * pmdp: pointer to PMD entry - * pmd: PMD value to store */ .align 5 -ENTRY(cpu_arm926_set_pmd) - str r1, [r0] +ENTRY(cpu_arm926_flush_pmd) #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH mcr p15, 0, r0, c7, c10, 1 @ clean D entry #endif @@ -500,7 +498,7 @@ arm926_processor_functions: /* pgtable */ .word cpu_arm926_set_pgd - .word cpu_arm926_set_pmd + .word cpu_arm926_flush_pmd .word cpu_arm926_set_pte .size arm926_processor_functions, . - arm926_processor_functions diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S index 69a111109b9c..fec7e5e8576b 100644 --- a/arch/arm/mm/proc-sa110.S +++ b/arch/arm/mm/proc-sa110.S @@ -425,18 +425,16 @@ ENTRY(cpu_sa1100_set_pgd) mov pc, lr /* - * cpu_sa110_set_pmd(pmdp, pmd) + * cpu_sa110_flush_pmd(pmdp) * * Set a level 1 translation table entry, and clean it out of * any caches such that the MMUs can load it correctly. * * pmdp: pointer to PMD entry - * pmd: PMD value to store */ .align 5 -ENTRY(cpu_sa110_set_pmd) -ENTRY(cpu_sa1100_set_pmd) - str r1, [r0] +ENTRY(cpu_sa110_flush_pmd) +ENTRY(cpu_sa1100_flush_pmd) mcr p15, 0, r0, c7, c10, 1 @ clean D entry mcr p15, 0, r0, c7, c10, 4 @ drain WB mov pc, lr @@ -544,7 +542,7 @@ ENTRY(sa110_processor_functions) /* pgtable */ .word cpu_sa110_set_pgd - .word cpu_sa110_set_pmd + .word cpu_sa110_flush_pmd .word cpu_sa110_set_pte .size sa110_processor_functions, . - sa110_processor_functions @@ -584,7 +582,7 @@ ENTRY(sa1100_processor_functions) /* pgtable */ .word cpu_sa1100_set_pgd - .word cpu_sa1100_set_pmd + .word cpu_sa1100_flush_pmd .word cpu_sa1100_set_pte .size sa1100_processor_functions, . - sa1100_processor_functions diff --git a/arch/arm/mm/proc-syms.c b/arch/arm/mm/proc-syms.c index fe84d27a9681..47c5448e619f 100644 --- a/arch/arm/mm/proc-syms.c +++ b/arch/arm/mm/proc-syms.c @@ -1,7 +1,7 @@ /* * linux/arch/arm/mm/proc-syms.c * - * Copyright (C) 2000 Russell King + * Copyright (C) 2000-2002 Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -15,6 +15,8 @@ #include <asm/proc-fns.h> #include <asm/tlbflush.h> +EXPORT_SYMBOL(__flush_dcache_page); + #ifndef MULTI_CPU EXPORT_SYMBOL(cpu_cache_clean_invalidate_all); EXPORT_SYMBOL(cpu_cache_clean_invalidate_range); @@ -25,7 +27,7 @@ EXPORT_SYMBOL(cpu_dcache_invalidate_range); EXPORT_SYMBOL(cpu_icache_invalidate_range); EXPORT_SYMBOL(cpu_icache_invalidate_page); EXPORT_SYMBOL(cpu_set_pgd); -EXPORT_SYMBOL(cpu_set_pmd); +EXPORT_SYMBOL(cpu_flush_pmd); EXPORT_SYMBOL(cpu_set_pte); #else EXPORT_SYMBOL(processor); diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 2d4bbb5b91d3..c8f2b34b59d1 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S @@ -573,17 +573,15 @@ ENTRY(cpu_xscale_set_pgd) cpwait_ret lr, ip /* - * cpu_xscale_set_pmd(pmdp, pmd) + * cpu_xscale_flush_pmd(pmdp) * * Set a level 1 translation table entry, and clean it out of * any caches such that the MMUs can load it correctly. * * pmdp: pointer to PMD entry - * pmd: PMD value to store */ .align 5 -ENTRY(cpu_xscale_set_pmd) - str r1, [r0] +ENTRY(cpu_xscale_flush_pmd) mov ip, #0 mcr p15, 0, r0, c7, c10, 1 @ Clean D cache line mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer @@ -721,7 +719,7 @@ ENTRY(xscale_processor_functions) /* pgtable */ .word cpu_xscale_set_pgd - .word cpu_xscale_set_pmd + .word cpu_xscale_flush_pmd .word cpu_xscale_set_pte .size xscale_processor_functions, . - xscale_processor_functions diff --git a/arch/arm/mm/tlb-v4wb.S b/arch/arm/mm/tlb-v4wb.S index 90ca6c7597a3..3444855fb646 100644 --- a/arch/arm/mm/tlb-v4wb.S +++ b/arch/arm/mm/tlb-v4wb.S @@ -7,10 +7,10 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * ARM architecture version 4 and version 5 TLB handling functions. - * These assume a split I/D TLBs, with a write buffer. + * ARM architecture version 4 TLB handling functions. + * These assume a split I/D TLBs w/o I TLB entry, with a write buffer. * - * Processors: ARM920 ARM922 ARM926 SA110 SA1100 SA1110 XScale + * Processors: SA110 SA1100 SA1110 */ #include <linux/linkage.h> #include <linux/init.h> @@ -67,50 +67,6 @@ ENTRY(v4wb_flush_kern_tlb_range) blo 1b mov pc, lr -/* - * These two are optimised for ARM920, ARM922, ARM926, Xscale - */ - -/* - * v4wb_flush_user_tlb_range(start, end, mm) - * - * Invalidate a range of TLB entries in the specified address space. - * - * - start - range start address - * - end - range end address - * - mm - mm_struct describing address space - */ - .align 5 -ENTRY(v4wbi_flush_user_tlb_range) - vma_vm_mm ip, r2 - act_mm r3 @ get current->active_mm - eors r3, ip, r3 @ == mm ? - movne pc, lr @ no, we dont do anything - mov r3, #0 - mcr p15, 0, r3, c7, c10, 4 @ drain WB - vma_vm_flags r2, r2 - bic r0, r0, #0x0ff - bic r0, r0, #0xf00 -1: tst r2, #VM_EXEC - mcrne p15, 0, r0, c8, c5, 1 @ invalidate I TLB entry - mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry - add r0, r0, #PAGE_SZ - cmp r0, r1 - blo 1b - mov pc, lr - -ENTRY(v4wbi_flush_kern_tlb_range) - mov r3, #0 - mcr p15, 0, r3, c7, c10, 4 @ drain WB - bic r0, r0, #0x0ff - bic r0, r0, #0xf00 -1: mcr p15, 0, r0, c8, c5, 1 @ invalidate I TLB entry - mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry - add r0, r0, #PAGE_SZ - cmp r0, r1 - blo 1b - mov pc, lr - __INIT .type v4wb_tlb_fns, #object @@ -119,10 +75,3 @@ ENTRY(v4wb_tlb_fns) .long v4wb_flush_kern_tlb_range .long v4wb_tlb_flags .size v4wb_tlb_fns, . - v4wb_tlb_fns - - .type v4wbi_tlb_fns, #object -ENTRY(v4wbi_tlb_fns) - .long v4wbi_flush_user_tlb_range - .long v4wbi_flush_kern_tlb_range - .long v4wbi_tlb_flags - .size v4wbi_tlb_fns, . - v4wbi_tlb_fns diff --git a/arch/arm/mm/tlb-v4wbi.S b/arch/arm/mm/tlb-v4wbi.S new file mode 100644 index 000000000000..ecbdcd0b981a --- /dev/null +++ b/arch/arm/mm/tlb-v4wbi.S @@ -0,0 +1,68 @@ +/* + * linux/arch/arm/mm/tlbv4wbi.S + * + * Copyright (C) 1997-2002 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ARM architecture version 4 and version 5 TLB handling functions. + * These assume a split I/D TLBs, with a write buffer. + * + * Processors: ARM920 ARM922 ARM926 XScale + */ +#include <linux/linkage.h> +#include <linux/init.h> +#include <asm/constants.h> +#include <asm/tlbflush.h> +#include "proc-macros.S" + +/* + * v4wb_flush_user_tlb_range(start, end, mm) + * + * Invalidate a range of TLB entries in the specified address space. + * + * - start - range start address + * - end - range end address + * - mm - mm_struct describing address space + */ + .align 5 +ENTRY(v4wbi_flush_user_tlb_range) + vma_vm_mm ip, r2 + act_mm r3 @ get current->active_mm + eors r3, ip, r3 @ == mm ? + movne pc, lr @ no, we dont do anything + mov r3, #0 + mcr p15, 0, r3, c7, c10, 4 @ drain WB + vma_vm_flags r2, r2 + bic r0, r0, #0x0ff + bic r0, r0, #0xf00 +1: tst r2, #VM_EXEC + mcrne p15, 0, r0, c8, c5, 1 @ invalidate I TLB entry + mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry + add r0, r0, #PAGE_SZ + cmp r0, r1 + blo 1b + mov pc, lr + +ENTRY(v4wbi_flush_kern_tlb_range) + mov r3, #0 + mcr p15, 0, r3, c7, c10, 4 @ drain WB + bic r0, r0, #0x0ff + bic r0, r0, #0xf00 +1: mcr p15, 0, r0, c8, c5, 1 @ invalidate I TLB entry + mcr p15, 0, r0, c8, c6, 1 @ invalidate D TLB entry + add r0, r0, #PAGE_SZ + cmp r0, r1 + blo 1b + mov pc, lr + + __INIT + + .type v4wbi_tlb_fns, #object +ENTRY(v4wbi_tlb_fns) + .long v4wbi_flush_user_tlb_range + .long v4wbi_flush_kern_tlb_range + .long v4wbi_tlb_flags + .size v4wbi_tlb_fns, . - v4wbi_tlb_fns diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile index 69e89827a523..1c8014bdeb10 100644 --- a/arch/arm/tools/Makefile +++ b/arch/arm/tools/Makefile @@ -4,9 +4,6 @@ # Copyright (C) 2001 Russell King # -include $(TOPDIR)/Rules.make - include/asm-arm/mach-types.h: $(obj)/mach-types $(obj)/gen-mach-types @echo ' Generating $@' - @awk -f $(obj)/gen-mach-types $(obj)/mach-types > $@ - + @$(AWK) -f $(obj)/gen-mach-types $(obj)/mach-types > $@ |
