diff options
Diffstat (limited to 'arch')
49 files changed, 489 insertions, 446 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index f9f77c65dff3..8ebbb511c783 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -95,8 +95,8 @@ ORIG_CFLAGS := $(KBUILD_CFLAGS) | |||
95 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) | 95 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) |
96 | endif | 96 | endif |
97 | 97 | ||
98 | EXTRA_CFLAGS := -fpic -fno-builtin | 98 | ccflags-y := -fpic -fno-builtin |
99 | EXTRA_AFLAGS := -Wa,-march=all | 99 | asflags-y := -Wa,-march=all |
100 | 100 | ||
101 | # Provide size of uncompressed kernel to the decompressor via a linker symbol. | 101 | # Provide size of uncompressed kernel to the decompressor via a linker symbol. |
102 | LDFLAGS_vmlinux = --defsym _image_size=$(shell stat -c "%s" $(obj)/../Image) | 102 | LDFLAGS_vmlinux = --defsym _image_size=$(shell stat -c "%s" $(obj)/../Image) |
diff --git a/arch/arm/vfp/Makefile b/arch/arm/vfp/Makefile index 39f6d8e1af73..6de73aab0195 100644 --- a/arch/arm/vfp/Makefile +++ b/arch/arm/vfp/Makefile | |||
@@ -4,8 +4,8 @@ | |||
4 | # Copyright (C) 2001 ARM Limited | 4 | # Copyright (C) 2001 ARM Limited |
5 | # | 5 | # |
6 | 6 | ||
7 | # EXTRA_CFLAGS := -DDEBUG | 7 | # ccflags-y := -DDEBUG |
8 | # EXTRA_AFLAGS := -DDEBUG | 8 | # asflags-y := -DDEBUG |
9 | 9 | ||
10 | KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) | 10 | KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) |
11 | LDFLAGS +=--no-warn-mismatch | 11 | LDFLAGS +=--no-warn-mismatch |
diff --git a/arch/h8300/boot/compressed/Makefile b/arch/h8300/boot/compressed/Makefile index d6189e057ed3..6745cb1ffb4f 100644 --- a/arch/h8300/boot/compressed/Makefile +++ b/arch/h8300/boot/compressed/Makefile | |||
@@ -5,7 +5,7 @@ | |||
5 | # | 5 | # |
6 | 6 | ||
7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o | 7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o |
8 | EXTRA_AFLAGS := -traditional | 8 | asflags-y := -traditional |
9 | 9 | ||
10 | OBJECTS = $(obj)/head.o $(obj)/misc.o | 10 | OBJECTS = $(obj)/head.o $(obj)/misc.o |
11 | 11 | ||
diff --git a/arch/ia64/kvm/Makefile b/arch/ia64/kvm/Makefile index 1089b3e918ac..db3d7c5d1071 100644 --- a/arch/ia64/kvm/Makefile +++ b/arch/ia64/kvm/Makefile | |||
@@ -45,8 +45,8 @@ FORCE : $(obj)/$(offsets-file) | |||
45 | # Makefile for Kernel-based Virtual Machine module | 45 | # Makefile for Kernel-based Virtual Machine module |
46 | # | 46 | # |
47 | 47 | ||
48 | EXTRA_CFLAGS += -Ivirt/kvm -Iarch/ia64/kvm/ | 48 | ccflags-y := -Ivirt/kvm -Iarch/ia64/kvm/ |
49 | EXTRA_AFLAGS += -Ivirt/kvm -Iarch/ia64/kvm/ | 49 | asflags-y := -Ivirt/kvm -Iarch/ia64/kvm/ |
50 | 50 | ||
51 | common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \ | 51 | common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \ |
52 | coalesced_mmio.o irq_comm.o assigned-dev.o) | 52 | coalesced_mmio.o irq_comm.o assigned-dev.o) |
diff --git a/arch/ia64/sn/kernel/Makefile b/arch/ia64/sn/kernel/Makefile index 0591038735af..d27df1d45da7 100644 --- a/arch/ia64/sn/kernel/Makefile +++ b/arch/ia64/sn/kernel/Makefile | |||
@@ -7,7 +7,7 @@ | |||
7 | # Copyright (C) 1999,2001-2006,2008 Silicon Graphics, Inc. All Rights Reserved. | 7 | # Copyright (C) 1999,2001-2006,2008 Silicon Graphics, Inc. All Rights Reserved. |
8 | # | 8 | # |
9 | 9 | ||
10 | EXTRA_CFLAGS += -Iarch/ia64/sn/include | 10 | ccflags-y := -Iarch/ia64/sn/include |
11 | 11 | ||
12 | obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ | 12 | obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ |
13 | huberror.o io_acpi_init.o io_common.o \ | 13 | huberror.o io_acpi_init.o io_common.o \ |
diff --git a/arch/ia64/sn/kernel/sn2/Makefile b/arch/ia64/sn/kernel/sn2/Makefile index 08e6565dc908..3d09108d4277 100644 --- a/arch/ia64/sn/kernel/sn2/Makefile +++ b/arch/ia64/sn/kernel/sn2/Makefile | |||
@@ -9,7 +9,7 @@ | |||
9 | # sn2 specific kernel files | 9 | # sn2 specific kernel files |
10 | # | 10 | # |
11 | 11 | ||
12 | EXTRA_CFLAGS += -Iarch/ia64/sn/include | 12 | ccflags-y := -Iarch/ia64/sn/include |
13 | 13 | ||
14 | obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ | 14 | obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ |
15 | prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o | 15 | prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o |
diff --git a/arch/ia64/sn/pci/Makefile b/arch/ia64/sn/pci/Makefile index ad4ef34dfe26..df2a90145426 100644 --- a/arch/ia64/sn/pci/Makefile +++ b/arch/ia64/sn/pci/Makefile | |||
@@ -7,6 +7,6 @@ | |||
7 | # | 7 | # |
8 | # Makefile for the sn pci general routines. | 8 | # Makefile for the sn pci general routines. |
9 | 9 | ||
10 | EXTRA_CFLAGS += -Iarch/ia64/sn/include | 10 | ccflags-y := -Iarch/ia64/sn/include |
11 | 11 | ||
12 | obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/ | 12 | obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/ |
diff --git a/arch/ia64/sn/pci/pcibr/Makefile b/arch/ia64/sn/pci/pcibr/Makefile index 01192d3247dd..396bcae36309 100644 --- a/arch/ia64/sn/pci/pcibr/Makefile +++ b/arch/ia64/sn/pci/pcibr/Makefile | |||
@@ -7,7 +7,7 @@ | |||
7 | # | 7 | # |
8 | # Makefile for the sn2 io routines. | 8 | # Makefile for the sn2 io routines. |
9 | 9 | ||
10 | EXTRA_CFLAGS += -Iarch/ia64/sn/include | 10 | ccflags-y := -Iarch/ia64/sn/include |
11 | 11 | ||
12 | obj-y += pcibr_dma.o pcibr_reg.o \ | 12 | obj-y += pcibr_dma.o pcibr_reg.o \ |
13 | pcibr_ate.o pcibr_provider.o | 13 | pcibr_ate.o pcibr_provider.o |
diff --git a/arch/ia64/uv/kernel/Makefile b/arch/ia64/uv/kernel/Makefile index 8d92b4684d8e..124e441d383d 100644 --- a/arch/ia64/uv/kernel/Makefile +++ b/arch/ia64/uv/kernel/Makefile | |||
@@ -7,7 +7,7 @@ | |||
7 | # Copyright (C) 2008 Silicon Graphics, Inc. All Rights Reserved. | 7 | # Copyright (C) 2008 Silicon Graphics, Inc. All Rights Reserved. |
8 | # | 8 | # |
9 | 9 | ||
10 | EXTRA_CFLAGS += -Iarch/ia64/sn/include | 10 | ccflags-y := -Iarch/ia64/sn/include |
11 | 11 | ||
12 | obj-y += setup.o | 12 | obj-y += setup.o |
13 | obj-$(CONFIG_IA64_GENERIC) += machvec.o | 13 | obj-$(CONFIG_IA64_GENERIC) += machvec.o |
diff --git a/arch/microblaze/kernel/cpu/Makefile b/arch/microblaze/kernel/cpu/Makefile index 59cc7bceaf8c..fceed4edea41 100644 --- a/arch/microblaze/kernel/cpu/Makefile +++ b/arch/microblaze/kernel/cpu/Makefile | |||
@@ -6,7 +6,7 @@ ifdef CONFIG_FUNCTION_TRACER | |||
6 | CFLAGS_REMOVE_cache.o = -pg | 6 | CFLAGS_REMOVE_cache.o = -pg |
7 | endif | 7 | endif |
8 | 8 | ||
9 | EXTRA_CFLAGS += -DCPU_MAJOR=$(CPU_MAJOR) -DCPU_MINOR=$(CPU_MINOR) \ | 9 | ccflags-y := -DCPU_MAJOR=$(CPU_MAJOR) -DCPU_MINOR=$(CPU_MINOR) \ |
10 | -DCPU_REV=$(CPU_REV) | 10 | -DCPU_REV=$(CPU_REV) |
11 | 11 | ||
12 | obj-y += cache.o cpuinfo.o cpuinfo-pvr-full.o cpuinfo-static.o mb.o pvr.o | 12 | obj-y += cache.o cpuinfo.o cpuinfo-pvr-full.o cpuinfo-static.o mb.o pvr.o |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 7c1102e41fe2..ac1d5b611a27 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -286,11 +286,11 @@ CLEAN_FILES += vmlinux.32 vmlinux.64 | |||
286 | archprepare: | 286 | archprepare: |
287 | ifdef CONFIG_MIPS32_N32 | 287 | ifdef CONFIG_MIPS32_N32 |
288 | @echo ' Checking missing-syscalls for N32' | 288 | @echo ' Checking missing-syscalls for N32' |
289 | $(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=n32" | 289 | $(Q)$(MAKE) $(build)=. missing-syscalls ccflags-y="-mabi=n32" |
290 | endif | 290 | endif |
291 | ifdef CONFIG_MIPS32_O32 | 291 | ifdef CONFIG_MIPS32_O32 |
292 | @echo ' Checking missing-syscalls for O32' | 292 | @echo ' Checking missing-syscalls for O32' |
293 | $(Q)$(MAKE) $(build)=. missing-syscalls EXTRA_CFLAGS="-mabi=32" | 293 | $(Q)$(MAKE) $(build)=. missing-syscalls ccflags-y="-mabi=32" |
294 | endif | 294 | endif |
295 | 295 | ||
296 | install: | 296 | install: |
diff --git a/arch/mips/bcm63xx/boards/Makefile b/arch/mips/bcm63xx/boards/Makefile index e5cc86dc1da8..9f64fb414077 100644 --- a/arch/mips/bcm63xx/boards/Makefile +++ b/arch/mips/bcm63xx/boards/Makefile | |||
@@ -1,3 +1,3 @@ | |||
1 | obj-$(CONFIG_BOARD_BCM963XX) += board_bcm963xx.o | 1 | obj-$(CONFIG_BOARD_BCM963XX) += board_bcm963xx.o |
2 | 2 | ||
3 | EXTRA_CFLAGS += -Werror | 3 | ccflags-y := -Werror |
diff --git a/arch/mips/fw/arc/Makefile b/arch/mips/fw/arc/Makefile index e0aaad482b0e..5314b37aff2c 100644 --- a/arch/mips/fw/arc/Makefile +++ b/arch/mips/fw/arc/Makefile | |||
@@ -9,4 +9,4 @@ lib-$(CONFIG_ARC_MEMORY) += memory.o | |||
9 | lib-$(CONFIG_ARC_CONSOLE) += arc_con.o | 9 | lib-$(CONFIG_ARC_CONSOLE) += arc_con.o |
10 | lib-$(CONFIG_ARC_PROMLIB) += promlib.o | 10 | lib-$(CONFIG_ARC_PROMLIB) += promlib.o |
11 | 11 | ||
12 | EXTRA_CFLAGS += -Werror | 12 | ccflags-y := -Werror |
diff --git a/arch/mips/jz4740/Makefile b/arch/mips/jz4740/Makefile index a604eaeb6c08..a9dff3321251 100644 --- a/arch/mips/jz4740/Makefile +++ b/arch/mips/jz4740/Makefile | |||
@@ -17,4 +17,4 @@ obj-$(CONFIG_JZ4740_QI_LB60) += board-qi_lb60.o | |||
17 | 17 | ||
18 | obj-$(CONFIG_PM) += pm.o | 18 | obj-$(CONFIG_PM) += pm.o |
19 | 19 | ||
20 | EXTRA_CFLAGS += -Werror -Wall | 20 | ccflags-y := -Werror -Wall |
diff --git a/arch/mips/oprofile/Makefile b/arch/mips/oprofile/Makefile index 02cc65e52d11..4b9d7044e26c 100644 --- a/arch/mips/oprofile/Makefile +++ b/arch/mips/oprofile/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | EXTRA_CFLAGS := -Werror | 1 | ccflags-y := -Werror |
2 | 2 | ||
3 | obj-$(CONFIG_OPROFILE) += oprofile.o | 3 | obj-$(CONFIG_OPROFILE) += oprofile.o |
4 | 4 | ||
diff --git a/arch/mips/pmc-sierra/yosemite/Makefile b/arch/mips/pmc-sierra/yosemite/Makefile index b16f95c3df65..02f5fb94ea28 100644 --- a/arch/mips/pmc-sierra/yosemite/Makefile +++ b/arch/mips/pmc-sierra/yosemite/Makefile | |||
@@ -6,4 +6,4 @@ obj-y += irq.o prom.o py-console.o setup.o | |||
6 | 6 | ||
7 | obj-$(CONFIG_SMP) += smp.o | 7 | obj-$(CONFIG_SMP) += smp.o |
8 | 8 | ||
9 | EXTRA_CFLAGS += -Werror | 9 | ccflags-y := -Werror |
diff --git a/arch/mips/powertv/Makefile b/arch/mips/powertv/Makefile index baf6e9092a9f..348d2e850ef5 100644 --- a/arch/mips/powertv/Makefile +++ b/arch/mips/powertv/Makefile | |||
@@ -28,4 +28,4 @@ obj-y += init.o ioremap.o memory.o powertv_setup.o reset.o time.o \ | |||
28 | 28 | ||
29 | obj-$(CONFIG_USB) += powertv-usb.o | 29 | obj-$(CONFIG_USB) += powertv-usb.o |
30 | 30 | ||
31 | EXTRA_CFLAGS += -Wall | 31 | ccflags-y := -Wall |
diff --git a/arch/mips/powertv/asic/Makefile b/arch/mips/powertv/asic/Makefile index f0e95dc0ac97..d810a33182a4 100644 --- a/arch/mips/powertv/asic/Makefile +++ b/arch/mips/powertv/asic/Makefile | |||
@@ -20,4 +20,4 @@ obj-y += asic-calliope.o asic-cronus.o asic-gaia.o asic-zeus.o \ | |||
20 | asic_devices.o asic_int.o irq_asic.o prealloc-calliope.o \ | 20 | asic_devices.o asic_int.o irq_asic.o prealloc-calliope.o \ |
21 | prealloc-cronus.o prealloc-cronuslite.o prealloc-gaia.o prealloc-zeus.o | 21 | prealloc-cronus.o prealloc-cronuslite.o prealloc-gaia.o prealloc-zeus.o |
22 | 22 | ||
23 | EXTRA_CFLAGS += -Wall -Werror | 23 | ccflags-y := -Wall -Werror |
diff --git a/arch/mips/powertv/pci/Makefile b/arch/mips/powertv/pci/Makefile index f5c62462fc9d..5783201cd2c8 100644 --- a/arch/mips/powertv/pci/Makefile +++ b/arch/mips/powertv/pci/Makefile | |||
@@ -18,4 +18,4 @@ | |||
18 | 18 | ||
19 | obj-$(CONFIG_PCI) += fixup-powertv.o | 19 | obj-$(CONFIG_PCI) += fixup-powertv.o |
20 | 20 | ||
21 | EXTRA_CFLAGS += -Wall -Werror | 21 | ccflags-y := -Wall -Werror |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index fed2946f7335..fafdf30bea9e 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -15,6 +15,7 @@ config PARISC | |||
15 | select HAVE_GENERIC_HARDIRQS | 15 | select HAVE_GENERIC_HARDIRQS |
16 | select GENERIC_IRQ_PROBE | 16 | select GENERIC_IRQ_PROBE |
17 | select IRQ_PER_CPU | 17 | select IRQ_PER_CPU |
18 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
18 | 19 | ||
19 | help | 20 | help |
20 | The PA-RISC microprocessor is designed by Hewlett-Packard and used | 21 | The PA-RISC microprocessor is designed by Hewlett-Packard and used |
diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h index f388a85bba11..d18328b3f938 100644 --- a/arch/parisc/include/asm/cacheflush.h +++ b/arch/parisc/include/asm/cacheflush.h | |||
@@ -26,8 +26,6 @@ void flush_user_dcache_range_asm(unsigned long, unsigned long); | |||
26 | void flush_kernel_dcache_range_asm(unsigned long, unsigned long); | 26 | void flush_kernel_dcache_range_asm(unsigned long, unsigned long); |
27 | void flush_kernel_dcache_page_asm(void *); | 27 | void flush_kernel_dcache_page_asm(void *); |
28 | void flush_kernel_icache_page(void *); | 28 | void flush_kernel_icache_page(void *); |
29 | void flush_user_dcache_page(unsigned long); | ||
30 | void flush_user_icache_page(unsigned long); | ||
31 | void flush_user_dcache_range(unsigned long, unsigned long); | 29 | void flush_user_dcache_range(unsigned long, unsigned long); |
32 | void flush_user_icache_range(unsigned long, unsigned long); | 30 | void flush_user_icache_range(unsigned long, unsigned long); |
33 | 31 | ||
@@ -37,6 +35,13 @@ void flush_cache_all_local(void); | |||
37 | void flush_cache_all(void); | 35 | void flush_cache_all(void); |
38 | void flush_cache_mm(struct mm_struct *mm); | 36 | void flush_cache_mm(struct mm_struct *mm); |
39 | 37 | ||
38 | #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE | ||
39 | void flush_kernel_dcache_page_addr(void *addr); | ||
40 | static inline void flush_kernel_dcache_page(struct page *page) | ||
41 | { | ||
42 | flush_kernel_dcache_page_addr(page_address(page)); | ||
43 | } | ||
44 | |||
40 | #define flush_kernel_dcache_range(start,size) \ | 45 | #define flush_kernel_dcache_range(start,size) \ |
41 | flush_kernel_dcache_range_asm((start), (start)+(size)); | 46 | flush_kernel_dcache_range_asm((start), (start)+(size)); |
42 | /* vmap range flushes and invalidates. Architecturally, we don't need | 47 | /* vmap range flushes and invalidates. Architecturally, we don't need |
@@ -50,6 +55,16 @@ static inline void flush_kernel_vmap_range(void *vaddr, int size) | |||
50 | } | 55 | } |
51 | static inline void invalidate_kernel_vmap_range(void *vaddr, int size) | 56 | static inline void invalidate_kernel_vmap_range(void *vaddr, int size) |
52 | { | 57 | { |
58 | unsigned long start = (unsigned long)vaddr; | ||
59 | void *cursor = vaddr; | ||
60 | |||
61 | for ( ; cursor < vaddr + size; cursor += PAGE_SIZE) { | ||
62 | struct page *page = vmalloc_to_page(cursor); | ||
63 | |||
64 | if (test_and_clear_bit(PG_dcache_dirty, &page->flags)) | ||
65 | flush_kernel_dcache_page(page); | ||
66 | } | ||
67 | flush_kernel_dcache_range_asm(start, start + size); | ||
53 | } | 68 | } |
54 | 69 | ||
55 | #define flush_cache_vmap(start, end) flush_cache_all() | 70 | #define flush_cache_vmap(start, end) flush_cache_all() |
@@ -90,19 +105,15 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned | |||
90 | void flush_cache_range(struct vm_area_struct *vma, | 105 | void flush_cache_range(struct vm_area_struct *vma, |
91 | unsigned long start, unsigned long end); | 106 | unsigned long start, unsigned long end); |
92 | 107 | ||
108 | /* defined in pacache.S exported in cache.c used by flush_anon_page */ | ||
109 | void flush_dcache_page_asm(unsigned long phys_addr, unsigned long vaddr); | ||
110 | |||
93 | #define ARCH_HAS_FLUSH_ANON_PAGE | 111 | #define ARCH_HAS_FLUSH_ANON_PAGE |
94 | static inline void | 112 | static inline void |
95 | flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr) | 113 | flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr) |
96 | { | 114 | { |
97 | if (PageAnon(page)) | 115 | if (PageAnon(page)) |
98 | flush_user_dcache_page(vmaddr); | 116 | flush_dcache_page_asm(page_to_phys(page), vmaddr); |
99 | } | ||
100 | |||
101 | #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE | ||
102 | void flush_kernel_dcache_page_addr(void *addr); | ||
103 | static inline void flush_kernel_dcache_page(struct page *page) | ||
104 | { | ||
105 | flush_kernel_dcache_page_addr(page_address(page)); | ||
106 | } | 117 | } |
107 | 118 | ||
108 | #ifdef CONFIG_DEBUG_RODATA | 119 | #ifdef CONFIG_DEBUG_RODATA |
diff --git a/arch/parisc/include/asm/irq.h b/arch/parisc/include/asm/irq.h index c67dccf2e31f..1073599a7be9 100644 --- a/arch/parisc/include/asm/irq.h +++ b/arch/parisc/include/asm/irq.h | |||
@@ -32,15 +32,10 @@ static __inline__ int irq_canonicalize(int irq) | |||
32 | } | 32 | } |
33 | 33 | ||
34 | struct irq_chip; | 34 | struct irq_chip; |
35 | struct irq_data; | ||
35 | 36 | ||
36 | /* | 37 | void cpu_ack_irq(struct irq_data *d); |
37 | * Some useful "we don't have to do anything here" handlers. Should | 38 | void cpu_eoi_irq(struct irq_data *d); |
38 | * probably be provided by the generic code. | ||
39 | */ | ||
40 | void no_ack_irq(unsigned int irq); | ||
41 | void no_end_irq(unsigned int irq); | ||
42 | void cpu_ack_irq(unsigned int irq); | ||
43 | void cpu_eoi_irq(unsigned int irq); | ||
44 | 39 | ||
45 | extern int txn_alloc_irq(unsigned int nbits); | 40 | extern int txn_alloc_irq(unsigned int nbits); |
46 | extern int txn_claim_irq(int); | 41 | extern int txn_claim_irq(int); |
@@ -49,7 +44,7 @@ extern unsigned long txn_alloc_addr(unsigned int); | |||
49 | extern unsigned long txn_affinity_addr(unsigned int irq, int cpu); | 44 | extern unsigned long txn_affinity_addr(unsigned int irq, int cpu); |
50 | 45 | ||
51 | extern int cpu_claim_irq(unsigned int irq, struct irq_chip *, void *); | 46 | extern int cpu_claim_irq(unsigned int irq, struct irq_chip *, void *); |
52 | extern int cpu_check_affinity(unsigned int irq, const struct cpumask *dest); | 47 | extern int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest); |
53 | 48 | ||
54 | /* soft power switch support (power.c) */ | 49 | /* soft power switch support (power.c) */ |
55 | extern struct tasklet_struct power_tasklet; | 50 | extern struct tasklet_struct power_tasklet; |
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index 6f1f65d3c0ef..5d7b8ce9fdf3 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h | |||
@@ -138,8 +138,7 @@ struct vm_area_struct; | |||
138 | #define _PAGE_NO_CACHE_BIT 24 /* (0x080) Uncached Page (U bit) */ | 138 | #define _PAGE_NO_CACHE_BIT 24 /* (0x080) Uncached Page (U bit) */ |
139 | #define _PAGE_ACCESSED_BIT 23 /* (0x100) Software: Page Accessed */ | 139 | #define _PAGE_ACCESSED_BIT 23 /* (0x100) Software: Page Accessed */ |
140 | #define _PAGE_PRESENT_BIT 22 /* (0x200) Software: translation valid */ | 140 | #define _PAGE_PRESENT_BIT 22 /* (0x200) Software: translation valid */ |
141 | #define _PAGE_FLUSH_BIT 21 /* (0x400) Software: translation valid */ | 141 | /* bit 21 was formerly the FLUSH bit but is now unused */ |
142 | /* for cache flushing only */ | ||
143 | #define _PAGE_USER_BIT 20 /* (0x800) Software: User accessible page */ | 142 | #define _PAGE_USER_BIT 20 /* (0x800) Software: User accessible page */ |
144 | 143 | ||
145 | /* N.B. The bits are defined in terms of a 32 bit word above, so the */ | 144 | /* N.B. The bits are defined in terms of a 32 bit word above, so the */ |
@@ -173,7 +172,6 @@ struct vm_area_struct; | |||
173 | #define _PAGE_NO_CACHE (1 << xlate_pabit(_PAGE_NO_CACHE_BIT)) | 172 | #define _PAGE_NO_CACHE (1 << xlate_pabit(_PAGE_NO_CACHE_BIT)) |
174 | #define _PAGE_ACCESSED (1 << xlate_pabit(_PAGE_ACCESSED_BIT)) | 173 | #define _PAGE_ACCESSED (1 << xlate_pabit(_PAGE_ACCESSED_BIT)) |
175 | #define _PAGE_PRESENT (1 << xlate_pabit(_PAGE_PRESENT_BIT)) | 174 | #define _PAGE_PRESENT (1 << xlate_pabit(_PAGE_PRESENT_BIT)) |
176 | #define _PAGE_FLUSH (1 << xlate_pabit(_PAGE_FLUSH_BIT)) | ||
177 | #define _PAGE_USER (1 << xlate_pabit(_PAGE_USER_BIT)) | 175 | #define _PAGE_USER (1 << xlate_pabit(_PAGE_USER_BIT)) |
178 | #define _PAGE_FILE (1 << xlate_pabit(_PAGE_FILE_BIT)) | 176 | #define _PAGE_FILE (1 << xlate_pabit(_PAGE_FILE_BIT)) |
179 | 177 | ||
@@ -213,7 +211,6 @@ struct vm_area_struct; | |||
213 | #define PAGE_KERNEL_RO __pgprot(_PAGE_KERNEL & ~_PAGE_WRITE) | 211 | #define PAGE_KERNEL_RO __pgprot(_PAGE_KERNEL & ~_PAGE_WRITE) |
214 | #define PAGE_KERNEL_UNC __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE) | 212 | #define PAGE_KERNEL_UNC __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE) |
215 | #define PAGE_GATEWAY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_GATEWAY| _PAGE_READ) | 213 | #define PAGE_GATEWAY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_GATEWAY| _PAGE_READ) |
216 | #define PAGE_FLUSH __pgprot(_PAGE_FLUSH) | ||
217 | 214 | ||
218 | 215 | ||
219 | /* | 216 | /* |
@@ -261,7 +258,7 @@ extern unsigned long *empty_zero_page; | |||
261 | 258 | ||
262 | #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) | 259 | #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) |
263 | 260 | ||
264 | #define pte_none(x) ((pte_val(x) == 0) || (pte_val(x) & _PAGE_FLUSH)) | 261 | #define pte_none(x) (pte_val(x) == 0) |
265 | #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) | 262 | #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) |
266 | #define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0) | 263 | #define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0) |
267 | 264 | ||
@@ -444,13 +441,10 @@ struct mm_struct; | |||
444 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 441 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
445 | { | 442 | { |
446 | pte_t old_pte; | 443 | pte_t old_pte; |
447 | pte_t pte; | ||
448 | 444 | ||
449 | spin_lock(&pa_dbit_lock); | 445 | spin_lock(&pa_dbit_lock); |
450 | pte = old_pte = *ptep; | 446 | old_pte = *ptep; |
451 | pte_val(pte) &= ~_PAGE_PRESENT; | 447 | pte_clear(mm,addr,ptep); |
452 | pte_val(pte) |= _PAGE_FLUSH; | ||
453 | set_pte_at(mm,addr,ptep,pte); | ||
454 | spin_unlock(&pa_dbit_lock); | 448 | spin_unlock(&pa_dbit_lock); |
455 | 449 | ||
456 | return old_pte; | 450 | return old_pte; |
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index d054f3da3ff5..3f11331c2775 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c | |||
@@ -27,12 +27,17 @@ | |||
27 | #include <asm/pgalloc.h> | 27 | #include <asm/pgalloc.h> |
28 | #include <asm/processor.h> | 28 | #include <asm/processor.h> |
29 | #include <asm/sections.h> | 29 | #include <asm/sections.h> |
30 | #include <asm/shmparam.h> | ||
30 | 31 | ||
31 | int split_tlb __read_mostly; | 32 | int split_tlb __read_mostly; |
32 | int dcache_stride __read_mostly; | 33 | int dcache_stride __read_mostly; |
33 | int icache_stride __read_mostly; | 34 | int icache_stride __read_mostly; |
34 | EXPORT_SYMBOL(dcache_stride); | 35 | EXPORT_SYMBOL(dcache_stride); |
35 | 36 | ||
37 | void flush_dcache_page_asm(unsigned long phys_addr, unsigned long vaddr); | ||
38 | EXPORT_SYMBOL(flush_dcache_page_asm); | ||
39 | void flush_icache_page_asm(unsigned long phys_addr, unsigned long vaddr); | ||
40 | |||
36 | 41 | ||
37 | /* On some machines (e.g. ones with the Merced bus), there can be | 42 | /* On some machines (e.g. ones with the Merced bus), there can be |
38 | * only a single PxTLB broadcast at a time; this must be guaranteed | 43 | * only a single PxTLB broadcast at a time; this must be guaranteed |
@@ -259,81 +264,13 @@ void disable_sr_hashing(void) | |||
259 | panic("SpaceID hashing is still on!\n"); | 264 | panic("SpaceID hashing is still on!\n"); |
260 | } | 265 | } |
261 | 266 | ||
262 | /* Simple function to work out if we have an existing address translation | ||
263 | * for a user space vma. */ | ||
264 | static inline int translation_exists(struct vm_area_struct *vma, | ||
265 | unsigned long addr, unsigned long pfn) | ||
266 | { | ||
267 | pgd_t *pgd = pgd_offset(vma->vm_mm, addr); | ||
268 | pmd_t *pmd; | ||
269 | pte_t pte; | ||
270 | |||
271 | if(pgd_none(*pgd)) | ||
272 | return 0; | ||
273 | |||
274 | pmd = pmd_offset(pgd, addr); | ||
275 | if(pmd_none(*pmd) || pmd_bad(*pmd)) | ||
276 | return 0; | ||
277 | |||
278 | /* We cannot take the pte lock here: flush_cache_page is usually | ||
279 | * called with pte lock already held. Whereas flush_dcache_page | ||
280 | * takes flush_dcache_mmap_lock, which is lower in the hierarchy: | ||
281 | * the vma itself is secure, but the pte might come or go racily. | ||
282 | */ | ||
283 | pte = *pte_offset_map(pmd, addr); | ||
284 | /* But pte_unmap() does nothing on this architecture */ | ||
285 | |||
286 | /* Filter out coincidental file entries and swap entries */ | ||
287 | if (!(pte_val(pte) & (_PAGE_FLUSH|_PAGE_PRESENT))) | ||
288 | return 0; | ||
289 | |||
290 | return pte_pfn(pte) == pfn; | ||
291 | } | ||
292 | |||
293 | /* Private function to flush a page from the cache of a non-current | ||
294 | * process. cr25 contains the Page Directory of the current user | ||
295 | * process; we're going to hijack both it and the user space %sr3 to | ||
296 | * temporarily make the non-current process current. We have to do | ||
297 | * this because cache flushing may cause a non-access tlb miss which | ||
298 | * the handlers have to fill in from the pgd of the non-current | ||
299 | * process. */ | ||
300 | static inline void | 267 | static inline void |
301 | flush_user_cache_page_non_current(struct vm_area_struct *vma, | 268 | __flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, |
302 | unsigned long vmaddr) | 269 | unsigned long physaddr) |
303 | { | 270 | { |
304 | /* save the current process space and pgd */ | 271 | flush_dcache_page_asm(physaddr, vmaddr); |
305 | unsigned long space = mfsp(3), pgd = mfctl(25); | 272 | if (vma->vm_flags & VM_EXEC) |
306 | 273 | flush_icache_page_asm(physaddr, vmaddr); | |
307 | /* we don't mind taking interrupts since they may not | ||
308 | * do anything with user space, but we can't | ||
309 | * be preempted here */ | ||
310 | preempt_disable(); | ||
311 | |||
312 | /* make us current */ | ||
313 | mtctl(__pa(vma->vm_mm->pgd), 25); | ||
314 | mtsp(vma->vm_mm->context, 3); | ||
315 | |||
316 | flush_user_dcache_page(vmaddr); | ||
317 | if(vma->vm_flags & VM_EXEC) | ||
318 | flush_user_icache_page(vmaddr); | ||
319 | |||
320 | /* put the old current process back */ | ||
321 | mtsp(space, 3); | ||
322 | mtctl(pgd, 25); | ||
323 | preempt_enable(); | ||
324 | } | ||
325 | |||
326 | |||
327 | static inline void | ||
328 | __flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr) | ||
329 | { | ||
330 | if (likely(vma->vm_mm->context == mfsp(3))) { | ||
331 | flush_user_dcache_page(vmaddr); | ||
332 | if (vma->vm_flags & VM_EXEC) | ||
333 | flush_user_icache_page(vmaddr); | ||
334 | } else { | ||
335 | flush_user_cache_page_non_current(vma, vmaddr); | ||
336 | } | ||
337 | } | 274 | } |
338 | 275 | ||
339 | void flush_dcache_page(struct page *page) | 276 | void flush_dcache_page(struct page *page) |
@@ -342,10 +279,8 @@ void flush_dcache_page(struct page *page) | |||
342 | struct vm_area_struct *mpnt; | 279 | struct vm_area_struct *mpnt; |
343 | struct prio_tree_iter iter; | 280 | struct prio_tree_iter iter; |
344 | unsigned long offset; | 281 | unsigned long offset; |
345 | unsigned long addr; | 282 | unsigned long addr, old_addr = 0; |
346 | pgoff_t pgoff; | 283 | pgoff_t pgoff; |
347 | unsigned long pfn = page_to_pfn(page); | ||
348 | |||
349 | 284 | ||
350 | if (mapping && !mapping_mapped(mapping)) { | 285 | if (mapping && !mapping_mapped(mapping)) { |
351 | set_bit(PG_dcache_dirty, &page->flags); | 286 | set_bit(PG_dcache_dirty, &page->flags); |
@@ -369,20 +304,11 @@ void flush_dcache_page(struct page *page) | |||
369 | offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT; | 304 | offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT; |
370 | addr = mpnt->vm_start + offset; | 305 | addr = mpnt->vm_start + offset; |
371 | 306 | ||
372 | /* Flush instructions produce non access tlb misses. | 307 | if (old_addr == 0 || (old_addr & (SHMLBA - 1)) != (addr & (SHMLBA - 1))) { |
373 | * On PA, we nullify these instructions rather than | 308 | __flush_cache_page(mpnt, addr, page_to_phys(page)); |
374 | * taking a page fault if the pte doesn't exist. | 309 | if (old_addr) |
375 | * This is just for speed. If the page translation | 310 | printk(KERN_ERR "INEQUIVALENT ALIASES 0x%lx and 0x%lx in file %s\n", old_addr, addr, mpnt->vm_file ? mpnt->vm_file->f_path.dentry->d_name.name : "(null)"); |
376 | * isn't there, there's no point exciting the | 311 | old_addr = addr; |
377 | * nadtlb handler into a nullification frenzy. | ||
378 | * | ||
379 | * Make sure we really have this page: the private | ||
380 | * mappings may cover this area but have COW'd this | ||
381 | * particular page. | ||
382 | */ | ||
383 | if (translation_exists(mpnt, addr, pfn)) { | ||
384 | __flush_cache_page(mpnt, addr); | ||
385 | break; | ||
386 | } | 312 | } |
387 | } | 313 | } |
388 | flush_dcache_mmap_unlock(mapping); | 314 | flush_dcache_mmap_unlock(mapping); |
@@ -573,7 +499,6 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long | |||
573 | { | 499 | { |
574 | BUG_ON(!vma->vm_mm->context); | 500 | BUG_ON(!vma->vm_mm->context); |
575 | 501 | ||
576 | if (likely(translation_exists(vma, vmaddr, pfn))) | 502 | __flush_cache_page(vma, vmaddr, page_to_phys(pfn_to_page(pfn))); |
577 | __flush_cache_page(vma, vmaddr); | ||
578 | 503 | ||
579 | } | 504 | } |
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 6337adef30f6..e5477092a5d4 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -225,22 +225,13 @@ | |||
225 | #ifndef CONFIG_64BIT | 225 | #ifndef CONFIG_64BIT |
226 | /* | 226 | /* |
227 | * naitlb miss interruption handler (parisc 1.1 - 32 bit) | 227 | * naitlb miss interruption handler (parisc 1.1 - 32 bit) |
228 | * | ||
229 | * Note: naitlb misses will be treated | ||
230 | * as an ordinary itlb miss for now. | ||
231 | * However, note that naitlb misses | ||
232 | * have the faulting address in the | ||
233 | * IOR/ISR. | ||
234 | */ | 228 | */ |
235 | 229 | ||
236 | .macro naitlb_11 code | 230 | .macro naitlb_11 code |
237 | 231 | ||
238 | mfctl %isr,spc | 232 | mfctl %isr,spc |
239 | b itlb_miss_11 | 233 | b naitlb_miss_11 |
240 | mfctl %ior,va | 234 | mfctl %ior,va |
241 | /* FIXME: If user causes a naitlb miss, the priv level may not be in | ||
242 | * lower bits of va, where the itlb miss handler is expecting them | ||
243 | */ | ||
244 | 235 | ||
245 | .align 32 | 236 | .align 32 |
246 | .endm | 237 | .endm |
@@ -248,26 +239,17 @@ | |||
248 | 239 | ||
249 | /* | 240 | /* |
250 | * naitlb miss interruption handler (parisc 2.0) | 241 | * naitlb miss interruption handler (parisc 2.0) |
251 | * | ||
252 | * Note: naitlb misses will be treated | ||
253 | * as an ordinary itlb miss for now. | ||
254 | * However, note that naitlb misses | ||
255 | * have the faulting address in the | ||
256 | * IOR/ISR. | ||
257 | */ | 242 | */ |
258 | 243 | ||
259 | .macro naitlb_20 code | 244 | .macro naitlb_20 code |
260 | 245 | ||
261 | mfctl %isr,spc | 246 | mfctl %isr,spc |
262 | #ifdef CONFIG_64BIT | 247 | #ifdef CONFIG_64BIT |
263 | b itlb_miss_20w | 248 | b naitlb_miss_20w |
264 | #else | 249 | #else |
265 | b itlb_miss_20 | 250 | b naitlb_miss_20 |
266 | #endif | 251 | #endif |
267 | mfctl %ior,va | 252 | mfctl %ior,va |
268 | /* FIXME: If user causes a naitlb miss, the priv level may not be in | ||
269 | * lower bits of va, where the itlb miss handler is expecting them | ||
270 | */ | ||
271 | 253 | ||
272 | .align 32 | 254 | .align 32 |
273 | .endm | 255 | .endm |
@@ -581,7 +563,24 @@ | |||
581 | copy \va,\tmp1 | 563 | copy \va,\tmp1 |
582 | depi 0,31,23,\tmp1 | 564 | depi 0,31,23,\tmp1 |
583 | cmpb,COND(<>),n \tmp,\tmp1,\fault | 565 | cmpb,COND(<>),n \tmp,\tmp1,\fault |
584 | ldi (_PAGE_DIRTY|_PAGE_WRITE|_PAGE_READ),\prot | 566 | mfctl %cr19,\tmp /* iir */ |
567 | /* get the opcode (first six bits) into \tmp */ | ||
568 | extrw,u \tmp,5,6,\tmp | ||
569 | /* | ||
570 | * Only setting the T bit prevents data cache movein | ||
571 | * Setting access rights to zero prevents instruction cache movein | ||
572 | * | ||
573 | * Note subtlety here: _PAGE_GATEWAY, _PAGE_EXEC and _PAGE_WRITE go | ||
574 | * to type field and _PAGE_READ goes to top bit of PL1 | ||
575 | */ | ||
576 | ldi (_PAGE_REFTRAP|_PAGE_READ|_PAGE_WRITE),\prot | ||
577 | /* | ||
578 | * so if the opcode is one (i.e. this is a memory management | ||
579 | * instruction) nullify the next load so \prot is only T. | ||
580 | * Otherwise this is a normal data operation | ||
581 | */ | ||
582 | cmpiclr,= 0x01,\tmp,%r0 | ||
583 | ldi (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot | ||
585 | depd,z \prot,8,7,\prot | 584 | depd,z \prot,8,7,\prot |
586 | /* | 585 | /* |
587 | * OK, it is in the temp alias region, check whether "from" or "to". | 586 | * OK, it is in the temp alias region, check whether "from" or "to". |
@@ -631,11 +630,7 @@ ENTRY(fault_vector_20) | |||
631 | def 13 | 630 | def 13 |
632 | def 14 | 631 | def 14 |
633 | dtlb_20 15 | 632 | dtlb_20 15 |
634 | #if 0 | ||
635 | naitlb_20 16 | 633 | naitlb_20 16 |
636 | #else | ||
637 | def 16 | ||
638 | #endif | ||
639 | nadtlb_20 17 | 634 | nadtlb_20 17 |
640 | def 18 | 635 | def 18 |
641 | def 19 | 636 | def 19 |
@@ -678,11 +673,7 @@ ENTRY(fault_vector_11) | |||
678 | def 13 | 673 | def 13 |
679 | def 14 | 674 | def 14 |
680 | dtlb_11 15 | 675 | dtlb_11 15 |
681 | #if 0 | ||
682 | naitlb_11 16 | 676 | naitlb_11 16 |
683 | #else | ||
684 | def 16 | ||
685 | #endif | ||
686 | nadtlb_11 17 | 677 | nadtlb_11 17 |
687 | def 18 | 678 | def 18 |
688 | def 19 | 679 | def 19 |
@@ -1203,7 +1194,7 @@ nadtlb_miss_20w: | |||
1203 | get_pgd spc,ptp | 1194 | get_pgd spc,ptp |
1204 | space_check spc,t0,nadtlb_fault | 1195 | space_check spc,t0,nadtlb_fault |
1205 | 1196 | ||
1206 | L3_ptep ptp,pte,t0,va,nadtlb_check_flush_20w | 1197 | L3_ptep ptp,pte,t0,va,nadtlb_check_alias_20w |
1207 | 1198 | ||
1208 | update_ptep ptp,pte,t0,t1 | 1199 | update_ptep ptp,pte,t0,t1 |
1209 | 1200 | ||
@@ -1214,16 +1205,8 @@ nadtlb_miss_20w: | |||
1214 | rfir | 1205 | rfir |
1215 | nop | 1206 | nop |
1216 | 1207 | ||
1217 | nadtlb_check_flush_20w: | 1208 | nadtlb_check_alias_20w: |
1218 | bb,>=,n pte,_PAGE_FLUSH_BIT,nadtlb_emulate | 1209 | do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate |
1219 | |||
1220 | /* Insert a "flush only" translation */ | ||
1221 | |||
1222 | depdi,z 7,7,3,prot | ||
1223 | depdi 1,10,1,prot | ||
1224 | |||
1225 | /* Drop prot bits from pte and convert to page addr for idtlbt */ | ||
1226 | convert_for_tlb_insert20 pte | ||
1227 | 1210 | ||
1228 | idtlbt pte,prot | 1211 | idtlbt pte,prot |
1229 | 1212 | ||
@@ -1255,25 +1238,7 @@ dtlb_miss_11: | |||
1255 | nop | 1238 | nop |
1256 | 1239 | ||
1257 | dtlb_check_alias_11: | 1240 | dtlb_check_alias_11: |
1258 | 1241 | do_alias spc,t0,t1,va,pte,prot,dtlb_fault | |
1259 | /* Check to see if fault is in the temporary alias region */ | ||
1260 | |||
1261 | cmpib,<>,n 0,spc,dtlb_fault /* forward */ | ||
1262 | ldil L%(TMPALIAS_MAP_START),t0 | ||
1263 | copy va,t1 | ||
1264 | depwi 0,31,23,t1 | ||
1265 | cmpb,<>,n t0,t1,dtlb_fault /* forward */ | ||
1266 | ldi (_PAGE_DIRTY|_PAGE_WRITE|_PAGE_READ),prot | ||
1267 | depw,z prot,8,7,prot | ||
1268 | |||
1269 | /* | ||
1270 | * OK, it is in the temp alias region, check whether "from" or "to". | ||
1271 | * Check "subtle" note in pacache.S re: r23/r26. | ||
1272 | */ | ||
1273 | |||
1274 | extrw,u,= va,9,1,r0 | ||
1275 | or,tr %r23,%r0,pte /* If "from" use "from" page */ | ||
1276 | or %r26,%r0,pte /* else "to", use "to" page */ | ||
1277 | 1242 | ||
1278 | idtlba pte,(va) | 1243 | idtlba pte,(va) |
1279 | idtlbp prot,(va) | 1244 | idtlbp prot,(va) |
@@ -1286,7 +1251,7 @@ nadtlb_miss_11: | |||
1286 | 1251 | ||
1287 | space_check spc,t0,nadtlb_fault | 1252 | space_check spc,t0,nadtlb_fault |
1288 | 1253 | ||
1289 | L2_ptep ptp,pte,t0,va,nadtlb_check_flush_11 | 1254 | L2_ptep ptp,pte,t0,va,nadtlb_check_alias_11 |
1290 | 1255 | ||
1291 | update_ptep ptp,pte,t0,t1 | 1256 | update_ptep ptp,pte,t0,t1 |
1292 | 1257 | ||
@@ -1304,26 +1269,11 @@ nadtlb_miss_11: | |||
1304 | rfir | 1269 | rfir |
1305 | nop | 1270 | nop |
1306 | 1271 | ||
1307 | nadtlb_check_flush_11: | 1272 | nadtlb_check_alias_11: |
1308 | bb,>=,n pte,_PAGE_FLUSH_BIT,nadtlb_emulate | 1273 | do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate |
1309 | |||
1310 | /* Insert a "flush only" translation */ | ||
1311 | |||
1312 | zdepi 7,7,3,prot | ||
1313 | depi 1,10,1,prot | ||
1314 | 1274 | ||
1315 | /* Get rid of prot bits and convert to page addr for idtlba */ | 1275 | idtlba pte,(va) |
1316 | 1276 | idtlbp prot,(va) | |
1317 | depi 0,31,ASM_PFN_PTE_SHIFT,pte | ||
1318 | SHRREG pte,(ASM_PFN_PTE_SHIFT-(31-26)),pte | ||
1319 | |||
1320 | mfsp %sr1,t0 /* Save sr1 so we can use it in tlb inserts */ | ||
1321 | mtsp spc,%sr1 | ||
1322 | |||
1323 | idtlba pte,(%sr1,va) | ||
1324 | idtlbp prot,(%sr1,va) | ||
1325 | |||
1326 | mtsp t0, %sr1 /* Restore sr1 */ | ||
1327 | 1277 | ||
1328 | rfir | 1278 | rfir |
1329 | nop | 1279 | nop |
@@ -1359,7 +1309,7 @@ nadtlb_miss_20: | |||
1359 | 1309 | ||
1360 | space_check spc,t0,nadtlb_fault | 1310 | space_check spc,t0,nadtlb_fault |
1361 | 1311 | ||
1362 | L2_ptep ptp,pte,t0,va,nadtlb_check_flush_20 | 1312 | L2_ptep ptp,pte,t0,va,nadtlb_check_alias_20 |
1363 | 1313 | ||
1364 | update_ptep ptp,pte,t0,t1 | 1314 | update_ptep ptp,pte,t0,t1 |
1365 | 1315 | ||
@@ -1372,21 +1322,14 @@ nadtlb_miss_20: | |||
1372 | rfir | 1322 | rfir |
1373 | nop | 1323 | nop |
1374 | 1324 | ||
1375 | nadtlb_check_flush_20: | 1325 | nadtlb_check_alias_20: |
1376 | bb,>=,n pte,_PAGE_FLUSH_BIT,nadtlb_emulate | 1326 | do_alias spc,t0,t1,va,pte,prot,nadtlb_emulate |
1377 | |||
1378 | /* Insert a "flush only" translation */ | ||
1379 | |||
1380 | depdi,z 7,7,3,prot | ||
1381 | depdi 1,10,1,prot | ||
1382 | |||
1383 | /* Drop prot bits from pte and convert to page addr for idtlbt */ | ||
1384 | convert_for_tlb_insert20 pte | ||
1385 | 1327 | ||
1386 | idtlbt pte,prot | 1328 | idtlbt pte,prot |
1387 | 1329 | ||
1388 | rfir | 1330 | rfir |
1389 | nop | 1331 | nop |
1332 | |||
1390 | #endif | 1333 | #endif |
1391 | 1334 | ||
1392 | nadtlb_emulate: | 1335 | nadtlb_emulate: |
@@ -1484,6 +1427,36 @@ itlb_miss_20w: | |||
1484 | rfir | 1427 | rfir |
1485 | nop | 1428 | nop |
1486 | 1429 | ||
1430 | naitlb_miss_20w: | ||
1431 | |||
1432 | /* | ||
1433 | * I miss is a little different, since we allow users to fault | ||
1434 | * on the gateway page which is in the kernel address space. | ||
1435 | */ | ||
1436 | |||
1437 | space_adjust spc,va,t0 | ||
1438 | get_pgd spc,ptp | ||
1439 | space_check spc,t0,naitlb_fault | ||
1440 | |||
1441 | L3_ptep ptp,pte,t0,va,naitlb_check_alias_20w | ||
1442 | |||
1443 | update_ptep ptp,pte,t0,t1 | ||
1444 | |||
1445 | make_insert_tlb spc,pte,prot | ||
1446 | |||
1447 | iitlbt pte,prot | ||
1448 | |||
1449 | rfir | ||
1450 | nop | ||
1451 | |||
1452 | naitlb_check_alias_20w: | ||
1453 | do_alias spc,t0,t1,va,pte,prot,naitlb_fault | ||
1454 | |||
1455 | iitlbt pte,prot | ||
1456 | |||
1457 | rfir | ||
1458 | nop | ||
1459 | |||
1487 | #else | 1460 | #else |
1488 | 1461 | ||
1489 | itlb_miss_11: | 1462 | itlb_miss_11: |
@@ -1508,6 +1481,38 @@ itlb_miss_11: | |||
1508 | rfir | 1481 | rfir |
1509 | nop | 1482 | nop |
1510 | 1483 | ||
1484 | naitlb_miss_11: | ||
1485 | get_pgd spc,ptp | ||
1486 | |||
1487 | space_check spc,t0,naitlb_fault | ||
1488 | |||
1489 | L2_ptep ptp,pte,t0,va,naitlb_check_alias_11 | ||
1490 | |||
1491 | update_ptep ptp,pte,t0,t1 | ||
1492 | |||
1493 | make_insert_tlb_11 spc,pte,prot | ||
1494 | |||
1495 | mfsp %sr1,t0 /* Save sr1 so we can use it in tlb inserts */ | ||
1496 | mtsp spc,%sr1 | ||
1497 | |||
1498 | iitlba pte,(%sr1,va) | ||
1499 | iitlbp prot,(%sr1,va) | ||
1500 | |||
1501 | mtsp t0, %sr1 /* Restore sr1 */ | ||
1502 | |||
1503 | rfir | ||
1504 | nop | ||
1505 | |||
1506 | naitlb_check_alias_11: | ||
1507 | do_alias spc,t0,t1,va,pte,prot,itlb_fault | ||
1508 | |||
1509 | iitlba pte,(%sr0, va) | ||
1510 | iitlbp prot,(%sr0, va) | ||
1511 | |||
1512 | rfir | ||
1513 | nop | ||
1514 | |||
1515 | |||
1511 | itlb_miss_20: | 1516 | itlb_miss_20: |
1512 | get_pgd spc,ptp | 1517 | get_pgd spc,ptp |
1513 | 1518 | ||
@@ -1526,6 +1531,32 @@ itlb_miss_20: | |||
1526 | rfir | 1531 | rfir |
1527 | nop | 1532 | nop |
1528 | 1533 | ||
1534 | naitlb_miss_20: | ||
1535 | get_pgd spc,ptp | ||
1536 | |||
1537 | space_check spc,t0,naitlb_fault | ||
1538 | |||
1539 | L2_ptep ptp,pte,t0,va,naitlb_check_alias_20 | ||
1540 | |||
1541 | update_ptep ptp,pte,t0,t1 | ||
1542 | |||
1543 | make_insert_tlb spc,pte,prot | ||
1544 | |||
1545 | f_extend pte,t0 | ||
1546 | |||
1547 | iitlbt pte,prot | ||
1548 | |||
1549 | rfir | ||
1550 | nop | ||
1551 | |||
1552 | naitlb_check_alias_20: | ||
1553 | do_alias spc,t0,t1,va,pte,prot,naitlb_fault | ||
1554 | |||
1555 | iitlbt pte,prot | ||
1556 | |||
1557 | rfir | ||
1558 | nop | ||
1559 | |||
1529 | #endif | 1560 | #endif |
1530 | 1561 | ||
1531 | #ifdef CONFIG_64BIT | 1562 | #ifdef CONFIG_64BIT |
@@ -1662,6 +1693,10 @@ nadtlb_fault: | |||
1662 | b intr_save | 1693 | b intr_save |
1663 | ldi 17,%r8 | 1694 | ldi 17,%r8 |
1664 | 1695 | ||
1696 | naitlb_fault: | ||
1697 | b intr_save | ||
1698 | ldi 16,%r8 | ||
1699 | |||
1665 | dtlb_fault: | 1700 | dtlb_fault: |
1666 | b intr_save | 1701 | b intr_save |
1667 | ldi 15,%r8 | 1702 | ldi 15,%r8 |
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index d7d94b845dc2..cb450e1e79b3 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c | |||
@@ -52,9 +52,9 @@ static volatile unsigned long cpu_eiem = 0; | |||
52 | */ | 52 | */ |
53 | static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; | 53 | static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; |
54 | 54 | ||
55 | static void cpu_mask_irq(unsigned int irq) | 55 | static void cpu_mask_irq(struct irq_data *d) |
56 | { | 56 | { |
57 | unsigned long eirr_bit = EIEM_MASK(irq); | 57 | unsigned long eirr_bit = EIEM_MASK(d->irq); |
58 | 58 | ||
59 | cpu_eiem &= ~eirr_bit; | 59 | cpu_eiem &= ~eirr_bit; |
60 | /* Do nothing on the other CPUs. If they get this interrupt, | 60 | /* Do nothing on the other CPUs. If they get this interrupt, |
@@ -63,7 +63,7 @@ static void cpu_mask_irq(unsigned int irq) | |||
63 | * then gets disabled */ | 63 | * then gets disabled */ |
64 | } | 64 | } |
65 | 65 | ||
66 | static void cpu_unmask_irq(unsigned int irq) | 66 | static void __cpu_unmask_irq(unsigned int irq) |
67 | { | 67 | { |
68 | unsigned long eirr_bit = EIEM_MASK(irq); | 68 | unsigned long eirr_bit = EIEM_MASK(irq); |
69 | 69 | ||
@@ -75,9 +75,14 @@ static void cpu_unmask_irq(unsigned int irq) | |||
75 | smp_send_all_nop(); | 75 | smp_send_all_nop(); |
76 | } | 76 | } |
77 | 77 | ||
78 | void cpu_ack_irq(unsigned int irq) | 78 | static void cpu_unmask_irq(struct irq_data *d) |
79 | { | ||
80 | __cpu_unmask_irq(d->irq); | ||
81 | } | ||
82 | |||
83 | void cpu_ack_irq(struct irq_data *d) | ||
79 | { | 84 | { |
80 | unsigned long mask = EIEM_MASK(irq); | 85 | unsigned long mask = EIEM_MASK(d->irq); |
81 | int cpu = smp_processor_id(); | 86 | int cpu = smp_processor_id(); |
82 | 87 | ||
83 | /* Clear in EIEM so we can no longer process */ | 88 | /* Clear in EIEM so we can no longer process */ |
@@ -90,9 +95,9 @@ void cpu_ack_irq(unsigned int irq) | |||
90 | mtctl(mask, 23); | 95 | mtctl(mask, 23); |
91 | } | 96 | } |
92 | 97 | ||
93 | void cpu_eoi_irq(unsigned int irq) | 98 | void cpu_eoi_irq(struct irq_data *d) |
94 | { | 99 | { |
95 | unsigned long mask = EIEM_MASK(irq); | 100 | unsigned long mask = EIEM_MASK(d->irq); |
96 | int cpu = smp_processor_id(); | 101 | int cpu = smp_processor_id(); |
97 | 102 | ||
98 | /* set it in the eiems---it's no longer in process */ | 103 | /* set it in the eiems---it's no longer in process */ |
@@ -103,15 +108,16 @@ void cpu_eoi_irq(unsigned int irq) | |||
103 | } | 108 | } |
104 | 109 | ||
105 | #ifdef CONFIG_SMP | 110 | #ifdef CONFIG_SMP |
106 | int cpu_check_affinity(unsigned int irq, const struct cpumask *dest) | 111 | int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest) |
107 | { | 112 | { |
108 | int cpu_dest; | 113 | int cpu_dest; |
109 | 114 | ||
110 | /* timer and ipi have to always be received on all CPUs */ | 115 | /* timer and ipi have to always be received on all CPUs */ |
111 | if (CHECK_IRQ_PER_CPU(irq)) { | 116 | if (CHECK_IRQ_PER_CPU(irq_to_desc(d->irq)->status)) { |
112 | /* Bad linux design decision. The mask has already | 117 | /* Bad linux design decision. The mask has already |
113 | * been set; we must reset it */ | 118 | * been set; we must reset it. Will fix - tglx |
114 | cpumask_setall(irq_desc[irq].affinity); | 119 | */ |
120 | cpumask_setall(d->affinity); | ||
115 | return -EINVAL; | 121 | return -EINVAL; |
116 | } | 122 | } |
117 | 123 | ||
@@ -121,33 +127,34 @@ int cpu_check_affinity(unsigned int irq, const struct cpumask *dest) | |||
121 | return cpu_dest; | 127 | return cpu_dest; |
122 | } | 128 | } |
123 | 129 | ||
124 | static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest) | 130 | static int cpu_set_affinity_irq(struct irq_data *d, const struct cpumask *dest, |
131 | bool force) | ||
125 | { | 132 | { |
126 | int cpu_dest; | 133 | int cpu_dest; |
127 | 134 | ||
128 | cpu_dest = cpu_check_affinity(irq, dest); | 135 | cpu_dest = cpu_check_affinity(d, dest); |
129 | if (cpu_dest < 0) | 136 | if (cpu_dest < 0) |
130 | return -1; | 137 | return -1; |
131 | 138 | ||
132 | cpumask_copy(irq_desc[irq].affinity, dest); | 139 | cpumask_copy(d->affinity, dest); |
133 | 140 | ||
134 | return 0; | 141 | return 0; |
135 | } | 142 | } |
136 | #endif | 143 | #endif |
137 | 144 | ||
138 | static struct irq_chip cpu_interrupt_type = { | 145 | static struct irq_chip cpu_interrupt_type = { |
139 | .name = "CPU", | 146 | .name = "CPU", |
140 | .mask = cpu_mask_irq, | 147 | .irq_mask = cpu_mask_irq, |
141 | .unmask = cpu_unmask_irq, | 148 | .irq_unmask = cpu_unmask_irq, |
142 | .ack = cpu_ack_irq, | 149 | .irq_ack = cpu_ack_irq, |
143 | .eoi = cpu_eoi_irq, | 150 | .irq_eoi = cpu_eoi_irq, |
144 | #ifdef CONFIG_SMP | 151 | #ifdef CONFIG_SMP |
145 | .set_affinity = cpu_set_affinity_irq, | 152 | .irq_set_affinity = cpu_set_affinity_irq, |
146 | #endif | 153 | #endif |
147 | /* XXX: Needs to be written. We managed without it so far, but | 154 | /* XXX: Needs to be written. We managed without it so far, but |
148 | * we really ought to write it. | 155 | * we really ought to write it. |
149 | */ | 156 | */ |
150 | .retrigger = NULL, | 157 | .irq_retrigger = NULL, |
151 | }; | 158 | }; |
152 | 159 | ||
153 | int show_interrupts(struct seq_file *p, void *v) | 160 | int show_interrupts(struct seq_file *p, void *v) |
@@ -181,7 +188,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
181 | seq_printf(p, "%10u ", kstat_irqs(i)); | 188 | seq_printf(p, "%10u ", kstat_irqs(i)); |
182 | #endif | 189 | #endif |
183 | 190 | ||
184 | seq_printf(p, " %14s", irq_desc[i].chip->name); | 191 | seq_printf(p, " %14s", irq_desc[i].irq_data.chip->name); |
185 | #ifndef PARISC_IRQ_CR16_COUNTS | 192 | #ifndef PARISC_IRQ_CR16_COUNTS |
186 | seq_printf(p, " %s", action->name); | 193 | seq_printf(p, " %s", action->name); |
187 | 194 | ||
@@ -233,14 +240,14 @@ int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data) | |||
233 | { | 240 | { |
234 | if (irq_desc[irq].action) | 241 | if (irq_desc[irq].action) |
235 | return -EBUSY; | 242 | return -EBUSY; |
236 | if (irq_desc[irq].chip != &cpu_interrupt_type) | 243 | if (get_irq_chip(irq) != &cpu_interrupt_type) |
237 | return -EBUSY; | 244 | return -EBUSY; |
238 | 245 | ||
239 | /* for iosapic interrupts */ | 246 | /* for iosapic interrupts */ |
240 | if (type) { | 247 | if (type) { |
241 | set_irq_chip_and_handler(irq, type, handle_percpu_irq); | 248 | set_irq_chip_and_handler(irq, type, handle_percpu_irq); |
242 | set_irq_chip_data(irq, data); | 249 | set_irq_chip_data(irq, data); |
243 | cpu_unmask_irq(irq); | 250 | __cpu_unmask_irq(irq); |
244 | } | 251 | } |
245 | return 0; | 252 | return 0; |
246 | } | 253 | } |
@@ -289,7 +296,8 @@ int txn_alloc_irq(unsigned int bits_wide) | |||
289 | unsigned long txn_affinity_addr(unsigned int irq, int cpu) | 296 | unsigned long txn_affinity_addr(unsigned int irq, int cpu) |
290 | { | 297 | { |
291 | #ifdef CONFIG_SMP | 298 | #ifdef CONFIG_SMP |
292 | cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu)); | 299 | struct irq_data *d = irq_get_irq_data(irq); |
300 | cpumask_copy(d->affinity, cpumask_of(cpu)); | ||
293 | #endif | 301 | #endif |
294 | 302 | ||
295 | return per_cpu(cpu_data, cpu).txn_addr; | 303 | return per_cpu(cpu_data, cpu).txn_addr; |
@@ -333,6 +341,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) | |||
333 | unsigned long eirr_val; | 341 | unsigned long eirr_val; |
334 | int irq, cpu = smp_processor_id(); | 342 | int irq, cpu = smp_processor_id(); |
335 | #ifdef CONFIG_SMP | 343 | #ifdef CONFIG_SMP |
344 | struct irq_desc *desc; | ||
336 | cpumask_t dest; | 345 | cpumask_t dest; |
337 | #endif | 346 | #endif |
338 | 347 | ||
@@ -346,8 +355,9 @@ void do_cpu_irq_mask(struct pt_regs *regs) | |||
346 | irq = eirr_to_irq(eirr_val); | 355 | irq = eirr_to_irq(eirr_val); |
347 | 356 | ||
348 | #ifdef CONFIG_SMP | 357 | #ifdef CONFIG_SMP |
349 | cpumask_copy(&dest, irq_desc[irq].affinity); | 358 | desc = irq_to_desc(irq); |
350 | if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) && | 359 | cpumask_copy(&dest, desc->irq_data.affinity); |
360 | if (CHECK_IRQ_PER_CPU(desc->status) && | ||
351 | !cpu_isset(smp_processor_id(), dest)) { | 361 | !cpu_isset(smp_processor_id(), dest)) { |
352 | int cpu = first_cpu(dest); | 362 | int cpu = first_cpu(dest); |
353 | 363 | ||
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S index 09b77b2553c6..a85823668cba 100644 --- a/arch/parisc/kernel/pacache.S +++ b/arch/parisc/kernel/pacache.S | |||
@@ -608,93 +608,131 @@ ENTRY(__clear_user_page_asm) | |||
608 | .procend | 608 | .procend |
609 | ENDPROC(__clear_user_page_asm) | 609 | ENDPROC(__clear_user_page_asm) |
610 | 610 | ||
611 | ENTRY(flush_kernel_dcache_page_asm) | 611 | ENTRY(flush_dcache_page_asm) |
612 | .proc | 612 | .proc |
613 | .callinfo NO_CALLS | 613 | .callinfo NO_CALLS |
614 | .entry | 614 | .entry |
615 | 615 | ||
616 | ldil L%(TMPALIAS_MAP_START), %r28 | ||
617 | #ifdef CONFIG_64BIT | ||
618 | #if (TMPALIAS_MAP_START >= 0x80000000) | ||
619 | depdi 0, 31,32, %r28 /* clear any sign extension */ | ||
620 | /* FIXME: page size dependend */ | ||
621 | #endif | ||
622 | extrd,u %r26, 56,32, %r26 /* convert phys addr to tlb insert format */ | ||
623 | depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ | ||
624 | depdi 0, 63,12, %r28 /* Clear any offset bits */ | ||
625 | #else | ||
626 | extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ | ||
627 | depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ | ||
628 | depwi 0, 31,12, %r28 /* Clear any offset bits */ | ||
629 | #endif | ||
630 | |||
631 | /* Purge any old translation */ | ||
632 | |||
633 | pdtlb 0(%r28) | ||
634 | |||
616 | ldil L%dcache_stride, %r1 | 635 | ldil L%dcache_stride, %r1 |
617 | ldw R%dcache_stride(%r1), %r23 | 636 | ldw R%dcache_stride(%r1), %r1 |
618 | 637 | ||
619 | #ifdef CONFIG_64BIT | 638 | #ifdef CONFIG_64BIT |
620 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 | 639 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 |
621 | #else | 640 | #else |
622 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 | 641 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 |
623 | #endif | 642 | #endif |
624 | add %r26, %r25, %r25 | 643 | add %r28, %r25, %r25 |
625 | sub %r25, %r23, %r25 | 644 | sub %r25, %r1, %r25 |
626 | 645 | ||
627 | 646 | ||
628 | 1: fdc,m %r23(%r26) | 647 | 1: fdc,m %r1(%r28) |
629 | fdc,m %r23(%r26) | 648 | fdc,m %r1(%r28) |
630 | fdc,m %r23(%r26) | 649 | fdc,m %r1(%r28) |
631 | fdc,m %r23(%r26) | 650 | fdc,m %r1(%r28) |
632 | fdc,m %r23(%r26) | 651 | fdc,m %r1(%r28) |
633 | fdc,m %r23(%r26) | 652 | fdc,m %r1(%r28) |
634 | fdc,m %r23(%r26) | 653 | fdc,m %r1(%r28) |
635 | fdc,m %r23(%r26) | 654 | fdc,m %r1(%r28) |
636 | fdc,m %r23(%r26) | 655 | fdc,m %r1(%r28) |
637 | fdc,m %r23(%r26) | 656 | fdc,m %r1(%r28) |
638 | fdc,m %r23(%r26) | 657 | fdc,m %r1(%r28) |
639 | fdc,m %r23(%r26) | 658 | fdc,m %r1(%r28) |
640 | fdc,m %r23(%r26) | 659 | fdc,m %r1(%r28) |
641 | fdc,m %r23(%r26) | 660 | fdc,m %r1(%r28) |
642 | fdc,m %r23(%r26) | 661 | fdc,m %r1(%r28) |
643 | cmpb,COND(<<) %r26, %r25,1b | 662 | cmpb,COND(<<) %r28, %r25,1b |
644 | fdc,m %r23(%r26) | 663 | fdc,m %r1(%r28) |
645 | 664 | ||
646 | sync | 665 | sync |
647 | bv %r0(%r2) | 666 | bv %r0(%r2) |
648 | nop | 667 | pdtlb (%r25) |
649 | .exit | 668 | .exit |
650 | 669 | ||
651 | .procend | 670 | .procend |
652 | ENDPROC(flush_kernel_dcache_page_asm) | 671 | ENDPROC(flush_dcache_page_asm) |
653 | 672 | ||
654 | ENTRY(flush_user_dcache_page) | 673 | ENTRY(flush_icache_page_asm) |
655 | .proc | 674 | .proc |
656 | .callinfo NO_CALLS | 675 | .callinfo NO_CALLS |
657 | .entry | 676 | .entry |
658 | 677 | ||
659 | ldil L%dcache_stride, %r1 | 678 | ldil L%(TMPALIAS_MAP_START), %r28 |
660 | ldw R%dcache_stride(%r1), %r23 | ||
661 | |||
662 | #ifdef CONFIG_64BIT | 679 | #ifdef CONFIG_64BIT |
663 | depdi,z 1,63-PAGE_SHIFT,1, %r25 | 680 | #if (TMPALIAS_MAP_START >= 0x80000000) |
681 | depdi 0, 31,32, %r28 /* clear any sign extension */ | ||
682 | /* FIXME: page size dependend */ | ||
683 | #endif | ||
684 | extrd,u %r26, 56,32, %r26 /* convert phys addr to tlb insert format */ | ||
685 | depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ | ||
686 | depdi 0, 63,12, %r28 /* Clear any offset bits */ | ||
664 | #else | 687 | #else |
665 | depwi,z 1,31-PAGE_SHIFT,1, %r25 | 688 | extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ |
689 | depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ | ||
690 | depwi 0, 31,12, %r28 /* Clear any offset bits */ | ||
666 | #endif | 691 | #endif |
667 | add %r26, %r25, %r25 | ||
668 | sub %r25, %r23, %r25 | ||
669 | 692 | ||
693 | /* Purge any old translation */ | ||
670 | 694 | ||
671 | 1: fdc,m %r23(%sr3, %r26) | 695 | pitlb (%sr0,%r28) |
672 | fdc,m %r23(%sr3, %r26) | 696 | |
673 | fdc,m %r23(%sr3, %r26) | 697 | ldil L%icache_stride, %r1 |
674 | fdc,m %r23(%sr3, %r26) | 698 | ldw R%icache_stride(%r1), %r1 |
675 | fdc,m %r23(%sr3, %r26) | 699 | |
676 | fdc,m %r23(%sr3, %r26) | 700 | #ifdef CONFIG_64BIT |
677 | fdc,m %r23(%sr3, %r26) | 701 | depdi,z 1, 63-PAGE_SHIFT,1, %r25 |
678 | fdc,m %r23(%sr3, %r26) | 702 | #else |
679 | fdc,m %r23(%sr3, %r26) | 703 | depwi,z 1, 31-PAGE_SHIFT,1, %r25 |
680 | fdc,m %r23(%sr3, %r26) | 704 | #endif |
681 | fdc,m %r23(%sr3, %r26) | 705 | add %r28, %r25, %r25 |
682 | fdc,m %r23(%sr3, %r26) | 706 | sub %r25, %r1, %r25 |
683 | fdc,m %r23(%sr3, %r26) | 707 | |
684 | fdc,m %r23(%sr3, %r26) | 708 | |
685 | fdc,m %r23(%sr3, %r26) | 709 | 1: fic,m %r1(%r28) |
686 | cmpb,COND(<<) %r26, %r25,1b | 710 | fic,m %r1(%r28) |
687 | fdc,m %r23(%sr3, %r26) | 711 | fic,m %r1(%r28) |
712 | fic,m %r1(%r28) | ||
713 | fic,m %r1(%r28) | ||
714 | fic,m %r1(%r28) | ||
715 | fic,m %r1(%r28) | ||
716 | fic,m %r1(%r28) | ||
717 | fic,m %r1(%r28) | ||
718 | fic,m %r1(%r28) | ||
719 | fic,m %r1(%r28) | ||
720 | fic,m %r1(%r28) | ||
721 | fic,m %r1(%r28) | ||
722 | fic,m %r1(%r28) | ||
723 | fic,m %r1(%r28) | ||
724 | cmpb,COND(<<) %r28, %r25,1b | ||
725 | fic,m %r1(%r28) | ||
688 | 726 | ||
689 | sync | 727 | sync |
690 | bv %r0(%r2) | 728 | bv %r0(%r2) |
691 | nop | 729 | pitlb (%sr0,%r25) |
692 | .exit | 730 | .exit |
693 | 731 | ||
694 | .procend | 732 | .procend |
695 | ENDPROC(flush_user_dcache_page) | 733 | ENDPROC(flush_icache_page_asm) |
696 | 734 | ||
697 | ENTRY(flush_user_icache_page) | 735 | ENTRY(flush_kernel_dcache_page_asm) |
698 | .proc | 736 | .proc |
699 | .callinfo NO_CALLS | 737 | .callinfo NO_CALLS |
700 | .entry | 738 | .entry |
@@ -711,23 +749,23 @@ ENTRY(flush_user_icache_page) | |||
711 | sub %r25, %r23, %r25 | 749 | sub %r25, %r23, %r25 |
712 | 750 | ||
713 | 751 | ||
714 | 1: fic,m %r23(%sr3, %r26) | 752 | 1: fdc,m %r23(%r26) |
715 | fic,m %r23(%sr3, %r26) | 753 | fdc,m %r23(%r26) |
716 | fic,m %r23(%sr3, %r26) | 754 | fdc,m %r23(%r26) |
717 | fic,m %r23(%sr3, %r26) | 755 | fdc,m %r23(%r26) |
718 | fic,m %r23(%sr3, %r26) | 756 | fdc,m %r23(%r26) |
719 | fic,m %r23(%sr3, %r26) | 757 | fdc,m %r23(%r26) |
720 | fic,m %r23(%sr3, %r26) | 758 | fdc,m %r23(%r26) |
721 | fic,m %r23(%sr3, %r26) | 759 | fdc,m %r23(%r26) |
722 | fic,m %r23(%sr3, %r26) | 760 | fdc,m %r23(%r26) |
723 | fic,m %r23(%sr3, %r26) | 761 | fdc,m %r23(%r26) |
724 | fic,m %r23(%sr3, %r26) | 762 | fdc,m %r23(%r26) |
725 | fic,m %r23(%sr3, %r26) | 763 | fdc,m %r23(%r26) |
726 | fic,m %r23(%sr3, %r26) | 764 | fdc,m %r23(%r26) |
727 | fic,m %r23(%sr3, %r26) | 765 | fdc,m %r23(%r26) |
728 | fic,m %r23(%sr3, %r26) | 766 | fdc,m %r23(%r26) |
729 | cmpb,COND(<<) %r26, %r25,1b | 767 | cmpb,COND(<<) %r26, %r25,1b |
730 | fic,m %r23(%sr3, %r26) | 768 | fdc,m %r23(%r26) |
731 | 769 | ||
732 | sync | 770 | sync |
733 | bv %r0(%r2) | 771 | bv %r0(%r2) |
@@ -735,8 +773,7 @@ ENTRY(flush_user_icache_page) | |||
735 | .exit | 773 | .exit |
736 | 774 | ||
737 | .procend | 775 | .procend |
738 | ENDPROC(flush_user_icache_page) | 776 | ENDPROC(flush_kernel_dcache_page_asm) |
739 | |||
740 | 777 | ||
741 | ENTRY(purge_kernel_dcache_page) | 778 | ENTRY(purge_kernel_dcache_page) |
742 | .proc | 779 | .proc |
@@ -780,69 +817,6 @@ ENTRY(purge_kernel_dcache_page) | |||
780 | .procend | 817 | .procend |
781 | ENDPROC(purge_kernel_dcache_page) | 818 | ENDPROC(purge_kernel_dcache_page) |
782 | 819 | ||
783 | #if 0 | ||
784 | /* Currently not used, but it still is a possible alternate | ||
785 | * solution. | ||
786 | */ | ||
787 | |||
788 | ENTRY(flush_alias_page) | ||
789 | .proc | ||
790 | .callinfo NO_CALLS | ||
791 | .entry | ||
792 | |||
793 | tophys_r1 %r26 | ||
794 | |||
795 | ldil L%(TMPALIAS_MAP_START), %r28 | ||
796 | #ifdef CONFIG_64BIT | ||
797 | extrd,u %r26, 56,32, %r26 /* convert phys addr to tlb insert format */ | ||
798 | depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ | ||
799 | depdi 0, 63,12, %r28 /* Clear any offset bits */ | ||
800 | #else | ||
801 | extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ | ||
802 | depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ | ||
803 | depwi 0, 31,12, %r28 /* Clear any offset bits */ | ||
804 | #endif | ||
805 | |||
806 | /* Purge any old translation */ | ||
807 | |||
808 | pdtlb 0(%r28) | ||
809 | |||
810 | ldil L%dcache_stride, %r1 | ||
811 | ldw R%dcache_stride(%r1), %r23 | ||
812 | |||
813 | #ifdef CONFIG_64BIT | ||
814 | depdi,z 1, 63-PAGE_SHIFT,1, %r29 | ||
815 | #else | ||
816 | depwi,z 1, 31-PAGE_SHIFT,1, %r29 | ||
817 | #endif | ||
818 | add %r28, %r29, %r29 | ||
819 | sub %r29, %r23, %r29 | ||
820 | |||
821 | 1: fdc,m %r23(%r28) | ||
822 | fdc,m %r23(%r28) | ||
823 | fdc,m %r23(%r28) | ||
824 | fdc,m %r23(%r28) | ||
825 | fdc,m %r23(%r28) | ||
826 | fdc,m %r23(%r28) | ||
827 | fdc,m %r23(%r28) | ||
828 | fdc,m %r23(%r28) | ||
829 | fdc,m %r23(%r28) | ||
830 | fdc,m %r23(%r28) | ||
831 | fdc,m %r23(%r28) | ||
832 | fdc,m %r23(%r28) | ||
833 | fdc,m %r23(%r28) | ||
834 | fdc,m %r23(%r28) | ||
835 | fdc,m %r23(%r28) | ||
836 | cmpb,COND(<<) %r28, %r29, 1b | ||
837 | fdc,m %r23(%r28) | ||
838 | |||
839 | sync | ||
840 | bv %r0(%r2) | ||
841 | nop | ||
842 | .exit | ||
843 | |||
844 | .procend | ||
845 | #endif | ||
846 | 820 | ||
847 | .export flush_user_dcache_range_asm | 821 | .export flush_user_dcache_range_asm |
848 | 822 | ||
@@ -865,7 +839,6 @@ flush_user_dcache_range_asm: | |||
865 | .exit | 839 | .exit |
866 | 840 | ||
867 | .procend | 841 | .procend |
868 | ENDPROC(flush_alias_page) | ||
869 | 842 | ||
870 | ENTRY(flush_kernel_dcache_range_asm) | 843 | ENTRY(flush_kernel_dcache_range_asm) |
871 | .proc | 844 | .proc |
diff --git a/arch/powerpc/include/asm/mpic.h b/arch/powerpc/include/asm/mpic.h index 946ec4947da2..7005ee0b074d 100644 --- a/arch/powerpc/include/asm/mpic.h +++ b/arch/powerpc/include/asm/mpic.h | |||
@@ -367,6 +367,10 @@ struct mpic | |||
367 | #define MPIC_SINGLE_DEST_CPU 0x00001000 | 367 | #define MPIC_SINGLE_DEST_CPU 0x00001000 |
368 | /* Enable CoreInt delivery of interrupts */ | 368 | /* Enable CoreInt delivery of interrupts */ |
369 | #define MPIC_ENABLE_COREINT 0x00002000 | 369 | #define MPIC_ENABLE_COREINT 0x00002000 |
370 | /* Disable resetting of the MPIC. | ||
371 | * NOTE: This flag trumps MPIC_WANTS_RESET. | ||
372 | */ | ||
373 | #define MPIC_NO_RESET 0x00004000 | ||
370 | 374 | ||
371 | /* MPIC HW modification ID */ | 375 | /* MPIC HW modification ID */ |
372 | #define MPIC_REGSET_MASK 0xf0000000 | 376 | #define MPIC_REGSET_MASK 0xf0000000 |
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index 0175a676b34b..48223f9b8728 100644 --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h | |||
@@ -125,8 +125,10 @@ extern int ptrace_put_reg(struct task_struct *task, int regno, | |||
125 | #endif /* ! __powerpc64__ */ | 125 | #endif /* ! __powerpc64__ */ |
126 | #define TRAP(regs) ((regs)->trap & ~0xF) | 126 | #define TRAP(regs) ((regs)->trap & ~0xF) |
127 | #ifdef __powerpc64__ | 127 | #ifdef __powerpc64__ |
128 | #define NV_REG_POISON 0xdeadbeefdeadbeefUL | ||
128 | #define CHECK_FULL_REGS(regs) BUG_ON(regs->trap & 1) | 129 | #define CHECK_FULL_REGS(regs) BUG_ON(regs->trap & 1) |
129 | #else | 130 | #else |
131 | #define NV_REG_POISON 0xdeadbeef | ||
130 | #define CHECK_FULL_REGS(regs) \ | 132 | #define CHECK_FULL_REGS(regs) \ |
131 | do { \ | 133 | do { \ |
132 | if ((regs)->trap & 1) \ | 134 | if ((regs)->trap & 1) \ |
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c index 29852688ceaa..d225d99fe39d 100644 --- a/arch/powerpc/kernel/pci_dn.c +++ b/arch/powerpc/kernel/pci_dn.c | |||
@@ -176,11 +176,14 @@ static void *is_devfn_node(struct device_node *dn, void *data) | |||
176 | */ | 176 | */ |
177 | struct device_node *fetch_dev_dn(struct pci_dev *dev) | 177 | struct device_node *fetch_dev_dn(struct pci_dev *dev) |
178 | { | 178 | { |
179 | struct device_node *orig_dn = dev->dev.of_node; | 179 | struct pci_controller *phb = dev->sysdata; |
180 | struct device_node *dn; | 180 | struct device_node *dn; |
181 | unsigned long searchval = (dev->bus->number << 8) | dev->devfn; | 181 | unsigned long searchval = (dev->bus->number << 8) | dev->devfn; |
182 | 182 | ||
183 | dn = traverse_pci_devices(orig_dn, is_devfn_node, (void *)searchval); | 183 | if (WARN_ON(!phb)) |
184 | return NULL; | ||
185 | |||
186 | dn = traverse_pci_devices(phb->dn, is_devfn_node, (void *)searchval); | ||
184 | if (dn) | 187 | if (dn) |
185 | dev->dev.of_node = dn; | 188 | dev->dev.of_node = dn; |
186 | return dn; | 189 | return dn; |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 906536998291..895b082f1e48 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -229,12 +229,16 @@ static int gpr_get(struct task_struct *target, const struct user_regset *regset, | |||
229 | unsigned int pos, unsigned int count, | 229 | unsigned int pos, unsigned int count, |
230 | void *kbuf, void __user *ubuf) | 230 | void *kbuf, void __user *ubuf) |
231 | { | 231 | { |
232 | int ret; | 232 | int i, ret; |
233 | 233 | ||
234 | if (target->thread.regs == NULL) | 234 | if (target->thread.regs == NULL) |
235 | return -EIO; | 235 | return -EIO; |
236 | 236 | ||
237 | CHECK_FULL_REGS(target->thread.regs); | 237 | if (!FULL_REGS(target->thread.regs)) { |
238 | /* We have a partial register set. Fill 14-31 with bogus values */ | ||
239 | for (i = 14; i < 32; i++) | ||
240 | target->thread.regs->gpr[i] = NV_REG_POISON; | ||
241 | } | ||
238 | 242 | ||
239 | ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, | 243 | ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, |
240 | target->thread.regs, | 244 | target->thread.regs, |
@@ -641,11 +645,16 @@ static int gpr32_get(struct task_struct *target, | |||
641 | compat_ulong_t *k = kbuf; | 645 | compat_ulong_t *k = kbuf; |
642 | compat_ulong_t __user *u = ubuf; | 646 | compat_ulong_t __user *u = ubuf; |
643 | compat_ulong_t reg; | 647 | compat_ulong_t reg; |
648 | int i; | ||
644 | 649 | ||
645 | if (target->thread.regs == NULL) | 650 | if (target->thread.regs == NULL) |
646 | return -EIO; | 651 | return -EIO; |
647 | 652 | ||
648 | CHECK_FULL_REGS(target->thread.regs); | 653 | if (!FULL_REGS(target->thread.regs)) { |
654 | /* We have a partial register set. Fill 14-31 with bogus values */ | ||
655 | for (i = 14; i < 32; i++) | ||
656 | target->thread.regs->gpr[i] = NV_REG_POISON; | ||
657 | } | ||
649 | 658 | ||
650 | pos /= sizeof(reg); | 659 | pos /= sizeof(reg); |
651 | count /= sizeof(reg); | 660 | count /= sizeof(reg); |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index eb7021815e2d..0f7c6718d261 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -147,6 +147,16 @@ static u32 mpic_infos[][MPIC_IDX_END] = { | |||
147 | 147 | ||
148 | #endif /* CONFIG_MPIC_WEIRD */ | 148 | #endif /* CONFIG_MPIC_WEIRD */ |
149 | 149 | ||
150 | static inline unsigned int mpic_processor_id(struct mpic *mpic) | ||
151 | { | ||
152 | unsigned int cpu = 0; | ||
153 | |||
154 | if (mpic->flags & MPIC_PRIMARY) | ||
155 | cpu = hard_smp_processor_id(); | ||
156 | |||
157 | return cpu; | ||
158 | } | ||
159 | |||
150 | /* | 160 | /* |
151 | * Register accessor functions | 161 | * Register accessor functions |
152 | */ | 162 | */ |
@@ -210,19 +220,14 @@ static inline void _mpic_ipi_write(struct mpic *mpic, unsigned int ipi, u32 valu | |||
210 | 220 | ||
211 | static inline u32 _mpic_cpu_read(struct mpic *mpic, unsigned int reg) | 221 | static inline u32 _mpic_cpu_read(struct mpic *mpic, unsigned int reg) |
212 | { | 222 | { |
213 | unsigned int cpu = 0; | 223 | unsigned int cpu = mpic_processor_id(mpic); |
214 | 224 | ||
215 | if (mpic->flags & MPIC_PRIMARY) | ||
216 | cpu = hard_smp_processor_id(); | ||
217 | return _mpic_read(mpic->reg_type, &mpic->cpuregs[cpu], reg); | 225 | return _mpic_read(mpic->reg_type, &mpic->cpuregs[cpu], reg); |
218 | } | 226 | } |
219 | 227 | ||
220 | static inline void _mpic_cpu_write(struct mpic *mpic, unsigned int reg, u32 value) | 228 | static inline void _mpic_cpu_write(struct mpic *mpic, unsigned int reg, u32 value) |
221 | { | 229 | { |
222 | unsigned int cpu = 0; | 230 | unsigned int cpu = mpic_processor_id(mpic); |
223 | |||
224 | if (mpic->flags & MPIC_PRIMARY) | ||
225 | cpu = hard_smp_processor_id(); | ||
226 | 231 | ||
227 | _mpic_write(mpic->reg_type, &mpic->cpuregs[cpu], reg, value); | 232 | _mpic_write(mpic->reg_type, &mpic->cpuregs[cpu], reg, value); |
228 | } | 233 | } |
@@ -913,6 +918,20 @@ void mpic_set_vector(unsigned int virq, unsigned int vector) | |||
913 | mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vecpri); | 918 | mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vecpri); |
914 | } | 919 | } |
915 | 920 | ||
921 | void mpic_set_destination(unsigned int virq, unsigned int cpuid) | ||
922 | { | ||
923 | struct mpic *mpic = mpic_from_irq(virq); | ||
924 | unsigned int src = mpic_irq_to_hw(virq); | ||
925 | |||
926 | DBG("mpic: set_destination(mpic:@%p,virq:%d,src:%d,cpuid:0x%x)\n", | ||
927 | mpic, virq, src, cpuid); | ||
928 | |||
929 | if (src >= mpic->irq_count) | ||
930 | return; | ||
931 | |||
932 | mpic_irq_write(src, MPIC_INFO(IRQ_DESTINATION), 1 << cpuid); | ||
933 | } | ||
934 | |||
916 | static struct irq_chip mpic_irq_chip = { | 935 | static struct irq_chip mpic_irq_chip = { |
917 | .irq_mask = mpic_mask_irq, | 936 | .irq_mask = mpic_mask_irq, |
918 | .irq_unmask = mpic_unmask_irq, | 937 | .irq_unmask = mpic_unmask_irq, |
@@ -993,6 +1012,16 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq, | |||
993 | /* Set default irq type */ | 1012 | /* Set default irq type */ |
994 | set_irq_type(virq, IRQ_TYPE_NONE); | 1013 | set_irq_type(virq, IRQ_TYPE_NONE); |
995 | 1014 | ||
1015 | /* If the MPIC was reset, then all vectors have already been | ||
1016 | * initialized. Otherwise, a per source lazy initialization | ||
1017 | * is done here. | ||
1018 | */ | ||
1019 | if (!mpic_is_ipi(mpic, hw) && (mpic->flags & MPIC_NO_RESET)) { | ||
1020 | mpic_set_vector(virq, hw); | ||
1021 | mpic_set_destination(virq, mpic_processor_id(mpic)); | ||
1022 | mpic_irq_set_priority(virq, 8); | ||
1023 | } | ||
1024 | |||
996 | return 0; | 1025 | return 0; |
997 | } | 1026 | } |
998 | 1027 | ||
@@ -1040,6 +1069,11 @@ static struct irq_host_ops mpic_host_ops = { | |||
1040 | .xlate = mpic_host_xlate, | 1069 | .xlate = mpic_host_xlate, |
1041 | }; | 1070 | }; |
1042 | 1071 | ||
1072 | static int mpic_reset_prohibited(struct device_node *node) | ||
1073 | { | ||
1074 | return node && of_get_property(node, "pic-no-reset", NULL); | ||
1075 | } | ||
1076 | |||
1043 | /* | 1077 | /* |
1044 | * Exported functions | 1078 | * Exported functions |
1045 | */ | 1079 | */ |
@@ -1160,7 +1194,15 @@ struct mpic * __init mpic_alloc(struct device_node *node, | |||
1160 | mpic_map(mpic, node, paddr, &mpic->tmregs, MPIC_INFO(TIMER_BASE), 0x1000); | 1194 | mpic_map(mpic, node, paddr, &mpic->tmregs, MPIC_INFO(TIMER_BASE), 0x1000); |
1161 | 1195 | ||
1162 | /* Reset */ | 1196 | /* Reset */ |
1163 | if (flags & MPIC_WANTS_RESET) { | 1197 | |
1198 | /* When using a device-node, reset requests are only honored if the MPIC | ||
1199 | * is allowed to reset. | ||
1200 | */ | ||
1201 | if (mpic_reset_prohibited(node)) | ||
1202 | mpic->flags |= MPIC_NO_RESET; | ||
1203 | |||
1204 | if ((flags & MPIC_WANTS_RESET) && !(mpic->flags & MPIC_NO_RESET)) { | ||
1205 | printk(KERN_DEBUG "mpic: Resetting\n"); | ||
1164 | mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0), | 1206 | mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0), |
1165 | mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0)) | 1207 | mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0)) |
1166 | | MPIC_GREG_GCONF_RESET); | 1208 | | MPIC_GREG_GCONF_RESET); |
@@ -1320,22 +1362,21 @@ void __init mpic_init(struct mpic *mpic) | |||
1320 | 1362 | ||
1321 | mpic_pasemi_msi_init(mpic); | 1363 | mpic_pasemi_msi_init(mpic); |
1322 | 1364 | ||
1323 | if (mpic->flags & MPIC_PRIMARY) | 1365 | cpu = mpic_processor_id(mpic); |
1324 | cpu = hard_smp_processor_id(); | ||
1325 | else | ||
1326 | cpu = 0; | ||
1327 | 1366 | ||
1328 | for (i = 0; i < mpic->num_sources; i++) { | 1367 | if (!(mpic->flags & MPIC_NO_RESET)) { |
1329 | /* start with vector = source number, and masked */ | 1368 | for (i = 0; i < mpic->num_sources; i++) { |
1330 | u32 vecpri = MPIC_VECPRI_MASK | i | | 1369 | /* start with vector = source number, and masked */ |
1331 | (8 << MPIC_VECPRI_PRIORITY_SHIFT); | 1370 | u32 vecpri = MPIC_VECPRI_MASK | i | |
1371 | (8 << MPIC_VECPRI_PRIORITY_SHIFT); | ||
1332 | 1372 | ||
1333 | /* check if protected */ | 1373 | /* check if protected */ |
1334 | if (mpic->protected && test_bit(i, mpic->protected)) | 1374 | if (mpic->protected && test_bit(i, mpic->protected)) |
1335 | continue; | 1375 | continue; |
1336 | /* init hw */ | 1376 | /* init hw */ |
1337 | mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri); | 1377 | mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri); |
1338 | mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), 1 << cpu); | 1378 | mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), 1 << cpu); |
1379 | } | ||
1339 | } | 1380 | } |
1340 | 1381 | ||
1341 | /* Init spurious vector */ | 1382 | /* Init spurious vector */ |
diff --git a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile index 8800cf090694..635d677d3281 100644 --- a/arch/s390/boot/Makefile +++ b/arch/s390/boot/Makefile | |||
@@ -6,7 +6,7 @@ COMPILE_VERSION := __linux_compile_version_id__`hostname | \ | |||
6 | tr -c '[0-9A-Za-z]' '_'`__`date | \ | 6 | tr -c '[0-9A-Za-z]' '_'`__`date | \ |
7 | tr -c '[0-9A-Za-z]' '_'`_t | 7 | tr -c '[0-9A-Za-z]' '_'`_t |
8 | 8 | ||
9 | EXTRA_CFLAGS := -DCOMPILE_VERSION=$(COMPILE_VERSION) -gstabs -I. | 9 | ccflags-y := -DCOMPILE_VERSION=$(COMPILE_VERSION) -gstabs -I. |
10 | 10 | ||
11 | targets := image | 11 | targets := image |
12 | targets += bzImage | 12 | targets += bzImage |
diff --git a/arch/s390/kvm/Makefile b/arch/s390/kvm/Makefile index e5221ec0b8e3..860d26514c08 100644 --- a/arch/s390/kvm/Makefile +++ b/arch/s390/kvm/Makefile | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o) | 9 | common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o) |
10 | 10 | ||
11 | EXTRA_CFLAGS += -Ivirt/kvm -Iarch/s390/kvm | 11 | ccflags-y := -Ivirt/kvm -Iarch/s390/kvm |
12 | 12 | ||
13 | kvm-objs := $(common-objs) kvm-s390.o sie64a.o intercept.o interrupt.o priv.o sigp.o diag.o | 13 | kvm-objs := $(common-objs) kvm-s390.o sie64a.o intercept.o interrupt.o priv.o sigp.o diag.o |
14 | obj-$(CONFIG_KVM) += kvm.o | 14 | obj-$(CONFIG_KVM) += kvm.o |
diff --git a/arch/s390/math-emu/Makefile b/arch/s390/math-emu/Makefile index c84890341052..51d399549f60 100644 --- a/arch/s390/math-emu/Makefile +++ b/arch/s390/math-emu/Makefile | |||
@@ -4,4 +4,4 @@ | |||
4 | 4 | ||
5 | obj-$(CONFIG_MATHEMU) := math.o | 5 | obj-$(CONFIG_MATHEMU) := math.o |
6 | 6 | ||
7 | EXTRA_CFLAGS := -I$(src) -Iinclude/math-emu -w | 7 | ccflags-y := -I$(src) -Iinclude/math-emu -w |
diff --git a/arch/sparc/include/asm/irq_32.h b/arch/sparc/include/asm/irq_32.h index cbf4801deaaf..eced3e3ebd30 100644 --- a/arch/sparc/include/asm/irq_32.h +++ b/arch/sparc/include/asm/irq_32.h | |||
@@ -13,4 +13,7 @@ | |||
13 | #define irq_canonicalize(irq) (irq) | 13 | #define irq_canonicalize(irq) (irq) |
14 | 14 | ||
15 | extern void __init init_IRQ(void); | 15 | extern void __init init_IRQ(void); |
16 | |||
17 | #define NO_IRQ 0xffffffff | ||
18 | |||
16 | #endif | 19 | #endif |
diff --git a/arch/sparc/include/asm/irq_64.h b/arch/sparc/include/asm/irq_64.h index 4f09666f0798..16dcae6d56e7 100644 --- a/arch/sparc/include/asm/irq_64.h +++ b/arch/sparc/include/asm/irq_64.h | |||
@@ -97,4 +97,6 @@ extern void *softirq_stack[NR_CPUS]; | |||
97 | #define __ARCH_HAS_DO_SOFTIRQ | 97 | #define __ARCH_HAS_DO_SOFTIRQ |
98 | #define ARCH_HAS_NMI_WATCHDOG | 98 | #define ARCH_HAS_NMI_WATCHDOG |
99 | 99 | ||
100 | #define NO_IRQ 0xffffffff | ||
101 | |||
100 | #endif | 102 | #endif |
diff --git a/arch/sparc/include/asm/unistd.h b/arch/sparc/include/asm/unistd.h index 03eb5a8f6f93..2f475d7c0b53 100644 --- a/arch/sparc/include/asm/unistd.h +++ b/arch/sparc/include/asm/unistd.h | |||
@@ -400,8 +400,11 @@ | |||
400 | #define __NR_fanotify_init 329 | 400 | #define __NR_fanotify_init 329 |
401 | #define __NR_fanotify_mark 330 | 401 | #define __NR_fanotify_mark 330 |
402 | #define __NR_prlimit64 331 | 402 | #define __NR_prlimit64 331 |
403 | #define __NR_name_to_handle_at 332 | ||
404 | #define __NR_open_by_handle_at 333 | ||
405 | #define __NR_clock_adjtime 334 | ||
403 | 406 | ||
404 | #define NR_syscalls 332 | 407 | #define NR_syscalls 335 |
405 | 408 | ||
406 | #ifdef __32bit_syscall_numbers__ | 409 | #ifdef __32bit_syscall_numbers__ |
407 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, | 410 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, |
diff --git a/arch/sparc/kernel/of_device_common.c b/arch/sparc/kernel/of_device_common.c index 49ddff56cb04..cb15bbf8a201 100644 --- a/arch/sparc/kernel/of_device_common.c +++ b/arch/sparc/kernel/of_device_common.c | |||
@@ -22,6 +22,33 @@ unsigned int irq_of_parse_and_map(struct device_node *node, int index) | |||
22 | } | 22 | } |
23 | EXPORT_SYMBOL(irq_of_parse_and_map); | 23 | EXPORT_SYMBOL(irq_of_parse_and_map); |
24 | 24 | ||
25 | int of_address_to_resource(struct device_node *node, int index, | ||
26 | struct resource *r) | ||
27 | { | ||
28 | struct platform_device *op = of_find_device_by_node(node); | ||
29 | |||
30 | if (!op || index >= op->num_resources) | ||
31 | return -EINVAL; | ||
32 | |||
33 | memcpy(r, &op->archdata.resource[index], sizeof(*r)); | ||
34 | return 0; | ||
35 | } | ||
36 | EXPORT_SYMBOL_GPL(of_address_to_resource); | ||
37 | |||
38 | void __iomem *of_iomap(struct device_node *node, int index) | ||
39 | { | ||
40 | struct platform_device *op = of_find_device_by_node(node); | ||
41 | struct resource *r; | ||
42 | |||
43 | if (!op || index >= op->num_resources) | ||
44 | return NULL; | ||
45 | |||
46 | r = &op->archdata.resource[index]; | ||
47 | |||
48 | return of_ioremap(r, 0, resource_size(r), (char *) r->name); | ||
49 | } | ||
50 | EXPORT_SYMBOL(of_iomap); | ||
51 | |||
25 | /* Take the archdata values for IOMMU, STC, and HOSTDATA found in | 52 | /* Take the archdata values for IOMMU, STC, and HOSTDATA found in |
26 | * BUS and propagate to all child platform_device objects. | 53 | * BUS and propagate to all child platform_device objects. |
27 | */ | 54 | */ |
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index ec396e1916b9..4b86eaf04fe5 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S | |||
@@ -83,5 +83,5 @@ sys_call_table: | |||
83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv | 84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv |
85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64 | 86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
87 | 87 | ||
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 8cfcaa549580..0331bafdf3a3 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -84,7 +84,7 @@ sys_call_table32: | |||
84 | .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 84 | .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv | 85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv |
86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init | 86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init |
87 | /*330*/ .word sys32_fanotify_mark, sys_prlimit64 | 87 | /*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime |
88 | 88 | ||
89 | #endif /* CONFIG_COMPAT */ | 89 | #endif /* CONFIG_COMPAT */ |
90 | 90 | ||
@@ -160,4 +160,4 @@ sys_call_table: | |||
160 | .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 160 | .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
161 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv | 161 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv |
162 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 162 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
163 | /*330*/ .word sys_fanotify_mark, sys_prlimit64 | 163 | /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
diff --git a/arch/tile/lib/atomic_32.c b/arch/tile/lib/atomic_32.c index f02040d3614e..46570211df52 100644 --- a/arch/tile/lib/atomic_32.c +++ b/arch/tile/lib/atomic_32.c | |||
@@ -202,32 +202,32 @@ static inline int *__futex_setup(int __user *v) | |||
202 | return __atomic_hashed_lock((int __force *)v); | 202 | return __atomic_hashed_lock((int __force *)v); |
203 | } | 203 | } |
204 | 204 | ||
205 | struct __get_user futex_set(int __user *v, int i) | 205 | struct __get_user futex_set(u32 __user *v, int i) |
206 | { | 206 | { |
207 | return __atomic_xchg((int __force *)v, __futex_setup(v), i); | 207 | return __atomic_xchg((int __force *)v, __futex_setup(v), i); |
208 | } | 208 | } |
209 | 209 | ||
210 | struct __get_user futex_add(int __user *v, int n) | 210 | struct __get_user futex_add(u32 __user *v, int n) |
211 | { | 211 | { |
212 | return __atomic_xchg_add((int __force *)v, __futex_setup(v), n); | 212 | return __atomic_xchg_add((int __force *)v, __futex_setup(v), n); |
213 | } | 213 | } |
214 | 214 | ||
215 | struct __get_user futex_or(int __user *v, int n) | 215 | struct __get_user futex_or(u32 __user *v, int n) |
216 | { | 216 | { |
217 | return __atomic_or((int __force *)v, __futex_setup(v), n); | 217 | return __atomic_or((int __force *)v, __futex_setup(v), n); |
218 | } | 218 | } |
219 | 219 | ||
220 | struct __get_user futex_andn(int __user *v, int n) | 220 | struct __get_user futex_andn(u32 __user *v, int n) |
221 | { | 221 | { |
222 | return __atomic_andn((int __force *)v, __futex_setup(v), n); | 222 | return __atomic_andn((int __force *)v, __futex_setup(v), n); |
223 | } | 223 | } |
224 | 224 | ||
225 | struct __get_user futex_xor(int __user *v, int n) | 225 | struct __get_user futex_xor(u32 __user *v, int n) |
226 | { | 226 | { |
227 | return __atomic_xor((int __force *)v, __futex_setup(v), n); | 227 | return __atomic_xor((int __force *)v, __futex_setup(v), n); |
228 | } | 228 | } |
229 | 229 | ||
230 | struct __get_user futex_cmpxchg(int __user *v, int o, int n) | 230 | struct __get_user futex_cmpxchg(u32 __user *v, int o, int n) |
231 | { | 231 | { |
232 | return __atomic_cmpxchg((int __force *)v, __futex_setup(v), o, n); | 232 | return __atomic_cmpxchg((int __force *)v, __futex_setup(v), o, n); |
233 | } | 233 | } |
diff --git a/arch/um/sys-ppc/Makefile b/arch/um/sys-ppc/Makefile index b8bc844fd2c4..20d363bd7004 100644 --- a/arch/um/sys-ppc/Makefile +++ b/arch/um/sys-ppc/Makefile | |||
@@ -6,7 +6,7 @@ OBJ = built-in.o | |||
6 | OBJS = ptrace.o sigcontext.o checksum.o miscthings.o misc.o \ | 6 | OBJS = ptrace.o sigcontext.o checksum.o miscthings.o misc.o \ |
7 | ptrace_user.o sysrq.o | 7 | ptrace_user.o sysrq.o |
8 | 8 | ||
9 | EXTRA_AFLAGS := -DCONFIG_PPC32 -I. -I$(srctree)/arch/ppc/kernel | 9 | asflags-y := -DCONFIG_PPC32 -I. -I$(srctree)/arch/ppc/kernel |
10 | 10 | ||
11 | all: $(OBJ) | 11 | all: $(OBJ) |
12 | 12 | ||
@@ -15,10 +15,10 @@ $(OBJ): $(OBJS) | |||
15 | $(LD) $(LINKFLAGS) --start-group $^ --end-group -o $@ | 15 | $(LD) $(LINKFLAGS) --start-group $^ --end-group -o $@ |
16 | 16 | ||
17 | ptrace_user.o: ptrace_user.c | 17 | ptrace_user.o: ptrace_user.c |
18 | $(CC) -D__KERNEL__ $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | 18 | $(CC) -D__KERNEL__ $(USER_CFLAGS) $(ccflags-y) -c -o $@ $< |
19 | 19 | ||
20 | sigcontext.o: sigcontext.c | 20 | sigcontext.o: sigcontext.c |
21 | $(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< | 21 | $(CC) $(USER_CFLAGS) $(ccflags-y) -c -o $@ $< |
22 | 22 | ||
23 | checksum.S: | 23 | checksum.S: |
24 | rm -f $@ | 24 | rm -f $@ |
@@ -53,13 +53,13 @@ ppc_defs.h: mk_defs.c ppc_defs.head \ | |||
53 | checksum.o: checksum.S | 53 | checksum.o: checksum.S |
54 | rm -f asm | 54 | rm -f asm |
55 | ln -s $(srctree)/include/asm-ppc asm | 55 | ln -s $(srctree)/include/asm-ppc asm |
56 | $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o | 56 | $(CC) $(asflags-y) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o |
57 | rm -f asm | 57 | rm -f asm |
58 | 58 | ||
59 | misc.o: misc.S ppc_defs.h | 59 | misc.o: misc.S ppc_defs.h |
60 | rm -f asm | 60 | rm -f asm |
61 | ln -s $(srctree)/include/asm-ppc asm | 61 | ln -s $(srctree)/include/asm-ppc asm |
62 | $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o | 62 | $(CC) $(asflags-y) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o |
63 | rm -f asm | 63 | rm -f asm |
64 | 64 | ||
65 | clean-files := $(OBJS) ppc_defs.h checksum.S mk_defs.c | 65 | clean-files := $(OBJS) ppc_defs.h checksum.S mk_defs.c |
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index 430312ba6e3f..849a9d23c71d 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S | |||
@@ -847,4 +847,5 @@ ia32_sys_call_table: | |||
847 | .quad sys_name_to_handle_at | 847 | .quad sys_name_to_handle_at |
848 | .quad compat_sys_open_by_handle_at | 848 | .quad compat_sys_open_by_handle_at |
849 | .quad compat_sys_clock_adjtime | 849 | .quad compat_sys_clock_adjtime |
850 | .quad sys_syncfs | ||
850 | ia32_syscall_end: | 851 | ia32_syscall_end: |
diff --git a/arch/x86/include/asm/unistd_32.h b/arch/x86/include/asm/unistd_32.h index ffaf183c619a..a755ef5e5977 100644 --- a/arch/x86/include/asm/unistd_32.h +++ b/arch/x86/include/asm/unistd_32.h | |||
@@ -349,10 +349,11 @@ | |||
349 | #define __NR_name_to_handle_at 341 | 349 | #define __NR_name_to_handle_at 341 |
350 | #define __NR_open_by_handle_at 342 | 350 | #define __NR_open_by_handle_at 342 |
351 | #define __NR_clock_adjtime 343 | 351 | #define __NR_clock_adjtime 343 |
352 | #define __NR_syncfs 344 | ||
352 | 353 | ||
353 | #ifdef __KERNEL__ | 354 | #ifdef __KERNEL__ |
354 | 355 | ||
355 | #define NR_syscalls 344 | 356 | #define NR_syscalls 345 |
356 | 357 | ||
357 | #define __ARCH_WANT_IPC_PARSE_VERSION | 358 | #define __ARCH_WANT_IPC_PARSE_VERSION |
358 | #define __ARCH_WANT_OLD_READDIR | 359 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/arch/x86/include/asm/unistd_64.h b/arch/x86/include/asm/unistd_64.h index 5466bea670e7..160fa76bd578 100644 --- a/arch/x86/include/asm/unistd_64.h +++ b/arch/x86/include/asm/unistd_64.h | |||
@@ -675,6 +675,8 @@ __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) | |||
675 | __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) | 675 | __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) |
676 | #define __NR_clock_adjtime 305 | 676 | #define __NR_clock_adjtime 305 |
677 | __SYSCALL(__NR_clock_adjtime, sys_clock_adjtime) | 677 | __SYSCALL(__NR_clock_adjtime, sys_clock_adjtime) |
678 | #define __NR_syncfs 306 | ||
679 | __SYSCALL(__NR_syncfs, sys_syncfs) | ||
678 | 680 | ||
679 | #ifndef __NO_STUBS | 681 | #ifndef __NO_STUBS |
680 | #define __ARCH_WANT_OLD_READDIR | 682 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S index 5f181742e8f9..abce34d5c79d 100644 --- a/arch/x86/kernel/syscall_table_32.S +++ b/arch/x86/kernel/syscall_table_32.S | |||
@@ -343,3 +343,4 @@ ENTRY(sys_call_table) | |||
343 | .long sys_name_to_handle_at | 343 | .long sys_name_to_handle_at |
344 | .long sys_open_by_handle_at | 344 | .long sys_open_by_handle_at |
345 | .long sys_clock_adjtime | 345 | .long sys_clock_adjtime |
346 | .long sys_syncfs | ||
diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile index 40aa55b485be..70fd1453e172 100644 --- a/arch/xtensa/boot/Makefile +++ b/arch/xtensa/boot/Makefile | |||
@@ -14,7 +14,7 @@ HOSTFLAGS += -Iarch/$(ARCH)/boot/include | |||
14 | 14 | ||
15 | BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") | 15 | BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") |
16 | 16 | ||
17 | export EXTRA_CFLAGS | 17 | export ccflags-y |
18 | export BIG_ENDIAN | 18 | export BIG_ENDIAN |
19 | 19 | ||
20 | subdir-y := lib | 20 | subdir-y := lib |
diff --git a/arch/xtensa/boot/lib/Makefile b/arch/xtensa/boot/lib/Makefile index d3d2aa2d883a..ad8952e8a07f 100644 --- a/arch/xtensa/boot/lib/Makefile +++ b/arch/xtensa/boot/lib/Makefile | |||
@@ -6,7 +6,7 @@ zlib := inffast.c inflate.c inftrees.c | |||
6 | 6 | ||
7 | lib-y += $(zlib:.c=.o) zmem.o | 7 | lib-y += $(zlib:.c=.o) zmem.o |
8 | 8 | ||
9 | EXTRA_CFLAGS += -Ilib/zlib_inflate | 9 | ccflags-y := -Ilib/zlib_inflate |
10 | 10 | ||
11 | quiet_cmd_copy_zlib = COPY $@ | 11 | quiet_cmd_copy_zlib = COPY $@ |
12 | cmd_copy_zlib = cat $< > $@ | 12 | cmd_copy_zlib = cat $< > $@ |