diff options
Diffstat (limited to 'arch')
696 files changed, 16268 insertions, 6331 deletions
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c index 486d7945583d..544ac5dc09eb 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c | |||
@@ -357,7 +357,7 @@ free_reserved_mem(void *start, void *end) | |||
357 | void *__start = start; | 357 | void *__start = start; |
358 | for (; __start < end; __start += PAGE_SIZE) { | 358 | for (; __start < end; __start += PAGE_SIZE) { |
359 | ClearPageReserved(virt_to_page(__start)); | 359 | ClearPageReserved(virt_to_page(__start)); |
360 | set_page_count(virt_to_page(__start), 1); | 360 | init_page_count(virt_to_page(__start)); |
361 | free_page((long)__start); | 361 | free_page((long)__start); |
362 | totalram_pages++; | 362 | totalram_pages++; |
363 | } | 363 | } |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b674614d090b..1077c671256f 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -116,6 +116,13 @@ config ARCH_EBSA110 | |||
116 | Ethernet interface, two PCMCIA sockets, two serial ports and a | 116 | Ethernet interface, two PCMCIA sockets, two serial ports and a |
117 | parallel port. | 117 | parallel port. |
118 | 118 | ||
119 | config ARCH_EP93XX | ||
120 | bool "EP93xx-based" | ||
121 | select ARM_AMBA | ||
122 | select ARM_VIC | ||
123 | help | ||
124 | This enables support for the Cirrus EP93xx series of CPUs. | ||
125 | |||
119 | config ARCH_FOOTBRIDGE | 126 | config ARCH_FOOTBRIDGE |
120 | bool "FootBridge" | 127 | bool "FootBridge" |
121 | select FOOTBRIDGE | 128 | select FOOTBRIDGE |
@@ -149,6 +156,12 @@ config ARCH_IXP2000 | |||
149 | help | 156 | help |
150 | Support for Intel's IXP2400/2800 (XScale) family of processors. | 157 | Support for Intel's IXP2400/2800 (XScale) family of processors. |
151 | 158 | ||
159 | config ARCH_IXP23XX | ||
160 | bool "IXP23XX-based" | ||
161 | select PCI | ||
162 | help | ||
163 | Support for Intel's IXP23xx (XScale) family of processors. | ||
164 | |||
152 | config ARCH_L7200 | 165 | config ARCH_L7200 |
153 | bool "LinkUp-L7200" | 166 | bool "LinkUp-L7200" |
154 | select FIQ | 167 | select FIQ |
@@ -258,6 +271,8 @@ endchoice | |||
258 | 271 | ||
259 | source "arch/arm/mach-clps711x/Kconfig" | 272 | source "arch/arm/mach-clps711x/Kconfig" |
260 | 273 | ||
274 | source "arch/arm/mach-ep93xx/Kconfig" | ||
275 | |||
261 | source "arch/arm/mach-footbridge/Kconfig" | 276 | source "arch/arm/mach-footbridge/Kconfig" |
262 | 277 | ||
263 | source "arch/arm/mach-integrator/Kconfig" | 278 | source "arch/arm/mach-integrator/Kconfig" |
@@ -268,6 +283,8 @@ source "arch/arm/mach-ixp4xx/Kconfig" | |||
268 | 283 | ||
269 | source "arch/arm/mach-ixp2000/Kconfig" | 284 | source "arch/arm/mach-ixp2000/Kconfig" |
270 | 285 | ||
286 | source "arch/arm/mach-ixp23xx/Kconfig" | ||
287 | |||
271 | source "arch/arm/mach-pxa/Kconfig" | 288 | source "arch/arm/mach-pxa/Kconfig" |
272 | 289 | ||
273 | source "arch/arm/mach-sa1100/Kconfig" | 290 | source "arch/arm/mach-sa1100/Kconfig" |
@@ -442,6 +459,13 @@ config NO_IDLE_HZ | |||
442 | Currently at least OMAP, PXA2xx and SA11x0 platforms are known | 459 | Currently at least OMAP, PXA2xx and SA11x0 platforms are known |
443 | to have accurate timekeeping with dynamic tick. | 460 | to have accurate timekeeping with dynamic tick. |
444 | 461 | ||
462 | config HZ | ||
463 | int | ||
464 | default 128 if ARCH_L7200 | ||
465 | default 200 if ARCH_EBSA110 || ARCH_S3C2410 | ||
466 | default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER | ||
467 | default 100 | ||
468 | |||
445 | config AEABI | 469 | config AEABI |
446 | bool "Use the ARM EABI to compile the kernel" | 470 | bool "Use the ARM EABI to compile the kernel" |
447 | help | 471 | help |
@@ -779,7 +803,8 @@ source "drivers/acorn/block/Kconfig" | |||
779 | 803 | ||
780 | if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \ | 804 | if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \ |
781 | || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \ | 805 | || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \ |
782 | || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE | 806 | || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE \ |
807 | || ARCH_IXP23XX | ||
783 | source "drivers/ide/Kconfig" | 808 | source "drivers/ide/Kconfig" |
784 | endif | 809 | endif |
785 | 810 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 73df2297a5f3..95a96275f88a 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # arch/arm/Makefile | 2 | # arch/arm/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 7 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 8 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 9 | # for more details. |
@@ -59,6 +62,7 @@ tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi | |||
59 | tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110 | 62 | tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110 |
60 | tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100 | 63 | tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100 |
61 | tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale | 64 | tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale |
65 | tune-$(CONFIG_CPU_XSC3) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale | ||
62 | tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) | 66 | tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) |
63 | 67 | ||
64 | ifeq ($(CONFIG_AEABI),y) | 68 | ifeq ($(CONFIG_AEABI),y) |
@@ -99,6 +103,7 @@ endif | |||
99 | machine-$(CONFIG_ARCH_IOP3XX) := iop3xx | 103 | machine-$(CONFIG_ARCH_IOP3XX) := iop3xx |
100 | machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx | 104 | machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx |
101 | machine-$(CONFIG_ARCH_IXP2000) := ixp2000 | 105 | machine-$(CONFIG_ARCH_IXP2000) := ixp2000 |
106 | machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx | ||
102 | machine-$(CONFIG_ARCH_OMAP1) := omap1 | 107 | machine-$(CONFIG_ARCH_OMAP1) := omap1 |
103 | machine-$(CONFIG_ARCH_OMAP2) := omap2 | 108 | machine-$(CONFIG_ARCH_OMAP2) := omap2 |
104 | incdir-$(CONFIG_ARCH_OMAP) := omap | 109 | incdir-$(CONFIG_ARCH_OMAP) := omap |
@@ -110,6 +115,7 @@ endif | |||
110 | machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 | 115 | machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 |
111 | machine-$(CONFIG_ARCH_REALVIEW) := realview | 116 | machine-$(CONFIG_ARCH_REALVIEW) := realview |
112 | machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200 | 117 | machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200 |
118 | machine-$(CONFIG_ARCH_EP93XX) := ep93xx | ||
113 | 119 | ||
114 | ifeq ($(CONFIG_ARCH_EBSA110),y) | 120 | ifeq ($(CONFIG_ARCH_EBSA110),y) |
115 | # This is what happens if you forget the IOCS16 line. | 121 | # This is what happens if you forget the IOCS16 line. |
@@ -181,7 +187,7 @@ endif | |||
181 | 187 | ||
182 | archprepare: maketools | 188 | archprepare: maketools |
183 | 189 | ||
184 | .PHONY: maketools FORCE | 190 | PHONY += maketools FORCE |
185 | maketools: include/linux/version.h include/asm-arm/.arch FORCE | 191 | maketools: include/linux/version.h include/asm-arm/.arch FORCE |
186 | $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h | 192 | $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h |
187 | 193 | ||
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index a174d63395ea..ec9c400c7f82 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # arch/arm/boot/Makefile | 2 | # arch/arm/boot/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 7 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 8 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 9 | # for more details. |
@@ -73,7 +76,7 @@ $(obj)/bootpImage: $(obj)/bootp/bootp FORCE | |||
73 | $(call if_changed,objcopy) | 76 | $(call if_changed,objcopy) |
74 | @echo ' Kernel: $@ is ready' | 77 | @echo ' Kernel: $@ is ready' |
75 | 78 | ||
76 | .PHONY: initrd FORCE | 79 | PHONY += initrd FORCE |
77 | initrd: | 80 | initrd: |
78 | @test "$(INITRD_PHYS)" != "" || \ | 81 | @test "$(INITRD_PHYS)" != "" || \ |
79 | (echo This machine does not support INITRD; exit -1) | 82 | (echo This machine does not support INITRD; exit -1) |
diff --git a/arch/arm/boot/bootp/Makefile b/arch/arm/boot/bootp/Makefile index 8e8879b6b3d7..c394e305447c 100644 --- a/arch/arm/boot/bootp/Makefile +++ b/arch/arm/boot/bootp/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # linux/arch/arm/boot/bootp/Makefile | 2 | # linux/arch/arm/boot/bootp/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | 7 | ||
5 | LDFLAGS_bootp :=-p --no-undefined -X \ | 8 | LDFLAGS_bootp :=-p --no-undefined -X \ |
6 | --defsym initrd_phys=$(INITRD_PHYS) \ | 9 | --defsym initrd_phys=$(INITRD_PHYS) \ |
@@ -21,4 +24,4 @@ $(obj)/kernel.o: arch/arm/boot/zImage FORCE | |||
21 | 24 | ||
22 | $(obj)/initrd.o: $(INITRD) FORCE | 25 | $(obj)/initrd.o: $(INITRD) FORCE |
23 | 26 | ||
24 | .PHONY: $(INITRD) FORCE | 27 | PHONY += $(INITRD) FORCE |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 35ffe0f4ece7..2adc1527e0eb 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -50,10 +50,6 @@ ifeq ($(CONFIG_ARCH_AT91RM9200),y) | |||
50 | OBJS += head-at91rm9200.o | 50 | OBJS += head-at91rm9200.o |
51 | endif | 51 | endif |
52 | 52 | ||
53 | ifeq ($(CONFIG_DEBUG_ICEDCC),y) | ||
54 | OBJS += ice-dcc.o | ||
55 | endif | ||
56 | |||
57 | ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) | 53 | ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) |
58 | OBJS += big-endian.o | 54 | OBJS += big-endian.o |
59 | endif | 55 | endif |
diff --git a/arch/arm/boot/compressed/ice-dcc.S b/arch/arm/boot/compressed/ice-dcc.S deleted file mode 100644 index 104377a199bb..000000000000 --- a/arch/arm/boot/compressed/ice-dcc.S +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | |||
2 | |||
3 | .text | ||
4 | |||
5 | .global icedcc_putc | ||
6 | |||
7 | icedcc_putc: | ||
8 | mov r2, #0x4000000 | ||
9 | 1: | ||
10 | subs r2, r2, #1 | ||
11 | movlt pc, r14 | ||
12 | mrc p14, 0, r1, c0, c0, 0 | ||
13 | tst r1, #2 | ||
14 | bne 1b | ||
15 | |||
16 | mcr p14, 0, r0, c1, c0, 0 | ||
17 | mov pc, r14 | ||
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 5ab94584baee..0af3772efcb7 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -20,24 +20,45 @@ unsigned int __machine_arch_type; | |||
20 | 20 | ||
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | 22 | ||
23 | #include <asm/arch/uncompress.h> | ||
24 | |||
25 | #ifdef STANDALONE_DEBUG | 23 | #ifdef STANDALONE_DEBUG |
26 | #define putstr printf | 24 | #define putstr printf |
27 | #endif | 25 | #else |
26 | |||
27 | static void putstr(const char *ptr); | ||
28 | |||
29 | #include <linux/compiler.h> | ||
30 | #include <asm/arch/uncompress.h> | ||
28 | 31 | ||
29 | #ifdef CONFIG_DEBUG_ICEDCC | 32 | #ifdef CONFIG_DEBUG_ICEDCC |
30 | #define putstr icedcc_putstr | 33 | static void icedcc_putc(int ch) |
31 | #define putc icedcc_putc | 34 | { |
35 | int status, i = 0x4000000; | ||
32 | 36 | ||
33 | extern void icedcc_putc(int ch); | 37 | do { |
38 | if (--i < 0) | ||
39 | return; | ||
34 | 40 | ||
35 | static void | 41 | asm("mrc p14, 0, %0, c0, c0, 0" : "=r" (status)); |
36 | icedcc_putstr(const char *ptr) | 42 | } while (status & 2); |
43 | |||
44 | asm("mcr p15, 0, %0, c1, c0, 0" : : "r" (ch)); | ||
45 | } | ||
46 | |||
47 | #define putc(ch) icedcc_putc(ch) | ||
48 | #define flush() do { } while (0) | ||
49 | #endif | ||
50 | |||
51 | static void putstr(const char *ptr) | ||
37 | { | 52 | { |
38 | for (; *ptr != '\0'; ptr++) { | 53 | char c; |
39 | icedcc_putc(*ptr); | 54 | |
55 | while ((c = *ptr++) != '\0') { | ||
56 | if (c == '\n') | ||
57 | putc('\r'); | ||
58 | putc(c); | ||
40 | } | 59 | } |
60 | |||
61 | flush(); | ||
41 | } | 62 | } |
42 | 63 | ||
43 | #endif | 64 | #endif |
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index c81a2ff6b5be..847e3e6356c6 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile | |||
@@ -15,3 +15,4 @@ obj-$(CONFIG_SHARP_LOCOMO) += locomo.o | |||
15 | obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o | 15 | obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o |
16 | obj-$(CONFIG_SHARPSL_PM) += sharpsl_pm.o | 16 | obj-$(CONFIG_SHARPSL_PM) += sharpsl_pm.o |
17 | obj-$(CONFIG_SHARP_SCOOP) += scoop.o | 17 | obj-$(CONFIG_SHARP_SCOOP) += scoop.o |
18 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o | ||
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index ad6c89a555bb..7971d0dc6892 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * limited DMA windows. These functions utilize bounce buffers to | 5 | * limited DMA windows. These functions utilize bounce buffers to |
6 | * copy data to/from buffers located outside the DMA region. This | 6 | * copy data to/from buffers located outside the DMA region. This |
7 | * only works for systems in which DMA memory is at the bottom of | 7 | * only works for systems in which DMA memory is at the bottom of |
8 | * RAM and the remainder of memory is at the top an the DMA memory | 8 | * RAM, the remainder of memory is at the top and the DMA memory |
9 | * can be marked as ZONE_DMA. Anything beyond that such as discontigous | 9 | * can be marked as ZONE_DMA. Anything beyond that such as discontigous |
10 | * DMA windows will require custom implementations that reserve memory | 10 | * DMA windows will require custom implementations that reserve memory |
11 | * areas at early bootup. | 11 | * areas at early bootup. |
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 23609400a8e2..a7dc1370695b 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c | |||
@@ -60,7 +60,7 @@ struct locomo { | |||
60 | unsigned long phys; | 60 | unsigned long phys; |
61 | unsigned int irq; | 61 | unsigned int irq; |
62 | spinlock_t lock; | 62 | spinlock_t lock; |
63 | void *base; | 63 | void __iomem *base; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | struct locomo_dev_info { | 66 | struct locomo_dev_info { |
@@ -162,7 +162,7 @@ static void locomo_handler(unsigned int irq, struct irqdesc *desc, | |||
162 | { | 162 | { |
163 | int req, i; | 163 | int req, i; |
164 | struct irqdesc *d; | 164 | struct irqdesc *d; |
165 | void *mapbase = get_irq_chipdata(irq); | 165 | void __iomem *mapbase = get_irq_chipdata(irq); |
166 | 166 | ||
167 | /* Acknowledge the parent IRQ */ | 167 | /* Acknowledge the parent IRQ */ |
168 | desc->chip->ack(irq); | 168 | desc->chip->ack(irq); |
@@ -189,7 +189,7 @@ static void locomo_ack_irq(unsigned int irq) | |||
189 | 189 | ||
190 | static void locomo_mask_irq(unsigned int irq) | 190 | static void locomo_mask_irq(unsigned int irq) |
191 | { | 191 | { |
192 | void *mapbase = get_irq_chipdata(irq); | 192 | void __iomem *mapbase = get_irq_chipdata(irq); |
193 | unsigned int r; | 193 | unsigned int r; |
194 | r = locomo_readl(mapbase + LOCOMO_ICR); | 194 | r = locomo_readl(mapbase + LOCOMO_ICR); |
195 | r &= ~(0x0010 << (irq - LOCOMO_IRQ_START)); | 195 | r &= ~(0x0010 << (irq - LOCOMO_IRQ_START)); |
@@ -198,7 +198,7 @@ static void locomo_mask_irq(unsigned int irq) | |||
198 | 198 | ||
199 | static void locomo_unmask_irq(unsigned int irq) | 199 | static void locomo_unmask_irq(unsigned int irq) |
200 | { | 200 | { |
201 | void *mapbase = get_irq_chipdata(irq); | 201 | void __iomem *mapbase = get_irq_chipdata(irq); |
202 | unsigned int r; | 202 | unsigned int r; |
203 | r = locomo_readl(mapbase + LOCOMO_ICR); | 203 | r = locomo_readl(mapbase + LOCOMO_ICR); |
204 | r |= (0x0010 << (irq - LOCOMO_IRQ_START)); | 204 | r |= (0x0010 << (irq - LOCOMO_IRQ_START)); |
@@ -215,7 +215,7 @@ static void locomo_key_handler(unsigned int irq, struct irqdesc *desc, | |||
215 | struct pt_regs *regs) | 215 | struct pt_regs *regs) |
216 | { | 216 | { |
217 | struct irqdesc *d; | 217 | struct irqdesc *d; |
218 | void *mapbase = get_irq_chipdata(irq); | 218 | void __iomem *mapbase = get_irq_chipdata(irq); |
219 | 219 | ||
220 | if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) { | 220 | if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) { |
221 | d = irq_desc + LOCOMO_IRQ_KEY_START; | 221 | d = irq_desc + LOCOMO_IRQ_KEY_START; |
@@ -225,7 +225,7 @@ static void locomo_key_handler(unsigned int irq, struct irqdesc *desc, | |||
225 | 225 | ||
226 | static void locomo_key_ack_irq(unsigned int irq) | 226 | static void locomo_key_ack_irq(unsigned int irq) |
227 | { | 227 | { |
228 | void *mapbase = get_irq_chipdata(irq); | 228 | void __iomem *mapbase = get_irq_chipdata(irq); |
229 | unsigned int r; | 229 | unsigned int r; |
230 | r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); | 230 | r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); |
231 | r &= ~(0x0100 << (irq - LOCOMO_IRQ_KEY_START)); | 231 | r &= ~(0x0100 << (irq - LOCOMO_IRQ_KEY_START)); |
@@ -234,7 +234,7 @@ static void locomo_key_ack_irq(unsigned int irq) | |||
234 | 234 | ||
235 | static void locomo_key_mask_irq(unsigned int irq) | 235 | static void locomo_key_mask_irq(unsigned int irq) |
236 | { | 236 | { |
237 | void *mapbase = get_irq_chipdata(irq); | 237 | void __iomem *mapbase = get_irq_chipdata(irq); |
238 | unsigned int r; | 238 | unsigned int r; |
239 | r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); | 239 | r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); |
240 | r &= ~(0x0010 << (irq - LOCOMO_IRQ_KEY_START)); | 240 | r &= ~(0x0010 << (irq - LOCOMO_IRQ_KEY_START)); |
@@ -243,7 +243,7 @@ static void locomo_key_mask_irq(unsigned int irq) | |||
243 | 243 | ||
244 | static void locomo_key_unmask_irq(unsigned int irq) | 244 | static void locomo_key_unmask_irq(unsigned int irq) |
245 | { | 245 | { |
246 | void *mapbase = get_irq_chipdata(irq); | 246 | void __iomem *mapbase = get_irq_chipdata(irq); |
247 | unsigned int r; | 247 | unsigned int r; |
248 | r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); | 248 | r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); |
249 | r |= (0x0010 << (irq - LOCOMO_IRQ_KEY_START)); | 249 | r |= (0x0010 << (irq - LOCOMO_IRQ_KEY_START)); |
@@ -261,7 +261,7 @@ static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc, | |||
261 | { | 261 | { |
262 | int req, i; | 262 | int req, i; |
263 | struct irqdesc *d; | 263 | struct irqdesc *d; |
264 | void *mapbase = get_irq_chipdata(irq); | 264 | void __iomem *mapbase = get_irq_chipdata(irq); |
265 | 265 | ||
266 | req = locomo_readl(mapbase + LOCOMO_GIR) & | 266 | req = locomo_readl(mapbase + LOCOMO_GIR) & |
267 | locomo_readl(mapbase + LOCOMO_GPD) & | 267 | locomo_readl(mapbase + LOCOMO_GPD) & |
@@ -280,7 +280,7 @@ static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc, | |||
280 | 280 | ||
281 | static void locomo_gpio_ack_irq(unsigned int irq) | 281 | static void locomo_gpio_ack_irq(unsigned int irq) |
282 | { | 282 | { |
283 | void *mapbase = get_irq_chipdata(irq); | 283 | void __iomem *mapbase = get_irq_chipdata(irq); |
284 | unsigned int r; | 284 | unsigned int r; |
285 | r = locomo_readl(mapbase + LOCOMO_GWE); | 285 | r = locomo_readl(mapbase + LOCOMO_GWE); |
286 | r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START)); | 286 | r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START)); |
@@ -297,7 +297,7 @@ static void locomo_gpio_ack_irq(unsigned int irq) | |||
297 | 297 | ||
298 | static void locomo_gpio_mask_irq(unsigned int irq) | 298 | static void locomo_gpio_mask_irq(unsigned int irq) |
299 | { | 299 | { |
300 | void *mapbase = get_irq_chipdata(irq); | 300 | void __iomem *mapbase = get_irq_chipdata(irq); |
301 | unsigned int r; | 301 | unsigned int r; |
302 | r = locomo_readl(mapbase + LOCOMO_GIE); | 302 | r = locomo_readl(mapbase + LOCOMO_GIE); |
303 | r &= ~(0x0001 << (irq - LOCOMO_IRQ_GPIO_START)); | 303 | r &= ~(0x0001 << (irq - LOCOMO_IRQ_GPIO_START)); |
@@ -306,7 +306,7 @@ static void locomo_gpio_mask_irq(unsigned int irq) | |||
306 | 306 | ||
307 | static void locomo_gpio_unmask_irq(unsigned int irq) | 307 | static void locomo_gpio_unmask_irq(unsigned int irq) |
308 | { | 308 | { |
309 | void *mapbase = get_irq_chipdata(irq); | 309 | void __iomem *mapbase = get_irq_chipdata(irq); |
310 | unsigned int r; | 310 | unsigned int r; |
311 | r = locomo_readl(mapbase + LOCOMO_GIE); | 311 | r = locomo_readl(mapbase + LOCOMO_GIE); |
312 | r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START)); | 312 | r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START)); |
@@ -323,7 +323,7 @@ static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc, | |||
323 | struct pt_regs *regs) | 323 | struct pt_regs *regs) |
324 | { | 324 | { |
325 | struct irqdesc *d; | 325 | struct irqdesc *d; |
326 | void *mapbase = get_irq_chipdata(irq); | 326 | void __iomem *mapbase = get_irq_chipdata(irq); |
327 | 327 | ||
328 | if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) { | 328 | if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) { |
329 | d = irq_desc + LOCOMO_IRQ_LT_START; | 329 | d = irq_desc + LOCOMO_IRQ_LT_START; |
@@ -333,7 +333,7 @@ static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc, | |||
333 | 333 | ||
334 | static void locomo_lt_ack_irq(unsigned int irq) | 334 | static void locomo_lt_ack_irq(unsigned int irq) |
335 | { | 335 | { |
336 | void *mapbase = get_irq_chipdata(irq); | 336 | void __iomem *mapbase = get_irq_chipdata(irq); |
337 | unsigned int r; | 337 | unsigned int r; |
338 | r = locomo_readl(mapbase + LOCOMO_LTINT); | 338 | r = locomo_readl(mapbase + LOCOMO_LTINT); |
339 | r &= ~(0x0100 << (irq - LOCOMO_IRQ_LT_START)); | 339 | r &= ~(0x0100 << (irq - LOCOMO_IRQ_LT_START)); |
@@ -342,7 +342,7 @@ static void locomo_lt_ack_irq(unsigned int irq) | |||
342 | 342 | ||
343 | static void locomo_lt_mask_irq(unsigned int irq) | 343 | static void locomo_lt_mask_irq(unsigned int irq) |
344 | { | 344 | { |
345 | void *mapbase = get_irq_chipdata(irq); | 345 | void __iomem *mapbase = get_irq_chipdata(irq); |
346 | unsigned int r; | 346 | unsigned int r; |
347 | r = locomo_readl(mapbase + LOCOMO_LTINT); | 347 | r = locomo_readl(mapbase + LOCOMO_LTINT); |
348 | r &= ~(0x0010 << (irq - LOCOMO_IRQ_LT_START)); | 348 | r &= ~(0x0010 << (irq - LOCOMO_IRQ_LT_START)); |
@@ -351,7 +351,7 @@ static void locomo_lt_mask_irq(unsigned int irq) | |||
351 | 351 | ||
352 | static void locomo_lt_unmask_irq(unsigned int irq) | 352 | static void locomo_lt_unmask_irq(unsigned int irq) |
353 | { | 353 | { |
354 | void *mapbase = get_irq_chipdata(irq); | 354 | void __iomem *mapbase = get_irq_chipdata(irq); |
355 | unsigned int r; | 355 | unsigned int r; |
356 | r = locomo_readl(mapbase + LOCOMO_LTINT); | 356 | r = locomo_readl(mapbase + LOCOMO_LTINT); |
357 | r |= (0x0010 << (irq - LOCOMO_IRQ_LT_START)); | 357 | r |= (0x0010 << (irq - LOCOMO_IRQ_LT_START)); |
@@ -369,7 +369,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc, | |||
369 | { | 369 | { |
370 | int req, i; | 370 | int req, i; |
371 | struct irqdesc *d; | 371 | struct irqdesc *d; |
372 | void *mapbase = get_irq_chipdata(irq); | 372 | void __iomem *mapbase = get_irq_chipdata(irq); |
373 | 373 | ||
374 | req = locomo_readl(mapbase + LOCOMO_SPIIR) & 0x000F; | 374 | req = locomo_readl(mapbase + LOCOMO_SPIIR) & 0x000F; |
375 | if (req) { | 375 | if (req) { |
@@ -386,7 +386,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc, | |||
386 | 386 | ||
387 | static void locomo_spi_ack_irq(unsigned int irq) | 387 | static void locomo_spi_ack_irq(unsigned int irq) |
388 | { | 388 | { |
389 | void *mapbase = get_irq_chipdata(irq); | 389 | void __iomem *mapbase = get_irq_chipdata(irq); |
390 | unsigned int r; | 390 | unsigned int r; |
391 | r = locomo_readl(mapbase + LOCOMO_SPIWE); | 391 | r = locomo_readl(mapbase + LOCOMO_SPIWE); |
392 | r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START)); | 392 | r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START)); |
@@ -403,7 +403,7 @@ static void locomo_spi_ack_irq(unsigned int irq) | |||
403 | 403 | ||
404 | static void locomo_spi_mask_irq(unsigned int irq) | 404 | static void locomo_spi_mask_irq(unsigned int irq) |
405 | { | 405 | { |
406 | void *mapbase = get_irq_chipdata(irq); | 406 | void __iomem *mapbase = get_irq_chipdata(irq); |
407 | unsigned int r; | 407 | unsigned int r; |
408 | r = locomo_readl(mapbase + LOCOMO_SPIIE); | 408 | r = locomo_readl(mapbase + LOCOMO_SPIIE); |
409 | r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START)); | 409 | r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START)); |
@@ -412,7 +412,7 @@ static void locomo_spi_mask_irq(unsigned int irq) | |||
412 | 412 | ||
413 | static void locomo_spi_unmask_irq(unsigned int irq) | 413 | static void locomo_spi_unmask_irq(unsigned int irq) |
414 | { | 414 | { |
415 | void *mapbase = get_irq_chipdata(irq); | 415 | void __iomem *mapbase = get_irq_chipdata(irq); |
416 | unsigned int r; | 416 | unsigned int r; |
417 | r = locomo_readl(mapbase + LOCOMO_SPIIE); | 417 | r = locomo_readl(mapbase + LOCOMO_SPIIE); |
418 | r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START)); | 418 | r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START)); |
@@ -428,7 +428,7 @@ static struct irqchip locomo_spi_chip = { | |||
428 | static void locomo_setup_irq(struct locomo *lchip) | 428 | static void locomo_setup_irq(struct locomo *lchip) |
429 | { | 429 | { |
430 | int irq; | 430 | int irq; |
431 | void *irqbase = lchip->base; | 431 | void __iomem *irqbase = lchip->base; |
432 | 432 | ||
433 | /* | 433 | /* |
434 | * Install handler for IRQ_LOCOMO_HW. | 434 | * Install handler for IRQ_LOCOMO_HW. |
@@ -501,12 +501,11 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info) | |||
501 | struct locomo_dev *dev; | 501 | struct locomo_dev *dev; |
502 | int ret; | 502 | int ret; |
503 | 503 | ||
504 | dev = kmalloc(sizeof(struct locomo_dev), GFP_KERNEL); | 504 | dev = kzalloc(sizeof(struct locomo_dev), GFP_KERNEL); |
505 | if (!dev) { | 505 | if (!dev) { |
506 | ret = -ENOMEM; | 506 | ret = -ENOMEM; |
507 | goto out; | 507 | goto out; |
508 | } | 508 | } |
509 | memset(dev, 0, sizeof(struct locomo_dev)); | ||
510 | 509 | ||
511 | strncpy(dev->dev.bus_id,info->name,sizeof(dev->dev.bus_id)); | 510 | strncpy(dev->dev.bus_id,info->name,sizeof(dev->dev.bus_id)); |
512 | /* | 511 | /* |
@@ -664,12 +663,10 @@ __locomo_probe(struct device *me, struct resource *mem, int irq) | |||
664 | unsigned long r; | 663 | unsigned long r; |
665 | int i, ret = -ENODEV; | 664 | int i, ret = -ENODEV; |
666 | 665 | ||
667 | lchip = kmalloc(sizeof(struct locomo), GFP_KERNEL); | 666 | lchip = kzalloc(sizeof(struct locomo), GFP_KERNEL); |
668 | if (!lchip) | 667 | if (!lchip) |
669 | return -ENOMEM; | 668 | return -ENOMEM; |
670 | 669 | ||
671 | memset(lchip, 0, sizeof(struct locomo)); | ||
672 | |||
673 | spin_lock_init(&lchip->lock); | 670 | spin_lock_init(&lchip->lock); |
674 | 671 | ||
675 | lchip->dev = me; | 672 | lchip->dev = me; |
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 93352f6097c1..3f68db84e5e6 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
29 | #include <linux/clk.h> | ||
29 | 30 | ||
30 | #include <asm/hardware.h> | 31 | #include <asm/hardware.h> |
31 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
@@ -36,10 +37,6 @@ | |||
36 | 37 | ||
37 | #include <asm/hardware/sa1111.h> | 38 | #include <asm/hardware/sa1111.h> |
38 | 39 | ||
39 | #ifdef CONFIG_ARCH_PXA | ||
40 | #include <asm/arch/pxa-regs.h> | ||
41 | #endif | ||
42 | |||
43 | extern void __init sa1110_mb_enable(void); | 40 | extern void __init sa1110_mb_enable(void); |
44 | 41 | ||
45 | /* | 42 | /* |
@@ -51,6 +48,7 @@ extern void __init sa1110_mb_enable(void); | |||
51 | */ | 48 | */ |
52 | struct sa1111 { | 49 | struct sa1111 { |
53 | struct device *dev; | 50 | struct device *dev; |
51 | struct clk *clk; | ||
54 | unsigned long phys; | 52 | unsigned long phys; |
55 | int irq; | 53 | int irq; |
56 | spinlock_t lock; | 54 | spinlock_t lock; |
@@ -451,19 +449,7 @@ static void sa1111_wake(struct sa1111 *sachip) | |||
451 | 449 | ||
452 | spin_lock_irqsave(&sachip->lock, flags); | 450 | spin_lock_irqsave(&sachip->lock, flags); |
453 | 451 | ||
454 | #ifdef CONFIG_ARCH_SA1100 | 452 | clk_enable(sachip->clk); |
455 | /* | ||
456 | * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111: | ||
457 | * (SA-1110 Developer's Manual, section 9.1.2.1) | ||
458 | */ | ||
459 | GAFR |= GPIO_32_768kHz; | ||
460 | GPDR |= GPIO_32_768kHz; | ||
461 | TUCR = TUCR_3_6864MHz; | ||
462 | #elif CONFIG_ARCH_PXA | ||
463 | pxa_gpio_mode(GPIO11_3_6MHz_MD); | ||
464 | #else | ||
465 | #error missing clock setup | ||
466 | #endif | ||
467 | 453 | ||
468 | /* | 454 | /* |
469 | * Turn VCO on, and disable PLL Bypass. | 455 | * Turn VCO on, and disable PLL Bypass. |
@@ -555,12 +541,11 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
555 | struct sa1111_dev *dev; | 541 | struct sa1111_dev *dev; |
556 | int ret; | 542 | int ret; |
557 | 543 | ||
558 | dev = kmalloc(sizeof(struct sa1111_dev), GFP_KERNEL); | 544 | dev = kzalloc(sizeof(struct sa1111_dev), GFP_KERNEL); |
559 | if (!dev) { | 545 | if (!dev) { |
560 | ret = -ENOMEM; | 546 | ret = -ENOMEM; |
561 | goto out; | 547 | goto out; |
562 | } | 548 | } |
563 | memset(dev, 0, sizeof(struct sa1111_dev)); | ||
564 | 549 | ||
565 | snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), | 550 | snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), |
566 | "%4.4lx", info->offset); | 551 | "%4.4lx", info->offset); |
@@ -635,11 +620,15 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
635 | unsigned int has_devs, val; | 620 | unsigned int has_devs, val; |
636 | int i, ret = -ENODEV; | 621 | int i, ret = -ENODEV; |
637 | 622 | ||
638 | sachip = kmalloc(sizeof(struct sa1111), GFP_KERNEL); | 623 | sachip = kzalloc(sizeof(struct sa1111), GFP_KERNEL); |
639 | if (!sachip) | 624 | if (!sachip) |
640 | return -ENOMEM; | 625 | return -ENOMEM; |
641 | 626 | ||
642 | memset(sachip, 0, sizeof(struct sa1111)); | 627 | sachip->clk = clk_get(me, "GPIO27_CLK"); |
628 | if (!sachip->clk) { | ||
629 | ret = PTR_ERR(sachip->clk); | ||
630 | goto err_free; | ||
631 | } | ||
643 | 632 | ||
644 | spin_lock_init(&sachip->lock); | 633 | spin_lock_init(&sachip->lock); |
645 | 634 | ||
@@ -656,7 +645,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
656 | sachip->base = ioremap(mem->start, PAGE_SIZE * 2); | 645 | sachip->base = ioremap(mem->start, PAGE_SIZE * 2); |
657 | if (!sachip->base) { | 646 | if (!sachip->base) { |
658 | ret = -ENOMEM; | 647 | ret = -ENOMEM; |
659 | goto out; | 648 | goto err_clkput; |
660 | } | 649 | } |
661 | 650 | ||
662 | /* | 651 | /* |
@@ -666,7 +655,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
666 | if ((id & SKID_ID_MASK) != SKID_SA1111_ID) { | 655 | if ((id & SKID_ID_MASK) != SKID_SA1111_ID) { |
667 | printk(KERN_DEBUG "SA1111 not detected: ID = %08lx\n", id); | 656 | printk(KERN_DEBUG "SA1111 not detected: ID = %08lx\n", id); |
668 | ret = -ENODEV; | 657 | ret = -ENODEV; |
669 | goto unmap; | 658 | goto err_unmap; |
670 | } | 659 | } |
671 | 660 | ||
672 | printk(KERN_INFO "SA1111 Microprocessor Companion Chip: " | 661 | printk(KERN_INFO "SA1111 Microprocessor Companion Chip: " |
@@ -726,9 +715,11 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
726 | 715 | ||
727 | return 0; | 716 | return 0; |
728 | 717 | ||
729 | unmap: | 718 | err_unmap: |
730 | iounmap(sachip->base); | 719 | iounmap(sachip->base); |
731 | out: | 720 | err_clkput: |
721 | clk_put(sachip->clk); | ||
722 | err_free: | ||
732 | kfree(sachip); | 723 | kfree(sachip); |
733 | return ret; | 724 | return ret; |
734 | } | 725 | } |
@@ -751,6 +742,8 @@ static void __sa1111_remove(struct sa1111 *sachip) | |||
751 | sa1111_writel(0, irqbase + SA1111_WAKEEN0); | 742 | sa1111_writel(0, irqbase + SA1111_WAKEEN0); |
752 | sa1111_writel(0, irqbase + SA1111_WAKEEN1); | 743 | sa1111_writel(0, irqbase + SA1111_WAKEEN1); |
753 | 744 | ||
745 | clk_disable(sachip->clk); | ||
746 | |||
754 | if (sachip->irq != NO_IRQ) { | 747 | if (sachip->irq != NO_IRQ) { |
755 | set_irq_chained_handler(sachip->irq, NULL); | 748 | set_irq_chained_handler(sachip->irq, NULL); |
756 | set_irq_data(sachip->irq, NULL); | 749 | set_irq_data(sachip->irq, NULL); |
@@ -759,6 +752,7 @@ static void __sa1111_remove(struct sa1111 *sachip) | |||
759 | } | 752 | } |
760 | 753 | ||
761 | iounmap(sachip->base); | 754 | iounmap(sachip->base); |
755 | clk_put(sachip->clk); | ||
762 | kfree(sachip); | 756 | kfree(sachip); |
763 | } | 757 | } |
764 | 758 | ||
@@ -857,6 +851,8 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state) | |||
857 | sa1111_writel(0, sachip->base + SA1111_SKPWM0); | 851 | sa1111_writel(0, sachip->base + SA1111_SKPWM0); |
858 | sa1111_writel(0, sachip->base + SA1111_SKPWM1); | 852 | sa1111_writel(0, sachip->base + SA1111_SKPWM1); |
859 | 853 | ||
854 | clk_disable(sachip->clk); | ||
855 | |||
860 | spin_unlock_irqrestore(&sachip->lock, flags); | 856 | spin_unlock_irqrestore(&sachip->lock, flags); |
861 | 857 | ||
862 | return 0; | 858 | return 0; |
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index a2dfe0b0f1ec..5e830f444c6c 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c | |||
@@ -132,12 +132,10 @@ int __init scoop_probe(struct platform_device *pdev) | |||
132 | if (!mem) | 132 | if (!mem) |
133 | return -EINVAL; | 133 | return -EINVAL; |
134 | 134 | ||
135 | devptr = kmalloc(sizeof(struct scoop_dev), GFP_KERNEL); | 135 | devptr = kzalloc(sizeof(struct scoop_dev), GFP_KERNEL); |
136 | |||
137 | if (!devptr) | 136 | if (!devptr) |
138 | return -ENOMEM; | 137 | return -ENOMEM; |
139 | 138 | ||
140 | memset(devptr, 0, sizeof(struct scoop_dev)); | ||
141 | spin_lock_init(&devptr->scoop_lock); | 139 | spin_lock_init(&devptr->scoop_lock); |
142 | 140 | ||
143 | inf = pdev->dev.platform_data; | 141 | inf = pdev->dev.platform_data; |
diff --git a/arch/arm/mach-ixp2000/uengine.c b/arch/arm/common/uengine.c index ec4e007a22ef..a1310b71004e 100644 --- a/arch/arm/mach-ixp2000/uengine.c +++ b/arch/arm/common/uengine.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
20 | #include <asm/hardware.h> | 20 | #include <asm/hardware.h> |
21 | #include <asm/arch/ixp2000-regs.h> | 21 | #include <asm/arch/ixp2000-regs.h> |
22 | #include <asm/arch/uengine.h> | 22 | #include <asm/hardware/uengine.h> |
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | 24 | ||
25 | #define USTORE_ADDRESS 0x000 | 25 | #define USTORE_ADDRESS 0x000 |
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index a45ed1687a59..a19bc4a6196d 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
@@ -22,22 +22,21 @@ | |||
22 | #include <linux/list.h> | 22 | #include <linux/list.h> |
23 | 23 | ||
24 | #include <asm/io.h> | 24 | #include <asm/io.h> |
25 | #include <asm/irq.h> | ||
26 | #include <asm/mach/irq.h> | 25 | #include <asm/mach/irq.h> |
27 | #include <asm/hardware/vic.h> | 26 | #include <asm/hardware/vic.h> |
28 | 27 | ||
29 | static void __iomem *vic_base; | ||
30 | |||
31 | static void vic_mask_irq(unsigned int irq) | 28 | static void vic_mask_irq(unsigned int irq) |
32 | { | 29 | { |
33 | irq -= IRQ_VIC_START; | 30 | void __iomem *base = get_irq_chipdata(irq); |
34 | writel(1 << irq, vic_base + VIC_INT_ENABLE_CLEAR); | 31 | irq &= 31; |
32 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); | ||
35 | } | 33 | } |
36 | 34 | ||
37 | static void vic_unmask_irq(unsigned int irq) | 35 | static void vic_unmask_irq(unsigned int irq) |
38 | { | 36 | { |
39 | irq -= IRQ_VIC_START; | 37 | void __iomem *base = get_irq_chipdata(irq); |
40 | writel(1 << irq, vic_base + VIC_INT_ENABLE); | 38 | irq &= 31; |
39 | writel(1 << irq, base + VIC_INT_ENABLE); | ||
41 | } | 40 | } |
42 | 41 | ||
43 | static struct irqchip vic_chip = { | 42 | static struct irqchip vic_chip = { |
@@ -46,43 +45,49 @@ static struct irqchip vic_chip = { | |||
46 | .unmask = vic_unmask_irq, | 45 | .unmask = vic_unmask_irq, |
47 | }; | 46 | }; |
48 | 47 | ||
49 | void __init vic_init(void __iomem *base, u32 vic_sources) | 48 | /** |
49 | * vic_init - initialise a vectored interrupt controller | ||
50 | * @base: iomem base address | ||
51 | * @irq_start: starting interrupt number, must be muliple of 32 | ||
52 | * @vic_sources: bitmask of interrupt sources to allow | ||
53 | */ | ||
54 | void __init vic_init(void __iomem *base, unsigned int irq_start, | ||
55 | u32 vic_sources) | ||
50 | { | 56 | { |
51 | unsigned int i; | 57 | unsigned int i; |
52 | 58 | ||
53 | vic_base = base; | ||
54 | |||
55 | /* Disable all interrupts initially. */ | 59 | /* Disable all interrupts initially. */ |
56 | 60 | ||
57 | writel(0, vic_base + VIC_INT_SELECT); | 61 | writel(0, base + VIC_INT_SELECT); |
58 | writel(0, vic_base + VIC_INT_ENABLE); | 62 | writel(0, base + VIC_INT_ENABLE); |
59 | writel(~0, vic_base + VIC_INT_ENABLE_CLEAR); | 63 | writel(~0, base + VIC_INT_ENABLE_CLEAR); |
60 | writel(0, vic_base + VIC_IRQ_STATUS); | 64 | writel(0, base + VIC_IRQ_STATUS); |
61 | writel(0, vic_base + VIC_ITCR); | 65 | writel(0, base + VIC_ITCR); |
62 | writel(~0, vic_base + VIC_INT_SOFT_CLEAR); | 66 | writel(~0, base + VIC_INT_SOFT_CLEAR); |
63 | 67 | ||
64 | /* | 68 | /* |
65 | * Make sure we clear all existing interrupts | 69 | * Make sure we clear all existing interrupts |
66 | */ | 70 | */ |
67 | writel(0, vic_base + VIC_VECT_ADDR); | 71 | writel(0, base + VIC_VECT_ADDR); |
68 | for (i = 0; i < 19; i++) { | 72 | for (i = 0; i < 19; i++) { |
69 | unsigned int value; | 73 | unsigned int value; |
70 | 74 | ||
71 | value = readl(vic_base + VIC_VECT_ADDR); | 75 | value = readl(base + VIC_VECT_ADDR); |
72 | writel(value, vic_base + VIC_VECT_ADDR); | 76 | writel(value, base + VIC_VECT_ADDR); |
73 | } | 77 | } |
74 | 78 | ||
75 | for (i = 0; i < 16; i++) { | 79 | for (i = 0; i < 16; i++) { |
76 | void __iomem *reg = vic_base + VIC_VECT_CNTL0 + (i * 4); | 80 | void __iomem *reg = base + VIC_VECT_CNTL0 + (i * 4); |
77 | writel(VIC_VECT_CNTL_ENABLE | i, reg); | 81 | writel(VIC_VECT_CNTL_ENABLE | i, reg); |
78 | } | 82 | } |
79 | 83 | ||
80 | writel(32, vic_base + VIC_DEF_VECT_ADDR); | 84 | writel(32, base + VIC_DEF_VECT_ADDR); |
81 | 85 | ||
82 | for (i = 0; i < 32; i++) { | 86 | for (i = 0; i < 32; i++) { |
83 | unsigned int irq = IRQ_VIC_START + i; | 87 | unsigned int irq = irq_start + i; |
84 | 88 | ||
85 | set_irq_chip(irq, &vic_chip); | 89 | set_irq_chip(irq, &vic_chip); |
90 | set_irq_chipdata(irq, base); | ||
86 | 91 | ||
87 | if (vic_sources & (1 << i)) { | 92 | if (vic_sources & (1 << i)) { |
88 | set_irq_handler(irq, do_level_IRQ); | 93 | set_irq_handler(irq, do_level_IRQ); |
diff --git a/arch/arm/configs/enp2611_defconfig b/arch/arm/configs/ep93xx_defconfig index 5fdaf3ce9d56..8dcc8e8ec813 100644 --- a/arch/arm/configs/enp2611_defconfig +++ b/arch/arm/configs/ep93xx_defconfig | |||
@@ -1,11 +1,10 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.14-git13 | 3 | # Linux kernel version: 2.6.16 |
4 | # Thu Nov 10 15:12:48 2005 | 4 | # Mon Mar 20 14:54:51 2006 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
8 | CONFIG_UID16=y | ||
9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 9 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
11 | 10 | ||
@@ -13,7 +12,6 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y | |||
13 | # Code maturity level options | 12 | # Code maturity level options |
14 | # | 13 | # |
15 | CONFIG_EXPERIMENTAL=y | 14 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | 15 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 16 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
19 | 17 | ||
@@ -25,38 +23,42 @@ CONFIG_LOCALVERSION_AUTO=y | |||
25 | CONFIG_SWAP=y | 23 | CONFIG_SWAP=y |
26 | CONFIG_SYSVIPC=y | 24 | CONFIG_SYSVIPC=y |
27 | # CONFIG_POSIX_MQUEUE is not set | 25 | # CONFIG_POSIX_MQUEUE is not set |
28 | CONFIG_BSD_PROCESS_ACCT=y | 26 | # CONFIG_BSD_PROCESS_ACCT is not set |
29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
30 | CONFIG_SYSCTL=y | 27 | CONFIG_SYSCTL=y |
31 | # CONFIG_AUDIT is not set | 28 | # CONFIG_AUDIT is not set |
32 | # CONFIG_HOTPLUG is not set | 29 | CONFIG_IKCONFIG=y |
33 | CONFIG_KOBJECT_UEVENT=y | 30 | CONFIG_IKCONFIG_PROC=y |
34 | # CONFIG_IKCONFIG is not set | ||
35 | CONFIG_INITRAMFS_SOURCE="" | 31 | CONFIG_INITRAMFS_SOURCE="" |
32 | CONFIG_UID16=y | ||
33 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
36 | CONFIG_EMBEDDED=y | 34 | CONFIG_EMBEDDED=y |
37 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
38 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
39 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_HOTPLUG=y | ||
40 | CONFIG_PRINTK=y | 39 | CONFIG_PRINTK=y |
41 | CONFIG_BUG=y | 40 | CONFIG_BUG=y |
41 | CONFIG_ELF_CORE=y | ||
42 | CONFIG_BASE_FULL=y | 42 | CONFIG_BASE_FULL=y |
43 | CONFIG_FUTEX=y | 43 | CONFIG_FUTEX=y |
44 | CONFIG_EPOLL=y | 44 | CONFIG_EPOLL=y |
45 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
46 | CONFIG_SHMEM=y | 45 | CONFIG_SHMEM=y |
47 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 46 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
48 | CONFIG_CC_ALIGN_LABELS=0 | 47 | CONFIG_CC_ALIGN_LABELS=0 |
49 | CONFIG_CC_ALIGN_LOOPS=0 | 48 | CONFIG_CC_ALIGN_LOOPS=0 |
50 | CONFIG_CC_ALIGN_JUMPS=0 | 49 | CONFIG_CC_ALIGN_JUMPS=0 |
50 | CONFIG_SLAB=y | ||
51 | # CONFIG_TINY_SHMEM is not set | 51 | # CONFIG_TINY_SHMEM is not set |
52 | CONFIG_BASE_SMALL=0 | 52 | CONFIG_BASE_SMALL=0 |
53 | # CONFIG_SLOB is not set | ||
54 | CONFIG_OBSOLETE_INTERMODULE=y | ||
53 | 55 | ||
54 | # | 56 | # |
55 | # Loadable module support | 57 | # Loadable module support |
56 | # | 58 | # |
57 | CONFIG_MODULES=y | 59 | CONFIG_MODULES=y |
58 | CONFIG_MODULE_UNLOAD=y | 60 | CONFIG_MODULE_UNLOAD=y |
59 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 61 | CONFIG_MODULE_FORCE_UNLOAD=y |
60 | CONFIG_OBSOLETE_MODPARM=y | 62 | CONFIG_OBSOLETE_MODPARM=y |
61 | # CONFIG_MODVERSIONS is not set | 63 | # CONFIG_MODVERSIONS is not set |
62 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 64 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
@@ -70,14 +72,14 @@ CONFIG_KMOD=y | |||
70 | # IO Schedulers | 72 | # IO Schedulers |
71 | # | 73 | # |
72 | CONFIG_IOSCHED_NOOP=y | 74 | CONFIG_IOSCHED_NOOP=y |
73 | CONFIG_IOSCHED_AS=y | 75 | # CONFIG_IOSCHED_AS is not set |
74 | CONFIG_IOSCHED_DEADLINE=y | 76 | CONFIG_IOSCHED_DEADLINE=y |
75 | CONFIG_IOSCHED_CFQ=y | 77 | # CONFIG_IOSCHED_CFQ is not set |
76 | CONFIG_DEFAULT_AS=y | 78 | # CONFIG_DEFAULT_AS is not set |
77 | # CONFIG_DEFAULT_DEADLINE is not set | 79 | CONFIG_DEFAULT_DEADLINE=y |
78 | # CONFIG_DEFAULT_CFQ is not set | 80 | # CONFIG_DEFAULT_CFQ is not set |
79 | # CONFIG_DEFAULT_NOOP is not set | 81 | # CONFIG_DEFAULT_NOOP is not set |
80 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 82 | CONFIG_DEFAULT_IOSCHED="deadline" |
81 | 83 | ||
82 | # | 84 | # |
83 | # System Type | 85 | # System Type |
@@ -86,11 +88,12 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
86 | # CONFIG_ARCH_CLPS711X is not set | 88 | # CONFIG_ARCH_CLPS711X is not set |
87 | # CONFIG_ARCH_CO285 is not set | 89 | # CONFIG_ARCH_CO285 is not set |
88 | # CONFIG_ARCH_EBSA110 is not set | 90 | # CONFIG_ARCH_EBSA110 is not set |
91 | CONFIG_ARCH_EP93XX=y | ||
89 | # CONFIG_ARCH_FOOTBRIDGE is not set | 92 | # CONFIG_ARCH_FOOTBRIDGE is not set |
90 | # CONFIG_ARCH_INTEGRATOR is not set | 93 | # CONFIG_ARCH_INTEGRATOR is not set |
91 | # CONFIG_ARCH_IOP3XX is not set | 94 | # CONFIG_ARCH_IOP3XX is not set |
92 | # CONFIG_ARCH_IXP4XX is not set | 95 | # CONFIG_ARCH_IXP4XX is not set |
93 | CONFIG_ARCH_IXP2000=y | 96 | # CONFIG_ARCH_IXP2000 is not set |
94 | # CONFIG_ARCH_L7200 is not set | 97 | # CONFIG_ARCH_L7200 is not set |
95 | # CONFIG_ARCH_PXA is not set | 98 | # CONFIG_ARCH_PXA is not set |
96 | # CONFIG_ARCH_RPC is not set | 99 | # CONFIG_ARCH_RPC is not set |
@@ -104,46 +107,44 @@ CONFIG_ARCH_IXP2000=y | |||
104 | # CONFIG_ARCH_IMX is not set | 107 | # CONFIG_ARCH_IMX is not set |
105 | # CONFIG_ARCH_H720X is not set | 108 | # CONFIG_ARCH_H720X is not set |
106 | # CONFIG_ARCH_AAEC2000 is not set | 109 | # CONFIG_ARCH_AAEC2000 is not set |
107 | CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y | 110 | # CONFIG_ARCH_AT91RM9200 is not set |
108 | 111 | ||
109 | # | 112 | # |
110 | # Intel IXP2400/2800 Implementation Options | 113 | # Cirrus EP93xx Implementation Options |
111 | # | 114 | # |
115 | CONFIG_CRUNCH=y | ||
112 | 116 | ||
113 | # | 117 | # |
114 | # IXP2400/2800 Platforms | 118 | # EP93xx Platforms |
115 | # | 119 | # |
116 | CONFIG_ARCH_ENP2611=y | 120 | CONFIG_MACH_GESBC9312=y |
117 | # CONFIG_ARCH_IXDP2400 is not set | 121 | CONFIG_MACH_TS72XX=y |
118 | # CONFIG_ARCH_IXDP2800 is not set | ||
119 | # CONFIG_ARCH_IXDP2401 is not set | ||
120 | # CONFIG_ARCH_IXDP2801 is not set | ||
121 | # CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set | ||
122 | 122 | ||
123 | # | 123 | # |
124 | # Processor Type | 124 | # Processor Type |
125 | # | 125 | # |
126 | CONFIG_CPU_32=y | 126 | CONFIG_CPU_32=y |
127 | CONFIG_CPU_XSCALE=y | 127 | CONFIG_CPU_ARM920T=y |
128 | CONFIG_CPU_32v5=y | 128 | CONFIG_CPU_32v4=y |
129 | CONFIG_CPU_ABRT_EV5T=y | 129 | CONFIG_CPU_ABRT_EV4T=y |
130 | CONFIG_CPU_CACHE_V4WT=y | ||
130 | CONFIG_CPU_CACHE_VIVT=y | 131 | CONFIG_CPU_CACHE_VIVT=y |
132 | CONFIG_CPU_COPY_V4WB=y | ||
131 | CONFIG_CPU_TLB_V4WBI=y | 133 | CONFIG_CPU_TLB_V4WBI=y |
132 | 134 | ||
133 | # | 135 | # |
134 | # Processor Features | 136 | # Processor Features |
135 | # | 137 | # |
136 | # CONFIG_ARM_THUMB is not set | 138 | CONFIG_ARM_THUMB=y |
137 | CONFIG_CPU_BIG_ENDIAN=y | 139 | # CONFIG_CPU_ICACHE_DISABLE is not set |
138 | CONFIG_XSCALE_PMU=y | 140 | # CONFIG_CPU_DCACHE_DISABLE is not set |
141 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
142 | CONFIG_ARM_VIC=y | ||
139 | 143 | ||
140 | # | 144 | # |
141 | # Bus support | 145 | # Bus support |
142 | # | 146 | # |
143 | CONFIG_ISA_DMA_API=y | 147 | CONFIG_ARM_AMBA=y |
144 | CONFIG_PCI=y | ||
145 | CONFIG_PCI_LEGACY_PROC=y | ||
146 | # CONFIG_PCI_DEBUG is not set | ||
147 | 148 | ||
148 | # | 149 | # |
149 | # PCCARD (PCMCIA/CardBus) support | 150 | # PCCARD (PCMCIA/CardBus) support |
@@ -155,6 +156,8 @@ CONFIG_PCI_LEGACY_PROC=y | |||
155 | # | 156 | # |
156 | # CONFIG_PREEMPT is not set | 157 | # CONFIG_PREEMPT is not set |
157 | # CONFIG_NO_IDLE_HZ is not set | 158 | # CONFIG_NO_IDLE_HZ is not set |
159 | CONFIG_HZ=100 | ||
160 | # CONFIG_AEABI is not set | ||
158 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 161 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set |
159 | CONFIG_SELECT_MEMORY_MODEL=y | 162 | CONFIG_SELECT_MEMORY_MODEL=y |
160 | CONFIG_FLATMEM_MANUAL=y | 163 | CONFIG_FLATMEM_MANUAL=y |
@@ -171,7 +174,7 @@ CONFIG_ALIGNMENT_TRAP=y | |||
171 | # | 174 | # |
172 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 175 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
173 | CONFIG_ZBOOT_ROM_BSS=0x0 | 176 | CONFIG_ZBOOT_ROM_BSS=0x0 |
174 | CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0" | 177 | CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/nfs ip=bootp" |
175 | # CONFIG_XIP_KERNEL is not set | 178 | # CONFIG_XIP_KERNEL is not set |
176 | 179 | ||
177 | # | 180 | # |
@@ -197,6 +200,7 @@ CONFIG_BINFMT_ELF=y | |||
197 | # Power management options | 200 | # Power management options |
198 | # | 201 | # |
199 | # CONFIG_PM is not set | 202 | # CONFIG_PM is not set |
203 | # CONFIG_APM is not set | ||
200 | 204 | ||
201 | # | 205 | # |
202 | # Networking | 206 | # Networking |
@@ -206,10 +210,13 @@ CONFIG_NET=y | |||
206 | # | 210 | # |
207 | # Networking options | 211 | # Networking options |
208 | # | 212 | # |
213 | # CONFIG_NETDEBUG is not set | ||
209 | CONFIG_PACKET=y | 214 | CONFIG_PACKET=y |
210 | CONFIG_PACKET_MMAP=y | 215 | CONFIG_PACKET_MMAP=y |
211 | CONFIG_UNIX=y | 216 | CONFIG_UNIX=y |
212 | # CONFIG_NET_KEY is not set | 217 | CONFIG_XFRM=y |
218 | # CONFIG_XFRM_USER is not set | ||
219 | CONFIG_NET_KEY=y | ||
213 | CONFIG_INET=y | 220 | CONFIG_INET=y |
214 | # CONFIG_IP_MULTICAST is not set | 221 | # CONFIG_IP_MULTICAST is not set |
215 | # CONFIG_IP_ADVANCED_ROUTER is not set | 222 | # CONFIG_IP_ADVANCED_ROUTER is not set |
@@ -242,6 +249,11 @@ CONFIG_TCP_CONG_BIC=y | |||
242 | # SCTP Configuration (EXPERIMENTAL) | 249 | # SCTP Configuration (EXPERIMENTAL) |
243 | # | 250 | # |
244 | # CONFIG_IP_SCTP is not set | 251 | # CONFIG_IP_SCTP is not set |
252 | |||
253 | # | ||
254 | # TIPC Configuration (EXPERIMENTAL) | ||
255 | # | ||
256 | # CONFIG_TIPC is not set | ||
245 | # CONFIG_ATM is not set | 257 | # CONFIG_ATM is not set |
246 | # CONFIG_BRIDGE is not set | 258 | # CONFIG_BRIDGE is not set |
247 | # CONFIG_VLAN_8021Q is not set | 259 | # CONFIG_VLAN_8021Q is not set |
@@ -259,7 +271,6 @@ CONFIG_TCP_CONG_BIC=y | |||
259 | # QoS and/or fair queueing | 271 | # QoS and/or fair queueing |
260 | # | 272 | # |
261 | # CONFIG_NET_SCHED is not set | 273 | # CONFIG_NET_SCHED is not set |
262 | # CONFIG_NET_CLS_ROUTE is not set | ||
263 | 274 | ||
264 | # | 275 | # |
265 | # Network testing | 276 | # Network testing |
@@ -278,21 +289,26 @@ CONFIG_TCP_CONG_BIC=y | |||
278 | # Generic Driver Options | 289 | # Generic Driver Options |
279 | # | 290 | # |
280 | CONFIG_STANDALONE=y | 291 | CONFIG_STANDALONE=y |
281 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 292 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
282 | # CONFIG_FW_LOADER is not set | 293 | # CONFIG_FW_LOADER is not set |
283 | # CONFIG_DEBUG_DRIVER is not set | 294 | # CONFIG_DEBUG_DRIVER is not set |
284 | 295 | ||
285 | # | 296 | # |
297 | # Connector - unified userspace <-> kernelspace linker | ||
298 | # | ||
299 | # CONFIG_CONNECTOR is not set | ||
300 | |||
301 | # | ||
286 | # Memory Technology Devices (MTD) | 302 | # Memory Technology Devices (MTD) |
287 | # | 303 | # |
288 | CONFIG_MTD=y | 304 | CONFIG_MTD=y |
289 | # CONFIG_MTD_DEBUG is not set | 305 | # CONFIG_MTD_DEBUG is not set |
290 | # CONFIG_MTD_CONCAT is not set | 306 | CONFIG_MTD_CONCAT=y |
291 | CONFIG_MTD_PARTITIONS=y | 307 | CONFIG_MTD_PARTITIONS=y |
292 | CONFIG_MTD_REDBOOT_PARTS=y | 308 | CONFIG_MTD_REDBOOT_PARTS=y |
293 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | 309 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 |
294 | CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y | 310 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set |
295 | CONFIG_MTD_REDBOOT_PARTS_READONLY=y | 311 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set |
296 | # CONFIG_MTD_CMDLINE_PARTS is not set | 312 | # CONFIG_MTD_CMDLINE_PARTS is not set |
297 | # CONFIG_MTD_AFS_PARTS is not set | 313 | # CONFIG_MTD_AFS_PARTS is not set |
298 | 314 | ||
@@ -312,7 +328,11 @@ CONFIG_MTD_BLOCK=y | |||
312 | CONFIG_MTD_CFI=y | 328 | CONFIG_MTD_CFI=y |
313 | # CONFIG_MTD_JEDECPROBE is not set | 329 | # CONFIG_MTD_JEDECPROBE is not set |
314 | CONFIG_MTD_GEN_PROBE=y | 330 | CONFIG_MTD_GEN_PROBE=y |
315 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | 331 | CONFIG_MTD_CFI_ADV_OPTIONS=y |
332 | CONFIG_MTD_CFI_NOSWAP=y | ||
333 | # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set | ||
334 | # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set | ||
335 | # CONFIG_MTD_CFI_GEOMETRY is not set | ||
316 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | 336 | CONFIG_MTD_MAP_BANK_WIDTH_1=y |
317 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | 337 | CONFIG_MTD_MAP_BANK_WIDTH_2=y |
318 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | 338 | CONFIG_MTD_MAP_BANK_WIDTH_4=y |
@@ -323,29 +343,31 @@ CONFIG_MTD_CFI_I1=y | |||
323 | CONFIG_MTD_CFI_I2=y | 343 | CONFIG_MTD_CFI_I2=y |
324 | # CONFIG_MTD_CFI_I4 is not set | 344 | # CONFIG_MTD_CFI_I4 is not set |
325 | # CONFIG_MTD_CFI_I8 is not set | 345 | # CONFIG_MTD_CFI_I8 is not set |
346 | # CONFIG_MTD_OTP is not set | ||
326 | CONFIG_MTD_CFI_INTELEXT=y | 347 | CONFIG_MTD_CFI_INTELEXT=y |
327 | # CONFIG_MTD_CFI_AMDSTD is not set | 348 | CONFIG_MTD_CFI_AMDSTD=y |
328 | # CONFIG_MTD_CFI_STAA is not set | 349 | CONFIG_MTD_CFI_AMDSTD_RETRY=0 |
350 | CONFIG_MTD_CFI_STAA=y | ||
329 | CONFIG_MTD_CFI_UTIL=y | 351 | CONFIG_MTD_CFI_UTIL=y |
330 | # CONFIG_MTD_RAM is not set | 352 | # CONFIG_MTD_RAM is not set |
331 | # CONFIG_MTD_ROM is not set | 353 | CONFIG_MTD_ROM=y |
332 | # CONFIG_MTD_ABSENT is not set | 354 | # CONFIG_MTD_ABSENT is not set |
333 | # CONFIG_MTD_XIP is not set | 355 | # CONFIG_MTD_OBSOLETE_CHIPS is not set |
334 | 356 | ||
335 | # | 357 | # |
336 | # Mapping drivers for chip access | 358 | # Mapping drivers for chip access |
337 | # | 359 | # |
338 | CONFIG_MTD_COMPLEX_MAPPINGS=y | 360 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set |
339 | # CONFIG_MTD_PHYSMAP is not set | 361 | CONFIG_MTD_PHYSMAP=y |
362 | CONFIG_MTD_PHYSMAP_START=0x0 | ||
363 | CONFIG_MTD_PHYSMAP_LEN=0x0 | ||
364 | CONFIG_MTD_PHYSMAP_BANKWIDTH=1 | ||
340 | # CONFIG_MTD_ARM_INTEGRATOR is not set | 365 | # CONFIG_MTD_ARM_INTEGRATOR is not set |
341 | CONFIG_MTD_IXP2000=y | ||
342 | # CONFIG_MTD_PCI is not set | ||
343 | # CONFIG_MTD_PLATRAM is not set | 366 | # CONFIG_MTD_PLATRAM is not set |
344 | 367 | ||
345 | # | 368 | # |
346 | # Self-contained MTD device drivers | 369 | # Self-contained MTD device drivers |
347 | # | 370 | # |
348 | # CONFIG_MTD_PMC551 is not set | ||
349 | # CONFIG_MTD_SLRAM is not set | 371 | # CONFIG_MTD_SLRAM is not set |
350 | # CONFIG_MTD_PHRAM is not set | 372 | # CONFIG_MTD_PHRAM is not set |
351 | # CONFIG_MTD_MTDRAM is not set | 373 | # CONFIG_MTD_MTDRAM is not set |
@@ -362,7 +384,11 @@ CONFIG_MTD_IXP2000=y | |||
362 | # | 384 | # |
363 | # NAND Flash Device Drivers | 385 | # NAND Flash Device Drivers |
364 | # | 386 | # |
365 | # CONFIG_MTD_NAND is not set | 387 | CONFIG_MTD_NAND=y |
388 | CONFIG_MTD_NAND_VERIFY_WRITE=y | ||
389 | CONFIG_MTD_NAND_IDS=y | ||
390 | # CONFIG_MTD_NAND_DISKONCHIP is not set | ||
391 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
366 | 392 | ||
367 | # | 393 | # |
368 | # OneNAND Flash Device Drivers | 394 | # OneNAND Flash Device Drivers |
@@ -381,19 +407,12 @@ CONFIG_MTD_IXP2000=y | |||
381 | # | 407 | # |
382 | # Block devices | 408 | # Block devices |
383 | # | 409 | # |
384 | # CONFIG_BLK_CPQ_DA is not set | ||
385 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
386 | # CONFIG_BLK_DEV_DAC960 is not set | ||
387 | # CONFIG_BLK_DEV_UMEM is not set | ||
388 | # CONFIG_BLK_DEV_COW_COMMON is not set | 410 | # CONFIG_BLK_DEV_COW_COMMON is not set |
389 | CONFIG_BLK_DEV_LOOP=y | 411 | # CONFIG_BLK_DEV_LOOP is not set |
390 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
391 | # CONFIG_BLK_DEV_NBD is not set | 412 | # CONFIG_BLK_DEV_NBD is not set |
392 | # CONFIG_BLK_DEV_SX8 is not set | 413 | # CONFIG_BLK_DEV_UB is not set |
393 | CONFIG_BLK_DEV_RAM=y | 414 | # CONFIG_BLK_DEV_RAM is not set |
394 | CONFIG_BLK_DEV_RAM_COUNT=16 | 415 | CONFIG_BLK_DEV_RAM_COUNT=16 |
395 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
396 | CONFIG_BLK_DEV_INITRD=y | ||
397 | # CONFIG_CDROM_PKTCDVD is not set | 416 | # CONFIG_CDROM_PKTCDVD is not set |
398 | # CONFIG_ATA_OVER_ETH is not set | 417 | # CONFIG_ATA_OVER_ETH is not set |
399 | 418 | ||
@@ -401,7 +420,40 @@ CONFIG_BLK_DEV_INITRD=y | |||
401 | # SCSI device support | 420 | # SCSI device support |
402 | # | 421 | # |
403 | # CONFIG_RAID_ATTRS is not set | 422 | # CONFIG_RAID_ATTRS is not set |
404 | # CONFIG_SCSI is not set | 423 | CONFIG_SCSI=y |
424 | # CONFIG_SCSI_PROC_FS is not set | ||
425 | |||
426 | # | ||
427 | # SCSI support type (disk, tape, CD-ROM) | ||
428 | # | ||
429 | CONFIG_BLK_DEV_SD=y | ||
430 | # CONFIG_CHR_DEV_ST is not set | ||
431 | # CONFIG_CHR_DEV_OSST is not set | ||
432 | # CONFIG_BLK_DEV_SR is not set | ||
433 | # CONFIG_CHR_DEV_SG is not set | ||
434 | # CONFIG_CHR_DEV_SCH is not set | ||
435 | |||
436 | # | ||
437 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
438 | # | ||
439 | # CONFIG_SCSI_MULTI_LUN is not set | ||
440 | # CONFIG_SCSI_CONSTANTS is not set | ||
441 | # CONFIG_SCSI_LOGGING is not set | ||
442 | |||
443 | # | ||
444 | # SCSI Transport Attributes | ||
445 | # | ||
446 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
447 | # CONFIG_SCSI_FC_ATTRS is not set | ||
448 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
449 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
450 | |||
451 | # | ||
452 | # SCSI low-level drivers | ||
453 | # | ||
454 | # CONFIG_ISCSI_TCP is not set | ||
455 | # CONFIG_SCSI_SATA is not set | ||
456 | # CONFIG_SCSI_DEBUG is not set | ||
405 | 457 | ||
406 | # | 458 | # |
407 | # Multi-device support (RAID and LVM) | 459 | # Multi-device support (RAID and LVM) |
@@ -416,28 +468,21 @@ CONFIG_BLK_DEV_INITRD=y | |||
416 | # | 468 | # |
417 | # IEEE 1394 (FireWire) support | 469 | # IEEE 1394 (FireWire) support |
418 | # | 470 | # |
419 | # CONFIG_IEEE1394 is not set | ||
420 | 471 | ||
421 | # | 472 | # |
422 | # I2O device support | 473 | # I2O device support |
423 | # | 474 | # |
424 | # CONFIG_I2O is not set | ||
425 | 475 | ||
426 | # | 476 | # |
427 | # Network device support | 477 | # Network device support |
428 | # | 478 | # |
429 | CONFIG_NETDEVICES=y | 479 | CONFIG_NETDEVICES=y |
430 | CONFIG_DUMMY=y | 480 | # CONFIG_DUMMY is not set |
431 | # CONFIG_BONDING is not set | 481 | # CONFIG_BONDING is not set |
432 | # CONFIG_EQUALIZER is not set | 482 | # CONFIG_EQUALIZER is not set |
433 | # CONFIG_TUN is not set | 483 | # CONFIG_TUN is not set |
434 | 484 | ||
435 | # | 485 | # |
436 | # ARCnet devices | ||
437 | # | ||
438 | # CONFIG_ARCNET is not set | ||
439 | |||
440 | # | ||
441 | # PHY device support | 486 | # PHY device support |
442 | # | 487 | # |
443 | # CONFIG_PHYLIB is not set | 488 | # CONFIG_PHYLIB is not set |
@@ -447,66 +492,20 @@ CONFIG_DUMMY=y | |||
447 | # | 492 | # |
448 | CONFIG_NET_ETHERNET=y | 493 | CONFIG_NET_ETHERNET=y |
449 | CONFIG_MII=y | 494 | CONFIG_MII=y |
450 | # CONFIG_HAPPYMEAL is not set | ||
451 | # CONFIG_SUNGEM is not set | ||
452 | # CONFIG_CASSINI is not set | ||
453 | # CONFIG_NET_VENDOR_3COM is not set | ||
454 | # CONFIG_SMC91X is not set | 495 | # CONFIG_SMC91X is not set |
455 | # CONFIG_DM9000 is not set | 496 | # CONFIG_DM9000 is not set |
456 | 497 | ||
457 | # | 498 | # |
458 | # Tulip family network device support | ||
459 | # | ||
460 | # CONFIG_NET_TULIP is not set | ||
461 | # CONFIG_HP100 is not set | ||
462 | CONFIG_NET_PCI=y | ||
463 | # CONFIG_PCNET32 is not set | ||
464 | # CONFIG_AMD8111_ETH is not set | ||
465 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
466 | # CONFIG_B44 is not set | ||
467 | # CONFIG_FORCEDETH is not set | ||
468 | # CONFIG_DGRS is not set | ||
469 | CONFIG_EEPRO100=y | ||
470 | # CONFIG_E100 is not set | ||
471 | # CONFIG_FEALNX is not set | ||
472 | # CONFIG_NATSEMI is not set | ||
473 | # CONFIG_NE2K_PCI is not set | ||
474 | # CONFIG_8139CP is not set | ||
475 | # CONFIG_8139TOO is not set | ||
476 | # CONFIG_SIS900 is not set | ||
477 | # CONFIG_EPIC100 is not set | ||
478 | # CONFIG_SUNDANCE is not set | ||
479 | # CONFIG_TLAN is not set | ||
480 | # CONFIG_VIA_RHINE is not set | ||
481 | |||
482 | # | ||
483 | # Ethernet (1000 Mbit) | 499 | # Ethernet (1000 Mbit) |
484 | # | 500 | # |
485 | # CONFIG_ACENIC is not set | ||
486 | # CONFIG_DL2K is not set | ||
487 | # CONFIG_E1000 is not set | ||
488 | # CONFIG_NS83820 is not set | ||
489 | # CONFIG_HAMACHI is not set | ||
490 | # CONFIG_YELLOWFIN is not set | ||
491 | # CONFIG_R8169 is not set | ||
492 | # CONFIG_SIS190 is not set | ||
493 | # CONFIG_SKGE is not set | ||
494 | # CONFIG_SK98LIN is not set | ||
495 | # CONFIG_VIA_VELOCITY is not set | ||
496 | # CONFIG_TIGON3 is not set | ||
497 | # CONFIG_BNX2 is not set | ||
498 | 501 | ||
499 | # | 502 | # |
500 | # Ethernet (10000 Mbit) | 503 | # Ethernet (10000 Mbit) |
501 | # | 504 | # |
502 | # CONFIG_CHELSIO_T1 is not set | ||
503 | # CONFIG_IXGB is not set | ||
504 | # CONFIG_S2IO is not set | ||
505 | 505 | ||
506 | # | 506 | # |
507 | # Token Ring devices | 507 | # Token Ring devices |
508 | # | 508 | # |
509 | # CONFIG_TR is not set | ||
510 | 509 | ||
511 | # | 510 | # |
512 | # Wireless LAN (non-hamradio) | 511 | # Wireless LAN (non-hamradio) |
@@ -516,29 +515,7 @@ CONFIG_EEPRO100=y | |||
516 | # | 515 | # |
517 | # Wan interfaces | 516 | # Wan interfaces |
518 | # | 517 | # |
519 | CONFIG_WAN=y | 518 | # CONFIG_WAN is not set |
520 | # CONFIG_DSCC4 is not set | ||
521 | # CONFIG_LANMEDIA is not set | ||
522 | # CONFIG_SYNCLINK_SYNCPPP is not set | ||
523 | CONFIG_HDLC=y | ||
524 | CONFIG_HDLC_RAW=y | ||
525 | # CONFIG_HDLC_RAW_ETH is not set | ||
526 | CONFIG_HDLC_CISCO=y | ||
527 | CONFIG_HDLC_FR=y | ||
528 | CONFIG_HDLC_PPP=y | ||
529 | |||
530 | # | ||
531 | # X.25/LAPB support is disabled | ||
532 | # | ||
533 | # CONFIG_PCI200SYN is not set | ||
534 | # CONFIG_WANXL is not set | ||
535 | # CONFIG_PC300 is not set | ||
536 | # CONFIG_FARSYNC is not set | ||
537 | CONFIG_DLCI=y | ||
538 | CONFIG_DLCI_COUNT=24 | ||
539 | CONFIG_DLCI_MAX=8 | ||
540 | # CONFIG_FDDI is not set | ||
541 | # CONFIG_HIPPI is not set | ||
542 | # CONFIG_PPP is not set | 519 | # CONFIG_PPP is not set |
543 | # CONFIG_SLIP is not set | 520 | # CONFIG_SLIP is not set |
544 | # CONFIG_SHAPER is not set | 521 | # CONFIG_SHAPER is not set |
@@ -554,28 +531,7 @@ CONFIG_DLCI_MAX=8 | |||
554 | # | 531 | # |
555 | # Input device support | 532 | # Input device support |
556 | # | 533 | # |
557 | CONFIG_INPUT=y | 534 | # CONFIG_INPUT is not set |
558 | |||
559 | # | ||
560 | # Userland interfaces | ||
561 | # | ||
562 | CONFIG_INPUT_MOUSEDEV=y | ||
563 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
564 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
565 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
566 | # CONFIG_INPUT_JOYDEV is not set | ||
567 | # CONFIG_INPUT_TSDEV is not set | ||
568 | # CONFIG_INPUT_EVDEV is not set | ||
569 | # CONFIG_INPUT_EVBUG is not set | ||
570 | |||
571 | # | ||
572 | # Input Device Drivers | ||
573 | # | ||
574 | # CONFIG_INPUT_KEYBOARD is not set | ||
575 | # CONFIG_INPUT_MOUSE is not set | ||
576 | # CONFIG_INPUT_JOYSTICK is not set | ||
577 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
578 | # CONFIG_INPUT_MISC is not set | ||
579 | 535 | ||
580 | # | 536 | # |
581 | # Hardware I/O ports | 537 | # Hardware I/O ports |
@@ -592,20 +548,18 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
592 | # | 548 | # |
593 | # Serial drivers | 549 | # Serial drivers |
594 | # | 550 | # |
595 | CONFIG_SERIAL_8250=y | 551 | # CONFIG_SERIAL_8250 is not set |
596 | CONFIG_SERIAL_8250_CONSOLE=y | ||
597 | CONFIG_SERIAL_8250_NR_UARTS=2 | ||
598 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
599 | 552 | ||
600 | # | 553 | # |
601 | # Non-8250 serial port support | 554 | # Non-8250 serial port support |
602 | # | 555 | # |
556 | CONFIG_SERIAL_AMBA_PL010=y | ||
557 | CONFIG_SERIAL_AMBA_PL010_CONSOLE=y | ||
558 | # CONFIG_SERIAL_AMBA_PL011 is not set | ||
603 | CONFIG_SERIAL_CORE=y | 559 | CONFIG_SERIAL_CORE=y |
604 | CONFIG_SERIAL_CORE_CONSOLE=y | 560 | CONFIG_SERIAL_CORE_CONSOLE=y |
605 | # CONFIG_SERIAL_JSM is not set | ||
606 | CONFIG_UNIX98_PTYS=y | 561 | CONFIG_UNIX98_PTYS=y |
607 | CONFIG_LEGACY_PTYS=y | 562 | # CONFIG_LEGACY_PTYS is not set |
608 | CONFIG_LEGACY_PTY_COUNT=256 | ||
609 | 563 | ||
610 | # | 564 | # |
611 | # IPMI | 565 | # IPMI |
@@ -622,23 +576,19 @@ CONFIG_WATCHDOG=y | |||
622 | # Watchdog Device Drivers | 576 | # Watchdog Device Drivers |
623 | # | 577 | # |
624 | # CONFIG_SOFT_WATCHDOG is not set | 578 | # CONFIG_SOFT_WATCHDOG is not set |
625 | CONFIG_IXP2000_WATCHDOG=y | ||
626 | 579 | ||
627 | # | 580 | # |
628 | # PCI-based Watchdog Cards | 581 | # USB-based Watchdog Cards |
629 | # | 582 | # |
630 | # CONFIG_PCIPCWATCHDOG is not set | 583 | # CONFIG_USBPCWATCHDOG is not set |
631 | # CONFIG_WDTPCI is not set | ||
632 | # CONFIG_NVRAM is not set | 584 | # CONFIG_NVRAM is not set |
633 | # CONFIG_RTC is not set | 585 | # CONFIG_RTC is not set |
634 | # CONFIG_DTLK is not set | 586 | # CONFIG_DTLK is not set |
635 | # CONFIG_R3964 is not set | 587 | # CONFIG_R3964 is not set |
636 | # CONFIG_APPLICOM is not set | ||
637 | 588 | ||
638 | # | 589 | # |
639 | # Ftape, the floppy tape device driver | 590 | # Ftape, the floppy tape device driver |
640 | # | 591 | # |
641 | # CONFIG_DRM is not set | ||
642 | # CONFIG_RAW_DRIVER is not set | 592 | # CONFIG_RAW_DRIVER is not set |
643 | 593 | ||
644 | # | 594 | # |
@@ -663,27 +613,8 @@ CONFIG_I2C_ALGOBIT=y | |||
663 | # | 613 | # |
664 | # I2C Hardware Bus support | 614 | # I2C Hardware Bus support |
665 | # | 615 | # |
666 | # CONFIG_I2C_ALI1535 is not set | ||
667 | # CONFIG_I2C_ALI1563 is not set | ||
668 | # CONFIG_I2C_ALI15X3 is not set | ||
669 | # CONFIG_I2C_AMD756 is not set | ||
670 | # CONFIG_I2C_AMD8111 is not set | ||
671 | # CONFIG_I2C_I801 is not set | ||
672 | # CONFIG_I2C_I810 is not set | ||
673 | # CONFIG_I2C_PIIX4 is not set | ||
674 | CONFIG_I2C_IXP2000=y | ||
675 | # CONFIG_I2C_NFORCE2 is not set | ||
676 | # CONFIG_I2C_PARPORT_LIGHT is not set | 616 | # CONFIG_I2C_PARPORT_LIGHT is not set |
677 | # CONFIG_I2C_PROSAVAGE is not set | ||
678 | # CONFIG_I2C_SAVAGE4 is not set | ||
679 | # CONFIG_SCx200_ACB is not set | ||
680 | # CONFIG_I2C_SIS5595 is not set | ||
681 | # CONFIG_I2C_SIS630 is not set | ||
682 | # CONFIG_I2C_SIS96X is not set | ||
683 | # CONFIG_I2C_STUB is not set | 617 | # CONFIG_I2C_STUB is not set |
684 | # CONFIG_I2C_VIA is not set | ||
685 | # CONFIG_I2C_VIAPRO is not set | ||
686 | # CONFIG_I2C_VOODOO3 is not set | ||
687 | # CONFIG_I2C_PCA_ISA is not set | 618 | # CONFIG_I2C_PCA_ISA is not set |
688 | 619 | ||
689 | # | 620 | # |
@@ -691,17 +622,28 @@ CONFIG_I2C_IXP2000=y | |||
691 | # | 622 | # |
692 | # CONFIG_SENSORS_DS1337 is not set | 623 | # CONFIG_SENSORS_DS1337 is not set |
693 | # CONFIG_SENSORS_DS1374 is not set | 624 | # CONFIG_SENSORS_DS1374 is not set |
694 | CONFIG_SENSORS_EEPROM=y | 625 | # CONFIG_SENSORS_EEPROM is not set |
695 | # CONFIG_SENSORS_PCF8574 is not set | 626 | # CONFIG_SENSORS_PCF8574 is not set |
696 | # CONFIG_SENSORS_PCA9539 is not set | 627 | # CONFIG_SENSORS_PCA9539 is not set |
697 | # CONFIG_SENSORS_PCF8591 is not set | 628 | # CONFIG_SENSORS_PCF8591 is not set |
698 | # CONFIG_SENSORS_RTC8564 is not set | 629 | # CONFIG_SENSORS_RTC8564 is not set |
699 | # CONFIG_SENSORS_MAX6875 is not set | 630 | # CONFIG_SENSORS_MAX6875 is not set |
700 | # CONFIG_RTC_X1205_I2C is not set | 631 | # CONFIG_RTC_X1205_I2C is not set |
701 | # CONFIG_I2C_DEBUG_CORE is not set | 632 | CONFIG_I2C_DEBUG_CORE=y |
702 | # CONFIG_I2C_DEBUG_ALGO is not set | 633 | CONFIG_I2C_DEBUG_ALGO=y |
703 | # CONFIG_I2C_DEBUG_BUS is not set | 634 | CONFIG_I2C_DEBUG_BUS=y |
704 | # CONFIG_I2C_DEBUG_CHIP is not set | 635 | CONFIG_I2C_DEBUG_CHIP=y |
636 | |||
637 | # | ||
638 | # SPI support | ||
639 | # | ||
640 | # CONFIG_SPI is not set | ||
641 | # CONFIG_SPI_MASTER is not set | ||
642 | |||
643 | # | ||
644 | # Dallas's 1-wire bus | ||
645 | # | ||
646 | # CONFIG_W1 is not set | ||
705 | 647 | ||
706 | # | 648 | # |
707 | # Hardware Monitoring support | 649 | # Hardware Monitoring support |
@@ -716,6 +658,7 @@ CONFIG_HWMON=y | |||
716 | # CONFIG_SENSORS_ASB100 is not set | 658 | # CONFIG_SENSORS_ASB100 is not set |
717 | # CONFIG_SENSORS_ATXP1 is not set | 659 | # CONFIG_SENSORS_ATXP1 is not set |
718 | # CONFIG_SENSORS_DS1621 is not set | 660 | # CONFIG_SENSORS_DS1621 is not set |
661 | # CONFIG_SENSORS_F71805F is not set | ||
719 | # CONFIG_SENSORS_FSCHER is not set | 662 | # CONFIG_SENSORS_FSCHER is not set |
720 | # CONFIG_SENSORS_FSCPOS is not set | 663 | # CONFIG_SENSORS_FSCPOS is not set |
721 | # CONFIG_SENSORS_GL518SM is not set | 664 | # CONFIG_SENSORS_GL518SM is not set |
@@ -733,10 +676,8 @@ CONFIG_HWMON=y | |||
733 | # CONFIG_SENSORS_LM92 is not set | 676 | # CONFIG_SENSORS_LM92 is not set |
734 | # CONFIG_SENSORS_MAX1619 is not set | 677 | # CONFIG_SENSORS_MAX1619 is not set |
735 | # CONFIG_SENSORS_PC87360 is not set | 678 | # CONFIG_SENSORS_PC87360 is not set |
736 | # CONFIG_SENSORS_SIS5595 is not set | ||
737 | # CONFIG_SENSORS_SMSC47M1 is not set | 679 | # CONFIG_SENSORS_SMSC47M1 is not set |
738 | # CONFIG_SENSORS_SMSC47B397 is not set | 680 | # CONFIG_SENSORS_SMSC47B397 is not set |
739 | # CONFIG_SENSORS_VIA686A is not set | ||
740 | # CONFIG_SENSORS_W83781D is not set | 681 | # CONFIG_SENSORS_W83781D is not set |
741 | # CONFIG_SENSORS_W83792D is not set | 682 | # CONFIG_SENSORS_W83792D is not set |
742 | # CONFIG_SENSORS_W83L785TS is not set | 683 | # CONFIG_SENSORS_W83L785TS is not set |
@@ -776,14 +717,144 @@ CONFIG_HWMON=y | |||
776 | # USB support | 717 | # USB support |
777 | # | 718 | # |
778 | CONFIG_USB_ARCH_HAS_HCD=y | 719 | CONFIG_USB_ARCH_HAS_HCD=y |
779 | CONFIG_USB_ARCH_HAS_OHCI=y | 720 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
780 | # CONFIG_USB is not set | 721 | CONFIG_USB=y |
722 | CONFIG_USB_DEBUG=y | ||
723 | |||
724 | # | ||
725 | # Miscellaneous USB options | ||
726 | # | ||
727 | CONFIG_USB_DEVICEFS=y | ||
728 | # CONFIG_USB_BANDWIDTH is not set | ||
729 | CONFIG_USB_DYNAMIC_MINORS=y | ||
730 | # CONFIG_USB_OTG is not set | ||
731 | |||
732 | # | ||
733 | # USB Host Controller Drivers | ||
734 | # | ||
735 | # CONFIG_USB_ISP116X_HCD is not set | ||
736 | # CONFIG_USB_SL811_HCD is not set | ||
737 | |||
738 | # | ||
739 | # USB Device Class drivers | ||
740 | # | ||
741 | # CONFIG_USB_ACM is not set | ||
742 | # CONFIG_USB_PRINTER is not set | ||
781 | 743 | ||
782 | # | 744 | # |
783 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 745 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
784 | # | 746 | # |
785 | 747 | ||
786 | # | 748 | # |
749 | # may also be needed; see USB_STORAGE Help for more information | ||
750 | # | ||
751 | CONFIG_USB_STORAGE=y | ||
752 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
753 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
754 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
755 | # CONFIG_USB_STORAGE_DPCM is not set | ||
756 | # CONFIG_USB_STORAGE_USBAT is not set | ||
757 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
758 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
759 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
760 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
761 | # CONFIG_USB_LIBUSUAL is not set | ||
762 | |||
763 | # | ||
764 | # USB Input Devices | ||
765 | # | ||
766 | # CONFIG_USB_HID is not set | ||
767 | |||
768 | # | ||
769 | # USB HID Boot Protocol drivers | ||
770 | # | ||
771 | |||
772 | # | ||
773 | # USB Imaging devices | ||
774 | # | ||
775 | # CONFIG_USB_MDC800 is not set | ||
776 | # CONFIG_USB_MICROTEK is not set | ||
777 | |||
778 | # | ||
779 | # USB Multimedia devices | ||
780 | # | ||
781 | # CONFIG_USB_DABUSB is not set | ||
782 | |||
783 | # | ||
784 | # Video4Linux support is needed for USB Multimedia device support | ||
785 | # | ||
786 | |||
787 | # | ||
788 | # USB Network Adapters | ||
789 | # | ||
790 | # CONFIG_USB_CATC is not set | ||
791 | # CONFIG_USB_KAWETH is not set | ||
792 | # CONFIG_USB_PEGASUS is not set | ||
793 | CONFIG_USB_RTL8150=y | ||
794 | # CONFIG_USB_USBNET is not set | ||
795 | # CONFIG_USB_MON is not set | ||
796 | |||
797 | # | ||
798 | # USB port drivers | ||
799 | # | ||
800 | |||
801 | # | ||
802 | # USB Serial Converter support | ||
803 | # | ||
804 | CONFIG_USB_SERIAL=y | ||
805 | CONFIG_USB_SERIAL_CONSOLE=y | ||
806 | # CONFIG_USB_SERIAL_GENERIC is not set | ||
807 | # CONFIG_USB_SERIAL_AIRPRIME is not set | ||
808 | # CONFIG_USB_SERIAL_ANYDATA is not set | ||
809 | # CONFIG_USB_SERIAL_BELKIN is not set | ||
810 | # CONFIG_USB_SERIAL_WHITEHEAT is not set | ||
811 | # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set | ||
812 | # CONFIG_USB_SERIAL_CP2101 is not set | ||
813 | # CONFIG_USB_SERIAL_CYPRESS_M8 is not set | ||
814 | # CONFIG_USB_SERIAL_EMPEG is not set | ||
815 | # CONFIG_USB_SERIAL_FTDI_SIO is not set | ||
816 | # CONFIG_USB_SERIAL_VISOR is not set | ||
817 | # CONFIG_USB_SERIAL_IPAQ is not set | ||
818 | # CONFIG_USB_SERIAL_IR is not set | ||
819 | # CONFIG_USB_SERIAL_EDGEPORT is not set | ||
820 | # CONFIG_USB_SERIAL_EDGEPORT_TI is not set | ||
821 | # CONFIG_USB_SERIAL_GARMIN is not set | ||
822 | # CONFIG_USB_SERIAL_IPW is not set | ||
823 | # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set | ||
824 | # CONFIG_USB_SERIAL_KEYSPAN is not set | ||
825 | # CONFIG_USB_SERIAL_KLSI is not set | ||
826 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set | ||
827 | # CONFIG_USB_SERIAL_MCT_U232 is not set | ||
828 | CONFIG_USB_SERIAL_PL2303=y | ||
829 | # CONFIG_USB_SERIAL_HP4X is not set | ||
830 | # CONFIG_USB_SERIAL_SAFE is not set | ||
831 | # CONFIG_USB_SERIAL_TI is not set | ||
832 | # CONFIG_USB_SERIAL_CYBERJACK is not set | ||
833 | # CONFIG_USB_SERIAL_XIRCOM is not set | ||
834 | # CONFIG_USB_SERIAL_OMNINET is not set | ||
835 | |||
836 | # | ||
837 | # USB Miscellaneous drivers | ||
838 | # | ||
839 | # CONFIG_USB_EMI62 is not set | ||
840 | # CONFIG_USB_EMI26 is not set | ||
841 | # CONFIG_USB_AUERSWALD is not set | ||
842 | # CONFIG_USB_RIO500 is not set | ||
843 | # CONFIG_USB_LEGOTOWER is not set | ||
844 | # CONFIG_USB_LCD is not set | ||
845 | # CONFIG_USB_LED is not set | ||
846 | # CONFIG_USB_CYTHERM is not set | ||
847 | # CONFIG_USB_PHIDGETKIT is not set | ||
848 | # CONFIG_USB_PHIDGETSERVO is not set | ||
849 | # CONFIG_USB_IDMOUSE is not set | ||
850 | # CONFIG_USB_LD is not set | ||
851 | # CONFIG_USB_TEST is not set | ||
852 | |||
853 | # | ||
854 | # USB DSL modem support | ||
855 | # | ||
856 | |||
857 | # | ||
787 | # USB Gadget Support | 858 | # USB Gadget Support |
788 | # | 859 | # |
789 | # CONFIG_USB_GADGET is not set | 860 | # CONFIG_USB_GADGET is not set |
@@ -797,21 +868,17 @@ CONFIG_USB_ARCH_HAS_OHCI=y | |||
797 | # File systems | 868 | # File systems |
798 | # | 869 | # |
799 | CONFIG_EXT2_FS=y | 870 | CONFIG_EXT2_FS=y |
800 | CONFIG_EXT2_FS_XATTR=y | 871 | # CONFIG_EXT2_FS_XATTR is not set |
801 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
802 | # CONFIG_EXT2_FS_SECURITY is not set | ||
803 | # CONFIG_EXT2_FS_XIP is not set | 872 | # CONFIG_EXT2_FS_XIP is not set |
804 | CONFIG_EXT3_FS=y | 873 | CONFIG_EXT3_FS=y |
805 | CONFIG_EXT3_FS_XATTR=y | 874 | # CONFIG_EXT3_FS_XATTR is not set |
806 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
807 | # CONFIG_EXT3_FS_SECURITY is not set | ||
808 | CONFIG_JBD=y | 875 | CONFIG_JBD=y |
809 | # CONFIG_JBD_DEBUG is not set | 876 | # CONFIG_JBD_DEBUG is not set |
810 | CONFIG_FS_MBCACHE=y | ||
811 | # CONFIG_REISERFS_FS is not set | 877 | # CONFIG_REISERFS_FS is not set |
812 | # CONFIG_JFS_FS is not set | 878 | # CONFIG_JFS_FS is not set |
813 | CONFIG_FS_POSIX_ACL=y | 879 | # CONFIG_FS_POSIX_ACL is not set |
814 | # CONFIG_XFS_FS is not set | 880 | # CONFIG_XFS_FS is not set |
881 | # CONFIG_OCFS2_FS is not set | ||
815 | # CONFIG_MINIX_FS is not set | 882 | # CONFIG_MINIX_FS is not set |
816 | # CONFIG_ROMFS_FS is not set | 883 | # CONFIG_ROMFS_FS is not set |
817 | CONFIG_INOTIFY=y | 884 | CONFIG_INOTIFY=y |
@@ -830,8 +897,11 @@ CONFIG_DNOTIFY=y | |||
830 | # | 897 | # |
831 | # DOS/FAT/NT Filesystems | 898 | # DOS/FAT/NT Filesystems |
832 | # | 899 | # |
900 | CONFIG_FAT_FS=y | ||
833 | # CONFIG_MSDOS_FS is not set | 901 | # CONFIG_MSDOS_FS is not set |
834 | # CONFIG_VFAT_FS is not set | 902 | CONFIG_VFAT_FS=y |
903 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
904 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
835 | # CONFIG_NTFS_FS is not set | 905 | # CONFIG_NTFS_FS is not set |
836 | 906 | ||
837 | # | 907 | # |
@@ -843,6 +913,7 @@ CONFIG_TMPFS=y | |||
843 | # CONFIG_HUGETLB_PAGE is not set | 913 | # CONFIG_HUGETLB_PAGE is not set |
844 | CONFIG_RAMFS=y | 914 | CONFIG_RAMFS=y |
845 | # CONFIG_RELAYFS_FS is not set | 915 | # CONFIG_RELAYFS_FS is not set |
916 | # CONFIG_CONFIGFS_FS is not set | ||
846 | 917 | ||
847 | # | 918 | # |
848 | # Miscellaneous filesystems | 919 | # Miscellaneous filesystems |
@@ -911,12 +982,52 @@ CONFIG_MSDOS_PARTITION=y | |||
911 | # CONFIG_SGI_PARTITION is not set | 982 | # CONFIG_SGI_PARTITION is not set |
912 | # CONFIG_ULTRIX_PARTITION is not set | 983 | # CONFIG_ULTRIX_PARTITION is not set |
913 | # CONFIG_SUN_PARTITION is not set | 984 | # CONFIG_SUN_PARTITION is not set |
985 | # CONFIG_KARMA_PARTITION is not set | ||
914 | # CONFIG_EFI_PARTITION is not set | 986 | # CONFIG_EFI_PARTITION is not set |
915 | 987 | ||
916 | # | 988 | # |
917 | # Native Language Support | 989 | # Native Language Support |
918 | # | 990 | # |
919 | # CONFIG_NLS is not set | 991 | CONFIG_NLS=y |
992 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
993 | CONFIG_NLS_CODEPAGE_437=y | ||
994 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
995 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
996 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
997 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
998 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
999 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1000 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1001 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1002 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1003 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1004 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1005 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1006 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1007 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1008 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1009 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1010 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1011 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1012 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1013 | # CONFIG_NLS_ISO8859_8 is not set | ||
1014 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1015 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1016 | # CONFIG_NLS_ASCII is not set | ||
1017 | CONFIG_NLS_ISO8859_1=y | ||
1018 | # CONFIG_NLS_ISO8859_2 is not set | ||
1019 | # CONFIG_NLS_ISO8859_3 is not set | ||
1020 | # CONFIG_NLS_ISO8859_4 is not set | ||
1021 | # CONFIG_NLS_ISO8859_5 is not set | ||
1022 | # CONFIG_NLS_ISO8859_6 is not set | ||
1023 | # CONFIG_NLS_ISO8859_7 is not set | ||
1024 | # CONFIG_NLS_ISO8859_9 is not set | ||
1025 | # CONFIG_NLS_ISO8859_13 is not set | ||
1026 | # CONFIG_NLS_ISO8859_14 is not set | ||
1027 | # CONFIG_NLS_ISO8859_15 is not set | ||
1028 | # CONFIG_NLS_KOI8_R is not set | ||
1029 | # CONFIG_NLS_KOI8_U is not set | ||
1030 | # CONFIG_NLS_UTF8 is not set | ||
920 | 1031 | ||
921 | # | 1032 | # |
922 | # Profiling support | 1033 | # Profiling support |
@@ -927,13 +1038,14 @@ CONFIG_MSDOS_PARTITION=y | |||
927 | # Kernel hacking | 1038 | # Kernel hacking |
928 | # | 1039 | # |
929 | # CONFIG_PRINTK_TIME is not set | 1040 | # CONFIG_PRINTK_TIME is not set |
930 | CONFIG_DEBUG_KERNEL=y | ||
931 | CONFIG_MAGIC_SYSRQ=y | 1041 | CONFIG_MAGIC_SYSRQ=y |
1042 | CONFIG_DEBUG_KERNEL=y | ||
932 | CONFIG_LOG_BUF_SHIFT=14 | 1043 | CONFIG_LOG_BUF_SHIFT=14 |
933 | CONFIG_DETECT_SOFTLOCKUP=y | 1044 | CONFIG_DETECT_SOFTLOCKUP=y |
934 | # CONFIG_SCHEDSTATS is not set | 1045 | # CONFIG_SCHEDSTATS is not set |
935 | # CONFIG_DEBUG_SLAB is not set | 1046 | CONFIG_DEBUG_SLAB=y |
936 | # CONFIG_DEBUG_SPINLOCK is not set | 1047 | CONFIG_DEBUG_MUTEXES=y |
1048 | CONFIG_DEBUG_SPINLOCK=y | ||
937 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1049 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
938 | # CONFIG_DEBUG_KOBJECT is not set | 1050 | # CONFIG_DEBUG_KOBJECT is not set |
939 | CONFIG_DEBUG_BUGVERBOSE=y | 1051 | CONFIG_DEBUG_BUGVERBOSE=y |
@@ -941,9 +1053,10 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
941 | # CONFIG_DEBUG_FS is not set | 1053 | # CONFIG_DEBUG_FS is not set |
942 | # CONFIG_DEBUG_VM is not set | 1054 | # CONFIG_DEBUG_VM is not set |
943 | CONFIG_FRAME_POINTER=y | 1055 | CONFIG_FRAME_POINTER=y |
1056 | CONFIG_FORCED_INLINING=y | ||
944 | # CONFIG_RCU_TORTURE_TEST is not set | 1057 | # CONFIG_RCU_TORTURE_TEST is not set |
945 | CONFIG_DEBUG_USER=y | 1058 | CONFIG_DEBUG_USER=y |
946 | # CONFIG_DEBUG_WAITQ is not set | 1059 | CONFIG_DEBUG_WAITQ=y |
947 | CONFIG_DEBUG_ERRORS=y | 1060 | CONFIG_DEBUG_ERRORS=y |
948 | CONFIG_DEBUG_LL=y | 1061 | CONFIG_DEBUG_LL=y |
949 | # CONFIG_DEBUG_ICEDCC is not set | 1062 | # CONFIG_DEBUG_ICEDCC is not set |
@@ -969,6 +1082,6 @@ CONFIG_DEBUG_LL=y | |||
969 | # CONFIG_CRC_CCITT is not set | 1082 | # CONFIG_CRC_CCITT is not set |
970 | # CONFIG_CRC16 is not set | 1083 | # CONFIG_CRC16 is not set |
971 | CONFIG_CRC32=y | 1084 | CONFIG_CRC32=y |
972 | # CONFIG_LIBCRC32C is not set | 1085 | CONFIG_LIBCRC32C=y |
973 | CONFIG_ZLIB_INFLATE=y | 1086 | CONFIG_ZLIB_INFLATE=y |
974 | CONFIG_ZLIB_DEFLATE=y | 1087 | CONFIG_ZLIB_DEFLATE=y |
diff --git a/arch/arm/configs/ixdp2401_defconfig b/arch/arm/configs/ixdp2401_defconfig deleted file mode 100644 index 60d66e82c51f..000000000000 --- a/arch/arm/configs/ixdp2401_defconfig +++ /dev/null | |||
@@ -1,976 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.14-git13 | ||
4 | # Thu Nov 10 15:14:50 2005 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_MMU=y | ||
8 | CONFIG_UID16=y | ||
9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
11 | |||
12 | # | ||
13 | # Code maturity level options | ||
14 | # | ||
15 | CONFIG_EXPERIMENTAL=y | ||
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | ||
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
19 | |||
20 | # | ||
21 | # General setup | ||
22 | # | ||
23 | CONFIG_LOCALVERSION="" | ||
24 | CONFIG_LOCALVERSION_AUTO=y | ||
25 | CONFIG_SWAP=y | ||
26 | CONFIG_SYSVIPC=y | ||
27 | # CONFIG_POSIX_MQUEUE is not set | ||
28 | CONFIG_BSD_PROCESS_ACCT=y | ||
29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
30 | CONFIG_SYSCTL=y | ||
31 | # CONFIG_AUDIT is not set | ||
32 | # CONFIG_HOTPLUG is not set | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | # CONFIG_IKCONFIG is not set | ||
35 | CONFIG_INITRAMFS_SOURCE="" | ||
36 | CONFIG_EMBEDDED=y | ||
37 | CONFIG_KALLSYMS=y | ||
38 | # CONFIG_KALLSYMS_ALL is not set | ||
39 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
40 | CONFIG_PRINTK=y | ||
41 | CONFIG_BUG=y | ||
42 | CONFIG_BASE_FULL=y | ||
43 | CONFIG_FUTEX=y | ||
44 | CONFIG_EPOLL=y | ||
45 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
46 | CONFIG_SHMEM=y | ||
47 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
48 | CONFIG_CC_ALIGN_LABELS=0 | ||
49 | CONFIG_CC_ALIGN_LOOPS=0 | ||
50 | CONFIG_CC_ALIGN_JUMPS=0 | ||
51 | # CONFIG_TINY_SHMEM is not set | ||
52 | CONFIG_BASE_SMALL=0 | ||
53 | |||
54 | # | ||
55 | # Loadable module support | ||
56 | # | ||
57 | CONFIG_MODULES=y | ||
58 | CONFIG_MODULE_UNLOAD=y | ||
59 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
60 | CONFIG_OBSOLETE_MODPARM=y | ||
61 | # CONFIG_MODVERSIONS is not set | ||
62 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
63 | CONFIG_KMOD=y | ||
64 | |||
65 | # | ||
66 | # Block layer | ||
67 | # | ||
68 | |||
69 | # | ||
70 | # IO Schedulers | ||
71 | # | ||
72 | CONFIG_IOSCHED_NOOP=y | ||
73 | CONFIG_IOSCHED_AS=y | ||
74 | CONFIG_IOSCHED_DEADLINE=y | ||
75 | CONFIG_IOSCHED_CFQ=y | ||
76 | CONFIG_DEFAULT_AS=y | ||
77 | # CONFIG_DEFAULT_DEADLINE is not set | ||
78 | # CONFIG_DEFAULT_CFQ is not set | ||
79 | # CONFIG_DEFAULT_NOOP is not set | ||
80 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
81 | |||
82 | # | ||
83 | # System Type | ||
84 | # | ||
85 | # CONFIG_ARCH_CLPS7500 is not set | ||
86 | # CONFIG_ARCH_CLPS711X is not set | ||
87 | # CONFIG_ARCH_CO285 is not set | ||
88 | # CONFIG_ARCH_EBSA110 is not set | ||
89 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
90 | # CONFIG_ARCH_INTEGRATOR is not set | ||
91 | # CONFIG_ARCH_IOP3XX is not set | ||
92 | # CONFIG_ARCH_IXP4XX is not set | ||
93 | CONFIG_ARCH_IXP2000=y | ||
94 | # CONFIG_ARCH_L7200 is not set | ||
95 | # CONFIG_ARCH_PXA is not set | ||
96 | # CONFIG_ARCH_RPC is not set | ||
97 | # CONFIG_ARCH_SA1100 is not set | ||
98 | # CONFIG_ARCH_S3C2410 is not set | ||
99 | # CONFIG_ARCH_SHARK is not set | ||
100 | # CONFIG_ARCH_LH7A40X is not set | ||
101 | # CONFIG_ARCH_OMAP is not set | ||
102 | # CONFIG_ARCH_VERSATILE is not set | ||
103 | # CONFIG_ARCH_REALVIEW is not set | ||
104 | # CONFIG_ARCH_IMX is not set | ||
105 | # CONFIG_ARCH_H720X is not set | ||
106 | # CONFIG_ARCH_AAEC2000 is not set | ||
107 | CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y | ||
108 | |||
109 | # | ||
110 | # Intel IXP2400/2800 Implementation Options | ||
111 | # | ||
112 | |||
113 | # | ||
114 | # IXP2400/2800 Platforms | ||
115 | # | ||
116 | # CONFIG_ARCH_ENP2611 is not set | ||
117 | # CONFIG_ARCH_IXDP2400 is not set | ||
118 | # CONFIG_ARCH_IXDP2800 is not set | ||
119 | CONFIG_ARCH_IXDP2401=y | ||
120 | # CONFIG_ARCH_IXDP2801 is not set | ||
121 | CONFIG_ARCH_IXDP2X01=y | ||
122 | # CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set | ||
123 | |||
124 | # | ||
125 | # Processor Type | ||
126 | # | ||
127 | CONFIG_CPU_32=y | ||
128 | CONFIG_CPU_XSCALE=y | ||
129 | CONFIG_CPU_32v5=y | ||
130 | CONFIG_CPU_ABRT_EV5T=y | ||
131 | CONFIG_CPU_CACHE_VIVT=y | ||
132 | CONFIG_CPU_TLB_V4WBI=y | ||
133 | |||
134 | # | ||
135 | # Processor Features | ||
136 | # | ||
137 | # CONFIG_ARM_THUMB is not set | ||
138 | CONFIG_CPU_BIG_ENDIAN=y | ||
139 | CONFIG_XSCALE_PMU=y | ||
140 | |||
141 | # | ||
142 | # Bus support | ||
143 | # | ||
144 | CONFIG_ISA_DMA_API=y | ||
145 | CONFIG_PCI=y | ||
146 | CONFIG_PCI_LEGACY_PROC=y | ||
147 | # CONFIG_PCI_DEBUG is not set | ||
148 | |||
149 | # | ||
150 | # PCCARD (PCMCIA/CardBus) support | ||
151 | # | ||
152 | # CONFIG_PCCARD is not set | ||
153 | |||
154 | # | ||
155 | # Kernel Features | ||
156 | # | ||
157 | # CONFIG_PREEMPT is not set | ||
158 | # CONFIG_NO_IDLE_HZ is not set | ||
159 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
160 | CONFIG_SELECT_MEMORY_MODEL=y | ||
161 | CONFIG_FLATMEM_MANUAL=y | ||
162 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
163 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
164 | CONFIG_FLATMEM=y | ||
165 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
166 | # CONFIG_SPARSEMEM_STATIC is not set | ||
167 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
168 | CONFIG_ALIGNMENT_TRAP=y | ||
169 | |||
170 | # | ||
171 | # Boot options | ||
172 | # | ||
173 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
174 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
175 | CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0" | ||
176 | # CONFIG_XIP_KERNEL is not set | ||
177 | |||
178 | # | ||
179 | # Floating point emulation | ||
180 | # | ||
181 | |||
182 | # | ||
183 | # At least one emulation must be selected | ||
184 | # | ||
185 | CONFIG_FPE_NWFPE=y | ||
186 | CONFIG_FPE_NWFPE_XP=y | ||
187 | # CONFIG_FPE_FASTFPE is not set | ||
188 | |||
189 | # | ||
190 | # Userspace binary formats | ||
191 | # | ||
192 | CONFIG_BINFMT_ELF=y | ||
193 | # CONFIG_BINFMT_AOUT is not set | ||
194 | # CONFIG_BINFMT_MISC is not set | ||
195 | # CONFIG_ARTHUR is not set | ||
196 | |||
197 | # | ||
198 | # Power management options | ||
199 | # | ||
200 | # CONFIG_PM is not set | ||
201 | |||
202 | # | ||
203 | # Networking | ||
204 | # | ||
205 | CONFIG_NET=y | ||
206 | |||
207 | # | ||
208 | # Networking options | ||
209 | # | ||
210 | CONFIG_PACKET=y | ||
211 | CONFIG_PACKET_MMAP=y | ||
212 | CONFIG_UNIX=y | ||
213 | # CONFIG_NET_KEY is not set | ||
214 | CONFIG_INET=y | ||
215 | # CONFIG_IP_MULTICAST is not set | ||
216 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
217 | CONFIG_IP_FIB_HASH=y | ||
218 | CONFIG_IP_PNP=y | ||
219 | CONFIG_IP_PNP_DHCP=y | ||
220 | CONFIG_IP_PNP_BOOTP=y | ||
221 | # CONFIG_IP_PNP_RARP is not set | ||
222 | # CONFIG_NET_IPIP is not set | ||
223 | # CONFIG_NET_IPGRE is not set | ||
224 | # CONFIG_ARPD is not set | ||
225 | CONFIG_SYN_COOKIES=y | ||
226 | # CONFIG_INET_AH is not set | ||
227 | # CONFIG_INET_ESP is not set | ||
228 | # CONFIG_INET_IPCOMP is not set | ||
229 | # CONFIG_INET_TUNNEL is not set | ||
230 | CONFIG_INET_DIAG=y | ||
231 | CONFIG_INET_TCP_DIAG=y | ||
232 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
233 | CONFIG_TCP_CONG_BIC=y | ||
234 | # CONFIG_IPV6 is not set | ||
235 | # CONFIG_NETFILTER is not set | ||
236 | |||
237 | # | ||
238 | # DCCP Configuration (EXPERIMENTAL) | ||
239 | # | ||
240 | # CONFIG_IP_DCCP is not set | ||
241 | |||
242 | # | ||
243 | # SCTP Configuration (EXPERIMENTAL) | ||
244 | # | ||
245 | # CONFIG_IP_SCTP is not set | ||
246 | # CONFIG_ATM is not set | ||
247 | # CONFIG_BRIDGE is not set | ||
248 | # CONFIG_VLAN_8021Q is not set | ||
249 | # CONFIG_DECNET is not set | ||
250 | # CONFIG_LLC2 is not set | ||
251 | # CONFIG_IPX is not set | ||
252 | # CONFIG_ATALK is not set | ||
253 | # CONFIG_X25 is not set | ||
254 | # CONFIG_LAPB is not set | ||
255 | # CONFIG_NET_DIVERT is not set | ||
256 | # CONFIG_ECONET is not set | ||
257 | # CONFIG_WAN_ROUTER is not set | ||
258 | |||
259 | # | ||
260 | # QoS and/or fair queueing | ||
261 | # | ||
262 | # CONFIG_NET_SCHED is not set | ||
263 | # CONFIG_NET_CLS_ROUTE is not set | ||
264 | |||
265 | # | ||
266 | # Network testing | ||
267 | # | ||
268 | # CONFIG_NET_PKTGEN is not set | ||
269 | # CONFIG_HAMRADIO is not set | ||
270 | # CONFIG_IRDA is not set | ||
271 | # CONFIG_BT is not set | ||
272 | # CONFIG_IEEE80211 is not set | ||
273 | |||
274 | # | ||
275 | # Device Drivers | ||
276 | # | ||
277 | |||
278 | # | ||
279 | # Generic Driver Options | ||
280 | # | ||
281 | CONFIG_STANDALONE=y | ||
282 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
283 | # CONFIG_FW_LOADER is not set | ||
284 | # CONFIG_DEBUG_DRIVER is not set | ||
285 | |||
286 | # | ||
287 | # Memory Technology Devices (MTD) | ||
288 | # | ||
289 | CONFIG_MTD=y | ||
290 | # CONFIG_MTD_DEBUG is not set | ||
291 | # CONFIG_MTD_CONCAT is not set | ||
292 | CONFIG_MTD_PARTITIONS=y | ||
293 | CONFIG_MTD_REDBOOT_PARTS=y | ||
294 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
295 | CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y | ||
296 | CONFIG_MTD_REDBOOT_PARTS_READONLY=y | ||
297 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
298 | # CONFIG_MTD_AFS_PARTS is not set | ||
299 | |||
300 | # | ||
301 | # User Modules And Translation Layers | ||
302 | # | ||
303 | CONFIG_MTD_CHAR=y | ||
304 | CONFIG_MTD_BLOCK=y | ||
305 | # CONFIG_FTL is not set | ||
306 | # CONFIG_NFTL is not set | ||
307 | # CONFIG_INFTL is not set | ||
308 | # CONFIG_RFD_FTL is not set | ||
309 | |||
310 | # | ||
311 | # RAM/ROM/Flash chip drivers | ||
312 | # | ||
313 | CONFIG_MTD_CFI=y | ||
314 | # CONFIG_MTD_JEDECPROBE is not set | ||
315 | CONFIG_MTD_GEN_PROBE=y | ||
316 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
317 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
318 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
319 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
320 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
321 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
322 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
323 | CONFIG_MTD_CFI_I1=y | ||
324 | CONFIG_MTD_CFI_I2=y | ||
325 | # CONFIG_MTD_CFI_I4 is not set | ||
326 | # CONFIG_MTD_CFI_I8 is not set | ||
327 | CONFIG_MTD_CFI_INTELEXT=y | ||
328 | # CONFIG_MTD_CFI_AMDSTD is not set | ||
329 | # CONFIG_MTD_CFI_STAA is not set | ||
330 | CONFIG_MTD_CFI_UTIL=y | ||
331 | # CONFIG_MTD_RAM is not set | ||
332 | # CONFIG_MTD_ROM is not set | ||
333 | # CONFIG_MTD_ABSENT is not set | ||
334 | # CONFIG_MTD_XIP is not set | ||
335 | |||
336 | # | ||
337 | # Mapping drivers for chip access | ||
338 | # | ||
339 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
340 | # CONFIG_MTD_PHYSMAP is not set | ||
341 | # CONFIG_MTD_ARM_INTEGRATOR is not set | ||
342 | CONFIG_MTD_IXP2000=y | ||
343 | # CONFIG_MTD_PCI is not set | ||
344 | # CONFIG_MTD_PLATRAM is not set | ||
345 | |||
346 | # | ||
347 | # Self-contained MTD device drivers | ||
348 | # | ||
349 | # CONFIG_MTD_PMC551 is not set | ||
350 | # CONFIG_MTD_SLRAM is not set | ||
351 | # CONFIG_MTD_PHRAM is not set | ||
352 | # CONFIG_MTD_MTDRAM is not set | ||
353 | # CONFIG_MTD_BLKMTD is not set | ||
354 | # CONFIG_MTD_BLOCK2MTD is not set | ||
355 | |||
356 | # | ||
357 | # Disk-On-Chip Device Drivers | ||
358 | # | ||
359 | # CONFIG_MTD_DOC2000 is not set | ||
360 | # CONFIG_MTD_DOC2001 is not set | ||
361 | # CONFIG_MTD_DOC2001PLUS is not set | ||
362 | |||
363 | # | ||
364 | # NAND Flash Device Drivers | ||
365 | # | ||
366 | # CONFIG_MTD_NAND is not set | ||
367 | |||
368 | # | ||
369 | # OneNAND Flash Device Drivers | ||
370 | # | ||
371 | # CONFIG_MTD_ONENAND is not set | ||
372 | |||
373 | # | ||
374 | # Parallel port support | ||
375 | # | ||
376 | # CONFIG_PARPORT is not set | ||
377 | |||
378 | # | ||
379 | # Plug and Play support | ||
380 | # | ||
381 | |||
382 | # | ||
383 | # Block devices | ||
384 | # | ||
385 | # CONFIG_BLK_CPQ_DA is not set | ||
386 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
387 | # CONFIG_BLK_DEV_DAC960 is not set | ||
388 | # CONFIG_BLK_DEV_UMEM is not set | ||
389 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
390 | CONFIG_BLK_DEV_LOOP=y | ||
391 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
392 | # CONFIG_BLK_DEV_NBD is not set | ||
393 | # CONFIG_BLK_DEV_SX8 is not set | ||
394 | CONFIG_BLK_DEV_RAM=y | ||
395 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
396 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
397 | CONFIG_BLK_DEV_INITRD=y | ||
398 | # CONFIG_CDROM_PKTCDVD is not set | ||
399 | # CONFIG_ATA_OVER_ETH is not set | ||
400 | |||
401 | # | ||
402 | # SCSI device support | ||
403 | # | ||
404 | # CONFIG_RAID_ATTRS is not set | ||
405 | # CONFIG_SCSI is not set | ||
406 | |||
407 | # | ||
408 | # Multi-device support (RAID and LVM) | ||
409 | # | ||
410 | # CONFIG_MD is not set | ||
411 | |||
412 | # | ||
413 | # Fusion MPT device support | ||
414 | # | ||
415 | # CONFIG_FUSION is not set | ||
416 | |||
417 | # | ||
418 | # IEEE 1394 (FireWire) support | ||
419 | # | ||
420 | # CONFIG_IEEE1394 is not set | ||
421 | |||
422 | # | ||
423 | # I2O device support | ||
424 | # | ||
425 | # CONFIG_I2O is not set | ||
426 | |||
427 | # | ||
428 | # Network device support | ||
429 | # | ||
430 | CONFIG_NETDEVICES=y | ||
431 | CONFIG_DUMMY=y | ||
432 | # CONFIG_BONDING is not set | ||
433 | # CONFIG_EQUALIZER is not set | ||
434 | # CONFIG_TUN is not set | ||
435 | |||
436 | # | ||
437 | # ARCnet devices | ||
438 | # | ||
439 | # CONFIG_ARCNET is not set | ||
440 | |||
441 | # | ||
442 | # PHY device support | ||
443 | # | ||
444 | # CONFIG_PHYLIB is not set | ||
445 | |||
446 | # | ||
447 | # Ethernet (10 or 100Mbit) | ||
448 | # | ||
449 | CONFIG_NET_ETHERNET=y | ||
450 | CONFIG_MII=y | ||
451 | # CONFIG_HAPPYMEAL is not set | ||
452 | # CONFIG_SUNGEM is not set | ||
453 | # CONFIG_CASSINI is not set | ||
454 | # CONFIG_NET_VENDOR_3COM is not set | ||
455 | # CONFIG_SMC91X is not set | ||
456 | # CONFIG_DM9000 is not set | ||
457 | |||
458 | # | ||
459 | # Tulip family network device support | ||
460 | # | ||
461 | # CONFIG_NET_TULIP is not set | ||
462 | # CONFIG_HP100 is not set | ||
463 | CONFIG_NET_PCI=y | ||
464 | # CONFIG_PCNET32 is not set | ||
465 | # CONFIG_AMD8111_ETH is not set | ||
466 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
467 | # CONFIG_B44 is not set | ||
468 | # CONFIG_FORCEDETH is not set | ||
469 | CONFIG_CS89x0=y | ||
470 | # CONFIG_DGRS is not set | ||
471 | CONFIG_EEPRO100=y | ||
472 | # CONFIG_E100 is not set | ||
473 | # CONFIG_FEALNX is not set | ||
474 | # CONFIG_NATSEMI is not set | ||
475 | # CONFIG_NE2K_PCI is not set | ||
476 | # CONFIG_8139CP is not set | ||
477 | # CONFIG_8139TOO is not set | ||
478 | # CONFIG_SIS900 is not set | ||
479 | # CONFIG_EPIC100 is not set | ||
480 | # CONFIG_SUNDANCE is not set | ||
481 | # CONFIG_TLAN is not set | ||
482 | # CONFIG_VIA_RHINE is not set | ||
483 | |||
484 | # | ||
485 | # Ethernet (1000 Mbit) | ||
486 | # | ||
487 | # CONFIG_ACENIC is not set | ||
488 | # CONFIG_DL2K is not set | ||
489 | # CONFIG_E1000 is not set | ||
490 | # CONFIG_NS83820 is not set | ||
491 | # CONFIG_HAMACHI is not set | ||
492 | # CONFIG_YELLOWFIN is not set | ||
493 | # CONFIG_R8169 is not set | ||
494 | # CONFIG_SIS190 is not set | ||
495 | # CONFIG_SKGE is not set | ||
496 | # CONFIG_SK98LIN is not set | ||
497 | # CONFIG_VIA_VELOCITY is not set | ||
498 | # CONFIG_TIGON3 is not set | ||
499 | # CONFIG_BNX2 is not set | ||
500 | |||
501 | # | ||
502 | # Ethernet (10000 Mbit) | ||
503 | # | ||
504 | # CONFIG_CHELSIO_T1 is not set | ||
505 | # CONFIG_IXGB is not set | ||
506 | # CONFIG_S2IO is not set | ||
507 | |||
508 | # | ||
509 | # Token Ring devices | ||
510 | # | ||
511 | # CONFIG_TR is not set | ||
512 | |||
513 | # | ||
514 | # Wireless LAN (non-hamradio) | ||
515 | # | ||
516 | # CONFIG_NET_RADIO is not set | ||
517 | |||
518 | # | ||
519 | # Wan interfaces | ||
520 | # | ||
521 | CONFIG_WAN=y | ||
522 | # CONFIG_DSCC4 is not set | ||
523 | # CONFIG_LANMEDIA is not set | ||
524 | # CONFIG_SYNCLINK_SYNCPPP is not set | ||
525 | CONFIG_HDLC=y | ||
526 | CONFIG_HDLC_RAW=y | ||
527 | # CONFIG_HDLC_RAW_ETH is not set | ||
528 | CONFIG_HDLC_CISCO=y | ||
529 | CONFIG_HDLC_FR=y | ||
530 | CONFIG_HDLC_PPP=y | ||
531 | |||
532 | # | ||
533 | # X.25/LAPB support is disabled | ||
534 | # | ||
535 | # CONFIG_PCI200SYN is not set | ||
536 | # CONFIG_WANXL is not set | ||
537 | # CONFIG_PC300 is not set | ||
538 | # CONFIG_FARSYNC is not set | ||
539 | CONFIG_DLCI=y | ||
540 | CONFIG_DLCI_COUNT=24 | ||
541 | CONFIG_DLCI_MAX=8 | ||
542 | # CONFIG_FDDI is not set | ||
543 | # CONFIG_HIPPI is not set | ||
544 | # CONFIG_PPP is not set | ||
545 | # CONFIG_SLIP is not set | ||
546 | # CONFIG_SHAPER is not set | ||
547 | # CONFIG_NETCONSOLE is not set | ||
548 | # CONFIG_NETPOLL is not set | ||
549 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
550 | |||
551 | # | ||
552 | # ISDN subsystem | ||
553 | # | ||
554 | # CONFIG_ISDN is not set | ||
555 | |||
556 | # | ||
557 | # Input device support | ||
558 | # | ||
559 | CONFIG_INPUT=y | ||
560 | |||
561 | # | ||
562 | # Userland interfaces | ||
563 | # | ||
564 | CONFIG_INPUT_MOUSEDEV=y | ||
565 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
566 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
567 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
568 | # CONFIG_INPUT_JOYDEV is not set | ||
569 | # CONFIG_INPUT_TSDEV is not set | ||
570 | # CONFIG_INPUT_EVDEV is not set | ||
571 | # CONFIG_INPUT_EVBUG is not set | ||
572 | |||
573 | # | ||
574 | # Input Device Drivers | ||
575 | # | ||
576 | # CONFIG_INPUT_KEYBOARD is not set | ||
577 | # CONFIG_INPUT_MOUSE is not set | ||
578 | # CONFIG_INPUT_JOYSTICK is not set | ||
579 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
580 | # CONFIG_INPUT_MISC is not set | ||
581 | |||
582 | # | ||
583 | # Hardware I/O ports | ||
584 | # | ||
585 | # CONFIG_SERIO is not set | ||
586 | # CONFIG_GAMEPORT is not set | ||
587 | |||
588 | # | ||
589 | # Character devices | ||
590 | # | ||
591 | # CONFIG_VT is not set | ||
592 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
593 | |||
594 | # | ||
595 | # Serial drivers | ||
596 | # | ||
597 | CONFIG_SERIAL_8250=y | ||
598 | CONFIG_SERIAL_8250_CONSOLE=y | ||
599 | CONFIG_SERIAL_8250_NR_UARTS=3 | ||
600 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
601 | |||
602 | # | ||
603 | # Non-8250 serial port support | ||
604 | # | ||
605 | CONFIG_SERIAL_CORE=y | ||
606 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
607 | # CONFIG_SERIAL_JSM is not set | ||
608 | CONFIG_UNIX98_PTYS=y | ||
609 | CONFIG_LEGACY_PTYS=y | ||
610 | CONFIG_LEGACY_PTY_COUNT=256 | ||
611 | |||
612 | # | ||
613 | # IPMI | ||
614 | # | ||
615 | # CONFIG_IPMI_HANDLER is not set | ||
616 | |||
617 | # | ||
618 | # Watchdog Cards | ||
619 | # | ||
620 | CONFIG_WATCHDOG=y | ||
621 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
622 | |||
623 | # | ||
624 | # Watchdog Device Drivers | ||
625 | # | ||
626 | # CONFIG_SOFT_WATCHDOG is not set | ||
627 | CONFIG_IXP2000_WATCHDOG=y | ||
628 | |||
629 | # | ||
630 | # PCI-based Watchdog Cards | ||
631 | # | ||
632 | # CONFIG_PCIPCWATCHDOG is not set | ||
633 | # CONFIG_WDTPCI is not set | ||
634 | # CONFIG_NVRAM is not set | ||
635 | # CONFIG_RTC is not set | ||
636 | # CONFIG_DTLK is not set | ||
637 | # CONFIG_R3964 is not set | ||
638 | # CONFIG_APPLICOM is not set | ||
639 | |||
640 | # | ||
641 | # Ftape, the floppy tape device driver | ||
642 | # | ||
643 | # CONFIG_DRM is not set | ||
644 | # CONFIG_RAW_DRIVER is not set | ||
645 | |||
646 | # | ||
647 | # TPM devices | ||
648 | # | ||
649 | # CONFIG_TCG_TPM is not set | ||
650 | # CONFIG_TELCLOCK is not set | ||
651 | |||
652 | # | ||
653 | # I2C support | ||
654 | # | ||
655 | CONFIG_I2C=y | ||
656 | CONFIG_I2C_CHARDEV=y | ||
657 | |||
658 | # | ||
659 | # I2C Algorithms | ||
660 | # | ||
661 | CONFIG_I2C_ALGOBIT=y | ||
662 | # CONFIG_I2C_ALGOPCF is not set | ||
663 | # CONFIG_I2C_ALGOPCA is not set | ||
664 | |||
665 | # | ||
666 | # I2C Hardware Bus support | ||
667 | # | ||
668 | # CONFIG_I2C_ALI1535 is not set | ||
669 | # CONFIG_I2C_ALI1563 is not set | ||
670 | # CONFIG_I2C_ALI15X3 is not set | ||
671 | # CONFIG_I2C_AMD756 is not set | ||
672 | # CONFIG_I2C_AMD8111 is not set | ||
673 | # CONFIG_I2C_I801 is not set | ||
674 | # CONFIG_I2C_I810 is not set | ||
675 | # CONFIG_I2C_PIIX4 is not set | ||
676 | CONFIG_I2C_IXP2000=y | ||
677 | # CONFIG_I2C_NFORCE2 is not set | ||
678 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
679 | # CONFIG_I2C_PROSAVAGE is not set | ||
680 | # CONFIG_I2C_SAVAGE4 is not set | ||
681 | # CONFIG_SCx200_ACB is not set | ||
682 | # CONFIG_I2C_SIS5595 is not set | ||
683 | # CONFIG_I2C_SIS630 is not set | ||
684 | # CONFIG_I2C_SIS96X is not set | ||
685 | # CONFIG_I2C_STUB is not set | ||
686 | # CONFIG_I2C_VIA is not set | ||
687 | # CONFIG_I2C_VIAPRO is not set | ||
688 | # CONFIG_I2C_VOODOO3 is not set | ||
689 | # CONFIG_I2C_PCA_ISA is not set | ||
690 | |||
691 | # | ||
692 | # Miscellaneous I2C Chip support | ||
693 | # | ||
694 | # CONFIG_SENSORS_DS1337 is not set | ||
695 | # CONFIG_SENSORS_DS1374 is not set | ||
696 | CONFIG_SENSORS_EEPROM=y | ||
697 | # CONFIG_SENSORS_PCF8574 is not set | ||
698 | # CONFIG_SENSORS_PCA9539 is not set | ||
699 | # CONFIG_SENSORS_PCF8591 is not set | ||
700 | # CONFIG_SENSORS_RTC8564 is not set | ||
701 | # CONFIG_SENSORS_MAX6875 is not set | ||
702 | # CONFIG_RTC_X1205_I2C is not set | ||
703 | # CONFIG_I2C_DEBUG_CORE is not set | ||
704 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
705 | # CONFIG_I2C_DEBUG_BUS is not set | ||
706 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
707 | |||
708 | # | ||
709 | # Hardware Monitoring support | ||
710 | # | ||
711 | CONFIG_HWMON=y | ||
712 | # CONFIG_HWMON_VID is not set | ||
713 | # CONFIG_SENSORS_ADM1021 is not set | ||
714 | # CONFIG_SENSORS_ADM1025 is not set | ||
715 | # CONFIG_SENSORS_ADM1026 is not set | ||
716 | # CONFIG_SENSORS_ADM1031 is not set | ||
717 | # CONFIG_SENSORS_ADM9240 is not set | ||
718 | # CONFIG_SENSORS_ASB100 is not set | ||
719 | # CONFIG_SENSORS_ATXP1 is not set | ||
720 | # CONFIG_SENSORS_DS1621 is not set | ||
721 | # CONFIG_SENSORS_FSCHER is not set | ||
722 | # CONFIG_SENSORS_FSCPOS is not set | ||
723 | # CONFIG_SENSORS_GL518SM is not set | ||
724 | # CONFIG_SENSORS_GL520SM is not set | ||
725 | # CONFIG_SENSORS_IT87 is not set | ||
726 | # CONFIG_SENSORS_LM63 is not set | ||
727 | # CONFIG_SENSORS_LM75 is not set | ||
728 | # CONFIG_SENSORS_LM77 is not set | ||
729 | # CONFIG_SENSORS_LM78 is not set | ||
730 | # CONFIG_SENSORS_LM80 is not set | ||
731 | # CONFIG_SENSORS_LM83 is not set | ||
732 | # CONFIG_SENSORS_LM85 is not set | ||
733 | # CONFIG_SENSORS_LM87 is not set | ||
734 | # CONFIG_SENSORS_LM90 is not set | ||
735 | # CONFIG_SENSORS_LM92 is not set | ||
736 | # CONFIG_SENSORS_MAX1619 is not set | ||
737 | # CONFIG_SENSORS_PC87360 is not set | ||
738 | # CONFIG_SENSORS_SIS5595 is not set | ||
739 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
740 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
741 | # CONFIG_SENSORS_VIA686A is not set | ||
742 | # CONFIG_SENSORS_W83781D is not set | ||
743 | # CONFIG_SENSORS_W83792D is not set | ||
744 | # CONFIG_SENSORS_W83L785TS is not set | ||
745 | # CONFIG_SENSORS_W83627HF is not set | ||
746 | # CONFIG_SENSORS_W83627EHF is not set | ||
747 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
748 | |||
749 | # | ||
750 | # Misc devices | ||
751 | # | ||
752 | |||
753 | # | ||
754 | # Multimedia Capabilities Port drivers | ||
755 | # | ||
756 | |||
757 | # | ||
758 | # Multimedia devices | ||
759 | # | ||
760 | # CONFIG_VIDEO_DEV is not set | ||
761 | |||
762 | # | ||
763 | # Digital Video Broadcasting Devices | ||
764 | # | ||
765 | # CONFIG_DVB is not set | ||
766 | |||
767 | # | ||
768 | # Graphics support | ||
769 | # | ||
770 | # CONFIG_FB is not set | ||
771 | |||
772 | # | ||
773 | # Sound | ||
774 | # | ||
775 | # CONFIG_SOUND is not set | ||
776 | |||
777 | # | ||
778 | # USB support | ||
779 | # | ||
780 | CONFIG_USB_ARCH_HAS_HCD=y | ||
781 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
782 | # CONFIG_USB is not set | ||
783 | |||
784 | # | ||
785 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
786 | # | ||
787 | |||
788 | # | ||
789 | # USB Gadget Support | ||
790 | # | ||
791 | # CONFIG_USB_GADGET is not set | ||
792 | |||
793 | # | ||
794 | # MMC/SD Card support | ||
795 | # | ||
796 | # CONFIG_MMC is not set | ||
797 | |||
798 | # | ||
799 | # File systems | ||
800 | # | ||
801 | CONFIG_EXT2_FS=y | ||
802 | CONFIG_EXT2_FS_XATTR=y | ||
803 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
804 | # CONFIG_EXT2_FS_SECURITY is not set | ||
805 | # CONFIG_EXT2_FS_XIP is not set | ||
806 | CONFIG_EXT3_FS=y | ||
807 | CONFIG_EXT3_FS_XATTR=y | ||
808 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
809 | # CONFIG_EXT3_FS_SECURITY is not set | ||
810 | CONFIG_JBD=y | ||
811 | # CONFIG_JBD_DEBUG is not set | ||
812 | CONFIG_FS_MBCACHE=y | ||
813 | # CONFIG_REISERFS_FS is not set | ||
814 | # CONFIG_JFS_FS is not set | ||
815 | CONFIG_FS_POSIX_ACL=y | ||
816 | # CONFIG_XFS_FS is not set | ||
817 | # CONFIG_MINIX_FS is not set | ||
818 | # CONFIG_ROMFS_FS is not set | ||
819 | CONFIG_INOTIFY=y | ||
820 | # CONFIG_QUOTA is not set | ||
821 | CONFIG_DNOTIFY=y | ||
822 | # CONFIG_AUTOFS_FS is not set | ||
823 | # CONFIG_AUTOFS4_FS is not set | ||
824 | # CONFIG_FUSE_FS is not set | ||
825 | |||
826 | # | ||
827 | # CD-ROM/DVD Filesystems | ||
828 | # | ||
829 | # CONFIG_ISO9660_FS is not set | ||
830 | # CONFIG_UDF_FS is not set | ||
831 | |||
832 | # | ||
833 | # DOS/FAT/NT Filesystems | ||
834 | # | ||
835 | # CONFIG_MSDOS_FS is not set | ||
836 | # CONFIG_VFAT_FS is not set | ||
837 | # CONFIG_NTFS_FS is not set | ||
838 | |||
839 | # | ||
840 | # Pseudo filesystems | ||
841 | # | ||
842 | CONFIG_PROC_FS=y | ||
843 | CONFIG_SYSFS=y | ||
844 | CONFIG_TMPFS=y | ||
845 | # CONFIG_HUGETLB_PAGE is not set | ||
846 | CONFIG_RAMFS=y | ||
847 | # CONFIG_RELAYFS_FS is not set | ||
848 | |||
849 | # | ||
850 | # Miscellaneous filesystems | ||
851 | # | ||
852 | # CONFIG_ADFS_FS is not set | ||
853 | # CONFIG_AFFS_FS is not set | ||
854 | # CONFIG_HFS_FS is not set | ||
855 | # CONFIG_HFSPLUS_FS is not set | ||
856 | # CONFIG_BEFS_FS is not set | ||
857 | # CONFIG_BFS_FS is not set | ||
858 | # CONFIG_EFS_FS is not set | ||
859 | # CONFIG_JFFS_FS is not set | ||
860 | CONFIG_JFFS2_FS=y | ||
861 | CONFIG_JFFS2_FS_DEBUG=0 | ||
862 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
863 | # CONFIG_JFFS2_SUMMARY is not set | ||
864 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
865 | CONFIG_JFFS2_ZLIB=y | ||
866 | CONFIG_JFFS2_RTIME=y | ||
867 | # CONFIG_JFFS2_RUBIN is not set | ||
868 | # CONFIG_CRAMFS is not set | ||
869 | # CONFIG_VXFS_FS is not set | ||
870 | # CONFIG_HPFS_FS is not set | ||
871 | # CONFIG_QNX4FS_FS is not set | ||
872 | # CONFIG_SYSV_FS is not set | ||
873 | # CONFIG_UFS_FS is not set | ||
874 | |||
875 | # | ||
876 | # Network File Systems | ||
877 | # | ||
878 | CONFIG_NFS_FS=y | ||
879 | CONFIG_NFS_V3=y | ||
880 | # CONFIG_NFS_V3_ACL is not set | ||
881 | # CONFIG_NFS_V4 is not set | ||
882 | # CONFIG_NFS_DIRECTIO is not set | ||
883 | # CONFIG_NFSD is not set | ||
884 | CONFIG_ROOT_NFS=y | ||
885 | CONFIG_LOCKD=y | ||
886 | CONFIG_LOCKD_V4=y | ||
887 | CONFIG_NFS_COMMON=y | ||
888 | CONFIG_SUNRPC=y | ||
889 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
890 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
891 | # CONFIG_SMB_FS is not set | ||
892 | # CONFIG_CIFS is not set | ||
893 | # CONFIG_NCP_FS is not set | ||
894 | # CONFIG_CODA_FS is not set | ||
895 | # CONFIG_AFS_FS is not set | ||
896 | # CONFIG_9P_FS is not set | ||
897 | |||
898 | # | ||
899 | # Partition Types | ||
900 | # | ||
901 | CONFIG_PARTITION_ADVANCED=y | ||
902 | # CONFIG_ACORN_PARTITION is not set | ||
903 | # CONFIG_OSF_PARTITION is not set | ||
904 | # CONFIG_AMIGA_PARTITION is not set | ||
905 | # CONFIG_ATARI_PARTITION is not set | ||
906 | # CONFIG_MAC_PARTITION is not set | ||
907 | CONFIG_MSDOS_PARTITION=y | ||
908 | # CONFIG_BSD_DISKLABEL is not set | ||
909 | # CONFIG_MINIX_SUBPARTITION is not set | ||
910 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
911 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
912 | # CONFIG_LDM_PARTITION is not set | ||
913 | # CONFIG_SGI_PARTITION is not set | ||
914 | # CONFIG_ULTRIX_PARTITION is not set | ||
915 | # CONFIG_SUN_PARTITION is not set | ||
916 | # CONFIG_EFI_PARTITION is not set | ||
917 | |||
918 | # | ||
919 | # Native Language Support | ||
920 | # | ||
921 | # CONFIG_NLS is not set | ||
922 | |||
923 | # | ||
924 | # Profiling support | ||
925 | # | ||
926 | # CONFIG_PROFILING is not set | ||
927 | |||
928 | # | ||
929 | # Kernel hacking | ||
930 | # | ||
931 | # CONFIG_PRINTK_TIME is not set | ||
932 | CONFIG_DEBUG_KERNEL=y | ||
933 | CONFIG_MAGIC_SYSRQ=y | ||
934 | CONFIG_LOG_BUF_SHIFT=14 | ||
935 | CONFIG_DETECT_SOFTLOCKUP=y | ||
936 | # CONFIG_SCHEDSTATS is not set | ||
937 | # CONFIG_DEBUG_SLAB is not set | ||
938 | # CONFIG_DEBUG_SPINLOCK is not set | ||
939 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
940 | # CONFIG_DEBUG_KOBJECT is not set | ||
941 | CONFIG_DEBUG_BUGVERBOSE=y | ||
942 | # CONFIG_DEBUG_INFO is not set | ||
943 | # CONFIG_DEBUG_FS is not set | ||
944 | # CONFIG_DEBUG_VM is not set | ||
945 | CONFIG_FRAME_POINTER=y | ||
946 | # CONFIG_RCU_TORTURE_TEST is not set | ||
947 | CONFIG_DEBUG_USER=y | ||
948 | # CONFIG_DEBUG_WAITQ is not set | ||
949 | CONFIG_DEBUG_ERRORS=y | ||
950 | CONFIG_DEBUG_LL=y | ||
951 | # CONFIG_DEBUG_ICEDCC is not set | ||
952 | |||
953 | # | ||
954 | # Security options | ||
955 | # | ||
956 | # CONFIG_KEYS is not set | ||
957 | # CONFIG_SECURITY is not set | ||
958 | |||
959 | # | ||
960 | # Cryptographic options | ||
961 | # | ||
962 | # CONFIG_CRYPTO is not set | ||
963 | |||
964 | # | ||
965 | # Hardware crypto devices | ||
966 | # | ||
967 | |||
968 | # | ||
969 | # Library routines | ||
970 | # | ||
971 | # CONFIG_CRC_CCITT is not set | ||
972 | # CONFIG_CRC16 is not set | ||
973 | CONFIG_CRC32=y | ||
974 | # CONFIG_LIBCRC32C is not set | ||
975 | CONFIG_ZLIB_INFLATE=y | ||
976 | CONFIG_ZLIB_DEFLATE=y | ||
diff --git a/arch/arm/configs/ixdp2801_defconfig b/arch/arm/configs/ixdp2801_defconfig deleted file mode 100644 index f54f3dcc5b33..000000000000 --- a/arch/arm/configs/ixdp2801_defconfig +++ /dev/null | |||
@@ -1,976 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.14-git13 | ||
4 | # Thu Nov 10 15:15:03 2005 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_MMU=y | ||
8 | CONFIG_UID16=y | ||
9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
11 | |||
12 | # | ||
13 | # Code maturity level options | ||
14 | # | ||
15 | CONFIG_EXPERIMENTAL=y | ||
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | ||
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
19 | |||
20 | # | ||
21 | # General setup | ||
22 | # | ||
23 | CONFIG_LOCALVERSION="" | ||
24 | CONFIG_LOCALVERSION_AUTO=y | ||
25 | CONFIG_SWAP=y | ||
26 | CONFIG_SYSVIPC=y | ||
27 | # CONFIG_POSIX_MQUEUE is not set | ||
28 | CONFIG_BSD_PROCESS_ACCT=y | ||
29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
30 | CONFIG_SYSCTL=y | ||
31 | # CONFIG_AUDIT is not set | ||
32 | # CONFIG_HOTPLUG is not set | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | # CONFIG_IKCONFIG is not set | ||
35 | CONFIG_INITRAMFS_SOURCE="" | ||
36 | CONFIG_EMBEDDED=y | ||
37 | CONFIG_KALLSYMS=y | ||
38 | # CONFIG_KALLSYMS_ALL is not set | ||
39 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
40 | CONFIG_PRINTK=y | ||
41 | CONFIG_BUG=y | ||
42 | CONFIG_BASE_FULL=y | ||
43 | CONFIG_FUTEX=y | ||
44 | CONFIG_EPOLL=y | ||
45 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
46 | CONFIG_SHMEM=y | ||
47 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
48 | CONFIG_CC_ALIGN_LABELS=0 | ||
49 | CONFIG_CC_ALIGN_LOOPS=0 | ||
50 | CONFIG_CC_ALIGN_JUMPS=0 | ||
51 | # CONFIG_TINY_SHMEM is not set | ||
52 | CONFIG_BASE_SMALL=0 | ||
53 | |||
54 | # | ||
55 | # Loadable module support | ||
56 | # | ||
57 | CONFIG_MODULES=y | ||
58 | CONFIG_MODULE_UNLOAD=y | ||
59 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
60 | CONFIG_OBSOLETE_MODPARM=y | ||
61 | # CONFIG_MODVERSIONS is not set | ||
62 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
63 | CONFIG_KMOD=y | ||
64 | |||
65 | # | ||
66 | # Block layer | ||
67 | # | ||
68 | |||
69 | # | ||
70 | # IO Schedulers | ||
71 | # | ||
72 | CONFIG_IOSCHED_NOOP=y | ||
73 | CONFIG_IOSCHED_AS=y | ||
74 | CONFIG_IOSCHED_DEADLINE=y | ||
75 | CONFIG_IOSCHED_CFQ=y | ||
76 | CONFIG_DEFAULT_AS=y | ||
77 | # CONFIG_DEFAULT_DEADLINE is not set | ||
78 | # CONFIG_DEFAULT_CFQ is not set | ||
79 | # CONFIG_DEFAULT_NOOP is not set | ||
80 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
81 | |||
82 | # | ||
83 | # System Type | ||
84 | # | ||
85 | # CONFIG_ARCH_CLPS7500 is not set | ||
86 | # CONFIG_ARCH_CLPS711X is not set | ||
87 | # CONFIG_ARCH_CO285 is not set | ||
88 | # CONFIG_ARCH_EBSA110 is not set | ||
89 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
90 | # CONFIG_ARCH_INTEGRATOR is not set | ||
91 | # CONFIG_ARCH_IOP3XX is not set | ||
92 | # CONFIG_ARCH_IXP4XX is not set | ||
93 | CONFIG_ARCH_IXP2000=y | ||
94 | # CONFIG_ARCH_L7200 is not set | ||
95 | # CONFIG_ARCH_PXA is not set | ||
96 | # CONFIG_ARCH_RPC is not set | ||
97 | # CONFIG_ARCH_SA1100 is not set | ||
98 | # CONFIG_ARCH_S3C2410 is not set | ||
99 | # CONFIG_ARCH_SHARK is not set | ||
100 | # CONFIG_ARCH_LH7A40X is not set | ||
101 | # CONFIG_ARCH_OMAP is not set | ||
102 | # CONFIG_ARCH_VERSATILE is not set | ||
103 | # CONFIG_ARCH_REALVIEW is not set | ||
104 | # CONFIG_ARCH_IMX is not set | ||
105 | # CONFIG_ARCH_H720X is not set | ||
106 | # CONFIG_ARCH_AAEC2000 is not set | ||
107 | CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y | ||
108 | |||
109 | # | ||
110 | # Intel IXP2400/2800 Implementation Options | ||
111 | # | ||
112 | |||
113 | # | ||
114 | # IXP2400/2800 Platforms | ||
115 | # | ||
116 | # CONFIG_ARCH_ENP2611 is not set | ||
117 | # CONFIG_ARCH_IXDP2400 is not set | ||
118 | # CONFIG_ARCH_IXDP2800 is not set | ||
119 | # CONFIG_ARCH_IXDP2401 is not set | ||
120 | CONFIG_ARCH_IXDP2801=y | ||
121 | CONFIG_ARCH_IXDP2X01=y | ||
122 | # CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set | ||
123 | |||
124 | # | ||
125 | # Processor Type | ||
126 | # | ||
127 | CONFIG_CPU_32=y | ||
128 | CONFIG_CPU_XSCALE=y | ||
129 | CONFIG_CPU_32v5=y | ||
130 | CONFIG_CPU_ABRT_EV5T=y | ||
131 | CONFIG_CPU_CACHE_VIVT=y | ||
132 | CONFIG_CPU_TLB_V4WBI=y | ||
133 | |||
134 | # | ||
135 | # Processor Features | ||
136 | # | ||
137 | # CONFIG_ARM_THUMB is not set | ||
138 | CONFIG_CPU_BIG_ENDIAN=y | ||
139 | CONFIG_XSCALE_PMU=y | ||
140 | |||
141 | # | ||
142 | # Bus support | ||
143 | # | ||
144 | CONFIG_ISA_DMA_API=y | ||
145 | CONFIG_PCI=y | ||
146 | CONFIG_PCI_LEGACY_PROC=y | ||
147 | # CONFIG_PCI_DEBUG is not set | ||
148 | |||
149 | # | ||
150 | # PCCARD (PCMCIA/CardBus) support | ||
151 | # | ||
152 | # CONFIG_PCCARD is not set | ||
153 | |||
154 | # | ||
155 | # Kernel Features | ||
156 | # | ||
157 | # CONFIG_PREEMPT is not set | ||
158 | # CONFIG_NO_IDLE_HZ is not set | ||
159 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
160 | CONFIG_SELECT_MEMORY_MODEL=y | ||
161 | CONFIG_FLATMEM_MANUAL=y | ||
162 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
163 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
164 | CONFIG_FLATMEM=y | ||
165 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
166 | # CONFIG_SPARSEMEM_STATIC is not set | ||
167 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
168 | CONFIG_ALIGNMENT_TRAP=y | ||
169 | |||
170 | # | ||
171 | # Boot options | ||
172 | # | ||
173 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
174 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
175 | CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0" | ||
176 | # CONFIG_XIP_KERNEL is not set | ||
177 | |||
178 | # | ||
179 | # Floating point emulation | ||
180 | # | ||
181 | |||
182 | # | ||
183 | # At least one emulation must be selected | ||
184 | # | ||
185 | CONFIG_FPE_NWFPE=y | ||
186 | CONFIG_FPE_NWFPE_XP=y | ||
187 | # CONFIG_FPE_FASTFPE is not set | ||
188 | |||
189 | # | ||
190 | # Userspace binary formats | ||
191 | # | ||
192 | CONFIG_BINFMT_ELF=y | ||
193 | # CONFIG_BINFMT_AOUT is not set | ||
194 | # CONFIG_BINFMT_MISC is not set | ||
195 | # CONFIG_ARTHUR is not set | ||
196 | |||
197 | # | ||
198 | # Power management options | ||
199 | # | ||
200 | # CONFIG_PM is not set | ||
201 | |||
202 | # | ||
203 | # Networking | ||
204 | # | ||
205 | CONFIG_NET=y | ||
206 | |||
207 | # | ||
208 | # Networking options | ||
209 | # | ||
210 | CONFIG_PACKET=y | ||
211 | CONFIG_PACKET_MMAP=y | ||
212 | CONFIG_UNIX=y | ||
213 | # CONFIG_NET_KEY is not set | ||
214 | CONFIG_INET=y | ||
215 | # CONFIG_IP_MULTICAST is not set | ||
216 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
217 | CONFIG_IP_FIB_HASH=y | ||
218 | CONFIG_IP_PNP=y | ||
219 | CONFIG_IP_PNP_DHCP=y | ||
220 | CONFIG_IP_PNP_BOOTP=y | ||
221 | # CONFIG_IP_PNP_RARP is not set | ||
222 | # CONFIG_NET_IPIP is not set | ||
223 | # CONFIG_NET_IPGRE is not set | ||
224 | # CONFIG_ARPD is not set | ||
225 | CONFIG_SYN_COOKIES=y | ||
226 | # CONFIG_INET_AH is not set | ||
227 | # CONFIG_INET_ESP is not set | ||
228 | # CONFIG_INET_IPCOMP is not set | ||
229 | # CONFIG_INET_TUNNEL is not set | ||
230 | CONFIG_INET_DIAG=y | ||
231 | CONFIG_INET_TCP_DIAG=y | ||
232 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
233 | CONFIG_TCP_CONG_BIC=y | ||
234 | # CONFIG_IPV6 is not set | ||
235 | # CONFIG_NETFILTER is not set | ||
236 | |||
237 | # | ||
238 | # DCCP Configuration (EXPERIMENTAL) | ||
239 | # | ||
240 | # CONFIG_IP_DCCP is not set | ||
241 | |||
242 | # | ||
243 | # SCTP Configuration (EXPERIMENTAL) | ||
244 | # | ||
245 | # CONFIG_IP_SCTP is not set | ||
246 | # CONFIG_ATM is not set | ||
247 | # CONFIG_BRIDGE is not set | ||
248 | # CONFIG_VLAN_8021Q is not set | ||
249 | # CONFIG_DECNET is not set | ||
250 | # CONFIG_LLC2 is not set | ||
251 | # CONFIG_IPX is not set | ||
252 | # CONFIG_ATALK is not set | ||
253 | # CONFIG_X25 is not set | ||
254 | # CONFIG_LAPB is not set | ||
255 | # CONFIG_NET_DIVERT is not set | ||
256 | # CONFIG_ECONET is not set | ||
257 | # CONFIG_WAN_ROUTER is not set | ||
258 | |||
259 | # | ||
260 | # QoS and/or fair queueing | ||
261 | # | ||
262 | # CONFIG_NET_SCHED is not set | ||
263 | # CONFIG_NET_CLS_ROUTE is not set | ||
264 | |||
265 | # | ||
266 | # Network testing | ||
267 | # | ||
268 | # CONFIG_NET_PKTGEN is not set | ||
269 | # CONFIG_HAMRADIO is not set | ||
270 | # CONFIG_IRDA is not set | ||
271 | # CONFIG_BT is not set | ||
272 | # CONFIG_IEEE80211 is not set | ||
273 | |||
274 | # | ||
275 | # Device Drivers | ||
276 | # | ||
277 | |||
278 | # | ||
279 | # Generic Driver Options | ||
280 | # | ||
281 | CONFIG_STANDALONE=y | ||
282 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
283 | # CONFIG_FW_LOADER is not set | ||
284 | # CONFIG_DEBUG_DRIVER is not set | ||
285 | |||
286 | # | ||
287 | # Memory Technology Devices (MTD) | ||
288 | # | ||
289 | CONFIG_MTD=y | ||
290 | # CONFIG_MTD_DEBUG is not set | ||
291 | # CONFIG_MTD_CONCAT is not set | ||
292 | CONFIG_MTD_PARTITIONS=y | ||
293 | CONFIG_MTD_REDBOOT_PARTS=y | ||
294 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
295 | CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y | ||
296 | CONFIG_MTD_REDBOOT_PARTS_READONLY=y | ||
297 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
298 | # CONFIG_MTD_AFS_PARTS is not set | ||
299 | |||
300 | # | ||
301 | # User Modules And Translation Layers | ||
302 | # | ||
303 | CONFIG_MTD_CHAR=y | ||
304 | CONFIG_MTD_BLOCK=y | ||
305 | # CONFIG_FTL is not set | ||
306 | # CONFIG_NFTL is not set | ||
307 | # CONFIG_INFTL is not set | ||
308 | # CONFIG_RFD_FTL is not set | ||
309 | |||
310 | # | ||
311 | # RAM/ROM/Flash chip drivers | ||
312 | # | ||
313 | CONFIG_MTD_CFI=y | ||
314 | # CONFIG_MTD_JEDECPROBE is not set | ||
315 | CONFIG_MTD_GEN_PROBE=y | ||
316 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
317 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
318 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
319 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
320 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
321 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
322 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
323 | CONFIG_MTD_CFI_I1=y | ||
324 | CONFIG_MTD_CFI_I2=y | ||
325 | # CONFIG_MTD_CFI_I4 is not set | ||
326 | # CONFIG_MTD_CFI_I8 is not set | ||
327 | CONFIG_MTD_CFI_INTELEXT=y | ||
328 | # CONFIG_MTD_CFI_AMDSTD is not set | ||
329 | # CONFIG_MTD_CFI_STAA is not set | ||
330 | CONFIG_MTD_CFI_UTIL=y | ||
331 | # CONFIG_MTD_RAM is not set | ||
332 | # CONFIG_MTD_ROM is not set | ||
333 | # CONFIG_MTD_ABSENT is not set | ||
334 | # CONFIG_MTD_XIP is not set | ||
335 | |||
336 | # | ||
337 | # Mapping drivers for chip access | ||
338 | # | ||
339 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
340 | # CONFIG_MTD_PHYSMAP is not set | ||
341 | # CONFIG_MTD_ARM_INTEGRATOR is not set | ||
342 | CONFIG_MTD_IXP2000=y | ||
343 | # CONFIG_MTD_PCI is not set | ||
344 | # CONFIG_MTD_PLATRAM is not set | ||
345 | |||
346 | # | ||
347 | # Self-contained MTD device drivers | ||
348 | # | ||
349 | # CONFIG_MTD_PMC551 is not set | ||
350 | # CONFIG_MTD_SLRAM is not set | ||
351 | # CONFIG_MTD_PHRAM is not set | ||
352 | # CONFIG_MTD_MTDRAM is not set | ||
353 | # CONFIG_MTD_BLKMTD is not set | ||
354 | # CONFIG_MTD_BLOCK2MTD is not set | ||
355 | |||
356 | # | ||
357 | # Disk-On-Chip Device Drivers | ||
358 | # | ||
359 | # CONFIG_MTD_DOC2000 is not set | ||
360 | # CONFIG_MTD_DOC2001 is not set | ||
361 | # CONFIG_MTD_DOC2001PLUS is not set | ||
362 | |||
363 | # | ||
364 | # NAND Flash Device Drivers | ||
365 | # | ||
366 | # CONFIG_MTD_NAND is not set | ||
367 | |||
368 | # | ||
369 | # OneNAND Flash Device Drivers | ||
370 | # | ||
371 | # CONFIG_MTD_ONENAND is not set | ||
372 | |||
373 | # | ||
374 | # Parallel port support | ||
375 | # | ||
376 | # CONFIG_PARPORT is not set | ||
377 | |||
378 | # | ||
379 | # Plug and Play support | ||
380 | # | ||
381 | |||
382 | # | ||
383 | # Block devices | ||
384 | # | ||
385 | # CONFIG_BLK_CPQ_DA is not set | ||
386 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
387 | # CONFIG_BLK_DEV_DAC960 is not set | ||
388 | # CONFIG_BLK_DEV_UMEM is not set | ||
389 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
390 | CONFIG_BLK_DEV_LOOP=y | ||
391 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
392 | # CONFIG_BLK_DEV_NBD is not set | ||
393 | # CONFIG_BLK_DEV_SX8 is not set | ||
394 | CONFIG_BLK_DEV_RAM=y | ||
395 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
396 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
397 | CONFIG_BLK_DEV_INITRD=y | ||
398 | # CONFIG_CDROM_PKTCDVD is not set | ||
399 | # CONFIG_ATA_OVER_ETH is not set | ||
400 | |||
401 | # | ||
402 | # SCSI device support | ||
403 | # | ||
404 | # CONFIG_RAID_ATTRS is not set | ||
405 | # CONFIG_SCSI is not set | ||
406 | |||
407 | # | ||
408 | # Multi-device support (RAID and LVM) | ||
409 | # | ||
410 | # CONFIG_MD is not set | ||
411 | |||
412 | # | ||
413 | # Fusion MPT device support | ||
414 | # | ||
415 | # CONFIG_FUSION is not set | ||
416 | |||
417 | # | ||
418 | # IEEE 1394 (FireWire) support | ||
419 | # | ||
420 | # CONFIG_IEEE1394 is not set | ||
421 | |||
422 | # | ||
423 | # I2O device support | ||
424 | # | ||
425 | # CONFIG_I2O is not set | ||
426 | |||
427 | # | ||
428 | # Network device support | ||
429 | # | ||
430 | CONFIG_NETDEVICES=y | ||
431 | CONFIG_DUMMY=y | ||
432 | # CONFIG_BONDING is not set | ||
433 | # CONFIG_EQUALIZER is not set | ||
434 | # CONFIG_TUN is not set | ||
435 | |||
436 | # | ||
437 | # ARCnet devices | ||
438 | # | ||
439 | # CONFIG_ARCNET is not set | ||
440 | |||
441 | # | ||
442 | # PHY device support | ||
443 | # | ||
444 | # CONFIG_PHYLIB is not set | ||
445 | |||
446 | # | ||
447 | # Ethernet (10 or 100Mbit) | ||
448 | # | ||
449 | CONFIG_NET_ETHERNET=y | ||
450 | CONFIG_MII=y | ||
451 | # CONFIG_HAPPYMEAL is not set | ||
452 | # CONFIG_SUNGEM is not set | ||
453 | # CONFIG_CASSINI is not set | ||
454 | # CONFIG_NET_VENDOR_3COM is not set | ||
455 | # CONFIG_SMC91X is not set | ||
456 | # CONFIG_DM9000 is not set | ||
457 | |||
458 | # | ||
459 | # Tulip family network device support | ||
460 | # | ||
461 | # CONFIG_NET_TULIP is not set | ||
462 | # CONFIG_HP100 is not set | ||
463 | CONFIG_NET_PCI=y | ||
464 | # CONFIG_PCNET32 is not set | ||
465 | # CONFIG_AMD8111_ETH is not set | ||
466 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
467 | # CONFIG_B44 is not set | ||
468 | # CONFIG_FORCEDETH is not set | ||
469 | CONFIG_CS89x0=y | ||
470 | # CONFIG_DGRS is not set | ||
471 | CONFIG_EEPRO100=y | ||
472 | # CONFIG_E100 is not set | ||
473 | # CONFIG_FEALNX is not set | ||
474 | # CONFIG_NATSEMI is not set | ||
475 | # CONFIG_NE2K_PCI is not set | ||
476 | # CONFIG_8139CP is not set | ||
477 | # CONFIG_8139TOO is not set | ||
478 | # CONFIG_SIS900 is not set | ||
479 | # CONFIG_EPIC100 is not set | ||
480 | # CONFIG_SUNDANCE is not set | ||
481 | # CONFIG_TLAN is not set | ||
482 | # CONFIG_VIA_RHINE is not set | ||
483 | |||
484 | # | ||
485 | # Ethernet (1000 Mbit) | ||
486 | # | ||
487 | # CONFIG_ACENIC is not set | ||
488 | # CONFIG_DL2K is not set | ||
489 | # CONFIG_E1000 is not set | ||
490 | # CONFIG_NS83820 is not set | ||
491 | # CONFIG_HAMACHI is not set | ||
492 | # CONFIG_YELLOWFIN is not set | ||
493 | # CONFIG_R8169 is not set | ||
494 | # CONFIG_SIS190 is not set | ||
495 | # CONFIG_SKGE is not set | ||
496 | # CONFIG_SK98LIN is not set | ||
497 | # CONFIG_VIA_VELOCITY is not set | ||
498 | # CONFIG_TIGON3 is not set | ||
499 | # CONFIG_BNX2 is not set | ||
500 | |||
501 | # | ||
502 | # Ethernet (10000 Mbit) | ||
503 | # | ||
504 | # CONFIG_CHELSIO_T1 is not set | ||
505 | # CONFIG_IXGB is not set | ||
506 | # CONFIG_S2IO is not set | ||
507 | |||
508 | # | ||
509 | # Token Ring devices | ||
510 | # | ||
511 | # CONFIG_TR is not set | ||
512 | |||
513 | # | ||
514 | # Wireless LAN (non-hamradio) | ||
515 | # | ||
516 | # CONFIG_NET_RADIO is not set | ||
517 | |||
518 | # | ||
519 | # Wan interfaces | ||
520 | # | ||
521 | CONFIG_WAN=y | ||
522 | # CONFIG_DSCC4 is not set | ||
523 | # CONFIG_LANMEDIA is not set | ||
524 | # CONFIG_SYNCLINK_SYNCPPP is not set | ||
525 | CONFIG_HDLC=y | ||
526 | CONFIG_HDLC_RAW=y | ||
527 | # CONFIG_HDLC_RAW_ETH is not set | ||
528 | CONFIG_HDLC_CISCO=y | ||
529 | CONFIG_HDLC_FR=y | ||
530 | CONFIG_HDLC_PPP=y | ||
531 | |||
532 | # | ||
533 | # X.25/LAPB support is disabled | ||
534 | # | ||
535 | # CONFIG_PCI200SYN is not set | ||
536 | # CONFIG_WANXL is not set | ||
537 | # CONFIG_PC300 is not set | ||
538 | # CONFIG_FARSYNC is not set | ||
539 | CONFIG_DLCI=y | ||
540 | CONFIG_DLCI_COUNT=24 | ||
541 | CONFIG_DLCI_MAX=8 | ||
542 | # CONFIG_FDDI is not set | ||
543 | # CONFIG_HIPPI is not set | ||
544 | # CONFIG_PPP is not set | ||
545 | # CONFIG_SLIP is not set | ||
546 | # CONFIG_SHAPER is not set | ||
547 | # CONFIG_NETCONSOLE is not set | ||
548 | # CONFIG_NETPOLL is not set | ||
549 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
550 | |||
551 | # | ||
552 | # ISDN subsystem | ||
553 | # | ||
554 | # CONFIG_ISDN is not set | ||
555 | |||
556 | # | ||
557 | # Input device support | ||
558 | # | ||
559 | CONFIG_INPUT=y | ||
560 | |||
561 | # | ||
562 | # Userland interfaces | ||
563 | # | ||
564 | CONFIG_INPUT_MOUSEDEV=y | ||
565 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
566 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
567 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
568 | # CONFIG_INPUT_JOYDEV is not set | ||
569 | # CONFIG_INPUT_TSDEV is not set | ||
570 | # CONFIG_INPUT_EVDEV is not set | ||
571 | # CONFIG_INPUT_EVBUG is not set | ||
572 | |||
573 | # | ||
574 | # Input Device Drivers | ||
575 | # | ||
576 | # CONFIG_INPUT_KEYBOARD is not set | ||
577 | # CONFIG_INPUT_MOUSE is not set | ||
578 | # CONFIG_INPUT_JOYSTICK is not set | ||
579 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
580 | # CONFIG_INPUT_MISC is not set | ||
581 | |||
582 | # | ||
583 | # Hardware I/O ports | ||
584 | # | ||
585 | # CONFIG_SERIO is not set | ||
586 | # CONFIG_GAMEPORT is not set | ||
587 | |||
588 | # | ||
589 | # Character devices | ||
590 | # | ||
591 | # CONFIG_VT is not set | ||
592 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
593 | |||
594 | # | ||
595 | # Serial drivers | ||
596 | # | ||
597 | CONFIG_SERIAL_8250=y | ||
598 | CONFIG_SERIAL_8250_CONSOLE=y | ||
599 | CONFIG_SERIAL_8250_NR_UARTS=3 | ||
600 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
601 | |||
602 | # | ||
603 | # Non-8250 serial port support | ||
604 | # | ||
605 | CONFIG_SERIAL_CORE=y | ||
606 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
607 | # CONFIG_SERIAL_JSM is not set | ||
608 | CONFIG_UNIX98_PTYS=y | ||
609 | CONFIG_LEGACY_PTYS=y | ||
610 | CONFIG_LEGACY_PTY_COUNT=256 | ||
611 | |||
612 | # | ||
613 | # IPMI | ||
614 | # | ||
615 | # CONFIG_IPMI_HANDLER is not set | ||
616 | |||
617 | # | ||
618 | # Watchdog Cards | ||
619 | # | ||
620 | CONFIG_WATCHDOG=y | ||
621 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
622 | |||
623 | # | ||
624 | # Watchdog Device Drivers | ||
625 | # | ||
626 | # CONFIG_SOFT_WATCHDOG is not set | ||
627 | CONFIG_IXP2000_WATCHDOG=y | ||
628 | |||
629 | # | ||
630 | # PCI-based Watchdog Cards | ||
631 | # | ||
632 | # CONFIG_PCIPCWATCHDOG is not set | ||
633 | # CONFIG_WDTPCI is not set | ||
634 | # CONFIG_NVRAM is not set | ||
635 | # CONFIG_RTC is not set | ||
636 | # CONFIG_DTLK is not set | ||
637 | # CONFIG_R3964 is not set | ||
638 | # CONFIG_APPLICOM is not set | ||
639 | |||
640 | # | ||
641 | # Ftape, the floppy tape device driver | ||
642 | # | ||
643 | # CONFIG_DRM is not set | ||
644 | # CONFIG_RAW_DRIVER is not set | ||
645 | |||
646 | # | ||
647 | # TPM devices | ||
648 | # | ||
649 | # CONFIG_TCG_TPM is not set | ||
650 | # CONFIG_TELCLOCK is not set | ||
651 | |||
652 | # | ||
653 | # I2C support | ||
654 | # | ||
655 | CONFIG_I2C=y | ||
656 | CONFIG_I2C_CHARDEV=y | ||
657 | |||
658 | # | ||
659 | # I2C Algorithms | ||
660 | # | ||
661 | CONFIG_I2C_ALGOBIT=y | ||
662 | # CONFIG_I2C_ALGOPCF is not set | ||
663 | # CONFIG_I2C_ALGOPCA is not set | ||
664 | |||
665 | # | ||
666 | # I2C Hardware Bus support | ||
667 | # | ||
668 | # CONFIG_I2C_ALI1535 is not set | ||
669 | # CONFIG_I2C_ALI1563 is not set | ||
670 | # CONFIG_I2C_ALI15X3 is not set | ||
671 | # CONFIG_I2C_AMD756 is not set | ||
672 | # CONFIG_I2C_AMD8111 is not set | ||
673 | # CONFIG_I2C_I801 is not set | ||
674 | # CONFIG_I2C_I810 is not set | ||
675 | # CONFIG_I2C_PIIX4 is not set | ||
676 | CONFIG_I2C_IXP2000=y | ||
677 | # CONFIG_I2C_NFORCE2 is not set | ||
678 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
679 | # CONFIG_I2C_PROSAVAGE is not set | ||
680 | # CONFIG_I2C_SAVAGE4 is not set | ||
681 | # CONFIG_SCx200_ACB is not set | ||
682 | # CONFIG_I2C_SIS5595 is not set | ||
683 | # CONFIG_I2C_SIS630 is not set | ||
684 | # CONFIG_I2C_SIS96X is not set | ||
685 | # CONFIG_I2C_STUB is not set | ||
686 | # CONFIG_I2C_VIA is not set | ||
687 | # CONFIG_I2C_VIAPRO is not set | ||
688 | # CONFIG_I2C_VOODOO3 is not set | ||
689 | # CONFIG_I2C_PCA_ISA is not set | ||
690 | |||
691 | # | ||
692 | # Miscellaneous I2C Chip support | ||
693 | # | ||
694 | # CONFIG_SENSORS_DS1337 is not set | ||
695 | # CONFIG_SENSORS_DS1374 is not set | ||
696 | CONFIG_SENSORS_EEPROM=y | ||
697 | # CONFIG_SENSORS_PCF8574 is not set | ||
698 | # CONFIG_SENSORS_PCA9539 is not set | ||
699 | # CONFIG_SENSORS_PCF8591 is not set | ||
700 | # CONFIG_SENSORS_RTC8564 is not set | ||
701 | # CONFIG_SENSORS_MAX6875 is not set | ||
702 | # CONFIG_RTC_X1205_I2C is not set | ||
703 | # CONFIG_I2C_DEBUG_CORE is not set | ||
704 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
705 | # CONFIG_I2C_DEBUG_BUS is not set | ||
706 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
707 | |||
708 | # | ||
709 | # Hardware Monitoring support | ||
710 | # | ||
711 | CONFIG_HWMON=y | ||
712 | # CONFIG_HWMON_VID is not set | ||
713 | # CONFIG_SENSORS_ADM1021 is not set | ||
714 | # CONFIG_SENSORS_ADM1025 is not set | ||
715 | # CONFIG_SENSORS_ADM1026 is not set | ||
716 | # CONFIG_SENSORS_ADM1031 is not set | ||
717 | # CONFIG_SENSORS_ADM9240 is not set | ||
718 | # CONFIG_SENSORS_ASB100 is not set | ||
719 | # CONFIG_SENSORS_ATXP1 is not set | ||
720 | # CONFIG_SENSORS_DS1621 is not set | ||
721 | # CONFIG_SENSORS_FSCHER is not set | ||
722 | # CONFIG_SENSORS_FSCPOS is not set | ||
723 | # CONFIG_SENSORS_GL518SM is not set | ||
724 | # CONFIG_SENSORS_GL520SM is not set | ||
725 | # CONFIG_SENSORS_IT87 is not set | ||
726 | # CONFIG_SENSORS_LM63 is not set | ||
727 | # CONFIG_SENSORS_LM75 is not set | ||
728 | # CONFIG_SENSORS_LM77 is not set | ||
729 | # CONFIG_SENSORS_LM78 is not set | ||
730 | # CONFIG_SENSORS_LM80 is not set | ||
731 | # CONFIG_SENSORS_LM83 is not set | ||
732 | # CONFIG_SENSORS_LM85 is not set | ||
733 | # CONFIG_SENSORS_LM87 is not set | ||
734 | # CONFIG_SENSORS_LM90 is not set | ||
735 | # CONFIG_SENSORS_LM92 is not set | ||
736 | # CONFIG_SENSORS_MAX1619 is not set | ||
737 | # CONFIG_SENSORS_PC87360 is not set | ||
738 | # CONFIG_SENSORS_SIS5595 is not set | ||
739 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
740 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
741 | # CONFIG_SENSORS_VIA686A is not set | ||
742 | # CONFIG_SENSORS_W83781D is not set | ||
743 | # CONFIG_SENSORS_W83792D is not set | ||
744 | # CONFIG_SENSORS_W83L785TS is not set | ||
745 | # CONFIG_SENSORS_W83627HF is not set | ||
746 | # CONFIG_SENSORS_W83627EHF is not set | ||
747 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
748 | |||
749 | # | ||
750 | # Misc devices | ||
751 | # | ||
752 | |||
753 | # | ||
754 | # Multimedia Capabilities Port drivers | ||
755 | # | ||
756 | |||
757 | # | ||
758 | # Multimedia devices | ||
759 | # | ||
760 | # CONFIG_VIDEO_DEV is not set | ||
761 | |||
762 | # | ||
763 | # Digital Video Broadcasting Devices | ||
764 | # | ||
765 | # CONFIG_DVB is not set | ||
766 | |||
767 | # | ||
768 | # Graphics support | ||
769 | # | ||
770 | # CONFIG_FB is not set | ||
771 | |||
772 | # | ||
773 | # Sound | ||
774 | # | ||
775 | # CONFIG_SOUND is not set | ||
776 | |||
777 | # | ||
778 | # USB support | ||
779 | # | ||
780 | CONFIG_USB_ARCH_HAS_HCD=y | ||
781 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
782 | # CONFIG_USB is not set | ||
783 | |||
784 | # | ||
785 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
786 | # | ||
787 | |||
788 | # | ||
789 | # USB Gadget Support | ||
790 | # | ||
791 | # CONFIG_USB_GADGET is not set | ||
792 | |||
793 | # | ||
794 | # MMC/SD Card support | ||
795 | # | ||
796 | # CONFIG_MMC is not set | ||
797 | |||
798 | # | ||
799 | # File systems | ||
800 | # | ||
801 | CONFIG_EXT2_FS=y | ||
802 | CONFIG_EXT2_FS_XATTR=y | ||
803 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
804 | # CONFIG_EXT2_FS_SECURITY is not set | ||
805 | # CONFIG_EXT2_FS_XIP is not set | ||
806 | CONFIG_EXT3_FS=y | ||
807 | CONFIG_EXT3_FS_XATTR=y | ||
808 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
809 | # CONFIG_EXT3_FS_SECURITY is not set | ||
810 | CONFIG_JBD=y | ||
811 | # CONFIG_JBD_DEBUG is not set | ||
812 | CONFIG_FS_MBCACHE=y | ||
813 | # CONFIG_REISERFS_FS is not set | ||
814 | # CONFIG_JFS_FS is not set | ||
815 | CONFIG_FS_POSIX_ACL=y | ||
816 | # CONFIG_XFS_FS is not set | ||
817 | # CONFIG_MINIX_FS is not set | ||
818 | # CONFIG_ROMFS_FS is not set | ||
819 | CONFIG_INOTIFY=y | ||
820 | # CONFIG_QUOTA is not set | ||
821 | CONFIG_DNOTIFY=y | ||
822 | # CONFIG_AUTOFS_FS is not set | ||
823 | # CONFIG_AUTOFS4_FS is not set | ||
824 | # CONFIG_FUSE_FS is not set | ||
825 | |||
826 | # | ||
827 | # CD-ROM/DVD Filesystems | ||
828 | # | ||
829 | # CONFIG_ISO9660_FS is not set | ||
830 | # CONFIG_UDF_FS is not set | ||
831 | |||
832 | # | ||
833 | # DOS/FAT/NT Filesystems | ||
834 | # | ||
835 | # CONFIG_MSDOS_FS is not set | ||
836 | # CONFIG_VFAT_FS is not set | ||
837 | # CONFIG_NTFS_FS is not set | ||
838 | |||
839 | # | ||
840 | # Pseudo filesystems | ||
841 | # | ||
842 | CONFIG_PROC_FS=y | ||
843 | CONFIG_SYSFS=y | ||
844 | CONFIG_TMPFS=y | ||
845 | # CONFIG_HUGETLB_PAGE is not set | ||
846 | CONFIG_RAMFS=y | ||
847 | # CONFIG_RELAYFS_FS is not set | ||
848 | |||
849 | # | ||
850 | # Miscellaneous filesystems | ||
851 | # | ||
852 | # CONFIG_ADFS_FS is not set | ||
853 | # CONFIG_AFFS_FS is not set | ||
854 | # CONFIG_HFS_FS is not set | ||
855 | # CONFIG_HFSPLUS_FS is not set | ||
856 | # CONFIG_BEFS_FS is not set | ||
857 | # CONFIG_BFS_FS is not set | ||
858 | # CONFIG_EFS_FS is not set | ||
859 | # CONFIG_JFFS_FS is not set | ||
860 | CONFIG_JFFS2_FS=y | ||
861 | CONFIG_JFFS2_FS_DEBUG=0 | ||
862 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
863 | # CONFIG_JFFS2_SUMMARY is not set | ||
864 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
865 | CONFIG_JFFS2_ZLIB=y | ||
866 | CONFIG_JFFS2_RTIME=y | ||
867 | # CONFIG_JFFS2_RUBIN is not set | ||
868 | # CONFIG_CRAMFS is not set | ||
869 | # CONFIG_VXFS_FS is not set | ||
870 | # CONFIG_HPFS_FS is not set | ||
871 | # CONFIG_QNX4FS_FS is not set | ||
872 | # CONFIG_SYSV_FS is not set | ||
873 | # CONFIG_UFS_FS is not set | ||
874 | |||
875 | # | ||
876 | # Network File Systems | ||
877 | # | ||
878 | CONFIG_NFS_FS=y | ||
879 | CONFIG_NFS_V3=y | ||
880 | # CONFIG_NFS_V3_ACL is not set | ||
881 | # CONFIG_NFS_V4 is not set | ||
882 | # CONFIG_NFS_DIRECTIO is not set | ||
883 | # CONFIG_NFSD is not set | ||
884 | CONFIG_ROOT_NFS=y | ||
885 | CONFIG_LOCKD=y | ||
886 | CONFIG_LOCKD_V4=y | ||
887 | CONFIG_NFS_COMMON=y | ||
888 | CONFIG_SUNRPC=y | ||
889 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
890 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
891 | # CONFIG_SMB_FS is not set | ||
892 | # CONFIG_CIFS is not set | ||
893 | # CONFIG_NCP_FS is not set | ||
894 | # CONFIG_CODA_FS is not set | ||
895 | # CONFIG_AFS_FS is not set | ||
896 | # CONFIG_9P_FS is not set | ||
897 | |||
898 | # | ||
899 | # Partition Types | ||
900 | # | ||
901 | CONFIG_PARTITION_ADVANCED=y | ||
902 | # CONFIG_ACORN_PARTITION is not set | ||
903 | # CONFIG_OSF_PARTITION is not set | ||
904 | # CONFIG_AMIGA_PARTITION is not set | ||
905 | # CONFIG_ATARI_PARTITION is not set | ||
906 | # CONFIG_MAC_PARTITION is not set | ||
907 | CONFIG_MSDOS_PARTITION=y | ||
908 | # CONFIG_BSD_DISKLABEL is not set | ||
909 | # CONFIG_MINIX_SUBPARTITION is not set | ||
910 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
911 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
912 | # CONFIG_LDM_PARTITION is not set | ||
913 | # CONFIG_SGI_PARTITION is not set | ||
914 | # CONFIG_ULTRIX_PARTITION is not set | ||
915 | # CONFIG_SUN_PARTITION is not set | ||
916 | # CONFIG_EFI_PARTITION is not set | ||
917 | |||
918 | # | ||
919 | # Native Language Support | ||
920 | # | ||
921 | # CONFIG_NLS is not set | ||
922 | |||
923 | # | ||
924 | # Profiling support | ||
925 | # | ||
926 | # CONFIG_PROFILING is not set | ||
927 | |||
928 | # | ||
929 | # Kernel hacking | ||
930 | # | ||
931 | # CONFIG_PRINTK_TIME is not set | ||
932 | CONFIG_DEBUG_KERNEL=y | ||
933 | CONFIG_MAGIC_SYSRQ=y | ||
934 | CONFIG_LOG_BUF_SHIFT=14 | ||
935 | CONFIG_DETECT_SOFTLOCKUP=y | ||
936 | # CONFIG_SCHEDSTATS is not set | ||
937 | # CONFIG_DEBUG_SLAB is not set | ||
938 | # CONFIG_DEBUG_SPINLOCK is not set | ||
939 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
940 | # CONFIG_DEBUG_KOBJECT is not set | ||
941 | CONFIG_DEBUG_BUGVERBOSE=y | ||
942 | # CONFIG_DEBUG_INFO is not set | ||
943 | # CONFIG_DEBUG_FS is not set | ||
944 | # CONFIG_DEBUG_VM is not set | ||
945 | CONFIG_FRAME_POINTER=y | ||
946 | # CONFIG_RCU_TORTURE_TEST is not set | ||
947 | CONFIG_DEBUG_USER=y | ||
948 | # CONFIG_DEBUG_WAITQ is not set | ||
949 | CONFIG_DEBUG_ERRORS=y | ||
950 | CONFIG_DEBUG_LL=y | ||
951 | # CONFIG_DEBUG_ICEDCC is not set | ||
952 | |||
953 | # | ||
954 | # Security options | ||
955 | # | ||
956 | # CONFIG_KEYS is not set | ||
957 | # CONFIG_SECURITY is not set | ||
958 | |||
959 | # | ||
960 | # Cryptographic options | ||
961 | # | ||
962 | # CONFIG_CRYPTO is not set | ||
963 | |||
964 | # | ||
965 | # Hardware crypto devices | ||
966 | # | ||
967 | |||
968 | # | ||
969 | # Library routines | ||
970 | # | ||
971 | # CONFIG_CRC_CCITT is not set | ||
972 | # CONFIG_CRC16 is not set | ||
973 | CONFIG_CRC32=y | ||
974 | # CONFIG_LIBCRC32C is not set | ||
975 | CONFIG_ZLIB_INFLATE=y | ||
976 | CONFIG_ZLIB_DEFLATE=y | ||
diff --git a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixp2000_defconfig index c67fc449a11f..7b02ca04c3ee 100644 --- a/arch/arm/configs/ixdp2400_defconfig +++ b/arch/arm/configs/ixp2000_defconfig | |||
@@ -1,11 +1,10 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.14-git13 | 3 | # Linux kernel version: 2.6.16-rc2 |
4 | # Thu Nov 10 15:14:13 2005 | 4 | # Wed Feb 8 04:49:11 2006 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
8 | CONFIG_UID16=y | ||
9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 9 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
11 | 10 | ||
@@ -29,27 +28,31 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 28 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
30 | CONFIG_SYSCTL=y | 29 | CONFIG_SYSCTL=y |
31 | # CONFIG_AUDIT is not set | 30 | # CONFIG_AUDIT is not set |
32 | # CONFIG_HOTPLUG is not set | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | # CONFIG_IKCONFIG is not set | 31 | # CONFIG_IKCONFIG is not set |
35 | CONFIG_INITRAMFS_SOURCE="" | 32 | CONFIG_INITRAMFS_SOURCE="" |
33 | CONFIG_UID16=y | ||
34 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
36 | CONFIG_EMBEDDED=y | 35 | CONFIG_EMBEDDED=y |
37 | CONFIG_KALLSYMS=y | 36 | CONFIG_KALLSYMS=y |
38 | # CONFIG_KALLSYMS_ALL is not set | 37 | # CONFIG_KALLSYMS_ALL is not set |
39 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 38 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
39 | # CONFIG_HOTPLUG is not set | ||
40 | CONFIG_PRINTK=y | 40 | CONFIG_PRINTK=y |
41 | CONFIG_BUG=y | 41 | CONFIG_BUG=y |
42 | CONFIG_ELF_CORE=y | ||
42 | CONFIG_BASE_FULL=y | 43 | CONFIG_BASE_FULL=y |
43 | CONFIG_FUTEX=y | 44 | CONFIG_FUTEX=y |
44 | CONFIG_EPOLL=y | 45 | CONFIG_EPOLL=y |
45 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
46 | CONFIG_SHMEM=y | 46 | CONFIG_SHMEM=y |
47 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 47 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
48 | CONFIG_CC_ALIGN_LABELS=0 | 48 | CONFIG_CC_ALIGN_LABELS=0 |
49 | CONFIG_CC_ALIGN_LOOPS=0 | 49 | CONFIG_CC_ALIGN_LOOPS=0 |
50 | CONFIG_CC_ALIGN_JUMPS=0 | 50 | CONFIG_CC_ALIGN_JUMPS=0 |
51 | CONFIG_SLAB=y | ||
51 | # CONFIG_TINY_SHMEM is not set | 52 | # CONFIG_TINY_SHMEM is not set |
52 | CONFIG_BASE_SMALL=0 | 53 | CONFIG_BASE_SMALL=0 |
54 | # CONFIG_SLOB is not set | ||
55 | CONFIG_OBSOLETE_INTERMODULE=y | ||
53 | 56 | ||
54 | # | 57 | # |
55 | # Loadable module support | 58 | # Loadable module support |
@@ -104,6 +107,7 @@ CONFIG_ARCH_IXP2000=y | |||
104 | # CONFIG_ARCH_IMX is not set | 107 | # CONFIG_ARCH_IMX is not set |
105 | # CONFIG_ARCH_H720X is not set | 108 | # CONFIG_ARCH_H720X is not set |
106 | # CONFIG_ARCH_AAEC2000 is not set | 109 | # CONFIG_ARCH_AAEC2000 is not set |
110 | # CONFIG_ARCH_AT91RM9200 is not set | ||
107 | CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y | 111 | CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y |
108 | 112 | ||
109 | # | 113 | # |
@@ -113,12 +117,13 @@ CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y | |||
113 | # | 117 | # |
114 | # IXP2400/2800 Platforms | 118 | # IXP2400/2800 Platforms |
115 | # | 119 | # |
116 | # CONFIG_ARCH_ENP2611 is not set | 120 | CONFIG_ARCH_ENP2611=y |
117 | CONFIG_ARCH_IXDP2400=y | 121 | CONFIG_ARCH_IXDP2400=y |
118 | # CONFIG_ARCH_IXDP2800 is not set | 122 | CONFIG_ARCH_IXDP2800=y |
119 | CONFIG_ARCH_IXDP2X00=y | 123 | CONFIG_ARCH_IXDP2X00=y |
120 | # CONFIG_ARCH_IXDP2401 is not set | 124 | CONFIG_ARCH_IXDP2401=y |
121 | # CONFIG_ARCH_IXDP2801 is not set | 125 | CONFIG_ARCH_IXDP2801=y |
126 | CONFIG_ARCH_IXDP2X01=y | ||
122 | # CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set | 127 | # CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set |
123 | 128 | ||
124 | # | 129 | # |
@@ -141,7 +146,6 @@ CONFIG_XSCALE_PMU=y | |||
141 | # | 146 | # |
142 | # Bus support | 147 | # Bus support |
143 | # | 148 | # |
144 | CONFIG_ISA_DMA_API=y | ||
145 | CONFIG_PCI=y | 149 | CONFIG_PCI=y |
146 | CONFIG_PCI_LEGACY_PROC=y | 150 | CONFIG_PCI_LEGACY_PROC=y |
147 | # CONFIG_PCI_DEBUG is not set | 151 | # CONFIG_PCI_DEBUG is not set |
@@ -156,6 +160,7 @@ CONFIG_PCI_LEGACY_PROC=y | |||
156 | # | 160 | # |
157 | # CONFIG_PREEMPT is not set | 161 | # CONFIG_PREEMPT is not set |
158 | # CONFIG_NO_IDLE_HZ is not set | 162 | # CONFIG_NO_IDLE_HZ is not set |
163 | # CONFIG_AEABI is not set | ||
159 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 164 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set |
160 | CONFIG_SELECT_MEMORY_MODEL=y | 165 | CONFIG_SELECT_MEMORY_MODEL=y |
161 | CONFIG_FLATMEM_MANUAL=y | 166 | CONFIG_FLATMEM_MANUAL=y |
@@ -198,6 +203,7 @@ CONFIG_BINFMT_ELF=y | |||
198 | # Power management options | 203 | # Power management options |
199 | # | 204 | # |
200 | # CONFIG_PM is not set | 205 | # CONFIG_PM is not set |
206 | # CONFIG_APM is not set | ||
201 | 207 | ||
202 | # | 208 | # |
203 | # Networking | 209 | # Networking |
@@ -243,6 +249,11 @@ CONFIG_TCP_CONG_BIC=y | |||
243 | # SCTP Configuration (EXPERIMENTAL) | 249 | # SCTP Configuration (EXPERIMENTAL) |
244 | # | 250 | # |
245 | # CONFIG_IP_SCTP is not set | 251 | # CONFIG_IP_SCTP is not set |
252 | |||
253 | # | ||
254 | # TIPC Configuration (EXPERIMENTAL) | ||
255 | # | ||
256 | # CONFIG_TIPC is not set | ||
246 | # CONFIG_ATM is not set | 257 | # CONFIG_ATM is not set |
247 | # CONFIG_BRIDGE is not set | 258 | # CONFIG_BRIDGE is not set |
248 | # CONFIG_VLAN_8021Q is not set | 259 | # CONFIG_VLAN_8021Q is not set |
@@ -260,7 +271,6 @@ CONFIG_TCP_CONG_BIC=y | |||
260 | # QoS and/or fair queueing | 271 | # QoS and/or fair queueing |
261 | # | 272 | # |
262 | # CONFIG_NET_SCHED is not set | 273 | # CONFIG_NET_SCHED is not set |
263 | # CONFIG_NET_CLS_ROUTE is not set | ||
264 | 274 | ||
265 | # | 275 | # |
266 | # Network testing | 276 | # Network testing |
@@ -284,6 +294,11 @@ CONFIG_STANDALONE=y | |||
284 | # CONFIG_DEBUG_DRIVER is not set | 294 | # CONFIG_DEBUG_DRIVER is not set |
285 | 295 | ||
286 | # | 296 | # |
297 | # Connector - unified userspace <-> kernelspace linker | ||
298 | # | ||
299 | # CONFIG_CONNECTOR is not set | ||
300 | |||
301 | # | ||
287 | # Memory Technology Devices (MTD) | 302 | # Memory Technology Devices (MTD) |
288 | # | 303 | # |
289 | CONFIG_MTD=y | 304 | CONFIG_MTD=y |
@@ -331,6 +346,7 @@ CONFIG_MTD_CFI_UTIL=y | |||
331 | # CONFIG_MTD_RAM is not set | 346 | # CONFIG_MTD_RAM is not set |
332 | # CONFIG_MTD_ROM is not set | 347 | # CONFIG_MTD_ROM is not set |
333 | # CONFIG_MTD_ABSENT is not set | 348 | # CONFIG_MTD_ABSENT is not set |
349 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
334 | # CONFIG_MTD_XIP is not set | 350 | # CONFIG_MTD_XIP is not set |
335 | 351 | ||
336 | # | 352 | # |
@@ -466,6 +482,7 @@ CONFIG_NET_PCI=y | |||
466 | # CONFIG_ADAPTEC_STARFIRE is not set | 482 | # CONFIG_ADAPTEC_STARFIRE is not set |
467 | # CONFIG_B44 is not set | 483 | # CONFIG_B44 is not set |
468 | # CONFIG_FORCEDETH is not set | 484 | # CONFIG_FORCEDETH is not set |
485 | CONFIG_CS89x0=y | ||
469 | # CONFIG_DGRS is not set | 486 | # CONFIG_DGRS is not set |
470 | CONFIG_EEPRO100=y | 487 | CONFIG_EEPRO100=y |
471 | # CONFIG_E100 is not set | 488 | # CONFIG_E100 is not set |
@@ -486,12 +503,14 @@ CONFIG_EEPRO100=y | |||
486 | # CONFIG_ACENIC is not set | 503 | # CONFIG_ACENIC is not set |
487 | # CONFIG_DL2K is not set | 504 | # CONFIG_DL2K is not set |
488 | # CONFIG_E1000 is not set | 505 | # CONFIG_E1000 is not set |
506 | CONFIG_ENP2611_MSF_NET=y | ||
489 | # CONFIG_NS83820 is not set | 507 | # CONFIG_NS83820 is not set |
490 | # CONFIG_HAMACHI is not set | 508 | # CONFIG_HAMACHI is not set |
491 | # CONFIG_YELLOWFIN is not set | 509 | # CONFIG_YELLOWFIN is not set |
492 | # CONFIG_R8169 is not set | 510 | # CONFIG_R8169 is not set |
493 | # CONFIG_SIS190 is not set | 511 | # CONFIG_SIS190 is not set |
494 | # CONFIG_SKGE is not set | 512 | # CONFIG_SKGE is not set |
513 | # CONFIG_SKY2 is not set | ||
495 | # CONFIG_SK98LIN is not set | 514 | # CONFIG_SK98LIN is not set |
496 | # CONFIG_VIA_VELOCITY is not set | 515 | # CONFIG_VIA_VELOCITY is not set |
497 | # CONFIG_TIGON3 is not set | 516 | # CONFIG_TIGON3 is not set |
@@ -595,7 +614,8 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
595 | # | 614 | # |
596 | CONFIG_SERIAL_8250=y | 615 | CONFIG_SERIAL_8250=y |
597 | CONFIG_SERIAL_8250_CONSOLE=y | 616 | CONFIG_SERIAL_8250_CONSOLE=y |
598 | CONFIG_SERIAL_8250_NR_UARTS=1 | 617 | CONFIG_SERIAL_8250_NR_UARTS=3 |
618 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
599 | # CONFIG_SERIAL_8250_EXTENDED is not set | 619 | # CONFIG_SERIAL_8250_EXTENDED is not set |
600 | 620 | ||
601 | # | 621 | # |
@@ -603,7 +623,6 @@ CONFIG_SERIAL_8250_NR_UARTS=1 | |||
603 | # | 623 | # |
604 | CONFIG_SERIAL_CORE=y | 624 | CONFIG_SERIAL_CORE=y |
605 | CONFIG_SERIAL_CORE_CONSOLE=y | 625 | CONFIG_SERIAL_CORE_CONSOLE=y |
606 | # CONFIG_SERIAL_JSM is not set | ||
607 | CONFIG_UNIX98_PTYS=y | 626 | CONFIG_UNIX98_PTYS=y |
608 | CONFIG_LEGACY_PTYS=y | 627 | CONFIG_LEGACY_PTYS=y |
609 | CONFIG_LEGACY_PTY_COUNT=256 | 628 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -705,6 +724,12 @@ CONFIG_SENSORS_EEPROM=y | |||
705 | # CONFIG_I2C_DEBUG_CHIP is not set | 724 | # CONFIG_I2C_DEBUG_CHIP is not set |
706 | 725 | ||
707 | # | 726 | # |
727 | # SPI support | ||
728 | # | ||
729 | # CONFIG_SPI is not set | ||
730 | # CONFIG_SPI_MASTER is not set | ||
731 | |||
732 | # | ||
708 | # Hardware Monitoring support | 733 | # Hardware Monitoring support |
709 | # | 734 | # |
710 | CONFIG_HWMON=y | 735 | CONFIG_HWMON=y |
@@ -738,6 +763,7 @@ CONFIG_HWMON=y | |||
738 | # CONFIG_SENSORS_SMSC47M1 is not set | 763 | # CONFIG_SENSORS_SMSC47M1 is not set |
739 | # CONFIG_SENSORS_SMSC47B397 is not set | 764 | # CONFIG_SENSORS_SMSC47B397 is not set |
740 | # CONFIG_SENSORS_VIA686A is not set | 765 | # CONFIG_SENSORS_VIA686A is not set |
766 | # CONFIG_SENSORS_VT8231 is not set | ||
741 | # CONFIG_SENSORS_W83781D is not set | 767 | # CONFIG_SENSORS_W83781D is not set |
742 | # CONFIG_SENSORS_W83792D is not set | 768 | # CONFIG_SENSORS_W83792D is not set |
743 | # CONFIG_SENSORS_W83L785TS is not set | 769 | # CONFIG_SENSORS_W83L785TS is not set |
@@ -813,6 +839,7 @@ CONFIG_FS_MBCACHE=y | |||
813 | # CONFIG_JFS_FS is not set | 839 | # CONFIG_JFS_FS is not set |
814 | CONFIG_FS_POSIX_ACL=y | 840 | CONFIG_FS_POSIX_ACL=y |
815 | # CONFIG_XFS_FS is not set | 841 | # CONFIG_XFS_FS is not set |
842 | # CONFIG_OCFS2_FS is not set | ||
816 | # CONFIG_MINIX_FS is not set | 843 | # CONFIG_MINIX_FS is not set |
817 | # CONFIG_ROMFS_FS is not set | 844 | # CONFIG_ROMFS_FS is not set |
818 | CONFIG_INOTIFY=y | 845 | CONFIG_INOTIFY=y |
@@ -844,6 +871,7 @@ CONFIG_TMPFS=y | |||
844 | # CONFIG_HUGETLB_PAGE is not set | 871 | # CONFIG_HUGETLB_PAGE is not set |
845 | CONFIG_RAMFS=y | 872 | CONFIG_RAMFS=y |
846 | # CONFIG_RELAYFS_FS is not set | 873 | # CONFIG_RELAYFS_FS is not set |
874 | # CONFIG_CONFIGFS_FS is not set | ||
847 | 875 | ||
848 | # | 876 | # |
849 | # Miscellaneous filesystems | 877 | # Miscellaneous filesystems |
@@ -912,6 +940,7 @@ CONFIG_MSDOS_PARTITION=y | |||
912 | # CONFIG_SGI_PARTITION is not set | 940 | # CONFIG_SGI_PARTITION is not set |
913 | # CONFIG_ULTRIX_PARTITION is not set | 941 | # CONFIG_ULTRIX_PARTITION is not set |
914 | # CONFIG_SUN_PARTITION is not set | 942 | # CONFIG_SUN_PARTITION is not set |
943 | # CONFIG_KARMA_PARTITION is not set | ||
915 | # CONFIG_EFI_PARTITION is not set | 944 | # CONFIG_EFI_PARTITION is not set |
916 | 945 | ||
917 | # | 946 | # |
@@ -928,12 +957,13 @@ CONFIG_MSDOS_PARTITION=y | |||
928 | # Kernel hacking | 957 | # Kernel hacking |
929 | # | 958 | # |
930 | # CONFIG_PRINTK_TIME is not set | 959 | # CONFIG_PRINTK_TIME is not set |
931 | CONFIG_DEBUG_KERNEL=y | ||
932 | CONFIG_MAGIC_SYSRQ=y | 960 | CONFIG_MAGIC_SYSRQ=y |
961 | CONFIG_DEBUG_KERNEL=y | ||
933 | CONFIG_LOG_BUF_SHIFT=14 | 962 | CONFIG_LOG_BUF_SHIFT=14 |
934 | CONFIG_DETECT_SOFTLOCKUP=y | 963 | CONFIG_DETECT_SOFTLOCKUP=y |
935 | # CONFIG_SCHEDSTATS is not set | 964 | # CONFIG_SCHEDSTATS is not set |
936 | # CONFIG_DEBUG_SLAB is not set | 965 | # CONFIG_DEBUG_SLAB is not set |
966 | CONFIG_DEBUG_MUTEXES=y | ||
937 | # CONFIG_DEBUG_SPINLOCK is not set | 967 | # CONFIG_DEBUG_SPINLOCK is not set |
938 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 968 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
939 | # CONFIG_DEBUG_KOBJECT is not set | 969 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -942,6 +972,7 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
942 | # CONFIG_DEBUG_FS is not set | 972 | # CONFIG_DEBUG_FS is not set |
943 | # CONFIG_DEBUG_VM is not set | 973 | # CONFIG_DEBUG_VM is not set |
944 | CONFIG_FRAME_POINTER=y | 974 | CONFIG_FRAME_POINTER=y |
975 | CONFIG_FORCED_INLINING=y | ||
945 | # CONFIG_RCU_TORTURE_TEST is not set | 976 | # CONFIG_RCU_TORTURE_TEST is not set |
946 | CONFIG_DEBUG_USER=y | 977 | CONFIG_DEBUG_USER=y |
947 | # CONFIG_DEBUG_WAITQ is not set | 978 | # CONFIG_DEBUG_WAITQ is not set |
diff --git a/arch/arm/configs/ixdp2800_defconfig b/arch/arm/configs/ixp23xx_defconfig index 4248123815e9..1a2751e9ab05 100644 --- a/arch/arm/configs/ixdp2800_defconfig +++ b/arch/arm/configs/ixp23xx_defconfig | |||
@@ -1,11 +1,10 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.14-git13 | 3 | # Linux kernel version: 2.6.16 |
4 | # Thu Nov 10 15:14:56 2005 | 4 | # Tue Mar 21 03:27:20 2006 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
8 | CONFIG_UID16=y | ||
9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 9 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
11 | 10 | ||
@@ -13,7 +12,6 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y | |||
13 | # Code maturity level options | 12 | # Code maturity level options |
14 | # | 13 | # |
15 | CONFIG_EXPERIMENTAL=y | 14 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | 15 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 16 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
19 | 17 | ||
@@ -29,27 +27,31 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 27 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
30 | CONFIG_SYSCTL=y | 28 | CONFIG_SYSCTL=y |
31 | # CONFIG_AUDIT is not set | 29 | # CONFIG_AUDIT is not set |
32 | # CONFIG_HOTPLUG is not set | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | # CONFIG_IKCONFIG is not set | 30 | # CONFIG_IKCONFIG is not set |
35 | CONFIG_INITRAMFS_SOURCE="" | 31 | CONFIG_INITRAMFS_SOURCE="" |
32 | CONFIG_UID16=y | ||
33 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
36 | CONFIG_EMBEDDED=y | 34 | CONFIG_EMBEDDED=y |
37 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
38 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
39 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_HOTPLUG=y | ||
40 | CONFIG_PRINTK=y | 39 | CONFIG_PRINTK=y |
41 | CONFIG_BUG=y | 40 | CONFIG_BUG=y |
41 | CONFIG_ELF_CORE=y | ||
42 | CONFIG_BASE_FULL=y | 42 | CONFIG_BASE_FULL=y |
43 | CONFIG_FUTEX=y | 43 | CONFIG_FUTEX=y |
44 | CONFIG_EPOLL=y | 44 | CONFIG_EPOLL=y |
45 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
46 | CONFIG_SHMEM=y | 45 | CONFIG_SHMEM=y |
47 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 46 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
48 | CONFIG_CC_ALIGN_LABELS=0 | 47 | CONFIG_CC_ALIGN_LABELS=0 |
49 | CONFIG_CC_ALIGN_LOOPS=0 | 48 | CONFIG_CC_ALIGN_LOOPS=0 |
50 | CONFIG_CC_ALIGN_JUMPS=0 | 49 | CONFIG_CC_ALIGN_JUMPS=0 |
50 | CONFIG_SLAB=y | ||
51 | # CONFIG_TINY_SHMEM is not set | 51 | # CONFIG_TINY_SHMEM is not set |
52 | CONFIG_BASE_SMALL=0 | 52 | CONFIG_BASE_SMALL=0 |
53 | # CONFIG_SLOB is not set | ||
54 | CONFIG_OBSOLETE_INTERMODULE=y | ||
53 | 55 | ||
54 | # | 56 | # |
55 | # Loadable module support | 57 | # Loadable module support |
@@ -86,11 +88,13 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
86 | # CONFIG_ARCH_CLPS711X is not set | 88 | # CONFIG_ARCH_CLPS711X is not set |
87 | # CONFIG_ARCH_CO285 is not set | 89 | # CONFIG_ARCH_CO285 is not set |
88 | # CONFIG_ARCH_EBSA110 is not set | 90 | # CONFIG_ARCH_EBSA110 is not set |
91 | # CONFIG_ARCH_EP93XX is not set | ||
89 | # CONFIG_ARCH_FOOTBRIDGE is not set | 92 | # CONFIG_ARCH_FOOTBRIDGE is not set |
90 | # CONFIG_ARCH_INTEGRATOR is not set | 93 | # CONFIG_ARCH_INTEGRATOR is not set |
91 | # CONFIG_ARCH_IOP3XX is not set | 94 | # CONFIG_ARCH_IOP3XX is not set |
92 | # CONFIG_ARCH_IXP4XX is not set | 95 | # CONFIG_ARCH_IXP4XX is not set |
93 | CONFIG_ARCH_IXP2000=y | 96 | # CONFIG_ARCH_IXP2000 is not set |
97 | CONFIG_ARCH_IXP23XX=y | ||
94 | # CONFIG_ARCH_L7200 is not set | 98 | # CONFIG_ARCH_L7200 is not set |
95 | # CONFIG_ARCH_PXA is not set | 99 | # CONFIG_ARCH_PXA is not set |
96 | # CONFIG_ARCH_RPC is not set | 100 | # CONFIG_ARCH_RPC is not set |
@@ -104,44 +108,40 @@ CONFIG_ARCH_IXP2000=y | |||
104 | # CONFIG_ARCH_IMX is not set | 108 | # CONFIG_ARCH_IMX is not set |
105 | # CONFIG_ARCH_H720X is not set | 109 | # CONFIG_ARCH_H720X is not set |
106 | # CONFIG_ARCH_AAEC2000 is not set | 110 | # CONFIG_ARCH_AAEC2000 is not set |
111 | # CONFIG_ARCH_AT91RM9200 is not set | ||
107 | CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y | 112 | CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y |
108 | 113 | ||
109 | # | 114 | # |
110 | # Intel IXP2400/2800 Implementation Options | 115 | # Intel IXP23xx Implementation Options |
111 | # | 116 | # |
112 | 117 | ||
113 | # | 118 | # |
114 | # IXP2400/2800 Platforms | 119 | # IXP23xx Platforms |
115 | # | 120 | # |
116 | # CONFIG_ARCH_ENP2611 is not set | 121 | CONFIG_MACH_ESPRESSO=y |
117 | # CONFIG_ARCH_IXDP2400 is not set | 122 | CONFIG_MACH_IXDP2351=y |
118 | CONFIG_ARCH_IXDP2800=y | 123 | CONFIG_MACH_ROADRUNNER=y |
119 | CONFIG_ARCH_IXDP2X00=y | ||
120 | # CONFIG_ARCH_IXDP2401 is not set | ||
121 | # CONFIG_ARCH_IXDP2801 is not set | ||
122 | # CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set | ||
123 | 124 | ||
124 | # | 125 | # |
125 | # Processor Type | 126 | # Processor Type |
126 | # | 127 | # |
127 | CONFIG_CPU_32=y | 128 | CONFIG_CPU_32=y |
128 | CONFIG_CPU_XSCALE=y | 129 | CONFIG_CPU_XSC3=y |
129 | CONFIG_CPU_32v5=y | 130 | CONFIG_CPU_32v5=y |
130 | CONFIG_CPU_ABRT_EV5T=y | 131 | CONFIG_CPU_ABRT_EV5T=y |
131 | CONFIG_CPU_CACHE_VIVT=y | 132 | CONFIG_CPU_CACHE_VIVT=y |
132 | CONFIG_CPU_TLB_V4WBI=y | 133 | CONFIG_CPU_TLB_V4WBI=y |
134 | CONFIG_IO_36=y | ||
133 | 135 | ||
134 | # | 136 | # |
135 | # Processor Features | 137 | # Processor Features |
136 | # | 138 | # |
137 | # CONFIG_ARM_THUMB is not set | 139 | # CONFIG_ARM_THUMB is not set |
138 | CONFIG_CPU_BIG_ENDIAN=y | 140 | CONFIG_CPU_BIG_ENDIAN=y |
139 | CONFIG_XSCALE_PMU=y | ||
140 | 141 | ||
141 | # | 142 | # |
142 | # Bus support | 143 | # Bus support |
143 | # | 144 | # |
144 | CONFIG_ISA_DMA_API=y | ||
145 | CONFIG_PCI=y | 145 | CONFIG_PCI=y |
146 | CONFIG_PCI_LEGACY_PROC=y | 146 | CONFIG_PCI_LEGACY_PROC=y |
147 | # CONFIG_PCI_DEBUG is not set | 147 | # CONFIG_PCI_DEBUG is not set |
@@ -156,6 +156,8 @@ CONFIG_PCI_LEGACY_PROC=y | |||
156 | # | 156 | # |
157 | # CONFIG_PREEMPT is not set | 157 | # CONFIG_PREEMPT is not set |
158 | # CONFIG_NO_IDLE_HZ is not set | 158 | # CONFIG_NO_IDLE_HZ is not set |
159 | CONFIG_HZ=100 | ||
160 | # CONFIG_AEABI is not set | ||
159 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 161 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set |
160 | CONFIG_SELECT_MEMORY_MODEL=y | 162 | CONFIG_SELECT_MEMORY_MODEL=y |
161 | CONFIG_FLATMEM_MANUAL=y | 163 | CONFIG_FLATMEM_MANUAL=y |
@@ -172,7 +174,7 @@ CONFIG_ALIGNMENT_TRAP=y | |||
172 | # | 174 | # |
173 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 175 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
174 | CONFIG_ZBOOT_ROM_BSS=0x0 | 176 | CONFIG_ZBOOT_ROM_BSS=0x0 |
175 | CONFIG_CMDLINE="console=ttyS0,9600 root=/dev/nfs ip=bootp mem=64M@0x0" | 177 | CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp" |
176 | # CONFIG_XIP_KERNEL is not set | 178 | # CONFIG_XIP_KERNEL is not set |
177 | 179 | ||
178 | # | 180 | # |
@@ -198,6 +200,7 @@ CONFIG_BINFMT_ELF=y | |||
198 | # Power management options | 200 | # Power management options |
199 | # | 201 | # |
200 | # CONFIG_PM is not set | 202 | # CONFIG_PM is not set |
203 | # CONFIG_APM is not set | ||
201 | 204 | ||
202 | # | 205 | # |
203 | # Networking | 206 | # Networking |
@@ -207,6 +210,7 @@ CONFIG_NET=y | |||
207 | # | 210 | # |
208 | # Networking options | 211 | # Networking options |
209 | # | 212 | # |
213 | # CONFIG_NETDEBUG is not set | ||
210 | CONFIG_PACKET=y | 214 | CONFIG_PACKET=y |
211 | CONFIG_PACKET_MMAP=y | 215 | CONFIG_PACKET_MMAP=y |
212 | CONFIG_UNIX=y | 216 | CONFIG_UNIX=y |
@@ -243,6 +247,11 @@ CONFIG_TCP_CONG_BIC=y | |||
243 | # SCTP Configuration (EXPERIMENTAL) | 247 | # SCTP Configuration (EXPERIMENTAL) |
244 | # | 248 | # |
245 | # CONFIG_IP_SCTP is not set | 249 | # CONFIG_IP_SCTP is not set |
250 | |||
251 | # | ||
252 | # TIPC Configuration (EXPERIMENTAL) | ||
253 | # | ||
254 | # CONFIG_TIPC is not set | ||
246 | # CONFIG_ATM is not set | 255 | # CONFIG_ATM is not set |
247 | # CONFIG_BRIDGE is not set | 256 | # CONFIG_BRIDGE is not set |
248 | # CONFIG_VLAN_8021Q is not set | 257 | # CONFIG_VLAN_8021Q is not set |
@@ -260,7 +269,6 @@ CONFIG_TCP_CONG_BIC=y | |||
260 | # QoS and/or fair queueing | 269 | # QoS and/or fair queueing |
261 | # | 270 | # |
262 | # CONFIG_NET_SCHED is not set | 271 | # CONFIG_NET_SCHED is not set |
263 | # CONFIG_NET_CLS_ROUTE is not set | ||
264 | 272 | ||
265 | # | 273 | # |
266 | # Network testing | 274 | # Network testing |
@@ -284,6 +292,11 @@ CONFIG_STANDALONE=y | |||
284 | # CONFIG_DEBUG_DRIVER is not set | 292 | # CONFIG_DEBUG_DRIVER is not set |
285 | 293 | ||
286 | # | 294 | # |
295 | # Connector - unified userspace <-> kernelspace linker | ||
296 | # | ||
297 | # CONFIG_CONNECTOR is not set | ||
298 | |||
299 | # | ||
287 | # Memory Technology Devices (MTD) | 300 | # Memory Technology Devices (MTD) |
288 | # | 301 | # |
289 | CONFIG_MTD=y | 302 | CONFIG_MTD=y |
@@ -331,15 +344,17 @@ CONFIG_MTD_CFI_UTIL=y | |||
331 | # CONFIG_MTD_RAM is not set | 344 | # CONFIG_MTD_RAM is not set |
332 | # CONFIG_MTD_ROM is not set | 345 | # CONFIG_MTD_ROM is not set |
333 | # CONFIG_MTD_ABSENT is not set | 346 | # CONFIG_MTD_ABSENT is not set |
334 | # CONFIG_MTD_XIP is not set | 347 | # CONFIG_MTD_OBSOLETE_CHIPS is not set |
335 | 348 | ||
336 | # | 349 | # |
337 | # Mapping drivers for chip access | 350 | # Mapping drivers for chip access |
338 | # | 351 | # |
339 | CONFIG_MTD_COMPLEX_MAPPINGS=y | 352 | CONFIG_MTD_COMPLEX_MAPPINGS=y |
340 | # CONFIG_MTD_PHYSMAP is not set | 353 | CONFIG_MTD_PHYSMAP=y |
354 | CONFIG_MTD_PHYSMAP_START=0x0 | ||
355 | CONFIG_MTD_PHYSMAP_LEN=0x0 | ||
356 | CONFIG_MTD_PHYSMAP_BANKWIDTH=1 | ||
341 | # CONFIG_MTD_ARM_INTEGRATOR is not set | 357 | # CONFIG_MTD_ARM_INTEGRATOR is not set |
342 | CONFIG_MTD_IXP2000=y | ||
343 | # CONFIG_MTD_PCI is not set | 358 | # CONFIG_MTD_PCI is not set |
344 | # CONFIG_MTD_PLATRAM is not set | 359 | # CONFIG_MTD_PLATRAM is not set |
345 | 360 | ||
@@ -391,6 +406,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
391 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 406 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
392 | # CONFIG_BLK_DEV_NBD is not set | 407 | # CONFIG_BLK_DEV_NBD is not set |
393 | # CONFIG_BLK_DEV_SX8 is not set | 408 | # CONFIG_BLK_DEV_SX8 is not set |
409 | # CONFIG_BLK_DEV_UB is not set | ||
394 | CONFIG_BLK_DEV_RAM=y | 410 | CONFIG_BLK_DEV_RAM=y |
395 | CONFIG_BLK_DEV_RAM_COUNT=16 | 411 | CONFIG_BLK_DEV_RAM_COUNT=16 |
396 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 412 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
@@ -399,10 +415,126 @@ CONFIG_BLK_DEV_INITRD=y | |||
399 | # CONFIG_ATA_OVER_ETH is not set | 415 | # CONFIG_ATA_OVER_ETH is not set |
400 | 416 | ||
401 | # | 417 | # |
418 | # ATA/ATAPI/MFM/RLL support | ||
419 | # | ||
420 | CONFIG_IDE=y | ||
421 | CONFIG_BLK_DEV_IDE=y | ||
422 | |||
423 | # | ||
424 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
425 | # | ||
426 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
427 | CONFIG_BLK_DEV_IDEDISK=y | ||
428 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
429 | # CONFIG_BLK_DEV_IDECD is not set | ||
430 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
431 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
432 | # CONFIG_BLK_DEV_IDESCSI is not set | ||
433 | # CONFIG_IDE_TASK_IOCTL is not set | ||
434 | |||
435 | # | ||
436 | # IDE chipset support/bugfixes | ||
437 | # | ||
438 | CONFIG_IDE_GENERIC=y | ||
439 | CONFIG_BLK_DEV_IDEPCI=y | ||
440 | # CONFIG_IDEPCI_SHARE_IRQ is not set | ||
441 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
442 | # CONFIG_BLK_DEV_GENERIC is not set | ||
443 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
444 | # CONFIG_BLK_DEV_SL82C105 is not set | ||
445 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
446 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
447 | # CONFIG_IDEDMA_PCI_AUTO is not set | ||
448 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
449 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
450 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
451 | # CONFIG_BLK_DEV_CMD64X is not set | ||
452 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
453 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
454 | # CONFIG_BLK_DEV_CS5520 is not set | ||
455 | # CONFIG_BLK_DEV_CS5530 is not set | ||
456 | # CONFIG_BLK_DEV_HPT34X is not set | ||
457 | # CONFIG_BLK_DEV_HPT366 is not set | ||
458 | # CONFIG_BLK_DEV_SC1200 is not set | ||
459 | # CONFIG_BLK_DEV_PIIX is not set | ||
460 | # CONFIG_BLK_DEV_IT821X is not set | ||
461 | # CONFIG_BLK_DEV_NS87415 is not set | ||
462 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
463 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
464 | # CONFIG_BLK_DEV_SVWKS is not set | ||
465 | CONFIG_BLK_DEV_SIIMAGE=y | ||
466 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
467 | # CONFIG_BLK_DEV_TRM290 is not set | ||
468 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
469 | # CONFIG_IDE_ARM is not set | ||
470 | CONFIG_BLK_DEV_IDEDMA=y | ||
471 | # CONFIG_IDEDMA_IVB is not set | ||
472 | # CONFIG_IDEDMA_AUTO is not set | ||
473 | # CONFIG_BLK_DEV_HD is not set | ||
474 | |||
475 | # | ||
402 | # SCSI device support | 476 | # SCSI device support |
403 | # | 477 | # |
404 | # CONFIG_RAID_ATTRS is not set | 478 | # CONFIG_RAID_ATTRS is not set |
405 | # CONFIG_SCSI is not set | 479 | CONFIG_SCSI=y |
480 | CONFIG_SCSI_PROC_FS=y | ||
481 | |||
482 | # | ||
483 | # SCSI support type (disk, tape, CD-ROM) | ||
484 | # | ||
485 | CONFIG_BLK_DEV_SD=y | ||
486 | # CONFIG_CHR_DEV_ST is not set | ||
487 | # CONFIG_CHR_DEV_OSST is not set | ||
488 | # CONFIG_BLK_DEV_SR is not set | ||
489 | # CONFIG_CHR_DEV_SG is not set | ||
490 | # CONFIG_CHR_DEV_SCH is not set | ||
491 | |||
492 | # | ||
493 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
494 | # | ||
495 | # CONFIG_SCSI_MULTI_LUN is not set | ||
496 | # CONFIG_SCSI_CONSTANTS is not set | ||
497 | # CONFIG_SCSI_LOGGING is not set | ||
498 | |||
499 | # | ||
500 | # SCSI Transport Attributes | ||
501 | # | ||
502 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
503 | # CONFIG_SCSI_FC_ATTRS is not set | ||
504 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
505 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
506 | |||
507 | # | ||
508 | # SCSI low-level drivers | ||
509 | # | ||
510 | # CONFIG_ISCSI_TCP is not set | ||
511 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
512 | # CONFIG_SCSI_3W_9XXX is not set | ||
513 | # CONFIG_SCSI_ACARD is not set | ||
514 | # CONFIG_SCSI_AACRAID is not set | ||
515 | # CONFIG_SCSI_AIC7XXX is not set | ||
516 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
517 | # CONFIG_SCSI_AIC79XX is not set | ||
518 | # CONFIG_SCSI_DPT_I2O is not set | ||
519 | # CONFIG_MEGARAID_NEWGEN is not set | ||
520 | # CONFIG_MEGARAID_LEGACY is not set | ||
521 | # CONFIG_MEGARAID_SAS is not set | ||
522 | # CONFIG_SCSI_SATA is not set | ||
523 | # CONFIG_SCSI_DMX3191D is not set | ||
524 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
525 | # CONFIG_SCSI_IPS is not set | ||
526 | # CONFIG_SCSI_INITIO is not set | ||
527 | # CONFIG_SCSI_INIA100 is not set | ||
528 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
529 | # CONFIG_SCSI_IPR is not set | ||
530 | # CONFIG_SCSI_QLOGIC_FC is not set | ||
531 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
532 | # CONFIG_SCSI_QLA_FC is not set | ||
533 | # CONFIG_SCSI_LPFC is not set | ||
534 | # CONFIG_SCSI_DC395x is not set | ||
535 | # CONFIG_SCSI_DC390T is not set | ||
536 | # CONFIG_SCSI_NSP32 is not set | ||
537 | # CONFIG_SCSI_DEBUG is not set | ||
406 | 538 | ||
407 | # | 539 | # |
408 | # Multi-device support (RAID and LVM) | 540 | # Multi-device support (RAID and LVM) |
@@ -413,6 +545,9 @@ CONFIG_BLK_DEV_INITRD=y | |||
413 | # Fusion MPT device support | 545 | # Fusion MPT device support |
414 | # | 546 | # |
415 | # CONFIG_FUSION is not set | 547 | # CONFIG_FUSION is not set |
548 | # CONFIG_FUSION_SPI is not set | ||
549 | # CONFIG_FUSION_FC is not set | ||
550 | # CONFIG_FUSION_SAS is not set | ||
416 | 551 | ||
417 | # | 552 | # |
418 | # IEEE 1394 (FireWire) support | 553 | # IEEE 1394 (FireWire) support |
@@ -466,9 +601,10 @@ CONFIG_NET_PCI=y | |||
466 | # CONFIG_ADAPTEC_STARFIRE is not set | 601 | # CONFIG_ADAPTEC_STARFIRE is not set |
467 | # CONFIG_B44 is not set | 602 | # CONFIG_B44 is not set |
468 | # CONFIG_FORCEDETH is not set | 603 | # CONFIG_FORCEDETH is not set |
604 | # CONFIG_CS89x0 is not set | ||
469 | # CONFIG_DGRS is not set | 605 | # CONFIG_DGRS is not set |
470 | CONFIG_EEPRO100=y | 606 | # CONFIG_EEPRO100 is not set |
471 | # CONFIG_E100 is not set | 607 | CONFIG_E100=y |
472 | # CONFIG_FEALNX is not set | 608 | # CONFIG_FEALNX is not set |
473 | # CONFIG_NATSEMI is not set | 609 | # CONFIG_NATSEMI is not set |
474 | # CONFIG_NE2K_PCI is not set | 610 | # CONFIG_NE2K_PCI is not set |
@@ -485,13 +621,16 @@ CONFIG_EEPRO100=y | |||
485 | # | 621 | # |
486 | # CONFIG_ACENIC is not set | 622 | # CONFIG_ACENIC is not set |
487 | # CONFIG_DL2K is not set | 623 | # CONFIG_DL2K is not set |
488 | # CONFIG_E1000 is not set | 624 | CONFIG_E1000=y |
625 | CONFIG_E1000_NAPI=y | ||
626 | # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set | ||
489 | # CONFIG_NS83820 is not set | 627 | # CONFIG_NS83820 is not set |
490 | # CONFIG_HAMACHI is not set | 628 | # CONFIG_HAMACHI is not set |
491 | # CONFIG_YELLOWFIN is not set | 629 | # CONFIG_YELLOWFIN is not set |
492 | # CONFIG_R8169 is not set | 630 | # CONFIG_R8169 is not set |
493 | # CONFIG_SIS190 is not set | 631 | # CONFIG_SIS190 is not set |
494 | # CONFIG_SKGE is not set | 632 | # CONFIG_SKGE is not set |
633 | # CONFIG_SKY2 is not set | ||
495 | # CONFIG_SK98LIN is not set | 634 | # CONFIG_SK98LIN is not set |
496 | # CONFIG_VIA_VELOCITY is not set | 635 | # CONFIG_VIA_VELOCITY is not set |
497 | # CONFIG_TIGON3 is not set | 636 | # CONFIG_TIGON3 is not set |
@@ -542,6 +681,7 @@ CONFIG_DLCI_MAX=8 | |||
542 | # CONFIG_HIPPI is not set | 681 | # CONFIG_HIPPI is not set |
543 | # CONFIG_PPP is not set | 682 | # CONFIG_PPP is not set |
544 | # CONFIG_SLIP is not set | 683 | # CONFIG_SLIP is not set |
684 | # CONFIG_NET_FC is not set | ||
545 | # CONFIG_SHAPER is not set | 685 | # CONFIG_SHAPER is not set |
546 | # CONFIG_NETCONSOLE is not set | 686 | # CONFIG_NETCONSOLE is not set |
547 | # CONFIG_NETPOLL is not set | 687 | # CONFIG_NETPOLL is not set |
@@ -595,7 +735,8 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
595 | # | 735 | # |
596 | CONFIG_SERIAL_8250=y | 736 | CONFIG_SERIAL_8250=y |
597 | CONFIG_SERIAL_8250_CONSOLE=y | 737 | CONFIG_SERIAL_8250_CONSOLE=y |
598 | CONFIG_SERIAL_8250_NR_UARTS=1 | 738 | CONFIG_SERIAL_8250_NR_UARTS=4 |
739 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
599 | # CONFIG_SERIAL_8250_EXTENDED is not set | 740 | # CONFIG_SERIAL_8250_EXTENDED is not set |
600 | 741 | ||
601 | # | 742 | # |
@@ -623,13 +764,17 @@ CONFIG_WATCHDOG=y | |||
623 | # Watchdog Device Drivers | 764 | # Watchdog Device Drivers |
624 | # | 765 | # |
625 | # CONFIG_SOFT_WATCHDOG is not set | 766 | # CONFIG_SOFT_WATCHDOG is not set |
626 | CONFIG_IXP2000_WATCHDOG=y | ||
627 | 767 | ||
628 | # | 768 | # |
629 | # PCI-based Watchdog Cards | 769 | # PCI-based Watchdog Cards |
630 | # | 770 | # |
631 | # CONFIG_PCIPCWATCHDOG is not set | 771 | # CONFIG_PCIPCWATCHDOG is not set |
632 | # CONFIG_WDTPCI is not set | 772 | # CONFIG_WDTPCI is not set |
773 | |||
774 | # | ||
775 | # USB-based Watchdog Cards | ||
776 | # | ||
777 | # CONFIG_USBPCWATCHDOG is not set | ||
633 | # CONFIG_NVRAM is not set | 778 | # CONFIG_NVRAM is not set |
634 | # CONFIG_RTC is not set | 779 | # CONFIG_RTC is not set |
635 | # CONFIG_DTLK is not set | 780 | # CONFIG_DTLK is not set |
@@ -672,7 +817,6 @@ CONFIG_I2C_ALGOBIT=y | |||
672 | # CONFIG_I2C_I801 is not set | 817 | # CONFIG_I2C_I801 is not set |
673 | # CONFIG_I2C_I810 is not set | 818 | # CONFIG_I2C_I810 is not set |
674 | # CONFIG_I2C_PIIX4 is not set | 819 | # CONFIG_I2C_PIIX4 is not set |
675 | CONFIG_I2C_IXP2000=y | ||
676 | # CONFIG_I2C_NFORCE2 is not set | 820 | # CONFIG_I2C_NFORCE2 is not set |
677 | # CONFIG_I2C_PARPORT_LIGHT is not set | 821 | # CONFIG_I2C_PARPORT_LIGHT is not set |
678 | # CONFIG_I2C_PROSAVAGE is not set | 822 | # CONFIG_I2C_PROSAVAGE is not set |
@@ -705,6 +849,17 @@ CONFIG_SENSORS_EEPROM=y | |||
705 | # CONFIG_I2C_DEBUG_CHIP is not set | 849 | # CONFIG_I2C_DEBUG_CHIP is not set |
706 | 850 | ||
707 | # | 851 | # |
852 | # SPI support | ||
853 | # | ||
854 | # CONFIG_SPI is not set | ||
855 | # CONFIG_SPI_MASTER is not set | ||
856 | |||
857 | # | ||
858 | # Dallas's 1-wire bus | ||
859 | # | ||
860 | # CONFIG_W1 is not set | ||
861 | |||
862 | # | ||
708 | # Hardware Monitoring support | 863 | # Hardware Monitoring support |
709 | # | 864 | # |
710 | CONFIG_HWMON=y | 865 | CONFIG_HWMON=y |
@@ -717,6 +872,7 @@ CONFIG_HWMON=y | |||
717 | # CONFIG_SENSORS_ASB100 is not set | 872 | # CONFIG_SENSORS_ASB100 is not set |
718 | # CONFIG_SENSORS_ATXP1 is not set | 873 | # CONFIG_SENSORS_ATXP1 is not set |
719 | # CONFIG_SENSORS_DS1621 is not set | 874 | # CONFIG_SENSORS_DS1621 is not set |
875 | # CONFIG_SENSORS_F71805F is not set | ||
720 | # CONFIG_SENSORS_FSCHER is not set | 876 | # CONFIG_SENSORS_FSCHER is not set |
721 | # CONFIG_SENSORS_FSCPOS is not set | 877 | # CONFIG_SENSORS_FSCPOS is not set |
722 | # CONFIG_SENSORS_GL518SM is not set | 878 | # CONFIG_SENSORS_GL518SM is not set |
@@ -738,6 +894,7 @@ CONFIG_HWMON=y | |||
738 | # CONFIG_SENSORS_SMSC47M1 is not set | 894 | # CONFIG_SENSORS_SMSC47M1 is not set |
739 | # CONFIG_SENSORS_SMSC47B397 is not set | 895 | # CONFIG_SENSORS_SMSC47B397 is not set |
740 | # CONFIG_SENSORS_VIA686A is not set | 896 | # CONFIG_SENSORS_VIA686A is not set |
897 | # CONFIG_SENSORS_VT8231 is not set | ||
741 | # CONFIG_SENSORS_W83781D is not set | 898 | # CONFIG_SENSORS_W83781D is not set |
742 | # CONFIG_SENSORS_W83792D is not set | 899 | # CONFIG_SENSORS_W83792D is not set |
743 | # CONFIG_SENSORS_W83L785TS is not set | 900 | # CONFIG_SENSORS_W83L785TS is not set |
@@ -778,13 +935,137 @@ CONFIG_HWMON=y | |||
778 | # | 935 | # |
779 | CONFIG_USB_ARCH_HAS_HCD=y | 936 | CONFIG_USB_ARCH_HAS_HCD=y |
780 | CONFIG_USB_ARCH_HAS_OHCI=y | 937 | CONFIG_USB_ARCH_HAS_OHCI=y |
781 | # CONFIG_USB is not set | 938 | CONFIG_USB=y |
939 | # CONFIG_USB_DEBUG is not set | ||
940 | |||
941 | # | ||
942 | # Miscellaneous USB options | ||
943 | # | ||
944 | # CONFIG_USB_DEVICEFS is not set | ||
945 | # CONFIG_USB_BANDWIDTH is not set | ||
946 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
947 | # CONFIG_USB_OTG is not set | ||
948 | |||
949 | # | ||
950 | # USB Host Controller Drivers | ||
951 | # | ||
952 | CONFIG_USB_EHCI_HCD=y | ||
953 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | ||
954 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | ||
955 | # CONFIG_USB_ISP116X_HCD is not set | ||
956 | CONFIG_USB_OHCI_HCD=y | ||
957 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
958 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
959 | CONFIG_USB_UHCI_HCD=y | ||
960 | # CONFIG_USB_SL811_HCD is not set | ||
961 | |||
962 | # | ||
963 | # USB Device Class drivers | ||
964 | # | ||
965 | # CONFIG_USB_ACM is not set | ||
966 | # CONFIG_USB_PRINTER is not set | ||
782 | 967 | ||
783 | # | 968 | # |
784 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 969 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
785 | # | 970 | # |
786 | 971 | ||
787 | # | 972 | # |
973 | # may also be needed; see USB_STORAGE Help for more information | ||
974 | # | ||
975 | CONFIG_USB_STORAGE=y | ||
976 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
977 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
978 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
979 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
980 | # CONFIG_USB_STORAGE_DPCM is not set | ||
981 | # CONFIG_USB_STORAGE_USBAT is not set | ||
982 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
983 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
984 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
985 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
986 | # CONFIG_USB_LIBUSUAL is not set | ||
987 | |||
988 | # | ||
989 | # USB Input Devices | ||
990 | # | ||
991 | # CONFIG_USB_HID is not set | ||
992 | |||
993 | # | ||
994 | # USB HID Boot Protocol drivers | ||
995 | # | ||
996 | # CONFIG_USB_KBD is not set | ||
997 | # CONFIG_USB_MOUSE is not set | ||
998 | # CONFIG_USB_AIPTEK is not set | ||
999 | # CONFIG_USB_WACOM is not set | ||
1000 | # CONFIG_USB_ACECAD is not set | ||
1001 | # CONFIG_USB_KBTAB is not set | ||
1002 | # CONFIG_USB_POWERMATE is not set | ||
1003 | # CONFIG_USB_MTOUCH is not set | ||
1004 | # CONFIG_USB_ITMTOUCH is not set | ||
1005 | # CONFIG_USB_EGALAX is not set | ||
1006 | # CONFIG_USB_YEALINK is not set | ||
1007 | # CONFIG_USB_XPAD is not set | ||
1008 | # CONFIG_USB_ATI_REMOTE is not set | ||
1009 | # CONFIG_USB_ATI_REMOTE2 is not set | ||
1010 | # CONFIG_USB_KEYSPAN_REMOTE is not set | ||
1011 | # CONFIG_USB_APPLETOUCH is not set | ||
1012 | |||
1013 | # | ||
1014 | # USB Imaging devices | ||
1015 | # | ||
1016 | # CONFIG_USB_MDC800 is not set | ||
1017 | # CONFIG_USB_MICROTEK is not set | ||
1018 | |||
1019 | # | ||
1020 | # USB Multimedia devices | ||
1021 | # | ||
1022 | # CONFIG_USB_DABUSB is not set | ||
1023 | |||
1024 | # | ||
1025 | # Video4Linux support is needed for USB Multimedia device support | ||
1026 | # | ||
1027 | |||
1028 | # | ||
1029 | # USB Network Adapters | ||
1030 | # | ||
1031 | # CONFIG_USB_CATC is not set | ||
1032 | # CONFIG_USB_KAWETH is not set | ||
1033 | # CONFIG_USB_PEGASUS is not set | ||
1034 | # CONFIG_USB_RTL8150 is not set | ||
1035 | # CONFIG_USB_USBNET is not set | ||
1036 | CONFIG_USB_MON=y | ||
1037 | |||
1038 | # | ||
1039 | # USB port drivers | ||
1040 | # | ||
1041 | |||
1042 | # | ||
1043 | # USB Serial Converter support | ||
1044 | # | ||
1045 | # CONFIG_USB_SERIAL is not set | ||
1046 | |||
1047 | # | ||
1048 | # USB Miscellaneous drivers | ||
1049 | # | ||
1050 | # CONFIG_USB_EMI62 is not set | ||
1051 | # CONFIG_USB_EMI26 is not set | ||
1052 | # CONFIG_USB_AUERSWALD is not set | ||
1053 | # CONFIG_USB_RIO500 is not set | ||
1054 | # CONFIG_USB_LEGOTOWER is not set | ||
1055 | # CONFIG_USB_LCD is not set | ||
1056 | # CONFIG_USB_LED is not set | ||
1057 | # CONFIG_USB_CYTHERM is not set | ||
1058 | # CONFIG_USB_PHIDGETKIT is not set | ||
1059 | # CONFIG_USB_PHIDGETSERVO is not set | ||
1060 | # CONFIG_USB_IDMOUSE is not set | ||
1061 | # CONFIG_USB_SISUSBVGA is not set | ||
1062 | # CONFIG_USB_LD is not set | ||
1063 | |||
1064 | # | ||
1065 | # USB DSL modem support | ||
1066 | # | ||
1067 | |||
1068 | # | ||
788 | # USB Gadget Support | 1069 | # USB Gadget Support |
789 | # | 1070 | # |
790 | # CONFIG_USB_GADGET is not set | 1071 | # CONFIG_USB_GADGET is not set |
@@ -813,6 +1094,7 @@ CONFIG_FS_MBCACHE=y | |||
813 | # CONFIG_JFS_FS is not set | 1094 | # CONFIG_JFS_FS is not set |
814 | CONFIG_FS_POSIX_ACL=y | 1095 | CONFIG_FS_POSIX_ACL=y |
815 | # CONFIG_XFS_FS is not set | 1096 | # CONFIG_XFS_FS is not set |
1097 | # CONFIG_OCFS2_FS is not set | ||
816 | # CONFIG_MINIX_FS is not set | 1098 | # CONFIG_MINIX_FS is not set |
817 | # CONFIG_ROMFS_FS is not set | 1099 | # CONFIG_ROMFS_FS is not set |
818 | CONFIG_INOTIFY=y | 1100 | CONFIG_INOTIFY=y |
@@ -831,8 +1113,10 @@ CONFIG_DNOTIFY=y | |||
831 | # | 1113 | # |
832 | # DOS/FAT/NT Filesystems | 1114 | # DOS/FAT/NT Filesystems |
833 | # | 1115 | # |
834 | # CONFIG_MSDOS_FS is not set | 1116 | CONFIG_FAT_FS=y |
1117 | CONFIG_MSDOS_FS=y | ||
835 | # CONFIG_VFAT_FS is not set | 1118 | # CONFIG_VFAT_FS is not set |
1119 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
836 | # CONFIG_NTFS_FS is not set | 1120 | # CONFIG_NTFS_FS is not set |
837 | 1121 | ||
838 | # | 1122 | # |
@@ -844,6 +1128,7 @@ CONFIG_TMPFS=y | |||
844 | # CONFIG_HUGETLB_PAGE is not set | 1128 | # CONFIG_HUGETLB_PAGE is not set |
845 | CONFIG_RAMFS=y | 1129 | CONFIG_RAMFS=y |
846 | # CONFIG_RELAYFS_FS is not set | 1130 | # CONFIG_RELAYFS_FS is not set |
1131 | # CONFIG_CONFIGFS_FS is not set | ||
847 | 1132 | ||
848 | # | 1133 | # |
849 | # Miscellaneous filesystems | 1134 | # Miscellaneous filesystems |
@@ -912,12 +1197,52 @@ CONFIG_MSDOS_PARTITION=y | |||
912 | # CONFIG_SGI_PARTITION is not set | 1197 | # CONFIG_SGI_PARTITION is not set |
913 | # CONFIG_ULTRIX_PARTITION is not set | 1198 | # CONFIG_ULTRIX_PARTITION is not set |
914 | # CONFIG_SUN_PARTITION is not set | 1199 | # CONFIG_SUN_PARTITION is not set |
1200 | # CONFIG_KARMA_PARTITION is not set | ||
915 | # CONFIG_EFI_PARTITION is not set | 1201 | # CONFIG_EFI_PARTITION is not set |
916 | 1202 | ||
917 | # | 1203 | # |
918 | # Native Language Support | 1204 | # Native Language Support |
919 | # | 1205 | # |
920 | # CONFIG_NLS is not set | 1206 | CONFIG_NLS=y |
1207 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1208 | CONFIG_NLS_CODEPAGE_437=y | ||
1209 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1210 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1211 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1212 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1213 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1214 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1215 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1216 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1217 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1218 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1219 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1220 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1221 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1222 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1223 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1224 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1225 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1226 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1227 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1228 | # CONFIG_NLS_ISO8859_8 is not set | ||
1229 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1230 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1231 | # CONFIG_NLS_ASCII is not set | ||
1232 | # CONFIG_NLS_ISO8859_1 is not set | ||
1233 | # CONFIG_NLS_ISO8859_2 is not set | ||
1234 | # CONFIG_NLS_ISO8859_3 is not set | ||
1235 | # CONFIG_NLS_ISO8859_4 is not set | ||
1236 | # CONFIG_NLS_ISO8859_5 is not set | ||
1237 | # CONFIG_NLS_ISO8859_6 is not set | ||
1238 | # CONFIG_NLS_ISO8859_7 is not set | ||
1239 | # CONFIG_NLS_ISO8859_9 is not set | ||
1240 | # CONFIG_NLS_ISO8859_13 is not set | ||
1241 | # CONFIG_NLS_ISO8859_14 is not set | ||
1242 | # CONFIG_NLS_ISO8859_15 is not set | ||
1243 | # CONFIG_NLS_KOI8_R is not set | ||
1244 | # CONFIG_NLS_KOI8_U is not set | ||
1245 | # CONFIG_NLS_UTF8 is not set | ||
921 | 1246 | ||
922 | # | 1247 | # |
923 | # Profiling support | 1248 | # Profiling support |
@@ -928,12 +1253,13 @@ CONFIG_MSDOS_PARTITION=y | |||
928 | # Kernel hacking | 1253 | # Kernel hacking |
929 | # | 1254 | # |
930 | # CONFIG_PRINTK_TIME is not set | 1255 | # CONFIG_PRINTK_TIME is not set |
931 | CONFIG_DEBUG_KERNEL=y | ||
932 | CONFIG_MAGIC_SYSRQ=y | 1256 | CONFIG_MAGIC_SYSRQ=y |
1257 | CONFIG_DEBUG_KERNEL=y | ||
933 | CONFIG_LOG_BUF_SHIFT=14 | 1258 | CONFIG_LOG_BUF_SHIFT=14 |
934 | CONFIG_DETECT_SOFTLOCKUP=y | 1259 | CONFIG_DETECT_SOFTLOCKUP=y |
935 | # CONFIG_SCHEDSTATS is not set | 1260 | # CONFIG_SCHEDSTATS is not set |
936 | # CONFIG_DEBUG_SLAB is not set | 1261 | # CONFIG_DEBUG_SLAB is not set |
1262 | CONFIG_DEBUG_MUTEXES=y | ||
937 | # CONFIG_DEBUG_SPINLOCK is not set | 1263 | # CONFIG_DEBUG_SPINLOCK is not set |
938 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1264 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
939 | # CONFIG_DEBUG_KOBJECT is not set | 1265 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -942,6 +1268,7 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
942 | # CONFIG_DEBUG_FS is not set | 1268 | # CONFIG_DEBUG_FS is not set |
943 | # CONFIG_DEBUG_VM is not set | 1269 | # CONFIG_DEBUG_VM is not set |
944 | CONFIG_FRAME_POINTER=y | 1270 | CONFIG_FRAME_POINTER=y |
1271 | CONFIG_FORCED_INLINING=y | ||
945 | # CONFIG_RCU_TORTURE_TEST is not set | 1272 | # CONFIG_RCU_TORTURE_TEST is not set |
946 | CONFIG_DEBUG_USER=y | 1273 | CONFIG_DEBUG_USER=y |
947 | # CONFIG_DEBUG_WAITQ is not set | 1274 | # CONFIG_DEBUG_WAITQ is not set |
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig index 6695b07cf1ba..3cec29d56c8e 100644 --- a/arch/arm/configs/s3c2410_defconfig +++ b/arch/arm/configs/s3c2410_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.16-rc2 | 3 | # Linux kernel version: 2.6.16 |
4 | # Mon Feb 6 11:17:23 2006 | 4 | # Mon Mar 20 20:36:02 2006 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -12,7 +12,6 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y | |||
12 | # Code maturity level options | 12 | # Code maturity level options |
13 | # | 13 | # |
14 | CONFIG_EXPERIMENTAL=y | 14 | CONFIG_EXPERIMENTAL=y |
15 | CONFIG_CLEAN_COMPILE=y | ||
16 | CONFIG_BROKEN_ON_SMP=y | 15 | CONFIG_BROKEN_ON_SMP=y |
17 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 16 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
18 | 17 | ||
@@ -87,6 +86,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
87 | # CONFIG_ARCH_CLPS711X is not set | 86 | # CONFIG_ARCH_CLPS711X is not set |
88 | # CONFIG_ARCH_CO285 is not set | 87 | # CONFIG_ARCH_CO285 is not set |
89 | # CONFIG_ARCH_EBSA110 is not set | 88 | # CONFIG_ARCH_EBSA110 is not set |
89 | # CONFIG_ARCH_EP93XX is not set | ||
90 | # CONFIG_ARCH_FOOTBRIDGE is not set | 90 | # CONFIG_ARCH_FOOTBRIDGE is not set |
91 | # CONFIG_ARCH_INTEGRATOR is not set | 91 | # CONFIG_ARCH_INTEGRATOR is not set |
92 | # CONFIG_ARCH_IOP3XX is not set | 92 | # CONFIG_ARCH_IOP3XX is not set |
@@ -111,6 +111,7 @@ CONFIG_ARCH_S3C2410=y | |||
111 | # S3C24XX Implementations | 111 | # S3C24XX Implementations |
112 | # | 112 | # |
113 | CONFIG_MACH_ANUBIS=y | 113 | CONFIG_MACH_ANUBIS=y |
114 | CONFIG_MACH_OSIRIS=y | ||
114 | CONFIG_ARCH_BAST=y | 115 | CONFIG_ARCH_BAST=y |
115 | CONFIG_BAST_PC104_IRQ=y | 116 | CONFIG_BAST_PC104_IRQ=y |
116 | CONFIG_ARCH_H1940=y | 117 | CONFIG_ARCH_H1940=y |
@@ -175,6 +176,7 @@ CONFIG_ISA=y | |||
175 | # | 176 | # |
176 | # CONFIG_PREEMPT is not set | 177 | # CONFIG_PREEMPT is not set |
177 | # CONFIG_NO_IDLE_HZ is not set | 178 | # CONFIG_NO_IDLE_HZ is not set |
179 | CONFIG_HZ=200 | ||
178 | # CONFIG_AEABI is not set | 180 | # CONFIG_AEABI is not set |
179 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 181 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set |
180 | CONFIG_SELECT_MEMORY_MODEL=y | 182 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -230,6 +232,7 @@ CONFIG_NET=y | |||
230 | # | 232 | # |
231 | # Networking options | 233 | # Networking options |
232 | # | 234 | # |
235 | # CONFIG_NETDEBUG is not set | ||
233 | # CONFIG_PACKET is not set | 236 | # CONFIG_PACKET is not set |
234 | CONFIG_UNIX=y | 237 | CONFIG_UNIX=y |
235 | # CONFIG_NET_KEY is not set | 238 | # CONFIG_NET_KEY is not set |
@@ -364,7 +367,6 @@ CONFIG_MTD_CFI_UTIL=y | |||
364 | CONFIG_MTD_ROM=y | 367 | CONFIG_MTD_ROM=y |
365 | # CONFIG_MTD_ABSENT is not set | 368 | # CONFIG_MTD_ABSENT is not set |
366 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | 369 | # CONFIG_MTD_OBSOLETE_CHIPS is not set |
367 | # CONFIG_MTD_XIP is not set | ||
368 | 370 | ||
369 | # | 371 | # |
370 | # Mapping drivers for chip access | 372 | # Mapping drivers for chip access |
@@ -431,6 +433,7 @@ CONFIG_PARPORT_1284=y | |||
431 | CONFIG_BLK_DEV_LOOP=y | 433 | CONFIG_BLK_DEV_LOOP=y |
432 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 434 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
433 | CONFIG_BLK_DEV_NBD=m | 435 | CONFIG_BLK_DEV_NBD=m |
436 | # CONFIG_BLK_DEV_UB is not set | ||
434 | CONFIG_BLK_DEV_RAM=y | 437 | CONFIG_BLK_DEV_RAM=y |
435 | CONFIG_BLK_DEV_RAM_COUNT=16 | 438 | CONFIG_BLK_DEV_RAM_COUNT=16 |
436 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 439 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
@@ -623,7 +626,6 @@ CONFIG_SERIAL_NONSTANDARD=y | |||
623 | # CONFIG_MOXA_SMARTIO is not set | 626 | # CONFIG_MOXA_SMARTIO is not set |
624 | # CONFIG_ISI is not set | 627 | # CONFIG_ISI is not set |
625 | # CONFIG_SYNCLINKMP is not set | 628 | # CONFIG_SYNCLINKMP is not set |
626 | # CONFIG_SYNCLINK_GT is not set | ||
627 | # CONFIG_N_HDLC is not set | 629 | # CONFIG_N_HDLC is not set |
628 | # CONFIG_RISCOM8 is not set | 630 | # CONFIG_RISCOM8 is not set |
629 | # CONFIG_SPECIALIX is not set | 631 | # CONFIG_SPECIALIX is not set |
@@ -686,6 +688,11 @@ CONFIG_S3C2410_WATCHDOG=y | |||
686 | # CONFIG_PCWATCHDOG is not set | 688 | # CONFIG_PCWATCHDOG is not set |
687 | # CONFIG_MIXCOMWD is not set | 689 | # CONFIG_MIXCOMWD is not set |
688 | # CONFIG_WDT is not set | 690 | # CONFIG_WDT is not set |
691 | |||
692 | # | ||
693 | # USB-based Watchdog Cards | ||
694 | # | ||
695 | # CONFIG_USBPCWATCHDOG is not set | ||
689 | # CONFIG_NVRAM is not set | 696 | # CONFIG_NVRAM is not set |
690 | # CONFIG_RTC is not set | 697 | # CONFIG_RTC is not set |
691 | CONFIG_S3C2410_RTC=y | 698 | CONFIG_S3C2410_RTC=y |
@@ -751,6 +758,11 @@ CONFIG_SENSORS_EEPROM=m | |||
751 | # CONFIG_SPI_MASTER is not set | 758 | # CONFIG_SPI_MASTER is not set |
752 | 759 | ||
753 | # | 760 | # |
761 | # Dallas's 1-wire bus | ||
762 | # | ||
763 | # CONFIG_W1 is not set | ||
764 | |||
765 | # | ||
754 | # Hardware Monitoring support | 766 | # Hardware Monitoring support |
755 | # | 767 | # |
756 | CONFIG_HWMON=y | 768 | CONFIG_HWMON=y |
@@ -763,6 +775,7 @@ CONFIG_HWMON_VID=m | |||
763 | # CONFIG_SENSORS_ASB100 is not set | 775 | # CONFIG_SENSORS_ASB100 is not set |
764 | # CONFIG_SENSORS_ATXP1 is not set | 776 | # CONFIG_SENSORS_ATXP1 is not set |
765 | # CONFIG_SENSORS_DS1621 is not set | 777 | # CONFIG_SENSORS_DS1621 is not set |
778 | # CONFIG_SENSORS_F71805F is not set | ||
766 | # CONFIG_SENSORS_FSCHER is not set | 779 | # CONFIG_SENSORS_FSCHER is not set |
767 | # CONFIG_SENSORS_FSCPOS is not set | 780 | # CONFIG_SENSORS_FSCPOS is not set |
768 | # CONFIG_SENSORS_GL518SM is not set | 781 | # CONFIG_SENSORS_GL518SM is not set |
@@ -850,16 +863,138 @@ CONFIG_FONT_8x16=y | |||
850 | # | 863 | # |
851 | CONFIG_USB_ARCH_HAS_HCD=y | 864 | CONFIG_USB_ARCH_HAS_HCD=y |
852 | CONFIG_USB_ARCH_HAS_OHCI=y | 865 | CONFIG_USB_ARCH_HAS_OHCI=y |
853 | # CONFIG_USB is not set | 866 | CONFIG_USB=y |
867 | # CONFIG_USB_DEBUG is not set | ||
868 | |||
869 | # | ||
870 | # Miscellaneous USB options | ||
871 | # | ||
872 | CONFIG_USB_DEVICEFS=y | ||
873 | # CONFIG_USB_BANDWIDTH is not set | ||
874 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
875 | # CONFIG_USB_SUSPEND is not set | ||
876 | # CONFIG_USB_OTG is not set | ||
877 | |||
878 | # | ||
879 | # USB Host Controller Drivers | ||
880 | # | ||
881 | # CONFIG_USB_ISP116X_HCD is not set | ||
882 | CONFIG_USB_OHCI_HCD=y | ||
883 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
884 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
885 | # CONFIG_USB_SL811_HCD is not set | ||
886 | |||
887 | # | ||
888 | # USB Device Class drivers | ||
889 | # | ||
890 | # CONFIG_USB_ACM is not set | ||
891 | # CONFIG_USB_PRINTER is not set | ||
854 | 892 | ||
855 | # | 893 | # |
856 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 894 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
857 | # | 895 | # |
858 | 896 | ||
859 | # | 897 | # |
898 | # may also be needed; see USB_STORAGE Help for more information | ||
899 | # | ||
900 | # CONFIG_USB_STORAGE is not set | ||
901 | # CONFIG_USB_LIBUSUAL is not set | ||
902 | |||
903 | # | ||
904 | # USB Input Devices | ||
905 | # | ||
906 | # CONFIG_USB_HID is not set | ||
907 | |||
908 | # | ||
909 | # USB HID Boot Protocol drivers | ||
910 | # | ||
911 | # CONFIG_USB_KBD is not set | ||
912 | # CONFIG_USB_MOUSE is not set | ||
913 | # CONFIG_USB_AIPTEK is not set | ||
914 | # CONFIG_USB_WACOM is not set | ||
915 | # CONFIG_USB_ACECAD is not set | ||
916 | # CONFIG_USB_KBTAB is not set | ||
917 | # CONFIG_USB_POWERMATE is not set | ||
918 | # CONFIG_USB_MTOUCH is not set | ||
919 | # CONFIG_USB_ITMTOUCH is not set | ||
920 | # CONFIG_USB_EGALAX is not set | ||
921 | # CONFIG_USB_YEALINK is not set | ||
922 | # CONFIG_USB_XPAD is not set | ||
923 | # CONFIG_USB_ATI_REMOTE is not set | ||
924 | # CONFIG_USB_ATI_REMOTE2 is not set | ||
925 | # CONFIG_USB_KEYSPAN_REMOTE is not set | ||
926 | # CONFIG_USB_APPLETOUCH is not set | ||
927 | |||
928 | # | ||
929 | # USB Imaging devices | ||
930 | # | ||
931 | # CONFIG_USB_MDC800 is not set | ||
932 | |||
933 | # | ||
934 | # USB Multimedia devices | ||
935 | # | ||
936 | # CONFIG_USB_DABUSB is not set | ||
937 | |||
938 | # | ||
939 | # Video4Linux support is needed for USB Multimedia device support | ||
940 | # | ||
941 | |||
942 | # | ||
943 | # USB Network Adapters | ||
944 | # | ||
945 | # CONFIG_USB_CATC is not set | ||
946 | # CONFIG_USB_KAWETH is not set | ||
947 | # CONFIG_USB_PEGASUS is not set | ||
948 | # CONFIG_USB_RTL8150 is not set | ||
949 | # CONFIG_USB_USBNET is not set | ||
950 | CONFIG_USB_MON=y | ||
951 | |||
952 | # | ||
953 | # USB port drivers | ||
954 | # | ||
955 | # CONFIG_USB_USS720 is not set | ||
956 | |||
957 | # | ||
958 | # USB Serial Converter support | ||
959 | # | ||
960 | # CONFIG_USB_SERIAL is not set | ||
961 | |||
962 | # | ||
963 | # USB Miscellaneous drivers | ||
964 | # | ||
965 | # CONFIG_USB_EMI62 is not set | ||
966 | # CONFIG_USB_EMI26 is not set | ||
967 | # CONFIG_USB_AUERSWALD is not set | ||
968 | # CONFIG_USB_RIO500 is not set | ||
969 | # CONFIG_USB_LEGOTOWER is not set | ||
970 | # CONFIG_USB_LCD is not set | ||
971 | # CONFIG_USB_LED is not set | ||
972 | # CONFIG_USB_CYTHERM is not set | ||
973 | # CONFIG_USB_PHIDGETKIT is not set | ||
974 | # CONFIG_USB_PHIDGETSERVO is not set | ||
975 | # CONFIG_USB_IDMOUSE is not set | ||
976 | # CONFIG_USB_LD is not set | ||
977 | # CONFIG_USB_TEST is not set | ||
978 | |||
979 | # | ||
980 | # USB DSL modem support | ||
981 | # | ||
982 | |||
983 | # | ||
860 | # USB Gadget Support | 984 | # USB Gadget Support |
861 | # | 985 | # |
862 | # CONFIG_USB_GADGET is not set | 986 | # CONFIG_USB_GADGET is not set |
987 | # CONFIG_USB_GADGET_NET2280 is not set | ||
988 | # CONFIG_USB_GADGET_PXA2XX is not set | ||
989 | # CONFIG_USB_GADGET_GOKU is not set | ||
990 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
991 | # CONFIG_USB_GADGET_OMAP is not set | ||
992 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
993 | # CONFIG_USB_ZERO is not set | ||
994 | # CONFIG_USB_ETH is not set | ||
995 | # CONFIG_USB_GADGETFS is not set | ||
996 | # CONFIG_USB_FILE_STORAGE is not set | ||
997 | # CONFIG_USB_G_SERIAL is not set | ||
863 | 998 | ||
864 | # | 999 | # |
865 | # MMC/SD Card support | 1000 | # MMC/SD Card support |
diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c index 766b6c05c6db..2bed290fec76 100644 --- a/arch/arm/kernel/apm.c +++ b/arch/arm/kernel/apm.c | |||
@@ -357,10 +357,8 @@ static int apm_open(struct inode * inode, struct file * filp) | |||
357 | { | 357 | { |
358 | struct apm_user *as; | 358 | struct apm_user *as; |
359 | 359 | ||
360 | as = (struct apm_user *)kmalloc(sizeof(*as), GFP_KERNEL); | 360 | as = (struct apm_user *)kzalloc(sizeof(*as), GFP_KERNEL); |
361 | if (as) { | 361 | if (as) { |
362 | memset(as, 0, sizeof(*as)); | ||
363 | |||
364 | /* | 362 | /* |
365 | * XXX - this is a tiny bit broken, when we consider BSD | 363 | * XXX - this is a tiny bit broken, when we consider BSD |
366 | * process accounting. If the device is opened by root, we | 364 | * process accounting. If the device is opened by root, we |
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index c4923fac8dff..de606dfa8db9 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
@@ -540,12 +540,10 @@ static void __init pcibios_init_hw(struct hw_pci *hw) | |||
540 | int nr, busnr; | 540 | int nr, busnr; |
541 | 541 | ||
542 | for (nr = busnr = 0; nr < hw->nr_controllers; nr++) { | 542 | for (nr = busnr = 0; nr < hw->nr_controllers; nr++) { |
543 | sys = kmalloc(sizeof(struct pci_sys_data), GFP_KERNEL); | 543 | sys = kzalloc(sizeof(struct pci_sys_data), GFP_KERNEL); |
544 | if (!sys) | 544 | if (!sys) |
545 | panic("PCI: unable to allocate sys data!"); | 545 | panic("PCI: unable to allocate sys data!"); |
546 | 546 | ||
547 | memset(sys, 0, sizeof(struct pci_sys_data)); | ||
548 | |||
549 | sys->hw = hw; | 547 | sys->hw = hw; |
550 | sys->busnr = busnr; | 548 | sys->busnr = busnr; |
551 | sys->swizzle = hw->swizzle; | 549 | sys->swizzle = hw->swizzle; |
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index caaa919ab47a..da280bae3d07 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
14 | #include <asm/hardware.h> | ||
15 | 14 | ||
16 | .text | 15 | .text |
17 | 16 | ||
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 74ea29c3205e..00aa225e8d95 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -807,14 +807,12 @@ static struct expansion_card *__init ecard_alloc_card(int type, int slot) | |||
807 | unsigned long base; | 807 | unsigned long base; |
808 | int i; | 808 | int i; |
809 | 809 | ||
810 | ec = kmalloc(sizeof(ecard_t), GFP_KERNEL); | 810 | ec = kzalloc(sizeof(ecard_t), GFP_KERNEL); |
811 | if (!ec) { | 811 | if (!ec) { |
812 | ec = ERR_PTR(-ENOMEM); | 812 | ec = ERR_PTR(-ENOMEM); |
813 | goto nomem; | 813 | goto nomem; |
814 | } | 814 | } |
815 | 815 | ||
816 | memset(ec, 0, sizeof(ecard_t)); | ||
817 | |||
818 | ec->slot_no = slot; | 816 | ec->slot_no = slot; |
819 | ec->type = type; | 817 | ec->type = type; |
820 | ec->irq = NO_IRQ; | 818 | ec->irq = NO_IRQ; |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index ec48d70c6d8b..355914ffb192 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -484,7 +484,6 @@ call_fpe: | |||
484 | movcss r7, r5, lsr #(TIF_USING_IWMMXT + 1) | 484 | movcss r7, r5, lsr #(TIF_USING_IWMMXT + 1) |
485 | bcs iwmmxt_task_enable | 485 | bcs iwmmxt_task_enable |
486 | #endif | 486 | #endif |
487 | enable_irq | ||
488 | add pc, pc, r8, lsr #6 | 487 | add pc, pc, r8, lsr #6 |
489 | mov r0, r0 | 488 | mov r0, r0 |
490 | 489 | ||
@@ -511,6 +510,7 @@ call_fpe: | |||
511 | mov pc, lr @ CP#15 (Control) | 510 | mov pc, lr @ CP#15 (Control) |
512 | 511 | ||
513 | do_fpe: | 512 | do_fpe: |
513 | enable_irq | ||
514 | ldr r4, .LCfp | 514 | ldr r4, .LCfp |
515 | add r10, r10, #TI_FPSTATE @ r10 = workspace | 515 | add r10, r10, #TI_FPSTATE @ r10 = workspace |
516 | ldr pc, [r4] @ Call FP module USR entry point | 516 | ldr pc, [r4] @ Call FP module USR entry point |
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index 55c99cdab7d6..f1c2fd5b63e4 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S | |||
@@ -37,24 +37,6 @@ | |||
37 | #endif | 37 | #endif |
38 | .endm | 38 | .endm |
39 | 39 | ||
40 | #if __LINUX_ARM_ARCH__ >= 6 | ||
41 | .macro disable_irq | ||
42 | cpsid i | ||
43 | .endm | ||
44 | |||
45 | .macro enable_irq | ||
46 | cpsie i | ||
47 | .endm | ||
48 | #else | ||
49 | .macro disable_irq | ||
50 | msr cpsr_c, #PSR_I_BIT | SVC_MODE | ||
51 | .endm | ||
52 | |||
53 | .macro enable_irq | ||
54 | msr cpsr_c, #SVC_MODE | ||
55 | .endm | ||
56 | #endif | ||
57 | |||
58 | .macro get_thread_info, rd | 40 | .macro get_thread_info, rd |
59 | mov \rd, sp, lsr #13 | 41 | mov \rd, sp, lsr #13 |
60 | mov \rd, \rd, lsl #13 | 42 | mov \rd, \rd, lsl #13 |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index d848f3a38924..04b66a9328ef 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -28,10 +28,9 @@ | |||
28 | #define PROCINFO_INITFUNC 12 | 28 | #define PROCINFO_INITFUNC 12 |
29 | 29 | ||
30 | #define MACHINFO_TYPE 0 | 30 | #define MACHINFO_TYPE 0 |
31 | #define MACHINFO_PHYSRAM 4 | 31 | #define MACHINFO_PHYSIO 4 |
32 | #define MACHINFO_PHYSIO 8 | 32 | #define MACHINFO_PGOFFIO 8 |
33 | #define MACHINFO_PGOFFIO 12 | 33 | #define MACHINFO_NAME 12 |
34 | #define MACHINFO_NAME 16 | ||
35 | 34 | ||
36 | #define KERNEL_RAM_ADDR (PAGE_OFFSET + TEXT_OFFSET) | 35 | #define KERNEL_RAM_ADDR (PAGE_OFFSET + TEXT_OFFSET) |
37 | 36 | ||
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 1d50d2b98f55..2d5896b36181 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -305,14 +305,19 @@ report_bad_irq(unsigned int irq, struct pt_regs *regs, struct irqdesc *desc, int | |||
305 | static int count = 100; | 305 | static int count = 100; |
306 | struct irqaction *action; | 306 | struct irqaction *action; |
307 | 307 | ||
308 | if (!count || noirqdebug) | 308 | if (noirqdebug) |
309 | return; | 309 | return; |
310 | 310 | ||
311 | count--; | ||
312 | |||
313 | if (ret != IRQ_HANDLED && ret != IRQ_NONE) { | 311 | if (ret != IRQ_HANDLED && ret != IRQ_NONE) { |
312 | if (!count) | ||
313 | return; | ||
314 | count--; | ||
314 | printk("irq%u: bogus retval mask %x\n", irq, ret); | 315 | printk("irq%u: bogus retval mask %x\n", irq, ret); |
315 | } else { | 316 | } else { |
317 | desc->irqs_unhandled++; | ||
318 | if (desc->irqs_unhandled <= 99900) | ||
319 | return; | ||
320 | desc->irqs_unhandled = 0; | ||
316 | printk("irq%u: nobody cared\n", irq); | 321 | printk("irq%u: nobody cared\n", irq); |
317 | } | 322 | } |
318 | show_regs(regs); | 323 | show_regs(regs); |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 02aa300c4633..1370d726dc10 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -337,9 +337,6 @@ void __init smp_prepare_boot_cpu(void) | |||
337 | unsigned int cpu = smp_processor_id(); | 337 | unsigned int cpu = smp_processor_id(); |
338 | 338 | ||
339 | per_cpu(cpu_data, cpu).idle = current; | 339 | per_cpu(cpu_data, cpu).idle = current; |
340 | |||
341 | cpu_set(cpu, cpu_present_map); | ||
342 | cpu_set(cpu, cpu_online_map); | ||
343 | } | 340 | } |
344 | 341 | ||
345 | static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg) | 342 | static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg) |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 32b0570329e7..35230a060108 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -506,7 +506,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
506 | if (!pmd_present(*pmd)) | 506 | if (!pmd_present(*pmd)) |
507 | goto bad_access; | 507 | goto bad_access; |
508 | pte = pte_offset_map_lock(mm, pmd, addr, &ptl); | 508 | pte = pte_offset_map_lock(mm, pmd, addr, &ptl); |
509 | if (!pte_present(*pte) || !pte_write(*pte)) { | 509 | if (!pte_present(*pte) || !pte_dirty(*pte)) { |
510 | pte_unmap_unlock(pte, ptl); | 510 | pte_unmap_unlock(pte, ptl); |
511 | goto bad_access; | 511 | goto bad_access; |
512 | } | 512 | } |
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 391f3ab3ff32..7b726b627ea5 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
@@ -18,7 +18,7 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ | |||
18 | 18 | ||
19 | # the code in uaccess.S is not preemption safe and | 19 | # the code in uaccess.S is not preemption safe and |
20 | # probably faster on ARMv3 only | 20 | # probably faster on ARMv3 only |
21 | ifeq ($CONFIG_PREEMPT,y) | 21 | ifeq ($(CONFIG_PREEMPT),y) |
22 | lib-y += copy_from_user.o copy_to_user.o | 22 | lib-y += copy_from_user.o copy_to_user.o |
23 | else | 23 | else |
24 | ifneq ($(CONFIG_CPU_32v3),y) | 24 | ifneq ($(CONFIG_CPU_32v3),y) |
diff --git a/arch/arm/lib/backtrace.S b/arch/arm/lib/backtrace.S index 68a21c0f3f52..3bdc8c6949c5 100644 --- a/arch/arm/lib/backtrace.S +++ b/arch/arm/lib/backtrace.S | |||
@@ -29,7 +29,7 @@ ENTRY(__backtrace) | |||
29 | 29 | ||
30 | ENTRY(c_backtrace) | 30 | ENTRY(c_backtrace) |
31 | 31 | ||
32 | #ifndef CONFIG_FRAME_POINTER | 32 | #if !defined(CONFIG_FRAME_POINTER) || !defined(CONFIG_PRINTK) |
33 | mov pc, lr | 33 | mov pc, lr |
34 | #else | 34 | #else |
35 | 35 | ||
diff --git a/arch/arm/lib/delay.S b/arch/arm/lib/delay.S index b3fb475b4120..9183b06c0e2f 100644 --- a/arch/arm/lib/delay.S +++ b/arch/arm/lib/delay.S | |||
@@ -9,28 +9,32 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
11 | #include <asm/assembler.h> | 11 | #include <asm/assembler.h> |
12 | #include <asm/param.h> | ||
12 | .text | 13 | .text |
13 | 14 | ||
14 | .LC0: .word loops_per_jiffy | 15 | .LC0: .word loops_per_jiffy |
16 | .LC1: .word (2199023*HZ)>>11 | ||
15 | 17 | ||
16 | /* | 18 | /* |
17 | * 0 <= r0 <= 2000 | 19 | * r0 <= 2000 |
20 | * lpj <= 0x01ffffff (max. 3355 bogomips) | ||
21 | * HZ <= 1000 | ||
18 | */ | 22 | */ |
23 | |||
19 | ENTRY(__udelay) | 24 | ENTRY(__udelay) |
20 | mov r2, #0x6800 | 25 | ldr r2, .LC1 |
21 | orr r2, r2, #0x00db | ||
22 | mul r0, r2, r0 | 26 | mul r0, r2, r0 |
23 | ENTRY(__const_udelay) @ 0 <= r0 <= 0x01ffffff | 27 | ENTRY(__const_udelay) @ 0 <= r0 <= 0x7fffff06 |
24 | ldr r2, .LC0 | 28 | ldr r2, .LC0 |
25 | ldr r2, [r2] @ max = 0x0fffffff | 29 | ldr r2, [r2] @ max = 0x01ffffff |
26 | mov r0, r0, lsr #11 @ max = 0x00003fff | 30 | mov r0, r0, lsr #14 @ max = 0x0001ffff |
27 | mov r2, r2, lsr #11 @ max = 0x0003ffff | 31 | mov r2, r2, lsr #10 @ max = 0x00007fff |
28 | mul r0, r2, r0 @ max = 2^32-1 | 32 | mul r0, r2, r0 @ max = 2^32-1 |
29 | movs r0, r0, lsr #6 | 33 | movs r0, r0, lsr #6 |
30 | RETINSTR(moveq,pc,lr) | 34 | RETINSTR(moveq,pc,lr) |
31 | 35 | ||
32 | /* | 36 | /* |
33 | * loops = (r0 * 0x10c6 * 100 * loops_per_jiffy) / 2^32 | 37 | * loops = r0 * HZ * loops_per_jiffy / 1000000 |
34 | * | 38 | * |
35 | * Oh, if only we had a cycle counter... | 39 | * Oh, if only we had a cycle counter... |
36 | */ | 40 | */ |
diff --git a/arch/arm/lib/io-acorn.S b/arch/arm/lib/io-acorn.S index b153523631c3..1b197ea7aab3 100644 --- a/arch/arm/lib/io-acorn.S +++ b/arch/arm/lib/io-acorn.S | |||
@@ -12,7 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
14 | #include <asm/assembler.h> | 14 | #include <asm/assembler.h> |
15 | #include <asm/hardware.h> | ||
16 | 15 | ||
17 | .text | 16 | .text |
18 | .align | 17 | .align |
diff --git a/arch/arm/mach-at91rm9200/clock.c b/arch/arm/mach-at91rm9200/clock.c index ec8195a2a3cc..8b95467c6d61 100644 --- a/arch/arm/mach-at91rm9200/clock.c +++ b/arch/arm/mach-at91rm9200/clock.c | |||
@@ -201,6 +201,54 @@ static struct clk ohci_clk = { | |||
201 | .pmc_mask = 1 << AT91_ID_UHP, | 201 | .pmc_mask = 1 << AT91_ID_UHP, |
202 | .mode = pmc_periph_mode, | 202 | .mode = pmc_periph_mode, |
203 | }; | 203 | }; |
204 | static struct clk ether_clk = { | ||
205 | .name = "ether_clk", | ||
206 | .parent = &mck, | ||
207 | .pmc_mask = 1 << AT91_ID_EMAC, | ||
208 | .mode = pmc_periph_mode, | ||
209 | }; | ||
210 | static struct clk mmc_clk = { | ||
211 | .name = "mci_clk", | ||
212 | .parent = &mck, | ||
213 | .pmc_mask = 1 << AT91_ID_MCI, | ||
214 | .mode = pmc_periph_mode, | ||
215 | }; | ||
216 | static struct clk twi_clk = { | ||
217 | .name = "twi_clk", | ||
218 | .parent = &mck, | ||
219 | .pmc_mask = 1 << AT91_ID_TWI, | ||
220 | .mode = pmc_periph_mode, | ||
221 | }; | ||
222 | static struct clk usart0_clk = { | ||
223 | .name = "usart0_clk", | ||
224 | .parent = &mck, | ||
225 | .pmc_mask = 1 << AT91_ID_US0, | ||
226 | .mode = pmc_periph_mode, | ||
227 | }; | ||
228 | static struct clk usart1_clk = { | ||
229 | .name = "usart1_clk", | ||
230 | .parent = &mck, | ||
231 | .pmc_mask = 1 << AT91_ID_US1, | ||
232 | .mode = pmc_periph_mode, | ||
233 | }; | ||
234 | static struct clk usart2_clk = { | ||
235 | .name = "usart2_clk", | ||
236 | .parent = &mck, | ||
237 | .pmc_mask = 1 << AT91_ID_US2, | ||
238 | .mode = pmc_periph_mode, | ||
239 | }; | ||
240 | static struct clk usart3_clk = { | ||
241 | .name = "usart3_clk", | ||
242 | .parent = &mck, | ||
243 | .pmc_mask = 1 << AT91_ID_US3, | ||
244 | .mode = pmc_periph_mode, | ||
245 | }; | ||
246 | static struct clk spi_clk = { | ||
247 | .name = "spi0_clk", | ||
248 | .parent = &mck, | ||
249 | .pmc_mask = 1 << AT91_ID_SPI, | ||
250 | .mode = pmc_periph_mode, | ||
251 | }; | ||
204 | 252 | ||
205 | static struct clk *const clock_list[] = { | 253 | static struct clk *const clock_list[] = { |
206 | /* four primary clocks -- MUST BE FIRST! */ | 254 | /* four primary clocks -- MUST BE FIRST! */ |
@@ -223,15 +271,18 @@ static struct clk *const clock_list[] = { | |||
223 | 271 | ||
224 | /* MCK and peripherals */ | 272 | /* MCK and peripherals */ |
225 | &mck, | 273 | &mck, |
226 | // usart0..usart3 | 274 | &usart0_clk, |
227 | // mmc | 275 | &usart1_clk, |
276 | &usart2_clk, | ||
277 | &usart3_clk, | ||
278 | &mmc_clk, | ||
228 | &udc_clk, | 279 | &udc_clk, |
229 | // i2c | 280 | &twi_clk, |
230 | // spi | 281 | &spi_clk, |
231 | // ssc0..ssc2 | 282 | // ssc0..ssc2 |
232 | // tc0..tc5 | 283 | // tc0..tc5 |
233 | &ohci_clk, | 284 | &ohci_clk, |
234 | // ether | 285 | ðer_clk, |
235 | }; | 286 | }; |
236 | 287 | ||
237 | 288 | ||
@@ -360,7 +411,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
360 | u32 pckr; | 411 | u32 pckr; |
361 | 412 | ||
362 | pckr = at91_sys_read(AT91_PMC_PCKR(clk->id)); | 413 | pckr = at91_sys_read(AT91_PMC_PCKR(clk->id)); |
363 | pckr &= 0x03; | 414 | pckr &= AT91_PMC_CSS_PLLB; /* clock selection */ |
364 | pckr |= prescale << 2; | 415 | pckr |= prescale << 2; |
365 | at91_sys_write(AT91_PMC_PCKR(clk->id), pckr); | 416 | at91_sys_write(AT91_PMC_PCKR(clk->id), pckr); |
366 | clk->rate_hz = actual; | 417 | clk->rate_hz = actual; |
@@ -440,7 +491,7 @@ static int at91_clk_show(struct seq_file *s, void *unused) | |||
440 | else | 491 | else |
441 | state = ""; | 492 | state = ""; |
442 | 493 | ||
443 | seq_printf(s, "%-10s users=%d %-3s %9ld Hz %s\n", | 494 | seq_printf(s, "%-10s users=%2d %-3s %9ld Hz %s\n", |
444 | clk->name, clk->users, state, clk_get_rate(clk), | 495 | clk->name, clk->users, state, clk_get_rate(clk), |
445 | clk->parent ? clk->parent->name : ""); | 496 | clk->parent ? clk->parent->name : ""); |
446 | } | 497 | } |
@@ -483,11 +534,18 @@ static u32 __init at91_pll_rate(struct clk *pll, u32 freq, u32 reg) | |||
483 | freq *= mul + 1; | 534 | freq *= mul + 1; |
484 | } else | 535 | } else |
485 | freq = 0; | 536 | freq = 0; |
486 | if (pll == &pllb && (reg & (1 << 28))) | 537 | |
487 | freq /= 2; | ||
488 | return freq; | 538 | return freq; |
489 | } | 539 | } |
490 | 540 | ||
541 | static u32 __init at91_usb_rate(struct clk *pll, u32 freq, u32 reg) | ||
542 | { | ||
543 | if (pll == &pllb && (reg & AT91_PMC_USB96M)) | ||
544 | return freq / 2; | ||
545 | else | ||
546 | return freq; | ||
547 | } | ||
548 | |||
491 | static unsigned __init at91_pll_calc(unsigned main_freq, unsigned out_freq) | 549 | static unsigned __init at91_pll_calc(unsigned main_freq, unsigned out_freq) |
492 | { | 550 | { |
493 | unsigned i, div = 0, mul = 0, diff = 1 << 30; | 551 | unsigned i, div = 0, mul = 0, diff = 1 << 30; |
@@ -550,8 +608,8 @@ int __init at91_clock_init(unsigned long main_clock) | |||
550 | if (!main_clock) { | 608 | if (!main_clock) { |
551 | do { | 609 | do { |
552 | tmp = at91_sys_read(AT91_CKGR_MCFR); | 610 | tmp = at91_sys_read(AT91_CKGR_MCFR); |
553 | } while (!(tmp & 0x10000)); | 611 | } while (!(tmp & AT91_PMC_MAINRDY)); |
554 | main_clock = (tmp & 0xffff) * (AT91_SLOW_CLOCK / 16); | 612 | main_clock = (tmp & AT91_PMC_MAINF) * (AT91_SLOW_CLOCK / 16); |
555 | } | 613 | } |
556 | main_clk.rate_hz = main_clock; | 614 | main_clk.rate_hz = main_clock; |
557 | 615 | ||
@@ -566,13 +624,16 @@ int __init at91_clock_init(unsigned long main_clock) | |||
566 | * | 624 | * |
567 | * REVISIT: assumes MCK doesn't derive from PLLB! | 625 | * REVISIT: assumes MCK doesn't derive from PLLB! |
568 | */ | 626 | */ |
569 | at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | 0x10000000; | 627 | at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M; |
570 | pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init); | 628 | pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init); |
571 | at91_sys_write(AT91_PMC_PCDR, (1 << AT91_ID_UHP) | (1 << AT91_ID_UDP)); | 629 | at91_sys_write(AT91_PMC_PCDR, (1 << AT91_ID_UHP) | (1 << AT91_ID_UDP)); |
572 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_UHP | AT91_PMC_UDP); | 630 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_UHP | AT91_PMC_UDP); |
573 | at91_sys_write(AT91_CKGR_PLLBR, 0); | 631 | at91_sys_write(AT91_CKGR_PLLBR, 0); |
574 | at91_sys_write(AT91_PMC_SCER, AT91_PMC_MCKUDP); | 632 | at91_sys_write(AT91_PMC_SCER, AT91_PMC_MCKUDP); |
575 | 633 | ||
634 | udpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); | ||
635 | uhpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init); | ||
636 | |||
576 | /* | 637 | /* |
577 | * MCK and CPU derive from one of those primary clocks. | 638 | * MCK and CPU derive from one of those primary clocks. |
578 | * For now, assume this parentage won't change. | 639 | * For now, assume this parentage won't change. |
diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c index 0e396feec468..5ab46274e1a3 100644 --- a/arch/arm/mach-at91rm9200/gpio.c +++ b/arch/arm/mach-at91rm9200/gpio.c | |||
@@ -261,7 +261,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs | |||
261 | void __iomem *pio; | 261 | void __iomem *pio; |
262 | u32 isr; | 262 | u32 isr; |
263 | 263 | ||
264 | pio = (void __force __iomem *) desc->chipdata; | 264 | pio = desc->base; |
265 | 265 | ||
266 | /* temporarily mask (level sensitive) parent IRQ */ | 266 | /* temporarily mask (level sensitive) parent IRQ */ |
267 | desc->chip->ack(irq); | 267 | desc->chip->ack(irq); |
@@ -312,7 +312,7 @@ void __init at91_gpio_irq_setup(unsigned banks) | |||
312 | __raw_writel(~0, controller + PIO_IDR); | 312 | __raw_writel(~0, controller + PIO_IDR); |
313 | 313 | ||
314 | set_irq_data(id, (void *) pin); | 314 | set_irq_data(id, (void *) pin); |
315 | set_irq_chipdata(id, (void __force *) controller); | 315 | set_irq_chipdata(id, controller); |
316 | 316 | ||
317 | for (i = 0; i < 32; i++, pin++) { | 317 | for (i = 0; i < 32; i++, pin++) { |
318 | set_irq_chip(pin, &gpio_irqchip); | 318 | set_irq_chip(pin, &gpio_irqchip); |
diff --git a/arch/arm/mach-at91rm9200/time.c b/arch/arm/mach-at91rm9200/time.c index 1b6dd2deeb22..7ffcf443b99f 100644 --- a/arch/arm/mach-at91rm9200/time.c +++ b/arch/arm/mach-at91rm9200/time.c | |||
@@ -71,11 +71,11 @@ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_r | |||
71 | if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */ | 71 | if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */ |
72 | write_seqlock(&xtime_lock); | 72 | write_seqlock(&xtime_lock); |
73 | 73 | ||
74 | do { | 74 | while (((read_CRTR() - at91_sys_read(AT91_ST_RTAR)) & AT91_ST_ALMV) >= LATCH) { |
75 | timer_tick(regs); | 75 | timer_tick(regs); |
76 | rtar = (at91_sys_read(AT91_ST_RTAR) + LATCH) & AT91_ST_ALMV; | 76 | rtar = (at91_sys_read(AT91_ST_RTAR) + LATCH) & AT91_ST_ALMV; |
77 | at91_sys_write(AT91_ST_RTAR, rtar); | 77 | at91_sys_write(AT91_ST_RTAR, rtar); |
78 | } while (((read_CRTR() - at91_sys_read(AT91_ST_RTAR)) & AT91_ST_ALMV) >= LATCH); | 78 | } |
79 | 79 | ||
80 | write_sequnlock(&xtime_lock); | 80 | write_sequnlock(&xtime_lock); |
81 | 81 | ||
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig new file mode 100644 index 000000000000..cec5a21ca4e3 --- /dev/null +++ b/arch/arm/mach-ep93xx/Kconfig | |||
@@ -0,0 +1,21 @@ | |||
1 | if ARCH_EP93XX | ||
2 | |||
3 | menu "Cirrus EP93xx Implementation Options" | ||
4 | |||
5 | comment "EP93xx Platforms" | ||
6 | |||
7 | config MACH_GESBC9312 | ||
8 | bool "Support Glomation GESBC-9312-sx" | ||
9 | help | ||
10 | Say 'Y' here if you want your kernel to support the Glomation | ||
11 | GESBC-9312-sx board. | ||
12 | |||
13 | config MACH_TS72XX | ||
14 | bool "Support Technologic Systems TS-72xx SBC" | ||
15 | help | ||
16 | Say 'Y' here if you want your kernel to support the | ||
17 | Technologic Systems TS-72xx board. | ||
18 | |||
19 | endmenu | ||
20 | |||
21 | endif | ||
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile new file mode 100644 index 000000000000..5393af989e94 --- /dev/null +++ b/arch/arm/mach-ep93xx/Makefile | |||
@@ -0,0 +1,10 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | obj-y := core.o | ||
5 | obj-m := | ||
6 | obj-n := | ||
7 | obj- := | ||
8 | |||
9 | obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o | ||
10 | obj-$(CONFIG_MACH_TS72XX) += ts72xx.o | ||
diff --git a/arch/arm/mach-ep93xx/Makefile.boot b/arch/arm/mach-ep93xx/Makefile.boot new file mode 100644 index 000000000000..d5561ad15bad --- /dev/null +++ b/arch/arm/mach-ep93xx/Makefile.boot | |||
@@ -0,0 +1,2 @@ | |||
1 | zreladdr-y := 0x00008000 | ||
2 | params_phys-y := 0x00000100 | ||
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c new file mode 100644 index 000000000000..865427bfad7e --- /dev/null +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -0,0 +1,374 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/core.c | ||
3 | * Core routines for Cirrus EP93xx chips. | ||
4 | * | ||
5 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
6 | * | ||
7 | * Thanks go to Michael Burian and Ray Lehtiniemi for their key | ||
8 | * role in the ep93xx linux community. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or (at | ||
13 | * your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/serial.h> | ||
23 | #include <linux/tty.h> | ||
24 | #include <linux/bitops.h> | ||
25 | #include <linux/serial.h> | ||
26 | #include <linux/serial_8250.h> | ||
27 | #include <linux/serial_core.h> | ||
28 | #include <linux/device.h> | ||
29 | #include <linux/mm.h> | ||
30 | #include <linux/time.h> | ||
31 | #include <linux/timex.h> | ||
32 | #include <linux/delay.h> | ||
33 | #include <linux/amba/bus.h> | ||
34 | |||
35 | #include <asm/types.h> | ||
36 | #include <asm/setup.h> | ||
37 | #include <asm/memory.h> | ||
38 | #include <asm/hardware.h> | ||
39 | #include <asm/irq.h> | ||
40 | #include <asm/system.h> | ||
41 | #include <asm/tlbflush.h> | ||
42 | #include <asm/pgtable.h> | ||
43 | #include <asm/io.h> | ||
44 | |||
45 | #include <asm/mach/map.h> | ||
46 | #include <asm/mach/time.h> | ||
47 | #include <asm/mach/irq.h> | ||
48 | #include <asm/arch/gpio.h> | ||
49 | |||
50 | #include <asm/hardware/vic.h> | ||
51 | |||
52 | |||
53 | /************************************************************************* | ||
54 | * Static I/O mappings that are needed for all EP93xx platforms | ||
55 | *************************************************************************/ | ||
56 | static struct map_desc ep93xx_io_desc[] __initdata = { | ||
57 | { | ||
58 | .virtual = EP93XX_AHB_VIRT_BASE, | ||
59 | .pfn = __phys_to_pfn(EP93XX_AHB_PHYS_BASE), | ||
60 | .length = EP93XX_AHB_SIZE, | ||
61 | .type = MT_DEVICE, | ||
62 | }, { | ||
63 | .virtual = EP93XX_APB_VIRT_BASE, | ||
64 | .pfn = __phys_to_pfn(EP93XX_APB_PHYS_BASE), | ||
65 | .length = EP93XX_APB_SIZE, | ||
66 | .type = MT_DEVICE, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | void __init ep93xx_map_io(void) | ||
71 | { | ||
72 | iotable_init(ep93xx_io_desc, ARRAY_SIZE(ep93xx_io_desc)); | ||
73 | } | ||
74 | |||
75 | |||
76 | /************************************************************************* | ||
77 | * Timer handling for EP93xx | ||
78 | ************************************************************************* | ||
79 | * The ep93xx has four internal timers. Timers 1, 2 (both 16 bit) and | ||
80 | * 3 (32 bit) count down at 508 kHz, are self-reloading, and can generate | ||
81 | * an interrupt on underflow. Timer 4 (40 bit) counts down at 983.04 kHz, | ||
82 | * is free-running, and can't generate interrupts. | ||
83 | * | ||
84 | * The 508 kHz timers are ideal for use for the timer interrupt, as the | ||
85 | * most common values of HZ divide 508 kHz nicely. We pick one of the 16 | ||
86 | * bit timers (timer 1) since we don't need more than 16 bits of reload | ||
87 | * value as long as HZ >= 8. | ||
88 | * | ||
89 | * The higher clock rate of timer 4 makes it a better choice than the | ||
90 | * other timers for use in gettimeoffset(), while the fact that it can't | ||
91 | * generate interrupts means we don't have to worry about not being able | ||
92 | * to use this timer for something else. We also use timer 4 for keeping | ||
93 | * track of lost jiffies. | ||
94 | */ | ||
95 | static unsigned int last_jiffy_time; | ||
96 | |||
97 | #define TIMER4_TICKS_PER_JIFFY ((CLOCK_TICK_RATE + (HZ/2)) / HZ) | ||
98 | |||
99 | static int ep93xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
100 | { | ||
101 | write_seqlock(&xtime_lock); | ||
102 | |||
103 | __raw_writel(1, EP93XX_TIMER1_CLEAR); | ||
104 | while (__raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time | ||
105 | >= TIMER4_TICKS_PER_JIFFY) { | ||
106 | last_jiffy_time += TIMER4_TICKS_PER_JIFFY; | ||
107 | timer_tick(regs); | ||
108 | } | ||
109 | |||
110 | write_sequnlock(&xtime_lock); | ||
111 | |||
112 | return IRQ_HANDLED; | ||
113 | } | ||
114 | |||
115 | static struct irqaction ep93xx_timer_irq = { | ||
116 | .name = "ep93xx timer", | ||
117 | .flags = SA_INTERRUPT | SA_TIMER, | ||
118 | .handler = ep93xx_timer_interrupt, | ||
119 | }; | ||
120 | |||
121 | static void __init ep93xx_timer_init(void) | ||
122 | { | ||
123 | /* Enable periodic HZ timer. */ | ||
124 | __raw_writel(0x48, EP93XX_TIMER1_CONTROL); | ||
125 | __raw_writel((508000 / HZ) - 1, EP93XX_TIMER1_LOAD); | ||
126 | __raw_writel(0xc8, EP93XX_TIMER1_CONTROL); | ||
127 | |||
128 | /* Enable lost jiffy timer. */ | ||
129 | __raw_writel(0x100, EP93XX_TIMER4_VALUE_HIGH); | ||
130 | |||
131 | setup_irq(IRQ_EP93XX_TIMER1, &ep93xx_timer_irq); | ||
132 | } | ||
133 | |||
134 | static unsigned long ep93xx_gettimeoffset(void) | ||
135 | { | ||
136 | int offset; | ||
137 | |||
138 | offset = __raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time; | ||
139 | |||
140 | /* Calculate (1000000 / 983040) * offset. */ | ||
141 | return offset + (53 * offset / 3072); | ||
142 | } | ||
143 | |||
144 | struct sys_timer ep93xx_timer = { | ||
145 | .init = ep93xx_timer_init, | ||
146 | .offset = ep93xx_gettimeoffset, | ||
147 | }; | ||
148 | |||
149 | |||
150 | /************************************************************************* | ||
151 | * GPIO handling for EP93xx | ||
152 | *************************************************************************/ | ||
153 | static unsigned char gpio_int_enable[2]; | ||
154 | static unsigned char gpio_int_type1[2]; | ||
155 | static unsigned char gpio_int_type2[2]; | ||
156 | |||
157 | static void update_gpio_ab_int_params(int port) | ||
158 | { | ||
159 | if (port == 0) { | ||
160 | __raw_writeb(0, EP93XX_GPIO_A_INT_ENABLE); | ||
161 | __raw_writeb(gpio_int_type2[0], EP93XX_GPIO_A_INT_TYPE2); | ||
162 | __raw_writeb(gpio_int_type1[0], EP93XX_GPIO_A_INT_TYPE1); | ||
163 | __raw_writeb(gpio_int_enable[0], EP93XX_GPIO_A_INT_ENABLE); | ||
164 | } else if (port == 1) { | ||
165 | __raw_writeb(0, EP93XX_GPIO_B_INT_ENABLE); | ||
166 | __raw_writeb(gpio_int_type2[1], EP93XX_GPIO_B_INT_TYPE2); | ||
167 | __raw_writeb(gpio_int_type1[1], EP93XX_GPIO_B_INT_TYPE1); | ||
168 | __raw_writeb(gpio_int_enable[1], EP93XX_GPIO_B_INT_ENABLE); | ||
169 | } | ||
170 | } | ||
171 | |||
172 | |||
173 | static unsigned char data_register_offset[8] = { | ||
174 | 0x00, 0x04, 0x08, 0x0c, 0x20, 0x30, 0x38, 0x40, | ||
175 | }; | ||
176 | |||
177 | static unsigned char data_direction_register_offset[8] = { | ||
178 | 0x10, 0x14, 0x18, 0x1c, 0x24, 0x34, 0x3c, 0x44, | ||
179 | }; | ||
180 | |||
181 | void gpio_line_config(int line, int direction) | ||
182 | { | ||
183 | unsigned int data_direction_register; | ||
184 | unsigned long flags; | ||
185 | unsigned char v; | ||
186 | |||
187 | data_direction_register = | ||
188 | EP93XX_GPIO_REG(data_direction_register_offset[line >> 3]); | ||
189 | |||
190 | local_irq_save(flags); | ||
191 | if (direction == GPIO_OUT) { | ||
192 | if (line >= 0 && line < 16) { | ||
193 | gpio_int_enable[line >> 3] &= ~(1 << (line & 7)); | ||
194 | update_gpio_ab_int_params(line >> 3); | ||
195 | } | ||
196 | |||
197 | v = __raw_readb(data_direction_register); | ||
198 | v |= 1 << (line & 7); | ||
199 | __raw_writeb(v, data_direction_register); | ||
200 | } else if (direction == GPIO_IN) { | ||
201 | v = __raw_readb(data_direction_register); | ||
202 | v &= ~(1 << (line & 7)); | ||
203 | __raw_writeb(v, data_direction_register); | ||
204 | } | ||
205 | local_irq_restore(flags); | ||
206 | } | ||
207 | EXPORT_SYMBOL(gpio_line_config); | ||
208 | |||
209 | int gpio_line_get(int line) | ||
210 | { | ||
211 | unsigned int data_register; | ||
212 | |||
213 | data_register = EP93XX_GPIO_REG(data_register_offset[line >> 3]); | ||
214 | |||
215 | return !!(__raw_readb(data_register) & (1 << (line & 7))); | ||
216 | } | ||
217 | EXPORT_SYMBOL(gpio_line_get); | ||
218 | |||
219 | void gpio_line_set(int line, int value) | ||
220 | { | ||
221 | unsigned int data_register; | ||
222 | unsigned long flags; | ||
223 | unsigned char v; | ||
224 | |||
225 | data_register = EP93XX_GPIO_REG(data_register_offset[line >> 3]); | ||
226 | |||
227 | local_irq_save(flags); | ||
228 | if (value == EP93XX_GPIO_HIGH) { | ||
229 | v = __raw_readb(data_register); | ||
230 | v |= 1 << (line & 7); | ||
231 | __raw_writeb(v, data_register); | ||
232 | } else if (value == EP93XX_GPIO_LOW) { | ||
233 | v = __raw_readb(data_register); | ||
234 | v &= ~(1 << (line & 7)); | ||
235 | __raw_writeb(v, data_register); | ||
236 | } | ||
237 | local_irq_restore(flags); | ||
238 | } | ||
239 | EXPORT_SYMBOL(gpio_line_set); | ||
240 | |||
241 | |||
242 | /************************************************************************* | ||
243 | * EP93xx IRQ handling | ||
244 | *************************************************************************/ | ||
245 | static void ep93xx_gpio_ab_irq_handler(unsigned int irq, | ||
246 | struct irqdesc *desc, struct pt_regs *regs) | ||
247 | { | ||
248 | unsigned char status; | ||
249 | int i; | ||
250 | |||
251 | status = __raw_readb(EP93XX_GPIO_A_INT_STATUS); | ||
252 | for (i = 0; i < 8; i++) { | ||
253 | if (status & (1 << i)) { | ||
254 | desc = irq_desc + IRQ_EP93XX_GPIO(0) + i; | ||
255 | desc_handle_irq(IRQ_EP93XX_GPIO(0) + i, desc, regs); | ||
256 | } | ||
257 | } | ||
258 | |||
259 | status = __raw_readb(EP93XX_GPIO_B_INT_STATUS); | ||
260 | for (i = 0; i < 8; i++) { | ||
261 | if (status & (1 << i)) { | ||
262 | desc = irq_desc + IRQ_EP93XX_GPIO(8) + i; | ||
263 | desc_handle_irq(IRQ_EP93XX_GPIO(8) + i, desc, regs); | ||
264 | } | ||
265 | } | ||
266 | } | ||
267 | |||
268 | static void ep93xx_gpio_ab_irq_mask_ack(unsigned int irq) | ||
269 | { | ||
270 | int line = irq - IRQ_EP93XX_GPIO(0); | ||
271 | int port = line >> 3; | ||
272 | |||
273 | gpio_int_enable[port] &= ~(1 << (line & 7)); | ||
274 | update_gpio_ab_int_params(port); | ||
275 | |||
276 | if (line >> 3) { | ||
277 | __raw_writel(1 << (line & 7), EP93XX_GPIO_B_INT_ACK); | ||
278 | } else { | ||
279 | __raw_writel(1 << (line & 7), EP93XX_GPIO_A_INT_ACK); | ||
280 | } | ||
281 | } | ||
282 | |||
283 | static void ep93xx_gpio_ab_irq_mask(unsigned int irq) | ||
284 | { | ||
285 | int line = irq - IRQ_EP93XX_GPIO(0); | ||
286 | int port = line >> 3; | ||
287 | |||
288 | gpio_int_enable[port] &= ~(1 << (line & 7)); | ||
289 | update_gpio_ab_int_params(port); | ||
290 | } | ||
291 | |||
292 | static void ep93xx_gpio_ab_irq_unmask(unsigned int irq) | ||
293 | { | ||
294 | int line = irq - IRQ_EP93XX_GPIO(0); | ||
295 | int port = line >> 3; | ||
296 | |||
297 | gpio_int_enable[port] |= 1 << (line & 7); | ||
298 | update_gpio_ab_int_params(port); | ||
299 | } | ||
300 | |||
301 | |||
302 | /* | ||
303 | * gpio_int_type1 controls whether the interrupt is level (0) or | ||
304 | * edge (1) triggered, while gpio_int_type2 controls whether it | ||
305 | * triggers on low/falling (0) or high/rising (1). | ||
306 | */ | ||
307 | static int ep93xx_gpio_ab_irq_type(unsigned int irq, unsigned int type) | ||
308 | { | ||
309 | int port; | ||
310 | int line; | ||
311 | |||
312 | line = irq - IRQ_EP93XX_GPIO(0); | ||
313 | gpio_line_config(line, GPIO_IN); | ||
314 | |||
315 | port = line >> 3; | ||
316 | line &= 7; | ||
317 | |||
318 | if (type & IRQT_RISING) { | ||
319 | gpio_int_type1[port] |= 1 << line; | ||
320 | gpio_int_type2[port] |= 1 << line; | ||
321 | } else if (type & IRQT_FALLING) { | ||
322 | gpio_int_type1[port] |= 1 << line; | ||
323 | gpio_int_type2[port] &= ~(1 << line); | ||
324 | } else if (type & IRQT_HIGH) { | ||
325 | gpio_int_type1[port] &= ~(1 << line); | ||
326 | gpio_int_type2[port] |= 1 << line; | ||
327 | } else if (type & IRQT_LOW) { | ||
328 | gpio_int_type1[port] &= ~(1 << line); | ||
329 | gpio_int_type2[port] &= ~(1 << line); | ||
330 | } | ||
331 | update_gpio_ab_int_params(port); | ||
332 | |||
333 | return 0; | ||
334 | } | ||
335 | |||
336 | static struct irqchip ep93xx_gpio_ab_irq_chip = { | ||
337 | .ack = ep93xx_gpio_ab_irq_mask_ack, | ||
338 | .mask = ep93xx_gpio_ab_irq_mask, | ||
339 | .unmask = ep93xx_gpio_ab_irq_unmask, | ||
340 | .set_type = ep93xx_gpio_ab_irq_type, | ||
341 | }; | ||
342 | |||
343 | |||
344 | void __init ep93xx_init_irq(void) | ||
345 | { | ||
346 | int irq; | ||
347 | |||
348 | vic_init((void *)EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK); | ||
349 | vic_init((void *)EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK); | ||
350 | |||
351 | for (irq = IRQ_EP93XX_GPIO(0) ; irq <= IRQ_EP93XX_GPIO(15); irq++) { | ||
352 | set_irq_chip(irq, &ep93xx_gpio_ab_irq_chip); | ||
353 | set_irq_handler(irq, do_level_IRQ); | ||
354 | set_irq_flags(irq, IRQF_VALID); | ||
355 | } | ||
356 | set_irq_chained_handler(IRQ_EP93XX_GPIO_AB, ep93xx_gpio_ab_irq_handler); | ||
357 | } | ||
358 | |||
359 | |||
360 | /************************************************************************* | ||
361 | * EP93xx peripheral handling | ||
362 | *************************************************************************/ | ||
363 | void __init ep93xx_init_devices(void) | ||
364 | { | ||
365 | unsigned int v; | ||
366 | |||
367 | /* | ||
368 | * Disallow access to MaverickCrunch initially. | ||
369 | */ | ||
370 | v = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG); | ||
371 | v &= ~EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE; | ||
372 | __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); | ||
373 | __raw_writel(v, EP93XX_SYSCON_DEVICE_CONFIG); | ||
374 | } | ||
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c new file mode 100644 index 000000000000..d18fcb1a2f1b --- /dev/null +++ b/arch/arm/mach-ep93xx/gesbc9312.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/gesbc9312.c | ||
3 | * Glomation GESBC-9312-sx support. | ||
4 | * | ||
5 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/mm.h> | ||
17 | #include <linux/sched.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <asm/io.h> | ||
21 | #include <asm/hardware.h> | ||
22 | #include <asm/mach-types.h> | ||
23 | #include <asm/mach/arch.h> | ||
24 | |||
25 | static void __init gesbc9312_init_machine(void) | ||
26 | { | ||
27 | ep93xx_init_devices(); | ||
28 | physmap_configure(0x60000000, 0x00800000, 4, NULL); | ||
29 | } | ||
30 | |||
31 | MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx") | ||
32 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
33 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
34 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
35 | .boot_params = 0x00000100, | ||
36 | .map_io = ep93xx_map_io, | ||
37 | .init_irq = ep93xx_init_irq, | ||
38 | .timer = &ep93xx_timer, | ||
39 | .init_machine = gesbc9312_init_machine, | ||
40 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c new file mode 100644 index 000000000000..777e75daa8a5 --- /dev/null +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
@@ -0,0 +1,118 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/ts72xx.c | ||
3 | * Technologic Systems TS72xx SBC support. | ||
4 | * | ||
5 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/mm.h> | ||
17 | #include <linux/sched.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <asm/io.h> | ||
21 | #include <asm/hardware.h> | ||
22 | #include <asm/mach-types.h> | ||
23 | #include <asm/mach/arch.h> | ||
24 | #include <asm/mach/map.h> | ||
25 | |||
26 | static struct map_desc ts72xx_io_desc[] __initdata = { | ||
27 | { | ||
28 | .virtual = TS72XX_MODEL_VIRT_BASE, | ||
29 | .pfn = __phys_to_pfn(TS72XX_MODEL_PHYS_BASE), | ||
30 | .length = TS72XX_MODEL_SIZE, | ||
31 | .type = MT_DEVICE, | ||
32 | }, { | ||
33 | .virtual = TS72XX_OPTIONS_VIRT_BASE, | ||
34 | .pfn = __phys_to_pfn(TS72XX_OPTIONS_PHYS_BASE), | ||
35 | .length = TS72XX_OPTIONS_SIZE, | ||
36 | .type = MT_DEVICE, | ||
37 | }, { | ||
38 | .virtual = TS72XX_OPTIONS2_VIRT_BASE, | ||
39 | .pfn = __phys_to_pfn(TS72XX_OPTIONS2_PHYS_BASE), | ||
40 | .length = TS72XX_OPTIONS2_SIZE, | ||
41 | .type = MT_DEVICE, | ||
42 | } | ||
43 | }; | ||
44 | |||
45 | static struct map_desc ts72xx_nand_io_desc[] __initdata = { | ||
46 | { | ||
47 | .virtual = TS72XX_NAND_DATA_VIRT_BASE, | ||
48 | .pfn = __phys_to_pfn(TS72XX_NAND1_DATA_PHYS_BASE), | ||
49 | .length = TS72XX_NAND_DATA_SIZE, | ||
50 | .type = MT_DEVICE, | ||
51 | }, { | ||
52 | .virtual = TS72XX_NAND_CONTROL_VIRT_BASE, | ||
53 | .pfn = __phys_to_pfn(TS72XX_NAND1_CONTROL_PHYS_BASE), | ||
54 | .length = TS72XX_NAND_CONTROL_SIZE, | ||
55 | .type = MT_DEVICE, | ||
56 | }, { | ||
57 | .virtual = TS72XX_NAND_BUSY_VIRT_BASE, | ||
58 | .pfn = __phys_to_pfn(TS72XX_NAND1_BUSY_PHYS_BASE), | ||
59 | .length = TS72XX_NAND_BUSY_SIZE, | ||
60 | .type = MT_DEVICE, | ||
61 | } | ||
62 | }; | ||
63 | |||
64 | static struct map_desc ts72xx_alternate_nand_io_desc[] __initdata = { | ||
65 | { | ||
66 | .virtual = TS72XX_NAND_DATA_VIRT_BASE, | ||
67 | .pfn = __phys_to_pfn(TS72XX_NAND2_DATA_PHYS_BASE), | ||
68 | .length = TS72XX_NAND_DATA_SIZE, | ||
69 | .type = MT_DEVICE, | ||
70 | }, { | ||
71 | .virtual = TS72XX_NAND_CONTROL_VIRT_BASE, | ||
72 | .pfn = __phys_to_pfn(TS72XX_NAND2_CONTROL_PHYS_BASE), | ||
73 | .length = TS72XX_NAND_CONTROL_SIZE, | ||
74 | .type = MT_DEVICE, | ||
75 | }, { | ||
76 | .virtual = TS72XX_NAND_BUSY_VIRT_BASE, | ||
77 | .pfn = __phys_to_pfn(TS72XX_NAND2_BUSY_PHYS_BASE), | ||
78 | .length = TS72XX_NAND_BUSY_SIZE, | ||
79 | .type = MT_DEVICE, | ||
80 | } | ||
81 | }; | ||
82 | |||
83 | static void __init ts72xx_map_io(void) | ||
84 | { | ||
85 | ep93xx_map_io(); | ||
86 | iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc)); | ||
87 | |||
88 | /* | ||
89 | * The TS-7200 has NOR flash, the other models have NAND flash. | ||
90 | */ | ||
91 | if (!board_is_ts7200()) { | ||
92 | if (is_ts9420_installed()) { | ||
93 | iotable_init(ts72xx_alternate_nand_io_desc, | ||
94 | ARRAY_SIZE(ts72xx_alternate_nand_io_desc)); | ||
95 | } else { | ||
96 | iotable_init(ts72xx_nand_io_desc, | ||
97 | ARRAY_SIZE(ts72xx_nand_io_desc)); | ||
98 | } | ||
99 | } | ||
100 | } | ||
101 | |||
102 | static void __init ts72xx_init_machine(void) | ||
103 | { | ||
104 | ep93xx_init_devices(); | ||
105 | if (board_is_ts7200()) | ||
106 | physmap_configure(TS72XX_NOR_PHYS_BASE, 0x01000000, 1, NULL); | ||
107 | } | ||
108 | |||
109 | MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") | ||
110 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
111 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
112 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
113 | .boot_params = 0x00000100, | ||
114 | .map_io = ts72xx_map_io, | ||
115 | .init_irq = ep93xx_init_irq, | ||
116 | .timer = &ep93xx_timer, | ||
117 | .init_machine = ts72xx_init_machine, | ||
118 | MACHINE_END | ||
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index e79884eea1f7..5dace2597838 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c | |||
@@ -255,14 +255,12 @@ int __init dc21285_setup(int nr, struct pci_sys_data *sys) | |||
255 | if (nr || !footbridge_cfn_mode()) | 255 | if (nr || !footbridge_cfn_mode()) |
256 | return 0; | 256 | return 0; |
257 | 257 | ||
258 | res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); | 258 | res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL); |
259 | if (!res) { | 259 | if (!res) { |
260 | printk("out of memory for root bus resources"); | 260 | printk("out of memory for root bus resources"); |
261 | return 0; | 261 | return 0; |
262 | } | 262 | } |
263 | 263 | ||
264 | memset(res, 0, sizeof(struct resource) * 2); | ||
265 | |||
266 | res[0].flags = IORESOURCE_MEM; | 264 | res[0].flags = IORESOURCE_MEM; |
267 | res[0].name = "Footbridge non-prefetch"; | 265 | res[0].name = "Footbridge non-prefetch"; |
268 | res[1].flags = IORESOURCE_MEM | IORESOURCE_PREFETCH; | 266 | res[1].flags = IORESOURCE_MEM | IORESOURCE_PREFETCH; |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index a85d471c5bfa..92d79fb39311 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -355,12 +355,11 @@ static int impd1_probe(struct lm_device *dev) | |||
355 | if (!request_mem_region(dev->resource.start, SZ_4K, "LM registers")) | 355 | if (!request_mem_region(dev->resource.start, SZ_4K, "LM registers")) |
356 | return -EBUSY; | 356 | return -EBUSY; |
357 | 357 | ||
358 | impd1 = kmalloc(sizeof(struct impd1_module), GFP_KERNEL); | 358 | impd1 = kzalloc(sizeof(struct impd1_module), GFP_KERNEL); |
359 | if (!impd1) { | 359 | if (!impd1) { |
360 | ret = -ENOMEM; | 360 | ret = -ENOMEM; |
361 | goto release_lm; | 361 | goto release_lm; |
362 | } | 362 | } |
363 | memset(impd1, 0, sizeof(struct impd1_module)); | ||
364 | 363 | ||
365 | impd1->base = ioremap(dev->resource.start, SZ_4K); | 364 | impd1->base = ioremap(dev->resource.start, SZ_4K); |
366 | if (!impd1->base) { | 365 | if (!impd1->base) { |
@@ -389,12 +388,10 @@ static int impd1_probe(struct lm_device *dev) | |||
389 | 388 | ||
390 | pc_base = dev->resource.start + idev->offset; | 389 | pc_base = dev->resource.start + idev->offset; |
391 | 390 | ||
392 | d = kmalloc(sizeof(struct amba_device), GFP_KERNEL); | 391 | d = kzalloc(sizeof(struct amba_device), GFP_KERNEL); |
393 | if (!d) | 392 | if (!d) |
394 | continue; | 393 | continue; |
395 | 394 | ||
396 | memset(d, 0, sizeof(struct amba_device)); | ||
397 | |||
398 | snprintf(d->dev.bus_id, sizeof(d->dev.bus_id), | 395 | snprintf(d->dev.bus_id, sizeof(d->dev.bus_id), |
399 | "lm%x:%5.5lx", dev->id, idev->offset >> 12); | 396 | "lm%x:%5.5lx", dev->id, idev->offset >> 12); |
400 | 397 | ||
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index d8d3c2a5a97e..6d65c96ebfd2 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -319,12 +319,10 @@ static void __init ap_init(void) | |||
319 | if ((sc_dec & (16 << i)) == 0) | 319 | if ((sc_dec & (16 << i)) == 0) |
320 | continue; | 320 | continue; |
321 | 321 | ||
322 | lmdev = kmalloc(sizeof(struct lm_device), GFP_KERNEL); | 322 | lmdev = kzalloc(sizeof(struct lm_device), GFP_KERNEL); |
323 | if (!lmdev) | 323 | if (!lmdev) |
324 | continue; | 324 | continue; |
325 | 325 | ||
326 | memset(lmdev, 0, sizeof(struct lm_device)); | ||
327 | |||
328 | lmdev->resource.start = 0xc0000000 + 0x10000000 * i; | 326 | lmdev->resource.start = 0xc0000000 + 0x10000000 * i; |
329 | lmdev->resource.end = lmdev->resource.start + 0x0fffffff; | 327 | lmdev->resource.end = lmdev->resource.start + 0x0fffffff; |
330 | lmdev->resource.flags = IORESOURCE_MEM; | 328 | lmdev->resource.flags = IORESOURCE_MEM; |
diff --git a/arch/arm/mach-iop3xx/iop331-setup.c b/arch/arm/mach-iop3xx/iop331-setup.c index 2d6abe5be14d..7b7b6eea3846 100644 --- a/arch/arm/mach-iop3xx/iop331-setup.c +++ b/arch/arm/mach-iop3xx/iop331-setup.c | |||
@@ -103,7 +103,7 @@ static struct plat_serial8250_port iop33x_uart1_data[] = { | |||
103 | 103 | ||
104 | static struct platform_device iop33x_uart0 = { | 104 | static struct platform_device iop33x_uart0 = { |
105 | .name = "serial8250", | 105 | .name = "serial8250", |
106 | .id = 0, | 106 | .id = PLAT8250_DEV_PLATFORM, |
107 | .dev.platform_data = iop33x_uart0_data, | 107 | .dev.platform_data = iop33x_uart0_data, |
108 | .num_resources = 2, | 108 | .num_resources = 2, |
109 | .resource = iop33x_uart0_resources, | 109 | .resource = iop33x_uart0_resources, |
@@ -111,7 +111,7 @@ static struct platform_device iop33x_uart0 = { | |||
111 | 111 | ||
112 | static struct platform_device iop33x_uart1 = { | 112 | static struct platform_device iop33x_uart1 = { |
113 | .name = "serial8250", | 113 | .name = "serial8250", |
114 | .id = 1, | 114 | .id = PLAT8250_DEV_PLATFORM1, |
115 | .dev.platform_data = iop33x_uart1_data, | 115 | .dev.platform_data = iop33x_uart1_data, |
116 | .num_resources = 2, | 116 | .num_resources = 2, |
117 | .resource = iop33x_uart1_resources, | 117 | .resource = iop33x_uart1_resources, |
diff --git a/arch/arm/mach-iop3xx/iq31244-pci.c b/arch/arm/mach-iop3xx/iq31244-pci.c index c6a973ba8fc6..f3c6413fa5bd 100644 --- a/arch/arm/mach-iop3xx/iq31244-pci.c +++ b/arch/arm/mach-iop3xx/iq31244-pci.c | |||
@@ -74,12 +74,10 @@ static int iq31244_setup(int nr, struct pci_sys_data *sys) | |||
74 | if(nr != 0) | 74 | if(nr != 0) |
75 | return 0; | 75 | return 0; |
76 | 76 | ||
77 | res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); | 77 | res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL); |
78 | if (!res) | 78 | if (!res) |
79 | panic("PCI: unable to alloc resources"); | 79 | panic("PCI: unable to alloc resources"); |
80 | 80 | ||
81 | memset(res, 0, sizeof(struct resource) * 2); | ||
82 | |||
83 | res[0].start = IOP321_PCI_LOWER_IO_VA; | 81 | res[0].start = IOP321_PCI_LOWER_IO_VA; |
84 | res[0].end = IOP321_PCI_UPPER_IO_VA; | 82 | res[0].end = IOP321_PCI_UPPER_IO_VA; |
85 | res[0].name = "IQ31244 PCI I/O Space"; | 83 | res[0].name = "IQ31244 PCI I/O Space"; |
diff --git a/arch/arm/mach-iop3xx/iq80321-pci.c b/arch/arm/mach-iop3xx/iq80321-pci.c index 802f6d091b75..d9758d3f6e7f 100644 --- a/arch/arm/mach-iop3xx/iq80321-pci.c +++ b/arch/arm/mach-iop3xx/iq80321-pci.c | |||
@@ -68,12 +68,10 @@ static int iq80321_setup(int nr, struct pci_sys_data *sys) | |||
68 | if(nr != 0) | 68 | if(nr != 0) |
69 | return 0; | 69 | return 0; |
70 | 70 | ||
71 | res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); | 71 | res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL); |
72 | if (!res) | 72 | if (!res) |
73 | panic("PCI: unable to alloc resources"); | 73 | panic("PCI: unable to alloc resources"); |
74 | 74 | ||
75 | memset(res, 0, sizeof(struct resource) * 2); | ||
76 | |||
77 | res[0].start = IOP321_PCI_LOWER_IO_VA; | 75 | res[0].start = IOP321_PCI_LOWER_IO_VA; |
78 | res[0].end = IOP321_PCI_UPPER_IO_VA; | 76 | res[0].end = IOP321_PCI_UPPER_IO_VA; |
79 | res[0].name = "IQ80321 PCI I/O Space"; | 77 | res[0].name = "IQ80321 PCI I/O Space"; |
diff --git a/arch/arm/mach-iop3xx/iq80331-pci.c b/arch/arm/mach-iop3xx/iq80331-pci.c index 654e450a1311..40d861002492 100644 --- a/arch/arm/mach-iop3xx/iq80331-pci.c +++ b/arch/arm/mach-iop3xx/iq80331-pci.c | |||
@@ -64,12 +64,10 @@ static int iq80331_setup(int nr, struct pci_sys_data *sys) | |||
64 | if(nr != 0) | 64 | if(nr != 0) |
65 | return 0; | 65 | return 0; |
66 | 66 | ||
67 | res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); | 67 | res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL); |
68 | if (!res) | 68 | if (!res) |
69 | panic("PCI: unable to alloc resources"); | 69 | panic("PCI: unable to alloc resources"); |
70 | 70 | ||
71 | memset(res, 0, sizeof(struct resource) * 2); | ||
72 | |||
73 | res[0].start = IOP331_PCI_LOWER_IO_VA; | 71 | res[0].start = IOP331_PCI_LOWER_IO_VA; |
74 | res[0].end = IOP331_PCI_UPPER_IO_VA; | 72 | res[0].end = IOP331_PCI_UPPER_IO_VA; |
75 | res[0].name = "IQ80331 PCI I/O Space"; | 73 | res[0].name = "IQ80331 PCI I/O Space"; |
diff --git a/arch/arm/mach-iop3xx/iq80332-pci.c b/arch/arm/mach-iop3xx/iq80332-pci.c index 65951ffe4631..afc0676318e4 100644 --- a/arch/arm/mach-iop3xx/iq80332-pci.c +++ b/arch/arm/mach-iop3xx/iq80332-pci.c | |||
@@ -70,12 +70,10 @@ static int iq80332_setup(int nr, struct pci_sys_data *sys) | |||
70 | if(nr != 0) | 70 | if(nr != 0) |
71 | return 0; | 71 | return 0; |
72 | 72 | ||
73 | res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); | 73 | res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL); |
74 | if (!res) | 74 | if (!res) |
75 | panic("PCI: unable to alloc resources"); | 75 | panic("PCI: unable to alloc resources"); |
76 | 76 | ||
77 | memset(res, 0, sizeof(struct resource) * 2); | ||
78 | |||
79 | res[0].start = IOP331_PCI_LOWER_IO_VA; | 77 | res[0].start = IOP331_PCI_LOWER_IO_VA; |
80 | res[0].end = IOP331_PCI_UPPER_IO_VA; | 78 | res[0].end = IOP331_PCI_UPPER_IO_VA; |
81 | res[0].name = "IQ80332 PCI I/O Space"; | 79 | res[0].name = "IQ80332 PCI I/O Space"; |
diff --git a/arch/arm/mach-ixp2000/Kconfig b/arch/arm/mach-ixp2000/Kconfig index ecb58d83478e..86f53f8ccbf5 100644 --- a/arch/arm/mach-ixp2000/Kconfig +++ b/arch/arm/mach-ixp2000/Kconfig | |||
@@ -43,12 +43,17 @@ config ARCH_IXDP2401 | |||
43 | this platform, see <file:Documentation/arm/IXP2000>. | 43 | this platform, see <file:Documentation/arm/IXP2000>. |
44 | 44 | ||
45 | config ARCH_IXDP2801 | 45 | config ARCH_IXDP2801 |
46 | bool "Support Intel IXDP2801" | 46 | bool "Support Intel IXDP2801 and IXDP28x5" |
47 | help | 47 | help |
48 | Say 'Y' here if you want your kernel to support the Intel | 48 | Say 'Y' here if you want your kernel to support the Intel |
49 | IXDP2801 reference platform. For more information on | 49 | IXDP2801/2805/2855 reference platforms. For more information on |
50 | this platform, see <file:Documentation/arm/IXP2000>. | 50 | this platform, see <file:Documentation/arm/IXP2000>. |
51 | 51 | ||
52 | config MACH_IXDP28X5 | ||
53 | bool | ||
54 | depends on ARCH_IXDP2801 | ||
55 | default y | ||
56 | |||
52 | config ARCH_IXDP2X01 | 57 | config ARCH_IXDP2X01 |
53 | bool | 58 | bool |
54 | depends on ARCH_IXDP2401 || ARCH_IXDP2801 | 59 | depends on ARCH_IXDP2401 || ARCH_IXDP2801 |
diff --git a/arch/arm/mach-ixp2000/Makefile b/arch/arm/mach-ixp2000/Makefile index 9621aeb61f46..1e6139d42a92 100644 --- a/arch/arm/mach-ixp2000/Makefile +++ b/arch/arm/mach-ixp2000/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | obj-y := core.o pci.o uengine.o | 4 | obj-y := core.o pci.o |
5 | obj-m := | 5 | obj-m := |
6 | obj-n := | 6 | obj-n := |
7 | obj- := | 7 | obj- := |
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index cfd5bef3190b..6e8d504aca55 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c | |||
@@ -288,8 +288,6 @@ void gpio_line_config(int line, int direction) | |||
288 | 288 | ||
289 | local_irq_save(flags); | 289 | local_irq_save(flags); |
290 | if (direction == GPIO_OUT) { | 290 | if (direction == GPIO_OUT) { |
291 | irq_desc[line + IRQ_IXP2000_GPIO0].valid = 0; | ||
292 | |||
293 | /* if it's an output, it ain't an interrupt anymore */ | 291 | /* if it's an output, it ain't an interrupt anymore */ |
294 | GPIO_IRQ_falling_edge &= ~(1 << line); | 292 | GPIO_IRQ_falling_edge &= ~(1 << line); |
295 | GPIO_IRQ_rising_edge &= ~(1 << line); | 293 | GPIO_IRQ_rising_edge &= ~(1 << line); |
@@ -351,11 +349,6 @@ static int ixp2000_GPIO_irq_type(unsigned int irq, unsigned int type) | |||
351 | GPIO_IRQ_level_high &= ~(1 << line); | 349 | GPIO_IRQ_level_high &= ~(1 << line); |
352 | update_gpio_int_csrs(); | 350 | update_gpio_int_csrs(); |
353 | 351 | ||
354 | /* | ||
355 | * Finally, mark the corresponding IRQ as valid. | ||
356 | */ | ||
357 | irq_desc[irq].valid = 1; | ||
358 | |||
359 | return 0; | 352 | return 0; |
360 | } | 353 | } |
361 | 354 | ||
@@ -506,14 +499,10 @@ void __init ixp2000_init_irq(void) | |||
506 | } | 499 | } |
507 | set_irq_chained_handler(IRQ_IXP2000_ERRSUM, ixp2000_err_irq_handler); | 500 | set_irq_chained_handler(IRQ_IXP2000_ERRSUM, ixp2000_err_irq_handler); |
508 | 501 | ||
509 | /* | ||
510 | * GPIO IRQs are invalid until someone sets the interrupt mode | ||
511 | * by calling set_irq_type(). | ||
512 | */ | ||
513 | for (irq = IRQ_IXP2000_GPIO0; irq <= IRQ_IXP2000_GPIO7; irq++) { | 502 | for (irq = IRQ_IXP2000_GPIO0; irq <= IRQ_IXP2000_GPIO7; irq++) { |
514 | set_irq_chip(irq, &ixp2000_GPIO_irq_chip); | 503 | set_irq_chip(irq, &ixp2000_GPIO_irq_chip); |
515 | set_irq_handler(irq, do_level_IRQ); | 504 | set_irq_handler(irq, do_level_IRQ); |
516 | set_irq_flags(irq, 0); | 505 | set_irq_flags(irq, IRQF_VALID); |
517 | } | 506 | } |
518 | set_irq_chained_handler(IRQ_IXP2000_GPIO, ixp2000_GPIO_irq_handler); | 507 | set_irq_chained_handler(IRQ_IXP2000_GPIO, ixp2000_GPIO_irq_handler); |
519 | 508 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 150519fb38ec..66915282a463 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/tty.h> | 30 | #include <linux/tty.h> |
31 | #include <linux/serial_core.h> | 31 | #include <linux/serial_core.h> |
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/serial_8250.h> | ||
33 | 34 | ||
34 | #include <asm/io.h> | 35 | #include <asm/io.h> |
35 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
@@ -132,7 +133,7 @@ void __init ixdp2x01_init_irq(void) | |||
132 | 133 | ||
133 | 134 | ||
134 | /************************************************************************* | 135 | /************************************************************************* |
135 | * IXDP2x01 memory map and serial ports | 136 | * IXDP2x01 memory map |
136 | *************************************************************************/ | 137 | *************************************************************************/ |
137 | static struct map_desc ixdp2x01_io_desc __initdata = { | 138 | static struct map_desc ixdp2x01_io_desc __initdata = { |
138 | .virtual = IXDP2X01_VIRT_CPLD_BASE, | 139 | .virtual = IXDP2X01_VIRT_CPLD_BASE, |
@@ -141,40 +142,78 @@ static struct map_desc ixdp2x01_io_desc __initdata = { | |||
141 | .type = MT_DEVICE | 142 | .type = MT_DEVICE |
142 | }; | 143 | }; |
143 | 144 | ||
144 | static struct uart_port ixdp2x01_serial_ports[2] = { | 145 | static void __init ixdp2x01_map_io(void) |
146 | { | ||
147 | ixp2000_map_io(); | ||
148 | iotable_init(&ixdp2x01_io_desc, 1); | ||
149 | } | ||
150 | |||
151 | |||
152 | /************************************************************************* | ||
153 | * IXDP2x01 serial ports | ||
154 | *************************************************************************/ | ||
155 | static struct plat_serial8250_port ixdp2x01_serial_port1[] = { | ||
145 | { | 156 | { |
146 | .membase = (char *)(IXDP2X01_UART1_VIRT_BASE), | ||
147 | .mapbase = (unsigned long)IXDP2X01_UART1_PHYS_BASE, | 157 | .mapbase = (unsigned long)IXDP2X01_UART1_PHYS_BASE, |
158 | .membase = (char *)IXDP2X01_UART1_VIRT_BASE, | ||
148 | .irq = IRQ_IXDP2X01_UART1, | 159 | .irq = IRQ_IXDP2X01_UART1, |
149 | .flags = UPF_SKIP_TEST, | 160 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, |
150 | .iotype = UPIO_MEM32, | 161 | .iotype = UPIO_MEM32, |
151 | .regshift = 2, | 162 | .regshift = 2, |
152 | .uartclk = IXDP2X01_UART_CLK, | 163 | .uartclk = IXDP2X01_UART_CLK, |
153 | .line = 1, | 164 | }, |
154 | .type = PORT_16550A, | 165 | { } |
155 | .fifosize = 16 | 166 | }; |
156 | }, { | 167 | |
157 | .membase = (char *)(IXDP2X01_UART2_VIRT_BASE), | 168 | static struct resource ixdp2x01_uart_resource1 = { |
169 | .start = IXDP2X01_UART1_PHYS_BASE, | ||
170 | .end = IXDP2X01_UART1_PHYS_BASE + 0xffff, | ||
171 | .flags = IORESOURCE_MEM, | ||
172 | }; | ||
173 | |||
174 | static struct platform_device ixdp2x01_serial_device1 = { | ||
175 | .name = "serial8250", | ||
176 | .id = PLAT8250_DEV_PLATFORM1, | ||
177 | .dev = { | ||
178 | .platform_data = ixdp2x01_serial_port1, | ||
179 | }, | ||
180 | .num_resources = 1, | ||
181 | .resource = &ixdp2x01_uart_resource1, | ||
182 | }; | ||
183 | |||
184 | static struct plat_serial8250_port ixdp2x01_serial_port2[] = { | ||
185 | { | ||
158 | .mapbase = (unsigned long)IXDP2X01_UART2_PHYS_BASE, | 186 | .mapbase = (unsigned long)IXDP2X01_UART2_PHYS_BASE, |
187 | .membase = (char *)IXDP2X01_UART2_VIRT_BASE, | ||
159 | .irq = IRQ_IXDP2X01_UART2, | 188 | .irq = IRQ_IXDP2X01_UART2, |
160 | .flags = UPF_SKIP_TEST, | 189 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, |
161 | .iotype = UPIO_MEM32, | 190 | .iotype = UPIO_MEM32, |
162 | .regshift = 2, | 191 | .regshift = 2, |
163 | .uartclk = IXDP2X01_UART_CLK, | 192 | .uartclk = IXDP2X01_UART_CLK, |
164 | .line = 2, | ||
165 | .type = PORT_16550A, | ||
166 | .fifosize = 16 | ||
167 | }, | 193 | }, |
194 | { } | ||
168 | }; | 195 | }; |
169 | 196 | ||
170 | static void __init ixdp2x01_map_io(void) | 197 | static struct resource ixdp2x01_uart_resource2 = { |
171 | { | 198 | .start = IXDP2X01_UART2_PHYS_BASE, |
172 | ixp2000_map_io(); | 199 | .end = IXDP2X01_UART2_PHYS_BASE + 0xffff, |
200 | .flags = IORESOURCE_MEM, | ||
201 | }; | ||
173 | 202 | ||
174 | iotable_init(&ixdp2x01_io_desc, 1); | 203 | static struct platform_device ixdp2x01_serial_device2 = { |
204 | .name = "serial8250", | ||
205 | .id = PLAT8250_DEV_PLATFORM2, | ||
206 | .dev = { | ||
207 | .platform_data = ixdp2x01_serial_port2, | ||
208 | }, | ||
209 | .num_resources = 1, | ||
210 | .resource = &ixdp2x01_uart_resource2, | ||
211 | }; | ||
175 | 212 | ||
176 | early_serial_setup(&ixdp2x01_serial_ports[0]); | 213 | static void ixdp2x01_uart_init(void) |
177 | early_serial_setup(&ixdp2x01_serial_ports[1]); | 214 | { |
215 | platform_device_register(&ixdp2x01_serial_device1); | ||
216 | platform_device_register(&ixdp2x01_serial_device2); | ||
178 | } | 217 | } |
179 | 218 | ||
180 | 219 | ||
@@ -284,7 +323,7 @@ static int ixdp2x01_pci_setup(int nr, struct pci_sys_data *sys) | |||
284 | { | 323 | { |
285 | sys->mem_offset = 0xe0000000; | 324 | sys->mem_offset = 0xe0000000; |
286 | 325 | ||
287 | if (machine_is_ixdp2801()) | 326 | if (machine_is_ixdp2801() || machine_is_ixdp28x5()) |
288 | sys->mem_offset -= ((*IXP2000_PCI_ADDR_EXT & 0xE000) << 16); | 327 | sys->mem_offset -= ((*IXP2000_PCI_ADDR_EXT & 0xE000) << 16); |
289 | 328 | ||
290 | return ixp2000_pci_setup(nr, sys); | 329 | return ixp2000_pci_setup(nr, sys); |
@@ -300,7 +339,8 @@ struct hw_pci ixdp2x01_pci __initdata = { | |||
300 | 339 | ||
301 | int __init ixdp2x01_pci_init(void) | 340 | int __init ixdp2x01_pci_init(void) |
302 | { | 341 | { |
303 | if (machine_is_ixdp2401() || machine_is_ixdp2801()) | 342 | if (machine_is_ixdp2401() || machine_is_ixdp2801() ||\ |
343 | machine_is_ixdp28x5()) | ||
304 | pci_common_init(&ixdp2x01_pci); | 344 | pci_common_init(&ixdp2x01_pci); |
305 | 345 | ||
306 | return 0; | 346 | return 0; |
@@ -373,6 +413,7 @@ static void __init ixdp2x01_init_machine(void) | |||
373 | 413 | ||
374 | platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices)); | 414 | platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices)); |
375 | ixp2000_uart_init(); | 415 | ixp2000_uart_init(); |
416 | ixdp2x01_uart_init(); | ||
376 | } | 417 | } |
377 | 418 | ||
378 | 419 | ||
@@ -400,6 +441,21 @@ MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform") | |||
400 | .timer = &ixdp2x01_timer, | 441 | .timer = &ixdp2x01_timer, |
401 | .init_machine = ixdp2x01_init_machine, | 442 | .init_machine = ixdp2x01_init_machine, |
402 | MACHINE_END | 443 | MACHINE_END |
444 | |||
445 | /* | ||
446 | * IXDP28x5 is basically an IXDP2801 with a different CPU but Intel | ||
447 | * changed the machine ID in the bootloader | ||
448 | */ | ||
449 | MACHINE_START(IXDP28X5, "Intel IXDP2805/2855 Development Platform") | ||
450 | /* Maintainer: MontaVista Software, Inc. */ | ||
451 | .phys_io = IXP2000_UART_PHYS_BASE, | ||
452 | .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc, | ||
453 | .boot_params = 0x00000100, | ||
454 | .map_io = ixdp2x01_map_io, | ||
455 | .init_irq = ixdp2x01_init_irq, | ||
456 | .timer = &ixdp2x01_timer, | ||
457 | .init_machine = ixdp2x01_init_machine, | ||
458 | MACHINE_END | ||
403 | #endif | 459 | #endif |
404 | 460 | ||
405 | 461 | ||
diff --git a/arch/arm/mach-ixp23xx/Kconfig b/arch/arm/mach-ixp23xx/Kconfig new file mode 100644 index 000000000000..982670ec3866 --- /dev/null +++ b/arch/arm/mach-ixp23xx/Kconfig | |||
@@ -0,0 +1,25 @@ | |||
1 | if ARCH_IXP23XX | ||
2 | |||
3 | config ARCH_SUPPORTS_BIG_ENDIAN | ||
4 | bool | ||
5 | default y | ||
6 | |||
7 | menu "Intel IXP23xx Implementation Options" | ||
8 | |||
9 | comment "IXP23xx Platforms" | ||
10 | |||
11 | config MACH_ESPRESSO | ||
12 | bool "Support IP Fabrics Double Espresso platform" | ||
13 | help | ||
14 | |||
15 | config MACH_IXDP2351 | ||
16 | bool "Support Intel IXDP2351 platform" | ||
17 | help | ||
18 | |||
19 | config MACH_ROADRUNNER | ||
20 | bool "Support ADI RoadRunner platform" | ||
21 | help | ||
22 | |||
23 | endmenu | ||
24 | |||
25 | endif | ||
diff --git a/arch/arm/mach-ixp23xx/Makefile b/arch/arm/mach-ixp23xx/Makefile new file mode 100644 index 000000000000..288b371b6d03 --- /dev/null +++ b/arch/arm/mach-ixp23xx/Makefile | |||
@@ -0,0 +1,11 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | obj-y := core.o pci.o | ||
5 | obj-m := | ||
6 | obj-n := | ||
7 | obj- := | ||
8 | |||
9 | obj-$(CONFIG_MACH_ESPRESSO) += espresso.o | ||
10 | obj-$(CONFIG_MACH_IXDP2351) += ixdp2351.o | ||
11 | obj-$(CONFIG_MACH_ROADRUNNER) += roadrunner.o | ||
diff --git a/arch/arm/mach-ixp23xx/Makefile.boot b/arch/arm/mach-ixp23xx/Makefile.boot new file mode 100644 index 000000000000..d5561ad15bad --- /dev/null +++ b/arch/arm/mach-ixp23xx/Makefile.boot | |||
@@ -0,0 +1,2 @@ | |||
1 | zreladdr-y := 0x00008000 | ||
2 | params_phys-y := 0x00000100 | ||
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c new file mode 100644 index 000000000000..092ee12ced42 --- /dev/null +++ b/arch/arm/mach-ixp23xx/core.c | |||
@@ -0,0 +1,431 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/core.c | ||
3 | * | ||
4 | * Core routines for IXP23xx chips | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on 2.4 code Copyright 2004 (c) Intel Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #include <linux/config.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/spinlock.h> | ||
21 | #include <linux/sched.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/serial.h> | ||
24 | #include <linux/tty.h> | ||
25 | #include <linux/bitops.h> | ||
26 | #include <linux/serial.h> | ||
27 | #include <linux/serial_8250.h> | ||
28 | #include <linux/serial_core.h> | ||
29 | #include <linux/device.h> | ||
30 | #include <linux/mm.h> | ||
31 | #include <linux/time.h> | ||
32 | #include <linux/timex.h> | ||
33 | |||
34 | #include <asm/types.h> | ||
35 | #include <asm/setup.h> | ||
36 | #include <asm/memory.h> | ||
37 | #include <asm/hardware.h> | ||
38 | #include <asm/mach-types.h> | ||
39 | #include <asm/irq.h> | ||
40 | #include <asm/system.h> | ||
41 | #include <asm/tlbflush.h> | ||
42 | #include <asm/pgtable.h> | ||
43 | |||
44 | #include <asm/mach/map.h> | ||
45 | #include <asm/mach/time.h> | ||
46 | #include <asm/mach/irq.h> | ||
47 | #include <asm/mach/arch.h> | ||
48 | |||
49 | |||
50 | /************************************************************************* | ||
51 | * Chip specific mappings shared by all IXP23xx systems | ||
52 | *************************************************************************/ | ||
53 | static struct map_desc ixp23xx_io_desc[] __initdata = { | ||
54 | { /* XSI-CPP CSRs */ | ||
55 | .virtual = IXP23XX_XSI2CPP_CSR_VIRT, | ||
56 | .pfn = __phys_to_pfn(IXP23XX_XSI2CPP_CSR_PHYS), | ||
57 | .length = IXP23XX_XSI2CPP_CSR_SIZE, | ||
58 | .type = MT_DEVICE, | ||
59 | }, { /* Expansion Bus Config */ | ||
60 | .virtual = IXP23XX_EXP_CFG_VIRT, | ||
61 | .pfn = __phys_to_pfn(IXP23XX_EXP_CFG_PHYS), | ||
62 | .length = IXP23XX_EXP_CFG_SIZE, | ||
63 | .type = MT_DEVICE, | ||
64 | }, { /* UART, Interrupt ctrl, GPIO, timers, NPEs, MACS,.... */ | ||
65 | .virtual = IXP23XX_PERIPHERAL_VIRT, | ||
66 | .pfn = __phys_to_pfn(IXP23XX_PERIPHERAL_PHYS), | ||
67 | .length = IXP23XX_PERIPHERAL_SIZE, | ||
68 | .type = MT_DEVICE, | ||
69 | }, { /* CAP CSRs */ | ||
70 | .virtual = IXP23XX_CAP_CSR_VIRT, | ||
71 | .pfn = __phys_to_pfn(IXP23XX_CAP_CSR_PHYS), | ||
72 | .length = IXP23XX_CAP_CSR_SIZE, | ||
73 | .type = MT_DEVICE, | ||
74 | }, { /* MSF CSRs */ | ||
75 | .virtual = IXP23XX_MSF_CSR_VIRT, | ||
76 | .pfn = __phys_to_pfn(IXP23XX_MSF_CSR_PHYS), | ||
77 | .length = IXP23XX_MSF_CSR_SIZE, | ||
78 | .type = MT_DEVICE, | ||
79 | }, { /* PCI I/O Space */ | ||
80 | .virtual = IXP23XX_PCI_IO_VIRT, | ||
81 | .pfn = __phys_to_pfn(IXP23XX_PCI_IO_PHYS), | ||
82 | .length = IXP23XX_PCI_IO_SIZE, | ||
83 | .type = MT_DEVICE, | ||
84 | }, { /* PCI Config Space */ | ||
85 | .virtual = IXP23XX_PCI_CFG_VIRT, | ||
86 | .pfn = __phys_to_pfn(IXP23XX_PCI_CFG_PHYS), | ||
87 | .length = IXP23XX_PCI_CFG_SIZE, | ||
88 | .type = MT_DEVICE, | ||
89 | }, { /* PCI local CFG CSRs */ | ||
90 | .virtual = IXP23XX_PCI_CREG_VIRT, | ||
91 | .pfn = __phys_to_pfn(IXP23XX_PCI_CREG_PHYS), | ||
92 | .length = IXP23XX_PCI_CREG_SIZE, | ||
93 | .type = MT_DEVICE, | ||
94 | }, { /* PCI MEM Space */ | ||
95 | .virtual = IXP23XX_PCI_MEM_VIRT, | ||
96 | .pfn = __phys_to_pfn(IXP23XX_PCI_MEM_PHYS), | ||
97 | .length = IXP23XX_PCI_MEM_SIZE, | ||
98 | .type = MT_DEVICE, | ||
99 | } | ||
100 | }; | ||
101 | |||
102 | void __init ixp23xx_map_io(void) | ||
103 | { | ||
104 | iotable_init(ixp23xx_io_desc, ARRAY_SIZE(ixp23xx_io_desc)); | ||
105 | } | ||
106 | |||
107 | |||
108 | /*************************************************************************** | ||
109 | * IXP23xx Interrupt Handling | ||
110 | ***************************************************************************/ | ||
111 | enum ixp23xx_irq_type { | ||
112 | IXP23XX_IRQ_LEVEL, IXP23XX_IRQ_EDGE | ||
113 | }; | ||
114 | |||
115 | static void ixp23xx_config_irq(unsigned int, enum ixp23xx_irq_type); | ||
116 | |||
117 | static int ixp23xx_irq_set_type(unsigned int irq, unsigned int type) | ||
118 | { | ||
119 | int line = irq - IRQ_IXP23XX_GPIO6 + 6; | ||
120 | u32 int_style; | ||
121 | enum ixp23xx_irq_type irq_type; | ||
122 | volatile u32 *int_reg; | ||
123 | |||
124 | /* | ||
125 | * Only GPIOs 6-15 are wired to interrupts on IXP23xx | ||
126 | */ | ||
127 | if (line < 6 || line > 15) | ||
128 | return -EINVAL; | ||
129 | |||
130 | switch (type) { | ||
131 | case IRQT_BOTHEDGE: | ||
132 | int_style = IXP23XX_GPIO_STYLE_TRANSITIONAL; | ||
133 | irq_type = IXP23XX_IRQ_EDGE; | ||
134 | break; | ||
135 | case IRQT_RISING: | ||
136 | int_style = IXP23XX_GPIO_STYLE_RISING_EDGE; | ||
137 | irq_type = IXP23XX_IRQ_EDGE; | ||
138 | break; | ||
139 | case IRQT_FALLING: | ||
140 | int_style = IXP23XX_GPIO_STYLE_FALLING_EDGE; | ||
141 | irq_type = IXP23XX_IRQ_EDGE; | ||
142 | break; | ||
143 | case IRQT_HIGH: | ||
144 | int_style = IXP23XX_GPIO_STYLE_ACTIVE_HIGH; | ||
145 | irq_type = IXP23XX_IRQ_LEVEL; | ||
146 | break; | ||
147 | case IRQT_LOW: | ||
148 | int_style = IXP23XX_GPIO_STYLE_ACTIVE_LOW; | ||
149 | irq_type = IXP23XX_IRQ_LEVEL; | ||
150 | break; | ||
151 | default: | ||
152 | return -EINVAL; | ||
153 | } | ||
154 | |||
155 | ixp23xx_config_irq(irq, irq_type); | ||
156 | |||
157 | if (line >= 8) { /* pins 8-15 */ | ||
158 | line -= 8; | ||
159 | int_reg = (volatile u32 *)IXP23XX_GPIO_GPIT2R; | ||
160 | } else { /* pins 0-7 */ | ||
161 | int_reg = (volatile u32 *)IXP23XX_GPIO_GPIT1R; | ||
162 | } | ||
163 | |||
164 | /* | ||
165 | * Clear pending interrupts | ||
166 | */ | ||
167 | *IXP23XX_GPIO_GPISR = (1 << line); | ||
168 | |||
169 | /* Clear the style for the appropriate pin */ | ||
170 | *int_reg &= ~(IXP23XX_GPIO_STYLE_MASK << | ||
171 | (line * IXP23XX_GPIO_STYLE_SIZE)); | ||
172 | |||
173 | /* Set the new style */ | ||
174 | *int_reg |= (int_style << (line * IXP23XX_GPIO_STYLE_SIZE)); | ||
175 | |||
176 | return 0; | ||
177 | } | ||
178 | |||
179 | static void ixp23xx_irq_mask(unsigned int irq) | ||
180 | { | ||
181 | volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | ||
182 | |||
183 | *intr_reg &= ~(1 << (irq % 32)); | ||
184 | } | ||
185 | |||
186 | static void ixp23xx_irq_ack(unsigned int irq) | ||
187 | { | ||
188 | int line = irq - IRQ_IXP23XX_GPIO6 + 6; | ||
189 | |||
190 | if ((line < 6) || (line > 15)) | ||
191 | return; | ||
192 | |||
193 | *IXP23XX_GPIO_GPISR = (1 << line); | ||
194 | } | ||
195 | |||
196 | /* | ||
197 | * Level triggered interrupts on GPIO lines can only be cleared when the | ||
198 | * interrupt condition disappears. | ||
199 | */ | ||
200 | static void ixp23xx_irq_level_unmask(unsigned int irq) | ||
201 | { | ||
202 | volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | ||
203 | |||
204 | ixp23xx_irq_ack(irq); | ||
205 | |||
206 | *intr_reg |= (1 << (irq % 32)); | ||
207 | } | ||
208 | |||
209 | static void ixp23xx_irq_edge_unmask(unsigned int irq) | ||
210 | { | ||
211 | volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | ||
212 | |||
213 | *intr_reg |= (1 << (irq % 32)); | ||
214 | } | ||
215 | |||
216 | static struct irqchip ixp23xx_irq_level_chip = { | ||
217 | .ack = ixp23xx_irq_mask, | ||
218 | .mask = ixp23xx_irq_mask, | ||
219 | .unmask = ixp23xx_irq_level_unmask, | ||
220 | .set_type = ixp23xx_irq_set_type | ||
221 | }; | ||
222 | |||
223 | static struct irqchip ixp23xx_irq_edge_chip = { | ||
224 | .ack = ixp23xx_irq_ack, | ||
225 | .mask = ixp23xx_irq_mask, | ||
226 | .unmask = ixp23xx_irq_edge_unmask, | ||
227 | .set_type = ixp23xx_irq_set_type | ||
228 | }; | ||
229 | |||
230 | static void ixp23xx_pci_irq_mask(unsigned int irq) | ||
231 | { | ||
232 | *IXP23XX_PCI_XSCALE_INT_ENABLE &= ~(1 << (IRQ_IXP23XX_INTA + 27 - irq)); | ||
233 | } | ||
234 | |||
235 | static void ixp23xx_pci_irq_unmask(unsigned int irq) | ||
236 | { | ||
237 | *IXP23XX_PCI_XSCALE_INT_ENABLE |= (1 << (IRQ_IXP23XX_INTA + 27 - irq)); | ||
238 | } | ||
239 | |||
240 | /* | ||
241 | * TODO: Should this just be done at ASM level? | ||
242 | */ | ||
243 | static void pci_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) | ||
244 | { | ||
245 | u32 pci_interrupt; | ||
246 | unsigned int irqno; | ||
247 | struct irqdesc *int_desc; | ||
248 | |||
249 | pci_interrupt = *IXP23XX_PCI_XSCALE_INT_STATUS; | ||
250 | |||
251 | desc->chip->ack(irq); | ||
252 | |||
253 | /* See which PCI_INTA, or PCI_INTB interrupted */ | ||
254 | if (pci_interrupt & (1 << 26)) { | ||
255 | irqno = IRQ_IXP23XX_INTB; | ||
256 | } else if (pci_interrupt & (1 << 27)) { | ||
257 | irqno = IRQ_IXP23XX_INTA; | ||
258 | } else { | ||
259 | BUG(); | ||
260 | } | ||
261 | |||
262 | int_desc = irq_desc + irqno; | ||
263 | int_desc->handle(irqno, int_desc, regs); | ||
264 | |||
265 | desc->chip->unmask(irq); | ||
266 | } | ||
267 | |||
268 | static struct irqchip ixp23xx_pci_irq_chip = { | ||
269 | .ack = ixp23xx_pci_irq_mask, | ||
270 | .mask = ixp23xx_pci_irq_mask, | ||
271 | .unmask = ixp23xx_pci_irq_unmask | ||
272 | }; | ||
273 | |||
274 | static void ixp23xx_config_irq(unsigned int irq, enum ixp23xx_irq_type type) | ||
275 | { | ||
276 | switch (type) { | ||
277 | case IXP23XX_IRQ_LEVEL: | ||
278 | set_irq_chip(irq, &ixp23xx_irq_level_chip); | ||
279 | set_irq_handler(irq, do_level_IRQ); | ||
280 | break; | ||
281 | case IXP23XX_IRQ_EDGE: | ||
282 | set_irq_chip(irq, &ixp23xx_irq_edge_chip); | ||
283 | set_irq_handler(irq, do_edge_IRQ); | ||
284 | break; | ||
285 | } | ||
286 | set_irq_flags(irq, IRQF_VALID); | ||
287 | } | ||
288 | |||
289 | void __init ixp23xx_init_irq(void) | ||
290 | { | ||
291 | int irq; | ||
292 | |||
293 | /* Route everything to IRQ */ | ||
294 | *IXP23XX_INTR_SEL1 = 0x0; | ||
295 | *IXP23XX_INTR_SEL2 = 0x0; | ||
296 | *IXP23XX_INTR_SEL3 = 0x0; | ||
297 | *IXP23XX_INTR_SEL4 = 0x0; | ||
298 | |||
299 | /* Mask all sources */ | ||
300 | *IXP23XX_INTR_EN1 = 0x0; | ||
301 | *IXP23XX_INTR_EN2 = 0x0; | ||
302 | *IXP23XX_INTR_EN3 = 0x0; | ||
303 | *IXP23XX_INTR_EN4 = 0x0; | ||
304 | |||
305 | /* | ||
306 | * Configure all IRQs for level-sensitive operation | ||
307 | */ | ||
308 | for (irq = 0; irq <= NUM_IXP23XX_RAW_IRQS; irq++) { | ||
309 | ixp23xx_config_irq(irq, IXP23XX_IRQ_LEVEL); | ||
310 | } | ||
311 | |||
312 | for (irq = IRQ_IXP23XX_INTA; irq <= IRQ_IXP23XX_INTB; irq++) { | ||
313 | set_irq_chip(irq, &ixp23xx_pci_irq_chip); | ||
314 | set_irq_handler(irq, do_level_IRQ); | ||
315 | set_irq_flags(irq, IRQF_VALID); | ||
316 | } | ||
317 | |||
318 | set_irq_chained_handler(IRQ_IXP23XX_PCI_INT_RPH, pci_handler); | ||
319 | } | ||
320 | |||
321 | |||
322 | /************************************************************************* | ||
323 | * Timer-tick functions for IXP23xx | ||
324 | *************************************************************************/ | ||
325 | #define CLOCK_TICKS_PER_USEC CLOCK_TICK_RATE / (USEC_PER_SEC) | ||
326 | |||
327 | static unsigned long next_jiffy_time; | ||
328 | |||
329 | static unsigned long | ||
330 | ixp23xx_gettimeoffset(void) | ||
331 | { | ||
332 | unsigned long elapsed; | ||
333 | |||
334 | elapsed = *IXP23XX_TIMER_CONT - (next_jiffy_time - LATCH); | ||
335 | |||
336 | return elapsed / CLOCK_TICKS_PER_USEC; | ||
337 | } | ||
338 | |||
339 | static irqreturn_t | ||
340 | ixp23xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
341 | { | ||
342 | /* Clear Pending Interrupt by writing '1' to it */ | ||
343 | *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND; | ||
344 | while ((*IXP23XX_TIMER_CONT - next_jiffy_time) > LATCH) { | ||
345 | timer_tick(regs); | ||
346 | next_jiffy_time += LATCH; | ||
347 | } | ||
348 | |||
349 | return IRQ_HANDLED; | ||
350 | } | ||
351 | |||
352 | static struct irqaction ixp23xx_timer_irq = { | ||
353 | .name = "IXP23xx Timer Tick", | ||
354 | .handler = ixp23xx_timer_interrupt, | ||
355 | .flags = SA_INTERRUPT | SA_TIMER, | ||
356 | }; | ||
357 | |||
358 | void __init ixp23xx_init_timer(void) | ||
359 | { | ||
360 | /* Clear Pending Interrupt by writing '1' to it */ | ||
361 | *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND; | ||
362 | |||
363 | /* Setup the Timer counter value */ | ||
364 | *IXP23XX_TIMER1_RELOAD = | ||
365 | (LATCH & ~IXP23XX_TIMER_RELOAD_MASK) | IXP23XX_TIMER_ENABLE; | ||
366 | |||
367 | *IXP23XX_TIMER_CONT = 0; | ||
368 | next_jiffy_time = LATCH; | ||
369 | |||
370 | /* Connect the interrupt handler and enable the interrupt */ | ||
371 | setup_irq(IRQ_IXP23XX_TIMER1, &ixp23xx_timer_irq); | ||
372 | } | ||
373 | |||
374 | struct sys_timer ixp23xx_timer = { | ||
375 | .init = ixp23xx_init_timer, | ||
376 | .offset = ixp23xx_gettimeoffset, | ||
377 | }; | ||
378 | |||
379 | |||
380 | /************************************************************************* | ||
381 | * IXP23xx Platform Initializaion | ||
382 | *************************************************************************/ | ||
383 | static struct resource ixp23xx_uart_resources[] = { | ||
384 | { | ||
385 | .start = IXP23XX_UART1_PHYS, | ||
386 | .end = IXP23XX_UART1_PHYS + 0x0fff, | ||
387 | .flags = IORESOURCE_MEM | ||
388 | }, { | ||
389 | .start = IXP23XX_UART2_PHYS, | ||
390 | .end = IXP23XX_UART2_PHYS + 0x0fff, | ||
391 | .flags = IORESOURCE_MEM | ||
392 | } | ||
393 | }; | ||
394 | |||
395 | static struct plat_serial8250_port ixp23xx_uart_data[] = { | ||
396 | { | ||
397 | .mapbase = IXP23XX_UART1_PHYS, | ||
398 | .membase = (char *)(IXP23XX_UART1_VIRT + 3), | ||
399 | .irq = IRQ_IXP23XX_UART1, | ||
400 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
401 | .iotype = UPIO_MEM, | ||
402 | .regshift = 2, | ||
403 | .uartclk = IXP23XX_UART_XTAL, | ||
404 | }, { | ||
405 | .mapbase = IXP23XX_UART2_PHYS, | ||
406 | .membase = (char *)(IXP23XX_UART2_VIRT + 3), | ||
407 | .irq = IRQ_IXP23XX_UART2, | ||
408 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
409 | .iotype = UPIO_MEM, | ||
410 | .regshift = 2, | ||
411 | .uartclk = IXP23XX_UART_XTAL, | ||
412 | }, | ||
413 | { }, | ||
414 | }; | ||
415 | |||
416 | static struct platform_device ixp23xx_uart = { | ||
417 | .name = "serial8250", | ||
418 | .id = 0, | ||
419 | .dev.platform_data = ixp23xx_uart_data, | ||
420 | .num_resources = 2, | ||
421 | .resource = ixp23xx_uart_resources, | ||
422 | }; | ||
423 | |||
424 | static struct platform_device *ixp23xx_devices[] __initdata = { | ||
425 | &ixp23xx_uart, | ||
426 | }; | ||
427 | |||
428 | void __init ixp23xx_sys_init(void) | ||
429 | { | ||
430 | platform_add_devices(ixp23xx_devices, ARRAY_SIZE(ixp23xx_devices)); | ||
431 | } | ||
diff --git a/arch/arm/mach-ixp23xx/espresso.c b/arch/arm/mach-ixp23xx/espresso.c new file mode 100644 index 000000000000..2327c9790416 --- /dev/null +++ b/arch/arm/mach-ixp23xx/espresso.c | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/espresso.c | ||
3 | * | ||
4 | * Double Espresso-specific routines | ||
5 | * | ||
6 | * Author: Lennert Buytenhek <buytenh@wantstofly.org> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/spinlock.h> | ||
17 | #include <linux/sched.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/serial.h> | ||
20 | #include <linux/tty.h> | ||
21 | #include <linux/bitops.h> | ||
22 | #include <linux/ioport.h> | ||
23 | #include <linux/serial.h> | ||
24 | #include <linux/serial_8250.h> | ||
25 | #include <linux/serial_core.h> | ||
26 | #include <linux/device.h> | ||
27 | #include <linux/mm.h> | ||
28 | #include <linux/pci.h> | ||
29 | #include <linux/mtd/physmap.h> | ||
30 | |||
31 | #include <asm/types.h> | ||
32 | #include <asm/setup.h> | ||
33 | #include <asm/memory.h> | ||
34 | #include <asm/hardware.h> | ||
35 | #include <asm/mach-types.h> | ||
36 | #include <asm/irq.h> | ||
37 | #include <asm/system.h> | ||
38 | #include <asm/tlbflush.h> | ||
39 | #include <asm/pgtable.h> | ||
40 | |||
41 | #include <asm/mach/map.h> | ||
42 | #include <asm/mach/irq.h> | ||
43 | #include <asm/mach/arch.h> | ||
44 | #include <asm/mach/irq.h> | ||
45 | #include <asm/mach/pci.h> | ||
46 | |||
47 | static void __init espresso_init(void) | ||
48 | { | ||
49 | physmap_configure(0x90000000, 0x02000000, 2, NULL); | ||
50 | |||
51 | /* | ||
52 | * Mark flash as writeable. | ||
53 | */ | ||
54 | IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE; | ||
55 | IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE; | ||
56 | |||
57 | ixp23xx_sys_init(); | ||
58 | } | ||
59 | |||
60 | MACHINE_START(ESPRESSO, "IP Fabrics Double Espresso") | ||
61 | /* Maintainer: Lennert Buytenhek */ | ||
62 | .phys_io = IXP23XX_PERIPHERAL_PHYS, | ||
63 | .io_pg_offst = ((IXP23XX_PERIPHERAL_VIRT >> 18)) & 0xfffc, | ||
64 | .map_io = ixp23xx_map_io, | ||
65 | .init_irq = ixp23xx_init_irq, | ||
66 | .timer = &ixp23xx_timer, | ||
67 | .boot_params = 0x00000100, | ||
68 | .init_machine = espresso_init, | ||
69 | MACHINE_END | ||
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c new file mode 100644 index 000000000000..00146c35daac --- /dev/null +++ b/arch/arm/mach-ixp23xx/ixdp2351.c | |||
@@ -0,0 +1,325 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/ixdp2351.c | ||
3 | * | ||
4 | * IXDP2351 board-specific routines | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on 2.4 code Copyright 2004 (c) Intel Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #include <linux/config.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/spinlock.h> | ||
21 | #include <linux/sched.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/serial.h> | ||
24 | #include <linux/tty.h> | ||
25 | #include <linux/bitops.h> | ||
26 | #include <linux/ioport.h> | ||
27 | #include <linux/serial.h> | ||
28 | #include <linux/serial_8250.h> | ||
29 | #include <linux/serial_core.h> | ||
30 | #include <linux/device.h> | ||
31 | #include <linux/mm.h> | ||
32 | #include <linux/pci.h> | ||
33 | #include <linux/mtd/physmap.h> | ||
34 | |||
35 | #include <asm/types.h> | ||
36 | #include <asm/setup.h> | ||
37 | #include <asm/memory.h> | ||
38 | #include <asm/hardware.h> | ||
39 | #include <asm/mach-types.h> | ||
40 | #include <asm/irq.h> | ||
41 | #include <asm/system.h> | ||
42 | #include <asm/tlbflush.h> | ||
43 | #include <asm/pgtable.h> | ||
44 | |||
45 | #include <asm/mach/map.h> | ||
46 | #include <asm/mach/irq.h> | ||
47 | #include <asm/mach/arch.h> | ||
48 | #include <asm/mach/irq.h> | ||
49 | #include <asm/mach/pci.h> | ||
50 | |||
51 | /* | ||
52 | * IXDP2351 Interrupt Handling | ||
53 | */ | ||
54 | static void ixdp2351_inta_mask(unsigned int irq) | ||
55 | { | ||
56 | *IXDP2351_CPLD_INTA_MASK_SET_REG = IXDP2351_INTA_IRQ_MASK(irq); | ||
57 | } | ||
58 | |||
59 | static void ixdp2351_inta_unmask(unsigned int irq) | ||
60 | { | ||
61 | *IXDP2351_CPLD_INTA_MASK_CLR_REG = IXDP2351_INTA_IRQ_MASK(irq); | ||
62 | } | ||
63 | |||
64 | static void ixdp2351_inta_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) | ||
65 | { | ||
66 | u16 ex_interrupt = | ||
67 | *IXDP2351_CPLD_INTA_STAT_REG & IXDP2351_INTA_IRQ_VALID; | ||
68 | int i; | ||
69 | |||
70 | desc->chip->mask(irq); | ||
71 | |||
72 | for (i = 0; i < IXDP2351_INTA_IRQ_NUM; i++) { | ||
73 | if (ex_interrupt & (1 << i)) { | ||
74 | struct irqdesc *cpld_desc; | ||
75 | int cpld_irq = | ||
76 | IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i); | ||
77 | cpld_desc = irq_desc + cpld_irq; | ||
78 | cpld_desc->handle(cpld_irq, cpld_desc, regs); | ||
79 | } | ||
80 | } | ||
81 | |||
82 | desc->chip->unmask(irq); | ||
83 | } | ||
84 | |||
85 | static struct irqchip ixdp2351_inta_chip = { | ||
86 | .ack = ixdp2351_inta_mask, | ||
87 | .mask = ixdp2351_inta_mask, | ||
88 | .unmask = ixdp2351_inta_unmask | ||
89 | }; | ||
90 | |||
91 | static void ixdp2351_intb_mask(unsigned int irq) | ||
92 | { | ||
93 | *IXDP2351_CPLD_INTB_MASK_SET_REG = IXDP2351_INTB_IRQ_MASK(irq); | ||
94 | } | ||
95 | |||
96 | static void ixdp2351_intb_unmask(unsigned int irq) | ||
97 | { | ||
98 | *IXDP2351_CPLD_INTB_MASK_CLR_REG = IXDP2351_INTB_IRQ_MASK(irq); | ||
99 | } | ||
100 | |||
101 | static void ixdp2351_intb_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) | ||
102 | { | ||
103 | u16 ex_interrupt = | ||
104 | *IXDP2351_CPLD_INTB_STAT_REG & IXDP2351_INTB_IRQ_VALID; | ||
105 | int i; | ||
106 | |||
107 | desc->chip->ack(irq); | ||
108 | |||
109 | for (i = 0; i < IXDP2351_INTB_IRQ_NUM; i++) { | ||
110 | if (ex_interrupt & (1 << i)) { | ||
111 | struct irqdesc *cpld_desc; | ||
112 | int cpld_irq = | ||
113 | IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i); | ||
114 | cpld_desc = irq_desc + cpld_irq; | ||
115 | cpld_desc->handle(cpld_irq, cpld_desc, regs); | ||
116 | } | ||
117 | } | ||
118 | |||
119 | desc->chip->unmask(irq); | ||
120 | } | ||
121 | |||
122 | static struct irqchip ixdp2351_intb_chip = { | ||
123 | .ack = ixdp2351_intb_mask, | ||
124 | .mask = ixdp2351_intb_mask, | ||
125 | .unmask = ixdp2351_intb_unmask | ||
126 | }; | ||
127 | |||
128 | void ixdp2351_init_irq(void) | ||
129 | { | ||
130 | int irq; | ||
131 | |||
132 | /* Mask all interrupts from CPLD, disable simulation */ | ||
133 | *IXDP2351_CPLD_INTA_MASK_SET_REG = (u16) -1; | ||
134 | *IXDP2351_CPLD_INTB_MASK_SET_REG = (u16) -1; | ||
135 | *IXDP2351_CPLD_INTA_SIM_REG = 0; | ||
136 | *IXDP2351_CPLD_INTB_SIM_REG = 0; | ||
137 | |||
138 | ixp23xx_init_irq(); | ||
139 | |||
140 | for (irq = IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE); | ||
141 | irq < | ||
142 | IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + IXDP2351_INTA_IRQ_NUM); | ||
143 | irq++) { | ||
144 | if (IXDP2351_INTA_IRQ_MASK(irq) & IXDP2351_INTA_IRQ_VALID) { | ||
145 | set_irq_flags(irq, IRQF_VALID); | ||
146 | set_irq_handler(irq, do_level_IRQ); | ||
147 | set_irq_chip(irq, &ixdp2351_inta_chip); | ||
148 | } | ||
149 | } | ||
150 | |||
151 | for (irq = IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE); | ||
152 | irq < | ||
153 | IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + IXDP2351_INTB_IRQ_NUM); | ||
154 | irq++) { | ||
155 | if (IXDP2351_INTB_IRQ_MASK(irq) & IXDP2351_INTB_IRQ_VALID) { | ||
156 | set_irq_flags(irq, IRQF_VALID); | ||
157 | set_irq_handler(irq, do_level_IRQ); | ||
158 | set_irq_chip(irq, &ixdp2351_intb_chip); | ||
159 | } | ||
160 | } | ||
161 | |||
162 | set_irq_chained_handler(IRQ_IXP23XX_INTA, &ixdp2351_inta_handler); | ||
163 | set_irq_chained_handler(IRQ_IXP23XX_INTB, &ixdp2351_intb_handler); | ||
164 | } | ||
165 | |||
166 | /* | ||
167 | * IXDP2351 PCI | ||
168 | */ | ||
169 | |||
170 | /* | ||
171 | * This board does not do normal PCI IRQ routing, or any | ||
172 | * sort of swizzling, so we just need to check where on the | ||
173 | * bus the device is and figure out what CPLD pin it is | ||
174 | * being routed to. | ||
175 | */ | ||
176 | #define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) | ||
177 | |||
178 | static int __init ixdp2351_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | ||
179 | { | ||
180 | u8 bus = dev->bus->number; | ||
181 | u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin); | ||
182 | struct pci_bus *tmp_bus = dev->bus; | ||
183 | |||
184 | /* Primary bus, no interrupts here */ | ||
185 | if (!bus) | ||
186 | return -1; | ||
187 | |||
188 | /* Lookup first leaf in bus tree */ | ||
189 | while ((tmp_bus->parent != NULL) && (tmp_bus->parent->parent != NULL)) | ||
190 | tmp_bus = tmp_bus->parent; | ||
191 | |||
192 | /* Select between known bridges */ | ||
193 | switch (tmp_bus->self->devfn | (tmp_bus->self->bus->number << 8)) { | ||
194 | /* Device is located after first bridge */ | ||
195 | case 0x0008: | ||
196 | if (tmp_bus == dev->bus) { | ||
197 | /* Device is located directy after first bridge */ | ||
198 | switch (devpin) { | ||
199 | /* Onboard 82546 */ | ||
200 | case DEVPIN(1, 1): /* Onboard 82546 ch 0 */ | ||
201 | return IRQ_IXDP2351_INTA_82546; | ||
202 | case DEVPIN(1, 2): /* Onboard 82546 ch 1 */ | ||
203 | return IRQ_IXDP2351_INTB_82546; | ||
204 | /* PMC SLOT */ | ||
205 | case DEVPIN(0, 1): /* PMCP INTA# */ | ||
206 | case DEVPIN(2, 4): /* PMCS INTD# */ | ||
207 | return IRQ_IXDP2351_SPCI_PMC_INTA; | ||
208 | case DEVPIN(0, 2): /* PMCP INTB# */ | ||
209 | case DEVPIN(2, 1): /* PMCS INTA# */ | ||
210 | return IRQ_IXDP2351_SPCI_PMC_INTB; | ||
211 | case DEVPIN(0, 3): /* PMCP INTC# */ | ||
212 | case DEVPIN(2, 2): /* PMCS INTB# */ | ||
213 | return IRQ_IXDP2351_SPCI_PMC_INTC; | ||
214 | case DEVPIN(0, 4): /* PMCP INTD# */ | ||
215 | case DEVPIN(2, 3): /* PMCS INTC# */ | ||
216 | return IRQ_IXDP2351_SPCI_PMC_INTD; | ||
217 | } | ||
218 | } else { | ||
219 | /* Device is located indirectly after first bridge */ | ||
220 | /* Not supported now */ | ||
221 | return -1; | ||
222 | } | ||
223 | break; | ||
224 | case 0x0010: | ||
225 | if (tmp_bus == dev->bus) { | ||
226 | /* Device is located directy after second bridge */ | ||
227 | /* Secondary bus of second bridge */ | ||
228 | switch (devpin) { | ||
229 | case DEVPIN(0, 1): /* DB#0 */ | ||
230 | case DEVPIN(0, 2): | ||
231 | case DEVPIN(0, 3): | ||
232 | case DEVPIN(0, 4): | ||
233 | return IRQ_IXDP2351_SPCI_DB_0; | ||
234 | case DEVPIN(1, 1): /* DB#1 */ | ||
235 | case DEVPIN(1, 2): | ||
236 | case DEVPIN(1, 3): | ||
237 | case DEVPIN(1, 4): | ||
238 | return IRQ_IXDP2351_SPCI_DB_1; | ||
239 | case DEVPIN(2, 1): /* FIC1 */ | ||
240 | case DEVPIN(2, 2): | ||
241 | case DEVPIN(2, 3): | ||
242 | case DEVPIN(2, 4): | ||
243 | case DEVPIN(3, 1): /* FIC2 */ | ||
244 | case DEVPIN(3, 2): | ||
245 | case DEVPIN(3, 3): | ||
246 | case DEVPIN(3, 4): | ||
247 | return IRQ_IXDP2351_SPCI_FIC; | ||
248 | } | ||
249 | } else { | ||
250 | /* Device is located indirectly after second bridge */ | ||
251 | /* Not supported now */ | ||
252 | return -1; | ||
253 | } | ||
254 | break; | ||
255 | } | ||
256 | |||
257 | return -1; | ||
258 | } | ||
259 | |||
260 | struct hw_pci ixdp2351_pci __initdata = { | ||
261 | .nr_controllers = 1, | ||
262 | .preinit = ixp23xx_pci_preinit, | ||
263 | .setup = ixp23xx_pci_setup, | ||
264 | .scan = ixp23xx_pci_scan_bus, | ||
265 | .map_irq = ixdp2351_map_irq, | ||
266 | }; | ||
267 | |||
268 | int __init ixdp2351_pci_init(void) | ||
269 | { | ||
270 | if (machine_is_ixdp2351()) | ||
271 | pci_common_init(&ixdp2351_pci); | ||
272 | |||
273 | return 0; | ||
274 | } | ||
275 | |||
276 | subsys_initcall(ixdp2351_pci_init); | ||
277 | |||
278 | /* | ||
279 | * IXDP2351 Static Mapped I/O | ||
280 | */ | ||
281 | static struct map_desc ixdp2351_io_desc[] __initdata = { | ||
282 | { | ||
283 | .virtual = IXDP2351_NP_VIRT_BASE, | ||
284 | .pfn = __phys_to_pfn((u64)IXDP2351_NP_PHYS_BASE), | ||
285 | .length = IXDP2351_NP_PHYS_SIZE, | ||
286 | .type = MT_DEVICE | ||
287 | }, { | ||
288 | .virtual = IXDP2351_BB_BASE_VIRT, | ||
289 | .pfn = __phys_to_pfn((u64)IXDP2351_BB_BASE_PHYS), | ||
290 | .length = IXDP2351_BB_SIZE, | ||
291 | .type = MT_DEVICE | ||
292 | } | ||
293 | }; | ||
294 | |||
295 | static void __init ixdp2351_map_io(void) | ||
296 | { | ||
297 | ixp23xx_map_io(); | ||
298 | iotable_init(ixdp2351_io_desc, ARRAY_SIZE(ixdp2351_io_desc)); | ||
299 | } | ||
300 | |||
301 | static void __init ixdp2351_init(void) | ||
302 | { | ||
303 | physmap_configure(0x90000000, 0x04000000, 1, NULL); | ||
304 | |||
305 | /* | ||
306 | * Mark flash as writeable | ||
307 | */ | ||
308 | IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE; | ||
309 | IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE; | ||
310 | IXP23XX_EXP_CS0[2] |= IXP23XX_FLASH_WRITABLE; | ||
311 | IXP23XX_EXP_CS0[3] |= IXP23XX_FLASH_WRITABLE; | ||
312 | |||
313 | ixp23xx_sys_init(); | ||
314 | } | ||
315 | |||
316 | MACHINE_START(IXDP2351, "Intel IXDP2351 Development Platform") | ||
317 | /* Maintainer: MontaVista Software, Inc. */ | ||
318 | .phys_io = IXP23XX_PERIPHERAL_PHYS, | ||
319 | .io_pg_offst = ((IXP23XX_PERIPHERAL_VIRT >> 18)) & 0xfffc, | ||
320 | .map_io = ixdp2351_map_io, | ||
321 | .init_irq = ixdp2351_init_irq, | ||
322 | .timer = &ixp23xx_timer, | ||
323 | .boot_params = 0x00000100, | ||
324 | .init_machine = ixdp2351_init, | ||
325 | MACHINE_END | ||
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c new file mode 100644 index 000000000000..5330ad78c1bb --- /dev/null +++ b/arch/arm/mach-ixp23xx/pci.c | |||
@@ -0,0 +1,275 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/pci.c | ||
3 | * | ||
4 | * PCI routines for IXP23XX based systems | ||
5 | * | ||
6 | * Copyright (c) 2005 MontaVista Software, Inc. | ||
7 | * | ||
8 | * based on original code: | ||
9 | * | ||
10 | * Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
11 | * Copyright 2002-2005 Intel Corp. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify it | ||
14 | * under the terms of the GNU General Public License as published by the | ||
15 | * Free Software Foundation; either version 2 of the License, or (at your | ||
16 | * option) any later version. | ||
17 | */ | ||
18 | |||
19 | #include <linux/config.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/pci.h> | ||
23 | #include <linux/interrupt.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/init.h> | ||
26 | #include <linux/ioport.h> | ||
27 | #include <linux/slab.h> | ||
28 | #include <linux/delay.h> | ||
29 | |||
30 | #include <asm/io.h> | ||
31 | #include <asm/irq.h> | ||
32 | #include <asm/sizes.h> | ||
33 | #include <asm/system.h> | ||
34 | #include <asm/mach/pci.h> | ||
35 | #include <asm/mach-types.h> | ||
36 | #include <asm/hardware.h> | ||
37 | |||
38 | extern int (*external_fault) (unsigned long, struct pt_regs *); | ||
39 | |||
40 | static int pci_master_aborts = 0; | ||
41 | |||
42 | #ifdef DEBUG | ||
43 | #define DBG(x...) printk(x) | ||
44 | #else | ||
45 | #define DBG(x...) | ||
46 | #endif | ||
47 | |||
48 | int clear_master_aborts(void); | ||
49 | |||
50 | static u32 | ||
51 | *ixp23xx_pci_config_addr(unsigned int bus_nr, unsigned int devfn, int where) | ||
52 | { | ||
53 | u32 *paddress; | ||
54 | |||
55 | /* | ||
56 | * Must be dword aligned | ||
57 | */ | ||
58 | where &= ~3; | ||
59 | |||
60 | /* | ||
61 | * For top bus, generate type 0, else type 1 | ||
62 | */ | ||
63 | if (!bus_nr) { | ||
64 | if (PCI_SLOT(devfn) >= 8) | ||
65 | return 0; | ||
66 | |||
67 | paddress = (u32 *) (IXP23XX_PCI_CFG0_VIRT | ||
68 | | (1 << (PCI_SLOT(devfn) + 16)) | ||
69 | | (PCI_FUNC(devfn) << 8) | where); | ||
70 | } else { | ||
71 | paddress = (u32 *) (IXP23XX_PCI_CFG1_VIRT | ||
72 | | (bus_nr << 16) | ||
73 | | (PCI_SLOT(devfn) << 11) | ||
74 | | (PCI_FUNC(devfn) << 8) | where); | ||
75 | } | ||
76 | |||
77 | return paddress; | ||
78 | } | ||
79 | |||
80 | /* | ||
81 | * Mask table, bits to mask for quantity of size 1, 2 or 4 bytes. | ||
82 | * 0 and 3 are not valid indexes... | ||
83 | */ | ||
84 | static u32 bytemask[] = { | ||
85 | /*0*/ 0, | ||
86 | /*1*/ 0xff, | ||
87 | /*2*/ 0xffff, | ||
88 | /*3*/ 0, | ||
89 | /*4*/ 0xffffffff, | ||
90 | }; | ||
91 | |||
92 | static int ixp23xx_pci_read_config(struct pci_bus *bus, unsigned int devfn, | ||
93 | int where, int size, u32 *value) | ||
94 | { | ||
95 | u32 n; | ||
96 | u32 *addr; | ||
97 | |||
98 | n = where % 4; | ||
99 | |||
100 | DBG("In config_read(%d) %d from dev %d:%d:%d\n", size, where, | ||
101 | bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | ||
102 | |||
103 | addr = ixp23xx_pci_config_addr(bus->number, devfn, where); | ||
104 | if (!addr) | ||
105 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
106 | |||
107 | pci_master_aborts = 0; | ||
108 | *value = (*addr >> (8*n)) & bytemask[size]; | ||
109 | if (pci_master_aborts) { | ||
110 | pci_master_aborts = 0; | ||
111 | *value = 0xffffffff; | ||
112 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
113 | } | ||
114 | |||
115 | return PCIBIOS_SUCCESSFUL; | ||
116 | } | ||
117 | |||
118 | /* | ||
119 | * We don't do error checking on the address for writes. | ||
120 | * It's assumed that the user checked for the device existing first | ||
121 | * by doing a read first. | ||
122 | */ | ||
123 | static int ixp23xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, | ||
124 | int where, int size, u32 value) | ||
125 | { | ||
126 | u32 mask; | ||
127 | u32 *addr; | ||
128 | u32 temp; | ||
129 | |||
130 | mask = ~(bytemask[size] << ((where % 0x4) * 8)); | ||
131 | addr = ixp23xx_pci_config_addr(bus->number, devfn, where); | ||
132 | if (!addr) | ||
133 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
134 | temp = (u32) (value) << ((where % 0x4) * 8); | ||
135 | *addr = (*addr & mask) | temp; | ||
136 | |||
137 | clear_master_aborts(); | ||
138 | |||
139 | return PCIBIOS_SUCCESSFUL; | ||
140 | } | ||
141 | |||
142 | struct pci_ops ixp23xx_pci_ops = { | ||
143 | .read = ixp23xx_pci_read_config, | ||
144 | .write = ixp23xx_pci_write_config, | ||
145 | }; | ||
146 | |||
147 | struct pci_bus *ixp23xx_pci_scan_bus(int nr, struct pci_sys_data *sysdata) | ||
148 | { | ||
149 | return pci_scan_bus(sysdata->busnr, &ixp23xx_pci_ops, sysdata); | ||
150 | } | ||
151 | |||
152 | int ixp23xx_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | ||
153 | { | ||
154 | volatile unsigned long temp; | ||
155 | unsigned long flags; | ||
156 | |||
157 | pci_master_aborts = 1; | ||
158 | |||
159 | local_irq_save(flags); | ||
160 | temp = *IXP23XX_PCI_CONTROL; | ||
161 | |||
162 | /* | ||
163 | * master abort and cmd tgt err | ||
164 | */ | ||
165 | if (temp & ((1 << 8) | (1 << 5))) | ||
166 | *IXP23XX_PCI_CONTROL = temp; | ||
167 | |||
168 | temp = *IXP23XX_PCI_CMDSTAT; | ||
169 | |||
170 | if (temp & (1 << 29)) | ||
171 | *IXP23XX_PCI_CMDSTAT = temp; | ||
172 | local_irq_restore(flags); | ||
173 | |||
174 | /* | ||
175 | * If it was an imprecise abort, then we need to correct the | ||
176 | * return address to be _after_ the instruction. | ||
177 | */ | ||
178 | if (fsr & (1 << 10)) | ||
179 | regs->ARM_pc += 4; | ||
180 | |||
181 | return 0; | ||
182 | } | ||
183 | |||
184 | int clear_master_aborts(void) | ||
185 | { | ||
186 | volatile u32 temp; | ||
187 | |||
188 | temp = *IXP23XX_PCI_CONTROL; | ||
189 | |||
190 | /* | ||
191 | * master abort and cmd tgt err | ||
192 | */ | ||
193 | if (temp & ((1 << 8) | (1 << 5))) | ||
194 | *IXP23XX_PCI_CONTROL = temp; | ||
195 | |||
196 | temp = *IXP23XX_PCI_CMDSTAT; | ||
197 | |||
198 | if (temp & (1 << 29)) | ||
199 | *IXP23XX_PCI_CMDSTAT = temp; | ||
200 | |||
201 | return 0; | ||
202 | } | ||
203 | |||
204 | void __init ixp23xx_pci_preinit(void) | ||
205 | { | ||
206 | #ifdef __ARMEB__ | ||
207 | *IXP23XX_PCI_CONTROL |= 0x20000; /* set I/O swapping */ | ||
208 | #endif | ||
209 | /* | ||
210 | * ADDR_31 needs to be clear for PCI memory access to CPP memory | ||
211 | */ | ||
212 | *IXP23XX_CPP2XSI_CURR_XFER_REG3 &= ~IXP23XX_CPP2XSI_ADDR_31; | ||
213 | *IXP23XX_CPP2XSI_CURR_XFER_REG3 |= IXP23XX_CPP2XSI_PSH_OFF; | ||
214 | |||
215 | /* | ||
216 | * Select correct memory for PCI inbound transactions | ||
217 | */ | ||
218 | if (ixp23xx_cpp_boot()) { | ||
219 | *IXP23XX_PCI_CPP_ADDR_BITS &= ~(1 << 1); | ||
220 | } else { | ||
221 | *IXP23XX_PCI_CPP_ADDR_BITS |= (1 << 1); | ||
222 | } | ||
223 | |||
224 | hook_fault_code(16+6, ixp23xx_pci_abort_handler, SIGBUS, | ||
225 | "PCI config cycle to non-existent device"); | ||
226 | |||
227 | *IXP23XX_PCI_ADDR_EXT = 0x0000e000; | ||
228 | } | ||
229 | |||
230 | /* | ||
231 | * Prevent PCI layer from seeing the inbound host-bridge resources | ||
232 | */ | ||
233 | static void __devinit pci_fixup_ixp23xx(struct pci_dev *dev) | ||
234 | { | ||
235 | int i; | ||
236 | |||
237 | dev->class &= 0xff; | ||
238 | dev->class |= PCI_CLASS_BRIDGE_HOST << 8; | ||
239 | for (i = 0; i < PCI_NUM_RESOURCES; i++) { | ||
240 | dev->resource[i].start = 0; | ||
241 | dev->resource[i].end = 0; | ||
242 | dev->resource[i].flags = 0; | ||
243 | } | ||
244 | } | ||
245 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9002, pci_fixup_ixp23xx); | ||
246 | |||
247 | /* | ||
248 | * IXP2300 systems often have large resource requirements, so we just | ||
249 | * use our own resource space. | ||
250 | */ | ||
251 | static struct resource ixp23xx_pci_mem_space = { | ||
252 | .start = IXP23XX_PCI_MEM_START, | ||
253 | .end = IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE - 1, | ||
254 | .flags = IORESOURCE_MEM, | ||
255 | .name = "PCI Mem Space" | ||
256 | }; | ||
257 | |||
258 | static struct resource ixp23xx_pci_io_space = { | ||
259 | .start = 0x00000100, | ||
260 | .end = 0x01ffffff, | ||
261 | .flags = IORESOURCE_IO, | ||
262 | .name = "PCI I/O Space" | ||
263 | }; | ||
264 | |||
265 | int ixp23xx_pci_setup(int nr, struct pci_sys_data *sys) | ||
266 | { | ||
267 | if (nr >= 1) | ||
268 | return 0; | ||
269 | |||
270 | sys->resource[0] = &ixp23xx_pci_io_space; | ||
271 | sys->resource[1] = &ixp23xx_pci_mem_space; | ||
272 | sys->resource[2] = NULL; | ||
273 | |||
274 | return 1; | ||
275 | } | ||
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c new file mode 100644 index 000000000000..43c14e740794 --- /dev/null +++ b/arch/arm/mach-ixp23xx/roadrunner.c | |||
@@ -0,0 +1,164 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/roadrunner.c | ||
3 | * | ||
4 | * RoadRunner board-specific routines | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on 2.4 code Copyright 2005 (c) ADI Engineering Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #include <linux/config.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/spinlock.h> | ||
21 | #include <linux/sched.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/serial.h> | ||
24 | #include <linux/tty.h> | ||
25 | #include <linux/bitops.h> | ||
26 | #include <linux/ioport.h> | ||
27 | #include <linux/serial.h> | ||
28 | #include <linux/serial_8250.h> | ||
29 | #include <linux/serial_core.h> | ||
30 | #include <linux/device.h> | ||
31 | #include <linux/mm.h> | ||
32 | #include <linux/pci.h> | ||
33 | #include <linux/mtd/physmap.h> | ||
34 | |||
35 | #include <asm/types.h> | ||
36 | #include <asm/setup.h> | ||
37 | #include <asm/memory.h> | ||
38 | #include <asm/hardware.h> | ||
39 | #include <asm/mach-types.h> | ||
40 | #include <asm/irq.h> | ||
41 | #include <asm/system.h> | ||
42 | #include <asm/tlbflush.h> | ||
43 | #include <asm/pgtable.h> | ||
44 | |||
45 | #include <asm/mach/map.h> | ||
46 | #include <asm/mach/irq.h> | ||
47 | #include <asm/mach/arch.h> | ||
48 | #include <asm/mach/irq.h> | ||
49 | #include <asm/mach/pci.h> | ||
50 | |||
51 | /* | ||
52 | * Interrupt mapping | ||
53 | */ | ||
54 | #define INTA IRQ_ROADRUNNER_PCI_INTA | ||
55 | #define INTB IRQ_ROADRUNNER_PCI_INTB | ||
56 | #define INTC IRQ_ROADRUNNER_PCI_INTC | ||
57 | #define INTD IRQ_ROADRUNNER_PCI_INTD | ||
58 | |||
59 | #define INTC_PIN IXP23XX_GPIO_PIN_11 | ||
60 | #define INTD_PIN IXP23XX_GPIO_PIN_12 | ||
61 | |||
62 | static int __init roadrunner_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) | ||
63 | { | ||
64 | static int pci_card_slot_irq[] = {INTB, INTC, INTD, INTA}; | ||
65 | static int pmc_card_slot_irq[] = {INTA, INTB, INTC, INTD}; | ||
66 | static int usb_irq[] = {INTB, INTC, INTD, -1}; | ||
67 | static int mini_pci_1_irq[] = {INTB, INTC, -1, -1}; | ||
68 | static int mini_pci_2_irq[] = {INTC, INTD, -1, -1}; | ||
69 | |||
70 | switch(dev->bus->number) { | ||
71 | case 0: | ||
72 | switch(dev->devfn) { | ||
73 | case 0x0: // PCI-PCI bridge | ||
74 | break; | ||
75 | case 0x8: // PCI Card Slot | ||
76 | return pci_card_slot_irq[pin - 1]; | ||
77 | case 0x10: // PMC Slot | ||
78 | return pmc_card_slot_irq[pin - 1]; | ||
79 | case 0x18: // PMC Slot Secondary Agent | ||
80 | break; | ||
81 | case 0x20: // IXP Processor | ||
82 | break; | ||
83 | default: | ||
84 | return NO_IRQ; | ||
85 | } | ||
86 | break; | ||
87 | |||
88 | case 1: | ||
89 | switch(dev->devfn) { | ||
90 | case 0x0: // IDE Controller | ||
91 | return (pin == 1) ? INTC : -1; | ||
92 | case 0x8: // USB fun 0 | ||
93 | case 0x9: // USB fun 1 | ||
94 | case 0xa: // USB fun 2 | ||
95 | return usb_irq[pin - 1]; | ||
96 | case 0x10: // Mini PCI 1 | ||
97 | return mini_pci_1_irq[pin-1]; | ||
98 | case 0x18: // Mini PCI 2 | ||
99 | return mini_pci_2_irq[pin-1]; | ||
100 | case 0x20: // MEM slot | ||
101 | return (pin == 1) ? INTA : -1; | ||
102 | default: | ||
103 | return NO_IRQ; | ||
104 | } | ||
105 | break; | ||
106 | |||
107 | default: | ||
108 | return NO_IRQ; | ||
109 | } | ||
110 | |||
111 | return NO_IRQ; | ||
112 | } | ||
113 | |||
114 | static void roadrunner_pci_preinit(void) | ||
115 | { | ||
116 | set_irq_type(IRQ_ROADRUNNER_PCI_INTC, IRQT_LOW); | ||
117 | set_irq_type(IRQ_ROADRUNNER_PCI_INTD, IRQT_LOW); | ||
118 | |||
119 | ixp23xx_pci_preinit(); | ||
120 | } | ||
121 | |||
122 | static struct hw_pci roadrunner_pci __initdata = { | ||
123 | .nr_controllers = 1, | ||
124 | .preinit = roadrunner_pci_preinit, | ||
125 | .setup = ixp23xx_pci_setup, | ||
126 | .scan = ixp23xx_pci_scan_bus, | ||
127 | .map_irq = roadrunner_map_irq, | ||
128 | }; | ||
129 | |||
130 | static int __init roadrunner_pci_init(void) | ||
131 | { | ||
132 | if (machine_is_roadrunner()) | ||
133 | pci_common_init(&roadrunner_pci); | ||
134 | |||
135 | return 0; | ||
136 | }; | ||
137 | |||
138 | subsys_initcall(roadrunner_pci_init); | ||
139 | |||
140 | static void __init roadrunner_init(void) | ||
141 | { | ||
142 | physmap_configure(0x90000000, 0x04000000, 2, NULL); | ||
143 | |||
144 | /* | ||
145 | * Mark flash as writeable | ||
146 | */ | ||
147 | IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE; | ||
148 | IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE; | ||
149 | IXP23XX_EXP_CS0[2] |= IXP23XX_FLASH_WRITABLE; | ||
150 | IXP23XX_EXP_CS0[3] |= IXP23XX_FLASH_WRITABLE; | ||
151 | |||
152 | ixp23xx_sys_init(); | ||
153 | } | ||
154 | |||
155 | MACHINE_START(ROADRUNNER, "ADI Engineering RoadRunner Development Platform") | ||
156 | /* Maintainer: Deepak Saxena */ | ||
157 | .phys_io = IXP23XX_PERIPHERAL_PHYS, | ||
158 | .io_pg_offst = ((IXP23XX_PERIPHERAL_VIRT >> 18)) & 0xfffc, | ||
159 | .map_io = ixp23xx_map_io, | ||
160 | .init_irq = ixp23xx_init_irq, | ||
161 | .timer = &ixp23xx_timer, | ||
162 | .boot_params = 0x00000100, | ||
163 | .init_machine = roadrunner_init, | ||
164 | MACHINE_END | ||
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index 6e3462ed5306..2d40fe1145f0 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -463,7 +463,7 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys) | |||
463 | if (nr >= 1) | 463 | if (nr >= 1) |
464 | return 0; | 464 | return 0; |
465 | 465 | ||
466 | res = kmalloc(sizeof(*res) * 2, GFP_KERNEL); | 466 | res = kzalloc(sizeof(*res) * 2, GFP_KERNEL); |
467 | if (res == NULL) { | 467 | if (res == NULL) { |
468 | /* | 468 | /* |
469 | * If we're out of memory this early, something is wrong, | 469 | * If we're out of memory this early, something is wrong, |
@@ -471,7 +471,6 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys) | |||
471 | */ | 471 | */ |
472 | panic("PCI: unable to allocate resources?\n"); | 472 | panic("PCI: unable to allocate resources?\n"); |
473 | } | 473 | } |
474 | memset(res, 0, sizeof(*res) * 2); | ||
475 | 474 | ||
476 | local_write_config(PCI_COMMAND, 2, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); | 475 | local_write_config(PCI_COMMAND, 2, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); |
477 | 476 | ||
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index fbadf3021b9e..a0888e160e3b 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -91,7 +91,7 @@ static void ixp4xx_config_irq(unsigned irq, enum ixp4xx_irq_type type); | |||
91 | /* | 91 | /* |
92 | * IRQ -> GPIO mapping table | 92 | * IRQ -> GPIO mapping table |
93 | */ | 93 | */ |
94 | static int irq2gpio[32] = { | 94 | static char irq2gpio[32] = { |
95 | -1, -1, -1, -1, -1, -1, 0, 1, | 95 | -1, -1, -1, -1, -1, -1, 0, 1, |
96 | -1, -1, -1, -1, -1, -1, -1, -1, | 96 | -1, -1, -1, -1, -1, -1, -1, -1, |
97 | -1, -1, -1, 2, 3, 4, 5, 6, | 97 | -1, -1, -1, 2, 3, 4, 5, 6, |
@@ -153,6 +153,9 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type) | |||
153 | /* Set the new style */ | 153 | /* Set the new style */ |
154 | *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE)); | 154 | *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE)); |
155 | 155 | ||
156 | /* Configure the line as an input */ | ||
157 | gpio_line_config(line, IXP4XX_GPIO_IN); | ||
158 | |||
156 | return 0; | 159 | return 0; |
157 | } | 160 | } |
158 | 161 | ||
diff --git a/arch/arm/mach-lh7a40x/common.h b/arch/arm/mach-lh7a40x/common.h index 578a52461fdb..ea8de7e3ab1b 100644 --- a/arch/arm/mach-lh7a40x/common.h +++ b/arch/arm/mach-lh7a40x/common.h | |||
@@ -12,5 +12,6 @@ extern struct sys_timer lh7a40x_timer; | |||
12 | 12 | ||
13 | extern void lh7a400_init_irq (void); | 13 | extern void lh7a400_init_irq (void); |
14 | extern void lh7a404_init_irq (void); | 14 | extern void lh7a404_init_irq (void); |
15 | extern void lh7a40x_init_board_irq (void); | ||
15 | 16 | ||
16 | #define IRQ_DISPATCH(irq) desc_handle_irq((irq),(irq_desc + irq), regs) | 17 | #define IRQ_DISPATCH(irq) desc_handle_irq((irq),(irq_desc + irq), regs) |
diff --git a/arch/arm/mach-lh7a40x/irq-kev7a400.c b/arch/arm/mach-lh7a40x/irq-kev7a400.c index 691bb09232a5..8535764d89ca 100644 --- a/arch/arm/mach-lh7a40x/irq-kev7a400.c +++ b/arch/arm/mach-lh7a40x/irq-kev7a400.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/mach/hardware.h> | 16 | #include <asm/mach/hardware.h> |
17 | #include <asm/mach/irqs.h> | 17 | #include <asm/mach/irqs.h> |
18 | 18 | ||
19 | #include "common.h" | ||
19 | 20 | ||
20 | /* KEV7a400 CPLD IRQ handling */ | 21 | /* KEV7a400 CPLD IRQ handling */ |
21 | 22 | ||
diff --git a/arch/arm/mach-lh7a40x/irq-lh7a400.c b/arch/arm/mach-lh7a40x/irq-lh7a400.c index f334d81c2cd8..f9fdefef6d6f 100644 --- a/arch/arm/mach-lh7a40x/irq-lh7a400.c +++ b/arch/arm/mach-lh7a40x/irq-lh7a400.c | |||
@@ -16,9 +16,9 @@ | |||
16 | #include <asm/hardware.h> | 16 | #include <asm/hardware.h> |
17 | #include <asm/irq.h> | 17 | #include <asm/irq.h> |
18 | #include <asm/mach/irq.h> | 18 | #include <asm/mach/irq.h> |
19 | #include <asm/arch/irq.h> | ||
20 | #include <asm/arch/irqs.h> | 19 | #include <asm/arch/irqs.h> |
21 | 20 | ||
21 | #include "common.h" | ||
22 | 22 | ||
23 | /* CPU IRQ handling */ | 23 | /* CPU IRQ handling */ |
24 | 24 | ||
diff --git a/arch/arm/mach-lh7a40x/irq-lh7a404.c b/arch/arm/mach-lh7a40x/irq-lh7a404.c index 122fadabc97d..e902e3d87da4 100644 --- a/arch/arm/mach-lh7a40x/irq-lh7a404.c +++ b/arch/arm/mach-lh7a40x/irq-lh7a404.c | |||
@@ -16,9 +16,10 @@ | |||
16 | #include <asm/hardware.h> | 16 | #include <asm/hardware.h> |
17 | #include <asm/irq.h> | 17 | #include <asm/irq.h> |
18 | #include <asm/mach/irq.h> | 18 | #include <asm/mach/irq.h> |
19 | #include <asm/arch/irq.h> | ||
20 | #include <asm/arch/irqs.h> | 19 | #include <asm/arch/irqs.h> |
21 | 20 | ||
21 | #include "common.h" | ||
22 | |||
22 | #define USE_PRIORITIES | 23 | #define USE_PRIORITIES |
23 | 24 | ||
24 | /* See Documentation/arm/Sharp-LH/VectoredInterruptController for more | 25 | /* See Documentation/arm/Sharp-LH/VectoredInterruptController for more |
diff --git a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c index 6262d449120c..dcb4e17b9419 100644 --- a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c +++ b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/mach/irq.h> | 19 | #include <asm/mach/irq.h> |
20 | #include <asm/arch/irqs.h> | 20 | #include <asm/arch/irqs.h> |
21 | 21 | ||
22 | #include "common.h" | ||
22 | 23 | ||
23 | static void lh7a40x_ack_cpld_irq (u32 irq) | 24 | static void lh7a40x_ack_cpld_irq (u32 irq) |
24 | { | 25 | { |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 24dd374224af..0884bc7c23b7 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -167,7 +167,7 @@ void __init omap_serial_init() | |||
167 | 167 | ||
168 | static struct platform_device serial_device = { | 168 | static struct platform_device serial_device = { |
169 | .name = "serial8250", | 169 | .name = "serial8250", |
170 | .id = 0, | 170 | .id = PLAT8250_DEV_PLATFORM, |
171 | .dev = { | 171 | .dev = { |
172 | .platform_data = serial_platform_data, | 172 | .platform_data = serial_platform_data, |
173 | }, | 173 | }, |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index c1d77f5b3823..0104fd142e70 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -10,6 +10,11 @@ config ARCH_LUBBOCK | |||
10 | select PXA25x | 10 | select PXA25x |
11 | select SA1111 | 11 | select SA1111 |
12 | 12 | ||
13 | config MACH_LOGICPD_PXA270 | ||
14 | bool "LogicPD PXA270 Card Engine Development Platform" | ||
15 | select PXA27x | ||
16 | select IWMMXT | ||
17 | |||
13 | config MACH_MAINSTONE | 18 | config MACH_MAINSTONE |
14 | bool "Intel HCDDBBVA0 Development Platform" | 19 | bool "Intel HCDDBBVA0 Development Platform" |
15 | select PXA27x | 20 | select PXA27x |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 32526a0a6f86..4e8a983e2b83 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
@@ -3,12 +3,13 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support (must be linked before board specific support) | 5 | # Common support (must be linked before board specific support) |
6 | obj-y += generic.o irq.o dma.o time.o | 6 | obj-y += clock.o generic.o irq.o dma.o time.o |
7 | obj-$(CONFIG_PXA25x) += pxa25x.o | 7 | obj-$(CONFIG_PXA25x) += pxa25x.o |
8 | obj-$(CONFIG_PXA27x) += pxa27x.o | 8 | obj-$(CONFIG_PXA27x) += pxa27x.o |
9 | 9 | ||
10 | # Specific board support | 10 | # Specific board support |
11 | obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o | 11 | obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o |
12 | obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o | ||
12 | obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o | 13 | obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o |
13 | obj-$(CONFIG_ARCH_PXA_IDP) += idp.o | 14 | obj-$(CONFIG_ARCH_PXA_IDP) += idp.o |
14 | obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o | 15 | obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o |
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c new file mode 100644 index 000000000000..8f7c90a0593b --- /dev/null +++ b/arch/arm/mach-pxa/clock.c | |||
@@ -0,0 +1,124 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-sa1100/clock.c | ||
3 | */ | ||
4 | #include <linux/module.h> | ||
5 | #include <linux/kernel.h> | ||
6 | #include <linux/list.h> | ||
7 | #include <linux/errno.h> | ||
8 | #include <linux/err.h> | ||
9 | #include <linux/string.h> | ||
10 | #include <linux/clk.h> | ||
11 | #include <linux/spinlock.h> | ||
12 | |||
13 | #include <asm/arch/pxa-regs.h> | ||
14 | #include <asm/hardware.h> | ||
15 | #include <asm/semaphore.h> | ||
16 | |||
17 | struct clk { | ||
18 | struct list_head node; | ||
19 | unsigned long rate; | ||
20 | struct module *owner; | ||
21 | const char *name; | ||
22 | unsigned int enabled; | ||
23 | void (*enable)(void); | ||
24 | void (*disable)(void); | ||
25 | }; | ||
26 | |||
27 | static LIST_HEAD(clocks); | ||
28 | static DECLARE_MUTEX(clocks_sem); | ||
29 | static DEFINE_SPINLOCK(clocks_lock); | ||
30 | |||
31 | struct clk *clk_get(struct device *dev, const char *id) | ||
32 | { | ||
33 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
34 | |||
35 | down(&clocks_sem); | ||
36 | list_for_each_entry(p, &clocks, node) { | ||
37 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | ||
38 | clk = p; | ||
39 | break; | ||
40 | } | ||
41 | } | ||
42 | up(&clocks_sem); | ||
43 | |||
44 | return clk; | ||
45 | } | ||
46 | EXPORT_SYMBOL(clk_get); | ||
47 | |||
48 | void clk_put(struct clk *clk) | ||
49 | { | ||
50 | module_put(clk->owner); | ||
51 | } | ||
52 | EXPORT_SYMBOL(clk_put); | ||
53 | |||
54 | int clk_enable(struct clk *clk) | ||
55 | { | ||
56 | unsigned long flags; | ||
57 | |||
58 | spin_lock_irqsave(&clocks_lock, flags); | ||
59 | if (clk->enabled++ == 0) | ||
60 | clk->enable(); | ||
61 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
62 | return 0; | ||
63 | } | ||
64 | EXPORT_SYMBOL(clk_enable); | ||
65 | |||
66 | void clk_disable(struct clk *clk) | ||
67 | { | ||
68 | unsigned long flags; | ||
69 | |||
70 | WARN_ON(clk->enabled == 0); | ||
71 | |||
72 | spin_lock_irqsave(&clocks_lock, flags); | ||
73 | if (--clk->enabled == 0) | ||
74 | clk->disable(); | ||
75 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
76 | } | ||
77 | EXPORT_SYMBOL(clk_disable); | ||
78 | |||
79 | unsigned long clk_get_rate(struct clk *clk) | ||
80 | { | ||
81 | return clk->rate; | ||
82 | } | ||
83 | EXPORT_SYMBOL(clk_get_rate); | ||
84 | |||
85 | |||
86 | static void clk_gpio27_enable(void) | ||
87 | { | ||
88 | pxa_gpio_mode(GPIO11_3_6MHz_MD); | ||
89 | } | ||
90 | |||
91 | static void clk_gpio27_disable(void) | ||
92 | { | ||
93 | } | ||
94 | |||
95 | static struct clk clk_gpio27 = { | ||
96 | .name = "GPIO27_CLK", | ||
97 | .rate = 3686400, | ||
98 | .enable = clk_gpio27_enable, | ||
99 | .disable = clk_gpio27_disable, | ||
100 | }; | ||
101 | |||
102 | int clk_register(struct clk *clk) | ||
103 | { | ||
104 | down(&clocks_sem); | ||
105 | list_add(&clk->node, &clocks); | ||
106 | up(&clocks_sem); | ||
107 | return 0; | ||
108 | } | ||
109 | EXPORT_SYMBOL(clk_register); | ||
110 | |||
111 | void clk_unregister(struct clk *clk) | ||
112 | { | ||
113 | down(&clocks_sem); | ||
114 | list_del(&clk->node); | ||
115 | up(&clocks_sem); | ||
116 | } | ||
117 | EXPORT_SYMBOL(clk_unregister); | ||
118 | |||
119 | static int __init clk_init(void) | ||
120 | { | ||
121 | clk_register(&clk_gpio27); | ||
122 | return 0; | ||
123 | } | ||
124 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 7ffd2de8f2f3..68923b1d2b62 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/mach/irq.h> | 32 | #include <asm/mach/irq.h> |
33 | 33 | ||
34 | #include <asm/arch/pxa-regs.h> | 34 | #include <asm/arch/pxa-regs.h> |
35 | #include <asm/arch/irq.h> | ||
36 | #include <asm/arch/irda.h> | 35 | #include <asm/arch/irda.h> |
37 | #include <asm/arch/mmc.h> | 36 | #include <asm/arch/mmc.h> |
38 | #include <asm/arch/udc.h> | 37 | #include <asm/arch/udc.h> |
diff --git a/arch/arm/mach-pxa/leds-mainstone.c b/arch/arm/mach-pxa/leds-mainstone.c index bbd3f87a9fc2..c06d3d7a8dd4 100644 --- a/arch/arm/mach-pxa/leds-mainstone.c +++ b/arch/arm/mach-pxa/leds-mainstone.c | |||
@@ -85,7 +85,7 @@ void mainstone_leds_event(led_event_t evt) | |||
85 | break; | 85 | break; |
86 | 86 | ||
87 | case led_green_on: | 87 | case led_green_on: |
88 | hw_led_state |= D21;; | 88 | hw_led_state |= D21; |
89 | break; | 89 | break; |
90 | 90 | ||
91 | case led_green_off: | 91 | case led_green_off: |
@@ -93,7 +93,7 @@ void mainstone_leds_event(led_event_t evt) | |||
93 | break; | 93 | break; |
94 | 94 | ||
95 | case led_amber_on: | 95 | case led_amber_on: |
96 | hw_led_state |= D22;; | 96 | hw_led_state |= D22; |
97 | break; | 97 | break; |
98 | 98 | ||
99 | case led_amber_off: | 99 | case led_amber_off: |
@@ -101,7 +101,7 @@ void mainstone_leds_event(led_event_t evt) | |||
101 | break; | 101 | break; |
102 | 102 | ||
103 | case led_red_on: | 103 | case led_red_on: |
104 | hw_led_state |= D23;; | 104 | hw_led_state |= D23; |
105 | break; | 105 | break; |
106 | 106 | ||
107 | case led_red_off: | 107 | case led_red_off: |
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c new file mode 100644 index 000000000000..ec0f43a102c7 --- /dev/null +++ b/arch/arm/mach-pxa/lpd270.c | |||
@@ -0,0 +1,393 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/lpd270.c | ||
3 | * | ||
4 | * Support for the LogicPD PXA270 Card Engine. | ||
5 | * Derived from the mainstone code, which carries these notices: | ||
6 | * | ||
7 | * Author: Nicolas Pitre | ||
8 | * Created: Nov 05, 2002 | ||
9 | * Copyright: MontaVista Software Inc. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/sysdev.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/bitops.h> | ||
22 | #include <linux/fb.h> | ||
23 | #include <linux/ioport.h> | ||
24 | #include <linux/mtd/mtd.h> | ||
25 | #include <linux/mtd/partitions.h> | ||
26 | |||
27 | #include <asm/types.h> | ||
28 | #include <asm/setup.h> | ||
29 | #include <asm/memory.h> | ||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/hardware.h> | ||
32 | #include <asm/irq.h> | ||
33 | #include <asm/sizes.h> | ||
34 | |||
35 | #include <asm/mach/arch.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <asm/mach/irq.h> | ||
38 | #include <asm/mach/flash.h> | ||
39 | |||
40 | #include <asm/arch/pxa-regs.h> | ||
41 | #include <asm/arch/lpd270.h> | ||
42 | #include <asm/arch/audio.h> | ||
43 | #include <asm/arch/pxafb.h> | ||
44 | #include <asm/arch/mmc.h> | ||
45 | #include <asm/arch/irda.h> | ||
46 | #include <asm/arch/ohci.h> | ||
47 | |||
48 | #include "generic.h" | ||
49 | |||
50 | |||
51 | static unsigned int lpd270_irq_enabled; | ||
52 | |||
53 | static void lpd270_mask_irq(unsigned int irq) | ||
54 | { | ||
55 | int lpd270_irq = irq - LPD270_IRQ(0); | ||
56 | |||
57 | __raw_writew(~(1 << lpd270_irq), LPD270_INT_STATUS); | ||
58 | |||
59 | lpd270_irq_enabled &= ~(1 << lpd270_irq); | ||
60 | __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); | ||
61 | } | ||
62 | |||
63 | static void lpd270_unmask_irq(unsigned int irq) | ||
64 | { | ||
65 | int lpd270_irq = irq - LPD270_IRQ(0); | ||
66 | |||
67 | lpd270_irq_enabled |= 1 << lpd270_irq; | ||
68 | __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); | ||
69 | } | ||
70 | |||
71 | static struct irqchip lpd270_irq_chip = { | ||
72 | .ack = lpd270_mask_irq, | ||
73 | .mask = lpd270_mask_irq, | ||
74 | .unmask = lpd270_unmask_irq, | ||
75 | }; | ||
76 | |||
77 | static void lpd270_irq_handler(unsigned int irq, struct irqdesc *desc, | ||
78 | struct pt_regs *regs) | ||
79 | { | ||
80 | unsigned long pending; | ||
81 | |||
82 | pending = __raw_readw(LPD270_INT_STATUS) & lpd270_irq_enabled; | ||
83 | do { | ||
84 | GEDR(0) = GPIO_bit(0); /* clear useless edge notification */ | ||
85 | if (likely(pending)) { | ||
86 | irq = LPD270_IRQ(0) + __ffs(pending); | ||
87 | desc = irq_desc + irq; | ||
88 | desc_handle_irq(irq, desc, regs); | ||
89 | |||
90 | pending = __raw_readw(LPD270_INT_STATUS) & | ||
91 | lpd270_irq_enabled; | ||
92 | } | ||
93 | } while (pending); | ||
94 | } | ||
95 | |||
96 | static void __init lpd270_init_irq(void) | ||
97 | { | ||
98 | int irq; | ||
99 | |||
100 | pxa_init_irq(); | ||
101 | |||
102 | __raw_writew(0, LPD270_INT_MASK); | ||
103 | __raw_writew(0, LPD270_INT_STATUS); | ||
104 | |||
105 | /* setup extra LogicPD PXA270 irqs */ | ||
106 | for (irq = LPD270_IRQ(2); irq <= LPD270_IRQ(4); irq++) { | ||
107 | set_irq_chip(irq, &lpd270_irq_chip); | ||
108 | set_irq_handler(irq, do_level_IRQ); | ||
109 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
110 | } | ||
111 | set_irq_chained_handler(IRQ_GPIO(0), lpd270_irq_handler); | ||
112 | set_irq_type(IRQ_GPIO(0), IRQT_FALLING); | ||
113 | } | ||
114 | |||
115 | |||
116 | #ifdef CONFIG_PM | ||
117 | static int lpd270_irq_resume(struct sys_device *dev) | ||
118 | { | ||
119 | __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); | ||
120 | return 0; | ||
121 | } | ||
122 | |||
123 | static struct sysdev_class lpd270_irq_sysclass = { | ||
124 | set_kset_name("cpld_irq"), | ||
125 | .resume = lpd270_irq_resume, | ||
126 | }; | ||
127 | |||
128 | static struct sys_device lpd270_irq_device = { | ||
129 | .cls = &lpd270_irq_sysclass, | ||
130 | }; | ||
131 | |||
132 | static int __init lpd270_irq_device_init(void) | ||
133 | { | ||
134 | int ret = sysdev_class_register(&lpd270_irq_sysclass); | ||
135 | if (ret == 0) | ||
136 | ret = sysdev_register(&lpd270_irq_device); | ||
137 | return ret; | ||
138 | } | ||
139 | |||
140 | device_initcall(lpd270_irq_device_init); | ||
141 | #endif | ||
142 | |||
143 | |||
144 | static struct resource smc91x_resources[] = { | ||
145 | [0] = { | ||
146 | .start = LPD270_ETH_PHYS, | ||
147 | .end = (LPD270_ETH_PHYS + 0xfffff), | ||
148 | .flags = IORESOURCE_MEM, | ||
149 | }, | ||
150 | [1] = { | ||
151 | .start = LPD270_ETHERNET_IRQ, | ||
152 | .end = LPD270_ETHERNET_IRQ, | ||
153 | .flags = IORESOURCE_IRQ, | ||
154 | }, | ||
155 | }; | ||
156 | |||
157 | static struct platform_device smc91x_device = { | ||
158 | .name = "smc91x", | ||
159 | .id = 0, | ||
160 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
161 | .resource = smc91x_resources, | ||
162 | }; | ||
163 | |||
164 | static struct platform_device lpd270_audio_device = { | ||
165 | .name = "pxa2xx-ac97", | ||
166 | .id = -1, | ||
167 | }; | ||
168 | |||
169 | static struct resource lpd270_flash_resources[] = { | ||
170 | [0] = { | ||
171 | .start = PXA_CS0_PHYS, | ||
172 | .end = PXA_CS0_PHYS + SZ_64M - 1, | ||
173 | .flags = IORESOURCE_MEM, | ||
174 | }, | ||
175 | [1] = { | ||
176 | .start = PXA_CS1_PHYS, | ||
177 | .end = PXA_CS1_PHYS + SZ_64M - 1, | ||
178 | .flags = IORESOURCE_MEM, | ||
179 | }, | ||
180 | }; | ||
181 | |||
182 | static struct mtd_partition lpd270_flash0_partitions[] = { | ||
183 | { | ||
184 | .name = "Bootloader", | ||
185 | .size = 0x00040000, | ||
186 | .offset = 0, | ||
187 | .mask_flags = MTD_WRITEABLE /* force read-only */ | ||
188 | }, { | ||
189 | .name = "Kernel", | ||
190 | .size = 0x00400000, | ||
191 | .offset = 0x00040000, | ||
192 | }, { | ||
193 | .name = "Filesystem", | ||
194 | .size = MTDPART_SIZ_FULL, | ||
195 | .offset = 0x00440000 | ||
196 | }, | ||
197 | }; | ||
198 | |||
199 | static struct flash_platform_data lpd270_flash_data[2] = { | ||
200 | { | ||
201 | .name = "processor-flash", | ||
202 | .map_name = "cfi_probe", | ||
203 | .parts = lpd270_flash0_partitions, | ||
204 | .nr_parts = ARRAY_SIZE(lpd270_flash0_partitions), | ||
205 | }, { | ||
206 | .name = "mainboard-flash", | ||
207 | .map_name = "cfi_probe", | ||
208 | .parts = NULL, | ||
209 | .nr_parts = 0, | ||
210 | } | ||
211 | }; | ||
212 | |||
213 | static struct platform_device lpd270_flash_device[2] = { | ||
214 | { | ||
215 | .name = "pxa2xx-flash", | ||
216 | .id = 0, | ||
217 | .dev = { | ||
218 | .platform_data = &lpd270_flash_data[0], | ||
219 | }, | ||
220 | .resource = &lpd270_flash_resources[0], | ||
221 | .num_resources = 1, | ||
222 | }, { | ||
223 | .name = "pxa2xx-flash", | ||
224 | .id = 1, | ||
225 | .dev = { | ||
226 | .platform_data = &lpd270_flash_data[1], | ||
227 | }, | ||
228 | .resource = &lpd270_flash_resources[1], | ||
229 | .num_resources = 1, | ||
230 | }, | ||
231 | }; | ||
232 | |||
233 | static void lpd270_backlight_power(int on) | ||
234 | { | ||
235 | if (on) { | ||
236 | pxa_gpio_mode(GPIO16_PWM0_MD); | ||
237 | pxa_set_cken(CKEN0_PWM0, 1); | ||
238 | PWM_CTRL0 = 0; | ||
239 | PWM_PWDUTY0 = 0x3ff; | ||
240 | PWM_PERVAL0 = 0x3ff; | ||
241 | } else { | ||
242 | PWM_CTRL0 = 0; | ||
243 | PWM_PWDUTY0 = 0x0; | ||
244 | PWM_PERVAL0 = 0x3FF; | ||
245 | pxa_set_cken(CKEN0_PWM0, 0); | ||
246 | } | ||
247 | } | ||
248 | |||
249 | /* 5.7" TFT QVGA (LoLo display number 1) */ | ||
250 | static struct pxafb_mach_info sharp_lq057q3dc02 __initdata = { | ||
251 | .pixclock = 100000, | ||
252 | .xres = 240, | ||
253 | .yres = 320, | ||
254 | .bpp = 16, | ||
255 | .hsync_len = 64, | ||
256 | .left_margin = 0x27, | ||
257 | .right_margin = 0x09, | ||
258 | .vsync_len = 0x04, | ||
259 | .upper_margin = 0x08, | ||
260 | .lower_margin = 0x14, | ||
261 | .sync = 0, | ||
262 | .lccr0 = 0x07800080, | ||
263 | .lccr3 = 0x04400007, | ||
264 | .pxafb_backlight_power = lpd270_backlight_power, | ||
265 | }; | ||
266 | |||
267 | /* 6.4" TFT VGA (LoLo display number 5) */ | ||
268 | static struct pxafb_mach_info sharp_lq64d343 __initdata = { | ||
269 | .pixclock = 20000, | ||
270 | .xres = 640, | ||
271 | .yres = 480, | ||
272 | .bpp = 16, | ||
273 | .hsync_len = 49, | ||
274 | .left_margin = 0x89, | ||
275 | .right_margin = 0x19, | ||
276 | .vsync_len = 18, | ||
277 | .upper_margin = 0x22, | ||
278 | .lower_margin = 0, | ||
279 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
280 | .lccr0 = 0x07800080, | ||
281 | .lccr3 = 0x04400001, | ||
282 | .pxafb_backlight_power = lpd270_backlight_power, | ||
283 | }; | ||
284 | |||
285 | /* 3.5" TFT QVGA (LoLo display number 8) */ | ||
286 | static struct pxafb_mach_info sharp_lq035q7db02_20 __initdata = { | ||
287 | .pixclock = 100000, | ||
288 | .xres = 240, | ||
289 | .yres = 320, | ||
290 | .bpp = 16, | ||
291 | .hsync_len = 0x34, | ||
292 | .left_margin = 0x09, | ||
293 | .right_margin = 0x09, | ||
294 | .vsync_len = 0x08, | ||
295 | .upper_margin = 0x05, | ||
296 | .lower_margin = 0x14, | ||
297 | .sync = 0, | ||
298 | .lccr0 = 0x07800080, | ||
299 | .lccr3 = 0x04400007, | ||
300 | .pxafb_backlight_power = lpd270_backlight_power, | ||
301 | }; | ||
302 | |||
303 | static struct platform_device *platform_devices[] __initdata = { | ||
304 | &smc91x_device, | ||
305 | &lpd270_audio_device, | ||
306 | &lpd270_flash_device[0], | ||
307 | &lpd270_flash_device[1], | ||
308 | }; | ||
309 | |||
310 | static int lpd270_ohci_init(struct device *dev) | ||
311 | { | ||
312 | /* setup Port1 GPIO pin. */ | ||
313 | pxa_gpio_mode(88 | GPIO_ALT_FN_1_IN); /* USBHPWR1 */ | ||
314 | pxa_gpio_mode(89 | GPIO_ALT_FN_2_OUT); /* USBHPEN1 */ | ||
315 | |||
316 | /* Set the Power Control Polarity Low and Power Sense | ||
317 | Polarity Low to active low. */ | ||
318 | UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) & | ||
319 | ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE); | ||
320 | |||
321 | return 0; | ||
322 | } | ||
323 | |||
324 | static struct pxaohci_platform_data lpd270_ohci_platform_data = { | ||
325 | .port_mode = PMM_PERPORT_MODE, | ||
326 | .init = lpd270_ohci_init, | ||
327 | }; | ||
328 | |||
329 | static void __init lpd270_init(void) | ||
330 | { | ||
331 | lpd270_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4; | ||
332 | lpd270_flash_data[1].width = 4; | ||
333 | |||
334 | /* | ||
335 | * System bus arbiter setting: | ||
336 | * - Core_Park | ||
337 | * - LCD_wt:DMA_wt:CORE_Wt = 2:3:4 | ||
338 | */ | ||
339 | ARB_CNTRL = ARB_CORE_PARK | 0x234; | ||
340 | |||
341 | /* | ||
342 | * On LogicPD PXA270, we route AC97_SYSCLK via GPIO45. | ||
343 | */ | ||
344 | pxa_gpio_mode(GPIO45_SYSCLK_AC97_MD); | ||
345 | |||
346 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
347 | |||
348 | // set_pxa_fb_info(&sharp_lq057q3dc02); | ||
349 | set_pxa_fb_info(&sharp_lq64d343); | ||
350 | // set_pxa_fb_info(&sharp_lq035q7db02_20); | ||
351 | |||
352 | pxa_set_ohci_info(&lpd270_ohci_platform_data); | ||
353 | } | ||
354 | |||
355 | |||
356 | static struct map_desc lpd270_io_desc[] __initdata = { | ||
357 | { | ||
358 | .virtual = LPD270_CPLD_VIRT, | ||
359 | .pfn = __phys_to_pfn(LPD270_CPLD_PHYS), | ||
360 | .length = LPD270_CPLD_SIZE, | ||
361 | .type = MT_DEVICE, | ||
362 | }, | ||
363 | }; | ||
364 | |||
365 | static void __init lpd270_map_io(void) | ||
366 | { | ||
367 | pxa_map_io(); | ||
368 | iotable_init(lpd270_io_desc, ARRAY_SIZE(lpd270_io_desc)); | ||
369 | |||
370 | /* initialize sleep mode regs (wake-up sources, etc) */ | ||
371 | PGSR0 = 0x00008800; | ||
372 | PGSR1 = 0x00000002; | ||
373 | PGSR2 = 0x0001FC00; | ||
374 | PGSR3 = 0x00001F81; | ||
375 | PWER = 0xC0000002; | ||
376 | PRER = 0x00000002; | ||
377 | PFER = 0x00000002; | ||
378 | |||
379 | /* for use I SRAM as framebuffer. */ | ||
380 | PSLR |= 0x00000F04; | ||
381 | PCFR = 0x00000066; | ||
382 | } | ||
383 | |||
384 | MACHINE_START(LOGICPD_PXA270, "LogicPD PXA270 Card Engine") | ||
385 | /* Maintainer: Peter Barada */ | ||
386 | .phys_io = 0x40000000, | ||
387 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
388 | .boot_params = 0xa0000100, | ||
389 | .map_io = lpd270_map_io, | ||
390 | .init_irq = lpd270_init_irq, | ||
391 | .timer = &pxa_timer, | ||
392 | .init_machine = lpd270_init, | ||
393 | MACHINE_END | ||
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index d5bda60209ec..98356f810007 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -157,14 +157,14 @@ static struct platform_device smc91x_device = { | |||
157 | .resource = smc91x_resources, | 157 | .resource = smc91x_resources, |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static int mst_audio_startup(snd_pcm_substream_t *substream, void *priv) | 160 | static int mst_audio_startup(struct snd_pcm_substream *substream, void *priv) |
161 | { | 161 | { |
162 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 162 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
163 | MST_MSCWR2 &= ~MST_MSCWR2_AC97_SPKROFF; | 163 | MST_MSCWR2 &= ~MST_MSCWR2_AC97_SPKROFF; |
164 | return 0; | 164 | return 0; |
165 | } | 165 | } |
166 | 166 | ||
167 | static void mst_audio_shutdown(snd_pcm_substream_t *substream, void *priv) | 167 | static void mst_audio_shutdown(struct snd_pcm_substream *substream, void *priv) |
168 | { | 168 | { |
169 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 169 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
170 | MST_MSCWR2 |= MST_MSCWR2_AC97_SPKROFF; | 170 | MST_MSCWR2 |= MST_MSCWR2_AC97_SPKROFF; |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 911e6ff5a9bd..b45560a8f6c4 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <asm/mach/irq.h> | 29 | #include <asm/mach/irq.h> |
30 | 30 | ||
31 | #include <asm/arch/pxa-regs.h> | 31 | #include <asm/arch/pxa-regs.h> |
32 | #include <asm/arch/irq.h> | ||
33 | #include <asm/arch/mmc.h> | 32 | #include <asm/arch/mmc.h> |
34 | #include <asm/arch/udc.h> | 33 | #include <asm/arch/udc.h> |
35 | #include <asm/arch/irda.h> | 34 | #include <asm/arch/irda.h> |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index c094d99ebf56..0dbb079ecd25 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <asm/mach/irq.h> | 33 | #include <asm/mach/irq.h> |
34 | 34 | ||
35 | #include <asm/arch/pxa-regs.h> | 35 | #include <asm/arch/pxa-regs.h> |
36 | #include <asm/arch/irq.h> | ||
37 | #include <asm/arch/irda.h> | 36 | #include <asm/arch/irda.h> |
38 | #include <asm/arch/mmc.h> | 37 | #include <asm/arch/mmc.h> |
39 | #include <asm/arch/ohci.h> | 38 | #include <asm/arch/ohci.h> |
@@ -468,6 +467,8 @@ struct platform_device akitaioexp_device = { | |||
468 | .id = -1, | 467 | .id = -1, |
469 | }; | 468 | }; |
470 | 469 | ||
470 | EXPORT_SYMBOL_GPL(akitaioexp_device); | ||
471 | |||
471 | static void __init akita_init(void) | 472 | static void __init akita_init(void) |
472 | { | 473 | { |
473 | spitz_ficp_platform_data.transceiver_mode = akita_irda_transceiver_mode; | 474 | spitz_ficp_platform_data.transceiver_mode = akita_irda_transceiver_mode; |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index d168286ed470..66ec71756d0f 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/mach/irq.h> | 34 | #include <asm/mach/irq.h> |
35 | 35 | ||
36 | #include <asm/arch/pxa-regs.h> | 36 | #include <asm/arch/pxa-regs.h> |
37 | #include <asm/arch/irq.h> | ||
38 | #include <asm/arch/tosa.h> | 37 | #include <asm/arch/tosa.h> |
39 | 38 | ||
40 | #include <asm/hardware/scoop.h> | 39 | #include <asm/hardware/scoop.h> |
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index 0b9d7ca49ec1..ed07c4149d82 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig | |||
@@ -9,6 +9,13 @@ config MACH_ANUBIS | |||
9 | Say Y gere if you are using the Simtec Electronics ANUBIS | 9 | Say Y gere if you are using the Simtec Electronics ANUBIS |
10 | development system | 10 | development system |
11 | 11 | ||
12 | config MACH_OSIRIS | ||
13 | bool "Simtec IM2440D20 (OSIRIS) module" | ||
14 | select CPU_S3C2440 | ||
15 | help | ||
16 | Say Y here if you are using the Simtec IM2440D20 module, also | ||
17 | known as the Osiris. | ||
18 | |||
12 | config ARCH_BAST | 19 | config ARCH_BAST |
13 | bool "Simtec Electronics BAST (EB2410ITX)" | 20 | bool "Simtec Electronics BAST (EB2410ITX)" |
14 | select CPU_S3C2410 | 21 | select CPU_S3C2410 |
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index 1217bf00309c..1b3b476e5637 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile | |||
@@ -38,6 +38,7 @@ obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o | |||
38 | # machine specific support | 38 | # machine specific support |
39 | 39 | ||
40 | obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o | 40 | obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o |
41 | obj-$(CONFIG_MACH_OSIRIS) += mach-osiris.o | ||
41 | obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o | 42 | obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o |
42 | obj-$(CONFIG_ARCH_H1940) += mach-h1940.o | 43 | obj-$(CONFIG_ARCH_H1940) += mach-h1940.o |
43 | obj-$(CONFIG_MACH_N30) += mach-n30.o | 44 | obj-$(CONFIG_MACH_N30) += mach-n30.o |
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c index 08489efdaf06..fec02c92f95f 100644 --- a/arch/arm/mach-s3c2410/clock.c +++ b/arch/arm/mach-s3c2410/clock.c | |||
@@ -38,12 +38,14 @@ | |||
38 | #include <linux/ioport.h> | 38 | #include <linux/ioport.h> |
39 | #include <linux/clk.h> | 39 | #include <linux/clk.h> |
40 | #include <linux/mutex.h> | 40 | #include <linux/mutex.h> |
41 | #include <linux/delay.h> | ||
41 | 42 | ||
42 | #include <asm/hardware.h> | 43 | #include <asm/hardware.h> |
43 | #include <asm/irq.h> | 44 | #include <asm/irq.h> |
44 | #include <asm/io.h> | 45 | #include <asm/io.h> |
45 | 46 | ||
46 | #include <asm/arch/regs-clock.h> | 47 | #include <asm/arch/regs-clock.h> |
48 | #include <asm/arch/regs-gpio.h> | ||
47 | 49 | ||
48 | #include "clock.h" | 50 | #include "clock.h" |
49 | #include "cpu.h" | 51 | #include "cpu.h" |
@@ -51,7 +53,8 @@ | |||
51 | /* clock information */ | 53 | /* clock information */ |
52 | 54 | ||
53 | static LIST_HEAD(clocks); | 55 | static LIST_HEAD(clocks); |
54 | static DEFINE_MUTEX(clocks_mutex); | 56 | |
57 | DEFINE_MUTEX(clocks_mutex); | ||
55 | 58 | ||
56 | /* old functions */ | 59 | /* old functions */ |
57 | 60 | ||
@@ -178,12 +181,24 @@ unsigned long clk_get_rate(struct clk *clk) | |||
178 | 181 | ||
179 | long clk_round_rate(struct clk *clk, unsigned long rate) | 182 | long clk_round_rate(struct clk *clk, unsigned long rate) |
180 | { | 183 | { |
184 | if (!IS_ERR(clk) && clk->round_rate) | ||
185 | return (clk->round_rate)(clk, rate); | ||
186 | |||
181 | return rate; | 187 | return rate; |
182 | } | 188 | } |
183 | 189 | ||
184 | int clk_set_rate(struct clk *clk, unsigned long rate) | 190 | int clk_set_rate(struct clk *clk, unsigned long rate) |
185 | { | 191 | { |
186 | return -EINVAL; | 192 | int ret; |
193 | |||
194 | if (IS_ERR(clk)) | ||
195 | return -EINVAL; | ||
196 | |||
197 | mutex_lock(&clocks_mutex); | ||
198 | ret = (clk->set_rate)(clk, rate); | ||
199 | mutex_unlock(&clocks_mutex); | ||
200 | |||
201 | return ret; | ||
187 | } | 202 | } |
188 | 203 | ||
189 | struct clk *clk_get_parent(struct clk *clk) | 204 | struct clk *clk_get_parent(struct clk *clk) |
@@ -191,6 +206,23 @@ struct clk *clk_get_parent(struct clk *clk) | |||
191 | return clk->parent; | 206 | return clk->parent; |
192 | } | 207 | } |
193 | 208 | ||
209 | int clk_set_parent(struct clk *clk, struct clk *parent) | ||
210 | { | ||
211 | int ret = 0; | ||
212 | |||
213 | if (IS_ERR(clk)) | ||
214 | return -EINVAL; | ||
215 | |||
216 | mutex_lock(&clocks_mutex); | ||
217 | |||
218 | if (clk->set_parent) | ||
219 | ret = (clk->set_parent)(clk, parent); | ||
220 | |||
221 | mutex_unlock(&clocks_mutex); | ||
222 | |||
223 | return ret; | ||
224 | } | ||
225 | |||
194 | EXPORT_SYMBOL(clk_get); | 226 | EXPORT_SYMBOL(clk_get); |
195 | EXPORT_SYMBOL(clk_put); | 227 | EXPORT_SYMBOL(clk_put); |
196 | EXPORT_SYMBOL(clk_enable); | 228 | EXPORT_SYMBOL(clk_enable); |
@@ -199,6 +231,29 @@ EXPORT_SYMBOL(clk_get_rate); | |||
199 | EXPORT_SYMBOL(clk_round_rate); | 231 | EXPORT_SYMBOL(clk_round_rate); |
200 | EXPORT_SYMBOL(clk_set_rate); | 232 | EXPORT_SYMBOL(clk_set_rate); |
201 | EXPORT_SYMBOL(clk_get_parent); | 233 | EXPORT_SYMBOL(clk_get_parent); |
234 | EXPORT_SYMBOL(clk_set_parent); | ||
235 | |||
236 | /* base clock enable */ | ||
237 | |||
238 | static int s3c24xx_upll_enable(struct clk *clk, int enable) | ||
239 | { | ||
240 | unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW); | ||
241 | unsigned long orig = clkslow; | ||
242 | |||
243 | if (enable) | ||
244 | clkslow &= ~S3C2410_CLKSLOW_UCLK_OFF; | ||
245 | else | ||
246 | clkslow |= S3C2410_CLKSLOW_UCLK_OFF; | ||
247 | |||
248 | __raw_writel(clkslow, S3C2410_CLKSLOW); | ||
249 | |||
250 | /* if we started the UPLL, then allow to settle */ | ||
251 | |||
252 | if (enable && !(orig & S3C2410_CLKSLOW_UCLK_OFF)) | ||
253 | udelay(200); | ||
254 | |||
255 | return 0; | ||
256 | } | ||
202 | 257 | ||
203 | /* base clocks */ | 258 | /* base clocks */ |
204 | 259 | ||
@@ -210,6 +265,14 @@ static struct clk clk_xtal = { | |||
210 | .ctrlbit = 0, | 265 | .ctrlbit = 0, |
211 | }; | 266 | }; |
212 | 267 | ||
268 | static struct clk clk_upll = { | ||
269 | .name = "upll", | ||
270 | .id = -1, | ||
271 | .parent = NULL, | ||
272 | .enable = s3c24xx_upll_enable, | ||
273 | .ctrlbit = 0, | ||
274 | }; | ||
275 | |||
213 | static struct clk clk_f = { | 276 | static struct clk clk_f = { |
214 | .name = "fclk", | 277 | .name = "fclk", |
215 | .id = -1, | 278 | .id = -1, |
@@ -234,26 +297,124 @@ static struct clk clk_p = { | |||
234 | .ctrlbit = 0, | 297 | .ctrlbit = 0, |
235 | }; | 298 | }; |
236 | 299 | ||
300 | struct clk clk_usb_bus = { | ||
301 | .name = "usb-bus", | ||
302 | .id = -1, | ||
303 | .rate = 0, | ||
304 | .parent = &clk_upll, | ||
305 | }; | ||
306 | |||
237 | /* clocks that could be registered by external code */ | 307 | /* clocks that could be registered by external code */ |
238 | 308 | ||
309 | static int s3c24xx_dclk_enable(struct clk *clk, int enable) | ||
310 | { | ||
311 | unsigned long dclkcon = __raw_readl(S3C2410_DCLKCON); | ||
312 | |||
313 | if (enable) | ||
314 | dclkcon |= clk->ctrlbit; | ||
315 | else | ||
316 | dclkcon &= ~clk->ctrlbit; | ||
317 | |||
318 | __raw_writel(dclkcon, S3C2410_DCLKCON); | ||
319 | |||
320 | return 0; | ||
321 | } | ||
322 | |||
323 | static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent) | ||
324 | { | ||
325 | unsigned long dclkcon; | ||
326 | unsigned int uclk; | ||
327 | |||
328 | if (parent == &clk_upll) | ||
329 | uclk = 1; | ||
330 | else if (parent == &clk_p) | ||
331 | uclk = 0; | ||
332 | else | ||
333 | return -EINVAL; | ||
334 | |||
335 | clk->parent = parent; | ||
336 | |||
337 | dclkcon = __raw_readl(S3C2410_DCLKCON); | ||
338 | |||
339 | if (clk->ctrlbit == S3C2410_DCLKCON_DCLK0EN) { | ||
340 | if (uclk) | ||
341 | dclkcon |= S3C2410_DCLKCON_DCLK0_UCLK; | ||
342 | else | ||
343 | dclkcon &= ~S3C2410_DCLKCON_DCLK0_UCLK; | ||
344 | } else { | ||
345 | if (uclk) | ||
346 | dclkcon |= S3C2410_DCLKCON_DCLK1_UCLK; | ||
347 | else | ||
348 | dclkcon &= ~S3C2410_DCLKCON_DCLK1_UCLK; | ||
349 | } | ||
350 | |||
351 | __raw_writel(dclkcon, S3C2410_DCLKCON); | ||
352 | |||
353 | return 0; | ||
354 | } | ||
355 | |||
356 | |||
357 | static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent) | ||
358 | { | ||
359 | unsigned long mask; | ||
360 | unsigned long source; | ||
361 | |||
362 | /* calculate the MISCCR setting for the clock */ | ||
363 | |||
364 | if (parent == &clk_xtal) | ||
365 | source = S3C2410_MISCCR_CLK0_MPLL; | ||
366 | else if (parent == &clk_upll) | ||
367 | source = S3C2410_MISCCR_CLK0_UPLL; | ||
368 | else if (parent == &clk_f) | ||
369 | source = S3C2410_MISCCR_CLK0_FCLK; | ||
370 | else if (parent == &clk_p) | ||
371 | source = S3C2410_MISCCR_CLK0_PCLK; | ||
372 | else if (clk == &s3c24xx_clkout0 && parent == &s3c24xx_dclk0) | ||
373 | source = S3C2410_MISCCR_CLK0_DCLK0; | ||
374 | else if (clk == &s3c24xx_clkout1 && parent == &s3c24xx_dclk1) | ||
375 | source = S3C2410_MISCCR_CLK0_DCLK0; | ||
376 | else | ||
377 | return -EINVAL; | ||
378 | |||
379 | if (clk == &s3c24xx_dclk0) | ||
380 | mask = S3C2410_MISCCR_CLK0_MASK; | ||
381 | else { | ||
382 | source <<= 4; | ||
383 | mask = S3C2410_MISCCR_CLK1_MASK; | ||
384 | } | ||
385 | |||
386 | s3c2410_modify_misccr(mask, source); | ||
387 | return 0; | ||
388 | } | ||
389 | |||
390 | /* external clock definitions */ | ||
391 | |||
239 | struct clk s3c24xx_dclk0 = { | 392 | struct clk s3c24xx_dclk0 = { |
240 | .name = "dclk0", | 393 | .name = "dclk0", |
241 | .id = -1, | 394 | .id = -1, |
395 | .ctrlbit = S3C2410_DCLKCON_DCLK0EN, | ||
396 | .enable = s3c24xx_dclk_enable, | ||
397 | .set_parent = s3c24xx_dclk_setparent, | ||
242 | }; | 398 | }; |
243 | 399 | ||
244 | struct clk s3c24xx_dclk1 = { | 400 | struct clk s3c24xx_dclk1 = { |
245 | .name = "dclk1", | 401 | .name = "dclk1", |
246 | .id = -1, | 402 | .id = -1, |
403 | .ctrlbit = S3C2410_DCLKCON_DCLK0EN, | ||
404 | .enable = s3c24xx_dclk_enable, | ||
405 | .set_parent = s3c24xx_dclk_setparent, | ||
247 | }; | 406 | }; |
248 | 407 | ||
249 | struct clk s3c24xx_clkout0 = { | 408 | struct clk s3c24xx_clkout0 = { |
250 | .name = "clkout0", | 409 | .name = "clkout0", |
251 | .id = -1, | 410 | .id = -1, |
411 | .set_parent = s3c24xx_clkout_setparent, | ||
252 | }; | 412 | }; |
253 | 413 | ||
254 | struct clk s3c24xx_clkout1 = { | 414 | struct clk s3c24xx_clkout1 = { |
255 | .name = "clkout1", | 415 | .name = "clkout1", |
256 | .id = -1, | 416 | .id = -1, |
417 | .set_parent = s3c24xx_clkout_setparent, | ||
257 | }; | 418 | }; |
258 | 419 | ||
259 | struct clk s3c24xx_uclk = { | 420 | struct clk s3c24xx_uclk = { |
@@ -262,7 +423,7 @@ struct clk s3c24xx_uclk = { | |||
262 | }; | 423 | }; |
263 | 424 | ||
264 | 425 | ||
265 | /* clock definitions */ | 426 | /* standard clock definitions */ |
266 | 427 | ||
267 | static struct clk init_clocks[] = { | 428 | static struct clk init_clocks[] = { |
268 | { | 429 | { |
@@ -374,7 +535,7 @@ int s3c24xx_register_clock(struct clk *clk) | |||
374 | 535 | ||
375 | /* if this is a standard clock, set the usage state */ | 536 | /* if this is a standard clock, set the usage state */ |
376 | 537 | ||
377 | if (clk->ctrlbit) { | 538 | if (clk->ctrlbit && clk->enable == s3c24xx_clkcon_enable) { |
378 | unsigned long clkcon = __raw_readl(S3C2410_CLKCON); | 539 | unsigned long clkcon = __raw_readl(S3C2410_CLKCON); |
379 | 540 | ||
380 | clk->usage = (clkcon & clk->ctrlbit) ? 1 : 0; | 541 | clk->usage = (clkcon & clk->ctrlbit) ? 1 : 0; |
@@ -396,6 +557,7 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, | |||
396 | unsigned long hclk, | 557 | unsigned long hclk, |
397 | unsigned long pclk) | 558 | unsigned long pclk) |
398 | { | 559 | { |
560 | unsigned long upllcon = __raw_readl(S3C2410_UPLLCON); | ||
399 | unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW); | 561 | unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW); |
400 | struct clk *clkp = init_clocks; | 562 | struct clk *clkp = init_clocks; |
401 | int ptr; | 563 | int ptr; |
@@ -406,6 +568,7 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, | |||
406 | /* initialise the main system clocks */ | 568 | /* initialise the main system clocks */ |
407 | 569 | ||
408 | clk_xtal.rate = xtal; | 570 | clk_xtal.rate = xtal; |
571 | clk_upll.rate = s3c2410_get_pll(upllcon, xtal); | ||
409 | 572 | ||
410 | clk_h.rate = hclk; | 573 | clk_h.rate = hclk; |
411 | clk_p.rate = pclk; | 574 | clk_p.rate = pclk; |
@@ -439,6 +602,9 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, | |||
439 | if (s3c24xx_register_clock(&clk_xtal) < 0) | 602 | if (s3c24xx_register_clock(&clk_xtal) < 0) |
440 | printk(KERN_ERR "failed to register master xtal\n"); | 603 | printk(KERN_ERR "failed to register master xtal\n"); |
441 | 604 | ||
605 | if (s3c24xx_register_clock(&clk_upll) < 0) | ||
606 | printk(KERN_ERR "failed to register upll clock\n"); | ||
607 | |||
442 | if (s3c24xx_register_clock(&clk_f) < 0) | 608 | if (s3c24xx_register_clock(&clk_f) < 0) |
443 | printk(KERN_ERR "failed to register cpu fclk\n"); | 609 | printk(KERN_ERR "failed to register cpu fclk\n"); |
444 | 610 | ||
@@ -448,6 +614,10 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, | |||
448 | if (s3c24xx_register_clock(&clk_p) < 0) | 614 | if (s3c24xx_register_clock(&clk_p) < 0) |
449 | printk(KERN_ERR "failed to register cpu pclk\n"); | 615 | printk(KERN_ERR "failed to register cpu pclk\n"); |
450 | 616 | ||
617 | |||
618 | if (s3c24xx_register_clock(&clk_usb_bus) < 0) | ||
619 | printk(KERN_ERR "failed to register usb bus clock\n"); | ||
620 | |||
451 | /* register clocks from clock array */ | 621 | /* register clocks from clock array */ |
452 | 622 | ||
453 | for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) { | 623 | for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) { |
diff --git a/arch/arm/mach-s3c2410/clock.h b/arch/arm/mach-s3c2410/clock.h index eb5c95d1e7f2..01bb458bf8eb 100644 --- a/arch/arm/mach-s3c2410/clock.h +++ b/arch/arm/mach-s3c2410/clock.h | |||
@@ -19,7 +19,11 @@ struct clk { | |||
19 | int usage; | 19 | int usage; |
20 | unsigned long rate; | 20 | unsigned long rate; |
21 | unsigned long ctrlbit; | 21 | unsigned long ctrlbit; |
22 | |||
22 | int (*enable)(struct clk *, int enable); | 23 | int (*enable)(struct clk *, int enable); |
24 | int (*set_rate)(struct clk *c, unsigned long rate); | ||
25 | unsigned long (*round_rate)(struct clk *c, unsigned long rate); | ||
26 | int (*set_parent)(struct clk *c, struct clk *parent); | ||
23 | }; | 27 | }; |
24 | 28 | ||
25 | /* other clocks which may be registered by board support */ | 29 | /* other clocks which may be registered by board support */ |
@@ -30,11 +34,15 @@ extern struct clk s3c24xx_clkout0; | |||
30 | extern struct clk s3c24xx_clkout1; | 34 | extern struct clk s3c24xx_clkout1; |
31 | extern struct clk s3c24xx_uclk; | 35 | extern struct clk s3c24xx_uclk; |
32 | 36 | ||
37 | extern struct clk clk_usb_bus; | ||
38 | |||
33 | /* exports for arch/arm/mach-s3c2410 | 39 | /* exports for arch/arm/mach-s3c2410 |
34 | * | 40 | * |
35 | * Please DO NOT use these outside of arch/arm/mach-s3c2410 | 41 | * Please DO NOT use these outside of arch/arm/mach-s3c2410 |
36 | */ | 42 | */ |
37 | 43 | ||
44 | extern struct mutex clocks_mutex; | ||
45 | |||
38 | extern int s3c24xx_clkcon_enable(struct clk *clk, int enable); | 46 | extern int s3c24xx_clkcon_enable(struct clk *clk, int enable); |
39 | extern int s3c24xx_register_clock(struct clk *clk); | 47 | extern int s3c24xx_register_clock(struct clk *clk); |
40 | 48 | ||
diff --git a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c index 00a379334b60..70c34fcf7858 100644 --- a/arch/arm/mach-s3c2410/cpu.c +++ b/arch/arm/mach-s3c2410/cpu.c | |||
@@ -146,7 +146,7 @@ void s3c24xx_set_board(struct s3c24xx_board *b) | |||
146 | board = b; | 146 | board = b; |
147 | 147 | ||
148 | if (b->clocks_count != 0) { | 148 | if (b->clocks_count != 0) { |
149 | struct clk **ptr = b->clocks;; | 149 | struct clk **ptr = b->clocks; |
150 | 150 | ||
151 | for (i = b->clocks_count; i > 0; i--, ptr++) | 151 | for (i = b->clocks_count; i > 0; i--, ptr++) |
152 | s3c24xx_register_clock(*ptr); | 152 | s3c24xx_register_clock(*ptr); |
diff --git a/arch/arm/mach-s3c2410/mach-osiris.c b/arch/arm/mach-s3c2410/mach-osiris.c new file mode 100644 index 000000000000..ae0787557751 --- /dev/null +++ b/arch/arm/mach-s3c2410/mach-osiris.c | |||
@@ -0,0 +1,294 @@ | |||
1 | /* linux/arch/arm/mach-s3c2410/mach-osiris.c | ||
2 | * | ||
3 | * Copyright (c) 2005 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/types.h> | ||
14 | #include <linux/interrupt.h> | ||
15 | #include <linux/list.h> | ||
16 | #include <linux/timer.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/device.h> | ||
19 | |||
20 | #include <asm/mach/arch.h> | ||
21 | #include <asm/mach/map.h> | ||
22 | #include <asm/mach/irq.h> | ||
23 | |||
24 | #include <asm/arch/osiris-map.h> | ||
25 | #include <asm/arch/osiris-cpld.h> | ||
26 | |||
27 | #include <asm/hardware.h> | ||
28 | #include <asm/io.h> | ||
29 | #include <asm/irq.h> | ||
30 | #include <asm/mach-types.h> | ||
31 | |||
32 | #include <asm/arch/regs-serial.h> | ||
33 | #include <asm/arch/regs-gpio.h> | ||
34 | #include <asm/arch/regs-mem.h> | ||
35 | #include <asm/arch/regs-lcd.h> | ||
36 | #include <asm/arch/nand.h> | ||
37 | |||
38 | #include <linux/mtd/mtd.h> | ||
39 | #include <linux/mtd/nand.h> | ||
40 | #include <linux/mtd/nand_ecc.h> | ||
41 | #include <linux/mtd/partitions.h> | ||
42 | |||
43 | #include "clock.h" | ||
44 | #include "devs.h" | ||
45 | #include "cpu.h" | ||
46 | |||
47 | /* onboard perihpheral map */ | ||
48 | |||
49 | static struct map_desc osiris_iodesc[] __initdata = { | ||
50 | /* ISA IO areas (may be over-written later) */ | ||
51 | |||
52 | { | ||
53 | .virtual = (u32)S3C24XX_VA_ISA_BYTE, | ||
54 | .pfn = __phys_to_pfn(S3C2410_CS5), | ||
55 | .length = SZ_16M, | ||
56 | .type = MT_DEVICE, | ||
57 | }, { | ||
58 | .virtual = (u32)S3C24XX_VA_ISA_WORD, | ||
59 | .pfn = __phys_to_pfn(S3C2410_CS5), | ||
60 | .length = SZ_16M, | ||
61 | .type = MT_DEVICE, | ||
62 | }, | ||
63 | |||
64 | /* CPLD control registers */ | ||
65 | |||
66 | { | ||
67 | .virtual = (u32)OSIRIS_VA_CTRL1, | ||
68 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL1), | ||
69 | .length = SZ_16K, | ||
70 | .type = MT_DEVICE | ||
71 | }, { | ||
72 | .virtual = (u32)OSIRIS_VA_CTRL2, | ||
73 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL2), | ||
74 | .length = SZ_16K, | ||
75 | .type = MT_DEVICE | ||
76 | }, | ||
77 | }; | ||
78 | |||
79 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | ||
80 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | ||
81 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE | ||
82 | |||
83 | static struct s3c24xx_uart_clksrc osiris_serial_clocks[] = { | ||
84 | [0] = { | ||
85 | .name = "uclk", | ||
86 | .divisor = 1, | ||
87 | .min_baud = 0, | ||
88 | .max_baud = 0, | ||
89 | }, | ||
90 | [1] = { | ||
91 | .name = "pclk", | ||
92 | .divisor = 1, | ||
93 | .min_baud = 0, | ||
94 | .max_baud = 0. | ||
95 | } | ||
96 | }; | ||
97 | |||
98 | |||
99 | static struct s3c2410_uartcfg osiris_uartcfgs[] = { | ||
100 | [0] = { | ||
101 | .hwport = 0, | ||
102 | .flags = 0, | ||
103 | .ucon = UCON, | ||
104 | .ulcon = ULCON, | ||
105 | .ufcon = UFCON, | ||
106 | .clocks = osiris_serial_clocks, | ||
107 | .clocks_size = ARRAY_SIZE(osiris_serial_clocks) | ||
108 | }, | ||
109 | [1] = { | ||
110 | .hwport = 2, | ||
111 | .flags = 0, | ||
112 | .ucon = UCON, | ||
113 | .ulcon = ULCON, | ||
114 | .ufcon = UFCON, | ||
115 | .clocks = osiris_serial_clocks, | ||
116 | .clocks_size = ARRAY_SIZE(osiris_serial_clocks) | ||
117 | }, | ||
118 | }; | ||
119 | |||
120 | /* NAND Flash on Osiris board */ | ||
121 | |||
122 | static int external_map[] = { 2 }; | ||
123 | static int chip0_map[] = { 0 }; | ||
124 | static int chip1_map[] = { 1 }; | ||
125 | |||
126 | static struct mtd_partition osiris_default_nand_part[] = { | ||
127 | [0] = { | ||
128 | .name = "Boot Agent", | ||
129 | .size = SZ_16K, | ||
130 | .offset = 0 | ||
131 | }, | ||
132 | [1] = { | ||
133 | .name = "/boot", | ||
134 | .size = SZ_4M - SZ_16K, | ||
135 | .offset = SZ_16K, | ||
136 | }, | ||
137 | [2] = { | ||
138 | .name = "user1", | ||
139 | .offset = SZ_4M, | ||
140 | .size = SZ_32M - SZ_4M, | ||
141 | }, | ||
142 | [3] = { | ||
143 | .name = "user2", | ||
144 | .offset = SZ_32M, | ||
145 | .size = MTDPART_SIZ_FULL, | ||
146 | } | ||
147 | }; | ||
148 | |||
149 | /* the Osiris has 3 selectable slots for nand-flash, the two | ||
150 | * on-board chip areas, as well as the external slot. | ||
151 | * | ||
152 | * Note, there is no current hot-plug support for the External | ||
153 | * socket. | ||
154 | */ | ||
155 | |||
156 | static struct s3c2410_nand_set osiris_nand_sets[] = { | ||
157 | [1] = { | ||
158 | .name = "External", | ||
159 | .nr_chips = 1, | ||
160 | .nr_map = external_map, | ||
161 | .nr_partitions = ARRAY_SIZE(osiris_default_nand_part), | ||
162 | .partitions = osiris_default_nand_part | ||
163 | }, | ||
164 | [0] = { | ||
165 | .name = "chip0", | ||
166 | .nr_chips = 1, | ||
167 | .nr_map = chip0_map, | ||
168 | .nr_partitions = ARRAY_SIZE(osiris_default_nand_part), | ||
169 | .partitions = osiris_default_nand_part | ||
170 | }, | ||
171 | [2] = { | ||
172 | .name = "chip1", | ||
173 | .nr_chips = 1, | ||
174 | .nr_map = chip1_map, | ||
175 | .nr_partitions = ARRAY_SIZE(osiris_default_nand_part), | ||
176 | .partitions = osiris_default_nand_part | ||
177 | }, | ||
178 | }; | ||
179 | |||
180 | static void osiris_nand_select(struct s3c2410_nand_set *set, int slot) | ||
181 | { | ||
182 | unsigned int tmp; | ||
183 | |||
184 | slot = set->nr_map[slot] & 3; | ||
185 | |||
186 | pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n", | ||
187 | slot, set, set->nr_map); | ||
188 | |||
189 | tmp = __raw_readb(OSIRIS_VA_CTRL1); | ||
190 | tmp &= ~OSIRIS_CTRL1_NANDSEL; | ||
191 | tmp |= slot; | ||
192 | |||
193 | pr_debug("osiris_nand: ctrl1 now %02x\n", tmp); | ||
194 | |||
195 | __raw_writeb(tmp, OSIRIS_VA_CTRL1); | ||
196 | } | ||
197 | |||
198 | static struct s3c2410_platform_nand osiris_nand_info = { | ||
199 | .tacls = 25, | ||
200 | .twrph0 = 60, | ||
201 | .twrph1 = 60, | ||
202 | .nr_sets = ARRAY_SIZE(osiris_nand_sets), | ||
203 | .sets = osiris_nand_sets, | ||
204 | .select_chip = osiris_nand_select, | ||
205 | }; | ||
206 | |||
207 | /* PCMCIA control and configuration */ | ||
208 | |||
209 | static struct resource osiris_pcmcia_resource[] = { | ||
210 | [0] = { | ||
211 | .start = 0x0f000000, | ||
212 | .end = 0x0f100000, | ||
213 | .flags = IORESOURCE_MEM, | ||
214 | }, | ||
215 | [1] = { | ||
216 | .start = 0x0c000000, | ||
217 | .end = 0x0c100000, | ||
218 | .flags = IORESOURCE_MEM, | ||
219 | } | ||
220 | }; | ||
221 | |||
222 | static struct platform_device osiris_pcmcia = { | ||
223 | .name = "osiris-pcmcia", | ||
224 | .id = -1, | ||
225 | .num_resources = ARRAY_SIZE(osiris_pcmcia_resource), | ||
226 | .resource = osiris_pcmcia_resource, | ||
227 | }; | ||
228 | |||
229 | /* Standard Osiris devices */ | ||
230 | |||
231 | static struct platform_device *osiris_devices[] __initdata = { | ||
232 | &s3c_device_i2c, | ||
233 | &s3c_device_nand, | ||
234 | &osiris_pcmcia, | ||
235 | }; | ||
236 | |||
237 | static struct clk *osiris_clocks[] = { | ||
238 | &s3c24xx_dclk0, | ||
239 | &s3c24xx_dclk1, | ||
240 | &s3c24xx_clkout0, | ||
241 | &s3c24xx_clkout1, | ||
242 | &s3c24xx_uclk, | ||
243 | }; | ||
244 | |||
245 | static struct s3c24xx_board osiris_board __initdata = { | ||
246 | .devices = osiris_devices, | ||
247 | .devices_count = ARRAY_SIZE(osiris_devices), | ||
248 | .clocks = osiris_clocks, | ||
249 | .clocks_count = ARRAY_SIZE(osiris_clocks) | ||
250 | }; | ||
251 | |||
252 | static void __init osiris_map_io(void) | ||
253 | { | ||
254 | unsigned long flags; | ||
255 | |||
256 | /* initialise the clocks */ | ||
257 | |||
258 | s3c24xx_dclk0.parent = NULL; | ||
259 | s3c24xx_dclk0.rate = 12*1000*1000; | ||
260 | |||
261 | s3c24xx_dclk1.parent = NULL; | ||
262 | s3c24xx_dclk1.rate = 24*1000*1000; | ||
263 | |||
264 | s3c24xx_clkout0.parent = &s3c24xx_dclk0; | ||
265 | s3c24xx_clkout1.parent = &s3c24xx_dclk1; | ||
266 | |||
267 | s3c24xx_uclk.parent = &s3c24xx_clkout1; | ||
268 | |||
269 | s3c_device_nand.dev.platform_data = &osiris_nand_info; | ||
270 | |||
271 | s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc)); | ||
272 | s3c24xx_init_clocks(0); | ||
273 | s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); | ||
274 | s3c24xx_set_board(&osiris_board); | ||
275 | |||
276 | /* fix bus configuration (nBE settings wrong on ABLE pre v2.20) */ | ||
277 | |||
278 | local_irq_save(flags); | ||
279 | __raw_writel(__raw_readl(S3C2410_BWSCON) | S3C2410_BWSCON_ST1 | S3C2410_BWSCON_ST2 | S3C2410_BWSCON_ST3 | S3C2410_BWSCON_ST4 | S3C2410_BWSCON_ST5, S3C2410_BWSCON); | ||
280 | local_irq_restore(flags); | ||
281 | |||
282 | /* write-protect line to the NAND */ | ||
283 | s3c2410_gpio_setpin(S3C2410_GPA0, 1); | ||
284 | } | ||
285 | |||
286 | MACHINE_START(OSIRIS, "Simtec-OSIRIS") | ||
287 | /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ | ||
288 | .phys_io = S3C2410_PA_UART, | ||
289 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | ||
290 | .boot_params = S3C2410_SDRAM_PA + 0x100, | ||
291 | .map_io = osiris_map_io, | ||
292 | .init_irq = s3c24xx_init_irq, | ||
293 | .timer = &s3c24xx_timer, | ||
294 | MACHINE_END | ||
diff --git a/arch/arm/mach-s3c2410/s3c2440-clock.c b/arch/arm/mach-s3c2410/s3c2440-clock.c index b557a2be8a01..57a15974d4b5 100644 --- a/arch/arm/mach-s3c2410/s3c2440-clock.c +++ b/arch/arm/mach-s3c2410/s3c2440-clock.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/sysdev.h> | 31 | #include <linux/sysdev.h> |
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/ioport.h> | 33 | #include <linux/ioport.h> |
34 | #include <linux/mutex.h> | ||
34 | #include <linux/clk.h> | 35 | #include <linux/clk.h> |
35 | 36 | ||
36 | #include <asm/hardware.h> | 37 | #include <asm/hardware.h> |
@@ -45,10 +46,47 @@ | |||
45 | 46 | ||
46 | /* S3C2440 extended clock support */ | 47 | /* S3C2440 extended clock support */ |
47 | 48 | ||
48 | static struct clk s3c2440_clk_upll = { | 49 | static unsigned long s3c2440_camif_upll_round(struct clk *clk, |
49 | .name = "upll", | 50 | unsigned long rate) |
50 | .id = -1, | 51 | { |
51 | }; | 52 | unsigned long parent_rate = clk_get_rate(clk->parent); |
53 | int div; | ||
54 | |||
55 | if (rate > parent_rate) | ||
56 | return parent_rate; | ||
57 | |||
58 | /* note, we remove the +/- 1 calculations for the divisor */ | ||
59 | |||
60 | div = (parent_rate / rate) / 2; | ||
61 | |||
62 | if (div < 1) | ||
63 | div = 1; | ||
64 | else if (div > 16) | ||
65 | div = 16; | ||
66 | |||
67 | return parent_rate / (div * 2); | ||
68 | } | ||
69 | |||
70 | static int s3c2440_camif_upll_setrate(struct clk *clk, unsigned long rate) | ||
71 | { | ||
72 | unsigned long parent_rate = clk_get_rate(clk->parent); | ||
73 | unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); | ||
74 | |||
75 | rate = s3c2440_camif_upll_round(clk, rate); | ||
76 | |||
77 | camdivn &= ~(S3C2440_CAMDIVN_CAMCLK_SEL | S3C2440_CAMDIVN_CAMCLK_MASK); | ||
78 | |||
79 | if (rate != parent_rate) { | ||
80 | camdivn |= S3C2440_CAMDIVN_CAMCLK_SEL; | ||
81 | camdivn |= (((parent_rate / rate) / 2) - 1); | ||
82 | } | ||
83 | |||
84 | __raw_writel(camdivn, S3C2440_CAMDIVN); | ||
85 | |||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | /* Extra S3C2440 clocks */ | ||
52 | 90 | ||
53 | static struct clk s3c2440_clk_cam = { | 91 | static struct clk s3c2440_clk_cam = { |
54 | .name = "camif", | 92 | .name = "camif", |
@@ -57,6 +95,13 @@ static struct clk s3c2440_clk_cam = { | |||
57 | .ctrlbit = S3C2440_CLKCON_CAMERA, | 95 | .ctrlbit = S3C2440_CLKCON_CAMERA, |
58 | }; | 96 | }; |
59 | 97 | ||
98 | static struct clk s3c2440_clk_cam_upll = { | ||
99 | .name = "camif-upll", | ||
100 | .id = -1, | ||
101 | .set_rate = s3c2440_camif_upll_setrate, | ||
102 | .round_rate = s3c2440_camif_upll_round, | ||
103 | }; | ||
104 | |||
60 | static struct clk s3c2440_clk_ac97 = { | 105 | static struct clk s3c2440_clk_ac97 = { |
61 | .name = "ac97", | 106 | .name = "ac97", |
62 | .id = -1, | 107 | .id = -1, |
@@ -66,38 +111,46 @@ static struct clk s3c2440_clk_ac97 = { | |||
66 | 111 | ||
67 | static int s3c2440_clk_add(struct sys_device *sysdev) | 112 | static int s3c2440_clk_add(struct sys_device *sysdev) |
68 | { | 113 | { |
69 | unsigned long upllcon = __raw_readl(S3C2410_UPLLCON); | ||
70 | unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); | 114 | unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); |
115 | unsigned long clkdivn; | ||
71 | struct clk *clk_h; | 116 | struct clk *clk_h; |
72 | struct clk *clk_p; | 117 | struct clk *clk_p; |
73 | struct clk *clk_xtal; | 118 | struct clk *clk_upll; |
74 | |||
75 | clk_xtal = clk_get(NULL, "xtal"); | ||
76 | if (IS_ERR(clk_xtal)) { | ||
77 | printk(KERN_ERR "S3C2440: Failed to get clk_xtal\n"); | ||
78 | return -EINVAL; | ||
79 | } | ||
80 | |||
81 | s3c2440_clk_upll.rate = s3c2410_get_pll(upllcon, clk_xtal->rate); | ||
82 | 119 | ||
83 | printk("S3C2440: Clock Support, UPLL %ld.%03ld MHz, DVS %s\n", | 120 | printk("S3C2440: Clock Support, DVS %s\n", |
84 | print_mhz(s3c2440_clk_upll.rate), | ||
85 | (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off"); | 121 | (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off"); |
86 | 122 | ||
87 | clk_p = clk_get(NULL, "pclk"); | 123 | clk_p = clk_get(NULL, "pclk"); |
88 | clk_h = clk_get(NULL, "hclk"); | 124 | clk_h = clk_get(NULL, "hclk"); |
125 | clk_upll = clk_get(NULL, "upll"); | ||
89 | 126 | ||
90 | if (IS_ERR(clk_p) || IS_ERR(clk_h)) { | 127 | if (IS_ERR(clk_p) || IS_ERR(clk_h) || IS_ERR(clk_upll)) { |
91 | printk(KERN_ERR "S3C2440: Failed to get parent clocks\n"); | 128 | printk(KERN_ERR "S3C2440: Failed to get parent clocks\n"); |
92 | return -EINVAL; | 129 | return -EINVAL; |
93 | } | 130 | } |
94 | 131 | ||
132 | /* check rate of UPLL, and if it is near 96MHz, then change | ||
133 | * to using half the UPLL rate for the system */ | ||
134 | |||
135 | if (clk_get_rate(clk_upll) > (94 * MHZ)) { | ||
136 | clk_usb_bus.rate = clk_get_rate(clk_upll) / 2; | ||
137 | |||
138 | mutex_lock(&clocks_mutex); | ||
139 | |||
140 | clkdivn = __raw_readl(S3C2410_CLKDIVN); | ||
141 | clkdivn |= S3C2440_CLKDIVN_UCLK; | ||
142 | __raw_writel(camdivn, S3C2410_CLKDIVN); | ||
143 | |||
144 | mutex_unlock(&clocks_mutex); | ||
145 | } | ||
146 | |||
95 | s3c2440_clk_cam.parent = clk_h; | 147 | s3c2440_clk_cam.parent = clk_h; |
96 | s3c2440_clk_ac97.parent = clk_p; | 148 | s3c2440_clk_ac97.parent = clk_p; |
149 | s3c2440_clk_cam_upll.parent = clk_upll; | ||
97 | 150 | ||
98 | s3c24xx_register_clock(&s3c2440_clk_ac97); | 151 | s3c24xx_register_clock(&s3c2440_clk_ac97); |
99 | s3c24xx_register_clock(&s3c2440_clk_cam); | 152 | s3c24xx_register_clock(&s3c2440_clk_cam); |
100 | s3c24xx_register_clock(&s3c2440_clk_upll); | 153 | s3c24xx_register_clock(&s3c2440_clk_cam_upll); |
101 | 154 | ||
102 | clk_disable(&s3c2440_clk_ac97); | 155 | clk_disable(&s3c2440_clk_ac97); |
103 | clk_disable(&s3c2440_clk_cam); | 156 | clk_disable(&s3c2440_clk_cam); |
diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c index 10a2976aefdd..9d7b799ea4a4 100644 --- a/arch/arm/mach-s3c2410/time.c +++ b/arch/arm/mach-s3c2410/time.c | |||
@@ -142,6 +142,12 @@ static struct irqaction s3c2410_timer_irq = { | |||
142 | .handler = s3c2410_timer_interrupt, | 142 | .handler = s3c2410_timer_interrupt, |
143 | }; | 143 | }; |
144 | 144 | ||
145 | #define use_tclk1_12() ( \ | ||
146 | machine_is_bast() || \ | ||
147 | machine_is_vr1000() || \ | ||
148 | machine_is_anubis() || \ | ||
149 | machine_is_osiris() ) | ||
150 | |||
145 | /* | 151 | /* |
146 | * Set up timer interrupt, and return the current time in seconds. | 152 | * Set up timer interrupt, and return the current time in seconds. |
147 | * | 153 | * |
@@ -165,7 +171,7 @@ static void s3c2410_timer_setup (void) | |||
165 | 171 | ||
166 | /* configure the system for whichever machine is in use */ | 172 | /* configure the system for whichever machine is in use */ |
167 | 173 | ||
168 | if (machine_is_bast() || machine_is_vr1000() || machine_is_anubis()) { | 174 | if (use_tclk1_12()) { |
169 | /* timer is at 12MHz, scaler is 1 */ | 175 | /* timer is at 12MHz, scaler is 1 */ |
170 | timer_usec_ticks = timer_mask_usec_ticks(1, 12000000); | 176 | timer_usec_ticks = timer_mask_usec_ticks(1, 12000000); |
171 | tcnt = 12000000 / HZ; | 177 | tcnt = 12000000 / HZ; |
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig index 6923316b3d0d..cd67ab1b217b 100644 --- a/arch/arm/mach-sa1100/Kconfig +++ b/arch/arm/mach-sa1100/Kconfig | |||
@@ -111,7 +111,7 @@ config SA1100_LART | |||
111 | bool "LART" | 111 | bool "LART" |
112 | help | 112 | help |
113 | Say Y here if you are using the Linux Advanced Radio Terminal | 113 | Say Y here if you are using the Linux Advanced Radio Terminal |
114 | (also known as the LART). See <http://www.lart.tudelft.nl/> for | 114 | (also known as the LART). See <http://www.lartmaker.nl/> for |
115 | information on the LART. | 115 | information on the LART. |
116 | 116 | ||
117 | config SA1100_PLEB | 117 | config SA1100_PLEB |
diff --git a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile index e4a4a3e8aa8f..e27f15042a22 100644 --- a/arch/arm/mach-sa1100/Makefile +++ b/arch/arm/mach-sa1100/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := generic.o irq.o dma.o time.o | 6 | obj-y := clock.o generic.o irq.o dma.o time.o #nmi-oopser.o |
7 | obj-m := | 7 | obj-m := |
8 | obj-n := | 8 | obj-n := |
9 | obj- := | 9 | obj- := |
diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c new file mode 100644 index 000000000000..b1e8fd766c1a --- /dev/null +++ b/arch/arm/mach-sa1100/clock.c | |||
@@ -0,0 +1,132 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-sa1100/clock.c | ||
3 | */ | ||
4 | #include <linux/module.h> | ||
5 | #include <linux/kernel.h> | ||
6 | #include <linux/list.h> | ||
7 | #include <linux/errno.h> | ||
8 | #include <linux/err.h> | ||
9 | #include <linux/string.h> | ||
10 | #include <linux/clk.h> | ||
11 | #include <linux/spinlock.h> | ||
12 | |||
13 | #include <asm/hardware.h> | ||
14 | #include <asm/semaphore.h> | ||
15 | |||
16 | struct clk { | ||
17 | struct list_head node; | ||
18 | unsigned long rate; | ||
19 | struct module *owner; | ||
20 | const char *name; | ||
21 | unsigned int enabled; | ||
22 | void (*enable)(void); | ||
23 | void (*disable)(void); | ||
24 | }; | ||
25 | |||
26 | static LIST_HEAD(clocks); | ||
27 | static DECLARE_MUTEX(clocks_sem); | ||
28 | static DEFINE_SPINLOCK(clocks_lock); | ||
29 | |||
30 | struct clk *clk_get(struct device *dev, const char *id) | ||
31 | { | ||
32 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
33 | |||
34 | down(&clocks_sem); | ||
35 | list_for_each_entry(p, &clocks, node) { | ||
36 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | ||
37 | clk = p; | ||
38 | break; | ||
39 | } | ||
40 | } | ||
41 | up(&clocks_sem); | ||
42 | |||
43 | return clk; | ||
44 | } | ||
45 | EXPORT_SYMBOL(clk_get); | ||
46 | |||
47 | void clk_put(struct clk *clk) | ||
48 | { | ||
49 | module_put(clk->owner); | ||
50 | } | ||
51 | EXPORT_SYMBOL(clk_put); | ||
52 | |||
53 | int clk_enable(struct clk *clk) | ||
54 | { | ||
55 | unsigned long flags; | ||
56 | |||
57 | spin_lock_irqsave(&clocks_lock, flags); | ||
58 | if (clk->enabled++ == 0) | ||
59 | clk->enable(); | ||
60 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
61 | return 0; | ||
62 | } | ||
63 | EXPORT_SYMBOL(clk_enable); | ||
64 | |||
65 | void clk_disable(struct clk *clk) | ||
66 | { | ||
67 | unsigned long flags; | ||
68 | |||
69 | WARN_ON(clk->enabled == 0); | ||
70 | |||
71 | spin_lock_irqsave(&clocks_lock, flags); | ||
72 | if (--clk->enabled == 0) | ||
73 | clk->disable(); | ||
74 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
75 | } | ||
76 | EXPORT_SYMBOL(clk_disable); | ||
77 | |||
78 | unsigned long clk_get_rate(struct clk *clk) | ||
79 | { | ||
80 | return clk->rate; | ||
81 | } | ||
82 | EXPORT_SYMBOL(clk_get_rate); | ||
83 | |||
84 | |||
85 | static void clk_gpio27_enable(void) | ||
86 | { | ||
87 | /* | ||
88 | * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111: | ||
89 | * (SA-1110 Developer's Manual, section 9.1.2.1) | ||
90 | */ | ||
91 | GAFR |= GPIO_32_768kHz; | ||
92 | GPDR |= GPIO_32_768kHz; | ||
93 | TUCR = TUCR_3_6864MHz; | ||
94 | } | ||
95 | |||
96 | static void clk_gpio27_disable(void) | ||
97 | { | ||
98 | TUCR = 0; | ||
99 | GPDR &= ~GPIO_32_768kHz; | ||
100 | GAFR &= ~GPIO_32_768kHz; | ||
101 | } | ||
102 | |||
103 | static struct clk clk_gpio27 = { | ||
104 | .name = "GPIO27_CLK", | ||
105 | .rate = 3686400, | ||
106 | .enable = clk_gpio27_enable, | ||
107 | .disable = clk_gpio27_disable, | ||
108 | }; | ||
109 | |||
110 | int clk_register(struct clk *clk) | ||
111 | { | ||
112 | down(&clocks_sem); | ||
113 | list_add(&clk->node, &clocks); | ||
114 | up(&clocks_sem); | ||
115 | return 0; | ||
116 | } | ||
117 | EXPORT_SYMBOL(clk_register); | ||
118 | |||
119 | void clk_unregister(struct clk *clk) | ||
120 | { | ||
121 | down(&clocks_sem); | ||
122 | list_del(&clk->node); | ||
123 | up(&clocks_sem); | ||
124 | } | ||
125 | EXPORT_SYMBOL(clk_unregister); | ||
126 | |||
127 | static int __init clk_init(void) | ||
128 | { | ||
129 | clk_register(&clk_gpio27); | ||
130 | return 0; | ||
131 | } | ||
132 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index 6888816a1935..102454082474 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <asm/hardware/scoop.h> | 40 | #include <asm/hardware/scoop.h> |
41 | #include <asm/mach/sharpsl_param.h> | 41 | #include <asm/mach/sharpsl_param.h> |
42 | #include <asm/hardware/locomo.h> | 42 | #include <asm/hardware/locomo.h> |
43 | #include <asm/arch/mcp.h> | ||
43 | 44 | ||
44 | #include "generic.h" | 45 | #include "generic.h" |
45 | 46 | ||
@@ -66,6 +67,32 @@ struct platform_device colliescoop_device = { | |||
66 | .resource = collie_scoop_resources, | 67 | .resource = collie_scoop_resources, |
67 | }; | 68 | }; |
68 | 69 | ||
70 | static struct scoop_pcmcia_dev collie_pcmcia_scoop[] = { | ||
71 | { | ||
72 | .dev = &colliescoop_device.dev, | ||
73 | .irq = COLLIE_IRQ_GPIO_CF_IRQ, | ||
74 | .cd_irq = COLLIE_IRQ_GPIO_CF_CD, | ||
75 | .cd_irq_str = "PCMCIA0 CD", | ||
76 | }, | ||
77 | }; | ||
78 | |||
79 | static struct scoop_pcmcia_config collie_pcmcia_config = { | ||
80 | .devs = &collie_pcmcia_scoop[0], | ||
81 | .num_devs = 1, | ||
82 | }; | ||
83 | |||
84 | |||
85 | static struct mcp_plat_data collie_mcp_data = { | ||
86 | .mccr0 = MCCR0_ADM, | ||
87 | .sclk_rate = 11981000, | ||
88 | }; | ||
89 | |||
90 | |||
91 | static struct sa1100_port_fns collie_port_fns __initdata = { | ||
92 | .set_mctrl = collie_uart_set_mctrl, | ||
93 | .get_mctrl = collie_uart_get_mctrl, | ||
94 | }; | ||
95 | |||
69 | 96 | ||
70 | static struct resource locomo_resources[] = { | 97 | static struct resource locomo_resources[] = { |
71 | [0] = { | 98 | [0] = { |
@@ -159,6 +186,8 @@ static void __init collie_init(void) | |||
159 | GPDR |= GPIO_32_768kHz; | 186 | GPDR |= GPIO_32_768kHz; |
160 | TUCR = TUCR_32_768kHz; | 187 | TUCR = TUCR_32_768kHz; |
161 | 188 | ||
189 | platform_scoop_config = &collie_pcmcia_config; | ||
190 | |||
162 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 191 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
163 | if (ret) { | 192 | if (ret) { |
164 | printk(KERN_WARNING "collie: Unable to register LoCoMo device\n"); | 193 | printk(KERN_WARNING "collie: Unable to register LoCoMo device\n"); |
@@ -166,6 +195,7 @@ static void __init collie_init(void) | |||
166 | 195 | ||
167 | sa11x0_set_flash_data(&collie_flash_data, collie_flash_resources, | 196 | sa11x0_set_flash_data(&collie_flash_data, collie_flash_resources, |
168 | ARRAY_SIZE(collie_flash_resources)); | 197 | ARRAY_SIZE(collie_flash_resources)); |
198 | sa11x0_set_mcp_data(&collie_mcp_data); | ||
169 | 199 | ||
170 | sharpsl_save_param(); | 200 | sharpsl_save_param(); |
171 | } | 201 | } |
diff --git a/arch/arm/mach-sa1100/collie_pm.c b/arch/arm/mach-sa1100/collie_pm.c new file mode 100644 index 000000000000..696d7d29c8a5 --- /dev/null +++ b/arch/arm/mach-sa1100/collie_pm.c | |||
@@ -0,0 +1,278 @@ | |||
1 | /* | ||
2 | * Based on spitz_pm.c and sharp code. | ||
3 | * | ||
4 | * Copyright (C) 2001 SHARP | ||
5 | * Copyright 2005 Pavel Machek <pavel@suse.cz> | ||
6 | * | ||
7 | * Distribute under GPLv2. | ||
8 | * | ||
9 | * Li-ion batteries are angry beasts, and they like to explode. This driver is not finished, | ||
10 | * and sometimes charges them when it should not. If it makes angry lithium to come your way... | ||
11 | * ...well, you have been warned. | ||
12 | */ | ||
13 | |||
14 | #include <linux/module.h> | ||
15 | #include <linux/stat.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/delay.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/device.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | |||
23 | #include <asm/irq.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/hardware.h> | ||
26 | #include <asm/hardware/scoop.h> | ||
27 | #include <asm/dma.h> | ||
28 | #include <asm/arch/collie.h> | ||
29 | #include <asm/mach/sharpsl_param.h> | ||
30 | #include <asm/hardware/sharpsl_pm.h> | ||
31 | |||
32 | #include "../drivers/mfd/ucb1x00.h" | ||
33 | |||
34 | static struct ucb1x00 *ucb; | ||
35 | static int ad_revise; | ||
36 | |||
37 | #define ADCtoPower(x) ((330 * x * 2) / 1024) | ||
38 | |||
39 | static void collie_charger_init(void) | ||
40 | { | ||
41 | int err; | ||
42 | |||
43 | if (sharpsl_param.adadj != -1) { | ||
44 | ad_revise = sharpsl_param.adadj; | ||
45 | } | ||
46 | |||
47 | /* Register interrupt handler. */ | ||
48 | if ((err = request_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr, SA_INTERRUPT, | ||
49 | "ACIN", sharpsl_ac_isr))) { | ||
50 | printk("Could not get irq %d.\n", COLLIE_IRQ_GPIO_AC_IN); | ||
51 | return; | ||
52 | } | ||
53 | if ((err = request_irq(COLLIE_IRQ_GPIO_CO, sharpsl_chrg_full_isr, SA_INTERRUPT, | ||
54 | "CO", sharpsl_chrg_full_isr))) { | ||
55 | free_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr); | ||
56 | printk("Could not get irq %d.\n", COLLIE_IRQ_GPIO_CO); | ||
57 | return; | ||
58 | } | ||
59 | |||
60 | ucb1x00_io_set_dir(ucb, 0, COLLIE_TC35143_GPIO_MBAT_ON | COLLIE_TC35143_GPIO_TMP_ON | | ||
61 | COLLIE_TC35143_GPIO_BBAT_ON); | ||
62 | return; | ||
63 | } | ||
64 | |||
65 | static void collie_measure_temp(int on) | ||
66 | { | ||
67 | if (on) | ||
68 | ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_TMP_ON, 0); | ||
69 | else | ||
70 | ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_TMP_ON); | ||
71 | } | ||
72 | |||
73 | static void collie_charge(int on) | ||
74 | { | ||
75 | if (on) { | ||
76 | printk("Should start charger\n"); | ||
77 | } else { | ||
78 | printk("Should stop charger\n"); | ||
79 | } | ||
80 | #ifdef I_AM_SURE | ||
81 | |||
82 | /* Zaurus seems to contain LTC1731 ; it should know when to | ||
83 | * stop charging itself, so setting charge on should be | ||
84 | * relatively harmless (as long as it is not done too often). | ||
85 | */ | ||
86 | #define CF_BUF_CTRL_BASE 0xF0800000 | ||
87 | #define SCOOP_REG(adr) (*(volatile unsigned short*)(CF_BUF_CTRL_BASE+(adr))) | ||
88 | #define SCOOP_REG_GPWR SCOOP_REG(SCOOP_GPWR) | ||
89 | |||
90 | if (on) { | ||
91 | set_scoop_gpio(&colliescoop_device.dev, COLLIE_SCP_CHARGE_ON); | ||
92 | } else { | ||
93 | reset_scoop_gpio(&colliescoop_device.dev, COLLIE_SCP_CHARGE_ON); | ||
94 | } | ||
95 | #endif | ||
96 | } | ||
97 | |||
98 | static void collie_discharge(int on) | ||
99 | { | ||
100 | } | ||
101 | |||
102 | static void collie_discharge1(int on) | ||
103 | { | ||
104 | } | ||
105 | |||
106 | static void collie_presuspend(void) | ||
107 | { | ||
108 | } | ||
109 | |||
110 | static void collie_postsuspend(void) | ||
111 | { | ||
112 | } | ||
113 | |||
114 | static int collie_should_wakeup(unsigned int resume_on_alarm) | ||
115 | { | ||
116 | return 0; | ||
117 | } | ||
118 | |||
119 | static unsigned long collie_charger_wakeup(void) | ||
120 | { | ||
121 | return 0; | ||
122 | } | ||
123 | |||
124 | int collie_read_backup_battery(void) | ||
125 | { | ||
126 | int voltage; | ||
127 | |||
128 | ucb1x00_adc_enable(ucb); | ||
129 | |||
130 | /* Gives 75..130 */ | ||
131 | ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_BBAT_ON, 0); | ||
132 | voltage = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD1, UCB_SYNC); | ||
133 | |||
134 | ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_BBAT_ON); | ||
135 | ucb1x00_adc_disable(ucb); | ||
136 | |||
137 | printk("Backup battery = %d(%d)\n", ADCtoPower(voltage), voltage); | ||
138 | |||
139 | return ADCtoPower(voltage); | ||
140 | } | ||
141 | |||
142 | int collie_read_main_battery(void) | ||
143 | { | ||
144 | int voltage, voltage_rev, voltage_volts; | ||
145 | |||
146 | ucb1x00_adc_enable(ucb); | ||
147 | ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_BBAT_ON); | ||
148 | ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_MBAT_ON, 0); | ||
149 | /* gives values 160..255 with battery removed... and | ||
150 | 145..255 with battery inserted. (on AC), goes as low as | ||
151 | 80 on DC. */ | ||
152 | voltage = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD1, UCB_SYNC); | ||
153 | |||
154 | ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_MBAT_ON); | ||
155 | ucb1x00_adc_disable(ucb); | ||
156 | |||
157 | voltage_rev = voltage + ((ad_revise * voltage) / 652); | ||
158 | voltage_volts = ADCtoPower(voltage_rev); | ||
159 | |||
160 | printk("Main battery = %d(%d)\n", voltage_volts, voltage); | ||
161 | |||
162 | if (voltage != -1) | ||
163 | return voltage_volts; | ||
164 | else | ||
165 | return voltage; | ||
166 | } | ||
167 | |||
168 | int collie_read_temp(void) | ||
169 | { | ||
170 | int voltage; | ||
171 | |||
172 | /* According to Sharp, temp must be > 973, main battery must be < 465, | ||
173 | FIXME: sharpsl_pm.c has both conditions negated? FIXME: values | ||
174 | are way out of range? */ | ||
175 | |||
176 | ucb1x00_adc_enable(ucb); | ||
177 | ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_TMP_ON, 0); | ||
178 | /* >1010 = battery removed, 460 = 22C ?, higer = lower temp ? */ | ||
179 | voltage = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD0, UCB_SYNC); | ||
180 | ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_TMP_ON); | ||
181 | ucb1x00_adc_disable(ucb); | ||
182 | |||
183 | printk("Battery temp = %d\n", voltage); | ||
184 | return voltage; | ||
185 | } | ||
186 | |||
187 | static unsigned long read_devdata(int which) | ||
188 | { | ||
189 | switch (which) { | ||
190 | case SHARPSL_BATT_VOLT: | ||
191 | return collie_read_main_battery(); | ||
192 | case SHARPSL_BATT_TEMP: | ||
193 | return collie_read_temp(); | ||
194 | case SHARPSL_ACIN_VOLT: | ||
195 | return 0x1; | ||
196 | case SHARPSL_STATUS_ACIN: { | ||
197 | int ret = GPLR & COLLIE_GPIO_AC_IN; | ||
198 | printk("AC status = %d\n", ret); | ||
199 | return ret; | ||
200 | } | ||
201 | case SHARPSL_STATUS_FATAL: { | ||
202 | int ret = GPLR & COLLIE_GPIO_MAIN_BAT_LOW; | ||
203 | printk("Fatal bat = %d\n", ret); | ||
204 | return ret; | ||
205 | } | ||
206 | default: | ||
207 | return ~0; | ||
208 | } | ||
209 | } | ||
210 | |||
211 | struct battery_thresh collie_battery_levels[] = { | ||
212 | { 368, 100}, | ||
213 | { 358, 25}, | ||
214 | { 356, 5}, | ||
215 | { 0, 0}, | ||
216 | }; | ||
217 | |||
218 | struct sharpsl_charger_machinfo collie_pm_machinfo = { | ||
219 | .init = collie_charger_init, | ||
220 | .read_devdata = read_devdata, | ||
221 | .discharge = collie_discharge, | ||
222 | .discharge1 = collie_discharge1, | ||
223 | .charge = collie_charge, | ||
224 | .measure_temp = collie_measure_temp, | ||
225 | .presuspend = collie_presuspend, | ||
226 | .postsuspend = collie_postsuspend, | ||
227 | .charger_wakeup = collie_charger_wakeup, | ||
228 | .should_wakeup = collie_should_wakeup, | ||
229 | .bat_levels = 3, | ||
230 | .bat_levels_noac = collie_battery_levels, | ||
231 | .bat_levels_acin = collie_battery_levels, | ||
232 | .status_high_acin = 368, | ||
233 | .status_low_acin = 358, | ||
234 | .status_high_noac = 368, | ||
235 | .status_low_noac = 358, | ||
236 | }; | ||
237 | |||
238 | static int __init collie_pm_ucb_add(struct ucb1x00_dev *pdev) | ||
239 | { | ||
240 | sharpsl_pm.machinfo = &collie_pm_machinfo; | ||
241 | ucb = pdev->ucb; | ||
242 | return 0; | ||
243 | } | ||
244 | |||
245 | static struct ucb1x00_driver collie_pm_ucb_driver = { | ||
246 | .add = collie_pm_ucb_add, | ||
247 | }; | ||
248 | |||
249 | static struct platform_device *collie_pm_device; | ||
250 | |||
251 | static int __init collie_pm_init(void) | ||
252 | { | ||
253 | int ret; | ||
254 | |||
255 | collie_pm_device = platform_device_alloc("sharpsl-pm", -1); | ||
256 | if (!collie_pm_device) | ||
257 | return -ENOMEM; | ||
258 | |||
259 | collie_pm_device->dev.platform_data = &collie_pm_machinfo; | ||
260 | ret = platform_device_add(collie_pm_device); | ||
261 | |||
262 | if (ret) | ||
263 | platform_device_put(collie_pm_device); | ||
264 | |||
265 | if (!ret) | ||
266 | ret = ucb1x00_register_driver(&collie_pm_ucb_driver); | ||
267 | |||
268 | return ret; | ||
269 | } | ||
270 | |||
271 | static void __exit collie_pm_exit(void) | ||
272 | { | ||
273 | ucb1x00_unregister_driver(&collie_pm_ucb_driver); | ||
274 | platform_device_unregister(collie_pm_device); | ||
275 | } | ||
276 | |||
277 | module_init(collie_pm_init); | ||
278 | module_exit(collie_pm_exit); | ||
diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c index 6435b2e48ffa..d68630b74d78 100644 --- a/arch/arm/mach-sa1100/cpu-sa1100.c +++ b/arch/arm/mach-sa1100/cpu-sa1100.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * linux-2.4.5-rmk1 | 11 | * linux-2.4.5-rmk1 |
12 | * | 12 | * |
13 | * This software has been developed while working on the LART | 13 | * This software has been developed while working on the LART |
14 | * computing board (http://www.lart.tudelft.nl/), which is | 14 | * computing board (http://www.lartmaker.nl/), which is |
15 | * sponsored by the Mobile Multi-media Communications | 15 | * sponsored by the Mobile Multi-media Communications |
16 | * (http://www.mmc.tudelft.nl/) and Ubiquitous Communications | 16 | * (http://www.mmc.tudelft.nl/) and Ubiquitous Communications |
17 | * (http://www.ubicom.tudelft.nl/) projects. | 17 | * (http://www.ubicom.tudelft.nl/) projects. |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 9ebbe808b41d..799697d32dec 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -112,7 +112,7 @@ void __init versatile_init_irq(void) | |||
112 | { | 112 | { |
113 | unsigned int i; | 113 | unsigned int i; |
114 | 114 | ||
115 | vic_init(VA_VIC_BASE, ~(1 << 31)); | 115 | vic_init(VA_VIC_BASE, IRQ_VIC_START, ~(1 << 31)); |
116 | 116 | ||
117 | set_irq_handler(IRQ_VICSOURCE31, sic_handle_irq); | 117 | set_irq_handler(IRQ_VICSOURCE31, sic_handle_irq); |
118 | enable_irq(IRQ_VICSOURCE31); | 118 | enable_irq(IRQ_VICSOURCE31); |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 57a48d92ac41..c55b739e10ba 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -62,7 +62,7 @@ config CPU_ARM720T | |||
62 | # ARM920T | 62 | # ARM920T |
63 | config CPU_ARM920T | 63 | config CPU_ARM920T |
64 | bool "Support ARM920T processor" if !ARCH_S3C2410 | 64 | bool "Support ARM920T processor" if !ARCH_S3C2410 |
65 | depends on ARCH_INTEGRATOR || ARCH_S3C2410 || ARCH_IMX || ARCH_AAEC2000 || ARCH_AT91RM9200 | 65 | depends on ARCH_EP93XX || ARCH_INTEGRATOR || ARCH_S3C2410 || ARCH_IMX || ARCH_AAEC2000 || ARCH_AT91RM9200 |
66 | default y if ARCH_S3C2410 || ARCH_AT91RM9200 | 66 | default y if ARCH_S3C2410 || ARCH_AT91RM9200 |
67 | select CPU_32v4 | 67 | select CPU_32v4 |
68 | select CPU_ABRT_EV4T | 68 | select CPU_ABRT_EV4T |
@@ -239,6 +239,17 @@ config CPU_XSCALE | |||
239 | select CPU_CACHE_VIVT | 239 | select CPU_CACHE_VIVT |
240 | select CPU_TLB_V4WBI | 240 | select CPU_TLB_V4WBI |
241 | 241 | ||
242 | # XScale Core Version 3 | ||
243 | config CPU_XSC3 | ||
244 | bool | ||
245 | depends on ARCH_IXP23XX | ||
246 | default y | ||
247 | select CPU_32v5 | ||
248 | select CPU_ABRT_EV5T | ||
249 | select CPU_CACHE_VIVT | ||
250 | select CPU_TLB_V4WBI | ||
251 | select IO_36 | ||
252 | |||
242 | # ARMv6 | 253 | # ARMv6 |
243 | config CPU_V6 | 254 | config CPU_V6 |
244 | bool "Support ARM V6 processor" | 255 | bool "Support ARM V6 processor" |
@@ -361,11 +372,17 @@ config CPU_TLB_V4WBI | |||
361 | config CPU_TLB_V6 | 372 | config CPU_TLB_V6 |
362 | bool | 373 | bool |
363 | 374 | ||
375 | # | ||
376 | # CPU supports 36-bit I/O | ||
377 | # | ||
378 | config IO_36 | ||
379 | bool | ||
380 | |||
364 | comment "Processor Features" | 381 | comment "Processor Features" |
365 | 382 | ||
366 | config ARM_THUMB | 383 | config ARM_THUMB |
367 | bool "Support Thumb user binaries" | 384 | bool "Support Thumb user binaries" |
368 | depends on CPU_ARM720T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_V6 | 385 | depends on CPU_ARM720T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_V6 |
369 | default y | 386 | default y |
370 | help | 387 | help |
371 | Say Y if you want to include kernel support for running user space | 388 | Say Y if you want to include kernel support for running user space |
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index ffe73ba2bf17..07a538505784 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile | |||
@@ -30,6 +30,7 @@ obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o | |||
30 | obj-$(CONFIG_CPU_COPY_V6) += copypage-v6.o mmu.o | 30 | obj-$(CONFIG_CPU_COPY_V6) += copypage-v6.o mmu.o |
31 | obj-$(CONFIG_CPU_SA1100) += copypage-v4mc.o | 31 | obj-$(CONFIG_CPU_SA1100) += copypage-v4mc.o |
32 | obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o | 32 | obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o |
33 | obj-$(CONFIG_CPU_XSC3) += copypage-xsc3.o | ||
33 | 34 | ||
34 | obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o | 35 | obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o |
35 | obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o | 36 | obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o |
@@ -51,4 +52,5 @@ obj-$(CONFIG_CPU_ARM1026) += proc-arm1026.o | |||
51 | obj-$(CONFIG_CPU_SA110) += proc-sa110.o | 52 | obj-$(CONFIG_CPU_SA110) += proc-sa110.o |
52 | obj-$(CONFIG_CPU_SA1100) += proc-sa1100.o | 53 | obj-$(CONFIG_CPU_SA1100) += proc-sa1100.o |
53 | obj-$(CONFIG_CPU_XSCALE) += proc-xscale.o | 54 | obj-$(CONFIG_CPU_XSCALE) += proc-xscale.o |
55 | obj-$(CONFIG_CPU_XSC3) += proc-xsc3.o | ||
54 | obj-$(CONFIG_CPU_V6) += proc-v6.o | 56 | obj-$(CONFIG_CPU_V6) += proc-v6.o |
diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c index c2ee18d2075e..8a1bfcd50087 100644 --- a/arch/arm/mm/consistent.c +++ b/arch/arm/mm/consistent.c | |||
@@ -223,6 +223,8 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, | |||
223 | pte = consistent_pte[idx] + off; | 223 | pte = consistent_pte[idx] + off; |
224 | c->vm_pages = page; | 224 | c->vm_pages = page; |
225 | 225 | ||
226 | split_page(page, order); | ||
227 | |||
226 | /* | 228 | /* |
227 | * Set the "dma handle" | 229 | * Set the "dma handle" |
228 | */ | 230 | */ |
@@ -231,7 +233,6 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, | |||
231 | do { | 233 | do { |
232 | BUG_ON(!pte_none(*pte)); | 234 | BUG_ON(!pte_none(*pte)); |
233 | 235 | ||
234 | set_page_count(page, 1); | ||
235 | /* | 236 | /* |
236 | * x86 does not mark the pages reserved... | 237 | * x86 does not mark the pages reserved... |
237 | */ | 238 | */ |
@@ -250,7 +251,6 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, | |||
250 | * Free the otherwise unused pages. | 251 | * Free the otherwise unused pages. |
251 | */ | 252 | */ |
252 | while (page < end) { | 253 | while (page < end) { |
253 | set_page_count(page, 1); | ||
254 | __free_page(page); | 254 | __free_page(page); |
255 | page++; | 255 | page++; |
256 | } | 256 | } |
diff --git a/arch/arm/mm/copypage-xsc3.S b/arch/arm/mm/copypage-xsc3.S new file mode 100644 index 000000000000..9a2cb4332b4c --- /dev/null +++ b/arch/arm/mm/copypage-xsc3.S | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/copypage-xsc3.S | ||
3 | * | ||
4 | * Copyright (C) 2004 Intel Corp. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Adapted for 3rd gen XScale core, no more mini-dcache | ||
11 | * Author: Matt Gilbert (matthew.m.gilbert@intel.com) | ||
12 | */ | ||
13 | |||
14 | #include <linux/linkage.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <asm/asm-offsets.h> | ||
17 | |||
18 | /* | ||
19 | * General note: | ||
20 | * We don't really want write-allocate cache behaviour for these functions | ||
21 | * since that will just eat through 8K of the cache. | ||
22 | */ | ||
23 | |||
24 | .text | ||
25 | .align 5 | ||
26 | /* | ||
27 | * XSC3 optimised copy_user_page | ||
28 | * r0 = destination | ||
29 | * r1 = source | ||
30 | * r2 = virtual user address of ultimate destination page | ||
31 | * | ||
32 | * The source page may have some clean entries in the cache already, but we | ||
33 | * can safely ignore them - break_cow() will flush them out of the cache | ||
34 | * if we eventually end up using our copied page. | ||
35 | * | ||
36 | */ | ||
37 | ENTRY(xsc3_mc_copy_user_page) | ||
38 | stmfd sp!, {r4, r5, lr} | ||
39 | mov lr, #PAGE_SZ/64-1 | ||
40 | |||
41 | pld [r1, #0] | ||
42 | pld [r1, #32] | ||
43 | 1: pld [r1, #64] | ||
44 | pld [r1, #96] | ||
45 | |||
46 | 2: ldrd r2, [r1], #8 | ||
47 | mov ip, r0 | ||
48 | ldrd r4, [r1], #8 | ||
49 | mcr p15, 0, ip, c7, c6, 1 @ invalidate | ||
50 | strd r2, [r0], #8 | ||
51 | ldrd r2, [r1], #8 | ||
52 | strd r4, [r0], #8 | ||
53 | ldrd r4, [r1], #8 | ||
54 | strd r2, [r0], #8 | ||
55 | strd r4, [r0], #8 | ||
56 | ldrd r2, [r1], #8 | ||
57 | mov ip, r0 | ||
58 | ldrd r4, [r1], #8 | ||
59 | mcr p15, 0, ip, c7, c6, 1 @ invalidate | ||
60 | strd r2, [r0], #8 | ||
61 | ldrd r2, [r1], #8 | ||
62 | subs lr, lr, #1 | ||
63 | strd r4, [r0], #8 | ||
64 | ldrd r4, [r1], #8 | ||
65 | strd r2, [r0], #8 | ||
66 | strd r4, [r0], #8 | ||
67 | bgt 1b | ||
68 | beq 2b | ||
69 | |||
70 | ldmfd sp!, {r4, r5, pc} | ||
71 | |||
72 | .align 5 | ||
73 | /* | ||
74 | * XScale optimised clear_user_page | ||
75 | * r0 = destination | ||
76 | * r1 = virtual user address of ultimate destination page | ||
77 | */ | ||
78 | ENTRY(xsc3_mc_clear_user_page) | ||
79 | mov r1, #PAGE_SZ/32 | ||
80 | mov r2, #0 | ||
81 | mov r3, #0 | ||
82 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate line | ||
83 | strd r2, [r0], #8 | ||
84 | strd r2, [r0], #8 | ||
85 | strd r2, [r0], #8 | ||
86 | strd r2, [r0], #8 | ||
87 | subs r1, r1, #1 | ||
88 | bne 1b | ||
89 | mov pc, lr | ||
90 | |||
91 | __INITDATA | ||
92 | |||
93 | .type xsc3_mc_user_fns, #object | ||
94 | ENTRY(xsc3_mc_user_fns) | ||
95 | .long xsc3_mc_clear_user_page | ||
96 | .long xsc3_mc_copy_user_page | ||
97 | .size xsc3_mc_user_fns, . - xsc3_mc_user_fns | ||
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 8b276ee38acf..88279124317a 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/initrd.h> | 19 | #include <linux/initrd.h> |
20 | 20 | ||
21 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
22 | #include <asm/hardware.h> | ||
23 | #include <asm/setup.h> | 22 | #include <asm/setup.h> |
24 | #include <asm/tlb.h> | 23 | #include <asm/tlb.h> |
25 | 24 | ||
@@ -531,7 +530,7 @@ static inline void free_area(unsigned long addr, unsigned long end, char *s) | |||
531 | for (; addr < end; addr += PAGE_SIZE) { | 530 | for (; addr < end; addr += PAGE_SIZE) { |
532 | struct page *page = virt_to_page(addr); | 531 | struct page *page = virt_to_page(addr); |
533 | ClearPageReserved(page); | 532 | ClearPageReserved(page); |
534 | set_page_count(page, 1); | 533 | init_page_count(page); |
535 | free_page(addr); | 534 | free_page(addr); |
536 | totalram_pages++; | 535 | totalram_pages++; |
537 | } | 536 | } |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index da9b35974118..25e0ca3e598c 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
27 | 27 | ||
28 | #include <asm/cacheflush.h> | 28 | #include <asm/cacheflush.h> |
29 | #include <asm/hardware.h> | ||
30 | #include <asm/io.h> | 29 | #include <asm/io.h> |
31 | #include <asm/tlbflush.h> | 30 | #include <asm/tlbflush.h> |
32 | 31 | ||
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index ef8d30a185a9..5e5d05bcad50 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c | |||
@@ -557,7 +557,8 @@ void __init create_mapping(struct map_desc *md) | |||
557 | * supersections are only allocated for domain 0 regardless | 557 | * supersections are only allocated for domain 0 regardless |
558 | * of the actual domain assignments in use. | 558 | * of the actual domain assignments in use. |
559 | */ | 559 | */ |
560 | if (cpu_architecture() >= CPU_ARCH_ARMv6 && domain == 0) { | 560 | if ((cpu_architecture() >= CPU_ARCH_ARMv6 || cpu_is_xsc3()) |
561 | && domain == 0) { | ||
561 | /* | 562 | /* |
562 | * Align to supersection boundary if !high pages. | 563 | * Align to supersection boundary if !high pages. |
563 | * High pages have already been checked for proper | 564 | * High pages have already been checked for proper |
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 5f460d717253..959588884fa5 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
34 | #include <asm/procinfo.h> | 34 | #include <asm/procinfo.h> |
35 | #include <asm/ptrace.h> | 35 | #include <asm/ptrace.h> |
36 | #include <asm/hardware.h> | ||
37 | 36 | ||
38 | /* | 37 | /* |
39 | * This is the maximum size of an area which will be invalidated | 38 | * This is the maximum size of an area which will be invalidated |
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index 3e5ea5508839..be6d081ff2b7 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
34 | #include <asm/procinfo.h> | 34 | #include <asm/procinfo.h> |
35 | #include <asm/ptrace.h> | 35 | #include <asm/ptrace.h> |
36 | #include <asm/hardware.h> | ||
37 | 36 | ||
38 | /* | 37 | /* |
39 | * This is the maximum size of an area which will be invalidated | 38 | * This is the maximum size of an area which will be invalidated |
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S index 72b0819326db..26f00ee2ad9a 100644 --- a/arch/arm/mm/proc-arm720.S +++ b/arch/arm/mm/proc-arm720.S | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
39 | #include <asm/procinfo.h> | 39 | #include <asm/procinfo.h> |
40 | #include <asm/ptrace.h> | 40 | #include <asm/ptrace.h> |
41 | #include <asm/hardware.h> | ||
42 | 41 | ||
43 | /* | 42 | /* |
44 | * Function: arm720_proc_init (void) | 43 | * Function: arm720_proc_init (void) |
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index e57d3b8de4b7..a17f79e0199c 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <asm/pgtable-hwdef.h> | 31 | #include <asm/pgtable-hwdef.h> |
32 | #include <asm/pgtable.h> | 32 | #include <asm/pgtable.h> |
33 | #include <asm/procinfo.h> | 33 | #include <asm/procinfo.h> |
34 | #include <asm/hardware.h> | ||
35 | #include <asm/page.h> | 34 | #include <asm/page.h> |
36 | #include <asm/ptrace.h> | 35 | #include <asm/ptrace.h> |
37 | #include "proc-macros.S" | 36 | #include "proc-macros.S" |
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S index 3170b37f82f2..bbde4a024a48 100644 --- a/arch/arm/mm/proc-arm922.S +++ b/arch/arm/mm/proc-arm922.S | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/pgtable-hwdef.h> | 32 | #include <asm/pgtable-hwdef.h> |
33 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
34 | #include <asm/procinfo.h> | 34 | #include <asm/procinfo.h> |
35 | #include <asm/hardware.h> | ||
36 | #include <asm/page.h> | 35 | #include <asm/page.h> |
37 | #include <asm/ptrace.h> | 36 | #include <asm/ptrace.h> |
38 | #include "proc-macros.S" | 37 | #include "proc-macros.S" |
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index eb78850addaa..224ce226a01b 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S | |||
@@ -54,7 +54,6 @@ | |||
54 | #include <asm/pgtable-hwdef.h> | 54 | #include <asm/pgtable-hwdef.h> |
55 | #include <asm/pgtable.h> | 55 | #include <asm/pgtable.h> |
56 | #include <asm/procinfo.h> | 56 | #include <asm/procinfo.h> |
57 | #include <asm/hardware.h> | ||
58 | #include <asm/page.h> | 57 | #include <asm/page.h> |
59 | #include <asm/ptrace.h> | 58 | #include <asm/ptrace.h> |
60 | #include "proc-macros.S" | 59 | #include "proc-macros.S" |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 23ad5027d90c..4e2a087cf388 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <asm/pgtable-hwdef.h> | 31 | #include <asm/pgtable-hwdef.h> |
32 | #include <asm/pgtable.h> | 32 | #include <asm/pgtable.h> |
33 | #include <asm/procinfo.h> | 33 | #include <asm/procinfo.h> |
34 | #include <asm/hardware.h> | ||
35 | #include <asm/page.h> | 34 | #include <asm/page.h> |
36 | #include <asm/ptrace.h> | 35 | #include <asm/ptrace.h> |
37 | #include "proc-macros.S" | 36 | #include "proc-macros.S" |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 9a7e7c096aa9..ee6f15298735 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -21,6 +21,14 @@ | |||
21 | 21 | ||
22 | #define D_CACHE_LINE_SIZE 32 | 22 | #define D_CACHE_LINE_SIZE 32 |
23 | 23 | ||
24 | #define TTB_C (1 << 0) | ||
25 | #define TTB_S (1 << 1) | ||
26 | #define TTB_IMP (1 << 2) | ||
27 | #define TTB_RGN_NC (0 << 3) | ||
28 | #define TTB_RGN_WBWA (1 << 3) | ||
29 | #define TTB_RGN_WT (2 << 3) | ||
30 | #define TTB_RGN_WB (3 << 3) | ||
31 | |||
24 | .macro cpsie, flags | 32 | .macro cpsie, flags |
25 | .ifc \flags, f | 33 | .ifc \flags, f |
26 | .long 0xf1080040 | 34 | .long 0xf1080040 |
@@ -115,7 +123,7 @@ ENTRY(cpu_v6_switch_mm) | |||
115 | mov r2, #0 | 123 | mov r2, #0 |
116 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id | 124 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id |
117 | #ifdef CONFIG_SMP | 125 | #ifdef CONFIG_SMP |
118 | orr r0, r0, #2 @ set shared pgtable | 126 | orr r0, r0, #TTB_RGN_WBWA|TTB_S @ mark PTWs shared, outer cacheable |
119 | #endif | 127 | #endif |
120 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB | 128 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB |
121 | mcr p15, 0, r2, c7, c10, 4 @ drain write buffer | 129 | mcr p15, 0, r2, c7, c10, 4 @ drain write buffer |
@@ -161,8 +169,8 @@ ENTRY(cpu_v6_set_pte) | |||
161 | tst r1, #L_PTE_YOUNG | 169 | tst r1, #L_PTE_YOUNG |
162 | biceq r2, r2, #PTE_EXT_APX | PTE_EXT_AP_MASK | 170 | biceq r2, r2, #PTE_EXT_APX | PTE_EXT_AP_MASK |
163 | 171 | ||
164 | @ tst r1, #L_PTE_EXEC | 172 | tst r1, #L_PTE_EXEC |
165 | @ orreq r2, r2, #PTE_EXT_XN | 173 | orreq r2, r2, #PTE_EXT_XN |
166 | 174 | ||
167 | tst r1, #L_PTE_PRESENT | 175 | tst r1, #L_PTE_PRESENT |
168 | moveq r2, #0 | 176 | moveq r2, #0 |
@@ -221,7 +229,7 @@ __v6_setup: | |||
221 | mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs | 229 | mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs |
222 | mcr p15, 0, r0, c2, c0, 2 @ TTB control register | 230 | mcr p15, 0, r0, c2, c0, 2 @ TTB control register |
223 | #ifdef CONFIG_SMP | 231 | #ifdef CONFIG_SMP |
224 | orr r4, r4, #2 @ set shared pgtable | 232 | orr r4, r4, #TTB_RGN_WBWA|TTB_S @ mark PTWs shared, outer cacheable |
225 | #endif | 233 | #endif |
226 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 | 234 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 |
227 | #ifdef CONFIG_VFP | 235 | #ifdef CONFIG_VFP |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S new file mode 100644 index 000000000000..f90513e9af0c --- /dev/null +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -0,0 +1,498 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mm/proc-xsc3.S | ||
3 | * | ||
4 | * Original Author: Matthew Gilbert | ||
5 | * Current Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
6 | * | ||
7 | * Copyright 2004 (C) Intel Corp. | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * MMU functions for the Intel XScale3 Core (XSC3). The XSC3 core is an | ||
15 | * extension to Intel's original XScale core that adds the following | ||
16 | * features: | ||
17 | * | ||
18 | * - ARMv6 Supersections | ||
19 | * - Low Locality Reference pages (replaces mini-cache) | ||
20 | * - 36-bit addressing | ||
21 | * - L2 cache | ||
22 | * - Cache-coherency if chipset supports it | ||
23 | * | ||
24 | * Based on orignal XScale code by Nicolas Pitre | ||
25 | */ | ||
26 | |||
27 | #include <linux/linkage.h> | ||
28 | #include <linux/init.h> | ||
29 | #include <asm/assembler.h> | ||
30 | #include <asm/procinfo.h> | ||
31 | #include <asm/hardware.h> | ||
32 | #include <asm/pgtable.h> | ||
33 | #include <asm/page.h> | ||
34 | #include <asm/ptrace.h> | ||
35 | #include "proc-macros.S" | ||
36 | |||
37 | /* | ||
38 | * This is the maximum size of an area which will be flushed. If the | ||
39 | * area is larger than this, then we flush the whole cache. | ||
40 | */ | ||
41 | #define MAX_AREA_SIZE 32768 | ||
42 | |||
43 | /* | ||
44 | * The cache line size of the I and D cache. | ||
45 | */ | ||
46 | #define CACHELINESIZE 32 | ||
47 | |||
48 | /* | ||
49 | * The size of the data cache. | ||
50 | */ | ||
51 | #define CACHESIZE 32768 | ||
52 | |||
53 | /* | ||
54 | * Run with L2 enabled. | ||
55 | */ | ||
56 | #define L2_CACHE_ENABLE 1 | ||
57 | |||
58 | /* | ||
59 | * Enable the Branch Target Buffer (can cause crashes, see erratum #42.) | ||
60 | */ | ||
61 | #define BTB_ENABLE 0 | ||
62 | |||
63 | /* | ||
64 | * This macro is used to wait for a CP15 write and is needed | ||
65 | * when we have to ensure that the last operation to the co-pro | ||
66 | * was completed before continuing with operation. | ||
67 | */ | ||
68 | .macro cpwait_ret, lr, rd | ||
69 | mrc p15, 0, \rd, c2, c0, 0 @ arbitrary read of cp15 | ||
70 | sub pc, \lr, \rd, LSR #32 @ wait for completion and | ||
71 | @ flush instruction pipeline | ||
72 | .endm | ||
73 | |||
74 | /* | ||
75 | * This macro cleans & invalidates the entire xsc3 dcache by set & way. | ||
76 | */ | ||
77 | |||
78 | .macro clean_d_cache rd, rs | ||
79 | mov \rd, #0x1f00 | ||
80 | orr \rd, \rd, #0x00e0 | ||
81 | 1: mcr p15, 0, \rd, c7, c14, 2 @ clean/inv set/way | ||
82 | adds \rd, \rd, #0x40000000 | ||
83 | bcc 1b | ||
84 | subs \rd, \rd, #0x20 | ||
85 | bpl 1b | ||
86 | .endm | ||
87 | |||
88 | .text | ||
89 | |||
90 | /* | ||
91 | * cpu_xsc3_proc_init() | ||
92 | * | ||
93 | * Nothing too exciting at the moment | ||
94 | */ | ||
95 | ENTRY(cpu_xsc3_proc_init) | ||
96 | mov pc, lr | ||
97 | |||
98 | /* | ||
99 | * cpu_xsc3_proc_fin() | ||
100 | */ | ||
101 | ENTRY(cpu_xsc3_proc_fin) | ||
102 | str lr, [sp, #-4]! | ||
103 | mov r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE | ||
104 | msr cpsr_c, r0 | ||
105 | bl xsc3_flush_kern_cache_all @ clean caches | ||
106 | mrc p15, 0, r0, c1, c0, 0 @ ctrl register | ||
107 | bic r0, r0, #0x1800 @ ...IZ........... | ||
108 | bic r0, r0, #0x0006 @ .............CA. | ||
109 | mcr p15, 0, r0, c1, c0, 0 @ disable caches | ||
110 | ldr pc, [sp], #4 | ||
111 | |||
112 | /* | ||
113 | * cpu_xsc3_reset(loc) | ||
114 | * | ||
115 | * Perform a soft reset of the system. Put the CPU into the | ||
116 | * same state as it would be if it had been reset, and branch | ||
117 | * to what would be the reset vector. | ||
118 | * | ||
119 | * loc: location to jump to for soft reset | ||
120 | */ | ||
121 | .align 5 | ||
122 | ENTRY(cpu_xsc3_reset) | ||
123 | mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE | ||
124 | msr cpsr_c, r1 @ reset CPSR | ||
125 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register | ||
126 | bic r1, r1, #0x0086 @ ........B....CA. | ||
127 | bic r1, r1, #0x3900 @ ..VIZ..S........ | ||
128 | mcr p15, 0, r1, c1, c0, 0 @ ctrl register | ||
129 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches & BTB | ||
130 | bic r1, r1, #0x0001 @ ...............M | ||
131 | mcr p15, 0, r1, c1, c0, 0 @ ctrl register | ||
132 | @ CAUTION: MMU turned off from this point. We count on the pipeline | ||
133 | @ already containing those two last instructions to survive. | ||
134 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs | ||
135 | mov pc, r0 | ||
136 | |||
137 | /* | ||
138 | * cpu_xsc3_do_idle() | ||
139 | * | ||
140 | * Cause the processor to idle | ||
141 | * | ||
142 | * For now we do nothing but go to idle mode for every case | ||
143 | * | ||
144 | * XScale supports clock switching, but using idle mode support | ||
145 | * allows external hardware to react to system state changes. | ||
146 | |||
147 | MMG: Come back to this one. | ||
148 | */ | ||
149 | .align 5 | ||
150 | |||
151 | ENTRY(cpu_xsc3_do_idle) | ||
152 | mov r0, #1 | ||
153 | mcr p14, 0, r0, c7, c0, 0 @ Go to IDLE | ||
154 | mov pc, lr | ||
155 | |||
156 | /* ================================= CACHE ================================ */ | ||
157 | |||
158 | /* | ||
159 | * flush_user_cache_all() | ||
160 | * | ||
161 | * Invalidate all cache entries in a particular address | ||
162 | * space. | ||
163 | */ | ||
164 | ENTRY(xsc3_flush_user_cache_all) | ||
165 | /* FALLTHROUGH */ | ||
166 | |||
167 | /* | ||
168 | * flush_kern_cache_all() | ||
169 | * | ||
170 | * Clean and invalidate the entire cache. | ||
171 | */ | ||
172 | ENTRY(xsc3_flush_kern_cache_all) | ||
173 | mov r2, #VM_EXEC | ||
174 | mov ip, #0 | ||
175 | __flush_whole_cache: | ||
176 | clean_d_cache r0, r1 | ||
177 | tst r2, #VM_EXEC | ||
178 | mcrne p15, 0, ip, c7, c5, 0 @ Invalidate I cache & BTB | ||
179 | mcrne p15, 0, ip, c7, c10, 4 @ Drain Write Buffer | ||
180 | mcrne p15, 0, ip, c7, c5, 4 @ Prefetch Flush | ||
181 | mov pc, lr | ||
182 | |||
183 | /* | ||
184 | * flush_user_cache_range(start, end, vm_flags) | ||
185 | * | ||
186 | * Invalidate a range of cache entries in the specified | ||
187 | * address space. | ||
188 | * | ||
189 | * - start - start address (may not be aligned) | ||
190 | * - end - end address (exclusive, may not be aligned) | ||
191 | * - vma - vma_area_struct describing address space | ||
192 | */ | ||
193 | .align 5 | ||
194 | ENTRY(xsc3_flush_user_cache_range) | ||
195 | mov ip, #0 | ||
196 | sub r3, r1, r0 @ calculate total size | ||
197 | cmp r3, #MAX_AREA_SIZE | ||
198 | bhs __flush_whole_cache | ||
199 | |||
200 | 1: tst r2, #VM_EXEC | ||
201 | mcrne p15, 0, r0, c7, c5, 1 @ Invalidate I cache line | ||
202 | mcr p15, 0, r0, c7, c14, 1 @ Clean/invalidate D cache line | ||
203 | add r0, r0, #CACHELINESIZE | ||
204 | cmp r0, r1 | ||
205 | blo 1b | ||
206 | tst r2, #VM_EXEC | ||
207 | mcrne p15, 0, ip, c7, c5, 6 @ Invalidate BTB | ||
208 | mcrne p15, 0, ip, c7, c10, 4 @ Drain Write Buffer | ||
209 | mcrne p15, 0, ip, c7, c5, 4 @ Prefetch Flush | ||
210 | mov pc, lr | ||
211 | |||
212 | /* | ||
213 | * coherent_kern_range(start, end) | ||
214 | * | ||
215 | * Ensure coherency between the Icache and the Dcache in the | ||
216 | * region described by start. If you have non-snooping | ||
217 | * Harvard caches, you need to implement this function. | ||
218 | * | ||
219 | * - start - virtual start address | ||
220 | * - end - virtual end address | ||
221 | * | ||
222 | * Note: single I-cache line invalidation isn't used here since | ||
223 | * it also trashes the mini I-cache used by JTAG debuggers. | ||
224 | */ | ||
225 | ENTRY(xsc3_coherent_kern_range) | ||
226 | /* FALLTHROUGH */ | ||
227 | ENTRY(xsc3_coherent_user_range) | ||
228 | bic r0, r0, #CACHELINESIZE - 1 | ||
229 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | ||
230 | add r0, r0, #CACHELINESIZE | ||
231 | cmp r0, r1 | ||
232 | blo 1b | ||
233 | mov r0, #0 | ||
234 | mcr p15, 0, r0, c7, c5, 0 @ Invalidate I cache & BTB | ||
235 | mcr p15, 0, r0, c7, c10, 4 @ Drain Write Buffer | ||
236 | mcr p15, 0, r0, c7, c5, 4 @ Prefetch Flush | ||
237 | mov pc, lr | ||
238 | |||
239 | /* | ||
240 | * flush_kern_dcache_page(void *page) | ||
241 | * | ||
242 | * Ensure no D cache aliasing occurs, either with itself or | ||
243 | * the I cache | ||
244 | * | ||
245 | * - addr - page aligned address | ||
246 | */ | ||
247 | ENTRY(xsc3_flush_kern_dcache_page) | ||
248 | add r1, r0, #PAGE_SZ | ||
249 | 1: mcr p15, 0, r0, c7, c14, 1 @ Clean/Invalidate D Cache line | ||
250 | add r0, r0, #CACHELINESIZE | ||
251 | cmp r0, r1 | ||
252 | blo 1b | ||
253 | mov r0, #0 | ||
254 | mcr p15, 0, r0, c7, c5, 0 @ Invalidate I cache & BTB | ||
255 | mcr p15, 0, r0, c7, c10, 4 @ Drain Write Buffer | ||
256 | mcr p15, 0, r0, c7, c5, 4 @ Prefetch Flush | ||
257 | mov pc, lr | ||
258 | |||
259 | /* | ||
260 | * dma_inv_range(start, end) | ||
261 | * | ||
262 | * Invalidate (discard) the specified virtual address range. | ||
263 | * May not write back any entries. If 'start' or 'end' | ||
264 | * are not cache line aligned, those lines must be written | ||
265 | * back. | ||
266 | * | ||
267 | * - start - virtual start address | ||
268 | * - end - virtual end address | ||
269 | */ | ||
270 | ENTRY(xsc3_dma_inv_range) | ||
271 | tst r0, #CACHELINESIZE - 1 | ||
272 | bic r0, r0, #CACHELINESIZE - 1 | ||
273 | mcrne p15, 0, r0, c7, c10, 1 @ clean L1 D entry | ||
274 | mcrne p15, 1, r0, c7, c11, 1 @ clean L2 D entry | ||
275 | tst r1, #CACHELINESIZE - 1 | ||
276 | mcrne p15, 0, r1, c7, c10, 1 @ clean L1 D entry | ||
277 | mcrne p15, 1, r1, c7, c11, 1 @ clean L2 D entry | ||
278 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate L1 D entry | ||
279 | mcr p15, 1, r0, c7, c7, 1 @ Invalidate L2 D cache line | ||
280 | add r0, r0, #CACHELINESIZE | ||
281 | cmp r0, r1 | ||
282 | blo 1b | ||
283 | mcr p15, 0, r0, c7, c10, 4 @ Drain Write Buffer | ||
284 | mov pc, lr | ||
285 | |||
286 | /* | ||
287 | * dma_clean_range(start, end) | ||
288 | * | ||
289 | * Clean the specified virtual address range. | ||
290 | * | ||
291 | * - start - virtual start address | ||
292 | * - end - virtual end address | ||
293 | */ | ||
294 | ENTRY(xsc3_dma_clean_range) | ||
295 | bic r0, r0, #CACHELINESIZE - 1 | ||
296 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D entry | ||
297 | mcr p15, 1, r0, c7, c11, 1 @ clean L2 D entry | ||
298 | add r0, r0, #CACHELINESIZE | ||
299 | cmp r0, r1 | ||
300 | blo 1b | ||
301 | mcr p15, 0, r0, c7, c10, 4 @ Drain Write Buffer | ||
302 | mov pc, lr | ||
303 | |||
304 | /* | ||
305 | * dma_flush_range(start, end) | ||
306 | * | ||
307 | * Clean and invalidate the specified virtual address range. | ||
308 | * | ||
309 | * - start - virtual start address | ||
310 | * - end - virtual end address | ||
311 | */ | ||
312 | ENTRY(xsc3_dma_flush_range) | ||
313 | bic r0, r0, #CACHELINESIZE - 1 | ||
314 | 1: mcr p15, 0, r0, c7, c14, 1 @ Clean/invalidate L1 D cache line | ||
315 | mcr p15, 1, r0, c7, c11, 1 @ Clean L2 D cache line | ||
316 | mcr p15, 1, r0, c7, c7, 1 @ Invalidate L2 D cache line | ||
317 | add r0, r0, #CACHELINESIZE | ||
318 | cmp r0, r1 | ||
319 | blo 1b | ||
320 | mcr p15, 0, r0, c7, c10, 4 @ Drain Write Buffer | ||
321 | mov pc, lr | ||
322 | |||
323 | ENTRY(xsc3_cache_fns) | ||
324 | .long xsc3_flush_kern_cache_all | ||
325 | .long xsc3_flush_user_cache_all | ||
326 | .long xsc3_flush_user_cache_range | ||
327 | .long xsc3_coherent_kern_range | ||
328 | .long xsc3_coherent_user_range | ||
329 | .long xsc3_flush_kern_dcache_page | ||
330 | .long xsc3_dma_inv_range | ||
331 | .long xsc3_dma_clean_range | ||
332 | .long xsc3_dma_flush_range | ||
333 | |||
334 | ENTRY(cpu_xsc3_dcache_clean_area) | ||
335 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | ||
336 | add r0, r0, #CACHELINESIZE | ||
337 | subs r1, r1, #CACHELINESIZE | ||
338 | bhi 1b | ||
339 | mov pc, lr | ||
340 | |||
341 | /* =============================== PageTable ============================== */ | ||
342 | |||
343 | /* | ||
344 | * cpu_xsc3_switch_mm(pgd) | ||
345 | * | ||
346 | * Set the translation base pointer to be as described by pgd. | ||
347 | * | ||
348 | * pgd: new page tables | ||
349 | */ | ||
350 | .align 5 | ||
351 | ENTRY(cpu_xsc3_switch_mm) | ||
352 | clean_d_cache r1, r2 | ||
353 | mcr p15, 0, ip, c7, c5, 0 @ Invalidate I cache & BTB | ||
354 | mcr p15, 0, ip, c7, c10, 4 @ Drain Write Buffer | ||
355 | mcr p15, 0, ip, c7, c5, 4 @ Prefetch Flush | ||
356 | #ifdef L2_CACHE_ENABLE | ||
357 | orr r0, r0, #0x18 @ cache the page table in L2 | ||
358 | #endif | ||
359 | mcr p15, 0, r0, c2, c0, 0 @ load page table pointer | ||
360 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs | ||
361 | cpwait_ret lr, ip | ||
362 | |||
363 | /* | ||
364 | * cpu_xsc3_set_pte(ptep, pte) | ||
365 | * | ||
366 | * Set a PTE and flush it out | ||
367 | * | ||
368 | */ | ||
369 | .align 5 | ||
370 | ENTRY(cpu_xsc3_set_pte) | ||
371 | str r1, [r0], #-2048 @ linux version | ||
372 | |||
373 | bic r2, r1, #0xff0 | ||
374 | orr r2, r2, #PTE_TYPE_EXT @ extended page | ||
375 | |||
376 | eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY | ||
377 | |||
378 | tst r3, #L_PTE_USER @ User? | ||
379 | orrne r2, r2, #PTE_EXT_AP_URO_SRW @ yes -> user r/o, system r/w | ||
380 | |||
381 | tst r3, #L_PTE_WRITE | L_PTE_DIRTY @ Write and Dirty? | ||
382 | orreq r2, r2, #PTE_EXT_AP_UNO_SRW @ yes -> user n/a, system r/w | ||
383 | @ combined with user -> user r/w | ||
384 | |||
385 | #if L2_CACHE_ENABLE | ||
386 | @ If its cacheable it needs to be in L2 also. | ||
387 | eor ip, r1, #L_PTE_CACHEABLE | ||
388 | tst ip, #L_PTE_CACHEABLE | ||
389 | orreq r2, r2, #PTE_EXT_TEX(0x5) | ||
390 | #endif | ||
391 | |||
392 | tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young? | ||
393 | movne r2, #0 @ no -> fault | ||
394 | |||
395 | str r2, [r0] @ hardware version | ||
396 | mov ip, #0 | ||
397 | mcr p15, 0, r0, c7, c10, 1 @ Clean D cache line mcr | ||
398 | mcr p15, 0, ip, c7, c10, 4 @ Drain Write Buffer | ||
399 | mov pc, lr | ||
400 | |||
401 | .ltorg | ||
402 | |||
403 | .align | ||
404 | |||
405 | __INIT | ||
406 | |||
407 | .type __xsc3_setup, #function | ||
408 | __xsc3_setup: | ||
409 | mov r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE | ||
410 | msr cpsr_c, r0 | ||
411 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I, D caches & BTB | ||
412 | mcr p15, 0, ip, c7, c10, 4 @ Drain Write Buffer | ||
413 | mcr p15, 0, ip, c7, c5, 4 @ Prefetch Flush | ||
414 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I, D TLBs | ||
415 | #if L2_CACHE_ENABLE | ||
416 | orr r4, r4, #0x18 @ cache the page table in L2 | ||
417 | #endif | ||
418 | mcr p15, 0, r4, c2, c0, 0 @ load page table pointer | ||
419 | mov r0, #1 @ Allow access to CP0 and CP13 | ||
420 | orr r0, r0, #1 << 13 @ Its undefined whether this | ||
421 | mcr p15, 0, r0, c15, c1, 0 @ affects USR or SVC modes | ||
422 | mrc p15, 0, r0, c1, c0, 1 @ get auxiliary control reg | ||
423 | and r0, r0, #2 @ preserve bit P bit setting | ||
424 | #if L2_CACHE_ENABLE | ||
425 | orr r0, r0, #(1 << 10) @ enable L2 for LLR cache | ||
426 | #endif | ||
427 | mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg | ||
428 | mrc p15, 0, r0, c1, c0, 0 @ get control register | ||
429 | bic r0, r0, #0x0200 @ .... ..R. .... .... | ||
430 | bic r0, r0, #0x0002 @ .... .... .... ..A. | ||
431 | orr r0, r0, #0x0005 @ .... .... .... .C.M | ||
432 | #if BTB_ENABLE | ||
433 | orr r0, r0, #0x3900 @ ..VI Z..S .... .... | ||
434 | #else | ||
435 | orr r0, r0, #0x3100 @ ..VI ...S .... .... | ||
436 | #endif | ||
437 | #if L2_CACHE_ENABLE | ||
438 | orr r0, r0, #0x4000000 @ L2 enable | ||
439 | #endif | ||
440 | mov pc, lr | ||
441 | |||
442 | .size __xsc3_setup, . - __xsc3_setup | ||
443 | |||
444 | __INITDATA | ||
445 | |||
446 | /* | ||
447 | * Purpose : Function pointers used to access above functions - all calls | ||
448 | * come through these | ||
449 | */ | ||
450 | |||
451 | .type xsc3_processor_functions, #object | ||
452 | ENTRY(xsc3_processor_functions) | ||
453 | .word v5t_early_abort | ||
454 | .word cpu_xsc3_proc_init | ||
455 | .word cpu_xsc3_proc_fin | ||
456 | .word cpu_xsc3_reset | ||
457 | .word cpu_xsc3_do_idle | ||
458 | .word cpu_xsc3_dcache_clean_area | ||
459 | .word cpu_xsc3_switch_mm | ||
460 | .word cpu_xsc3_set_pte | ||
461 | .size xsc3_processor_functions, . - xsc3_processor_functions | ||
462 | |||
463 | .section ".rodata" | ||
464 | |||
465 | .type cpu_arch_name, #object | ||
466 | cpu_arch_name: | ||
467 | .asciz "armv5te" | ||
468 | .size cpu_arch_name, . - cpu_arch_name | ||
469 | |||
470 | .type cpu_elf_name, #object | ||
471 | cpu_elf_name: | ||
472 | .asciz "v5" | ||
473 | .size cpu_elf_name, . - cpu_elf_name | ||
474 | |||
475 | .type cpu_xsc3_name, #object | ||
476 | cpu_xsc3_name: | ||
477 | .asciz "XScale-Core3" | ||
478 | .size cpu_xsc3_name, . - cpu_xsc3_name | ||
479 | |||
480 | .align | ||
481 | |||
482 | .section ".proc.info.init", #alloc, #execinstr | ||
483 | |||
484 | .type __xsc3_proc_info,#object | ||
485 | __xsc3_proc_info: | ||
486 | .long 0x69056000 | ||
487 | .long 0xffffe000 | ||
488 | .long 0x00000c0e | ||
489 | b __xsc3_setup | ||
490 | .long cpu_arch_name | ||
491 | .long cpu_elf_name | ||
492 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP | ||
493 | .long cpu_xsc3_name | ||
494 | .long xsc3_processor_functions | ||
495 | .long v4wbi_tlb_fns | ||
496 | .long xsc3_mc_user_fns | ||
497 | .long xsc3_cache_fns | ||
498 | .size __xsc3_proc_info, . - __xsc3_proc_info | ||
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 3e7e6a8f4109..29bcc4dd6517 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
@@ -24,9 +24,8 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <asm/assembler.h> | 25 | #include <asm/assembler.h> |
26 | #include <asm/procinfo.h> | 26 | #include <asm/procinfo.h> |
27 | #include <asm/hardware.h> | ||
28 | #include <asm/pgtable-hwdef.h> | ||
29 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
28 | #include <asm/pgtable-hwdef.h> | ||
30 | #include <asm/page.h> | 29 | #include <asm/page.h> |
31 | #include <asm/ptrace.h> | 30 | #include <asm/ptrace.h> |
32 | #include "proc-macros.S" | 31 | #include "proc-macros.S" |
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index 6f8bc1f0e6a1..6f833358cd06 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c | |||
@@ -10,17 +10,18 @@ | |||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/oprofile.h> | 11 | #include <linux/oprofile.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/sysdev.h> | 14 | #include <linux/sysdev.h> |
14 | #include <asm/semaphore.h> | 15 | #include <linux/mutex.h> |
15 | 16 | ||
16 | #include "op_counter.h" | 17 | #include "op_counter.h" |
17 | #include "op_arm_model.h" | 18 | #include "op_arm_model.h" |
18 | 19 | ||
19 | static struct op_arm_model_spec *op_arm_model; | 20 | static struct op_arm_model_spec *op_arm_model; |
20 | static int op_arm_enabled; | 21 | static int op_arm_enabled; |
21 | static struct semaphore op_arm_sem; | 22 | static DEFINE_MUTEX(op_arm_mutex); |
22 | 23 | ||
23 | struct op_counter_config counter_config[OP_MAX_COUNTER]; | 24 | struct op_counter_config *counter_config; |
24 | 25 | ||
25 | static int op_arm_create_files(struct super_block *sb, struct dentry *root) | 26 | static int op_arm_create_files(struct super_block *sb, struct dentry *root) |
26 | { | 27 | { |
@@ -28,7 +29,7 @@ static int op_arm_create_files(struct super_block *sb, struct dentry *root) | |||
28 | 29 | ||
29 | for (i = 0; i < op_arm_model->num_counters; i++) { | 30 | for (i = 0; i < op_arm_model->num_counters; i++) { |
30 | struct dentry *dir; | 31 | struct dentry *dir; |
31 | char buf[2]; | 32 | char buf[4]; |
32 | 33 | ||
33 | snprintf(buf, sizeof buf, "%d", i); | 34 | snprintf(buf, sizeof buf, "%d", i); |
34 | dir = oprofilefs_mkdir(sb, root, buf); | 35 | dir = oprofilefs_mkdir(sb, root, buf); |
@@ -57,40 +58,40 @@ static int op_arm_start(void) | |||
57 | { | 58 | { |
58 | int ret = -EBUSY; | 59 | int ret = -EBUSY; |
59 | 60 | ||
60 | down(&op_arm_sem); | 61 | mutex_lock(&op_arm_mutex); |
61 | if (!op_arm_enabled) { | 62 | if (!op_arm_enabled) { |
62 | ret = op_arm_model->start(); | 63 | ret = op_arm_model->start(); |
63 | op_arm_enabled = !ret; | 64 | op_arm_enabled = !ret; |
64 | } | 65 | } |
65 | up(&op_arm_sem); | 66 | mutex_unlock(&op_arm_mutex); |
66 | return ret; | 67 | return ret; |
67 | } | 68 | } |
68 | 69 | ||
69 | static void op_arm_stop(void) | 70 | static void op_arm_stop(void) |
70 | { | 71 | { |
71 | down(&op_arm_sem); | 72 | mutex_lock(&op_arm_mutex); |
72 | if (op_arm_enabled) | 73 | if (op_arm_enabled) |
73 | op_arm_model->stop(); | 74 | op_arm_model->stop(); |
74 | op_arm_enabled = 0; | 75 | op_arm_enabled = 0; |
75 | up(&op_arm_sem); | 76 | mutex_unlock(&op_arm_mutex); |
76 | } | 77 | } |
77 | 78 | ||
78 | #ifdef CONFIG_PM | 79 | #ifdef CONFIG_PM |
79 | static int op_arm_suspend(struct sys_device *dev, pm_message_t state) | 80 | static int op_arm_suspend(struct sys_device *dev, pm_message_t state) |
80 | { | 81 | { |
81 | down(&op_arm_sem); | 82 | mutex_lock(&op_arm_mutex); |
82 | if (op_arm_enabled) | 83 | if (op_arm_enabled) |
83 | op_arm_model->stop(); | 84 | op_arm_model->stop(); |
84 | up(&op_arm_sem); | 85 | mutex_unlock(&op_arm_mutex); |
85 | return 0; | 86 | return 0; |
86 | } | 87 | } |
87 | 88 | ||
88 | static int op_arm_resume(struct sys_device *dev) | 89 | static int op_arm_resume(struct sys_device *dev) |
89 | { | 90 | { |
90 | down(&op_arm_sem); | 91 | mutex_lock(&op_arm_mutex); |
91 | if (op_arm_enabled && op_arm_model->start()) | 92 | if (op_arm_enabled && op_arm_model->start()) |
92 | op_arm_enabled = 0; | 93 | op_arm_enabled = 0; |
93 | up(&op_arm_sem); | 94 | mutex_unlock(&op_arm_mutex); |
94 | return 0; | 95 | return 0; |
95 | } | 96 | } |
96 | 97 | ||
@@ -135,12 +136,15 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
135 | #endif | 136 | #endif |
136 | 137 | ||
137 | if (spec) { | 138 | if (spec) { |
138 | init_MUTEX(&op_arm_sem); | ||
139 | |||
140 | ret = spec->init(); | 139 | ret = spec->init(); |
141 | if (ret < 0) | 140 | if (ret < 0) |
142 | return ret; | 141 | return ret; |
143 | 142 | ||
143 | counter_config = kcalloc(spec->num_counters, sizeof(struct op_counter_config), | ||
144 | GFP_KERNEL); | ||
145 | if (!counter_config) | ||
146 | return -ENOMEM; | ||
147 | |||
144 | op_arm_model = spec; | 148 | op_arm_model = spec; |
145 | init_driverfs(); | 149 | init_driverfs(); |
146 | ops->create_files = op_arm_create_files; | 150 | ops->create_files = op_arm_create_files; |
@@ -162,5 +166,5 @@ void oprofile_arch_exit(void) | |||
162 | exit_driverfs(); | 166 | exit_driverfs(); |
163 | op_arm_model = NULL; | 167 | op_arm_model = NULL; |
164 | } | 168 | } |
169 | kfree(counter_config); | ||
165 | } | 170 | } |
166 | |||
diff --git a/arch/arm/oprofile/op_counter.h b/arch/arm/oprofile/op_counter.h index 153c1d467f24..8c5351d751cf 100644 --- a/arch/arm/oprofile/op_counter.h +++ b/arch/arm/oprofile/op_counter.h | |||
@@ -24,6 +24,6 @@ struct op_counter_config { | |||
24 | unsigned long user; | 24 | unsigned long user; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | extern struct op_counter_config counter_config[]; | 27 | extern struct op_counter_config *counter_config; |
28 | 28 | ||
29 | #endif /* OP_COUNTER_H */ | 29 | #endif /* OP_COUNTER_H */ |
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S index 6f17187ab32a..7b595547c1c8 100644 --- a/arch/arm/vfp/entry.S +++ b/arch/arm/vfp/entry.S | |||
@@ -18,10 +18,12 @@ | |||
18 | #include <linux/linkage.h> | 18 | #include <linux/linkage.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <asm/asm-offsets.h> | 20 | #include <asm/asm-offsets.h> |
21 | #include <asm/assembler.h> | ||
21 | #include <asm/vfpmacros.h> | 22 | #include <asm/vfpmacros.h> |
22 | 23 | ||
23 | .globl do_vfp | 24 | .globl do_vfp |
24 | do_vfp: | 25 | do_vfp: |
26 | enable_irq | ||
25 | ldr r4, .LCvfp | 27 | ldr r4, .LCvfp |
26 | add r10, r10, #TI_VFPSTATE @ r10 = workspace | 28 | add r10, r10, #TI_VFPSTATE @ r10 = workspace |
27 | ldr pc, [r4] @ call VFP entry point | 29 | ldr pc, [r4] @ call VFP entry point |
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index de4ca1223c58..b7ed57e00cd4 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S | |||
@@ -102,7 +102,6 @@ vfp_support_entry: | |||
102 | VFPFMRX r8, FPINST2, NE @ FPINST2 if needed - avoids reading | 102 | VFPFMRX r8, FPINST2, NE @ FPINST2 if needed - avoids reading |
103 | @ nonexistant reg on rev0 | 103 | @ nonexistant reg on rev0 |
104 | VFPFSTMIA r4 @ save the working registers | 104 | VFPFSTMIA r4 @ save the working registers |
105 | add r4, r4, #8*16+4 | ||
106 | stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2 | 105 | stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2 |
107 | @ and point r4 at the word at the | 106 | @ and point r4 at the word at the |
108 | @ start of the register dump | 107 | @ start of the register dump |
@@ -111,10 +110,9 @@ no_old_VFP_process: | |||
111 | DBGSTR1 "load state %p", r10 | 110 | DBGSTR1 "load state %p", r10 |
112 | str r10, [r3] @ update the last_VFP_context pointer | 111 | str r10, [r3] @ update the last_VFP_context pointer |
113 | @ Load the saved state back into the VFP | 112 | @ Load the saved state back into the VFP |
114 | add r4, r10, #8*16+4 | ||
115 | ldmia r4, {r1, r5, r6, r8} @ load FPEXC, FPSCR, FPINST, FPINST2 | ||
116 | VFPFLDMIA r10 @ reload the working registers while | 113 | VFPFLDMIA r10 @ reload the working registers while |
117 | @ FPEXC is in a safe state | 114 | @ FPEXC is in a safe state |
115 | ldmia r10, {r1, r5, r6, r8} @ load FPEXC, FPSCR, FPINST, FPINST2 | ||
118 | tst r1, #FPEXC_FPV2 @ is there an FPINST2 to write? | 116 | tst r1, #FPEXC_FPV2 @ is there an FPINST2 to write? |
119 | VFPFMXR FPINST2, r8, NE @ FPINST2 if needed - avoids writing | 117 | VFPFMXR FPINST2, r8, NE @ FPINST2 if needed - avoids writing |
120 | @ nonexistant reg on rev0 | 118 | @ nonexistant reg on rev0 |
diff --git a/arch/arm26/Makefile b/arch/arm26/Makefile index 844a9e46886e..fe91eda98a94 100644 --- a/arch/arm26/Makefile +++ b/arch/arm26/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # arch/arm26/Makefile | 2 | # arch/arm26/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 7 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 8 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 9 | # for more details. |
@@ -49,9 +52,9 @@ all: zImage | |||
49 | 52 | ||
50 | boot := arch/arm26/boot | 53 | boot := arch/arm26/boot |
51 | 54 | ||
52 | .PHONY: maketools FORCE | 55 | PHONY += maketools FORCE |
53 | maketools: FORCE | 56 | maketools: FORCE |
54 | 57 | ||
55 | 58 | ||
56 | # Convert bzImage to zImage | 59 | # Convert bzImage to zImage |
57 | bzImage: vmlinux | 60 | bzImage: vmlinux |
diff --git a/arch/arm26/boot/Makefile b/arch/arm26/boot/Makefile index b5c2277654d4..68acb7b0d47f 100644 --- a/arch/arm26/boot/Makefile +++ b/arch/arm26/boot/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # arch/arm26/boot/Makefile | 2 | # arch/arm26/boot/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 7 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 8 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 9 | # for more details. |
@@ -60,7 +63,7 @@ $(obj)/xipImage: vmlinux FORCE | |||
60 | @echo ' Kernel: $@ is ready' | 63 | @echo ' Kernel: $@ is ready' |
61 | endif | 64 | endif |
62 | 65 | ||
63 | .PHONY: initrd | 66 | PHONY += initrd |
64 | initrd: | 67 | initrd: |
65 | @test "$(INITRD_PHYS)" != "" || \ | 68 | @test "$(INITRD_PHYS)" != "" || \ |
66 | (echo This machine does not support INITRD; exit -1) | 69 | (echo This machine does not support INITRD; exit -1) |
diff --git a/arch/arm26/mm/init.c b/arch/arm26/mm/init.c index 1f09a9d0fb83..e3ecaa453747 100644 --- a/arch/arm26/mm/init.c +++ b/arch/arm26/mm/init.c | |||
@@ -324,7 +324,7 @@ static inline void free_area(unsigned long addr, unsigned long end, char *s) | |||
324 | for (; addr < end; addr += PAGE_SIZE) { | 324 | for (; addr < end; addr += PAGE_SIZE) { |
325 | struct page *page = virt_to_page(addr); | 325 | struct page *page = virt_to_page(addr); |
326 | ClearPageReserved(page); | 326 | ClearPageReserved(page); |
327 | set_page_count(page, 1); | 327 | init_page_count(page); |
328 | free_page(addr); | 328 | free_page(addr); |
329 | totalram_pages++; | 329 | totalram_pages++; |
330 | } | 330 | } |
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index 501fa52d8d3a..c59ee28a35f4 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c | |||
@@ -2944,7 +2944,7 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig | |||
2944 | int spdl_err; | 2944 | int spdl_err; |
2945 | /* Mark output pages dirty. */ | 2945 | /* Mark output pages dirty. */ |
2946 | spdl_err = set_page_dirty_lock(outpages[i]); | 2946 | spdl_err = set_page_dirty_lock(outpages[i]); |
2947 | DEBUG(if (spdl_err)printk("cryptocop_ioctl_process: set_page_dirty_lock returned %d\n", spdl_err)); | 2947 | DEBUG(if (spdl_err < 0)printk("cryptocop_ioctl_process: set_page_dirty_lock returned %d\n", spdl_err)); |
2948 | } | 2948 | } |
2949 | for (i = 0; i < nooutpages; i++){ | 2949 | for (i = 0; i < nooutpages; i++){ |
2950 | put_page(outpages[i]); | 2950 | put_page(outpages[i]); |
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index 30deaf1b728a..b504def3e346 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c | |||
@@ -52,9 +52,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
52 | 52 | ||
53 | if (i == 0) { | 53 | if (i == 0) { |
54 | seq_printf(p, " "); | 54 | seq_printf(p, " "); |
55 | for (j=0; j<NR_CPUS; j++) | 55 | for_each_online_cpu(j) |
56 | if (cpu_online(j)) | 56 | seq_printf(p, "CPU%d ",j); |
57 | seq_printf(p, "CPU%d ",j); | ||
58 | seq_putc(p, '\n'); | 57 | seq_putc(p, '\n'); |
59 | } | 58 | } |
60 | 59 | ||
@@ -67,9 +66,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
67 | #ifndef CONFIG_SMP | 66 | #ifndef CONFIG_SMP |
68 | seq_printf(p, "%10u ", kstat_irqs(i)); | 67 | seq_printf(p, "%10u ", kstat_irqs(i)); |
69 | #else | 68 | #else |
70 | for (j = 0; j < NR_CPUS; j++) | 69 | for_each_online_cpu(j) |
71 | if (cpu_online(j)) | 70 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
72 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | ||
73 | #endif | 71 | #endif |
74 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 72 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
75 | seq_printf(p, " %s", action->name); | 73 | seq_printf(p, " %s", action->name); |
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c index 4ab3e87115b6..123451c44154 100644 --- a/arch/cris/kernel/process.c +++ b/arch/cris/kernel/process.c | |||
@@ -116,6 +116,7 @@ | |||
116 | #include <asm/pgtable.h> | 116 | #include <asm/pgtable.h> |
117 | #include <asm/uaccess.h> | 117 | #include <asm/uaccess.h> |
118 | #include <asm/irq.h> | 118 | #include <asm/irq.h> |
119 | #include <asm/system.h> | ||
119 | #include <linux/module.h> | 120 | #include <linux/module.h> |
120 | #include <linux/spinlock.h> | 121 | #include <linux/spinlock.h> |
121 | #include <linux/fs_struct.h> | 122 | #include <linux/fs_struct.h> |
@@ -194,8 +195,6 @@ EXPORT_SYMBOL(enable_hlt); | |||
194 | */ | 195 | */ |
195 | void (*pm_idle)(void); | 196 | void (*pm_idle)(void); |
196 | 197 | ||
197 | extern void default_idle(void); | ||
198 | |||
199 | /* | 198 | /* |
200 | * The idle thread. There's no useful work to be | 199 | * The idle thread. There's no useful work to be |
201 | * done, so just try to conserve power and have a | 200 | * done, so just try to conserve power and have a |
diff --git a/arch/cris/mm/init.c b/arch/cris/mm/init.c index 31a0018b525a..b7842ff213a6 100644 --- a/arch/cris/mm/init.c +++ b/arch/cris/mm/init.c | |||
@@ -216,7 +216,7 @@ free_initmem(void) | |||
216 | addr = (unsigned long)(&__init_begin); | 216 | addr = (unsigned long)(&__init_begin); |
217 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 217 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
218 | ClearPageReserved(virt_to_page(addr)); | 218 | ClearPageReserved(virt_to_page(addr)); |
219 | set_page_count(virt_to_page(addr), 1); | 219 | init_page_count(virt_to_page(addr)); |
220 | free_page(addr); | 220 | free_page(addr); |
221 | totalram_pages++; | 221 | totalram_pages++; |
222 | } | 222 | } |
diff --git a/arch/frv/kernel/frv_ksyms.c b/arch/frv/kernel/frv_ksyms.c index 0f1c6cbc4f50..aa6b7d0a2109 100644 --- a/arch/frv/kernel/frv_ksyms.c +++ b/arch/frv/kernel/frv_ksyms.c | |||
@@ -27,6 +27,7 @@ EXPORT_SYMBOL(__ioremap); | |||
27 | EXPORT_SYMBOL(iounmap); | 27 | EXPORT_SYMBOL(iounmap); |
28 | 28 | ||
29 | EXPORT_SYMBOL(strnlen); | 29 | EXPORT_SYMBOL(strnlen); |
30 | EXPORT_SYMBOL(strpbrk); | ||
30 | EXPORT_SYMBOL(strrchr); | 31 | EXPORT_SYMBOL(strrchr); |
31 | EXPORT_SYMBOL(strstr); | 32 | EXPORT_SYMBOL(strstr); |
32 | EXPORT_SYMBOL(strchr); | 33 | EXPORT_SYMBOL(strchr); |
diff --git a/arch/frv/kernel/gdb-stub.c b/arch/frv/kernel/gdb-stub.c index 8f860d9c4947..508601fad079 100644 --- a/arch/frv/kernel/gdb-stub.c +++ b/arch/frv/kernel/gdb-stub.c | |||
@@ -1406,7 +1406,7 @@ void gdbstub(int sigval) | |||
1406 | __debug_frame->psr |= PSR_S; | 1406 | __debug_frame->psr |= PSR_S; |
1407 | __debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12; | 1407 | __debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12; |
1408 | __debug_regs->brr |= BRR_EB; | 1408 | __debug_regs->brr |= BRR_EB; |
1409 | sigval = SIGXCPU;; | 1409 | sigval = SIGXCPU; |
1410 | } | 1410 | } |
1411 | 1411 | ||
1412 | LEDS(0x5002); | 1412 | LEDS(0x5002); |
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c index 27ab4c30aac6..11fa326a8f62 100644 --- a/arch/frv/kernel/irq.c +++ b/arch/frv/kernel/irq.c | |||
@@ -75,9 +75,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
75 | switch (i) { | 75 | switch (i) { |
76 | case 0: | 76 | case 0: |
77 | seq_printf(p, " "); | 77 | seq_printf(p, " "); |
78 | for (j = 0; j < NR_CPUS; j++) | 78 | for_each_online_cpu(j) |
79 | if (cpu_online(j)) | 79 | seq_printf(p, "CPU%d ",j); |
80 | seq_printf(p, "CPU%d ",j); | ||
81 | 80 | ||
82 | seq_putc(p, '\n'); | 81 | seq_putc(p, '\n'); |
83 | break; | 82 | break; |
@@ -100,9 +99,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
100 | #ifndef CONFIG_SMP | 99 | #ifndef CONFIG_SMP |
101 | seq_printf(p, "%10u ", kstat_irqs(i)); | 100 | seq_printf(p, "%10u ", kstat_irqs(i)); |
102 | #else | 101 | #else |
103 | for (j = 0; j < NR_CPUS; j++) | 102 | for_each_online_cpu(j) |
104 | if (cpu_online(j)) | 103 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i - 1]); |
105 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i - 1]); | ||
106 | #endif | 104 | #endif |
107 | 105 | ||
108 | level = group->sources[ix]->level - frv_irq_levels; | 106 | level = group->sources[ix]->level - frv_irq_levels; |
diff --git a/arch/frv/mm/dma-alloc.c b/arch/frv/mm/dma-alloc.c index 342823aad758..636b2f8b5d98 100644 --- a/arch/frv/mm/dma-alloc.c +++ b/arch/frv/mm/dma-alloc.c | |||
@@ -115,9 +115,7 @@ void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle) | |||
115 | */ | 115 | */ |
116 | if (order > 0) { | 116 | if (order > 0) { |
117 | struct page *rpage = virt_to_page(page); | 117 | struct page *rpage = virt_to_page(page); |
118 | 118 | split_page(rpage, order); | |
119 | for (i = 1; i < (1 << order); i++) | ||
120 | set_page_count(rpage + i, 1); | ||
121 | } | 119 | } |
122 | 120 | ||
123 | err = 0; | 121 | err = 0; |
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c index 765088ea8a50..8899aa1a4f06 100644 --- a/arch/frv/mm/init.c +++ b/arch/frv/mm/init.c | |||
@@ -169,7 +169,7 @@ void __init mem_init(void) | |||
169 | struct page *page = &mem_map[pfn]; | 169 | struct page *page = &mem_map[pfn]; |
170 | 170 | ||
171 | ClearPageReserved(page); | 171 | ClearPageReserved(page); |
172 | set_page_count(page, 1); | 172 | init_page_count(page); |
173 | __free_page(page); | 173 | __free_page(page); |
174 | totalram_pages++; | 174 | totalram_pages++; |
175 | } | 175 | } |
@@ -210,7 +210,7 @@ void __init free_initmem(void) | |||
210 | /* next to check that the page we free is not a partial page */ | 210 | /* next to check that the page we free is not a partial page */ |
211 | for (addr = start; addr < end; addr += PAGE_SIZE) { | 211 | for (addr = start; addr < end; addr += PAGE_SIZE) { |
212 | ClearPageReserved(virt_to_page(addr)); | 212 | ClearPageReserved(virt_to_page(addr)); |
213 | set_page_count(virt_to_page(addr), 1); | 213 | init_page_count(virt_to_page(addr)); |
214 | free_page(addr); | 214 | free_page(addr); |
215 | totalram_pages++; | 215 | totalram_pages++; |
216 | } | 216 | } |
@@ -230,7 +230,7 @@ void __init free_initrd_mem(unsigned long start, unsigned long end) | |||
230 | int pages = 0; | 230 | int pages = 0; |
231 | for (; start < end; start += PAGE_SIZE) { | 231 | for (; start < end; start += PAGE_SIZE) { |
232 | ClearPageReserved(virt_to_page(start)); | 232 | ClearPageReserved(virt_to_page(start)); |
233 | set_page_count(virt_to_page(start), 1); | 233 | init_page_count(virt_to_page(start)); |
234 | free_page(start); | 234 | free_page(start); |
235 | totalram_pages++; | 235 | totalram_pages++; |
236 | pages++; | 236 | pages++; |
diff --git a/arch/h8300/kernel/h8300_ksyms.c b/arch/h8300/kernel/h8300_ksyms.c index 5cc76efaf7aa..69d6ad32d56c 100644 --- a/arch/h8300/kernel/h8300_ksyms.c +++ b/arch/h8300/kernel/h8300_ksyms.c | |||
@@ -25,6 +25,7 @@ extern char h8300_debug_device[]; | |||
25 | /* platform dependent support */ | 25 | /* platform dependent support */ |
26 | 26 | ||
27 | EXPORT_SYMBOL(strnlen); | 27 | EXPORT_SYMBOL(strnlen); |
28 | EXPORT_SYMBOL(strpbrk); | ||
28 | EXPORT_SYMBOL(strrchr); | 29 | EXPORT_SYMBOL(strrchr); |
29 | EXPORT_SYMBOL(strstr); | 30 | EXPORT_SYMBOL(strstr); |
30 | EXPORT_SYMBOL(strchr); | 31 | EXPORT_SYMBOL(strchr); |
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index dd344f112cfe..16ccddc69c2b 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c | |||
@@ -54,7 +54,7 @@ asmlinkage void ret_from_fork(void); | |||
54 | * The idle loop on an H8/300.. | 54 | * The idle loop on an H8/300.. |
55 | */ | 55 | */ |
56 | #if !defined(CONFIG_H8300H_SIM) && !defined(CONFIG_H8S_SIM) | 56 | #if !defined(CONFIG_H8300H_SIM) && !defined(CONFIG_H8S_SIM) |
57 | void default_idle(void) | 57 | static void default_idle(void) |
58 | { | 58 | { |
59 | local_irq_disable(); | 59 | local_irq_disable(); |
60 | if (!need_resched()) { | 60 | if (!need_resched()) { |
@@ -65,7 +65,7 @@ void default_idle(void) | |||
65 | local_irq_enable(); | 65 | local_irq_enable(); |
66 | } | 66 | } |
67 | #else | 67 | #else |
68 | void default_idle(void) | 68 | static void default_idle(void) |
69 | { | 69 | { |
70 | cpu_relax(); | 70 | cpu_relax(); |
71 | } | 71 | } |
diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c index 1e0929ddc8c4..09efc4b1f038 100644 --- a/arch/h8300/mm/init.c +++ b/arch/h8300/mm/init.c | |||
@@ -196,7 +196,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
196 | int pages = 0; | 196 | int pages = 0; |
197 | for (; start < end; start += PAGE_SIZE) { | 197 | for (; start < end; start += PAGE_SIZE) { |
198 | ClearPageReserved(virt_to_page(start)); | 198 | ClearPageReserved(virt_to_page(start)); |
199 | set_page_count(virt_to_page(start), 1); | 199 | init_page_count(virt_to_page(start)); |
200 | free_page(start); | 200 | free_page(start); |
201 | totalram_pages++; | 201 | totalram_pages++; |
202 | pages++; | 202 | pages++; |
@@ -219,7 +219,7 @@ free_initmem() | |||
219 | /* next to check that the page we free is not a partial page */ | 219 | /* next to check that the page we free is not a partial page */ |
220 | for (; addr + PAGE_SIZE < (unsigned long)(&__init_end); addr +=PAGE_SIZE) { | 220 | for (; addr + PAGE_SIZE < (unsigned long)(&__init_end); addr +=PAGE_SIZE) { |
221 | ClearPageReserved(virt_to_page(addr)); | 221 | ClearPageReserved(virt_to_page(addr)); |
222 | set_page_count(virt_to_page(addr), 1); | 222 | init_page_count(virt_to_page(addr)); |
223 | free_page(addr); | 223 | free_page(addr); |
224 | totalram_pages++; | 224 | totalram_pages++; |
225 | } | 225 | } |
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 5b1a7d46d1d9..b008fb0cd7b7 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -80,6 +80,7 @@ config X86_VOYAGER | |||
80 | 80 | ||
81 | config X86_NUMAQ | 81 | config X86_NUMAQ |
82 | bool "NUMAQ (IBM/Sequent)" | 82 | bool "NUMAQ (IBM/Sequent)" |
83 | select SMP | ||
83 | select NUMA | 84 | select NUMA |
84 | help | 85 | help |
85 | This option is used for getting Linux to run on a (IBM/Sequent) NUMA | 86 | This option is used for getting Linux to run on a (IBM/Sequent) NUMA |
@@ -400,6 +401,7 @@ choice | |||
400 | 401 | ||
401 | config NOHIGHMEM | 402 | config NOHIGHMEM |
402 | bool "off" | 403 | bool "off" |
404 | depends on !X86_NUMAQ | ||
403 | ---help--- | 405 | ---help--- |
404 | Linux can use up to 64 Gigabytes of physical memory on x86 systems. | 406 | Linux can use up to 64 Gigabytes of physical memory on x86 systems. |
405 | However, the address space of 32-bit x86 processors is only 4 | 407 | However, the address space of 32-bit x86 processors is only 4 |
@@ -436,6 +438,7 @@ config NOHIGHMEM | |||
436 | 438 | ||
437 | config HIGHMEM4G | 439 | config HIGHMEM4G |
438 | bool "4GB" | 440 | bool "4GB" |
441 | depends on !X86_NUMAQ | ||
439 | help | 442 | help |
440 | Select this if you have a 32-bit processor and between 1 and 4 | 443 | Select this if you have a 32-bit processor and between 1 and 4 |
441 | gigabytes of physical RAM. | 444 | gigabytes of physical RAM. |
@@ -503,10 +506,6 @@ config NUMA | |||
503 | default n if X86_PC | 506 | default n if X86_PC |
504 | default y if (X86_NUMAQ || X86_SUMMIT) | 507 | default y if (X86_NUMAQ || X86_SUMMIT) |
505 | 508 | ||
506 | # Need comments to help the hapless user trying to turn on NUMA support | ||
507 | comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support" | ||
508 | depends on X86_NUMAQ && (!HIGHMEM64G || !SMP) | ||
509 | |||
510 | comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" | 509 | comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" |
511 | depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) | 510 | depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) |
512 | 511 | ||
@@ -660,13 +659,18 @@ config BOOT_IOREMAP | |||
660 | default y | 659 | default y |
661 | 660 | ||
662 | config REGPARM | 661 | config REGPARM |
663 | bool "Use register arguments (EXPERIMENTAL)" | 662 | bool "Use register arguments" |
664 | depends on EXPERIMENTAL | 663 | default y |
665 | default n | ||
666 | help | 664 | help |
667 | Compile the kernel with -mregparm=3. This uses a different ABI | 665 | Compile the kernel with -mregparm=3. This instructs gcc to use |
668 | and passes the first three arguments of a function call in registers. | 666 | a more efficient function call ABI which passes the first three |
669 | This will probably break binary only modules. | 667 | arguments of a function call via registers, which results in denser |
668 | and faster code. | ||
669 | |||
670 | If this option is disabled, then the default ABI of passing | ||
671 | arguments via the stack is used. | ||
672 | |||
673 | If unsure, say Y. | ||
670 | 674 | ||
671 | config SECCOMP | 675 | config SECCOMP |
672 | bool "Enable seccomp to safely compute untrusted bytecode" | 676 | bool "Enable seccomp to safely compute untrusted bytecode" |
@@ -733,7 +737,7 @@ config PHYSICAL_START | |||
733 | 737 | ||
734 | config HOTPLUG_CPU | 738 | config HOTPLUG_CPU |
735 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" | 739 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" |
736 | depends on SMP && HOTPLUG && EXPERIMENTAL && !X86_VOYAGER | 740 | depends on SMP && HOTPLUG && EXPERIMENTAL && !X86_VOYAGER && !X86_PC |
737 | ---help--- | 741 | ---help--- |
738 | Say Y here to experiment with turning CPUs off and on. CPUs | 742 | Say Y here to experiment with turning CPUs off and on. CPUs |
739 | can be controlled through /sys/devices/system/cpu. | 743 | can be controlled through /sys/devices/system/cpu. |
diff --git a/arch/i386/Kconfig.debug b/arch/i386/Kconfig.debug index bf32ecc9ad04..6e97df6979e8 100644 --- a/arch/i386/Kconfig.debug +++ b/arch/i386/Kconfig.debug | |||
@@ -31,12 +31,21 @@ config DEBUG_STACK_USAGE | |||
31 | 31 | ||
32 | This option will slow down process creation somewhat. | 32 | This option will slow down process creation somewhat. |
33 | 33 | ||
34 | config STACK_BACKTRACE_COLS | ||
35 | int "Stack backtraces per line" if DEBUG_KERNEL | ||
36 | range 1 3 | ||
37 | default 2 | ||
38 | help | ||
39 | Selects how many stack backtrace entries per line to display. | ||
40 | |||
41 | This can save screen space when displaying traces. | ||
42 | |||
34 | comment "Page alloc debug is incompatible with Software Suspend on i386" | 43 | comment "Page alloc debug is incompatible with Software Suspend on i386" |
35 | depends on DEBUG_KERNEL && SOFTWARE_SUSPEND | 44 | depends on DEBUG_KERNEL && SOFTWARE_SUSPEND |
36 | 45 | ||
37 | config DEBUG_PAGEALLOC | 46 | config DEBUG_PAGEALLOC |
38 | bool "Page alloc debugging" | 47 | bool "Debug page memory allocations" |
39 | depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND | 48 | depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND && !HUGETLBFS |
40 | help | 49 | help |
41 | Unmap pages from the kernel linear mapping after free_pages(). | 50 | Unmap pages from the kernel linear mapping after free_pages(). |
42 | This results in a large slowdown, but helps to find certain types | 51 | This results in a large slowdown, but helps to find certain types |
diff --git a/arch/i386/Makefile b/arch/i386/Makefile index 36bef6543ac1..c848a5b30391 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile | |||
@@ -39,6 +39,9 @@ include $(srctree)/arch/i386/Makefile.cpu | |||
39 | 39 | ||
40 | cflags-$(CONFIG_REGPARM) += -mregparm=3 | 40 | cflags-$(CONFIG_REGPARM) += -mregparm=3 |
41 | 41 | ||
42 | # temporary until string.h is fixed | ||
43 | cflags-y += -ffreestanding | ||
44 | |||
42 | # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use | 45 | # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use |
43 | # a lot more stack due to the lack of sharing of stacklots: | 46 | # a lot more stack due to the lack of sharing of stacklots: |
44 | CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) | 47 | CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) |
@@ -99,8 +102,8 @@ AFLAGS += $(mflags-y) | |||
99 | 102 | ||
100 | boot := arch/i386/boot | 103 | boot := arch/i386/boot |
101 | 104 | ||
102 | .PHONY: zImage bzImage compressed zlilo bzlilo \ | 105 | PHONY += zImage bzImage compressed zlilo bzlilo \ |
103 | zdisk bzdisk fdimage fdimage144 fdimage288 install | 106 | zdisk bzdisk fdimage fdimage144 fdimage288 install |
104 | 107 | ||
105 | all: bzImage | 108 | all: bzImage |
106 | 109 | ||
diff --git a/arch/i386/Makefile.cpu b/arch/i386/Makefile.cpu index dcd936ef45db..a11befba26d5 100644 --- a/arch/i386/Makefile.cpu +++ b/arch/i386/Makefile.cpu | |||
@@ -39,3 +39,7 @@ cflags-$(CONFIG_X86_ELAN) += -march=i486 | |||
39 | # Geode GX1 support | 39 | # Geode GX1 support |
40 | cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx | 40 | cflags-$(CONFIG_MGEODEGX1) += -march=pentium-mmx |
41 | 41 | ||
42 | # add at the end to overwrite eventual tuning options from earlier | ||
43 | # cpu entries | ||
44 | cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic) | ||
45 | |||
diff --git a/arch/i386/boot/edd.S b/arch/i386/boot/edd.S index d8d69f2b911d..4b84ea216f2b 100644 --- a/arch/i386/boot/edd.S +++ b/arch/i386/boot/edd.S | |||
@@ -76,6 +76,8 @@ edd_mbr_sig_read: | |||
76 | popw %es | 76 | popw %es |
77 | popw %bx | 77 | popw %bx |
78 | jc edd_mbr_sig_done # on failure, we're done. | 78 | jc edd_mbr_sig_done # on failure, we're done. |
79 | cmpb $0, %ah # some BIOSes do not set CF | ||
80 | jne edd_mbr_sig_done # on failure, we're done. | ||
79 | movl (EDDBUF+EDD_MBR_SIG_OFFSET), %eax # read sig out of the MBR | 81 | movl (EDDBUF+EDD_MBR_SIG_OFFSET), %eax # read sig out of the MBR |
80 | movl %eax, (%bx) # store success | 82 | movl %eax, (%bx) # store success |
81 | incb (EDD_MBR_SIG_NR_BUF) # note that we stored something | 83 | incb (EDD_MBR_SIG_NR_BUF) # note that we stored something |
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index 65656c033d70..5b9ed21216cf 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile | |||
@@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds | |||
7 | obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ | 7 | obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ |
8 | ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ | 8 | ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ |
9 | pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ | 9 | pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ |
10 | quirks.o i8237.o topology.o | 10 | quirks.o i8237.o topology.o alternative.o |
11 | 11 | ||
12 | obj-y += cpu/ | 12 | obj-y += cpu/ |
13 | obj-y += timers/ | 13 | obj-y += timers/ |
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c new file mode 100644 index 000000000000..5cbd6f99fb2a --- /dev/null +++ b/arch/i386/kernel/alternative.c | |||
@@ -0,0 +1,321 @@ | |||
1 | #include <linux/module.h> | ||
2 | #include <linux/spinlock.h> | ||
3 | #include <linux/list.h> | ||
4 | #include <asm/alternative.h> | ||
5 | #include <asm/sections.h> | ||
6 | |||
7 | #define DEBUG 0 | ||
8 | #if DEBUG | ||
9 | # define DPRINTK(fmt, args...) printk(fmt, args) | ||
10 | #else | ||
11 | # define DPRINTK(fmt, args...) | ||
12 | #endif | ||
13 | |||
14 | /* Use inline assembly to define this because the nops are defined | ||
15 | as inline assembly strings in the include files and we cannot | ||
16 | get them easily into strings. */ | ||
17 | asm("\t.data\nintelnops: " | ||
18 | GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6 | ||
19 | GENERIC_NOP7 GENERIC_NOP8); | ||
20 | asm("\t.data\nk8nops: " | ||
21 | K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6 | ||
22 | K8_NOP7 K8_NOP8); | ||
23 | asm("\t.data\nk7nops: " | ||
24 | K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6 | ||
25 | K7_NOP7 K7_NOP8); | ||
26 | |||
27 | extern unsigned char intelnops[], k8nops[], k7nops[]; | ||
28 | static unsigned char *intel_nops[ASM_NOP_MAX+1] = { | ||
29 | NULL, | ||
30 | intelnops, | ||
31 | intelnops + 1, | ||
32 | intelnops + 1 + 2, | ||
33 | intelnops + 1 + 2 + 3, | ||
34 | intelnops + 1 + 2 + 3 + 4, | ||
35 | intelnops + 1 + 2 + 3 + 4 + 5, | ||
36 | intelnops + 1 + 2 + 3 + 4 + 5 + 6, | ||
37 | intelnops + 1 + 2 + 3 + 4 + 5 + 6 + 7, | ||
38 | }; | ||
39 | static unsigned char *k8_nops[ASM_NOP_MAX+1] = { | ||
40 | NULL, | ||
41 | k8nops, | ||
42 | k8nops + 1, | ||
43 | k8nops + 1 + 2, | ||
44 | k8nops + 1 + 2 + 3, | ||
45 | k8nops + 1 + 2 + 3 + 4, | ||
46 | k8nops + 1 + 2 + 3 + 4 + 5, | ||
47 | k8nops + 1 + 2 + 3 + 4 + 5 + 6, | ||
48 | k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7, | ||
49 | }; | ||
50 | static unsigned char *k7_nops[ASM_NOP_MAX+1] = { | ||
51 | NULL, | ||
52 | k7nops, | ||
53 | k7nops + 1, | ||
54 | k7nops + 1 + 2, | ||
55 | k7nops + 1 + 2 + 3, | ||
56 | k7nops + 1 + 2 + 3 + 4, | ||
57 | k7nops + 1 + 2 + 3 + 4 + 5, | ||
58 | k7nops + 1 + 2 + 3 + 4 + 5 + 6, | ||
59 | k7nops + 1 + 2 + 3 + 4 + 5 + 6 + 7, | ||
60 | }; | ||
61 | static struct nop { | ||
62 | int cpuid; | ||
63 | unsigned char **noptable; | ||
64 | } noptypes[] = { | ||
65 | { X86_FEATURE_K8, k8_nops }, | ||
66 | { X86_FEATURE_K7, k7_nops }, | ||
67 | { -1, NULL } | ||
68 | }; | ||
69 | |||
70 | |||
71 | extern struct alt_instr __alt_instructions[], __alt_instructions_end[]; | ||
72 | extern struct alt_instr __smp_alt_instructions[], __smp_alt_instructions_end[]; | ||
73 | extern u8 *__smp_locks[], *__smp_locks_end[]; | ||
74 | |||
75 | extern u8 __smp_alt_begin[], __smp_alt_end[]; | ||
76 | |||
77 | |||
78 | static unsigned char** find_nop_table(void) | ||
79 | { | ||
80 | unsigned char **noptable = intel_nops; | ||
81 | int i; | ||
82 | |||
83 | for (i = 0; noptypes[i].cpuid >= 0; i++) { | ||
84 | if (boot_cpu_has(noptypes[i].cpuid)) { | ||
85 | noptable = noptypes[i].noptable; | ||
86 | break; | ||
87 | } | ||
88 | } | ||
89 | return noptable; | ||
90 | } | ||
91 | |||
92 | /* Replace instructions with better alternatives for this CPU type. | ||
93 | This runs before SMP is initialized to avoid SMP problems with | ||
94 | self modifying code. This implies that assymetric systems where | ||
95 | APs have less capabilities than the boot processor are not handled. | ||
96 | Tough. Make sure you disable such features by hand. */ | ||
97 | |||
98 | void apply_alternatives(struct alt_instr *start, struct alt_instr *end) | ||
99 | { | ||
100 | unsigned char **noptable = find_nop_table(); | ||
101 | struct alt_instr *a; | ||
102 | int diff, i, k; | ||
103 | |||
104 | DPRINTK("%s: alt table %p -> %p\n", __FUNCTION__, start, end); | ||
105 | for (a = start; a < end; a++) { | ||
106 | BUG_ON(a->replacementlen > a->instrlen); | ||
107 | if (!boot_cpu_has(a->cpuid)) | ||
108 | continue; | ||
109 | memcpy(a->instr, a->replacement, a->replacementlen); | ||
110 | diff = a->instrlen - a->replacementlen; | ||
111 | /* Pad the rest with nops */ | ||
112 | for (i = a->replacementlen; diff > 0; diff -= k, i += k) { | ||
113 | k = diff; | ||
114 | if (k > ASM_NOP_MAX) | ||
115 | k = ASM_NOP_MAX; | ||
116 | memcpy(a->instr + i, noptable[k], k); | ||
117 | } | ||
118 | } | ||
119 | } | ||
120 | |||
121 | static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end) | ||
122 | { | ||
123 | struct alt_instr *a; | ||
124 | |||
125 | DPRINTK("%s: alt table %p-%p\n", __FUNCTION__, start, end); | ||
126 | for (a = start; a < end; a++) { | ||
127 | memcpy(a->replacement + a->replacementlen, | ||
128 | a->instr, | ||
129 | a->instrlen); | ||
130 | } | ||
131 | } | ||
132 | |||
133 | static void alternatives_smp_apply(struct alt_instr *start, struct alt_instr *end) | ||
134 | { | ||
135 | struct alt_instr *a; | ||
136 | |||
137 | for (a = start; a < end; a++) { | ||
138 | memcpy(a->instr, | ||
139 | a->replacement + a->replacementlen, | ||
140 | a->instrlen); | ||
141 | } | ||
142 | } | ||
143 | |||
144 | static void alternatives_smp_lock(u8 **start, u8 **end, u8 *text, u8 *text_end) | ||
145 | { | ||
146 | u8 **ptr; | ||
147 | |||
148 | for (ptr = start; ptr < end; ptr++) { | ||
149 | if (*ptr < text) | ||
150 | continue; | ||
151 | if (*ptr > text_end) | ||
152 | continue; | ||
153 | **ptr = 0xf0; /* lock prefix */ | ||
154 | }; | ||
155 | } | ||
156 | |||
157 | static void alternatives_smp_unlock(u8 **start, u8 **end, u8 *text, u8 *text_end) | ||
158 | { | ||
159 | unsigned char **noptable = find_nop_table(); | ||
160 | u8 **ptr; | ||
161 | |||
162 | for (ptr = start; ptr < end; ptr++) { | ||
163 | if (*ptr < text) | ||
164 | continue; | ||
165 | if (*ptr > text_end) | ||
166 | continue; | ||
167 | **ptr = noptable[1][0]; | ||
168 | }; | ||
169 | } | ||
170 | |||
171 | struct smp_alt_module { | ||
172 | /* what is this ??? */ | ||
173 | struct module *mod; | ||
174 | char *name; | ||
175 | |||
176 | /* ptrs to lock prefixes */ | ||
177 | u8 **locks; | ||
178 | u8 **locks_end; | ||
179 | |||
180 | /* .text segment, needed to avoid patching init code ;) */ | ||
181 | u8 *text; | ||
182 | u8 *text_end; | ||
183 | |||
184 | struct list_head next; | ||
185 | }; | ||
186 | static LIST_HEAD(smp_alt_modules); | ||
187 | static DEFINE_SPINLOCK(smp_alt); | ||
188 | |||
189 | static int smp_alt_once = 0; | ||
190 | static int __init bootonly(char *str) | ||
191 | { | ||
192 | smp_alt_once = 1; | ||
193 | return 1; | ||
194 | } | ||
195 | __setup("smp-alt-boot", bootonly); | ||
196 | |||
197 | void alternatives_smp_module_add(struct module *mod, char *name, | ||
198 | void *locks, void *locks_end, | ||
199 | void *text, void *text_end) | ||
200 | { | ||
201 | struct smp_alt_module *smp; | ||
202 | unsigned long flags; | ||
203 | |||
204 | if (smp_alt_once) { | ||
205 | if (boot_cpu_has(X86_FEATURE_UP)) | ||
206 | alternatives_smp_unlock(locks, locks_end, | ||
207 | text, text_end); | ||
208 | return; | ||
209 | } | ||
210 | |||
211 | smp = kzalloc(sizeof(*smp), GFP_KERNEL); | ||
212 | if (NULL == smp) | ||
213 | return; /* we'll run the (safe but slow) SMP code then ... */ | ||
214 | |||
215 | smp->mod = mod; | ||
216 | smp->name = name; | ||
217 | smp->locks = locks; | ||
218 | smp->locks_end = locks_end; | ||
219 | smp->text = text; | ||
220 | smp->text_end = text_end; | ||
221 | DPRINTK("%s: locks %p -> %p, text %p -> %p, name %s\n", | ||
222 | __FUNCTION__, smp->locks, smp->locks_end, | ||
223 | smp->text, smp->text_end, smp->name); | ||
224 | |||
225 | spin_lock_irqsave(&smp_alt, flags); | ||
226 | list_add_tail(&smp->next, &smp_alt_modules); | ||
227 | if (boot_cpu_has(X86_FEATURE_UP)) | ||
228 | alternatives_smp_unlock(smp->locks, smp->locks_end, | ||
229 | smp->text, smp->text_end); | ||
230 | spin_unlock_irqrestore(&smp_alt, flags); | ||
231 | } | ||
232 | |||
233 | void alternatives_smp_module_del(struct module *mod) | ||
234 | { | ||
235 | struct smp_alt_module *item; | ||
236 | unsigned long flags; | ||
237 | |||
238 | if (smp_alt_once) | ||
239 | return; | ||
240 | |||
241 | spin_lock_irqsave(&smp_alt, flags); | ||
242 | list_for_each_entry(item, &smp_alt_modules, next) { | ||
243 | if (mod != item->mod) | ||
244 | continue; | ||
245 | list_del(&item->next); | ||
246 | spin_unlock_irqrestore(&smp_alt, flags); | ||
247 | DPRINTK("%s: %s\n", __FUNCTION__, item->name); | ||
248 | kfree(item); | ||
249 | return; | ||
250 | } | ||
251 | spin_unlock_irqrestore(&smp_alt, flags); | ||
252 | } | ||
253 | |||
254 | void alternatives_smp_switch(int smp) | ||
255 | { | ||
256 | struct smp_alt_module *mod; | ||
257 | unsigned long flags; | ||
258 | |||
259 | if (smp_alt_once) | ||
260 | return; | ||
261 | BUG_ON(!smp && (num_online_cpus() > 1)); | ||
262 | |||
263 | spin_lock_irqsave(&smp_alt, flags); | ||
264 | if (smp) { | ||
265 | printk(KERN_INFO "SMP alternatives: switching to SMP code\n"); | ||
266 | clear_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); | ||
267 | clear_bit(X86_FEATURE_UP, cpu_data[0].x86_capability); | ||
268 | alternatives_smp_apply(__smp_alt_instructions, | ||
269 | __smp_alt_instructions_end); | ||
270 | list_for_each_entry(mod, &smp_alt_modules, next) | ||
271 | alternatives_smp_lock(mod->locks, mod->locks_end, | ||
272 | mod->text, mod->text_end); | ||
273 | } else { | ||
274 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); | ||
275 | set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); | ||
276 | set_bit(X86_FEATURE_UP, cpu_data[0].x86_capability); | ||
277 | apply_alternatives(__smp_alt_instructions, | ||
278 | __smp_alt_instructions_end); | ||
279 | list_for_each_entry(mod, &smp_alt_modules, next) | ||
280 | alternatives_smp_unlock(mod->locks, mod->locks_end, | ||
281 | mod->text, mod->text_end); | ||
282 | } | ||
283 | spin_unlock_irqrestore(&smp_alt, flags); | ||
284 | } | ||
285 | |||
286 | void __init alternative_instructions(void) | ||
287 | { | ||
288 | apply_alternatives(__alt_instructions, __alt_instructions_end); | ||
289 | |||
290 | /* switch to patch-once-at-boottime-only mode and free the | ||
291 | * tables in case we know the number of CPUs will never ever | ||
292 | * change */ | ||
293 | #ifdef CONFIG_HOTPLUG_CPU | ||
294 | if (num_possible_cpus() < 2) | ||
295 | smp_alt_once = 1; | ||
296 | #else | ||
297 | smp_alt_once = 1; | ||
298 | #endif | ||
299 | |||
300 | if (smp_alt_once) { | ||
301 | if (1 == num_possible_cpus()) { | ||
302 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); | ||
303 | set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); | ||
304 | set_bit(X86_FEATURE_UP, cpu_data[0].x86_capability); | ||
305 | apply_alternatives(__smp_alt_instructions, | ||
306 | __smp_alt_instructions_end); | ||
307 | alternatives_smp_unlock(__smp_locks, __smp_locks_end, | ||
308 | _text, _etext); | ||
309 | } | ||
310 | free_init_pages("SMP alternatives", | ||
311 | (unsigned long)__smp_alt_begin, | ||
312 | (unsigned long)__smp_alt_end); | ||
313 | } else { | ||
314 | alternatives_smp_save(__smp_alt_instructions, | ||
315 | __smp_alt_instructions_end); | ||
316 | alternatives_smp_module_add(NULL, "core kernel", | ||
317 | __smp_locks, __smp_locks_end, | ||
318 | _text, _etext); | ||
319 | alternatives_smp_switch(0); | ||
320 | } | ||
321 | } | ||
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 776c90989e06..eb5279d23b7f 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/i8253.h> | 38 | #include <asm/i8253.h> |
39 | 39 | ||
40 | #include <mach_apic.h> | 40 | #include <mach_apic.h> |
41 | #include <mach_apicdef.h> | ||
41 | #include <mach_ipi.h> | 42 | #include <mach_ipi.h> |
42 | 43 | ||
43 | #include "io_ports.h" | 44 | #include "io_ports.h" |
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index 05312a8abb8b..da30a374dd4e 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c | |||
@@ -824,8 +824,6 @@ static void apm_do_busy(void) | |||
824 | 824 | ||
825 | static void (*original_pm_idle)(void); | 825 | static void (*original_pm_idle)(void); |
826 | 826 | ||
827 | extern void default_idle(void); | ||
828 | |||
829 | /** | 827 | /** |
830 | * apm_cpu_idle - cpu idling for APM capable Linux | 828 | * apm_cpu_idle - cpu idling for APM capable Linux |
831 | * | 829 | * |
diff --git a/arch/i386/kernel/cpu/centaur.c b/arch/i386/kernel/cpu/centaur.c index f52669ecb93f..bd75629dd262 100644 --- a/arch/i386/kernel/cpu/centaur.c +++ b/arch/i386/kernel/cpu/centaur.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <asm/processor.h> | 4 | #include <asm/processor.h> |
5 | #include <asm/msr.h> | 5 | #include <asm/msr.h> |
6 | #include <asm/e820.h> | 6 | #include <asm/e820.h> |
7 | #include <asm/mtrr.h> | ||
7 | #include "cpu.h" | 8 | #include "cpu.h" |
8 | 9 | ||
9 | #ifdef CONFIG_X86_OOSTORE | 10 | #ifdef CONFIG_X86_OOSTORE |
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index e6bd095ae108..7e3d6b6a4e96 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
@@ -25,9 +25,10 @@ EXPORT_PER_CPU_SYMBOL(cpu_gdt_descr); | |||
25 | DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); | 25 | DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); |
26 | EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack); | 26 | EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack); |
27 | 27 | ||
28 | static int cachesize_override __devinitdata = -1; | 28 | static int cachesize_override __cpuinitdata = -1; |
29 | static int disable_x86_fxsr __devinitdata = 0; | 29 | static int disable_x86_fxsr __cpuinitdata; |
30 | static int disable_x86_serial_nr __devinitdata = 1; | 30 | static int disable_x86_serial_nr __cpuinitdata = 1; |
31 | static int disable_x86_sep __cpuinitdata; | ||
31 | 32 | ||
32 | struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; | 33 | struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; |
33 | 34 | ||
@@ -59,7 +60,7 @@ static int __init cachesize_setup(char *str) | |||
59 | } | 60 | } |
60 | __setup("cachesize=", cachesize_setup); | 61 | __setup("cachesize=", cachesize_setup); |
61 | 62 | ||
62 | int __devinit get_model_name(struct cpuinfo_x86 *c) | 63 | int __cpuinit get_model_name(struct cpuinfo_x86 *c) |
63 | { | 64 | { |
64 | unsigned int *v; | 65 | unsigned int *v; |
65 | char *p, *q; | 66 | char *p, *q; |
@@ -89,7 +90,7 @@ int __devinit get_model_name(struct cpuinfo_x86 *c) | |||
89 | } | 90 | } |
90 | 91 | ||
91 | 92 | ||
92 | void __devinit display_cacheinfo(struct cpuinfo_x86 *c) | 93 | void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c) |
93 | { | 94 | { |
94 | unsigned int n, dummy, ecx, edx, l2size; | 95 | unsigned int n, dummy, ecx, edx, l2size; |
95 | 96 | ||
@@ -130,7 +131,7 @@ void __devinit display_cacheinfo(struct cpuinfo_x86 *c) | |||
130 | /* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */ | 131 | /* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */ |
131 | 132 | ||
132 | /* Look up CPU names by table lookup. */ | 133 | /* Look up CPU names by table lookup. */ |
133 | static char __devinit *table_lookup_model(struct cpuinfo_x86 *c) | 134 | static char __cpuinit *table_lookup_model(struct cpuinfo_x86 *c) |
134 | { | 135 | { |
135 | struct cpu_model_info *info; | 136 | struct cpu_model_info *info; |
136 | 137 | ||
@@ -151,7 +152,7 @@ static char __devinit *table_lookup_model(struct cpuinfo_x86 *c) | |||
151 | } | 152 | } |
152 | 153 | ||
153 | 154 | ||
154 | static void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) | 155 | static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) |
155 | { | 156 | { |
156 | char *v = c->x86_vendor_id; | 157 | char *v = c->x86_vendor_id; |
157 | int i; | 158 | int i; |
@@ -187,6 +188,14 @@ static int __init x86_fxsr_setup(char * s) | |||
187 | __setup("nofxsr", x86_fxsr_setup); | 188 | __setup("nofxsr", x86_fxsr_setup); |
188 | 189 | ||
189 | 190 | ||
191 | static int __init x86_sep_setup(char * s) | ||
192 | { | ||
193 | disable_x86_sep = 1; | ||
194 | return 1; | ||
195 | } | ||
196 | __setup("nosep", x86_sep_setup); | ||
197 | |||
198 | |||
190 | /* Standard macro to see if a specific flag is changeable */ | 199 | /* Standard macro to see if a specific flag is changeable */ |
191 | static inline int flag_is_changeable_p(u32 flag) | 200 | static inline int flag_is_changeable_p(u32 flag) |
192 | { | 201 | { |
@@ -210,7 +219,7 @@ static inline int flag_is_changeable_p(u32 flag) | |||
210 | 219 | ||
211 | 220 | ||
212 | /* Probe for the CPUID instruction */ | 221 | /* Probe for the CPUID instruction */ |
213 | static int __devinit have_cpuid_p(void) | 222 | static int __cpuinit have_cpuid_p(void) |
214 | { | 223 | { |
215 | return flag_is_changeable_p(X86_EFLAGS_ID); | 224 | return flag_is_changeable_p(X86_EFLAGS_ID); |
216 | } | 225 | } |
@@ -254,7 +263,7 @@ static void __init early_cpu_detect(void) | |||
254 | } | 263 | } |
255 | } | 264 | } |
256 | 265 | ||
257 | void __devinit generic_identify(struct cpuinfo_x86 * c) | 266 | void __cpuinit generic_identify(struct cpuinfo_x86 * c) |
258 | { | 267 | { |
259 | u32 tfms, xlvl; | 268 | u32 tfms, xlvl; |
260 | int junk; | 269 | int junk; |
@@ -307,7 +316,7 @@ void __devinit generic_identify(struct cpuinfo_x86 * c) | |||
307 | #endif | 316 | #endif |
308 | } | 317 | } |
309 | 318 | ||
310 | static void __devinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c) | 319 | static void __cpuinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c) |
311 | { | 320 | { |
312 | if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr ) { | 321 | if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr ) { |
313 | /* Disable processor serial number */ | 322 | /* Disable processor serial number */ |
@@ -335,7 +344,7 @@ __setup("serialnumber", x86_serial_nr_setup); | |||
335 | /* | 344 | /* |
336 | * This does the hard work of actually picking apart the CPU stuff... | 345 | * This does the hard work of actually picking apart the CPU stuff... |
337 | */ | 346 | */ |
338 | void __devinit identify_cpu(struct cpuinfo_x86 *c) | 347 | void __cpuinit identify_cpu(struct cpuinfo_x86 *c) |
339 | { | 348 | { |
340 | int i; | 349 | int i; |
341 | 350 | ||
@@ -405,6 +414,10 @@ void __devinit identify_cpu(struct cpuinfo_x86 *c) | |||
405 | clear_bit(X86_FEATURE_XMM, c->x86_capability); | 414 | clear_bit(X86_FEATURE_XMM, c->x86_capability); |
406 | } | 415 | } |
407 | 416 | ||
417 | /* SEP disabled? */ | ||
418 | if (disable_x86_sep) | ||
419 | clear_bit(X86_FEATURE_SEP, c->x86_capability); | ||
420 | |||
408 | if (disable_pse) | 421 | if (disable_pse) |
409 | clear_bit(X86_FEATURE_PSE, c->x86_capability); | 422 | clear_bit(X86_FEATURE_PSE, c->x86_capability); |
410 | 423 | ||
@@ -417,7 +430,7 @@ void __devinit identify_cpu(struct cpuinfo_x86 *c) | |||
417 | else | 430 | else |
418 | /* Last resort... */ | 431 | /* Last resort... */ |
419 | sprintf(c->x86_model_id, "%02x/%02x", | 432 | sprintf(c->x86_model_id, "%02x/%02x", |
420 | c->x86_vendor, c->x86_model); | 433 | c->x86, c->x86_model); |
421 | } | 434 | } |
422 | 435 | ||
423 | /* Now the feature flags better reflect actual CPU features! */ | 436 | /* Now the feature flags better reflect actual CPU features! */ |
@@ -453,7 +466,7 @@ void __devinit identify_cpu(struct cpuinfo_x86 *c) | |||
453 | } | 466 | } |
454 | 467 | ||
455 | #ifdef CONFIG_X86_HT | 468 | #ifdef CONFIG_X86_HT |
456 | void __devinit detect_ht(struct cpuinfo_x86 *c) | 469 | void __cpuinit detect_ht(struct cpuinfo_x86 *c) |
457 | { | 470 | { |
458 | u32 eax, ebx, ecx, edx; | 471 | u32 eax, ebx, ecx, edx; |
459 | int index_msb, core_bits; | 472 | int index_msb, core_bits; |
@@ -500,7 +513,7 @@ void __devinit detect_ht(struct cpuinfo_x86 *c) | |||
500 | } | 513 | } |
501 | #endif | 514 | #endif |
502 | 515 | ||
503 | void __devinit print_cpu_info(struct cpuinfo_x86 *c) | 516 | void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) |
504 | { | 517 | { |
505 | char *vendor = NULL; | 518 | char *vendor = NULL; |
506 | 519 | ||
@@ -523,7 +536,7 @@ void __devinit print_cpu_info(struct cpuinfo_x86 *c) | |||
523 | printk("\n"); | 536 | printk("\n"); |
524 | } | 537 | } |
525 | 538 | ||
526 | cpumask_t cpu_initialized __devinitdata = CPU_MASK_NONE; | 539 | cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; |
527 | 540 | ||
528 | /* This is hacky. :) | 541 | /* This is hacky. :) |
529 | * We're emulating future behavior. | 542 | * We're emulating future behavior. |
@@ -570,7 +583,7 @@ void __init early_cpu_init(void) | |||
570 | * and IDT. We reload them nevertheless, this function acts as a | 583 | * and IDT. We reload them nevertheless, this function acts as a |
571 | * 'CPU state barrier', nothing should get across. | 584 | * 'CPU state barrier', nothing should get across. |
572 | */ | 585 | */ |
573 | void __devinit cpu_init(void) | 586 | void __cpuinit cpu_init(void) |
574 | { | 587 | { |
575 | int cpu = smp_processor_id(); | 588 | int cpu = smp_processor_id(); |
576 | struct tss_struct * t = &per_cpu(init_tss, cpu); | 589 | struct tss_struct * t = &per_cpu(init_tss, cpu); |
@@ -670,7 +683,7 @@ void __devinit cpu_init(void) | |||
670 | } | 683 | } |
671 | 684 | ||
672 | #ifdef CONFIG_HOTPLUG_CPU | 685 | #ifdef CONFIG_HOTPLUG_CPU |
673 | void __devinit cpu_uninit(void) | 686 | void __cpuinit cpu_uninit(void) |
674 | { | 687 | { |
675 | int cpu = raw_smp_processor_id(); | 688 | int cpu = raw_smp_processor_id(); |
676 | cpu_clear(cpu, cpu_initialized); | 689 | cpu_clear(cpu, cpu_initialized); |
diff --git a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig index 26892d2099b0..e44a4c6a4fe5 100644 --- a/arch/i386/kernel/cpu/cpufreq/Kconfig +++ b/arch/i386/kernel/cpu/cpufreq/Kconfig | |||
@@ -96,7 +96,6 @@ config X86_POWERNOW_K8_ACPI | |||
96 | 96 | ||
97 | config X86_GX_SUSPMOD | 97 | config X86_GX_SUSPMOD |
98 | tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" | 98 | tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" |
99 | depends on PCI | ||
100 | help | 99 | help |
101 | This add the CPUFreq driver for NatSemi Geode processors which | 100 | This add the CPUFreq driver for NatSemi Geode processors which |
102 | support suspend modulation. | 101 | support suspend modulation. |
@@ -115,9 +114,9 @@ config X86_SPEEDSTEP_CENTRINO | |||
115 | you also need to say Y to "Use ACPI tables to decode..." below | 114 | you also need to say Y to "Use ACPI tables to decode..." below |
116 | [which might imply enabling ACPI] if you want to use this driver | 115 | [which might imply enabling ACPI] if you want to use this driver |
117 | on non-Banias CPUs. | 116 | on non-Banias CPUs. |
118 | 117 | ||
119 | For details, take a look at <file:Documentation/cpu-freq/>. | 118 | For details, take a look at <file:Documentation/cpu-freq/>. |
120 | 119 | ||
121 | If in doubt, say N. | 120 | If in doubt, say N. |
122 | 121 | ||
123 | config X86_SPEEDSTEP_CENTRINO_ACPI | 122 | config X86_SPEEDSTEP_CENTRINO_ACPI |
@@ -148,7 +147,7 @@ config X86_SPEEDSTEP_ICH | |||
148 | help | 147 | help |
149 | This adds the CPUFreq driver for certain mobile Intel Pentium III | 148 | This adds the CPUFreq driver for certain mobile Intel Pentium III |
150 | (Coppermine), all mobile Intel Pentium III-M (Tualatin) and all | 149 | (Coppermine), all mobile Intel Pentium III-M (Tualatin) and all |
151 | mobile Intel Pentium 4 P4-M on systems which have an Intel ICH2, | 150 | mobile Intel Pentium 4 P4-M on systems which have an Intel ICH2, |
152 | ICH3 or ICH4 southbridge. | 151 | ICH3 or ICH4 southbridge. |
153 | 152 | ||
154 | For details, take a look at <file:Documentation/cpu-freq/>. | 153 | For details, take a look at <file:Documentation/cpu-freq/>. |
@@ -161,7 +160,7 @@ config X86_SPEEDSTEP_SMI | |||
161 | depends on EXPERIMENTAL | 160 | depends on EXPERIMENTAL |
162 | help | 161 | help |
163 | This adds the CPUFreq driver for certain mobile Intel Pentium III | 162 | This adds the CPUFreq driver for certain mobile Intel Pentium III |
164 | (Coppermine), all mobile Intel Pentium III-M (Tualatin) | 163 | (Coppermine), all mobile Intel Pentium III-M (Tualatin) |
165 | on systems which have an Intel 440BX/ZX/MX southbridge. | 164 | on systems which have an Intel 440BX/ZX/MX southbridge. |
166 | 165 | ||
167 | For details, take a look at <file:Documentation/cpu-freq/>. | 166 | For details, take a look at <file:Documentation/cpu-freq/>. |
@@ -203,9 +202,10 @@ config X86_LONGRUN | |||
203 | config X86_LONGHAUL | 202 | config X86_LONGHAUL |
204 | tristate "VIA Cyrix III Longhaul" | 203 | tristate "VIA Cyrix III Longhaul" |
205 | select CPU_FREQ_TABLE | 204 | select CPU_FREQ_TABLE |
205 | depends on BROKEN | ||
206 | help | 206 | help |
207 | This adds the CPUFreq driver for VIA Samuel/CyrixIII, | 207 | This adds the CPUFreq driver for VIA Samuel/CyrixIII, |
208 | VIA Cyrix Samuel/C3, VIA Cyrix Ezra and VIA Cyrix Ezra-T | 208 | VIA Cyrix Samuel/C3, VIA Cyrix Ezra and VIA Cyrix Ezra-T |
209 | processors. | 209 | processors. |
210 | 210 | ||
211 | For details, take a look at <file:Documentation/cpu-freq/>. | 211 | For details, take a look at <file:Documentation/cpu-freq/>. |
@@ -215,11 +215,11 @@ config X86_LONGHAUL | |||
215 | comment "shared options" | 215 | comment "shared options" |
216 | 216 | ||
217 | config X86_ACPI_CPUFREQ_PROC_INTF | 217 | config X86_ACPI_CPUFREQ_PROC_INTF |
218 | bool "/proc/acpi/processor/../performance interface (deprecated)" | 218 | bool "/proc/acpi/processor/../performance interface (deprecated)" |
219 | depends on PROC_FS | 219 | depends on PROC_FS |
220 | depends on X86_ACPI_CPUFREQ || X86_SPEEDSTEP_CENTRINO_ACPI || X86_POWERNOW_K7_ACPI || X86_POWERNOW_K8_ACPI | 220 | depends on X86_ACPI_CPUFREQ || X86_SPEEDSTEP_CENTRINO_ACPI || X86_POWERNOW_K7_ACPI || X86_POWERNOW_K8_ACPI |
221 | help | 221 | help |
222 | This enables the deprecated /proc/acpi/processor/../performance | 222 | This enables the deprecated /proc/acpi/processor/../performance |
223 | interface. While it is helpful for debugging, the generic, | 223 | interface. While it is helpful for debugging, the generic, |
224 | cross-architecture cpufreq interfaces should be used. | 224 | cross-architecture cpufreq interfaces should be used. |
225 | 225 | ||
@@ -233,9 +233,9 @@ config X86_SPEEDSTEP_RELAXED_CAP_CHECK | |||
233 | bool "Relaxed speedstep capability checks" | 233 | bool "Relaxed speedstep capability checks" |
234 | depends on (X86_SPEEDSTEP_SMI || X86_SPEEDSTEP_ICH) | 234 | depends on (X86_SPEEDSTEP_SMI || X86_SPEEDSTEP_ICH) |
235 | help | 235 | help |
236 | Don't perform all checks for a speedstep capable system which would | 236 | Don't perform all checks for a speedstep capable system which would |
237 | normally be done. Some ancient or strange systems, though speedstep | 237 | normally be done. Some ancient or strange systems, though speedstep |
238 | capable, don't always indicate that they are speedstep capable. This | 238 | capable, don't always indicate that they are speedstep capable. This |
239 | option lets the probing code bypass some of those checks if the | 239 | option lets the probing code bypass some of those checks if the |
240 | parameter "relaxed_check=1" is passed to the module. | 240 | parameter "relaxed_check=1" is passed to the module. |
241 | 241 | ||
diff --git a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c index 2b62dee35c6c..f275e0d4aee5 100644 --- a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c +++ b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c | |||
@@ -39,7 +39,7 @@ static struct pci_dev *nforce2_chipset_dev; | |||
39 | static int fid = 0; | 39 | static int fid = 0; |
40 | 40 | ||
41 | /* min_fsb, max_fsb: | 41 | /* min_fsb, max_fsb: |
42 | * minimum and maximum FSB (= FSB at boot time) | 42 | * minimum and maximum FSB (= FSB at boot time) |
43 | */ | 43 | */ |
44 | static int min_fsb = 0; | 44 | static int min_fsb = 0; |
45 | static int max_fsb = 0; | 45 | static int max_fsb = 0; |
@@ -57,10 +57,10 @@ MODULE_PARM_DESC(min_fsb, | |||
57 | 57 | ||
58 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "cpufreq-nforce2", msg) | 58 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "cpufreq-nforce2", msg) |
59 | 59 | ||
60 | /* | 60 | /** |
61 | * nforce2_calc_fsb - calculate FSB | 61 | * nforce2_calc_fsb - calculate FSB |
62 | * @pll: PLL value | 62 | * @pll: PLL value |
63 | * | 63 | * |
64 | * Calculates FSB from PLL value | 64 | * Calculates FSB from PLL value |
65 | */ | 65 | */ |
66 | static int nforce2_calc_fsb(int pll) | 66 | static int nforce2_calc_fsb(int pll) |
@@ -76,10 +76,10 @@ static int nforce2_calc_fsb(int pll) | |||
76 | return 0; | 76 | return 0; |
77 | } | 77 | } |
78 | 78 | ||
79 | /* | 79 | /** |
80 | * nforce2_calc_pll - calculate PLL value | 80 | * nforce2_calc_pll - calculate PLL value |
81 | * @fsb: FSB | 81 | * @fsb: FSB |
82 | * | 82 | * |
83 | * Calculate PLL value for given FSB | 83 | * Calculate PLL value for given FSB |
84 | */ | 84 | */ |
85 | static int nforce2_calc_pll(unsigned int fsb) | 85 | static int nforce2_calc_pll(unsigned int fsb) |
@@ -106,10 +106,10 @@ static int nforce2_calc_pll(unsigned int fsb) | |||
106 | return NFORCE2_PLL(mul, div); | 106 | return NFORCE2_PLL(mul, div); |
107 | } | 107 | } |
108 | 108 | ||
109 | /* | 109 | /** |
110 | * nforce2_write_pll - write PLL value to chipset | 110 | * nforce2_write_pll - write PLL value to chipset |
111 | * @pll: PLL value | 111 | * @pll: PLL value |
112 | * | 112 | * |
113 | * Writes new FSB PLL value to chipset | 113 | * Writes new FSB PLL value to chipset |
114 | */ | 114 | */ |
115 | static void nforce2_write_pll(int pll) | 115 | static void nforce2_write_pll(int pll) |
@@ -121,15 +121,13 @@ static void nforce2_write_pll(int pll) | |||
121 | pci_write_config_dword(nforce2_chipset_dev, NFORCE2_PLLADR, temp); | 121 | pci_write_config_dword(nforce2_chipset_dev, NFORCE2_PLLADR, temp); |
122 | 122 | ||
123 | /* Now write the value in all 64 registers */ | 123 | /* Now write the value in all 64 registers */ |
124 | for (temp = 0; temp <= 0x3f; temp++) { | 124 | for (temp = 0; temp <= 0x3f; temp++) |
125 | pci_write_config_dword(nforce2_chipset_dev, | 125 | pci_write_config_dword(nforce2_chipset_dev, NFORCE2_PLLREG, pll); |
126 | NFORCE2_PLLREG, pll); | ||
127 | } | ||
128 | 126 | ||
129 | return; | 127 | return; |
130 | } | 128 | } |
131 | 129 | ||
132 | /* | 130 | /** |
133 | * nforce2_fsb_read - Read FSB | 131 | * nforce2_fsb_read - Read FSB |
134 | * | 132 | * |
135 | * Read FSB from chipset | 133 | * Read FSB from chipset |
@@ -140,39 +138,32 @@ static unsigned int nforce2_fsb_read(int bootfsb) | |||
140 | struct pci_dev *nforce2_sub5; | 138 | struct pci_dev *nforce2_sub5; |
141 | u32 fsb, temp = 0; | 139 | u32 fsb, temp = 0; |
142 | 140 | ||
143 | |||
144 | /* Get chipset boot FSB from subdevice 5 (FSB at boot-time) */ | 141 | /* Get chipset boot FSB from subdevice 5 (FSB at boot-time) */ |
145 | nforce2_sub5 = pci_get_subsys(PCI_VENDOR_ID_NVIDIA, | 142 | nforce2_sub5 = pci_get_subsys(PCI_VENDOR_ID_NVIDIA, |
146 | 0x01EF, | 143 | 0x01EF,PCI_ANY_ID,PCI_ANY_ID,NULL); |
147 | PCI_ANY_ID, | ||
148 | PCI_ANY_ID, | ||
149 | NULL); | ||
150 | |||
151 | if (!nforce2_sub5) | 144 | if (!nforce2_sub5) |
152 | return 0; | 145 | return 0; |
153 | 146 | ||
154 | pci_read_config_dword(nforce2_sub5, NFORCE2_BOOTFSB, &fsb); | 147 | pci_read_config_dword(nforce2_sub5, NFORCE2_BOOTFSB, &fsb); |
155 | fsb /= 1000000; | 148 | fsb /= 1000000; |
156 | 149 | ||
157 | /* Check if PLL register is already set */ | 150 | /* Check if PLL register is already set */ |
158 | pci_read_config_byte(nforce2_chipset_dev, | 151 | pci_read_config_byte(nforce2_chipset_dev,NFORCE2_PLLENABLE, (u8 *)&temp); |
159 | NFORCE2_PLLENABLE, (u8 *)&temp); | 152 | |
160 | |||
161 | if(bootfsb || !temp) | 153 | if(bootfsb || !temp) |
162 | return fsb; | 154 | return fsb; |
163 | 155 | ||
164 | /* Use PLL register FSB value */ | 156 | /* Use PLL register FSB value */ |
165 | pci_read_config_dword(nforce2_chipset_dev, | 157 | pci_read_config_dword(nforce2_chipset_dev,NFORCE2_PLLREG, &temp); |
166 | NFORCE2_PLLREG, &temp); | ||
167 | fsb = nforce2_calc_fsb(temp); | 158 | fsb = nforce2_calc_fsb(temp); |
168 | 159 | ||
169 | return fsb; | 160 | return fsb; |
170 | } | 161 | } |
171 | 162 | ||
172 | /* | 163 | /** |
173 | * nforce2_set_fsb - set new FSB | 164 | * nforce2_set_fsb - set new FSB |
174 | * @fsb: New FSB | 165 | * @fsb: New FSB |
175 | * | 166 | * |
176 | * Sets new FSB | 167 | * Sets new FSB |
177 | */ | 168 | */ |
178 | static int nforce2_set_fsb(unsigned int fsb) | 169 | static int nforce2_set_fsb(unsigned int fsb) |
@@ -186,7 +177,7 @@ static int nforce2_set_fsb(unsigned int fsb) | |||
186 | printk(KERN_ERR "cpufreq: FSB %d is out of range!\n", fsb); | 177 | printk(KERN_ERR "cpufreq: FSB %d is out of range!\n", fsb); |
187 | return -EINVAL; | 178 | return -EINVAL; |
188 | } | 179 | } |
189 | 180 | ||
190 | tfsb = nforce2_fsb_read(0); | 181 | tfsb = nforce2_fsb_read(0); |
191 | if (!tfsb) { | 182 | if (!tfsb) { |
192 | printk(KERN_ERR "cpufreq: Error while reading the FSB\n"); | 183 | printk(KERN_ERR "cpufreq: Error while reading the FSB\n"); |
@@ -194,8 +185,7 @@ static int nforce2_set_fsb(unsigned int fsb) | |||
194 | } | 185 | } |
195 | 186 | ||
196 | /* First write? Then set actual value */ | 187 | /* First write? Then set actual value */ |
197 | pci_read_config_byte(nforce2_chipset_dev, | 188 | pci_read_config_byte(nforce2_chipset_dev,NFORCE2_PLLENABLE, (u8 *)&temp); |
198 | NFORCE2_PLLENABLE, (u8 *)&temp); | ||
199 | if (!temp) { | 189 | if (!temp) { |
200 | pll = nforce2_calc_pll(tfsb); | 190 | pll = nforce2_calc_pll(tfsb); |
201 | 191 | ||
@@ -223,7 +213,7 @@ static int nforce2_set_fsb(unsigned int fsb) | |||
223 | /* Calculate the PLL reg. value */ | 213 | /* Calculate the PLL reg. value */ |
224 | if ((pll = nforce2_calc_pll(tfsb)) == -1) | 214 | if ((pll = nforce2_calc_pll(tfsb)) == -1) |
225 | return -EINVAL; | 215 | return -EINVAL; |
226 | 216 | ||
227 | nforce2_write_pll(pll); | 217 | nforce2_write_pll(pll); |
228 | #ifdef NFORCE2_DELAY | 218 | #ifdef NFORCE2_DELAY |
229 | mdelay(NFORCE2_DELAY); | 219 | mdelay(NFORCE2_DELAY); |
@@ -239,7 +229,7 @@ static int nforce2_set_fsb(unsigned int fsb) | |||
239 | /** | 229 | /** |
240 | * nforce2_get - get the CPU frequency | 230 | * nforce2_get - get the CPU frequency |
241 | * @cpu: CPU number | 231 | * @cpu: CPU number |
242 | * | 232 | * |
243 | * Returns the CPU frequency | 233 | * Returns the CPU frequency |
244 | */ | 234 | */ |
245 | static unsigned int nforce2_get(unsigned int cpu) | 235 | static unsigned int nforce2_get(unsigned int cpu) |
@@ -354,10 +344,10 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy) | |||
354 | 344 | ||
355 | printk(KERN_INFO "cpufreq: FSB currently at %i MHz, FID %d.%d\n", fsb, | 345 | printk(KERN_INFO "cpufreq: FSB currently at %i MHz, FID %d.%d\n", fsb, |
356 | fid / 10, fid % 10); | 346 | fid / 10, fid % 10); |
357 | 347 | ||
358 | /* Set maximum FSB to FSB at boot time */ | 348 | /* Set maximum FSB to FSB at boot time */ |
359 | max_fsb = nforce2_fsb_read(1); | 349 | max_fsb = nforce2_fsb_read(1); |
360 | 350 | ||
361 | if(!max_fsb) | 351 | if(!max_fsb) |
362 | return -EIO; | 352 | return -EIO; |
363 | 353 | ||
@@ -398,17 +388,15 @@ static struct cpufreq_driver nforce2_driver = { | |||
398 | * nforce2_detect_chipset - detect the Southbridge which contains FSB PLL logic | 388 | * nforce2_detect_chipset - detect the Southbridge which contains FSB PLL logic |
399 | * | 389 | * |
400 | * Detects nForce2 A2 and C1 stepping | 390 | * Detects nForce2 A2 and C1 stepping |
401 | * | 391 | * |
402 | */ | 392 | */ |
403 | static unsigned int nforce2_detect_chipset(void) | 393 | static unsigned int nforce2_detect_chipset(void) |
404 | { | 394 | { |
405 | u8 revision; | 395 | u8 revision; |
406 | 396 | ||
407 | nforce2_chipset_dev = pci_get_subsys(PCI_VENDOR_ID_NVIDIA, | 397 | nforce2_chipset_dev = pci_get_subsys(PCI_VENDOR_ID_NVIDIA, |
408 | PCI_DEVICE_ID_NVIDIA_NFORCE2, | 398 | PCI_DEVICE_ID_NVIDIA_NFORCE2, |
409 | PCI_ANY_ID, | 399 | PCI_ANY_ID, PCI_ANY_ID, NULL); |
410 | PCI_ANY_ID, | ||
411 | NULL); | ||
412 | 400 | ||
413 | if (nforce2_chipset_dev == NULL) | 401 | if (nforce2_chipset_dev == NULL) |
414 | return -ENODEV; | 402 | return -ENODEV; |
diff --git a/arch/i386/kernel/cpu/cpufreq/elanfreq.c b/arch/i386/kernel/cpu/cpufreq/elanfreq.c index 3f7caa4ae6d6..f317276afa7a 100644 --- a/arch/i386/kernel/cpu/cpufreq/elanfreq.c +++ b/arch/i386/kernel/cpu/cpufreq/elanfreq.c | |||
@@ -1,16 +1,16 @@ | |||
1 | /* | 1 | /* |
2 | * elanfreq: cpufreq driver for the AMD ELAN family | 2 | * elanfreq: cpufreq driver for the AMD ELAN family |
3 | * | 3 | * |
4 | * (c) Copyright 2002 Robert Schwebel <r.schwebel@pengutronix.de> | 4 | * (c) Copyright 2002 Robert Schwebel <r.schwebel@pengutronix.de> |
5 | * | 5 | * |
6 | * Parts of this code are (c) Sven Geggus <sven@geggus.net> | 6 | * Parts of this code are (c) Sven Geggus <sven@geggus.net> |
7 | * | 7 | * |
8 | * All Rights Reserved. | 8 | * All Rights Reserved. |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or | 10 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License | 11 | * modify it under the terms of the GNU General Public License |
12 | * as published by the Free Software Foundation; either version | 12 | * as published by the Free Software Foundation; either version |
13 | * 2 of the License, or (at your option) any later version. | 13 | * 2 of the License, or (at your option) any later version. |
14 | * | 14 | * |
15 | * 2002-02-13: - initial revision for 2.4.18-pre9 by Robert Schwebel | 15 | * 2002-02-13: - initial revision for 2.4.18-pre9 by Robert Schwebel |
16 | * | 16 | * |
@@ -28,7 +28,7 @@ | |||
28 | #include <asm/timex.h> | 28 | #include <asm/timex.h> |
29 | #include <asm/io.h> | 29 | #include <asm/io.h> |
30 | 30 | ||
31 | #define REG_CSCIR 0x22 /* Chip Setup and Control Index Register */ | 31 | #define REG_CSCIR 0x22 /* Chip Setup and Control Index Register */ |
32 | #define REG_CSCDR 0x23 /* Chip Setup and Control Data Register */ | 32 | #define REG_CSCDR 0x23 /* Chip Setup and Control Data Register */ |
33 | 33 | ||
34 | /* Module parameter */ | 34 | /* Module parameter */ |
@@ -41,7 +41,7 @@ struct s_elan_multiplier { | |||
41 | }; | 41 | }; |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * It is important that the frequencies | 44 | * It is important that the frequencies |
45 | * are listed in ascending order here! | 45 | * are listed in ascending order here! |
46 | */ | 46 | */ |
47 | struct s_elan_multiplier elan_multiplier[] = { | 47 | struct s_elan_multiplier elan_multiplier[] = { |
@@ -72,78 +72,79 @@ static struct cpufreq_frequency_table elanfreq_table[] = { | |||
72 | * elanfreq_get_cpu_frequency: determine current cpu speed | 72 | * elanfreq_get_cpu_frequency: determine current cpu speed |
73 | * | 73 | * |
74 | * Finds out at which frequency the CPU of the Elan SOC runs | 74 | * Finds out at which frequency the CPU of the Elan SOC runs |
75 | * at the moment. Frequencies from 1 to 33 MHz are generated | 75 | * at the moment. Frequencies from 1 to 33 MHz are generated |
76 | * the normal way, 66 and 99 MHz are called "Hyperspeed Mode" | 76 | * the normal way, 66 and 99 MHz are called "Hyperspeed Mode" |
77 | * and have the rest of the chip running with 33 MHz. | 77 | * and have the rest of the chip running with 33 MHz. |
78 | */ | 78 | */ |
79 | 79 | ||
80 | static unsigned int elanfreq_get_cpu_frequency(unsigned int cpu) | 80 | static unsigned int elanfreq_get_cpu_frequency(unsigned int cpu) |
81 | { | 81 | { |
82 | u8 clockspeed_reg; /* Clock Speed Register */ | 82 | u8 clockspeed_reg; /* Clock Speed Register */ |
83 | 83 | ||
84 | local_irq_disable(); | 84 | local_irq_disable(); |
85 | outb_p(0x80,REG_CSCIR); | 85 | outb_p(0x80,REG_CSCIR); |
86 | clockspeed_reg = inb_p(REG_CSCDR); | 86 | clockspeed_reg = inb_p(REG_CSCDR); |
87 | local_irq_enable(); | 87 | local_irq_enable(); |
88 | 88 | ||
89 | if ((clockspeed_reg & 0xE0) == 0xE0) { return 0; } | 89 | if ((clockspeed_reg & 0xE0) == 0xE0) |
90 | return 0; | ||
90 | 91 | ||
91 | /* Are we in CPU clock multiplied mode (66/99 MHz)? */ | 92 | /* Are we in CPU clock multiplied mode (66/99 MHz)? */ |
92 | if ((clockspeed_reg & 0xE0) == 0xC0) { | 93 | if ((clockspeed_reg & 0xE0) == 0xC0) { |
93 | if ((clockspeed_reg & 0x01) == 0) { | 94 | if ((clockspeed_reg & 0x01) == 0) |
94 | return 66000; | 95 | return 66000; |
95 | } else { | 96 | else |
96 | return 99000; | 97 | return 99000; |
97 | } | 98 | } |
98 | } | ||
99 | 99 | ||
100 | /* 33 MHz is not 32 MHz... */ | 100 | /* 33 MHz is not 32 MHz... */ |
101 | if ((clockspeed_reg & 0xE0)==0xA0) | 101 | if ((clockspeed_reg & 0xE0)==0xA0) |
102 | return 33000; | 102 | return 33000; |
103 | 103 | ||
104 | return ((1<<((clockspeed_reg & 0xE0) >> 5)) * 1000); | 104 | return ((1<<((clockspeed_reg & 0xE0) >> 5)) * 1000); |
105 | } | 105 | } |
106 | 106 | ||
107 | 107 | ||
108 | /** | 108 | /** |
109 | * elanfreq_set_cpu_frequency: Change the CPU core frequency | 109 | * elanfreq_set_cpu_frequency: Change the CPU core frequency |
110 | * @cpu: cpu number | 110 | * @cpu: cpu number |
111 | * @freq: frequency in kHz | 111 | * @freq: frequency in kHz |
112 | * | 112 | * |
113 | * This function takes a frequency value and changes the CPU frequency | 113 | * This function takes a frequency value and changes the CPU frequency |
114 | * according to this. Note that the frequency has to be checked by | 114 | * according to this. Note that the frequency has to be checked by |
115 | * elanfreq_validatespeed() for correctness! | 115 | * elanfreq_validatespeed() for correctness! |
116 | * | 116 | * |
117 | * There is no return value. | 117 | * There is no return value. |
118 | */ | 118 | */ |
119 | 119 | ||
120 | static void elanfreq_set_cpu_state (unsigned int state) { | 120 | static void elanfreq_set_cpu_state (unsigned int state) |
121 | 121 | { | |
122 | struct cpufreq_freqs freqs; | 122 | struct cpufreq_freqs freqs; |
123 | 123 | ||
124 | freqs.old = elanfreq_get_cpu_frequency(0); | 124 | freqs.old = elanfreq_get_cpu_frequency(0); |
125 | freqs.new = elan_multiplier[state].clock; | 125 | freqs.new = elan_multiplier[state].clock; |
126 | freqs.cpu = 0; /* elanfreq.c is UP only driver */ | 126 | freqs.cpu = 0; /* elanfreq.c is UP only driver */ |
127 | 127 | ||
128 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 128 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
129 | 129 | ||
130 | printk(KERN_INFO "elanfreq: attempting to set frequency to %i kHz\n",elan_multiplier[state].clock); | 130 | printk(KERN_INFO "elanfreq: attempting to set frequency to %i kHz\n", |
131 | elan_multiplier[state].clock); | ||
131 | 132 | ||
132 | 133 | ||
133 | /* | 134 | /* |
134 | * Access to the Elan's internal registers is indexed via | 135 | * Access to the Elan's internal registers is indexed via |
135 | * 0x22: Chip Setup & Control Register Index Register (CSCI) | 136 | * 0x22: Chip Setup & Control Register Index Register (CSCI) |
136 | * 0x23: Chip Setup & Control Register Data Register (CSCD) | 137 | * 0x23: Chip Setup & Control Register Data Register (CSCD) |
137 | * | 138 | * |
138 | */ | 139 | */ |
139 | 140 | ||
140 | /* | 141 | /* |
141 | * 0x40 is the Power Management Unit's Force Mode Register. | 142 | * 0x40 is the Power Management Unit's Force Mode Register. |
142 | * Bit 6 enables Hyperspeed Mode (66/100 MHz core frequency) | 143 | * Bit 6 enables Hyperspeed Mode (66/100 MHz core frequency) |
143 | */ | 144 | */ |
144 | 145 | ||
145 | local_irq_disable(); | 146 | local_irq_disable(); |
146 | outb_p(0x40,REG_CSCIR); /* Disable hyperspeed mode */ | 147 | outb_p(0x40,REG_CSCIR); /* Disable hyperspeed mode */ |
147 | outb_p(0x00,REG_CSCDR); | 148 | outb_p(0x00,REG_CSCDR); |
148 | local_irq_enable(); /* wait till internal pipelines and */ | 149 | local_irq_enable(); /* wait till internal pipelines and */ |
149 | udelay(1000); /* buffers have cleaned up */ | 150 | udelay(1000); /* buffers have cleaned up */ |
@@ -166,10 +167,10 @@ static void elanfreq_set_cpu_state (unsigned int state) { | |||
166 | 167 | ||
167 | /** | 168 | /** |
168 | * elanfreq_validatespeed: test if frequency range is valid | 169 | * elanfreq_validatespeed: test if frequency range is valid |
169 | * @policy: the policy to validate | 170 | * @policy: the policy to validate |
170 | * | 171 | * |
171 | * This function checks if a given frequency range in kHz is valid | 172 | * This function checks if a given frequency range in kHz is valid |
172 | * for the hardware supported by the driver. | 173 | * for the hardware supported by the driver. |
173 | */ | 174 | */ |
174 | 175 | ||
175 | static int elanfreq_verify (struct cpufreq_policy *policy) | 176 | static int elanfreq_verify (struct cpufreq_policy *policy) |
@@ -177,11 +178,11 @@ static int elanfreq_verify (struct cpufreq_policy *policy) | |||
177 | return cpufreq_frequency_table_verify(policy, &elanfreq_table[0]); | 178 | return cpufreq_frequency_table_verify(policy, &elanfreq_table[0]); |
178 | } | 179 | } |
179 | 180 | ||
180 | static int elanfreq_target (struct cpufreq_policy *policy, | 181 | static int elanfreq_target (struct cpufreq_policy *policy, |
181 | unsigned int target_freq, | 182 | unsigned int target_freq, |
182 | unsigned int relation) | 183 | unsigned int relation) |
183 | { | 184 | { |
184 | unsigned int newstate = 0; | 185 | unsigned int newstate = 0; |
185 | 186 | ||
186 | if (cpufreq_frequency_table_target(policy, &elanfreq_table[0], target_freq, relation, &newstate)) | 187 | if (cpufreq_frequency_table_target(policy, &elanfreq_table[0], target_freq, relation, &newstate)) |
187 | return -EINVAL; | 188 | return -EINVAL; |
@@ -212,7 +213,7 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy) | |||
212 | max_freq = elanfreq_get_cpu_frequency(0); | 213 | max_freq = elanfreq_get_cpu_frequency(0); |
213 | 214 | ||
214 | /* table init */ | 215 | /* table init */ |
215 | for (i=0; (elanfreq_table[i].frequency != CPUFREQ_TABLE_END); i++) { | 216 | for (i=0; (elanfreq_table[i].frequency != CPUFREQ_TABLE_END); i++) { |
216 | if (elanfreq_table[i].frequency > max_freq) | 217 | if (elanfreq_table[i].frequency > max_freq) |
217 | elanfreq_table[i].frequency = CPUFREQ_ENTRY_INVALID; | 218 | elanfreq_table[i].frequency = CPUFREQ_ENTRY_INVALID; |
218 | } | 219 | } |
@@ -226,8 +227,7 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy) | |||
226 | if (result) | 227 | if (result) |
227 | return (result); | 228 | return (result); |
228 | 229 | ||
229 | cpufreq_frequency_table_get_attr(elanfreq_table, policy->cpu); | 230 | cpufreq_frequency_table_get_attr(elanfreq_table, policy->cpu); |
230 | |||
231 | return 0; | 231 | return 0; |
232 | } | 232 | } |
233 | 233 | ||
@@ -268,9 +268,9 @@ static struct freq_attr* elanfreq_attr[] = { | |||
268 | 268 | ||
269 | 269 | ||
270 | static struct cpufreq_driver elanfreq_driver = { | 270 | static struct cpufreq_driver elanfreq_driver = { |
271 | .get = elanfreq_get_cpu_frequency, | 271 | .get = elanfreq_get_cpu_frequency, |
272 | .verify = elanfreq_verify, | 272 | .verify = elanfreq_verify, |
273 | .target = elanfreq_target, | 273 | .target = elanfreq_target, |
274 | .init = elanfreq_cpu_init, | 274 | .init = elanfreq_cpu_init, |
275 | .exit = elanfreq_cpu_exit, | 275 | .exit = elanfreq_cpu_exit, |
276 | .name = "elanfreq", | 276 | .name = "elanfreq", |
@@ -279,23 +279,21 @@ static struct cpufreq_driver elanfreq_driver = { | |||
279 | }; | 279 | }; |
280 | 280 | ||
281 | 281 | ||
282 | static int __init elanfreq_init(void) | 282 | static int __init elanfreq_init(void) |
283 | { | 283 | { |
284 | struct cpuinfo_x86 *c = cpu_data; | 284 | struct cpuinfo_x86 *c = cpu_data; |
285 | 285 | ||
286 | /* Test if we have the right hardware */ | 286 | /* Test if we have the right hardware */ |
287 | if ((c->x86_vendor != X86_VENDOR_AMD) || | 287 | if ((c->x86_vendor != X86_VENDOR_AMD) || |
288 | (c->x86 != 4) || (c->x86_model!=10)) | 288 | (c->x86 != 4) || (c->x86_model!=10)) { |
289 | { | ||
290 | printk(KERN_INFO "elanfreq: error: no Elan processor found!\n"); | 289 | printk(KERN_INFO "elanfreq: error: no Elan processor found!\n"); |
291 | return -ENODEV; | 290 | return -ENODEV; |
292 | } | 291 | } |
293 | |||
294 | return cpufreq_register_driver(&elanfreq_driver); | 292 | return cpufreq_register_driver(&elanfreq_driver); |
295 | } | 293 | } |
296 | 294 | ||
297 | 295 | ||
298 | static void __exit elanfreq_exit(void) | 296 | static void __exit elanfreq_exit(void) |
299 | { | 297 | { |
300 | cpufreq_unregister_driver(&elanfreq_driver); | 298 | cpufreq_unregister_driver(&elanfreq_driver); |
301 | } | 299 | } |
@@ -309,4 +307,3 @@ MODULE_DESCRIPTION("cpufreq driver for AMD's Elan CPUs"); | |||
309 | 307 | ||
310 | module_init(elanfreq_init); | 308 | module_init(elanfreq_init); |
311 | module_exit(elanfreq_exit); | 309 | module_exit(elanfreq_exit); |
312 | |||
diff --git a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c index e86ea486c311..92afa3bc84f1 100644 --- a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c +++ b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c | |||
@@ -6,12 +6,12 @@ | |||
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
9 | * version 2 as published by the Free Software Foundation | 9 | * version 2 as published by the Free Software Foundation |
10 | * | 10 | * |
11 | * The author(s) of this software shall not be held liable for damages | 11 | * The author(s) of this software shall not be held liable for damages |
12 | * of any nature resulting due to the use of this software. This | 12 | * of any nature resulting due to the use of this software. This |
13 | * software is provided AS-IS with no warranties. | 13 | * software is provided AS-IS with no warranties. |
14 | * | 14 | * |
15 | * Theoritical note: | 15 | * Theoritical note: |
16 | * | 16 | * |
17 | * (see Geode(tm) CS5530 manual (rev.4.1) page.56) | 17 | * (see Geode(tm) CS5530 manual (rev.4.1) page.56) |
@@ -21,18 +21,18 @@ | |||
21 | * | 21 | * |
22 | * Suspend Modulation works by asserting and de-asserting the SUSP# pin | 22 | * Suspend Modulation works by asserting and de-asserting the SUSP# pin |
23 | * to CPU(GX1/GXLV) for configurable durations. When asserting SUSP# | 23 | * to CPU(GX1/GXLV) for configurable durations. When asserting SUSP# |
24 | * the CPU enters an idle state. GX1 stops its core clock when SUSP# is | 24 | * the CPU enters an idle state. GX1 stops its core clock when SUSP# is |
25 | * asserted then power consumption is reduced. | 25 | * asserted then power consumption is reduced. |
26 | * | 26 | * |
27 | * Suspend Modulation's OFF/ON duration are configurable | 27 | * Suspend Modulation's OFF/ON duration are configurable |
28 | * with 'Suspend Modulation OFF Count Register' | 28 | * with 'Suspend Modulation OFF Count Register' |
29 | * and 'Suspend Modulation ON Count Register'. | 29 | * and 'Suspend Modulation ON Count Register'. |
30 | * These registers are 8bit counters that represent the number of | 30 | * These registers are 8bit counters that represent the number of |
31 | * 32us intervals which the SUSP# pin is asserted(ON)/de-asserted(OFF) | 31 | * 32us intervals which the SUSP# pin is asserted(ON)/de-asserted(OFF) |
32 | * to the processor. | 32 | * to the processor. |
33 | * | 33 | * |
34 | * These counters define a ratio which is the effective frequency | 34 | * These counters define a ratio which is the effective frequency |
35 | * of operation of the system. | 35 | * of operation of the system. |
36 | * | 36 | * |
37 | * OFF Count | 37 | * OFF Count |
38 | * F_eff = Fgx * ---------------------- | 38 | * F_eff = Fgx * ---------------------- |
@@ -40,24 +40,24 @@ | |||
40 | * | 40 | * |
41 | * 0 <= On Count, Off Count <= 255 | 41 | * 0 <= On Count, Off Count <= 255 |
42 | * | 42 | * |
43 | * From these limits, we can get register values | 43 | * From these limits, we can get register values |
44 | * | 44 | * |
45 | * off_duration + on_duration <= MAX_DURATION | 45 | * off_duration + on_duration <= MAX_DURATION |
46 | * on_duration = off_duration * (stock_freq - freq) / freq | 46 | * on_duration = off_duration * (stock_freq - freq) / freq |
47 | * | 47 | * |
48 | * off_duration = (freq * DURATION) / stock_freq | 48 | * off_duration = (freq * DURATION) / stock_freq |
49 | * on_duration = DURATION - off_duration | 49 | * on_duration = DURATION - off_duration |
50 | * | 50 | * |
51 | * | 51 | * |
52 | *--------------------------------------------------------------------------- | 52 | *--------------------------------------------------------------------------- |
53 | * | 53 | * |
54 | * ChangeLog: | 54 | * ChangeLog: |
55 | * Dec. 12, 2003 Hiroshi Miura <miura@da-cha.org> | 55 | * Dec. 12, 2003 Hiroshi Miura <miura@da-cha.org> |
56 | * - fix on/off register mistake | 56 | * - fix on/off register mistake |
57 | * - fix cpu_khz calc when it stops cpu modulation. | 57 | * - fix cpu_khz calc when it stops cpu modulation. |
58 | * | 58 | * |
59 | * Dec. 11, 2002 Hiroshi Miura <miura@da-cha.org> | 59 | * Dec. 11, 2002 Hiroshi Miura <miura@da-cha.org> |
60 | * - rewrite for Cyrix MediaGX Cx5510/5520 and | 60 | * - rewrite for Cyrix MediaGX Cx5510/5520 and |
61 | * NatSemi Geode Cs5530(A). | 61 | * NatSemi Geode Cs5530(A). |
62 | * | 62 | * |
63 | * Jul. ??, 2002 Zwane Mwaikambo <zwane@commfireservices.com> | 63 | * Jul. ??, 2002 Zwane Mwaikambo <zwane@commfireservices.com> |
@@ -74,40 +74,40 @@ | |||
74 | ************************************************************************/ | 74 | ************************************************************************/ |
75 | 75 | ||
76 | #include <linux/kernel.h> | 76 | #include <linux/kernel.h> |
77 | #include <linux/module.h> | 77 | #include <linux/module.h> |
78 | #include <linux/init.h> | 78 | #include <linux/init.h> |
79 | #include <linux/smp.h> | 79 | #include <linux/smp.h> |
80 | #include <linux/cpufreq.h> | 80 | #include <linux/cpufreq.h> |
81 | #include <linux/pci.h> | 81 | #include <linux/pci.h> |
82 | #include <asm/processor.h> | 82 | #include <asm/processor.h> |
83 | #include <asm/errno.h> | 83 | #include <asm/errno.h> |
84 | 84 | ||
85 | /* PCI config registers, all at F0 */ | 85 | /* PCI config registers, all at F0 */ |
86 | #define PCI_PMER1 0x80 /* power management enable register 1 */ | 86 | #define PCI_PMER1 0x80 /* power management enable register 1 */ |
87 | #define PCI_PMER2 0x81 /* power management enable register 2 */ | 87 | #define PCI_PMER2 0x81 /* power management enable register 2 */ |
88 | #define PCI_PMER3 0x82 /* power management enable register 3 */ | 88 | #define PCI_PMER3 0x82 /* power management enable register 3 */ |
89 | #define PCI_IRQTC 0x8c /* irq speedup timer counter register:typical 2 to 4ms */ | 89 | #define PCI_IRQTC 0x8c /* irq speedup timer counter register:typical 2 to 4ms */ |
90 | #define PCI_VIDTC 0x8d /* video speedup timer counter register: typical 50 to 100ms */ | 90 | #define PCI_VIDTC 0x8d /* video speedup timer counter register: typical 50 to 100ms */ |
91 | #define PCI_MODOFF 0x94 /* suspend modulation OFF counter register, 1 = 32us */ | 91 | #define PCI_MODOFF 0x94 /* suspend modulation OFF counter register, 1 = 32us */ |
92 | #define PCI_MODON 0x95 /* suspend modulation ON counter register */ | 92 | #define PCI_MODON 0x95 /* suspend modulation ON counter register */ |
93 | #define PCI_SUSCFG 0x96 /* suspend configuration register */ | 93 | #define PCI_SUSCFG 0x96 /* suspend configuration register */ |
94 | 94 | ||
95 | /* PMER1 bits */ | 95 | /* PMER1 bits */ |
96 | #define GPM (1<<0) /* global power management */ | 96 | #define GPM (1<<0) /* global power management */ |
97 | #define GIT (1<<1) /* globally enable PM device idle timers */ | 97 | #define GIT (1<<1) /* globally enable PM device idle timers */ |
98 | #define GTR (1<<2) /* globally enable IO traps */ | 98 | #define GTR (1<<2) /* globally enable IO traps */ |
99 | #define IRQ_SPDUP (1<<3) /* disable clock throttle during interrupt handling */ | 99 | #define IRQ_SPDUP (1<<3) /* disable clock throttle during interrupt handling */ |
100 | #define VID_SPDUP (1<<4) /* disable clock throttle during vga video handling */ | 100 | #define VID_SPDUP (1<<4) /* disable clock throttle during vga video handling */ |
101 | 101 | ||
102 | /* SUSCFG bits */ | 102 | /* SUSCFG bits */ |
103 | #define SUSMOD (1<<0) /* enable/disable suspend modulation */ | 103 | #define SUSMOD (1<<0) /* enable/disable suspend modulation */ |
104 | /* the belows support only with cs5530 (after rev.1.2)/cs5530A */ | 104 | /* the belows support only with cs5530 (after rev.1.2)/cs5530A */ |
105 | #define SMISPDUP (1<<1) /* select how SMI re-enable suspend modulation: */ | 105 | #define SMISPDUP (1<<1) /* select how SMI re-enable suspend modulation: */ |
106 | /* IRQTC timer or read SMI speedup disable reg.(F1BAR[08-09h]) */ | 106 | /* IRQTC timer or read SMI speedup disable reg.(F1BAR[08-09h]) */ |
107 | #define SUSCFG (1<<2) /* enable powering down a GXLV processor. "Special 3Volt Suspend" mode */ | 107 | #define SUSCFG (1<<2) /* enable powering down a GXLV processor. "Special 3Volt Suspend" mode */ |
108 | /* the belows support only with cs5530A */ | 108 | /* the belows support only with cs5530A */ |
109 | #define PWRSVE_ISA (1<<3) /* stop ISA clock */ | 109 | #define PWRSVE_ISA (1<<3) /* stop ISA clock */ |
110 | #define PWRSVE (1<<4) /* active idle */ | 110 | #define PWRSVE (1<<4) /* active idle */ |
111 | 111 | ||
112 | struct gxfreq_params { | 112 | struct gxfreq_params { |
113 | u8 on_duration; | 113 | u8 on_duration; |
@@ -128,7 +128,7 @@ module_param (pci_busclk, int, 0444); | |||
128 | 128 | ||
129 | /* maximum duration for which the cpu may be suspended | 129 | /* maximum duration for which the cpu may be suspended |
130 | * (32us * MAX_DURATION). If no parameter is given, this defaults | 130 | * (32us * MAX_DURATION). If no parameter is given, this defaults |
131 | * to 255. | 131 | * to 255. |
132 | * Note that this leads to a maximum of 8 ms(!) where the CPU clock | 132 | * Note that this leads to a maximum of 8 ms(!) where the CPU clock |
133 | * is suspended -- processing power is just 0.39% of what it used to be, | 133 | * is suspended -- processing power is just 0.39% of what it used to be, |
134 | * though. 781.25 kHz(!) for a 200 MHz processor -- wow. */ | 134 | * though. 781.25 kHz(!) for a 200 MHz processor -- wow. */ |
@@ -144,17 +144,17 @@ module_param (max_duration, int, 0444); | |||
144 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "gx-suspmod", msg) | 144 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "gx-suspmod", msg) |
145 | 145 | ||
146 | /** | 146 | /** |
147 | * we can detect a core multipiler from dir0_lsb | 147 | * we can detect a core multipiler from dir0_lsb |
148 | * from GX1 datasheet p.56, | 148 | * from GX1 datasheet p.56, |
149 | * MULT[3:0]: | 149 | * MULT[3:0]: |
150 | * 0000 = SYSCLK multiplied by 4 (test only) | 150 | * 0000 = SYSCLK multiplied by 4 (test only) |
151 | * 0001 = SYSCLK multiplied by 10 | 151 | * 0001 = SYSCLK multiplied by 10 |
152 | * 0010 = SYSCLK multiplied by 4 | 152 | * 0010 = SYSCLK multiplied by 4 |
153 | * 0011 = SYSCLK multiplied by 6 | 153 | * 0011 = SYSCLK multiplied by 6 |
154 | * 0100 = SYSCLK multiplied by 9 | 154 | * 0100 = SYSCLK multiplied by 9 |
155 | * 0101 = SYSCLK multiplied by 5 | 155 | * 0101 = SYSCLK multiplied by 5 |
156 | * 0110 = SYSCLK multiplied by 7 | 156 | * 0110 = SYSCLK multiplied by 7 |
157 | * 0111 = SYSCLK multiplied by 8 | 157 | * 0111 = SYSCLK multiplied by 8 |
158 | * of 33.3MHz | 158 | * of 33.3MHz |
159 | **/ | 159 | **/ |
160 | static int gx_freq_mult[16] = { | 160 | static int gx_freq_mult[16] = { |
@@ -164,17 +164,17 @@ static int gx_freq_mult[16] = { | |||
164 | 164 | ||
165 | 165 | ||
166 | /**************************************************************** | 166 | /**************************************************************** |
167 | * Low Level chipset interface * | 167 | * Low Level chipset interface * |
168 | ****************************************************************/ | 168 | ****************************************************************/ |
169 | static struct pci_device_id gx_chipset_tbl[] __initdata = { | 169 | static struct pci_device_id gx_chipset_tbl[] __initdata = { |
170 | { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, PCI_ANY_ID, PCI_ANY_ID }, | 170 | { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, PCI_ANY_ID, PCI_ANY_ID }, |
171 | { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520, PCI_ANY_ID, PCI_ANY_ID }, | 171 | { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520, PCI_ANY_ID, PCI_ANY_ID }, |
172 | { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5510, PCI_ANY_ID, PCI_ANY_ID }, | 172 | { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5510, PCI_ANY_ID, PCI_ANY_ID }, |
173 | { 0, }, | 173 | { 0, }, |
174 | }; | 174 | }; |
175 | 175 | ||
176 | /** | 176 | /** |
177 | * gx_detect_chipset: | 177 | * gx_detect_chipset: |
178 | * | 178 | * |
179 | **/ | 179 | **/ |
180 | static __init struct pci_dev *gx_detect_chipset(void) | 180 | static __init struct pci_dev *gx_detect_chipset(void) |
@@ -182,17 +182,16 @@ static __init struct pci_dev *gx_detect_chipset(void) | |||
182 | struct pci_dev *gx_pci = NULL; | 182 | struct pci_dev *gx_pci = NULL; |
183 | 183 | ||
184 | /* check if CPU is a MediaGX or a Geode. */ | 184 | /* check if CPU is a MediaGX or a Geode. */ |
185 | if ((current_cpu_data.x86_vendor != X86_VENDOR_NSC) && | 185 | if ((current_cpu_data.x86_vendor != X86_VENDOR_NSC) && |
186 | (current_cpu_data.x86_vendor != X86_VENDOR_CYRIX)) { | 186 | (current_cpu_data.x86_vendor != X86_VENDOR_CYRIX)) { |
187 | dprintk("error: no MediaGX/Geode processor found!\n"); | 187 | dprintk("error: no MediaGX/Geode processor found!\n"); |
188 | return NULL; | 188 | return NULL; |
189 | } | 189 | } |
190 | 190 | ||
191 | /* detect which companion chip is used */ | 191 | /* detect which companion chip is used */ |
192 | while ((gx_pci = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, gx_pci)) != NULL) { | 192 | while ((gx_pci = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, gx_pci)) != NULL) { |
193 | if ((pci_match_id(gx_chipset_tbl, gx_pci)) != NULL) { | 193 | if ((pci_match_id(gx_chipset_tbl, gx_pci)) != NULL) |
194 | return gx_pci; | 194 | return gx_pci; |
195 | } | ||
196 | } | 195 | } |
197 | 196 | ||
198 | dprintk("error: no supported chipset found!\n"); | 197 | dprintk("error: no supported chipset found!\n"); |
@@ -200,24 +199,24 @@ static __init struct pci_dev *gx_detect_chipset(void) | |||
200 | } | 199 | } |
201 | 200 | ||
202 | /** | 201 | /** |
203 | * gx_get_cpuspeed: | 202 | * gx_get_cpuspeed: |
204 | * | 203 | * |
205 | * Finds out at which efficient frequency the Cyrix MediaGX/NatSemi Geode CPU runs. | 204 | * Finds out at which efficient frequency the Cyrix MediaGX/NatSemi Geode CPU runs. |
206 | */ | 205 | */ |
207 | static unsigned int gx_get_cpuspeed(unsigned int cpu) | 206 | static unsigned int gx_get_cpuspeed(unsigned int cpu) |
208 | { | 207 | { |
209 | if ((gx_params->pci_suscfg & SUSMOD) == 0) | 208 | if ((gx_params->pci_suscfg & SUSMOD) == 0) |
210 | return stock_freq; | 209 | return stock_freq; |
211 | 210 | ||
212 | return (stock_freq * gx_params->off_duration) | 211 | return (stock_freq * gx_params->off_duration) |
213 | / (gx_params->on_duration + gx_params->off_duration); | 212 | / (gx_params->on_duration + gx_params->off_duration); |
214 | } | 213 | } |
215 | 214 | ||
216 | /** | 215 | /** |
217 | * gx_validate_speed: | 216 | * gx_validate_speed: |
218 | * determine current cpu speed | 217 | * determine current cpu speed |
219 | * | 218 | * |
220 | **/ | 219 | **/ |
221 | 220 | ||
222 | static unsigned int gx_validate_speed(unsigned int khz, u8 *on_duration, u8 *off_duration) | 221 | static unsigned int gx_validate_speed(unsigned int khz, u8 *on_duration, u8 *off_duration) |
223 | { | 222 | { |
@@ -230,7 +229,7 @@ static unsigned int gx_validate_speed(unsigned int khz, u8 *on_duration, u8 *off | |||
230 | *on_duration=0; | 229 | *on_duration=0; |
231 | 230 | ||
232 | for (i=max_duration; i>0; i--) { | 231 | for (i=max_duration; i>0; i--) { |
233 | tmp_off = ((khz * i) / stock_freq) & 0xff; | 232 | tmp_off = ((khz * i) / stock_freq) & 0xff; |
234 | tmp_on = i - tmp_off; | 233 | tmp_on = i - tmp_off; |
235 | tmp_freq = (stock_freq * tmp_off) / i; | 234 | tmp_freq = (stock_freq * tmp_off) / i; |
236 | /* if this relation is closer to khz, use this. If it's equal, | 235 | /* if this relation is closer to khz, use this. If it's equal, |
@@ -247,18 +246,17 @@ static unsigned int gx_validate_speed(unsigned int khz, u8 *on_duration, u8 *off | |||
247 | 246 | ||
248 | 247 | ||
249 | /** | 248 | /** |
250 | * gx_set_cpuspeed: | 249 | * gx_set_cpuspeed: |
251 | * set cpu speed in khz. | 250 | * set cpu speed in khz. |
252 | **/ | 251 | **/ |
253 | 252 | ||
254 | static void gx_set_cpuspeed(unsigned int khz) | 253 | static void gx_set_cpuspeed(unsigned int khz) |
255 | { | 254 | { |
256 | u8 suscfg, pmer1; | 255 | u8 suscfg, pmer1; |
257 | unsigned int new_khz; | 256 | unsigned int new_khz; |
258 | unsigned long flags; | 257 | unsigned long flags; |
259 | struct cpufreq_freqs freqs; | 258 | struct cpufreq_freqs freqs; |
260 | 259 | ||
261 | |||
262 | freqs.cpu = 0; | 260 | freqs.cpu = 0; |
263 | freqs.old = gx_get_cpuspeed(0); | 261 | freqs.old = gx_get_cpuspeed(0); |
264 | 262 | ||
@@ -303,18 +301,18 @@ static void gx_set_cpuspeed(unsigned int khz) | |||
303 | pci_write_config_byte(gx_params->cs55x0, PCI_MODOFF, gx_params->off_duration); | 301 | pci_write_config_byte(gx_params->cs55x0, PCI_MODOFF, gx_params->off_duration); |
304 | pci_write_config_byte(gx_params->cs55x0, PCI_MODON, gx_params->on_duration); | 302 | pci_write_config_byte(gx_params->cs55x0, PCI_MODON, gx_params->on_duration); |
305 | 303 | ||
306 | pci_write_config_byte(gx_params->cs55x0, PCI_SUSCFG, suscfg); | 304 | pci_write_config_byte(gx_params->cs55x0, PCI_SUSCFG, suscfg); |
307 | pci_read_config_byte(gx_params->cs55x0, PCI_SUSCFG, &suscfg); | 305 | pci_read_config_byte(gx_params->cs55x0, PCI_SUSCFG, &suscfg); |
308 | 306 | ||
309 | local_irq_restore(flags); | 307 | local_irq_restore(flags); |
310 | 308 | ||
311 | gx_params->pci_suscfg = suscfg; | 309 | gx_params->pci_suscfg = suscfg; |
312 | 310 | ||
313 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 311 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
314 | 312 | ||
315 | dprintk("suspend modulation w/ duration of ON:%d us, OFF:%d us\n", | 313 | dprintk("suspend modulation w/ duration of ON:%d us, OFF:%d us\n", |
316 | gx_params->on_duration * 32, gx_params->off_duration * 32); | 314 | gx_params->on_duration * 32, gx_params->off_duration * 32); |
317 | dprintk("suspend modulation w/ clock speed: %d kHz.\n", freqs.new); | 315 | dprintk("suspend modulation w/ clock speed: %d kHz.\n", freqs.new); |
318 | } | 316 | } |
319 | 317 | ||
320 | /**************************************************************** | 318 | /**************************************************************** |
@@ -322,10 +320,10 @@ static void gx_set_cpuspeed(unsigned int khz) | |||
322 | ****************************************************************/ | 320 | ****************************************************************/ |
323 | 321 | ||
324 | /* | 322 | /* |
325 | * cpufreq_gx_verify: test if frequency range is valid | 323 | * cpufreq_gx_verify: test if frequency range is valid |
326 | * | 324 | * |
327 | * This function checks if a given frequency range in kHz is valid | 325 | * This function checks if a given frequency range in kHz is valid |
328 | * for the hardware supported by the driver. | 326 | * for the hardware supported by the driver. |
329 | */ | 327 | */ |
330 | 328 | ||
331 | static int cpufreq_gx_verify(struct cpufreq_policy *policy) | 329 | static int cpufreq_gx_verify(struct cpufreq_policy *policy) |
@@ -333,8 +331,8 @@ static int cpufreq_gx_verify(struct cpufreq_policy *policy) | |||
333 | unsigned int tmp_freq = 0; | 331 | unsigned int tmp_freq = 0; |
334 | u8 tmp1, tmp2; | 332 | u8 tmp1, tmp2; |
335 | 333 | ||
336 | if (!stock_freq || !policy) | 334 | if (!stock_freq || !policy) |
337 | return -EINVAL; | 335 | return -EINVAL; |
338 | 336 | ||
339 | policy->cpu = 0; | 337 | policy->cpu = 0; |
340 | cpufreq_verify_within_limits(policy, (stock_freq / max_duration), stock_freq); | 338 | cpufreq_verify_within_limits(policy, (stock_freq / max_duration), stock_freq); |
@@ -342,14 +340,14 @@ static int cpufreq_gx_verify(struct cpufreq_policy *policy) | |||
342 | /* it needs to be assured that at least one supported frequency is | 340 | /* it needs to be assured that at least one supported frequency is |
343 | * within policy->min and policy->max. If it is not, policy->max | 341 | * within policy->min and policy->max. If it is not, policy->max |
344 | * needs to be increased until one freuqency is supported. | 342 | * needs to be increased until one freuqency is supported. |
345 | * policy->min may not be decreased, though. This way we guarantee a | 343 | * policy->min may not be decreased, though. This way we guarantee a |
346 | * specific processing capacity. | 344 | * specific processing capacity. |
347 | */ | 345 | */ |
348 | tmp_freq = gx_validate_speed(policy->min, &tmp1, &tmp2); | 346 | tmp_freq = gx_validate_speed(policy->min, &tmp1, &tmp2); |
349 | if (tmp_freq < policy->min) | 347 | if (tmp_freq < policy->min) |
350 | tmp_freq += stock_freq / max_duration; | 348 | tmp_freq += stock_freq / max_duration; |
351 | policy->min = tmp_freq; | 349 | policy->min = tmp_freq; |
352 | if (policy->min > policy->max) | 350 | if (policy->min > policy->max) |
353 | policy->max = tmp_freq; | 351 | policy->max = tmp_freq; |
354 | tmp_freq = gx_validate_speed(policy->max, &tmp1, &tmp2); | 352 | tmp_freq = gx_validate_speed(policy->max, &tmp1, &tmp2); |
355 | if (tmp_freq > policy->max) | 353 | if (tmp_freq > policy->max) |
@@ -358,12 +356,12 @@ static int cpufreq_gx_verify(struct cpufreq_policy *policy) | |||
358 | if (policy->max < policy->min) | 356 | if (policy->max < policy->min) |
359 | policy->max = policy->min; | 357 | policy->max = policy->min; |
360 | cpufreq_verify_within_limits(policy, (stock_freq / max_duration), stock_freq); | 358 | cpufreq_verify_within_limits(policy, (stock_freq / max_duration), stock_freq); |
361 | 359 | ||
362 | return 0; | 360 | return 0; |
363 | } | 361 | } |
364 | 362 | ||
365 | /* | 363 | /* |
366 | * cpufreq_gx_target: | 364 | * cpufreq_gx_target: |
367 | * | 365 | * |
368 | */ | 366 | */ |
369 | static int cpufreq_gx_target(struct cpufreq_policy *policy, | 367 | static int cpufreq_gx_target(struct cpufreq_policy *policy, |
@@ -373,8 +371,8 @@ static int cpufreq_gx_target(struct cpufreq_policy *policy, | |||
373 | u8 tmp1, tmp2; | 371 | u8 tmp1, tmp2; |
374 | unsigned int tmp_freq; | 372 | unsigned int tmp_freq; |
375 | 373 | ||
376 | if (!stock_freq || !policy) | 374 | if (!stock_freq || !policy) |
377 | return -EINVAL; | 375 | return -EINVAL; |
378 | 376 | ||
379 | policy->cpu = 0; | 377 | policy->cpu = 0; |
380 | 378 | ||
@@ -431,7 +429,7 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy) | |||
431 | return 0; | 429 | return 0; |
432 | } | 430 | } |
433 | 431 | ||
434 | /* | 432 | /* |
435 | * cpufreq_gx_init: | 433 | * cpufreq_gx_init: |
436 | * MediaGX/Geode GX initialize cpufreq driver | 434 | * MediaGX/Geode GX initialize cpufreq driver |
437 | */ | 435 | */ |
@@ -452,7 +450,7 @@ static int __init cpufreq_gx_init(void) | |||
452 | u32 class_rev; | 450 | u32 class_rev; |
453 | 451 | ||
454 | /* Test if we have the right hardware */ | 452 | /* Test if we have the right hardware */ |
455 | if ((gx_pci = gx_detect_chipset()) == NULL) | 453 | if ((gx_pci = gx_detect_chipset()) == NULL) |
456 | return -ENODEV; | 454 | return -ENODEV; |
457 | 455 | ||
458 | /* check whether module parameters are sane */ | 456 | /* check whether module parameters are sane */ |
@@ -461,10 +459,9 @@ static int __init cpufreq_gx_init(void) | |||
461 | 459 | ||
462 | dprintk("geode suspend modulation available.\n"); | 460 | dprintk("geode suspend modulation available.\n"); |
463 | 461 | ||
464 | params = kmalloc(sizeof(struct gxfreq_params), GFP_KERNEL); | 462 | params = kzalloc(sizeof(struct gxfreq_params), GFP_KERNEL); |
465 | if (params == NULL) | 463 | if (params == NULL) |
466 | return -ENOMEM; | 464 | return -ENOMEM; |
467 | memset(params, 0, sizeof(struct gxfreq_params)); | ||
468 | 465 | ||
469 | params->cs55x0 = gx_pci; | 466 | params->cs55x0 = gx_pci; |
470 | gx_params = params; | 467 | gx_params = params; |
@@ -478,7 +475,7 @@ static int __init cpufreq_gx_init(void) | |||
478 | pci_read_config_dword(params->cs55x0, PCI_CLASS_REVISION, &class_rev); | 475 | pci_read_config_dword(params->cs55x0, PCI_CLASS_REVISION, &class_rev); |
479 | params->pci_rev = class_rev && 0xff; | 476 | params->pci_rev = class_rev && 0xff; |
480 | 477 | ||
481 | if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) { | 478 | if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) { |
482 | kfree(params); | 479 | kfree(params); |
483 | return ret; /* register error! */ | 480 | return ret; /* register error! */ |
484 | } | 481 | } |
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.h b/arch/i386/kernel/cpu/cpufreq/longhaul.h index 2a495c162ec7..d3a95d77ee85 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.h +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.h | |||
@@ -234,7 +234,7 @@ static int __initdata ezrat_eblcr[32] = { | |||
234 | 234 | ||
235 | /* | 235 | /* |
236 | * VIA C3 Nehemiah */ | 236 | * VIA C3 Nehemiah */ |
237 | 237 | ||
238 | static int __initdata nehemiah_a_clock_ratio[32] = { | 238 | static int __initdata nehemiah_a_clock_ratio[32] = { |
239 | 100, /* 0000 -> 10.0x */ | 239 | 100, /* 0000 -> 10.0x */ |
240 | 160, /* 0001 -> 16.0x */ | 240 | 160, /* 0001 -> 16.0x */ |
@@ -446,7 +446,7 @@ static int __initdata nehemiah_c_eblcr[32] = { | |||
446 | /* end of table */ | 446 | /* end of table */ |
447 | }; | 447 | }; |
448 | 448 | ||
449 | /* | 449 | /* |
450 | * Voltage scales. Div/Mod by 1000 to get actual voltage. | 450 | * Voltage scales. Div/Mod by 1000 to get actual voltage. |
451 | * Which scale to use depends on the VRM type in use. | 451 | * Which scale to use depends on the VRM type in use. |
452 | */ | 452 | */ |
diff --git a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c index cc73a7ae34bc..ab6504efd801 100644 --- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * The author(s) of this software shall not be held liable for damages | 14 | * The author(s) of this software shall not be held liable for damages |
15 | * of any nature resulting due to the use of this software. This | 15 | * of any nature resulting due to the use of this software. This |
16 | * software is provided AS-IS with no warranties. | 16 | * software is provided AS-IS with no warranties. |
17 | * | 17 | * |
18 | * Date Errata Description | 18 | * Date Errata Description |
19 | * 20020525 N44, O17 12.5% or 25% DC causes lockup | 19 | * 20020525 N44, O17 12.5% or 25% DC causes lockup |
20 | * | 20 | * |
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/config.h> | 23 | #include <linux/config.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/smp.h> | 27 | #include <linux/smp.h> |
28 | #include <linux/cpufreq.h> | 28 | #include <linux/cpufreq.h> |
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/cpumask.h> | 30 | #include <linux/cpumask.h> |
31 | #include <linux/sched.h> /* current / set_cpus_allowed() */ | 31 | #include <linux/sched.h> /* current / set_cpus_allowed() */ |
32 | 32 | ||
33 | #include <asm/processor.h> | 33 | #include <asm/processor.h> |
34 | #include <asm/msr.h> | 34 | #include <asm/msr.h> |
35 | #include <asm/timex.h> | 35 | #include <asm/timex.h> |
36 | 36 | ||
@@ -79,7 +79,7 @@ static int cpufreq_p4_setdc(unsigned int cpu, unsigned int newstate) | |||
79 | } else { | 79 | } else { |
80 | dprintk("CPU#%d setting duty cycle to %d%%\n", | 80 | dprintk("CPU#%d setting duty cycle to %d%%\n", |
81 | cpu, ((125 * newstate) / 10)); | 81 | cpu, ((125 * newstate) / 10)); |
82 | /* bits 63 - 5 : reserved | 82 | /* bits 63 - 5 : reserved |
83 | * bit 4 : enable/disable | 83 | * bit 4 : enable/disable |
84 | * bits 3-1 : duty cycle | 84 | * bits 3-1 : duty cycle |
85 | * bit 0 : reserved | 85 | * bit 0 : reserved |
@@ -132,7 +132,7 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy, | |||
132 | } | 132 | } |
133 | 133 | ||
134 | /* run on each logical CPU, see section 13.15.3 of IA32 Intel Architecture Software | 134 | /* run on each logical CPU, see section 13.15.3 of IA32 Intel Architecture Software |
135 | * Developer's Manual, Volume 3 | 135 | * Developer's Manual, Volume 3 |
136 | */ | 136 | */ |
137 | cpus_allowed = current->cpus_allowed; | 137 | cpus_allowed = current->cpus_allowed; |
138 | 138 | ||
@@ -206,7 +206,7 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c) | |||
206 | return speedstep_get_processor_frequency(SPEEDSTEP_PROCESSOR_P4D); | 206 | return speedstep_get_processor_frequency(SPEEDSTEP_PROCESSOR_P4D); |
207 | } | 207 | } |
208 | 208 | ||
209 | 209 | ||
210 | 210 | ||
211 | static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | 211 | static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) |
212 | { | 212 | { |
@@ -234,7 +234,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
234 | dprintk("has errata -- disabling frequencies lower than 2ghz\n"); | 234 | dprintk("has errata -- disabling frequencies lower than 2ghz\n"); |
235 | break; | 235 | break; |
236 | } | 236 | } |
237 | 237 | ||
238 | /* get max frequency */ | 238 | /* get max frequency */ |
239 | stock_freq = cpufreq_p4_get_frequency(c); | 239 | stock_freq = cpufreq_p4_get_frequency(c); |
240 | if (!stock_freq) | 240 | if (!stock_freq) |
@@ -244,13 +244,13 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
244 | for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { | 244 | for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { |
245 | if ((i<2) && (has_N44_O17_errata[policy->cpu])) | 245 | if ((i<2) && (has_N44_O17_errata[policy->cpu])) |
246 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; | 246 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; |
247 | else if (has_N60_errata[policy->cpu] && p4clockmod_table[i].frequency < 2000000) | 247 | else if (has_N60_errata[policy->cpu] && ((stock_freq * i)/8) < 2000000) |
248 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; | 248 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; |
249 | else | 249 | else |
250 | p4clockmod_table[i].frequency = (stock_freq * i)/8; | 250 | p4clockmod_table[i].frequency = (stock_freq * i)/8; |
251 | } | 251 | } |
252 | cpufreq_frequency_table_get_attr(p4clockmod_table, policy->cpu); | 252 | cpufreq_frequency_table_get_attr(p4clockmod_table, policy->cpu); |
253 | 253 | ||
254 | /* cpuinfo and default policy values */ | 254 | /* cpuinfo and default policy values */ |
255 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | 255 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; |
256 | policy->cpuinfo.transition_latency = 1000000; /* assumed */ | 256 | policy->cpuinfo.transition_latency = 1000000; /* assumed */ |
@@ -262,7 +262,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
262 | 262 | ||
263 | static int cpufreq_p4_cpu_exit(struct cpufreq_policy *policy) | 263 | static int cpufreq_p4_cpu_exit(struct cpufreq_policy *policy) |
264 | { | 264 | { |
265 | cpufreq_frequency_table_put_attr(policy->cpu); | 265 | cpufreq_frequency_table_put_attr(policy->cpu); |
266 | return 0; | 266 | return 0; |
267 | } | 267 | } |
268 | 268 | ||
@@ -298,7 +298,7 @@ static struct freq_attr* p4clockmod_attr[] = { | |||
298 | }; | 298 | }; |
299 | 299 | ||
300 | static struct cpufreq_driver p4clockmod_driver = { | 300 | static struct cpufreq_driver p4clockmod_driver = { |
301 | .verify = cpufreq_p4_verify, | 301 | .verify = cpufreq_p4_verify, |
302 | .target = cpufreq_p4_target, | 302 | .target = cpufreq_p4_target, |
303 | .init = cpufreq_p4_cpu_init, | 303 | .init = cpufreq_p4_cpu_init, |
304 | .exit = cpufreq_p4_cpu_exit, | 304 | .exit = cpufreq_p4_cpu_exit, |
@@ -310,12 +310,12 @@ static struct cpufreq_driver p4clockmod_driver = { | |||
310 | 310 | ||
311 | 311 | ||
312 | static int __init cpufreq_p4_init(void) | 312 | static int __init cpufreq_p4_init(void) |
313 | { | 313 | { |
314 | struct cpuinfo_x86 *c = cpu_data; | 314 | struct cpuinfo_x86 *c = cpu_data; |
315 | int ret; | 315 | int ret; |
316 | 316 | ||
317 | /* | 317 | /* |
318 | * THERM_CONTROL is architectural for IA32 now, so | 318 | * THERM_CONTROL is architectural for IA32 now, so |
319 | * we can rely on the capability checks | 319 | * we can rely on the capability checks |
320 | */ | 320 | */ |
321 | if (c->x86_vendor != X86_VENDOR_INTEL) | 321 | if (c->x86_vendor != X86_VENDOR_INTEL) |
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c index 222f8cfe3c57..f89524051e4a 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c | |||
@@ -8,7 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/cpufreq.h> | 13 | #include <linux/cpufreq.h> |
14 | #include <linux/ioport.h> | 14 | #include <linux/ioport.h> |
@@ -50,7 +50,7 @@ static int powernow_k6_get_cpu_multiplier(void) | |||
50 | { | 50 | { |
51 | u64 invalue = 0; | 51 | u64 invalue = 0; |
52 | u32 msrval; | 52 | u32 msrval; |
53 | 53 | ||
54 | msrval = POWERNOW_IOPORT + 0x1; | 54 | msrval = POWERNOW_IOPORT + 0x1; |
55 | wrmsr(MSR_K6_EPMR, msrval, 0); /* enable the PowerNow port */ | 55 | wrmsr(MSR_K6_EPMR, msrval, 0); /* enable the PowerNow port */ |
56 | invalue=inl(POWERNOW_IOPORT + 0x8); | 56 | invalue=inl(POWERNOW_IOPORT + 0x8); |
@@ -81,7 +81,7 @@ static void powernow_k6_set_state (unsigned int best_i) | |||
81 | freqs.old = busfreq * powernow_k6_get_cpu_multiplier(); | 81 | freqs.old = busfreq * powernow_k6_get_cpu_multiplier(); |
82 | freqs.new = busfreq * clock_ratio[best_i].index; | 82 | freqs.new = busfreq * clock_ratio[best_i].index; |
83 | freqs.cpu = 0; /* powernow-k6.c is UP only driver */ | 83 | freqs.cpu = 0; /* powernow-k6.c is UP only driver */ |
84 | 84 | ||
85 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 85 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
86 | 86 | ||
87 | /* we now need to transform best_i to the BVC format, see AMD#23446 */ | 87 | /* we now need to transform best_i to the BVC format, see AMD#23446 */ |
@@ -152,7 +152,7 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy) | |||
152 | busfreq = cpu_khz / max_multiplier; | 152 | busfreq = cpu_khz / max_multiplier; |
153 | 153 | ||
154 | /* table init */ | 154 | /* table init */ |
155 | for (i=0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) { | 155 | for (i=0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) { |
156 | if (clock_ratio[i].index > max_multiplier) | 156 | if (clock_ratio[i].index > max_multiplier) |
157 | clock_ratio[i].frequency = CPUFREQ_ENTRY_INVALID; | 157 | clock_ratio[i].frequency = CPUFREQ_ENTRY_INVALID; |
158 | else | 158 | else |
@@ -182,7 +182,7 @@ static int powernow_k6_cpu_exit(struct cpufreq_policy *policy) | |||
182 | powernow_k6_set_state(i); | 182 | powernow_k6_set_state(i); |
183 | } | 183 | } |
184 | cpufreq_frequency_table_put_attr(policy->cpu); | 184 | cpufreq_frequency_table_put_attr(policy->cpu); |
185 | return 0; | 185 | return 0; |
186 | } | 186 | } |
187 | 187 | ||
188 | static unsigned int powernow_k6_get(unsigned int cpu) | 188 | static unsigned int powernow_k6_get(unsigned int cpu) |
@@ -196,8 +196,8 @@ static struct freq_attr* powernow_k6_attr[] = { | |||
196 | }; | 196 | }; |
197 | 197 | ||
198 | static struct cpufreq_driver powernow_k6_driver = { | 198 | static struct cpufreq_driver powernow_k6_driver = { |
199 | .verify = powernow_k6_verify, | 199 | .verify = powernow_k6_verify, |
200 | .target = powernow_k6_target, | 200 | .target = powernow_k6_target, |
201 | .init = powernow_k6_cpu_init, | 201 | .init = powernow_k6_cpu_init, |
202 | .exit = powernow_k6_cpu_exit, | 202 | .exit = powernow_k6_cpu_exit, |
203 | .get = powernow_k6_get, | 203 | .get = powernow_k6_get, |
@@ -215,7 +215,7 @@ static struct cpufreq_driver powernow_k6_driver = { | |||
215 | * on success. | 215 | * on success. |
216 | */ | 216 | */ |
217 | static int __init powernow_k6_init(void) | 217 | static int __init powernow_k6_init(void) |
218 | { | 218 | { |
219 | struct cpuinfo_x86 *c = cpu_data; | 219 | struct cpuinfo_x86 *c = cpu_data; |
220 | 220 | ||
221 | if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 != 5) || | 221 | if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 != 5) || |
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c index edcd626001da..2bf4237cb94e 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c | |||
@@ -199,8 +199,8 @@ static int get_ranges (unsigned char *pst) | |||
199 | powernow_table[j].index |= (vid << 8); /* upper 8 bits */ | 199 | powernow_table[j].index |= (vid << 8); /* upper 8 bits */ |
200 | 200 | ||
201 | dprintk (" FID: 0x%x (%d.%dx [%dMHz]) " | 201 | dprintk (" FID: 0x%x (%d.%dx [%dMHz]) " |
202 | "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, | 202 | "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, |
203 | fid_codes[fid] % 10, speed/1000, vid, | 203 | fid_codes[fid] % 10, speed/1000, vid, |
204 | mobile_vid_table[vid]/1000, | 204 | mobile_vid_table[vid]/1000, |
205 | mobile_vid_table[vid]%1000); | 205 | mobile_vid_table[vid]%1000); |
206 | } | 206 | } |
@@ -368,8 +368,8 @@ static int powernow_acpi_init(void) | |||
368 | } | 368 | } |
369 | 369 | ||
370 | dprintk (" FID: 0x%x (%d.%dx [%dMHz]) " | 370 | dprintk (" FID: 0x%x (%d.%dx [%dMHz]) " |
371 | "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, | 371 | "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, |
372 | fid_codes[fid] % 10, speed/1000, vid, | 372 | fid_codes[fid] % 10, speed/1000, vid, |
373 | mobile_vid_table[vid]/1000, | 373 | mobile_vid_table[vid]/1000, |
374 | mobile_vid_table[vid]%1000); | 374 | mobile_vid_table[vid]%1000); |
375 | 375 | ||
@@ -460,7 +460,7 @@ static int powernow_decode_bios (int maxfid, int startvid) | |||
460 | (maxfid==pst->maxfid) && (startvid==pst->startvid)) | 460 | (maxfid==pst->maxfid) && (startvid==pst->startvid)) |
461 | { | 461 | { |
462 | dprintk ("PST:%d (@%p)\n", i, pst); | 462 | dprintk ("PST:%d (@%p)\n", i, pst); |
463 | dprintk (" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n", | 463 | dprintk (" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n", |
464 | pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid); | 464 | pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid); |
465 | 465 | ||
466 | ret = get_ranges ((char *) pst + sizeof (struct pst_s)); | 466 | ret = get_ranges ((char *) pst + sizeof (struct pst_s)); |
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index e11a09207ec8..e5bc06480ff9 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -45,7 +45,7 @@ | |||
45 | 45 | ||
46 | #define PFX "powernow-k8: " | 46 | #define PFX "powernow-k8: " |
47 | #define BFX PFX "BIOS error: " | 47 | #define BFX PFX "BIOS error: " |
48 | #define VERSION "version 1.60.0" | 48 | #define VERSION "version 1.60.1" |
49 | #include "powernow-k8.h" | 49 | #include "powernow-k8.h" |
50 | 50 | ||
51 | /* serialize freq changes */ | 51 | /* serialize freq changes */ |
@@ -54,7 +54,7 @@ static DECLARE_MUTEX(fidvid_sem); | |||
54 | static struct powernow_k8_data *powernow_data[NR_CPUS]; | 54 | static struct powernow_k8_data *powernow_data[NR_CPUS]; |
55 | 55 | ||
56 | #ifndef CONFIG_SMP | 56 | #ifndef CONFIG_SMP |
57 | static cpumask_t cpu_core_map[1]; | 57 | static cpumask_t cpu_core_map[1] = { CPU_MASK_ALL }; |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | /* Return a frequency in MHz, given an input fid */ | 60 | /* Return a frequency in MHz, given an input fid */ |
@@ -83,11 +83,10 @@ static u32 find_millivolts_from_vid(struct powernow_k8_data *data, u32 vid) | |||
83 | */ | 83 | */ |
84 | static u32 convert_fid_to_vco_fid(u32 fid) | 84 | static u32 convert_fid_to_vco_fid(u32 fid) |
85 | { | 85 | { |
86 | if (fid < HI_FID_TABLE_BOTTOM) { | 86 | if (fid < HI_FID_TABLE_BOTTOM) |
87 | return 8 + (2 * fid); | 87 | return 8 + (2 * fid); |
88 | } else { | 88 | else |
89 | return fid; | 89 | return fid; |
90 | } | ||
91 | } | 90 | } |
92 | 91 | ||
93 | /* | 92 | /* |
@@ -177,7 +176,7 @@ static int write_new_fid(struct powernow_k8_data *data, u32 fid) | |||
177 | if (i++ > 100) { | 176 | if (i++ > 100) { |
178 | printk(KERN_ERR PFX "internal error - pending bit very stuck - no further pstate changes possible\n"); | 177 | printk(KERN_ERR PFX "internal error - pending bit very stuck - no further pstate changes possible\n"); |
179 | return 1; | 178 | return 1; |
180 | } | 179 | } |
181 | } while (query_current_values_with_pending_wait(data)); | 180 | } while (query_current_values_with_pending_wait(data)); |
182 | 181 | ||
183 | count_off_irt(data); | 182 | count_off_irt(data); |
@@ -474,8 +473,10 @@ static int check_supported_cpu(unsigned int cpu) | |||
474 | goto out; | 473 | goto out; |
475 | 474 | ||
476 | eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE); | 475 | eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE); |
476 | if ((eax & CPUID_XFAM) != CPUID_XFAM_K8) | ||
477 | goto out; | ||
478 | |||
477 | if (((eax & CPUID_USE_XFAM_XMOD) != CPUID_USE_XFAM_XMOD) || | 479 | if (((eax & CPUID_USE_XFAM_XMOD) != CPUID_USE_XFAM_XMOD) || |
478 | ((eax & CPUID_XFAM) != CPUID_XFAM_K8) || | ||
479 | ((eax & CPUID_XMOD) > CPUID_XMOD_REV_G)) { | 480 | ((eax & CPUID_XMOD) > CPUID_XMOD_REV_G)) { |
480 | printk(KERN_INFO PFX "Processor cpuid %x not supported\n", eax); | 481 | printk(KERN_INFO PFX "Processor cpuid %x not supported\n", eax); |
481 | goto out; | 482 | goto out; |
@@ -780,9 +781,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
780 | /* verify only 1 entry from the lo frequency table */ | 781 | /* verify only 1 entry from the lo frequency table */ |
781 | if (fid < HI_FID_TABLE_BOTTOM) { | 782 | if (fid < HI_FID_TABLE_BOTTOM) { |
782 | if (cntlofreq) { | 783 | if (cntlofreq) { |
783 | /* if both entries are the same, ignore this | 784 | /* if both entries are the same, ignore this one ... */ |
784 | * one... | ||
785 | */ | ||
786 | if ((powernow_table[i].frequency != powernow_table[cntlofreq].frequency) || | 785 | if ((powernow_table[i].frequency != powernow_table[cntlofreq].frequency) || |
787 | (powernow_table[i].index != powernow_table[cntlofreq].index)) { | 786 | (powernow_table[i].index != powernow_table[cntlofreq].index)) { |
788 | printk(KERN_ERR PFX "Too many lo freq table entries\n"); | 787 | printk(KERN_ERR PFX "Too many lo freq table entries\n"); |
@@ -854,7 +853,7 @@ static int transition_frequency(struct powernow_k8_data *data, unsigned int inde | |||
854 | dprintk("cpu %d transition to index %u\n", smp_processor_id(), index); | 853 | dprintk("cpu %d transition to index %u\n", smp_processor_id(), index); |
855 | 854 | ||
856 | /* fid are the lower 8 bits of the index we stored into | 855 | /* fid are the lower 8 bits of the index we stored into |
857 | * the cpufreq frequency table in find_psb_table, vid are | 856 | * the cpufreq frequency table in find_psb_table, vid are |
858 | * the upper 8 bits. | 857 | * the upper 8 bits. |
859 | */ | 858 | */ |
860 | 859 | ||
@@ -909,7 +908,6 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi | |||
909 | u32 checkvid = data->currvid; | 908 | u32 checkvid = data->currvid; |
910 | unsigned int newstate; | 909 | unsigned int newstate; |
911 | int ret = -EIO; | 910 | int ret = -EIO; |
912 | int i; | ||
913 | 911 | ||
914 | /* only run on specific CPU from here on */ | 912 | /* only run on specific CPU from here on */ |
915 | oldmask = current->cpus_allowed; | 913 | oldmask = current->cpus_allowed; |
@@ -955,12 +953,6 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi | |||
955 | up(&fidvid_sem); | 953 | up(&fidvid_sem); |
956 | goto err_out; | 954 | goto err_out; |
957 | } | 955 | } |
958 | |||
959 | /* Update all the fid/vids of our siblings */ | ||
960 | for_each_cpu_mask(i, cpu_core_map[pol->cpu]) { | ||
961 | powernow_data[i]->currvid = data->currvid; | ||
962 | powernow_data[i]->currfid = data->currfid; | ||
963 | } | ||
964 | up(&fidvid_sem); | 956 | up(&fidvid_sem); |
965 | 957 | ||
966 | pol->cur = find_khz_freq_from_fid(data->currfid); | 958 | pol->cur = find_khz_freq_from_fid(data->currfid); |
@@ -1048,7 +1040,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1048 | pol->governor = CPUFREQ_DEFAULT_GOVERNOR; | 1040 | pol->governor = CPUFREQ_DEFAULT_GOVERNOR; |
1049 | pol->cpus = cpu_core_map[pol->cpu]; | 1041 | pol->cpus = cpu_core_map[pol->cpu]; |
1050 | 1042 | ||
1051 | /* Take a crude guess here. | 1043 | /* Take a crude guess here. |
1052 | * That guess was in microseconds, so multiply with 1000 */ | 1044 | * That guess was in microseconds, so multiply with 1000 */ |
1053 | pol->cpuinfo.transition_latency = (((data->rvo + 8) * data->vstable * VST_UNITS_20US) | 1045 | pol->cpuinfo.transition_latency = (((data->rvo + 8) * data->vstable * VST_UNITS_20US) |
1054 | + (3 * (1 << data->irt) * 10)) * 1000; | 1046 | + (3 * (1 << data->irt) * 10)) * 1000; |
@@ -1070,9 +1062,8 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1070 | printk("cpu_init done, current fid 0x%x, vid 0x%x\n", | 1062 | printk("cpu_init done, current fid 0x%x, vid 0x%x\n", |
1071 | data->currfid, data->currvid); | 1063 | data->currfid, data->currvid); |
1072 | 1064 | ||
1073 | for_each_cpu_mask(i, cpu_core_map[pol->cpu]) { | 1065 | for_each_cpu_mask(i, cpu_core_map[pol->cpu]) |
1074 | powernow_data[i] = data; | 1066 | powernow_data[i] = data; |
1075 | } | ||
1076 | 1067 | ||
1077 | return 0; | 1068 | return 0; |
1078 | 1069 | ||
@@ -1145,16 +1136,14 @@ static int __cpuinit powernowk8_init(void) | |||
1145 | { | 1136 | { |
1146 | unsigned int i, supported_cpus = 0; | 1137 | unsigned int i, supported_cpus = 0; |
1147 | 1138 | ||
1148 | for (i=0; i<NR_CPUS; i++) { | 1139 | for_each_online_cpu(i) { |
1149 | if (!cpu_online(i)) | ||
1150 | continue; | ||
1151 | if (check_supported_cpu(i)) | 1140 | if (check_supported_cpu(i)) |
1152 | supported_cpus++; | 1141 | supported_cpus++; |
1153 | } | 1142 | } |
1154 | 1143 | ||
1155 | if (supported_cpus == num_online_cpus()) { | 1144 | if (supported_cpus == num_online_cpus()) { |
1156 | printk(KERN_INFO PFX "Found %d AMD Athlon 64 / Opteron processors (" VERSION ")\n", | 1145 | printk(KERN_INFO PFX "Found %d AMD Athlon 64 / Opteron " |
1157 | supported_cpus); | 1146 | "processors (" VERSION ")\n", supported_cpus); |
1158 | return cpufreq_register_driver(&cpufreq_amd64_driver); | 1147 | return cpufreq_register_driver(&cpufreq_amd64_driver); |
1159 | } | 1148 | } |
1160 | 1149 | ||
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h index d0de37d58e9a..00ea899c17e1 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h | |||
@@ -63,7 +63,7 @@ struct powernow_k8_data { | |||
63 | #define MSR_C_LO_VID_SHIFT 8 | 63 | #define MSR_C_LO_VID_SHIFT 8 |
64 | 64 | ||
65 | /* Field definitions within the FID VID High Control MSR : */ | 65 | /* Field definitions within the FID VID High Control MSR : */ |
66 | #define MSR_C_HI_STP_GNT_TO 0x000fffff | 66 | #define MSR_C_HI_STP_GNT_TO 0x000fffff |
67 | 67 | ||
68 | /* Field definitions within the FID VID Low Status MSR : */ | 68 | /* Field definitions within the FID VID Low Status MSR : */ |
69 | #define MSR_S_LO_CHANGE_PENDING 0x80000000 /* cleared when completed */ | 69 | #define MSR_S_LO_CHANGE_PENDING 0x80000000 /* cleared when completed */ |
@@ -123,7 +123,7 @@ struct powernow_k8_data { | |||
123 | * Most values of interest are enocoded in a single field of the _PSS | 123 | * Most values of interest are enocoded in a single field of the _PSS |
124 | * entries: the "control" value. | 124 | * entries: the "control" value. |
125 | */ | 125 | */ |
126 | 126 | ||
127 | #define IRT_SHIFT 30 | 127 | #define IRT_SHIFT 30 |
128 | #define RVO_SHIFT 28 | 128 | #define RVO_SHIFT 28 |
129 | #define EXT_TYPE_SHIFT 27 | 129 | #define EXT_TYPE_SHIFT 27 |
@@ -185,7 +185,7 @@ static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned | |||
185 | #ifndef for_each_cpu_mask | 185 | #ifndef for_each_cpu_mask |
186 | #define for_each_cpu_mask(i,mask) for (i=0;i<1;i++) | 186 | #define for_each_cpu_mask(i,mask) for (i=0;i<1;i++) |
187 | #endif | 187 | #endif |
188 | 188 | ||
189 | #ifdef CONFIG_SMP | 189 | #ifdef CONFIG_SMP |
190 | static inline void define_siblings(int cpu, cpumask_t cpu_sharedcore_mask[]) | 190 | static inline void define_siblings(int cpu, cpumask_t cpu_sharedcore_mask[]) |
191 | { | 191 | { |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c index c173c0fa117a..b0ff9075708c 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -479,15 +479,13 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) | |||
479 | unsigned l, h; | 479 | unsigned l, h; |
480 | int ret; | 480 | int ret; |
481 | int i; | 481 | int i; |
482 | struct cpuinfo_x86 *c = &cpu_data[policy->cpu]; | ||
483 | 482 | ||
484 | /* Only Intel makes Enhanced Speedstep-capable CPUs */ | 483 | /* Only Intel makes Enhanced Speedstep-capable CPUs */ |
485 | if (cpu->x86_vendor != X86_VENDOR_INTEL || !cpu_has(cpu, X86_FEATURE_EST)) | 484 | if (cpu->x86_vendor != X86_VENDOR_INTEL || !cpu_has(cpu, X86_FEATURE_EST)) |
486 | return -ENODEV; | 485 | return -ENODEV; |
487 | 486 | ||
488 | if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) { | 487 | if (cpu_has(cpu, X86_FEATURE_CONSTANT_TSC)) |
489 | centrino_driver.flags |= CPUFREQ_CONST_LOOPS; | 488 | centrino_driver.flags |= CPUFREQ_CONST_LOOPS; |
490 | } | ||
491 | 489 | ||
492 | if (centrino_cpu_init_acpi(policy)) { | 490 | if (centrino_cpu_init_acpi(policy)) { |
493 | if (policy->cpu != 0) | 491 | if (policy->cpu != 0) |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c index 7c47005a1805..4f46cac155c4 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c | |||
@@ -9,7 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/moduleparam.h> | 13 | #include <linux/moduleparam.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/cpufreq.h> | 15 | #include <linux/cpufreq.h> |
@@ -36,8 +36,8 @@ static unsigned int pentium3_get_frequency (unsigned int processor) | |||
36 | /* See table 14 of p3_ds.pdf and table 22 of 29834003.pdf */ | 36 | /* See table 14 of p3_ds.pdf and table 22 of 29834003.pdf */ |
37 | struct { | 37 | struct { |
38 | unsigned int ratio; /* Frequency Multiplier (x10) */ | 38 | unsigned int ratio; /* Frequency Multiplier (x10) */ |
39 | u8 bitmap; /* power on configuration bits | 39 | u8 bitmap; /* power on configuration bits |
40 | [27, 25:22] (in MSR 0x2a) */ | 40 | [27, 25:22] (in MSR 0x2a) */ |
41 | } msr_decode_mult [] = { | 41 | } msr_decode_mult [] = { |
42 | { 30, 0x01 }, | 42 | { 30, 0x01 }, |
43 | { 35, 0x05 }, | 43 | { 35, 0x05 }, |
@@ -58,9 +58,9 @@ static unsigned int pentium3_get_frequency (unsigned int processor) | |||
58 | 58 | ||
59 | /* PIII(-M) FSB settings: see table b1-b of 24547206.pdf */ | 59 | /* PIII(-M) FSB settings: see table b1-b of 24547206.pdf */ |
60 | struct { | 60 | struct { |
61 | unsigned int value; /* Front Side Bus speed in MHz */ | 61 | unsigned int value; /* Front Side Bus speed in MHz */ |
62 | u8 bitmap; /* power on configuration bits [18: 19] | 62 | u8 bitmap; /* power on configuration bits [18: 19] |
63 | (in MSR 0x2a) */ | 63 | (in MSR 0x2a) */ |
64 | } msr_decode_fsb [] = { | 64 | } msr_decode_fsb [] = { |
65 | { 66, 0x0 }, | 65 | { 66, 0x0 }, |
66 | { 100, 0x2 }, | 66 | { 100, 0x2 }, |
@@ -68,8 +68,8 @@ static unsigned int pentium3_get_frequency (unsigned int processor) | |||
68 | { 0, 0xff} | 68 | { 0, 0xff} |
69 | }; | 69 | }; |
70 | 70 | ||
71 | u32 msr_lo, msr_tmp; | 71 | u32 msr_lo, msr_tmp; |
72 | int i = 0, j = 0; | 72 | int i = 0, j = 0; |
73 | 73 | ||
74 | /* read MSR 0x2a - we only need the low 32 bits */ | 74 | /* read MSR 0x2a - we only need the low 32 bits */ |
75 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); | 75 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); |
@@ -106,7 +106,7 @@ static unsigned int pentium3_get_frequency (unsigned int processor) | |||
106 | 106 | ||
107 | static unsigned int pentiumM_get_frequency(void) | 107 | static unsigned int pentiumM_get_frequency(void) |
108 | { | 108 | { |
109 | u32 msr_lo, msr_tmp; | 109 | u32 msr_lo, msr_tmp; |
110 | 110 | ||
111 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); | 111 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); |
112 | dprintk("PM - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); | 112 | dprintk("PM - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); |
@@ -134,7 +134,7 @@ static unsigned int pentium4_get_frequency(void) | |||
134 | 134 | ||
135 | dprintk("P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi); | 135 | dprintk("P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi); |
136 | 136 | ||
137 | /* decode the FSB: see IA-32 Intel (C) Architecture Software | 137 | /* decode the FSB: see IA-32 Intel (C) Architecture Software |
138 | * Developer's Manual, Volume 3: System Prgramming Guide, | 138 | * Developer's Manual, Volume 3: System Prgramming Guide, |
139 | * revision #12 in Table B-1: MSRs in the Pentium 4 and | 139 | * revision #12 in Table B-1: MSRs in the Pentium 4 and |
140 | * Intel Xeon Processors, on page B-4 and B-5. | 140 | * Intel Xeon Processors, on page B-4 and B-5. |
@@ -170,7 +170,7 @@ static unsigned int pentium4_get_frequency(void) | |||
170 | return (fsb * mult); | 170 | return (fsb * mult); |
171 | } | 171 | } |
172 | 172 | ||
173 | 173 | ||
174 | unsigned int speedstep_get_processor_frequency(unsigned int processor) | 174 | unsigned int speedstep_get_processor_frequency(unsigned int processor) |
175 | { | 175 | { |
176 | switch (processor) { | 176 | switch (processor) { |
@@ -198,11 +198,11 @@ EXPORT_SYMBOL_GPL(speedstep_get_processor_frequency); | |||
198 | unsigned int speedstep_detect_processor (void) | 198 | unsigned int speedstep_detect_processor (void) |
199 | { | 199 | { |
200 | struct cpuinfo_x86 *c = cpu_data; | 200 | struct cpuinfo_x86 *c = cpu_data; |
201 | u32 ebx, msr_lo, msr_hi; | 201 | u32 ebx, msr_lo, msr_hi; |
202 | 202 | ||
203 | dprintk("x86: %x, model: %x\n", c->x86, c->x86_model); | 203 | dprintk("x86: %x, model: %x\n", c->x86, c->x86_model); |
204 | 204 | ||
205 | if ((c->x86_vendor != X86_VENDOR_INTEL) || | 205 | if ((c->x86_vendor != X86_VENDOR_INTEL) || |
206 | ((c->x86 != 6) && (c->x86 != 0xF))) | 206 | ((c->x86 != 6) && (c->x86 != 0xF))) |
207 | return 0; | 207 | return 0; |
208 | 208 | ||
@@ -218,15 +218,15 @@ unsigned int speedstep_detect_processor (void) | |||
218 | dprintk("ebx value is %x, x86_mask is %x\n", ebx, c->x86_mask); | 218 | dprintk("ebx value is %x, x86_mask is %x\n", ebx, c->x86_mask); |
219 | 219 | ||
220 | switch (c->x86_mask) { | 220 | switch (c->x86_mask) { |
221 | case 4: | 221 | case 4: |
222 | /* | 222 | /* |
223 | * B-stepping [M-P4-M] | 223 | * B-stepping [M-P4-M] |
224 | * sample has ebx = 0x0f, production has 0x0e. | 224 | * sample has ebx = 0x0f, production has 0x0e. |
225 | */ | 225 | */ |
226 | if ((ebx == 0x0e) || (ebx == 0x0f)) | 226 | if ((ebx == 0x0e) || (ebx == 0x0f)) |
227 | return SPEEDSTEP_PROCESSOR_P4M; | 227 | return SPEEDSTEP_PROCESSOR_P4M; |
228 | break; | 228 | break; |
229 | case 7: | 229 | case 7: |
230 | /* | 230 | /* |
231 | * C-stepping [M-P4-M] | 231 | * C-stepping [M-P4-M] |
232 | * needs to have ebx=0x0e, else it's a celeron: | 232 | * needs to have ebx=0x0e, else it's a celeron: |
@@ -253,7 +253,7 @@ unsigned int speedstep_detect_processor (void) | |||
253 | * also, M-P4M HTs have ebx=0x8, too | 253 | * also, M-P4M HTs have ebx=0x8, too |
254 | * For now, they are distinguished by the model_id string | 254 | * For now, they are distinguished by the model_id string |
255 | */ | 255 | */ |
256 | if ((ebx == 0x0e) || (strstr(c->x86_model_id,"Mobile Intel(R) Pentium(R) 4") != NULL)) | 256 | if ((ebx == 0x0e) || (strstr(c->x86_model_id,"Mobile Intel(R) Pentium(R) 4") != NULL)) |
257 | return SPEEDSTEP_PROCESSOR_P4M; | 257 | return SPEEDSTEP_PROCESSOR_P4M; |
258 | break; | 258 | break; |
259 | default: | 259 | default: |
@@ -264,8 +264,7 @@ unsigned int speedstep_detect_processor (void) | |||
264 | 264 | ||
265 | switch (c->x86_model) { | 265 | switch (c->x86_model) { |
266 | case 0x0B: /* Intel PIII [Tualatin] */ | 266 | case 0x0B: /* Intel PIII [Tualatin] */ |
267 | /* cpuid_ebx(1) is 0x04 for desktop PIII, | 267 | /* cpuid_ebx(1) is 0x04 for desktop PIII, 0x06 for mobile PIII-M */ |
268 | 0x06 for mobile PIII-M */ | ||
269 | ebx = cpuid_ebx(0x00000001); | 268 | ebx = cpuid_ebx(0x00000001); |
270 | dprintk("ebx is %x\n", ebx); | 269 | dprintk("ebx is %x\n", ebx); |
271 | 270 | ||
@@ -275,9 +274,8 @@ unsigned int speedstep_detect_processor (void) | |||
275 | return 0; | 274 | return 0; |
276 | 275 | ||
277 | /* So far all PIII-M processors support SpeedStep. See | 276 | /* So far all PIII-M processors support SpeedStep. See |
278 | * Intel's 24540640.pdf of June 2003 | 277 | * Intel's 24540640.pdf of June 2003 |
279 | */ | 278 | */ |
280 | |||
281 | return SPEEDSTEP_PROCESSOR_PIII_T; | 279 | return SPEEDSTEP_PROCESSOR_PIII_T; |
282 | 280 | ||
283 | case 0x08: /* Intel PIII [Coppermine] */ | 281 | case 0x08: /* Intel PIII [Coppermine] */ |
@@ -399,7 +397,7 @@ unsigned int speedstep_get_freqs(unsigned int processor, | |||
399 | } | 397 | } |
400 | } | 398 | } |
401 | 399 | ||
402 | out: | 400 | out: |
403 | local_irq_restore(flags); | 401 | local_irq_restore(flags); |
404 | return (ret); | 402 | return (ret); |
405 | } | 403 | } |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.h b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.h index 6a727fd3a77e..b735429c50b4 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.h +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #define SPEEDSTEP_PROCESSOR_PIII_C_EARLY 0x00000001 /* Coppermine core */ | 15 | #define SPEEDSTEP_PROCESSOR_PIII_C_EARLY 0x00000001 /* Coppermine core */ |
16 | #define SPEEDSTEP_PROCESSOR_PIII_C 0x00000002 /* Coppermine core */ | 16 | #define SPEEDSTEP_PROCESSOR_PIII_C 0x00000002 /* Coppermine core */ |
17 | #define SPEEDSTEP_PROCESSOR_PIII_T 0x00000003 /* Tualatin core */ | 17 | #define SPEEDSTEP_PROCESSOR_PIII_T 0x00000003 /* Tualatin core */ |
18 | #define SPEEDSTEP_PROCESSOR_P4M 0x00000004 /* P4-M */ | 18 | #define SPEEDSTEP_PROCESSOR_P4M 0x00000004 /* P4-M */ |
19 | 19 | ||
20 | /* the following processors are not speedstep-capable and are not auto-detected | 20 | /* the following processors are not speedstep-capable and are not auto-detected |
@@ -25,8 +25,8 @@ | |||
25 | 25 | ||
26 | /* speedstep states -- only two of them */ | 26 | /* speedstep states -- only two of them */ |
27 | 27 | ||
28 | #define SPEEDSTEP_HIGH 0x00000000 | 28 | #define SPEEDSTEP_HIGH 0x00000000 |
29 | #define SPEEDSTEP_LOW 0x00000001 | 29 | #define SPEEDSTEP_LOW 0x00000001 |
30 | 30 | ||
31 | 31 | ||
32 | /* detect a speedstep-capable processor */ | 32 | /* detect a speedstep-capable processor */ |
@@ -36,13 +36,13 @@ extern unsigned int speedstep_detect_processor (void); | |||
36 | extern unsigned int speedstep_get_processor_frequency(unsigned int processor); | 36 | extern unsigned int speedstep_get_processor_frequency(unsigned int processor); |
37 | 37 | ||
38 | 38 | ||
39 | /* detect the low and high speeds of the processor. The callback | 39 | /* detect the low and high speeds of the processor. The callback |
40 | * set_state"'s first argument is either SPEEDSTEP_HIGH or | 40 | * set_state"'s first argument is either SPEEDSTEP_HIGH or |
41 | * SPEEDSTEP_LOW; the second argument is zero so that no | 41 | * SPEEDSTEP_LOW; the second argument is zero so that no |
42 | * cpufreq_notify_transition calls are initiated. | 42 | * cpufreq_notify_transition calls are initiated. |
43 | */ | 43 | */ |
44 | extern unsigned int speedstep_get_freqs(unsigned int processor, | 44 | extern unsigned int speedstep_get_freqs(unsigned int processor, |
45 | unsigned int *low_speed, | 45 | unsigned int *low_speed, |
46 | unsigned int *high_speed, | 46 | unsigned int *high_speed, |
47 | unsigned int *transition_latency, | 47 | unsigned int *transition_latency, |
48 | void (*set_state) (unsigned int state)); | 48 | void (*set_state) (unsigned int state)); |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c index 28cc5d524afc..c28333d53646 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c | |||
@@ -13,8 +13,8 @@ | |||
13 | *********************************************************************/ | 13 | *********************************************************************/ |
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/moduleparam.h> | 17 | #include <linux/moduleparam.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/cpufreq.h> | 19 | #include <linux/cpufreq.h> |
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
@@ -28,21 +28,21 @@ | |||
28 | * | 28 | * |
29 | * These parameters are got from IST-SMI BIOS call. | 29 | * These parameters are got from IST-SMI BIOS call. |
30 | * If user gives it, these are used. | 30 | * If user gives it, these are used. |
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | static int smi_port = 0; | 33 | static int smi_port = 0; |
34 | static int smi_cmd = 0; | 34 | static int smi_cmd = 0; |
35 | static unsigned int smi_sig = 0; | 35 | static unsigned int smi_sig = 0; |
36 | 36 | ||
37 | /* info about the processor */ | 37 | /* info about the processor */ |
38 | static unsigned int speedstep_processor = 0; | 38 | static unsigned int speedstep_processor = 0; |
39 | 39 | ||
40 | /* | 40 | /* |
41 | * There are only two frequency states for each processor. Values | 41 | * There are only two frequency states for each processor. Values |
42 | * are in kHz for the time being. | 42 | * are in kHz for the time being. |
43 | */ | 43 | */ |
44 | static struct cpufreq_frequency_table speedstep_freqs[] = { | 44 | static struct cpufreq_frequency_table speedstep_freqs[] = { |
45 | {SPEEDSTEP_HIGH, 0}, | 45 | {SPEEDSTEP_HIGH, 0}, |
46 | {SPEEDSTEP_LOW, 0}, | 46 | {SPEEDSTEP_LOW, 0}, |
47 | {0, CPUFREQ_TABLE_END}, | 47 | {0, CPUFREQ_TABLE_END}, |
48 | }; | 48 | }; |
@@ -75,7 +75,9 @@ static int speedstep_smi_ownership (void) | |||
75 | __asm__ __volatile__( | 75 | __asm__ __volatile__( |
76 | "out %%al, (%%dx)\n" | 76 | "out %%al, (%%dx)\n" |
77 | : "=D" (result) | 77 | : "=D" (result) |
78 | : "a" (command), "b" (function), "c" (0), "d" (smi_port), "D" (0), "S" (magic) | 78 | : "a" (command), "b" (function), "c" (0), "d" (smi_port), |
79 | "D" (0), "S" (magic) | ||
80 | : "memory" | ||
79 | ); | 81 | ); |
80 | 82 | ||
81 | dprintk("result is %x\n", result); | 83 | dprintk("result is %x\n", result); |
@@ -123,7 +125,7 @@ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high) | |||
123 | *low = low_mhz * 1000; | 125 | *low = low_mhz * 1000; |
124 | 126 | ||
125 | return result; | 127 | return result; |
126 | } | 128 | } |
127 | 129 | ||
128 | /** | 130 | /** |
129 | * speedstep_get_state - set the SpeedStep state | 131 | * speedstep_get_state - set the SpeedStep state |
@@ -204,7 +206,7 @@ static void speedstep_set_state (unsigned int state) | |||
204 | * speedstep_target - set a new CPUFreq policy | 206 | * speedstep_target - set a new CPUFreq policy |
205 | * @policy: new policy | 207 | * @policy: new policy |
206 | * @target_freq: new freq | 208 | * @target_freq: new freq |
207 | * @relation: | 209 | * @relation: |
208 | * | 210 | * |
209 | * Sets a new CPUFreq policy/freq. | 211 | * Sets a new CPUFreq policy/freq. |
210 | */ | 212 | */ |
@@ -283,7 +285,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) | |||
283 | state = speedstep_get_state(); | 285 | state = speedstep_get_state(); |
284 | speed = speedstep_freqs[state].frequency; | 286 | speed = speedstep_freqs[state].frequency; |
285 | 287 | ||
286 | dprintk("currently at %s speed setting - %i MHz\n", | 288 | dprintk("currently at %s speed setting - %i MHz\n", |
287 | (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency) ? "low" : "high", | 289 | (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency) ? "low" : "high", |
288 | (speed / 1000)); | 290 | (speed / 1000)); |
289 | 291 | ||
@@ -296,7 +298,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) | |||
296 | if (result) | 298 | if (result) |
297 | return (result); | 299 | return (result); |
298 | 300 | ||
299 | cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu); | 301 | cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu); |
300 | 302 | ||
301 | return 0; | 303 | return 0; |
302 | } | 304 | } |
@@ -332,8 +334,8 @@ static struct freq_attr* speedstep_attr[] = { | |||
332 | 334 | ||
333 | static struct cpufreq_driver speedstep_driver = { | 335 | static struct cpufreq_driver speedstep_driver = { |
334 | .name = "speedstep-smi", | 336 | .name = "speedstep-smi", |
335 | .verify = speedstep_verify, | 337 | .verify = speedstep_verify, |
336 | .target = speedstep_target, | 338 | .target = speedstep_target, |
337 | .init = speedstep_cpu_init, | 339 | .init = speedstep_cpu_init, |
338 | .exit = speedstep_cpu_exit, | 340 | .exit = speedstep_cpu_exit, |
339 | .get = speedstep_get, | 341 | .get = speedstep_get, |
@@ -370,13 +372,12 @@ static int __init speedstep_init(void) | |||
370 | return -ENODEV; | 372 | return -ENODEV; |
371 | } | 373 | } |
372 | 374 | ||
373 | dprintk("signature:0x%.8lx, command:0x%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n", | 375 | dprintk("signature:0x%.8lx, command:0x%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n", |
374 | ist_info.signature, ist_info.command, ist_info.event, ist_info.perf_level); | 376 | ist_info.signature, ist_info.command, ist_info.event, ist_info.perf_level); |
375 | 377 | ||
376 | 378 | /* Error if no IST-SMI BIOS or no PARM | |
377 | /* Error if no IST-SMI BIOS or no PARM | ||
378 | sig= 'ISGE' aka 'Intel Speedstep Gate E' */ | 379 | sig= 'ISGE' aka 'Intel Speedstep Gate E' */ |
379 | if ((ist_info.signature != 0x47534943) && ( | 380 | if ((ist_info.signature != 0x47534943) && ( |
380 | (smi_port == 0) || (smi_cmd == 0))) | 381 | (smi_port == 0) || (smi_cmd == 0))) |
381 | return -ENODEV; | 382 | return -ENODEV; |
382 | 383 | ||
@@ -386,17 +387,15 @@ static int __init speedstep_init(void) | |||
386 | smi_sig = ist_info.signature; | 387 | smi_sig = ist_info.signature; |
387 | 388 | ||
388 | /* setup smi_port from MODLULE_PARM or BIOS */ | 389 | /* setup smi_port from MODLULE_PARM or BIOS */ |
389 | if ((smi_port > 0xff) || (smi_port < 0)) { | 390 | if ((smi_port > 0xff) || (smi_port < 0)) |
390 | return -EINVAL; | 391 | return -EINVAL; |
391 | } else if (smi_port == 0) { | 392 | else if (smi_port == 0) |
392 | smi_port = ist_info.command & 0xff; | 393 | smi_port = ist_info.command & 0xff; |
393 | } | ||
394 | 394 | ||
395 | if ((smi_cmd > 0xff) || (smi_cmd < 0)) { | 395 | if ((smi_cmd > 0xff) || (smi_cmd < 0)) |
396 | return -EINVAL; | 396 | return -EINVAL; |
397 | } else if (smi_cmd == 0) { | 397 | else if (smi_cmd == 0) |
398 | smi_cmd = (ist_info.command >> 16) & 0xff; | 398 | smi_cmd = (ist_info.command >> 16) & 0xff; |
399 | } | ||
400 | 399 | ||
401 | return cpufreq_register_driver(&speedstep_driver); | 400 | return cpufreq_register_driver(&speedstep_driver); |
402 | } | 401 | } |
diff --git a/arch/i386/kernel/cpu/intel.c b/arch/i386/kernel/cpu/intel.c index 8c0120186b9f..5386b29bb5a5 100644 --- a/arch/i386/kernel/cpu/intel.c +++ b/arch/i386/kernel/cpu/intel.c | |||
@@ -29,7 +29,7 @@ extern int trap_init_f00f_bug(void); | |||
29 | struct movsl_mask movsl_mask __read_mostly; | 29 | struct movsl_mask movsl_mask __read_mostly; |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | void __devinit early_intel_workaround(struct cpuinfo_x86 *c) | 32 | void __cpuinit early_intel_workaround(struct cpuinfo_x86 *c) |
33 | { | 33 | { |
34 | if (c->x86_vendor != X86_VENDOR_INTEL) | 34 | if (c->x86_vendor != X86_VENDOR_INTEL) |
35 | return; | 35 | return; |
@@ -44,7 +44,7 @@ void __devinit early_intel_workaround(struct cpuinfo_x86 *c) | |||
44 | * This is called before we do cpu ident work | 44 | * This is called before we do cpu ident work |
45 | */ | 45 | */ |
46 | 46 | ||
47 | int __devinit ppro_with_ram_bug(void) | 47 | int __cpuinit ppro_with_ram_bug(void) |
48 | { | 48 | { |
49 | /* Uses data from early_cpu_detect now */ | 49 | /* Uses data from early_cpu_detect now */ |
50 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && | 50 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && |
@@ -62,7 +62,7 @@ int __devinit ppro_with_ram_bug(void) | |||
62 | * P4 Xeon errata 037 workaround. | 62 | * P4 Xeon errata 037 workaround. |
63 | * Hardware prefetcher may cause stale data to be loaded into the cache. | 63 | * Hardware prefetcher may cause stale data to be loaded into the cache. |
64 | */ | 64 | */ |
65 | static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c) | 65 | static void __cpuinit Intel_errata_workarounds(struct cpuinfo_x86 *c) |
66 | { | 66 | { |
67 | unsigned long lo, hi; | 67 | unsigned long lo, hi; |
68 | 68 | ||
@@ -81,7 +81,7 @@ static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c) | |||
81 | /* | 81 | /* |
82 | * find out the number of processor cores on the die | 82 | * find out the number of processor cores on the die |
83 | */ | 83 | */ |
84 | static int __devinit num_cpu_cores(struct cpuinfo_x86 *c) | 84 | static int __cpuinit num_cpu_cores(struct cpuinfo_x86 *c) |
85 | { | 85 | { |
86 | unsigned int eax, ebx, ecx, edx; | 86 | unsigned int eax, ebx, ecx, edx; |
87 | 87 | ||
@@ -96,7 +96,7 @@ static int __devinit num_cpu_cores(struct cpuinfo_x86 *c) | |||
96 | return 1; | 96 | return 1; |
97 | } | 97 | } |
98 | 98 | ||
99 | static void __devinit init_intel(struct cpuinfo_x86 *c) | 99 | static void __cpuinit init_intel(struct cpuinfo_x86 *c) |
100 | { | 100 | { |
101 | unsigned int l2 = 0; | 101 | unsigned int l2 = 0; |
102 | char *p = NULL; | 102 | char *p = NULL; |
@@ -205,7 +205,7 @@ static unsigned int intel_size_cache(struct cpuinfo_x86 * c, unsigned int size) | |||
205 | return size; | 205 | return size; |
206 | } | 206 | } |
207 | 207 | ||
208 | static struct cpu_dev intel_cpu_dev __devinitdata = { | 208 | static struct cpu_dev intel_cpu_dev __cpuinitdata = { |
209 | .c_vendor = "Intel", | 209 | .c_vendor = "Intel", |
210 | .c_ident = { "GenuineIntel" }, | 210 | .c_ident = { "GenuineIntel" }, |
211 | .c_models = { | 211 | .c_models = { |
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c index ffe58cee0c48..ce61921369e5 100644 --- a/arch/i386/kernel/cpu/intel_cacheinfo.c +++ b/arch/i386/kernel/cpu/intel_cacheinfo.c | |||
@@ -174,7 +174,7 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) | |||
174 | unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ | 174 | unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ |
175 | unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ | 175 | unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ |
176 | 176 | ||
177 | if (c->cpuid_level > 4) { | 177 | if (c->cpuid_level > 3) { |
178 | static int is_initialized; | 178 | static int is_initialized; |
179 | 179 | ||
180 | if (is_initialized == 0) { | 180 | if (is_initialized == 0) { |
@@ -330,7 +330,7 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | |||
330 | } | 330 | } |
331 | } | 331 | } |
332 | } | 332 | } |
333 | static void __devinit cache_remove_shared_cpu_map(unsigned int cpu, int index) | 333 | static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int index) |
334 | { | 334 | { |
335 | struct _cpuid4_info *this_leaf, *sibling_leaf; | 335 | struct _cpuid4_info *this_leaf, *sibling_leaf; |
336 | int sibling; | 336 | int sibling; |
diff --git a/arch/i386/kernel/cpu/proc.c b/arch/i386/kernel/cpu/proc.c index 89a85af33d28..f94cdb7aca50 100644 --- a/arch/i386/kernel/cpu/proc.c +++ b/arch/i386/kernel/cpu/proc.c | |||
@@ -40,12 +40,12 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
40 | /* Other (Linux-defined) */ | 40 | /* Other (Linux-defined) */ |
41 | "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", | 41 | "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", |
42 | NULL, NULL, NULL, NULL, | 42 | NULL, NULL, NULL, NULL, |
43 | "constant_tsc", NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 43 | "constant_tsc", "up", NULL, NULL, NULL, NULL, NULL, NULL, |
44 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 44 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
45 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 45 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
46 | 46 | ||
47 | /* Intel-defined (#2) */ | 47 | /* Intel-defined (#2) */ |
48 | "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", NULL, "est", | 48 | "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est", |
49 | "tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL, | 49 | "tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL, |
50 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 50 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
51 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 51 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c index d49dbe8dc96b..e3c5fca0aa8a 100644 --- a/arch/i386/kernel/crash.c +++ b/arch/i386/kernel/crash.c | |||
@@ -105,7 +105,7 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu) | |||
105 | return 1; | 105 | return 1; |
106 | local_irq_disable(); | 106 | local_irq_disable(); |
107 | 107 | ||
108 | if (!user_mode(regs)) { | 108 | if (!user_mode_vm(regs)) { |
109 | crash_fixup_ss_esp(&fixed_regs, regs); | 109 | crash_fixup_ss_esp(&fixed_regs, regs); |
110 | regs = &fixed_regs; | 110 | regs = &fixed_regs; |
111 | } | 111 | } |
diff --git a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c index 6a93d75db431..ebc8dc116c43 100644 --- a/arch/i386/kernel/dmi_scan.c +++ b/arch/i386/kernel/dmi_scan.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/dmi.h> | 5 | #include <linux/dmi.h> |
6 | #include <linux/bootmem.h> | 6 | #include <linux/bootmem.h> |
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | #include <asm/dmi.h> | ||
8 | 9 | ||
9 | static char * __init dmi_string(struct dmi_header *dm, u8 s) | 10 | static char * __init dmi_string(struct dmi_header *dm, u8 s) |
10 | { | 11 | { |
@@ -106,7 +107,7 @@ static void __init dmi_save_devices(struct dmi_header *dm) | |||
106 | struct dmi_device *dev; | 107 | struct dmi_device *dev; |
107 | 108 | ||
108 | for (i = 0; i < count; i++) { | 109 | for (i = 0; i < count; i++) { |
109 | char *d = ((char *) dm) + (i * 2); | 110 | char *d = (char *)(dm + 1) + (i * 2); |
110 | 111 | ||
111 | /* Skip disabled device */ | 112 | /* Skip disabled device */ |
112 | if ((*d & 0x80) == 0) | 113 | if ((*d & 0x80) == 0) |
@@ -299,3 +300,33 @@ struct dmi_device * dmi_find_device(int type, const char *name, | |||
299 | return NULL; | 300 | return NULL; |
300 | } | 301 | } |
301 | EXPORT_SYMBOL(dmi_find_device); | 302 | EXPORT_SYMBOL(dmi_find_device); |
303 | |||
304 | /** | ||
305 | * dmi_get_year - Return year of a DMI date | ||
306 | * @field: data index (like dmi_get_system_info) | ||
307 | * | ||
308 | * Returns -1 when the field doesn't exist. 0 when it is broken. | ||
309 | */ | ||
310 | int dmi_get_year(int field) | ||
311 | { | ||
312 | int year; | ||
313 | char *s = dmi_get_system_info(field); | ||
314 | |||
315 | if (!s) | ||
316 | return -1; | ||
317 | if (*s == '\0') | ||
318 | return 0; | ||
319 | s = strrchr(s, '/'); | ||
320 | if (!s) | ||
321 | return 0; | ||
322 | |||
323 | s += 1; | ||
324 | year = simple_strtoul(s, NULL, 0); | ||
325 | if (year && year < 100) { /* 2-digit year */ | ||
326 | year += 1900; | ||
327 | if (year < 1996) /* no dates < spec 1.0 */ | ||
328 | year += 100; | ||
329 | } | ||
330 | |||
331 | return year; | ||
332 | } | ||
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c index c9cad7ba0d2d..7ec6cfa01fb3 100644 --- a/arch/i386/kernel/efi.c +++ b/arch/i386/kernel/efi.c | |||
@@ -115,7 +115,7 @@ static void efi_call_phys_epilog(void) | |||
115 | unsigned long cr4; | 115 | unsigned long cr4; |
116 | struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0); | 116 | struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0); |
117 | 117 | ||
118 | cpu_gdt_descr->address = __va(cpu_gdt_descr->address); | 118 | cpu_gdt_descr->address = (unsigned long)__va(cpu_gdt_descr->address); |
119 | load_gdt(cpu_gdt_descr); | 119 | load_gdt(cpu_gdt_descr); |
120 | 120 | ||
121 | cr4 = read_cr4(); | 121 | cr4 = read_cr4(); |
@@ -543,7 +543,7 @@ efi_initialize_iomem_resources(struct resource *code_resource, | |||
543 | if ((md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) > | 543 | if ((md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) > |
544 | 0x100000000ULL) | 544 | 0x100000000ULL) |
545 | continue; | 545 | continue; |
546 | res = alloc_bootmem_low(sizeof(struct resource)); | 546 | res = kzalloc(sizeof(struct resource), GFP_ATOMIC); |
547 | switch (md->type) { | 547 | switch (md->type) { |
548 | case EFI_RESERVED_TYPE: | 548 | case EFI_RESERVED_TYPE: |
549 | res->name = "Reserved Memory"; | 549 | res->name = "Reserved Memory"; |
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index 4d704724b2f5..cfc683f153b9 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S | |||
@@ -226,6 +226,10 @@ ENTRY(system_call) | |||
226 | pushl %eax # save orig_eax | 226 | pushl %eax # save orig_eax |
227 | SAVE_ALL | 227 | SAVE_ALL |
228 | GET_THREAD_INFO(%ebp) | 228 | GET_THREAD_INFO(%ebp) |
229 | testl $TF_MASK,EFLAGS(%esp) | ||
230 | jz no_singlestep | ||
231 | orl $_TIF_SINGLESTEP,TI_flags(%ebp) | ||
232 | no_singlestep: | ||
229 | # system call tracing in operation / emulation | 233 | # system call tracing in operation / emulation |
230 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ | 234 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ |
231 | testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) | 235 | testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) |
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index e0b7c632efbc..3debc2e26542 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S | |||
@@ -450,7 +450,6 @@ int_msg: | |||
450 | 450 | ||
451 | .globl boot_gdt_descr | 451 | .globl boot_gdt_descr |
452 | .globl idt_descr | 452 | .globl idt_descr |
453 | .globl cpu_gdt_descr | ||
454 | 453 | ||
455 | ALIGN | 454 | ALIGN |
456 | # early boot GDT descriptor (must use 1:1 address mapping) | 455 | # early boot GDT descriptor (must use 1:1 address mapping) |
@@ -470,8 +469,6 @@ cpu_gdt_descr: | |||
470 | .word GDT_ENTRIES*8-1 | 469 | .word GDT_ENTRIES*8-1 |
471 | .long cpu_gdt_table | 470 | .long cpu_gdt_table |
472 | 471 | ||
473 | .fill NR_CPUS-1,8,0 # space for the other GDT descriptors | ||
474 | |||
475 | /* | 472 | /* |
476 | * The boot_gdt_table must mirror the equivalent in setup.S and is | 473 | * The boot_gdt_table must mirror the equivalent in setup.S and is |
477 | * used only for booting. | 474 | * used only for booting. |
@@ -485,7 +482,7 @@ ENTRY(boot_gdt_table) | |||
485 | /* | 482 | /* |
486 | * The Global Descriptor Table contains 28 quadwords, per-CPU. | 483 | * The Global Descriptor Table contains 28 quadwords, per-CPU. |
487 | */ | 484 | */ |
488 | .align PAGE_SIZE_asm | 485 | .align L1_CACHE_BYTES |
489 | ENTRY(cpu_gdt_table) | 486 | ENTRY(cpu_gdt_table) |
490 | .quad 0x0000000000000000 /* NULL descriptor */ | 487 | .quad 0x0000000000000000 /* NULL descriptor */ |
491 | .quad 0x0000000000000000 /* 0x0b reserved */ | 488 | .quad 0x0000000000000000 /* 0x0b reserved */ |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 39d9a5fa907e..311b4e7266f1 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -351,8 +351,8 @@ static inline void rotate_irqs_among_cpus(unsigned long useful_load_threshold) | |||
351 | { | 351 | { |
352 | int i, j; | 352 | int i, j; |
353 | Dprintk("Rotating IRQs among CPUs.\n"); | 353 | Dprintk("Rotating IRQs among CPUs.\n"); |
354 | for (i = 0; i < NR_CPUS; i++) { | 354 | for_each_online_cpu(i) { |
355 | for (j = 0; cpu_online(i) && (j < NR_IRQS); j++) { | 355 | for (j = 0; j < NR_IRQS; j++) { |
356 | if (!irq_desc[j].action) | 356 | if (!irq_desc[j].action) |
357 | continue; | 357 | continue; |
358 | /* Is it a significant load ? */ | 358 | /* Is it a significant load ? */ |
@@ -381,7 +381,7 @@ static void do_irq_balance(void) | |||
381 | unsigned long imbalance = 0; | 381 | unsigned long imbalance = 0; |
382 | cpumask_t allowed_mask, target_cpu_mask, tmp; | 382 | cpumask_t allowed_mask, target_cpu_mask, tmp; |
383 | 383 | ||
384 | for (i = 0; i < NR_CPUS; i++) { | 384 | for_each_cpu(i) { |
385 | int package_index; | 385 | int package_index; |
386 | CPU_IRQ(i) = 0; | 386 | CPU_IRQ(i) = 0; |
387 | if (!cpu_online(i)) | 387 | if (!cpu_online(i)) |
@@ -422,9 +422,7 @@ static void do_irq_balance(void) | |||
422 | } | 422 | } |
423 | } | 423 | } |
424 | /* Find the least loaded processor package */ | 424 | /* Find the least loaded processor package */ |
425 | for (i = 0; i < NR_CPUS; i++) { | 425 | for_each_online_cpu(i) { |
426 | if (!cpu_online(i)) | ||
427 | continue; | ||
428 | if (i != CPU_TO_PACKAGEINDEX(i)) | 426 | if (i != CPU_TO_PACKAGEINDEX(i)) |
429 | continue; | 427 | continue; |
430 | if (min_cpu_irq > CPU_IRQ(i)) { | 428 | if (min_cpu_irq > CPU_IRQ(i)) { |
@@ -441,9 +439,7 @@ tryanothercpu: | |||
441 | */ | 439 | */ |
442 | tmp_cpu_irq = 0; | 440 | tmp_cpu_irq = 0; |
443 | tmp_loaded = -1; | 441 | tmp_loaded = -1; |
444 | for (i = 0; i < NR_CPUS; i++) { | 442 | for_each_online_cpu(i) { |
445 | if (!cpu_online(i)) | ||
446 | continue; | ||
447 | if (i != CPU_TO_PACKAGEINDEX(i)) | 443 | if (i != CPU_TO_PACKAGEINDEX(i)) |
448 | continue; | 444 | continue; |
449 | if (max_cpu_irq <= CPU_IRQ(i)) | 445 | if (max_cpu_irq <= CPU_IRQ(i)) |
@@ -619,9 +615,7 @@ static int __init balanced_irq_init(void) | |||
619 | if (smp_num_siblings > 1 && !cpus_empty(tmp)) | 615 | if (smp_num_siblings > 1 && !cpus_empty(tmp)) |
620 | physical_balance = 1; | 616 | physical_balance = 1; |
621 | 617 | ||
622 | for (i = 0; i < NR_CPUS; i++) { | 618 | for_each_online_cpu(i) { |
623 | if (!cpu_online(i)) | ||
624 | continue; | ||
625 | irq_cpu_data[i].irq_delta = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); | 619 | irq_cpu_data[i].irq_delta = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); |
626 | irq_cpu_data[i].last_irq = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); | 620 | irq_cpu_data[i].last_irq = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); |
627 | if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) { | 621 | if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) { |
@@ -638,9 +632,11 @@ static int __init balanced_irq_init(void) | |||
638 | else | 632 | else |
639 | printk(KERN_ERR "balanced_irq_init: failed to spawn balanced_irq"); | 633 | printk(KERN_ERR "balanced_irq_init: failed to spawn balanced_irq"); |
640 | failed: | 634 | failed: |
641 | for (i = 0; i < NR_CPUS; i++) { | 635 | for_each_cpu(i) { |
642 | kfree(irq_cpu_data[i].irq_delta); | 636 | kfree(irq_cpu_data[i].irq_delta); |
637 | irq_cpu_data[i].irq_delta = NULL; | ||
643 | kfree(irq_cpu_data[i].last_irq); | 638 | kfree(irq_cpu_data[i].last_irq); |
639 | irq_cpu_data[i].last_irq = NULL; | ||
644 | } | 640 | } |
645 | return 0; | 641 | return 0; |
646 | } | 642 | } |
@@ -1761,7 +1757,8 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
1761 | * Don't check I/O APIC IDs for xAPIC systems. They have | 1757 | * Don't check I/O APIC IDs for xAPIC systems. They have |
1762 | * no meaning without the serial APIC bus. | 1758 | * no meaning without the serial APIC bus. |
1763 | */ | 1759 | */ |
1764 | if (!(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && boot_cpu_data.x86 < 15)) | 1760 | if (!(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) |
1761 | || APIC_XAPIC(apic_version[boot_cpu_physical_apicid])) | ||
1765 | return; | 1762 | return; |
1766 | /* | 1763 | /* |
1767 | * This is broken; anything with a real cpu count has to | 1764 | * This is broken; anything with a real cpu count has to |
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index 694a13997637..7a59050242a7 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c | |||
@@ -84,9 +84,9 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
84 | 84 | ||
85 | void __kprobes arch_remove_kprobe(struct kprobe *p) | 85 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
86 | { | 86 | { |
87 | down(&kprobe_mutex); | 87 | mutex_lock(&kprobe_mutex); |
88 | free_insn_slot(p->ainsn.insn); | 88 | free_insn_slot(p->ainsn.insn); |
89 | up(&kprobe_mutex); | 89 | mutex_unlock(&kprobe_mutex); |
90 | } | 90 | } |
91 | 91 | ||
92 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) | 92 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) |
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index 5390b521aca0..55bc365b8753 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c | |||
@@ -202,8 +202,6 @@ static inline void mark_microcode_update (int cpu_num, microcode_header_t *mc_he | |||
202 | } else if (mc_header->rev == uci->rev) { | 202 | } else if (mc_header->rev == uci->rev) { |
203 | /* notify the caller of success on this cpu */ | 203 | /* notify the caller of success on this cpu */ |
204 | uci->err = MC_SUCCESS; | 204 | uci->err = MC_SUCCESS; |
205 | printk(KERN_ERR "microcode: CPU%d already at revision" | ||
206 | " 0x%x (current=0x%x)\n", cpu_num, mc_header->rev, uci->rev); | ||
207 | goto out; | 205 | goto out; |
208 | } | 206 | } |
209 | 207 | ||
@@ -369,7 +367,6 @@ static void do_update_one (void * unused) | |||
369 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; | 367 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; |
370 | 368 | ||
371 | if (uci->mc == NULL) { | 369 | if (uci->mc == NULL) { |
372 | printk(KERN_INFO "microcode: No new microcode data for CPU%d\n", cpu_num); | ||
373 | return; | 370 | return; |
374 | } | 371 | } |
375 | 372 | ||
@@ -511,7 +508,6 @@ static int __init microcode_init (void) | |||
511 | static void __exit microcode_exit (void) | 508 | static void __exit microcode_exit (void) |
512 | { | 509 | { |
513 | misc_deregister(µcode_dev); | 510 | misc_deregister(µcode_dev); |
514 | printk(KERN_INFO "IA-32 Microcode Update Driver v" MICROCODE_VERSION " unregistered\n"); | ||
515 | } | 511 | } |
516 | 512 | ||
517 | module_init(microcode_init) | 513 | module_init(microcode_init) |
diff --git a/arch/i386/kernel/module.c b/arch/i386/kernel/module.c index 5149c8a621f0..470cf97e7cd3 100644 --- a/arch/i386/kernel/module.c +++ b/arch/i386/kernel/module.c | |||
@@ -104,26 +104,38 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
104 | return -ENOEXEC; | 104 | return -ENOEXEC; |
105 | } | 105 | } |
106 | 106 | ||
107 | extern void apply_alternatives(void *start, void *end); | ||
108 | |||
109 | int module_finalize(const Elf_Ehdr *hdr, | 107 | int module_finalize(const Elf_Ehdr *hdr, |
110 | const Elf_Shdr *sechdrs, | 108 | const Elf_Shdr *sechdrs, |
111 | struct module *me) | 109 | struct module *me) |
112 | { | 110 | { |
113 | const Elf_Shdr *s; | 111 | const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL; |
114 | char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; | 112 | char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; |
115 | 113 | ||
116 | /* look for .altinstructions to patch */ | ||
117 | for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { | 114 | for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { |
118 | void *seg; | 115 | if (!strcmp(".text", secstrings + s->sh_name)) |
119 | if (strcmp(".altinstructions", secstrings + s->sh_name)) | 116 | text = s; |
120 | continue; | 117 | if (!strcmp(".altinstructions", secstrings + s->sh_name)) |
121 | seg = (void *)s->sh_addr; | 118 | alt = s; |
122 | apply_alternatives(seg, seg + s->sh_size); | 119 | if (!strcmp(".smp_locks", secstrings + s->sh_name)) |
123 | } | 120 | locks= s; |
121 | } | ||
122 | |||
123 | if (alt) { | ||
124 | /* patch .altinstructions */ | ||
125 | void *aseg = (void *)alt->sh_addr; | ||
126 | apply_alternatives(aseg, aseg + alt->sh_size); | ||
127 | } | ||
128 | if (locks && text) { | ||
129 | void *lseg = (void *)locks->sh_addr; | ||
130 | void *tseg = (void *)text->sh_addr; | ||
131 | alternatives_smp_module_add(me, me->name, | ||
132 | lseg, lseg + locks->sh_size, | ||
133 | tseg, tseg + text->sh_size); | ||
134 | } | ||
124 | return 0; | 135 | return 0; |
125 | } | 136 | } |
126 | 137 | ||
127 | void module_arch_cleanup(struct module *mod) | 138 | void module_arch_cleanup(struct module *mod) |
128 | { | 139 | { |
140 | alternatives_smp_module_del(mod); | ||
129 | } | 141 | } |
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index e6e2f43db85e..8d8aa9d1796d 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -828,6 +828,8 @@ void __init find_smp_config (void) | |||
828 | smp_scan_config(address, 0x400); | 828 | smp_scan_config(address, 0x400); |
829 | } | 829 | } |
830 | 830 | ||
831 | int es7000_plat; | ||
832 | |||
831 | /* -------------------------------------------------------------------------- | 833 | /* -------------------------------------------------------------------------- |
832 | ACPI-based MP Configuration | 834 | ACPI-based MP Configuration |
833 | -------------------------------------------------------------------------- */ | 835 | -------------------------------------------------------------------------- */ |
@@ -935,7 +937,8 @@ void __init mp_register_ioapic ( | |||
935 | mp_ioapics[idx].mpc_apicaddr = address; | 937 | mp_ioapics[idx].mpc_apicaddr = address; |
936 | 938 | ||
937 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); | 939 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); |
938 | if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15)) | 940 | if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) |
941 | && !APIC_XAPIC(apic_version[boot_cpu_physical_apicid])) | ||
939 | tmpid = io_apic_get_unique_id(idx, id); | 942 | tmpid = io_apic_get_unique_id(idx, id); |
940 | else | 943 | else |
941 | tmpid = id; | 944 | tmpid = id; |
@@ -1011,8 +1014,6 @@ void __init mp_override_legacy_irq ( | |||
1011 | return; | 1014 | return; |
1012 | } | 1015 | } |
1013 | 1016 | ||
1014 | int es7000_plat; | ||
1015 | |||
1016 | void __init mp_config_acpi_legacy_irqs (void) | 1017 | void __init mp_config_acpi_legacy_irqs (void) |
1017 | { | 1018 | { |
1018 | struct mpc_config_intsrc intsrc; | 1019 | struct mpc_config_intsrc intsrc; |
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index be87c5e2ee95..9074818b9473 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -143,7 +143,7 @@ static int __init check_nmi_watchdog(void) | |||
143 | local_irq_enable(); | 143 | local_irq_enable(); |
144 | mdelay((10*1000)/nmi_hz); // wait 10 ticks | 144 | mdelay((10*1000)/nmi_hz); // wait 10 ticks |
145 | 145 | ||
146 | for (cpu = 0; cpu < NR_CPUS; cpu++) { | 146 | for_each_cpu(cpu) { |
147 | #ifdef CONFIG_SMP | 147 | #ifdef CONFIG_SMP |
148 | /* Check cpu_callin_map here because that is set | 148 | /* Check cpu_callin_map here because that is set |
149 | after the timer is started. */ | 149 | after the timer is started. */ |
@@ -510,7 +510,7 @@ void touch_nmi_watchdog (void) | |||
510 | * Just reset the alert counters, (other CPUs might be | 510 | * Just reset the alert counters, (other CPUs might be |
511 | * spinning on locks we hold): | 511 | * spinning on locks we hold): |
512 | */ | 512 | */ |
513 | for (i = 0; i < NR_CPUS; i++) | 513 | for_each_cpu(i) |
514 | alert_counter[i] = 0; | 514 | alert_counter[i] = 0; |
515 | 515 | ||
516 | /* | 516 | /* |
@@ -543,7 +543,7 @@ void nmi_watchdog_tick (struct pt_regs * regs) | |||
543 | /* | 543 | /* |
544 | * die_nmi will return ONLY if NOTIFY_STOP happens.. | 544 | * die_nmi will return ONLY if NOTIFY_STOP happens.. |
545 | */ | 545 | */ |
546 | die_nmi(regs, "NMI Watchdog detected LOCKUP"); | 546 | die_nmi(regs, "BUG: NMI Watchdog detected LOCKUP"); |
547 | } else { | 547 | } else { |
548 | last_irq_sums[cpu] = sum; | 548 | last_irq_sums[cpu] = sum; |
549 | alert_counter[cpu] = 0; | 549 | alert_counter[cpu] = 0; |
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 0480454ebffa..299e61674084 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -295,7 +295,7 @@ void show_regs(struct pt_regs * regs) | |||
295 | printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id()); | 295 | printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id()); |
296 | print_symbol("EIP is at %s\n", regs->eip); | 296 | print_symbol("EIP is at %s\n", regs->eip); |
297 | 297 | ||
298 | if (user_mode(regs)) | 298 | if (user_mode_vm(regs)) |
299 | printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); | 299 | printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); |
300 | printk(" EFLAGS: %08lx %s (%s %.*s)\n", | 300 | printk(" EFLAGS: %08lx %s (%s %.*s)\n", |
301 | regs->eflags, print_tainted(), system_utsname.release, | 301 | regs->eflags, print_tainted(), system_utsname.release, |
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index 5c1fb6aada5b..506462ef36a0 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c | |||
@@ -34,10 +34,10 @@ | |||
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Determines which flags the user has access to [1 = access, 0 = no access]. | 36 | * Determines which flags the user has access to [1 = access, 0 = no access]. |
37 | * Prohibits changing ID(21), VIP(20), VIF(19), VM(17), IOPL(12-13), IF(9). | 37 | * Prohibits changing ID(21), VIP(20), VIF(19), VM(17), NT(14), IOPL(12-13), IF(9). |
38 | * Also masks reserved bits (31-22, 15, 5, 3, 1). | 38 | * Also masks reserved bits (31-22, 15, 5, 3, 1). |
39 | */ | 39 | */ |
40 | #define FLAG_MASK 0x00054dd5 | 40 | #define FLAG_MASK 0x00050dd5 |
41 | 41 | ||
42 | /* set's the trap flag. */ | 42 | /* set's the trap flag. */ |
43 | #define TRAP_FLAG 0x100 | 43 | #define TRAP_FLAG 0x100 |
diff --git a/arch/i386/kernel/semaphore.c b/arch/i386/kernel/semaphore.c index 7455ab643943..967dc74df9ee 100644 --- a/arch/i386/kernel/semaphore.c +++ b/arch/i386/kernel/semaphore.c | |||
@@ -110,11 +110,11 @@ asm( | |||
110 | ".align 4\n" | 110 | ".align 4\n" |
111 | ".globl __write_lock_failed\n" | 111 | ".globl __write_lock_failed\n" |
112 | "__write_lock_failed:\n\t" | 112 | "__write_lock_failed:\n\t" |
113 | LOCK "addl $" RW_LOCK_BIAS_STR ",(%eax)\n" | 113 | LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ",(%eax)\n" |
114 | "1: rep; nop\n\t" | 114 | "1: rep; nop\n\t" |
115 | "cmpl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" | 115 | "cmpl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" |
116 | "jne 1b\n\t" | 116 | "jne 1b\n\t" |
117 | LOCK "subl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" | 117 | LOCK_PREFIX "subl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" |
118 | "jnz __write_lock_failed\n\t" | 118 | "jnz __write_lock_failed\n\t" |
119 | "ret" | 119 | "ret" |
120 | ); | 120 | ); |
@@ -124,11 +124,11 @@ asm( | |||
124 | ".align 4\n" | 124 | ".align 4\n" |
125 | ".globl __read_lock_failed\n" | 125 | ".globl __read_lock_failed\n" |
126 | "__read_lock_failed:\n\t" | 126 | "__read_lock_failed:\n\t" |
127 | LOCK "incl (%eax)\n" | 127 | LOCK_PREFIX "incl (%eax)\n" |
128 | "1: rep; nop\n\t" | 128 | "1: rep; nop\n\t" |
129 | "cmpl $1,(%eax)\n\t" | 129 | "cmpl $1,(%eax)\n\t" |
130 | "js 1b\n\t" | 130 | "js 1b\n\t" |
131 | LOCK "decl (%eax)\n\t" | 131 | LOCK_PREFIX "decl (%eax)\n\t" |
132 | "js __read_lock_failed\n\t" | 132 | "js __read_lock_failed\n\t" |
133 | "ret" | 133 | "ret" |
134 | ); | 134 | ); |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index ab62a9f4701e..d313a11acafa 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -1288,7 +1288,7 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat | |||
1288 | struct resource *res; | 1288 | struct resource *res; |
1289 | if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL) | 1289 | if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL) |
1290 | continue; | 1290 | continue; |
1291 | res = alloc_bootmem_low(sizeof(struct resource)); | 1291 | res = kzalloc(sizeof(struct resource), GFP_ATOMIC); |
1292 | switch (e820.map[i].type) { | 1292 | switch (e820.map[i].type) { |
1293 | case E820_RAM: res->name = "System RAM"; break; | 1293 | case E820_RAM: res->name = "System RAM"; break; |
1294 | case E820_ACPI: res->name = "ACPI Tables"; break; | 1294 | case E820_ACPI: res->name = "ACPI Tables"; break; |
@@ -1316,13 +1316,15 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat | |||
1316 | 1316 | ||
1317 | /* | 1317 | /* |
1318 | * Request address space for all standard resources | 1318 | * Request address space for all standard resources |
1319 | * | ||
1320 | * This is called just before pcibios_assign_resources(), which is also | ||
1321 | * an fs_initcall, but is linked in later (in arch/i386/pci/i386.c). | ||
1319 | */ | 1322 | */ |
1320 | static void __init register_memory(void) | 1323 | static int __init request_standard_resources(void) |
1321 | { | 1324 | { |
1322 | unsigned long gapstart, gapsize, round; | 1325 | int i; |
1323 | unsigned long long last; | ||
1324 | int i; | ||
1325 | 1326 | ||
1327 | printk("Setting up standard PCI resources\n"); | ||
1326 | if (efi_enabled) | 1328 | if (efi_enabled) |
1327 | efi_initialize_iomem_resources(&code_resource, &data_resource); | 1329 | efi_initialize_iomem_resources(&code_resource, &data_resource); |
1328 | else | 1330 | else |
@@ -1334,6 +1336,16 @@ static void __init register_memory(void) | |||
1334 | /* request I/O space for devices used on all i[345]86 PCs */ | 1336 | /* request I/O space for devices used on all i[345]86 PCs */ |
1335 | for (i = 0; i < STANDARD_IO_RESOURCES; i++) | 1337 | for (i = 0; i < STANDARD_IO_RESOURCES; i++) |
1336 | request_resource(&ioport_resource, &standard_io_resources[i]); | 1338 | request_resource(&ioport_resource, &standard_io_resources[i]); |
1339 | return 0; | ||
1340 | } | ||
1341 | |||
1342 | fs_initcall(request_standard_resources); | ||
1343 | |||
1344 | static void __init register_memory(void) | ||
1345 | { | ||
1346 | unsigned long gapstart, gapsize, round; | ||
1347 | unsigned long long last; | ||
1348 | int i; | ||
1337 | 1349 | ||
1338 | /* | 1350 | /* |
1339 | * Search for the bigest gap in the low 32 bits of the e820 | 1351 | * Search for the bigest gap in the low 32 bits of the e820 |
@@ -1377,101 +1389,6 @@ static void __init register_memory(void) | |||
1377 | pci_mem_start, gapstart, gapsize); | 1389 | pci_mem_start, gapstart, gapsize); |
1378 | } | 1390 | } |
1379 | 1391 | ||
1380 | /* Use inline assembly to define this because the nops are defined | ||
1381 | as inline assembly strings in the include files and we cannot | ||
1382 | get them easily into strings. */ | ||
1383 | asm("\t.data\nintelnops: " | ||
1384 | GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6 | ||
1385 | GENERIC_NOP7 GENERIC_NOP8); | ||
1386 | asm("\t.data\nk8nops: " | ||
1387 | K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6 | ||
1388 | K8_NOP7 K8_NOP8); | ||
1389 | asm("\t.data\nk7nops: " | ||
1390 | K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6 | ||
1391 | K7_NOP7 K7_NOP8); | ||
1392 | |||
1393 | extern unsigned char intelnops[], k8nops[], k7nops[]; | ||
1394 | static unsigned char *intel_nops[ASM_NOP_MAX+1] = { | ||
1395 | NULL, | ||
1396 | intelnops, | ||
1397 | intelnops + 1, | ||
1398 | intelnops + 1 + 2, | ||
1399 | intelnops + 1 + 2 + 3, | ||
1400 | intelnops + 1 + 2 + 3 + 4, | ||
1401 | intelnops + 1 + 2 + 3 + 4 + 5, | ||
1402 | intelnops + 1 + 2 + 3 + 4 + 5 + 6, | ||
1403 | intelnops + 1 + 2 + 3 + 4 + 5 + 6 + 7, | ||
1404 | }; | ||
1405 | static unsigned char *k8_nops[ASM_NOP_MAX+1] = { | ||
1406 | NULL, | ||
1407 | k8nops, | ||
1408 | k8nops + 1, | ||
1409 | k8nops + 1 + 2, | ||
1410 | k8nops + 1 + 2 + 3, | ||
1411 | k8nops + 1 + 2 + 3 + 4, | ||
1412 | k8nops + 1 + 2 + 3 + 4 + 5, | ||
1413 | k8nops + 1 + 2 + 3 + 4 + 5 + 6, | ||
1414 | k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7, | ||
1415 | }; | ||
1416 | static unsigned char *k7_nops[ASM_NOP_MAX+1] = { | ||
1417 | NULL, | ||
1418 | k7nops, | ||
1419 | k7nops + 1, | ||
1420 | k7nops + 1 + 2, | ||
1421 | k7nops + 1 + 2 + 3, | ||
1422 | k7nops + 1 + 2 + 3 + 4, | ||
1423 | k7nops + 1 + 2 + 3 + 4 + 5, | ||
1424 | k7nops + 1 + 2 + 3 + 4 + 5 + 6, | ||
1425 | k7nops + 1 + 2 + 3 + 4 + 5 + 6 + 7, | ||
1426 | }; | ||
1427 | static struct nop { | ||
1428 | int cpuid; | ||
1429 | unsigned char **noptable; | ||
1430 | } noptypes[] = { | ||
1431 | { X86_FEATURE_K8, k8_nops }, | ||
1432 | { X86_FEATURE_K7, k7_nops }, | ||
1433 | { -1, NULL } | ||
1434 | }; | ||
1435 | |||
1436 | /* Replace instructions with better alternatives for this CPU type. | ||
1437 | |||
1438 | This runs before SMP is initialized to avoid SMP problems with | ||
1439 | self modifying code. This implies that assymetric systems where | ||
1440 | APs have less capabilities than the boot processor are not handled. | ||
1441 | Tough. Make sure you disable such features by hand. */ | ||
1442 | void apply_alternatives(void *start, void *end) | ||
1443 | { | ||
1444 | struct alt_instr *a; | ||
1445 | int diff, i, k; | ||
1446 | unsigned char **noptable = intel_nops; | ||
1447 | for (i = 0; noptypes[i].cpuid >= 0; i++) { | ||
1448 | if (boot_cpu_has(noptypes[i].cpuid)) { | ||
1449 | noptable = noptypes[i].noptable; | ||
1450 | break; | ||
1451 | } | ||
1452 | } | ||
1453 | for (a = start; (void *)a < end; a++) { | ||
1454 | if (!boot_cpu_has(a->cpuid)) | ||
1455 | continue; | ||
1456 | BUG_ON(a->replacementlen > a->instrlen); | ||
1457 | memcpy(a->instr, a->replacement, a->replacementlen); | ||
1458 | diff = a->instrlen - a->replacementlen; | ||
1459 | /* Pad the rest with nops */ | ||
1460 | for (i = a->replacementlen; diff > 0; diff -= k, i += k) { | ||
1461 | k = diff; | ||
1462 | if (k > ASM_NOP_MAX) | ||
1463 | k = ASM_NOP_MAX; | ||
1464 | memcpy(a->instr + i, noptable[k], k); | ||
1465 | } | ||
1466 | } | ||
1467 | } | ||
1468 | |||
1469 | void __init alternative_instructions(void) | ||
1470 | { | ||
1471 | extern struct alt_instr __alt_instructions[], __alt_instructions_end[]; | ||
1472 | apply_alternatives(__alt_instructions, __alt_instructions_end); | ||
1473 | } | ||
1474 | |||
1475 | static char * __init machine_specific_memory_setup(void); | 1392 | static char * __init machine_specific_memory_setup(void); |
1476 | 1393 | ||
1477 | #ifdef CONFIG_MCA | 1394 | #ifdef CONFIG_MCA |
@@ -1554,6 +1471,16 @@ void __init setup_arch(char **cmdline_p) | |||
1554 | 1471 | ||
1555 | parse_cmdline_early(cmdline_p); | 1472 | parse_cmdline_early(cmdline_p); |
1556 | 1473 | ||
1474 | #ifdef CONFIG_EARLY_PRINTK | ||
1475 | { | ||
1476 | char *s = strstr(*cmdline_p, "earlyprintk="); | ||
1477 | if (s) { | ||
1478 | setup_early_printk(strchr(s, '=') + 1); | ||
1479 | printk("early console enabled\n"); | ||
1480 | } | ||
1481 | } | ||
1482 | #endif | ||
1483 | |||
1557 | max_low_pfn = setup_memory(); | 1484 | max_low_pfn = setup_memory(); |
1558 | 1485 | ||
1559 | /* | 1486 | /* |
@@ -1578,19 +1505,6 @@ void __init setup_arch(char **cmdline_p) | |||
1578 | * NOTE: at this point the bootmem allocator is fully available. | 1505 | * NOTE: at this point the bootmem allocator is fully available. |
1579 | */ | 1506 | */ |
1580 | 1507 | ||
1581 | #ifdef CONFIG_EARLY_PRINTK | ||
1582 | { | ||
1583 | char *s = strstr(*cmdline_p, "earlyprintk="); | ||
1584 | if (s) { | ||
1585 | extern void setup_early_printk(char *); | ||
1586 | |||
1587 | setup_early_printk(strchr(s, '=') + 1); | ||
1588 | printk("early console enabled\n"); | ||
1589 | } | ||
1590 | } | ||
1591 | #endif | ||
1592 | |||
1593 | |||
1594 | dmi_scan_machine(); | 1508 | dmi_scan_machine(); |
1595 | 1509 | ||
1596 | #ifdef CONFIG_X86_GENERICARCH | 1510 | #ifdef CONFIG_X86_GENERICARCH |
diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index 963616d364ec..5c352c3a9e7f 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c | |||
@@ -123,7 +123,8 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *peax | |||
123 | err |= __get_user(tmp, &sc->seg); \ | 123 | err |= __get_user(tmp, &sc->seg); \ |
124 | loadsegment(seg,tmp); } | 124 | loadsegment(seg,tmp); } |
125 | 125 | ||
126 | #define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_OF | X86_EFLAGS_DF | \ | 126 | #define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_RF | \ |
127 | X86_EFLAGS_OF | X86_EFLAGS_DF | \ | ||
127 | X86_EFLAGS_TF | X86_EFLAGS_SF | X86_EFLAGS_ZF | \ | 128 | X86_EFLAGS_TF | X86_EFLAGS_SF | X86_EFLAGS_ZF | \ |
128 | X86_EFLAGS_AF | X86_EFLAGS_PF | X86_EFLAGS_CF) | 129 | X86_EFLAGS_AF | X86_EFLAGS_PF | X86_EFLAGS_CF) |
129 | 130 | ||
@@ -582,9 +583,6 @@ static void fastcall do_signal(struct pt_regs *regs) | |||
582 | if (!user_mode(regs)) | 583 | if (!user_mode(regs)) |
583 | return; | 584 | return; |
584 | 585 | ||
585 | if (try_to_freeze()) | ||
586 | goto no_signal; | ||
587 | |||
588 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | 586 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
589 | oldset = ¤t->saved_sigmask; | 587 | oldset = ¤t->saved_sigmask; |
590 | else | 588 | else |
@@ -613,7 +611,6 @@ static void fastcall do_signal(struct pt_regs *regs) | |||
613 | return; | 611 | return; |
614 | } | 612 | } |
615 | 613 | ||
616 | no_signal: | ||
617 | /* Did we come from a system call? */ | 614 | /* Did we come from a system call? */ |
618 | if (regs->orig_eax >= 0) { | 615 | if (regs->orig_eax >= 0) { |
619 | /* Restart the system call - no handlers present */ | 616 | /* Restart the system call - no handlers present */ |
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c index 218d725a5a1e..d134e9643a58 100644 --- a/arch/i386/kernel/smp.c +++ b/arch/i386/kernel/smp.c | |||
@@ -504,27 +504,23 @@ void unlock_ipi_call_lock(void) | |||
504 | spin_unlock_irq(&call_lock); | 504 | spin_unlock_irq(&call_lock); |
505 | } | 505 | } |
506 | 506 | ||
507 | static struct call_data_struct * call_data; | 507 | static struct call_data_struct *call_data; |
508 | 508 | ||
509 | /* | 509 | /** |
510 | * this function sends a 'generic call function' IPI to all other CPUs | 510 | * smp_call_function(): Run a function on all other CPUs. |
511 | * in the system. | 511 | * @func: The function to run. This must be fast and non-blocking. |
512 | */ | 512 | * @info: An arbitrary pointer to pass to the function. |
513 | 513 | * @nonatomic: currently unused. | |
514 | int smp_call_function (void (*func) (void *info), void *info, int nonatomic, | 514 | * @wait: If true, wait (atomically) until function has completed on other CPUs. |
515 | int wait) | 515 | * |
516 | /* | 516 | * Returns 0 on success, else a negative status code. Does not return until |
517 | * [SUMMARY] Run a function on all other CPUs. | ||
518 | * <func> The function to run. This must be fast and non-blocking. | ||
519 | * <info> An arbitrary pointer to pass to the function. | ||
520 | * <nonatomic> currently unused. | ||
521 | * <wait> If true, wait (atomically) until function has completed on other CPUs. | ||
522 | * [RETURNS] 0 on success, else a negative status code. Does not return until | ||
523 | * remote CPUs are nearly ready to execute <<func>> or are or have executed. | 517 | * remote CPUs are nearly ready to execute <<func>> or are or have executed. |
524 | * | 518 | * |
525 | * You must not call this function with disabled interrupts or from a | 519 | * You must not call this function with disabled interrupts or from a |
526 | * hardware interrupt handler or from a bottom half handler. | 520 | * hardware interrupt handler or from a bottom half handler. |
527 | */ | 521 | */ |
522 | int smp_call_function (void (*func) (void *info), void *info, int nonatomic, | ||
523 | int wait) | ||
528 | { | 524 | { |
529 | struct call_data_struct data; | 525 | struct call_data_struct data; |
530 | int cpus; | 526 | int cpus; |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 7007e1783797..82371d83bfa9 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -899,6 +899,7 @@ static int __devinit do_boot_cpu(int apicid, int cpu) | |||
899 | unsigned short nmi_high = 0, nmi_low = 0; | 899 | unsigned short nmi_high = 0, nmi_low = 0; |
900 | 900 | ||
901 | ++cpucount; | 901 | ++cpucount; |
902 | alternatives_smp_switch(1); | ||
902 | 903 | ||
903 | /* | 904 | /* |
904 | * We can't use kernel_thread since we must avoid to | 905 | * We can't use kernel_thread since we must avoid to |
@@ -1002,7 +1003,6 @@ void cpu_exit_clear(void) | |||
1002 | 1003 | ||
1003 | cpu_clear(cpu, cpu_callout_map); | 1004 | cpu_clear(cpu, cpu_callout_map); |
1004 | cpu_clear(cpu, cpu_callin_map); | 1005 | cpu_clear(cpu, cpu_callin_map); |
1005 | cpu_clear(cpu, cpu_present_map); | ||
1006 | 1006 | ||
1007 | cpu_clear(cpu, smp_commenced_mask); | 1007 | cpu_clear(cpu, smp_commenced_mask); |
1008 | unmap_cpu_to_logical_apicid(cpu); | 1008 | unmap_cpu_to_logical_apicid(cpu); |
@@ -1014,31 +1014,20 @@ struct warm_boot_cpu_info { | |||
1014 | int cpu; | 1014 | int cpu; |
1015 | }; | 1015 | }; |
1016 | 1016 | ||
1017 | static void __devinit do_warm_boot_cpu(void *p) | 1017 | static void __cpuinit do_warm_boot_cpu(void *p) |
1018 | { | 1018 | { |
1019 | struct warm_boot_cpu_info *info = p; | 1019 | struct warm_boot_cpu_info *info = p; |
1020 | do_boot_cpu(info->apicid, info->cpu); | 1020 | do_boot_cpu(info->apicid, info->cpu); |
1021 | complete(info->complete); | 1021 | complete(info->complete); |
1022 | } | 1022 | } |
1023 | 1023 | ||
1024 | int __devinit smp_prepare_cpu(int cpu) | 1024 | static int __cpuinit __smp_prepare_cpu(int cpu) |
1025 | { | 1025 | { |
1026 | DECLARE_COMPLETION(done); | 1026 | DECLARE_COMPLETION(done); |
1027 | struct warm_boot_cpu_info info; | 1027 | struct warm_boot_cpu_info info; |
1028 | struct work_struct task; | 1028 | struct work_struct task; |
1029 | int apicid, ret; | 1029 | int apicid, ret; |
1030 | 1030 | ||
1031 | lock_cpu_hotplug(); | ||
1032 | |||
1033 | /* | ||
1034 | * On x86, CPU0 is never offlined. Trying to bring up an | ||
1035 | * already-booted CPU will hang. So check for that case. | ||
1036 | */ | ||
1037 | if (cpu_online(cpu)) { | ||
1038 | ret = -EINVAL; | ||
1039 | goto exit; | ||
1040 | } | ||
1041 | |||
1042 | apicid = x86_cpu_to_apicid[cpu]; | 1031 | apicid = x86_cpu_to_apicid[cpu]; |
1043 | if (apicid == BAD_APICID) { | 1032 | if (apicid == BAD_APICID) { |
1044 | ret = -ENODEV; | 1033 | ret = -ENODEV; |
@@ -1063,7 +1052,6 @@ int __devinit smp_prepare_cpu(int cpu) | |||
1063 | zap_low_mappings(); | 1052 | zap_low_mappings(); |
1064 | ret = 0; | 1053 | ret = 0; |
1065 | exit: | 1054 | exit: |
1066 | unlock_cpu_hotplug(); | ||
1067 | return ret; | 1055 | return ret; |
1068 | } | 1056 | } |
1069 | #endif | 1057 | #endif |
@@ -1368,6 +1356,8 @@ void __cpu_die(unsigned int cpu) | |||
1368 | /* They ack this in play_dead by setting CPU_DEAD */ | 1356 | /* They ack this in play_dead by setting CPU_DEAD */ |
1369 | if (per_cpu(cpu_state, cpu) == CPU_DEAD) { | 1357 | if (per_cpu(cpu_state, cpu) == CPU_DEAD) { |
1370 | printk ("CPU %d is now offline\n", cpu); | 1358 | printk ("CPU %d is now offline\n", cpu); |
1359 | if (1 == num_online_cpus()) | ||
1360 | alternatives_smp_switch(0); | ||
1371 | return; | 1361 | return; |
1372 | } | 1362 | } |
1373 | msleep(100); | 1363 | msleep(100); |
@@ -1389,6 +1379,22 @@ void __cpu_die(unsigned int cpu) | |||
1389 | 1379 | ||
1390 | int __devinit __cpu_up(unsigned int cpu) | 1380 | int __devinit __cpu_up(unsigned int cpu) |
1391 | { | 1381 | { |
1382 | #ifdef CONFIG_HOTPLUG_CPU | ||
1383 | int ret=0; | ||
1384 | |||
1385 | /* | ||
1386 | * We do warm boot only on cpus that had booted earlier | ||
1387 | * Otherwise cold boot is all handled from smp_boot_cpus(). | ||
1388 | * cpu_callin_map is set during AP kickstart process. Its reset | ||
1389 | * when a cpu is taken offline from cpu_exit_clear(). | ||
1390 | */ | ||
1391 | if (!cpu_isset(cpu, cpu_callin_map)) | ||
1392 | ret = __smp_prepare_cpu(cpu); | ||
1393 | |||
1394 | if (ret) | ||
1395 | return -EIO; | ||
1396 | #endif | ||
1397 | |||
1392 | /* In case one didn't come up */ | 1398 | /* In case one didn't come up */ |
1393 | if (!cpu_isset(cpu, cpu_callin_map)) { | 1399 | if (!cpu_isset(cpu, cpu_callin_map)) { |
1394 | printk(KERN_DEBUG "skipping cpu%d, didn't come online\n", cpu); | 1400 | printk(KERN_DEBUG "skipping cpu%d, didn't come online\n", cpu); |
diff --git a/arch/i386/kernel/sys_i386.c b/arch/i386/kernel/sys_i386.c index a4a61976ecb9..8fdb1fb17a5f 100644 --- a/arch/i386/kernel/sys_i386.c +++ b/arch/i386/kernel/sys_i386.c | |||
@@ -40,14 +40,13 @@ asmlinkage int sys_pipe(unsigned long __user * fildes) | |||
40 | return error; | 40 | return error; |
41 | } | 41 | } |
42 | 42 | ||
43 | /* common code for old and new mmaps */ | 43 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, |
44 | static inline long do_mmap2( | 44 | unsigned long prot, unsigned long flags, |
45 | unsigned long addr, unsigned long len, | 45 | unsigned long fd, unsigned long pgoff) |
46 | unsigned long prot, unsigned long flags, | ||
47 | unsigned long fd, unsigned long pgoff) | ||
48 | { | 46 | { |
49 | int error = -EBADF; | 47 | int error = -EBADF; |
50 | struct file * file = NULL; | 48 | struct file *file = NULL; |
49 | struct mm_struct *mm = current->mm; | ||
51 | 50 | ||
52 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | 51 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); |
53 | if (!(flags & MAP_ANONYMOUS)) { | 52 | if (!(flags & MAP_ANONYMOUS)) { |
@@ -56,9 +55,9 @@ static inline long do_mmap2( | |||
56 | goto out; | 55 | goto out; |
57 | } | 56 | } |
58 | 57 | ||
59 | down_write(¤t->mm->mmap_sem); | 58 | down_write(&mm->mmap_sem); |
60 | error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | 59 | error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); |
61 | up_write(¤t->mm->mmap_sem); | 60 | up_write(&mm->mmap_sem); |
62 | 61 | ||
63 | if (file) | 62 | if (file) |
64 | fput(file); | 63 | fput(file); |
@@ -66,13 +65,6 @@ out: | |||
66 | return error; | 65 | return error; |
67 | } | 66 | } |
68 | 67 | ||
69 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | ||
70 | unsigned long prot, unsigned long flags, | ||
71 | unsigned long fd, unsigned long pgoff) | ||
72 | { | ||
73 | return do_mmap2(addr, len, prot, flags, fd, pgoff); | ||
74 | } | ||
75 | |||
76 | /* | 68 | /* |
77 | * Perform the select(nd, in, out, ex, tv) and mmap() system | 69 | * Perform the select(nd, in, out, ex, tv) and mmap() system |
78 | * calls. Linux/i386 didn't use to be able to handle more than | 70 | * calls. Linux/i386 didn't use to be able to handle more than |
@@ -101,7 +93,8 @@ asmlinkage int old_mmap(struct mmap_arg_struct __user *arg) | |||
101 | if (a.offset & ~PAGE_MASK) | 93 | if (a.offset & ~PAGE_MASK) |
102 | goto out; | 94 | goto out; |
103 | 95 | ||
104 | err = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT); | 96 | err = sys_mmap2(a.addr, a.len, a.prot, a.flags, |
97 | a.fd, a.offset >> PAGE_SHIFT); | ||
105 | out: | 98 | out: |
106 | return err; | 99 | return err; |
107 | } | 100 | } |
diff --git a/arch/i386/kernel/timers/timer_hpet.c b/arch/i386/kernel/timers/timer_hpet.c index be242723c339..17a6fe7166e7 100644 --- a/arch/i386/kernel/timers/timer_hpet.c +++ b/arch/i386/kernel/timers/timer_hpet.c | |||
@@ -46,7 +46,7 @@ static seqlock_t monotonic_lock = SEQLOCK_UNLOCKED; | |||
46 | * | 46 | * |
47 | * -johnstul@us.ibm.com "math is hard, lets go shopping!" | 47 | * -johnstul@us.ibm.com "math is hard, lets go shopping!" |
48 | */ | 48 | */ |
49 | static unsigned long cyc2ns_scale; | 49 | static unsigned long cyc2ns_scale __read_mostly; |
50 | #define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ | 50 | #define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ |
51 | 51 | ||
52 | static inline void set_cyc2ns_scale(unsigned long cpu_khz) | 52 | static inline void set_cyc2ns_scale(unsigned long cpu_khz) |
diff --git a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c index a7f5a2aceba2..5e41ee29c8cf 100644 --- a/arch/i386/kernel/timers/timer_tsc.c +++ b/arch/i386/kernel/timers/timer_tsc.c | |||
@@ -74,7 +74,7 @@ late_initcall(start_lost_tick_compensation); | |||
74 | * | 74 | * |
75 | * -johnstul@us.ibm.com "math is hard, lets go shopping!" | 75 | * -johnstul@us.ibm.com "math is hard, lets go shopping!" |
76 | */ | 76 | */ |
77 | static unsigned long cyc2ns_scale; | 77 | static unsigned long cyc2ns_scale __read_mostly; |
78 | #define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ | 78 | #define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ |
79 | 79 | ||
80 | static inline void set_cyc2ns_scale(unsigned long cpu_khz) | 80 | static inline void set_cyc2ns_scale(unsigned long cpu_khz) |
diff --git a/arch/i386/kernel/topology.c b/arch/i386/kernel/topology.c index 67a0e1baa28b..296355292c7c 100644 --- a/arch/i386/kernel/topology.c +++ b/arch/i386/kernel/topology.c | |||
@@ -41,6 +41,15 @@ int arch_register_cpu(int num){ | |||
41 | parent = &node_devices[node].node; | 41 | parent = &node_devices[node].node; |
42 | #endif /* CONFIG_NUMA */ | 42 | #endif /* CONFIG_NUMA */ |
43 | 43 | ||
44 | /* | ||
45 | * CPU0 cannot be offlined due to several | ||
46 | * restrictions and assumptions in kernel. This basically | ||
47 | * doesnt add a control file, one cannot attempt to offline | ||
48 | * BSP. | ||
49 | */ | ||
50 | if (!num) | ||
51 | cpu_devices[num].cpu.no_control = 1; | ||
52 | |||
44 | return register_cpu(&cpu_devices[num].cpu, num, parent); | 53 | return register_cpu(&cpu_devices[num].cpu, num, parent); |
45 | } | 54 | } |
46 | 55 | ||
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index b814dbdcc91e..de5386b01d38 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -99,6 +99,8 @@ int register_die_notifier(struct notifier_block *nb) | |||
99 | { | 99 | { |
100 | int err = 0; | 100 | int err = 0; |
101 | unsigned long flags; | 101 | unsigned long flags; |
102 | |||
103 | vmalloc_sync_all(); | ||
102 | spin_lock_irqsave(&die_notifier_lock, flags); | 104 | spin_lock_irqsave(&die_notifier_lock, flags); |
103 | err = notifier_chain_register(&i386die_chain, nb); | 105 | err = notifier_chain_register(&i386die_chain, nb); |
104 | spin_unlock_irqrestore(&die_notifier_lock, flags); | 106 | spin_unlock_irqrestore(&die_notifier_lock, flags); |
@@ -112,12 +114,30 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) | |||
112 | p < (void *)tinfo + THREAD_SIZE - 3; | 114 | p < (void *)tinfo + THREAD_SIZE - 3; |
113 | } | 115 | } |
114 | 116 | ||
115 | static void print_addr_and_symbol(unsigned long addr, char *log_lvl) | 117 | /* |
118 | * Print CONFIG_STACK_BACKTRACE_COLS address/symbol entries per line. | ||
119 | */ | ||
120 | static inline int print_addr_and_symbol(unsigned long addr, char *log_lvl, | ||
121 | int printed) | ||
116 | { | 122 | { |
117 | printk(log_lvl); | 123 | if (!printed) |
124 | printk(log_lvl); | ||
125 | |||
126 | #if CONFIG_STACK_BACKTRACE_COLS == 1 | ||
118 | printk(" [<%08lx>] ", addr); | 127 | printk(" [<%08lx>] ", addr); |
128 | #else | ||
129 | printk(" <%08lx> ", addr); | ||
130 | #endif | ||
119 | print_symbol("%s", addr); | 131 | print_symbol("%s", addr); |
120 | printk("\n"); | 132 | |
133 | printed = (printed + 1) % CONFIG_STACK_BACKTRACE_COLS; | ||
134 | |||
135 | if (printed) | ||
136 | printk(" "); | ||
137 | else | ||
138 | printk("\n"); | ||
139 | |||
140 | return printed; | ||
121 | } | 141 | } |
122 | 142 | ||
123 | static inline unsigned long print_context_stack(struct thread_info *tinfo, | 143 | static inline unsigned long print_context_stack(struct thread_info *tinfo, |
@@ -125,20 +145,24 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo, | |||
125 | char *log_lvl) | 145 | char *log_lvl) |
126 | { | 146 | { |
127 | unsigned long addr; | 147 | unsigned long addr; |
148 | int printed = 0; /* nr of entries already printed on current line */ | ||
128 | 149 | ||
129 | #ifdef CONFIG_FRAME_POINTER | 150 | #ifdef CONFIG_FRAME_POINTER |
130 | while (valid_stack_ptr(tinfo, (void *)ebp)) { | 151 | while (valid_stack_ptr(tinfo, (void *)ebp)) { |
131 | addr = *(unsigned long *)(ebp + 4); | 152 | addr = *(unsigned long *)(ebp + 4); |
132 | print_addr_and_symbol(addr, log_lvl); | 153 | printed = print_addr_and_symbol(addr, log_lvl, printed); |
133 | ebp = *(unsigned long *)ebp; | 154 | ebp = *(unsigned long *)ebp; |
134 | } | 155 | } |
135 | #else | 156 | #else |
136 | while (valid_stack_ptr(tinfo, stack)) { | 157 | while (valid_stack_ptr(tinfo, stack)) { |
137 | addr = *stack++; | 158 | addr = *stack++; |
138 | if (__kernel_text_address(addr)) | 159 | if (__kernel_text_address(addr)) |
139 | print_addr_and_symbol(addr, log_lvl); | 160 | printed = print_addr_and_symbol(addr, log_lvl, printed); |
140 | } | 161 | } |
141 | #endif | 162 | #endif |
163 | if (printed) | ||
164 | printk("\n"); | ||
165 | |||
142 | return ebp; | 166 | return ebp; |
143 | } | 167 | } |
144 | 168 | ||
@@ -166,8 +190,7 @@ static void show_trace_log_lvl(struct task_struct *task, | |||
166 | stack = (unsigned long*)context->previous_esp; | 190 | stack = (unsigned long*)context->previous_esp; |
167 | if (!stack) | 191 | if (!stack) |
168 | break; | 192 | break; |
169 | printk(log_lvl); | 193 | printk("%s =======================\n", log_lvl); |
170 | printk(" =======================\n"); | ||
171 | } | 194 | } |
172 | } | 195 | } |
173 | 196 | ||
@@ -194,21 +217,17 @@ static void show_stack_log_lvl(struct task_struct *task, unsigned long *esp, | |||
194 | for(i = 0; i < kstack_depth_to_print; i++) { | 217 | for(i = 0; i < kstack_depth_to_print; i++) { |
195 | if (kstack_end(stack)) | 218 | if (kstack_end(stack)) |
196 | break; | 219 | break; |
197 | if (i && ((i % 8) == 0)) { | 220 | if (i && ((i % 8) == 0)) |
198 | printk("\n"); | 221 | printk("\n%s ", log_lvl); |
199 | printk(log_lvl); | ||
200 | printk(" "); | ||
201 | } | ||
202 | printk("%08lx ", *stack++); | 222 | printk("%08lx ", *stack++); |
203 | } | 223 | } |
204 | printk("\n"); | 224 | printk("\n%sCall Trace:\n", log_lvl); |
205 | printk(log_lvl); | ||
206 | printk("Call Trace:\n"); | ||
207 | show_trace_log_lvl(task, esp, log_lvl); | 225 | show_trace_log_lvl(task, esp, log_lvl); |
208 | } | 226 | } |
209 | 227 | ||
210 | void show_stack(struct task_struct *task, unsigned long *esp) | 228 | void show_stack(struct task_struct *task, unsigned long *esp) |
211 | { | 229 | { |
230 | printk(" "); | ||
212 | show_stack_log_lvl(task, esp, ""); | 231 | show_stack_log_lvl(task, esp, ""); |
213 | } | 232 | } |
214 | 233 | ||
@@ -233,7 +252,7 @@ void show_registers(struct pt_regs *regs) | |||
233 | 252 | ||
234 | esp = (unsigned long) (®s->esp); | 253 | esp = (unsigned long) (®s->esp); |
235 | savesegment(ss, ss); | 254 | savesegment(ss, ss); |
236 | if (user_mode(regs)) { | 255 | if (user_mode_vm(regs)) { |
237 | in_kernel = 0; | 256 | in_kernel = 0; |
238 | esp = regs->esp; | 257 | esp = regs->esp; |
239 | ss = regs->xss & 0xffff; | 258 | ss = regs->xss & 0xffff; |
@@ -333,6 +352,8 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
333 | static int die_counter; | 352 | static int die_counter; |
334 | unsigned long flags; | 353 | unsigned long flags; |
335 | 354 | ||
355 | oops_enter(); | ||
356 | |||
336 | if (die.lock_owner != raw_smp_processor_id()) { | 357 | if (die.lock_owner != raw_smp_processor_id()) { |
337 | console_verbose(); | 358 | console_verbose(); |
338 | spin_lock_irqsave(&die.lock, flags); | 359 | spin_lock_irqsave(&die.lock, flags); |
@@ -385,6 +406,7 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
385 | ssleep(5); | 406 | ssleep(5); |
386 | panic("Fatal exception"); | 407 | panic("Fatal exception"); |
387 | } | 408 | } |
409 | oops_exit(); | ||
388 | do_exit(SIGSEGV); | 410 | do_exit(SIGSEGV); |
389 | } | 411 | } |
390 | 412 | ||
@@ -623,7 +645,7 @@ void die_nmi (struct pt_regs *regs, const char *msg) | |||
623 | /* If we are in kernel we are probably nested up pretty bad | 645 | /* If we are in kernel we are probably nested up pretty bad |
624 | * and might aswell get out now while we still can. | 646 | * and might aswell get out now while we still can. |
625 | */ | 647 | */ |
626 | if (!user_mode(regs)) { | 648 | if (!user_mode_vm(regs)) { |
627 | current->thread.trap_no = 2; | 649 | current->thread.trap_no = 2; |
628 | crash_kexec(regs); | 650 | crash_kexec(regs); |
629 | } | 651 | } |
@@ -694,6 +716,7 @@ fastcall void do_nmi(struct pt_regs * regs, long error_code) | |||
694 | 716 | ||
695 | void set_nmi_callback(nmi_callback_t callback) | 717 | void set_nmi_callback(nmi_callback_t callback) |
696 | { | 718 | { |
719 | vmalloc_sync_all(); | ||
697 | rcu_assign_pointer(nmi_callback, callback); | 720 | rcu_assign_pointer(nmi_callback, callback); |
698 | } | 721 | } |
699 | EXPORT_SYMBOL_GPL(set_nmi_callback); | 722 | EXPORT_SYMBOL_GPL(set_nmi_callback); |
diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c index f51c894a7da5..aee14fafd13d 100644 --- a/arch/i386/kernel/vm86.c +++ b/arch/i386/kernel/vm86.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/smp_lock.h> | 43 | #include <linux/smp_lock.h> |
44 | #include <linux/highmem.h> | 44 | #include <linux/highmem.h> |
45 | #include <linux/ptrace.h> | 45 | #include <linux/ptrace.h> |
46 | #include <linux/audit.h> | ||
46 | 47 | ||
47 | #include <asm/uaccess.h> | 48 | #include <asm/uaccess.h> |
48 | #include <asm/io.h> | 49 | #include <asm/io.h> |
@@ -252,6 +253,7 @@ out: | |||
252 | static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk) | 253 | static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk) |
253 | { | 254 | { |
254 | struct tss_struct *tss; | 255 | struct tss_struct *tss; |
256 | long eax; | ||
255 | /* | 257 | /* |
256 | * make sure the vm86() system call doesn't try to do anything silly | 258 | * make sure the vm86() system call doesn't try to do anything silly |
257 | */ | 259 | */ |
@@ -305,13 +307,19 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk | |||
305 | tsk->thread.screen_bitmap = info->screen_bitmap; | 307 | tsk->thread.screen_bitmap = info->screen_bitmap; |
306 | if (info->flags & VM86_SCREEN_BITMAP) | 308 | if (info->flags & VM86_SCREEN_BITMAP) |
307 | mark_screen_rdonly(tsk->mm); | 309 | mark_screen_rdonly(tsk->mm); |
310 | __asm__ __volatile__("xorl %eax,%eax; movl %eax,%fs; movl %eax,%gs\n\t"); | ||
311 | __asm__ __volatile__("movl %%eax, %0\n" :"=r"(eax)); | ||
312 | |||
313 | /*call audit_syscall_exit since we do not exit via the normal paths */ | ||
314 | if (unlikely(current->audit_context)) | ||
315 | audit_syscall_exit(current, AUDITSC_RESULT(eax), eax); | ||
316 | |||
308 | __asm__ __volatile__( | 317 | __asm__ __volatile__( |
309 | "xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs\n\t" | ||
310 | "movl %0,%%esp\n\t" | 318 | "movl %0,%%esp\n\t" |
311 | "movl %1,%%ebp\n\t" | 319 | "movl %1,%%ebp\n\t" |
312 | "jmp resume_userspace" | 320 | "jmp resume_userspace" |
313 | : /* no outputs */ | 321 | : /* no outputs */ |
314 | :"r" (&info->regs), "r" (task_thread_info(tsk)) : "ax"); | 322 | :"r" (&info->regs), "r" (task_thread_info(tsk))); |
315 | /* we never return here */ | 323 | /* we never return here */ |
316 | } | 324 | } |
317 | 325 | ||
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S index 4710195b6b74..8831303a473f 100644 --- a/arch/i386/kernel/vmlinux.lds.S +++ b/arch/i386/kernel/vmlinux.lds.S | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <asm-generic/vmlinux.lds.h> | 7 | #include <asm-generic/vmlinux.lds.h> |
8 | #include <asm/thread_info.h> | 8 | #include <asm/thread_info.h> |
9 | #include <asm/page.h> | 9 | #include <asm/page.h> |
10 | #include <asm/cache.h> | ||
10 | 11 | ||
11 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") | 12 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") |
12 | OUTPUT_ARCH(i386) | 13 | OUTPUT_ARCH(i386) |
@@ -68,6 +69,26 @@ SECTIONS | |||
68 | *(.data.init_task) | 69 | *(.data.init_task) |
69 | } | 70 | } |
70 | 71 | ||
72 | /* might get freed after init */ | ||
73 | . = ALIGN(4096); | ||
74 | __smp_alt_begin = .; | ||
75 | __smp_alt_instructions = .; | ||
76 | .smp_altinstructions : AT(ADDR(.smp_altinstructions) - LOAD_OFFSET) { | ||
77 | *(.smp_altinstructions) | ||
78 | } | ||
79 | __smp_alt_instructions_end = .; | ||
80 | . = ALIGN(4); | ||
81 | __smp_locks = .; | ||
82 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { | ||
83 | *(.smp_locks) | ||
84 | } | ||
85 | __smp_locks_end = .; | ||
86 | .smp_altinstr_replacement : AT(ADDR(.smp_altinstr_replacement) - LOAD_OFFSET) { | ||
87 | *(.smp_altinstr_replacement) | ||
88 | } | ||
89 | . = ALIGN(4096); | ||
90 | __smp_alt_end = .; | ||
91 | |||
71 | /* will be freed after init */ | 92 | /* will be freed after init */ |
72 | . = ALIGN(4096); /* Init code and data */ | 93 | . = ALIGN(4096); /* Init code and data */ |
73 | __init_begin = .; | 94 | __init_begin = .; |
@@ -115,7 +136,7 @@ SECTIONS | |||
115 | __initramfs_start = .; | 136 | __initramfs_start = .; |
116 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } | 137 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } |
117 | __initramfs_end = .; | 138 | __initramfs_end = .; |
118 | . = ALIGN(32); | 139 | . = ALIGN(L1_CACHE_BYTES); |
119 | __per_cpu_start = .; | 140 | __per_cpu_start = .; |
120 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) } | 141 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) } |
121 | __per_cpu_end = .; | 142 | __per_cpu_end = .; |
diff --git a/arch/i386/kernel/vsyscall-sysenter.S b/arch/i386/kernel/vsyscall-sysenter.S index 76b728159403..3b62baa6a371 100644 --- a/arch/i386/kernel/vsyscall-sysenter.S +++ b/arch/i386/kernel/vsyscall-sysenter.S | |||
@@ -21,6 +21,9 @@ | |||
21 | * instruction clobbers %esp, the user's %esp won't even survive entry | 21 | * instruction clobbers %esp, the user's %esp won't even survive entry |
22 | * into the kernel. We store %esp in %ebp. Code in entry.S must fetch | 22 | * into the kernel. We store %esp in %ebp. Code in entry.S must fetch |
23 | * arg6 from the stack. | 23 | * arg6 from the stack. |
24 | * | ||
25 | * You can not use this vsyscall for the clone() syscall because the | ||
26 | * three dwords on the parent stack do not get copied to the child. | ||
24 | */ | 27 | */ |
25 | .text | 28 | .text |
26 | .globl __kernel_vsyscall | 29 | .globl __kernel_vsyscall |
diff --git a/arch/i386/mach-es7000/es7000.h b/arch/i386/mach-es7000/es7000.h index f1e3204f5dec..80566ca4a80a 100644 --- a/arch/i386/mach-es7000/es7000.h +++ b/arch/i386/mach-es7000/es7000.h | |||
@@ -83,6 +83,7 @@ struct es7000_oem_table { | |||
83 | struct psai psai; | 83 | struct psai psai; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | #ifdef CONFIG_ACPI | ||
86 | struct acpi_table_sdt { | 87 | struct acpi_table_sdt { |
87 | unsigned long pa; | 88 | unsigned long pa; |
88 | unsigned long count; | 89 | unsigned long count; |
@@ -99,6 +100,9 @@ struct oem_table { | |||
99 | u32 OEMTableSize; | 100 | u32 OEMTableSize; |
100 | }; | 101 | }; |
101 | 102 | ||
103 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); | ||
104 | #endif | ||
105 | |||
102 | struct mip_reg { | 106 | struct mip_reg { |
103 | unsigned long long off_0; | 107 | unsigned long long off_0; |
104 | unsigned long long off_8; | 108 | unsigned long long off_8; |
@@ -114,7 +118,6 @@ struct mip_reg { | |||
114 | #define MIP_FUNC(VALUE) (VALUE & 0xff) | 118 | #define MIP_FUNC(VALUE) (VALUE & 0xff) |
115 | 119 | ||
116 | extern int parse_unisys_oem (char *oemptr); | 120 | extern int parse_unisys_oem (char *oemptr); |
117 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); | ||
118 | extern void setup_unisys(void); | 121 | extern void setup_unisys(void); |
119 | extern int es7000_start_cpu(int cpu, unsigned long eip); | 122 | extern int es7000_start_cpu(int cpu, unsigned long eip); |
120 | extern void es7000_sw_apic(void); | 123 | extern void es7000_sw_apic(void); |
diff --git a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c index a9ab0644f403..3d0fc853516d 100644 --- a/arch/i386/mach-es7000/es7000plat.c +++ b/arch/i386/mach-es7000/es7000plat.c | |||
@@ -51,8 +51,6 @@ struct mip_reg *host_reg; | |||
51 | int mip_port; | 51 | int mip_port; |
52 | unsigned long mip_addr, host_addr; | 52 | unsigned long mip_addr, host_addr; |
53 | 53 | ||
54 | #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI) | ||
55 | |||
56 | /* | 54 | /* |
57 | * GSI override for ES7000 platforms. | 55 | * GSI override for ES7000 platforms. |
58 | */ | 56 | */ |
@@ -76,8 +74,6 @@ es7000_rename_gsi(int ioapic, int gsi) | |||
76 | return gsi; | 74 | return gsi; |
77 | } | 75 | } |
78 | 76 | ||
79 | #endif /* (CONFIG_X86_IO_APIC) && (CONFIG_ACPI) */ | ||
80 | |||
81 | void __init | 77 | void __init |
82 | setup_unisys(void) | 78 | setup_unisys(void) |
83 | { | 79 | { |
@@ -160,6 +156,7 @@ parse_unisys_oem (char *oemptr) | |||
160 | return es7000_plat; | 156 | return es7000_plat; |
161 | } | 157 | } |
162 | 158 | ||
159 | #ifdef CONFIG_ACPI | ||
163 | int __init | 160 | int __init |
164 | find_unisys_acpi_oem_table(unsigned long *oem_addr) | 161 | find_unisys_acpi_oem_table(unsigned long *oem_addr) |
165 | { | 162 | { |
@@ -212,6 +209,7 @@ find_unisys_acpi_oem_table(unsigned long *oem_addr) | |||
212 | } | 209 | } |
213 | return -1; | 210 | return -1; |
214 | } | 211 | } |
212 | #endif | ||
215 | 213 | ||
216 | static void | 214 | static void |
217 | es7000_spin(int n) | 215 | es7000_spin(int n) |
diff --git a/arch/i386/mach-visws/reboot.c b/arch/i386/mach-visws/reboot.c index 5d73e042ed0a..99332abfad42 100644 --- a/arch/i386/mach-visws/reboot.c +++ b/arch/i386/mach-visws/reboot.c | |||
@@ -1,7 +1,6 @@ | |||
1 | #include <linux/module.h> | 1 | #include <linux/module.h> |
2 | #include <linux/smp.h> | 2 | #include <linux/smp.h> |
3 | #include <linux/delay.h> | 3 | #include <linux/delay.h> |
4 | #include <linux/platform.h> | ||
5 | 4 | ||
6 | #include <asm/io.h> | 5 | #include <asm/io.h> |
7 | #include "piix4.h" | 6 | #include "piix4.h" |
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index cf572d9a3b6e..7f0fcf219a26 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c | |||
@@ -214,6 +214,68 @@ static noinline void force_sig_info_fault(int si_signo, int si_code, | |||
214 | 214 | ||
215 | fastcall void do_invalid_op(struct pt_regs *, unsigned long); | 215 | fastcall void do_invalid_op(struct pt_regs *, unsigned long); |
216 | 216 | ||
217 | static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address) | ||
218 | { | ||
219 | unsigned index = pgd_index(address); | ||
220 | pgd_t *pgd_k; | ||
221 | pud_t *pud, *pud_k; | ||
222 | pmd_t *pmd, *pmd_k; | ||
223 | |||
224 | pgd += index; | ||
225 | pgd_k = init_mm.pgd + index; | ||
226 | |||
227 | if (!pgd_present(*pgd_k)) | ||
228 | return NULL; | ||
229 | |||
230 | /* | ||
231 | * set_pgd(pgd, *pgd_k); here would be useless on PAE | ||
232 | * and redundant with the set_pmd() on non-PAE. As would | ||
233 | * set_pud. | ||
234 | */ | ||
235 | |||
236 | pud = pud_offset(pgd, address); | ||
237 | pud_k = pud_offset(pgd_k, address); | ||
238 | if (!pud_present(*pud_k)) | ||
239 | return NULL; | ||
240 | |||
241 | pmd = pmd_offset(pud, address); | ||
242 | pmd_k = pmd_offset(pud_k, address); | ||
243 | if (!pmd_present(*pmd_k)) | ||
244 | return NULL; | ||
245 | if (!pmd_present(*pmd)) | ||
246 | set_pmd(pmd, *pmd_k); | ||
247 | else | ||
248 | BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k)); | ||
249 | return pmd_k; | ||
250 | } | ||
251 | |||
252 | /* | ||
253 | * Handle a fault on the vmalloc or module mapping area | ||
254 | * | ||
255 | * This assumes no large pages in there. | ||
256 | */ | ||
257 | static inline int vmalloc_fault(unsigned long address) | ||
258 | { | ||
259 | unsigned long pgd_paddr; | ||
260 | pmd_t *pmd_k; | ||
261 | pte_t *pte_k; | ||
262 | /* | ||
263 | * Synchronize this task's top level page-table | ||
264 | * with the 'reference' page table. | ||
265 | * | ||
266 | * Do _not_ use "current" here. We might be inside | ||
267 | * an interrupt in the middle of a task switch.. | ||
268 | */ | ||
269 | pgd_paddr = read_cr3(); | ||
270 | pmd_k = vmalloc_sync_one(__va(pgd_paddr), address); | ||
271 | if (!pmd_k) | ||
272 | return -1; | ||
273 | pte_k = pte_offset_kernel(pmd_k, address); | ||
274 | if (!pte_present(*pte_k)) | ||
275 | return -1; | ||
276 | return 0; | ||
277 | } | ||
278 | |||
217 | /* | 279 | /* |
218 | * This routine handles page faults. It determines the address, | 280 | * This routine handles page faults. It determines the address, |
219 | * and the problem, and then passes it off to one of the appropriate | 281 | * and the problem, and then passes it off to one of the appropriate |
@@ -223,6 +285,8 @@ fastcall void do_invalid_op(struct pt_regs *, unsigned long); | |||
223 | * bit 0 == 0 means no page found, 1 means protection fault | 285 | * bit 0 == 0 means no page found, 1 means protection fault |
224 | * bit 1 == 0 means read, 1 means write | 286 | * bit 1 == 0 means read, 1 means write |
225 | * bit 2 == 0 means kernel, 1 means user-mode | 287 | * bit 2 == 0 means kernel, 1 means user-mode |
288 | * bit 3 == 1 means use of reserved bit detected | ||
289 | * bit 4 == 1 means fault was an instruction fetch | ||
226 | */ | 290 | */ |
227 | fastcall void __kprobes do_page_fault(struct pt_regs *regs, | 291 | fastcall void __kprobes do_page_fault(struct pt_regs *regs, |
228 | unsigned long error_code) | 292 | unsigned long error_code) |
@@ -237,13 +301,6 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, | |||
237 | /* get the address */ | 301 | /* get the address */ |
238 | address = read_cr2(); | 302 | address = read_cr2(); |
239 | 303 | ||
240 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, | ||
241 | SIGSEGV) == NOTIFY_STOP) | ||
242 | return; | ||
243 | /* It's safe to allow irq's after cr2 has been saved */ | ||
244 | if (regs->eflags & (X86_EFLAGS_IF|VM_MASK)) | ||
245 | local_irq_enable(); | ||
246 | |||
247 | tsk = current; | 304 | tsk = current; |
248 | 305 | ||
249 | si_code = SEGV_MAPERR; | 306 | si_code = SEGV_MAPERR; |
@@ -259,17 +316,29 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, | |||
259 | * | 316 | * |
260 | * This verifies that the fault happens in kernel space | 317 | * This verifies that the fault happens in kernel space |
261 | * (error_code & 4) == 0, and that the fault was not a | 318 | * (error_code & 4) == 0, and that the fault was not a |
262 | * protection error (error_code & 1) == 0. | 319 | * protection error (error_code & 9) == 0. |
263 | */ | 320 | */ |
264 | if (unlikely(address >= TASK_SIZE)) { | 321 | if (unlikely(address >= TASK_SIZE)) { |
265 | if (!(error_code & 5)) | 322 | if (!(error_code & 0x0000000d) && vmalloc_fault(address) >= 0) |
266 | goto vmalloc_fault; | 323 | return; |
267 | /* | 324 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, |
325 | SIGSEGV) == NOTIFY_STOP) | ||
326 | return; | ||
327 | /* | ||
268 | * Don't take the mm semaphore here. If we fixup a prefetch | 328 | * Don't take the mm semaphore here. If we fixup a prefetch |
269 | * fault we could otherwise deadlock. | 329 | * fault we could otherwise deadlock. |
270 | */ | 330 | */ |
271 | goto bad_area_nosemaphore; | 331 | goto bad_area_nosemaphore; |
272 | } | 332 | } |
333 | |||
334 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, | ||
335 | SIGSEGV) == NOTIFY_STOP) | ||
336 | return; | ||
337 | |||
338 | /* It's safe to allow irq's after cr2 has been saved and the vmalloc | ||
339 | fault has been handled. */ | ||
340 | if (regs->eflags & (X86_EFLAGS_IF|VM_MASK)) | ||
341 | local_irq_enable(); | ||
273 | 342 | ||
274 | mm = tsk->mm; | 343 | mm = tsk->mm; |
275 | 344 | ||
@@ -440,24 +509,31 @@ no_context: | |||
440 | 509 | ||
441 | bust_spinlocks(1); | 510 | bust_spinlocks(1); |
442 | 511 | ||
443 | #ifdef CONFIG_X86_PAE | 512 | if (oops_may_print()) { |
444 | if (error_code & 16) { | 513 | #ifdef CONFIG_X86_PAE |
445 | pte_t *pte = lookup_address(address); | 514 | if (error_code & 16) { |
515 | pte_t *pte = lookup_address(address); | ||
446 | 516 | ||
447 | if (pte && pte_present(*pte) && !pte_exec_kernel(*pte)) | 517 | if (pte && pte_present(*pte) && !pte_exec_kernel(*pte)) |
448 | printk(KERN_CRIT "kernel tried to execute NX-protected page - exploit attempt? (uid: %d)\n", current->uid); | 518 | printk(KERN_CRIT "kernel tried to execute " |
519 | "NX-protected page - exploit attempt? " | ||
520 | "(uid: %d)\n", current->uid); | ||
521 | } | ||
522 | #endif | ||
523 | if (address < PAGE_SIZE) | ||
524 | printk(KERN_ALERT "BUG: unable to handle kernel NULL " | ||
525 | "pointer dereference"); | ||
526 | else | ||
527 | printk(KERN_ALERT "BUG: unable to handle kernel paging" | ||
528 | " request"); | ||
529 | printk(" at virtual address %08lx\n",address); | ||
530 | printk(KERN_ALERT " printing eip:\n"); | ||
531 | printk("%08lx\n", regs->eip); | ||
449 | } | 532 | } |
450 | #endif | ||
451 | if (address < PAGE_SIZE) | ||
452 | printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); | ||
453 | else | ||
454 | printk(KERN_ALERT "Unable to handle kernel paging request"); | ||
455 | printk(" at virtual address %08lx\n",address); | ||
456 | printk(KERN_ALERT " printing eip:\n"); | ||
457 | printk("%08lx\n", regs->eip); | ||
458 | page = read_cr3(); | 533 | page = read_cr3(); |
459 | page = ((unsigned long *) __va(page))[address >> 22]; | 534 | page = ((unsigned long *) __va(page))[address >> 22]; |
460 | printk(KERN_ALERT "*pde = %08lx\n", page); | 535 | if (oops_may_print()) |
536 | printk(KERN_ALERT "*pde = %08lx\n", page); | ||
461 | /* | 537 | /* |
462 | * We must not directly access the pte in the highpte | 538 | * We must not directly access the pte in the highpte |
463 | * case, the page table might be allocated in highmem. | 539 | * case, the page table might be allocated in highmem. |
@@ -465,7 +541,7 @@ no_context: | |||
465 | * it's allocated already. | 541 | * it's allocated already. |
466 | */ | 542 | */ |
467 | #ifndef CONFIG_HIGHPTE | 543 | #ifndef CONFIG_HIGHPTE |
468 | if (page & 1) { | 544 | if ((page & 1) && oops_may_print()) { |
469 | page &= PAGE_MASK; | 545 | page &= PAGE_MASK; |
470 | address &= 0x003ff000; | 546 | address &= 0x003ff000; |
471 | page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT]; | 547 | page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT]; |
@@ -510,51 +586,41 @@ do_sigbus: | |||
510 | tsk->thread.error_code = error_code; | 586 | tsk->thread.error_code = error_code; |
511 | tsk->thread.trap_no = 14; | 587 | tsk->thread.trap_no = 14; |
512 | force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk); | 588 | force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk); |
513 | return; | 589 | } |
514 | |||
515 | vmalloc_fault: | ||
516 | { | ||
517 | /* | ||
518 | * Synchronize this task's top level page-table | ||
519 | * with the 'reference' page table. | ||
520 | * | ||
521 | * Do _not_ use "tsk" here. We might be inside | ||
522 | * an interrupt in the middle of a task switch.. | ||
523 | */ | ||
524 | int index = pgd_index(address); | ||
525 | unsigned long pgd_paddr; | ||
526 | pgd_t *pgd, *pgd_k; | ||
527 | pud_t *pud, *pud_k; | ||
528 | pmd_t *pmd, *pmd_k; | ||
529 | pte_t *pte_k; | ||
530 | |||
531 | pgd_paddr = read_cr3(); | ||
532 | pgd = index + (pgd_t *)__va(pgd_paddr); | ||
533 | pgd_k = init_mm.pgd + index; | ||
534 | |||
535 | if (!pgd_present(*pgd_k)) | ||
536 | goto no_context; | ||
537 | |||
538 | /* | ||
539 | * set_pgd(pgd, *pgd_k); here would be useless on PAE | ||
540 | * and redundant with the set_pmd() on non-PAE. As would | ||
541 | * set_pud. | ||
542 | */ | ||
543 | 590 | ||
544 | pud = pud_offset(pgd, address); | 591 | #ifndef CONFIG_X86_PAE |
545 | pud_k = pud_offset(pgd_k, address); | 592 | void vmalloc_sync_all(void) |
546 | if (!pud_present(*pud_k)) | 593 | { |
547 | goto no_context; | 594 | /* |
548 | 595 | * Note that races in the updates of insync and start aren't | |
549 | pmd = pmd_offset(pud, address); | 596 | * problematic: insync can only get set bits added, and updates to |
550 | pmd_k = pmd_offset(pud_k, address); | 597 | * start are only improving performance (without affecting correctness |
551 | if (!pmd_present(*pmd_k)) | 598 | * if undone). |
552 | goto no_context; | 599 | */ |
553 | set_pmd(pmd, *pmd_k); | 600 | static DECLARE_BITMAP(insync, PTRS_PER_PGD); |
601 | static unsigned long start = TASK_SIZE; | ||
602 | unsigned long address; | ||
554 | 603 | ||
555 | pte_k = pte_offset_kernel(pmd_k, address); | 604 | BUILD_BUG_ON(TASK_SIZE & ~PGDIR_MASK); |
556 | if (!pte_present(*pte_k)) | 605 | for (address = start; address >= TASK_SIZE; address += PGDIR_SIZE) { |
557 | goto no_context; | 606 | if (!test_bit(pgd_index(address), insync)) { |
558 | return; | 607 | unsigned long flags; |
608 | struct page *page; | ||
609 | |||
610 | spin_lock_irqsave(&pgd_lock, flags); | ||
611 | for (page = pgd_list; page; page = | ||
612 | (struct page *)page->index) | ||
613 | if (!vmalloc_sync_one(page_address(page), | ||
614 | address)) { | ||
615 | BUG_ON(page != pgd_list); | ||
616 | break; | ||
617 | } | ||
618 | spin_unlock_irqrestore(&pgd_lock, flags); | ||
619 | if (!page) | ||
620 | set_bit(pgd_index(address), insync); | ||
621 | } | ||
622 | if (address == start && test_bit(pgd_index(address), insync)) | ||
623 | start = address + PGDIR_SIZE; | ||
559 | } | 624 | } |
560 | } | 625 | } |
626 | #endif | ||
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c index d524127c9afc..a7d891585411 100644 --- a/arch/i386/mm/hugetlbpage.c +++ b/arch/i386/mm/hugetlbpage.c | |||
@@ -48,18 +48,6 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
48 | return (pte_t *) pmd; | 48 | return (pte_t *) pmd; |
49 | } | 49 | } |
50 | 50 | ||
51 | /* | ||
52 | * This function checks for proper alignment of input addr and len parameters. | ||
53 | */ | ||
54 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | ||
55 | { | ||
56 | if (len & ~HPAGE_MASK) | ||
57 | return -EINVAL; | ||
58 | if (addr & ~HPAGE_MASK) | ||
59 | return -EINVAL; | ||
60 | return 0; | ||
61 | } | ||
62 | |||
63 | #if 0 /* This is just for testing */ | 51 | #if 0 /* This is just for testing */ |
64 | struct page * | 52 | struct page * |
65 | follow_huge_addr(struct mm_struct *mm, unsigned long address, int write) | 53 | follow_huge_addr(struct mm_struct *mm, unsigned long address, int write) |
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 2700f01994ba..9f66ac582a8b 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -270,7 +270,7 @@ static void __init permanent_kmaps_init(pgd_t *pgd_base) | |||
270 | 270 | ||
271 | static void __meminit free_new_highpage(struct page *page) | 271 | static void __meminit free_new_highpage(struct page *page) |
272 | { | 272 | { |
273 | set_page_count(page, 1); | 273 | init_page_count(page); |
274 | __free_page(page); | 274 | __free_page(page); |
275 | totalhigh_pages++; | 275 | totalhigh_pages++; |
276 | } | 276 | } |
@@ -720,21 +720,6 @@ static int noinline do_test_wp_bit(void) | |||
720 | return flag; | 720 | return flag; |
721 | } | 721 | } |
722 | 722 | ||
723 | void free_initmem(void) | ||
724 | { | ||
725 | unsigned long addr; | ||
726 | |||
727 | addr = (unsigned long)(&__init_begin); | ||
728 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | ||
729 | ClearPageReserved(virt_to_page(addr)); | ||
730 | set_page_count(virt_to_page(addr), 1); | ||
731 | memset((void *)addr, 0xcc, PAGE_SIZE); | ||
732 | free_page(addr); | ||
733 | totalram_pages++; | ||
734 | } | ||
735 | printk (KERN_INFO "Freeing unused kernel memory: %dk freed\n", (__init_end - __init_begin) >> 10); | ||
736 | } | ||
737 | |||
738 | #ifdef CONFIG_DEBUG_RODATA | 723 | #ifdef CONFIG_DEBUG_RODATA |
739 | 724 | ||
740 | extern char __start_rodata, __end_rodata; | 725 | extern char __start_rodata, __end_rodata; |
@@ -758,17 +743,31 @@ void mark_rodata_ro(void) | |||
758 | } | 743 | } |
759 | #endif | 744 | #endif |
760 | 745 | ||
746 | void free_init_pages(char *what, unsigned long begin, unsigned long end) | ||
747 | { | ||
748 | unsigned long addr; | ||
749 | |||
750 | for (addr = begin; addr < end; addr += PAGE_SIZE) { | ||
751 | ClearPageReserved(virt_to_page(addr)); | ||
752 | init_page_count(virt_to_page(addr)); | ||
753 | memset((void *)addr, 0xcc, PAGE_SIZE); | ||
754 | free_page(addr); | ||
755 | totalram_pages++; | ||
756 | } | ||
757 | printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10); | ||
758 | } | ||
759 | |||
760 | void free_initmem(void) | ||
761 | { | ||
762 | free_init_pages("unused kernel memory", | ||
763 | (unsigned long)(&__init_begin), | ||
764 | (unsigned long)(&__init_end)); | ||
765 | } | ||
761 | 766 | ||
762 | #ifdef CONFIG_BLK_DEV_INITRD | 767 | #ifdef CONFIG_BLK_DEV_INITRD |
763 | void free_initrd_mem(unsigned long start, unsigned long end) | 768 | void free_initrd_mem(unsigned long start, unsigned long end) |
764 | { | 769 | { |
765 | if (start < end) | 770 | free_init_pages("initrd memory", start, end); |
766 | printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | ||
767 | for (; start < end; start += PAGE_SIZE) { | ||
768 | ClearPageReserved(virt_to_page(start)); | ||
769 | set_page_count(virt_to_page(start), 1); | ||
770 | free_page(start); | ||
771 | totalram_pages++; | ||
772 | } | ||
773 | } | 771 | } |
774 | #endif | 772 | #endif |
773 | |||
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c index d0cadb33b54c..92c3d9f0e731 100644 --- a/arch/i386/mm/pageattr.c +++ b/arch/i386/mm/pageattr.c | |||
@@ -51,6 +51,13 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot, | |||
51 | if (!base) | 51 | if (!base) |
52 | return NULL; | 52 | return NULL; |
53 | 53 | ||
54 | /* | ||
55 | * page_private is used to track the number of entries in | ||
56 | * the page table page that have non standard attributes. | ||
57 | */ | ||
58 | SetPagePrivate(base); | ||
59 | page_private(base) = 0; | ||
60 | |||
54 | address = __pa(address); | 61 | address = __pa(address); |
55 | addr = address & LARGE_PAGE_MASK; | 62 | addr = address & LARGE_PAGE_MASK; |
56 | pbase = (pte_t *)page_address(base); | 63 | pbase = (pte_t *)page_address(base); |
@@ -143,11 +150,12 @@ __change_page_attr(struct page *page, pgprot_t prot) | |||
143 | return -ENOMEM; | 150 | return -ENOMEM; |
144 | set_pmd_pte(kpte,address,mk_pte(split, ref_prot)); | 151 | set_pmd_pte(kpte,address,mk_pte(split, ref_prot)); |
145 | kpte_page = split; | 152 | kpte_page = split; |
146 | } | 153 | } |
147 | get_page(kpte_page); | 154 | page_private(kpte_page)++; |
148 | } else if ((pte_val(*kpte) & _PAGE_PSE) == 0) { | 155 | } else if ((pte_val(*kpte) & _PAGE_PSE) == 0) { |
149 | set_pte_atomic(kpte, mk_pte(page, PAGE_KERNEL)); | 156 | set_pte_atomic(kpte, mk_pte(page, PAGE_KERNEL)); |
150 | __put_page(kpte_page); | 157 | BUG_ON(page_private(kpte_page) == 0); |
158 | page_private(kpte_page)--; | ||
151 | } else | 159 | } else |
152 | BUG(); | 160 | BUG(); |
153 | 161 | ||
@@ -157,10 +165,8 @@ __change_page_attr(struct page *page, pgprot_t prot) | |||
157 | * replace it with a largepage. | 165 | * replace it with a largepage. |
158 | */ | 166 | */ |
159 | if (!PageReserved(kpte_page)) { | 167 | if (!PageReserved(kpte_page)) { |
160 | /* memleak and potential failed 2M page regeneration */ | 168 | if (cpu_has_pse && (page_private(kpte_page) == 0)) { |
161 | BUG_ON(!page_count(kpte_page)); | 169 | ClearPagePrivate(kpte_page); |
162 | |||
163 | if (cpu_has_pse && (page_count(kpte_page) == 1)) { | ||
164 | list_add(&kpte_page->lru, &df_list); | 170 | list_add(&kpte_page->lru, &df_list); |
165 | revert_page(kpte_page, address); | 171 | revert_page(kpte_page, address); |
166 | } | 172 | } |
diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c index 0493e8b8ec49..1accce50c2c7 100644 --- a/arch/i386/oprofile/nmi_int.c +++ b/arch/i386/oprofile/nmi_int.c | |||
@@ -122,7 +122,7 @@ static void nmi_save_registers(void * dummy) | |||
122 | static void free_msrs(void) | 122 | static void free_msrs(void) |
123 | { | 123 | { |
124 | int i; | 124 | int i; |
125 | for (i = 0; i < NR_CPUS; ++i) { | 125 | for_each_cpu(i) { |
126 | kfree(cpu_msrs[i].counters); | 126 | kfree(cpu_msrs[i].counters); |
127 | cpu_msrs[i].counters = NULL; | 127 | cpu_msrs[i].counters = NULL; |
128 | kfree(cpu_msrs[i].controls); | 128 | kfree(cpu_msrs[i].controls); |
@@ -138,10 +138,7 @@ static int allocate_msrs(void) | |||
138 | size_t counters_size = sizeof(struct op_msr) * model->num_counters; | 138 | size_t counters_size = sizeof(struct op_msr) * model->num_counters; |
139 | 139 | ||
140 | int i; | 140 | int i; |
141 | for (i = 0; i < NR_CPUS; ++i) { | 141 | for_each_online_cpu(i) { |
142 | if (!cpu_online(i)) | ||
143 | continue; | ||
144 | |||
145 | cpu_msrs[i].counters = kmalloc(counters_size, GFP_KERNEL); | 142 | cpu_msrs[i].counters = kmalloc(counters_size, GFP_KERNEL); |
146 | if (!cpu_msrs[i].counters) { | 143 | if (!cpu_msrs[i].counters) { |
147 | success = 0; | 144 | success = 0; |
diff --git a/arch/i386/pci/Makefile b/arch/i386/pci/Makefile index 5461d4d5ea1e..62ad75c57e6a 100644 --- a/arch/i386/pci/Makefile +++ b/arch/i386/pci/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | obj-y := i386.o | 1 | obj-y := i386.o init.o |
2 | 2 | ||
3 | obj-$(CONFIG_PCI_BIOS) += pcbios.o | 3 | obj-$(CONFIG_PCI_BIOS) += pcbios.o |
4 | obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o | 4 | obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o |
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c index f6bc48da4d2a..dbece776c5b2 100644 --- a/arch/i386/pci/common.c +++ b/arch/i386/pci/common.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/pci.h> | 8 | #include <linux/pci.h> |
9 | #include <linux/ioport.h> | 9 | #include <linux/ioport.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/dmi.h> | ||
11 | 12 | ||
12 | #include <asm/acpi.h> | 13 | #include <asm/acpi.h> |
13 | #include <asm/segment.h> | 14 | #include <asm/segment.h> |
@@ -120,11 +121,42 @@ void __devinit pcibios_fixup_bus(struct pci_bus *b) | |||
120 | pci_read_bridge_bases(b); | 121 | pci_read_bridge_bases(b); |
121 | } | 122 | } |
122 | 123 | ||
124 | /* | ||
125 | * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus) | ||
126 | */ | ||
127 | #ifdef __i386__ | ||
128 | static int __devinit assign_all_busses(struct dmi_system_id *d) | ||
129 | { | ||
130 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; | ||
131 | printk(KERN_INFO "%s detected: enabling PCI bus# renumbering" | ||
132 | " (pci=assign-busses)\n", d->ident); | ||
133 | return 0; | ||
134 | } | ||
135 | #endif | ||
136 | |||
137 | /* | ||
138 | * Laptops which need pci=assign-busses to see Cardbus cards | ||
139 | */ | ||
140 | static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = { | ||
141 | #ifdef __i386__ | ||
142 | { | ||
143 | .callback = assign_all_busses, | ||
144 | .ident = "Samsung X20 Laptop", | ||
145 | .matches = { | ||
146 | DMI_MATCH(DMI_SYS_VENDOR, "Samsung Electronics"), | ||
147 | DMI_MATCH(DMI_PRODUCT_NAME, "SX20S"), | ||
148 | }, | ||
149 | }, | ||
150 | #endif /* __i386__ */ | ||
151 | {} | ||
152 | }; | ||
123 | 153 | ||
124 | struct pci_bus * __devinit pcibios_scan_root(int busnum) | 154 | struct pci_bus * __devinit pcibios_scan_root(int busnum) |
125 | { | 155 | { |
126 | struct pci_bus *bus = NULL; | 156 | struct pci_bus *bus = NULL; |
127 | 157 | ||
158 | dmi_check_system(pciprobe_dmi_table); | ||
159 | |||
128 | while ((bus = pci_find_next_bus(bus)) != NULL) { | 160 | while ((bus = pci_find_next_bus(bus)) != NULL) { |
129 | if (bus->number == busnum) { | 161 | if (bus->number == busnum) { |
130 | /* Already scanned */ | 162 | /* Already scanned */ |
diff --git a/arch/i386/pci/direct.c b/arch/i386/pci/direct.c index e3ac502bf2fb..99012b93bd12 100644 --- a/arch/i386/pci/direct.c +++ b/arch/i386/pci/direct.c | |||
@@ -245,7 +245,7 @@ static int __init pci_check_type2(void) | |||
245 | return works; | 245 | return works; |
246 | } | 246 | } |
247 | 247 | ||
248 | static int __init pci_direct_init(void) | 248 | void __init pci_direct_init(void) |
249 | { | 249 | { |
250 | struct resource *region, *region2; | 250 | struct resource *region, *region2; |
251 | 251 | ||
@@ -258,16 +258,16 @@ static int __init pci_direct_init(void) | |||
258 | if (pci_check_type1()) { | 258 | if (pci_check_type1()) { |
259 | printk(KERN_INFO "PCI: Using configuration type 1\n"); | 259 | printk(KERN_INFO "PCI: Using configuration type 1\n"); |
260 | raw_pci_ops = &pci_direct_conf1; | 260 | raw_pci_ops = &pci_direct_conf1; |
261 | return 0; | 261 | return; |
262 | } | 262 | } |
263 | release_resource(region); | 263 | release_resource(region); |
264 | 264 | ||
265 | type2: | 265 | type2: |
266 | if ((pci_probe & PCI_PROBE_CONF2) == 0) | 266 | if ((pci_probe & PCI_PROBE_CONF2) == 0) |
267 | goto out; | 267 | return; |
268 | region = request_region(0xCF8, 4, "PCI conf2"); | 268 | region = request_region(0xCF8, 4, "PCI conf2"); |
269 | if (!region) | 269 | if (!region) |
270 | goto out; | 270 | return; |
271 | region2 = request_region(0xC000, 0x1000, "PCI conf2"); | 271 | region2 = request_region(0xC000, 0x1000, "PCI conf2"); |
272 | if (!region2) | 272 | if (!region2) |
273 | goto fail2; | 273 | goto fail2; |
@@ -275,15 +275,10 @@ static int __init pci_direct_init(void) | |||
275 | if (pci_check_type2()) { | 275 | if (pci_check_type2()) { |
276 | printk(KERN_INFO "PCI: Using configuration type 2\n"); | 276 | printk(KERN_INFO "PCI: Using configuration type 2\n"); |
277 | raw_pci_ops = &pci_direct_conf2; | 277 | raw_pci_ops = &pci_direct_conf2; |
278 | return 0; | 278 | return; |
279 | } | 279 | } |
280 | 280 | ||
281 | release_resource(region2); | 281 | release_resource(region2); |
282 | fail2: | 282 | fail2: |
283 | release_resource(region); | 283 | release_resource(region); |
284 | |||
285 | out: | ||
286 | return 0; | ||
287 | } | 284 | } |
288 | |||
289 | arch_initcall(pci_direct_init); | ||
diff --git a/arch/i386/pci/init.c b/arch/i386/pci/init.c new file mode 100644 index 000000000000..f9156d3ac723 --- /dev/null +++ b/arch/i386/pci/init.c | |||
@@ -0,0 +1,25 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/pci.h> | ||
3 | #include <linux/init.h> | ||
4 | #include "pci.h" | ||
5 | |||
6 | /* arch_initcall has too random ordering, so call the initializers | ||
7 | in the right sequence from here. */ | ||
8 | static __init int pci_access_init(void) | ||
9 | { | ||
10 | #ifdef CONFIG_PCI_MMCONFIG | ||
11 | pci_mmcfg_init(); | ||
12 | #endif | ||
13 | if (raw_pci_ops) | ||
14 | return 0; | ||
15 | #ifdef CONFIG_PCI_BIOS | ||
16 | pci_pcbios_init(); | ||
17 | #endif | ||
18 | if (raw_pci_ops) | ||
19 | return 0; | ||
20 | #ifdef CONFIG_PCI_DIRECT | ||
21 | pci_direct_init(); | ||
22 | #endif | ||
23 | return 0; | ||
24 | } | ||
25 | arch_initcall(pci_access_init); | ||
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c index 0ee8a983708c..613789071f30 100644 --- a/arch/i386/pci/mmconfig.c +++ b/arch/i386/pci/mmconfig.c | |||
@@ -172,25 +172,20 @@ static __init void unreachable_devices(void) | |||
172 | } | 172 | } |
173 | } | 173 | } |
174 | 174 | ||
175 | static int __init pci_mmcfg_init(void) | 175 | void __init pci_mmcfg_init(void) |
176 | { | 176 | { |
177 | if ((pci_probe & PCI_PROBE_MMCONF) == 0) | 177 | if ((pci_probe & PCI_PROBE_MMCONF) == 0) |
178 | goto out; | 178 | return; |
179 | 179 | ||
180 | acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); | 180 | acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); |
181 | if ((pci_mmcfg_config_num == 0) || | 181 | if ((pci_mmcfg_config_num == 0) || |
182 | (pci_mmcfg_config == NULL) || | 182 | (pci_mmcfg_config == NULL) || |
183 | (pci_mmcfg_config[0].base_address == 0)) | 183 | (pci_mmcfg_config[0].base_address == 0)) |
184 | goto out; | 184 | return; |
185 | 185 | ||
186 | printk(KERN_INFO "PCI: Using MMCONFIG\n"); | 186 | printk(KERN_INFO "PCI: Using MMCONFIG\n"); |
187 | raw_pci_ops = &pci_mmcfg; | 187 | raw_pci_ops = &pci_mmcfg; |
188 | pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; | 188 | pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; |
189 | 189 | ||
190 | unreachable_devices(); | 190 | unreachable_devices(); |
191 | |||
192 | out: | ||
193 | return 0; | ||
194 | } | 191 | } |
195 | |||
196 | arch_initcall(pci_mmcfg_init); | ||
diff --git a/arch/i386/pci/pcbios.c b/arch/i386/pci/pcbios.c index b9d65f0bc2d1..1eec0868f4b3 100644 --- a/arch/i386/pci/pcbios.c +++ b/arch/i386/pci/pcbios.c | |||
@@ -476,14 +476,12 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq) | |||
476 | } | 476 | } |
477 | EXPORT_SYMBOL(pcibios_set_irq_routing); | 477 | EXPORT_SYMBOL(pcibios_set_irq_routing); |
478 | 478 | ||
479 | static int __init pci_pcbios_init(void) | 479 | void __init pci_pcbios_init(void) |
480 | { | 480 | { |
481 | if ((pci_probe & PCI_PROBE_BIOS) | 481 | if ((pci_probe & PCI_PROBE_BIOS) |
482 | && ((raw_pci_ops = pci_find_bios()))) { | 482 | && ((raw_pci_ops = pci_find_bios()))) { |
483 | pci_probe |= PCI_BIOS_SORT; | 483 | pci_probe |= PCI_BIOS_SORT; |
484 | pci_bios_present = 1; | 484 | pci_bios_present = 1; |
485 | } | 485 | } |
486 | return 0; | ||
487 | } | 486 | } |
488 | 487 | ||
489 | arch_initcall(pci_pcbios_init); | ||
diff --git a/arch/i386/pci/pci.h b/arch/i386/pci/pci.h index f550781ec310..12035e29108b 100644 --- a/arch/i386/pci/pci.h +++ b/arch/i386/pci/pci.h | |||
@@ -80,4 +80,7 @@ extern int pci_conf1_write(unsigned int seg, unsigned int bus, | |||
80 | extern int pci_conf1_read(unsigned int seg, unsigned int bus, | 80 | extern int pci_conf1_read(unsigned int seg, unsigned int bus, |
81 | unsigned int devfn, int reg, int len, u32 *value); | 81 | unsigned int devfn, int reg, int len, u32 *value); |
82 | 82 | ||
83 | extern void pci_direct_init(void); | ||
84 | extern void pci_pcbios_init(void); | ||
85 | extern void pci_mmcfg_init(void); | ||
83 | 86 | ||
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index a85ea9d37f05..10b6b9e7716b 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -252,6 +252,15 @@ config NR_CPUS | |||
252 | than 64 will cause the use of a CPU mask array, causing a small | 252 | than 64 will cause the use of a CPU mask array, causing a small |
253 | performance hit. | 253 | performance hit. |
254 | 254 | ||
255 | config IA64_NR_NODES | ||
256 | int "Maximum number of NODEs (256-1024)" if (IA64_SGI_SN2 || IA64_GENERIC) | ||
257 | range 256 1024 | ||
258 | depends on IA64_SGI_SN2 || IA64_GENERIC | ||
259 | default "256" | ||
260 | help | ||
261 | This option specifies the maximum number of nodes in your SSI system. | ||
262 | If in doubt, use the default. | ||
263 | |||
255 | config HOTPLUG_CPU | 264 | config HOTPLUG_CPU |
256 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" | 265 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" |
257 | depends on SMP && EXPERIMENTAL | 266 | depends on SMP && EXPERIMENTAL |
@@ -271,6 +280,25 @@ config SCHED_SMT | |||
271 | Intel IA64 chips with MultiThreading at a cost of slightly increased | 280 | Intel IA64 chips with MultiThreading at a cost of slightly increased |
272 | overhead in some places. If unsure say N here. | 281 | overhead in some places. If unsure say N here. |
273 | 282 | ||
283 | config PERMIT_BSP_REMOVE | ||
284 | bool "Support removal of Bootstrap Processor" | ||
285 | depends on HOTPLUG_CPU | ||
286 | default n | ||
287 | ---help--- | ||
288 | Say Y here if your platform SAL will support removal of BSP with HOTPLUG_CPU | ||
289 | support. | ||
290 | |||
291 | config FORCE_CPEI_RETARGET | ||
292 | bool "Force assumption that CPEI can be re-targetted" | ||
293 | depends on PERMIT_BSP_REMOVE | ||
294 | default n | ||
295 | ---help--- | ||
296 | Say Y if you need to force the assumption that CPEI can be re-targetted to | ||
297 | any cpu in the system. This hint is available via ACPI 3.0 specifications. | ||
298 | Tiger4 systems are capable of re-directing CPEI to any CPU other than BSP. | ||
299 | This option it useful to enable this feature on older BIOS's as well. | ||
300 | You can also enable this by using boot command line option force_cpei=1. | ||
301 | |||
274 | config PREEMPT | 302 | config PREEMPT |
275 | bool "Preemptible Kernel" | 303 | bool "Preemptible Kernel" |
276 | help | 304 | help |
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index f722e1a25948..80ea7506fa1a 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # ia64/Makefile | 2 | # ia64/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 7 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 8 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 9 | # for more details. |
@@ -62,7 +65,7 @@ drivers-$(CONFIG_OPROFILE) += arch/ia64/oprofile/ | |||
62 | 65 | ||
63 | boot := arch/ia64/hp/sim/boot | 66 | boot := arch/ia64/hp/sim/boot |
64 | 67 | ||
65 | .PHONY: boot compressed check | 68 | PHONY += boot compressed check |
66 | 69 | ||
67 | all: compressed unwcheck | 70 | all: compressed unwcheck |
68 | 71 | ||
diff --git a/arch/ia64/configs/gensparse_defconfig b/arch/ia64/configs/gensparse_defconfig index 744fd2f79f61..0d29aa2066b3 100644 --- a/arch/ia64/configs/gensparse_defconfig +++ b/arch/ia64/configs/gensparse_defconfig | |||
@@ -116,6 +116,7 @@ CONFIG_IOSAPIC=y | |||
116 | CONFIG_FORCE_MAX_ZONEORDER=17 | 116 | CONFIG_FORCE_MAX_ZONEORDER=17 |
117 | CONFIG_SMP=y | 117 | CONFIG_SMP=y |
118 | CONFIG_NR_CPUS=512 | 118 | CONFIG_NR_CPUS=512 |
119 | CONFIG_IA64_NR_NODES=256 | ||
119 | CONFIG_HOTPLUG_CPU=y | 120 | CONFIG_HOTPLUG_CPU=y |
120 | # CONFIG_SCHED_SMT is not set | 121 | # CONFIG_SCHED_SMT is not set |
121 | # CONFIG_PREEMPT is not set | 122 | # CONFIG_PREEMPT is not set |
diff --git a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig index 8206752161bb..a718034d68d0 100644 --- a/arch/ia64/configs/sn2_defconfig +++ b/arch/ia64/configs/sn2_defconfig | |||
@@ -116,6 +116,7 @@ CONFIG_IA64_SGI_SN_XP=m | |||
116 | CONFIG_FORCE_MAX_ZONEORDER=17 | 116 | CONFIG_FORCE_MAX_ZONEORDER=17 |
117 | CONFIG_SMP=y | 117 | CONFIG_SMP=y |
118 | CONFIG_NR_CPUS=1024 | 118 | CONFIG_NR_CPUS=1024 |
119 | CONFIG_IA64_NR_NODES=256 | ||
119 | # CONFIG_HOTPLUG_CPU is not set | 120 | # CONFIG_HOTPLUG_CPU is not set |
120 | CONFIG_SCHED_SMT=y | 121 | CONFIG_SCHED_SMT=y |
121 | CONFIG_PREEMPT=y | 122 | CONFIG_PREEMPT=y |
diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig index 125568118b84..766bf4955432 100644 --- a/arch/ia64/configs/tiger_defconfig +++ b/arch/ia64/configs/tiger_defconfig | |||
@@ -116,6 +116,8 @@ CONFIG_FORCE_MAX_ZONEORDER=17 | |||
116 | CONFIG_SMP=y | 116 | CONFIG_SMP=y |
117 | CONFIG_NR_CPUS=4 | 117 | CONFIG_NR_CPUS=4 |
118 | CONFIG_HOTPLUG_CPU=y | 118 | CONFIG_HOTPLUG_CPU=y |
119 | CONFIG_PERMIT_BSP_REMOVE=y | ||
120 | CONFIG_FORCE_CPEI_RETARGET=y | ||
119 | # CONFIG_SCHED_SMT is not set | 121 | # CONFIG_SCHED_SMT is not set |
120 | # CONFIG_PREEMPT is not set | 122 | # CONFIG_PREEMPT is not set |
121 | CONFIG_SELECT_MEMORY_MODEL=y | 123 | CONFIG_SELECT_MEMORY_MODEL=y |
diff --git a/arch/ia64/defconfig b/arch/ia64/defconfig index 3e767288a745..6cba55da572a 100644 --- a/arch/ia64/defconfig +++ b/arch/ia64/defconfig | |||
@@ -116,6 +116,7 @@ CONFIG_IOSAPIC=y | |||
116 | CONFIG_FORCE_MAX_ZONEORDER=17 | 116 | CONFIG_FORCE_MAX_ZONEORDER=17 |
117 | CONFIG_SMP=y | 117 | CONFIG_SMP=y |
118 | CONFIG_NR_CPUS=512 | 118 | CONFIG_NR_CPUS=512 |
119 | CONFIG_IA64_NR_NODES=256 | ||
119 | CONFIG_HOTPLUG_CPU=y | 120 | CONFIG_HOTPLUG_CPU=y |
120 | # CONFIG_SCHED_SMT is not set | 121 | # CONFIG_SCHED_SMT is not set |
121 | # CONFIG_PREEMPT is not set | 122 | # CONFIG_PREEMPT is not set |
diff --git a/arch/ia64/dig/setup.c b/arch/ia64/dig/setup.c index c9104bfff667..38aa9c108857 100644 --- a/arch/ia64/dig/setup.c +++ b/arch/ia64/dig/setup.c | |||
@@ -69,8 +69,3 @@ dig_setup (char **cmdline_p) | |||
69 | screen_info.orig_video_isVGA = 1; /* XXX fake */ | 69 | screen_info.orig_video_isVGA = 1; /* XXX fake */ |
70 | screen_info.orig_video_ega_bx = 3; /* XXX fake */ | 70 | screen_info.orig_video_ega_bx = 3; /* XXX fake */ |
71 | } | 71 | } |
72 | |||
73 | void __init | ||
74 | dig_irq_init (void) | ||
75 | { | ||
76 | } | ||
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 626cdc83668b..0e5c6ae50228 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -46,11 +46,6 @@ | |||
46 | #define KEYBOARD_INTR 3 /* must match with simulator! */ | 46 | #define KEYBOARD_INTR 3 /* must match with simulator! */ |
47 | 47 | ||
48 | #define NR_PORTS 1 /* only one port for now */ | 48 | #define NR_PORTS 1 /* only one port for now */ |
49 | #define SERIAL_INLINE 1 | ||
50 | |||
51 | #ifdef SERIAL_INLINE | ||
52 | #define _INLINE_ inline | ||
53 | #endif | ||
54 | 49 | ||
55 | #define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) | 50 | #define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) |
56 | 51 | ||
@@ -237,7 +232,7 @@ static void rs_put_char(struct tty_struct *tty, unsigned char ch) | |||
237 | local_irq_restore(flags); | 232 | local_irq_restore(flags); |
238 | } | 233 | } |
239 | 234 | ||
240 | static _INLINE_ void transmit_chars(struct async_struct *info, int *intr_done) | 235 | static void transmit_chars(struct async_struct *info, int *intr_done) |
241 | { | 236 | { |
242 | int count; | 237 | int count; |
243 | unsigned long flags; | 238 | unsigned long flags; |
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index 70dba1f0e2ee..13e739e4c84d 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -1166,19 +1166,7 @@ put_tv32 (struct compat_timeval __user *o, struct timeval *i) | |||
1166 | asmlinkage unsigned long | 1166 | asmlinkage unsigned long |
1167 | sys32_alarm (unsigned int seconds) | 1167 | sys32_alarm (unsigned int seconds) |
1168 | { | 1168 | { |
1169 | struct itimerval it_new, it_old; | 1169 | return alarm_setitimer(seconds); |
1170 | unsigned int oldalarm; | ||
1171 | |||
1172 | it_new.it_interval.tv_sec = it_new.it_interval.tv_usec = 0; | ||
1173 | it_new.it_value.tv_sec = seconds; | ||
1174 | it_new.it_value.tv_usec = 0; | ||
1175 | do_setitimer(ITIMER_REAL, &it_new, &it_old); | ||
1176 | oldalarm = it_old.it_value.tv_sec; | ||
1177 | /* ehhh.. We can't return 0 if we have an alarm pending.. */ | ||
1178 | /* And we'd better return too much than too little anyway */ | ||
1179 | if (it_old.it_value.tv_usec) | ||
1180 | oldalarm++; | ||
1181 | return oldalarm; | ||
1182 | } | 1170 | } |
1183 | 1171 | ||
1184 | /* Translations due to time_t size differences. Which affects all | 1172 | /* Translations due to time_t size differences. Which affects all |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index ecd44bdc8394..a4e218ce2edb 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -284,19 +284,24 @@ acpi_parse_plat_int_src(acpi_table_entry_header * header, | |||
284 | return 0; | 284 | return 0; |
285 | } | 285 | } |
286 | 286 | ||
287 | #ifdef CONFIG_HOTPLUG_CPU | ||
287 | unsigned int can_cpei_retarget(void) | 288 | unsigned int can_cpei_retarget(void) |
288 | { | 289 | { |
289 | extern int cpe_vector; | 290 | extern int cpe_vector; |
291 | extern unsigned int force_cpei_retarget; | ||
290 | 292 | ||
291 | /* | 293 | /* |
292 | * Only if CPEI is supported and the override flag | 294 | * Only if CPEI is supported and the override flag |
293 | * is present, otherwise return that its re-targettable | 295 | * is present, otherwise return that its re-targettable |
294 | * if we are in polling mode. | 296 | * if we are in polling mode. |
295 | */ | 297 | */ |
296 | if (cpe_vector > 0 && !acpi_cpei_override) | 298 | if (cpe_vector > 0) { |
297 | return 0; | 299 | if (acpi_cpei_override || force_cpei_retarget) |
298 | else | 300 | return 1; |
299 | return 1; | 301 | else |
302 | return 0; | ||
303 | } | ||
304 | return 1; | ||
300 | } | 305 | } |
301 | 306 | ||
302 | unsigned int is_cpu_cpei_target(unsigned int cpu) | 307 | unsigned int is_cpu_cpei_target(unsigned int cpu) |
@@ -315,6 +320,7 @@ void set_cpei_target_cpu(unsigned int cpu) | |||
315 | { | 320 | { |
316 | acpi_cpei_phys_cpuid = cpu_physical_id(cpu); | 321 | acpi_cpei_phys_cpuid = cpu_physical_id(cpu); |
317 | } | 322 | } |
323 | #endif | ||
318 | 324 | ||
319 | unsigned int get_cpei_target_cpu(void) | 325 | unsigned int get_cpei_target_cpu(void) |
320 | { | 326 | { |
@@ -414,6 +420,26 @@ int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS]; | |||
414 | int __initdata nid_to_pxm_map[MAX_NUMNODES]; | 420 | int __initdata nid_to_pxm_map[MAX_NUMNODES]; |
415 | static struct acpi_table_slit __initdata *slit_table; | 421 | static struct acpi_table_slit __initdata *slit_table; |
416 | 422 | ||
423 | static int get_processor_proximity_domain(struct acpi_table_processor_affinity *pa) | ||
424 | { | ||
425 | int pxm; | ||
426 | |||
427 | pxm = pa->proximity_domain; | ||
428 | if (ia64_platform_is("sn2")) | ||
429 | pxm += pa->reserved[0] << 8; | ||
430 | return pxm; | ||
431 | } | ||
432 | |||
433 | static int get_memory_proximity_domain(struct acpi_table_memory_affinity *ma) | ||
434 | { | ||
435 | int pxm; | ||
436 | |||
437 | pxm = ma->proximity_domain; | ||
438 | if (ia64_platform_is("sn2")) | ||
439 | pxm += ma->reserved1[0] << 8; | ||
440 | return pxm; | ||
441 | } | ||
442 | |||
417 | /* | 443 | /* |
418 | * ACPI 2.0 SLIT (System Locality Information Table) | 444 | * ACPI 2.0 SLIT (System Locality Information Table) |
419 | * http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf | 445 | * http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf |
@@ -437,13 +463,20 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit) | |||
437 | void __init | 463 | void __init |
438 | acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa) | 464 | acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa) |
439 | { | 465 | { |
466 | int pxm; | ||
467 | |||
468 | if (!pa->flags.enabled) | ||
469 | return; | ||
470 | |||
471 | pxm = get_processor_proximity_domain(pa); | ||
472 | |||
440 | /* record this node in proximity bitmap */ | 473 | /* record this node in proximity bitmap */ |
441 | pxm_bit_set(pa->proximity_domain); | 474 | pxm_bit_set(pxm); |
442 | 475 | ||
443 | node_cpuid[srat_num_cpus].phys_id = | 476 | node_cpuid[srat_num_cpus].phys_id = |
444 | (pa->apic_id << 8) | (pa->lsapic_eid); | 477 | (pa->apic_id << 8) | (pa->lsapic_eid); |
445 | /* nid should be overridden as logical node id later */ | 478 | /* nid should be overridden as logical node id later */ |
446 | node_cpuid[srat_num_cpus].nid = pa->proximity_domain; | 479 | node_cpuid[srat_num_cpus].nid = pxm; |
447 | srat_num_cpus++; | 480 | srat_num_cpus++; |
448 | } | 481 | } |
449 | 482 | ||
@@ -451,10 +484,10 @@ void __init | |||
451 | acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) | 484 | acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) |
452 | { | 485 | { |
453 | unsigned long paddr, size; | 486 | unsigned long paddr, size; |
454 | u8 pxm; | 487 | int pxm; |
455 | struct node_memblk_s *p, *q, *pend; | 488 | struct node_memblk_s *p, *q, *pend; |
456 | 489 | ||
457 | pxm = ma->proximity_domain; | 490 | pxm = get_memory_proximity_domain(ma); |
458 | 491 | ||
459 | /* fill node memory chunk structure */ | 492 | /* fill node memory chunk structure */ |
460 | paddr = ma->base_addr_hi; | 493 | paddr = ma->base_addr_hi; |
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 930fdfca6ddb..0e3eda99e549 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -1102,9 +1102,6 @@ skip_rbs_switch: | |||
1102 | st8 [r2]=r8 | 1102 | st8 [r2]=r8 |
1103 | st8 [r3]=r10 | 1103 | st8 [r3]=r10 |
1104 | .work_pending: | 1104 | .work_pending: |
1105 | tbit.nz p6,p0=r31,TIF_SIGDELAYED // signal delayed from MCA/INIT/NMI/PMI context? | ||
1106 | (p6) br.cond.sptk.few .sigdelayed | ||
1107 | ;; | ||
1108 | tbit.z p6,p0=r31,TIF_NEED_RESCHED // current_thread_info()->need_resched==0? | 1105 | tbit.z p6,p0=r31,TIF_NEED_RESCHED // current_thread_info()->need_resched==0? |
1109 | (p6) br.cond.sptk.few .notify | 1106 | (p6) br.cond.sptk.few .notify |
1110 | #ifdef CONFIG_PREEMPT | 1107 | #ifdef CONFIG_PREEMPT |
@@ -1131,17 +1128,6 @@ skip_rbs_switch: | |||
1131 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end | 1128 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end |
1132 | br.cond.sptk.many .work_processed_kernel // don't re-check | 1129 | br.cond.sptk.many .work_processed_kernel // don't re-check |
1133 | 1130 | ||
1134 | // There is a delayed signal that was detected in MCA/INIT/NMI/PMI context where | ||
1135 | // it could not be delivered. Deliver it now. The signal might be for us and | ||
1136 | // may set TIF_SIGPENDING, so redrive ia64_leave_* after processing the delayed | ||
1137 | // signal. | ||
1138 | |||
1139 | .sigdelayed: | ||
1140 | br.call.sptk.many rp=do_sigdelayed | ||
1141 | cmp.eq p6,p0=r0,r0 // p6 <- 1, always re-check | ||
1142 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end | ||
1143 | br.cond.sptk.many .work_processed_kernel // re-check | ||
1144 | |||
1145 | .work_pending_syscall_end: | 1131 | .work_pending_syscall_end: |
1146 | adds r2=PT(R8)+16,r12 | 1132 | adds r2=PT(R8)+16,r12 |
1147 | adds r3=PT(R10)+16,r12 | 1133 | adds r3=PT(R10)+16,r12 |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 574084f343fa..8832c553230a 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -631,6 +631,7 @@ get_target_cpu (unsigned int gsi, int vector) | |||
631 | { | 631 | { |
632 | #ifdef CONFIG_SMP | 632 | #ifdef CONFIG_SMP |
633 | static int cpu = -1; | 633 | static int cpu = -1; |
634 | extern int cpe_vector; | ||
634 | 635 | ||
635 | /* | 636 | /* |
636 | * In case of vector shared by multiple RTEs, all RTEs that | 637 | * In case of vector shared by multiple RTEs, all RTEs that |
@@ -653,6 +654,11 @@ get_target_cpu (unsigned int gsi, int vector) | |||
653 | if (!cpu_online(smp_processor_id())) | 654 | if (!cpu_online(smp_processor_id())) |
654 | return cpu_physical_id(smp_processor_id()); | 655 | return cpu_physical_id(smp_processor_id()); |
655 | 656 | ||
657 | #ifdef CONFIG_ACPI | ||
658 | if (cpe_vector > 0 && vector == IA64_CPEP_VECTOR) | ||
659 | return get_cpei_target_cpu(); | ||
660 | #endif | ||
661 | |||
656 | #ifdef CONFIG_NUMA | 662 | #ifdef CONFIG_NUMA |
657 | { | 663 | { |
658 | int num_cpus, cpu_index, iosapic_index, numa_cpu, i = 0; | 664 | int num_cpus, cpu_index, iosapic_index, numa_cpu, i = 0; |
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index d33244c32759..5ce908ef9c95 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c | |||
@@ -163,8 +163,19 @@ void fixup_irqs(void) | |||
163 | { | 163 | { |
164 | unsigned int irq; | 164 | unsigned int irq; |
165 | extern void ia64_process_pending_intr(void); | 165 | extern void ia64_process_pending_intr(void); |
166 | extern void ia64_disable_timer(void); | ||
167 | extern volatile int time_keeper_id; | ||
168 | |||
169 | ia64_disable_timer(); | ||
170 | |||
171 | /* | ||
172 | * Find a new timesync master | ||
173 | */ | ||
174 | if (smp_processor_id() == time_keeper_id) { | ||
175 | time_keeper_id = first_cpu(cpu_online_map); | ||
176 | printk ("CPU %d is now promoted to time-keeper master\n", time_keeper_id); | ||
177 | } | ||
166 | 178 | ||
167 | ia64_set_itv(1<<16); | ||
168 | /* | 179 | /* |
169 | * Phase 1: Locate irq's bound to this cpu and | 180 | * Phase 1: Locate irq's bound to this cpu and |
170 | * relocate them for cpu removal. | 181 | * relocate them for cpu removal. |
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S index dcd906fe5749..829a43cab797 100644 --- a/arch/ia64/kernel/ivt.S +++ b/arch/ia64/kernel/ivt.S | |||
@@ -865,6 +865,7 @@ ENTRY(interrupt) | |||
865 | ;; | 865 | ;; |
866 | SAVE_REST | 866 | SAVE_REST |
867 | ;; | 867 | ;; |
868 | MCA_RECOVER_RANGE(interrupt) | ||
868 | alloc r14=ar.pfs,0,0,2,0 // must be first in an insn group | 869 | alloc r14=ar.pfs,0,0,2,0 // must be first in an insn group |
869 | mov out0=cr.ivr // pass cr.ivr as first arg | 870 | mov out0=cr.ivr // pass cr.ivr as first arg |
870 | add out1=16,sp // pass pointer to pt_regs as second arg | 871 | add out1=16,sp // pass pointer to pt_regs as second arg |
diff --git a/arch/ia64/kernel/machvec.c b/arch/ia64/kernel/machvec.c index c3a04ee7f4f6..4b0b71d5aef4 100644 --- a/arch/ia64/kernel/machvec.c +++ b/arch/ia64/kernel/machvec.c | |||
@@ -14,7 +14,15 @@ | |||
14 | struct ia64_machine_vector ia64_mv; | 14 | struct ia64_machine_vector ia64_mv; |
15 | EXPORT_SYMBOL(ia64_mv); | 15 | EXPORT_SYMBOL(ia64_mv); |
16 | 16 | ||
17 | static struct ia64_machine_vector * | 17 | static __initdata const char *mvec_name; |
18 | static __init int setup_mvec(char *s) | ||
19 | { | ||
20 | mvec_name = s; | ||
21 | return 0; | ||
22 | } | ||
23 | early_param("machvec", setup_mvec); | ||
24 | |||
25 | static struct ia64_machine_vector * __init | ||
18 | lookup_machvec (const char *name) | 26 | lookup_machvec (const char *name) |
19 | { | 27 | { |
20 | extern struct ia64_machine_vector machvec_start[]; | 28 | extern struct ia64_machine_vector machvec_start[]; |
@@ -33,10 +41,13 @@ machvec_init (const char *name) | |||
33 | { | 41 | { |
34 | struct ia64_machine_vector *mv; | 42 | struct ia64_machine_vector *mv; |
35 | 43 | ||
44 | if (!name) | ||
45 | name = mvec_name ? mvec_name : acpi_get_sysname(); | ||
36 | mv = lookup_machvec(name); | 46 | mv = lookup_machvec(name); |
37 | if (!mv) { | 47 | if (!mv) |
38 | panic("generic kernel failed to find machine vector for platform %s!", name); | 48 | panic("generic kernel failed to find machine vector for" |
39 | } | 49 | " platform %s!", name); |
50 | |||
40 | ia64_mv = *mv; | 51 | ia64_mv = *mv; |
41 | printk(KERN_INFO "booting generic kernel on platform %s\n", name); | 52 | printk(KERN_INFO "booting generic kernel on platform %s\n", name); |
42 | } | 53 | } |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index ee7eec9ee576..87ff7fe33cfb 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -83,6 +83,7 @@ | |||
83 | #include <asm/irq.h> | 83 | #include <asm/irq.h> |
84 | #include <asm/hw_irq.h> | 84 | #include <asm/hw_irq.h> |
85 | 85 | ||
86 | #include "mca_drv.h" | ||
86 | #include "entry.h" | 87 | #include "entry.h" |
87 | 88 | ||
88 | #if defined(IA64_MCA_DEBUG_INFO) | 89 | #if defined(IA64_MCA_DEBUG_INFO) |
@@ -133,7 +134,7 @@ static int cpe_poll_enabled = 1; | |||
133 | 134 | ||
134 | extern void salinfo_log_wakeup(int type, u8 *buffer, u64 size, int irqsafe); | 135 | extern void salinfo_log_wakeup(int type, u8 *buffer, u64 size, int irqsafe); |
135 | 136 | ||
136 | static int mca_init; | 137 | static int mca_init __initdata; |
137 | 138 | ||
138 | 139 | ||
139 | static void inline | 140 | static void inline |
@@ -184,7 +185,7 @@ static ia64_state_log_t ia64_state_log[IA64_MAX_LOG_TYPES]; | |||
184 | * Inputs : info_type (SAL_INFO_TYPE_{MCA,INIT,CMC,CPE}) | 185 | * Inputs : info_type (SAL_INFO_TYPE_{MCA,INIT,CMC,CPE}) |
185 | * Outputs : None | 186 | * Outputs : None |
186 | */ | 187 | */ |
187 | static void | 188 | static void __init |
188 | ia64_log_init(int sal_info_type) | 189 | ia64_log_init(int sal_info_type) |
189 | { | 190 | { |
190 | u64 max_size = 0; | 191 | u64 max_size = 0; |
@@ -282,13 +283,53 @@ ia64_mca_log_sal_error_record(int sal_info_type) | |||
282 | } | 283 | } |
283 | 284 | ||
284 | /* | 285 | /* |
285 | * platform dependent error handling | 286 | * search_mca_table |
287 | * See if the MCA surfaced in an instruction range | ||
288 | * that has been tagged as recoverable. | ||
289 | * | ||
290 | * Inputs | ||
291 | * first First address range to check | ||
292 | * last Last address range to check | ||
293 | * ip Instruction pointer, address we are looking for | ||
294 | * | ||
295 | * Return value: | ||
296 | * 1 on Success (in the table)/ 0 on Failure (not in the table) | ||
286 | */ | 297 | */ |
287 | #ifndef PLATFORM_MCA_HANDLERS | 298 | int |
299 | search_mca_table (const struct mca_table_entry *first, | ||
300 | const struct mca_table_entry *last, | ||
301 | unsigned long ip) | ||
302 | { | ||
303 | const struct mca_table_entry *curr; | ||
304 | u64 curr_start, curr_end; | ||
305 | |||
306 | curr = first; | ||
307 | while (curr <= last) { | ||
308 | curr_start = (u64) &curr->start_addr + curr->start_addr; | ||
309 | curr_end = (u64) &curr->end_addr + curr->end_addr; | ||
310 | |||
311 | if ((ip >= curr_start) && (ip <= curr_end)) { | ||
312 | return 1; | ||
313 | } | ||
314 | curr++; | ||
315 | } | ||
316 | return 0; | ||
317 | } | ||
318 | |||
319 | /* Given an address, look for it in the mca tables. */ | ||
320 | int mca_recover_range(unsigned long addr) | ||
321 | { | ||
322 | extern struct mca_table_entry __start___mca_table[]; | ||
323 | extern struct mca_table_entry __stop___mca_table[]; | ||
324 | |||
325 | return search_mca_table(__start___mca_table, __stop___mca_table-1, addr); | ||
326 | } | ||
327 | EXPORT_SYMBOL_GPL(mca_recover_range); | ||
288 | 328 | ||
289 | #ifdef CONFIG_ACPI | 329 | #ifdef CONFIG_ACPI |
290 | 330 | ||
291 | int cpe_vector = -1; | 331 | int cpe_vector = -1; |
332 | int ia64_cpe_irq = -1; | ||
292 | 333 | ||
293 | static irqreturn_t | 334 | static irqreturn_t |
294 | ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs) | 335 | ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs) |
@@ -359,7 +400,7 @@ ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs) | |||
359 | * Outputs | 400 | * Outputs |
360 | * None | 401 | * None |
361 | */ | 402 | */ |
362 | static void | 403 | static void __init |
363 | ia64_mca_register_cpev (int cpev) | 404 | ia64_mca_register_cpev (int cpev) |
364 | { | 405 | { |
365 | /* Register the CPE interrupt vector with SAL */ | 406 | /* Register the CPE interrupt vector with SAL */ |
@@ -377,8 +418,6 @@ ia64_mca_register_cpev (int cpev) | |||
377 | } | 418 | } |
378 | #endif /* CONFIG_ACPI */ | 419 | #endif /* CONFIG_ACPI */ |
379 | 420 | ||
380 | #endif /* PLATFORM_MCA_HANDLERS */ | ||
381 | |||
382 | /* | 421 | /* |
383 | * ia64_mca_cmc_vector_setup | 422 | * ia64_mca_cmc_vector_setup |
384 | * | 423 | * |
@@ -392,7 +431,7 @@ ia64_mca_register_cpev (int cpev) | |||
392 | * Outputs | 431 | * Outputs |
393 | * None | 432 | * None |
394 | */ | 433 | */ |
395 | void | 434 | void __cpuinit |
396 | ia64_mca_cmc_vector_setup (void) | 435 | ia64_mca_cmc_vector_setup (void) |
397 | { | 436 | { |
398 | cmcv_reg_t cmcv; | 437 | cmcv_reg_t cmcv; |
@@ -630,6 +669,32 @@ copy_reg(const u64 *fr, u64 fnat, u64 *tr, u64 *tnat) | |||
630 | *tnat |= (nat << tslot); | 669 | *tnat |= (nat << tslot); |
631 | } | 670 | } |
632 | 671 | ||
672 | /* Change the comm field on the MCA/INT task to include the pid that | ||
673 | * was interrupted, it makes for easier debugging. If that pid was 0 | ||
674 | * (swapper or nested MCA/INIT) then use the start of the previous comm | ||
675 | * field suffixed with its cpu. | ||
676 | */ | ||
677 | |||
678 | static void | ||
679 | ia64_mca_modify_comm(const task_t *previous_current) | ||
680 | { | ||
681 | char *p, comm[sizeof(current->comm)]; | ||
682 | if (previous_current->pid) | ||
683 | snprintf(comm, sizeof(comm), "%s %d", | ||
684 | current->comm, previous_current->pid); | ||
685 | else { | ||
686 | int l; | ||
687 | if ((p = strchr(previous_current->comm, ' '))) | ||
688 | l = p - previous_current->comm; | ||
689 | else | ||
690 | l = strlen(previous_current->comm); | ||
691 | snprintf(comm, sizeof(comm), "%s %*s %d", | ||
692 | current->comm, l, previous_current->comm, | ||
693 | task_thread_info(previous_current)->cpu); | ||
694 | } | ||
695 | memcpy(current->comm, comm, sizeof(current->comm)); | ||
696 | } | ||
697 | |||
633 | /* On entry to this routine, we are running on the per cpu stack, see | 698 | /* On entry to this routine, we are running on the per cpu stack, see |
634 | * mca_asm.h. The original stack has not been touched by this event. Some of | 699 | * mca_asm.h. The original stack has not been touched by this event. Some of |
635 | * the original stack's registers will be in the RBS on this stack. This stack | 700 | * the original stack's registers will be in the RBS on this stack. This stack |
@@ -648,7 +713,7 @@ ia64_mca_modify_original_stack(struct pt_regs *regs, | |||
648 | struct ia64_sal_os_state *sos, | 713 | struct ia64_sal_os_state *sos, |
649 | const char *type) | 714 | const char *type) |
650 | { | 715 | { |
651 | char *p, comm[sizeof(current->comm)]; | 716 | char *p; |
652 | ia64_va va; | 717 | ia64_va va; |
653 | extern char ia64_leave_kernel[]; /* Need asm address, not function descriptor */ | 718 | extern char ia64_leave_kernel[]; /* Need asm address, not function descriptor */ |
654 | const pal_min_state_area_t *ms = sos->pal_min_state; | 719 | const pal_min_state_area_t *ms = sos->pal_min_state; |
@@ -721,54 +786,43 @@ ia64_mca_modify_original_stack(struct pt_regs *regs, | |||
721 | /* Verify the previous stack state before we change it */ | 786 | /* Verify the previous stack state before we change it */ |
722 | if (user_mode(regs)) { | 787 | if (user_mode(regs)) { |
723 | msg = "occurred in user space"; | 788 | msg = "occurred in user space"; |
724 | goto no_mod; | 789 | /* previous_current is guaranteed to be valid when the task was |
725 | } | 790 | * in user space, so ... |
726 | if (r13 != sos->prev_IA64_KR_CURRENT) { | 791 | */ |
727 | msg = "inconsistent previous current and r13"; | 792 | ia64_mca_modify_comm(previous_current); |
728 | goto no_mod; | ||
729 | } | ||
730 | if ((r12 - r13) >= KERNEL_STACK_SIZE) { | ||
731 | msg = "inconsistent r12 and r13"; | ||
732 | goto no_mod; | ||
733 | } | ||
734 | if ((ar_bspstore - r13) >= KERNEL_STACK_SIZE) { | ||
735 | msg = "inconsistent ar.bspstore and r13"; | ||
736 | goto no_mod; | ||
737 | } | ||
738 | va.p = old_bspstore; | ||
739 | if (va.f.reg < 5) { | ||
740 | msg = "old_bspstore is in the wrong region"; | ||
741 | goto no_mod; | ||
742 | } | ||
743 | if ((ar_bsp - r13) >= KERNEL_STACK_SIZE) { | ||
744 | msg = "inconsistent ar.bsp and r13"; | ||
745 | goto no_mod; | ||
746 | } | ||
747 | size += (ia64_rse_skip_regs(old_bspstore, slots) - old_bspstore) * 8; | ||
748 | if (ar_bspstore + size > r12) { | ||
749 | msg = "no room for blocked state"; | ||
750 | goto no_mod; | 793 | goto no_mod; |
751 | } | 794 | } |
752 | 795 | ||
753 | /* Change the comm field on the MCA/INT task to include the pid that | 796 | if (!mca_recover_range(ms->pmsa_iip)) { |
754 | * was interrupted, it makes for easier debugging. If that pid was 0 | 797 | if (r13 != sos->prev_IA64_KR_CURRENT) { |
755 | * (swapper or nested MCA/INIT) then use the start of the previous comm | 798 | msg = "inconsistent previous current and r13"; |
756 | * field suffixed with its cpu. | 799 | goto no_mod; |
757 | */ | 800 | } |
758 | if (previous_current->pid) | 801 | if ((r12 - r13) >= KERNEL_STACK_SIZE) { |
759 | snprintf(comm, sizeof(comm), "%s %d", | 802 | msg = "inconsistent r12 and r13"; |
760 | current->comm, previous_current->pid); | 803 | goto no_mod; |
761 | else { | 804 | } |
762 | int l; | 805 | if ((ar_bspstore - r13) >= KERNEL_STACK_SIZE) { |
763 | if ((p = strchr(previous_current->comm, ' '))) | 806 | msg = "inconsistent ar.bspstore and r13"; |
764 | l = p - previous_current->comm; | 807 | goto no_mod; |
765 | else | 808 | } |
766 | l = strlen(previous_current->comm); | 809 | va.p = old_bspstore; |
767 | snprintf(comm, sizeof(comm), "%s %*s %d", | 810 | if (va.f.reg < 5) { |
768 | current->comm, l, previous_current->comm, | 811 | msg = "old_bspstore is in the wrong region"; |
769 | task_thread_info(previous_current)->cpu); | 812 | goto no_mod; |
813 | } | ||
814 | if ((ar_bsp - r13) >= KERNEL_STACK_SIZE) { | ||
815 | msg = "inconsistent ar.bsp and r13"; | ||
816 | goto no_mod; | ||
817 | } | ||
818 | size += (ia64_rse_skip_regs(old_bspstore, slots) - old_bspstore) * 8; | ||
819 | if (ar_bspstore + size > r12) { | ||
820 | msg = "no room for blocked state"; | ||
821 | goto no_mod; | ||
822 | } | ||
770 | } | 823 | } |
771 | memcpy(current->comm, comm, sizeof(current->comm)); | 824 | |
825 | ia64_mca_modify_comm(previous_current); | ||
772 | 826 | ||
773 | /* Make the original task look blocked. First stack a struct pt_regs, | 827 | /* Make the original task look blocked. First stack a struct pt_regs, |
774 | * describing the state at the time of interrupt. mca_asm.S built a | 828 | * describing the state at the time of interrupt. mca_asm.S built a |
@@ -908,7 +962,7 @@ no_mod: | |||
908 | static void | 962 | static void |
909 | ia64_wait_for_slaves(int monarch) | 963 | ia64_wait_for_slaves(int monarch) |
910 | { | 964 | { |
911 | int c, wait = 0; | 965 | int c, wait = 0, missing = 0; |
912 | for_each_online_cpu(c) { | 966 | for_each_online_cpu(c) { |
913 | if (c == monarch) | 967 | if (c == monarch) |
914 | continue; | 968 | continue; |
@@ -919,15 +973,32 @@ ia64_wait_for_slaves(int monarch) | |||
919 | } | 973 | } |
920 | } | 974 | } |
921 | if (!wait) | 975 | if (!wait) |
922 | return; | 976 | goto all_in; |
923 | for_each_online_cpu(c) { | 977 | for_each_online_cpu(c) { |
924 | if (c == monarch) | 978 | if (c == monarch) |
925 | continue; | 979 | continue; |
926 | if (ia64_mc_info.imi_rendez_checkin[c] == IA64_MCA_RENDEZ_CHECKIN_NOTDONE) { | 980 | if (ia64_mc_info.imi_rendez_checkin[c] == IA64_MCA_RENDEZ_CHECKIN_NOTDONE) { |
927 | udelay(5*1000000); /* wait 5 seconds for slaves (arbitrary) */ | 981 | udelay(5*1000000); /* wait 5 seconds for slaves (arbitrary) */ |
982 | if (ia64_mc_info.imi_rendez_checkin[c] == IA64_MCA_RENDEZ_CHECKIN_NOTDONE) | ||
983 | missing = 1; | ||
928 | break; | 984 | break; |
929 | } | 985 | } |
930 | } | 986 | } |
987 | if (!missing) | ||
988 | goto all_in; | ||
989 | printk(KERN_INFO "OS MCA slave did not rendezvous on cpu"); | ||
990 | for_each_online_cpu(c) { | ||
991 | if (c == monarch) | ||
992 | continue; | ||
993 | if (ia64_mc_info.imi_rendez_checkin[c] == IA64_MCA_RENDEZ_CHECKIN_NOTDONE) | ||
994 | printk(" %d", c); | ||
995 | } | ||
996 | printk("\n"); | ||
997 | return; | ||
998 | |||
999 | all_in: | ||
1000 | printk(KERN_INFO "All OS MCA slaves have reached rendezvous\n"); | ||
1001 | return; | ||
931 | } | 1002 | } |
932 | 1003 | ||
933 | /* | 1004 | /* |
@@ -953,6 +1024,10 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw, | |||
953 | task_t *previous_current; | 1024 | task_t *previous_current; |
954 | 1025 | ||
955 | oops_in_progress = 1; /* FIXME: make printk NMI/MCA/INIT safe */ | 1026 | oops_in_progress = 1; /* FIXME: make printk NMI/MCA/INIT safe */ |
1027 | console_loglevel = 15; /* make sure printks make it to console */ | ||
1028 | printk(KERN_INFO "Entered OS MCA handler. PSP=%lx cpu=%d monarch=%ld\n", | ||
1029 | sos->proc_state_param, cpu, sos->monarch); | ||
1030 | |||
956 | previous_current = ia64_mca_modify_original_stack(regs, sw, sos, "MCA"); | 1031 | previous_current = ia64_mca_modify_original_stack(regs, sw, sos, "MCA"); |
957 | monarch_cpu = cpu; | 1032 | monarch_cpu = cpu; |
958 | if (notify_die(DIE_MCA_MONARCH_ENTER, "MCA", regs, 0, 0, 0) | 1033 | if (notify_die(DIE_MCA_MONARCH_ENTER, "MCA", regs, 0, 0, 0) |
@@ -1416,7 +1491,7 @@ static struct irqaction mca_cpep_irqaction = { | |||
1416 | * format most of the fields. | 1491 | * format most of the fields. |
1417 | */ | 1492 | */ |
1418 | 1493 | ||
1419 | static void | 1494 | static void __cpuinit |
1420 | format_mca_init_stack(void *mca_data, unsigned long offset, | 1495 | format_mca_init_stack(void *mca_data, unsigned long offset, |
1421 | const char *type, int cpu) | 1496 | const char *type, int cpu) |
1422 | { | 1497 | { |
@@ -1440,15 +1515,17 @@ format_mca_init_stack(void *mca_data, unsigned long offset, | |||
1440 | 1515 | ||
1441 | /* Do per-CPU MCA-related initialization. */ | 1516 | /* Do per-CPU MCA-related initialization. */ |
1442 | 1517 | ||
1443 | void __devinit | 1518 | void __cpuinit |
1444 | ia64_mca_cpu_init(void *cpu_data) | 1519 | ia64_mca_cpu_init(void *cpu_data) |
1445 | { | 1520 | { |
1446 | void *pal_vaddr; | 1521 | void *pal_vaddr; |
1522 | static int first_time = 1; | ||
1447 | 1523 | ||
1448 | if (smp_processor_id() == 0) { | 1524 | if (first_time) { |
1449 | void *mca_data; | 1525 | void *mca_data; |
1450 | int cpu; | 1526 | int cpu; |
1451 | 1527 | ||
1528 | first_time = 0; | ||
1452 | mca_data = alloc_bootmem(sizeof(struct ia64_mca_cpu) | 1529 | mca_data = alloc_bootmem(sizeof(struct ia64_mca_cpu) |
1453 | * NR_CPUS + KERNEL_STACK_SIZE); | 1530 | * NR_CPUS + KERNEL_STACK_SIZE); |
1454 | mca_data = (void *)(((unsigned long)mca_data + | 1531 | mca_data = (void *)(((unsigned long)mca_data + |
@@ -1704,6 +1781,7 @@ ia64_mca_late_init(void) | |||
1704 | desc = irq_descp(irq); | 1781 | desc = irq_descp(irq); |
1705 | desc->status |= IRQ_PER_CPU; | 1782 | desc->status |= IRQ_PER_CPU; |
1706 | setup_irq(irq, &mca_cpe_irqaction); | 1783 | setup_irq(irq, &mca_cpe_irqaction); |
1784 | ia64_cpe_irq = irq; | ||
1707 | } | 1785 | } |
1708 | ia64_mca_register_cpev(cpe_vector); | 1786 | ia64_mca_register_cpev(cpe_vector); |
1709 | IA64_MCA_DEBUG("%s: CPEI/P setup and enabled.\n", __FUNCTION__); | 1787 | IA64_MCA_DEBUG("%s: CPEI/P setup and enabled.\n", __FUNCTION__); |
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index e883d85906db..37c88eb55873 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com) | 6 | * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com) |
7 | * Copyright (C) 2005 Silicon Graphics, Inc | 7 | * Copyright (C) 2005 Silicon Graphics, Inc |
8 | * Copyright (C) 2005 Keith Owens <kaos@sgi.com> | 8 | * Copyright (C) 2005 Keith Owens <kaos@sgi.com> |
9 | * Copyright (C) 2006 Russ Anderson <rja@sgi.com> | ||
9 | */ | 10 | */ |
10 | #include <linux/config.h> | 11 | #include <linux/config.h> |
11 | #include <linux/types.h> | 12 | #include <linux/types.h> |
@@ -121,11 +122,12 @@ mca_page_isolate(unsigned long paddr) | |||
121 | */ | 122 | */ |
122 | 123 | ||
123 | void | 124 | void |
124 | mca_handler_bh(unsigned long paddr) | 125 | mca_handler_bh(unsigned long paddr, void *iip, unsigned long ipsr) |
125 | { | 126 | { |
126 | printk(KERN_ERR | 127 | printk(KERN_ERR "OS_MCA: process [cpu %d, pid: %d, uid: %d, " |
127 | "OS_MCA: process [pid: %d](%s) encounters MCA (paddr=%lx)\n", | 128 | "iip: %p, psr: 0x%lx,paddr: 0x%lx](%s) encounters MCA.\n", |
128 | current->pid, current->comm, paddr); | 129 | raw_smp_processor_id(), current->pid, current->uid, |
130 | iip, ipsr, paddr, current->comm); | ||
129 | 131 | ||
130 | spin_lock(&mca_bh_lock); | 132 | spin_lock(&mca_bh_lock); |
131 | switch (mca_page_isolate(paddr)) { | 133 | switch (mca_page_isolate(paddr)) { |
@@ -442,21 +444,26 @@ recover_from_read_error(slidx_table_t *slidx, | |||
442 | if (!peidx_bottom(peidx) || !(peidx_bottom(peidx)->valid.minstate)) | 444 | if (!peidx_bottom(peidx) || !(peidx_bottom(peidx)->valid.minstate)) |
443 | return 0; | 445 | return 0; |
444 | psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr); | 446 | psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr); |
447 | psr2 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_xpsr); | ||
445 | 448 | ||
446 | /* | 449 | /* |
447 | * Check the privilege level of interrupted context. | 450 | * Check the privilege level of interrupted context. |
448 | * If it is user-mode, then terminate affected process. | 451 | * If it is user-mode, then terminate affected process. |
449 | */ | 452 | */ |
450 | if (psr1->cpl != 0) { | 453 | |
454 | pmsa = sos->pal_min_state; | ||
455 | if (psr1->cpl != 0 || | ||
456 | ((psr2->cpl != 0) && mca_recover_range(pmsa->pmsa_iip))) { | ||
451 | smei = peidx_bus_check(peidx, 0); | 457 | smei = peidx_bus_check(peidx, 0); |
452 | if (smei->valid.target_identifier) { | 458 | if (smei->valid.target_identifier) { |
453 | /* | 459 | /* |
454 | * setup for resume to bottom half of MCA, | 460 | * setup for resume to bottom half of MCA, |
455 | * "mca_handler_bhhook" | 461 | * "mca_handler_bhhook" |
456 | */ | 462 | */ |
457 | pmsa = sos->pal_min_state; | 463 | /* pass to bhhook as argument (gr8, ...) */ |
458 | /* pass to bhhook as 1st argument (gr8) */ | ||
459 | pmsa->pmsa_gr[8-1] = smei->target_identifier; | 464 | pmsa->pmsa_gr[8-1] = smei->target_identifier; |
465 | pmsa->pmsa_gr[9-1] = pmsa->pmsa_iip; | ||
466 | pmsa->pmsa_gr[10-1] = pmsa->pmsa_ipsr; | ||
460 | /* set interrupted return address (but no use) */ | 467 | /* set interrupted return address (but no use) */ |
461 | pmsa->pmsa_br0 = pmsa->pmsa_iip; | 468 | pmsa->pmsa_br0 = pmsa->pmsa_iip; |
462 | /* change resume address to bottom half */ | 469 | /* change resume address to bottom half */ |
@@ -466,6 +473,7 @@ recover_from_read_error(slidx_table_t *slidx, | |||
466 | psr2 = (struct ia64_psr *)&pmsa->pmsa_ipsr; | 473 | psr2 = (struct ia64_psr *)&pmsa->pmsa_ipsr; |
467 | psr2->cpl = 0; | 474 | psr2->cpl = 0; |
468 | psr2->ri = 0; | 475 | psr2->ri = 0; |
476 | psr2->bn = 1; | ||
469 | psr2->i = 0; | 477 | psr2->i = 0; |
470 | 478 | ||
471 | return 1; | 479 | return 1; |
diff --git a/arch/ia64/kernel/mca_drv.h b/arch/ia64/kernel/mca_drv.h index e2f6fa1e0ef6..31a2e52bb16f 100644 --- a/arch/ia64/kernel/mca_drv.h +++ b/arch/ia64/kernel/mca_drv.h | |||
@@ -111,3 +111,10 @@ typedef struct slidx_table { | |||
111 | slidx_foreach_entry(__pos, &((slidx)->sec)) { __count++; }\ | 111 | slidx_foreach_entry(__pos, &((slidx)->sec)) { __count++; }\ |
112 | __count; }) | 112 | __count; }) |
113 | 113 | ||
114 | struct mca_table_entry { | ||
115 | int start_addr; /* location-relative starting address of MCA recoverable range */ | ||
116 | int end_addr; /* location-relative ending address of MCA recoverable range */ | ||
117 | }; | ||
118 | |||
119 | extern const struct mca_table_entry *search_mca_tables (unsigned long addr); | ||
120 | extern int mca_recover_range(unsigned long); | ||
diff --git a/arch/ia64/kernel/mca_drv_asm.S b/arch/ia64/kernel/mca_drv_asm.S index 3f298ee4d00c..e6a580d354b9 100644 --- a/arch/ia64/kernel/mca_drv_asm.S +++ b/arch/ia64/kernel/mca_drv_asm.S | |||
@@ -14,15 +14,12 @@ | |||
14 | 14 | ||
15 | GLOBAL_ENTRY(mca_handler_bhhook) | 15 | GLOBAL_ENTRY(mca_handler_bhhook) |
16 | invala // clear RSE ? | 16 | invala // clear RSE ? |
17 | ;; | ||
18 | cover | 17 | cover |
19 | ;; | 18 | ;; |
20 | clrrrb | 19 | clrrrb |
21 | ;; | 20 | ;; |
22 | alloc r16=ar.pfs,0,2,1,0 // make a new frame | 21 | alloc r16=ar.pfs,0,2,3,0 // make a new frame |
23 | ;; | ||
24 | mov ar.rsc=0 | 22 | mov ar.rsc=0 |
25 | ;; | ||
26 | mov r13=IA64_KR(CURRENT) // current task pointer | 23 | mov r13=IA64_KR(CURRENT) // current task pointer |
27 | ;; | 24 | ;; |
28 | mov r2=r13 | 25 | mov r2=r13 |
@@ -30,7 +27,6 @@ GLOBAL_ENTRY(mca_handler_bhhook) | |||
30 | addl r22=IA64_RBS_OFFSET,r2 | 27 | addl r22=IA64_RBS_OFFSET,r2 |
31 | ;; | 28 | ;; |
32 | mov ar.bspstore=r22 | 29 | mov ar.bspstore=r22 |
33 | ;; | ||
34 | addl sp=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r2 | 30 | addl sp=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r2 |
35 | ;; | 31 | ;; |
36 | adds r2=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13 | 32 | adds r2=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13 |
@@ -40,12 +36,12 @@ GLOBAL_ENTRY(mca_handler_bhhook) | |||
40 | movl loc1=mca_handler_bh // recovery C function | 36 | movl loc1=mca_handler_bh // recovery C function |
41 | ;; | 37 | ;; |
42 | mov out0=r8 // poisoned address | 38 | mov out0=r8 // poisoned address |
39 | mov out1=r9 // iip | ||
40 | mov out2=r10 // psr | ||
43 | mov b6=loc1 | 41 | mov b6=loc1 |
44 | ;; | 42 | ;; |
45 | mov loc1=rp | 43 | mov loc1=rp |
46 | ;; | 44 | ssm psr.i | psr.ic |
47 | ssm psr.i | ||
48 | ;; | ||
49 | br.call.sptk.many rp=b6 // does not return ... | 45 | br.call.sptk.many rp=b6 // does not return ... |
50 | ;; | 46 | ;; |
51 | mov ar.pfs=loc0 | 47 | mov ar.pfs=loc0 |
@@ -53,5 +49,4 @@ GLOBAL_ENTRY(mca_handler_bhhook) | |||
53 | ;; | 49 | ;; |
54 | mov r8=r0 | 50 | mov r8=r0 |
55 | br.ret.sptk.many rp | 51 | br.ret.sptk.many rp |
56 | ;; | ||
57 | END(mca_handler_bhhook) | 52 | END(mca_handler_bhhook) |
diff --git a/arch/ia64/kernel/numa.c b/arch/ia64/kernel/numa.c index a68ce6678092..0766493d4d00 100644 --- a/arch/ia64/kernel/numa.c +++ b/arch/ia64/kernel/numa.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <asm/processor.h> | 25 | #include <asm/processor.h> |
26 | #include <asm/smp.h> | 26 | #include <asm/smp.h> |
27 | 27 | ||
28 | u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned; | 28 | u16 cpu_to_node_map[NR_CPUS] __cacheline_aligned; |
29 | EXPORT_SYMBOL(cpu_to_node_map); | 29 | EXPORT_SYMBOL(cpu_to_node_map); |
30 | 30 | ||
31 | cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; | 31 | cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; |
diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c index 6a4ac7d70b35..bc11bb096f58 100644 --- a/arch/ia64/kernel/patch.c +++ b/arch/ia64/kernel/patch.c | |||
@@ -115,7 +115,7 @@ ia64_patch_vtop (unsigned long start, unsigned long end) | |||
115 | ia64_srlz_i(); | 115 | ia64_srlz_i(); |
116 | } | 116 | } |
117 | 117 | ||
118 | void | 118 | void __init |
119 | ia64_patch_mckinley_e9 (unsigned long start, unsigned long end) | 119 | ia64_patch_mckinley_e9 (unsigned long start, unsigned long end) |
120 | { | 120 | { |
121 | static int first_time = 1; | 121 | static int first_time = 1; |
@@ -149,7 +149,7 @@ ia64_patch_mckinley_e9 (unsigned long start, unsigned long end) | |||
149 | ia64_srlz_i(); | 149 | ia64_srlz_i(); |
150 | } | 150 | } |
151 | 151 | ||
152 | static void | 152 | static void __init |
153 | patch_fsyscall_table (unsigned long start, unsigned long end) | 153 | patch_fsyscall_table (unsigned long start, unsigned long end) |
154 | { | 154 | { |
155 | extern unsigned long fsyscall_table[NR_syscalls]; | 155 | extern unsigned long fsyscall_table[NR_syscalls]; |
@@ -166,7 +166,7 @@ patch_fsyscall_table (unsigned long start, unsigned long end) | |||
166 | ia64_srlz_i(); | 166 | ia64_srlz_i(); |
167 | } | 167 | } |
168 | 168 | ||
169 | static void | 169 | static void __init |
170 | patch_brl_fsys_bubble_down (unsigned long start, unsigned long end) | 170 | patch_brl_fsys_bubble_down (unsigned long start, unsigned long end) |
171 | { | 171 | { |
172 | extern char fsys_bubble_down[]; | 172 | extern char fsys_bubble_down[]; |
@@ -184,7 +184,7 @@ patch_brl_fsys_bubble_down (unsigned long start, unsigned long end) | |||
184 | ia64_srlz_i(); | 184 | ia64_srlz_i(); |
185 | } | 185 | } |
186 | 186 | ||
187 | void | 187 | void __init |
188 | ia64_patch_gate (void) | 188 | ia64_patch_gate (void) |
189 | { | 189 | { |
190 | # define START(name) ((unsigned long) __start_gate_##name##_patchlist) | 190 | # define START(name) ((unsigned long) __start_gate_##name##_patchlist) |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 9c5194b385da..077f21216b65 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -6722,6 +6722,7 @@ __initcall(pfm_init); | |||
6722 | void | 6722 | void |
6723 | pfm_init_percpu (void) | 6723 | pfm_init_percpu (void) |
6724 | { | 6724 | { |
6725 | static int first_time=1; | ||
6725 | /* | 6726 | /* |
6726 | * make sure no measurement is active | 6727 | * make sure no measurement is active |
6727 | * (may inherit programmed PMCs from EFI). | 6728 | * (may inherit programmed PMCs from EFI). |
@@ -6734,8 +6735,10 @@ pfm_init_percpu (void) | |||
6734 | */ | 6735 | */ |
6735 | pfm_unfreeze_pmu(); | 6736 | pfm_unfreeze_pmu(); |
6736 | 6737 | ||
6737 | if (smp_processor_id() == 0) | 6738 | if (first_time) { |
6738 | register_percpu_irq(IA64_PERFMON_VECTOR, &perfmon_irqaction); | 6739 | register_percpu_irq(IA64_PERFMON_VECTOR, &perfmon_irqaction); |
6740 | first_time=0; | ||
6741 | } | ||
6739 | 6742 | ||
6740 | ia64_setreg(_IA64_REG_CR_PMV, IA64_PERFMON_VECTOR); | 6743 | ia64_setreg(_IA64_REG_CR_PMV, IA64_PERFMON_VECTOR); |
6741 | ia64_srlz_d(); | 6744 | ia64_srlz_d(); |
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index eaed14aac6aa..9887c8787e7a 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c | |||
@@ -1656,8 +1656,14 @@ syscall_trace_leave (long arg0, long arg1, long arg2, long arg3, | |||
1656 | long arg4, long arg5, long arg6, long arg7, | 1656 | long arg4, long arg5, long arg6, long arg7, |
1657 | struct pt_regs regs) | 1657 | struct pt_regs regs) |
1658 | { | 1658 | { |
1659 | if (unlikely(current->audit_context)) | 1659 | if (unlikely(current->audit_context)) { |
1660 | audit_syscall_exit(current, AUDITSC_RESULT(regs.r10), regs.r8); | 1660 | int success = AUDITSC_RESULT(regs.r10); |
1661 | long result = regs.r8; | ||
1662 | |||
1663 | if (success != AUDITSC_SUCCESS) | ||
1664 | result = -result; | ||
1665 | audit_syscall_exit(current, success, result); | ||
1666 | } | ||
1661 | 1667 | ||
1662 | if (test_thread_flag(TIF_SYSCALL_TRACE) | 1668 | if (test_thread_flag(TIF_SYSCALL_TRACE) |
1663 | && (current->ptrace & PT_PTRACED)) | 1669 | && (current->ptrace & PT_PTRACED)) |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 3258e09278d0..eb388e271b2b 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <linux/serial_core.h> | 41 | #include <linux/serial_core.h> |
42 | #include <linux/efi.h> | 42 | #include <linux/efi.h> |
43 | #include <linux/initrd.h> | 43 | #include <linux/initrd.h> |
44 | #include <linux/platform.h> | ||
45 | #include <linux/pm.h> | 44 | #include <linux/pm.h> |
46 | #include <linux/cpufreq.h> | 45 | #include <linux/cpufreq.h> |
47 | 46 | ||
@@ -131,8 +130,8 @@ EXPORT_SYMBOL(ia64_max_iommu_merge_mask); | |||
131 | /* | 130 | /* |
132 | * We use a special marker for the end of memory and it uses the extra (+1) slot | 131 | * We use a special marker for the end of memory and it uses the extra (+1) slot |
133 | */ | 132 | */ |
134 | struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1]; | 133 | struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1] __initdata; |
135 | int num_rsvd_regions; | 134 | int num_rsvd_regions __initdata; |
136 | 135 | ||
137 | 136 | ||
138 | /* | 137 | /* |
@@ -141,7 +140,7 @@ int num_rsvd_regions; | |||
141 | * caller-specified function is called with the memory ranges that remain after filtering. | 140 | * caller-specified function is called with the memory ranges that remain after filtering. |
142 | * This routine does not assume the incoming segments are sorted. | 141 | * This routine does not assume the incoming segments are sorted. |
143 | */ | 142 | */ |
144 | int | 143 | int __init |
145 | filter_rsvd_memory (unsigned long start, unsigned long end, void *arg) | 144 | filter_rsvd_memory (unsigned long start, unsigned long end, void *arg) |
146 | { | 145 | { |
147 | unsigned long range_start, range_end, prev_start; | 146 | unsigned long range_start, range_end, prev_start; |
@@ -177,7 +176,7 @@ filter_rsvd_memory (unsigned long start, unsigned long end, void *arg) | |||
177 | return 0; | 176 | return 0; |
178 | } | 177 | } |
179 | 178 | ||
180 | static void | 179 | static void __init |
181 | sort_regions (struct rsvd_region *rsvd_region, int max) | 180 | sort_regions (struct rsvd_region *rsvd_region, int max) |
182 | { | 181 | { |
183 | int j; | 182 | int j; |
@@ -218,7 +217,7 @@ __initcall(register_memory); | |||
218 | * initrd, etc. There are currently %IA64_MAX_RSVD_REGIONS defined, | 217 | * initrd, etc. There are currently %IA64_MAX_RSVD_REGIONS defined, |
219 | * see include/asm-ia64/meminit.h if you need to define more. | 218 | * see include/asm-ia64/meminit.h if you need to define more. |
220 | */ | 219 | */ |
221 | void | 220 | void __init |
222 | reserve_memory (void) | 221 | reserve_memory (void) |
223 | { | 222 | { |
224 | int n = 0; | 223 | int n = 0; |
@@ -270,7 +269,7 @@ reserve_memory (void) | |||
270 | * Grab the initrd start and end from the boot parameter struct given us by | 269 | * Grab the initrd start and end from the boot parameter struct given us by |
271 | * the boot loader. | 270 | * the boot loader. |
272 | */ | 271 | */ |
273 | void | 272 | void __init |
274 | find_initrd (void) | 273 | find_initrd (void) |
275 | { | 274 | { |
276 | #ifdef CONFIG_BLK_DEV_INITRD | 275 | #ifdef CONFIG_BLK_DEV_INITRD |
@@ -362,7 +361,7 @@ mark_bsp_online (void) | |||
362 | } | 361 | } |
363 | 362 | ||
364 | #ifdef CONFIG_SMP | 363 | #ifdef CONFIG_SMP |
365 | static void | 364 | static void __init |
366 | check_for_logical_procs (void) | 365 | check_for_logical_procs (void) |
367 | { | 366 | { |
368 | pal_logical_to_physical_t info; | 367 | pal_logical_to_physical_t info; |
@@ -389,6 +388,14 @@ check_for_logical_procs (void) | |||
389 | } | 388 | } |
390 | #endif | 389 | #endif |
391 | 390 | ||
391 | static __initdata int nomca; | ||
392 | static __init int setup_nomca(char *s) | ||
393 | { | ||
394 | nomca = 1; | ||
395 | return 0; | ||
396 | } | ||
397 | early_param("nomca", setup_nomca); | ||
398 | |||
392 | void __init | 399 | void __init |
393 | setup_arch (char **cmdline_p) | 400 | setup_arch (char **cmdline_p) |
394 | { | 401 | { |
@@ -402,35 +409,15 @@ setup_arch (char **cmdline_p) | |||
402 | efi_init(); | 409 | efi_init(); |
403 | io_port_init(); | 410 | io_port_init(); |
404 | 411 | ||
412 | parse_early_param(); | ||
413 | |||
405 | #ifdef CONFIG_IA64_GENERIC | 414 | #ifdef CONFIG_IA64_GENERIC |
406 | { | 415 | machvec_init(NULL); |
407 | const char *mvec_name = strstr (*cmdline_p, "machvec="); | ||
408 | char str[64]; | ||
409 | |||
410 | if (mvec_name) { | ||
411 | const char *end; | ||
412 | size_t len; | ||
413 | |||
414 | mvec_name += 8; | ||
415 | end = strchr (mvec_name, ' '); | ||
416 | if (end) | ||
417 | len = end - mvec_name; | ||
418 | else | ||
419 | len = strlen (mvec_name); | ||
420 | len = min(len, sizeof (str) - 1); | ||
421 | strncpy (str, mvec_name, len); | ||
422 | str[len] = '\0'; | ||
423 | mvec_name = str; | ||
424 | } else | ||
425 | mvec_name = acpi_get_sysname(); | ||
426 | machvec_init(mvec_name); | ||
427 | } | ||
428 | #endif | 416 | #endif |
429 | 417 | ||
430 | if (early_console_setup(*cmdline_p) == 0) | 418 | if (early_console_setup(*cmdline_p) == 0) |
431 | mark_bsp_online(); | 419 | mark_bsp_online(); |
432 | 420 | ||
433 | parse_early_param(); | ||
434 | #ifdef CONFIG_ACPI | 421 | #ifdef CONFIG_ACPI |
435 | /* Initialize the ACPI boot-time table parser */ | 422 | /* Initialize the ACPI boot-time table parser */ |
436 | acpi_table_init(); | 423 | acpi_table_init(); |
@@ -493,7 +480,7 @@ setup_arch (char **cmdline_p) | |||
493 | #endif | 480 | #endif |
494 | 481 | ||
495 | /* enable IA-64 Machine Check Abort Handling unless disabled */ | 482 | /* enable IA-64 Machine Check Abort Handling unless disabled */ |
496 | if (!strstr(saved_command_line, "nomca")) | 483 | if (!nomca) |
497 | ia64_mca_init(); | 484 | ia64_mca_init(); |
498 | 485 | ||
499 | platform_setup(cmdline_p); | 486 | platform_setup(cmdline_p); |
@@ -623,7 +610,7 @@ struct seq_operations cpuinfo_op = { | |||
623 | .show = show_cpuinfo | 610 | .show = show_cpuinfo |
624 | }; | 611 | }; |
625 | 612 | ||
626 | void | 613 | static void __cpuinit |
627 | identify_cpu (struct cpuinfo_ia64 *c) | 614 | identify_cpu (struct cpuinfo_ia64 *c) |
628 | { | 615 | { |
629 | union { | 616 | union { |
@@ -700,7 +687,7 @@ setup_per_cpu_areas (void) | |||
700 | * In addition, the minimum of the i-cache stride sizes is calculated for | 687 | * In addition, the minimum of the i-cache stride sizes is calculated for |
701 | * "flush_icache_range()". | 688 | * "flush_icache_range()". |
702 | */ | 689 | */ |
703 | static void | 690 | static void __cpuinit |
704 | get_max_cacheline_size (void) | 691 | get_max_cacheline_size (void) |
705 | { | 692 | { |
706 | unsigned long line_size, max = 1; | 693 | unsigned long line_size, max = 1; |
@@ -763,10 +750,10 @@ get_max_cacheline_size (void) | |||
763 | * cpu_init() initializes state that is per-CPU. This function acts | 750 | * cpu_init() initializes state that is per-CPU. This function acts |
764 | * as a 'CPU state barrier', nothing should get across. | 751 | * as a 'CPU state barrier', nothing should get across. |
765 | */ | 752 | */ |
766 | void | 753 | void __cpuinit |
767 | cpu_init (void) | 754 | cpu_init (void) |
768 | { | 755 | { |
769 | extern void __devinit ia64_mmu_init (void *); | 756 | extern void __cpuinit ia64_mmu_init (void *); |
770 | unsigned long num_phys_stacked; | 757 | unsigned long num_phys_stacked; |
771 | pal_vm_info_2_u_t vmi; | 758 | pal_vm_info_2_u_t vmi; |
772 | unsigned int max_ctx; | 759 | unsigned int max_ctx; |
@@ -894,7 +881,7 @@ void sched_cacheflush(void) | |||
894 | ia64_sal_cache_flush(3); | 881 | ia64_sal_cache_flush(3); |
895 | } | 882 | } |
896 | 883 | ||
897 | void | 884 | void __init |
898 | check_bugs (void) | 885 | check_bugs (void) |
899 | { | 886 | { |
900 | ia64_patch_mckinley_e9((unsigned long) __start___mckinley_e9_bundles, | 887 | ia64_patch_mckinley_e9((unsigned long) __start___mckinley_e9_bundles, |
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c index 463f6bb44d07..1d7903ee2126 100644 --- a/arch/ia64/kernel/signal.c +++ b/arch/ia64/kernel/signal.c | |||
@@ -588,104 +588,3 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall) | |||
588 | } | 588 | } |
589 | return 0; | 589 | return 0; |
590 | } | 590 | } |
591 | |||
592 | /* Set a delayed signal that was detected in MCA/INIT/NMI/PMI context where it | ||
593 | * could not be delivered. It is important that the target process is not | ||
594 | * allowed to do any more work in user space. Possible cases for the target | ||
595 | * process: | ||
596 | * | ||
597 | * - It is sleeping and will wake up soon. Store the data in the current task, | ||
598 | * the signal will be sent when the current task returns from the next | ||
599 | * interrupt. | ||
600 | * | ||
601 | * - It is running in user context. Store the data in the current task, the | ||
602 | * signal will be sent when the current task returns from the next interrupt. | ||
603 | * | ||
604 | * - It is running in kernel context on this or another cpu and will return to | ||
605 | * user context. Store the data in the target task, the signal will be sent | ||
606 | * to itself when the target task returns to user space. | ||
607 | * | ||
608 | * - It is running in kernel context on this cpu and will sleep before | ||
609 | * returning to user context. Because this is also the current task, the | ||
610 | * signal will not get delivered and the task could sleep indefinitely. | ||
611 | * Store the data in the idle task for this cpu, the signal will be sent | ||
612 | * after the idle task processes its next interrupt. | ||
613 | * | ||
614 | * To cover all cases, store the data in the target task, the current task and | ||
615 | * the idle task on this cpu. Whatever happens, the signal will be delivered | ||
616 | * to the target task before it can do any useful user space work. Multiple | ||
617 | * deliveries have no unwanted side effects. | ||
618 | * | ||
619 | * Note: This code is executed in MCA/INIT/NMI/PMI context, with interrupts | ||
620 | * disabled. It must not take any locks nor use kernel structures or services | ||
621 | * that require locks. | ||
622 | */ | ||
623 | |||
624 | /* To ensure that we get the right pid, check its start time. To avoid extra | ||
625 | * include files in thread_info.h, convert the task start_time to unsigned long, | ||
626 | * giving us a cycle time of > 580 years. | ||
627 | */ | ||
628 | static inline unsigned long | ||
629 | start_time_ul(const struct task_struct *t) | ||
630 | { | ||
631 | return t->start_time.tv_sec * NSEC_PER_SEC + t->start_time.tv_nsec; | ||
632 | } | ||
633 | |||
634 | void | ||
635 | set_sigdelayed(pid_t pid, int signo, int code, void __user *addr) | ||
636 | { | ||
637 | struct task_struct *t; | ||
638 | unsigned long start_time = 0; | ||
639 | int i; | ||
640 | |||
641 | for (i = 1; i <= 3; ++i) { | ||
642 | switch (i) { | ||
643 | case 1: | ||
644 | t = find_task_by_pid(pid); | ||
645 | if (t) | ||
646 | start_time = start_time_ul(t); | ||
647 | break; | ||
648 | case 2: | ||
649 | t = current; | ||
650 | break; | ||
651 | default: | ||
652 | t = idle_task(smp_processor_id()); | ||
653 | break; | ||
654 | } | ||
655 | |||
656 | if (!t) | ||
657 | return; | ||
658 | task_thread_info(t)->sigdelayed.signo = signo; | ||
659 | task_thread_info(t)->sigdelayed.code = code; | ||
660 | task_thread_info(t)->sigdelayed.addr = addr; | ||
661 | task_thread_info(t)->sigdelayed.start_time = start_time; | ||
662 | task_thread_info(t)->sigdelayed.pid = pid; | ||
663 | wmb(); | ||
664 | set_tsk_thread_flag(t, TIF_SIGDELAYED); | ||
665 | } | ||
666 | } | ||
667 | |||
668 | /* Called from entry.S when it detects TIF_SIGDELAYED, a delayed signal that | ||
669 | * was detected in MCA/INIT/NMI/PMI context where it could not be delivered. | ||
670 | */ | ||
671 | |||
672 | void | ||
673 | do_sigdelayed(void) | ||
674 | { | ||
675 | struct siginfo siginfo; | ||
676 | pid_t pid; | ||
677 | struct task_struct *t; | ||
678 | |||
679 | clear_thread_flag(TIF_SIGDELAYED); | ||
680 | memset(&siginfo, 0, sizeof(siginfo)); | ||
681 | siginfo.si_signo = current_thread_info()->sigdelayed.signo; | ||
682 | siginfo.si_code = current_thread_info()->sigdelayed.code; | ||
683 | siginfo.si_addr = current_thread_info()->sigdelayed.addr; | ||
684 | pid = current_thread_info()->sigdelayed.pid; | ||
685 | t = find_task_by_pid(pid); | ||
686 | if (!t) | ||
687 | return; | ||
688 | if (current_thread_info()->sigdelayed.start_time != start_time_ul(t)) | ||
689 | return; | ||
690 | force_sig_info(siginfo.si_signo, &siginfo, t); | ||
691 | } | ||
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index b681ef34a86e..44e9547878ac 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -70,6 +70,12 @@ | |||
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | #ifdef CONFIG_HOTPLUG_CPU | 72 | #ifdef CONFIG_HOTPLUG_CPU |
73 | #ifdef CONFIG_PERMIT_BSP_REMOVE | ||
74 | #define bsp_remove_ok 1 | ||
75 | #else | ||
76 | #define bsp_remove_ok 0 | ||
77 | #endif | ||
78 | |||
73 | /* | 79 | /* |
74 | * Store all idle threads, this can be reused instead of creating | 80 | * Store all idle threads, this can be reused instead of creating |
75 | * a new thread. Also avoids complicated thread destroy functionality | 81 | * a new thread. Also avoids complicated thread destroy functionality |
@@ -104,7 +110,7 @@ struct sal_to_os_boot *sal_state_for_booting_cpu = &sal_boot_rendez_state[0]; | |||
104 | /* | 110 | /* |
105 | * ITC synchronization related stuff: | 111 | * ITC synchronization related stuff: |
106 | */ | 112 | */ |
107 | #define MASTER 0 | 113 | #define MASTER (0) |
108 | #define SLAVE (SMP_CACHE_BYTES/8) | 114 | #define SLAVE (SMP_CACHE_BYTES/8) |
109 | 115 | ||
110 | #define NUM_ROUNDS 64 /* magic value */ | 116 | #define NUM_ROUNDS 64 /* magic value */ |
@@ -151,6 +157,27 @@ char __initdata no_int_routing; | |||
151 | 157 | ||
152 | unsigned char smp_int_redirect; /* are INT and IPI redirectable by the chipset? */ | 158 | unsigned char smp_int_redirect; /* are INT and IPI redirectable by the chipset? */ |
153 | 159 | ||
160 | #ifdef CONFIG_FORCE_CPEI_RETARGET | ||
161 | #define CPEI_OVERRIDE_DEFAULT (1) | ||
162 | #else | ||
163 | #define CPEI_OVERRIDE_DEFAULT (0) | ||
164 | #endif | ||
165 | |||
166 | unsigned int force_cpei_retarget = CPEI_OVERRIDE_DEFAULT; | ||
167 | |||
168 | static int __init | ||
169 | cmdl_force_cpei(char *str) | ||
170 | { | ||
171 | int value=0; | ||
172 | |||
173 | get_option (&str, &value); | ||
174 | force_cpei_retarget = value; | ||
175 | |||
176 | return 1; | ||
177 | } | ||
178 | |||
179 | __setup("force_cpei=", cmdl_force_cpei); | ||
180 | |||
154 | static int __init | 181 | static int __init |
155 | nointroute (char *str) | 182 | nointroute (char *str) |
156 | { | 183 | { |
@@ -161,6 +188,27 @@ nointroute (char *str) | |||
161 | 188 | ||
162 | __setup("nointroute", nointroute); | 189 | __setup("nointroute", nointroute); |
163 | 190 | ||
191 | static void fix_b0_for_bsp(void) | ||
192 | { | ||
193 | #ifdef CONFIG_HOTPLUG_CPU | ||
194 | int cpuid; | ||
195 | static int fix_bsp_b0 = 1; | ||
196 | |||
197 | cpuid = smp_processor_id(); | ||
198 | |||
199 | /* | ||
200 | * Cache the b0 value on the first AP that comes up | ||
201 | */ | ||
202 | if (!(fix_bsp_b0 && cpuid)) | ||
203 | return; | ||
204 | |||
205 | sal_boot_rendez_state[0].br[0] = sal_boot_rendez_state[cpuid].br[0]; | ||
206 | printk ("Fixed BSP b0 value from CPU %d\n", cpuid); | ||
207 | |||
208 | fix_bsp_b0 = 0; | ||
209 | #endif | ||
210 | } | ||
211 | |||
164 | void | 212 | void |
165 | sync_master (void *arg) | 213 | sync_master (void *arg) |
166 | { | 214 | { |
@@ -327,8 +375,9 @@ smp_setup_percpu_timer (void) | |||
327 | static void __devinit | 375 | static void __devinit |
328 | smp_callin (void) | 376 | smp_callin (void) |
329 | { | 377 | { |
330 | int cpuid, phys_id; | 378 | int cpuid, phys_id, itc_master; |
331 | extern void ia64_init_itm(void); | 379 | extern void ia64_init_itm(void); |
380 | extern volatile int time_keeper_id; | ||
332 | 381 | ||
333 | #ifdef CONFIG_PERFMON | 382 | #ifdef CONFIG_PERFMON |
334 | extern void pfm_init_percpu(void); | 383 | extern void pfm_init_percpu(void); |
@@ -336,6 +385,7 @@ smp_callin (void) | |||
336 | 385 | ||
337 | cpuid = smp_processor_id(); | 386 | cpuid = smp_processor_id(); |
338 | phys_id = hard_smp_processor_id(); | 387 | phys_id = hard_smp_processor_id(); |
388 | itc_master = time_keeper_id; | ||
339 | 389 | ||
340 | if (cpu_online(cpuid)) { | 390 | if (cpu_online(cpuid)) { |
341 | printk(KERN_ERR "huh, phys CPU#0x%x, CPU#0x%x already present??\n", | 391 | printk(KERN_ERR "huh, phys CPU#0x%x, CPU#0x%x already present??\n", |
@@ -343,6 +393,8 @@ smp_callin (void) | |||
343 | BUG(); | 393 | BUG(); |
344 | } | 394 | } |
345 | 395 | ||
396 | fix_b0_for_bsp(); | ||
397 | |||
346 | lock_ipi_calllock(); | 398 | lock_ipi_calllock(); |
347 | cpu_set(cpuid, cpu_online_map); | 399 | cpu_set(cpuid, cpu_online_map); |
348 | unlock_ipi_calllock(); | 400 | unlock_ipi_calllock(); |
@@ -365,8 +417,8 @@ smp_callin (void) | |||
365 | * calls spin_unlock_bh(), which calls spin_unlock_bh(), which calls | 417 | * calls spin_unlock_bh(), which calls spin_unlock_bh(), which calls |
366 | * local_bh_enable(), which bugs out if irqs are not enabled... | 418 | * local_bh_enable(), which bugs out if irqs are not enabled... |
367 | */ | 419 | */ |
368 | Dprintk("Going to syncup ITC with BP.\n"); | 420 | Dprintk("Going to syncup ITC with ITC Master.\n"); |
369 | ia64_sync_itc(0); | 421 | ia64_sync_itc(itc_master); |
370 | } | 422 | } |
371 | 423 | ||
372 | /* | 424 | /* |
@@ -572,32 +624,8 @@ void __devinit smp_prepare_boot_cpu(void) | |||
572 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; | 624 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; |
573 | } | 625 | } |
574 | 626 | ||
575 | /* | ||
576 | * mt_info[] is a temporary store for all info returned by | ||
577 | * PAL_LOGICAL_TO_PHYSICAL, to be copied into cpuinfo_ia64 when the | ||
578 | * specific cpu comes. | ||
579 | */ | ||
580 | static struct { | ||
581 | __u32 socket_id; | ||
582 | __u16 core_id; | ||
583 | __u16 thread_id; | ||
584 | __u16 proc_fixed_addr; | ||
585 | __u8 valid; | ||
586 | } mt_info[NR_CPUS] __devinitdata; | ||
587 | |||
588 | #ifdef CONFIG_HOTPLUG_CPU | 627 | #ifdef CONFIG_HOTPLUG_CPU |
589 | static inline void | 628 | static inline void |
590 | remove_from_mtinfo(int cpu) | ||
591 | { | ||
592 | int i; | ||
593 | |||
594 | for_each_cpu(i) | ||
595 | if (mt_info[i].valid && mt_info[i].socket_id == | ||
596 | cpu_data(cpu)->socket_id) | ||
597 | mt_info[i].valid = 0; | ||
598 | } | ||
599 | |||
600 | static inline void | ||
601 | clear_cpu_sibling_map(int cpu) | 629 | clear_cpu_sibling_map(int cpu) |
602 | { | 630 | { |
603 | int i; | 631 | int i; |
@@ -626,15 +654,50 @@ remove_siblinginfo(int cpu) | |||
626 | 654 | ||
627 | /* remove it from all sibling map's */ | 655 | /* remove it from all sibling map's */ |
628 | clear_cpu_sibling_map(cpu); | 656 | clear_cpu_sibling_map(cpu); |
657 | } | ||
658 | |||
659 | extern void fixup_irqs(void); | ||
629 | 660 | ||
630 | /* if this cpu is the last in the core group, remove all its info | 661 | int migrate_platform_irqs(unsigned int cpu) |
631 | * from mt_info structure | 662 | { |
663 | int new_cpei_cpu; | ||
664 | irq_desc_t *desc = NULL; | ||
665 | cpumask_t mask; | ||
666 | int retval = 0; | ||
667 | |||
668 | /* | ||
669 | * dont permit CPEI target to removed. | ||
632 | */ | 670 | */ |
633 | if (last) | 671 | if (cpe_vector > 0 && is_cpu_cpei_target(cpu)) { |
634 | remove_from_mtinfo(cpu); | 672 | printk ("CPU (%d) is CPEI Target\n", cpu); |
673 | if (can_cpei_retarget()) { | ||
674 | /* | ||
675 | * Now re-target the CPEI to a different processor | ||
676 | */ | ||
677 | new_cpei_cpu = any_online_cpu(cpu_online_map); | ||
678 | mask = cpumask_of_cpu(new_cpei_cpu); | ||
679 | set_cpei_target_cpu(new_cpei_cpu); | ||
680 | desc = irq_descp(ia64_cpe_irq); | ||
681 | /* | ||
682 | * Switch for now, immediatly, we need to do fake intr | ||
683 | * as other interrupts, but need to study CPEI behaviour with | ||
684 | * polling before making changes. | ||
685 | */ | ||
686 | if (desc) { | ||
687 | desc->handler->disable(ia64_cpe_irq); | ||
688 | desc->handler->set_affinity(ia64_cpe_irq, mask); | ||
689 | desc->handler->enable(ia64_cpe_irq); | ||
690 | printk ("Re-targetting CPEI to cpu %d\n", new_cpei_cpu); | ||
691 | } | ||
692 | } | ||
693 | if (!desc) { | ||
694 | printk ("Unable to retarget CPEI, offline cpu [%d] failed\n", cpu); | ||
695 | retval = -EBUSY; | ||
696 | } | ||
697 | } | ||
698 | return retval; | ||
635 | } | 699 | } |
636 | 700 | ||
637 | extern void fixup_irqs(void); | ||
638 | /* must be called with cpucontrol mutex held */ | 701 | /* must be called with cpucontrol mutex held */ |
639 | int __cpu_disable(void) | 702 | int __cpu_disable(void) |
640 | { | 703 | { |
@@ -643,8 +706,17 @@ int __cpu_disable(void) | |||
643 | /* | 706 | /* |
644 | * dont permit boot processor for now | 707 | * dont permit boot processor for now |
645 | */ | 708 | */ |
646 | if (cpu == 0) | 709 | if (cpu == 0 && !bsp_remove_ok) { |
647 | return -EBUSY; | 710 | printk ("Your platform does not support removal of BSP\n"); |
711 | return (-EBUSY); | ||
712 | } | ||
713 | |||
714 | cpu_clear(cpu, cpu_online_map); | ||
715 | |||
716 | if (migrate_platform_irqs(cpu)) { | ||
717 | cpu_set(cpu, cpu_online_map); | ||
718 | return (-EBUSY); | ||
719 | } | ||
648 | 720 | ||
649 | remove_siblinginfo(cpu); | 721 | remove_siblinginfo(cpu); |
650 | cpu_clear(cpu, cpu_online_map); | 722 | cpu_clear(cpu, cpu_online_map); |
@@ -776,40 +848,6 @@ init_smp_config(void) | |||
776 | ia64_sal_strerror(sal_ret)); | 848 | ia64_sal_strerror(sal_ret)); |
777 | } | 849 | } |
778 | 850 | ||
779 | static inline int __devinit | ||
780 | check_for_mtinfo_index(void) | ||
781 | { | ||
782 | int i; | ||
783 | |||
784 | for_each_cpu(i) | ||
785 | if (!mt_info[i].valid) | ||
786 | return i; | ||
787 | |||
788 | return -1; | ||
789 | } | ||
790 | |||
791 | /* | ||
792 | * Search the mt_info to find out if this socket's cid/tid information is | ||
793 | * cached or not. If the socket exists, fill in the core_id and thread_id | ||
794 | * in cpuinfo | ||
795 | */ | ||
796 | static int __devinit | ||
797 | check_for_new_socket(__u16 logical_address, struct cpuinfo_ia64 *c) | ||
798 | { | ||
799 | int i; | ||
800 | __u32 sid = c->socket_id; | ||
801 | |||
802 | for_each_cpu(i) { | ||
803 | if (mt_info[i].valid && mt_info[i].proc_fixed_addr == logical_address | ||
804 | && mt_info[i].socket_id == sid) { | ||
805 | c->core_id = mt_info[i].core_id; | ||
806 | c->thread_id = mt_info[i].thread_id; | ||
807 | return 1; /* not a new socket */ | ||
808 | } | ||
809 | } | ||
810 | return 0; | ||
811 | } | ||
812 | |||
813 | /* | 851 | /* |
814 | * identify_siblings(cpu) gets called from identify_cpu. This populates the | 852 | * identify_siblings(cpu) gets called from identify_cpu. This populates the |
815 | * information related to logical execution units in per_cpu_data structure. | 853 | * information related to logical execution units in per_cpu_data structure. |
@@ -819,14 +857,12 @@ identify_siblings(struct cpuinfo_ia64 *c) | |||
819 | { | 857 | { |
820 | s64 status; | 858 | s64 status; |
821 | u16 pltid; | 859 | u16 pltid; |
822 | u64 proc_fixed_addr; | ||
823 | int count, i; | ||
824 | pal_logical_to_physical_t info; | 860 | pal_logical_to_physical_t info; |
825 | 861 | ||
826 | if (smp_num_cpucores == 1 && smp_num_siblings == 1) | 862 | if (smp_num_cpucores == 1 && smp_num_siblings == 1) |
827 | return; | 863 | return; |
828 | 864 | ||
829 | if ((status = ia64_pal_logical_to_phys(0, &info)) != PAL_STATUS_SUCCESS) { | 865 | if ((status = ia64_pal_logical_to_phys(-1, &info)) != PAL_STATUS_SUCCESS) { |
830 | printk(KERN_ERR "ia64_pal_logical_to_phys failed with %ld\n", | 866 | printk(KERN_ERR "ia64_pal_logical_to_phys failed with %ld\n", |
831 | status); | 867 | status); |
832 | return; | 868 | return; |
@@ -835,47 +871,12 @@ identify_siblings(struct cpuinfo_ia64 *c) | |||
835 | printk(KERN_ERR "ia64_sal_pltid failed with %ld\n", status); | 871 | printk(KERN_ERR "ia64_sal_pltid failed with %ld\n", status); |
836 | return; | 872 | return; |
837 | } | 873 | } |
838 | if ((status = ia64_pal_fixed_addr(&proc_fixed_addr)) != PAL_STATUS_SUCCESS) { | ||
839 | printk(KERN_ERR "ia64_pal_fixed_addr failed with %ld\n", status); | ||
840 | return; | ||
841 | } | ||
842 | 874 | ||
843 | c->socket_id = (pltid << 8) | info.overview_ppid; | 875 | c->socket_id = (pltid << 8) | info.overview_ppid; |
844 | c->cores_per_socket = info.overview_cpp; | 876 | c->cores_per_socket = info.overview_cpp; |
845 | c->threads_per_core = info.overview_tpc; | 877 | c->threads_per_core = info.overview_tpc; |
846 | count = c->num_log = info.overview_num_log; | 878 | c->num_log = info.overview_num_log; |
847 | |||
848 | /* If the thread and core id information is already cached, then | ||
849 | * we will simply update cpu_info and return. Otherwise, we will | ||
850 | * do the PAL calls and cache core and thread id's of all the siblings. | ||
851 | */ | ||
852 | if (check_for_new_socket(proc_fixed_addr, c)) | ||
853 | return; | ||
854 | |||
855 | for (i = 0; i < count; i++) { | ||
856 | int index; | ||
857 | |||
858 | if (i && (status = ia64_pal_logical_to_phys(i, &info)) | ||
859 | != PAL_STATUS_SUCCESS) { | ||
860 | printk(KERN_ERR "ia64_pal_logical_to_phys failed" | ||
861 | " with %ld\n", status); | ||
862 | return; | ||
863 | } | ||
864 | if (info.log2_la == proc_fixed_addr) { | ||
865 | c->core_id = info.log1_cid; | ||
866 | c->thread_id = info.log1_tid; | ||
867 | } | ||
868 | 879 | ||
869 | index = check_for_mtinfo_index(); | 880 | c->core_id = info.log1_cid; |
870 | /* We will not do the mt_info caching optimization in this case. | 881 | c->thread_id = info.log1_tid; |
871 | */ | ||
872 | if (index < 0) | ||
873 | continue; | ||
874 | |||
875 | mt_info[index].valid = 1; | ||
876 | mt_info[index].socket_id = c->socket_id; | ||
877 | mt_info[index].core_id = info.log1_cid; | ||
878 | mt_info[index].thread_id = info.log1_tid; | ||
879 | mt_info[index].proc_fixed_addr = info.log2_la; | ||
880 | } | ||
881 | } | 882 | } |
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 307d01e15b2e..ac167436e936 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | extern unsigned long wall_jiffies; | 33 | extern unsigned long wall_jiffies; |
34 | 34 | ||
35 | #define TIME_KEEPER_ID 0 /* smp_processor_id() of time-keeper */ | 35 | volatile int time_keeper_id = 0; /* smp_processor_id() of time-keeper */ |
36 | 36 | ||
37 | #ifdef CONFIG_IA64_DEBUG_IRQ | 37 | #ifdef CONFIG_IA64_DEBUG_IRQ |
38 | 38 | ||
@@ -71,7 +71,7 @@ timer_interrupt (int irq, void *dev_id, struct pt_regs *regs) | |||
71 | 71 | ||
72 | new_itm += local_cpu_data->itm_delta; | 72 | new_itm += local_cpu_data->itm_delta; |
73 | 73 | ||
74 | if (smp_processor_id() == TIME_KEEPER_ID) { | 74 | if (smp_processor_id() == time_keeper_id) { |
75 | /* | 75 | /* |
76 | * Here we are in the timer irq handler. We have irqs locally | 76 | * Here we are in the timer irq handler. We have irqs locally |
77 | * disabled, but we don't know if the timer_bh is running on | 77 | * disabled, but we don't know if the timer_bh is running on |
@@ -236,6 +236,11 @@ static struct irqaction timer_irqaction = { | |||
236 | .name = "timer" | 236 | .name = "timer" |
237 | }; | 237 | }; |
238 | 238 | ||
239 | void __devinit ia64_disable_timer(void) | ||
240 | { | ||
241 | ia64_set_itv(1 << 16); | ||
242 | } | ||
243 | |||
239 | void __init | 244 | void __init |
240 | time_init (void) | 245 | time_init (void) |
241 | { | 246 | { |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 6e5eea19fa67..3b6fd798c4d6 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -36,7 +36,7 @@ int arch_register_cpu(int num) | |||
36 | parent = &sysfs_nodes[cpu_to_node(num)]; | 36 | parent = &sysfs_nodes[cpu_to_node(num)]; |
37 | #endif /* CONFIG_NUMA */ | 37 | #endif /* CONFIG_NUMA */ |
38 | 38 | ||
39 | #ifdef CONFIG_ACPI | 39 | #if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) |
40 | /* | 40 | /* |
41 | * If CPEI cannot be re-targetted, and this is | 41 | * If CPEI cannot be re-targetted, and this is |
42 | * CPEI target, then dont create the control file | 42 | * CPEI target, then dont create the control file |
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 73af6267d2ef..0b9e56dd7f05 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S | |||
@@ -70,34 +70,9 @@ SECTIONS | |||
70 | __stop___ex_table = .; | 70 | __stop___ex_table = .; |
71 | } | 71 | } |
72 | 72 | ||
73 | .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET) | ||
74 | { | ||
75 | __start___vtop_patchlist = .; | ||
76 | *(.data.patch.vtop) | ||
77 | __end___vtop_patchlist = .; | ||
78 | } | ||
79 | |||
80 | .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET) | ||
81 | { | ||
82 | __start___mckinley_e9_bundles = .; | ||
83 | *(.data.patch.mckinley_e9) | ||
84 | __end___mckinley_e9_bundles = .; | ||
85 | } | ||
86 | |||
87 | /* Global data */ | 73 | /* Global data */ |
88 | _data = .; | 74 | _data = .; |
89 | 75 | ||
90 | #if defined(CONFIG_IA64_GENERIC) | ||
91 | /* Machine Vector */ | ||
92 | . = ALIGN(16); | ||
93 | .machvec : AT(ADDR(.machvec) - LOAD_OFFSET) | ||
94 | { | ||
95 | machvec_start = .; | ||
96 | *(.machvec) | ||
97 | machvec_end = .; | ||
98 | } | ||
99 | #endif | ||
100 | |||
101 | /* Unwind info & table: */ | 76 | /* Unwind info & table: */ |
102 | . = ALIGN(8); | 77 | . = ALIGN(8); |
103 | .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET) | 78 | .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET) |
@@ -154,6 +129,41 @@ SECTIONS | |||
154 | *(.initcall7.init) | 129 | *(.initcall7.init) |
155 | __initcall_end = .; | 130 | __initcall_end = .; |
156 | } | 131 | } |
132 | |||
133 | /* MCA table */ | ||
134 | . = ALIGN(16); | ||
135 | __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET) | ||
136 | { | ||
137 | __start___mca_table = .; | ||
138 | *(__mca_table) | ||
139 | __stop___mca_table = .; | ||
140 | } | ||
141 | |||
142 | .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET) | ||
143 | { | ||
144 | __start___vtop_patchlist = .; | ||
145 | *(.data.patch.vtop) | ||
146 | __end___vtop_patchlist = .; | ||
147 | } | ||
148 | |||
149 | .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET) | ||
150 | { | ||
151 | __start___mckinley_e9_bundles = .; | ||
152 | *(.data.patch.mckinley_e9) | ||
153 | __end___mckinley_e9_bundles = .; | ||
154 | } | ||
155 | |||
156 | #if defined(CONFIG_IA64_GENERIC) | ||
157 | /* Machine Vector */ | ||
158 | . = ALIGN(16); | ||
159 | .machvec : AT(ADDR(.machvec) - LOAD_OFFSET) | ||
160 | { | ||
161 | machvec_start = .; | ||
162 | *(.machvec) | ||
163 | machvec_end = .; | ||
164 | } | ||
165 | #endif | ||
166 | |||
157 | __con_initcall_start = .; | 167 | __con_initcall_start = .; |
158 | .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) | 168 | .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) |
159 | { *(.con_initcall.init) } | 169 | { *(.con_initcall.init) } |
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c index acaaec4e4681..84fd1c14c8a9 100644 --- a/arch/ia64/mm/contig.c +++ b/arch/ia64/mm/contig.c | |||
@@ -97,7 +97,7 @@ find_max_pfn (unsigned long start, unsigned long end, void *arg) | |||
97 | * Find a place to put the bootmap and return its starting address in | 97 | * Find a place to put the bootmap and return its starting address in |
98 | * bootmap_start. This address must be page-aligned. | 98 | * bootmap_start. This address must be page-aligned. |
99 | */ | 99 | */ |
100 | int | 100 | static int __init |
101 | find_bootmap_location (unsigned long start, unsigned long end, void *arg) | 101 | find_bootmap_location (unsigned long start, unsigned long end, void *arg) |
102 | { | 102 | { |
103 | unsigned long needed = *(unsigned long *)arg; | 103 | unsigned long needed = *(unsigned long *)arg; |
@@ -141,7 +141,7 @@ find_bootmap_location (unsigned long start, unsigned long end, void *arg) | |||
141 | * Walk the EFI memory map and find usable memory for the system, taking | 141 | * Walk the EFI memory map and find usable memory for the system, taking |
142 | * into account reserved areas. | 142 | * into account reserved areas. |
143 | */ | 143 | */ |
144 | void | 144 | void __init |
145 | find_memory (void) | 145 | find_memory (void) |
146 | { | 146 | { |
147 | unsigned long bootmap_size; | 147 | unsigned long bootmap_size; |
@@ -176,18 +176,20 @@ find_memory (void) | |||
176 | * | 176 | * |
177 | * Allocate and setup per-cpu data areas. | 177 | * Allocate and setup per-cpu data areas. |
178 | */ | 178 | */ |
179 | void * | 179 | void * __cpuinit |
180 | per_cpu_init (void) | 180 | per_cpu_init (void) |
181 | { | 181 | { |
182 | void *cpu_data; | 182 | void *cpu_data; |
183 | int cpu; | 183 | int cpu; |
184 | static int first_time=1; | ||
184 | 185 | ||
185 | /* | 186 | /* |
186 | * get_free_pages() cannot be used before cpu_init() done. BSP | 187 | * get_free_pages() cannot be used before cpu_init() done. BSP |
187 | * allocates "NR_CPUS" pages for all CPUs to avoid that AP calls | 188 | * allocates "NR_CPUS" pages for all CPUs to avoid that AP calls |
188 | * get_zeroed_page(). | 189 | * get_zeroed_page(). |
189 | */ | 190 | */ |
190 | if (smp_processor_id() == 0) { | 191 | if (first_time) { |
192 | first_time=0; | ||
191 | cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS, | 193 | cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS, |
192 | PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); | 194 | PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); |
193 | for (cpu = 0; cpu < NR_CPUS; cpu++) { | 195 | for (cpu = 0; cpu < NR_CPUS; cpu++) { |
@@ -226,7 +228,7 @@ count_dma_pages (u64 start, u64 end, void *arg) | |||
226 | * Set up the page tables. | 228 | * Set up the page tables. |
227 | */ | 229 | */ |
228 | 230 | ||
229 | void | 231 | void __init |
230 | paging_init (void) | 232 | paging_init (void) |
231 | { | 233 | { |
232 | unsigned long max_dma; | 234 | unsigned long max_dma; |
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index c87d6d1d5813..2f5e44862e91 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c | |||
@@ -525,15 +525,20 @@ void __init find_memory(void) | |||
525 | * find_pernode_space() does most of this already, we just need to set | 525 | * find_pernode_space() does most of this already, we just need to set |
526 | * local_per_cpu_offset | 526 | * local_per_cpu_offset |
527 | */ | 527 | */ |
528 | void *per_cpu_init(void) | 528 | void __cpuinit *per_cpu_init(void) |
529 | { | 529 | { |
530 | int cpu; | 530 | int cpu; |
531 | static int first_time = 1; | ||
532 | |||
531 | 533 | ||
532 | if (smp_processor_id() != 0) | 534 | if (smp_processor_id() != 0) |
533 | return __per_cpu_start + __per_cpu_offset[smp_processor_id()]; | 535 | return __per_cpu_start + __per_cpu_offset[smp_processor_id()]; |
534 | 536 | ||
535 | for (cpu = 0; cpu < NR_CPUS; cpu++) | 537 | if (first_time) { |
536 | per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu]; | 538 | first_time = 0; |
539 | for (cpu = 0; cpu < NR_CPUS; cpu++) | ||
540 | per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu]; | ||
541 | } | ||
537 | 542 | ||
538 | return __per_cpu_start + __per_cpu_offset[smp_processor_id()]; | 543 | return __per_cpu_start + __per_cpu_offset[smp_processor_id()]; |
539 | } | 544 | } |
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index 2d13889d0a99..8d506710fdbd 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
@@ -68,9 +68,10 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr) | |||
68 | #define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; } | 68 | #define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; } |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * This function checks for proper alignment of input addr and len parameters. | 71 | * Don't actually need to do any preparation, but need to make sure |
72 | * the address is in the right region. | ||
72 | */ | 73 | */ |
73 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | 74 | int prepare_hugepage_range(unsigned long addr, unsigned long len) |
74 | { | 75 | { |
75 | if (len & ~HPAGE_MASK) | 76 | if (len & ~HPAGE_MASK) |
76 | return -EINVAL; | 77 | return -EINVAL; |
@@ -112,8 +113,7 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, | |||
112 | unsigned long floor, unsigned long ceiling) | 113 | unsigned long floor, unsigned long ceiling) |
113 | { | 114 | { |
114 | /* | 115 | /* |
115 | * This is called only when is_hugepage_only_range(addr,), | 116 | * This is called to free hugetlb page tables. |
116 | * and it follows that is_hugepage_only_range(end,) also. | ||
117 | * | 117 | * |
118 | * The offset of these addresses from the base of the hugetlb | 118 | * The offset of these addresses from the base of the hugetlb |
119 | * region must be scaled down by HPAGE_SIZE/PAGE_SIZE so that | 119 | * region must be scaled down by HPAGE_SIZE/PAGE_SIZE so that |
@@ -125,9 +125,9 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, | |||
125 | 125 | ||
126 | addr = htlbpage_to_page(addr); | 126 | addr = htlbpage_to_page(addr); |
127 | end = htlbpage_to_page(end); | 127 | end = htlbpage_to_page(end); |
128 | if (is_hugepage_only_range(tlb->mm, floor, HPAGE_SIZE)) | 128 | if (REGION_NUMBER(floor) == RGN_HPAGE) |
129 | floor = htlbpage_to_page(floor); | 129 | floor = htlbpage_to_page(floor); |
130 | if (is_hugepage_only_range(tlb->mm, ceiling, HPAGE_SIZE)) | 130 | if (REGION_NUMBER(ceiling) == RGN_HPAGE) |
131 | ceiling = htlbpage_to_page(ceiling); | 131 | ceiling = htlbpage_to_page(ceiling); |
132 | 132 | ||
133 | free_pgd_range(tlb, addr, end, floor, ceiling); | 133 | free_pgd_range(tlb, addr, end, floor, ceiling); |
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index b38b6d213c15..ff4f31fcd330 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -197,7 +197,7 @@ free_initmem (void) | |||
197 | eaddr = (unsigned long) ia64_imva(__init_end); | 197 | eaddr = (unsigned long) ia64_imva(__init_end); |
198 | while (addr < eaddr) { | 198 | while (addr < eaddr) { |
199 | ClearPageReserved(virt_to_page(addr)); | 199 | ClearPageReserved(virt_to_page(addr)); |
200 | set_page_count(virt_to_page(addr), 1); | 200 | init_page_count(virt_to_page(addr)); |
201 | free_page(addr); | 201 | free_page(addr); |
202 | ++totalram_pages; | 202 | ++totalram_pages; |
203 | addr += PAGE_SIZE; | 203 | addr += PAGE_SIZE; |
@@ -206,7 +206,7 @@ free_initmem (void) | |||
206 | (__init_end - __init_begin) >> 10); | 206 | (__init_end - __init_begin) >> 10); |
207 | } | 207 | } |
208 | 208 | ||
209 | void | 209 | void __init |
210 | free_initrd_mem (unsigned long start, unsigned long end) | 210 | free_initrd_mem (unsigned long start, unsigned long end) |
211 | { | 211 | { |
212 | struct page *page; | 212 | struct page *page; |
@@ -252,7 +252,7 @@ free_initrd_mem (unsigned long start, unsigned long end) | |||
252 | continue; | 252 | continue; |
253 | page = virt_to_page(start); | 253 | page = virt_to_page(start); |
254 | ClearPageReserved(page); | 254 | ClearPageReserved(page); |
255 | set_page_count(page, 1); | 255 | init_page_count(page); |
256 | free_page(start); | 256 | free_page(start); |
257 | ++totalram_pages; | 257 | ++totalram_pages; |
258 | } | 258 | } |
@@ -261,7 +261,7 @@ free_initrd_mem (unsigned long start, unsigned long end) | |||
261 | /* | 261 | /* |
262 | * This installs a clean page in the kernel's page table. | 262 | * This installs a clean page in the kernel's page table. |
263 | */ | 263 | */ |
264 | struct page * | 264 | static struct page * __init |
265 | put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot) | 265 | put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot) |
266 | { | 266 | { |
267 | pgd_t *pgd; | 267 | pgd_t *pgd; |
@@ -294,7 +294,7 @@ put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot) | |||
294 | return page; | 294 | return page; |
295 | } | 295 | } |
296 | 296 | ||
297 | static void | 297 | static void __init |
298 | setup_gate (void) | 298 | setup_gate (void) |
299 | { | 299 | { |
300 | struct page *page; | 300 | struct page *page; |
@@ -411,7 +411,7 @@ ia64_mmu_init (void *my_cpu_data) | |||
411 | 411 | ||
412 | #ifdef CONFIG_VIRTUAL_MEM_MAP | 412 | #ifdef CONFIG_VIRTUAL_MEM_MAP |
413 | 413 | ||
414 | int | 414 | int __init |
415 | create_mem_map_page_table (u64 start, u64 end, void *arg) | 415 | create_mem_map_page_table (u64 start, u64 end, void *arg) |
416 | { | 416 | { |
417 | unsigned long address, start_page, end_page; | 417 | unsigned long address, start_page, end_page; |
@@ -519,7 +519,7 @@ ia64_pfn_valid (unsigned long pfn) | |||
519 | } | 519 | } |
520 | EXPORT_SYMBOL(ia64_pfn_valid); | 520 | EXPORT_SYMBOL(ia64_pfn_valid); |
521 | 521 | ||
522 | int | 522 | int __init |
523 | find_largest_hole (u64 start, u64 end, void *arg) | 523 | find_largest_hole (u64 start, u64 end, void *arg) |
524 | { | 524 | { |
525 | u64 *max_gap = arg; | 525 | u64 *max_gap = arg; |
@@ -535,7 +535,7 @@ find_largest_hole (u64 start, u64 end, void *arg) | |||
535 | } | 535 | } |
536 | #endif /* CONFIG_VIRTUAL_MEM_MAP */ | 536 | #endif /* CONFIG_VIRTUAL_MEM_MAP */ |
537 | 537 | ||
538 | static int | 538 | static int __init |
539 | count_reserved_pages (u64 start, u64 end, void *arg) | 539 | count_reserved_pages (u64 start, u64 end, void *arg) |
540 | { | 540 | { |
541 | unsigned long num_reserved = 0; | 541 | unsigned long num_reserved = 0; |
@@ -556,7 +556,7 @@ count_reserved_pages (u64 start, u64 end, void *arg) | |||
556 | * purposes. | 556 | * purposes. |
557 | */ | 557 | */ |
558 | 558 | ||
559 | static int nolwsys; | 559 | static int nolwsys __initdata; |
560 | 560 | ||
561 | static int __init | 561 | static int __init |
562 | nolwsys_setup (char *s) | 562 | nolwsys_setup (char *s) |
@@ -567,7 +567,7 @@ nolwsys_setup (char *s) | |||
567 | 567 | ||
568 | __setup("nolwsys", nolwsys_setup); | 568 | __setup("nolwsys", nolwsys_setup); |
569 | 569 | ||
570 | void | 570 | void __init |
571 | mem_init (void) | 571 | mem_init (void) |
572 | { | 572 | { |
573 | long reserved_pages, codesize, datasize, initsize; | 573 | long reserved_pages, codesize, datasize, initsize; |
@@ -640,7 +640,7 @@ mem_init (void) | |||
640 | void online_page(struct page *page) | 640 | void online_page(struct page *page) |
641 | { | 641 | { |
642 | ClearPageReserved(page); | 642 | ClearPageReserved(page); |
643 | set_page_count(page, 1); | 643 | init_page_count(page); |
644 | __free_page(page); | 644 | __free_page(page); |
645 | totalram_pages++; | 645 | totalram_pages++; |
646 | num_physpages++; | 646 | num_physpages++; |
diff --git a/arch/ia64/sn/kernel/Makefile b/arch/ia64/sn/kernel/Makefile index 3e9b4eea7418..ab9c48c88012 100644 --- a/arch/ia64/sn/kernel/Makefile +++ b/arch/ia64/sn/kernel/Makefile | |||
@@ -10,7 +10,8 @@ | |||
10 | CPPFLAGS += -I$(srctree)/arch/ia64/sn/include | 10 | CPPFLAGS += -I$(srctree)/arch/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_init.o iomv.o klconflib.o sn2/ | 13 | huberror.o io_init.o iomv.o klconflib.o pio_phys.o \ |
14 | sn2/ | ||
14 | obj-$(CONFIG_IA64_GENERIC) += machvec.o | 15 | obj-$(CONFIG_IA64_GENERIC) += machvec.o |
15 | obj-$(CONFIG_SGI_TIOCX) += tiocx.o | 16 | obj-$(CONFIG_SGI_TIOCX) += tiocx.o |
16 | obj-$(CONFIG_IA64_SGI_SN_XP) += xp.o | 17 | obj-$(CONFIG_IA64_SGI_SN_XP) += xp.o |
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index 1f11db470d90..e952ef4f6d91 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c | |||
@@ -36,7 +36,7 @@ static struct bteinfo_s *bte_if_on_node(nasid_t nasid, int interface) | |||
36 | nodepda_t *tmp_nodepda; | 36 | nodepda_t *tmp_nodepda; |
37 | 37 | ||
38 | if (nasid_to_cnodeid(nasid) == -1) | 38 | if (nasid_to_cnodeid(nasid) == -1) |
39 | return (struct bteinfo_s *)NULL;; | 39 | return (struct bteinfo_s *)NULL; |
40 | 40 | ||
41 | tmp_nodepda = NODEPDA(nasid_to_cnodeid(nasid)); | 41 | tmp_nodepda = NODEPDA(nasid_to_cnodeid(nasid)); |
42 | return &tmp_nodepda->bte_if[interface]; | 42 | return &tmp_nodepda->bte_if[interface]; |
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index dfb3f2902379..5101ac462643 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <asm/sn/sn_feature_sets.h> | 13 | #include <asm/sn/sn_feature_sets.h> |
14 | #include <asm/sn/geo.h> | 14 | #include <asm/sn/geo.h> |
15 | #include <asm/sn/io.h> | 15 | #include <asm/sn/io.h> |
16 | #include <asm/sn/l1.h> | ||
17 | #include <asm/sn/module.h> | ||
16 | #include <asm/sn/pcibr_provider.h> | 18 | #include <asm/sn/pcibr_provider.h> |
17 | #include <asm/sn/pcibus_provider_defs.h> | 19 | #include <asm/sn/pcibus_provider_defs.h> |
18 | #include <asm/sn/pcidev.h> | 20 | #include <asm/sn/pcidev.h> |
@@ -710,9 +712,36 @@ cnodeid_get_geoid(cnodeid_t cnode) | |||
710 | return hubdev->hdi_geoid; | 712 | return hubdev->hdi_geoid; |
711 | } | 713 | } |
712 | 714 | ||
715 | void sn_generate_path(struct pci_bus *pci_bus, char *address) | ||
716 | { | ||
717 | nasid_t nasid; | ||
718 | cnodeid_t cnode; | ||
719 | geoid_t geoid; | ||
720 | moduleid_t moduleid; | ||
721 | u16 bricktype; | ||
722 | |||
723 | nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base); | ||
724 | cnode = nasid_to_cnodeid(nasid); | ||
725 | geoid = cnodeid_get_geoid(cnode); | ||
726 | moduleid = geo_module(geoid); | ||
727 | |||
728 | sprintf(address, "module_%c%c%c%c%.2d", | ||
729 | '0'+RACK_GET_CLASS(MODULE_GET_RACK(moduleid)), | ||
730 | '0'+RACK_GET_GROUP(MODULE_GET_RACK(moduleid)), | ||
731 | '0'+RACK_GET_NUM(MODULE_GET_RACK(moduleid)), | ||
732 | MODULE_GET_BTCHAR(moduleid), MODULE_GET_BPOS(moduleid)); | ||
733 | |||
734 | /* Tollhouse requires slot id to be displayed */ | ||
735 | bricktype = MODULE_GET_BTYPE(moduleid); | ||
736 | if ((bricktype == L1_BRICKTYPE_191010) || | ||
737 | (bricktype == L1_BRICKTYPE_1932)) | ||
738 | sprintf(address, "%s^%d", address, geo_slot(geoid)); | ||
739 | } | ||
740 | |||
713 | subsys_initcall(sn_pci_init); | 741 | subsys_initcall(sn_pci_init); |
714 | EXPORT_SYMBOL(sn_pci_fixup_slot); | 742 | EXPORT_SYMBOL(sn_pci_fixup_slot); |
715 | EXPORT_SYMBOL(sn_pci_unfixup_slot); | 743 | EXPORT_SYMBOL(sn_pci_unfixup_slot); |
716 | EXPORT_SYMBOL(sn_pci_controller_fixup); | 744 | EXPORT_SYMBOL(sn_pci_controller_fixup); |
717 | EXPORT_SYMBOL(sn_bus_store_sysdata); | 745 | EXPORT_SYMBOL(sn_bus_store_sysdata); |
718 | EXPORT_SYMBOL(sn_bus_free_sysdata); | 746 | EXPORT_SYMBOL(sn_bus_free_sysdata); |
747 | EXPORT_SYMBOL(sn_generate_path); | ||
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index c373113d073a..c265e02f5036 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c | |||
@@ -350,9 +350,6 @@ static void force_interrupt(int irq) | |||
350 | static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info) | 350 | static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info) |
351 | { | 351 | { |
352 | u64 regval; | 352 | u64 regval; |
353 | int irr_reg_num; | ||
354 | int irr_bit; | ||
355 | u64 irr_reg; | ||
356 | struct pcidev_info *pcidev_info; | 353 | struct pcidev_info *pcidev_info; |
357 | struct pcibus_info *pcibus_info; | 354 | struct pcibus_info *pcibus_info; |
358 | 355 | ||
@@ -373,23 +370,7 @@ static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info) | |||
373 | pdi_pcibus_info; | 370 | pdi_pcibus_info; |
374 | regval = pcireg_intr_status_get(pcibus_info); | 371 | regval = pcireg_intr_status_get(pcibus_info); |
375 | 372 | ||
376 | irr_reg_num = irq_to_vector(irq) / 64; | 373 | if (!ia64_get_irr(irq_to_vector(irq))) { |
377 | irr_bit = irq_to_vector(irq) % 64; | ||
378 | switch (irr_reg_num) { | ||
379 | case 0: | ||
380 | irr_reg = ia64_getreg(_IA64_REG_CR_IRR0); | ||
381 | break; | ||
382 | case 1: | ||
383 | irr_reg = ia64_getreg(_IA64_REG_CR_IRR1); | ||
384 | break; | ||
385 | case 2: | ||
386 | irr_reg = ia64_getreg(_IA64_REG_CR_IRR2); | ||
387 | break; | ||
388 | case 3: | ||
389 | irr_reg = ia64_getreg(_IA64_REG_CR_IRR3); | ||
390 | break; | ||
391 | } | ||
392 | if (!test_bit(irr_bit, &irr_reg)) { | ||
393 | if (!test_bit(irq, pda->sn_in_service_ivecs)) { | 374 | if (!test_bit(irq, pda->sn_in_service_ivecs)) { |
394 | regval &= 0xff; | 375 | regval &= 0xff; |
395 | if (sn_irq_info->irq_int_bit & regval & | 376 | if (sn_irq_info->irq_int_bit & regval & |
diff --git a/arch/ia64/sn/kernel/pio_phys.S b/arch/ia64/sn/kernel/pio_phys.S new file mode 100644 index 000000000000..3c7d48d6ecb8 --- /dev/null +++ b/arch/ia64/sn/kernel/pio_phys.S | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved. | ||
7 | * | ||
8 | * This file contains macros used to access MMR registers via | ||
9 | * uncached physical addresses. | ||
10 | * pio_phys_read_mmr - read an MMR | ||
11 | * pio_phys_write_mmr - write an MMR | ||
12 | * pio_atomic_phys_write_mmrs - atomically write 1 or 2 MMRs with psr.ic=0 | ||
13 | * Second MMR will be skipped if address is NULL | ||
14 | * | ||
15 | * Addresses passed to these routines should be uncached physical addresses | ||
16 | * ie., 0x80000.... | ||
17 | */ | ||
18 | |||
19 | |||
20 | |||
21 | #include <asm/asmmacro.h> | ||
22 | #include <asm/page.h> | ||
23 | |||
24 | GLOBAL_ENTRY(pio_phys_read_mmr) | ||
25 | .prologue | ||
26 | .regstk 1,0,0,0 | ||
27 | .body | ||
28 | mov r2=psr | ||
29 | rsm psr.i | psr.dt | ||
30 | ;; | ||
31 | srlz.d | ||
32 | ld8.acq r8=[r32] | ||
33 | ;; | ||
34 | mov psr.l=r2;; | ||
35 | srlz.d | ||
36 | br.ret.sptk.many rp | ||
37 | END(pio_phys_read_mmr) | ||
38 | |||
39 | GLOBAL_ENTRY(pio_phys_write_mmr) | ||
40 | .prologue | ||
41 | .regstk 2,0,0,0 | ||
42 | .body | ||
43 | mov r2=psr | ||
44 | rsm psr.i | psr.dt | ||
45 | ;; | ||
46 | srlz.d | ||
47 | st8.rel [r32]=r33 | ||
48 | ;; | ||
49 | mov psr.l=r2;; | ||
50 | srlz.d | ||
51 | br.ret.sptk.many rp | ||
52 | END(pio_phys_write_mmr) | ||
53 | |||
54 | GLOBAL_ENTRY(pio_atomic_phys_write_mmrs) | ||
55 | .prologue | ||
56 | .regstk 4,0,0,0 | ||
57 | .body | ||
58 | mov r2=psr | ||
59 | cmp.ne p9,p0=r34,r0; | ||
60 | rsm psr.i | psr.dt | psr.ic | ||
61 | ;; | ||
62 | srlz.d | ||
63 | st8.rel [r32]=r33 | ||
64 | (p9) st8.rel [r34]=r35 | ||
65 | ;; | ||
66 | mov psr.l=r2;; | ||
67 | srlz.d | ||
68 | br.ret.sptk.many rp | ||
69 | END(pio_atomic_phys_write_mmrs) | ||
70 | |||
71 | |||
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index 5b84836c2171..8b6d5c844708 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1999,2001-2005 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | 9 | #include <linux/config.h> |
@@ -498,6 +498,7 @@ void __init sn_setup(char **cmdline_p) | |||
498 | * for sn. | 498 | * for sn. |
499 | */ | 499 | */ |
500 | pm_power_off = ia64_sn_power_down; | 500 | pm_power_off = ia64_sn_power_down; |
501 | current->thread.flags |= IA64_THREAD_MIGRATION; | ||
501 | } | 502 | } |
502 | 503 | ||
503 | /** | 504 | /** |
@@ -660,7 +661,8 @@ void __init sn_cpu_init(void) | |||
660 | SH2_PIO_WRITE_STATUS_1, SH2_PIO_WRITE_STATUS_3}; | 661 | SH2_PIO_WRITE_STATUS_1, SH2_PIO_WRITE_STATUS_3}; |
661 | u64 *pio; | 662 | u64 *pio; |
662 | pio = is_shub1() ? pio1 : pio2; | 663 | pio = is_shub1() ? pio1 : pio2; |
663 | pda->pio_write_status_addr = (volatile unsigned long *) LOCAL_MMR_ADDR(pio[slice]); | 664 | pda->pio_write_status_addr = |
665 | (volatile unsigned long *)GLOBAL_MMR_ADDR(nasid, pio[slice]); | ||
664 | pda->pio_write_status_val = is_shub1() ? SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_MASK : 0; | 666 | pda->pio_write_status_val = is_shub1() ? SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_MASK : 0; |
665 | } | 667 | } |
666 | 668 | ||
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c index b2e1e746b47f..d9d306c79f2d 100644 --- a/arch/ia64/sn/kernel/sn2/sn2_smp.c +++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c | |||
@@ -93,6 +93,27 @@ static inline unsigned long wait_piowc(void) | |||
93 | return (ws & SH_PIO_WRITE_STATUS_WRITE_DEADLOCK_MASK) != 0; | 93 | return (ws & SH_PIO_WRITE_STATUS_WRITE_DEADLOCK_MASK) != 0; |
94 | } | 94 | } |
95 | 95 | ||
96 | /** | ||
97 | * sn_migrate - SN-specific task migration actions | ||
98 | * @task: Task being migrated to new CPU | ||
99 | * | ||
100 | * SN2 PIO writes from separate CPUs are not guaranteed to arrive in order. | ||
101 | * Context switching user threads which have memory-mapped MMIO may cause | ||
102 | * PIOs to issue from seperate CPUs, thus the PIO writes must be drained | ||
103 | * from the previous CPU's Shub before execution resumes on the new CPU. | ||
104 | */ | ||
105 | void sn_migrate(struct task_struct *task) | ||
106 | { | ||
107 | pda_t *last_pda = pdacpu(task_thread_info(task)->last_cpu); | ||
108 | volatile unsigned long *adr = last_pda->pio_write_status_addr; | ||
109 | unsigned long val = last_pda->pio_write_status_val; | ||
110 | |||
111 | /* Drain PIO writes from old CPU's Shub */ | ||
112 | while (unlikely((*adr & SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_MASK) | ||
113 | != val)) | ||
114 | cpu_relax(); | ||
115 | } | ||
116 | |||
96 | void sn_tlb_migrate_finish(struct mm_struct *mm) | 117 | void sn_tlb_migrate_finish(struct mm_struct *mm) |
97 | { | 118 | { |
98 | /* flush_tlb_mm is inefficient if more than 1 users of mm */ | 119 | /* flush_tlb_mm is inefficient if more than 1 users of mm */ |
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c index 99cb28e74295..feaf1a6e8101 100644 --- a/arch/ia64/sn/kernel/tiocx.c +++ b/arch/ia64/sn/kernel/tiocx.c | |||
@@ -369,9 +369,15 @@ static void tio_corelet_reset(nasid_t nasid, int corelet) | |||
369 | 369 | ||
370 | static int is_fpga_tio(int nasid, int *bt) | 370 | static int is_fpga_tio(int nasid, int *bt) |
371 | { | 371 | { |
372 | int ioboard_type; | 372 | u16 ioboard_type; |
373 | s64 rc; | ||
373 | 374 | ||
374 | ioboard_type = ia64_sn_sysctl_ioboard_get(nasid); | 375 | rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard_type); |
376 | if (rc) { | ||
377 | printk(KERN_WARNING "ia64_sn_sysctl_ioboard_get failed: %ld\n", | ||
378 | rc); | ||
379 | return 0; | ||
380 | } | ||
375 | 381 | ||
376 | switch (ioboard_type) { | 382 | switch (ioboard_type) { |
377 | case L1_BRICKTYPE_SA: | 383 | case L1_BRICKTYPE_SA: |
diff --git a/arch/ia64/sn/kernel/xpc_channel.c b/arch/ia64/sn/kernel/xpc_channel.c index cdf6856ce089..d0abddd9ffe6 100644 --- a/arch/ia64/sn/kernel/xpc_channel.c +++ b/arch/ia64/sn/kernel/xpc_channel.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/cache.h> | 22 | #include <linux/cache.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/mutex.h> | 24 | #include <linux/mutex.h> |
26 | #include <linux/completion.h> | 25 | #include <linux/completion.h> |
27 | #include <asm/sn/bte.h> | 26 | #include <asm/sn/bte.h> |
@@ -30,6 +29,31 @@ | |||
30 | 29 | ||
31 | 30 | ||
32 | /* | 31 | /* |
32 | * Guarantee that the kzalloc'd memory is cacheline aligned. | ||
33 | */ | ||
34 | static void * | ||
35 | xpc_kzalloc_cacheline_aligned(size_t size, gfp_t flags, void **base) | ||
36 | { | ||
37 | /* see if kzalloc will give us cachline aligned memory by default */ | ||
38 | *base = kzalloc(size, flags); | ||
39 | if (*base == NULL) { | ||
40 | return NULL; | ||
41 | } | ||
42 | if ((u64) *base == L1_CACHE_ALIGN((u64) *base)) { | ||
43 | return *base; | ||
44 | } | ||
45 | kfree(*base); | ||
46 | |||
47 | /* nope, we'll have to do it ourselves */ | ||
48 | *base = kzalloc(size + L1_CACHE_BYTES, flags); | ||
49 | if (*base == NULL) { | ||
50 | return NULL; | ||
51 | } | ||
52 | return (void *) L1_CACHE_ALIGN((u64) *base); | ||
53 | } | ||
54 | |||
55 | |||
56 | /* | ||
33 | * Set up the initial values for the XPartition Communication channels. | 57 | * Set up the initial values for the XPartition Communication channels. |
34 | */ | 58 | */ |
35 | static void | 59 | static void |
@@ -93,20 +117,19 @@ xpc_setup_infrastructure(struct xpc_partition *part) | |||
93 | * Allocate all of the channel structures as a contiguous chunk of | 117 | * Allocate all of the channel structures as a contiguous chunk of |
94 | * memory. | 118 | * memory. |
95 | */ | 119 | */ |
96 | part->channels = kmalloc(sizeof(struct xpc_channel) * XPC_NCHANNELS, | 120 | part->channels = kzalloc(sizeof(struct xpc_channel) * XPC_NCHANNELS, |
97 | GFP_KERNEL); | 121 | GFP_KERNEL); |
98 | if (part->channels == NULL) { | 122 | if (part->channels == NULL) { |
99 | dev_err(xpc_chan, "can't get memory for channels\n"); | 123 | dev_err(xpc_chan, "can't get memory for channels\n"); |
100 | return xpcNoMemory; | 124 | return xpcNoMemory; |
101 | } | 125 | } |
102 | memset(part->channels, 0, sizeof(struct xpc_channel) * XPC_NCHANNELS); | ||
103 | 126 | ||
104 | part->nchannels = XPC_NCHANNELS; | 127 | part->nchannels = XPC_NCHANNELS; |
105 | 128 | ||
106 | 129 | ||
107 | /* allocate all the required GET/PUT values */ | 130 | /* allocate all the required GET/PUT values */ |
108 | 131 | ||
109 | part->local_GPs = xpc_kmalloc_cacheline_aligned(XPC_GP_SIZE, | 132 | part->local_GPs = xpc_kzalloc_cacheline_aligned(XPC_GP_SIZE, |
110 | GFP_KERNEL, &part->local_GPs_base); | 133 | GFP_KERNEL, &part->local_GPs_base); |
111 | if (part->local_GPs == NULL) { | 134 | if (part->local_GPs == NULL) { |
112 | kfree(part->channels); | 135 | kfree(part->channels); |
@@ -115,55 +138,51 @@ xpc_setup_infrastructure(struct xpc_partition *part) | |||
115 | "values\n"); | 138 | "values\n"); |
116 | return xpcNoMemory; | 139 | return xpcNoMemory; |
117 | } | 140 | } |
118 | memset(part->local_GPs, 0, XPC_GP_SIZE); | ||
119 | 141 | ||
120 | part->remote_GPs = xpc_kmalloc_cacheline_aligned(XPC_GP_SIZE, | 142 | part->remote_GPs = xpc_kzalloc_cacheline_aligned(XPC_GP_SIZE, |
121 | GFP_KERNEL, &part->remote_GPs_base); | 143 | GFP_KERNEL, &part->remote_GPs_base); |
122 | if (part->remote_GPs == NULL) { | 144 | if (part->remote_GPs == NULL) { |
123 | kfree(part->channels); | ||
124 | part->channels = NULL; | ||
125 | kfree(part->local_GPs_base); | ||
126 | part->local_GPs = NULL; | ||
127 | dev_err(xpc_chan, "can't get memory for remote get/put " | 145 | dev_err(xpc_chan, "can't get memory for remote get/put " |
128 | "values\n"); | 146 | "values\n"); |
147 | kfree(part->local_GPs_base); | ||
148 | part->local_GPs = NULL; | ||
149 | kfree(part->channels); | ||
150 | part->channels = NULL; | ||
129 | return xpcNoMemory; | 151 | return xpcNoMemory; |
130 | } | 152 | } |
131 | memset(part->remote_GPs, 0, XPC_GP_SIZE); | ||
132 | 153 | ||
133 | 154 | ||
134 | /* allocate all the required open and close args */ | 155 | /* allocate all the required open and close args */ |
135 | 156 | ||
136 | part->local_openclose_args = xpc_kmalloc_cacheline_aligned( | 157 | part->local_openclose_args = xpc_kzalloc_cacheline_aligned( |
137 | XPC_OPENCLOSE_ARGS_SIZE, GFP_KERNEL, | 158 | XPC_OPENCLOSE_ARGS_SIZE, GFP_KERNEL, |
138 | &part->local_openclose_args_base); | 159 | &part->local_openclose_args_base); |
139 | if (part->local_openclose_args == NULL) { | 160 | if (part->local_openclose_args == NULL) { |
140 | kfree(part->channels); | 161 | dev_err(xpc_chan, "can't get memory for local connect args\n"); |
141 | part->channels = NULL; | ||
142 | kfree(part->local_GPs_base); | ||
143 | part->local_GPs = NULL; | ||
144 | kfree(part->remote_GPs_base); | 162 | kfree(part->remote_GPs_base); |
145 | part->remote_GPs = NULL; | 163 | part->remote_GPs = NULL; |
146 | dev_err(xpc_chan, "can't get memory for local connect args\n"); | 164 | kfree(part->local_GPs_base); |
165 | part->local_GPs = NULL; | ||
166 | kfree(part->channels); | ||
167 | part->channels = NULL; | ||
147 | return xpcNoMemory; | 168 | return xpcNoMemory; |
148 | } | 169 | } |
149 | memset(part->local_openclose_args, 0, XPC_OPENCLOSE_ARGS_SIZE); | ||
150 | 170 | ||
151 | part->remote_openclose_args = xpc_kmalloc_cacheline_aligned( | 171 | part->remote_openclose_args = xpc_kzalloc_cacheline_aligned( |
152 | XPC_OPENCLOSE_ARGS_SIZE, GFP_KERNEL, | 172 | XPC_OPENCLOSE_ARGS_SIZE, GFP_KERNEL, |
153 | &part->remote_openclose_args_base); | 173 | &part->remote_openclose_args_base); |
154 | if (part->remote_openclose_args == NULL) { | 174 | if (part->remote_openclose_args == NULL) { |
155 | kfree(part->channels); | 175 | dev_err(xpc_chan, "can't get memory for remote connect args\n"); |
156 | part->channels = NULL; | ||
157 | kfree(part->local_GPs_base); | ||
158 | part->local_GPs = NULL; | ||
159 | kfree(part->remote_GPs_base); | ||
160 | part->remote_GPs = NULL; | ||
161 | kfree(part->local_openclose_args_base); | 176 | kfree(part->local_openclose_args_base); |
162 | part->local_openclose_args = NULL; | 177 | part->local_openclose_args = NULL; |
163 | dev_err(xpc_chan, "can't get memory for remote connect args\n"); | 178 | kfree(part->remote_GPs_base); |
179 | part->remote_GPs = NULL; | ||
180 | kfree(part->local_GPs_base); | ||
181 | part->local_GPs = NULL; | ||
182 | kfree(part->channels); | ||
183 | part->channels = NULL; | ||
164 | return xpcNoMemory; | 184 | return xpcNoMemory; |
165 | } | 185 | } |
166 | memset(part->remote_openclose_args, 0, XPC_OPENCLOSE_ARGS_SIZE); | ||
167 | 186 | ||
168 | 187 | ||
169 | xpc_initialize_channels(part, partid); | 188 | xpc_initialize_channels(part, partid); |
@@ -186,18 +205,18 @@ xpc_setup_infrastructure(struct xpc_partition *part) | |||
186 | ret = request_irq(SGI_XPC_NOTIFY, xpc_notify_IRQ_handler, SA_SHIRQ, | 205 | ret = request_irq(SGI_XPC_NOTIFY, xpc_notify_IRQ_handler, SA_SHIRQ, |
187 | part->IPI_owner, (void *) (u64) partid); | 206 | part->IPI_owner, (void *) (u64) partid); |
188 | if (ret != 0) { | 207 | if (ret != 0) { |
189 | kfree(part->channels); | ||
190 | part->channels = NULL; | ||
191 | kfree(part->local_GPs_base); | ||
192 | part->local_GPs = NULL; | ||
193 | kfree(part->remote_GPs_base); | ||
194 | part->remote_GPs = NULL; | ||
195 | kfree(part->local_openclose_args_base); | ||
196 | part->local_openclose_args = NULL; | ||
197 | kfree(part->remote_openclose_args_base); | ||
198 | part->remote_openclose_args = NULL; | ||
199 | dev_err(xpc_chan, "can't register NOTIFY IRQ handler, " | 208 | dev_err(xpc_chan, "can't register NOTIFY IRQ handler, " |
200 | "errno=%d\n", -ret); | 209 | "errno=%d\n", -ret); |
210 | kfree(part->remote_openclose_args_base); | ||
211 | part->remote_openclose_args = NULL; | ||
212 | kfree(part->local_openclose_args_base); | ||
213 | part->local_openclose_args = NULL; | ||
214 | kfree(part->remote_GPs_base); | ||
215 | part->remote_GPs = NULL; | ||
216 | kfree(part->local_GPs_base); | ||
217 | part->local_GPs = NULL; | ||
218 | kfree(part->channels); | ||
219 | part->channels = NULL; | ||
201 | return xpcLackOfResources; | 220 | return xpcLackOfResources; |
202 | } | 221 | } |
203 | 222 | ||
@@ -446,22 +465,20 @@ xpc_allocate_local_msgqueue(struct xpc_channel *ch) | |||
446 | for (nentries = ch->local_nentries; nentries > 0; nentries--) { | 465 | for (nentries = ch->local_nentries; nentries > 0; nentries--) { |
447 | 466 | ||
448 | nbytes = nentries * ch->msg_size; | 467 | nbytes = nentries * ch->msg_size; |
449 | ch->local_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, | 468 | ch->local_msgqueue = xpc_kzalloc_cacheline_aligned(nbytes, |
450 | GFP_KERNEL, | 469 | GFP_KERNEL, |
451 | &ch->local_msgqueue_base); | 470 | &ch->local_msgqueue_base); |
452 | if (ch->local_msgqueue == NULL) { | 471 | if (ch->local_msgqueue == NULL) { |
453 | continue; | 472 | continue; |
454 | } | 473 | } |
455 | memset(ch->local_msgqueue, 0, nbytes); | ||
456 | 474 | ||
457 | nbytes = nentries * sizeof(struct xpc_notify); | 475 | nbytes = nentries * sizeof(struct xpc_notify); |
458 | ch->notify_queue = kmalloc(nbytes, GFP_KERNEL); | 476 | ch->notify_queue = kzalloc(nbytes, GFP_KERNEL); |
459 | if (ch->notify_queue == NULL) { | 477 | if (ch->notify_queue == NULL) { |
460 | kfree(ch->local_msgqueue_base); | 478 | kfree(ch->local_msgqueue_base); |
461 | ch->local_msgqueue = NULL; | 479 | ch->local_msgqueue = NULL; |
462 | continue; | 480 | continue; |
463 | } | 481 | } |
464 | memset(ch->notify_queue, 0, nbytes); | ||
465 | 482 | ||
466 | spin_lock_irqsave(&ch->lock, irq_flags); | 483 | spin_lock_irqsave(&ch->lock, irq_flags); |
467 | if (nentries < ch->local_nentries) { | 484 | if (nentries < ch->local_nentries) { |
@@ -501,13 +518,12 @@ xpc_allocate_remote_msgqueue(struct xpc_channel *ch) | |||
501 | for (nentries = ch->remote_nentries; nentries > 0; nentries--) { | 518 | for (nentries = ch->remote_nentries; nentries > 0; nentries--) { |
502 | 519 | ||
503 | nbytes = nentries * ch->msg_size; | 520 | nbytes = nentries * ch->msg_size; |
504 | ch->remote_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, | 521 | ch->remote_msgqueue = xpc_kzalloc_cacheline_aligned(nbytes, |
505 | GFP_KERNEL, | 522 | GFP_KERNEL, |
506 | &ch->remote_msgqueue_base); | 523 | &ch->remote_msgqueue_base); |
507 | if (ch->remote_msgqueue == NULL) { | 524 | if (ch->remote_msgqueue == NULL) { |
508 | continue; | 525 | continue; |
509 | } | 526 | } |
510 | memset(ch->remote_msgqueue, 0, nbytes); | ||
511 | 527 | ||
512 | spin_lock_irqsave(&ch->lock, irq_flags); | 528 | spin_lock_irqsave(&ch->lock, irq_flags); |
513 | if (nentries < ch->remote_nentries) { | 529 | if (nentries < ch->remote_nentries) { |
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index 8cbf16432570..99b123a6421a 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <linux/syscalls.h> | 52 | #include <linux/syscalls.h> |
53 | #include <linux/cache.h> | 53 | #include <linux/cache.h> |
54 | #include <linux/interrupt.h> | 54 | #include <linux/interrupt.h> |
55 | #include <linux/slab.h> | ||
56 | #include <linux/delay.h> | 55 | #include <linux/delay.h> |
57 | #include <linux/reboot.h> | 56 | #include <linux/reboot.h> |
58 | #include <linux/completion.h> | 57 | #include <linux/completion.h> |
diff --git a/arch/ia64/sn/kernel/xpc_partition.c b/arch/ia64/sn/kernel/xpc_partition.c index 88a730e6cfdb..94211429fd0c 100644 --- a/arch/ia64/sn/kernel/xpc_partition.c +++ b/arch/ia64/sn/kernel/xpc_partition.c | |||
@@ -81,6 +81,31 @@ char ____cacheline_aligned xpc_remote_copy_buffer[XPC_RP_HEADER_SIZE + | |||
81 | 81 | ||
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Guarantee that the kmalloc'd memory is cacheline aligned. | ||
85 | */ | ||
86 | static void * | ||
87 | xpc_kmalloc_cacheline_aligned(size_t size, gfp_t flags, void **base) | ||
88 | { | ||
89 | /* see if kmalloc will give us cachline aligned memory by default */ | ||
90 | *base = kmalloc(size, flags); | ||
91 | if (*base == NULL) { | ||
92 | return NULL; | ||
93 | } | ||
94 | if ((u64) *base == L1_CACHE_ALIGN((u64) *base)) { | ||
95 | return *base; | ||
96 | } | ||
97 | kfree(*base); | ||
98 | |||
99 | /* nope, we'll have to do it ourselves */ | ||
100 | *base = kmalloc(size + L1_CACHE_BYTES, flags); | ||
101 | if (*base == NULL) { | ||
102 | return NULL; | ||
103 | } | ||
104 | return (void *) L1_CACHE_ALIGN((u64) *base); | ||
105 | } | ||
106 | |||
107 | |||
108 | /* | ||
84 | * Given a nasid, get the physical address of the partition's reserved page | 109 | * Given a nasid, get the physical address of the partition's reserved page |
85 | * for that nasid. This function returns 0 on any error. | 110 | * for that nasid. This function returns 0 on any error. |
86 | */ | 111 | */ |
@@ -1038,13 +1063,12 @@ xpc_discovery(void) | |||
1038 | remote_vars = (struct xpc_vars *) remote_rp; | 1063 | remote_vars = (struct xpc_vars *) remote_rp; |
1039 | 1064 | ||
1040 | 1065 | ||
1041 | discovered_nasids = kmalloc(sizeof(u64) * xp_nasid_mask_words, | 1066 | discovered_nasids = kzalloc(sizeof(u64) * xp_nasid_mask_words, |
1042 | GFP_KERNEL); | 1067 | GFP_KERNEL); |
1043 | if (discovered_nasids == NULL) { | 1068 | if (discovered_nasids == NULL) { |
1044 | kfree(remote_rp_base); | 1069 | kfree(remote_rp_base); |
1045 | return; | 1070 | return; |
1046 | } | 1071 | } |
1047 | memset(discovered_nasids, 0, sizeof(u64) * xp_nasid_mask_words); | ||
1048 | 1072 | ||
1049 | rp = (struct xpc_rsvd_page *) xpc_rsvd_page; | 1073 | rp = (struct xpc_rsvd_page *) xpc_rsvd_page; |
1050 | 1074 | ||
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c index 98f716bd92f0..ab1211ef0176 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c | |||
@@ -74,6 +74,22 @@ static int sal_pcibr_error_interrupt(struct pcibus_info *soft) | |||
74 | return (int)ret_stuff.v0; | 74 | return (int)ret_stuff.v0; |
75 | } | 75 | } |
76 | 76 | ||
77 | u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus) | ||
78 | { | ||
79 | s64 rc; | ||
80 | u16 ioboard; | ||
81 | nasid_t nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base); | ||
82 | |||
83 | rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard); | ||
84 | if (rc) { | ||
85 | printk(KERN_WARNING "ia64_sn_sysctl_ioboard_get failed: %ld\n", | ||
86 | rc); | ||
87 | return 0; | ||
88 | } | ||
89 | |||
90 | return ioboard; | ||
91 | } | ||
92 | |||
77 | /* | 93 | /* |
78 | * PCI Bridge Error interrupt handler. Gets invoked whenever a PCI | 94 | * PCI Bridge Error interrupt handler. Gets invoked whenever a PCI |
79 | * bridge sends an error interrupt. | 95 | * bridge sends an error interrupt. |
@@ -255,3 +271,4 @@ pcibr_init_provider(void) | |||
255 | 271 | ||
256 | EXPORT_SYMBOL_GPL(sal_pcibr_slot_enable); | 272 | EXPORT_SYMBOL_GPL(sal_pcibr_slot_enable); |
257 | EXPORT_SYMBOL_GPL(sal_pcibr_slot_disable); | 273 | EXPORT_SYMBOL_GPL(sal_pcibr_slot_disable); |
274 | EXPORT_SYMBOL_GPL(sn_ioboard_to_pci_bus); | ||
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c index 7571a4025529..be0176912968 100644 --- a/arch/ia64/sn/pci/tioca_provider.c +++ b/arch/ia64/sn/pci/tioca_provider.c | |||
@@ -377,7 +377,7 @@ tioca_dma_mapped(struct pci_dev *pdev, u64 paddr, size_t req_size) | |||
377 | struct tioca_dmamap *ca_dmamap; | 377 | struct tioca_dmamap *ca_dmamap; |
378 | void *map; | 378 | void *map; |
379 | unsigned long flags; | 379 | unsigned long flags; |
380 | struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(pdev);; | 380 | struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(pdev); |
381 | 381 | ||
382 | tioca_common = (struct tioca_common *)pcidev_info->pdi_pcibus_info; | 382 | tioca_common = (struct tioca_common *)pcidev_info->pdi_pcibus_info; |
383 | tioca_kern = (struct tioca_kernel *)tioca_common->ca_kernel_private; | 383 | tioca_kern = (struct tioca_kernel *)tioca_common->ca_kernel_private; |
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c index e52831ed93eb..fa073cc4b565 100644 --- a/arch/ia64/sn/pci/tioce_provider.c +++ b/arch/ia64/sn/pci/tioce_provider.c | |||
@@ -15,6 +15,124 @@ | |||
15 | #include <asm/sn/pcidev.h> | 15 | #include <asm/sn/pcidev.h> |
16 | #include <asm/sn/pcibus_provider_defs.h> | 16 | #include <asm/sn/pcibus_provider_defs.h> |
17 | #include <asm/sn/tioce_provider.h> | 17 | #include <asm/sn/tioce_provider.h> |
18 | #include <asm/sn/sn2/sn_hwperf.h> | ||
19 | |||
20 | /* | ||
21 | * 1/26/2006 | ||
22 | * | ||
23 | * WAR for SGI PV 944642. For revA TIOCE, need to use the following recipe | ||
24 | * (taken from the above PV) before and after accessing tioce internal MMR's | ||
25 | * to avoid tioce lockups. | ||
26 | * | ||
27 | * The recipe as taken from the PV: | ||
28 | * | ||
29 | * if(mmr address < 0x45000) { | ||
30 | * if(mmr address == 0 or 0x80) | ||
31 | * mmr wrt or read address 0xc0 | ||
32 | * else if(mmr address == 0x148 or 0x200) | ||
33 | * mmr wrt or read address 0x28 | ||
34 | * else | ||
35 | * mmr wrt or read address 0x158 | ||
36 | * | ||
37 | * do desired mmr access (rd or wrt) | ||
38 | * | ||
39 | * if(mmr address == 0x100) | ||
40 | * mmr wrt or read address 0x38 | ||
41 | * mmr wrt or read address 0xb050 | ||
42 | * } else | ||
43 | * do desired mmr access | ||
44 | * | ||
45 | * According to hw, we can use reads instead of writes to the above addres | ||
46 | * | ||
47 | * Note this WAR can only to be used for accessing internal MMR's in the | ||
48 | * TIOCE Coretalk Address Range 0x0 - 0x07ff_ffff. This includes the | ||
49 | * "Local CE Registers and Memories" and "PCI Compatible Config Space" address | ||
50 | * spaces from table 2-1 of the "CE Programmer's Reference Overview" document. | ||
51 | * | ||
52 | * All registers defined in struct tioce will meet that criteria. | ||
53 | */ | ||
54 | |||
55 | static void inline | ||
56 | tioce_mmr_war_pre(struct tioce_kernel *kern, void *mmr_addr) | ||
57 | { | ||
58 | u64 mmr_base; | ||
59 | u64 mmr_offset; | ||
60 | |||
61 | if (kern->ce_common->ce_rev != TIOCE_REV_A) | ||
62 | return; | ||
63 | |||
64 | mmr_base = kern->ce_common->ce_pcibus.bs_base; | ||
65 | mmr_offset = (u64)mmr_addr - mmr_base; | ||
66 | |||
67 | if (mmr_offset < 0x45000) { | ||
68 | u64 mmr_war_offset; | ||
69 | |||
70 | if (mmr_offset == 0 || mmr_offset == 0x80) | ||
71 | mmr_war_offset = 0xc0; | ||
72 | else if (mmr_offset == 0x148 || mmr_offset == 0x200) | ||
73 | mmr_war_offset = 0x28; | ||
74 | else | ||
75 | mmr_war_offset = 0x158; | ||
76 | |||
77 | readq_relaxed((void *)(mmr_base + mmr_war_offset)); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | static void inline | ||
82 | tioce_mmr_war_post(struct tioce_kernel *kern, void *mmr_addr) | ||
83 | { | ||
84 | u64 mmr_base; | ||
85 | u64 mmr_offset; | ||
86 | |||
87 | if (kern->ce_common->ce_rev != TIOCE_REV_A) | ||
88 | return; | ||
89 | |||
90 | mmr_base = kern->ce_common->ce_pcibus.bs_base; | ||
91 | mmr_offset = (u64)mmr_addr - mmr_base; | ||
92 | |||
93 | if (mmr_offset < 0x45000) { | ||
94 | if (mmr_offset == 0x100) | ||
95 | readq_relaxed((void *)(mmr_base + 0x38)); | ||
96 | readq_relaxed((void *)(mmr_base + 0xb050)); | ||
97 | } | ||
98 | } | ||
99 | |||
100 | /* load mmr contents into a variable */ | ||
101 | #define tioce_mmr_load(kern, mmrp, varp) do {\ | ||
102 | tioce_mmr_war_pre(kern, mmrp); \ | ||
103 | *(varp) = readq_relaxed(mmrp); \ | ||
104 | tioce_mmr_war_post(kern, mmrp); \ | ||
105 | } while (0) | ||
106 | |||
107 | /* store variable contents into mmr */ | ||
108 | #define tioce_mmr_store(kern, mmrp, varp) do {\ | ||
109 | tioce_mmr_war_pre(kern, mmrp); \ | ||
110 | writeq(*varp, mmrp); \ | ||
111 | tioce_mmr_war_post(kern, mmrp); \ | ||
112 | } while (0) | ||
113 | |||
114 | /* store immediate value into mmr */ | ||
115 | #define tioce_mmr_storei(kern, mmrp, val) do {\ | ||
116 | tioce_mmr_war_pre(kern, mmrp); \ | ||
117 | writeq(val, mmrp); \ | ||
118 | tioce_mmr_war_post(kern, mmrp); \ | ||
119 | } while (0) | ||
120 | |||
121 | /* set bits (immediate value) into mmr */ | ||
122 | #define tioce_mmr_seti(kern, mmrp, bits) do {\ | ||
123 | u64 tmp; \ | ||
124 | tioce_mmr_load(kern, mmrp, &tmp); \ | ||
125 | tmp |= (bits); \ | ||
126 | tioce_mmr_store(kern, mmrp, &tmp); \ | ||
127 | } while (0) | ||
128 | |||
129 | /* clear bits (immediate value) into mmr */ | ||
130 | #define tioce_mmr_clri(kern, mmrp, bits) do { \ | ||
131 | u64 tmp; \ | ||
132 | tioce_mmr_load(kern, mmrp, &tmp); \ | ||
133 | tmp &= ~(bits); \ | ||
134 | tioce_mmr_store(kern, mmrp, &tmp); \ | ||
135 | } while (0) | ||
18 | 136 | ||
19 | /** | 137 | /** |
20 | * Bus address ranges for the 5 flavors of TIOCE DMA | 138 | * Bus address ranges for the 5 flavors of TIOCE DMA |
@@ -62,9 +180,9 @@ | |||
62 | #define TIOCE_ATE_M40 2 | 180 | #define TIOCE_ATE_M40 2 |
63 | #define TIOCE_ATE_M40S 3 | 181 | #define TIOCE_ATE_M40S 3 |
64 | 182 | ||
65 | #define KB(x) ((x) << 10) | 183 | #define KB(x) ((u64)(x) << 10) |
66 | #define MB(x) ((x) << 20) | 184 | #define MB(x) ((u64)(x) << 20) |
67 | #define GB(x) ((x) << 30) | 185 | #define GB(x) ((u64)(x) << 30) |
68 | 186 | ||
69 | /** | 187 | /** |
70 | * tioce_dma_d64 - create a DMA mapping using 64-bit direct mode | 188 | * tioce_dma_d64 - create a DMA mapping using 64-bit direct mode |
@@ -151,7 +269,7 @@ tioce_alloc_map(struct tioce_kernel *ce_kern, int type, int port, | |||
151 | int last; | 269 | int last; |
152 | int entries; | 270 | int entries; |
153 | int nates; | 271 | int nates; |
154 | int pagesize; | 272 | u64 pagesize; |
155 | u64 *ate_shadow; | 273 | u64 *ate_shadow; |
156 | u64 *ate_reg; | 274 | u64 *ate_reg; |
157 | u64 addr; | 275 | u64 addr; |
@@ -228,7 +346,7 @@ tioce_alloc_map(struct tioce_kernel *ce_kern, int type, int port, | |||
228 | 346 | ||
229 | ate = ATE_MAKE(addr, pagesize); | 347 | ate = ATE_MAKE(addr, pagesize); |
230 | ate_shadow[i + j] = ate; | 348 | ate_shadow[i + j] = ate; |
231 | writeq(ate, &ate_reg[i + j]); | 349 | tioce_mmr_storei(ce_kern, &ate_reg[i + j], ate); |
232 | addr += pagesize; | 350 | addr += pagesize; |
233 | } | 351 | } |
234 | 352 | ||
@@ -272,7 +390,8 @@ tioce_dma_d32(struct pci_dev *pdev, u64 ct_addr) | |||
272 | u64 tmp; | 390 | u64 tmp; |
273 | 391 | ||
274 | ce_kern->ce_port[port].dirmap_shadow = ct_upper; | 392 | ce_kern->ce_port[port].dirmap_shadow = ct_upper; |
275 | writeq(ct_upper, &ce_mmr->ce_ure_dir_map[port]); | 393 | tioce_mmr_storei(ce_kern, &ce_mmr->ce_ure_dir_map[port], |
394 | ct_upper); | ||
276 | tmp = ce_mmr->ce_ure_dir_map[port]; | 395 | tmp = ce_mmr->ce_ure_dir_map[port]; |
277 | dma_ok = 1; | 396 | dma_ok = 1; |
278 | } else | 397 | } else |
@@ -344,7 +463,8 @@ tioce_dma_unmap(struct pci_dev *pdev, dma_addr_t bus_addr, int dir) | |||
344 | if (TIOCE_D32_ADDR(bus_addr)) { | 463 | if (TIOCE_D32_ADDR(bus_addr)) { |
345 | if (--ce_kern->ce_port[port].dirmap_refcnt == 0) { | 464 | if (--ce_kern->ce_port[port].dirmap_refcnt == 0) { |
346 | ce_kern->ce_port[port].dirmap_shadow = 0; | 465 | ce_kern->ce_port[port].dirmap_shadow = 0; |
347 | writeq(0, &ce_mmr->ce_ure_dir_map[port]); | 466 | tioce_mmr_storei(ce_kern, &ce_mmr->ce_ure_dir_map[port], |
467 | 0); | ||
348 | } | 468 | } |
349 | } else { | 469 | } else { |
350 | struct tioce_dmamap *map; | 470 | struct tioce_dmamap *map; |
@@ -365,7 +485,7 @@ tioce_dma_unmap(struct pci_dev *pdev, dma_addr_t bus_addr, int dir) | |||
365 | } else if (--map->refcnt == 0) { | 485 | } else if (--map->refcnt == 0) { |
366 | for (i = 0; i < map->ate_count; i++) { | 486 | for (i = 0; i < map->ate_count; i++) { |
367 | map->ate_shadow[i] = 0; | 487 | map->ate_shadow[i] = 0; |
368 | map->ate_hw[i] = 0; | 488 | tioce_mmr_storei(ce_kern, &map->ate_hw[i], 0); |
369 | } | 489 | } |
370 | 490 | ||
371 | list_del(&map->ce_dmamap_list); | 491 | list_del(&map->ce_dmamap_list); |
@@ -486,7 +606,7 @@ tioce_do_dma_map(struct pci_dev *pdev, u64 paddr, size_t byte_count, | |||
486 | spin_unlock_irqrestore(&ce_kern->ce_lock, flags); | 606 | spin_unlock_irqrestore(&ce_kern->ce_lock, flags); |
487 | 607 | ||
488 | dma_map_done: | 608 | dma_map_done: |
489 | if (mapaddr & barrier) | 609 | if (mapaddr && barrier) |
490 | mapaddr = tioce_dma_barrier(mapaddr, 1); | 610 | mapaddr = tioce_dma_barrier(mapaddr, 1); |
491 | 611 | ||
492 | return mapaddr; | 612 | return mapaddr; |
@@ -541,17 +661,61 @@ tioce_error_intr_handler(int irq, void *arg, struct pt_regs *pt) | |||
541 | soft->ce_pcibus.bs_persist_segment, | 661 | soft->ce_pcibus.bs_persist_segment, |
542 | soft->ce_pcibus.bs_persist_busnum, 0, 0, 0, 0, 0); | 662 | soft->ce_pcibus.bs_persist_busnum, 0, 0, 0, 0, 0); |
543 | 663 | ||
664 | if (ret_stuff.v0) | ||
665 | panic("tioce_error_intr_handler: Fatal TIOCE error"); | ||
666 | |||
544 | return IRQ_HANDLED; | 667 | return IRQ_HANDLED; |
545 | } | 668 | } |
546 | 669 | ||
547 | /** | 670 | /** |
671 | * tioce_reserve_m32 - reserve M32 ate's for the indicated address range | ||
672 | * @tioce_kernel: TIOCE context to reserve ate's for | ||
673 | * @base: starting bus address to reserve | ||
674 | * @limit: last bus address to reserve | ||
675 | * | ||
676 | * If base/limit falls within the range of bus space mapped through the | ||
677 | * M32 space, reserve the resources corresponding to the range. | ||
678 | */ | ||
679 | static void | ||
680 | tioce_reserve_m32(struct tioce_kernel *ce_kern, u64 base, u64 limit) | ||
681 | { | ||
682 | int ate_index, last_ate, ps; | ||
683 | struct tioce *ce_mmr; | ||
684 | |||
685 | if (!TIOCE_M32_ADDR(base)) | ||
686 | return; | ||
687 | |||
688 | ce_mmr = (struct tioce *)ce_kern->ce_common->ce_pcibus.bs_base; | ||
689 | ps = ce_kern->ce_ate3240_pagesize; | ||
690 | ate_index = ATE_PAGE(base, ps); | ||
691 | last_ate = ate_index + ATE_NPAGES(base, limit-base+1, ps) - 1; | ||
692 | |||
693 | if (ate_index < 64) | ||
694 | ate_index = 64; | ||
695 | |||
696 | while (ate_index <= last_ate) { | ||
697 | u64 ate; | ||
698 | |||
699 | ate = ATE_MAKE(0xdeadbeef, ps); | ||
700 | ce_kern->ce_ate3240_shadow[ate_index] = ate; | ||
701 | tioce_mmr_storei(ce_kern, &ce_mmr->ce_ure_ate3240[ate_index], | ||
702 | ate); | ||
703 | ate_index++; | ||
704 | } | ||
705 | } | ||
706 | |||
707 | /** | ||
548 | * tioce_kern_init - init kernel structures related to a given TIOCE | 708 | * tioce_kern_init - init kernel structures related to a given TIOCE |
549 | * @tioce_common: ptr to a cached tioce_common struct that originated in prom | 709 | * @tioce_common: ptr to a cached tioce_common struct that originated in prom |
550 | */ static struct tioce_kernel * | 710 | */ |
711 | static struct tioce_kernel * | ||
551 | tioce_kern_init(struct tioce_common *tioce_common) | 712 | tioce_kern_init(struct tioce_common *tioce_common) |
552 | { | 713 | { |
553 | int i; | 714 | int i; |
715 | int ps; | ||
716 | int dev; | ||
554 | u32 tmp; | 717 | u32 tmp; |
718 | unsigned int seg, bus; | ||
555 | struct tioce *tioce_mmr; | 719 | struct tioce *tioce_mmr; |
556 | struct tioce_kernel *tioce_kern; | 720 | struct tioce_kernel *tioce_kern; |
557 | 721 | ||
@@ -572,9 +736,10 @@ tioce_kern_init(struct tioce_common *tioce_common) | |||
572 | * here to use pci_read_config_xxx() so use the raw_pci_ops vector. | 736 | * here to use pci_read_config_xxx() so use the raw_pci_ops vector. |
573 | */ | 737 | */ |
574 | 738 | ||
575 | raw_pci_ops->read(tioce_common->ce_pcibus.bs_persist_segment, | 739 | seg = tioce_common->ce_pcibus.bs_persist_segment; |
576 | tioce_common->ce_pcibus.bs_persist_busnum, | 740 | bus = tioce_common->ce_pcibus.bs_persist_busnum; |
577 | PCI_DEVFN(2, 0), PCI_SECONDARY_BUS, 1, &tmp); | 741 | |
742 | raw_pci_ops->read(seg, bus, PCI_DEVFN(2, 0), PCI_SECONDARY_BUS, 1,&tmp); | ||
578 | tioce_kern->ce_port1_secondary = (u8) tmp; | 743 | tioce_kern->ce_port1_secondary = (u8) tmp; |
579 | 744 | ||
580 | /* | 745 | /* |
@@ -583,18 +748,76 @@ tioce_kern_init(struct tioce_common *tioce_common) | |||
583 | */ | 748 | */ |
584 | 749 | ||
585 | tioce_mmr = (struct tioce *)tioce_common->ce_pcibus.bs_base; | 750 | tioce_mmr = (struct tioce *)tioce_common->ce_pcibus.bs_base; |
586 | __sn_clrq_relaxed(&tioce_mmr->ce_ure_page_map, CE_URE_PAGESIZE_MASK); | 751 | tioce_mmr_clri(tioce_kern, &tioce_mmr->ce_ure_page_map, |
587 | __sn_setq_relaxed(&tioce_mmr->ce_ure_page_map, CE_URE_256K_PAGESIZE); | 752 | CE_URE_PAGESIZE_MASK); |
588 | tioce_kern->ce_ate3240_pagesize = KB(256); | 753 | tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_ure_page_map, |
754 | CE_URE_256K_PAGESIZE); | ||
755 | ps = tioce_kern->ce_ate3240_pagesize = KB(256); | ||
589 | 756 | ||
590 | for (i = 0; i < TIOCE_NUM_M40_ATES; i++) { | 757 | for (i = 0; i < TIOCE_NUM_M40_ATES; i++) { |
591 | tioce_kern->ce_ate40_shadow[i] = 0; | 758 | tioce_kern->ce_ate40_shadow[i] = 0; |
592 | writeq(0, &tioce_mmr->ce_ure_ate40[i]); | 759 | tioce_mmr_storei(tioce_kern, &tioce_mmr->ce_ure_ate40[i], 0); |
593 | } | 760 | } |
594 | 761 | ||
595 | for (i = 0; i < TIOCE_NUM_M3240_ATES; i++) { | 762 | for (i = 0; i < TIOCE_NUM_M3240_ATES; i++) { |
596 | tioce_kern->ce_ate3240_shadow[i] = 0; | 763 | tioce_kern->ce_ate3240_shadow[i] = 0; |
597 | writeq(0, &tioce_mmr->ce_ure_ate3240[i]); | 764 | tioce_mmr_storei(tioce_kern, &tioce_mmr->ce_ure_ate3240[i], 0); |
765 | } | ||
766 | |||
767 | /* | ||
768 | * Reserve ATE's corresponding to reserved address ranges. These | ||
769 | * include: | ||
770 | * | ||
771 | * Memory space covered by each PPB mem base/limit register | ||
772 | * Memory space covered by each PPB prefetch base/limit register | ||
773 | * | ||
774 | * These bus ranges are for pio (downstream) traffic only, and so | ||
775 | * cannot be used for DMA. | ||
776 | */ | ||
777 | |||
778 | for (dev = 1; dev <= 2; dev++) { | ||
779 | u64 base, limit; | ||
780 | |||
781 | /* mem base/limit */ | ||
782 | |||
783 | raw_pci_ops->read(seg, bus, PCI_DEVFN(dev, 0), | ||
784 | PCI_MEMORY_BASE, 2, &tmp); | ||
785 | base = (u64)tmp << 16; | ||
786 | |||
787 | raw_pci_ops->read(seg, bus, PCI_DEVFN(dev, 0), | ||
788 | PCI_MEMORY_LIMIT, 2, &tmp); | ||
789 | limit = (u64)tmp << 16; | ||
790 | limit |= 0xfffffUL; | ||
791 | |||
792 | if (base < limit) | ||
793 | tioce_reserve_m32(tioce_kern, base, limit); | ||
794 | |||
795 | /* | ||
796 | * prefetch mem base/limit. The tioce ppb's have 64-bit | ||
797 | * decoders, so read the upper portions w/o checking the | ||
798 | * attributes. | ||
799 | */ | ||
800 | |||
801 | raw_pci_ops->read(seg, bus, PCI_DEVFN(dev, 0), | ||
802 | PCI_PREF_MEMORY_BASE, 2, &tmp); | ||
803 | base = ((u64)tmp & PCI_PREF_RANGE_MASK) << 16; | ||
804 | |||
805 | raw_pci_ops->read(seg, bus, PCI_DEVFN(dev, 0), | ||
806 | PCI_PREF_BASE_UPPER32, 4, &tmp); | ||
807 | base |= (u64)tmp << 32; | ||
808 | |||
809 | raw_pci_ops->read(seg, bus, PCI_DEVFN(dev, 0), | ||
810 | PCI_PREF_MEMORY_LIMIT, 2, &tmp); | ||
811 | |||
812 | limit = ((u64)tmp & PCI_PREF_RANGE_MASK) << 16; | ||
813 | limit |= 0xfffffUL; | ||
814 | |||
815 | raw_pci_ops->read(seg, bus, PCI_DEVFN(dev, 0), | ||
816 | PCI_PREF_LIMIT_UPPER32, 4, &tmp); | ||
817 | limit |= (u64)tmp << 32; | ||
818 | |||
819 | if ((base < limit) && TIOCE_M32_ADDR(base)) | ||
820 | tioce_reserve_m32(tioce_kern, base, limit); | ||
598 | } | 821 | } |
599 | 822 | ||
600 | return tioce_kern; | 823 | return tioce_kern; |
@@ -614,6 +837,7 @@ tioce_force_interrupt(struct sn_irq_info *sn_irq_info) | |||
614 | { | 837 | { |
615 | struct pcidev_info *pcidev_info; | 838 | struct pcidev_info *pcidev_info; |
616 | struct tioce_common *ce_common; | 839 | struct tioce_common *ce_common; |
840 | struct tioce_kernel *ce_kern; | ||
617 | struct tioce *ce_mmr; | 841 | struct tioce *ce_mmr; |
618 | u64 force_int_val; | 842 | u64 force_int_val; |
619 | 843 | ||
@@ -629,6 +853,29 @@ tioce_force_interrupt(struct sn_irq_info *sn_irq_info) | |||
629 | 853 | ||
630 | ce_common = (struct tioce_common *)pcidev_info->pdi_pcibus_info; | 854 | ce_common = (struct tioce_common *)pcidev_info->pdi_pcibus_info; |
631 | ce_mmr = (struct tioce *)ce_common->ce_pcibus.bs_base; | 855 | ce_mmr = (struct tioce *)ce_common->ce_pcibus.bs_base; |
856 | ce_kern = (struct tioce_kernel *)ce_common->ce_kernel_private; | ||
857 | |||
858 | /* | ||
859 | * TIOCE Rev A workaround (PV 945826), force an interrupt by writing | ||
860 | * the TIO_INTx register directly (1/26/2006) | ||
861 | */ | ||
862 | if (ce_common->ce_rev == TIOCE_REV_A) { | ||
863 | u64 int_bit_mask = (1ULL << sn_irq_info->irq_int_bit); | ||
864 | u64 status; | ||
865 | |||
866 | tioce_mmr_load(ce_kern, &ce_mmr->ce_adm_int_status, &status); | ||
867 | if (status & int_bit_mask) { | ||
868 | u64 force_irq = (1 << 8) | sn_irq_info->irq_irq; | ||
869 | u64 ctalk = sn_irq_info->irq_xtalkaddr; | ||
870 | u64 nasid, offset; | ||
871 | |||
872 | nasid = (ctalk & CTALK_NASID_MASK) >> CTALK_NASID_SHFT; | ||
873 | offset = (ctalk & CTALK_NODE_OFFSET); | ||
874 | HUB_S(TIO_IOSPACE_ADDR(nasid, offset), force_irq); | ||
875 | } | ||
876 | |||
877 | return; | ||
878 | } | ||
632 | 879 | ||
633 | /* | 880 | /* |
634 | * irq_int_bit is originally set up by prom, and holds the interrupt | 881 | * irq_int_bit is originally set up by prom, and holds the interrupt |
@@ -666,7 +913,7 @@ tioce_force_interrupt(struct sn_irq_info *sn_irq_info) | |||
666 | default: | 913 | default: |
667 | return; | 914 | return; |
668 | } | 915 | } |
669 | writeq(force_int_val, &ce_mmr->ce_adm_force_int); | 916 | tioce_mmr_storei(ce_kern, &ce_mmr->ce_adm_force_int, force_int_val); |
670 | } | 917 | } |
671 | 918 | ||
672 | /** | 919 | /** |
@@ -685,6 +932,7 @@ tioce_target_interrupt(struct sn_irq_info *sn_irq_info) | |||
685 | { | 932 | { |
686 | struct pcidev_info *pcidev_info; | 933 | struct pcidev_info *pcidev_info; |
687 | struct tioce_common *ce_common; | 934 | struct tioce_common *ce_common; |
935 | struct tioce_kernel *ce_kern; | ||
688 | struct tioce *ce_mmr; | 936 | struct tioce *ce_mmr; |
689 | int bit; | 937 | int bit; |
690 | u64 vector; | 938 | u64 vector; |
@@ -695,14 +943,15 @@ tioce_target_interrupt(struct sn_irq_info *sn_irq_info) | |||
695 | 943 | ||
696 | ce_common = (struct tioce_common *)pcidev_info->pdi_pcibus_info; | 944 | ce_common = (struct tioce_common *)pcidev_info->pdi_pcibus_info; |
697 | ce_mmr = (struct tioce *)ce_common->ce_pcibus.bs_base; | 945 | ce_mmr = (struct tioce *)ce_common->ce_pcibus.bs_base; |
946 | ce_kern = (struct tioce_kernel *)ce_common->ce_kernel_private; | ||
698 | 947 | ||
699 | bit = sn_irq_info->irq_int_bit; | 948 | bit = sn_irq_info->irq_int_bit; |
700 | 949 | ||
701 | __sn_setq_relaxed(&ce_mmr->ce_adm_int_mask, (1UL << bit)); | 950 | tioce_mmr_seti(ce_kern, &ce_mmr->ce_adm_int_mask, (1UL << bit)); |
702 | vector = (u64)sn_irq_info->irq_irq << INTR_VECTOR_SHFT; | 951 | vector = (u64)sn_irq_info->irq_irq << INTR_VECTOR_SHFT; |
703 | vector |= sn_irq_info->irq_xtalkaddr; | 952 | vector |= sn_irq_info->irq_xtalkaddr; |
704 | writeq(vector, &ce_mmr->ce_adm_int_dest[bit]); | 953 | tioce_mmr_storei(ce_kern, &ce_mmr->ce_adm_int_dest[bit], vector); |
705 | __sn_clrq_relaxed(&ce_mmr->ce_adm_int_mask, (1UL << bit)); | 954 | tioce_mmr_clri(ce_kern, &ce_mmr->ce_adm_int_mask, (1UL << bit)); |
706 | 955 | ||
707 | tioce_force_interrupt(sn_irq_info); | 956 | tioce_force_interrupt(sn_irq_info); |
708 | } | 957 | } |
@@ -721,7 +970,11 @@ tioce_target_interrupt(struct sn_irq_info *sn_irq_info) | |||
721 | static void * | 970 | static void * |
722 | tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *controller) | 971 | tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *controller) |
723 | { | 972 | { |
973 | int my_nasid; | ||
974 | cnodeid_t my_cnode, mem_cnode; | ||
724 | struct tioce_common *tioce_common; | 975 | struct tioce_common *tioce_common; |
976 | struct tioce_kernel *tioce_kern; | ||
977 | struct tioce *tioce_mmr; | ||
725 | 978 | ||
726 | /* | 979 | /* |
727 | * Allocate kernel bus soft and copy from prom. | 980 | * Allocate kernel bus soft and copy from prom. |
@@ -734,11 +987,23 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont | |||
734 | memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common)); | 987 | memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common)); |
735 | tioce_common->ce_pcibus.bs_base |= __IA64_UNCACHED_OFFSET; | 988 | tioce_common->ce_pcibus.bs_base |= __IA64_UNCACHED_OFFSET; |
736 | 989 | ||
737 | if (tioce_kern_init(tioce_common) == NULL) { | 990 | tioce_kern = tioce_kern_init(tioce_common); |
991 | if (tioce_kern == NULL) { | ||
738 | kfree(tioce_common); | 992 | kfree(tioce_common); |
739 | return NULL; | 993 | return NULL; |
740 | } | 994 | } |
741 | 995 | ||
996 | /* | ||
997 | * Clear out any transient errors before registering the error | ||
998 | * interrupt handler. | ||
999 | */ | ||
1000 | |||
1001 | tioce_mmr = (struct tioce *)tioce_common->ce_pcibus.bs_base; | ||
1002 | tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_adm_int_status_alias, ~0ULL); | ||
1003 | tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_adm_error_summary_alias, | ||
1004 | ~0ULL); | ||
1005 | tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_dre_comp_err_addr, ~0ULL); | ||
1006 | |||
742 | if (request_irq(SGI_PCIASIC_ERROR, | 1007 | if (request_irq(SGI_PCIASIC_ERROR, |
743 | tioce_error_intr_handler, | 1008 | tioce_error_intr_handler, |
744 | SA_SHIRQ, "TIOCE error", (void *)tioce_common)) | 1009 | SA_SHIRQ, "TIOCE error", (void *)tioce_common)) |
@@ -750,6 +1015,21 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont | |||
750 | tioce_common->ce_pcibus.bs_persist_segment, | 1015 | tioce_common->ce_pcibus.bs_persist_segment, |
751 | tioce_common->ce_pcibus.bs_persist_busnum); | 1016 | tioce_common->ce_pcibus.bs_persist_busnum); |
752 | 1017 | ||
1018 | /* | ||
1019 | * identify closest nasid for memory allocations | ||
1020 | */ | ||
1021 | |||
1022 | my_nasid = NASID_GET(tioce_common->ce_pcibus.bs_base); | ||
1023 | my_cnode = nasid_to_cnodeid(my_nasid); | ||
1024 | |||
1025 | if (sn_hwperf_get_nearest_node(my_cnode, &mem_cnode, NULL) < 0) { | ||
1026 | printk(KERN_WARNING "tioce_bus_fixup: failed to find " | ||
1027 | "closest node with MEM to TIO node %d\n", my_cnode); | ||
1028 | mem_cnode = (cnodeid_t)-1; /* use any node */ | ||
1029 | } | ||
1030 | |||
1031 | controller->node = mem_cnode; | ||
1032 | |||
753 | return tioce_common; | 1033 | return tioce_common; |
754 | } | 1034 | } |
755 | 1035 | ||
diff --git a/arch/m32r/Kconfig.debug b/arch/m32r/Kconfig.debug index bbf711bab69e..2e1019ddbb22 100644 --- a/arch/m32r/Kconfig.debug +++ b/arch/m32r/Kconfig.debug | |||
@@ -19,7 +19,7 @@ config DEBUG_STACK_USAGE | |||
19 | This option will slow down process creation somewhat. | 19 | This option will slow down process creation somewhat. |
20 | 20 | ||
21 | config DEBUG_PAGEALLOC | 21 | config DEBUG_PAGEALLOC |
22 | bool "Page alloc debugging" | 22 | bool "Debug page memory allocations" |
23 | depends on DEBUG_KERNEL && BROKEN | 23 | depends on DEBUG_KERNEL && BROKEN |
24 | help | 24 | help |
25 | Unmap pages from the kernel linear mapping after free_pages(). | 25 | Unmap pages from the kernel linear mapping after free_pages(). |
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile index 4b3c90ba926c..f219c47d334f 100644 --- a/arch/m32r/Makefile +++ b/arch/m32r/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # m32r/Makefile | 2 | # m32r/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | 7 | ||
5 | LDFLAGS := | 8 | LDFLAGS := |
6 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S | 9 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
@@ -39,7 +42,7 @@ drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/ | |||
39 | 42 | ||
40 | boot := arch/m32r/boot | 43 | boot := arch/m32r/boot |
41 | 44 | ||
42 | .PHONY: zImage | 45 | PHONY += zImage |
43 | 46 | ||
44 | all: zImage | 47 | all: zImage |
45 | 48 | ||
diff --git a/arch/m32r/kernel/irq.c b/arch/m32r/kernel/irq.c index 1ce63926a3c0..a4634b06f675 100644 --- a/arch/m32r/kernel/irq.c +++ b/arch/m32r/kernel/irq.c | |||
@@ -37,9 +37,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
37 | 37 | ||
38 | if (i == 0) { | 38 | if (i == 0) { |
39 | seq_printf(p, " "); | 39 | seq_printf(p, " "); |
40 | for (j=0; j<NR_CPUS; j++) | 40 | for_each_online_cpu(j) |
41 | if (cpu_online(j)) | 41 | seq_printf(p, "CPU%d ",j); |
42 | seq_printf(p, "CPU%d ",j); | ||
43 | seq_putc(p, '\n'); | 42 | seq_putc(p, '\n'); |
44 | } | 43 | } |
45 | 44 | ||
@@ -52,9 +51,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
52 | #ifndef CONFIG_SMP | 51 | #ifndef CONFIG_SMP |
53 | seq_printf(p, "%10u ", kstat_irqs(i)); | 52 | seq_printf(p, "%10u ", kstat_irqs(i)); |
54 | #else | 53 | #else |
55 | for (j = 0; j < NR_CPUS; j++) | 54 | for_each_online_cpu(j) |
56 | if (cpu_online(j)) | 55 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
57 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | ||
58 | #endif | 56 | #endif |
59 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 57 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
60 | seq_printf(p, " %s", action->name); | 58 | seq_printf(p, " %s", action->name); |
diff --git a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c index 6facf15b04f3..c9e7dad860b7 100644 --- a/arch/m32r/mm/init.c +++ b/arch/m32r/mm/init.c | |||
@@ -226,7 +226,7 @@ void free_initmem(void) | |||
226 | addr = (unsigned long)(&__init_begin); | 226 | addr = (unsigned long)(&__init_begin); |
227 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 227 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
228 | ClearPageReserved(virt_to_page(addr)); | 228 | ClearPageReserved(virt_to_page(addr)); |
229 | set_page_count(virt_to_page(addr), 1); | 229 | init_page_count(virt_to_page(addr)); |
230 | free_page(addr); | 230 | free_page(addr); |
231 | totalram_pages++; | 231 | totalram_pages++; |
232 | } | 232 | } |
@@ -244,7 +244,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
244 | unsigned long p; | 244 | unsigned long p; |
245 | for (p = start; p < end; p += PAGE_SIZE) { | 245 | for (p = start; p < end; p += PAGE_SIZE) { |
246 | ClearPageReserved(virt_to_page(p)); | 246 | ClearPageReserved(virt_to_page(p)); |
247 | set_page_count(virt_to_page(p), 1); | 247 | init_page_count(virt_to_page(p)); |
248 | free_page(p); | 248 | free_page(p); |
249 | totalram_pages++; | 249 | totalram_pages++; |
250 | } | 250 | } |
diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c index 703cbc6dc9cc..15c16b62dff5 100644 --- a/arch/m68k/bvme6000/rtc.c +++ b/arch/m68k/bvme6000/rtc.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */ | 19 | #include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */ |
20 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
21 | #include <linux/bcd.h> | ||
21 | #include <asm/bvme6000hw.h> | 22 | #include <asm/bvme6000hw.h> |
22 | 23 | ||
23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
@@ -32,9 +33,6 @@ | |||
32 | * ioctls. | 33 | * ioctls. |
33 | */ | 34 | */ |
34 | 35 | ||
35 | #define BCD2BIN(val) (((val)&15) + ((val)>>4)*10) | ||
36 | #define BIN2BCD(val) ((((val)/10)<<4) + (val)%10) | ||
37 | |||
38 | static unsigned char days_in_mo[] = | 36 | static unsigned char days_in_mo[] = |
39 | {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; | 37 | {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; |
40 | 38 | ||
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 2d8ad0727b6b..33648efb772e 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -77,7 +77,7 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
77 | /* | 77 | /* |
78 | * The idle loop on an m68k.. | 78 | * The idle loop on an m68k.. |
79 | */ | 79 | */ |
80 | void default_idle(void) | 80 | static void default_idle(void) |
81 | { | 81 | { |
82 | if (!need_resched()) | 82 | if (!need_resched()) |
83 | #if defined(MACH_ATARI_ONLY) && !defined(CONFIG_HADES) | 83 | #if defined(MACH_ATARI_ONLY) && !defined(CONFIG_HADES) |
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index c45beb955943..a190e39c907a 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c | |||
@@ -137,7 +137,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
137 | int pages = 0; | 137 | int pages = 0; |
138 | for (; start < end; start += PAGE_SIZE) { | 138 | for (; start < end; start += PAGE_SIZE) { |
139 | ClearPageReserved(virt_to_page(start)); | 139 | ClearPageReserved(virt_to_page(start)); |
140 | set_page_count(virt_to_page(start), 1); | 140 | init_page_count(virt_to_page(start)); |
141 | free_page(start); | 141 | free_page(start); |
142 | totalram_pages++; | 142 | totalram_pages++; |
143 | pages++; | 143 | pages++; |
diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c index 559942ce0e1e..d6d582a5abb0 100644 --- a/arch/m68k/mm/memory.c +++ b/arch/m68k/mm/memory.c | |||
@@ -54,7 +54,7 @@ void __init init_pointer_table(unsigned long ptable) | |||
54 | 54 | ||
55 | /* unreserve the page so it's possible to free that page */ | 55 | /* unreserve the page so it's possible to free that page */ |
56 | PD_PAGE(dp)->flags &= ~(1 << PG_reserved); | 56 | PD_PAGE(dp)->flags &= ~(1 << PG_reserved); |
57 | set_page_count(PD_PAGE(dp), 1); | 57 | init_page_count(PD_PAGE(dp)); |
58 | 58 | ||
59 | return; | 59 | return; |
60 | } | 60 | } |
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index d855fec26317..afb57eeafdcb 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c | |||
@@ -276,7 +276,7 @@ void free_initmem(void) | |||
276 | addr = (unsigned long)&__init_begin; | 276 | addr = (unsigned long)&__init_begin; |
277 | for (; addr < (unsigned long)&__init_end; addr += PAGE_SIZE) { | 277 | for (; addr < (unsigned long)&__init_end; addr += PAGE_SIZE) { |
278 | virt_to_page(addr)->flags &= ~(1 << PG_reserved); | 278 | virt_to_page(addr)->flags &= ~(1 << PG_reserved); |
279 | set_page_count(virt_to_page(addr), 1); | 279 | init_page_count(virt_to_page(addr)); |
280 | free_page(addr); | 280 | free_page(addr); |
281 | totalram_pages++; | 281 | totalram_pages++; |
282 | } | 282 | } |
diff --git a/arch/m68knommu/kernel/m68k_ksyms.c b/arch/m68knommu/kernel/m68k_ksyms.c index eddb8d3e130a..d844c755945a 100644 --- a/arch/m68knommu/kernel/m68k_ksyms.c +++ b/arch/m68knommu/kernel/m68k_ksyms.c | |||
@@ -26,6 +26,7 @@ EXPORT_SYMBOL(__ioremap); | |||
26 | EXPORT_SYMBOL(iounmap); | 26 | EXPORT_SYMBOL(iounmap); |
27 | EXPORT_SYMBOL(dump_fpu); | 27 | EXPORT_SYMBOL(dump_fpu); |
28 | EXPORT_SYMBOL(strnlen); | 28 | EXPORT_SYMBOL(strnlen); |
29 | EXPORT_SYMBOL(strpbrk); | ||
29 | EXPORT_SYMBOL(strrchr); | 30 | EXPORT_SYMBOL(strrchr); |
30 | EXPORT_SYMBOL(strstr); | 31 | EXPORT_SYMBOL(strstr); |
31 | EXPORT_SYMBOL(strchr); | 32 | EXPORT_SYMBOL(strchr); |
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index 63c117dae0c3..f861755ec88b 100644 --- a/arch/m68knommu/kernel/process.c +++ b/arch/m68knommu/kernel/process.c | |||
@@ -51,7 +51,7 @@ EXPORT_SYMBOL(pm_power_off); | |||
51 | /* | 51 | /* |
52 | * The idle loop on an m68knommu.. | 52 | * The idle loop on an m68knommu.. |
53 | */ | 53 | */ |
54 | void default_idle(void) | 54 | static void default_idle(void) |
55 | { | 55 | { |
56 | local_irq_disable(); | 56 | local_irq_disable(); |
57 | while (!need_resched()) { | 57 | while (!need_resched()) { |
diff --git a/arch/m68knommu/mm/init.c b/arch/m68knommu/mm/init.c index 89f0b554ffb7..d79503fe6e42 100644 --- a/arch/m68knommu/mm/init.c +++ b/arch/m68knommu/mm/init.c | |||
@@ -195,7 +195,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
195 | int pages = 0; | 195 | int pages = 0; |
196 | for (; start < end; start += PAGE_SIZE) { | 196 | for (; start < end; start += PAGE_SIZE) { |
197 | ClearPageReserved(virt_to_page(start)); | 197 | ClearPageReserved(virt_to_page(start)); |
198 | set_page_count(virt_to_page(start), 1); | 198 | init_page_count(virt_to_page(start)); |
199 | free_page(start); | 199 | free_page(start); |
200 | totalram_pages++; | 200 | totalram_pages++; |
201 | pages++; | 201 | pages++; |
@@ -218,7 +218,7 @@ free_initmem() | |||
218 | /* next to check that the page we free is not a partial page */ | 218 | /* next to check that the page we free is not a partial page */ |
219 | for (; addr + PAGE_SIZE < (unsigned long)(&__init_end); addr +=PAGE_SIZE) { | 219 | for (; addr + PAGE_SIZE < (unsigned long)(&__init_end); addr +=PAGE_SIZE) { |
220 | ClearPageReserved(virt_to_page(addr)); | 220 | ClearPageReserved(virt_to_page(addr)); |
221 | set_page_count(virt_to_page(addr), 1); | 221 | init_page_count(virt_to_page(addr)); |
222 | free_page(addr); | 222 | free_page(addr); |
223 | totalram_pages++; | 223 | totalram_pages++; |
224 | } | 224 | } |
diff --git a/arch/mips/arc/memory.c b/arch/mips/arc/memory.c index 958d2eb78862..8a9ef58cc399 100644 --- a/arch/mips/arc/memory.c +++ b/arch/mips/arc/memory.c | |||
@@ -158,7 +158,7 @@ unsigned long __init prom_free_prom_memory(void) | |||
158 | while (addr < boot_mem_map.map[i].addr | 158 | while (addr < boot_mem_map.map[i].addr |
159 | + boot_mem_map.map[i].size) { | 159 | + boot_mem_map.map[i].size) { |
160 | ClearPageReserved(virt_to_page(__va(addr))); | 160 | ClearPageReserved(virt_to_page(__va(addr))); |
161 | set_page_count(virt_to_page(__va(addr)), 1); | 161 | init_page_count(virt_to_page(__va(addr))); |
162 | free_page((unsigned long)__va(addr)); | 162 | free_page((unsigned long)__va(addr)); |
163 | addr += PAGE_SIZE; | 163 | addr += PAGE_SIZE; |
164 | freed += PAGE_SIZE; | 164 | freed += PAGE_SIZE; |
diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c index 81cb5a76cfb7..1edaf3074ee9 100644 --- a/arch/mips/dec/prom/memory.c +++ b/arch/mips/dec/prom/memory.c | |||
@@ -118,7 +118,7 @@ unsigned long __init prom_free_prom_memory(void) | |||
118 | addr = PAGE_SIZE; | 118 | addr = PAGE_SIZE; |
119 | while (addr < end) { | 119 | while (addr < end) { |
120 | ClearPageReserved(virt_to_page(__va(addr))); | 120 | ClearPageReserved(virt_to_page(__va(addr))); |
121 | set_page_count(virt_to_page(__va(addr)), 1); | 121 | init_page_count(virt_to_page(__va(addr))); |
122 | free_page((unsigned long)__va(addr)); | 122 | free_page((unsigned long)__va(addr)); |
123 | addr += PAGE_SIZE; | 123 | addr += PAGE_SIZE; |
124 | } | 124 | } |
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index 7d93992e462c..3dd76b3d2967 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c | |||
@@ -68,9 +68,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
68 | 68 | ||
69 | if (i == 0) { | 69 | if (i == 0) { |
70 | seq_printf(p, " "); | 70 | seq_printf(p, " "); |
71 | for (j=0; j<NR_CPUS; j++) | 71 | for_each_online_cpu(j) |
72 | if (cpu_online(j)) | 72 | seq_printf(p, "CPU%d ",j); |
73 | seq_printf(p, "CPU%d ",j); | ||
74 | seq_putc(p, '\n'); | 73 | seq_putc(p, '\n'); |
75 | } | 74 | } |
76 | 75 | ||
@@ -83,9 +82,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
83 | #ifndef CONFIG_SMP | 82 | #ifndef CONFIG_SMP |
84 | seq_printf(p, "%10u ", kstat_irqs(i)); | 83 | seq_printf(p, "%10u ", kstat_irqs(i)); |
85 | #else | 84 | #else |
86 | for (j = 0; j < NR_CPUS; j++) | 85 | for_each_online_cpu(j) |
87 | if (cpu_online(j)) | 86 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
88 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | ||
89 | #endif | 87 | #endif |
90 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 88 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
91 | seq_printf(p, " %s", action->name); | 89 | seq_printf(p, " %s", action->name); |
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 06ed90752424..78d171bfa331 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
@@ -167,8 +167,8 @@ int smp_call_function (void (*func) (void *info), void *info, int retry, | |||
167 | mb(); | 167 | mb(); |
168 | 168 | ||
169 | /* Send a message to all other CPUs and wait for them to respond */ | 169 | /* Send a message to all other CPUs and wait for them to respond */ |
170 | for (i = 0; i < NR_CPUS; i++) | 170 | for_each_online_cpu(i) |
171 | if (cpu_online(i) && i != cpu) | 171 | if (i != cpu) |
172 | core_send_ipi(i, SMP_CALL_FUNCTION); | 172 | core_send_ipi(i, SMP_CALL_FUNCTION); |
173 | 173 | ||
174 | /* Wait for response */ | 174 | /* Wait for response */ |
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index 0fc3730a294f..5407b784cd01 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c | |||
@@ -645,27 +645,7 @@ static inline void getitimer_real(struct itimerval *value) | |||
645 | 645 | ||
646 | asmlinkage unsigned int irix_alarm(unsigned int seconds) | 646 | asmlinkage unsigned int irix_alarm(unsigned int seconds) |
647 | { | 647 | { |
648 | struct itimerval it_new, it_old; | 648 | return alarm_setitimer(seconds); |
649 | unsigned int oldalarm; | ||
650 | |||
651 | if (!seconds) { | ||
652 | getitimer_real(&it_old); | ||
653 | del_timer(¤t->real_timer); | ||
654 | } else { | ||
655 | it_new.it_interval.tv_sec = it_new.it_interval.tv_usec = 0; | ||
656 | it_new.it_value.tv_sec = seconds; | ||
657 | it_new.it_value.tv_usec = 0; | ||
658 | do_setitimer(ITIMER_REAL, &it_new, &it_old); | ||
659 | } | ||
660 | oldalarm = it_old.it_value.tv_sec; | ||
661 | /* | ||
662 | * ehhh.. We can't return 0 if we have an alarm pending ... | ||
663 | * And we'd better return too much than too little anyway | ||
664 | */ | ||
665 | if (it_old.it_value.tv_usec) | ||
666 | oldalarm++; | ||
667 | |||
668 | return oldalarm; | ||
669 | } | 649 | } |
670 | 650 | ||
671 | asmlinkage int irix_pause(void) | 651 | asmlinkage int irix_pause(void) |
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c index 2c8afd77a20b..ee5e70c95cf3 100644 --- a/arch/mips/mips-boards/generic/memory.c +++ b/arch/mips/mips-boards/generic/memory.c | |||
@@ -174,7 +174,7 @@ unsigned long __init prom_free_prom_memory(void) | |||
174 | while (addr < boot_mem_map.map[i].addr | 174 | while (addr < boot_mem_map.map[i].addr |
175 | + boot_mem_map.map[i].size) { | 175 | + boot_mem_map.map[i].size) { |
176 | ClearPageReserved(virt_to_page(__va(addr))); | 176 | ClearPageReserved(virt_to_page(__va(addr))); |
177 | set_page_count(virt_to_page(__va(addr)), 1); | 177 | init_page_count(virt_to_page(__va(addr))); |
178 | free_page((unsigned long)__va(addr)); | 178 | free_page((unsigned long)__va(addr)); |
179 | addr += PAGE_SIZE; | 179 | addr += PAGE_SIZE; |
180 | freed += PAGE_SIZE; | 180 | freed += PAGE_SIZE; |
diff --git a/arch/mips/mips-boards/sim/sim_mem.c b/arch/mips/mips-boards/sim/sim_mem.c index 0dbd7435bb2a..1ec4e75656bd 100644 --- a/arch/mips/mips-boards/sim/sim_mem.c +++ b/arch/mips/mips-boards/sim/sim_mem.c | |||
@@ -117,7 +117,7 @@ unsigned long __init prom_free_prom_memory(void) | |||
117 | while (addr < boot_mem_map.map[i].addr | 117 | while (addr < boot_mem_map.map[i].addr |
118 | + boot_mem_map.map[i].size) { | 118 | + boot_mem_map.map[i].size) { |
119 | ClearPageReserved(virt_to_page(__va(addr))); | 119 | ClearPageReserved(virt_to_page(__va(addr))); |
120 | set_page_count(virt_to_page(__va(addr)), 1); | 120 | init_page_count(virt_to_page(__va(addr))); |
121 | free_page((unsigned long)__va(addr)); | 121 | free_page((unsigned long)__va(addr)); |
122 | addr += PAGE_SIZE; | 122 | addr += PAGE_SIZE; |
123 | freed += PAGE_SIZE; | 123 | freed += PAGE_SIZE; |
diff --git a/arch/mips/mm/dma-ip32.c b/arch/mips/mm/dma-ip32.c index a7e3072ff78d..ec54ed0d26ff 100644 --- a/arch/mips/mm/dma-ip32.c +++ b/arch/mips/mm/dma-ip32.c | |||
@@ -138,7 +138,7 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | |||
138 | BUG(); | 138 | BUG(); |
139 | } | 139 | } |
140 | 140 | ||
141 | addr = virt_to_phys(ptr)&RAM_OFFSET_MASK;; | 141 | addr = virt_to_phys(ptr)&RAM_OFFSET_MASK; |
142 | if(dev == NULL) | 142 | if(dev == NULL) |
143 | addr+=CRIME_HI_MEM_BASE; | 143 | addr+=CRIME_HI_MEM_BASE; |
144 | return (dma_addr_t)addr; | 144 | return (dma_addr_t)addr; |
@@ -179,7 +179,7 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
179 | addr = (unsigned long) page_address(sg->page)+sg->offset; | 179 | addr = (unsigned long) page_address(sg->page)+sg->offset; |
180 | if (addr) | 180 | if (addr) |
181 | __dma_sync(addr, sg->length, direction); | 181 | __dma_sync(addr, sg->length, direction); |
182 | addr = __pa(addr)&RAM_OFFSET_MASK;; | 182 | addr = __pa(addr)&RAM_OFFSET_MASK; |
183 | if(dev == NULL) | 183 | if(dev == NULL) |
184 | addr += CRIME_HI_MEM_BASE; | 184 | addr += CRIME_HI_MEM_BASE; |
185 | sg->dma_address = (dma_addr_t)addr; | 185 | sg->dma_address = (dma_addr_t)addr; |
@@ -199,7 +199,7 @@ dma_addr_t dma_map_page(struct device *dev, struct page *page, | |||
199 | 199 | ||
200 | addr = (unsigned long) page_address(page) + offset; | 200 | addr = (unsigned long) page_address(page) + offset; |
201 | dma_cache_wback_inv(addr, size); | 201 | dma_cache_wback_inv(addr, size); |
202 | addr = __pa(addr)&RAM_OFFSET_MASK;; | 202 | addr = __pa(addr)&RAM_OFFSET_MASK; |
203 | if(dev == NULL) | 203 | if(dev == NULL) |
204 | addr += CRIME_HI_MEM_BASE; | 204 | addr += CRIME_HI_MEM_BASE; |
205 | 205 | ||
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 0ff9a348b843..52f7d59fe612 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -54,7 +54,8 @@ unsigned long empty_zero_page, zero_page_mask; | |||
54 | */ | 54 | */ |
55 | unsigned long setup_zero_pages(void) | 55 | unsigned long setup_zero_pages(void) |
56 | { | 56 | { |
57 | unsigned long order, size; | 57 | unsigned int order; |
58 | unsigned long size; | ||
58 | struct page *page; | 59 | struct page *page; |
59 | 60 | ||
60 | if (cpu_has_vce) | 61 | if (cpu_has_vce) |
@@ -67,9 +68,9 @@ unsigned long setup_zero_pages(void) | |||
67 | panic("Oh boy, that early out of memory?"); | 68 | panic("Oh boy, that early out of memory?"); |
68 | 69 | ||
69 | page = virt_to_page(empty_zero_page); | 70 | page = virt_to_page(empty_zero_page); |
71 | split_page(page, order); | ||
70 | while (page < virt_to_page(empty_zero_page + (PAGE_SIZE << order))) { | 72 | while (page < virt_to_page(empty_zero_page + (PAGE_SIZE << order))) { |
71 | SetPageReserved(page); | 73 | SetPageReserved(page); |
72 | set_page_count(page, 1); | ||
73 | page++; | 74 | page++; |
74 | } | 75 | } |
75 | 76 | ||
@@ -244,7 +245,7 @@ void __init mem_init(void) | |||
244 | #ifdef CONFIG_LIMITED_DMA | 245 | #ifdef CONFIG_LIMITED_DMA |
245 | set_page_address(page, lowmem_page_address(page)); | 246 | set_page_address(page, lowmem_page_address(page)); |
246 | #endif | 247 | #endif |
247 | set_page_count(page, 1); | 248 | init_page_count(page); |
248 | __free_page(page); | 249 | __free_page(page); |
249 | totalhigh_pages++; | 250 | totalhigh_pages++; |
250 | } | 251 | } |
@@ -291,7 +292,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
291 | 292 | ||
292 | for (; start < end; start += PAGE_SIZE) { | 293 | for (; start < end; start += PAGE_SIZE) { |
293 | ClearPageReserved(virt_to_page(start)); | 294 | ClearPageReserved(virt_to_page(start)); |
294 | set_page_count(virt_to_page(start), 1); | 295 | init_page_count(virt_to_page(start)); |
295 | free_page(start); | 296 | free_page(start); |
296 | totalram_pages++; | 297 | totalram_pages++; |
297 | } | 298 | } |
@@ -314,7 +315,7 @@ void free_initmem(void) | |||
314 | page = addr; | 315 | page = addr; |
315 | #endif | 316 | #endif |
316 | ClearPageReserved(virt_to_page(page)); | 317 | ClearPageReserved(virt_to_page(page)); |
317 | set_page_count(virt_to_page(page), 1); | 318 | init_page_count(virt_to_page(page)); |
318 | free_page(page); | 319 | free_page(page); |
319 | totalram_pages++; | 320 | totalram_pages++; |
320 | freed += PAGE_SIZE; | 321 | freed += PAGE_SIZE; |
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 73e5e52781d8..2854ac4c9be1 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
@@ -88,12 +88,9 @@ static inline int find_level(cpuid_t *cpunum, int irq) | |||
88 | { | 88 | { |
89 | int cpu, i; | 89 | int cpu, i; |
90 | 90 | ||
91 | for (cpu = 0; cpu <= NR_CPUS; cpu++) { | 91 | for_each_online_cpu(cpu) { |
92 | struct slice_data *si = cpu_data[cpu].data; | 92 | struct slice_data *si = cpu_data[cpu].data; |
93 | 93 | ||
94 | if (!cpu_online(cpu)) | ||
95 | continue; | ||
96 | |||
97 | for (i = BASE_PCI_IRQ; i < LEVELS_PER_SLICE; i++) | 94 | for (i = BASE_PCI_IRQ; i < LEVELS_PER_SLICE; i++) |
98 | if (si->level_to_irq[i] == irq) { | 95 | if (si->level_to_irq[i] == irq) { |
99 | *cpunum = cpu; | 96 | *cpunum = cpu; |
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c index ed93a9792959..e0d095daa5ed 100644 --- a/arch/mips/sgi-ip27/ip27-memory.c +++ b/arch/mips/sgi-ip27/ip27-memory.c | |||
@@ -559,7 +559,7 @@ void __init mem_init(void) | |||
559 | /* if (!page_is_ram(pgnr)) continue; */ | 559 | /* if (!page_is_ram(pgnr)) continue; */ |
560 | /* commented out until page_is_ram works */ | 560 | /* commented out until page_is_ram works */ |
561 | ClearPageReserved(p); | 561 | ClearPageReserved(p); |
562 | set_page_count(p, 1); | 562 | init_page_count(p); |
563 | __free_page(p); | 563 | __free_page(p); |
564 | totalram_pages++; | 564 | totalram_pages++; |
565 | } | 565 | } |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index e8dea4177113..0b485ef4be89 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -54,11 +54,6 @@ | |||
54 | #include <asm/uaccess.h> | 54 | #include <asm/uaccess.h> |
55 | #include <asm/unwind.h> | 55 | #include <asm/unwind.h> |
56 | 56 | ||
57 | void default_idle(void) | ||
58 | { | ||
59 | barrier(); | ||
60 | } | ||
61 | |||
62 | /* | 57 | /* |
63 | * The idle thread. There's no useful work to be | 58 | * The idle thread. There's no useful work to be |
64 | * done, so just try to conserve power and have a | 59 | * done, so just try to conserve power and have a |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 25564b7ca6bb..d6ac1c60a471 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -298,8 +298,8 @@ send_IPI_allbutself(enum ipi_message_type op) | |||
298 | { | 298 | { |
299 | int i; | 299 | int i; |
300 | 300 | ||
301 | for (i = 0; i < NR_CPUS; i++) { | 301 | for_each_online_cpu(i) { |
302 | if (cpu_online(i) && i != smp_processor_id()) | 302 | if (i != smp_processor_id()) |
303 | send_IPI_single(i, op); | 303 | send_IPI_single(i, op); |
304 | } | 304 | } |
305 | } | 305 | } |
@@ -643,14 +643,13 @@ int sys_cpus(int argc, char **argv) | |||
643 | if ( argc == 1 ){ | 643 | if ( argc == 1 ){ |
644 | 644 | ||
645 | #ifdef DUMP_MORE_STATE | 645 | #ifdef DUMP_MORE_STATE |
646 | for(i=0; i<NR_CPUS; i++) { | 646 | for_each_online_cpu(i) { |
647 | int cpus_per_line = 4; | 647 | int cpus_per_line = 4; |
648 | if(cpu_online(i)) { | 648 | |
649 | if (j++ % cpus_per_line) | 649 | if (j++ % cpus_per_line) |
650 | printk(" %3d",i); | 650 | printk(" %3d",i); |
651 | else | 651 | else |
652 | printk("\n %3d",i); | 652 | printk("\n %3d",i); |
653 | } | ||
654 | } | 653 | } |
655 | printk("\n"); | 654 | printk("\n"); |
656 | #else | 655 | #else |
@@ -659,9 +658,7 @@ int sys_cpus(int argc, char **argv) | |||
659 | } else if((argc==2) && !(strcmp(argv[1],"-l"))) { | 658 | } else if((argc==2) && !(strcmp(argv[1],"-l"))) { |
660 | printk("\nCPUSTATE TASK CPUNUM CPUID HARDCPU(HPA)\n"); | 659 | printk("\nCPUSTATE TASK CPUNUM CPUID HARDCPU(HPA)\n"); |
661 | #ifdef DUMP_MORE_STATE | 660 | #ifdef DUMP_MORE_STATE |
662 | for(i=0;i<NR_CPUS;i++) { | 661 | for_each_online_cpu(i) { |
663 | if (!cpu_online(i)) | ||
664 | continue; | ||
665 | if (cpu_data[i].cpuid != NO_PROC_ID) { | 662 | if (cpu_data[i].cpuid != NO_PROC_ID) { |
666 | switch(cpu_data[i].state) { | 663 | switch(cpu_data[i].state) { |
667 | case STATE_RENDEZVOUS: | 664 | case STATE_RENDEZVOUS: |
@@ -695,9 +692,7 @@ int sys_cpus(int argc, char **argv) | |||
695 | } else if ((argc==2) && !(strcmp(argv[1],"-s"))) { | 692 | } else if ((argc==2) && !(strcmp(argv[1],"-s"))) { |
696 | #ifdef DUMP_MORE_STATE | 693 | #ifdef DUMP_MORE_STATE |
697 | printk("\nCPUSTATE CPUID\n"); | 694 | printk("\nCPUSTATE CPUID\n"); |
698 | for (i=0;i<NR_CPUS;i++) { | 695 | for_each_online_cpu(i) { |
699 | if (!cpu_online(i)) | ||
700 | continue; | ||
701 | if (cpu_data[i].cpuid != NO_PROC_ID) { | 696 | if (cpu_data[i].cpuid != NO_PROC_ID) { |
702 | switch(cpu_data[i].state) { | 697 | switch(cpu_data[i].state) { |
703 | case STATE_RENDEZVOUS: | 698 | case STATE_RENDEZVOUS: |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 7847ca13d6c2..852eda3953dc 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -398,7 +398,7 @@ void free_initmem(void) | |||
398 | addr = (unsigned long)(&__init_begin); | 398 | addr = (unsigned long)(&__init_begin); |
399 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 399 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
400 | ClearPageReserved(virt_to_page(addr)); | 400 | ClearPageReserved(virt_to_page(addr)); |
401 | set_page_count(virt_to_page(addr), 1); | 401 | init_page_count(virt_to_page(addr)); |
402 | free_page(addr); | 402 | free_page(addr); |
403 | num_physpages++; | 403 | num_physpages++; |
404 | totalram_pages++; | 404 | totalram_pages++; |
@@ -1018,7 +1018,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
1018 | printk(KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | 1018 | printk(KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10); |
1019 | for (; start < end; start += PAGE_SIZE) { | 1019 | for (; start < end; start += PAGE_SIZE) { |
1020 | ClearPageReserved(virt_to_page(start)); | 1020 | ClearPageReserved(virt_to_page(start)); |
1021 | set_page_count(virt_to_page(start), 1); | 1021 | init_page_count(virt_to_page(start)); |
1022 | free_page(start); | 1022 | free_page(start); |
1023 | num_physpages++; | 1023 | num_physpages++; |
1024 | totalram_pages++; | 1024 | totalram_pages++; |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index dfba81719dec..fae42da7468d 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -127,6 +127,12 @@ config PPC_83xx | |||
127 | select 83xx | 127 | select 83xx |
128 | select PPC_FPU | 128 | select PPC_FPU |
129 | 129 | ||
130 | config PPC_85xx | ||
131 | bool "Freescale 85xx" | ||
132 | select E500 | ||
133 | select FSL_SOC | ||
134 | select 85xx | ||
135 | |||
130 | config 40x | 136 | config 40x |
131 | bool "AMCC 40x" | 137 | bool "AMCC 40x" |
132 | 138 | ||
@@ -139,8 +145,6 @@ config 8xx | |||
139 | config E200 | 145 | config E200 |
140 | bool "Freescale e200" | 146 | bool "Freescale e200" |
141 | 147 | ||
142 | config E500 | ||
143 | bool "Freescale e500" | ||
144 | endchoice | 148 | endchoice |
145 | 149 | ||
146 | config POWER4_ONLY | 150 | config POWER4_ONLY |
@@ -168,6 +172,13 @@ config 6xx | |||
168 | config 83xx | 172 | config 83xx |
169 | bool | 173 | bool |
170 | 174 | ||
175 | # this is temp to handle compat with arch=ppc | ||
176 | config 85xx | ||
177 | bool | ||
178 | |||
179 | config E500 | ||
180 | bool | ||
181 | |||
171 | config PPC_FPU | 182 | config PPC_FPU |
172 | bool | 183 | bool |
173 | default y if PPC64 | 184 | default y if PPC64 |
@@ -217,6 +228,7 @@ config ALTIVEC | |||
217 | config SPE | 228 | config SPE |
218 | bool "SPE Support" | 229 | bool "SPE Support" |
219 | depends on E200 || E500 | 230 | depends on E200 || E500 |
231 | default y | ||
220 | ---help--- | 232 | ---help--- |
221 | This option enables kernel support for the Signal Processing | 233 | This option enables kernel support for the Signal Processing |
222 | Extensions (SPE) to the PowerPC processor. The kernel currently | 234 | Extensions (SPE) to the PowerPC processor. The kernel currently |
@@ -238,6 +250,21 @@ config PPC_STD_MMU_32 | |||
238 | def_bool y | 250 | def_bool y |
239 | depends on PPC_STD_MMU && PPC32 | 251 | depends on PPC_STD_MMU && PPC32 |
240 | 252 | ||
253 | config VIRT_CPU_ACCOUNTING | ||
254 | bool "Deterministic task and CPU time accounting" | ||
255 | depends on PPC64 | ||
256 | default y | ||
257 | help | ||
258 | Select this option to enable more accurate task and CPU time | ||
259 | accounting. This is done by reading a CPU counter on each | ||
260 | kernel entry and exit and on transitions within the kernel | ||
261 | between system, softirq and hardirq state, so there is a | ||
262 | small performance impact. This also enables accounting of | ||
263 | stolen time on logically-partitioned systems running on | ||
264 | IBM POWER5-based machines. | ||
265 | |||
266 | If in doubt, say Y here. | ||
267 | |||
241 | config SMP | 268 | config SMP |
242 | depends on PPC_STD_MMU | 269 | depends on PPC_STD_MMU |
243 | bool "Symmetric multi-processing support" | 270 | bool "Symmetric multi-processing support" |
@@ -734,13 +761,12 @@ config GENERIC_ISA_DMA | |||
734 | 761 | ||
735 | config PPC_I8259 | 762 | config PPC_I8259 |
736 | bool | 763 | bool |
737 | default y if 85xx | ||
738 | default n | 764 | default n |
739 | 765 | ||
740 | config PPC_INDIRECT_PCI | 766 | config PPC_INDIRECT_PCI |
741 | bool | 767 | bool |
742 | depends on PCI | 768 | depends on PCI |
743 | default y if 40x || 44x || 85xx | 769 | default y if 40x || 44x |
744 | default n | 770 | default n |
745 | 771 | ||
746 | config EISA | 772 | config EISA |
@@ -757,8 +783,8 @@ config MCA | |||
757 | bool | 783 | bool |
758 | 784 | ||
759 | config PCI | 785 | config PCI |
760 | bool "PCI support" if 40x || CPM2 || PPC_83xx || 85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) | 786 | bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) |
761 | default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !85xx | 787 | default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !PPC_85xx |
762 | default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS | 788 | default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS |
763 | default PCI_QSPAN if !4xx && !CPM2 && 8xx | 789 | default PCI_QSPAN if !4xx && !CPM2 && 8xx |
764 | help | 790 | help |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 5500ab55d042..829e017b8a54 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -148,9 +148,9 @@ all: $(KBUILD_IMAGE) | |||
148 | 148 | ||
149 | CPPFLAGS_vmlinux.lds := -Upowerpc | 149 | CPPFLAGS_vmlinux.lds := -Upowerpc |
150 | 150 | ||
151 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage | 151 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage vmlinux.bin |
152 | 152 | ||
153 | .PHONY: $(BOOT_TARGETS) | 153 | PHONY += $(BOOT_TARGETS) |
154 | 154 | ||
155 | boot := arch/$(ARCH)/boot | 155 | boot := arch/$(ARCH)/boot |
156 | 156 | ||
diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh index eacce9590816..b002bfd56786 100644 --- a/arch/powerpc/boot/install.sh +++ b/arch/powerpc/boot/install.sh | |||
@@ -1,7 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | 2 | # |
3 | # arch/ppc64/boot/install.sh | ||
4 | # | ||
5 | # This file is subject to the terms and conditions of the GNU General Public | 3 | # This file is subject to the terms and conditions of the GNU General Public |
6 | # License. See the file "COPYING" in the main directory of this archive | 4 | # License. See the file "COPYING" in the main directory of this archive |
7 | # for more details. | 5 | # for more details. |
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 55ec59867250..816446f0e497 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c | |||
@@ -152,7 +152,7 @@ static int is_elf64(void *hdr) | |||
152 | elf64ph = (Elf64_Phdr *)((unsigned long)elf64 + | 152 | elf64ph = (Elf64_Phdr *)((unsigned long)elf64 + |
153 | (unsigned long)elf64->e_phoff); | 153 | (unsigned long)elf64->e_phoff); |
154 | for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++) | 154 | for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++) |
155 | if (elf64ph->p_type == PT_LOAD && elf64ph->p_offset != 0) | 155 | if (elf64ph->p_type == PT_LOAD) |
156 | break; | 156 | break; |
157 | if (i >= (unsigned int)elf64->e_phnum) | 157 | if (i >= (unsigned int)elf64->e_phnum) |
158 | return 0; | 158 | return 0; |
@@ -193,7 +193,7 @@ static int is_elf32(void *hdr) | |||
193 | elf32 = (Elf32_Ehdr *)elfheader; | 193 | elf32 = (Elf32_Ehdr *)elfheader; |
194 | elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff); | 194 | elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff); |
195 | for (i = 0; i < elf32->e_phnum; i++, elf32ph++) | 195 | for (i = 0; i < elf32->e_phnum; i++, elf32ph++) |
196 | if (elf32ph->p_type == PT_LOAD && elf32ph->p_offset != 0) | 196 | if (elf32ph->p_type == PT_LOAD) |
197 | break; | 197 | break; |
198 | if (i >= elf32->e_phnum) | 198 | if (i >= elf32->e_phnum) |
199 | return 0; | 199 | return 0; |
diff --git a/arch/powerpc/configs/mpc8540_ads_defconfig b/arch/powerpc/configs/mpc8540_ads_defconfig new file mode 100644 index 000000000000..2a8290ee15c6 --- /dev/null +++ b/arch/powerpc/configs/mpc8540_ads_defconfig | |||
@@ -0,0 +1,721 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: | ||
4 | # Sat Jan 14 15:57:54 2006 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | CONFIG_PPC32=y | ||
8 | CONFIG_PPC_MERGE=y | ||
9 | CONFIG_MMU=y | ||
10 | CONFIG_GENERIC_HARDIRQS=y | ||
11 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
13 | CONFIG_PPC=y | ||
14 | CONFIG_EARLY_PRINTK=y | ||
15 | CONFIG_GENERIC_NVRAM=y | ||
16 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
17 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
18 | CONFIG_PPC_OF=y | ||
19 | CONFIG_PPC_UDBG_16550=y | ||
20 | # CONFIG_GENERIC_TBSYNC is not set | ||
21 | |||
22 | # | ||
23 | # Processor support | ||
24 | # | ||
25 | # CONFIG_CLASSIC32 is not set | ||
26 | # CONFIG_PPC_52xx is not set | ||
27 | # CONFIG_PPC_82xx is not set | ||
28 | # CONFIG_PPC_83xx is not set | ||
29 | CONFIG_PPC_85xx=y | ||
30 | # CONFIG_40x is not set | ||
31 | # CONFIG_44x is not set | ||
32 | # CONFIG_8xx is not set | ||
33 | # CONFIG_E200 is not set | ||
34 | CONFIG_85xx=y | ||
35 | CONFIG_E500=y | ||
36 | CONFIG_BOOKE=y | ||
37 | CONFIG_FSL_BOOKE=y | ||
38 | # CONFIG_PHYS_64BIT is not set | ||
39 | CONFIG_SPE=y | ||
40 | |||
41 | # | ||
42 | # Code maturity level options | ||
43 | # | ||
44 | CONFIG_EXPERIMENTAL=y | ||
45 | CONFIG_CLEAN_COMPILE=y | ||
46 | CONFIG_BROKEN_ON_SMP=y | ||
47 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
48 | |||
49 | # | ||
50 | # General setup | ||
51 | # | ||
52 | CONFIG_LOCALVERSION="" | ||
53 | CONFIG_LOCALVERSION_AUTO=y | ||
54 | CONFIG_SWAP=y | ||
55 | CONFIG_SYSVIPC=y | ||
56 | # CONFIG_POSIX_MQUEUE is not set | ||
57 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
58 | CONFIG_SYSCTL=y | ||
59 | # CONFIG_AUDIT is not set | ||
60 | # CONFIG_IKCONFIG is not set | ||
61 | CONFIG_INITRAMFS_SOURCE="" | ||
62 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
63 | CONFIG_EMBEDDED=y | ||
64 | CONFIG_KALLSYMS=y | ||
65 | # CONFIG_KALLSYMS_ALL is not set | ||
66 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
67 | CONFIG_HOTPLUG=y | ||
68 | CONFIG_PRINTK=y | ||
69 | CONFIG_BUG=y | ||
70 | CONFIG_ELF_CORE=y | ||
71 | CONFIG_BASE_FULL=y | ||
72 | CONFIG_FUTEX=y | ||
73 | CONFIG_EPOLL=y | ||
74 | CONFIG_SHMEM=y | ||
75 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
76 | CONFIG_CC_ALIGN_LABELS=0 | ||
77 | CONFIG_CC_ALIGN_LOOPS=0 | ||
78 | CONFIG_CC_ALIGN_JUMPS=0 | ||
79 | CONFIG_SLAB=y | ||
80 | # CONFIG_TINY_SHMEM is not set | ||
81 | CONFIG_BASE_SMALL=0 | ||
82 | # CONFIG_SLOB is not set | ||
83 | |||
84 | # | ||
85 | # Loadable module support | ||
86 | # | ||
87 | # CONFIG_MODULES is not set | ||
88 | |||
89 | # | ||
90 | # Block layer | ||
91 | # | ||
92 | # CONFIG_LBD is not set | ||
93 | |||
94 | # | ||
95 | # IO Schedulers | ||
96 | # | ||
97 | CONFIG_IOSCHED_NOOP=y | ||
98 | CONFIG_IOSCHED_AS=y | ||
99 | CONFIG_IOSCHED_DEADLINE=y | ||
100 | CONFIG_IOSCHED_CFQ=y | ||
101 | CONFIG_DEFAULT_AS=y | ||
102 | # CONFIG_DEFAULT_DEADLINE is not set | ||
103 | # CONFIG_DEFAULT_CFQ is not set | ||
104 | # CONFIG_DEFAULT_NOOP is not set | ||
105 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
106 | CONFIG_MPIC=y | ||
107 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
108 | |||
109 | # | ||
110 | # Platform support | ||
111 | # | ||
112 | CONFIG_MPC8540_ADS=y | ||
113 | CONFIG_MPC8540=y | ||
114 | CONFIG_PPC_INDIRECT_PCI_BE=y | ||
115 | |||
116 | # | ||
117 | # Kernel options | ||
118 | # | ||
119 | # CONFIG_HIGHMEM is not set | ||
120 | # CONFIG_HZ_100 is not set | ||
121 | CONFIG_HZ_250=y | ||
122 | # CONFIG_HZ_1000 is not set | ||
123 | CONFIG_HZ=250 | ||
124 | CONFIG_PREEMPT_NONE=y | ||
125 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
126 | # CONFIG_PREEMPT is not set | ||
127 | CONFIG_BINFMT_ELF=y | ||
128 | CONFIG_BINFMT_MISC=y | ||
129 | CONFIG_MATH_EMULATION=y | ||
130 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
131 | CONFIG_SELECT_MEMORY_MODEL=y | ||
132 | CONFIG_FLATMEM_MANUAL=y | ||
133 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
134 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
135 | CONFIG_FLATMEM=y | ||
136 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
137 | # CONFIG_SPARSEMEM_STATIC is not set | ||
138 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
139 | CONFIG_PROC_DEVICETREE=y | ||
140 | # CONFIG_CMDLINE_BOOL is not set | ||
141 | # CONFIG_PM is not set | ||
142 | # CONFIG_SOFTWARE_SUSPEND is not set | ||
143 | # CONFIG_SECCOMP is not set | ||
144 | CONFIG_ISA_DMA_API=y | ||
145 | |||
146 | # | ||
147 | # Bus options | ||
148 | # | ||
149 | # CONFIG_PPC_I8259 is not set | ||
150 | CONFIG_PPC_INDIRECT_PCI=y | ||
151 | CONFIG_FSL_SOC=y | ||
152 | # CONFIG_PCI is not set | ||
153 | # CONFIG_PCI_DOMAINS is not set | ||
154 | |||
155 | # | ||
156 | # PCCARD (PCMCIA/CardBus) support | ||
157 | # | ||
158 | # CONFIG_PCCARD is not set | ||
159 | |||
160 | # | ||
161 | # PCI Hotplug Support | ||
162 | # | ||
163 | |||
164 | # | ||
165 | # Advanced setup | ||
166 | # | ||
167 | # CONFIG_ADVANCED_OPTIONS is not set | ||
168 | |||
169 | # | ||
170 | # Default settings for advanced configuration options are used | ||
171 | # | ||
172 | CONFIG_HIGHMEM_START=0xfe000000 | ||
173 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
174 | CONFIG_KERNEL_START=0xc0000000 | ||
175 | CONFIG_TASK_SIZE=0x80000000 | ||
176 | CONFIG_BOOT_LOAD=0x00800000 | ||
177 | |||
178 | # | ||
179 | # Networking | ||
180 | # | ||
181 | CONFIG_NET=y | ||
182 | |||
183 | # | ||
184 | # Networking options | ||
185 | # | ||
186 | CONFIG_PACKET=y | ||
187 | # CONFIG_PACKET_MMAP is not set | ||
188 | CONFIG_UNIX=y | ||
189 | # CONFIG_NET_KEY is not set | ||
190 | CONFIG_INET=y | ||
191 | CONFIG_IP_MULTICAST=y | ||
192 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
193 | CONFIG_IP_FIB_HASH=y | ||
194 | CONFIG_IP_PNP=y | ||
195 | CONFIG_IP_PNP_DHCP=y | ||
196 | CONFIG_IP_PNP_BOOTP=y | ||
197 | # CONFIG_IP_PNP_RARP is not set | ||
198 | # CONFIG_NET_IPIP is not set | ||
199 | # CONFIG_NET_IPGRE is not set | ||
200 | # CONFIG_IP_MROUTE is not set | ||
201 | # CONFIG_ARPD is not set | ||
202 | CONFIG_SYN_COOKIES=y | ||
203 | # CONFIG_INET_AH is not set | ||
204 | # CONFIG_INET_ESP is not set | ||
205 | # CONFIG_INET_IPCOMP is not set | ||
206 | # CONFIG_INET_TUNNEL is not set | ||
207 | CONFIG_INET_DIAG=y | ||
208 | CONFIG_INET_TCP_DIAG=y | ||
209 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
210 | CONFIG_TCP_CONG_BIC=y | ||
211 | # CONFIG_IPV6 is not set | ||
212 | # CONFIG_NETFILTER is not set | ||
213 | |||
214 | # | ||
215 | # DCCP Configuration (EXPERIMENTAL) | ||
216 | # | ||
217 | # CONFIG_IP_DCCP is not set | ||
218 | |||
219 | # | ||
220 | # SCTP Configuration (EXPERIMENTAL) | ||
221 | # | ||
222 | # CONFIG_IP_SCTP is not set | ||
223 | # CONFIG_ATM is not set | ||
224 | # CONFIG_BRIDGE is not set | ||
225 | # CONFIG_VLAN_8021Q is not set | ||
226 | # CONFIG_DECNET is not set | ||
227 | # CONFIG_LLC2 is not set | ||
228 | # CONFIG_IPX is not set | ||
229 | # CONFIG_ATALK is not set | ||
230 | # CONFIG_X25 is not set | ||
231 | # CONFIG_LAPB is not set | ||
232 | |||
233 | # | ||
234 | # TIPC Configuration (EXPERIMENTAL) | ||
235 | # | ||
236 | # CONFIG_TIPC is not set | ||
237 | # CONFIG_NET_DIVERT is not set | ||
238 | # CONFIG_ECONET is not set | ||
239 | # CONFIG_WAN_ROUTER is not set | ||
240 | |||
241 | # | ||
242 | # QoS and/or fair queueing | ||
243 | # | ||
244 | # CONFIG_NET_SCHED is not set | ||
245 | |||
246 | # | ||
247 | # Network testing | ||
248 | # | ||
249 | # CONFIG_NET_PKTGEN is not set | ||
250 | # CONFIG_HAMRADIO is not set | ||
251 | # CONFIG_IRDA is not set | ||
252 | # CONFIG_BT is not set | ||
253 | # CONFIG_IEEE80211 is not set | ||
254 | |||
255 | # | ||
256 | # Device Drivers | ||
257 | # | ||
258 | |||
259 | # | ||
260 | # Generic Driver Options | ||
261 | # | ||
262 | CONFIG_STANDALONE=y | ||
263 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
264 | # CONFIG_FW_LOADER is not set | ||
265 | # CONFIG_DEBUG_DRIVER is not set | ||
266 | |||
267 | # | ||
268 | # Connector - unified userspace <-> kernelspace linker | ||
269 | # | ||
270 | # CONFIG_CONNECTOR is not set | ||
271 | |||
272 | # | ||
273 | # Memory Technology Devices (MTD) | ||
274 | # | ||
275 | # CONFIG_MTD is not set | ||
276 | |||
277 | # | ||
278 | # Parallel port support | ||
279 | # | ||
280 | # CONFIG_PARPORT is not set | ||
281 | |||
282 | # | ||
283 | # Plug and Play support | ||
284 | # | ||
285 | |||
286 | # | ||
287 | # Block devices | ||
288 | # | ||
289 | # CONFIG_BLK_DEV_FD is not set | ||
290 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
291 | CONFIG_BLK_DEV_LOOP=y | ||
292 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
293 | # CONFIG_BLK_DEV_NBD is not set | ||
294 | CONFIG_BLK_DEV_RAM=y | ||
295 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
296 | CONFIG_BLK_DEV_RAM_SIZE=32768 | ||
297 | CONFIG_BLK_DEV_INITRD=y | ||
298 | # CONFIG_CDROM_PKTCDVD is not set | ||
299 | # CONFIG_ATA_OVER_ETH is not set | ||
300 | |||
301 | # | ||
302 | # ATA/ATAPI/MFM/RLL support | ||
303 | # | ||
304 | # CONFIG_IDE is not set | ||
305 | |||
306 | # | ||
307 | # SCSI device support | ||
308 | # | ||
309 | # CONFIG_RAID_ATTRS is not set | ||
310 | # CONFIG_SCSI is not set | ||
311 | |||
312 | # | ||
313 | # Multi-device support (RAID and LVM) | ||
314 | # | ||
315 | # CONFIG_MD is not set | ||
316 | |||
317 | # | ||
318 | # Fusion MPT device support | ||
319 | # | ||
320 | # CONFIG_FUSION is not set | ||
321 | |||
322 | # | ||
323 | # IEEE 1394 (FireWire) support | ||
324 | # | ||
325 | |||
326 | # | ||
327 | # I2O device support | ||
328 | # | ||
329 | |||
330 | # | ||
331 | # Macintosh device drivers | ||
332 | # | ||
333 | # CONFIG_WINDFARM is not set | ||
334 | |||
335 | # | ||
336 | # Network device support | ||
337 | # | ||
338 | CONFIG_NETDEVICES=y | ||
339 | # CONFIG_DUMMY is not set | ||
340 | # CONFIG_BONDING is not set | ||
341 | # CONFIG_EQUALIZER is not set | ||
342 | # CONFIG_TUN is not set | ||
343 | |||
344 | # | ||
345 | # PHY device support | ||
346 | # | ||
347 | CONFIG_PHYLIB=y | ||
348 | |||
349 | # | ||
350 | # MII PHY device drivers | ||
351 | # | ||
352 | # CONFIG_MARVELL_PHY is not set | ||
353 | # CONFIG_DAVICOM_PHY is not set | ||
354 | # CONFIG_QSEMI_PHY is not set | ||
355 | # CONFIG_LXT_PHY is not set | ||
356 | # CONFIG_CICADA_PHY is not set | ||
357 | |||
358 | # | ||
359 | # Ethernet (10 or 100Mbit) | ||
360 | # | ||
361 | CONFIG_NET_ETHERNET=y | ||
362 | CONFIG_MII=y | ||
363 | |||
364 | # | ||
365 | # Ethernet (1000 Mbit) | ||
366 | # | ||
367 | CONFIG_GIANFAR=y | ||
368 | CONFIG_GFAR_NAPI=y | ||
369 | |||
370 | # | ||
371 | # Ethernet (10000 Mbit) | ||
372 | # | ||
373 | |||
374 | # | ||
375 | # Token Ring devices | ||
376 | # | ||
377 | |||
378 | # | ||
379 | # Wireless LAN (non-hamradio) | ||
380 | # | ||
381 | # CONFIG_NET_RADIO is not set | ||
382 | |||
383 | # | ||
384 | # Wan interfaces | ||
385 | # | ||
386 | # CONFIG_WAN is not set | ||
387 | # CONFIG_PPP is not set | ||
388 | # CONFIG_SLIP is not set | ||
389 | # CONFIG_SHAPER is not set | ||
390 | # CONFIG_NETCONSOLE is not set | ||
391 | # CONFIG_NETPOLL is not set | ||
392 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
393 | |||
394 | # | ||
395 | # ISDN subsystem | ||
396 | # | ||
397 | # CONFIG_ISDN is not set | ||
398 | |||
399 | # | ||
400 | # Telephony Support | ||
401 | # | ||
402 | # CONFIG_PHONE is not set | ||
403 | |||
404 | # | ||
405 | # Input device support | ||
406 | # | ||
407 | CONFIG_INPUT=y | ||
408 | |||
409 | # | ||
410 | # Userland interfaces | ||
411 | # | ||
412 | # CONFIG_INPUT_MOUSEDEV is not set | ||
413 | # CONFIG_INPUT_JOYDEV is not set | ||
414 | # CONFIG_INPUT_TSDEV is not set | ||
415 | # CONFIG_INPUT_EVDEV is not set | ||
416 | # CONFIG_INPUT_EVBUG is not set | ||
417 | |||
418 | # | ||
419 | # Input Device Drivers | ||
420 | # | ||
421 | # CONFIG_INPUT_KEYBOARD is not set | ||
422 | # CONFIG_INPUT_MOUSE is not set | ||
423 | # CONFIG_INPUT_JOYSTICK is not set | ||
424 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
425 | # CONFIG_INPUT_MISC is not set | ||
426 | |||
427 | # | ||
428 | # Hardware I/O ports | ||
429 | # | ||
430 | # CONFIG_SERIO is not set | ||
431 | # CONFIG_GAMEPORT is not set | ||
432 | |||
433 | # | ||
434 | # Character devices | ||
435 | # | ||
436 | # CONFIG_VT is not set | ||
437 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
438 | |||
439 | # | ||
440 | # Serial drivers | ||
441 | # | ||
442 | CONFIG_SERIAL_8250=y | ||
443 | CONFIG_SERIAL_8250_CONSOLE=y | ||
444 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
445 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
446 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
447 | |||
448 | # | ||
449 | # Non-8250 serial port support | ||
450 | # | ||
451 | CONFIG_SERIAL_CORE=y | ||
452 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
453 | CONFIG_UNIX98_PTYS=y | ||
454 | CONFIG_LEGACY_PTYS=y | ||
455 | CONFIG_LEGACY_PTY_COUNT=256 | ||
456 | |||
457 | # | ||
458 | # IPMI | ||
459 | # | ||
460 | # CONFIG_IPMI_HANDLER is not set | ||
461 | |||
462 | # | ||
463 | # Watchdog Cards | ||
464 | # | ||
465 | # CONFIG_WATCHDOG is not set | ||
466 | # CONFIG_NVRAM is not set | ||
467 | CONFIG_GEN_RTC=y | ||
468 | # CONFIG_GEN_RTC_X is not set | ||
469 | # CONFIG_DTLK is not set | ||
470 | # CONFIG_R3964 is not set | ||
471 | |||
472 | # | ||
473 | # Ftape, the floppy tape device driver | ||
474 | # | ||
475 | # CONFIG_AGP is not set | ||
476 | # CONFIG_RAW_DRIVER is not set | ||
477 | |||
478 | # | ||
479 | # TPM devices | ||
480 | # | ||
481 | # CONFIG_TCG_TPM is not set | ||
482 | # CONFIG_TELCLOCK is not set | ||
483 | |||
484 | # | ||
485 | # I2C support | ||
486 | # | ||
487 | # CONFIG_I2C is not set | ||
488 | |||
489 | # | ||
490 | # Dallas's 1-wire bus | ||
491 | # | ||
492 | # CONFIG_W1 is not set | ||
493 | |||
494 | # | ||
495 | # Hardware Monitoring support | ||
496 | # | ||
497 | CONFIG_HWMON=y | ||
498 | # CONFIG_HWMON_VID is not set | ||
499 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
500 | |||
501 | # | ||
502 | # Misc devices | ||
503 | # | ||
504 | |||
505 | # | ||
506 | # Multimedia Capabilities Port drivers | ||
507 | # | ||
508 | |||
509 | # | ||
510 | # Multimedia devices | ||
511 | # | ||
512 | # CONFIG_VIDEO_DEV is not set | ||
513 | |||
514 | # | ||
515 | # Digital Video Broadcasting Devices | ||
516 | # | ||
517 | # CONFIG_DVB is not set | ||
518 | |||
519 | # | ||
520 | # Graphics support | ||
521 | # | ||
522 | # CONFIG_FB is not set | ||
523 | |||
524 | # | ||
525 | # Sound | ||
526 | # | ||
527 | # CONFIG_SOUND is not set | ||
528 | |||
529 | # | ||
530 | # USB support | ||
531 | # | ||
532 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
533 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
534 | |||
535 | # | ||
536 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
537 | # | ||
538 | |||
539 | # | ||
540 | # USB Gadget Support | ||
541 | # | ||
542 | # CONFIG_USB_GADGET is not set | ||
543 | |||
544 | # | ||
545 | # MMC/SD Card support | ||
546 | # | ||
547 | # CONFIG_MMC is not set | ||
548 | |||
549 | # | ||
550 | # InfiniBand support | ||
551 | # | ||
552 | |||
553 | # | ||
554 | # SN Devices | ||
555 | # | ||
556 | |||
557 | # | ||
558 | # File systems | ||
559 | # | ||
560 | CONFIG_EXT2_FS=y | ||
561 | # CONFIG_EXT2_FS_XATTR is not set | ||
562 | # CONFIG_EXT2_FS_XIP is not set | ||
563 | CONFIG_EXT3_FS=y | ||
564 | CONFIG_EXT3_FS_XATTR=y | ||
565 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
566 | # CONFIG_EXT3_FS_SECURITY is not set | ||
567 | CONFIG_JBD=y | ||
568 | # CONFIG_JBD_DEBUG is not set | ||
569 | CONFIG_FS_MBCACHE=y | ||
570 | # CONFIG_REISERFS_FS is not set | ||
571 | # CONFIG_JFS_FS is not set | ||
572 | # CONFIG_FS_POSIX_ACL is not set | ||
573 | # CONFIG_XFS_FS is not set | ||
574 | # CONFIG_OCFS2_FS is not set | ||
575 | # CONFIG_MINIX_FS is not set | ||
576 | # CONFIG_ROMFS_FS is not set | ||
577 | CONFIG_INOTIFY=y | ||
578 | # CONFIG_QUOTA is not set | ||
579 | CONFIG_DNOTIFY=y | ||
580 | # CONFIG_AUTOFS_FS is not set | ||
581 | # CONFIG_AUTOFS4_FS is not set | ||
582 | # CONFIG_FUSE_FS is not set | ||
583 | |||
584 | # | ||
585 | # CD-ROM/DVD Filesystems | ||
586 | # | ||
587 | # CONFIG_ISO9660_FS is not set | ||
588 | # CONFIG_UDF_FS is not set | ||
589 | |||
590 | # | ||
591 | # DOS/FAT/NT Filesystems | ||
592 | # | ||
593 | # CONFIG_MSDOS_FS is not set | ||
594 | # CONFIG_VFAT_FS is not set | ||
595 | # CONFIG_NTFS_FS is not set | ||
596 | |||
597 | # | ||
598 | # Pseudo filesystems | ||
599 | # | ||
600 | CONFIG_PROC_FS=y | ||
601 | CONFIG_PROC_KCORE=y | ||
602 | CONFIG_SYSFS=y | ||
603 | CONFIG_TMPFS=y | ||
604 | # CONFIG_HUGETLB_PAGE is not set | ||
605 | CONFIG_RAMFS=y | ||
606 | # CONFIG_RELAYFS_FS is not set | ||
607 | # CONFIG_CONFIGFS_FS is not set | ||
608 | |||
609 | # | ||
610 | # Miscellaneous filesystems | ||
611 | # | ||
612 | # CONFIG_ADFS_FS is not set | ||
613 | # CONFIG_AFFS_FS is not set | ||
614 | # CONFIG_HFS_FS is not set | ||
615 | # CONFIG_HFSPLUS_FS is not set | ||
616 | # CONFIG_BEFS_FS is not set | ||
617 | # CONFIG_BFS_FS is not set | ||
618 | # CONFIG_EFS_FS is not set | ||
619 | # CONFIG_CRAMFS is not set | ||
620 | # CONFIG_VXFS_FS is not set | ||
621 | # CONFIG_HPFS_FS is not set | ||
622 | # CONFIG_QNX4FS_FS is not set | ||
623 | # CONFIG_SYSV_FS is not set | ||
624 | # CONFIG_UFS_FS is not set | ||
625 | |||
626 | # | ||
627 | # Network File Systems | ||
628 | # | ||
629 | CONFIG_NFS_FS=y | ||
630 | # CONFIG_NFS_V3 is not set | ||
631 | # CONFIG_NFS_V4 is not set | ||
632 | # CONFIG_NFS_DIRECTIO is not set | ||
633 | # CONFIG_NFSD is not set | ||
634 | CONFIG_ROOT_NFS=y | ||
635 | CONFIG_LOCKD=y | ||
636 | CONFIG_NFS_COMMON=y | ||
637 | CONFIG_SUNRPC=y | ||
638 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
639 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
640 | # CONFIG_SMB_FS is not set | ||
641 | # CONFIG_CIFS is not set | ||
642 | # CONFIG_NCP_FS is not set | ||
643 | # CONFIG_CODA_FS is not set | ||
644 | # CONFIG_AFS_FS is not set | ||
645 | # CONFIG_9P_FS is not set | ||
646 | |||
647 | # | ||
648 | # Partition Types | ||
649 | # | ||
650 | CONFIG_PARTITION_ADVANCED=y | ||
651 | # CONFIG_ACORN_PARTITION is not set | ||
652 | # CONFIG_OSF_PARTITION is not set | ||
653 | # CONFIG_AMIGA_PARTITION is not set | ||
654 | # CONFIG_ATARI_PARTITION is not set | ||
655 | # CONFIG_MAC_PARTITION is not set | ||
656 | # CONFIG_MSDOS_PARTITION is not set | ||
657 | # CONFIG_LDM_PARTITION is not set | ||
658 | # CONFIG_SGI_PARTITION is not set | ||
659 | # CONFIG_ULTRIX_PARTITION is not set | ||
660 | # CONFIG_SUN_PARTITION is not set | ||
661 | # CONFIG_EFI_PARTITION is not set | ||
662 | |||
663 | # | ||
664 | # Native Language Support | ||
665 | # | ||
666 | # CONFIG_NLS is not set | ||
667 | |||
668 | # | ||
669 | # Library routines | ||
670 | # | ||
671 | # CONFIG_CRC_CCITT is not set | ||
672 | # CONFIG_CRC16 is not set | ||
673 | CONFIG_CRC32=y | ||
674 | # CONFIG_LIBCRC32C is not set | ||
675 | |||
676 | # | ||
677 | # Instrumentation Support | ||
678 | # | ||
679 | # CONFIG_PROFILING is not set | ||
680 | |||
681 | # | ||
682 | # Kernel hacking | ||
683 | # | ||
684 | # CONFIG_PRINTK_TIME is not set | ||
685 | # CONFIG_MAGIC_SYSRQ is not set | ||
686 | CONFIG_DEBUG_KERNEL=y | ||
687 | CONFIG_LOG_BUF_SHIFT=14 | ||
688 | CONFIG_DETECT_SOFTLOCKUP=y | ||
689 | # CONFIG_SCHEDSTATS is not set | ||
690 | # CONFIG_DEBUG_SLAB is not set | ||
691 | CONFIG_DEBUG_MUTEXES=y | ||
692 | # CONFIG_DEBUG_SPINLOCK is not set | ||
693 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
694 | # CONFIG_DEBUG_KOBJECT is not set | ||
695 | # CONFIG_DEBUG_INFO is not set | ||
696 | # CONFIG_DEBUG_FS is not set | ||
697 | # CONFIG_DEBUG_VM is not set | ||
698 | # CONFIG_RCU_TORTURE_TEST is not set | ||
699 | # CONFIG_DEBUGGER is not set | ||
700 | # CONFIG_BDI_SWITCH is not set | ||
701 | # CONFIG_BOOTX_TEXT is not set | ||
702 | # CONFIG_PPC_EARLY_DEBUG_LPAR is not set | ||
703 | # CONFIG_PPC_EARLY_DEBUG_G5 is not set | ||
704 | # CONFIG_PPC_EARLY_DEBUG_RTAS is not set | ||
705 | # CONFIG_PPC_EARLY_DEBUG_MAPLE is not set | ||
706 | # CONFIG_PPC_EARLY_DEBUG_ISERIES is not set | ||
707 | |||
708 | # | ||
709 | # Security options | ||
710 | # | ||
711 | # CONFIG_KEYS is not set | ||
712 | # CONFIG_SECURITY is not set | ||
713 | |||
714 | # | ||
715 | # Cryptographic options | ||
716 | # | ||
717 | # CONFIG_CRYPTO is not set | ||
718 | |||
719 | # | ||
720 | # Hardware crypto devices | ||
721 | # | ||
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index c9a660e4c2db..882889b15926 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -136,6 +136,9 @@ int main(void) | |||
136 | DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp)); | 136 | DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp)); |
137 | DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr)); | 137 | DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr)); |
138 | DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); | 138 | DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); |
139 | DEFINE(PACA_STARTPURR, offsetof(struct paca_struct, startpurr)); | ||
140 | DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time)); | ||
141 | DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time)); | ||
139 | 142 | ||
140 | DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0)); | 143 | DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0)); |
141 | DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1)); | 144 | DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1)); |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index e4e81374cb9a..39e348a3ade2 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -894,7 +894,7 @@ struct cpu_spec cpu_specs[] = { | |||
894 | .platform = "ppc405", | 894 | .platform = "ppc405", |
895 | }, | 895 | }, |
896 | { /* Xilinx Virtex-II Pro */ | 896 | { /* Xilinx Virtex-II Pro */ |
897 | .pvr_mask = 0xffff0000, | 897 | .pvr_mask = 0xfffff000, |
898 | .pvr_value = 0x20010000, | 898 | .pvr_value = 0x20010000, |
899 | .cpu_name = "Virtex-II Pro", | 899 | .cpu_name = "Virtex-II Pro", |
900 | .cpu_features = CPU_FTRS_40X, | 900 | .cpu_features = CPU_FTRS_40X, |
@@ -904,6 +904,16 @@ struct cpu_spec cpu_specs[] = { | |||
904 | .dcache_bsize = 32, | 904 | .dcache_bsize = 32, |
905 | .platform = "ppc405", | 905 | .platform = "ppc405", |
906 | }, | 906 | }, |
907 | { /* Xilinx Virtex-4 FX */ | ||
908 | .pvr_mask = 0xfffff000, | ||
909 | .pvr_value = 0x20011000, | ||
910 | .cpu_name = "Virtex-4 FX", | ||
911 | .cpu_features = CPU_FTRS_40X, | ||
912 | .cpu_user_features = PPC_FEATURE_32 | | ||
913 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | ||
914 | .icache_bsize = 32, | ||
915 | .dcache_bsize = 32, | ||
916 | }, | ||
907 | { /* 405EP */ | 917 | { /* 405EP */ |
908 | .pvr_mask = 0xffff0000, | 918 | .pvr_mask = 0xffff0000, |
909 | .pvr_value = 0x51210000, | 919 | .pvr_value = 0x51210000, |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 24be0cf86d7f..1060155d84c3 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/entry.S | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | 4 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP |
@@ -63,6 +61,7 @@ system_call_common: | |||
63 | std r12,_MSR(r1) | 61 | std r12,_MSR(r1) |
64 | std r0,GPR0(r1) | 62 | std r0,GPR0(r1) |
65 | std r10,GPR1(r1) | 63 | std r10,GPR1(r1) |
64 | ACCOUNT_CPU_USER_ENTRY(r10, r11) | ||
66 | std r2,GPR2(r1) | 65 | std r2,GPR2(r1) |
67 | std r3,GPR3(r1) | 66 | std r3,GPR3(r1) |
68 | std r4,GPR4(r1) | 67 | std r4,GPR4(r1) |
@@ -170,8 +169,9 @@ syscall_error_cont: | |||
170 | stdcx. r0,0,r1 /* to clear the reservation */ | 169 | stdcx. r0,0,r1 /* to clear the reservation */ |
171 | andi. r6,r8,MSR_PR | 170 | andi. r6,r8,MSR_PR |
172 | ld r4,_LINK(r1) | 171 | ld r4,_LINK(r1) |
173 | beq- 1f /* only restore r13 if */ | 172 | beq- 1f |
174 | ld r13,GPR13(r1) /* returning to usermode */ | 173 | ACCOUNT_CPU_USER_EXIT(r11, r12) |
174 | ld r13,GPR13(r1) /* only restore r13 if returning to usermode */ | ||
175 | 1: ld r2,GPR2(r1) | 175 | 1: ld r2,GPR2(r1) |
176 | li r12,MSR_RI | 176 | li r12,MSR_RI |
177 | andc r11,r10,r12 | 177 | andc r11,r10,r12 |
@@ -322,7 +322,7 @@ _GLOBAL(ret_from_fork) | |||
322 | * the fork code also. | 322 | * the fork code also. |
323 | * | 323 | * |
324 | * The code which creates the new task context is in 'copy_thread' | 324 | * The code which creates the new task context is in 'copy_thread' |
325 | * in arch/ppc64/kernel/process.c | 325 | * in arch/powerpc/kernel/process.c |
326 | */ | 326 | */ |
327 | .align 7 | 327 | .align 7 |
328 | _GLOBAL(_switch) | 328 | _GLOBAL(_switch) |
@@ -486,6 +486,7 @@ restore: | |||
486 | * userspace | 486 | * userspace |
487 | */ | 487 | */ |
488 | beq 1f | 488 | beq 1f |
489 | ACCOUNT_CPU_USER_EXIT(r3, r4) | ||
489 | REST_GPR(13, r1) | 490 | REST_GPR(13, r1) |
490 | 1: | 491 | 1: |
491 | ld r3,_CTR(r1) | 492 | ld r3,_CTR(r1) |
diff --git a/arch/powerpc/kernel/firmware.c b/arch/powerpc/kernel/firmware.c index 65eae752a527..4d37a3cb80f6 100644 --- a/arch/powerpc/kernel/firmware.c +++ b/arch/powerpc/kernel/firmware.c | |||
@@ -18,28 +18,3 @@ | |||
18 | #include <asm/firmware.h> | 18 | #include <asm/firmware.h> |
19 | 19 | ||
20 | unsigned long ppc64_firmware_features; | 20 | unsigned long ppc64_firmware_features; |
21 | |||
22 | #ifdef CONFIG_PPC_PSERIES | ||
23 | firmware_feature_t firmware_features_table[FIRMWARE_MAX_FEATURES] = { | ||
24 | {FW_FEATURE_PFT, "hcall-pft"}, | ||
25 | {FW_FEATURE_TCE, "hcall-tce"}, | ||
26 | {FW_FEATURE_SPRG0, "hcall-sprg0"}, | ||
27 | {FW_FEATURE_DABR, "hcall-dabr"}, | ||
28 | {FW_FEATURE_COPY, "hcall-copy"}, | ||
29 | {FW_FEATURE_ASR, "hcall-asr"}, | ||
30 | {FW_FEATURE_DEBUG, "hcall-debug"}, | ||
31 | {FW_FEATURE_PERF, "hcall-perf"}, | ||
32 | {FW_FEATURE_DUMP, "hcall-dump"}, | ||
33 | {FW_FEATURE_INTERRUPT, "hcall-interrupt"}, | ||
34 | {FW_FEATURE_MIGRATE, "hcall-migrate"}, | ||
35 | {FW_FEATURE_PERFMON, "hcall-perfmon"}, | ||
36 | {FW_FEATURE_CRQ, "hcall-crq"}, | ||
37 | {FW_FEATURE_VIO, "hcall-vio"}, | ||
38 | {FW_FEATURE_RDMA, "hcall-rdma"}, | ||
39 | {FW_FEATURE_LLAN, "hcall-lLAN"}, | ||
40 | {FW_FEATURE_BULK, "hcall-bulk"}, | ||
41 | {FW_FEATURE_XDABR, "hcall-xdabr"}, | ||
42 | {FW_FEATURE_MULTITCE, "hcall-multi-tce"}, | ||
43 | {FW_FEATURE_SPLPAR, "hcall-splpar"}, | ||
44 | }; | ||
45 | #endif | ||
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index 8b49679fad54..47c7fa148c9a 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/head_44x.S | ||
3 | * | ||
4 | * Kernel execution entry point code. | 2 | * Kernel execution entry point code. |
5 | * | 3 | * |
6 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> | 4 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 9b65029dd2a3..35084f3a841b 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/head.S | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * | 4 | * |
@@ -279,6 +277,7 @@ exception_marker: | |||
279 | std r10,0(r1); /* make stack chain pointer */ \ | 277 | std r10,0(r1); /* make stack chain pointer */ \ |
280 | std r0,GPR0(r1); /* save r0 in stackframe */ \ | 278 | std r0,GPR0(r1); /* save r0 in stackframe */ \ |
281 | std r10,GPR1(r1); /* save r1 in stackframe */ \ | 279 | std r10,GPR1(r1); /* save r1 in stackframe */ \ |
280 | ACCOUNT_CPU_USER_ENTRY(r9, r10); \ | ||
282 | std r2,GPR2(r1); /* save r2 in stackframe */ \ | 281 | std r2,GPR2(r1); /* save r2 in stackframe */ \ |
283 | SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ | 282 | SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ |
284 | SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ | 283 | SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ |
@@ -846,6 +845,14 @@ fast_exception_return: | |||
846 | ld r11,_NIP(r1) | 845 | ld r11,_NIP(r1) |
847 | andi. r3,r12,MSR_RI /* check if RI is set */ | 846 | andi. r3,r12,MSR_RI /* check if RI is set */ |
848 | beq- unrecov_fer | 847 | beq- unrecov_fer |
848 | |||
849 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
850 | andi. r3,r12,MSR_PR | ||
851 | beq 2f | ||
852 | ACCOUNT_CPU_USER_EXIT(r3, r4) | ||
853 | 2: | ||
854 | #endif | ||
855 | |||
849 | ld r3,_CCR(r1) | 856 | ld r3,_CCR(r1) |
850 | ld r4,_LINK(r1) | 857 | ld r4,_LINK(r1) |
851 | ld r5,_CTR(r1) | 858 | ld r5,_CTR(r1) |
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index bc6d1ac55235..28941f5ce673 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/except_8xx.S | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | 4 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP |
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h new file mode 100644 index 000000000000..8536e7676160 --- /dev/null +++ b/arch/powerpc/kernel/head_booke.h | |||
@@ -0,0 +1,363 @@ | |||
1 | #ifndef __HEAD_BOOKE_H__ | ||
2 | #define __HEAD_BOOKE_H__ | ||
3 | |||
4 | /* | ||
5 | * Macros used for common Book-e exception handling | ||
6 | */ | ||
7 | |||
8 | #define SET_IVOR(vector_number, vector_label) \ | ||
9 | li r26,vector_label@l; \ | ||
10 | mtspr SPRN_IVOR##vector_number,r26; \ | ||
11 | sync | ||
12 | |||
13 | #define NORMAL_EXCEPTION_PROLOG \ | ||
14 | mtspr SPRN_SPRG0,r10; /* save two registers to work with */\ | ||
15 | mtspr SPRN_SPRG1,r11; \ | ||
16 | mtspr SPRN_SPRG4W,r1; \ | ||
17 | mfcr r10; /* save CR in r10 for now */\ | ||
18 | mfspr r11,SPRN_SRR1; /* check whether user or kernel */\ | ||
19 | andi. r11,r11,MSR_PR; \ | ||
20 | beq 1f; \ | ||
21 | mfspr r1,SPRN_SPRG3; /* if from user, start at top of */\ | ||
22 | lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ | ||
23 | addi r1,r1,THREAD_SIZE; \ | ||
24 | 1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ | ||
25 | mr r11,r1; \ | ||
26 | stw r10,_CCR(r11); /* save various registers */\ | ||
27 | stw r12,GPR12(r11); \ | ||
28 | stw r9,GPR9(r11); \ | ||
29 | mfspr r10,SPRN_SPRG0; \ | ||
30 | stw r10,GPR10(r11); \ | ||
31 | mfspr r12,SPRN_SPRG1; \ | ||
32 | stw r12,GPR11(r11); \ | ||
33 | mflr r10; \ | ||
34 | stw r10,_LINK(r11); \ | ||
35 | mfspr r10,SPRN_SPRG4R; \ | ||
36 | mfspr r12,SPRN_SRR0; \ | ||
37 | stw r10,GPR1(r11); \ | ||
38 | mfspr r9,SPRN_SRR1; \ | ||
39 | stw r10,0(r11); \ | ||
40 | rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ | ||
41 | stw r0,GPR0(r11); \ | ||
42 | SAVE_4GPRS(3, r11); \ | ||
43 | SAVE_2GPRS(7, r11) | ||
44 | |||
45 | /* To handle the additional exception priority levels on 40x and Book-E | ||
46 | * processors we allocate a 4k stack per additional priority level. The various | ||
47 | * head_xxx.S files allocate space (exception_stack_top) for each priority's | ||
48 | * stack times the number of CPUs | ||
49 | * | ||
50 | * On 40x critical is the only additional level | ||
51 | * On 44x/e500 we have critical and machine check | ||
52 | * On e200 we have critical and debug (machine check occurs via critical) | ||
53 | * | ||
54 | * Additionally we reserve a SPRG for each priority level so we can free up a | ||
55 | * GPR to use as the base for indirect access to the exception stacks. This | ||
56 | * is necessary since the MMU is always on, for Book-E parts, and the stacks | ||
57 | * are offset from KERNELBASE. | ||
58 | * | ||
59 | */ | ||
60 | #define BOOKE_EXCEPTION_STACK_SIZE (8192) | ||
61 | |||
62 | /* CRIT_SPRG only used in critical exception handling */ | ||
63 | #define CRIT_SPRG SPRN_SPRG2 | ||
64 | /* MCHECK_SPRG only used in machine check exception handling */ | ||
65 | #define MCHECK_SPRG SPRN_SPRG6W | ||
66 | |||
67 | #define MCHECK_STACK_TOP (exception_stack_top - 4096) | ||
68 | #define CRIT_STACK_TOP (exception_stack_top) | ||
69 | |||
70 | /* only on e200 for now */ | ||
71 | #define DEBUG_STACK_TOP (exception_stack_top - 4096) | ||
72 | #define DEBUG_SPRG SPRN_SPRG6W | ||
73 | |||
74 | #ifdef CONFIG_SMP | ||
75 | #define BOOKE_LOAD_EXC_LEVEL_STACK(level) \ | ||
76 | mfspr r8,SPRN_PIR; \ | ||
77 | mulli r8,r8,BOOKE_EXCEPTION_STACK_SIZE; \ | ||
78 | neg r8,r8; \ | ||
79 | addis r8,r8,level##_STACK_TOP@ha; \ | ||
80 | addi r8,r8,level##_STACK_TOP@l | ||
81 | #else | ||
82 | #define BOOKE_LOAD_EXC_LEVEL_STACK(level) \ | ||
83 | lis r8,level##_STACK_TOP@h; \ | ||
84 | ori r8,r8,level##_STACK_TOP@l | ||
85 | #endif | ||
86 | |||
87 | /* | ||
88 | * Exception prolog for critical/machine check exceptions. This is a | ||
89 | * little different from the normal exception prolog above since a | ||
90 | * critical/machine check exception can potentially occur at any point | ||
91 | * during normal exception processing. Thus we cannot use the same SPRG | ||
92 | * registers as the normal prolog above. Instead we use a portion of the | ||
93 | * critical/machine check exception stack at low physical addresses. | ||
94 | */ | ||
95 | #define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, exc_level_srr0, exc_level_srr1) \ | ||
96 | mtspr exc_level##_SPRG,r8; \ | ||
97 | BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \ | ||
98 | stw r10,GPR10-INT_FRAME_SIZE(r8); \ | ||
99 | stw r11,GPR11-INT_FRAME_SIZE(r8); \ | ||
100 | mfcr r10; /* save CR in r10 for now */\ | ||
101 | mfspr r11,exc_level_srr1; /* check whether user or kernel */\ | ||
102 | andi. r11,r11,MSR_PR; \ | ||
103 | mr r11,r8; \ | ||
104 | mfspr r8,exc_level##_SPRG; \ | ||
105 | beq 1f; \ | ||
106 | /* COMING FROM USER MODE */ \ | ||
107 | mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\ | ||
108 | lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ | ||
109 | addi r11,r11,THREAD_SIZE; \ | ||
110 | 1: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\ | ||
111 | stw r10,_CCR(r11); /* save various registers */\ | ||
112 | stw r12,GPR12(r11); \ | ||
113 | stw r9,GPR9(r11); \ | ||
114 | mflr r10; \ | ||
115 | stw r10,_LINK(r11); \ | ||
116 | mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\ | ||
117 | stw r12,_DEAR(r11); /* since they may have had stuff */\ | ||
118 | mfspr r9,SPRN_ESR; /* in them at the point where the */\ | ||
119 | stw r9,_ESR(r11); /* exception was taken */\ | ||
120 | mfspr r12,exc_level_srr0; \ | ||
121 | stw r1,GPR1(r11); \ | ||
122 | mfspr r9,exc_level_srr1; \ | ||
123 | stw r1,0(r11); \ | ||
124 | mr r1,r11; \ | ||
125 | rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ | ||
126 | stw r0,GPR0(r11); \ | ||
127 | SAVE_4GPRS(3, r11); \ | ||
128 | SAVE_2GPRS(7, r11) | ||
129 | |||
130 | #define CRITICAL_EXCEPTION_PROLOG \ | ||
131 | EXC_LEVEL_EXCEPTION_PROLOG(CRIT, SPRN_CSRR0, SPRN_CSRR1) | ||
132 | #define DEBUG_EXCEPTION_PROLOG \ | ||
133 | EXC_LEVEL_EXCEPTION_PROLOG(DEBUG, SPRN_DSRR0, SPRN_DSRR1) | ||
134 | #define MCHECK_EXCEPTION_PROLOG \ | ||
135 | EXC_LEVEL_EXCEPTION_PROLOG(MCHECK, SPRN_MCSRR0, SPRN_MCSRR1) | ||
136 | |||
137 | /* | ||
138 | * Exception vectors. | ||
139 | */ | ||
140 | #define START_EXCEPTION(label) \ | ||
141 | .align 5; \ | ||
142 | label: | ||
143 | |||
144 | #define FINISH_EXCEPTION(func) \ | ||
145 | bl transfer_to_handler_full; \ | ||
146 | .long func; \ | ||
147 | .long ret_from_except_full | ||
148 | |||
149 | #define EXCEPTION(n, label, hdlr, xfer) \ | ||
150 | START_EXCEPTION(label); \ | ||
151 | NORMAL_EXCEPTION_PROLOG; \ | ||
152 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
153 | xfer(n, hdlr) | ||
154 | |||
155 | #define CRITICAL_EXCEPTION(n, label, hdlr) \ | ||
156 | START_EXCEPTION(label); \ | ||
157 | CRITICAL_EXCEPTION_PROLOG; \ | ||
158 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
159 | EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ | ||
160 | NOCOPY, crit_transfer_to_handler, \ | ||
161 | ret_from_crit_exc) | ||
162 | |||
163 | #define MCHECK_EXCEPTION(n, label, hdlr) \ | ||
164 | START_EXCEPTION(label); \ | ||
165 | MCHECK_EXCEPTION_PROLOG; \ | ||
166 | mfspr r5,SPRN_ESR; \ | ||
167 | stw r5,_ESR(r11); \ | ||
168 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
169 | EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ | ||
170 | NOCOPY, mcheck_transfer_to_handler, \ | ||
171 | ret_from_mcheck_exc) | ||
172 | |||
173 | #define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret) \ | ||
174 | li r10,trap; \ | ||
175 | stw r10,_TRAP(r11); \ | ||
176 | lis r10,msr@h; \ | ||
177 | ori r10,r10,msr@l; \ | ||
178 | copyee(r10, r9); \ | ||
179 | bl tfer; \ | ||
180 | .long hdlr; \ | ||
181 | .long ret | ||
182 | |||
183 | #define COPY_EE(d, s) rlwimi d,s,0,16,16 | ||
184 | #define NOCOPY(d, s) | ||
185 | |||
186 | #define EXC_XFER_STD(n, hdlr) \ | ||
187 | EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \ | ||
188 | ret_from_except_full) | ||
189 | |||
190 | #define EXC_XFER_LITE(n, hdlr) \ | ||
191 | EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \ | ||
192 | ret_from_except) | ||
193 | |||
194 | #define EXC_XFER_EE(n, hdlr) \ | ||
195 | EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, COPY_EE, transfer_to_handler_full, \ | ||
196 | ret_from_except_full) | ||
197 | |||
198 | #define EXC_XFER_EE_LITE(n, hdlr) \ | ||
199 | EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \ | ||
200 | ret_from_except) | ||
201 | |||
202 | /* Check for a single step debug exception while in an exception | ||
203 | * handler before state has been saved. This is to catch the case | ||
204 | * where an instruction that we are trying to single step causes | ||
205 | * an exception (eg ITLB/DTLB miss) and thus the first instruction of | ||
206 | * the exception handler generates a single step debug exception. | ||
207 | * | ||
208 | * If we get a debug trap on the first instruction of an exception handler, | ||
209 | * we reset the MSR_DE in the _exception handler's_ MSR (the debug trap is | ||
210 | * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR). | ||
211 | * The exception handler was handling a non-critical interrupt, so it will | ||
212 | * save (and later restore) the MSR via SPRN_CSRR1, which will still have | ||
213 | * the MSR_DE bit set. | ||
214 | */ | ||
215 | #ifdef CONFIG_E200 | ||
216 | #define DEBUG_EXCEPTION \ | ||
217 | START_EXCEPTION(Debug); \ | ||
218 | DEBUG_EXCEPTION_PROLOG; \ | ||
219 | \ | ||
220 | /* \ | ||
221 | * If there is a single step or branch-taken exception in an \ | ||
222 | * exception entry sequence, it was probably meant to apply to \ | ||
223 | * the code where the exception occurred (since exception entry \ | ||
224 | * doesn't turn off DE automatically). We simulate the effect \ | ||
225 | * of turning off DE on entry to an exception handler by turning \ | ||
226 | * off DE in the CSRR1 value and clearing the debug status. \ | ||
227 | */ \ | ||
228 | mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \ | ||
229 | andis. r10,r10,DBSR_IC@h; \ | ||
230 | beq+ 2f; \ | ||
231 | \ | ||
232 | lis r10,KERNELBASE@h; /* check if exception in vectors */ \ | ||
233 | ori r10,r10,KERNELBASE@l; \ | ||
234 | cmplw r12,r10; \ | ||
235 | blt+ 2f; /* addr below exception vectors */ \ | ||
236 | \ | ||
237 | lis r10,Debug@h; \ | ||
238 | ori r10,r10,Debug@l; \ | ||
239 | cmplw r12,r10; \ | ||
240 | bgt+ 2f; /* addr above exception vectors */ \ | ||
241 | \ | ||
242 | /* here it looks like we got an inappropriate debug exception. */ \ | ||
243 | 1: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CDRR1 value */ \ | ||
244 | lis r10,DBSR_IC@h; /* clear the IC event */ \ | ||
245 | mtspr SPRN_DBSR,r10; \ | ||
246 | /* restore state and get out */ \ | ||
247 | lwz r10,_CCR(r11); \ | ||
248 | lwz r0,GPR0(r11); \ | ||
249 | lwz r1,GPR1(r11); \ | ||
250 | mtcrf 0x80,r10; \ | ||
251 | mtspr SPRN_DSRR0,r12; \ | ||
252 | mtspr SPRN_DSRR1,r9; \ | ||
253 | lwz r9,GPR9(r11); \ | ||
254 | lwz r12,GPR12(r11); \ | ||
255 | mtspr DEBUG_SPRG,r8; \ | ||
256 | BOOKE_LOAD_EXC_LEVEL_STACK(DEBUG); /* r8 points to the debug stack */ \ | ||
257 | lwz r10,GPR10-INT_FRAME_SIZE(r8); \ | ||
258 | lwz r11,GPR11-INT_FRAME_SIZE(r8); \ | ||
259 | mfspr r8,DEBUG_SPRG; \ | ||
260 | \ | ||
261 | RFDI; \ | ||
262 | b .; \ | ||
263 | \ | ||
264 | /* continue normal handling for a critical exception... */ \ | ||
265 | 2: mfspr r4,SPRN_DBSR; \ | ||
266 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
267 | EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc) | ||
268 | #else | ||
269 | #define DEBUG_EXCEPTION \ | ||
270 | START_EXCEPTION(Debug); \ | ||
271 | CRITICAL_EXCEPTION_PROLOG; \ | ||
272 | \ | ||
273 | /* \ | ||
274 | * If there is a single step or branch-taken exception in an \ | ||
275 | * exception entry sequence, it was probably meant to apply to \ | ||
276 | * the code where the exception occurred (since exception entry \ | ||
277 | * doesn't turn off DE automatically). We simulate the effect \ | ||
278 | * of turning off DE on entry to an exception handler by turning \ | ||
279 | * off DE in the CSRR1 value and clearing the debug status. \ | ||
280 | */ \ | ||
281 | mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \ | ||
282 | andis. r10,r10,DBSR_IC@h; \ | ||
283 | beq+ 2f; \ | ||
284 | \ | ||
285 | lis r10,KERNELBASE@h; /* check if exception in vectors */ \ | ||
286 | ori r10,r10,KERNELBASE@l; \ | ||
287 | cmplw r12,r10; \ | ||
288 | blt+ 2f; /* addr below exception vectors */ \ | ||
289 | \ | ||
290 | lis r10,Debug@h; \ | ||
291 | ori r10,r10,Debug@l; \ | ||
292 | cmplw r12,r10; \ | ||
293 | bgt+ 2f; /* addr above exception vectors */ \ | ||
294 | \ | ||
295 | /* here it looks like we got an inappropriate debug exception. */ \ | ||
296 | 1: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CSRR1 value */ \ | ||
297 | lis r10,DBSR_IC@h; /* clear the IC event */ \ | ||
298 | mtspr SPRN_DBSR,r10; \ | ||
299 | /* restore state and get out */ \ | ||
300 | lwz r10,_CCR(r11); \ | ||
301 | lwz r0,GPR0(r11); \ | ||
302 | lwz r1,GPR1(r11); \ | ||
303 | mtcrf 0x80,r10; \ | ||
304 | mtspr SPRN_CSRR0,r12; \ | ||
305 | mtspr SPRN_CSRR1,r9; \ | ||
306 | lwz r9,GPR9(r11); \ | ||
307 | lwz r12,GPR12(r11); \ | ||
308 | mtspr CRIT_SPRG,r8; \ | ||
309 | BOOKE_LOAD_EXC_LEVEL_STACK(CRIT); /* r8 points to the debug stack */ \ | ||
310 | lwz r10,GPR10-INT_FRAME_SIZE(r8); \ | ||
311 | lwz r11,GPR11-INT_FRAME_SIZE(r8); \ | ||
312 | mfspr r8,CRIT_SPRG; \ | ||
313 | \ | ||
314 | rfci; \ | ||
315 | b .; \ | ||
316 | \ | ||
317 | /* continue normal handling for a critical exception... */ \ | ||
318 | 2: mfspr r4,SPRN_DBSR; \ | ||
319 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
320 | EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc) | ||
321 | #endif | ||
322 | |||
323 | #define INSTRUCTION_STORAGE_EXCEPTION \ | ||
324 | START_EXCEPTION(InstructionStorage) \ | ||
325 | NORMAL_EXCEPTION_PROLOG; \ | ||
326 | mfspr r5,SPRN_ESR; /* Grab the ESR and save it */ \ | ||
327 | stw r5,_ESR(r11); \ | ||
328 | mr r4,r12; /* Pass SRR0 as arg2 */ \ | ||
329 | li r5,0; /* Pass zero as arg3 */ \ | ||
330 | EXC_XFER_EE_LITE(0x0400, handle_page_fault) | ||
331 | |||
332 | #define ALIGNMENT_EXCEPTION \ | ||
333 | START_EXCEPTION(Alignment) \ | ||
334 | NORMAL_EXCEPTION_PROLOG; \ | ||
335 | mfspr r4,SPRN_DEAR; /* Grab the DEAR and save it */ \ | ||
336 | stw r4,_DEAR(r11); \ | ||
337 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
338 | EXC_XFER_EE(0x0600, alignment_exception) | ||
339 | |||
340 | #define PROGRAM_EXCEPTION \ | ||
341 | START_EXCEPTION(Program) \ | ||
342 | NORMAL_EXCEPTION_PROLOG; \ | ||
343 | mfspr r4,SPRN_ESR; /* Grab the ESR and save it */ \ | ||
344 | stw r4,_ESR(r11); \ | ||
345 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
346 | EXC_XFER_STD(0x0700, program_check_exception) | ||
347 | |||
348 | #define DECREMENTER_EXCEPTION \ | ||
349 | START_EXCEPTION(Decrementer) \ | ||
350 | NORMAL_EXCEPTION_PROLOG; \ | ||
351 | lis r0,TSR_DIS@h; /* Setup the DEC interrupt mask */ \ | ||
352 | mtspr SPRN_TSR,r0; /* Clear the DEC interrupt */ \ | ||
353 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
354 | EXC_XFER_LITE(0x0900, timer_interrupt) | ||
355 | |||
356 | #define FP_UNAVAILABLE_EXCEPTION \ | ||
357 | START_EXCEPTION(FloatingPointUnavailable) \ | ||
358 | NORMAL_EXCEPTION_PROLOG; \ | ||
359 | bne load_up_fpu; /* if from user, just load it up */ \ | ||
360 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
361 | EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception) | ||
362 | |||
363 | #endif /* __HEAD_BOOKE_H__ */ | ||
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 8d60fa99fc4b..dd86bbed7627 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/head_fsl_booke.S | ||
3 | * | ||
4 | * Kernel execution entry point code. | 2 | * Kernel execution entry point code. |
5 | * | 3 | * |
6 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> | 4 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> |
@@ -316,6 +314,7 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
316 | */ | 314 | */ |
317 | lis r2,DBCR0_IDM@h | 315 | lis r2,DBCR0_IDM@h |
318 | mtspr SPRN_DBCR0,r2 | 316 | mtspr SPRN_DBCR0,r2 |
317 | isync | ||
319 | /* clear any residual debug events */ | 318 | /* clear any residual debug events */ |
320 | li r2,-1 | 319 | li r2,-1 |
321 | mtspr SPRN_DBSR,r2 | 320 | mtspr SPRN_DBSR,r2 |
@@ -1002,12 +1001,15 @@ _GLOBAL(giveup_fpu) | |||
1002 | _GLOBAL(abort) | 1001 | _GLOBAL(abort) |
1003 | li r13,0 | 1002 | li r13,0 |
1004 | mtspr SPRN_DBCR0,r13 /* disable all debug events */ | 1003 | mtspr SPRN_DBCR0,r13 /* disable all debug events */ |
1004 | isync | ||
1005 | mfmsr r13 | 1005 | mfmsr r13 |
1006 | ori r13,r13,MSR_DE@l /* Enable Debug Events */ | 1006 | ori r13,r13,MSR_DE@l /* Enable Debug Events */ |
1007 | mtmsr r13 | 1007 | mtmsr r13 |
1008 | isync | ||
1008 | mfspr r13,SPRN_DBCR0 | 1009 | mfspr r13,SPRN_DBCR0 |
1009 | lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h | 1010 | lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h |
1010 | mtspr SPRN_DBCR0,r13 | 1011 | mtspr SPRN_DBCR0,r13 |
1012 | isync | ||
1011 | 1013 | ||
1012 | _GLOBAL(set_context) | 1014 | _GLOBAL(set_context) |
1013 | 1015 | ||
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index 6160c8dbb7c5..fd8214caedee 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/iomap.c | ||
3 | * | ||
4 | * ppc64 "iomap" interface implementation. | 2 | * ppc64 "iomap" interface implementation. |
5 | * | 3 | * |
6 | * (C) Copyright 2004 Linus Torvalds | 4 | * (C) Copyright 2004 Linus Torvalds |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 946f3219fd29..d9a7fdef59b9 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/iommu.c | ||
3 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
4 | * | 3 | * |
5 | * Rewrite, cleanup, new allocation schemes, virtual merging: | 4 | * Rewrite, cleanup, new allocation schemes, virtual merging: |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index d1fffce86df9..771a59cbd213 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/irq.c | ||
3 | * | ||
4 | * Derived from arch/i386/kernel/irq.c | 2 | * Derived from arch/i386/kernel/irq.c |
5 | * Copyright (C) 1992 Linus Torvalds | 3 | * Copyright (C) 1992 Linus Torvalds |
6 | * Adapted from arch/i386 by Gary Thomas | 4 | * Adapted from arch/i386 by Gary Thomas |
@@ -137,9 +135,8 @@ skip: | |||
137 | #ifdef CONFIG_TAU_INT | 135 | #ifdef CONFIG_TAU_INT |
138 | if (tau_initialized){ | 136 | if (tau_initialized){ |
139 | seq_puts(p, "TAU: "); | 137 | seq_puts(p, "TAU: "); |
140 | for (j = 0; j < NR_CPUS; j++) | 138 | for_each_online_cpu(j) |
141 | if (cpu_online(j)) | 139 | seq_printf(p, "%10u ", tau_interrupts(j)); |
142 | seq_printf(p, "%10u ", tau_interrupts(j)); | ||
143 | seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n"); | 140 | seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n"); |
144 | } | 141 | } |
145 | #endif | 142 | #endif |
@@ -371,6 +368,7 @@ unsigned int real_irq_to_virt_slowpath(unsigned int real_irq) | |||
371 | return NO_IRQ; | 368 | return NO_IRQ; |
372 | 369 | ||
373 | } | 370 | } |
371 | #endif /* CONFIG_PPC64 */ | ||
374 | 372 | ||
375 | #ifdef CONFIG_IRQSTACKS | 373 | #ifdef CONFIG_IRQSTACKS |
376 | struct thread_info *softirq_ctx[NR_CPUS]; | 374 | struct thread_info *softirq_ctx[NR_CPUS]; |
@@ -394,10 +392,24 @@ void irq_ctx_init(void) | |||
394 | } | 392 | } |
395 | } | 393 | } |
396 | 394 | ||
395 | static inline void do_softirq_onstack(void) | ||
396 | { | ||
397 | struct thread_info *curtp, *irqtp; | ||
398 | |||
399 | curtp = current_thread_info(); | ||
400 | irqtp = softirq_ctx[smp_processor_id()]; | ||
401 | irqtp->task = curtp->task; | ||
402 | call_do_softirq(irqtp); | ||
403 | irqtp->task = NULL; | ||
404 | } | ||
405 | |||
406 | #else | ||
407 | #define do_softirq_onstack() __do_softirq() | ||
408 | #endif /* CONFIG_IRQSTACKS */ | ||
409 | |||
397 | void do_softirq(void) | 410 | void do_softirq(void) |
398 | { | 411 | { |
399 | unsigned long flags; | 412 | unsigned long flags; |
400 | struct thread_info *curtp, *irqtp; | ||
401 | 413 | ||
402 | if (in_interrupt()) | 414 | if (in_interrupt()) |
403 | return; | 415 | return; |
@@ -405,19 +417,18 @@ void do_softirq(void) | |||
405 | local_irq_save(flags); | 417 | local_irq_save(flags); |
406 | 418 | ||
407 | if (local_softirq_pending()) { | 419 | if (local_softirq_pending()) { |
408 | curtp = current_thread_info(); | 420 | account_system_vtime(current); |
409 | irqtp = softirq_ctx[smp_processor_id()]; | 421 | local_bh_disable(); |
410 | irqtp->task = curtp->task; | 422 | do_softirq_onstack(); |
411 | call_do_softirq(irqtp); | 423 | account_system_vtime(current); |
412 | irqtp->task = NULL; | 424 | __local_bh_enable(); |
413 | } | 425 | } |
414 | 426 | ||
415 | local_irq_restore(flags); | 427 | local_irq_restore(flags); |
416 | } | 428 | } |
417 | EXPORT_SYMBOL(do_softirq); | 429 | EXPORT_SYMBOL(do_softirq); |
418 | 430 | ||
419 | #endif /* CONFIG_IRQSTACKS */ | 431 | #ifdef CONFIG_PPC64 |
420 | |||
421 | static int __init setup_noirqdistrib(char *str) | 432 | static int __init setup_noirqdistrib(char *str) |
422 | { | 433 | { |
423 | distribute_irqs = 0; | 434 | distribute_irqs = 0; |
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index cfab48566db1..cb1fe5878e8b 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
@@ -1,6 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Kernel Probes (KProbes) | 2 | * Kernel Probes (KProbes) |
3 | * arch/ppc64/kernel/kprobes.c | ||
4 | * | 3 | * |
5 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
@@ -82,9 +81,9 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
82 | 81 | ||
83 | void __kprobes arch_remove_kprobe(struct kprobe *p) | 82 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
84 | { | 83 | { |
85 | down(&kprobe_mutex); | 84 | mutex_lock(&kprobe_mutex); |
86 | free_insn_slot(p->ainsn.insn); | 85 | free_insn_slot(p->ainsn.insn); |
87 | up(&kprobe_mutex); | 86 | mutex_unlock(&kprobe_mutex); |
88 | } | 87 | } |
89 | 88 | ||
90 | static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | 89 | static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) |
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c index 22d83d4d1af5..9feeeef5a875 100644 --- a/arch/powerpc/kernel/of_device.c +++ b/arch/powerpc/kernel/of_device.c | |||
@@ -147,15 +147,12 @@ postcore_initcall(of_bus_driver_init); | |||
147 | 147 | ||
148 | int of_register_driver(struct of_platform_driver *drv) | 148 | int of_register_driver(struct of_platform_driver *drv) |
149 | { | 149 | { |
150 | int count = 0; | ||
151 | |||
152 | /* initialize common driver fields */ | 150 | /* initialize common driver fields */ |
153 | drv->driver.name = drv->name; | 151 | drv->driver.name = drv->name; |
154 | drv->driver.bus = &of_platform_bus_type; | 152 | drv->driver.bus = &of_platform_bus_type; |
155 | 153 | ||
156 | /* register with core */ | 154 | /* register with core */ |
157 | count = driver_register(&drv->driver); | 155 | return driver_register(&drv->driver); |
158 | return count ? count : 1; | ||
159 | } | 156 | } |
160 | 157 | ||
161 | void of_unregister_driver(struct of_platform_driver *drv) | 158 | void of_unregister_driver(struct of_platform_driver *drv) |
diff --git a/arch/powerpc/kernel/pci_iommu.c b/arch/powerpc/kernel/pci_iommu.c index bdf15dbbf4f0..c336f3e31cff 100644 --- a/arch/powerpc/kernel/pci_iommu.c +++ b/arch/powerpc/kernel/pci_iommu.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/pci_iommu.c | ||
3 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
4 | * | 3 | * |
5 | * Rewrite, cleanup, new allocation schemes: | 4 | * Rewrite, cleanup, new allocation schemes: |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 63ecbec05202..dfa5398ab3c8 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -57,7 +57,6 @@ extern void machine_check_exception(struct pt_regs *regs); | |||
57 | extern void alignment_exception(struct pt_regs *regs); | 57 | extern void alignment_exception(struct pt_regs *regs); |
58 | extern void program_check_exception(struct pt_regs *regs); | 58 | extern void program_check_exception(struct pt_regs *regs); |
59 | extern void single_step_exception(struct pt_regs *regs); | 59 | extern void single_step_exception(struct pt_regs *regs); |
60 | extern int pmac_newworld; | ||
61 | extern int sys_sigreturn(struct pt_regs *regs); | 60 | extern int sys_sigreturn(struct pt_regs *regs); |
62 | 61 | ||
63 | EXPORT_SYMBOL(clear_pages); | 62 | EXPORT_SYMBOL(clear_pages); |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index c225cf154bfe..1770a066c217 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/process.c | ||
3 | * | ||
4 | * Derived from "arch/i386/kernel/process.c" | 2 | * Derived from "arch/i386/kernel/process.c" |
5 | * Copyright (C) 1995 Linus Torvalds | 3 | * Copyright (C) 1995 Linus Torvalds |
6 | * | 4 | * |
@@ -47,9 +45,9 @@ | |||
47 | #include <asm/mmu.h> | 45 | #include <asm/mmu.h> |
48 | #include <asm/prom.h> | 46 | #include <asm/prom.h> |
49 | #include <asm/machdep.h> | 47 | #include <asm/machdep.h> |
48 | #include <asm/time.h> | ||
50 | #ifdef CONFIG_PPC64 | 49 | #ifdef CONFIG_PPC64 |
51 | #include <asm/firmware.h> | 50 | #include <asm/firmware.h> |
52 | #include <asm/time.h> | ||
53 | #endif | 51 | #endif |
54 | 52 | ||
55 | extern unsigned long _get_SP(void); | 53 | extern unsigned long _get_SP(void); |
@@ -330,6 +328,11 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
330 | #endif | 328 | #endif |
331 | 329 | ||
332 | local_irq_save(flags); | 330 | local_irq_save(flags); |
331 | |||
332 | account_system_vtime(current); | ||
333 | account_process_vtime(current); | ||
334 | calculate_steal_time(); | ||
335 | |||
333 | last = _switch(old_thread, new_thread); | 336 | last = _switch(old_thread, new_thread); |
334 | 337 | ||
335 | local_irq_restore(flags); | 338 | local_irq_restore(flags); |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 6dbd21726770..d63cd562d9d5 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -829,10 +829,6 @@ void __init unflatten_device_tree(void) | |||
829 | 829 | ||
830 | /* Allocate memory for the expanded device tree */ | 830 | /* Allocate memory for the expanded device tree */ |
831 | mem = lmb_alloc(size + 4, __alignof__(struct device_node)); | 831 | mem = lmb_alloc(size + 4, __alignof__(struct device_node)); |
832 | if (!mem) { | ||
833 | DBG("Couldn't allocate memory with lmb_alloc()!\n"); | ||
834 | panic("Couldn't allocate memory with lmb_alloc()!\n"); | ||
835 | } | ||
836 | mem = (unsigned long) __va(mem); | 832 | mem = (unsigned long) __va(mem); |
837 | 833 | ||
838 | ((u32 *)mem)[size / 4] = 0xdeadbeef; | 834 | ((u32 *)mem)[size / 4] = 0xdeadbeef; |
diff --git a/arch/powerpc/kernel/ptrace-common.h b/arch/powerpc/kernel/ptrace-common.h index 5ccbdbe0d5c9..c42a860c8d25 100644 --- a/arch/powerpc/kernel/ptrace-common.h +++ b/arch/powerpc/kernel/ptrace-common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/ppc64/kernel/ptrace-common.h | ||
3 | * | ||
4 | * Copyright (c) 2002 Stephen Rothwell, IBM Coproration | 2 | * Copyright (c) 2002 Stephen Rothwell, IBM Coproration |
5 | * Extracted from ptrace.c and ptrace32.c | 3 | * Extracted from ptrace.c and ptrace32.c |
6 | * | 4 | * |
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c index 7a95b8a28354..1f03fb28cc0a 100644 --- a/arch/powerpc/kernel/rtas-proc.c +++ b/arch/powerpc/kernel/rtas-proc.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/rtas-proc.c | ||
3 | * Copyright (C) 2000 Tilmann Bitterberg | 2 | * Copyright (C) 2000 Tilmann Bitterberg |
4 | * (tilmann@bitterberg.de) | 3 | * (tilmann@bitterberg.de) |
5 | * | 4 | * |
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index 7442775ef2a1..57b539a03fa9 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/rtas_pci.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Dave Engebretsen, IBM Corporation |
5 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM | 3 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM |
6 | * | 4 | * |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index be12041c0fc5..c1d62bf11f29 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -162,9 +162,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
162 | #if defined(CONFIG_SMP) && defined(CONFIG_PPC32) | 162 | #if defined(CONFIG_SMP) && defined(CONFIG_PPC32) |
163 | unsigned long bogosum = 0; | 163 | unsigned long bogosum = 0; |
164 | int i; | 164 | int i; |
165 | for (i = 0; i < NR_CPUS; ++i) | 165 | for_each_online_cpu(i) |
166 | if (cpu_online(i)) | 166 | bogosum += loops_per_jiffy; |
167 | bogosum += loops_per_jiffy; | ||
168 | seq_printf(m, "total bogomips\t: %lu.%02lu\n", | 167 | seq_printf(m, "total bogomips\t: %lu.%02lu\n", |
169 | bogosum/(500000/HZ), bogosum/(5000/HZ) % 100); | 168 | bogosum/(500000/HZ), bogosum/(5000/HZ) % 100); |
170 | #endif /* CONFIG_SMP && CONFIG_PPC32 */ | 169 | #endif /* CONFIG_SMP && CONFIG_PPC32 */ |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index db72a92943bf..dc2770df25b3 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -272,9 +272,8 @@ int __init ppc_init(void) | |||
272 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); | 272 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); |
273 | 273 | ||
274 | /* register CPU devices */ | 274 | /* register CPU devices */ |
275 | for (i = 0; i < NR_CPUS; i++) | 275 | for_each_cpu(i) |
276 | if (cpu_possible(i)) | 276 | register_cpu(&cpu_devices[i], i, NULL); |
277 | register_cpu(&cpu_devices[i], i, NULL); | ||
278 | 277 | ||
279 | /* call platform init */ | 278 | /* call platform init */ |
280 | if (ppc_md.init != NULL) { | 279 | if (ppc_md.init != NULL) { |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index f96c49b03ba0..2f3fdad35594 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -497,8 +497,6 @@ void __init setup_system(void) | |||
497 | #endif | 497 | #endif |
498 | printk("-----------------------------------------------------\n"); | 498 | printk("-----------------------------------------------------\n"); |
499 | 499 | ||
500 | mm_init_ppc64(); | ||
501 | |||
502 | DBG(" <- setup_system()\n"); | 500 | DBG(" <- setup_system()\n"); |
503 | } | 501 | } |
504 | 502 | ||
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index 4324f8a8ba24..47f910380a6a 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/ppc64/kernel/signal.c | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * | 4 | * |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 13595a64f013..805eaedbc308 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -541,7 +541,7 @@ int __devinit start_secondary(void *unused) | |||
541 | smp_ops->take_timebase(); | 541 | smp_ops->take_timebase(); |
542 | 542 | ||
543 | if (system_state > SYSTEM_BOOTING) | 543 | if (system_state > SYSTEM_BOOTING) |
544 | per_cpu(last_jiffy, cpu) = get_tb(); | 544 | snapshot_timebase(); |
545 | 545 | ||
546 | spin_lock(&call_lock); | 546 | spin_lock(&call_lock); |
547 | cpu_set(cpu, cpu_online_map); | 547 | cpu_set(cpu, cpu_online_map); |
@@ -573,6 +573,8 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
573 | 573 | ||
574 | set_cpus_allowed(current, old_mask); | 574 | set_cpus_allowed(current, old_mask); |
575 | 575 | ||
576 | snapshot_timebases(); | ||
577 | |||
576 | dump_numa_cpu_topology(); | 578 | dump_numa_cpu_topology(); |
577 | } | 579 | } |
578 | 580 | ||
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 86f7e3d154d8..4a27218a086c 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/percpu.h> | 51 | #include <linux/percpu.h> |
52 | #include <linux/rtc.h> | 52 | #include <linux/rtc.h> |
53 | #include <linux/jiffies.h> | 53 | #include <linux/jiffies.h> |
54 | #include <linux/posix-timers.h> | ||
54 | 55 | ||
55 | #include <asm/io.h> | 56 | #include <asm/io.h> |
56 | #include <asm/processor.h> | 57 | #include <asm/processor.h> |
@@ -98,6 +99,7 @@ unsigned long tb_ticks_per_jiffy; | |||
98 | unsigned long tb_ticks_per_usec = 100; /* sane default */ | 99 | unsigned long tb_ticks_per_usec = 100; /* sane default */ |
99 | EXPORT_SYMBOL(tb_ticks_per_usec); | 100 | EXPORT_SYMBOL(tb_ticks_per_usec); |
100 | unsigned long tb_ticks_per_sec; | 101 | unsigned long tb_ticks_per_sec; |
102 | EXPORT_SYMBOL(tb_ticks_per_sec); /* for cputime_t conversions */ | ||
101 | u64 tb_to_xs; | 103 | u64 tb_to_xs; |
102 | unsigned tb_to_us; | 104 | unsigned tb_to_us; |
103 | 105 | ||
@@ -135,6 +137,224 @@ unsigned long tb_last_stamp; | |||
135 | */ | 137 | */ |
136 | DEFINE_PER_CPU(unsigned long, last_jiffy); | 138 | DEFINE_PER_CPU(unsigned long, last_jiffy); |
137 | 139 | ||
140 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
141 | /* | ||
142 | * Factors for converting from cputime_t (timebase ticks) to | ||
143 | * jiffies, milliseconds, seconds, and clock_t (1/USER_HZ seconds). | ||
144 | * These are all stored as 0.64 fixed-point binary fractions. | ||
145 | */ | ||
146 | u64 __cputime_jiffies_factor; | ||
147 | EXPORT_SYMBOL(__cputime_jiffies_factor); | ||
148 | u64 __cputime_msec_factor; | ||
149 | EXPORT_SYMBOL(__cputime_msec_factor); | ||
150 | u64 __cputime_sec_factor; | ||
151 | EXPORT_SYMBOL(__cputime_sec_factor); | ||
152 | u64 __cputime_clockt_factor; | ||
153 | EXPORT_SYMBOL(__cputime_clockt_factor); | ||
154 | |||
155 | static void calc_cputime_factors(void) | ||
156 | { | ||
157 | struct div_result res; | ||
158 | |||
159 | div128_by_32(HZ, 0, tb_ticks_per_sec, &res); | ||
160 | __cputime_jiffies_factor = res.result_low; | ||
161 | div128_by_32(1000, 0, tb_ticks_per_sec, &res); | ||
162 | __cputime_msec_factor = res.result_low; | ||
163 | div128_by_32(1, 0, tb_ticks_per_sec, &res); | ||
164 | __cputime_sec_factor = res.result_low; | ||
165 | div128_by_32(USER_HZ, 0, tb_ticks_per_sec, &res); | ||
166 | __cputime_clockt_factor = res.result_low; | ||
167 | } | ||
168 | |||
169 | /* | ||
170 | * Read the PURR on systems that have it, otherwise the timebase. | ||
171 | */ | ||
172 | static u64 read_purr(void) | ||
173 | { | ||
174 | if (cpu_has_feature(CPU_FTR_PURR)) | ||
175 | return mfspr(SPRN_PURR); | ||
176 | return mftb(); | ||
177 | } | ||
178 | |||
179 | /* | ||
180 | * Account time for a transition between system, hard irq | ||
181 | * or soft irq state. | ||
182 | */ | ||
183 | void account_system_vtime(struct task_struct *tsk) | ||
184 | { | ||
185 | u64 now, delta; | ||
186 | unsigned long flags; | ||
187 | |||
188 | local_irq_save(flags); | ||
189 | now = read_purr(); | ||
190 | delta = now - get_paca()->startpurr; | ||
191 | get_paca()->startpurr = now; | ||
192 | if (!in_interrupt()) { | ||
193 | delta += get_paca()->system_time; | ||
194 | get_paca()->system_time = 0; | ||
195 | } | ||
196 | account_system_time(tsk, 0, delta); | ||
197 | local_irq_restore(flags); | ||
198 | } | ||
199 | |||
200 | /* | ||
201 | * Transfer the user and system times accumulated in the paca | ||
202 | * by the exception entry and exit code to the generic process | ||
203 | * user and system time records. | ||
204 | * Must be called with interrupts disabled. | ||
205 | */ | ||
206 | void account_process_vtime(struct task_struct *tsk) | ||
207 | { | ||
208 | cputime_t utime; | ||
209 | |||
210 | utime = get_paca()->user_time; | ||
211 | get_paca()->user_time = 0; | ||
212 | account_user_time(tsk, utime); | ||
213 | } | ||
214 | |||
215 | static void account_process_time(struct pt_regs *regs) | ||
216 | { | ||
217 | int cpu = smp_processor_id(); | ||
218 | |||
219 | account_process_vtime(current); | ||
220 | run_local_timers(); | ||
221 | if (rcu_pending(cpu)) | ||
222 | rcu_check_callbacks(cpu, user_mode(regs)); | ||
223 | scheduler_tick(); | ||
224 | run_posix_cpu_timers(current); | ||
225 | } | ||
226 | |||
227 | #ifdef CONFIG_PPC_SPLPAR | ||
228 | /* | ||
229 | * Stuff for accounting stolen time. | ||
230 | */ | ||
231 | struct cpu_purr_data { | ||
232 | int initialized; /* thread is running */ | ||
233 | u64 tb0; /* timebase at origin time */ | ||
234 | u64 purr0; /* PURR at origin time */ | ||
235 | u64 tb; /* last TB value read */ | ||
236 | u64 purr; /* last PURR value read */ | ||
237 | u64 stolen; /* stolen time so far */ | ||
238 | spinlock_t lock; | ||
239 | }; | ||
240 | |||
241 | static DEFINE_PER_CPU(struct cpu_purr_data, cpu_purr_data); | ||
242 | |||
243 | static void snapshot_tb_and_purr(void *data) | ||
244 | { | ||
245 | struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data); | ||
246 | |||
247 | p->tb0 = mftb(); | ||
248 | p->purr0 = mfspr(SPRN_PURR); | ||
249 | p->tb = p->tb0; | ||
250 | p->purr = 0; | ||
251 | wmb(); | ||
252 | p->initialized = 1; | ||
253 | } | ||
254 | |||
255 | /* | ||
256 | * Called during boot when all cpus have come up. | ||
257 | */ | ||
258 | void snapshot_timebases(void) | ||
259 | { | ||
260 | int cpu; | ||
261 | |||
262 | if (!cpu_has_feature(CPU_FTR_PURR)) | ||
263 | return; | ||
264 | for_each_cpu(cpu) | ||
265 | spin_lock_init(&per_cpu(cpu_purr_data, cpu).lock); | ||
266 | on_each_cpu(snapshot_tb_and_purr, NULL, 0, 1); | ||
267 | } | ||
268 | |||
269 | void calculate_steal_time(void) | ||
270 | { | ||
271 | u64 tb, purr, t0; | ||
272 | s64 stolen; | ||
273 | struct cpu_purr_data *p0, *pme, *phim; | ||
274 | int cpu; | ||
275 | |||
276 | if (!cpu_has_feature(CPU_FTR_PURR)) | ||
277 | return; | ||
278 | cpu = smp_processor_id(); | ||
279 | pme = &per_cpu(cpu_purr_data, cpu); | ||
280 | if (!pme->initialized) | ||
281 | return; /* this can happen in early boot */ | ||
282 | p0 = &per_cpu(cpu_purr_data, cpu & ~1); | ||
283 | phim = &per_cpu(cpu_purr_data, cpu ^ 1); | ||
284 | spin_lock(&p0->lock); | ||
285 | tb = mftb(); | ||
286 | purr = mfspr(SPRN_PURR) - pme->purr0; | ||
287 | if (!phim->initialized || !cpu_online(cpu ^ 1)) { | ||
288 | stolen = (tb - pme->tb) - (purr - pme->purr); | ||
289 | } else { | ||
290 | t0 = pme->tb0; | ||
291 | if (phim->tb0 < t0) | ||
292 | t0 = phim->tb0; | ||
293 | stolen = phim->tb - t0 - phim->purr - purr - p0->stolen; | ||
294 | } | ||
295 | if (stolen > 0) { | ||
296 | account_steal_time(current, stolen); | ||
297 | p0->stolen += stolen; | ||
298 | } | ||
299 | pme->tb = tb; | ||
300 | pme->purr = purr; | ||
301 | spin_unlock(&p0->lock); | ||
302 | } | ||
303 | |||
304 | /* | ||
305 | * Must be called before the cpu is added to the online map when | ||
306 | * a cpu is being brought up at runtime. | ||
307 | */ | ||
308 | static void snapshot_purr(void) | ||
309 | { | ||
310 | int cpu; | ||
311 | u64 purr; | ||
312 | struct cpu_purr_data *p0, *pme, *phim; | ||
313 | unsigned long flags; | ||
314 | |||
315 | if (!cpu_has_feature(CPU_FTR_PURR)) | ||
316 | return; | ||
317 | cpu = smp_processor_id(); | ||
318 | pme = &per_cpu(cpu_purr_data, cpu); | ||
319 | p0 = &per_cpu(cpu_purr_data, cpu & ~1); | ||
320 | phim = &per_cpu(cpu_purr_data, cpu ^ 1); | ||
321 | spin_lock_irqsave(&p0->lock, flags); | ||
322 | pme->tb = pme->tb0 = mftb(); | ||
323 | purr = mfspr(SPRN_PURR); | ||
324 | if (!phim->initialized) { | ||
325 | pme->purr = 0; | ||
326 | pme->purr0 = purr; | ||
327 | } else { | ||
328 | /* set p->purr and p->purr0 for no change in p0->stolen */ | ||
329 | pme->purr = phim->tb - phim->tb0 - phim->purr - p0->stolen; | ||
330 | pme->purr0 = purr - pme->purr; | ||
331 | } | ||
332 | pme->initialized = 1; | ||
333 | spin_unlock_irqrestore(&p0->lock, flags); | ||
334 | } | ||
335 | |||
336 | #endif /* CONFIG_PPC_SPLPAR */ | ||
337 | |||
338 | #else /* ! CONFIG_VIRT_CPU_ACCOUNTING */ | ||
339 | #define calc_cputime_factors() | ||
340 | #define account_process_time(regs) update_process_times(user_mode(regs)) | ||
341 | #define calculate_steal_time() do { } while (0) | ||
342 | #endif | ||
343 | |||
344 | #if !(defined(CONFIG_VIRT_CPU_ACCOUNTING) && defined(CONFIG_PPC_SPLPAR)) | ||
345 | #define snapshot_purr() do { } while (0) | ||
346 | #endif | ||
347 | |||
348 | /* | ||
349 | * Called when a cpu comes up after the system has finished booting, | ||
350 | * i.e. as a result of a hotplug cpu action. | ||
351 | */ | ||
352 | void snapshot_timebase(void) | ||
353 | { | ||
354 | __get_cpu_var(last_jiffy) = get_tb(); | ||
355 | snapshot_purr(); | ||
356 | } | ||
357 | |||
138 | void __delay(unsigned long loops) | 358 | void __delay(unsigned long loops) |
139 | { | 359 | { |
140 | unsigned long start; | 360 | unsigned long start; |
@@ -392,6 +612,7 @@ static void iSeries_tb_recal(void) | |||
392 | new_tb_ticks_per_jiffy, sign, tick_diff ); | 612 | new_tb_ticks_per_jiffy, sign, tick_diff ); |
393 | tb_ticks_per_jiffy = new_tb_ticks_per_jiffy; | 613 | tb_ticks_per_jiffy = new_tb_ticks_per_jiffy; |
394 | tb_ticks_per_sec = new_tb_ticks_per_sec; | 614 | tb_ticks_per_sec = new_tb_ticks_per_sec; |
615 | calc_cputime_factors(); | ||
395 | div128_by_32( XSEC_PER_SEC, 0, tb_ticks_per_sec, &divres ); | 616 | div128_by_32( XSEC_PER_SEC, 0, tb_ticks_per_sec, &divres ); |
396 | do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; | 617 | do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; |
397 | tb_to_xs = divres.result_low; | 618 | tb_to_xs = divres.result_low; |
@@ -440,6 +661,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
440 | irq_enter(); | 661 | irq_enter(); |
441 | 662 | ||
442 | profile_tick(CPU_PROFILING, regs); | 663 | profile_tick(CPU_PROFILING, regs); |
664 | calculate_steal_time(); | ||
443 | 665 | ||
444 | #ifdef CONFIG_PPC_ISERIES | 666 | #ifdef CONFIG_PPC_ISERIES |
445 | get_lppaca()->int_dword.fields.decr_int = 0; | 667 | get_lppaca()->int_dword.fields.decr_int = 0; |
@@ -461,7 +683,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
461 | * is the case. | 683 | * is the case. |
462 | */ | 684 | */ |
463 | if (!cpu_is_offline(cpu)) | 685 | if (!cpu_is_offline(cpu)) |
464 | update_process_times(user_mode(regs)); | 686 | account_process_time(regs); |
465 | 687 | ||
466 | /* | 688 | /* |
467 | * No need to check whether cpu is offline here; boot_cpuid | 689 | * No need to check whether cpu is offline here; boot_cpuid |
@@ -518,13 +740,27 @@ void wakeup_decrementer(void) | |||
518 | void __init smp_space_timers(unsigned int max_cpus) | 740 | void __init smp_space_timers(unsigned int max_cpus) |
519 | { | 741 | { |
520 | int i; | 742 | int i; |
743 | unsigned long half = tb_ticks_per_jiffy / 2; | ||
521 | unsigned long offset = tb_ticks_per_jiffy / max_cpus; | 744 | unsigned long offset = tb_ticks_per_jiffy / max_cpus; |
522 | unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid); | 745 | unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid); |
523 | 746 | ||
524 | /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */ | 747 | /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */ |
525 | previous_tb -= tb_ticks_per_jiffy; | 748 | previous_tb -= tb_ticks_per_jiffy; |
749 | /* | ||
750 | * The stolen time calculation for POWER5 shared-processor LPAR | ||
751 | * systems works better if the two threads' timebase interrupts | ||
752 | * are staggered by half a jiffy with respect to each other. | ||
753 | */ | ||
526 | for_each_cpu(i) { | 754 | for_each_cpu(i) { |
527 | if (i != boot_cpuid) { | 755 | if (i == boot_cpuid) |
756 | continue; | ||
757 | if (i == (boot_cpuid ^ 1)) | ||
758 | per_cpu(last_jiffy, i) = | ||
759 | per_cpu(last_jiffy, boot_cpuid) - half; | ||
760 | else if (i & 1) | ||
761 | per_cpu(last_jiffy, i) = | ||
762 | per_cpu(last_jiffy, i ^ 1) + half; | ||
763 | else { | ||
528 | previous_tb += offset; | 764 | previous_tb += offset; |
529 | per_cpu(last_jiffy, i) = previous_tb; | 765 | per_cpu(last_jiffy, i) = previous_tb; |
530 | } | 766 | } |
@@ -720,6 +956,7 @@ void __init time_init(void) | |||
720 | tb_ticks_per_sec = ppc_tb_freq; | 956 | tb_ticks_per_sec = ppc_tb_freq; |
721 | tb_ticks_per_usec = ppc_tb_freq / 1000000; | 957 | tb_ticks_per_usec = ppc_tb_freq / 1000000; |
722 | tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000); | 958 | tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000); |
959 | calc_cputime_factors(); | ||
723 | 960 | ||
724 | /* | 961 | /* |
725 | * Calculate the length of each tick in ns. It will not be | 962 | * Calculate the length of each tick in ns. It will not be |
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 04f7df39ffbb..ec8370368423 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/ppc64/kernel/vdso.c | ||
3 | * | ||
4 | * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. | 2 | * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. |
5 | * <benh@kernel.crashing.org> | 3 | * <benh@kernel.crashing.org> |
6 | * | 4 | * |
diff --git a/arch/powerpc/lib/copypage_64.S b/arch/powerpc/lib/copypage_64.S index 40523b140109..f9837f44ac0b 100644 --- a/arch/powerpc/lib/copypage_64.S +++ b/arch/powerpc/lib/copypage_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/lib/copypage.S | ||
3 | * | ||
4 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. | 2 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/powerpc/lib/copyuser_64.S b/arch/powerpc/lib/copyuser_64.S index 6d69ef39b7df..a6b54cb97c49 100644 --- a/arch/powerpc/lib/copyuser_64.S +++ b/arch/powerpc/lib/copyuser_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/lib/copyuser.S | ||
3 | * | ||
4 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. | 2 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/powerpc/lib/e2a.c b/arch/powerpc/lib/e2a.c index d2b834887920..4b72ed8fd50e 100644 --- a/arch/powerpc/lib/e2a.c +++ b/arch/powerpc/lib/e2a.c | |||
@@ -1,9 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/lib/e2a.c | ||
3 | * | ||
4 | * EBCDIC to ASCII conversion | 2 | * EBCDIC to ASCII conversion |
5 | * | 3 | * |
6 | * This function moved here from arch/ppc64/kernel/viopath.c | 4 | * This function moved here from arch/powerpc/platforms/iseries/viopath.c |
7 | * | 5 | * |
8 | * (C) Copyright 2000-2004 IBM Corporation | 6 | * (C) Copyright 2000-2004 IBM Corporation |
9 | * | 7 | * |
@@ -105,4 +103,14 @@ unsigned char e2a(unsigned char x) | |||
105 | } | 103 | } |
106 | EXPORT_SYMBOL(e2a); | 104 | EXPORT_SYMBOL(e2a); |
107 | 105 | ||
106 | unsigned char* strne2a(unsigned char *dest, const unsigned char *src, size_t n) | ||
107 | { | ||
108 | int i; | ||
109 | |||
110 | n = strnlen(src, n); | ||
108 | 111 | ||
112 | for (i = 0; i < n; i++) | ||
113 | dest[i] = e2a(src[i]); | ||
114 | |||
115 | return dest; | ||
116 | } | ||
diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S index 9ccacdf5bcb9..fd66acfd3e3e 100644 --- a/arch/powerpc/lib/memcpy_64.S +++ b/arch/powerpc/lib/memcpy_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/lib/memcpy.S | ||
3 | * | ||
4 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. | 2 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c index 42c5de2c898f..31e511856dc5 100644 --- a/arch/powerpc/lib/rheap.c +++ b/arch/powerpc/lib/rheap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/rheap.c | ||
3 | * | ||
4 | * A Remote Heap. Remote means that we don't touch the memory that the | 2 | * A Remote Heap. Remote means that we don't touch the memory that the |
5 | * heap points to. Normal heap implementations use the memory they manage | 3 | * heap points to. Normal heap implementations use the memory they manage |
6 | * to place their list. We cannot do that because the memory we manage may | 4 | * to place their list. We cannot do that because the memory we manage may |
diff --git a/arch/powerpc/lib/strcase.c b/arch/powerpc/lib/strcase.c index 36b521091bbc..f8ec1eba3fdd 100644 --- a/arch/powerpc/lib/strcase.c +++ b/arch/powerpc/lib/strcase.c | |||
@@ -1,4 +1,6 @@ | |||
1 | #include <linux/types.h> | ||
1 | #include <linux/ctype.h> | 2 | #include <linux/ctype.h> |
3 | #include <linux/string.h> | ||
2 | 4 | ||
3 | int strcasecmp(const char *s1, const char *s2) | 5 | int strcasecmp(const char *s1, const char *s2) |
4 | { | 6 | { |
@@ -11,7 +13,7 @@ int strcasecmp(const char *s1, const char *s2) | |||
11 | return c1 - c2; | 13 | return c1 - c2; |
12 | } | 14 | } |
13 | 15 | ||
14 | int strncasecmp(const char *s1, const char *s2, int n) | 16 | int strncasecmp(const char *s1, const char *s2, size_t n) |
15 | { | 17 | { |
16 | int c1, c2; | 18 | int c1, c2; |
17 | 19 | ||
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index a4815d316722..ec4adcb4bc28 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/mm/fault.c | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * | 4 | * |
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S index 12ccd7155bac..ea469eefa146 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/arch/powerpc/mm/hash_low_32.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/hashtable.S | ||
3 | * | ||
4 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ | 2 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ |
5 | * | 3 | * |
6 | * PowerPC version | 4 | * PowerPC version |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index e9d589eefc14..89b35c181314 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -169,7 +169,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
169 | #ifdef CONFIG_PPC_ISERIES | 169 | #ifdef CONFIG_PPC_ISERIES |
170 | if (_machine == PLATFORM_ISERIES_LPAR) | 170 | if (_machine == PLATFORM_ISERIES_LPAR) |
171 | ret = iSeries_hpte_insert(hpteg, va, | 171 | ret = iSeries_hpte_insert(hpteg, va, |
172 | __pa(vaddr), | 172 | paddr, |
173 | tmp_mode, | 173 | tmp_mode, |
174 | HPTE_V_BOLTED, | 174 | HPTE_V_BOLTED, |
175 | psize); | 175 | psize); |
@@ -178,7 +178,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
178 | #ifdef CONFIG_PPC_PSERIES | 178 | #ifdef CONFIG_PPC_PSERIES |
179 | if (_machine & PLATFORM_LPAR) | 179 | if (_machine & PLATFORM_LPAR) |
180 | ret = pSeries_lpar_hpte_insert(hpteg, va, | 180 | ret = pSeries_lpar_hpte_insert(hpteg, va, |
181 | virt_to_abs(paddr), | 181 | paddr, |
182 | tmp_mode, | 182 | tmp_mode, |
183 | HPTE_V_BOLTED, | 183 | HPTE_V_BOLTED, |
184 | psize); | 184 | psize); |
@@ -186,7 +186,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
186 | #endif | 186 | #endif |
187 | #ifdef CONFIG_PPC_MULTIPLATFORM | 187 | #ifdef CONFIG_PPC_MULTIPLATFORM |
188 | ret = native_hpte_insert(hpteg, va, | 188 | ret = native_hpte_insert(hpteg, va, |
189 | virt_to_abs(paddr), | 189 | paddr, |
190 | tmp_mode, HPTE_V_BOLTED, | 190 | tmp_mode, HPTE_V_BOLTED, |
191 | psize); | 191 | psize); |
192 | #endif | 192 | #endif |
@@ -392,7 +392,7 @@ static unsigned long __init htab_get_table_size(void) | |||
392 | #ifdef CONFIG_MEMORY_HOTPLUG | 392 | #ifdef CONFIG_MEMORY_HOTPLUG |
393 | void create_section_mapping(unsigned long start, unsigned long end) | 393 | void create_section_mapping(unsigned long start, unsigned long end) |
394 | { | 394 | { |
395 | BUG_ON(htab_bolt_mapping(start, end, start, | 395 | BUG_ON(htab_bolt_mapping(start, end, __pa(start), |
396 | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, | 396 | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, |
397 | mmu_linear_psize)); | 397 | mmu_linear_psize)); |
398 | } | 398 | } |
@@ -422,7 +422,7 @@ void __init htab_initialize(void) | |||
422 | 422 | ||
423 | htab_hash_mask = pteg_count - 1; | 423 | htab_hash_mask = pteg_count - 1; |
424 | 424 | ||
425 | if (platform_is_lpar()) { | 425 | if (firmware_has_feature(FW_FEATURE_LPAR)) { |
426 | /* Using a hypervisor which owns the htab */ | 426 | /* Using a hypervisor which owns the htab */ |
427 | htab_address = NULL; | 427 | htab_address = NULL; |
428 | _SDR1 = 0; | 428 | _SDR1 = 0; |
@@ -431,7 +431,6 @@ void __init htab_initialize(void) | |||
431 | * the absolute address space. | 431 | * the absolute address space. |
432 | */ | 432 | */ |
433 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); | 433 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); |
434 | BUG_ON(table == 0); | ||
435 | 434 | ||
436 | DBG("Hash table allocated at %lx, size: %lx\n", table, | 435 | DBG("Hash table allocated at %lx, size: %lx\n", table, |
437 | htab_size_bytes); | 436 | htab_size_bytes); |
@@ -474,21 +473,22 @@ void __init htab_initialize(void) | |||
474 | 473 | ||
475 | if (dart_tablebase != 0 && dart_tablebase >= base | 474 | if (dart_tablebase != 0 && dart_tablebase >= base |
476 | && dart_tablebase < (base + size)) { | 475 | && dart_tablebase < (base + size)) { |
476 | unsigned long dart_table_end = dart_tablebase + 16 * MB; | ||
477 | if (base != dart_tablebase) | 477 | if (base != dart_tablebase) |
478 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, | 478 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, |
479 | base, mode_rw, | 479 | __pa(base), mode_rw, |
480 | mmu_linear_psize)); | 480 | mmu_linear_psize)); |
481 | if ((base + size) > (dart_tablebase + 16*MB)) | 481 | if ((base + size) > dart_table_end) |
482 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, | 482 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, |
483 | base + size, | 483 | base + size, |
484 | dart_tablebase+16*MB, | 484 | __pa(dart_table_end), |
485 | mode_rw, | 485 | mode_rw, |
486 | mmu_linear_psize)); | 486 | mmu_linear_psize)); |
487 | continue; | 487 | continue; |
488 | } | 488 | } |
489 | #endif /* CONFIG_U3_DART */ | 489 | #endif /* CONFIG_U3_DART */ |
490 | BUG_ON(htab_bolt_mapping(base, base + size, base, | 490 | BUG_ON(htab_bolt_mapping(base, base + size, __pa(base), |
491 | mode_rw, mmu_linear_psize)); | 491 | mode_rw, mmu_linear_psize)); |
492 | } | 492 | } |
493 | 493 | ||
494 | /* | 494 | /* |
@@ -505,8 +505,8 @@ void __init htab_initialize(void) | |||
505 | if (base + size >= tce_alloc_start) | 505 | if (base + size >= tce_alloc_start) |
506 | tce_alloc_start = base + size + 1; | 506 | tce_alloc_start = base + size + 1; |
507 | 507 | ||
508 | BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, | 508 | BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, |
509 | tce_alloc_start, mode_rw, | 509 | __pa(tce_alloc_start), mode_rw, |
510 | mmu_linear_psize)); | 510 | mmu_linear_psize)); |
511 | } | 511 | } |
512 | 512 | ||
@@ -517,7 +517,7 @@ void __init htab_initialize(void) | |||
517 | 517 | ||
518 | void htab_initialize_secondary(void) | 518 | void htab_initialize_secondary(void) |
519 | { | 519 | { |
520 | if (!platform_is_lpar()) | 520 | if (!firmware_has_feature(FW_FEATURE_LPAR)) |
521 | mtspr(SPRN_SDR1, _SDR1); | 521 | mtspr(SPRN_SDR1, _SDR1); |
522 | } | 522 | } |
523 | 523 | ||
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index b51bb28c054b..7370f9f33e29 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -133,21 +133,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
133 | return __pte(old); | 133 | return __pte(old); |
134 | } | 134 | } |
135 | 135 | ||
136 | /* | ||
137 | * This function checks for proper alignment of input addr and len parameters. | ||
138 | */ | ||
139 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | ||
140 | { | ||
141 | if (len & ~HPAGE_MASK) | ||
142 | return -EINVAL; | ||
143 | if (addr & ~HPAGE_MASK) | ||
144 | return -EINVAL; | ||
145 | if (! (within_hugepage_low_range(addr, len) | ||
146 | || within_hugepage_high_range(addr, len)) ) | ||
147 | return -EINVAL; | ||
148 | return 0; | ||
149 | } | ||
150 | |||
151 | struct slb_flush_info { | 136 | struct slb_flush_info { |
152 | struct mm_struct *mm; | 137 | struct mm_struct *mm; |
153 | u16 newareas; | 138 | u16 newareas; |
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 7d0d75c11848..b57fb3a2b7bb 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
@@ -216,7 +216,7 @@ static void free_sec(unsigned long start, unsigned long end, const char *name) | |||
216 | 216 | ||
217 | while (start < end) { | 217 | while (start < end) { |
218 | ClearPageReserved(virt_to_page(start)); | 218 | ClearPageReserved(virt_to_page(start)); |
219 | set_page_count(virt_to_page(start), 1); | 219 | init_page_count(virt_to_page(start)); |
220 | free_page(start); | 220 | free_page(start); |
221 | cnt++; | 221 | cnt++; |
222 | start += PAGE_SIZE; | 222 | start += PAGE_SIZE; |
@@ -248,7 +248,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
248 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | 248 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); |
249 | for (; start < end; start += PAGE_SIZE) { | 249 | for (; start < end; start += PAGE_SIZE) { |
250 | ClearPageReserved(virt_to_page(start)); | 250 | ClearPageReserved(virt_to_page(start)); |
251 | set_page_count(virt_to_page(start), 1); | 251 | init_page_count(virt_to_page(start)); |
252 | free_page(start); | 252 | free_page(start); |
253 | totalram_pages++; | 253 | totalram_pages++; |
254 | } | 254 | } |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 81cfb0c2ec58..babebd15bdc4 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -84,54 +84,6 @@ | |||
84 | /* max amount of RAM to use */ | 84 | /* max amount of RAM to use */ |
85 | unsigned long __max_memory; | 85 | unsigned long __max_memory; |
86 | 86 | ||
87 | /* info on what we think the IO hole is */ | ||
88 | unsigned long io_hole_start; | ||
89 | unsigned long io_hole_size; | ||
90 | |||
91 | /* | ||
92 | * Do very early mm setup. | ||
93 | */ | ||
94 | void __init mm_init_ppc64(void) | ||
95 | { | ||
96 | #ifndef CONFIG_PPC_ISERIES | ||
97 | unsigned long i; | ||
98 | #endif | ||
99 | |||
100 | ppc64_boot_msg(0x100, "MM Init"); | ||
101 | |||
102 | /* This is the story of the IO hole... please, keep seated, | ||
103 | * unfortunately, we are out of oxygen masks at the moment. | ||
104 | * So we need some rough way to tell where your big IO hole | ||
105 | * is. On pmac, it's between 2G and 4G, on POWER3, it's around | ||
106 | * that area as well, on POWER4 we don't have one, etc... | ||
107 | * We need that as a "hint" when sizing the TCE table on POWER3 | ||
108 | * So far, the simplest way that seem work well enough for us it | ||
109 | * to just assume that the first discontinuity in our physical | ||
110 | * RAM layout is the IO hole. That may not be correct in the future | ||
111 | * (and isn't on iSeries but then we don't care ;) | ||
112 | */ | ||
113 | |||
114 | #ifndef CONFIG_PPC_ISERIES | ||
115 | for (i = 1; i < lmb.memory.cnt; i++) { | ||
116 | unsigned long base, prevbase, prevsize; | ||
117 | |||
118 | prevbase = lmb.memory.region[i-1].base; | ||
119 | prevsize = lmb.memory.region[i-1].size; | ||
120 | base = lmb.memory.region[i].base; | ||
121 | if (base > (prevbase + prevsize)) { | ||
122 | io_hole_start = prevbase + prevsize; | ||
123 | io_hole_size = base - (prevbase + prevsize); | ||
124 | break; | ||
125 | } | ||
126 | } | ||
127 | #endif /* CONFIG_PPC_ISERIES */ | ||
128 | if (io_hole_start) | ||
129 | printk("IO Hole assumed to be %lx -> %lx\n", | ||
130 | io_hole_start, io_hole_start + io_hole_size - 1); | ||
131 | |||
132 | ppc64_boot_msg(0x100, "MM Init Done"); | ||
133 | } | ||
134 | |||
135 | void free_initmem(void) | 87 | void free_initmem(void) |
136 | { | 88 | { |
137 | unsigned long addr; | 89 | unsigned long addr; |
@@ -140,7 +92,7 @@ void free_initmem(void) | |||
140 | for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) { | 92 | for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) { |
141 | memset((void *)addr, 0xcc, PAGE_SIZE); | 93 | memset((void *)addr, 0xcc, PAGE_SIZE); |
142 | ClearPageReserved(virt_to_page(addr)); | 94 | ClearPageReserved(virt_to_page(addr)); |
143 | set_page_count(virt_to_page(addr), 1); | 95 | init_page_count(virt_to_page(addr)); |
144 | free_page(addr); | 96 | free_page(addr); |
145 | totalram_pages++; | 97 | totalram_pages++; |
146 | } | 98 | } |
@@ -155,7 +107,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
155 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | 107 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); |
156 | for (; start < end; start += PAGE_SIZE) { | 108 | for (; start < end; start += PAGE_SIZE) { |
157 | ClearPageReserved(virt_to_page(start)); | 109 | ClearPageReserved(virt_to_page(start)); |
158 | set_page_count(virt_to_page(start), 1); | 110 | init_page_count(virt_to_page(start)); |
159 | free_page(start); | 111 | free_page(start); |
160 | totalram_pages++; | 112 | totalram_pages++; |
161 | } | 113 | } |
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index bbe3eac918e8..417d58518558 100644 --- a/arch/powerpc/mm/lmb.c +++ b/arch/powerpc/mm/lmb.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #define DBG(fmt...) | 31 | #define DBG(fmt...) |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #define LMB_ALLOC_ANYWHERE 0 | ||
35 | |||
34 | struct lmb lmb; | 36 | struct lmb lmb; |
35 | 37 | ||
36 | void lmb_dump_all(void) | 38 | void lmb_dump_all(void) |
@@ -226,6 +228,20 @@ unsigned long __init lmb_alloc(unsigned long size, unsigned long align) | |||
226 | unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, | 228 | unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, |
227 | unsigned long max_addr) | 229 | unsigned long max_addr) |
228 | { | 230 | { |
231 | unsigned long alloc; | ||
232 | |||
233 | alloc = __lmb_alloc_base(size, align, max_addr); | ||
234 | |||
235 | if (alloc == 0) | ||
236 | panic("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n", | ||
237 | size, max_addr); | ||
238 | |||
239 | return alloc; | ||
240 | } | ||
241 | |||
242 | unsigned long __init __lmb_alloc_base(unsigned long size, unsigned long align, | ||
243 | unsigned long max_addr) | ||
244 | { | ||
229 | long i, j; | 245 | long i, j; |
230 | unsigned long base = 0; | 246 | unsigned long base = 0; |
231 | 247 | ||
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 550517c2dd42..badac10d700c 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -108,8 +108,8 @@ EXPORT_SYMBOL(phys_mem_access_prot); | |||
108 | void online_page(struct page *page) | 108 | void online_page(struct page *page) |
109 | { | 109 | { |
110 | ClearPageReserved(page); | 110 | ClearPageReserved(page); |
111 | set_page_count(page, 0); | 111 | init_page_count(page); |
112 | free_cold_page(page); | 112 | __free_page(page); |
113 | totalram_pages++; | 113 | totalram_pages++; |
114 | num_physpages++; | 114 | num_physpages++; |
115 | } | 115 | } |
@@ -125,7 +125,7 @@ int __devinit add_memory(u64 start, u64 size) | |||
125 | nid = hot_add_scn_to_nid(start); | 125 | nid = hot_add_scn_to_nid(start); |
126 | pgdata = NODE_DATA(nid); | 126 | pgdata = NODE_DATA(nid); |
127 | 127 | ||
128 | start = __va(start); | 128 | start = (unsigned long)__va(start); |
129 | create_section_mapping(start, start + size); | 129 | create_section_mapping(start, start + size); |
130 | 130 | ||
131 | /* this should work for most non-highmem platforms */ | 131 | /* this should work for most non-highmem platforms */ |
@@ -249,7 +249,6 @@ void __init do_init_bootmem(void) | |||
249 | bootmap_pages = bootmem_bootmap_pages(total_pages); | 249 | bootmap_pages = bootmem_bootmap_pages(total_pages); |
250 | 250 | ||
251 | start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE); | 251 | start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE); |
252 | BUG_ON(!start); | ||
253 | 252 | ||
254 | boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages); | 253 | boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages); |
255 | 254 | ||
@@ -376,7 +375,7 @@ void __init mem_init(void) | |||
376 | struct page *page = pfn_to_page(pfn); | 375 | struct page *page = pfn_to_page(pfn); |
377 | 376 | ||
378 | ClearPageReserved(page); | 377 | ClearPageReserved(page); |
379 | set_page_count(page, 1); | 378 | init_page_count(page); |
380 | __free_page(page); | 379 | __free_page(page); |
381 | totalhigh_pages++; | 380 | totalhigh_pages++; |
382 | } | 381 | } |
diff --git a/arch/powerpc/mm/mmap.c b/arch/powerpc/mm/mmap.c index fe65f522aff3..972a8e884b9a 100644 --- a/arch/powerpc/mm/mmap.c +++ b/arch/powerpc/mm/mmap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/ppc64/mm/mmap.c | ||
3 | * | ||
4 | * flexible mmap layout support | 2 | * flexible mmap layout support |
5 | * | 3 | * |
6 | * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. | 4 | * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 2863a912bcd0..e89b22aa539e 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -129,10 +129,12 @@ void __init get_region(unsigned int nid, unsigned long *start_pfn, | |||
129 | *start_pfn = 0; | 129 | *start_pfn = 0; |
130 | } | 130 | } |
131 | 131 | ||
132 | static inline void map_cpu_to_node(int cpu, int node) | 132 | static void __cpuinit map_cpu_to_node(int cpu, int node) |
133 | { | 133 | { |
134 | numa_cpu_lookup_table[cpu] = node; | 134 | numa_cpu_lookup_table[cpu] = node; |
135 | 135 | ||
136 | dbg("adding cpu %d to node %d\n", cpu, node); | ||
137 | |||
136 | if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node]))) | 138 | if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node]))) |
137 | cpu_set(cpu, numa_cpumask_lookup_table[node]); | 139 | cpu_set(cpu, numa_cpumask_lookup_table[node]); |
138 | } | 140 | } |
@@ -153,7 +155,7 @@ static void unmap_cpu_from_node(unsigned long cpu) | |||
153 | } | 155 | } |
154 | #endif /* CONFIG_HOTPLUG_CPU */ | 156 | #endif /* CONFIG_HOTPLUG_CPU */ |
155 | 157 | ||
156 | static struct device_node *find_cpu_node(unsigned int cpu) | 158 | static struct device_node * __cpuinit find_cpu_node(unsigned int cpu) |
157 | { | 159 | { |
158 | unsigned int hw_cpuid = get_hard_smp_processor_id(cpu); | 160 | unsigned int hw_cpuid = get_hard_smp_processor_id(cpu); |
159 | struct device_node *cpu_node = NULL; | 161 | struct device_node *cpu_node = NULL; |
@@ -189,23 +191,29 @@ static int *of_get_associativity(struct device_node *dev) | |||
189 | return (unsigned int *)get_property(dev, "ibm,associativity", NULL); | 191 | return (unsigned int *)get_property(dev, "ibm,associativity", NULL); |
190 | } | 192 | } |
191 | 193 | ||
192 | static int of_node_numa_domain(struct device_node *device) | 194 | /* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa |
195 | * info is found. | ||
196 | */ | ||
197 | static int of_node_to_nid(struct device_node *device) | ||
193 | { | 198 | { |
194 | int numa_domain; | 199 | int nid = -1; |
195 | unsigned int *tmp; | 200 | unsigned int *tmp; |
196 | 201 | ||
197 | if (min_common_depth == -1) | 202 | if (min_common_depth == -1) |
198 | return 0; | 203 | goto out; |
199 | 204 | ||
200 | tmp = of_get_associativity(device); | 205 | tmp = of_get_associativity(device); |
201 | if (tmp && (tmp[0] >= min_common_depth)) { | 206 | if (!tmp) |
202 | numa_domain = tmp[min_common_depth]; | 207 | goto out; |
203 | } else { | 208 | |
204 | dbg("WARNING: no NUMA information for %s\n", | 209 | if (tmp[0] >= min_common_depth) |
205 | device->full_name); | 210 | nid = tmp[min_common_depth]; |
206 | numa_domain = 0; | 211 | |
207 | } | 212 | /* POWER4 LPAR uses 0xffff as invalid node */ |
208 | return numa_domain; | 213 | if (nid == 0xffff || nid >= MAX_NUMNODES) |
214 | nid = -1; | ||
215 | out: | ||
216 | return nid; | ||
209 | } | 217 | } |
210 | 218 | ||
211 | /* | 219 | /* |
@@ -246,8 +254,7 @@ static int __init find_min_common_depth(void) | |||
246 | if ((len >= 1) && ref_points) { | 254 | if ((len >= 1) && ref_points) { |
247 | depth = ref_points[1]; | 255 | depth = ref_points[1]; |
248 | } else { | 256 | } else { |
249 | dbg("WARNING: could not find NUMA " | 257 | dbg("NUMA: ibm,associativity-reference-points not found.\n"); |
250 | "associativity reference point\n"); | ||
251 | depth = -1; | 258 | depth = -1; |
252 | } | 259 | } |
253 | of_node_put(rtas_root); | 260 | of_node_put(rtas_root); |
@@ -283,9 +290,9 @@ static unsigned long __devinit read_n_cells(int n, unsigned int **buf) | |||
283 | * Figure out to which domain a cpu belongs and stick it there. | 290 | * Figure out to which domain a cpu belongs and stick it there. |
284 | * Return the id of the domain used. | 291 | * Return the id of the domain used. |
285 | */ | 292 | */ |
286 | static int numa_setup_cpu(unsigned long lcpu) | 293 | static int __cpuinit numa_setup_cpu(unsigned long lcpu) |
287 | { | 294 | { |
288 | int numa_domain = 0; | 295 | int nid = 0; |
289 | struct device_node *cpu = find_cpu_node(lcpu); | 296 | struct device_node *cpu = find_cpu_node(lcpu); |
290 | 297 | ||
291 | if (!cpu) { | 298 | if (!cpu) { |
@@ -293,27 +300,16 @@ static int numa_setup_cpu(unsigned long lcpu) | |||
293 | goto out; | 300 | goto out; |
294 | } | 301 | } |
295 | 302 | ||
296 | numa_domain = of_node_numa_domain(cpu); | 303 | nid = of_node_to_nid(cpu); |
297 | 304 | ||
298 | if (numa_domain >= num_online_nodes()) { | 305 | if (nid < 0 || !node_online(nid)) |
299 | /* | 306 | nid = any_online_node(NODE_MASK_ALL); |
300 | * POWER4 LPAR uses 0xffff as invalid node, | ||
301 | * dont warn in this case. | ||
302 | */ | ||
303 | if (numa_domain != 0xffff) | ||
304 | printk(KERN_ERR "WARNING: cpu %ld " | ||
305 | "maps to invalid NUMA node %d\n", | ||
306 | lcpu, numa_domain); | ||
307 | numa_domain = 0; | ||
308 | } | ||
309 | out: | 307 | out: |
310 | node_set_online(numa_domain); | 308 | map_cpu_to_node(lcpu, nid); |
311 | |||
312 | map_cpu_to_node(lcpu, numa_domain); | ||
313 | 309 | ||
314 | of_node_put(cpu); | 310 | of_node_put(cpu); |
315 | 311 | ||
316 | return numa_domain; | 312 | return nid; |
317 | } | 313 | } |
318 | 314 | ||
319 | static int cpu_numa_callback(struct notifier_block *nfb, | 315 | static int cpu_numa_callback(struct notifier_block *nfb, |
@@ -325,10 +321,7 @@ static int cpu_numa_callback(struct notifier_block *nfb, | |||
325 | 321 | ||
326 | switch (action) { | 322 | switch (action) { |
327 | case CPU_UP_PREPARE: | 323 | case CPU_UP_PREPARE: |
328 | if (min_common_depth == -1 || !numa_enabled) | 324 | numa_setup_cpu(lcpu); |
329 | map_cpu_to_node(lcpu, 0); | ||
330 | else | ||
331 | numa_setup_cpu(lcpu); | ||
332 | ret = NOTIFY_OK; | 325 | ret = NOTIFY_OK; |
333 | break; | 326 | break; |
334 | #ifdef CONFIG_HOTPLUG_CPU | 327 | #ifdef CONFIG_HOTPLUG_CPU |
@@ -375,7 +368,7 @@ static int __init parse_numa_properties(void) | |||
375 | { | 368 | { |
376 | struct device_node *cpu = NULL; | 369 | struct device_node *cpu = NULL; |
377 | struct device_node *memory = NULL; | 370 | struct device_node *memory = NULL; |
378 | int max_domain; | 371 | int default_nid = 0; |
379 | unsigned long i; | 372 | unsigned long i; |
380 | 373 | ||
381 | if (numa_enabled == 0) { | 374 | if (numa_enabled == 0) { |
@@ -385,32 +378,32 @@ static int __init parse_numa_properties(void) | |||
385 | 378 | ||
386 | min_common_depth = find_min_common_depth(); | 379 | min_common_depth = find_min_common_depth(); |
387 | 380 | ||
388 | dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth); | ||
389 | if (min_common_depth < 0) | 381 | if (min_common_depth < 0) |
390 | return min_common_depth; | 382 | return min_common_depth; |
391 | 383 | ||
392 | max_domain = numa_setup_cpu(boot_cpuid); | 384 | dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth); |
393 | 385 | ||
394 | /* | 386 | /* |
395 | * Even though we connect cpus to numa domains later in SMP init, | 387 | * Even though we connect cpus to numa domains later in SMP |
396 | * we need to know the maximum node id now. This is because each | 388 | * init, we need to know the node ids now. This is because |
397 | * node id must have NODE_DATA etc backing it. | 389 | * each node to be onlined must have NODE_DATA etc backing it. |
398 | * As a result of hotplug we could still have cpus appear later on | ||
399 | * with larger node ids. In that case we force the cpu into node 0. | ||
400 | */ | 390 | */ |
401 | for_each_cpu(i) { | 391 | for_each_present_cpu(i) { |
402 | int numa_domain; | 392 | int nid; |
403 | 393 | ||
404 | cpu = find_cpu_node(i); | 394 | cpu = find_cpu_node(i); |
395 | BUG_ON(!cpu); | ||
396 | nid = of_node_to_nid(cpu); | ||
397 | of_node_put(cpu); | ||
405 | 398 | ||
406 | if (cpu) { | 399 | /* |
407 | numa_domain = of_node_numa_domain(cpu); | 400 | * Don't fall back to default_nid yet -- we will plug |
408 | of_node_put(cpu); | 401 | * cpus into nodes once the memory scan has discovered |
409 | 402 | * the topology. | |
410 | if (numa_domain < MAX_NUMNODES && | 403 | */ |
411 | max_domain < numa_domain) | 404 | if (nid < 0) |
412 | max_domain = numa_domain; | 405 | continue; |
413 | } | 406 | node_set_online(nid); |
414 | } | 407 | } |
415 | 408 | ||
416 | get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells); | 409 | get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells); |
@@ -418,7 +411,7 @@ static int __init parse_numa_properties(void) | |||
418 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { | 411 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { |
419 | unsigned long start; | 412 | unsigned long start; |
420 | unsigned long size; | 413 | unsigned long size; |
421 | int numa_domain; | 414 | int nid; |
422 | int ranges; | 415 | int ranges; |
423 | unsigned int *memcell_buf; | 416 | unsigned int *memcell_buf; |
424 | unsigned int len; | 417 | unsigned int len; |
@@ -439,18 +432,15 @@ new_range: | |||
439 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); | 432 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); |
440 | size = read_n_cells(n_mem_size_cells, &memcell_buf); | 433 | size = read_n_cells(n_mem_size_cells, &memcell_buf); |
441 | 434 | ||
442 | numa_domain = of_node_numa_domain(memory); | 435 | /* |
443 | 436 | * Assumption: either all memory nodes or none will | |
444 | if (numa_domain >= MAX_NUMNODES) { | 437 | * have associativity properties. If none, then |
445 | if (numa_domain != 0xffff) | 438 | * everything goes to default_nid. |
446 | printk(KERN_ERR "WARNING: memory at %lx maps " | 439 | */ |
447 | "to invalid NUMA node %d\n", start, | 440 | nid = of_node_to_nid(memory); |
448 | numa_domain); | 441 | if (nid < 0) |
449 | numa_domain = 0; | 442 | nid = default_nid; |
450 | } | 443 | node_set_online(nid); |
451 | |||
452 | if (max_domain < numa_domain) | ||
453 | max_domain = numa_domain; | ||
454 | 444 | ||
455 | if (!(size = numa_enforce_memory_limit(start, size))) { | 445 | if (!(size = numa_enforce_memory_limit(start, size))) { |
456 | if (--ranges) | 446 | if (--ranges) |
@@ -459,16 +449,13 @@ new_range: | |||
459 | continue; | 449 | continue; |
460 | } | 450 | } |
461 | 451 | ||
462 | add_region(numa_domain, start >> PAGE_SHIFT, | 452 | add_region(nid, start >> PAGE_SHIFT, |
463 | size >> PAGE_SHIFT); | 453 | size >> PAGE_SHIFT); |
464 | 454 | ||
465 | if (--ranges) | 455 | if (--ranges) |
466 | goto new_range; | 456 | goto new_range; |
467 | } | 457 | } |
468 | 458 | ||
469 | for (i = 0; i <= max_domain; i++) | ||
470 | node_set_online(i); | ||
471 | |||
472 | return 0; | 459 | return 0; |
473 | } | 460 | } |
474 | 461 | ||
@@ -483,7 +470,6 @@ static void __init setup_nonnuma(void) | |||
483 | printk(KERN_INFO "Memory hole size: %ldMB\n", | 470 | printk(KERN_INFO "Memory hole size: %ldMB\n", |
484 | (top_of_ram - total_ram) >> 20); | 471 | (top_of_ram - total_ram) >> 20); |
485 | 472 | ||
486 | map_cpu_to_node(boot_cpuid, 0); | ||
487 | for (i = 0; i < lmb.memory.cnt; ++i) | 473 | for (i = 0; i < lmb.memory.cnt; ++i) |
488 | add_region(0, lmb.memory.region[i].base >> PAGE_SHIFT, | 474 | add_region(0, lmb.memory.region[i].base >> PAGE_SHIFT, |
489 | lmb_size_pages(&lmb.memory, i)); | 475 | lmb_size_pages(&lmb.memory, i)); |
@@ -570,11 +556,11 @@ static void __init *careful_allocation(int nid, unsigned long size, | |||
570 | unsigned long end_pfn) | 556 | unsigned long end_pfn) |
571 | { | 557 | { |
572 | int new_nid; | 558 | int new_nid; |
573 | unsigned long ret = lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT); | 559 | unsigned long ret = __lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT); |
574 | 560 | ||
575 | /* retry over all memory */ | 561 | /* retry over all memory */ |
576 | if (!ret) | 562 | if (!ret) |
577 | ret = lmb_alloc_base(size, align, lmb_end_of_DRAM()); | 563 | ret = __lmb_alloc_base(size, align, lmb_end_of_DRAM()); |
578 | 564 | ||
579 | if (!ret) | 565 | if (!ret) |
580 | panic("numa.c: cannot allocate %lu bytes on node %d", | 566 | panic("numa.c: cannot allocate %lu bytes on node %d", |
@@ -620,6 +606,8 @@ void __init do_init_bootmem(void) | |||
620 | dump_numa_memory_topology(); | 606 | dump_numa_memory_topology(); |
621 | 607 | ||
622 | register_cpu_notifier(&ppc64_numa_nb); | 608 | register_cpu_notifier(&ppc64_numa_nb); |
609 | cpu_numa_callback(&ppc64_numa_nb, CPU_UP_PREPARE, | ||
610 | (void *)(unsigned long)boot_cpuid); | ||
623 | 611 | ||
624 | for_each_online_node(nid) { | 612 | for_each_online_node(nid) { |
625 | unsigned long start_pfn, end_pfn, pages_present; | 613 | unsigned long start_pfn, end_pfn, pages_present; |
@@ -767,10 +755,10 @@ int hot_add_scn_to_nid(unsigned long scn_addr) | |||
767 | { | 755 | { |
768 | struct device_node *memory = NULL; | 756 | struct device_node *memory = NULL; |
769 | nodemask_t nodes; | 757 | nodemask_t nodes; |
770 | int numa_domain = 0; | 758 | int default_nid = any_online_node(NODE_MASK_ALL); |
771 | 759 | ||
772 | if (!numa_enabled || (min_common_depth < 0)) | 760 | if (!numa_enabled || (min_common_depth < 0)) |
773 | return numa_domain; | 761 | return default_nid; |
774 | 762 | ||
775 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { | 763 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { |
776 | unsigned long start, size; | 764 | unsigned long start, size; |
@@ -787,15 +775,15 @@ int hot_add_scn_to_nid(unsigned long scn_addr) | |||
787 | ha_new_range: | 775 | ha_new_range: |
788 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); | 776 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); |
789 | size = read_n_cells(n_mem_size_cells, &memcell_buf); | 777 | size = read_n_cells(n_mem_size_cells, &memcell_buf); |
790 | numa_domain = of_node_numa_domain(memory); | 778 | nid = of_node_to_nid(memory); |
791 | 779 | ||
792 | /* Domains not present at boot default to 0 */ | 780 | /* Domains not present at boot default to 0 */ |
793 | if (!node_online(numa_domain)) | 781 | if (nid < 0 || !node_online(nid)) |
794 | numa_domain = any_online_node(NODE_MASK_ALL); | 782 | nid = default_nid; |
795 | 783 | ||
796 | if ((scn_addr >= start) && (scn_addr < (start + size))) { | 784 | if ((scn_addr >= start) && (scn_addr < (start + size))) { |
797 | of_node_put(memory); | 785 | of_node_put(memory); |
798 | goto got_numa_domain; | 786 | goto got_nid; |
799 | } | 787 | } |
800 | 788 | ||
801 | if (--ranges) /* process all ranges in cell */ | 789 | if (--ranges) /* process all ranges in cell */ |
@@ -804,12 +792,12 @@ ha_new_range: | |||
804 | BUG(); /* section address should be found above */ | 792 | BUG(); /* section address should be found above */ |
805 | 793 | ||
806 | /* Temporary code to ensure that returned node is not empty */ | 794 | /* Temporary code to ensure that returned node is not empty */ |
807 | got_numa_domain: | 795 | got_nid: |
808 | nodes_setall(nodes); | 796 | nodes_setall(nodes); |
809 | while (NODE_DATA(numa_domain)->node_spanned_pages == 0) { | 797 | while (NODE_DATA(nid)->node_spanned_pages == 0) { |
810 | node_clear(numa_domain, nodes); | 798 | node_clear(nid, nodes); |
811 | numa_domain = any_online_node(nodes); | 799 | nid = any_online_node(nodes); |
812 | } | 800 | } |
813 | return numa_domain; | 801 | return nid; |
814 | } | 802 | } |
815 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 803 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S index d1acee38f163..abfaabf667bf 100644 --- a/arch/powerpc/mm/slb_low.S +++ b/arch/powerpc/mm/slb_low.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/mm/slb_low.S | ||
3 | * | ||
4 | * Low-level SLB routines | 2 | * Low-level SLB routines |
5 | * | 3 | * |
6 | * Copyright (C) 2004 David Gibson <dwg@au.ibm.com>, IBM | 4 | * Copyright (C) 2004 David Gibson <dwg@au.ibm.com>, IBM |
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 82e4951826bc..91d25fb27f89 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
@@ -247,10 +247,6 @@ void stabs_alloc(void) | |||
247 | 247 | ||
248 | newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE, | 248 | newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE, |
249 | 1<<SID_SHIFT); | 249 | 1<<SID_SHIFT); |
250 | if (! newstab) | ||
251 | panic("Unable to allocate segment table for CPU %d.\n", | ||
252 | cpu); | ||
253 | |||
254 | newstab = (unsigned long)__va(newstab); | 250 | newstab = (unsigned long)__va(newstab); |
255 | 251 | ||
256 | memset((void *)newstab, 0, HW_PAGE_SIZE); | 252 | memset((void *)newstab, 0, HW_PAGE_SIZE); |
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c index bb3afb6e6317..f734b11566c2 100644 --- a/arch/powerpc/mm/tlb_64.c +++ b/arch/powerpc/mm/tlb_64.c | |||
@@ -36,7 +36,7 @@ | |||
36 | DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); | 36 | DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); |
37 | 37 | ||
38 | /* This is declared as we are using the more or less generic | 38 | /* This is declared as we are using the more or less generic |
39 | * include/asm-ppc64/tlb.h file -- tgall | 39 | * include/asm-powerpc/tlb.h file -- tgall |
40 | */ | 40 | */ |
41 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 41 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
42 | DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur); | 42 | DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur); |
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 659a021da0c7..4b06e53eb9b4 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/oprofile.h> | 10 | #include <linux/oprofile.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
13 | #include <asm/firmware.h> | ||
13 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
14 | #include <asm/system.h> | 15 | #include <asm/system.h> |
15 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
@@ -232,7 +233,7 @@ static unsigned long get_pc(struct pt_regs *regs) | |||
232 | mmcra = mfspr(SPRN_MMCRA); | 233 | mmcra = mfspr(SPRN_MMCRA); |
233 | 234 | ||
234 | /* Were we in the hypervisor? */ | 235 | /* Were we in the hypervisor? */ |
235 | if (platform_is_lpar() && (mmcra & MMCRA_SIHV)) | 236 | if (firmware_has_feature(FW_FEATURE_LPAR) && (mmcra & MMCRA_SIHV)) |
236 | /* function descriptor madness */ | 237 | /* function descriptor madness */ |
237 | return *((unsigned long *)hypervisor_bucket); | 238 | return *((unsigned long *)hypervisor_bucket); |
238 | 239 | ||
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile index 9d8b28ef3343..5c72367441a8 100644 --- a/arch/powerpc/platforms/83xx/Makefile +++ b/arch/powerpc/platforms/83xx/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the PowerPC 83xx linux kernel. | 2 | # Makefile for the PowerPC 83xx linux kernel. |
3 | # | 3 | # |
4 | obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o pci.o | 4 | obj-y := misc.o |
5 | obj-$(CONFIG_PCI) += pci.o | ||
6 | obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o | ||
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c new file mode 100644 index 000000000000..1455bcef4892 --- /dev/null +++ b/arch/powerpc/platforms/83xx/misc.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * misc setup functions for MPC83xx | ||
3 | * | ||
4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/stddef.h> | ||
14 | #include <linux/kernel.h> | ||
15 | |||
16 | #include <asm/io.h> | ||
17 | #include <asm/hw_irq.h> | ||
18 | #include <sysdev/fsl_soc.h> | ||
19 | |||
20 | #include "mpc83xx.h" | ||
21 | |||
22 | void mpc83xx_restart(char *cmd) | ||
23 | { | ||
24 | #define RST_OFFSET 0x00000900 | ||
25 | #define RST_PROT_REG 0x00000018 | ||
26 | #define RST_CTRL_REG 0x0000001c | ||
27 | __be32 __iomem *reg; | ||
28 | |||
29 | /* map reset register space */ | ||
30 | reg = ioremap(get_immrbase() + 0x900, 0xff); | ||
31 | |||
32 | local_irq_disable(); | ||
33 | |||
34 | /* enable software reset "RSTE" */ | ||
35 | out_be32(reg + (RST_PROT_REG >> 2), 0x52535445); | ||
36 | |||
37 | /* set software hard reset */ | ||
38 | out_be32(reg + (RST_CTRL_REG >> 2), 0x2); | ||
39 | for (;;) ; | ||
40 | } | ||
41 | |||
42 | long __init mpc83xx_time_init(void) | ||
43 | { | ||
44 | #define SPCR_OFFSET 0x00000110 | ||
45 | #define SPCR_TBEN 0x00400000 | ||
46 | __be32 __iomem *spcr = ioremap(get_immrbase() + SPCR_OFFSET, 4); | ||
47 | __be32 tmp; | ||
48 | |||
49 | tmp = in_be32(spcr); | ||
50 | out_be32(spcr, tmp | SPCR_TBEN); | ||
51 | |||
52 | iounmap(spcr); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c index 2098dd05a773..7c18b4cd5db4 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.c +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c | |||
@@ -24,22 +24,15 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/seq_file.h> | 25 | #include <linux/seq_file.h> |
26 | #include <linux/root_dev.h> | 26 | #include <linux/root_dev.h> |
27 | #include <linux/module.h> | ||
28 | #include <linux/fsl_devices.h> | ||
29 | 27 | ||
30 | #include <asm/system.h> | 28 | #include <asm/system.h> |
31 | #include <asm/pgtable.h> | ||
32 | #include <asm/page.h> | ||
33 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
34 | #include <asm/time.h> | 30 | #include <asm/time.h> |
35 | #include <asm/io.h> | 31 | #include <asm/io.h> |
36 | #include <asm/machdep.h> | 32 | #include <asm/machdep.h> |
37 | #include <asm/ipic.h> | 33 | #include <asm/ipic.h> |
38 | #include <asm/bootinfo.h> | 34 | #include <asm/bootinfo.h> |
39 | #include <asm/pci-bridge.h> | ||
40 | #include <asm/mpc83xx.h> | ||
41 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
42 | #include <mm/mmu_decl.h> | ||
43 | #include <asm/prom.h> | 36 | #include <asm/prom.h> |
44 | #include <asm/udbg.h> | 37 | #include <asm/udbg.h> |
45 | #include <sysdev/fsl_soc.h> | 38 | #include <sysdev/fsl_soc.h> |
@@ -52,8 +45,6 @@ unsigned long isa_mem_base = 0; | |||
52 | #endif | 45 | #endif |
53 | 46 | ||
54 | #ifdef CONFIG_PCI | 47 | #ifdef CONFIG_PCI |
55 | extern int mpc83xx_pci2_busno; | ||
56 | |||
57 | static int | 48 | static int |
58 | mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | 49 | mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) |
59 | { | 50 | { |
@@ -78,26 +69,14 @@ mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | |||
78 | const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; | 69 | const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; |
79 | return PCI_IRQ_TABLE_LOOKUP; | 70 | return PCI_IRQ_TABLE_LOOKUP; |
80 | } | 71 | } |
81 | 72 | #endif /* CONFIG_PCI */ | |
82 | static int | ||
83 | mpc83xx_exclude_device(u_char bus, u_char devfn) | ||
84 | { | ||
85 | if (bus == 0 && PCI_SLOT(devfn) == 0) | ||
86 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
87 | if (mpc83xx_pci2_busno) | ||
88 | if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0) | ||
89 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
90 | return PCIBIOS_SUCCESSFUL; | ||
91 | } | ||
92 | #endif /* CONFIG_PCI */ | ||
93 | 73 | ||
94 | /* ************************************************************************ | 74 | /* ************************************************************************ |
95 | * | 75 | * |
96 | * Setup the architecture | 76 | * Setup the architecture |
97 | * | 77 | * |
98 | */ | 78 | */ |
99 | static void __init | 79 | static void __init mpc834x_sys_setup_arch(void) |
100 | mpc834x_sys_setup_arch(void) | ||
101 | { | 80 | { |
102 | struct device_node *np; | 81 | struct device_node *np; |
103 | 82 | ||
@@ -106,14 +85,14 @@ mpc834x_sys_setup_arch(void) | |||
106 | 85 | ||
107 | np = of_find_node_by_type(NULL, "cpu"); | 86 | np = of_find_node_by_type(NULL, "cpu"); |
108 | if (np != 0) { | 87 | if (np != 0) { |
109 | unsigned int *fp = (int *) get_property(np, "clock-frequency", NULL); | 88 | unsigned int *fp = |
89 | (int *)get_property(np, "clock-frequency", NULL); | ||
110 | if (fp != 0) | 90 | if (fp != 0) |
111 | loops_per_jiffy = *fp / HZ; | 91 | loops_per_jiffy = *fp / HZ; |
112 | else | 92 | else |
113 | loops_per_jiffy = 50000000 / HZ; | 93 | loops_per_jiffy = 50000000 / HZ; |
114 | of_node_put(np); | 94 | of_node_put(np); |
115 | } | 95 | } |
116 | |||
117 | #ifdef CONFIG_PCI | 96 | #ifdef CONFIG_PCI |
118 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 97 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
119 | add_bridge(np); | 98 | add_bridge(np); |
@@ -124,14 +103,13 @@ mpc834x_sys_setup_arch(void) | |||
124 | #endif | 103 | #endif |
125 | 104 | ||
126 | #ifdef CONFIG_ROOT_NFS | 105 | #ifdef CONFIG_ROOT_NFS |
127 | ROOT_DEV = Root_NFS; | 106 | ROOT_DEV = Root_NFS; |
128 | #else | 107 | #else |
129 | ROOT_DEV = Root_HDA1; | 108 | ROOT_DEV = Root_HDA1; |
130 | #endif | 109 | #endif |
131 | } | 110 | } |
132 | 111 | ||
133 | void __init | 112 | void __init mpc834x_sys_init_IRQ(void) |
134 | mpc834x_sys_init_IRQ(void) | ||
135 | { | 113 | { |
136 | u8 senses[8] = { | 114 | u8 senses[8] = { |
137 | 0, /* EXT 0 */ | 115 | 0, /* EXT 0 */ |
@@ -160,64 +138,27 @@ mpc834x_sys_init_IRQ(void) | |||
160 | } | 138 | } |
161 | 139 | ||
162 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) | 140 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) |
163 | extern ulong ds1374_get_rtc_time(void); | 141 | extern ulong ds1374_get_rtc_time(void); |
164 | extern int ds1374_set_rtc_time(ulong); | 142 | extern int ds1374_set_rtc_time(ulong); |
165 | 143 | ||
166 | static int __init | 144 | static int __init mpc834x_rtc_hookup(void) |
167 | mpc834x_rtc_hookup(void) | ||
168 | { | 145 | { |
169 | struct timespec tv; | 146 | struct timespec tv; |
170 | 147 | ||
171 | ppc_md.get_rtc_time = ds1374_get_rtc_time; | 148 | ppc_md.get_rtc_time = ds1374_get_rtc_time; |
172 | ppc_md.set_rtc_time = ds1374_set_rtc_time; | 149 | ppc_md.set_rtc_time = ds1374_set_rtc_time; |
173 | 150 | ||
174 | tv.tv_nsec = 0; | 151 | tv.tv_nsec = 0; |
175 | tv.tv_sec = (ppc_md.get_rtc_time)(); | 152 | tv.tv_sec = (ppc_md.get_rtc_time) (); |
176 | do_settimeofday(&tv); | 153 | do_settimeofday(&tv); |
177 | 154 | ||
178 | return 0; | 155 | return 0; |
179 | } | 156 | } |
157 | |||
180 | late_initcall(mpc834x_rtc_hookup); | 158 | late_initcall(mpc834x_rtc_hookup); |
181 | #endif | 159 | #endif |
182 | 160 | ||
183 | static void | 161 | void __init platform_init(void) |
184 | mpc83xx_restart(char *cmd) | ||
185 | { | ||
186 | #define RST_OFFSET 0x00000900 | ||
187 | #define RST_PROT_REG 0x00000018 | ||
188 | #define RST_CTRL_REG 0x0000001c | ||
189 | __be32 __iomem *reg; | ||
190 | |||
191 | // map reset register space | ||
192 | reg = ioremap(get_immrbase() + 0x900, 0xff); | ||
193 | |||
194 | local_irq_disable(); | ||
195 | |||
196 | /* enable software reset "RSTE" */ | ||
197 | out_be32(reg + (RST_PROT_REG >> 2), 0x52535445); | ||
198 | |||
199 | /* set software hard reset */ | ||
200 | out_be32(reg + (RST_CTRL_REG >> 2), 0x52535445); | ||
201 | for(;;); | ||
202 | } | ||
203 | |||
204 | static long __init | ||
205 | mpc83xx_time_init(void) | ||
206 | { | ||
207 | #define SPCR_OFFSET 0x00000110 | ||
208 | #define SPCR_TBEN 0x00400000 | ||
209 | __be32 __iomem *spcr = ioremap(get_immrbase() + SPCR_OFFSET, 4); | ||
210 | __be32 tmp; | ||
211 | |||
212 | tmp = in_be32(spcr); | ||
213 | out_be32(spcr, tmp|SPCR_TBEN); | ||
214 | |||
215 | iounmap(spcr); | ||
216 | |||
217 | return 0; | ||
218 | } | ||
219 | void __init | ||
220 | platform_init(void) | ||
221 | { | 162 | { |
222 | /* setup the PowerPC module struct */ | 163 | /* setup the PowerPC module struct */ |
223 | ppc_md.setup_arch = mpc834x_sys_setup_arch; | 164 | ppc_md.setup_arch = mpc834x_sys_setup_arch; |
@@ -239,5 +180,3 @@ platform_init(void) | |||
239 | 180 | ||
240 | return; | 181 | return; |
241 | } | 182 | } |
242 | |||
243 | |||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.h b/arch/powerpc/platforms/83xx/mpc834x_sys.h index e4ca39f6a862..fedecb73f7ff 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.h +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.h | |||
@@ -20,4 +20,4 @@ | |||
20 | #define PIRQC MPC83xx_IRQ_EXT6 | 20 | #define PIRQC MPC83xx_IRQ_EXT6 |
21 | #define PIRQD MPC83xx_IRQ_EXT7 | 21 | #define PIRQD MPC83xx_IRQ_EXT7 |
22 | 22 | ||
23 | #endif /* __MACH_MPC83XX_SYS_H__ */ | 23 | #endif /* __MACH_MPC83XX_SYS_H__ */ |
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index ce9e66abef24..01cae106912b 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h | |||
@@ -10,5 +10,8 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | extern int add_bridge(struct device_node *dev); | 12 | extern int add_bridge(struct device_node *dev); |
13 | extern int mpc83xx_exclude_device(u_char bus, u_char devfn); | ||
14 | extern void mpc83xx_restart(char *cmd); | ||
15 | extern long mpc83xx_time_init(void); | ||
13 | 16 | ||
14 | #endif /* __MPC83XX_H__ */ | 17 | #endif /* __MPC83XX_H__ */ |
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c index 469cdacc5bd4..16f7d3b30e1d 100644 --- a/arch/powerpc/platforms/83xx/pci.c +++ b/arch/powerpc/platforms/83xx/pci.c | |||
@@ -36,7 +36,16 @@ | |||
36 | 36 | ||
37 | int mpc83xx_pci2_busno; | 37 | int mpc83xx_pci2_busno; |
38 | 38 | ||
39 | #ifdef CONFIG_PCI | 39 | int mpc83xx_exclude_device(u_char bus, u_char devfn) |
40 | { | ||
41 | if (bus == 0 && PCI_SLOT(devfn) == 0) | ||
42 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
43 | if (mpc83xx_pci2_busno) | ||
44 | if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0) | ||
45 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
46 | return PCIBIOS_SUCCESSFUL; | ||
47 | } | ||
48 | |||
40 | int __init add_bridge(struct device_node *dev) | 49 | int __init add_bridge(struct device_node *dev) |
41 | { | 50 | { |
42 | int len; | 51 | int len; |
@@ -52,7 +61,7 @@ int __init add_bridge(struct device_node *dev) | |||
52 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); | 61 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); |
53 | 62 | ||
54 | /* Get bus range if any */ | 63 | /* Get bus range if any */ |
55 | bus_range = (int *) get_property(dev, "bus-range", &len); | 64 | bus_range = (int *)get_property(dev, "bus-range", &len); |
56 | if (bus_range == NULL || len < 2 * sizeof(int)) { | 65 | if (bus_range == NULL || len < 2 * sizeof(int)) { |
57 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | 66 | printk(KERN_WARNING "Can't get bus-range for %s, assume" |
58 | " bus 0\n", dev->full_name); | 67 | " bus 0\n", dev->full_name); |
@@ -74,7 +83,7 @@ int __init add_bridge(struct device_node *dev) | |||
74 | if ((rsrc.start & 0xfffff) == 0x8500) { | 83 | if ((rsrc.start & 0xfffff) == 0x8500) { |
75 | setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304); | 84 | setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304); |
76 | } | 85 | } |
77 | /* PCI 2*/ | 86 | /* PCI 2 */ |
78 | if ((rsrc.start & 0xfffff) == 0x8600) { | 87 | if ((rsrc.start & 0xfffff) == 0x8600) { |
79 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); | 88 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); |
80 | primary = 0; | 89 | primary = 0; |
@@ -84,10 +93,10 @@ int __init add_bridge(struct device_node *dev) | |||
84 | 93 | ||
85 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " | 94 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " |
86 | "Firmware bus number: %d->%d\n", | 95 | "Firmware bus number: %d->%d\n", |
87 | rsrc.start, hose->first_busno, hose->last_busno); | 96 | rsrc.start, hose->first_busno, hose->last_busno); |
88 | 97 | ||
89 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", | 98 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", |
90 | hose, hose->cfg_addr, hose->cfg_data); | 99 | hose, hose->cfg_addr, hose->cfg_data); |
91 | 100 | ||
92 | /* Interpret the "ranges" property */ | 101 | /* Interpret the "ranges" property */ |
93 | /* This also maps the I/O region and sets isa_io/mem_base */ | 102 | /* This also maps the I/O region and sets isa_io/mem_base */ |
@@ -95,5 +104,3 @@ int __init add_bridge(struct device_node *dev) | |||
95 | 104 | ||
96 | return 0; | 105 | return 0; |
97 | } | 106 | } |
98 | |||
99 | #endif | ||
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index c5bc2821d991..d3d0ff745e84 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -1,86 +1,30 @@ | |||
1 | config 85xx | 1 | menu "Platform support" |
2 | bool | 2 | depends on PPC_85xx |
3 | depends on E500 | ||
4 | default y | ||
5 | |||
6 | config PPC_INDIRECT_PCI_BE | ||
7 | bool | ||
8 | depends on 85xx | ||
9 | default y | ||
10 | |||
11 | menu "Freescale 85xx options" | ||
12 | depends on E500 | ||
13 | 3 | ||
14 | choice | 4 | choice |
15 | prompt "Machine Type" | 5 | prompt "Machine Type" |
16 | depends on 85xx | ||
17 | default MPC8540_ADS | 6 | default MPC8540_ADS |
18 | 7 | ||
19 | config MPC8540_ADS | 8 | config MPC8540_ADS |
20 | bool "Freescale MPC8540 ADS" | 9 | bool "Freescale MPC8540 ADS" |
21 | help | 10 | help |
22 | This option enables support for the MPC 8540 ADS evaluation board. | 11 | This option enables support for the MPC 8540 ADS board |
23 | |||
24 | config MPC8548_CDS | ||
25 | bool "Freescale MPC8548 CDS" | ||
26 | help | ||
27 | This option enablese support for the MPC8548 CDS evaluation board. | ||
28 | |||
29 | config MPC8555_CDS | ||
30 | bool "Freescale MPC8555 CDS" | ||
31 | help | ||
32 | This option enablese support for the MPC8555 CDS evaluation board. | ||
33 | |||
34 | config MPC8560_ADS | ||
35 | bool "Freescale MPC8560 ADS" | ||
36 | help | ||
37 | This option enables support for the MPC 8560 ADS evaluation board. | ||
38 | |||
39 | config SBC8560 | ||
40 | bool "WindRiver PowerQUICC III SBC8560" | ||
41 | help | ||
42 | This option enables support for the WindRiver PowerQUICC III | ||
43 | SBC8560 board. | ||
44 | |||
45 | config STX_GP3 | ||
46 | bool "Silicon Turnkey Express GP3" | ||
47 | help | ||
48 | This option enables support for the Silicon Turnkey Express GP3 | ||
49 | board. | ||
50 | 12 | ||
51 | endchoice | 13 | endchoice |
52 | 14 | ||
53 | # It's often necessary to know the specific 85xx processor type. | ||
54 | # Fortunately, it is implied (so far) from the board type, so we | ||
55 | # don't need to ask more redundant questions. | ||
56 | config MPC8540 | 15 | config MPC8540 |
57 | bool | 16 | bool |
58 | depends on MPC8540_ADS | 17 | select PPC_UDBG_16550 |
59 | default y | 18 | select PPC_INDIRECT_PCI |
60 | 19 | default y if MPC8540_ADS | |
61 | config MPC8548 | ||
62 | bool | ||
63 | depends on MPC8548_CDS | ||
64 | default y | ||
65 | 20 | ||
66 | config MPC8555 | 21 | config PPC_INDIRECT_PCI_BE |
67 | bool | ||
68 | depends on MPC8555_CDS | ||
69 | default y | ||
70 | |||
71 | config MPC8560 | ||
72 | bool | 22 | bool |
73 | depends on SBC8560 || MPC8560_ADS || STX_GP3 | 23 | depends on PPC_85xx |
74 | default y | ||
75 | |||
76 | config 85xx_PCI2 | ||
77 | bool "Supprt for 2nd PCI host controller" | ||
78 | depends on MPC8555_CDS | ||
79 | default y | 24 | default y |
80 | 25 | ||
81 | config PPC_GEN550 | 26 | config MPIC |
82 | bool | 27 | bool |
83 | depends on MPC8540 || SBC8560 || MPC8555 | ||
84 | default y | 28 | default y |
85 | 29 | ||
86 | endmenu | 30 | endmenu |
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index 6407197ffd89..ffc4139cb214 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile | |||
@@ -1 +1,5 @@ | |||
1 | # empty makefile so make clean works | 1 | # |
2 | # Makefile for the PowerPC 85xx linux kernel. | ||
3 | # | ||
4 | obj-$(CONFIG_PPC_85xx) += misc.o pci.o | ||
5 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o | ||
diff --git a/arch/powerpc/platforms/85xx/misc.c b/arch/powerpc/platforms/85xx/misc.c new file mode 100644 index 000000000000..26c5e822c7c8 --- /dev/null +++ b/arch/powerpc/platforms/85xx/misc.c | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * MPC85xx generic code. | ||
3 | * | ||
4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) | ||
5 | * | ||
6 | * Copyright 2005 Freescale Semiconductor Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | */ | ||
13 | #include <linux/irq.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <asm/irq.h> | ||
16 | |||
17 | extern void abort(void); | ||
18 | |||
19 | void mpc85xx_restart(char *cmd) | ||
20 | { | ||
21 | local_irq_disable(); | ||
22 | abort(); | ||
23 | } | ||
24 | |||
25 | /* For now this is a pass through */ | ||
26 | phys_addr_t fixup_bigphys_addr(phys_addr_t addr, phys_addr_t size) | ||
27 | { | ||
28 | return addr; | ||
29 | }; | ||
30 | |||
31 | EXPORT_SYMBOL(fixup_bigphys_addr); | ||
diff --git a/arch/powerpc/platforms/85xx/mpc8540_ads.h b/arch/powerpc/platforms/85xx/mpc8540_ads.h new file mode 100644 index 000000000000..f770cadb2080 --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc8540_ads.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/85xx/mpc8540_ads.h | ||
3 | * | ||
4 | * MPC8540ADS board definitions | ||
5 | * | ||
6 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> | ||
7 | * | ||
8 | * Copyright 2004 Freescale Semiconductor Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef __MACH_MPC8540ADS_H__ | ||
18 | #define __MACH_MPC8540ADS_H__ | ||
19 | |||
20 | #include <linux/config.h> | ||
21 | #include <linux/initrd.h> | ||
22 | |||
23 | #define BOARD_CCSRBAR ((uint)0xe0000000) | ||
24 | #define BCSR_ADDR ((uint)0xf8000000) | ||
25 | #define BCSR_SIZE ((uint)(32 * 1024)) | ||
26 | |||
27 | /* PCI interrupt controller */ | ||
28 | #define PIRQA MPC85xx_IRQ_EXT1 | ||
29 | #define PIRQB MPC85xx_IRQ_EXT2 | ||
30 | #define PIRQC MPC85xx_IRQ_EXT3 | ||
31 | #define PIRQD MPC85xx_IRQ_EXT4 | ||
32 | |||
33 | /* Offset of CPM register space */ | ||
34 | #define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET) | ||
35 | |||
36 | #endif /* __MACH_MPC8540ADS_H__ */ | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h new file mode 100644 index 000000000000..b44db6268f3d --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc85xx.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/85xx/mpc85xx.h | ||
3 | * | ||
4 | * MPC85xx soc definitions/function decls | ||
5 | * | ||
6 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> | ||
7 | * | ||
8 | * Copyright 2005 Freescale Semiconductor Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | extern void mpc85xx_restart(char *); | ||
18 | extern int add_bridge(struct device_node *dev); | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c new file mode 100644 index 000000000000..b7821dbae00d --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -0,0 +1,244 @@ | |||
1 | /* | ||
2 | * MPC85xx setup and early boot code plus other random bits. | ||
3 | * | ||
4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) | ||
5 | * | ||
6 | * Copyright 2005 Freescale Semiconductor Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/stddef.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/pci.h> | ||
18 | #include <linux/kdev_t.h> | ||
19 | #include <linux/delay.h> | ||
20 | #include <linux/seq_file.h> | ||
21 | #include <linux/root_dev.h> | ||
22 | |||
23 | #include <asm/system.h> | ||
24 | #include <asm/time.h> | ||
25 | #include <asm/machdep.h> | ||
26 | #include <asm/pci-bridge.h> | ||
27 | #include <asm/mpc85xx.h> | ||
28 | #include <asm/prom.h> | ||
29 | #include <asm/mpic.h> | ||
30 | #include <mm/mmu_decl.h> | ||
31 | #include <asm/udbg.h> | ||
32 | |||
33 | #include <sysdev/fsl_soc.h> | ||
34 | #include "mpc85xx.h" | ||
35 | |||
36 | #ifndef CONFIG_PCI | ||
37 | unsigned long isa_io_base = 0; | ||
38 | unsigned long isa_mem_base = 0; | ||
39 | #endif | ||
40 | |||
41 | /* | ||
42 | * Internal interrupts are all Level Sensitive, and Positive Polarity | ||
43 | * | ||
44 | * Note: Likely, this table and the following function should be | ||
45 | * obtained and derived from the OF Device Tree. | ||
46 | */ | ||
47 | static u_char mpc85xx_ads_openpic_initsenses[] __initdata = { | ||
48 | MPC85XX_INTERNAL_IRQ_SENSES, | ||
49 | 0x0, /* External 0: */ | ||
50 | #if defined(CONFIG_PCI) | ||
51 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 1: PCI slot 0 */ | ||
52 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 2: PCI slot 1 */ | ||
53 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 3: PCI slot 2 */ | ||
54 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 4: PCI slot 3 */ | ||
55 | #else | ||
56 | 0x0, /* External 1: */ | ||
57 | 0x0, /* External 2: */ | ||
58 | 0x0, /* External 3: */ | ||
59 | 0x0, /* External 4: */ | ||
60 | #endif | ||
61 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PHY */ | ||
62 | 0x0, /* External 6: */ | ||
63 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 7: PHY */ | ||
64 | 0x0, /* External 8: */ | ||
65 | 0x0, /* External 9: */ | ||
66 | 0x0, /* External 10: */ | ||
67 | 0x0, /* External 11: */ | ||
68 | }; | ||
69 | |||
70 | #ifdef CONFIG_PCI | ||
71 | /* | ||
72 | * interrupt routing | ||
73 | */ | ||
74 | |||
75 | int | ||
76 | mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
77 | { | ||
78 | static char pci_irq_table[][4] = | ||
79 | /* | ||
80 | * This is little evil, but works around the fact | ||
81 | * that revA boards have IDSEL starting at 18 | ||
82 | * and others boards (older) start at 12 | ||
83 | * | ||
84 | * PCI IDSEL/INTPIN->INTLINE | ||
85 | * A B C D | ||
86 | */ | ||
87 | { | ||
88 | {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 2 */ | ||
89 | {PIRQD, PIRQA, PIRQB, PIRQC}, | ||
90 | {PIRQC, PIRQD, PIRQA, PIRQB}, | ||
91 | {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 5 */ | ||
92 | {0, 0, 0, 0}, /* -- */ | ||
93 | {0, 0, 0, 0}, /* -- */ | ||
94 | {0, 0, 0, 0}, /* -- */ | ||
95 | {0, 0, 0, 0}, /* -- */ | ||
96 | {0, 0, 0, 0}, /* -- */ | ||
97 | {0, 0, 0, 0}, /* -- */ | ||
98 | {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 12 */ | ||
99 | {PIRQD, PIRQA, PIRQB, PIRQC}, | ||
100 | {PIRQC, PIRQD, PIRQA, PIRQB}, | ||
101 | {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 15 */ | ||
102 | {0, 0, 0, 0}, /* -- */ | ||
103 | {0, 0, 0, 0}, /* -- */ | ||
104 | {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 18 */ | ||
105 | {PIRQD, PIRQA, PIRQB, PIRQC}, | ||
106 | {PIRQC, PIRQD, PIRQA, PIRQB}, | ||
107 | {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 21 */ | ||
108 | }; | ||
109 | |||
110 | const long min_idsel = 2, max_idsel = 21, irqs_per_slot = 4; | ||
111 | return PCI_IRQ_TABLE_LOOKUP; | ||
112 | } | ||
113 | |||
114 | int | ||
115 | mpc85xx_exclude_device(u_char bus, u_char devfn) | ||
116 | { | ||
117 | if (bus == 0 && PCI_SLOT(devfn) == 0) | ||
118 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
119 | else | ||
120 | return PCIBIOS_SUCCESSFUL; | ||
121 | } | ||
122 | |||
123 | #endif /* CONFIG_PCI */ | ||
124 | |||
125 | |||
126 | void __init mpc85xx_ads_pic_init(void) | ||
127 | { | ||
128 | struct mpic *mpic1; | ||
129 | phys_addr_t OpenPIC_PAddr; | ||
130 | |||
131 | /* Determine the Physical Address of the OpenPIC regs */ | ||
132 | OpenPIC_PAddr = get_immrbase() + MPC85xx_OPENPIC_OFFSET; | ||
133 | |||
134 | mpic1 = mpic_alloc(OpenPIC_PAddr, | ||
135 | MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, | ||
136 | 4, MPC85xx_OPENPIC_IRQ_OFFSET, 0, 250, | ||
137 | mpc85xx_ads_openpic_initsenses, | ||
138 | sizeof(mpc85xx_ads_openpic_initsenses), | ||
139 | " OpenPIC "); | ||
140 | BUG_ON(mpic1 == NULL); | ||
141 | mpic_assign_isu(mpic1, 0, OpenPIC_PAddr + 0x10200); | ||
142 | mpic_assign_isu(mpic1, 1, OpenPIC_PAddr + 0x10280); | ||
143 | mpic_assign_isu(mpic1, 2, OpenPIC_PAddr + 0x10300); | ||
144 | mpic_assign_isu(mpic1, 3, OpenPIC_PAddr + 0x10380); | ||
145 | mpic_assign_isu(mpic1, 4, OpenPIC_PAddr + 0x10400); | ||
146 | mpic_assign_isu(mpic1, 5, OpenPIC_PAddr + 0x10480); | ||
147 | mpic_assign_isu(mpic1, 6, OpenPIC_PAddr + 0x10500); | ||
148 | mpic_assign_isu(mpic1, 7, OpenPIC_PAddr + 0x10580); | ||
149 | |||
150 | /* dummy mappings to get to 48 */ | ||
151 | mpic_assign_isu(mpic1, 8, OpenPIC_PAddr + 0x10600); | ||
152 | mpic_assign_isu(mpic1, 9, OpenPIC_PAddr + 0x10680); | ||
153 | mpic_assign_isu(mpic1, 10, OpenPIC_PAddr + 0x10700); | ||
154 | mpic_assign_isu(mpic1, 11, OpenPIC_PAddr + 0x10780); | ||
155 | |||
156 | /* External ints */ | ||
157 | mpic_assign_isu(mpic1, 12, OpenPIC_PAddr + 0x10000); | ||
158 | mpic_assign_isu(mpic1, 13, OpenPIC_PAddr + 0x10080); | ||
159 | mpic_assign_isu(mpic1, 14, OpenPIC_PAddr + 0x10100); | ||
160 | mpic_init(mpic1); | ||
161 | } | ||
162 | |||
163 | /* | ||
164 | * Setup the architecture | ||
165 | */ | ||
166 | static void __init mpc85xx_ads_setup_arch(void) | ||
167 | { | ||
168 | struct device_node *cpu; | ||
169 | struct device_node *np; | ||
170 | |||
171 | if (ppc_md.progress) | ||
172 | ppc_md.progress("mpc85xx_ads_setup_arch()", 0); | ||
173 | |||
174 | cpu = of_find_node_by_type(NULL, "cpu"); | ||
175 | if (cpu != 0) { | ||
176 | unsigned int *fp; | ||
177 | |||
178 | fp = (int *)get_property(cpu, "clock-frequency", NULL); | ||
179 | if (fp != 0) | ||
180 | loops_per_jiffy = *fp / HZ; | ||
181 | else | ||
182 | loops_per_jiffy = 50000000 / HZ; | ||
183 | of_node_put(cpu); | ||
184 | } | ||
185 | |||
186 | #ifdef CONFIG_PCI | ||
187 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | ||
188 | add_bridge(np); | ||
189 | |||
190 | ppc_md.pci_swizzle = common_swizzle; | ||
191 | ppc_md.pci_map_irq = mpc85xx_map_irq; | ||
192 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; | ||
193 | #endif | ||
194 | |||
195 | #ifdef CONFIG_ROOT_NFS | ||
196 | ROOT_DEV = Root_NFS; | ||
197 | #else | ||
198 | ROOT_DEV = Root_HDA1; | ||
199 | #endif | ||
200 | } | ||
201 | |||
202 | void mpc85xx_ads_show_cpuinfo(struct seq_file *m) | ||
203 | { | ||
204 | uint pvid, svid, phid1; | ||
205 | uint memsize = total_memory; | ||
206 | |||
207 | pvid = mfspr(SPRN_PVR); | ||
208 | svid = mfspr(SPRN_SVR); | ||
209 | |||
210 | seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); | ||
211 | seq_printf(m, "Machine\t\t: mpc85xx\n"); | ||
212 | seq_printf(m, "PVR\t\t: 0x%x\n", pvid); | ||
213 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); | ||
214 | |||
215 | /* Display cpu Pll setting */ | ||
216 | phid1 = mfspr(SPRN_HID1); | ||
217 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | ||
218 | |||
219 | /* Display the amount of memory */ | ||
220 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
221 | } | ||
222 | |||
223 | void __init platform_init(void) | ||
224 | { | ||
225 | ppc_md.setup_arch = mpc85xx_ads_setup_arch; | ||
226 | ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo; | ||
227 | |||
228 | ppc_md.init_IRQ = mpc85xx_ads_pic_init; | ||
229 | ppc_md.get_irq = mpic_get_irq; | ||
230 | |||
231 | ppc_md.restart = mpc85xx_restart; | ||
232 | ppc_md.power_off = NULL; | ||
233 | ppc_md.halt = NULL; | ||
234 | |||
235 | ppc_md.time_init = NULL; | ||
236 | ppc_md.set_rtc_time = NULL; | ||
237 | ppc_md.get_rtc_time = NULL; | ||
238 | ppc_md.calibrate_decr = generic_calibrate_decr; | ||
239 | |||
240 | ppc_md.progress = udbg_progress; | ||
241 | |||
242 | if (ppc_md.progress) | ||
243 | ppc_md.progress("mpc85xx_ads platform_init(): exit", 0); | ||
244 | } | ||
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c new file mode 100644 index 000000000000..bad290110ed1 --- /dev/null +++ b/arch/powerpc/platforms/85xx/pci.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * FSL SoC setup code | ||
3 | * | ||
4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/stddef.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/pci.h> | ||
18 | #include <linux/delay.h> | ||
19 | #include <linux/irq.h> | ||
20 | #include <linux/module.h> | ||
21 | |||
22 | #include <asm/system.h> | ||
23 | #include <asm/atomic.h> | ||
24 | #include <asm/io.h> | ||
25 | #include <asm/pci-bridge.h> | ||
26 | #include <asm/prom.h> | ||
27 | #include <sysdev/fsl_soc.h> | ||
28 | |||
29 | #undef DEBUG | ||
30 | |||
31 | #ifdef DEBUG | ||
32 | #define DBG(x...) printk(x) | ||
33 | #else | ||
34 | #define DBG(x...) | ||
35 | #endif | ||
36 | |||
37 | int mpc85xx_pci2_busno = 0; | ||
38 | |||
39 | #ifdef CONFIG_PCI | ||
40 | int __init add_bridge(struct device_node *dev) | ||
41 | { | ||
42 | int len; | ||
43 | struct pci_controller *hose; | ||
44 | struct resource rsrc; | ||
45 | int *bus_range; | ||
46 | int primary = 1, has_address = 0; | ||
47 | phys_addr_t immr = get_immrbase(); | ||
48 | |||
49 | DBG("Adding PCI host bridge %s\n", dev->full_name); | ||
50 | |||
51 | /* Fetch host bridge registers address */ | ||
52 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); | ||
53 | |||
54 | /* Get bus range if any */ | ||
55 | bus_range = (int *) get_property(dev, "bus-range", &len); | ||
56 | if (bus_range == NULL || len < 2 * sizeof(int)) { | ||
57 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | ||
58 | " bus 0\n", dev->full_name); | ||
59 | } | ||
60 | |||
61 | hose = pcibios_alloc_controller(); | ||
62 | if (!hose) | ||
63 | return -ENOMEM; | ||
64 | hose->arch_data = dev; | ||
65 | hose->set_cfg_type = 1; | ||
66 | |||
67 | hose->first_busno = bus_range ? bus_range[0] : 0; | ||
68 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | ||
69 | |||
70 | /* PCI 1 */ | ||
71 | if ((rsrc.start & 0xfffff) == 0x8000) { | ||
72 | setup_indirect_pci(hose, immr + 0x8000, immr + 0x8004); | ||
73 | } | ||
74 | /* PCI 2 */ | ||
75 | if ((rsrc.start & 0xfffff) == 0x9000) { | ||
76 | setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004); | ||
77 | primary = 0; | ||
78 | hose->bus_offset = hose->first_busno; | ||
79 | mpc85xx_pci2_busno = hose->first_busno; | ||
80 | } | ||
81 | |||
82 | printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%08lx. " | ||
83 | "Firmware bus number: %d->%d\n", | ||
84 | rsrc.start, hose->first_busno, hose->last_busno); | ||
85 | |||
86 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", | ||
87 | hose, hose->cfg_addr, hose->cfg_data); | ||
88 | |||
89 | /* Interpret the "ranges" property */ | ||
90 | /* This also maps the I/O region and sets isa_io/mem_base */ | ||
91 | pci_process_bridge_OF_ranges(hose, dev, primary); | ||
92 | |||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | #endif | ||
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile index 04073fd987ec..c4f6b0d2d140 100644 --- a/arch/powerpc/platforms/Makefile +++ b/arch/powerpc/platforms/Makefile | |||
@@ -8,7 +8,7 @@ endif | |||
8 | obj-$(CONFIG_PPC_CHRP) += chrp/ | 8 | obj-$(CONFIG_PPC_CHRP) += chrp/ |
9 | obj-$(CONFIG_4xx) += 4xx/ | 9 | obj-$(CONFIG_4xx) += 4xx/ |
10 | obj-$(CONFIG_PPC_83xx) += 83xx/ | 10 | obj-$(CONFIG_PPC_83xx) += 83xx/ |
11 | obj-$(CONFIG_85xx) += 85xx/ | 11 | obj-$(CONFIG_PPC_85xx) += 85xx/ |
12 | obj-$(CONFIG_PPC_PSERIES) += pseries/ | 12 | obj-$(CONFIG_PPC_PSERIES) += pseries/ |
13 | obj-$(CONFIG_PPC_ISERIES) += iseries/ | 13 | obj-$(CONFIG_PPC_ISERIES) += iseries/ |
14 | obj-$(CONFIG_PPC_MAPLE) += maple/ | 14 | obj-$(CONFIG_PPC_MAPLE) += maple/ |
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index b33a4443f5a9..fec8e65b36ea 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c | |||
@@ -115,7 +115,7 @@ static void __init cell_spuprop_present(struct device_node *spe, | |||
115 | for (pfn = start_pfn; pfn < end_pfn; pfn++) { | 115 | for (pfn = start_pfn; pfn < end_pfn; pfn++) { |
116 | struct page *page = pfn_to_page(pfn); | 116 | struct page *page = pfn_to_page(pfn); |
117 | set_page_links(page, ZONE_DMA, node_id, pfn); | 117 | set_page_links(page, ZONE_DMA, node_id, pfn); |
118 | set_page_count(page, 1); | 118 | init_page_count(page); |
119 | reset_page_mapcount(page); | 119 | reset_page_mapcount(page); |
120 | SetPageReserved(page); | 120 | SetPageReserved(page); |
121 | INIT_LIST_HEAD(&page->lru); | 121 | INIT_LIST_HEAD(&page->lru); |
diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c index 29c86781c493..6ad4b1a72c96 100644 --- a/arch/powerpc/platforms/chrp/pegasos_eth.c +++ b/arch/powerpc/platforms/chrp/pegasos_eth.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chrp_pegasos_eth.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> | 2 | * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> |
5 | * Thanks to : | 3 | * Thanks to : |
6 | * Dale Farnsworth <dale@farnsworth.org> | 4 | * Dale Farnsworth <dale@farnsworth.org> |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index e1fadbf49150..8bf4307e323d 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/powerpc/platforms/chrp/time.c b/arch/powerpc/platforms/chrp/time.c index 78df2e7ca88a..12c6f689b1aa 100644 --- a/arch/powerpc/platforms/chrp/time.c +++ b/arch/powerpc/platforms/chrp/time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chrp_time.c | ||
3 | * | ||
4 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds | 2 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds |
5 | * | 3 | * |
6 | * Adapted for PowerPC (PReP) by Gary Thomas | 4 | * Adapted for PowerPC (PReP) by Gary Thomas |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index a41d8b78c0cd..d771b8ee857d 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include "setup.h" | 46 | #include "setup.h" |
47 | 47 | ||
48 | extern int piranha_simulator; | 48 | extern int piranha_simulator; |
49 | static int mf_initialized; | ||
49 | 50 | ||
50 | /* | 51 | /* |
51 | * This is the structure layout for the Machine Facilites LPAR event | 52 | * This is the structure layout for the Machine Facilites LPAR event |
@@ -143,7 +144,8 @@ static spinlock_t pending_event_spinlock; | |||
143 | static struct pending_event *pending_event_head; | 144 | static struct pending_event *pending_event_head; |
144 | static struct pending_event *pending_event_tail; | 145 | static struct pending_event *pending_event_tail; |
145 | static struct pending_event *pending_event_avail; | 146 | static struct pending_event *pending_event_avail; |
146 | static struct pending_event pending_event_prealloc[16]; | 147 | #define PENDING_EVENT_PREALLOC_LEN 16 |
148 | static struct pending_event pending_event_prealloc[PENDING_EVENT_PREALLOC_LEN]; | ||
147 | 149 | ||
148 | /* | 150 | /* |
149 | * Put a pending event onto the available queue, so it can get reused. | 151 | * Put a pending event onto the available queue, so it can get reused. |
@@ -597,7 +599,7 @@ void mf_power_off(void) | |||
597 | * Global kernel interface to tell the VSP object in the primary | 599 | * Global kernel interface to tell the VSP object in the primary |
598 | * partition to reboot this partition. | 600 | * partition to reboot this partition. |
599 | */ | 601 | */ |
600 | void mf_reboot(void) | 602 | void mf_reboot(char *cmd) |
601 | { | 603 | { |
602 | printk(KERN_INFO "mf.c: Preparing to bounce...\n"); | 604 | printk(KERN_INFO "mf.c: Preparing to bounce...\n"); |
603 | signal_ce_msg_simple(0x4e, NULL); | 605 | signal_ce_msg_simple(0x4e, NULL); |
@@ -625,7 +627,7 @@ void mf_display_src(u32 word) | |||
625 | /* | 627 | /* |
626 | * Display a single word SRC of the form "PROGXXXX" on the VSP control panel. | 628 | * Display a single word SRC of the form "PROGXXXX" on the VSP control panel. |
627 | */ | 629 | */ |
628 | void mf_display_progress(u16 value) | 630 | static __init void mf_display_progress_src(u16 value) |
629 | { | 631 | { |
630 | u8 ce[12]; | 632 | u8 ce[12]; |
631 | u8 src[72]; | 633 | u8 src[72]; |
@@ -649,30 +651,42 @@ void mf_display_progress(u16 value) | |||
649 | * Clear the VSP control panel. Used to "erase" an SRC that was | 651 | * Clear the VSP control panel. Used to "erase" an SRC that was |
650 | * previously displayed. | 652 | * previously displayed. |
651 | */ | 653 | */ |
652 | void mf_clear_src(void) | 654 | static void mf_clear_src(void) |
653 | { | 655 | { |
654 | signal_ce_msg_simple(0x4b, NULL); | 656 | signal_ce_msg_simple(0x4b, NULL); |
655 | } | 657 | } |
656 | 658 | ||
659 | void __init mf_display_progress(u16 value) | ||
660 | { | ||
661 | if (piranha_simulator || !mf_initialized) | ||
662 | return; | ||
663 | |||
664 | if (0xFFFF == value) | ||
665 | mf_clear_src(); | ||
666 | else | ||
667 | mf_display_progress_src(value); | ||
668 | } | ||
669 | |||
657 | /* | 670 | /* |
658 | * Initialization code here. | 671 | * Initialization code here. |
659 | */ | 672 | */ |
660 | void mf_init(void) | 673 | void __init mf_init(void) |
661 | { | 674 | { |
662 | int i; | 675 | int i; |
663 | 676 | ||
664 | /* initialize */ | ||
665 | spin_lock_init(&pending_event_spinlock); | 677 | spin_lock_init(&pending_event_spinlock); |
666 | for (i = 0; | 678 | |
667 | i < sizeof(pending_event_prealloc) / sizeof(*pending_event_prealloc); | 679 | for (i = 0; i < PENDING_EVENT_PREALLOC_LEN; i++) |
668 | ++i) | ||
669 | free_pending_event(&pending_event_prealloc[i]); | 680 | free_pending_event(&pending_event_prealloc[i]); |
681 | |||
670 | HvLpEvent_registerHandler(HvLpEvent_Type_MachineFac, &hv_handler); | 682 | HvLpEvent_registerHandler(HvLpEvent_Type_MachineFac, &hv_handler); |
671 | 683 | ||
672 | /* virtual continue ack */ | 684 | /* virtual continue ack */ |
673 | signal_ce_msg_simple(0x57, NULL); | 685 | signal_ce_msg_simple(0x57, NULL); |
674 | 686 | ||
675 | /* initialization complete */ | 687 | mf_initialized = 1; |
688 | mb(); | ||
689 | |||
676 | printk(KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities " | 690 | printk(KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities " |
677 | "initialized\n"); | 691 | "initialized\n"); |
678 | } | 692 | } |
@@ -692,6 +706,43 @@ static void get_rtc_time_complete(void *token, struct ce_msg_data *ce_msg) | |||
692 | complete(&rtc->com); | 706 | complete(&rtc->com); |
693 | } | 707 | } |
694 | 708 | ||
709 | static int mf_set_rtc(struct rtc_time *tm) | ||
710 | { | ||
711 | char ce_time[12]; | ||
712 | u8 day, mon, hour, min, sec, y1, y2; | ||
713 | unsigned year; | ||
714 | |||
715 | year = 1900 + tm->tm_year; | ||
716 | y1 = year / 100; | ||
717 | y2 = year % 100; | ||
718 | |||
719 | sec = tm->tm_sec; | ||
720 | min = tm->tm_min; | ||
721 | hour = tm->tm_hour; | ||
722 | day = tm->tm_mday; | ||
723 | mon = tm->tm_mon + 1; | ||
724 | |||
725 | BIN_TO_BCD(sec); | ||
726 | BIN_TO_BCD(min); | ||
727 | BIN_TO_BCD(hour); | ||
728 | BIN_TO_BCD(mon); | ||
729 | BIN_TO_BCD(day); | ||
730 | BIN_TO_BCD(y1); | ||
731 | BIN_TO_BCD(y2); | ||
732 | |||
733 | memset(ce_time, 0, sizeof(ce_time)); | ||
734 | ce_time[3] = 0x41; | ||
735 | ce_time[4] = y1; | ||
736 | ce_time[5] = y2; | ||
737 | ce_time[6] = sec; | ||
738 | ce_time[7] = min; | ||
739 | ce_time[8] = hour; | ||
740 | ce_time[10] = day; | ||
741 | ce_time[11] = mon; | ||
742 | |||
743 | return signal_ce_msg(ce_time, NULL); | ||
744 | } | ||
745 | |||
695 | static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) | 746 | static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) |
696 | { | 747 | { |
697 | tm->tm_wday = 0; | 748 | tm->tm_wday = 0; |
@@ -747,7 +798,7 @@ static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) | |||
747 | return 0; | 798 | return 0; |
748 | } | 799 | } |
749 | 800 | ||
750 | int mf_get_rtc(struct rtc_time *tm) | 801 | static int mf_get_rtc(struct rtc_time *tm) |
751 | { | 802 | { |
752 | struct ce_msg_comp_data ce_complete; | 803 | struct ce_msg_comp_data ce_complete; |
753 | struct rtc_time_data rtc_data; | 804 | struct rtc_time_data rtc_data; |
@@ -780,7 +831,7 @@ static void get_boot_rtc_time_complete(void *token, struct ce_msg_data *ce_msg) | |||
780 | rtc->busy = 0; | 831 | rtc->busy = 0; |
781 | } | 832 | } |
782 | 833 | ||
783 | int mf_get_boot_rtc(struct rtc_time *tm) | 834 | static int mf_get_boot_rtc(struct rtc_time *tm) |
784 | { | 835 | { |
785 | struct ce_msg_comp_data ce_complete; | 836 | struct ce_msg_comp_data ce_complete; |
786 | struct boot_rtc_time_data rtc_data; | 837 | struct boot_rtc_time_data rtc_data; |
@@ -802,43 +853,6 @@ int mf_get_boot_rtc(struct rtc_time *tm) | |||
802 | return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm); | 853 | return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm); |
803 | } | 854 | } |
804 | 855 | ||
805 | int mf_set_rtc(struct rtc_time *tm) | ||
806 | { | ||
807 | char ce_time[12]; | ||
808 | u8 day, mon, hour, min, sec, y1, y2; | ||
809 | unsigned year; | ||
810 | |||
811 | year = 1900 + tm->tm_year; | ||
812 | y1 = year / 100; | ||
813 | y2 = year % 100; | ||
814 | |||
815 | sec = tm->tm_sec; | ||
816 | min = tm->tm_min; | ||
817 | hour = tm->tm_hour; | ||
818 | day = tm->tm_mday; | ||
819 | mon = tm->tm_mon + 1; | ||
820 | |||
821 | BIN_TO_BCD(sec); | ||
822 | BIN_TO_BCD(min); | ||
823 | BIN_TO_BCD(hour); | ||
824 | BIN_TO_BCD(mon); | ||
825 | BIN_TO_BCD(day); | ||
826 | BIN_TO_BCD(y1); | ||
827 | BIN_TO_BCD(y2); | ||
828 | |||
829 | memset(ce_time, 0, sizeof(ce_time)); | ||
830 | ce_time[3] = 0x41; | ||
831 | ce_time[4] = y1; | ||
832 | ce_time[5] = y2; | ||
833 | ce_time[6] = sec; | ||
834 | ce_time[7] = min; | ||
835 | ce_time[8] = hour; | ||
836 | ce_time[10] = day; | ||
837 | ce_time[11] = mon; | ||
838 | |||
839 | return signal_ce_msg(ce_time, NULL); | ||
840 | } | ||
841 | |||
842 | #ifdef CONFIG_PROC_FS | 856 | #ifdef CONFIG_PROC_FS |
843 | 857 | ||
844 | static int proc_mf_dump_cmdline(char *page, char **start, off_t off, | 858 | static int proc_mf_dump_cmdline(char *page, char **start, off_t off, |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 3ecc4a652d82..fa4550611c11 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <asm/iseries/hv_call_xm.h> | 50 | #include <asm/iseries/hv_call_xm.h> |
51 | #include <asm/iseries/it_lp_queue.h> | 51 | #include <asm/iseries/it_lp_queue.h> |
52 | #include <asm/iseries/mf.h> | 52 | #include <asm/iseries/mf.h> |
53 | #include <asm/iseries/it_exp_vpd_panel.h> | ||
53 | #include <asm/iseries/hv_lp_event.h> | 54 | #include <asm/iseries/hv_lp_event.h> |
54 | #include <asm/iseries/lpar_map.h> | 55 | #include <asm/iseries/lpar_map.h> |
55 | #include <asm/udbg.h> | 56 | #include <asm/udbg.h> |
@@ -89,8 +90,6 @@ extern unsigned long embedded_sysmap_end; | |||
89 | extern unsigned long iSeries_recal_tb; | 90 | extern unsigned long iSeries_recal_tb; |
90 | extern unsigned long iSeries_recal_titan; | 91 | extern unsigned long iSeries_recal_titan; |
91 | 92 | ||
92 | static int mf_initialized; | ||
93 | |||
94 | static unsigned long cmd_mem_limit; | 93 | static unsigned long cmd_mem_limit; |
95 | 94 | ||
96 | struct MemoryBlock { | 95 | struct MemoryBlock { |
@@ -303,8 +302,6 @@ static void __init iSeries_init_early(void) | |||
303 | { | 302 | { |
304 | DBG(" -> iSeries_init_early()\n"); | 303 | DBG(" -> iSeries_init_early()\n"); |
305 | 304 | ||
306 | ppc64_firmware_features = FW_FEATURE_ISERIES; | ||
307 | |||
308 | ppc64_interrupt_controller = IC_ISERIES; | 305 | ppc64_interrupt_controller = IC_ISERIES; |
309 | 306 | ||
310 | #if defined(CONFIG_BLK_DEV_INITRD) | 307 | #if defined(CONFIG_BLK_DEV_INITRD) |
@@ -349,8 +346,6 @@ static void __init iSeries_init_early(void) | |||
349 | HvCallEvent_setLpEventQueueInterruptProc(0, 0); | 346 | HvCallEvent_setLpEventQueueInterruptProc(0, 0); |
350 | 347 | ||
351 | mf_init(); | 348 | mf_init(); |
352 | mf_initialized = 1; | ||
353 | mb(); | ||
354 | 349 | ||
355 | /* If we were passed an initrd, set the ROOT_DEV properly if the values | 350 | /* If we were passed an initrd, set the ROOT_DEV properly if the values |
356 | * look sensible. If not, clear initrd reference. | 351 | * look sensible. If not, clear initrd reference. |
@@ -560,39 +555,10 @@ static void iSeries_show_cpuinfo(struct seq_file *m) | |||
560 | seq_printf(m, "machine\t\t: 64-bit iSeries Logical Partition\n"); | 555 | seq_printf(m, "machine\t\t: 64-bit iSeries Logical Partition\n"); |
561 | } | 556 | } |
562 | 557 | ||
563 | /* | ||
564 | * Document me. | ||
565 | */ | ||
566 | static void iSeries_restart(char *cmd) | ||
567 | { | ||
568 | mf_reboot(); | ||
569 | } | ||
570 | |||
571 | /* | ||
572 | * Document me. | ||
573 | */ | ||
574 | static void iSeries_power_off(void) | ||
575 | { | ||
576 | mf_power_off(); | ||
577 | } | ||
578 | |||
579 | /* | ||
580 | * Document me. | ||
581 | */ | ||
582 | static void iSeries_halt(void) | ||
583 | { | ||
584 | mf_power_off(); | ||
585 | } | ||
586 | |||
587 | static void __init iSeries_progress(char * st, unsigned short code) | 558 | static void __init iSeries_progress(char * st, unsigned short code) |
588 | { | 559 | { |
589 | printk("Progress: [%04x] - %s\n", (unsigned)code, st); | 560 | printk("Progress: [%04x] - %s\n", (unsigned)code, st); |
590 | if (!piranha_simulator && mf_initialized) { | 561 | mf_display_progress(code); |
591 | if (code != 0xffff) | ||
592 | mf_display_progress(code); | ||
593 | else | ||
594 | mf_clear_src(); | ||
595 | } | ||
596 | } | 562 | } |
597 | 563 | ||
598 | static void __init iSeries_fixup_klimit(void) | 564 | static void __init iSeries_fixup_klimit(void) |
@@ -711,7 +677,13 @@ void __init iSeries_init_IRQ(void) { } | |||
711 | 677 | ||
712 | static int __init iseries_probe(int platform) | 678 | static int __init iseries_probe(int platform) |
713 | { | 679 | { |
714 | return PLATFORM_ISERIES_LPAR == platform; | 680 | if (PLATFORM_ISERIES_LPAR != platform) |
681 | return 0; | ||
682 | |||
683 | ppc64_firmware_features |= FW_FEATURE_ISERIES; | ||
684 | ppc64_firmware_features |= FW_FEATURE_LPAR; | ||
685 | |||
686 | return 1; | ||
715 | } | 687 | } |
716 | 688 | ||
717 | struct machdep_calls __initdata iseries_md = { | 689 | struct machdep_calls __initdata iseries_md = { |
@@ -721,9 +693,9 @@ struct machdep_calls __initdata iseries_md = { | |||
721 | .get_irq = iSeries_get_irq, | 693 | .get_irq = iSeries_get_irq, |
722 | .init_early = iSeries_init_early, | 694 | .init_early = iSeries_init_early, |
723 | .pcibios_fixup = iSeries_pci_final_fixup, | 695 | .pcibios_fixup = iSeries_pci_final_fixup, |
724 | .restart = iSeries_restart, | 696 | .restart = mf_reboot, |
725 | .power_off = iSeries_power_off, | 697 | .power_off = mf_power_off, |
726 | .halt = iSeries_halt, | 698 | .halt = mf_power_off, |
727 | .get_boot_time = iSeries_get_boot_time, | 699 | .get_boot_time = iSeries_get_boot_time, |
728 | .set_rtc_time = iSeries_set_rtc_time, | 700 | .set_rtc_time = iSeries_set_rtc_time, |
729 | .get_rtc_time = iSeries_get_rtc_time, | 701 | .get_rtc_time = iSeries_get_rtc_time, |
@@ -917,6 +889,24 @@ void dt_cpus(struct iseries_flat_dt *dt) | |||
917 | dt_end_node(dt); | 889 | dt_end_node(dt); |
918 | } | 890 | } |
919 | 891 | ||
892 | void dt_model(struct iseries_flat_dt *dt) | ||
893 | { | ||
894 | char buf[16] = "IBM,"; | ||
895 | |||
896 | /* "IBM," + mfgId[2:3] + systemSerial[1:5] */ | ||
897 | strne2a(buf + 4, xItExtVpdPanel.mfgID + 2, 2); | ||
898 | strne2a(buf + 6, xItExtVpdPanel.systemSerial + 1, 5); | ||
899 | buf[11] = '\0'; | ||
900 | dt_prop_str(dt, "system-id", buf); | ||
901 | |||
902 | /* "IBM," + machineType[0:4] */ | ||
903 | strne2a(buf + 4, xItExtVpdPanel.machineType, 4); | ||
904 | buf[8] = '\0'; | ||
905 | dt_prop_str(dt, "model", buf); | ||
906 | |||
907 | dt_prop_str(dt, "compatible", "IBM,iSeries"); | ||
908 | } | ||
909 | |||
920 | void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) | 910 | void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) |
921 | { | 911 | { |
922 | u64 tmp[2]; | 912 | u64 tmp[2]; |
@@ -927,6 +917,7 @@ void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) | |||
927 | 917 | ||
928 | dt_prop_u32(dt, "#address-cells", 2); | 918 | dt_prop_u32(dt, "#address-cells", 2); |
929 | dt_prop_u32(dt, "#size-cells", 2); | 919 | dt_prop_u32(dt, "#size-cells", 2); |
920 | dt_model(dt); | ||
930 | 921 | ||
931 | /* /memory */ | 922 | /* /memory */ |
932 | dt_start_node(dt, "memory@0"); | 923 | dt_start_node(dt, "memory@0"); |
@@ -940,6 +931,7 @@ void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) | |||
940 | /* /chosen */ | 931 | /* /chosen */ |
941 | dt_start_node(dt, "chosen"); | 932 | dt_start_node(dt, "chosen"); |
942 | dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR); | 933 | dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR); |
934 | dt_prop_str(dt, "bootargs", cmd_line); | ||
943 | if (cmd_mem_limit) | 935 | if (cmd_mem_limit) |
944 | dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit); | 936 | dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit); |
945 | dt_end_node(dt); | 937 | dt_end_node(dt); |
diff --git a/arch/powerpc/platforms/maple/time.c b/arch/powerpc/platforms/maple/time.c index 50bc4eb85353..5e6981d17379 100644 --- a/arch/powerpc/platforms/maple/time.c +++ b/arch/powerpc/platforms/maple/time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/maple_time.c | ||
3 | * | ||
4 | * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org), | 2 | * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org), |
5 | * IBM Corp. | 3 | * IBM Corp. |
6 | * | 4 | * |
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c index 56fd4e05fede..cfd6527a0d7e 100644 --- a/arch/powerpc/platforms/powermac/cpufreq_32.c +++ b/arch/powerpc/platforms/powermac/cpufreq_32.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pmac_cpufreq.c | ||
3 | * | ||
4 | * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2 | * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> |
5 | * Copyright (C) 2004 John Steele Scott <toojays@toojays.net> | 3 | * Copyright (C) 2004 John Steele Scott <toojays@toojays.net> |
6 | * | 4 | * |
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index bbe794891a20..e49eddd5042d 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pmac_feature.c | ||
3 | * | ||
4 | * Copyright (C) 1996-2001 Paul Mackerras (paulus@cs.anu.edu.au) | 2 | * Copyright (C) 1996-2001 Paul Mackerras (paulus@cs.anu.edu.au) |
5 | * Ben. Herrenschmidt (benh@kernel.crashing.org) | 3 | * Ben. Herrenschmidt (benh@kernel.crashing.org) |
6 | * | 4 | * |
diff --git a/arch/powerpc/platforms/powermac/nvram.c b/arch/powerpc/platforms/powermac/nvram.c index 3ebd045a3350..5fd28995c74c 100644 --- a/arch/powerpc/platforms/powermac/nvram.c +++ b/arch/powerpc/platforms/powermac/nvram.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pmac_nvram.c | ||
3 | * | ||
4 | * Copyright (C) 2002 Benjamin Herrenschmidt (benh@kernel.crashing.org) | 2 | * Copyright (C) 2002 Benjamin Herrenschmidt (benh@kernel.crashing.org) |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 29c2946f1c77..385aab90c4d2 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -86,11 +86,10 @@ int ppc_override_l2cr = 0; | |||
86 | int ppc_override_l2cr_value; | 86 | int ppc_override_l2cr_value; |
87 | int has_l2cache = 0; | 87 | int has_l2cache = 0; |
88 | 88 | ||
89 | int pmac_newworld = 1; | 89 | int pmac_newworld; |
90 | 90 | ||
91 | static int current_root_goodness = -1; | 91 | static int current_root_goodness = -1; |
92 | 92 | ||
93 | extern int pmac_newworld; | ||
94 | extern struct machdep_calls pmac_md; | 93 | extern struct machdep_calls pmac_md; |
95 | 94 | ||
96 | #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */ | 95 | #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */ |
@@ -308,9 +307,10 @@ static void __init pmac_setup_arch(void) | |||
308 | for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; ) | 307 | for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; ) |
309 | if (get_property(ic, "interrupt-controller", NULL)) | 308 | if (get_property(ic, "interrupt-controller", NULL)) |
310 | break; | 309 | break; |
311 | pmac_newworld = (ic != NULL); | 310 | if (ic) { |
312 | if (ic) | 311 | pmac_newworld = 1; |
313 | of_node_put(ic); | 312 | of_node_put(ic); |
313 | } | ||
314 | 314 | ||
315 | /* Lookup PCI hosts */ | 315 | /* Lookup PCI hosts */ |
316 | pmac_pci_init(); | 316 | pmac_pci_init(); |
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 6d64a9bf3474..1065d87fc279 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -191,9 +191,7 @@ static void smp_psurge_message_pass(int target, int msg) | |||
191 | if (num_online_cpus() < 2) | 191 | if (num_online_cpus() < 2) |
192 | return; | 192 | return; |
193 | 193 | ||
194 | for (i = 0; i < NR_CPUS; i++) { | 194 | for_each_online_cpu(i) { |
195 | if (!cpu_online(i)) | ||
196 | continue; | ||
197 | if (target == MSG_ALL | 195 | if (target == MSG_ALL |
198 | || (target == MSG_ALL_BUT_SELF && i != smp_processor_id()) | 196 | || (target == MSG_ALL_BUT_SELF && i != smp_processor_id()) |
199 | || target == i) { | 197 | || target == i) { |
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile index 61616d144072..930898635c9f 100644 --- a/arch/powerpc/platforms/pseries/Makefile +++ b/arch/powerpc/platforms/pseries/Makefile | |||
@@ -1,5 +1,6 @@ | |||
1 | obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ | 1 | obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ |
2 | setup.o iommu.o ras.o rtasd.o pci_dlpar.o | 2 | setup.o iommu.o ras.o rtasd.o pci_dlpar.o \ |
3 | firmware.o | ||
3 | obj-$(CONFIG_SMP) += smp.o | 4 | obj-$(CONFIG_SMP) += smp.o |
4 | obj-$(CONFIG_IBMVIO) += vio.o | 5 | obj-$(CONFIG_IBMVIO) += vio.o |
5 | obj-$(CONFIG_XICS) += xics.o | 6 | obj-$(CONFIG_XICS) += xics.o |
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c new file mode 100644 index 000000000000..989f4bc136cb --- /dev/null +++ b/arch/powerpc/platforms/pseries/firmware.c | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * pSeries firmware setup code. | ||
3 | * | ||
4 | * Portions from arch/powerpc/platforms/pseries/setup.c: | ||
5 | * Copyright (C) 1995 Linus Torvalds | ||
6 | * Adapted from 'alpha' version by Gary Thomas | ||
7 | * Modified by Cort Dougan (cort@cs.nmt.edu) | ||
8 | * Modified by PPC64 Team, IBM Corp | ||
9 | * | ||
10 | * Portions from arch/powerpc/kernel/firmware.c | ||
11 | * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org) | ||
12 | * Modifications for ppc64: | ||
13 | * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com> | ||
14 | * Copyright (C) 2005 Stephen Rothwell, IBM Corporation | ||
15 | * | ||
16 | * Copyright 2006 IBM Corporation. | ||
17 | * | ||
18 | * This program is free software; you can redistribute it and/or | ||
19 | * modify it under the terms of the GNU General Public License | ||
20 | * as published by the Free Software Foundation; either version | ||
21 | * 2 of the License, or (at your option) any later version. | ||
22 | */ | ||
23 | |||
24 | #undef DEBUG | ||
25 | |||
26 | #include <asm/firmware.h> | ||
27 | #include <asm/prom.h> | ||
28 | |||
29 | #ifdef DEBUG | ||
30 | #define DBG(fmt...) udbg_printf(fmt) | ||
31 | #else | ||
32 | #define DBG(fmt...) | ||
33 | #endif | ||
34 | |||
35 | typedef struct { | ||
36 | unsigned long val; | ||
37 | char * name; | ||
38 | } firmware_feature_t; | ||
39 | |||
40 | static __initdata firmware_feature_t | ||
41 | firmware_features_table[FIRMWARE_MAX_FEATURES] = { | ||
42 | {FW_FEATURE_PFT, "hcall-pft"}, | ||
43 | {FW_FEATURE_TCE, "hcall-tce"}, | ||
44 | {FW_FEATURE_SPRG0, "hcall-sprg0"}, | ||
45 | {FW_FEATURE_DABR, "hcall-dabr"}, | ||
46 | {FW_FEATURE_COPY, "hcall-copy"}, | ||
47 | {FW_FEATURE_ASR, "hcall-asr"}, | ||
48 | {FW_FEATURE_DEBUG, "hcall-debug"}, | ||
49 | {FW_FEATURE_PERF, "hcall-perf"}, | ||
50 | {FW_FEATURE_DUMP, "hcall-dump"}, | ||
51 | {FW_FEATURE_INTERRUPT, "hcall-interrupt"}, | ||
52 | {FW_FEATURE_MIGRATE, "hcall-migrate"}, | ||
53 | {FW_FEATURE_PERFMON, "hcall-perfmon"}, | ||
54 | {FW_FEATURE_CRQ, "hcall-crq"}, | ||
55 | {FW_FEATURE_VIO, "hcall-vio"}, | ||
56 | {FW_FEATURE_RDMA, "hcall-rdma"}, | ||
57 | {FW_FEATURE_LLAN, "hcall-lLAN"}, | ||
58 | {FW_FEATURE_BULK, "hcall-bulk"}, | ||
59 | {FW_FEATURE_XDABR, "hcall-xdabr"}, | ||
60 | {FW_FEATURE_MULTITCE, "hcall-multi-tce"}, | ||
61 | {FW_FEATURE_SPLPAR, "hcall-splpar"}, | ||
62 | }; | ||
63 | |||
64 | /* Build up the firmware features bitmask using the contents of | ||
65 | * device-tree/ibm,hypertas-functions. Ultimately this functionality may | ||
66 | * be moved into prom.c prom_init(). | ||
67 | */ | ||
68 | void __init fw_feature_init(void) | ||
69 | { | ||
70 | struct device_node *dn; | ||
71 | char *hypertas, *s; | ||
72 | int len, i; | ||
73 | |||
74 | DBG(" -> fw_feature_init()\n"); | ||
75 | |||
76 | dn = of_find_node_by_path("/rtas"); | ||
77 | if (dn == NULL) { | ||
78 | printk(KERN_ERR "WARNING! Cannot find RTAS in device-tree!\n"); | ||
79 | goto out; | ||
80 | } | ||
81 | |||
82 | hypertas = get_property(dn, "ibm,hypertas-functions", &len); | ||
83 | if (hypertas == NULL) | ||
84 | goto out; | ||
85 | |||
86 | for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) { | ||
87 | for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) { | ||
88 | /* check value against table of strings */ | ||
89 | if (!firmware_features_table[i].name || | ||
90 | strcmp(firmware_features_table[i].name, s)) | ||
91 | continue; | ||
92 | |||
93 | /* we have a match */ | ||
94 | ppc64_firmware_features |= | ||
95 | firmware_features_table[i].val; | ||
96 | break; | ||
97 | } | ||
98 | } | ||
99 | |||
100 | out: | ||
101 | of_node_put(dn); | ||
102 | DBG(" <- fw_feature_init()\n"); | ||
103 | } | ||
diff --git a/arch/powerpc/platforms/pseries/firmware.h b/arch/powerpc/platforms/pseries/firmware.h new file mode 100644 index 000000000000..714f56f55362 --- /dev/null +++ b/arch/powerpc/platforms/pseries/firmware.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Copyright 2006 IBM Corporation. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #ifndef _PSERIES_FIRMWARE_H | ||
11 | #define _PSERIES_FIRMWARE_H | ||
12 | |||
13 | #include <asm/firmware.h> | ||
14 | |||
15 | extern void __init fw_feature_init(void); | ||
16 | |||
17 | #endif /* _PSERIES_FIRMWARE_H */ | ||
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S index 176e8da76466..db7c19fe9297 100644 --- a/arch/powerpc/platforms/pseries/hvCall.S +++ b/arch/powerpc/platforms/pseries/hvCall.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/pSeries_hvCall.S | ||
3 | * | ||
4 | * This file contains the generic code to perform a call to the | 2 | * This file contains the generic code to perform a call to the |
5 | * pSeries LPAR hypervisor. | 3 | * pSeries LPAR hypervisor. |
6 | * NOTE: this file will go away when we move to inline this work. | 4 | * NOTE: this file will go away when we move to inline this work. |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 48cfbfc43f99..2643078433f0 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/pSeries_iommu.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
5 | * | 3 | * |
6 | * Rewrite, cleanup: | 4 | * Rewrite, cleanup: |
@@ -582,7 +580,7 @@ void iommu_init_early_pSeries(void) | |||
582 | return; | 580 | return; |
583 | } | 581 | } |
584 | 582 | ||
585 | if (platform_is_lpar()) { | 583 | if (firmware_has_feature(FW_FEATURE_LPAR)) { |
586 | if (firmware_has_feature(FW_FEATURE_MULTITCE)) { | 584 | if (firmware_has_feature(FW_FEATURE_MULTITCE)) { |
587 | ppc_md.tce_build = tce_buildmulti_pSeriesLP; | 585 | ppc_md.tce_build = tce_buildmulti_pSeriesLP; |
588 | ppc_md.tce_free = tce_freemulti_pSeriesLP; | 586 | ppc_md.tce_free = tce_freemulti_pSeriesLP; |
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c index 999a9620b5ce..946ad59e3352 100644 --- a/arch/powerpc/platforms/pseries/pci.c +++ b/arch/powerpc/platforms/pseries/pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/pSeries_pci.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Dave Engebretsen, IBM Corporation |
5 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM | 3 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM |
6 | * | 4 | * |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 9edeca83f434..44d5c7fdcd97 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -60,7 +60,6 @@ | |||
60 | #include <asm/time.h> | 60 | #include <asm/time.h> |
61 | #include <asm/nvram.h> | 61 | #include <asm/nvram.h> |
62 | #include "xics.h" | 62 | #include "xics.h" |
63 | #include <asm/firmware.h> | ||
64 | #include <asm/pmc.h> | 63 | #include <asm/pmc.h> |
65 | #include <asm/mpic.h> | 64 | #include <asm/mpic.h> |
66 | #include <asm/ppc-pci.h> | 65 | #include <asm/ppc-pci.h> |
@@ -70,6 +69,7 @@ | |||
70 | 69 | ||
71 | #include "plpar_wrappers.h" | 70 | #include "plpar_wrappers.h" |
72 | #include "ras.h" | 71 | #include "ras.h" |
72 | #include "firmware.h" | ||
73 | 73 | ||
74 | #ifdef DEBUG | 74 | #ifdef DEBUG |
75 | #define DBG(fmt...) udbg_printf(fmt) | 75 | #define DBG(fmt...) udbg_printf(fmt) |
@@ -246,7 +246,7 @@ static void __init pSeries_setup_arch(void) | |||
246 | ppc_md.idle_loop = default_idle; | 246 | ppc_md.idle_loop = default_idle; |
247 | } | 247 | } |
248 | 248 | ||
249 | if (platform_is_lpar()) | 249 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
250 | ppc_md.enable_pmcs = pseries_lpar_enable_pmcs; | 250 | ppc_md.enable_pmcs = pseries_lpar_enable_pmcs; |
251 | else | 251 | else |
252 | ppc_md.enable_pmcs = power4_enable_pmcs; | 252 | ppc_md.enable_pmcs = power4_enable_pmcs; |
@@ -262,53 +262,6 @@ static int __init pSeries_init_panel(void) | |||
262 | } | 262 | } |
263 | arch_initcall(pSeries_init_panel); | 263 | arch_initcall(pSeries_init_panel); |
264 | 264 | ||
265 | |||
266 | /* Build up the ppc64_firmware_features bitmask field | ||
267 | * using contents of device-tree/ibm,hypertas-functions. | ||
268 | * Ultimately this functionality may be moved into prom.c prom_init(). | ||
269 | */ | ||
270 | static void __init fw_feature_init(void) | ||
271 | { | ||
272 | struct device_node * dn; | ||
273 | char * hypertas; | ||
274 | unsigned int len; | ||
275 | |||
276 | DBG(" -> fw_feature_init()\n"); | ||
277 | |||
278 | ppc64_firmware_features = 0; | ||
279 | dn = of_find_node_by_path("/rtas"); | ||
280 | if (dn == NULL) { | ||
281 | printk(KERN_ERR "WARNING ! Cannot find RTAS in device-tree !\n"); | ||
282 | goto no_rtas; | ||
283 | } | ||
284 | |||
285 | hypertas = get_property(dn, "ibm,hypertas-functions", &len); | ||
286 | if (hypertas) { | ||
287 | while (len > 0){ | ||
288 | int i, hypertas_len; | ||
289 | /* check value against table of strings */ | ||
290 | for(i=0; i < FIRMWARE_MAX_FEATURES ;i++) { | ||
291 | if ((firmware_features_table[i].name) && | ||
292 | (strcmp(firmware_features_table[i].name,hypertas))==0) { | ||
293 | /* we have a match */ | ||
294 | ppc64_firmware_features |= | ||
295 | (firmware_features_table[i].val); | ||
296 | break; | ||
297 | } | ||
298 | } | ||
299 | hypertas_len = strlen(hypertas); | ||
300 | len -= hypertas_len +1; | ||
301 | hypertas+= hypertas_len +1; | ||
302 | } | ||
303 | } | ||
304 | |||
305 | of_node_put(dn); | ||
306 | no_rtas: | ||
307 | |||
308 | DBG(" <- fw_feature_init()\n"); | ||
309 | } | ||
310 | |||
311 | |||
312 | static void __init pSeries_discover_pic(void) | 265 | static void __init pSeries_discover_pic(void) |
313 | { | 266 | { |
314 | struct device_node *np; | 267 | struct device_node *np; |
@@ -367,21 +320,16 @@ static int pseries_set_xdabr(unsigned long dabr) | |||
367 | */ | 320 | */ |
368 | static void __init pSeries_init_early(void) | 321 | static void __init pSeries_init_early(void) |
369 | { | 322 | { |
370 | int iommu_off = 0; | ||
371 | |||
372 | DBG(" -> pSeries_init_early()\n"); | 323 | DBG(" -> pSeries_init_early()\n"); |
373 | 324 | ||
374 | fw_feature_init(); | 325 | fw_feature_init(); |
375 | 326 | ||
376 | if (platform_is_lpar()) | 327 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
377 | hpte_init_lpar(); | 328 | hpte_init_lpar(); |
378 | else { | 329 | else |
379 | hpte_init_native(); | 330 | hpte_init_native(); |
380 | iommu_off = (of_chosen && | ||
381 | get_property(of_chosen, "linux,iommu-off", NULL)); | ||
382 | } | ||
383 | 331 | ||
384 | if (platform_is_lpar()) | 332 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
385 | find_udbg_vterm(); | 333 | find_udbg_vterm(); |
386 | 334 | ||
387 | if (firmware_has_feature(FW_FEATURE_DABR)) | 335 | if (firmware_has_feature(FW_FEATURE_DABR)) |
@@ -437,6 +385,9 @@ static int __init pSeries_probe(int platform) | |||
437 | * it here ... | 385 | * it here ... |
438 | */ | 386 | */ |
439 | 387 | ||
388 | if (platform == PLATFORM_PSERIES_LPAR) | ||
389 | ppc64_firmware_features |= FW_FEATURE_LPAR; | ||
390 | |||
440 | return 1; | 391 | return 1; |
441 | } | 392 | } |
442 | 393 | ||
@@ -576,7 +527,7 @@ static void pseries_shared_idle(void) | |||
576 | 527 | ||
577 | static int pSeries_pci_probe_mode(struct pci_bus *bus) | 528 | static int pSeries_pci_probe_mode(struct pci_bus *bus) |
578 | { | 529 | { |
579 | if (platform_is_lpar()) | 530 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
580 | return PCI_PROBE_DEVTREE; | 531 | return PCI_PROBE_DEVTREE; |
581 | return PCI_PROBE_NORMAL; | 532 | return PCI_PROBE_NORMAL; |
582 | } | 533 | } |
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 8d710af50756..3cf78a6cd27c 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -443,7 +443,7 @@ void __init smp_init_pSeries(void) | |||
443 | smp_ops->cpu_die = pSeries_cpu_die; | 443 | smp_ops->cpu_die = pSeries_cpu_die; |
444 | 444 | ||
445 | /* Processors can be added/removed only on LPAR */ | 445 | /* Processors can be added/removed only on LPAR */ |
446 | if (platform_is_lpar()) | 446 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
447 | pSeries_reconfig_notifier_register(&pSeries_smp_nb); | 447 | pSeries_reconfig_notifier_register(&pSeries_smp_nb); |
448 | #endif | 448 | #endif |
449 | 449 | ||
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index fd823c7c9ac8..eb86cdb9b802 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/gfp.h> | 20 | #include <linux/gfp.h> |
21 | #include <linux/radix-tree.h> | 21 | #include <linux/radix-tree.h> |
22 | #include <linux/cpu.h> | 22 | #include <linux/cpu.h> |
23 | #include <asm/firmware.h> | ||
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
@@ -536,7 +537,7 @@ nextnode: | |||
536 | of_node_put(np); | 537 | of_node_put(np); |
537 | } | 538 | } |
538 | 539 | ||
539 | if (platform_is_lpar()) | 540 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
540 | ops = &pSeriesLP_ops; | 541 | ops = &pSeriesLP_ops; |
541 | else { | 542 | else { |
542 | #ifdef CONFIG_SMP | 543 | #ifdef CONFIG_SMP |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 6298264efe36..61d317428610 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -194,8 +194,6 @@ static int dart_init(struct device_node *dart_node) | |||
194 | * prefetching into invalid pages and corrupting data | 194 | * prefetching into invalid pages and corrupting data |
195 | */ | 195 | */ |
196 | tmp = lmb_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE); | 196 | tmp = lmb_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE); |
197 | if (!tmp) | ||
198 | panic("DART: Cannot allocate spare page!"); | ||
199 | dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) & | 197 | dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) & |
200 | DARTMAP_RPNMASK); | 198 | DARTMAP_RPNMASK); |
201 | 199 | ||
diff --git a/arch/powerpc/sysdev/dcr.S b/arch/powerpc/sysdev/dcr.S index 895f10243a43..2078f39e2f17 100644 --- a/arch/powerpc/sysdev/dcr.S +++ b/arch/powerpc/sysdev/dcr.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/dcr.S | ||
3 | * | ||
4 | * "Indirect" DCR access | 2 | * "Indirect" DCR access |
5 | * | 3 | * |
6 | * Copyright (c) 2004 Eugene Surovegin <ebs@ebshome.net> | 4 | * Copyright (c) 2004 Eugene Surovegin <ebs@ebshome.net> |
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 064c9de47732..ceb584682fa3 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -40,7 +40,7 @@ phys_addr_t get_immrbase(void) | |||
40 | return immrbase; | 40 | return immrbase; |
41 | 41 | ||
42 | soc = of_find_node_by_type(NULL, "soc"); | 42 | soc = of_find_node_by_type(NULL, "soc"); |
43 | if (soc != 0) { | 43 | if (soc) { |
44 | unsigned int size; | 44 | unsigned int size; |
45 | void *prop = get_property(soc, "reg", &size); | 45 | void *prop = get_property(soc, "reg", &size); |
46 | immrbase = of_translate_address(soc, prop); | 46 | immrbase = of_translate_address(soc, prop); |
@@ -49,21 +49,20 @@ phys_addr_t get_immrbase(void) | |||
49 | 49 | ||
50 | return immrbase; | 50 | return immrbase; |
51 | } | 51 | } |
52 | EXPORT_SYMBOL(get_immrbase); | ||
53 | 52 | ||
54 | static const char * gfar_tx_intr = "tx"; | 53 | EXPORT_SYMBOL(get_immrbase); |
55 | static const char * gfar_rx_intr = "rx"; | ||
56 | static const char * gfar_err_intr = "error"; | ||
57 | 54 | ||
58 | static int __init gfar_of_init(void) | 55 | static int __init gfar_mdio_of_init(void) |
59 | { | 56 | { |
60 | struct device_node *np; | 57 | struct device_node *np; |
61 | unsigned int i; | 58 | unsigned int i; |
62 | struct platform_device *mdio_dev, *gfar_dev; | 59 | struct platform_device *mdio_dev; |
63 | struct resource res; | 60 | struct resource res; |
64 | int ret; | 61 | int ret; |
65 | 62 | ||
66 | for (np = NULL, i = 0; (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL; i++) { | 63 | for (np = NULL, i = 0; |
64 | (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL; | ||
65 | i++) { | ||
67 | int k; | 66 | int k; |
68 | struct device_node *child = NULL; | 67 | struct device_node *child = NULL; |
69 | struct gianfar_mdio_data mdio_data; | 68 | struct gianfar_mdio_data mdio_data; |
@@ -73,12 +72,14 @@ static int __init gfar_of_init(void) | |||
73 | 72 | ||
74 | ret = of_address_to_resource(np, 0, &res); | 73 | ret = of_address_to_resource(np, 0, &res); |
75 | if (ret) | 74 | if (ret) |
76 | goto mdio_err; | 75 | goto err; |
77 | 76 | ||
78 | mdio_dev = platform_device_register_simple("fsl-gianfar_mdio", res.start, &res, 1); | 77 | mdio_dev = |
78 | platform_device_register_simple("fsl-gianfar_mdio", | ||
79 | res.start, &res, 1); | ||
79 | if (IS_ERR(mdio_dev)) { | 80 | if (IS_ERR(mdio_dev)) { |
80 | ret = PTR_ERR(mdio_dev); | 81 | ret = PTR_ERR(mdio_dev); |
81 | goto mdio_err; | 82 | goto err; |
82 | } | 83 | } |
83 | 84 | ||
84 | for (k = 0; k < 32; k++) | 85 | for (k = 0; k < 32; k++) |
@@ -86,17 +87,44 @@ static int __init gfar_of_init(void) | |||
86 | 87 | ||
87 | while ((child = of_get_next_child(np, child)) != NULL) { | 88 | while ((child = of_get_next_child(np, child)) != NULL) { |
88 | if (child->n_intrs) { | 89 | if (child->n_intrs) { |
89 | u32 *id = (u32 *) get_property(child, "reg", NULL); | 90 | u32 *id = |
91 | (u32 *) get_property(child, "reg", NULL); | ||
90 | mdio_data.irq[*id] = child->intrs[0].line; | 92 | mdio_data.irq[*id] = child->intrs[0].line; |
91 | } | 93 | } |
92 | } | 94 | } |
93 | 95 | ||
94 | ret = platform_device_add_data(mdio_dev, &mdio_data, sizeof(struct gianfar_mdio_data)); | 96 | ret = |
97 | platform_device_add_data(mdio_dev, &mdio_data, | ||
98 | sizeof(struct gianfar_mdio_data)); | ||
95 | if (ret) | 99 | if (ret) |
96 | goto mdio_unreg; | 100 | goto unreg; |
97 | } | 101 | } |
98 | 102 | ||
99 | for (np = NULL, i = 0; (np = of_find_compatible_node(np, "network", "gianfar")) != NULL; i++) { | 103 | return 0; |
104 | |||
105 | unreg: | ||
106 | platform_device_unregister(mdio_dev); | ||
107 | err: | ||
108 | return ret; | ||
109 | } | ||
110 | |||
111 | arch_initcall(gfar_mdio_of_init); | ||
112 | |||
113 | static const char *gfar_tx_intr = "tx"; | ||
114 | static const char *gfar_rx_intr = "rx"; | ||
115 | static const char *gfar_err_intr = "error"; | ||
116 | |||
117 | static int __init gfar_of_init(void) | ||
118 | { | ||
119 | struct device_node *np; | ||
120 | unsigned int i; | ||
121 | struct platform_device *gfar_dev; | ||
122 | struct resource res; | ||
123 | int ret; | ||
124 | |||
125 | for (np = NULL, i = 0; | ||
126 | (np = of_find_compatible_node(np, "network", "gianfar")) != NULL; | ||
127 | i++) { | ||
100 | struct resource r[4]; | 128 | struct resource r[4]; |
101 | struct device_node *phy, *mdio; | 129 | struct device_node *phy, *mdio; |
102 | struct gianfar_platform_data gfar_data; | 130 | struct gianfar_platform_data gfar_data; |
@@ -110,7 +138,7 @@ static int __init gfar_of_init(void) | |||
110 | 138 | ||
111 | ret = of_address_to_resource(np, 0, &r[0]); | 139 | ret = of_address_to_resource(np, 0, &r[0]); |
112 | if (ret) | 140 | if (ret) |
113 | goto gfar_err; | 141 | goto err; |
114 | 142 | ||
115 | r[1].start = np->intrs[0].line; | 143 | r[1].start = np->intrs[0].line; |
116 | r[1].end = np->intrs[0].line; | 144 | r[1].end = np->intrs[0].line; |
@@ -133,11 +161,13 @@ static int __init gfar_of_init(void) | |||
133 | r[3].flags = IORESOURCE_IRQ; | 161 | r[3].flags = IORESOURCE_IRQ; |
134 | } | 162 | } |
135 | 163 | ||
136 | gfar_dev = platform_device_register_simple("fsl-gianfar", i, &r[0], np->n_intrs + 1); | 164 | gfar_dev = |
165 | platform_device_register_simple("fsl-gianfar", i, &r[0], | ||
166 | np->n_intrs + 1); | ||
137 | 167 | ||
138 | if (IS_ERR(gfar_dev)) { | 168 | if (IS_ERR(gfar_dev)) { |
139 | ret = PTR_ERR(gfar_dev); | 169 | ret = PTR_ERR(gfar_dev); |
140 | goto gfar_err; | 170 | goto err; |
141 | } | 171 | } |
142 | 172 | ||
143 | mac_addr = get_property(np, "address", NULL); | 173 | mac_addr = get_property(np, "address", NULL); |
@@ -145,26 +175,26 @@ static int __init gfar_of_init(void) | |||
145 | 175 | ||
146 | if (model && !strcasecmp(model, "TSEC")) | 176 | if (model && !strcasecmp(model, "TSEC")) |
147 | gfar_data.device_flags = | 177 | gfar_data.device_flags = |
148 | FSL_GIANFAR_DEV_HAS_GIGABIT | | 178 | FSL_GIANFAR_DEV_HAS_GIGABIT | |
149 | FSL_GIANFAR_DEV_HAS_COALESCE | | 179 | FSL_GIANFAR_DEV_HAS_COALESCE | |
150 | FSL_GIANFAR_DEV_HAS_RMON | | 180 | FSL_GIANFAR_DEV_HAS_RMON | |
151 | FSL_GIANFAR_DEV_HAS_MULTI_INTR; | 181 | FSL_GIANFAR_DEV_HAS_MULTI_INTR; |
152 | if (model && !strcasecmp(model, "eTSEC")) | 182 | if (model && !strcasecmp(model, "eTSEC")) |
153 | gfar_data.device_flags = | 183 | gfar_data.device_flags = |
154 | FSL_GIANFAR_DEV_HAS_GIGABIT | | 184 | FSL_GIANFAR_DEV_HAS_GIGABIT | |
155 | FSL_GIANFAR_DEV_HAS_COALESCE | | 185 | FSL_GIANFAR_DEV_HAS_COALESCE | |
156 | FSL_GIANFAR_DEV_HAS_RMON | | 186 | FSL_GIANFAR_DEV_HAS_RMON | |
157 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | | 187 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | |
158 | FSL_GIANFAR_DEV_HAS_CSUM | | 188 | FSL_GIANFAR_DEV_HAS_CSUM | |
159 | FSL_GIANFAR_DEV_HAS_VLAN | | 189 | FSL_GIANFAR_DEV_HAS_VLAN | |
160 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; | 190 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; |
161 | 191 | ||
162 | ph = (phandle *) get_property(np, "phy-handle", NULL); | 192 | ph = (phandle *) get_property(np, "phy-handle", NULL); |
163 | phy = of_find_node_by_phandle(*ph); | 193 | phy = of_find_node_by_phandle(*ph); |
164 | 194 | ||
165 | if (phy == NULL) { | 195 | if (phy == NULL) { |
166 | ret = -ENODEV; | 196 | ret = -ENODEV; |
167 | goto gfar_unreg; | 197 | goto unreg; |
168 | } | 198 | } |
169 | 199 | ||
170 | mdio = of_get_parent(phy); | 200 | mdio = of_get_parent(phy); |
@@ -174,7 +204,7 @@ static int __init gfar_of_init(void) | |||
174 | if (ret) { | 204 | if (ret) { |
175 | of_node_put(phy); | 205 | of_node_put(phy); |
176 | of_node_put(mdio); | 206 | of_node_put(mdio); |
177 | goto gfar_unreg; | 207 | goto unreg; |
178 | } | 208 | } |
179 | 209 | ||
180 | gfar_data.phy_id = *id; | 210 | gfar_data.phy_id = *id; |
@@ -183,23 +213,22 @@ static int __init gfar_of_init(void) | |||
183 | of_node_put(phy); | 213 | of_node_put(phy); |
184 | of_node_put(mdio); | 214 | of_node_put(mdio); |
185 | 215 | ||
186 | ret = platform_device_add_data(gfar_dev, &gfar_data, sizeof(struct gianfar_platform_data)); | 216 | ret = |
217 | platform_device_add_data(gfar_dev, &gfar_data, | ||
218 | sizeof(struct | ||
219 | gianfar_platform_data)); | ||
187 | if (ret) | 220 | if (ret) |
188 | goto gfar_unreg; | 221 | goto unreg; |
189 | } | 222 | } |
190 | 223 | ||
191 | return 0; | 224 | return 0; |
192 | 225 | ||
193 | mdio_unreg: | 226 | unreg: |
194 | platform_device_unregister(mdio_dev); | ||
195 | mdio_err: | ||
196 | return ret; | ||
197 | |||
198 | gfar_unreg: | ||
199 | platform_device_unregister(gfar_dev); | 227 | platform_device_unregister(gfar_dev); |
200 | gfar_err: | 228 | err: |
201 | return ret; | 229 | return ret; |
202 | } | 230 | } |
231 | |||
203 | arch_initcall(gfar_of_init); | 232 | arch_initcall(gfar_of_init); |
204 | 233 | ||
205 | static int __init fsl_i2c_of_init(void) | 234 | static int __init fsl_i2c_of_init(void) |
@@ -209,17 +238,19 @@ static int __init fsl_i2c_of_init(void) | |||
209 | struct platform_device *i2c_dev; | 238 | struct platform_device *i2c_dev; |
210 | int ret; | 239 | int ret; |
211 | 240 | ||
212 | for (np = NULL, i = 0; (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; i++) { | 241 | for (np = NULL, i = 0; |
242 | (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; | ||
243 | i++) { | ||
213 | struct resource r[2]; | 244 | struct resource r[2]; |
214 | struct fsl_i2c_platform_data i2c_data; | 245 | struct fsl_i2c_platform_data i2c_data; |
215 | unsigned char * flags = NULL; | 246 | unsigned char *flags = NULL; |
216 | 247 | ||
217 | memset(&r, 0, sizeof(r)); | 248 | memset(&r, 0, sizeof(r)); |
218 | memset(&i2c_data, 0, sizeof(i2c_data)); | 249 | memset(&i2c_data, 0, sizeof(i2c_data)); |
219 | 250 | ||
220 | ret = of_address_to_resource(np, 0, &r[0]); | 251 | ret = of_address_to_resource(np, 0, &r[0]); |
221 | if (ret) | 252 | if (ret) |
222 | goto i2c_err; | 253 | goto err; |
223 | 254 | ||
224 | r[1].start = np->intrs[0].line; | 255 | r[1].start = np->intrs[0].line; |
225 | r[1].end = np->intrs[0].line; | 256 | r[1].end = np->intrs[0].line; |
@@ -228,7 +259,7 @@ static int __init fsl_i2c_of_init(void) | |||
228 | i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); | 259 | i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); |
229 | if (IS_ERR(i2c_dev)) { | 260 | if (IS_ERR(i2c_dev)) { |
230 | ret = PTR_ERR(i2c_dev); | 261 | ret = PTR_ERR(i2c_dev); |
231 | goto i2c_err; | 262 | goto err; |
232 | } | 263 | } |
233 | 264 | ||
234 | i2c_data.device_flags = 0; | 265 | i2c_data.device_flags = 0; |
@@ -240,18 +271,22 @@ static int __init fsl_i2c_of_init(void) | |||
240 | if (flags) | 271 | if (flags) |
241 | i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200; | 272 | i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200; |
242 | 273 | ||
243 | ret = platform_device_add_data(i2c_dev, &i2c_data, sizeof(struct fsl_i2c_platform_data)); | 274 | ret = |
275 | platform_device_add_data(i2c_dev, &i2c_data, | ||
276 | sizeof(struct | ||
277 | fsl_i2c_platform_data)); | ||
244 | if (ret) | 278 | if (ret) |
245 | goto i2c_unreg; | 279 | goto unreg; |
246 | } | 280 | } |
247 | 281 | ||
248 | return 0; | 282 | return 0; |
249 | 283 | ||
250 | i2c_unreg: | 284 | unreg: |
251 | platform_device_unregister(i2c_dev); | 285 | platform_device_unregister(i2c_dev); |
252 | i2c_err: | 286 | err: |
253 | return ret; | 287 | return ret; |
254 | } | 288 | } |
289 | |||
255 | arch_initcall(fsl_i2c_of_init); | 290 | arch_initcall(fsl_i2c_of_init); |
256 | 291 | ||
257 | #ifdef CONFIG_PPC_83xx | 292 | #ifdef CONFIG_PPC_83xx |
@@ -267,51 +302,192 @@ static int __init mpc83xx_wdt_init(void) | |||
267 | 302 | ||
268 | if (!np) { | 303 | if (!np) { |
269 | ret = -ENODEV; | 304 | ret = -ENODEV; |
270 | goto mpc83xx_wdt_nodev; | 305 | goto nodev; |
271 | } | 306 | } |
272 | 307 | ||
273 | soc = of_find_node_by_type(NULL, "soc"); | 308 | soc = of_find_node_by_type(NULL, "soc"); |
274 | 309 | ||
275 | if (!soc) { | 310 | if (!soc) { |
276 | ret = -ENODEV; | 311 | ret = -ENODEV; |
277 | goto mpc83xx_wdt_nosoc; | 312 | goto nosoc; |
278 | } | 313 | } |
279 | 314 | ||
280 | freq = (unsigned int *)get_property(soc, "bus-frequency", NULL); | 315 | freq = (unsigned int *)get_property(soc, "bus-frequency", NULL); |
281 | if (!freq) { | 316 | if (!freq) { |
282 | ret = -ENODEV; | 317 | ret = -ENODEV; |
283 | goto mpc83xx_wdt_err; | 318 | goto err; |
284 | } | 319 | } |
285 | 320 | ||
286 | memset(&r, 0, sizeof(r)); | 321 | memset(&r, 0, sizeof(r)); |
287 | 322 | ||
288 | ret = of_address_to_resource(np, 0, &r); | 323 | ret = of_address_to_resource(np, 0, &r); |
289 | if (ret) | 324 | if (ret) |
290 | goto mpc83xx_wdt_err; | 325 | goto err; |
291 | 326 | ||
292 | dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1); | 327 | dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1); |
293 | if (IS_ERR(dev)) { | 328 | if (IS_ERR(dev)) { |
294 | ret = PTR_ERR(dev); | 329 | ret = PTR_ERR(dev); |
295 | goto mpc83xx_wdt_err; | 330 | goto err; |
296 | } | 331 | } |
297 | 332 | ||
298 | ret = platform_device_add_data(dev, freq, sizeof(int)); | 333 | ret = platform_device_add_data(dev, freq, sizeof(int)); |
299 | if (ret) | 334 | if (ret) |
300 | goto mpc83xx_wdt_unreg; | 335 | goto unreg; |
301 | 336 | ||
302 | of_node_put(soc); | 337 | of_node_put(soc); |
303 | of_node_put(np); | 338 | of_node_put(np); |
304 | 339 | ||
305 | return 0; | 340 | return 0; |
306 | 341 | ||
307 | mpc83xx_wdt_unreg: | 342 | unreg: |
308 | platform_device_unregister(dev); | 343 | platform_device_unregister(dev); |
309 | mpc83xx_wdt_err: | 344 | err: |
310 | of_node_put(soc); | 345 | of_node_put(soc); |
311 | mpc83xx_wdt_nosoc: | 346 | nosoc: |
312 | of_node_put(np); | 347 | of_node_put(np); |
313 | mpc83xx_wdt_nodev: | 348 | nodev: |
314 | return ret; | 349 | return ret; |
315 | } | 350 | } |
351 | |||
316 | arch_initcall(mpc83xx_wdt_init); | 352 | arch_initcall(mpc83xx_wdt_init); |
317 | #endif | 353 | #endif |
354 | |||
355 | static enum fsl_usb2_phy_modes determine_usb_phy(char * phy_type) | ||
356 | { | ||
357 | if (!phy_type) | ||
358 | return FSL_USB2_PHY_NONE; | ||
359 | if (!strcasecmp(phy_type, "ulpi")) | ||
360 | return FSL_USB2_PHY_ULPI; | ||
361 | if (!strcasecmp(phy_type, "utmi")) | ||
362 | return FSL_USB2_PHY_UTMI; | ||
363 | if (!strcasecmp(phy_type, "utmi_wide")) | ||
364 | return FSL_USB2_PHY_UTMI_WIDE; | ||
365 | if (!strcasecmp(phy_type, "serial")) | ||
366 | return FSL_USB2_PHY_SERIAL; | ||
367 | |||
368 | return FSL_USB2_PHY_NONE; | ||
369 | } | ||
370 | |||
371 | static int __init fsl_usb_of_init(void) | ||
372 | { | ||
373 | struct device_node *np; | ||
374 | unsigned int i; | ||
375 | struct platform_device *usb_dev; | ||
376 | int ret; | ||
377 | |||
378 | for (np = NULL, i = 0; | ||
379 | (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL; | ||
380 | i++) { | ||
381 | struct resource r[2]; | ||
382 | struct fsl_usb2_platform_data usb_data; | ||
383 | unsigned char *prop = NULL; | ||
384 | |||
385 | memset(&r, 0, sizeof(r)); | ||
386 | memset(&usb_data, 0, sizeof(usb_data)); | ||
387 | |||
388 | ret = of_address_to_resource(np, 0, &r[0]); | ||
389 | if (ret) | ||
390 | goto err; | ||
391 | |||
392 | r[1].start = np->intrs[0].line; | ||
393 | r[1].end = np->intrs[0].line; | ||
394 | r[1].flags = IORESOURCE_IRQ; | ||
395 | |||
396 | usb_dev = | ||
397 | platform_device_register_simple("fsl-usb2-mph", i, r, 2); | ||
398 | if (IS_ERR(usb_dev)) { | ||
399 | ret = PTR_ERR(usb_dev); | ||
400 | goto err; | ||
401 | } | ||
402 | |||
403 | usb_dev->dev.coherent_dma_mask = 0xffffffffUL; | ||
404 | usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask; | ||
405 | |||
406 | usb_data.operating_mode = FSL_USB2_MPH_HOST; | ||
407 | |||
408 | prop = get_property(np, "port0", NULL); | ||
409 | if (prop) | ||
410 | usb_data.port_enables |= FSL_USB2_PORT0_ENABLED; | ||
411 | |||
412 | prop = get_property(np, "port1", NULL); | ||
413 | if (prop) | ||
414 | usb_data.port_enables |= FSL_USB2_PORT1_ENABLED; | ||
415 | |||
416 | prop = get_property(np, "phy_type", NULL); | ||
417 | usb_data.phy_mode = determine_usb_phy(prop); | ||
418 | |||
419 | ret = | ||
420 | platform_device_add_data(usb_dev, &usb_data, | ||
421 | sizeof(struct | ||
422 | fsl_usb2_platform_data)); | ||
423 | if (ret) | ||
424 | goto unreg; | ||
425 | } | ||
426 | |||
427 | return 0; | ||
428 | |||
429 | unreg: | ||
430 | platform_device_unregister(usb_dev); | ||
431 | err: | ||
432 | return ret; | ||
433 | } | ||
434 | |||
435 | arch_initcall(fsl_usb_of_init); | ||
436 | |||
437 | static int __init fsl_usb_dr_of_init(void) | ||
438 | { | ||
439 | struct device_node *np; | ||
440 | unsigned int i; | ||
441 | struct platform_device *usb_dev; | ||
442 | int ret; | ||
443 | |||
444 | for (np = NULL, i = 0; | ||
445 | (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL; | ||
446 | i++) { | ||
447 | struct resource r[2]; | ||
448 | struct fsl_usb2_platform_data usb_data; | ||
449 | unsigned char *prop = NULL; | ||
450 | |||
451 | memset(&r, 0, sizeof(r)); | ||
452 | memset(&usb_data, 0, sizeof(usb_data)); | ||
453 | |||
454 | ret = of_address_to_resource(np, 0, &r[0]); | ||
455 | if (ret) | ||
456 | goto err; | ||
457 | |||
458 | r[1].start = np->intrs[0].line; | ||
459 | r[1].end = np->intrs[0].line; | ||
460 | r[1].flags = IORESOURCE_IRQ; | ||
461 | |||
462 | usb_dev = | ||
463 | platform_device_register_simple("fsl-usb2-dr", i, r, 2); | ||
464 | if (IS_ERR(usb_dev)) { | ||
465 | ret = PTR_ERR(usb_dev); | ||
466 | goto err; | ||
467 | } | ||
468 | |||
469 | usb_dev->dev.coherent_dma_mask = 0xffffffffUL; | ||
470 | usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask; | ||
471 | |||
472 | usb_data.operating_mode = FSL_USB2_DR_HOST; | ||
473 | |||
474 | prop = get_property(np, "phy_type", NULL); | ||
475 | usb_data.phy_mode = determine_usb_phy(prop); | ||
476 | |||
477 | ret = | ||
478 | platform_device_add_data(usb_dev, &usb_data, | ||
479 | sizeof(struct | ||
480 | fsl_usb2_platform_data)); | ||
481 | if (ret) | ||
482 | goto unreg; | ||
483 | } | ||
484 | |||
485 | return 0; | ||
486 | |||
487 | unreg: | ||
488 | platform_device_unregister(usb_dev); | ||
489 | err: | ||
490 | return ret; | ||
491 | } | ||
492 | |||
493 | arch_initcall(fsl_usb_dr_of_init); | ||
diff --git a/arch/powerpc/sysdev/ipic.h b/arch/powerpc/sysdev/ipic.h index a7ce7da8785c..a60c9d18bb7f 100644 --- a/arch/powerpc/sysdev/ipic.h +++ b/arch/powerpc/sysdev/ipic.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ipic.h | ||
3 | * | ||
4 | * IPIC private definitions and structure. | 2 | * IPIC private definitions and structure. |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 7d02fa2a8990..4735b41c113c 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -191,6 +191,7 @@ Commands:\n\ | |||
191 | di dump instructions\n\ | 191 | di dump instructions\n\ |
192 | df dump float values\n\ | 192 | df dump float values\n\ |
193 | dd dump double values\n\ | 193 | dd dump double values\n\ |
194 | dr dump stream of raw bytes\n\ | ||
194 | e print exception information\n\ | 195 | e print exception information\n\ |
195 | f flush cache\n\ | 196 | f flush cache\n\ |
196 | la lookup symbol+offset of specified address\n\ | 197 | la lookup symbol+offset of specified address\n\ |
@@ -1938,6 +1939,28 @@ bsesc(void) | |||
1938 | return c; | 1939 | return c; |
1939 | } | 1940 | } |
1940 | 1941 | ||
1942 | static void xmon_rawdump (unsigned long adrs, long ndump) | ||
1943 | { | ||
1944 | long n, m, r, nr; | ||
1945 | unsigned char temp[16]; | ||
1946 | |||
1947 | for (n = ndump; n > 0;) { | ||
1948 | r = n < 16? n: 16; | ||
1949 | nr = mread(adrs, temp, r); | ||
1950 | adrs += nr; | ||
1951 | for (m = 0; m < r; ++m) { | ||
1952 | if (m < nr) | ||
1953 | printf("%.2x", temp[m]); | ||
1954 | else | ||
1955 | printf("%s", fault_chars[fault_type]); | ||
1956 | } | ||
1957 | n -= r; | ||
1958 | if (nr < r) | ||
1959 | break; | ||
1960 | } | ||
1961 | printf("\n"); | ||
1962 | } | ||
1963 | |||
1941 | #define isxdigit(c) (('0' <= (c) && (c) <= '9') \ | 1964 | #define isxdigit(c) (('0' <= (c) && (c) <= '9') \ |
1942 | || ('a' <= (c) && (c) <= 'f') \ | 1965 | || ('a' <= (c) && (c) <= 'f') \ |
1943 | || ('A' <= (c) && (c) <= 'F')) | 1966 | || ('A' <= (c) && (c) <= 'F')) |
@@ -1960,6 +1983,13 @@ dump(void) | |||
1960 | nidump = MAX_DUMP; | 1983 | nidump = MAX_DUMP; |
1961 | adrs += ppc_inst_dump(adrs, nidump, 1); | 1984 | adrs += ppc_inst_dump(adrs, nidump, 1); |
1962 | last_cmd = "di\n"; | 1985 | last_cmd = "di\n"; |
1986 | } else if (c == 'r') { | ||
1987 | scanhex(&ndump); | ||
1988 | if (ndump == 0) | ||
1989 | ndump = 64; | ||
1990 | xmon_rawdump(adrs, ndump); | ||
1991 | adrs += ndump; | ||
1992 | last_cmd = "dr\n"; | ||
1963 | } else { | 1993 | } else { |
1964 | scanhex(&ndump); | 1994 | scanhex(&ndump); |
1965 | if (ndump == 0) | 1995 | if (ndump == 0) |
diff --git a/arch/ppc/4xx_io/serial_sicc.c b/arch/ppc/4xx_io/serial_sicc.c index 8ace2a1f3b48..98b25fa0049a 100644 --- a/arch/ppc/4xx_io/serial_sicc.c +++ b/arch/ppc/4xx_io/serial_sicc.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/4xx_io/serial_sicc.c | ||
3 | * | ||
4 | * Driver for IBM STB3xxx SICC serial port | 2 | * Driver for IBM STB3xxx SICC serial port |
5 | * | 3 | * |
6 | * Based on drivers/char/serial_amba.c, by ARM Ltd. | 4 | * Based on drivers/char/serial_amba.c, by ARM Ltd. |
@@ -1639,9 +1637,8 @@ static struct SICC_info *siccuart_get(int line) | |||
1639 | state->count++; | 1637 | state->count++; |
1640 | if (state->info) | 1638 | if (state->info) |
1641 | return state->info; | 1639 | return state->info; |
1642 | info = kmalloc(sizeof(struct SICC_info), GFP_KERNEL); | 1640 | info = kzalloc(sizeof(struct SICC_info), GFP_KERNEL); |
1643 | if (info) { | 1641 | if (info) { |
1644 | memset(info, 0, sizeof(struct SICC_info)); | ||
1645 | init_waitqueue_head(&info->open_wait); | 1642 | init_waitqueue_head(&info->open_wait); |
1646 | init_waitqueue_head(&info->close_wait); | 1643 | init_waitqueue_head(&info->close_wait); |
1647 | init_waitqueue_head(&info->delta_msr_wait); | 1644 | init_waitqueue_head(&info->delta_msr_wait); |
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c index 579cd40258b9..12b84ca51327 100644 --- a/arch/ppc/8xx_io/commproc.c +++ b/arch/ppc/8xx_io/commproc.c | |||
@@ -73,7 +73,7 @@ cpm_mask_irq(unsigned int irq) | |||
73 | { | 73 | { |
74 | int cpm_vec = irq - CPM_IRQ_OFFSET; | 74 | int cpm_vec = irq - CPM_IRQ_OFFSET; |
75 | 75 | ||
76 | out_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, in_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr) & ~(1 << cpm_vec)); | 76 | clrbits32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, (1 << cpm_vec)); |
77 | } | 77 | } |
78 | 78 | ||
79 | static void | 79 | static void |
@@ -81,7 +81,7 @@ cpm_unmask_irq(unsigned int irq) | |||
81 | { | 81 | { |
82 | int cpm_vec = irq - CPM_IRQ_OFFSET; | 82 | int cpm_vec = irq - CPM_IRQ_OFFSET; |
83 | 83 | ||
84 | out_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, in_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr) | (1 << cpm_vec)); | 84 | setbits32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, (1 << cpm_vec)); |
85 | } | 85 | } |
86 | 86 | ||
87 | static void | 87 | static void |
@@ -198,7 +198,7 @@ cpm_interrupt_init(void) | |||
198 | if (setup_irq(CPM_IRQ_OFFSET + CPMVEC_ERROR, &cpm_error_irqaction)) | 198 | if (setup_irq(CPM_IRQ_OFFSET + CPMVEC_ERROR, &cpm_error_irqaction)) |
199 | panic("Could not allocate CPM error IRQ!"); | 199 | panic("Could not allocate CPM error IRQ!"); |
200 | 200 | ||
201 | out_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr, in_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr) | CICR_IEN); | 201 | setbits32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr, CICR_IEN); |
202 | } | 202 | } |
203 | 203 | ||
204 | /* | 204 | /* |
diff --git a/arch/ppc/8xx_io/cs4218_tdm.c b/arch/ppc/8xx_io/cs4218_tdm.c index 49eb2a7e65c0..a892356d5c3b 100644 --- a/arch/ppc/8xx_io/cs4218_tdm.c +++ b/arch/ppc/8xx_io/cs4218_tdm.c | |||
@@ -126,11 +126,11 @@ static int numReadBufs = 4, readbufSize = 32; | |||
126 | */ | 126 | */ |
127 | static volatile cbd_t *rx_base, *rx_cur, *tx_base, *tx_cur; | 127 | static volatile cbd_t *rx_base, *rx_cur, *tx_base, *tx_cur; |
128 | 128 | ||
129 | MODULE_PARM(catchRadius, "i"); | 129 | module_param(catchRadius, int, 0); |
130 | MODULE_PARM(numBufs, "i"); | 130 | module_param(numBufs, int, 0); |
131 | MODULE_PARM(bufSize, "i"); | 131 | module_param(bufSize, int, 0); |
132 | MODULE_PARM(numreadBufs, "i"); | 132 | module_param(numreadBufs, int, 0); |
133 | MODULE_PARM(readbufSize, "i"); | 133 | module_param(readbufSize, int, 0); |
134 | 134 | ||
135 | #define arraysize(x) (sizeof(x)/sizeof(*(x))) | 135 | #define arraysize(x) (sizeof(x)/sizeof(*(x))) |
136 | #define le2be16(x) (((x)<<8 & 0xff00) | ((x)>>8 & 0x00ff)) | 136 | #define le2be16(x) (((x)<<8 & 0xff00) | ((x)>>8 & 0x00ff)) |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 11899f06bf06..54a0a9bb12dd 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -481,6 +481,53 @@ config WINCEPT | |||
481 | 481 | ||
482 | endchoice | 482 | endchoice |
483 | 483 | ||
484 | menu "Freescale Ethernet driver platform-specific options" | ||
485 | depends on FS_ENET | ||
486 | |||
487 | config MPC8xx_SECOND_ETH | ||
488 | bool "Second Ethernet channel" | ||
489 | depends on (MPC885ADS || MPC86XADS) | ||
490 | default y | ||
491 | help | ||
492 | This enables support for second Ethernet on MPC885ADS and MPC86xADS boards. | ||
493 | The latter will use SCC1, for 885ADS you can select it below. | ||
494 | |||
495 | choice | ||
496 | prompt "Second Ethernet channel" | ||
497 | depends on MPC8xx_SECOND_ETH | ||
498 | default MPC8xx_SECOND_ETH_FEC2 | ||
499 | |||
500 | config MPC8xx_SECOND_ETH_FEC2 | ||
501 | bool "FEC2" | ||
502 | depends on MPC885ADS | ||
503 | help | ||
504 | Enable FEC2 to serve as 2-nd Ethernet channel. Note that SMC2 | ||
505 | (often 2-nd UART) will not work if this is enabled. | ||
506 | |||
507 | config MPC8xx_SECOND_ETH_SCC1 | ||
508 | bool "SCC1" | ||
509 | depends on MPC86XADS | ||
510 | select MPC8xx_SCC_ENET_FIXED | ||
511 | help | ||
512 | Enable SCC1 to serve as 2-nd Ethernet channel. Note that SMC1 | ||
513 | (often 1-nd UART) will not work if this is enabled. | ||
514 | |||
515 | config MPC8xx_SECOND_ETH_SCC3 | ||
516 | bool "SCC3" | ||
517 | depends on MPC885ADS | ||
518 | help | ||
519 | Enable SCC3 to serve as 2-nd Ethernet channel. Note that SMC1 | ||
520 | (often 1-nd UART) will not work if this is enabled. | ||
521 | |||
522 | endchoice | ||
523 | |||
524 | config MPC8xx_SCC_ENET_FIXED | ||
525 | depends on MPC8xx_SECOND_ETH_SCC | ||
526 | default n | ||
527 | bool "Use fixed MII-less mode for SCC Ethernet" | ||
528 | |||
529 | endmenu | ||
530 | |||
484 | choice | 531 | choice |
485 | prompt "Machine Type" | 532 | prompt "Machine Type" |
486 | depends on 6xx || POWER3 | 533 | depends on 6xx || POWER3 |
diff --git a/arch/ppc/Kconfig.debug b/arch/ppc/Kconfig.debug index 61653cb60c4e..8cc75abf3d83 100644 --- a/arch/ppc/Kconfig.debug +++ b/arch/ppc/Kconfig.debug | |||
@@ -67,7 +67,7 @@ config SERIAL_TEXT_DEBUG | |||
67 | 67 | ||
68 | config PPC_OCP | 68 | config PPC_OCP |
69 | bool | 69 | bool |
70 | depends on IBM_OCP || XILINX_OCP | 70 | depends on IBM_OCP |
71 | default y | 71 | default y |
72 | 72 | ||
73 | endmenu | 73 | endmenu |
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile index 98e940beeb3b..9fbdf54ba2be 100644 --- a/arch/ppc/Makefile +++ b/arch/ppc/Makefile | |||
@@ -82,7 +82,7 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ | |||
82 | 82 | ||
83 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm | 83 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm |
84 | 84 | ||
85 | .PHONY: $(BOOT_TARGETS) | 85 | PHONY += $(BOOT_TARGETS) |
86 | 86 | ||
87 | all: uImage zImage | 87 | all: uImage zImage |
88 | 88 | ||
diff --git a/arch/ppc/amiga/amiints.c b/arch/ppc/amiga/amiints.c index 5f35cf3986f7..b2bba052ab93 100644 --- a/arch/ppc/amiga/amiints.c +++ b/arch/ppc/amiga/amiints.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/amiga/amiints.c -- Amiga Linux interrupt handling code | 2 | * Amiga Linux interrupt handling code |
3 | * | 3 | * |
4 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
5 | * License. See the file COPYING in the main directory of this archive | 5 | * License. See the file COPYING in the main directory of this archive |
diff --git a/arch/ppc/amiga/bootinfo.c b/arch/ppc/amiga/bootinfo.c index e2e965661d03..efd869a3ed9b 100644 --- a/arch/ppc/amiga/bootinfo.c +++ b/arch/ppc/amiga/bootinfo.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/amiga/bootinfo.c | ||
3 | * | ||
4 | * Extracted from arch/m68k/kernel/setup.c. | 2 | * Extracted from arch/m68k/kernel/setup.c. |
5 | * Should be properly generalized and put somewhere else. | 3 | * Should be properly generalized and put somewhere else. |
6 | * Jesper | 4 | * Jesper |
diff --git a/arch/ppc/amiga/cia.c b/arch/ppc/amiga/cia.c index 4431c58f611a..9558f2f40e64 100644 --- a/arch/ppc/amiga/cia.c +++ b/arch/ppc/amiga/cia.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/amiga/cia.c - CIA support | ||
3 | * | ||
4 | * Copyright (C) 1996 Roman Zippel | 2 | * Copyright (C) 1996 Roman Zippel |
5 | * | 3 | * |
6 | * The concept of some functions bases on the original Amiga OS function | 4 | * The concept of some functions bases on the original Amiga OS function |
diff --git a/arch/ppc/amiga/config.c b/arch/ppc/amiga/config.c index 60e2da1c92c0..bbe47c9bd707 100644 --- a/arch/ppc/amiga/config.c +++ b/arch/ppc/amiga/config.c | |||
@@ -1,8 +1,6 @@ | |||
1 | #define m68k_debug_device debug_device | 1 | #define m68k_debug_device debug_device |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * arch/ppc/amiga/config.c | ||
5 | * | ||
6 | * Copyright (C) 1993 Hamish Macdonald | 4 | * Copyright (C) 1993 Hamish Macdonald |
7 | * | 5 | * |
8 | * This file is subject to the terms and conditions of the GNU General Public | 6 | * This file is subject to the terms and conditions of the GNU General Public |
diff --git a/arch/ppc/amiga/ints.c b/arch/ppc/amiga/ints.c index 5d318e498f06..083a17462190 100644 --- a/arch/ppc/amiga/ints.c +++ b/arch/ppc/amiga/ints.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/amiga/ints.c | ||
3 | * | ||
4 | * Linux/m68k general interrupt handling code from arch/m68k/kernel/ints.c | 2 | * Linux/m68k general interrupt handling code from arch/m68k/kernel/ints.c |
5 | * Needed to drive the m68k emulating IRQ hardware on the PowerUp boards. | 3 | * Needed to drive the m68k emulating IRQ hardware on the PowerUp boards. |
6 | */ | 4 | */ |
diff --git a/arch/ppc/boot/Makefile b/arch/ppc/boot/Makefile index efd8ce515d5f..84eec0bef93c 100644 --- a/arch/ppc/boot/Makefile +++ b/arch/ppc/boot/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # arch/ppc/boot/Makefile | 2 | # arch/ppc/boot/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 7 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 8 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 9 | # for more details. |
@@ -25,7 +28,7 @@ subdir- += simple openfirmware | |||
25 | 28 | ||
26 | hostprogs-y := $(addprefix utils/, addnote mknote hack-coff mkprep mkbugboot mktree) | 29 | hostprogs-y := $(addprefix utils/, addnote mknote hack-coff mkprep mkbugboot mktree) |
27 | 30 | ||
28 | .PHONY: $(BOOT_TARGETS) $(bootdir-y) | 31 | PHONY += $(BOOT_TARGETS) $(bootdir-y) |
29 | 32 | ||
30 | $(BOOT_TARGETS): $(bootdir-y) | 33 | $(BOOT_TARGETS): $(bootdir-y) |
31 | 34 | ||
diff --git a/arch/ppc/boot/common/Makefile b/arch/ppc/boot/common/Makefile index f88d647d5dd4..a2e85e3beb88 100644 --- a/arch/ppc/boot/common/Makefile +++ b/arch/ppc/boot/common/Makefile | |||
@@ -1,6 +1,3 @@ | |||
1 | # | ||
2 | # arch/ppc/boot/common/Makefile | ||
3 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 1 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 2 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 3 | # for more details. |
diff --git a/arch/ppc/boot/common/bootinfo.c b/arch/ppc/boot/common/bootinfo.c index 9c6e528940e9..f4dc9b9fab9c 100644 --- a/arch/ppc/boot/common/bootinfo.c +++ b/arch/ppc/boot/common/bootinfo.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/common/bootinfo.c | ||
3 | * | ||
4 | * General bootinfo record utilities | 2 | * General bootinfo record utilities |
5 | * Author: Randy Vinson <rvinson@mvista.com> | 3 | * Author: Randy Vinson <rvinson@mvista.com> |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/common/misc-common.c b/arch/ppc/boot/common/misc-common.c index e79e6b3f276e..073830a8559a 100644 --- a/arch/ppc/boot/common/misc-common.c +++ b/arch/ppc/boot/common/misc-common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/misc-common.c | ||
3 | * | ||
4 | * Misc. bootloader code (almost) all platforms can use | 2 | * Misc. bootloader code (almost) all platforms can use |
5 | * | 3 | * |
6 | * Author: Johnnie Peters <jpeters@mvista.com> | 4 | * Author: Johnnie Peters <jpeters@mvista.com> |
diff --git a/arch/ppc/boot/common/ns16550.c b/arch/ppc/boot/common/ns16550.c index 26818bbb6cff..4f00c93ac870 100644 --- a/arch/ppc/boot/common/ns16550.c +++ b/arch/ppc/boot/common/ns16550.c | |||
@@ -8,6 +8,9 @@ | |||
8 | #include <linux/serial_reg.h> | 8 | #include <linux/serial_reg.h> |
9 | #include <asm/serial.h> | 9 | #include <asm/serial.h> |
10 | 10 | ||
11 | #if defined(CONFIG_XILINX_VIRTEX) | ||
12 | #include <platforms/4xx/xparameters/xparameters.h> | ||
13 | #endif | ||
11 | #include "nonstdio.h" | 14 | #include "nonstdio.h" |
12 | #include "serial.h" | 15 | #include "serial.h" |
13 | 16 | ||
diff --git a/arch/ppc/boot/common/serial_stub.c b/arch/ppc/boot/common/serial_stub.c index 03dfaa01fa63..5cc9ae66a8ba 100644 --- a/arch/ppc/boot/common/serial_stub.c +++ b/arch/ppc/boot/common/serial_stub.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/serial_stub.c | ||
3 | * | ||
4 | * This is a few stub routines to make the boot code cleaner looking when | 2 | * This is a few stub routines to make the boot code cleaner looking when |
5 | * there is no serial port support doesn't need to be closed, for example. | 3 | * there is no serial port support doesn't need to be closed, for example. |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/common/util.S b/arch/ppc/boot/common/util.S index 368ec035e6cd..0c5e43c4ae06 100644 --- a/arch/ppc/boot/common/util.S +++ b/arch/ppc/boot/common/util.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/util.S | ||
3 | * | ||
4 | * Useful bootup functions, which are more easily done in asm than C. | 2 | * Useful bootup functions, which are more easily done in asm than C. |
5 | * | 3 | * |
6 | * NOTE: Be very very careful about the registers you use here. | 4 | * NOTE: Be very very careful about the registers you use here. |
diff --git a/arch/ppc/boot/include/mpc10x.h b/arch/ppc/boot/include/mpc10x.h index 6cd40ecabc74..6e5d540d8d3e 100644 --- a/arch/ppc/boot/include/mpc10x.h +++ b/arch/ppc/boot/include/mpc10x.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/include/mpc10.h | ||
3 | * | ||
4 | * Common defines for the Motorola SPS MPC106/8240/107 Host bridge/Mem | 2 | * Common defines for the Motorola SPS MPC106/8240/107 Host bridge/Mem |
5 | * ctrl/EPIC/etc. | 3 | * ctrl/EPIC/etc. |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/openfirmware/Makefile b/arch/ppc/boot/openfirmware/Makefile index 2a411ec2e650..66b739743759 100644 --- a/arch/ppc/boot/openfirmware/Makefile +++ b/arch/ppc/boot/openfirmware/Makefile | |||
@@ -1,5 +1,8 @@ | |||
1 | # Makefile for making bootable images on various OpenFirmware machines. | 1 | # Makefile for making bootable images on various OpenFirmware machines. |
2 | # | 2 | # |
3 | # This file is included by the global makefile so that you can add your own | ||
4 | # architecture-specific flags and dependencies. | ||
5 | # | ||
3 | # Paul Mackerras January 1997 | 6 | # Paul Mackerras January 1997 |
4 | # XCOFF bootable images for PowerMacs | 7 | # XCOFF bootable images for PowerMacs |
5 | # Geert Uytterhoeven September 1997 | 8 | # Geert Uytterhoeven September 1997 |
@@ -86,7 +89,7 @@ $(images)/zImage.chrp-rs6k $(images)/zImage.initrd.chrp-rs6k: \ | |||
86 | 89 | ||
87 | # The targets used on the make command-line | 90 | # The targets used on the make command-line |
88 | 91 | ||
89 | .PHONY: zImage zImage.initrd | 92 | PHONY += zImage zImage.initrd |
90 | zImage: $(images)/zImage.chrp \ | 93 | zImage: $(images)/zImage.chrp \ |
91 | $(images)/zImage.chrp-rs6k | 94 | $(images)/zImage.chrp-rs6k |
92 | @echo ' kernel: $@ is ready ($<)' | 95 | @echo ' kernel: $@ is ready ($<)' |
@@ -96,7 +99,7 @@ zImage.initrd: $(images)/zImage.initrd.chrp \ | |||
96 | 99 | ||
97 | TFTPIMAGE := /tftpboot/zImage | 100 | TFTPIMAGE := /tftpboot/zImage |
98 | 101 | ||
99 | .PHONY: znetboot znetboot.initrd | 102 | PHONY += znetboot znetboot.initrd |
100 | znetboot: $(images)/zImage.chrp | 103 | znetboot: $(images)/zImage.chrp |
101 | cp $(images)/zImage.chrp $(TFTPIMAGE).chrp$(END) | 104 | cp $(images)/zImage.chrp $(TFTPIMAGE).chrp$(END) |
102 | @echo ' kernel: $@ is ready ($<)' | 105 | @echo ' kernel: $@ is ready ($<)' |
diff --git a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile index 9533f8de238f..28be01b99c44 100644 --- a/arch/ppc/boot/simple/Makefile +++ b/arch/ppc/boot/simple/Makefile | |||
@@ -192,6 +192,7 @@ boot-$(CONFIG_8xx) += embed_config.o | |||
192 | boot-$(CONFIG_8260) += embed_config.o | 192 | boot-$(CONFIG_8260) += embed_config.o |
193 | boot-$(CONFIG_EP405) += embed_config.o | 193 | boot-$(CONFIG_EP405) += embed_config.o |
194 | boot-$(CONFIG_XILINX_ML300) += embed_config.o | 194 | boot-$(CONFIG_XILINX_ML300) += embed_config.o |
195 | boot-$(CONFIG_XILINX_ML403) += embed_config.o | ||
195 | boot-$(CONFIG_BSEIP) += iic.o | 196 | boot-$(CONFIG_BSEIP) += iic.o |
196 | boot-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o | 197 | boot-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o |
197 | boot-$(CONFIG_MV64X60) += misc-mv64x60.o | 198 | boot-$(CONFIG_MV64X60) += misc-mv64x60.o |
diff --git a/arch/ppc/boot/simple/cpc700_memory.c b/arch/ppc/boot/simple/cpc700_memory.c index 8c75cf6c2383..d75420a45a59 100644 --- a/arch/ppc/boot/simple/cpc700_memory.c +++ b/arch/ppc/boot/simple/cpc700_memory.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/cpc700_memory.c | ||
3 | * | ||
4 | * Find memory based upon settings in the CPC700 bridge | 2 | * Find memory based upon settings in the CPC700 bridge |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/boot/simple/embed_config.c b/arch/ppc/boot/simple/embed_config.c index 491a691d10cc..3a51b1062940 100644 --- a/arch/ppc/boot/simple/embed_config.c +++ b/arch/ppc/boot/simple/embed_config.c | |||
@@ -21,6 +21,9 @@ | |||
21 | #ifdef CONFIG_40x | 21 | #ifdef CONFIG_40x |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #endif | 23 | #endif |
24 | #ifdef CONFIG_XILINX_VIRTEX | ||
25 | #include <platforms/4xx/xparameters/xparameters.h> | ||
26 | #endif | ||
24 | extern unsigned long timebase_period_ns; | 27 | extern unsigned long timebase_period_ns; |
25 | 28 | ||
26 | /* For those boards that don't provide one. | 29 | /* For those boards that don't provide one. |
@@ -742,7 +745,7 @@ embed_config(bd_t **bdp) | |||
742 | } | 745 | } |
743 | #endif /* WILLOW */ | 746 | #endif /* WILLOW */ |
744 | 747 | ||
745 | #ifdef CONFIG_XILINX_ML300 | 748 | #if defined(CONFIG_XILINX_ML300) || defined(CONFIG_XILINX_ML403) |
746 | void | 749 | void |
747 | embed_config(bd_t ** bdp) | 750 | embed_config(bd_t ** bdp) |
748 | { | 751 | { |
@@ -779,7 +782,7 @@ embed_config(bd_t ** bdp) | |||
779 | timebase_period_ns = 1000000000 / bd->bi_tbfreq; | 782 | timebase_period_ns = 1000000000 / bd->bi_tbfreq; |
780 | /* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */ | 783 | /* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */ |
781 | } | 784 | } |
782 | #endif /* CONFIG_XILINX_ML300 */ | 785 | #endif /* CONFIG_XILINX_ML300 || CONFIG_XILINX_ML403 */ |
783 | 786 | ||
784 | #ifdef CONFIG_IBM_OPENBIOS | 787 | #ifdef CONFIG_IBM_OPENBIOS |
785 | /* This could possibly work for all treeboot roms. | 788 | /* This could possibly work for all treeboot roms. |
diff --git a/arch/ppc/boot/simple/head.S b/arch/ppc/boot/simple/head.S index 5e4adc298bf9..160da1006ff8 100644 --- a/arch/ppc/boot/simple/head.S +++ b/arch/ppc/boot/simple/head.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/head.S | ||
3 | * | ||
4 | * Initial board bringup code for many different boards. | 2 | * Initial board bringup code for many different boards. |
5 | * | 3 | * |
6 | * Author: Tom Rini | 4 | * Author: Tom Rini |
@@ -65,6 +63,13 @@ start_: | |||
65 | */ | 63 | */ |
66 | #endif | 64 | #endif |
67 | 65 | ||
66 | #if defined(CONFIG_XILINX_VIRTEX_4_FX) | ||
67 | /* PPC errata 213: only for Virtex-4 FX */ | ||
68 | mfccr0 0 | ||
69 | oris 0,0,0x50000000@h | ||
70 | mtccr0 0 | ||
71 | #endif | ||
72 | |||
68 | mflr r3 /* Save our actual starting address. */ | 73 | mflr r3 /* Save our actual starting address. */ |
69 | 74 | ||
70 | /* The following functions we call must not modify r3 or r4..... | 75 | /* The following functions we call must not modify r3 or r4..... |
diff --git a/arch/ppc/boot/simple/misc-chestnut.c b/arch/ppc/boot/simple/misc-chestnut.c index 0dce7f3557e4..b94e142ad892 100644 --- a/arch/ppc/boot/simple/misc-chestnut.c +++ b/arch/ppc/boot/simple/misc-chestnut.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-chestnut.c | ||
3 | * | ||
4 | * Setup for the IBM Chestnut (ibm-750fxgx_eval) | 2 | * Setup for the IBM Chestnut (ibm-750fxgx_eval) |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc-cpci690.c b/arch/ppc/boot/simple/misc-cpci690.c index 26860300fa09..8a8614d11a32 100644 --- a/arch/ppc/boot/simple/misc-cpci690.c +++ b/arch/ppc/boot/simple/misc-cpci690.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-cpci690.c | ||
3 | * | ||
4 | * Add birec data for Force CPCI690 board. | 2 | * Add birec data for Force CPCI690 board. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <source@mvista.com> | 4 | * Author: Mark A. Greer <source@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc-ev64260.c b/arch/ppc/boot/simple/misc-ev64260.c index 52ece6937a7a..2678c224af22 100644 --- a/arch/ppc/boot/simple/misc-ev64260.c +++ b/arch/ppc/boot/simple/misc-ev64260.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-ev64260.c | ||
3 | * | ||
4 | * Host bridge init code for the Marvell/Galileo EV-64260-BP evaluation board | 2 | * Host bridge init code for the Marvell/Galileo EV-64260-BP evaluation board |
5 | * with a GT64260 onboard. | 3 | * with a GT64260 onboard. |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/misc-ev64360.c b/arch/ppc/boot/simple/misc-ev64360.c index cd1ccf2a1582..a212b5b988cb 100644 --- a/arch/ppc/boot/simple/misc-ev64360.c +++ b/arch/ppc/boot/simple/misc-ev64360.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-ev64360.c | ||
3 | * Copyright (C) 2005 Lee Nicks <allinux@gmail.com> | 2 | * Copyright (C) 2005 Lee Nicks <allinux@gmail.com> |
4 | * | 3 | * |
5 | * Based on arch/ppc/boot/simple/misc-katana.c from: | 4 | * Based on arch/ppc/boot/simple/misc-katana.c from: |
diff --git a/arch/ppc/boot/simple/misc-katana.c b/arch/ppc/boot/simple/misc-katana.c index ec94a11bacac..d97f2ee6f04e 100644 --- a/arch/ppc/boot/simple/misc-katana.c +++ b/arch/ppc/boot/simple/misc-katana.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-katana.c | ||
3 | * | ||
4 | * Set up MPSC values to bootwrapper can prompt user. | 2 | * Set up MPSC values to bootwrapper can prompt user. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <source@mvista.com> | 4 | * Author: Mark A. Greer <source@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc-mv64x60.c b/arch/ppc/boot/simple/misc-mv64x60.c index 258d4599fadc..71ff20fd494a 100644 --- a/arch/ppc/boot/simple/misc-mv64x60.c +++ b/arch/ppc/boot/simple/misc-mv64x60.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-mv64x60.c | ||
3 | * | ||
4 | * Relocate bridge's register base and call board specific routine. | 2 | * Relocate bridge's register base and call board specific routine. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <source@mvista.com> | 4 | * Author: Mark A. Greer <source@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc-prep.c b/arch/ppc/boot/simple/misc-prep.c index 75380ac41669..63def9d13d70 100644 --- a/arch/ppc/boot/simple/misc-prep.c +++ b/arch/ppc/boot/simple/misc-prep.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-prep.c | ||
3 | * | ||
4 | * Maintainer: Tom Rini <trini@kernel.crashing.org> | 2 | * Maintainer: Tom Rini <trini@kernel.crashing.org> |
5 | * | 3 | * |
6 | * In the past: Gary Thomas, Cort Dougan <cort@cs.nmt.edu> | 4 | * In the past: Gary Thomas, Cort Dougan <cort@cs.nmt.edu> |
diff --git a/arch/ppc/boot/simple/misc-radstone_ppc7d.c b/arch/ppc/boot/simple/misc-radstone_ppc7d.c index 569e0d4feeaf..0f302ea9c3d1 100644 --- a/arch/ppc/boot/simple/misc-radstone_ppc7d.c +++ b/arch/ppc/boot/simple/misc-radstone_ppc7d.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-radstone_ppc7d.c | ||
3 | * | ||
4 | * Misc data for Radstone PPC7D board. | 2 | * Misc data for Radstone PPC7D board. |
5 | * | 3 | * |
6 | * Author: James Chapman <jchapman@katalix.com> | 4 | * Author: James Chapman <jchapman@katalix.com> |
diff --git a/arch/ppc/boot/simple/misc-spruce.c b/arch/ppc/boot/simple/misc-spruce.c index d012c39278fd..0cad2f557a1e 100644 --- a/arch/ppc/boot/simple/misc-spruce.c +++ b/arch/ppc/boot/simple/misc-spruce.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/spruce/misc.c | ||
3 | * | ||
4 | * Misc. bootloader code for IBM Spruce reference platform | 2 | * Misc. bootloader code for IBM Spruce reference platform |
5 | * | 3 | * |
6 | * Authors: Johnnie Peters <jpeters@mvista.com> | 4 | * Authors: Johnnie Peters <jpeters@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c index f415d6c62362..3d78571ad945 100644 --- a/arch/ppc/boot/simple/misc.c +++ b/arch/ppc/boot/simple/misc.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/simple/misc.c | ||
3 | * | ||
4 | * Misc. bootloader code for many machines. This assumes you have are using | 2 | * Misc. bootloader code for many machines. This assumes you have are using |
5 | * a 6xx/7xx/74xx CPU in your machine. This assumes the chunk of memory | 3 | * a 6xx/7xx/74xx CPU in your machine. This assumes the chunk of memory |
6 | * below 8MB is free. Finally, it assumes you have a NS16550-style uart for | 4 | * below 8MB is free. Finally, it assumes you have a NS16550-style uart for |
diff --git a/arch/ppc/boot/simple/mpc10x_memory.c b/arch/ppc/boot/simple/mpc10x_memory.c index 20d92a34ceb8..c24290823f7f 100644 --- a/arch/ppc/boot/simple/mpc10x_memory.c +++ b/arch/ppc/boot/simple/mpc10x_memory.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/mpc10x_common.c | ||
3 | * | ||
4 | * A routine to find out how much memory the machine has. | 2 | * A routine to find out how much memory the machine has. |
5 | * | 3 | * |
6 | * Based on: | 4 | * Based on: |
diff --git a/arch/ppc/boot/simple/mpc52xx_tty.c b/arch/ppc/boot/simple/mpc52xx_tty.c index 3acc6b7c0727..1964493cf3bd 100644 --- a/arch/ppc/boot/simple/mpc52xx_tty.c +++ b/arch/ppc/boot/simple/mpc52xx_tty.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/mpc52xx_tty.c | ||
3 | * | ||
4 | * Minimal serial functions needed to send messages out a MPC52xx | 2 | * Minimal serial functions needed to send messages out a MPC52xx |
5 | * Programmable Serial Controller (PSC). | 3 | * Programmable Serial Controller (PSC). |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/mv64x60_tty.c b/arch/ppc/boot/simple/mv64x60_tty.c index b9c24d4c738b..0c52f5c784a2 100644 --- a/arch/ppc/boot/simple/mv64x60_tty.c +++ b/arch/ppc/boot/simple/mv64x60_tty.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/mv64x60_tty.c | ||
3 | * | ||
4 | * Bootloader version of the embedded MPSC/UART driver for the Marvell 64x60. | 2 | * Bootloader version of the embedded MPSC/UART driver for the Marvell 64x60. |
5 | * Note: Due to a GT64260A erratum, DMA will be used for UART input (via SDMA). | 3 | * Note: Due to a GT64260A erratum, DMA will be used for UART input (via SDMA). |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/openbios.c b/arch/ppc/boot/simple/openbios.c index 81f11d8b30a7..3f2ed53f793a 100644 --- a/arch/ppc/boot/simple/openbios.c +++ b/arch/ppc/boot/simple/openbios.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/openbios.c | ||
3 | * | ||
4 | * Copyright (c) 2005 DENX Software Engineering | 2 | * Copyright (c) 2005 DENX Software Engineering |
5 | * Stefan Roese <sr@denx.de> | 3 | * Stefan Roese <sr@denx.de> |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/relocate.S b/arch/ppc/boot/simple/relocate.S index 555a216ccc49..7efddc507564 100644 --- a/arch/ppc/boot/simple/relocate.S +++ b/arch/ppc/boot/simple/relocate.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/relocate.S | ||
3 | * | ||
4 | * This is the common part of the loader relocation and initialization | 2 | * This is the common part of the loader relocation and initialization |
5 | * process. All of the board/processor specific initialization is | 3 | * process. All of the board/processor specific initialization is |
6 | * done before we get here. | 4 | * done before we get here. |
diff --git a/arch/ppc/boot/utils/mkbugboot.c b/arch/ppc/boot/utils/mkbugboot.c index 886122283f39..29115e01f60a 100644 --- a/arch/ppc/boot/utils/mkbugboot.c +++ b/arch/ppc/boot/utils/mkbugboot.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/utils/mkbugboot.c | ||
3 | * | ||
4 | * Makes a Motorola PPCBUG ROM bootable image which can be flashed | 2 | * Makes a Motorola PPCBUG ROM bootable image which can be flashed |
5 | * into one of the FLASH banks on a Motorola PowerPlus board. | 3 | * into one of the FLASH banks on a Motorola PowerPlus board. |
6 | * | 4 | * |
diff --git a/arch/ppc/configs/ml300_defconfig b/arch/ppc/configs/ml300_defconfig new file mode 100644 index 000000000000..4a33aca948cc --- /dev/null +++ b/arch/ppc/configs/ml300_defconfig | |||
@@ -0,0 +1,739 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.16-rc1 | ||
4 | # Wed Jan 18 00:49:20 2006 | ||
5 | # | ||
6 | CONFIG_MMU=y | ||
7 | CONFIG_GENERIC_HARDIRQS=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_PPC=y | ||
11 | CONFIG_PPC32=y | ||
12 | CONFIG_GENERIC_NVRAM=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | |||
16 | # | ||
17 | # Code maturity level options | ||
18 | # | ||
19 | CONFIG_EXPERIMENTAL=y | ||
20 | CONFIG_CLEAN_COMPILE=y | ||
21 | CONFIG_BROKEN_ON_SMP=y | ||
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | |||
24 | # | ||
25 | # General setup | ||
26 | # | ||
27 | CONFIG_LOCALVERSION="" | ||
28 | CONFIG_LOCALVERSION_AUTO=y | ||
29 | # CONFIG_SWAP is not set | ||
30 | CONFIG_SYSVIPC=y | ||
31 | # CONFIG_POSIX_MQUEUE is not set | ||
32 | CONFIG_BSD_PROCESS_ACCT=y | ||
33 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
34 | CONFIG_SYSCTL=y | ||
35 | # CONFIG_AUDIT is not set | ||
36 | # CONFIG_IKCONFIG is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
39 | # CONFIG_EMBEDDED is not set | ||
40 | CONFIG_KALLSYMS=y | ||
41 | # CONFIG_KALLSYMS_ALL is not set | ||
42 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
43 | CONFIG_HOTPLUG=y | ||
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
46 | CONFIG_ELF_CORE=y | ||
47 | CONFIG_BASE_FULL=y | ||
48 | CONFIG_FUTEX=y | ||
49 | CONFIG_EPOLL=y | ||
50 | CONFIG_SHMEM=y | ||
51 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
52 | CONFIG_CC_ALIGN_LABELS=0 | ||
53 | CONFIG_CC_ALIGN_LOOPS=0 | ||
54 | CONFIG_CC_ALIGN_JUMPS=0 | ||
55 | CONFIG_SLAB=y | ||
56 | # CONFIG_TINY_SHMEM is not set | ||
57 | CONFIG_BASE_SMALL=0 | ||
58 | # CONFIG_SLOB is not set | ||
59 | |||
60 | # | ||
61 | # Loadable module support | ||
62 | # | ||
63 | CONFIG_MODULES=y | ||
64 | CONFIG_MODULE_UNLOAD=y | ||
65 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
66 | CONFIG_OBSOLETE_MODPARM=y | ||
67 | CONFIG_MODVERSIONS=y | ||
68 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
69 | CONFIG_KMOD=y | ||
70 | |||
71 | # | ||
72 | # Block layer | ||
73 | # | ||
74 | CONFIG_LBD=y | ||
75 | |||
76 | # | ||
77 | # IO Schedulers | ||
78 | # | ||
79 | CONFIG_IOSCHED_NOOP=y | ||
80 | CONFIG_IOSCHED_AS=y | ||
81 | CONFIG_IOSCHED_DEADLINE=y | ||
82 | CONFIG_IOSCHED_CFQ=y | ||
83 | CONFIG_DEFAULT_AS=y | ||
84 | # CONFIG_DEFAULT_DEADLINE is not set | ||
85 | # CONFIG_DEFAULT_CFQ is not set | ||
86 | # CONFIG_DEFAULT_NOOP is not set | ||
87 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
88 | |||
89 | # | ||
90 | # Processor | ||
91 | # | ||
92 | # CONFIG_6xx is not set | ||
93 | CONFIG_40x=y | ||
94 | # CONFIG_44x is not set | ||
95 | # CONFIG_POWER3 is not set | ||
96 | # CONFIG_8xx is not set | ||
97 | # CONFIG_E200 is not set | ||
98 | # CONFIG_E500 is not set | ||
99 | # CONFIG_MATH_EMULATION is not set | ||
100 | # CONFIG_KEXEC is not set | ||
101 | # CONFIG_CPU_FREQ is not set | ||
102 | CONFIG_4xx=y | ||
103 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
104 | |||
105 | # | ||
106 | # IBM 4xx options | ||
107 | # | ||
108 | # CONFIG_BUBINGA is not set | ||
109 | # CONFIG_CPCI405 is not set | ||
110 | # CONFIG_EP405 is not set | ||
111 | # CONFIG_REDWOOD_5 is not set | ||
112 | # CONFIG_REDWOOD_6 is not set | ||
113 | # CONFIG_SYCAMORE is not set | ||
114 | # CONFIG_WALNUT is not set | ||
115 | CONFIG_XILINX_ML300=y | ||
116 | CONFIG_IBM405_ERR77=y | ||
117 | CONFIG_IBM405_ERR51=y | ||
118 | CONFIG_XILINX_VIRTEX=y | ||
119 | CONFIG_EMBEDDEDBOOT=y | ||
120 | # CONFIG_PPC4xx_DMA is not set | ||
121 | CONFIG_PPC_GEN550=y | ||
122 | CONFIG_UART0_TTYS0=y | ||
123 | # CONFIG_UART0_TTYS1 is not set | ||
124 | CONFIG_NOT_COHERENT_CACHE=y | ||
125 | |||
126 | # | ||
127 | # Platform options | ||
128 | # | ||
129 | # CONFIG_PC_KEYBOARD is not set | ||
130 | # CONFIG_HIGHMEM is not set | ||
131 | # CONFIG_HZ_100 is not set | ||
132 | CONFIG_HZ_250=y | ||
133 | # CONFIG_HZ_1000 is not set | ||
134 | CONFIG_HZ=250 | ||
135 | CONFIG_PREEMPT_NONE=y | ||
136 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
137 | # CONFIG_PREEMPT is not set | ||
138 | CONFIG_SELECT_MEMORY_MODEL=y | ||
139 | CONFIG_FLATMEM_MANUAL=y | ||
140 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
141 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
142 | CONFIG_FLATMEM=y | ||
143 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
144 | # CONFIG_SPARSEMEM_STATIC is not set | ||
145 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
146 | CONFIG_BINFMT_ELF=y | ||
147 | # CONFIG_BINFMT_MISC is not set | ||
148 | CONFIG_CMDLINE_BOOL=y | ||
149 | CONFIG_CMDLINE="console=ttyS0,9600" | ||
150 | # CONFIG_PM is not set | ||
151 | # CONFIG_SOFTWARE_SUSPEND is not set | ||
152 | CONFIG_SECCOMP=y | ||
153 | CONFIG_ISA_DMA_API=y | ||
154 | |||
155 | # | ||
156 | # Bus options | ||
157 | # | ||
158 | # CONFIG_PPC_I8259 is not set | ||
159 | # CONFIG_PCI is not set | ||
160 | # CONFIG_PCI_DOMAINS is not set | ||
161 | |||
162 | # | ||
163 | # PCCARD (PCMCIA/CardBus) support | ||
164 | # | ||
165 | # CONFIG_PCCARD is not set | ||
166 | |||
167 | # | ||
168 | # Advanced setup | ||
169 | # | ||
170 | # CONFIG_ADVANCED_OPTIONS is not set | ||
171 | |||
172 | # | ||
173 | # Default settings for advanced configuration options are used | ||
174 | # | ||
175 | CONFIG_HIGHMEM_START=0xfe000000 | ||
176 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
177 | CONFIG_KERNEL_START=0xc0000000 | ||
178 | CONFIG_TASK_SIZE=0x80000000 | ||
179 | CONFIG_CONSISTENT_START=0xff100000 | ||
180 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
181 | CONFIG_BOOT_LOAD=0x00400000 | ||
182 | |||
183 | # | ||
184 | # Networking | ||
185 | # | ||
186 | CONFIG_NET=y | ||
187 | |||
188 | # | ||
189 | # Networking options | ||
190 | # | ||
191 | CONFIG_PACKET=y | ||
192 | CONFIG_PACKET_MMAP=y | ||
193 | CONFIG_UNIX=y | ||
194 | # CONFIG_NET_KEY is not set | ||
195 | CONFIG_INET=y | ||
196 | # CONFIG_IP_MULTICAST is not set | ||
197 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
198 | CONFIG_IP_FIB_HASH=y | ||
199 | CONFIG_IP_PNP=y | ||
200 | CONFIG_IP_PNP_DHCP=y | ||
201 | # CONFIG_IP_PNP_BOOTP is not set | ||
202 | # CONFIG_IP_PNP_RARP is not set | ||
203 | # CONFIG_NET_IPIP is not set | ||
204 | # CONFIG_NET_IPGRE is not set | ||
205 | # CONFIG_ARPD is not set | ||
206 | # CONFIG_SYN_COOKIES is not set | ||
207 | # CONFIG_INET_AH is not set | ||
208 | # CONFIG_INET_ESP is not set | ||
209 | # CONFIG_INET_IPCOMP is not set | ||
210 | # CONFIG_INET_TUNNEL is not set | ||
211 | CONFIG_INET_DIAG=y | ||
212 | CONFIG_INET_TCP_DIAG=y | ||
213 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
214 | CONFIG_TCP_CONG_BIC=y | ||
215 | # CONFIG_IPV6 is not set | ||
216 | # CONFIG_NETFILTER is not set | ||
217 | |||
218 | # | ||
219 | # DCCP Configuration (EXPERIMENTAL) | ||
220 | # | ||
221 | # CONFIG_IP_DCCP is not set | ||
222 | |||
223 | # | ||
224 | # SCTP Configuration (EXPERIMENTAL) | ||
225 | # | ||
226 | # CONFIG_IP_SCTP is not set | ||
227 | # CONFIG_ATM is not set | ||
228 | # CONFIG_BRIDGE is not set | ||
229 | # CONFIG_VLAN_8021Q is not set | ||
230 | # CONFIG_DECNET is not set | ||
231 | # CONFIG_LLC2 is not set | ||
232 | # CONFIG_IPX is not set | ||
233 | # CONFIG_ATALK is not set | ||
234 | # CONFIG_X25 is not set | ||
235 | # CONFIG_LAPB is not set | ||
236 | |||
237 | # | ||
238 | # TIPC Configuration (EXPERIMENTAL) | ||
239 | # | ||
240 | # CONFIG_TIPC is not set | ||
241 | # CONFIG_NET_DIVERT is not set | ||
242 | # CONFIG_ECONET is not set | ||
243 | # CONFIG_WAN_ROUTER is not set | ||
244 | |||
245 | # | ||
246 | # QoS and/or fair queueing | ||
247 | # | ||
248 | # CONFIG_NET_SCHED is not set | ||
249 | |||
250 | # | ||
251 | # Network testing | ||
252 | # | ||
253 | # CONFIG_NET_PKTGEN is not set | ||
254 | # CONFIG_HAMRADIO is not set | ||
255 | # CONFIG_IRDA is not set | ||
256 | # CONFIG_BT is not set | ||
257 | # CONFIG_IEEE80211 is not set | ||
258 | |||
259 | # | ||
260 | # Device Drivers | ||
261 | # | ||
262 | |||
263 | # | ||
264 | # Generic Driver Options | ||
265 | # | ||
266 | CONFIG_STANDALONE=y | ||
267 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
268 | # CONFIG_FW_LOADER is not set | ||
269 | # CONFIG_DEBUG_DRIVER is not set | ||
270 | |||
271 | # | ||
272 | # Connector - unified userspace <-> kernelspace linker | ||
273 | # | ||
274 | # CONFIG_CONNECTOR is not set | ||
275 | |||
276 | # | ||
277 | # Memory Technology Devices (MTD) | ||
278 | # | ||
279 | # CONFIG_MTD is not set | ||
280 | |||
281 | # | ||
282 | # Parallel port support | ||
283 | # | ||
284 | # CONFIG_PARPORT is not set | ||
285 | |||
286 | # | ||
287 | # Plug and Play support | ||
288 | # | ||
289 | |||
290 | # | ||
291 | # Block devices | ||
292 | # | ||
293 | # CONFIG_BLK_DEV_FD is not set | ||
294 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
295 | # CONFIG_BLK_DEV_LOOP is not set | ||
296 | # CONFIG_BLK_DEV_NBD is not set | ||
297 | CONFIG_BLK_DEV_RAM=y | ||
298 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
299 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
300 | CONFIG_BLK_DEV_INITRD=y | ||
301 | # CONFIG_CDROM_PKTCDVD is not set | ||
302 | # CONFIG_ATA_OVER_ETH is not set | ||
303 | |||
304 | # | ||
305 | # ATA/ATAPI/MFM/RLL support | ||
306 | # | ||
307 | # CONFIG_IDE is not set | ||
308 | |||
309 | # | ||
310 | # SCSI device support | ||
311 | # | ||
312 | # CONFIG_RAID_ATTRS is not set | ||
313 | # CONFIG_SCSI is not set | ||
314 | |||
315 | # | ||
316 | # Multi-device support (RAID and LVM) | ||
317 | # | ||
318 | # CONFIG_MD is not set | ||
319 | |||
320 | # | ||
321 | # Fusion MPT device support | ||
322 | # | ||
323 | # CONFIG_FUSION is not set | ||
324 | |||
325 | # | ||
326 | # IEEE 1394 (FireWire) support | ||
327 | # | ||
328 | |||
329 | # | ||
330 | # I2O device support | ||
331 | # | ||
332 | |||
333 | # | ||
334 | # Macintosh device drivers | ||
335 | # | ||
336 | # CONFIG_WINDFARM is not set | ||
337 | |||
338 | # | ||
339 | # Network device support | ||
340 | # | ||
341 | CONFIG_NETDEVICES=y | ||
342 | # CONFIG_DUMMY is not set | ||
343 | # CONFIG_BONDING is not set | ||
344 | # CONFIG_EQUALIZER is not set | ||
345 | CONFIG_TUN=y | ||
346 | |||
347 | # | ||
348 | # PHY device support | ||
349 | # | ||
350 | |||
351 | # | ||
352 | # Ethernet (10 or 100Mbit) | ||
353 | # | ||
354 | # CONFIG_NET_ETHERNET is not set | ||
355 | # CONFIG_IBM_EMAC is not set | ||
356 | |||
357 | # | ||
358 | # Ethernet (1000 Mbit) | ||
359 | # | ||
360 | |||
361 | # | ||
362 | # Ethernet (10000 Mbit) | ||
363 | # | ||
364 | |||
365 | # | ||
366 | # Token Ring devices | ||
367 | # | ||
368 | |||
369 | # | ||
370 | # Wireless LAN (non-hamradio) | ||
371 | # | ||
372 | # CONFIG_NET_RADIO is not set | ||
373 | |||
374 | # | ||
375 | # Wan interfaces | ||
376 | # | ||
377 | # CONFIG_WAN is not set | ||
378 | # CONFIG_PPP is not set | ||
379 | # CONFIG_SLIP is not set | ||
380 | # CONFIG_SHAPER is not set | ||
381 | # CONFIG_NETCONSOLE is not set | ||
382 | # CONFIG_NETPOLL is not set | ||
383 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
384 | |||
385 | # | ||
386 | # ISDN subsystem | ||
387 | # | ||
388 | # CONFIG_ISDN is not set | ||
389 | |||
390 | # | ||
391 | # Telephony Support | ||
392 | # | ||
393 | # CONFIG_PHONE is not set | ||
394 | |||
395 | # | ||
396 | # Input device support | ||
397 | # | ||
398 | CONFIG_INPUT=y | ||
399 | |||
400 | # | ||
401 | # Userland interfaces | ||
402 | # | ||
403 | CONFIG_INPUT_MOUSEDEV=y | ||
404 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
405 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
406 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
407 | # CONFIG_INPUT_JOYDEV is not set | ||
408 | # CONFIG_INPUT_TSDEV is not set | ||
409 | # CONFIG_INPUT_EVDEV is not set | ||
410 | # CONFIG_INPUT_EVBUG is not set | ||
411 | |||
412 | # | ||
413 | # Input Device Drivers | ||
414 | # | ||
415 | # CONFIG_INPUT_KEYBOARD is not set | ||
416 | # CONFIG_INPUT_MOUSE is not set | ||
417 | # CONFIG_INPUT_JOYSTICK is not set | ||
418 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
419 | # CONFIG_INPUT_MISC is not set | ||
420 | |||
421 | # | ||
422 | # Hardware I/O ports | ||
423 | # | ||
424 | # CONFIG_SERIO is not set | ||
425 | # CONFIG_GAMEPORT is not set | ||
426 | |||
427 | # | ||
428 | # Character devices | ||
429 | # | ||
430 | CONFIG_VT=y | ||
431 | CONFIG_VT_CONSOLE=y | ||
432 | CONFIG_HW_CONSOLE=y | ||
433 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
434 | |||
435 | # | ||
436 | # Serial drivers | ||
437 | # | ||
438 | CONFIG_SERIAL_8250=y | ||
439 | CONFIG_SERIAL_8250_CONSOLE=y | ||
440 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
441 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
442 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
443 | |||
444 | # | ||
445 | # Non-8250 serial port support | ||
446 | # | ||
447 | CONFIG_SERIAL_CORE=y | ||
448 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
449 | CONFIG_UNIX98_PTYS=y | ||
450 | # CONFIG_LEGACY_PTYS is not set | ||
451 | |||
452 | # | ||
453 | # IPMI | ||
454 | # | ||
455 | # CONFIG_IPMI_HANDLER is not set | ||
456 | |||
457 | # | ||
458 | # Watchdog Cards | ||
459 | # | ||
460 | # CONFIG_WATCHDOG is not set | ||
461 | # CONFIG_NVRAM is not set | ||
462 | # CONFIG_GEN_RTC is not set | ||
463 | # CONFIG_DTLK is not set | ||
464 | # CONFIG_R3964 is not set | ||
465 | |||
466 | # | ||
467 | # Ftape, the floppy tape device driver | ||
468 | # | ||
469 | # CONFIG_AGP is not set | ||
470 | # CONFIG_RAW_DRIVER is not set | ||
471 | |||
472 | # | ||
473 | # TPM devices | ||
474 | # | ||
475 | # CONFIG_TCG_TPM is not set | ||
476 | # CONFIG_TELCLOCK is not set | ||
477 | |||
478 | # | ||
479 | # I2C support | ||
480 | # | ||
481 | # CONFIG_I2C is not set | ||
482 | |||
483 | # | ||
484 | # SPI support | ||
485 | # | ||
486 | # CONFIG_SPI is not set | ||
487 | # CONFIG_SPI_MASTER is not set | ||
488 | |||
489 | # | ||
490 | # Dallas's 1-wire bus | ||
491 | # | ||
492 | # CONFIG_W1 is not set | ||
493 | |||
494 | # | ||
495 | # Hardware Monitoring support | ||
496 | # | ||
497 | # CONFIG_HWMON is not set | ||
498 | # CONFIG_HWMON_VID is not set | ||
499 | |||
500 | # | ||
501 | # Misc devices | ||
502 | # | ||
503 | |||
504 | # | ||
505 | # Multimedia Capabilities Port drivers | ||
506 | # | ||
507 | |||
508 | # | ||
509 | # Multimedia devices | ||
510 | # | ||
511 | # CONFIG_VIDEO_DEV is not set | ||
512 | |||
513 | # | ||
514 | # Digital Video Broadcasting Devices | ||
515 | # | ||
516 | # CONFIG_DVB is not set | ||
517 | |||
518 | # | ||
519 | # Graphics support | ||
520 | # | ||
521 | # CONFIG_FB is not set | ||
522 | |||
523 | # | ||
524 | # Console display driver support | ||
525 | # | ||
526 | CONFIG_DUMMY_CONSOLE=y | ||
527 | |||
528 | # | ||
529 | # Sound | ||
530 | # | ||
531 | # CONFIG_SOUND is not set | ||
532 | |||
533 | # | ||
534 | # USB support | ||
535 | # | ||
536 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
537 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
538 | |||
539 | # | ||
540 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
541 | # | ||
542 | |||
543 | # | ||
544 | # USB Gadget Support | ||
545 | # | ||
546 | # CONFIG_USB_GADGET is not set | ||
547 | |||
548 | # | ||
549 | # MMC/SD Card support | ||
550 | # | ||
551 | # CONFIG_MMC is not set | ||
552 | |||
553 | # | ||
554 | # InfiniBand support | ||
555 | # | ||
556 | |||
557 | # | ||
558 | # SN Devices | ||
559 | # | ||
560 | |||
561 | # | ||
562 | # File systems | ||
563 | # | ||
564 | CONFIG_EXT2_FS=y | ||
565 | # CONFIG_EXT2_FS_XATTR is not set | ||
566 | # CONFIG_EXT2_FS_XIP is not set | ||
567 | # CONFIG_EXT3_FS is not set | ||
568 | # CONFIG_REISERFS_FS is not set | ||
569 | # CONFIG_JFS_FS is not set | ||
570 | # CONFIG_FS_POSIX_ACL is not set | ||
571 | # CONFIG_XFS_FS is not set | ||
572 | # CONFIG_OCFS2_FS is not set | ||
573 | # CONFIG_MINIX_FS is not set | ||
574 | # CONFIG_ROMFS_FS is not set | ||
575 | CONFIG_INOTIFY=y | ||
576 | # CONFIG_QUOTA is not set | ||
577 | CONFIG_DNOTIFY=y | ||
578 | # CONFIG_AUTOFS_FS is not set | ||
579 | # CONFIG_AUTOFS4_FS is not set | ||
580 | # CONFIG_FUSE_FS is not set | ||
581 | |||
582 | # | ||
583 | # CD-ROM/DVD Filesystems | ||
584 | # | ||
585 | # CONFIG_ISO9660_FS is not set | ||
586 | # CONFIG_UDF_FS is not set | ||
587 | |||
588 | # | ||
589 | # DOS/FAT/NT Filesystems | ||
590 | # | ||
591 | CONFIG_FAT_FS=y | ||
592 | CONFIG_MSDOS_FS=y | ||
593 | CONFIG_VFAT_FS=y | ||
594 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
595 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
596 | # CONFIG_NTFS_FS is not set | ||
597 | |||
598 | # | ||
599 | # Pseudo filesystems | ||
600 | # | ||
601 | CONFIG_PROC_FS=y | ||
602 | CONFIG_PROC_KCORE=y | ||
603 | CONFIG_SYSFS=y | ||
604 | CONFIG_TMPFS=y | ||
605 | # CONFIG_HUGETLB_PAGE is not set | ||
606 | CONFIG_RAMFS=y | ||
607 | # CONFIG_RELAYFS_FS is not set | ||
608 | # CONFIG_CONFIGFS_FS is not set | ||
609 | |||
610 | # | ||
611 | # Miscellaneous filesystems | ||
612 | # | ||
613 | # CONFIG_ADFS_FS is not set | ||
614 | # CONFIG_AFFS_FS is not set | ||
615 | # CONFIG_HFS_FS is not set | ||
616 | # CONFIG_HFSPLUS_FS is not set | ||
617 | # CONFIG_BEFS_FS is not set | ||
618 | # CONFIG_BFS_FS is not set | ||
619 | # CONFIG_EFS_FS is not set | ||
620 | # CONFIG_CRAMFS is not set | ||
621 | # CONFIG_VXFS_FS is not set | ||
622 | # CONFIG_HPFS_FS is not set | ||
623 | # CONFIG_QNX4FS_FS is not set | ||
624 | # CONFIG_SYSV_FS is not set | ||
625 | # CONFIG_UFS_FS is not set | ||
626 | |||
627 | # | ||
628 | # Network File Systems | ||
629 | # | ||
630 | # CONFIG_NFS_FS is not set | ||
631 | # CONFIG_NFSD is not set | ||
632 | # CONFIG_SMB_FS is not set | ||
633 | # CONFIG_CIFS is not set | ||
634 | # CONFIG_NCP_FS is not set | ||
635 | # CONFIG_CODA_FS is not set | ||
636 | # CONFIG_AFS_FS is not set | ||
637 | # CONFIG_9P_FS is not set | ||
638 | |||
639 | # | ||
640 | # Partition Types | ||
641 | # | ||
642 | # CONFIG_PARTITION_ADVANCED is not set | ||
643 | CONFIG_MSDOS_PARTITION=y | ||
644 | |||
645 | # | ||
646 | # Native Language Support | ||
647 | # | ||
648 | CONFIG_NLS=y | ||
649 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
650 | CONFIG_NLS_CODEPAGE_437=y | ||
651 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
652 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
653 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
654 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
655 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
656 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
657 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
658 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
659 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
660 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
661 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
662 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
663 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
664 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
665 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
666 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
667 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
668 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
669 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
670 | # CONFIG_NLS_ISO8859_8 is not set | ||
671 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
672 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
673 | CONFIG_NLS_ASCII=y | ||
674 | CONFIG_NLS_ISO8859_1=y | ||
675 | # CONFIG_NLS_ISO8859_2 is not set | ||
676 | # CONFIG_NLS_ISO8859_3 is not set | ||
677 | # CONFIG_NLS_ISO8859_4 is not set | ||
678 | # CONFIG_NLS_ISO8859_5 is not set | ||
679 | # CONFIG_NLS_ISO8859_6 is not set | ||
680 | # CONFIG_NLS_ISO8859_7 is not set | ||
681 | # CONFIG_NLS_ISO8859_9 is not set | ||
682 | # CONFIG_NLS_ISO8859_13 is not set | ||
683 | # CONFIG_NLS_ISO8859_14 is not set | ||
684 | # CONFIG_NLS_ISO8859_15 is not set | ||
685 | # CONFIG_NLS_KOI8_R is not set | ||
686 | # CONFIG_NLS_KOI8_U is not set | ||
687 | CONFIG_NLS_UTF8=y | ||
688 | |||
689 | # | ||
690 | # IBM 40x options | ||
691 | # | ||
692 | |||
693 | # | ||
694 | # Library routines | ||
695 | # | ||
696 | # CONFIG_CRC_CCITT is not set | ||
697 | # CONFIG_CRC16 is not set | ||
698 | CONFIG_CRC32=y | ||
699 | # CONFIG_LIBCRC32C is not set | ||
700 | # CONFIG_PROFILING is not set | ||
701 | |||
702 | # | ||
703 | # Kernel hacking | ||
704 | # | ||
705 | CONFIG_PRINTK_TIME=y | ||
706 | CONFIG_MAGIC_SYSRQ=y | ||
707 | CONFIG_DEBUG_KERNEL=y | ||
708 | CONFIG_LOG_BUF_SHIFT=14 | ||
709 | CONFIG_DETECT_SOFTLOCKUP=y | ||
710 | # CONFIG_SCHEDSTATS is not set | ||
711 | # CONFIG_DEBUG_SLAB is not set | ||
712 | CONFIG_DEBUG_MUTEXES=y | ||
713 | # CONFIG_DEBUG_SPINLOCK is not set | ||
714 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
715 | # CONFIG_DEBUG_KOBJECT is not set | ||
716 | CONFIG_DEBUG_INFO=y | ||
717 | # CONFIG_DEBUG_FS is not set | ||
718 | # CONFIG_DEBUG_VM is not set | ||
719 | CONFIG_FORCED_INLINING=y | ||
720 | # CONFIG_RCU_TORTURE_TEST is not set | ||
721 | # CONFIG_KGDB is not set | ||
722 | CONFIG_XMON=y | ||
723 | # CONFIG_BDI_SWITCH is not set | ||
724 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
725 | |||
726 | # | ||
727 | # Security options | ||
728 | # | ||
729 | # CONFIG_KEYS is not set | ||
730 | # CONFIG_SECURITY is not set | ||
731 | |||
732 | # | ||
733 | # Cryptographic options | ||
734 | # | ||
735 | # CONFIG_CRYPTO is not set | ||
736 | |||
737 | # | ||
738 | # Hardware crypto devices | ||
739 | # | ||
diff --git a/arch/ppc/configs/ml403_defconfig b/arch/ppc/configs/ml403_defconfig new file mode 100644 index 000000000000..fafd2516fa51 --- /dev/null +++ b/arch/ppc/configs/ml403_defconfig | |||
@@ -0,0 +1,740 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.16-rc1 | ||
4 | # Wed Jan 18 01:11:41 2006 | ||
5 | # | ||
6 | CONFIG_MMU=y | ||
7 | CONFIG_GENERIC_HARDIRQS=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_PPC=y | ||
11 | CONFIG_PPC32=y | ||
12 | CONFIG_GENERIC_NVRAM=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | |||
16 | # | ||
17 | # Code maturity level options | ||
18 | # | ||
19 | CONFIG_EXPERIMENTAL=y | ||
20 | CONFIG_CLEAN_COMPILE=y | ||
21 | CONFIG_BROKEN_ON_SMP=y | ||
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | |||
24 | # | ||
25 | # General setup | ||
26 | # | ||
27 | CONFIG_LOCALVERSION="" | ||
28 | CONFIG_LOCALVERSION_AUTO=y | ||
29 | # CONFIG_SWAP is not set | ||
30 | CONFIG_SYSVIPC=y | ||
31 | # CONFIG_POSIX_MQUEUE is not set | ||
32 | CONFIG_BSD_PROCESS_ACCT=y | ||
33 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
34 | CONFIG_SYSCTL=y | ||
35 | # CONFIG_AUDIT is not set | ||
36 | # CONFIG_IKCONFIG is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
39 | # CONFIG_EMBEDDED is not set | ||
40 | CONFIG_KALLSYMS=y | ||
41 | # CONFIG_KALLSYMS_ALL is not set | ||
42 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
43 | CONFIG_HOTPLUG=y | ||
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
46 | CONFIG_ELF_CORE=y | ||
47 | CONFIG_BASE_FULL=y | ||
48 | CONFIG_FUTEX=y | ||
49 | CONFIG_EPOLL=y | ||
50 | CONFIG_SHMEM=y | ||
51 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
52 | CONFIG_CC_ALIGN_LABELS=0 | ||
53 | CONFIG_CC_ALIGN_LOOPS=0 | ||
54 | CONFIG_CC_ALIGN_JUMPS=0 | ||
55 | CONFIG_SLAB=y | ||
56 | # CONFIG_TINY_SHMEM is not set | ||
57 | CONFIG_BASE_SMALL=0 | ||
58 | # CONFIG_SLOB is not set | ||
59 | |||
60 | # | ||
61 | # Loadable module support | ||
62 | # | ||
63 | CONFIG_MODULES=y | ||
64 | CONFIG_MODULE_UNLOAD=y | ||
65 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
66 | CONFIG_OBSOLETE_MODPARM=y | ||
67 | CONFIG_MODVERSIONS=y | ||
68 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
69 | CONFIG_KMOD=y | ||
70 | |||
71 | # | ||
72 | # Block layer | ||
73 | # | ||
74 | CONFIG_LBD=y | ||
75 | |||
76 | # | ||
77 | # IO Schedulers | ||
78 | # | ||
79 | CONFIG_IOSCHED_NOOP=y | ||
80 | CONFIG_IOSCHED_AS=y | ||
81 | CONFIG_IOSCHED_DEADLINE=y | ||
82 | CONFIG_IOSCHED_CFQ=y | ||
83 | CONFIG_DEFAULT_AS=y | ||
84 | # CONFIG_DEFAULT_DEADLINE is not set | ||
85 | # CONFIG_DEFAULT_CFQ is not set | ||
86 | # CONFIG_DEFAULT_NOOP is not set | ||
87 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
88 | |||
89 | # | ||
90 | # Processor | ||
91 | # | ||
92 | # CONFIG_6xx is not set | ||
93 | CONFIG_40x=y | ||
94 | # CONFIG_44x is not set | ||
95 | # CONFIG_POWER3 is not set | ||
96 | # CONFIG_8xx is not set | ||
97 | # CONFIG_E200 is not set | ||
98 | # CONFIG_E500 is not set | ||
99 | # CONFIG_MATH_EMULATION is not set | ||
100 | # CONFIG_KEXEC is not set | ||
101 | # CONFIG_CPU_FREQ is not set | ||
102 | CONFIG_4xx=y | ||
103 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
104 | |||
105 | # | ||
106 | # IBM 4xx options | ||
107 | # | ||
108 | # CONFIG_BUBINGA is not set | ||
109 | # CONFIG_CPCI405 is not set | ||
110 | # CONFIG_EP405 is not set | ||
111 | # CONFIG_REDWOOD_5 is not set | ||
112 | # CONFIG_REDWOOD_6 is not set | ||
113 | # CONFIG_SYCAMORE is not set | ||
114 | # CONFIG_WALNUT is not set | ||
115 | # CONFIG_XILINX_ML300 is not set | ||
116 | CONFIG_XILINX_ML403=y | ||
117 | CONFIG_IBM405_ERR77=y | ||
118 | CONFIG_IBM405_ERR51=y | ||
119 | CONFIG_XILINX_VIRTEX=y | ||
120 | CONFIG_EMBEDDEDBOOT=y | ||
121 | # CONFIG_PPC4xx_DMA is not set | ||
122 | CONFIG_PPC_GEN550=y | ||
123 | CONFIG_UART0_TTYS0=y | ||
124 | # CONFIG_UART0_TTYS1 is not set | ||
125 | CONFIG_NOT_COHERENT_CACHE=y | ||
126 | |||
127 | # | ||
128 | # Platform options | ||
129 | # | ||
130 | # CONFIG_PC_KEYBOARD is not set | ||
131 | # CONFIG_HIGHMEM is not set | ||
132 | # CONFIG_HZ_100 is not set | ||
133 | CONFIG_HZ_250=y | ||
134 | # CONFIG_HZ_1000 is not set | ||
135 | CONFIG_HZ=250 | ||
136 | CONFIG_PREEMPT_NONE=y | ||
137 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
138 | # CONFIG_PREEMPT is not set | ||
139 | CONFIG_SELECT_MEMORY_MODEL=y | ||
140 | CONFIG_FLATMEM_MANUAL=y | ||
141 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
142 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
143 | CONFIG_FLATMEM=y | ||
144 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
145 | # CONFIG_SPARSEMEM_STATIC is not set | ||
146 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
147 | CONFIG_BINFMT_ELF=y | ||
148 | # CONFIG_BINFMT_MISC is not set | ||
149 | CONFIG_CMDLINE_BOOL=y | ||
150 | CONFIG_CMDLINE="console=ttyS0,9600" | ||
151 | # CONFIG_PM is not set | ||
152 | # CONFIG_SOFTWARE_SUSPEND is not set | ||
153 | CONFIG_SECCOMP=y | ||
154 | CONFIG_ISA_DMA_API=y | ||
155 | |||
156 | # | ||
157 | # Bus options | ||
158 | # | ||
159 | # CONFIG_PPC_I8259 is not set | ||
160 | # CONFIG_PCI is not set | ||
161 | # CONFIG_PCI_DOMAINS is not set | ||
162 | |||
163 | # | ||
164 | # PCCARD (PCMCIA/CardBus) support | ||
165 | # | ||
166 | # CONFIG_PCCARD is not set | ||
167 | |||
168 | # | ||
169 | # Advanced setup | ||
170 | # | ||
171 | # CONFIG_ADVANCED_OPTIONS is not set | ||
172 | |||
173 | # | ||
174 | # Default settings for advanced configuration options are used | ||
175 | # | ||
176 | CONFIG_HIGHMEM_START=0xfe000000 | ||
177 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
178 | CONFIG_KERNEL_START=0xc0000000 | ||
179 | CONFIG_TASK_SIZE=0x80000000 | ||
180 | CONFIG_CONSISTENT_START=0xff100000 | ||
181 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
182 | CONFIG_BOOT_LOAD=0x00400000 | ||
183 | |||
184 | # | ||
185 | # Networking | ||
186 | # | ||
187 | CONFIG_NET=y | ||
188 | |||
189 | # | ||
190 | # Networking options | ||
191 | # | ||
192 | CONFIG_PACKET=y | ||
193 | CONFIG_PACKET_MMAP=y | ||
194 | CONFIG_UNIX=y | ||
195 | # CONFIG_NET_KEY is not set | ||
196 | CONFIG_INET=y | ||
197 | # CONFIG_IP_MULTICAST is not set | ||
198 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
199 | CONFIG_IP_FIB_HASH=y | ||
200 | CONFIG_IP_PNP=y | ||
201 | CONFIG_IP_PNP_DHCP=y | ||
202 | # CONFIG_IP_PNP_BOOTP is not set | ||
203 | # CONFIG_IP_PNP_RARP is not set | ||
204 | # CONFIG_NET_IPIP is not set | ||
205 | # CONFIG_NET_IPGRE is not set | ||
206 | # CONFIG_ARPD is not set | ||
207 | # CONFIG_SYN_COOKIES is not set | ||
208 | # CONFIG_INET_AH is not set | ||
209 | # CONFIG_INET_ESP is not set | ||
210 | # CONFIG_INET_IPCOMP is not set | ||
211 | # CONFIG_INET_TUNNEL is not set | ||
212 | CONFIG_INET_DIAG=y | ||
213 | CONFIG_INET_TCP_DIAG=y | ||
214 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
215 | CONFIG_TCP_CONG_BIC=y | ||
216 | # CONFIG_IPV6 is not set | ||
217 | # CONFIG_NETFILTER is not set | ||
218 | |||
219 | # | ||
220 | # DCCP Configuration (EXPERIMENTAL) | ||
221 | # | ||
222 | # CONFIG_IP_DCCP is not set | ||
223 | |||
224 | # | ||
225 | # SCTP Configuration (EXPERIMENTAL) | ||
226 | # | ||
227 | # CONFIG_IP_SCTP is not set | ||
228 | # CONFIG_ATM is not set | ||
229 | # CONFIG_BRIDGE is not set | ||
230 | # CONFIG_VLAN_8021Q is not set | ||
231 | # CONFIG_DECNET is not set | ||
232 | # CONFIG_LLC2 is not set | ||
233 | # CONFIG_IPX is not set | ||
234 | # CONFIG_ATALK is not set | ||
235 | # CONFIG_X25 is not set | ||
236 | # CONFIG_LAPB is not set | ||
237 | |||
238 | # | ||
239 | # TIPC Configuration (EXPERIMENTAL) | ||
240 | # | ||
241 | # CONFIG_TIPC is not set | ||
242 | # CONFIG_NET_DIVERT is not set | ||
243 | # CONFIG_ECONET is not set | ||
244 | # CONFIG_WAN_ROUTER is not set | ||
245 | |||
246 | # | ||
247 | # QoS and/or fair queueing | ||
248 | # | ||
249 | # CONFIG_NET_SCHED is not set | ||
250 | |||
251 | # | ||
252 | # Network testing | ||
253 | # | ||
254 | # CONFIG_NET_PKTGEN is not set | ||
255 | # CONFIG_HAMRADIO is not set | ||
256 | # CONFIG_IRDA is not set | ||
257 | # CONFIG_BT is not set | ||
258 | # CONFIG_IEEE80211 is not set | ||
259 | |||
260 | # | ||
261 | # Device Drivers | ||
262 | # | ||
263 | |||
264 | # | ||
265 | # Generic Driver Options | ||
266 | # | ||
267 | CONFIG_STANDALONE=y | ||
268 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
269 | # CONFIG_FW_LOADER is not set | ||
270 | # CONFIG_DEBUG_DRIVER is not set | ||
271 | |||
272 | # | ||
273 | # Connector - unified userspace <-> kernelspace linker | ||
274 | # | ||
275 | # CONFIG_CONNECTOR is not set | ||
276 | |||
277 | # | ||
278 | # Memory Technology Devices (MTD) | ||
279 | # | ||
280 | # CONFIG_MTD is not set | ||
281 | |||
282 | # | ||
283 | # Parallel port support | ||
284 | # | ||
285 | # CONFIG_PARPORT is not set | ||
286 | |||
287 | # | ||
288 | # Plug and Play support | ||
289 | # | ||
290 | |||
291 | # | ||
292 | # Block devices | ||
293 | # | ||
294 | # CONFIG_BLK_DEV_FD is not set | ||
295 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
296 | # CONFIG_BLK_DEV_LOOP is not set | ||
297 | # CONFIG_BLK_DEV_NBD is not set | ||
298 | CONFIG_BLK_DEV_RAM=y | ||
299 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
300 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
301 | CONFIG_BLK_DEV_INITRD=y | ||
302 | # CONFIG_CDROM_PKTCDVD is not set | ||
303 | # CONFIG_ATA_OVER_ETH is not set | ||
304 | |||
305 | # | ||
306 | # ATA/ATAPI/MFM/RLL support | ||
307 | # | ||
308 | # CONFIG_IDE is not set | ||
309 | |||
310 | # | ||
311 | # SCSI device support | ||
312 | # | ||
313 | # CONFIG_RAID_ATTRS is not set | ||
314 | # CONFIG_SCSI is not set | ||
315 | |||
316 | # | ||
317 | # Multi-device support (RAID and LVM) | ||
318 | # | ||
319 | # CONFIG_MD is not set | ||
320 | |||
321 | # | ||
322 | # Fusion MPT device support | ||
323 | # | ||
324 | # CONFIG_FUSION is not set | ||
325 | |||
326 | # | ||
327 | # IEEE 1394 (FireWire) support | ||
328 | # | ||
329 | |||
330 | # | ||
331 | # I2O device support | ||
332 | # | ||
333 | |||
334 | # | ||
335 | # Macintosh device drivers | ||
336 | # | ||
337 | # CONFIG_WINDFARM is not set | ||
338 | |||
339 | # | ||
340 | # Network device support | ||
341 | # | ||
342 | CONFIG_NETDEVICES=y | ||
343 | # CONFIG_DUMMY is not set | ||
344 | # CONFIG_BONDING is not set | ||
345 | # CONFIG_EQUALIZER is not set | ||
346 | CONFIG_TUN=y | ||
347 | |||
348 | # | ||
349 | # PHY device support | ||
350 | # | ||
351 | |||
352 | # | ||
353 | # Ethernet (10 or 100Mbit) | ||
354 | # | ||
355 | # CONFIG_NET_ETHERNET is not set | ||
356 | # CONFIG_IBM_EMAC is not set | ||
357 | |||
358 | # | ||
359 | # Ethernet (1000 Mbit) | ||
360 | # | ||
361 | |||
362 | # | ||
363 | # Ethernet (10000 Mbit) | ||
364 | # | ||
365 | |||
366 | # | ||
367 | # Token Ring devices | ||
368 | # | ||
369 | |||
370 | # | ||
371 | # Wireless LAN (non-hamradio) | ||
372 | # | ||
373 | # CONFIG_NET_RADIO is not set | ||
374 | |||
375 | # | ||
376 | # Wan interfaces | ||
377 | # | ||
378 | # CONFIG_WAN is not set | ||
379 | # CONFIG_PPP is not set | ||
380 | # CONFIG_SLIP is not set | ||
381 | # CONFIG_SHAPER is not set | ||
382 | # CONFIG_NETCONSOLE is not set | ||
383 | # CONFIG_NETPOLL is not set | ||
384 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
385 | |||
386 | # | ||
387 | # ISDN subsystem | ||
388 | # | ||
389 | # CONFIG_ISDN is not set | ||
390 | |||
391 | # | ||
392 | # Telephony Support | ||
393 | # | ||
394 | # CONFIG_PHONE is not set | ||
395 | |||
396 | # | ||
397 | # Input device support | ||
398 | # | ||
399 | CONFIG_INPUT=y | ||
400 | |||
401 | # | ||
402 | # Userland interfaces | ||
403 | # | ||
404 | CONFIG_INPUT_MOUSEDEV=y | ||
405 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
406 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
407 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
408 | # CONFIG_INPUT_JOYDEV is not set | ||
409 | # CONFIG_INPUT_TSDEV is not set | ||
410 | # CONFIG_INPUT_EVDEV is not set | ||
411 | # CONFIG_INPUT_EVBUG is not set | ||
412 | |||
413 | # | ||
414 | # Input Device Drivers | ||
415 | # | ||
416 | # CONFIG_INPUT_KEYBOARD is not set | ||
417 | # CONFIG_INPUT_MOUSE is not set | ||
418 | # CONFIG_INPUT_JOYSTICK is not set | ||
419 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
420 | # CONFIG_INPUT_MISC is not set | ||
421 | |||
422 | # | ||
423 | # Hardware I/O ports | ||
424 | # | ||
425 | # CONFIG_SERIO is not set | ||
426 | # CONFIG_GAMEPORT is not set | ||
427 | |||
428 | # | ||
429 | # Character devices | ||
430 | # | ||
431 | CONFIG_VT=y | ||
432 | CONFIG_VT_CONSOLE=y | ||
433 | CONFIG_HW_CONSOLE=y | ||
434 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
435 | |||
436 | # | ||
437 | # Serial drivers | ||
438 | # | ||
439 | CONFIG_SERIAL_8250=y | ||
440 | CONFIG_SERIAL_8250_CONSOLE=y | ||
441 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
442 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
443 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
444 | |||
445 | # | ||
446 | # Non-8250 serial port support | ||
447 | # | ||
448 | CONFIG_SERIAL_CORE=y | ||
449 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
450 | CONFIG_UNIX98_PTYS=y | ||
451 | # CONFIG_LEGACY_PTYS is not set | ||
452 | |||
453 | # | ||
454 | # IPMI | ||
455 | # | ||
456 | # CONFIG_IPMI_HANDLER is not set | ||
457 | |||
458 | # | ||
459 | # Watchdog Cards | ||
460 | # | ||
461 | # CONFIG_WATCHDOG is not set | ||
462 | # CONFIG_NVRAM is not set | ||
463 | # CONFIG_GEN_RTC is not set | ||
464 | # CONFIG_DTLK is not set | ||
465 | # CONFIG_R3964 is not set | ||
466 | |||
467 | # | ||
468 | # Ftape, the floppy tape device driver | ||
469 | # | ||
470 | # CONFIG_AGP is not set | ||
471 | # CONFIG_RAW_DRIVER is not set | ||
472 | |||
473 | # | ||
474 | # TPM devices | ||
475 | # | ||
476 | # CONFIG_TCG_TPM is not set | ||
477 | # CONFIG_TELCLOCK is not set | ||
478 | |||
479 | # | ||
480 | # I2C support | ||
481 | # | ||
482 | # CONFIG_I2C is not set | ||
483 | |||
484 | # | ||
485 | # SPI support | ||
486 | # | ||
487 | # CONFIG_SPI is not set | ||
488 | # CONFIG_SPI_MASTER is not set | ||
489 | |||
490 | # | ||
491 | # Dallas's 1-wire bus | ||
492 | # | ||
493 | # CONFIG_W1 is not set | ||
494 | |||
495 | # | ||
496 | # Hardware Monitoring support | ||
497 | # | ||
498 | # CONFIG_HWMON is not set | ||
499 | # CONFIG_HWMON_VID is not set | ||
500 | |||
501 | # | ||
502 | # Misc devices | ||
503 | # | ||
504 | |||
505 | # | ||
506 | # Multimedia Capabilities Port drivers | ||
507 | # | ||
508 | |||
509 | # | ||
510 | # Multimedia devices | ||
511 | # | ||
512 | # CONFIG_VIDEO_DEV is not set | ||
513 | |||
514 | # | ||
515 | # Digital Video Broadcasting Devices | ||
516 | # | ||
517 | # CONFIG_DVB is not set | ||
518 | |||
519 | # | ||
520 | # Graphics support | ||
521 | # | ||
522 | # CONFIG_FB is not set | ||
523 | |||
524 | # | ||
525 | # Console display driver support | ||
526 | # | ||
527 | CONFIG_DUMMY_CONSOLE=y | ||
528 | |||
529 | # | ||
530 | # Sound | ||
531 | # | ||
532 | # CONFIG_SOUND is not set | ||
533 | |||
534 | # | ||
535 | # USB support | ||
536 | # | ||
537 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
538 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
539 | |||
540 | # | ||
541 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
542 | # | ||
543 | |||
544 | # | ||
545 | # USB Gadget Support | ||
546 | # | ||
547 | # CONFIG_USB_GADGET is not set | ||
548 | |||
549 | # | ||
550 | # MMC/SD Card support | ||
551 | # | ||
552 | # CONFIG_MMC is not set | ||
553 | |||
554 | # | ||
555 | # InfiniBand support | ||
556 | # | ||
557 | |||
558 | # | ||
559 | # SN Devices | ||
560 | # | ||
561 | |||
562 | # | ||
563 | # File systems | ||
564 | # | ||
565 | CONFIG_EXT2_FS=y | ||
566 | # CONFIG_EXT2_FS_XATTR is not set | ||
567 | # CONFIG_EXT2_FS_XIP is not set | ||
568 | # CONFIG_EXT3_FS is not set | ||
569 | # CONFIG_REISERFS_FS is not set | ||
570 | # CONFIG_JFS_FS is not set | ||
571 | # CONFIG_FS_POSIX_ACL is not set | ||
572 | # CONFIG_XFS_FS is not set | ||
573 | # CONFIG_OCFS2_FS is not set | ||
574 | # CONFIG_MINIX_FS is not set | ||
575 | # CONFIG_ROMFS_FS is not set | ||
576 | CONFIG_INOTIFY=y | ||
577 | # CONFIG_QUOTA is not set | ||
578 | CONFIG_DNOTIFY=y | ||
579 | # CONFIG_AUTOFS_FS is not set | ||
580 | # CONFIG_AUTOFS4_FS is not set | ||
581 | # CONFIG_FUSE_FS is not set | ||
582 | |||
583 | # | ||
584 | # CD-ROM/DVD Filesystems | ||
585 | # | ||
586 | # CONFIG_ISO9660_FS is not set | ||
587 | # CONFIG_UDF_FS is not set | ||
588 | |||
589 | # | ||
590 | # DOS/FAT/NT Filesystems | ||
591 | # | ||
592 | CONFIG_FAT_FS=y | ||
593 | CONFIG_MSDOS_FS=y | ||
594 | CONFIG_VFAT_FS=y | ||
595 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
596 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
597 | # CONFIG_NTFS_FS is not set | ||
598 | |||
599 | # | ||
600 | # Pseudo filesystems | ||
601 | # | ||
602 | CONFIG_PROC_FS=y | ||
603 | CONFIG_PROC_KCORE=y | ||
604 | CONFIG_SYSFS=y | ||
605 | CONFIG_TMPFS=y | ||
606 | # CONFIG_HUGETLB_PAGE is not set | ||
607 | CONFIG_RAMFS=y | ||
608 | # CONFIG_RELAYFS_FS is not set | ||
609 | # CONFIG_CONFIGFS_FS is not set | ||
610 | |||
611 | # | ||
612 | # Miscellaneous filesystems | ||
613 | # | ||
614 | # CONFIG_ADFS_FS is not set | ||
615 | # CONFIG_AFFS_FS is not set | ||
616 | # CONFIG_HFS_FS is not set | ||
617 | # CONFIG_HFSPLUS_FS is not set | ||
618 | # CONFIG_BEFS_FS is not set | ||
619 | # CONFIG_BFS_FS is not set | ||
620 | # CONFIG_EFS_FS is not set | ||
621 | # CONFIG_CRAMFS is not set | ||
622 | # CONFIG_VXFS_FS is not set | ||
623 | # CONFIG_HPFS_FS is not set | ||
624 | # CONFIG_QNX4FS_FS is not set | ||
625 | # CONFIG_SYSV_FS is not set | ||
626 | # CONFIG_UFS_FS is not set | ||
627 | |||
628 | # | ||
629 | # Network File Systems | ||
630 | # | ||
631 | # CONFIG_NFS_FS is not set | ||
632 | # CONFIG_NFSD is not set | ||
633 | # CONFIG_SMB_FS is not set | ||
634 | # CONFIG_CIFS is not set | ||
635 | # CONFIG_NCP_FS is not set | ||
636 | # CONFIG_CODA_FS is not set | ||
637 | # CONFIG_AFS_FS is not set | ||
638 | # CONFIG_9P_FS is not set | ||
639 | |||
640 | # | ||
641 | # Partition Types | ||
642 | # | ||
643 | # CONFIG_PARTITION_ADVANCED is not set | ||
644 | CONFIG_MSDOS_PARTITION=y | ||
645 | |||
646 | # | ||
647 | # Native Language Support | ||
648 | # | ||
649 | CONFIG_NLS=y | ||
650 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
651 | CONFIG_NLS_CODEPAGE_437=y | ||
652 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
653 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
654 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
655 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
656 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
657 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
658 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
659 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
660 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
661 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
662 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
663 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
664 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
665 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
666 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
667 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
668 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
669 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
670 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
671 | # CONFIG_NLS_ISO8859_8 is not set | ||
672 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
673 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
674 | CONFIG_NLS_ASCII=y | ||
675 | CONFIG_NLS_ISO8859_1=y | ||
676 | # CONFIG_NLS_ISO8859_2 is not set | ||
677 | # CONFIG_NLS_ISO8859_3 is not set | ||
678 | # CONFIG_NLS_ISO8859_4 is not set | ||
679 | # CONFIG_NLS_ISO8859_5 is not set | ||
680 | # CONFIG_NLS_ISO8859_6 is not set | ||
681 | # CONFIG_NLS_ISO8859_7 is not set | ||
682 | # CONFIG_NLS_ISO8859_9 is not set | ||
683 | # CONFIG_NLS_ISO8859_13 is not set | ||
684 | # CONFIG_NLS_ISO8859_14 is not set | ||
685 | # CONFIG_NLS_ISO8859_15 is not set | ||
686 | # CONFIG_NLS_KOI8_R is not set | ||
687 | # CONFIG_NLS_KOI8_U is not set | ||
688 | CONFIG_NLS_UTF8=y | ||
689 | |||
690 | # | ||
691 | # IBM 40x options | ||
692 | # | ||
693 | |||
694 | # | ||
695 | # Library routines | ||
696 | # | ||
697 | # CONFIG_CRC_CCITT is not set | ||
698 | # CONFIG_CRC16 is not set | ||
699 | CONFIG_CRC32=y | ||
700 | # CONFIG_LIBCRC32C is not set | ||
701 | # CONFIG_PROFILING is not set | ||
702 | |||
703 | # | ||
704 | # Kernel hacking | ||
705 | # | ||
706 | CONFIG_PRINTK_TIME=y | ||
707 | CONFIG_MAGIC_SYSRQ=y | ||
708 | CONFIG_DEBUG_KERNEL=y | ||
709 | CONFIG_LOG_BUF_SHIFT=14 | ||
710 | CONFIG_DETECT_SOFTLOCKUP=y | ||
711 | # CONFIG_SCHEDSTATS is not set | ||
712 | # CONFIG_DEBUG_SLAB is not set | ||
713 | CONFIG_DEBUG_MUTEXES=y | ||
714 | # CONFIG_DEBUG_SPINLOCK is not set | ||
715 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
716 | # CONFIG_DEBUG_KOBJECT is not set | ||
717 | CONFIG_DEBUG_INFO=y | ||
718 | # CONFIG_DEBUG_FS is not set | ||
719 | # CONFIG_DEBUG_VM is not set | ||
720 | CONFIG_FORCED_INLINING=y | ||
721 | # CONFIG_RCU_TORTURE_TEST is not set | ||
722 | # CONFIG_KGDB is not set | ||
723 | CONFIG_XMON=y | ||
724 | # CONFIG_BDI_SWITCH is not set | ||
725 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
726 | |||
727 | # | ||
728 | # Security options | ||
729 | # | ||
730 | # CONFIG_KEYS is not set | ||
731 | # CONFIG_SECURITY is not set | ||
732 | |||
733 | # | ||
734 | # Cryptographic options | ||
735 | # | ||
736 | # CONFIG_CRYPTO is not set | ||
737 | |||
738 | # | ||
739 | # Hardware crypto devices | ||
740 | # | ||
diff --git a/arch/ppc/kernel/dma-mapping.c b/arch/ppc/kernel/dma-mapping.c index 685fd0defe23..61465ec88bc7 100644 --- a/arch/ppc/kernel/dma-mapping.c +++ b/arch/ppc/kernel/dma-mapping.c | |||
@@ -223,6 +223,8 @@ __dma_alloc_coherent(size_t size, dma_addr_t *handle, gfp_t gfp) | |||
223 | pte_t *pte = consistent_pte + CONSISTENT_OFFSET(vaddr); | 223 | pte_t *pte = consistent_pte + CONSISTENT_OFFSET(vaddr); |
224 | struct page *end = page + (1 << order); | 224 | struct page *end = page + (1 << order); |
225 | 225 | ||
226 | split_page(page, order); | ||
227 | |||
226 | /* | 228 | /* |
227 | * Set the "dma handle" | 229 | * Set the "dma handle" |
228 | */ | 230 | */ |
@@ -231,7 +233,6 @@ __dma_alloc_coherent(size_t size, dma_addr_t *handle, gfp_t gfp) | |||
231 | do { | 233 | do { |
232 | BUG_ON(!pte_none(*pte)); | 234 | BUG_ON(!pte_none(*pte)); |
233 | 235 | ||
234 | set_page_count(page, 1); | ||
235 | SetPageReserved(page); | 236 | SetPageReserved(page); |
236 | set_pte_at(&init_mm, vaddr, | 237 | set_pte_at(&init_mm, vaddr, |
237 | pte, mk_pte(page, pgprot_noncached(PAGE_KERNEL))); | 238 | pte, mk_pte(page, pgprot_noncached(PAGE_KERNEL))); |
@@ -244,7 +245,6 @@ __dma_alloc_coherent(size_t size, dma_addr_t *handle, gfp_t gfp) | |||
244 | * Free the otherwise unused pages. | 245 | * Free the otherwise unused pages. |
245 | */ | 246 | */ |
246 | while (page < end) { | 247 | while (page < end) { |
247 | set_page_count(page, 1); | ||
248 | __free_page(page); | 248 | __free_page(page); |
249 | page++; | 249 | page++; |
250 | } | 250 | } |
diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S index 677c571aa276..0d8b88219d38 100644 --- a/arch/ppc/kernel/head_44x.S +++ b/arch/ppc/kernel/head_44x.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/head_44x.S | ||
3 | * | ||
4 | * Kernel execution entry point code. | 2 | * Kernel execution entry point code. |
5 | * | 3 | * |
6 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> | 4 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> |
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index c1e89ad0684d..ec53c7d65f2b 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/except_8xx.S | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | 4 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP |
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index 8d60fa99fc4b..dd86bbed7627 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/head_fsl_booke.S | ||
3 | * | ||
4 | * Kernel execution entry point code. | 2 | * Kernel execution entry point code. |
5 | * | 3 | * |
6 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> | 4 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> |
@@ -316,6 +314,7 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
316 | */ | 314 | */ |
317 | lis r2,DBCR0_IDM@h | 315 | lis r2,DBCR0_IDM@h |
318 | mtspr SPRN_DBCR0,r2 | 316 | mtspr SPRN_DBCR0,r2 |
317 | isync | ||
319 | /* clear any residual debug events */ | 318 | /* clear any residual debug events */ |
320 | li r2,-1 | 319 | li r2,-1 |
321 | mtspr SPRN_DBSR,r2 | 320 | mtspr SPRN_DBSR,r2 |
@@ -1002,12 +1001,15 @@ _GLOBAL(giveup_fpu) | |||
1002 | _GLOBAL(abort) | 1001 | _GLOBAL(abort) |
1003 | li r13,0 | 1002 | li r13,0 |
1004 | mtspr SPRN_DBCR0,r13 /* disable all debug events */ | 1003 | mtspr SPRN_DBCR0,r13 /* disable all debug events */ |
1004 | isync | ||
1005 | mfmsr r13 | 1005 | mfmsr r13 |
1006 | ori r13,r13,MSR_DE@l /* Enable Debug Events */ | 1006 | ori r13,r13,MSR_DE@l /* Enable Debug Events */ |
1007 | mtmsr r13 | 1007 | mtmsr r13 |
1008 | isync | ||
1008 | mfspr r13,SPRN_DBCR0 | 1009 | mfspr r13,SPRN_DBCR0 |
1009 | lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h | 1010 | lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h |
1010 | mtspr SPRN_DBCR0,r13 | 1011 | mtspr SPRN_DBCR0,r13 |
1012 | isync | ||
1011 | 1013 | ||
1012 | _GLOBAL(set_context) | 1014 | _GLOBAL(set_context) |
1013 | 1015 | ||
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index c08ab432e958..53e9deacee82 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -168,9 +168,8 @@ int show_cpuinfo(struct seq_file *m, void *v) | |||
168 | /* Show summary information */ | 168 | /* Show summary information */ |
169 | #ifdef CONFIG_SMP | 169 | #ifdef CONFIG_SMP |
170 | unsigned long bogosum = 0; | 170 | unsigned long bogosum = 0; |
171 | for (i = 0; i < NR_CPUS; ++i) | 171 | for_each_online_cpu(i) |
172 | if (cpu_online(i)) | 172 | bogosum += cpu_data[i].loops_per_jiffy; |
173 | bogosum += cpu_data[i].loops_per_jiffy; | ||
174 | seq_printf(m, "total bogomips\t: %lu.%02lu\n", | 173 | seq_printf(m, "total bogomips\t: %lu.%02lu\n", |
175 | bogosum/(500000/HZ), bogosum/(5000/HZ) % 100); | 174 | bogosum/(500000/HZ), bogosum/(5000/HZ) % 100); |
176 | #endif /* CONFIG_SMP */ | 175 | #endif /* CONFIG_SMP */ |
@@ -712,9 +711,8 @@ int __init ppc_init(void) | |||
712 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); | 711 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); |
713 | 712 | ||
714 | /* register CPU devices */ | 713 | /* register CPU devices */ |
715 | for (i = 0; i < NR_CPUS; i++) | 714 | for_each_cpu(i) |
716 | if (cpu_possible(i)) | 715 | register_cpu(&cpu_devices[i], i, NULL); |
717 | register_cpu(&cpu_devices[i], i, NULL); | ||
718 | 716 | ||
719 | /* call platform init */ | 717 | /* call platform init */ |
720 | if (ppc_md.init != NULL) { | 718 | if (ppc_md.init != NULL) { |
diff --git a/arch/ppc/kernel/smp-tbsync.c b/arch/ppc/kernel/smp-tbsync.c index 2c9cd95bcea6..6a5694fcc711 100644 --- a/arch/ppc/kernel/smp-tbsync.c +++ b/arch/ppc/kernel/smp-tbsync.c | |||
@@ -126,8 +126,7 @@ smp_generic_give_timebase( void ) | |||
126 | printk("Synchronizing timebase\n"); | 126 | printk("Synchronizing timebase\n"); |
127 | 127 | ||
128 | /* if this fails then this kernel won't work anyway... */ | 128 | /* if this fails then this kernel won't work anyway... */ |
129 | tbsync = kmalloc( sizeof(*tbsync), GFP_KERNEL ); | 129 | tbsync = kzalloc( sizeof(*tbsync), GFP_KERNEL ); |
130 | memset( tbsync, 0, sizeof(*tbsync) ); | ||
131 | mb(); | 130 | mb(); |
132 | running = 1; | 131 | running = 1; |
133 | 132 | ||
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 6d0a1838d94c..1c0d68026abd 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/traps.c | ||
3 | * | ||
4 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 2 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/ppc/lib/rheap.c b/arch/ppc/lib/rheap.c index 42c5de2c898f..31e511856dc5 100644 --- a/arch/ppc/lib/rheap.c +++ b/arch/ppc/lib/rheap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/rheap.c | ||
3 | * | ||
4 | * A Remote Heap. Remote means that we don't touch the memory that the | 2 | * A Remote Heap. Remote means that we don't touch the memory that the |
5 | * heap points to. Normal heap implementations use the memory they manage | 3 | * heap points to. Normal heap implementations use the memory they manage |
6 | * to place their list. We cannot do that because the memory we manage may | 4 | * to place their list. We cannot do that because the memory we manage may |
diff --git a/arch/ppc/math-emu/math.c b/arch/ppc/math-emu/math.c index b7dff53a7103..589153472761 100644 --- a/arch/ppc/math-emu/math.c +++ b/arch/ppc/math-emu/math.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/math-emu/math.c | ||
3 | * | ||
4 | * Copyright (C) 1999 Eddie C. Dost (ecd@atecom.com) | 2 | * Copyright (C) 1999 Eddie C. Dost (ecd@atecom.com) |
5 | */ | 3 | */ |
6 | 4 | ||
diff --git a/arch/ppc/mm/44x_mmu.c b/arch/ppc/mm/44x_mmu.c index 3d79ce281b67..e0152a9b26e6 100644 --- a/arch/ppc/mm/44x_mmu.c +++ b/arch/ppc/mm/44x_mmu.c | |||
@@ -104,7 +104,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
104 | 104 | ||
105 | /* Determine number of entries necessary to cover lowmem */ | 105 | /* Determine number of entries necessary to cover lowmem */ |
106 | pinned_tlbs = (unsigned int) | 106 | pinned_tlbs = (unsigned int) |
107 | (_ALIGN(total_lowmem, PPC44x_PIN_SIZE) >> PPC44x_PIN_SHIFT); | 107 | (_ALIGN(total_lowmem, PPC_PIN_SIZE) >> PPC44x_PIN_SHIFT); |
108 | 108 | ||
109 | /* Write upper watermark to save location */ | 109 | /* Write upper watermark to save location */ |
110 | tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs; | 110 | tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs; |
@@ -112,7 +112,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
112 | /* If necessary, set additional pinned TLBs */ | 112 | /* If necessary, set additional pinned TLBs */ |
113 | if (pinned_tlbs > 1) | 113 | if (pinned_tlbs > 1) |
114 | for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) { | 114 | for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) { |
115 | unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC44x_PIN_SIZE; | 115 | unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC_PIN_SIZE; |
116 | ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr); | 116 | ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr); |
117 | } | 117 | } |
118 | 118 | ||
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c index ee5e9f25baf9..0217188ef465 100644 --- a/arch/ppc/mm/fault.c +++ b/arch/ppc/mm/fault.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/mm/fault.c | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * | 4 | * |
diff --git a/arch/ppc/mm/hashtable.S b/arch/ppc/mm/hashtable.S index 3ec87c91343e..f09fa88db35a 100644 --- a/arch/ppc/mm/hashtable.S +++ b/arch/ppc/mm/hashtable.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/hashtable.S | ||
3 | * | ||
4 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ | 2 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ |
5 | * | 3 | * |
6 | * PowerPC version | 4 | * PowerPC version |
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 134db5c04203..cb1c294fb932 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c | |||
@@ -140,7 +140,7 @@ static void free_sec(unsigned long start, unsigned long end, const char *name) | |||
140 | 140 | ||
141 | while (start < end) { | 141 | while (start < end) { |
142 | ClearPageReserved(virt_to_page(start)); | 142 | ClearPageReserved(virt_to_page(start)); |
143 | set_page_count(virt_to_page(start), 1); | 143 | init_page_count(virt_to_page(start)); |
144 | free_page(start); | 144 | free_page(start); |
145 | cnt++; | 145 | cnt++; |
146 | start += PAGE_SIZE; | 146 | start += PAGE_SIZE; |
@@ -172,7 +172,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
172 | 172 | ||
173 | for (; start < end; start += PAGE_SIZE) { | 173 | for (; start < end; start += PAGE_SIZE) { |
174 | ClearPageReserved(virt_to_page(start)); | 174 | ClearPageReserved(virt_to_page(start)); |
175 | set_page_count(virt_to_page(start), 1); | 175 | init_page_count(virt_to_page(start)); |
176 | free_page(start); | 176 | free_page(start); |
177 | totalram_pages++; | 177 | totalram_pages++; |
178 | } | 178 | } |
@@ -441,7 +441,7 @@ void __init mem_init(void) | |||
441 | struct page *page = mem_map + pfn; | 441 | struct page *page = mem_map + pfn; |
442 | 442 | ||
443 | ClearPageReserved(page); | 443 | ClearPageReserved(page); |
444 | set_page_count(page, 1); | 444 | init_page_count(page); |
445 | __free_page(page); | 445 | __free_page(page); |
446 | totalhigh_pages++; | 446 | totalhigh_pages++; |
447 | } | 447 | } |
diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig index d8837911bbc6..174ddbc9758b 100644 --- a/arch/ppc/platforms/4xx/Kconfig +++ b/arch/ppc/platforms/4xx/Kconfig | |||
@@ -57,6 +57,10 @@ config XILINX_ML300 | |||
57 | help | 57 | help |
58 | This option enables support for the Xilinx ML300 evaluation board. | 58 | This option enables support for the Xilinx ML300 evaluation board. |
59 | 59 | ||
60 | config XILINX_ML403 | ||
61 | bool "Xilinx-ML403" | ||
62 | help | ||
63 | This option enables support for the Xilinx ML403 evaluation board. | ||
60 | endchoice | 64 | endchoice |
61 | 65 | ||
62 | choice | 66 | choice |
@@ -172,11 +176,6 @@ config IBM_OCP | |||
172 | depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT | 176 | depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT |
173 | default y | 177 | default y |
174 | 178 | ||
175 | config XILINX_OCP | ||
176 | bool | ||
177 | depends on XILINX_ML300 | ||
178 | default y | ||
179 | |||
180 | config IBM_EMAC4 | 179 | config IBM_EMAC4 |
181 | bool | 180 | bool |
182 | depends on 440GX || 440SP || 440SPE | 181 | depends on 440GX || 440SP || 440SPE |
@@ -208,11 +207,21 @@ config 405GPR | |||
208 | depends on SYCAMORE | 207 | depends on SYCAMORE |
209 | default y | 208 | default y |
210 | 209 | ||
211 | config VIRTEX_II_PRO | 210 | config XILINX_VIRTEX_II_PRO |
212 | bool | 211 | bool |
213 | depends on XILINX_ML300 | 212 | depends on XILINX_ML300 |
214 | default y | 213 | default y |
215 | 214 | ||
215 | config XILINX_VIRTEX_4_FX | ||
216 | bool | ||
217 | depends on XILINX_ML403 | ||
218 | default y | ||
219 | |||
220 | config XILINX_VIRTEX | ||
221 | bool | ||
222 | depends on XILINX_VIRTEX_II_PRO || XILINX_VIRTEX_4_FX | ||
223 | default y | ||
224 | |||
216 | config STB03xxx | 225 | config STB03xxx |
217 | bool | 226 | bool |
218 | depends on REDWOOD_5 || REDWOOD_6 | 227 | depends on REDWOOD_5 || REDWOOD_6 |
@@ -220,7 +229,7 @@ config STB03xxx | |||
220 | 229 | ||
221 | config EMBEDDEDBOOT | 230 | config EMBEDDEDBOOT |
222 | bool | 231 | bool |
223 | depends on EP405 || XILINX_ML300 | 232 | depends on EP405 || XILINX_ML300 || XILINX_ML403 |
224 | default y | 233 | default y |
225 | 234 | ||
226 | config IBM_OPENBIOS | 235 | config IBM_OPENBIOS |
diff --git a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile index c9bb61170954..a04a0d0a0f5c 100644 --- a/arch/ppc/platforms/4xx/Makefile +++ b/arch/ppc/platforms/4xx/Makefile | |||
@@ -14,6 +14,7 @@ obj-$(CONFIG_REDWOOD_6) += redwood6.o | |||
14 | obj-$(CONFIG_SYCAMORE) += sycamore.o | 14 | obj-$(CONFIG_SYCAMORE) += sycamore.o |
15 | obj-$(CONFIG_WALNUT) += walnut.o | 15 | obj-$(CONFIG_WALNUT) += walnut.o |
16 | obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o | 16 | obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o |
17 | obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o | ||
17 | 18 | ||
18 | obj-$(CONFIG_405GP) += ibm405gp.o | 19 | obj-$(CONFIG_405GP) += ibm405gp.o |
19 | obj-$(CONFIG_REDWOOD_5) += ibmstb4.o | 20 | obj-$(CONFIG_REDWOOD_5) += ibmstb4.o |
@@ -26,4 +27,5 @@ obj-$(CONFIG_440SP) += ibm440sp.o | |||
26 | obj-$(CONFIG_440SPE) += ppc440spe.o | 27 | obj-$(CONFIG_440SPE) += ppc440spe.o |
27 | obj-$(CONFIG_405EP) += ibm405ep.o | 28 | obj-$(CONFIG_405EP) += ibm405ep.o |
28 | obj-$(CONFIG_405GPR) += ibm405gpr.o | 29 | obj-$(CONFIG_405GPR) += ibm405gpr.o |
29 | obj-$(CONFIG_VIRTEX_II_PRO) += virtex-ii_pro.o | 30 | obj-$(CONFIG_XILINX_VIRTEX) += virtex.o |
31 | |||
diff --git a/arch/ppc/platforms/4xx/bamboo.c b/arch/ppc/platforms/4xx/bamboo.c index 0ec53f049338..b940cfd646c2 100644 --- a/arch/ppc/platforms/4xx/bamboo.c +++ b/arch/ppc/platforms/4xx/bamboo.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/bamboo.c | ||
3 | * | ||
4 | * Bamboo board specific routines | 2 | * Bamboo board specific routines |
5 | * | 3 | * |
6 | * Wade Farnsworth <wfarnsworth@mvista.com> | 4 | * Wade Farnsworth <wfarnsworth@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/bamboo.h b/arch/ppc/platforms/4xx/bamboo.h index 5c0192826494..31c0dd6a26cb 100644 --- a/arch/ppc/platforms/4xx/bamboo.h +++ b/arch/ppc/platforms/4xx/bamboo.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/bamboo.h | ||
3 | * | ||
4 | * Bamboo board definitions | 2 | * Bamboo board definitions |
5 | * | 3 | * |
6 | * Wade Farnsworth <wfarnsworth@mvista.com> | 4 | * Wade Farnsworth <wfarnsworth@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/bubinga.h b/arch/ppc/platforms/4xx/bubinga.h index b5380cfaf5c0..606aa9fa5caa 100644 --- a/arch/ppc/platforms/4xx/bubinga.h +++ b/arch/ppc/platforms/4xx/bubinga.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/bubinga.h | ||
3 | * | ||
4 | * Bubinga board definitions | 2 | * Bubinga board definitions |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/4xx/cpci405.c b/arch/ppc/platforms/4xx/cpci405.c index ff966773a0bf..6571e39fbe48 100644 --- a/arch/ppc/platforms/4xx/cpci405.c +++ b/arch/ppc/platforms/4xx/cpci405.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/cpci405.c | ||
3 | * | ||
4 | * Board setup routines for the esd CPCI-405 cPCI Board. | 2 | * Board setup routines for the esd CPCI-405 cPCI Board. |
5 | * | 3 | * |
6 | * Author: Stefan Roese | 4 | * Author: Stefan Roese |
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c index 9a828b623417..b4ecb9c79854 100644 --- a/arch/ppc/platforms/4xx/ebony.c +++ b/arch/ppc/platforms/4xx/ebony.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ebony.c | ||
3 | * | ||
4 | * Ebony board specific routines | 2 | * Ebony board specific routines |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ebony.h b/arch/ppc/platforms/4xx/ebony.h index b91ad4272dfe..27b2e77c7c83 100644 --- a/arch/ppc/platforms/4xx/ebony.h +++ b/arch/ppc/platforms/4xx/ebony.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ebony.h | ||
3 | * | ||
4 | * Ebony board definitions | 2 | * Ebony board definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ep405.c b/arch/ppc/platforms/4xx/ep405.c index 26a07cdb30ec..6efa91ff9c07 100644 --- a/arch/ppc/platforms/4xx/ep405.c +++ b/arch/ppc/platforms/4xx/ep405.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ep405.c | ||
3 | * | ||
4 | * Embedded Planet 405GP board | 2 | * Embedded Planet 405GP board |
5 | * http://www.embeddedplanet.com | 3 | * http://www.embeddedplanet.com |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/ep405.h b/arch/ppc/platforms/4xx/ep405.h index ea3eb21338fb..9814fc431725 100644 --- a/arch/ppc/platforms/4xx/ep405.h +++ b/arch/ppc/platforms/4xx/ep405.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ep405.h | ||
3 | * | ||
4 | * Embedded Planet 405GP board | 2 | * Embedded Planet 405GP board |
5 | * http://www.embeddedplanet.com | 3 | * http://www.embeddedplanet.com |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/ibm405ep.c b/arch/ppc/platforms/4xx/ibm405ep.c index 093b28d27a41..55af769a6e70 100644 --- a/arch/ppc/platforms/4xx/ibm405ep.c +++ b/arch/ppc/platforms/4xx/ibm405ep.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ibm405ep.c | ||
3 | * | ||
4 | * Support for IBM PPC 405EP processors. | 2 | * Support for IBM PPC 405EP processors. |
5 | * | 3 | * |
6 | * Author: SAW (IBM), derived from ibmnp405l.c. | 4 | * Author: SAW (IBM), derived from ibmnp405l.c. |
diff --git a/arch/ppc/platforms/4xx/ibm405ep.h b/arch/ppc/platforms/4xx/ibm405ep.h index e051e3fe8c63..fe46640de152 100644 --- a/arch/ppc/platforms/4xx/ibm405ep.h +++ b/arch/ppc/platforms/4xx/ibm405ep.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm405ep.h | ||
3 | * | ||
4 | * IBM PPC 405EP processor defines. | 2 | * IBM PPC 405EP processor defines. |
5 | * | 3 | * |
6 | * Author: SAW (IBM), derived from ibm405gp.h. | 4 | * Author: SAW (IBM), derived from ibm405gp.h. |
diff --git a/arch/ppc/platforms/4xx/ibm405gp.h b/arch/ppc/platforms/4xx/ibm405gp.h index b2b642e81af7..eaf0ef57028d 100644 --- a/arch/ppc/platforms/4xx/ibm405gp.h +++ b/arch/ppc/platforms/4xx/ibm405gp.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm405gp.h | ||
3 | * | ||
4 | * Author: Armin Kuster akuster@mvista.com | 2 | * Author: Armin Kuster akuster@mvista.com |
5 | * | 3 | * |
6 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibm405gpr.c b/arch/ppc/platforms/4xx/ibm405gpr.c index cd0d00d8e8ee..49da61f6854a 100644 --- a/arch/ppc/platforms/4xx/ibm405gpr.c +++ b/arch/ppc/platforms/4xx/ibm405gpr.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm405gpr.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibm405gpr.h b/arch/ppc/platforms/4xx/ibm405gpr.h index 45412fb4368f..e90c5dde01d3 100644 --- a/arch/ppc/platforms/4xx/ibm405gpr.h +++ b/arch/ppc/platforms/4xx/ibm405gpr.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm405gpr.h | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibm440ep.c b/arch/ppc/platforms/4xx/ibm440ep.c index 65ac0b9c2d05..1fed6638c81f 100644 --- a/arch/ppc/platforms/4xx/ibm440ep.c +++ b/arch/ppc/platforms/4xx/ibm440ep.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440ep.c | ||
3 | * | ||
4 | * PPC440EP I/O descriptions | 2 | * PPC440EP I/O descriptions |
5 | * | 3 | * |
6 | * Wade Farnsworth <wfarnsworth@mvista.com> | 4 | * Wade Farnsworth <wfarnsworth@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440ep.h b/arch/ppc/platforms/4xx/ibm440ep.h index 97c80b8e3e10..61717e8a799e 100644 --- a/arch/ppc/platforms/4xx/ibm440ep.h +++ b/arch/ppc/platforms/4xx/ibm440ep.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440ep.h | ||
3 | * | ||
4 | * PPC440EP definitions | 2 | * PPC440EP definitions |
5 | * | 3 | * |
6 | * Wade Farnsworth <wfarnsworth@mvista.com> | 4 | * Wade Farnsworth <wfarnsworth@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440gp.c b/arch/ppc/platforms/4xx/ibm440gp.c index d926245e8b3e..b67a72e5c6fe 100644 --- a/arch/ppc/platforms/4xx/ibm440gp.c +++ b/arch/ppc/platforms/4xx/ibm440gp.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440gp.c | ||
3 | * | ||
4 | * PPC440GP I/O descriptions | 2 | * PPC440GP I/O descriptions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440gp.h b/arch/ppc/platforms/4xx/ibm440gp.h index ae1efc03b295..7b2763b6024f 100644 --- a/arch/ppc/platforms/4xx/ibm440gp.h +++ b/arch/ppc/platforms/4xx/ibm440gp.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440gp.h | ||
3 | * | ||
4 | * PPC440GP definitions | 2 | * PPC440GP definitions |
5 | * | 3 | * |
6 | * Roland Dreier <roland@digitalvampire.org> | 4 | * Roland Dreier <roland@digitalvampire.org> |
diff --git a/arch/ppc/platforms/4xx/ibm440gx.c b/arch/ppc/platforms/4xx/ibm440gx.c index d24c09ee7b18..685abffcb6ce 100644 --- a/arch/ppc/platforms/4xx/ibm440gx.c +++ b/arch/ppc/platforms/4xx/ibm440gx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440gx.c | ||
3 | * | ||
4 | * PPC440GX I/O descriptions | 2 | * PPC440GX I/O descriptions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440gx.h b/arch/ppc/platforms/4xx/ibm440gx.h index 0b59d8dcd03c..070a34efe1c7 100644 --- a/arch/ppc/platforms/4xx/ibm440gx.h +++ b/arch/ppc/platforms/4xx/ibm440gx.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ibm440gx.h | ||
3 | * | ||
4 | * PPC440GX definitions | 2 | * PPC440GX definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440sp.c b/arch/ppc/platforms/4xx/ibm440sp.c index 71a0117d3597..de8f7ac5623c 100644 --- a/arch/ppc/platforms/4xx/ibm440sp.c +++ b/arch/ppc/platforms/4xx/ibm440sp.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440sp.c | ||
3 | * | ||
4 | * PPC440SP I/O descriptions | 2 | * PPC440SP I/O descriptions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ibm440sp.h b/arch/ppc/platforms/4xx/ibm440sp.h index c71e46a18b9e..77e8bb22c527 100644 --- a/arch/ppc/platforms/4xx/ibm440sp.h +++ b/arch/ppc/platforms/4xx/ibm440sp.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440sp.h | ||
3 | * | ||
4 | * PPC440SP definitions | 2 | * PPC440SP definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ibmnp405h.c b/arch/ppc/platforms/4xx/ibmnp405h.c index a477a78f4902..f1dcb0ac15b7 100644 --- a/arch/ppc/platforms/4xx/ibmnp405h.c +++ b/arch/ppc/platforms/4xx/ibmnp405h.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmnp405h.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmnp405h.h b/arch/ppc/platforms/4xx/ibmnp405h.h index e2c2b06128c8..2c683f6aaa66 100644 --- a/arch/ppc/platforms/4xx/ibmnp405h.h +++ b/arch/ppc/platforms/4xx/ibmnp405h.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmnp405h.h | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmstb4.c b/arch/ppc/platforms/4xx/ibmstb4.c index 7e33bb635443..799a2eccccc3 100644 --- a/arch/ppc/platforms/4xx/ibmstb4.c +++ b/arch/ppc/platforms/4xx/ibmstb4.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmstb4.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmstb4.h b/arch/ppc/platforms/4xx/ibmstb4.h index 9f21d4c88a3d..9de426597351 100644 --- a/arch/ppc/platforms/4xx/ibmstb4.h +++ b/arch/ppc/platforms/4xx/ibmstb4.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmstb4.h | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmstbx25.c b/arch/ppc/platforms/4xx/ibmstbx25.c index b895b9cca57d..090ddcbecc5e 100644 --- a/arch/ppc/platforms/4xx/ibmstbx25.c +++ b/arch/ppc/platforms/4xx/ibmstbx25.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmstbx25.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmstbx25.h b/arch/ppc/platforms/4xx/ibmstbx25.h index 9a2efc366e9c..6884a49d3482 100644 --- a/arch/ppc/platforms/4xx/ibmstbx25.h +++ b/arch/ppc/platforms/4xx/ibmstbx25.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmstbx25.h | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c index 21d29132aebd..5c37de28e135 100644 --- a/arch/ppc/platforms/4xx/luan.c +++ b/arch/ppc/platforms/4xx/luan.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/luan.c | ||
3 | * | ||
4 | * Luan board specific routines | 2 | * Luan board specific routines |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/luan.h b/arch/ppc/platforms/4xx/luan.h index bbe7d0766db8..e0db6a810feb 100644 --- a/arch/ppc/platforms/4xx/luan.h +++ b/arch/ppc/platforms/4xx/luan.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/luan.h | ||
3 | * | ||
4 | * Luan board definitions | 2 | * Luan board definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c index 4f355b6acab2..f841972f1fa9 100644 --- a/arch/ppc/platforms/4xx/ocotea.c +++ b/arch/ppc/platforms/4xx/ocotea.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ocotea.c | ||
3 | * | ||
4 | * Ocotea board specific routines | 2 | * Ocotea board specific routines |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ocotea.h b/arch/ppc/platforms/4xx/ocotea.h index 33251153ac5f..7c799a9ff82b 100644 --- a/arch/ppc/platforms/4xx/ocotea.h +++ b/arch/ppc/platforms/4xx/ocotea.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ocotea.h | ||
3 | * | ||
4 | * Ocotea board definitions | 2 | * Ocotea board definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ppc440spe.c b/arch/ppc/platforms/4xx/ppc440spe.c index 6139a0b3393e..1be5d1c8e266 100644 --- a/arch/ppc/platforms/4xx/ppc440spe.c +++ b/arch/ppc/platforms/4xx/ppc440spe.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ppc440spe.c | ||
3 | * | ||
4 | * PPC440SPe I/O descriptions | 2 | * PPC440SPe I/O descriptions |
5 | * | 3 | * |
6 | * Roland Dreier <rolandd@cisco.com> | 4 | * Roland Dreier <rolandd@cisco.com> |
diff --git a/arch/ppc/platforms/4xx/ppc440spe.h b/arch/ppc/platforms/4xx/ppc440spe.h index 2216846973b8..d3a620ddcdee 100644 --- a/arch/ppc/platforms/4xx/ppc440spe.h +++ b/arch/ppc/platforms/4xx/ppc440spe.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440spe.h | ||
3 | * | ||
4 | * PPC440SPe definitions | 2 | * PPC440SPe definitions |
5 | * | 3 | * |
6 | * Roland Dreier <rolandd@cisco.com> | 4 | * Roland Dreier <rolandd@cisco.com> |
diff --git a/arch/ppc/platforms/4xx/redwood5.c b/arch/ppc/platforms/4xx/redwood5.c index 611ac861804d..53da2b4f7c24 100644 --- a/arch/ppc/platforms/4xx/redwood5.c +++ b/arch/ppc/platforms/4xx/redwood5.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/redwood5.c | ||
3 | * | ||
4 | * Support for the IBM redwood5 eval board file | 2 | * Support for the IBM redwood5 eval board file |
5 | * | 3 | * |
6 | * Author: Armin Kuster <akuster@mvista.com> | 4 | * Author: Armin Kuster <akuster@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/redwood5.h b/arch/ppc/platforms/4xx/redwood5.h index 264e34fb3fbd..49edd4818970 100644 --- a/arch/ppc/platforms/4xx/redwood5.h +++ b/arch/ppc/platforms/4xx/redwood5.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/redwood5.h | ||
3 | * | ||
4 | * Macros, definitions, and data structures specific to the IBM PowerPC | 2 | * Macros, definitions, and data structures specific to the IBM PowerPC |
5 | * STB03xxx "Redwood" evaluation board. | 3 | * STB03xxx "Redwood" evaluation board. |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/redwood6.c b/arch/ppc/platforms/4xx/redwood6.c index b13116691289..41b27d106fa3 100644 --- a/arch/ppc/platforms/4xx/redwood6.c +++ b/arch/ppc/platforms/4xx/redwood6.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/redwood6.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/redwood6.h b/arch/ppc/platforms/4xx/redwood6.h index 1814b9f5fc3a..1edcbe5c51c7 100644 --- a/arch/ppc/platforms/4xx/redwood6.h +++ b/arch/ppc/platforms/4xx/redwood6.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/redwood6.h | ||
3 | * | ||
4 | * Macros, definitions, and data structures specific to the IBM PowerPC | 2 | * Macros, definitions, and data structures specific to the IBM PowerPC |
5 | * STBx25xx "Redwood6" evaluation board. | 3 | * STBx25xx "Redwood6" evaluation board. |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c index 281b4a2ffb96..bab31eb30687 100644 --- a/arch/ppc/platforms/4xx/sycamore.c +++ b/arch/ppc/platforms/4xx/sycamore.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/sycamore.c | ||
3 | * | ||
4 | * Architecture- / platform-specific boot-time initialization code for | 2 | * Architecture- / platform-specific boot-time initialization code for |
5 | * IBM PowerPC 4xx based boards. | 3 | * IBM PowerPC 4xx based boards. |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/sycamore.h b/arch/ppc/platforms/4xx/sycamore.h index 1cd6c824fd62..dae01620227d 100644 --- a/arch/ppc/platforms/4xx/sycamore.h +++ b/arch/ppc/platforms/4xx/sycamore.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/sycamore.h | ||
3 | * | ||
4 | * Sycamore board definitions | 2 | * Sycamore board definitions |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/4xx/virtex-ii_pro.c b/arch/ppc/platforms/4xx/virtex-ii_pro.c deleted file mode 100644 index 097cc9d5aca0..000000000000 --- a/arch/ppc/platforms/4xx/virtex-ii_pro.c +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/virtex-ii_pro.c | ||
3 | * | ||
4 | * Author: MontaVista Software, Inc. | ||
5 | * source@mvista.com | ||
6 | * | ||
7 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
8 | * terms of the GNU General Public License version 2. This program is licensed | ||
9 | * "as is" without any warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <asm/ocp.h> | ||
15 | #include "virtex-ii_pro.h" | ||
16 | |||
17 | /* Have OCP take care of the serial ports. */ | ||
18 | struct ocp_def core_ocp[] = { | ||
19 | #ifdef XPAR_UARTNS550_0_BASEADDR | ||
20 | { .vendor = OCP_VENDOR_XILINX, | ||
21 | .function = OCP_FUNC_16550, | ||
22 | .index = 0, | ||
23 | .paddr = XPAR_UARTNS550_0_BASEADDR, | ||
24 | .irq = XPAR_INTC_0_UARTNS550_0_VEC_ID, | ||
25 | .pm = OCP_CPM_NA | ||
26 | }, | ||
27 | #ifdef XPAR_UARTNS550_1_BASEADDR | ||
28 | { .vendor = OCP_VENDOR_XILINX, | ||
29 | .function = OCP_FUNC_16550, | ||
30 | .index = 1, | ||
31 | .paddr = XPAR_UARTNS550_1_BASEADDR, | ||
32 | .irq = XPAR_INTC_0_UARTNS550_1_VEC_ID, | ||
33 | .pm = OCP_CPM_NA | ||
34 | }, | ||
35 | #ifdef XPAR_UARTNS550_2_BASEADDR | ||
36 | { .vendor = OCP_VENDOR_XILINX, | ||
37 | .function = OCP_FUNC_16550, | ||
38 | .index = 2, | ||
39 | .paddr = XPAR_UARTNS550_2_BASEADDR, | ||
40 | .irq = XPAR_INTC_0_UARTNS550_2_VEC_ID, | ||
41 | .pm = OCP_CPM_NA | ||
42 | }, | ||
43 | #ifdef XPAR_UARTNS550_3_BASEADDR | ||
44 | { .vendor = OCP_VENDOR_XILINX, | ||
45 | .function = OCP_FUNC_16550, | ||
46 | .index = 3, | ||
47 | .paddr = XPAR_UARTNS550_3_BASEADDR, | ||
48 | .irq = XPAR_INTC_0_UARTNS550_3_VEC_ID, | ||
49 | .pm = OCP_CPM_NA | ||
50 | }, | ||
51 | #ifdef XPAR_UARTNS550_4_BASEADDR | ||
52 | #error Edit this file to add more devices. | ||
53 | #endif /* 4 */ | ||
54 | #endif /* 3 */ | ||
55 | #endif /* 2 */ | ||
56 | #endif /* 1 */ | ||
57 | #endif /* 0 */ | ||
58 | { .vendor = OCP_VENDOR_INVALID | ||
59 | } | ||
60 | }; | ||
diff --git a/arch/ppc/platforms/4xx/virtex-ii_pro.h b/arch/ppc/platforms/4xx/virtex-ii_pro.h deleted file mode 100644 index 9014c4887339..000000000000 --- a/arch/ppc/platforms/4xx/virtex-ii_pro.h +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/virtex-ii_pro.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx Virtex-II Pro processor | ||
5 | * | ||
6 | * Author: MontaVista Software, Inc. | ||
7 | * source@mvista.com | ||
8 | * | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
10 | * terms of the GNU General Public License version 2. This program is licensed | ||
11 | * "as is" without any warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | #ifndef __ASM_VIRTEXIIPRO_H__ | ||
16 | #define __ASM_VIRTEXIIPRO_H__ | ||
17 | |||
18 | #include <linux/config.h> | ||
19 | #include <asm/xparameters.h> | ||
20 | |||
21 | /* serial defines */ | ||
22 | |||
23 | #define RS_TABLE_SIZE 4 /* change this and add more devices below | ||
24 | if you have more then 4 16x50 UARTs */ | ||
25 | |||
26 | #define BASE_BAUD (XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16) | ||
27 | |||
28 | /* The serial ports in the Virtex-II Pro have each I/O byte in the | ||
29 | * LSByte of a word. This means that iomem_reg_shift needs to be 2 to | ||
30 | * change the byte offsets into word offsets. In addition the base | ||
31 | * addresses need to have 3 added to them to get to the LSByte. | ||
32 | */ | ||
33 | #define STD_UART_OP(num) \ | ||
34 | { 0, BASE_BAUD, 0, XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \ | ||
35 | ASYNC_BOOT_AUTOCONF, \ | ||
36 | .iomem_base = (u8 *)XPAR_UARTNS550_##num##_BASEADDR + 3, \ | ||
37 | .iomem_reg_shift = 2, \ | ||
38 | .io_type = SERIAL_IO_MEM}, | ||
39 | |||
40 | #if defined(XPAR_INTC_0_UARTNS550_0_VEC_ID) | ||
41 | #define ML300_UART0 STD_UART_OP(0) | ||
42 | #else | ||
43 | #define ML300_UART0 | ||
44 | #endif | ||
45 | |||
46 | #if defined(XPAR_INTC_0_UARTNS550_1_VEC_ID) | ||
47 | #define ML300_UART1 STD_UART_OP(1) | ||
48 | #else | ||
49 | #define ML300_UART1 | ||
50 | #endif | ||
51 | |||
52 | #if defined(XPAR_INTC_0_UARTNS550_2_VEC_ID) | ||
53 | #define ML300_UART2 STD_UART_OP(2) | ||
54 | #else | ||
55 | #define ML300_UART2 | ||
56 | #endif | ||
57 | |||
58 | #if defined(XPAR_INTC_0_UARTNS550_3_VEC_ID) | ||
59 | #define ML300_UART3 STD_UART_OP(3) | ||
60 | #else | ||
61 | #define ML300_UART3 | ||
62 | #endif | ||
63 | |||
64 | #if defined(XPAR_INTC_0_UARTNS550_4_VEC_ID) | ||
65 | #error Edit this file to add more devices. | ||
66 | #elif defined(XPAR_INTC_0_UARTNS550_3_VEC_ID) | ||
67 | #define NR_SER_PORTS 4 | ||
68 | #elif defined(XPAR_INTC_0_UARTNS550_2_VEC_ID) | ||
69 | #define NR_SER_PORTS 3 | ||
70 | #elif defined(XPAR_INTC_0_UARTNS550_1_VEC_ID) | ||
71 | #define NR_SER_PORTS 2 | ||
72 | #elif defined(XPAR_INTC_0_UARTNS550_0_VEC_ID) | ||
73 | #define NR_SER_PORTS 1 | ||
74 | #else | ||
75 | #define NR_SER_PORTS 0 | ||
76 | #endif | ||
77 | |||
78 | #if defined(CONFIG_UART0_TTYS0) | ||
79 | #define SERIAL_PORT_DFNS \ | ||
80 | ML300_UART0 \ | ||
81 | ML300_UART1 \ | ||
82 | ML300_UART2 \ | ||
83 | ML300_UART3 | ||
84 | #endif | ||
85 | |||
86 | #if defined(CONFIG_UART0_TTYS1) | ||
87 | #define SERIAL_PORT_DFNS \ | ||
88 | ML300_UART1 \ | ||
89 | ML300_UART0 \ | ||
90 | ML300_UART2 \ | ||
91 | ML300_UART3 | ||
92 | #endif | ||
93 | |||
94 | #define DCRN_CPMFR_BASE 0 | ||
95 | |||
96 | #include <asm/ibm405.h> | ||
97 | |||
98 | #endif /* __ASM_VIRTEXIIPRO_H__ */ | ||
99 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/virtex.c b/arch/ppc/platforms/4xx/virtex.c new file mode 100644 index 000000000000..133a83147199 --- /dev/null +++ b/arch/ppc/platforms/4xx/virtex.c | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Virtex-II Pro & Virtex-4 FX common infrastructure | ||
3 | * | ||
4 | * Maintainer: Grant Likely <grant.likely@secretlab.ca> | ||
5 | * | ||
6 | * Copyright 2005 Secret Lab Technologies Ltd. | ||
7 | * Copyright 2005 General Dynamics Canada Ltd. | ||
8 | * Copyright 2005 Freescale Semiconductor Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/device.h> | ||
19 | #include <linux/serial_8250.h> | ||
20 | #include <asm/ppc_sys.h> | ||
21 | #include <platforms/4xx/virtex.h> | ||
22 | #include <platforms/4xx/xparameters/xparameters.h> | ||
23 | |||
24 | #define XPAR_UART(num) { \ | ||
25 | .mapbase = XPAR_UARTNS550_##num##_BASEADDR + 3, \ | ||
26 | .irq = XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \ | ||
27 | .iotype = UPIO_MEM, \ | ||
28 | .uartclk = XPAR_UARTNS550_##num##_CLOCK_FREQ_HZ, \ | ||
29 | .flags = UPF_BOOT_AUTOCONF, \ | ||
30 | .regshift = 2, \ | ||
31 | } | ||
32 | |||
33 | struct plat_serial8250_port serial_platform_data[] = { | ||
34 | #ifdef XPAR_UARTNS550_0_BASEADDR | ||
35 | XPAR_UART(0), | ||
36 | #endif | ||
37 | #ifdef XPAR_UARTNS550_1_BASEADDR | ||
38 | XPAR_UART(1), | ||
39 | #endif | ||
40 | #ifdef XPAR_UARTNS550_2_BASEADDR | ||
41 | XPAR_UART(2), | ||
42 | #endif | ||
43 | #ifdef XPAR_UARTNS550_3_BASEADDR | ||
44 | XPAR_UART(3), | ||
45 | #endif | ||
46 | { }, /* terminated by empty record */ | ||
47 | }; | ||
48 | |||
49 | struct platform_device ppc_sys_platform_devices[] = { | ||
50 | [VIRTEX_UART] = { | ||
51 | .name = "serial8250", | ||
52 | .id = 0, | ||
53 | .dev.platform_data = serial_platform_data, | ||
54 | }, | ||
55 | }; | ||
56 | |||
diff --git a/arch/ppc/platforms/4xx/virtex.h b/arch/ppc/platforms/4xx/virtex.h new file mode 100644 index 000000000000..c14325dfd7b1 --- /dev/null +++ b/arch/ppc/platforms/4xx/virtex.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/virtex.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx Virtex-II Pro processor | ||
5 | * | ||
6 | * Author: MontaVista Software, Inc. | ||
7 | * source@mvista.com | ||
8 | * | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
10 | * terms of the GNU General Public License version 2. This program is licensed | ||
11 | * "as is" without any warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | #ifndef __ASM_VIRTEX_H__ | ||
16 | #define __ASM_VIRTEX_H__ | ||
17 | |||
18 | /* serial defines */ | ||
19 | |||
20 | #include <asm/ibm405.h> | ||
21 | |||
22 | /* Ugly, ugly, ugly! BASE_BAUD defined here to keep 8250.c happy. */ | ||
23 | #if !defined(BASE_BAUD) | ||
24 | #define BASE_BAUD (0) /* dummy value; not used */ | ||
25 | #endif | ||
26 | |||
27 | /* Device type enumeration for platform bus definitions */ | ||
28 | #ifndef __ASSEMBLY__ | ||
29 | enum ppc_sys_devices { | ||
30 | VIRTEX_UART, NUM_PPC_SYS_DEVS, | ||
31 | }; | ||
32 | #endif | ||
33 | |||
34 | #endif /* __ASM_VIRTEX_H__ */ | ||
35 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/walnut.c b/arch/ppc/platforms/4xx/walnut.c index 74cb33182d9f..6bd77902b9a4 100644 --- a/arch/ppc/platforms/4xx/walnut.c +++ b/arch/ppc/platforms/4xx/walnut.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/walnut.c | ||
3 | * | ||
4 | * Architecture- / platform-specific boot-time initialization code for | 2 | * Architecture- / platform-specific boot-time initialization code for |
5 | * IBM PowerPC 4xx based boards. Adapted from original | 3 | * IBM PowerPC 4xx based boards. Adapted from original |
6 | * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek | 4 | * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek |
diff --git a/arch/ppc/platforms/4xx/walnut.h b/arch/ppc/platforms/4xx/walnut.h index dcf2691698c0..f13a577f0a41 100644 --- a/arch/ppc/platforms/4xx/walnut.h +++ b/arch/ppc/platforms/4xx/walnut.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/walnut.h | ||
3 | * | ||
4 | * Walnut board definitions | 2 | * Walnut board definitions |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/4xx/xilinx_ml300.c b/arch/ppc/platforms/4xx/xilinx_ml300.c index e90d97f64f76..d97a7f269f97 100644 --- a/arch/ppc/platforms/4xx/xilinx_ml300.c +++ b/arch/ppc/platforms/4xx/xilinx_ml300.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/xilinx_ml300.c | ||
3 | * | ||
4 | * Xilinx ML300 evaluation board initialization | 2 | * Xilinx ML300 evaluation board initialization |
5 | * | 3 | * |
6 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
@@ -17,12 +15,14 @@ | |||
17 | #include <linux/tty.h> | 15 | #include <linux/tty.h> |
18 | #include <linux/serial.h> | 16 | #include <linux/serial.h> |
19 | #include <linux/serial_core.h> | 17 | #include <linux/serial_core.h> |
18 | #include <linux/serial_8250.h> | ||
20 | #include <linux/serialP.h> | 19 | #include <linux/serialP.h> |
21 | #include <asm/io.h> | 20 | #include <asm/io.h> |
22 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
23 | #include <asm/ocp.h> | 22 | #include <asm/ppc_sys.h> |
24 | 23 | ||
25 | #include <platforms/4xx/virtex-ii_pro.h> /* for NR_SER_PORTS */ | 24 | #include <syslib/gen550.h> |
25 | #include <platforms/4xx/xparameters/xparameters.h> | ||
26 | 26 | ||
27 | /* | 27 | /* |
28 | * As an overview of how the following functions (platform_init, | 28 | * As an overview of how the following functions (platform_init, |
@@ -54,6 +54,22 @@ | |||
54 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c | 54 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c |
55 | */ | 55 | */ |
56 | 56 | ||
57 | /* Board specifications structures */ | ||
58 | struct ppc_sys_spec *cur_ppc_sys_spec; | ||
59 | struct ppc_sys_spec ppc_sys_specs[] = { | ||
60 | { | ||
61 | /* Only one entry, always assume the same design */ | ||
62 | .ppc_sys_name = "Xilinx ML300 Reference Design", | ||
63 | .mask = 0x00000000, | ||
64 | .value = 0x00000000, | ||
65 | .num_devices = 1, | ||
66 | .device_list = (enum ppc_sys_devices[]) | ||
67 | { | ||
68 | VIRTEX_UART, | ||
69 | }, | ||
70 | }, | ||
71 | }; | ||
72 | |||
57 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | 73 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) |
58 | 74 | ||
59 | static volatile unsigned *powerdown_base = | 75 | static volatile unsigned *powerdown_base = |
@@ -80,28 +96,39 @@ ml300_map_io(void) | |||
80 | #endif | 96 | #endif |
81 | } | 97 | } |
82 | 98 | ||
99 | /* Early serial support functions */ | ||
83 | static void __init | 100 | static void __init |
101 | ml300_early_serial_init(int num, struct plat_serial8250_port *pdata) | ||
102 | { | ||
103 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | ||
104 | struct uart_port serial_req; | ||
105 | |||
106 | memset(&serial_req, 0, sizeof(serial_req)); | ||
107 | serial_req.mapbase = pdata->mapbase; | ||
108 | serial_req.membase = pdata->membase; | ||
109 | serial_req.irq = pdata->irq; | ||
110 | serial_req.uartclk = pdata->uartclk; | ||
111 | serial_req.regshift = pdata->regshift; | ||
112 | serial_req.iotype = pdata->iotype; | ||
113 | serial_req.flags = pdata->flags; | ||
114 | gen550_init(num, &serial_req); | ||
115 | #endif | ||
116 | } | ||
117 | |||
118 | void __init | ||
84 | ml300_early_serial_map(void) | 119 | ml300_early_serial_map(void) |
85 | { | 120 | { |
86 | #ifdef CONFIG_SERIAL_8250 | 121 | #ifdef CONFIG_SERIAL_8250 |
87 | struct serial_state old_ports[] = { SERIAL_PORT_DFNS }; | 122 | struct plat_serial8250_port *pdata; |
88 | struct uart_port port; | 123 | int i = 0; |
89 | int i; | 124 | |
90 | 125 | pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(VIRTEX_UART); | |
91 | /* Setup ioremapped serial port access */ | 126 | while(pdata && pdata->flags) |
92 | for (i = 0; i < ARRAY_SIZE(old_ports); i++ ) { | 127 | { |
93 | memset(&port, 0, sizeof(port)); | 128 | pdata->membase = ioremap(pdata->mapbase, 0x100); |
94 | port.membase = ioremap((phys_addr_t)(old_ports[i].iomem_base), 16); | 129 | ml300_early_serial_init(i, pdata); |
95 | port.irq = old_ports[i].irq; | 130 | pdata++; |
96 | port.uartclk = old_ports[i].baud_base * 16; | 131 | i++; |
97 | port.regshift = old_ports[i].iomem_reg_shift; | ||
98 | port.iotype = UPIO_MEM; | ||
99 | port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; | ||
100 | port.line = i; | ||
101 | |||
102 | if (early_serial_setup(&port) != 0) { | ||
103 | printk("Early serial init of port %d failed\n", i); | ||
104 | } | ||
105 | } | 132 | } |
106 | #endif /* CONFIG_SERIAL_8250 */ | 133 | #endif /* CONFIG_SERIAL_8250 */ |
107 | } | 134 | } |
@@ -109,9 +136,8 @@ ml300_early_serial_map(void) | |||
109 | void __init | 136 | void __init |
110 | ml300_setup_arch(void) | 137 | ml300_setup_arch(void) |
111 | { | 138 | { |
112 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | ||
113 | |||
114 | ml300_early_serial_map(); | 139 | ml300_early_serial_map(); |
140 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | ||
115 | 141 | ||
116 | /* Identify the system */ | 142 | /* Identify the system */ |
117 | printk(KERN_INFO "Xilinx Virtex-II Pro port\n"); | 143 | printk(KERN_INFO "Xilinx Virtex-II Pro port\n"); |
@@ -131,6 +157,8 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
131 | { | 157 | { |
132 | ppc4xx_init(r3, r4, r5, r6, r7); | 158 | ppc4xx_init(r3, r4, r5, r6, r7); |
133 | 159 | ||
160 | identify_ppc_sys_by_id(mfspr(SPRN_PVR)); | ||
161 | |||
134 | ppc_md.setup_arch = ml300_setup_arch; | 162 | ppc_md.setup_arch = ml300_setup_arch; |
135 | ppc_md.setup_io_mappings = ml300_map_io; | 163 | ppc_md.setup_io_mappings = ml300_map_io; |
136 | ppc_md.init_IRQ = ml300_init_irq; | 164 | ppc_md.init_IRQ = ml300_init_irq; |
diff --git a/arch/ppc/platforms/4xx/xilinx_ml300.h b/arch/ppc/platforms/4xx/xilinx_ml300.h index f8c588412336..3d57332ba820 100644 --- a/arch/ppc/platforms/4xx/xilinx_ml300.h +++ b/arch/ppc/platforms/4xx/xilinx_ml300.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/xilinx_ml300.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx ML300 evaluation board | 2 | * Include file that defines the Xilinx ML300 evaluation board |
5 | * | 3 | * |
6 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
@@ -16,7 +14,7 @@ | |||
16 | #define __ASM_XILINX_ML300_H__ | 14 | #define __ASM_XILINX_ML300_H__ |
17 | 15 | ||
18 | /* ML300 has a Xilinx Virtex-II Pro processor */ | 16 | /* ML300 has a Xilinx Virtex-II Pro processor */ |
19 | #include <platforms/4xx/virtex-ii_pro.h> | 17 | #include <platforms/4xx/virtex.h> |
20 | 18 | ||
21 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
22 | 20 | ||
@@ -41,7 +39,7 @@ typedef struct board_info { | |||
41 | #define PPC4xx_ONB_IO_VADDR 0u | 39 | #define PPC4xx_ONB_IO_VADDR 0u |
42 | #define PPC4xx_ONB_IO_SIZE 0u | 40 | #define PPC4xx_ONB_IO_SIZE 0u |
43 | 41 | ||
44 | #define PPC4xx_MACHINE_NAME "Xilinx ML300" | 42 | #define PPC4xx_MACHINE_NAME "Xilinx ML300 Reference System" |
45 | 43 | ||
46 | #endif /* __ASM_XILINX_ML300_H__ */ | 44 | #endif /* __ASM_XILINX_ML300_H__ */ |
47 | #endif /* __KERNEL__ */ | 45 | #endif /* __KERNEL__ */ |
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.c b/arch/ppc/platforms/4xx/xilinx_ml403.c new file mode 100644 index 000000000000..4c0c7e4c1114 --- /dev/null +++ b/arch/ppc/platforms/4xx/xilinx_ml403.c | |||
@@ -0,0 +1,177 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/xilinx_ml403.c | ||
3 | * | ||
4 | * Xilinx ML403 evaluation board initialization | ||
5 | * | ||
6 | * Author: Grant Likely <grant.likely@secretlab.ca> | ||
7 | * | ||
8 | * 2005 (c) Secret Lab Technologies Ltd. | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | #include <linux/config.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/irq.h> | ||
19 | #include <linux/tty.h> | ||
20 | #include <linux/serial.h> | ||
21 | #include <linux/serial_core.h> | ||
22 | #include <linux/serial_8250.h> | ||
23 | #include <linux/serialP.h> | ||
24 | #include <asm/io.h> | ||
25 | #include <asm/machdep.h> | ||
26 | #include <asm/ppc_sys.h> | ||
27 | |||
28 | #include <syslib/gen550.h> | ||
29 | #include <platforms/4xx/xparameters/xparameters.h> | ||
30 | |||
31 | /* | ||
32 | * As an overview of how the following functions (platform_init, | ||
33 | * ml403_map_io, ml403_setup_arch and ml403_init_IRQ) fit into the | ||
34 | * kernel startup procedure, here's a call tree: | ||
35 | * | ||
36 | * start_here arch/ppc/kernel/head_4xx.S | ||
37 | * early_init arch/ppc/kernel/setup.c | ||
38 | * machine_init arch/ppc/kernel/setup.c | ||
39 | * platform_init this file | ||
40 | * ppc4xx_init arch/ppc/syslib/ppc4xx_setup.c | ||
41 | * parse_bootinfo | ||
42 | * find_bootinfo | ||
43 | * "setup some default ppc_md pointers" | ||
44 | * MMU_init arch/ppc/mm/init.c | ||
45 | * *ppc_md.setup_io_mappings == ml403_map_io this file | ||
46 | * ppc4xx_map_io arch/ppc/syslib/ppc4xx_setup.c | ||
47 | * start_kernel init/main.c | ||
48 | * setup_arch arch/ppc/kernel/setup.c | ||
49 | * #if defined(CONFIG_KGDB) | ||
50 | * *ppc_md.kgdb_map_scc() == gen550_kgdb_map_scc | ||
51 | * #endif | ||
52 | * *ppc_md.setup_arch == ml403_setup_arch this file | ||
53 | * ppc4xx_setup_arch arch/ppc/syslib/ppc4xx_setup.c | ||
54 | * ppc4xx_find_bridges arch/ppc/syslib/ppc405_pci.c | ||
55 | * init_IRQ arch/ppc/kernel/irq.c | ||
56 | * *ppc_md.init_IRQ == ml403_init_IRQ this file | ||
57 | * ppc4xx_init_IRQ arch/ppc/syslib/ppc4xx_setup.c | ||
58 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c | ||
59 | */ | ||
60 | |||
61 | /* Board specifications structures */ | ||
62 | struct ppc_sys_spec *cur_ppc_sys_spec; | ||
63 | struct ppc_sys_spec ppc_sys_specs[] = { | ||
64 | { | ||
65 | /* Only one entry, always assume the same design */ | ||
66 | .ppc_sys_name = "Xilinx ML403 Reference Design", | ||
67 | .mask = 0x00000000, | ||
68 | .value = 0x00000000, | ||
69 | .num_devices = 1, | ||
70 | .device_list = (enum ppc_sys_devices[]) | ||
71 | { | ||
72 | VIRTEX_UART, | ||
73 | }, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | ||
78 | |||
79 | static volatile unsigned *powerdown_base = | ||
80 | (volatile unsigned *) XPAR_POWER_0_POWERDOWN_BASEADDR; | ||
81 | |||
82 | static void | ||
83 | xilinx_power_off(void) | ||
84 | { | ||
85 | local_irq_disable(); | ||
86 | out_be32(powerdown_base, XPAR_POWER_0_POWERDOWN_VALUE); | ||
87 | while (1) ; | ||
88 | } | ||
89 | #endif | ||
90 | |||
91 | void __init | ||
92 | ml403_map_io(void) | ||
93 | { | ||
94 | ppc4xx_map_io(); | ||
95 | |||
96 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | ||
97 | powerdown_base = ioremap((unsigned long) powerdown_base, | ||
98 | XPAR_POWER_0_POWERDOWN_HIGHADDR - | ||
99 | XPAR_POWER_0_POWERDOWN_BASEADDR + 1); | ||
100 | #endif | ||
101 | } | ||
102 | |||
103 | /* Early serial support functions */ | ||
104 | static void __init | ||
105 | ml403_early_serial_init(int num, struct plat_serial8250_port *pdata) | ||
106 | { | ||
107 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | ||
108 | struct uart_port serial_req; | ||
109 | |||
110 | memset(&serial_req, 0, sizeof(serial_req)); | ||
111 | serial_req.mapbase = pdata->mapbase; | ||
112 | serial_req.membase = pdata->membase; | ||
113 | serial_req.irq = pdata->irq; | ||
114 | serial_req.uartclk = pdata->uartclk; | ||
115 | serial_req.regshift = pdata->regshift; | ||
116 | serial_req.iotype = pdata->iotype; | ||
117 | serial_req.flags = pdata->flags; | ||
118 | gen550_init(num, &serial_req); | ||
119 | #endif | ||
120 | } | ||
121 | |||
122 | void __init | ||
123 | ml403_early_serial_map(void) | ||
124 | { | ||
125 | #ifdef CONFIG_SERIAL_8250 | ||
126 | struct plat_serial8250_port *pdata; | ||
127 | int i = 0; | ||
128 | |||
129 | pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(VIRTEX_UART); | ||
130 | while(pdata && pdata->flags) | ||
131 | { | ||
132 | pdata->membase = ioremap(pdata->mapbase, 0x100); | ||
133 | ml403_early_serial_init(i, pdata); | ||
134 | pdata++; | ||
135 | i++; | ||
136 | } | ||
137 | #endif /* CONFIG_SERIAL_8250 */ | ||
138 | } | ||
139 | |||
140 | void __init | ||
141 | ml403_setup_arch(void) | ||
142 | { | ||
143 | ml403_early_serial_map(); | ||
144 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | ||
145 | |||
146 | /* Identify the system */ | ||
147 | printk(KERN_INFO "Xilinx ML403 Reference System (Virtex-4 FX)\n"); | ||
148 | } | ||
149 | |||
150 | /* Called after board_setup_irq from ppc4xx_init_IRQ(). */ | ||
151 | void __init | ||
152 | ml403_init_irq(void) | ||
153 | { | ||
154 | ppc4xx_init_IRQ(); | ||
155 | } | ||
156 | |||
157 | void __init | ||
158 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
159 | unsigned long r6, unsigned long r7) | ||
160 | { | ||
161 | ppc4xx_init(r3, r4, r5, r6, r7); | ||
162 | |||
163 | identify_ppc_sys_by_id(mfspr(SPRN_PVR)); | ||
164 | |||
165 | ppc_md.setup_arch = ml403_setup_arch; | ||
166 | ppc_md.setup_io_mappings = ml403_map_io; | ||
167 | ppc_md.init_IRQ = ml403_init_irq; | ||
168 | |||
169 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | ||
170 | ppc_md.power_off = xilinx_power_off; | ||
171 | #endif | ||
172 | |||
173 | #ifdef CONFIG_KGDB | ||
174 | ppc_md.early_serial_map = ml403_early_serial_map; | ||
175 | #endif | ||
176 | } | ||
177 | |||
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.h b/arch/ppc/platforms/4xx/xilinx_ml403.h new file mode 100644 index 000000000000..473596959902 --- /dev/null +++ b/arch/ppc/platforms/4xx/xilinx_ml403.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/xilinx_ml403.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx ML403 reference design | ||
5 | * | ||
6 | * Author: Grant Likely <grant.likely@secretlab.ca> | ||
7 | * | ||
8 | * 2005 (c) Secret Lab Technologies Ltd. | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | #ifdef __KERNEL__ | ||
17 | #ifndef __ASM_XILINX_ML403_H__ | ||
18 | #define __ASM_XILINX_ML403_H__ | ||
19 | |||
20 | /* ML403 has a Xilinx Virtex-4 FPGA with a PPC405 hard core */ | ||
21 | #include <platforms/4xx/virtex.h> | ||
22 | |||
23 | #ifndef __ASSEMBLY__ | ||
24 | |||
25 | #include <linux/types.h> | ||
26 | |||
27 | typedef struct board_info { | ||
28 | unsigned int bi_memsize; /* DRAM installed, in bytes */ | ||
29 | unsigned char bi_enetaddr[6]; /* Local Ethernet MAC address */ | ||
30 | unsigned int bi_intfreq; /* Processor speed, in Hz */ | ||
31 | unsigned int bi_busfreq; /* PLB Bus speed, in Hz */ | ||
32 | unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */ | ||
33 | } bd_t; | ||
34 | |||
35 | /* Some 4xx parts use a different timebase frequency from the internal clock. | ||
36 | */ | ||
37 | #define bi_tbfreq bi_intfreq | ||
38 | |||
39 | #endif /* !__ASSEMBLY__ */ | ||
40 | |||
41 | /* We don't need anything mapped. Size of zero will accomplish that. */ | ||
42 | #define PPC4xx_ONB_IO_PADDR 0u | ||
43 | #define PPC4xx_ONB_IO_VADDR 0u | ||
44 | #define PPC4xx_ONB_IO_SIZE 0u | ||
45 | |||
46 | #define PPC4xx_MACHINE_NAME "Xilinx ML403 Reference Design" | ||
47 | |||
48 | #endif /* __ASM_XILINX_ML403_H__ */ | ||
49 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters.h b/arch/ppc/platforms/4xx/xparameters/xparameters.h new file mode 100644 index 000000000000..4cf21f256356 --- /dev/null +++ b/arch/ppc/platforms/4xx/xparameters/xparameters.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * include/asm-ppc/xparameters.h | ||
3 | * | ||
4 | * This file includes the correct xparameters.h for the CONFIG'ed board plus | ||
5 | * fixups to translate board specific XPAR values to a common set of names | ||
6 | * | ||
7 | * Author: MontaVista Software, Inc. | ||
8 | * source@mvista.com | ||
9 | * | ||
10 | * 2004 (c) MontaVista Software, Inc. This file is licensed under the terms | ||
11 | * of the GNU General Public License version 2. This program is licensed | ||
12 | * "as is" without any warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #include <linux/config.h> | ||
16 | |||
17 | #if defined(CONFIG_XILINX_ML300) | ||
18 | #include "xparameters_ml300.h" | ||
19 | #elif defined(CONFIG_XILINX_ML403) | ||
20 | #include "xparameters_ml403.h" | ||
21 | #else | ||
22 | /* Add other board xparameter includes here before the #else */ | ||
23 | #error No xparameters_*.h file included | ||
24 | #endif | ||
25 | |||
26 | #ifndef SERIAL_PORT_DFNS | ||
27 | /* zImage serial port definitions */ | ||
28 | #define RS_TABLE_SIZE 1 | ||
29 | #define SERIAL_PORT_DFNS { \ | ||
30 | .baud_base = XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16, \ | ||
31 | .irq = XPAR_INTC_0_UARTNS550_0_VEC_ID, \ | ||
32 | .flags = ASYNC_BOOT_AUTOCONF, \ | ||
33 | .iomem_base = (u8 *)XPAR_UARTNS550_0_BASEADDR + 3, \ | ||
34 | .iomem_reg_shift = 2, \ | ||
35 | .io_type = SERIAL_IO_MEM, \ | ||
36 | }, | ||
37 | #endif | ||
diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h b/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h new file mode 100644 index 000000000000..5cacdcb3964d --- /dev/null +++ b/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h | |||
@@ -0,0 +1,243 @@ | |||
1 | |||
2 | /******************************************************************* | ||
3 | * | ||
4 | * CAUTION: This file is automatically generated by libgen. | ||
5 | * Version: Xilinx EDK 7.1.2 EDK_H.12.5.1 | ||
6 | * DO NOT EDIT. | ||
7 | * | ||
8 | * Copyright (c) 2005 Xilinx, Inc. All rights reserved. | ||
9 | * | ||
10 | * Description: Driver parameters | ||
11 | * | ||
12 | *******************************************************************/ | ||
13 | |||
14 | #define XPAR_PLB_BRAM_IF_CNTLR_0_BASEADDR 0xFFFF0000 | ||
15 | #define XPAR_PLB_BRAM_IF_CNTLR_0_HIGHADDR 0xFFFFFFFF | ||
16 | |||
17 | /******************************************************************/ | ||
18 | |||
19 | #define XPAR_OPB_EMC_0_MEM0_BASEADDR 0x20000000 | ||
20 | #define XPAR_OPB_EMC_0_MEM0_HIGHADDR 0x200FFFFF | ||
21 | #define XPAR_OPB_EMC_0_MEM1_BASEADDR 0x28000000 | ||
22 | #define XPAR_OPB_EMC_0_MEM1_HIGHADDR 0x287FFFFF | ||
23 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR 0xA6000000 | ||
24 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_HIGHADDR 0xA60000FF | ||
25 | #define XPAR_OPB_EMC_USB_0_MEM0_BASEADDR 0xA5000000 | ||
26 | #define XPAR_OPB_EMC_USB_0_MEM0_HIGHADDR 0xA50000FF | ||
27 | #define XPAR_PLB_DDR_0_MEM0_BASEADDR 0x00000000 | ||
28 | #define XPAR_PLB_DDR_0_MEM0_HIGHADDR 0x0FFFFFFF | ||
29 | |||
30 | /******************************************************************/ | ||
31 | |||
32 | #define XPAR_XEMAC_NUM_INSTANCES 1 | ||
33 | #define XPAR_OPB_ETHERNET_0_BASEADDR 0x60000000 | ||
34 | #define XPAR_OPB_ETHERNET_0_HIGHADDR 0x60003FFF | ||
35 | #define XPAR_OPB_ETHERNET_0_DEVICE_ID 0 | ||
36 | #define XPAR_OPB_ETHERNET_0_ERR_COUNT_EXIST 1 | ||
37 | #define XPAR_OPB_ETHERNET_0_DMA_PRESENT 1 | ||
38 | #define XPAR_OPB_ETHERNET_0_MII_EXIST 1 | ||
39 | |||
40 | /******************************************************************/ | ||
41 | |||
42 | #define XPAR_XUARTNS550_NUM_INSTANCES 1 | ||
43 | #define XPAR_XUARTNS550_CLOCK_HZ 100000000 | ||
44 | #define XPAR_OPB_UART16550_0_BASEADDR 0xA0000000 | ||
45 | #define XPAR_OPB_UART16550_0_HIGHADDR 0xA0001FFF | ||
46 | #define XPAR_OPB_UART16550_0_DEVICE_ID 0 | ||
47 | |||
48 | /******************************************************************/ | ||
49 | |||
50 | #define XPAR_XGPIO_NUM_INSTANCES 3 | ||
51 | #define XPAR_OPB_GPIO_0_BASEADDR 0x90000000 | ||
52 | #define XPAR_OPB_GPIO_0_HIGHADDR 0x900001FF | ||
53 | #define XPAR_OPB_GPIO_0_DEVICE_ID 0 | ||
54 | #define XPAR_OPB_GPIO_0_INTERRUPT_PRESENT 0 | ||
55 | #define XPAR_OPB_GPIO_0_IS_DUAL 1 | ||
56 | #define XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR 0x90001000 | ||
57 | #define XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR 0x900011FF | ||
58 | #define XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID 1 | ||
59 | #define XPAR_OPB_GPIO_EXP_HDR_0_INTERRUPT_PRESENT 0 | ||
60 | #define XPAR_OPB_GPIO_EXP_HDR_0_IS_DUAL 1 | ||
61 | #define XPAR_OPB_GPIO_CHAR_LCD_0_BASEADDR 0x90002000 | ||
62 | #define XPAR_OPB_GPIO_CHAR_LCD_0_HIGHADDR 0x900021FF | ||
63 | #define XPAR_OPB_GPIO_CHAR_LCD_0_DEVICE_ID 2 | ||
64 | #define XPAR_OPB_GPIO_CHAR_LCD_0_INTERRUPT_PRESENT 0 | ||
65 | #define XPAR_OPB_GPIO_CHAR_LCD_0_IS_DUAL 0 | ||
66 | |||
67 | /******************************************************************/ | ||
68 | |||
69 | #define XPAR_XPS2_NUM_INSTANCES 2 | ||
70 | #define XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_0 0 | ||
71 | #define XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_0 0xA9000000 | ||
72 | #define XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_0 (0xA9000000+0x3F) | ||
73 | #define XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_1 1 | ||
74 | #define XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_1 (0xA9000000+0x1000) | ||
75 | #define XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_1 (0xA9000000+0x103F) | ||
76 | |||
77 | /******************************************************************/ | ||
78 | |||
79 | #define XPAR_XIIC_NUM_INSTANCES 1 | ||
80 | #define XPAR_OPB_IIC_0_BASEADDR 0xA8000000 | ||
81 | #define XPAR_OPB_IIC_0_HIGHADDR 0xA80001FF | ||
82 | #define XPAR_OPB_IIC_0_DEVICE_ID 0 | ||
83 | #define XPAR_OPB_IIC_0_TEN_BIT_ADR 0 | ||
84 | #define XPAR_OPB_IIC_0_GPO_WIDTH 1 | ||
85 | |||
86 | /******************************************************************/ | ||
87 | |||
88 | #define XPAR_INTC_MAX_NUM_INTR_INPUTS 10 | ||
89 | #define XPAR_XINTC_HAS_IPR 1 | ||
90 | #define XPAR_XINTC_USE_DCR 0 | ||
91 | #define XPAR_XINTC_NUM_INSTANCES 1 | ||
92 | #define XPAR_OPB_INTC_0_BASEADDR 0xD1000FC0 | ||
93 | #define XPAR_OPB_INTC_0_HIGHADDR 0xD1000FDF | ||
94 | #define XPAR_OPB_INTC_0_DEVICE_ID 0 | ||
95 | #define XPAR_OPB_INTC_0_KIND_OF_INTR 0x00000000 | ||
96 | |||
97 | /******************************************************************/ | ||
98 | |||
99 | #define XPAR_INTC_SINGLE_BASEADDR 0xD1000FC0 | ||
100 | #define XPAR_INTC_SINGLE_HIGHADDR 0xD1000FDF | ||
101 | #define XPAR_INTC_SINGLE_DEVICE_ID XPAR_OPB_INTC_0_DEVICE_ID | ||
102 | #define XPAR_OPB_ETHERNET_0_IP2INTC_IRPT_MASK 0X000001 | ||
103 | #define XPAR_OPB_INTC_0_OPB_ETHERNET_0_IP2INTC_IRPT_INTR 0 | ||
104 | #define XPAR_SYSTEM_USB_HPI_INT_MASK 0X000002 | ||
105 | #define XPAR_OPB_INTC_0_SYSTEM_USB_HPI_INT_INTR 1 | ||
106 | #define XPAR_MISC_LOGIC_0_PHY_MII_INT_MASK 0X000004 | ||
107 | #define XPAR_OPB_INTC_0_MISC_LOGIC_0_PHY_MII_INT_INTR 2 | ||
108 | #define XPAR_OPB_SYSACE_0_SYSACE_IRQ_MASK 0X000008 | ||
109 | #define XPAR_OPB_INTC_0_OPB_SYSACE_0_SYSACE_IRQ_INTR 3 | ||
110 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_MASK 0X000010 | ||
111 | #define XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_INTR 4 | ||
112 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_MASK 0X000020 | ||
113 | #define XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_INTR 5 | ||
114 | #define XPAR_OPB_IIC_0_IP2INTC_IRPT_MASK 0X000040 | ||
115 | #define XPAR_OPB_INTC_0_OPB_IIC_0_IP2INTC_IRPT_INTR 6 | ||
116 | #define XPAR_OPB_PS2_DUAL_REF_0_SYS_INTR2_MASK 0X000080 | ||
117 | #define XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR2_INTR 7 | ||
118 | #define XPAR_OPB_PS2_DUAL_REF_0_SYS_INTR1_MASK 0X000100 | ||
119 | #define XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR1_INTR 8 | ||
120 | #define XPAR_OPB_UART16550_0_IP2INTC_IRPT_MASK 0X000200 | ||
121 | #define XPAR_OPB_INTC_0_OPB_UART16550_0_IP2INTC_IRPT_INTR 9 | ||
122 | |||
123 | /******************************************************************/ | ||
124 | |||
125 | #define XPAR_XTFT_NUM_INSTANCES 1 | ||
126 | #define XPAR_PLB_TFT_CNTLR_REF_0_DCR_BASEADDR 0xD0000200 | ||
127 | #define XPAR_PLB_TFT_CNTLR_REF_0_DCR_HIGHADDR 0xD0000207 | ||
128 | #define XPAR_PLB_TFT_CNTLR_REF_0_DEVICE_ID 0 | ||
129 | |||
130 | /******************************************************************/ | ||
131 | |||
132 | #define XPAR_XSYSACE_MEM_WIDTH 16 | ||
133 | #define XPAR_XSYSACE_NUM_INSTANCES 1 | ||
134 | #define XPAR_OPB_SYSACE_0_BASEADDR 0xCF000000 | ||
135 | #define XPAR_OPB_SYSACE_0_HIGHADDR 0xCF0001FF | ||
136 | #define XPAR_OPB_SYSACE_0_DEVICE_ID 0 | ||
137 | #define XPAR_OPB_SYSACE_0_MEM_WIDTH 16 | ||
138 | |||
139 | /******************************************************************/ | ||
140 | |||
141 | #define XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ 300000000 | ||
142 | |||
143 | /******************************************************************/ | ||
144 | |||
145 | |||
146 | /******************************************************************/ | ||
147 | |||
148 | /* Linux Redefines */ | ||
149 | |||
150 | /******************************************************************/ | ||
151 | |||
152 | #define XPAR_UARTNS550_0_BASEADDR (XPAR_OPB_UART16550_0_BASEADDR+0x1000) | ||
153 | #define XPAR_UARTNS550_0_HIGHADDR XPAR_OPB_UART16550_0_HIGHADDR | ||
154 | #define XPAR_UARTNS550_0_CLOCK_FREQ_HZ XPAR_XUARTNS550_CLOCK_HZ | ||
155 | #define XPAR_UARTNS550_0_DEVICE_ID XPAR_OPB_UART16550_0_DEVICE_ID | ||
156 | |||
157 | /******************************************************************/ | ||
158 | |||
159 | #define XPAR_INTC_0_BASEADDR XPAR_OPB_INTC_0_BASEADDR | ||
160 | #define XPAR_INTC_0_HIGHADDR XPAR_OPB_INTC_0_HIGHADDR | ||
161 | #define XPAR_INTC_0_KIND_OF_INTR XPAR_OPB_INTC_0_KIND_OF_INTR | ||
162 | #define XPAR_INTC_0_DEVICE_ID XPAR_OPB_INTC_0_DEVICE_ID | ||
163 | |||
164 | /******************************************************************/ | ||
165 | |||
166 | #define XPAR_INTC_0_EMAC_0_VEC_ID XPAR_OPB_INTC_0_OPB_ETHERNET_0_IP2INTC_IRPT_INTR | ||
167 | #define XPAR_INTC_0_SYSACE_0_VEC_ID XPAR_OPB_INTC_0_OPB_SYSACE_0_SYSACE_IRQ_INTR | ||
168 | #define XPAR_INTC_0_IIC_0_VEC_ID XPAR_OPB_INTC_0_OPB_IIC_0_IP2INTC_IRPT_INTR | ||
169 | #define XPAR_INTC_0_PS2_1_VEC_ID XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR2_INTR | ||
170 | #define XPAR_INTC_0_PS2_0_VEC_ID XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR1_INTR | ||
171 | #define XPAR_INTC_0_UARTNS550_0_VEC_ID XPAR_OPB_INTC_0_OPB_UART16550_0_IP2INTC_IRPT_INTR | ||
172 | |||
173 | /******************************************************************/ | ||
174 | |||
175 | #define XPAR_TFT_0_BASEADDR XPAR_PLB_TFT_CNTLR_REF_0_DCR_BASEADDR | ||
176 | |||
177 | /******************************************************************/ | ||
178 | |||
179 | #define XPAR_EMAC_0_BASEADDR XPAR_OPB_ETHERNET_0_BASEADDR | ||
180 | #define XPAR_EMAC_0_HIGHADDR XPAR_OPB_ETHERNET_0_HIGHADDR | ||
181 | #define XPAR_EMAC_0_DMA_PRESENT XPAR_OPB_ETHERNET_0_DMA_PRESENT | ||
182 | #define XPAR_EMAC_0_MII_EXIST XPAR_OPB_ETHERNET_0_MII_EXIST | ||
183 | #define XPAR_EMAC_0_ERR_COUNT_EXIST XPAR_OPB_ETHERNET_0_ERR_COUNT_EXIST | ||
184 | #define XPAR_EMAC_0_DEVICE_ID XPAR_OPB_ETHERNET_0_DEVICE_ID | ||
185 | |||
186 | /******************************************************************/ | ||
187 | |||
188 | #define XPAR_GPIO_0_BASEADDR XPAR_OPB_GPIO_0_BASEADDR_0 | ||
189 | #define XPAR_GPIO_0_HIGHADDR XPAR_OPB_GPIO_0_HIGHADDR_0 | ||
190 | #define XPAR_GPIO_0_DEVICE_ID XPAR_OPB_GPIO_0_DEVICE_ID_0 | ||
191 | #define XPAR_GPIO_1_BASEADDR XPAR_OPB_GPIO_0_BASEADDR_1 | ||
192 | #define XPAR_GPIO_1_HIGHADDR XPAR_OPB_GPIO_0_HIGHADDR_1 | ||
193 | #define XPAR_GPIO_1_DEVICE_ID XPAR_OPB_GPIO_0_DEVICE_ID_1 | ||
194 | #define XPAR_GPIO_2_BASEADDR XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR_0 | ||
195 | #define XPAR_GPIO_2_HIGHADDR XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR_0 | ||
196 | #define XPAR_GPIO_2_DEVICE_ID XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID_0 | ||
197 | #define XPAR_GPIO_3_BASEADDR XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR_1 | ||
198 | #define XPAR_GPIO_3_HIGHADDR XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR_1 | ||
199 | #define XPAR_GPIO_3_DEVICE_ID XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID_1 | ||
200 | #define XPAR_GPIO_4_BASEADDR XPAR_OPB_GPIO_CHAR_LCD_0_BASEADDR | ||
201 | #define XPAR_GPIO_4_HIGHADDR XPAR_OPB_GPIO_CHAR_LCD_0_HIGHADDR | ||
202 | #define XPAR_GPIO_4_DEVICE_ID XPAR_OPB_GPIO_CHAR_LCD_0_DEVICE_ID | ||
203 | |||
204 | /******************************************************************/ | ||
205 | |||
206 | #define XPAR_PS2_0_BASEADDR XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_0 | ||
207 | #define XPAR_PS2_0_HIGHADDR XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_0 | ||
208 | #define XPAR_PS2_0_DEVICE_ID XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_0 | ||
209 | #define XPAR_PS2_1_BASEADDR XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_1 | ||
210 | #define XPAR_PS2_1_HIGHADDR XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_1 | ||
211 | #define XPAR_PS2_1_DEVICE_ID XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_1 | ||
212 | |||
213 | /******************************************************************/ | ||
214 | |||
215 | #define XPAR_SYSACE_0_BASEADDR XPAR_OPB_SYSACE_0_BASEADDR | ||
216 | #define XPAR_SYSACE_0_HIGHADDR XPAR_OPB_SYSACE_0_HIGHADDR | ||
217 | #define XPAR_SYSACE_0_DEVICE_ID XPAR_OPB_SYSACE_0_DEVICE_ID | ||
218 | |||
219 | /******************************************************************/ | ||
220 | |||
221 | #define XPAR_IIC_0_BASEADDR XPAR_OPB_IIC_0_BASEADDR | ||
222 | #define XPAR_IIC_0_HIGHADDR XPAR_OPB_IIC_0_HIGHADDR | ||
223 | #define XPAR_IIC_0_TEN_BIT_ADR XPAR_OPB_IIC_0_TEN_BIT_ADR | ||
224 | #define XPAR_IIC_0_DEVICE_ID XPAR_OPB_IIC_0_DEVICE_ID | ||
225 | |||
226 | /******************************************************************/ | ||
227 | |||
228 | #define XPAR_PLB_CLOCK_FREQ_HZ 100000000 | ||
229 | #define XPAR_CORE_CLOCK_FREQ_HZ XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ | ||
230 | #define XPAR_DDR_0_SIZE 0x4000000 | ||
231 | |||
232 | /******************************************************************/ | ||
233 | |||
234 | #define XPAR_PERSISTENT_0_IIC_0_BASEADDR 0x00000400 | ||
235 | #define XPAR_PERSISTENT_0_IIC_0_HIGHADDR 0x000007FF | ||
236 | #define XPAR_PERSISTENT_0_IIC_0_EEPROMADDR 0xA0 | ||
237 | |||
238 | /******************************************************************/ | ||
239 | |||
240 | #define XPAR_PCI_0_CLOCK_FREQ_HZ 0 | ||
241 | |||
242 | /******************************************************************/ | ||
243 | |||
diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c index b065b8babcd3..f287dcdbffce 100644 --- a/arch/ppc/platforms/4xx/yucca.c +++ b/arch/ppc/platforms/4xx/yucca.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/yucca.c | ||
3 | * | ||
4 | * Yucca board specific routines | 2 | * Yucca board specific routines |
5 | * | 3 | * |
6 | * Roland Dreier <rolandd@cisco.com> (based on luan.c by Matt Porter) | 4 | * Roland Dreier <rolandd@cisco.com> (based on luan.c by Matt Porter) |
diff --git a/arch/ppc/platforms/4xx/yucca.h b/arch/ppc/platforms/4xx/yucca.h index 01a4afea1514..7ae23012237a 100644 --- a/arch/ppc/platforms/4xx/yucca.h +++ b/arch/ppc/platforms/4xx/yucca.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/yucca.h | ||
3 | * | ||
4 | * Yucca board definitions | 2 | * Yucca board definitions |
5 | * | 3 | * |
6 | * Roland Dreier <rolandd@cisco.com> (based on luan.h by Matt Porter) | 4 | * Roland Dreier <rolandd@cisco.com> (based on luan.h by Matt Porter) |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c index 1a659bbc1860..11626dd9090f 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.c +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc834x_sys.c | ||
3 | * | ||
4 | * MPC834x SYS board specific routines | 2 | * MPC834x SYS board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h index 2e514d316fb8..6727bbdc36ec 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.h +++ b/arch/ppc/platforms/83xx/mpc834x_sys.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc834x_sys.h | ||
3 | * | ||
4 | * MPC834X SYS common board definitions | 2 | * MPC834X SYS common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
@@ -25,7 +23,7 @@ | |||
25 | #define VIRT_IMMRBAR ((uint)0xfe000000) | 23 | #define VIRT_IMMRBAR ((uint)0xfe000000) |
26 | 24 | ||
27 | #define BCSR_PHYS_ADDR ((uint)0xf8000000) | 25 | #define BCSR_PHYS_ADDR ((uint)0xf8000000) |
28 | #define BCSR_SIZE ((uint)(128 * 1024)) | 26 | #define BCSR_SIZE ((uint)(32 * 1024)) |
29 | 27 | ||
30 | #define BCSR_MISC_REG2_OFF 0x07 | 28 | #define BCSR_MISC_REG2_OFF 0x07 |
31 | #define BCSR_MISC_REG2_PORESET 0x01 | 29 | #define BCSR_MISC_REG2_PORESET 0x01 |
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c index 408d64f18e1a..9b014df516b9 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.c +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc8540_ads.c | ||
3 | * | ||
4 | * MPC8540ADS board specific routines | 2 | * MPC8540ADS board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.h b/arch/ppc/platforms/85xx/mpc8540_ads.h index e48ca3a97397..0b5e7ff856f5 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.h +++ b/arch/ppc/platforms/85xx/mpc8540_ads.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc8540_ads.h | ||
3 | * | ||
4 | * MPC8540ADS board definitions | 2 | * MPC8540ADS board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc8555_cds.h b/arch/ppc/platforms/85xx/mpc8555_cds.h index 1a8e6c67355d..9754dbd5d18c 100644 --- a/arch/ppc/platforms/85xx/mpc8555_cds.h +++ b/arch/ppc/platforms/85xx/mpc8555_cds.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8555_cds.h | ||
3 | * | ||
4 | * MPC8555CDS board definitions | 2 | * MPC8555CDS board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c index 442c7ff195d3..0cb2e86470e2 100644 --- a/arch/ppc/platforms/85xx/mpc8560_ads.c +++ b/arch/ppc/platforms/85xx/mpc8560_ads.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc8560_ads.c | ||
3 | * | ||
4 | * MPC8560ADS board specific routines | 2 | * MPC8560ADS board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.h b/arch/ppc/platforms/85xx/mpc8560_ads.h index 143ae7eefa7c..c2247c21fc53 100644 --- a/arch/ppc/platforms/85xx/mpc8560_ads.h +++ b/arch/ppc/platforms/85xx/mpc8560_ads.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8560_ads.h | ||
3 | * | ||
4 | * MPC8540ADS board definitions | 2 | * MPC8540ADS board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c index 17ce48fe3503..8fd9d763f58d 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_ads_common.c | ||
3 | * | ||
4 | * MPC85xx ADS board common routines | 2 | * MPC85xx ADS board common routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h index 198a6a02cde8..de8d41aafe11 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_ads_common.h | ||
3 | * | ||
4 | * MPC85XX ADS common board definitions | 2 | * MPC85XX ADS common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index 1801ab392e22..c9e0aeeca3d8 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platform/85xx/mpc85xx_cds_common.c | ||
3 | * | ||
4 | * MPC85xx CDS board specific routines | 2 | * MPC85xx CDS board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h index 5b588cfd0e41..62df54f61ae3 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_cds_common.h | ||
3 | * | ||
4 | * MPC85xx CDS board definitions | 2 | * MPC85xx CDS board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c index 8a72221f816c..b73778ecf827 100644 --- a/arch/ppc/platforms/85xx/sbc8560.c +++ b/arch/ppc/platforms/85xx/sbc8560.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/sbc8560.c | ||
3 | * | ||
4 | * Wind River SBC8560 board specific routines | 2 | * Wind River SBC8560 board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala | 4 | * Maintainer: Kumar Gala |
diff --git a/arch/ppc/platforms/85xx/sbc8560.h b/arch/ppc/platforms/85xx/sbc8560.h index 5e1b00c77da5..44ffaa2d2c87 100644 --- a/arch/ppc/platforms/85xx/sbc8560.h +++ b/arch/ppc/platforms/85xx/sbc8560.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/sbc8560.h | ||
3 | * | ||
4 | * Wind River SBC8560 board definitions | 2 | * Wind River SBC8560 board definitions |
5 | * | 3 | * |
6 | * Copyright 2003 Motorola Inc. | 4 | * Copyright 2003 Motorola Inc. |
diff --git a/arch/ppc/platforms/85xx/sbc85xx.c b/arch/ppc/platforms/85xx/sbc85xx.c index c02f110219f5..d3ff280510ff 100644 --- a/arch/ppc/platforms/85xx/sbc85xx.c +++ b/arch/ppc/platforms/85xx/sbc85xx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platform/85xx/sbc85xx.c | ||
3 | * | ||
4 | * WindRiver PowerQUICC III SBC85xx board common routines | 2 | * WindRiver PowerQUICC III SBC85xx board common routines |
5 | * | 3 | * |
6 | * Copyright 2002, 2003 Motorola Inc. | 4 | * Copyright 2002, 2003 Motorola Inc. |
diff --git a/arch/ppc/platforms/85xx/sbc85xx.h b/arch/ppc/platforms/85xx/sbc85xx.h index 7af93c691a6b..5dd8b6a98c9b 100644 --- a/arch/ppc/platforms/85xx/sbc85xx.h +++ b/arch/ppc/platforms/85xx/sbc85xx.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/sbc85xx.h | ||
3 | * | ||
4 | * WindRiver PowerQUICC III SBC85xx common board definitions | 2 | * WindRiver PowerQUICC III SBC85xx common board definitions |
5 | * | 3 | * |
6 | * Copyright 2003 Motorola Inc. | 4 | * Copyright 2003 Motorola Inc. |
diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c index 061bb7cf2d9a..8d7baa9a397a 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.c +++ b/arch/ppc/platforms/85xx/stx_gp3.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/stx_gp3.c | ||
3 | * | ||
4 | * STx GP3 board specific routines | 2 | * STx GP3 board specific routines |
5 | * | 3 | * |
6 | * Dan Malek <dan@embeddededge.com> | 4 | * Dan Malek <dan@embeddededge.com> |
diff --git a/arch/ppc/platforms/85xx/stx_gp3.h b/arch/ppc/platforms/85xx/stx_gp3.h index 2f25b5195152..3f71f8f59370 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.h +++ b/arch/ppc/platforms/85xx/stx_gp3.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/stx8560_gp3.h | ||
3 | * | ||
4 | * STx GP3 board definitions | 2 | * STx GP3 board definitions |
5 | * | 3 | * |
6 | * Dan Malek (dan@embeddededge.com) | 4 | * Dan Malek (dan@embeddededge.com) |
diff --git a/arch/ppc/platforms/85xx/tqm85xx.c b/arch/ppc/platforms/85xx/tqm85xx.c index a5e38ba62732..00af132262b3 100644 --- a/arch/ppc/platforms/85xx/tqm85xx.c +++ b/arch/ppc/platforms/85xx/tqm85xx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/tqm85xx.c | ||
3 | * | ||
4 | * TQM85xx (40/41/55/60) board specific routines | 2 | * TQM85xx (40/41/55/60) board specific routines |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/85xx/tqm85xx.h b/arch/ppc/platforms/85xx/tqm85xx.h index 3775eb363fde..612d80504f9b 100644 --- a/arch/ppc/platforms/85xx/tqm85xx.h +++ b/arch/ppc/platforms/85xx/tqm85xx.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/tqm85xx.h | ||
3 | * | ||
4 | * TQM85xx (40/41/55/60) board definitions | 2 | * TQM85xx (40/41/55/60) board definitions |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile index 51430e294b32..e8b91a33ce91 100644 --- a/arch/ppc/platforms/Makefile +++ b/arch/ppc/platforms/Makefile | |||
@@ -37,6 +37,9 @@ obj-$(CONFIG_SBC82xx) += sbc82xx.o | |||
37 | obj-$(CONFIG_SPRUCE) += spruce.o | 37 | obj-$(CONFIG_SPRUCE) += spruce.o |
38 | obj-$(CONFIG_LITE5200) += lite5200.o | 38 | obj-$(CONFIG_LITE5200) += lite5200.o |
39 | obj-$(CONFIG_EV64360) += ev64360.o | 39 | obj-$(CONFIG_EV64360) += ev64360.o |
40 | obj-$(CONFIG_MPC86XADS) += mpc866ads_setup.o | ||
41 | obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o | ||
42 | obj-$(CONFIG_ADS8272) += mpc8272ads_setup.o | ||
40 | 43 | ||
41 | ifeq ($(CONFIG_SMP),y) | 44 | ifeq ($(CONFIG_SMP),y) |
42 | obj-$(CONFIG_PPC_CHRP) += chrp_smp.o | 45 | obj-$(CONFIG_PPC_CHRP) += chrp_smp.o |
diff --git a/arch/ppc/platforms/apus_setup.c b/arch/ppc/platforms/apus_setup.c index c42c50073da5..fe0cdc04d436 100644 --- a/arch/ppc/platforms/apus_setup.c +++ b/arch/ppc/platforms/apus_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/apus_setup.c | ||
3 | * | ||
4 | * Copyright (C) 1998, 1999 Jesper Skov | 2 | * Copyright (C) 1998, 1999 Jesper Skov |
5 | * | 3 | * |
6 | * Basically what is needed to replace functionality found in | 4 | * Basically what is needed to replace functionality found in |
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c index aefcc0e7be57..f324f757cae1 100644 --- a/arch/ppc/platforms/chestnut.c +++ b/arch/ppc/platforms/chestnut.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chestnut.c | ||
3 | * | ||
4 | * Board setup routines for IBM Chestnut | 2 | * Board setup routines for IBM Chestnut |
5 | * | 3 | * |
6 | * Author: <source@mvista.com> | 4 | * Author: <source@mvista.com> |
diff --git a/arch/ppc/platforms/chestnut.h b/arch/ppc/platforms/chestnut.h index 0400b2be40ab..e00fd9f8bbd0 100644 --- a/arch/ppc/platforms/chestnut.h +++ b/arch/ppc/platforms/chestnut.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chestnut.h | ||
3 | * | ||
4 | * Definitions for IBM 750FXGX Eval (Chestnut) | 2 | * Definitions for IBM 750FXGX Eval (Chestnut) |
5 | * | 3 | * |
6 | * Author: <source@mvista.com> | 4 | * Author: <source@mvista.com> |
diff --git a/arch/ppc/platforms/chrp_pegasos_eth.c b/arch/ppc/platforms/chrp_pegasos_eth.c index 108a6e265185..9305c8aa1373 100644 --- a/arch/ppc/platforms/chrp_pegasos_eth.c +++ b/arch/ppc/platforms/chrp_pegasos_eth.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chrp_pegasos_eth.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> | 2 | * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> |
5 | * Thanks to : | 3 | * Thanks to : |
6 | * Dale Farnsworth <dale@farnsworth.org> | 4 | * Dale Farnsworth <dale@farnsworth.org> |
diff --git a/arch/ppc/platforms/chrp_setup.c b/arch/ppc/platforms/chrp_setup.c index 48996b787378..f9fd3f4f8e2e 100644 --- a/arch/ppc/platforms/chrp_setup.c +++ b/arch/ppc/platforms/chrp_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/platforms/chrp_time.c b/arch/ppc/platforms/chrp_time.c index 57753a55b580..c8627770af13 100644 --- a/arch/ppc/platforms/chrp_time.c +++ b/arch/ppc/platforms/chrp_time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chrp_time.c | ||
3 | * | ||
4 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds | 2 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds |
5 | * | 3 | * |
6 | * Adapted for PowerPC (PReP) by Gary Thomas | 4 | * Adapted for PowerPC (PReP) by Gary Thomas |
diff --git a/arch/ppc/platforms/cpci690.c b/arch/ppc/platforms/cpci690.c index 6ca7bcac9474..790475c22fd7 100644 --- a/arch/ppc/platforms/cpci690.c +++ b/arch/ppc/platforms/cpci690.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/cpci690.c | ||
3 | * | ||
4 | * Board setup routines for the Force CPCI690 board. | 2 | * Board setup routines for the Force CPCI690 board. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
@@ -290,7 +288,7 @@ cpci690_fixup_mpsc_pdata(struct platform_device *pdev) | |||
290 | pdata->brg_clk_freq = cpci690_get_bus_freq(); | 288 | pdata->brg_clk_freq = cpci690_get_bus_freq(); |
291 | } | 289 | } |
292 | 290 | ||
293 | static int __init | 291 | static int |
294 | cpci690_platform_notify(struct device *dev) | 292 | cpci690_platform_notify(struct device *dev) |
295 | { | 293 | { |
296 | static struct { | 294 | static struct { |
diff --git a/arch/ppc/platforms/cpci690.h b/arch/ppc/platforms/cpci690.h index 49584c9cedf3..0fa5a4c31b67 100644 --- a/arch/ppc/platforms/cpci690.h +++ b/arch/ppc/platforms/cpci690.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/cpci690.h | ||
3 | * | ||
4 | * Definitions for Force CPCI690 | 2 | * Definitions for Force CPCI690 |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c index ffde8f6f6302..31e8e21e1d5c 100644 --- a/arch/ppc/platforms/ev64260.c +++ b/arch/ppc/platforms/ev64260.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ev64260.c | ||
3 | * | ||
4 | * Board setup routines for the Marvell/Galileo EV-64260-BP Evaluation Board. | 2 | * Board setup routines for the Marvell/Galileo EV-64260-BP Evaluation Board. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
@@ -416,7 +414,7 @@ ev64260_fixup_mpsc_pdata(struct platform_device *pdev) | |||
416 | return; | 414 | return; |
417 | } | 415 | } |
418 | 416 | ||
419 | static int __init | 417 | static int |
420 | ev64260_platform_notify(struct device *dev) | 418 | ev64260_platform_notify(struct device *dev) |
421 | { | 419 | { |
422 | static struct { | 420 | static struct { |
diff --git a/arch/ppc/platforms/ev64260.h b/arch/ppc/platforms/ev64260.h index bedffced3a02..44d90d56745a 100644 --- a/arch/ppc/platforms/ev64260.h +++ b/arch/ppc/platforms/ev64260.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ev64260.h | ||
3 | * | ||
4 | * Definitions for Marvell/Galileo EV-64260-BP Evaluation Board. | 2 | * Definitions for Marvell/Galileo EV-64260-BP Evaluation Board. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/platforms/ev64360.c b/arch/ppc/platforms/ev64360.c index b9d844f88c2b..104ac9b16e8b 100644 --- a/arch/ppc/platforms/ev64360.c +++ b/arch/ppc/platforms/ev64360.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ev64360.c | ||
3 | * | ||
4 | * Board setup routines for the Marvell EV-64360-BP Evaluation Board. | 2 | * Board setup routines for the Marvell EV-64360-BP Evaluation Board. |
5 | * | 3 | * |
6 | * Author: Lee Nicks <allinux@gmail.com> | 4 | * Author: Lee Nicks <allinux@gmail.com> |
@@ -300,7 +298,7 @@ ev64360_fixup_eth_pdata(struct platform_device *pdev) | |||
300 | } | 298 | } |
301 | #endif | 299 | #endif |
302 | 300 | ||
303 | static int __init | 301 | static int |
304 | ev64360_platform_notify(struct device *dev) | 302 | ev64360_platform_notify(struct device *dev) |
305 | { | 303 | { |
306 | static struct { | 304 | static struct { |
diff --git a/arch/ppc/platforms/ev64360.h b/arch/ppc/platforms/ev64360.h index 68eabe490397..b30f4722690a 100644 --- a/arch/ppc/platforms/ev64360.h +++ b/arch/ppc/platforms/ev64360.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ev64360.h | ||
3 | * | ||
4 | * Definitions for Marvell EV-64360-BP Evaluation Board. | 2 | * Definitions for Marvell EV-64360-BP Evaluation Board. |
5 | * | 3 | * |
6 | * Author: Lee Nicks <allinux@gmail.com> | 4 | * Author: Lee Nicks <allinux@gmail.com> |
diff --git a/arch/ppc/platforms/fads.h b/arch/ppc/platforms/fads.h index a48fb8d723e4..e1c0b1b6dcb3 100644 --- a/arch/ppc/platforms/fads.h +++ b/arch/ppc/platforms/fads.h | |||
@@ -112,7 +112,7 @@ | |||
112 | 112 | ||
113 | /* CPM Ethernet through SCC1 or SCC2 */ | 113 | /* CPM Ethernet through SCC1 or SCC2 */ |
114 | 114 | ||
115 | #ifdef CONFIG_SCC1_ENET /* Probably 860 variant */ | 115 | #if defined(CONFIG_SCC1_ENET) || defined(CONFIG_MPC8xx_SECOND_ETH_SCC1) /* Probably 860 variant */ |
116 | /* Bits in parallel I/O port registers that have to be set/cleared | 116 | /* Bits in parallel I/O port registers that have to be set/cleared |
117 | * to configure the pins for SCC1 use. | 117 | * to configure the pins for SCC1 use. |
118 | * TCLK - CLK1, RCLK - CLK2. | 118 | * TCLK - CLK1, RCLK - CLK2. |
diff --git a/arch/ppc/platforms/gemini.h b/arch/ppc/platforms/gemini.h index 06de59248918..5528fd0a1216 100644 --- a/arch/ppc/platforms/gemini.h +++ b/arch/ppc/platforms/gemini.h | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/gemini.h | ||
3 | * | ||
4 | * | ||
5 | * Onboard registers and descriptions for Synergy Microsystems' | 2 | * Onboard registers and descriptions for Synergy Microsystems' |
6 | * "Gemini" boards. | 3 | * "Gemini" boards. |
7 | * | 4 | * |
diff --git a/arch/ppc/platforms/gemini_prom.S b/arch/ppc/platforms/gemini_prom.S index 8c5065d56505..b181f2108001 100644 --- a/arch/ppc/platforms/gemini_prom.S +++ b/arch/ppc/platforms/gemini_prom.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/gemini_prom.S | ||
3 | * | ||
4 | * Not really prom support code (yet), but sort of anti-prom code. The current | 2 | * Not really prom support code (yet), but sort of anti-prom code. The current |
5 | * bootloader does a number of things it shouldn't and doesn't do things that it | 3 | * bootloader does a number of things it shouldn't and doesn't do things that it |
6 | * should. The stuff in here is mainly a hodge-podge collection of setup code | 4 | * should. The stuff in here is mainly a hodge-podge collection of setup code |
diff --git a/arch/ppc/platforms/gemini_setup.c b/arch/ppc/platforms/gemini_setup.c index 729897c59033..0090ff154608 100644 --- a/arch/ppc/platforms/gemini_setup.c +++ b/arch/ppc/platforms/gemini_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/gemini_setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c index f945416960e9..75dc2ee87d2f 100644 --- a/arch/ppc/platforms/hdpu.c +++ b/arch/ppc/platforms/hdpu.c | |||
@@ -1,7 +1,4 @@ | |||
1 | |||
2 | /* | 1 | /* |
3 | * arch/ppc/platforms/hdpu_setup.c | ||
4 | * | ||
5 | * Board setup routines for the Sky Computers HDPU Compute Blade. | 2 | * Board setup routines for the Sky Computers HDPU Compute Blade. |
6 | * | 3 | * |
7 | * Written by Brian Waite <waite@skycomputers.com> | 4 | * Written by Brian Waite <waite@skycomputers.com> |
@@ -353,7 +350,7 @@ static void __init hdpu_fixup_cpustate_pdata(struct platform_device *pd) | |||
353 | } | 350 | } |
354 | #endif | 351 | #endif |
355 | 352 | ||
356 | static int __init hdpu_platform_notify(struct device *dev) | 353 | static int hdpu_platform_notify(struct device *dev) |
357 | { | 354 | { |
358 | static struct { | 355 | static struct { |
359 | char *bus_id; | 356 | char *bus_id; |
diff --git a/arch/ppc/platforms/hdpu.h b/arch/ppc/platforms/hdpu.h index 07c3cffb5c7b..f9e020b6970c 100644 --- a/arch/ppc/platforms/hdpu.h +++ b/arch/ppc/platforms/hdpu.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/hdpu.h | ||
3 | * | ||
4 | * Definitions for Sky Computers HDPU board. | 2 | * Definitions for Sky Computers HDPU board. |
5 | * | 3 | * |
6 | * Brian Waite <waite@skycomputers.com> | 4 | * Brian Waite <waite@skycomputers.com> |
diff --git a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c index 6e58e30ceed1..ad21280e8920 100644 --- a/arch/ppc/platforms/katana.c +++ b/arch/ppc/platforms/katana.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/katana.c | ||
3 | * | ||
4 | * Board setup routines for the Artesyn Katana cPCI boards. | 2 | * Board setup routines for the Artesyn Katana cPCI boards. |
5 | * | 3 | * |
6 | * Author: Tim Montgomery <timm@artesyncp.com> | 4 | * Author: Tim Montgomery <timm@artesyncp.com> |
@@ -598,7 +596,7 @@ katana_fixup_mv64xxx_pdata(struct platform_device *pdev) | |||
598 | } | 596 | } |
599 | #endif | 597 | #endif |
600 | 598 | ||
601 | static int __init | 599 | static int |
602 | katana_platform_notify(struct device *dev) | 600 | katana_platform_notify(struct device *dev) |
603 | { | 601 | { |
604 | static struct { | 602 | static struct { |
@@ -664,12 +662,11 @@ katana_setup_mtd(void) | |||
664 | 662 | ||
665 | ptbl_entries = (size >= (64*MB)) ? 6 : 4; | 663 | ptbl_entries = (size >= (64*MB)) ? 6 : 4; |
666 | 664 | ||
667 | if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition), | 665 | if ((ptbl = kcalloc(ptbl_entries, sizeof(struct mtd_partition), |
668 | GFP_KERNEL)) == NULL) { | 666 | GFP_KERNEL)) == NULL) { |
669 | printk(KERN_WARNING "Can't alloc MTD partition table\n"); | 667 | printk(KERN_WARNING "Can't alloc MTD partition table\n"); |
670 | return -ENOMEM; | 668 | return -ENOMEM; |
671 | } | 669 | } |
672 | memset(ptbl, 0, ptbl_entries * sizeof(struct mtd_partition)); | ||
673 | 670 | ||
674 | ptbl[0].name = "Monitor"; | 671 | ptbl[0].name = "Monitor"; |
675 | ptbl[0].size = KATANA_MTD_MONITOR_SIZE; | 672 | ptbl[0].size = KATANA_MTD_MONITOR_SIZE; |
diff --git a/arch/ppc/platforms/katana.h b/arch/ppc/platforms/katana.h index 597257eff2ec..0a9b036526b1 100644 --- a/arch/ppc/platforms/katana.h +++ b/arch/ppc/platforms/katana.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/katana.h | ||
3 | * | ||
4 | * Definitions for Artesyn Katana750i/3750 board. | 2 | * Definitions for Artesyn Katana750i/3750 board. |
5 | * | 3 | * |
6 | * Author: Tim Montgomery <timm@artesyncp.com> | 4 | * Author: Tim Montgomery <timm@artesyncp.com> |
diff --git a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c index 7ed52dc340c9..5171b53bccb5 100644 --- a/arch/ppc/platforms/lite5200.c +++ b/arch/ppc/platforms/lite5200.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/lite5200.c | ||
3 | * | ||
4 | * Platform support file for the Freescale LITE5200 based on MPC52xx. | 2 | * Platform support file for the Freescale LITE5200 based on MPC52xx. |
5 | * A maximum of this file should be moved to syslib/mpc52xx_????? | 3 | * A maximum of this file should be moved to syslib/mpc52xx_????? |
6 | * so that new platform based on MPC52xx need a minimal platform file | 4 | * so that new platform based on MPC52xx need a minimal platform file |
diff --git a/arch/ppc/platforms/lite5200.h b/arch/ppc/platforms/lite5200.h index c1de2aa47175..852a18e24d0b 100644 --- a/arch/ppc/platforms/lite5200.h +++ b/arch/ppc/platforms/lite5200.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/lite5200.h | ||
3 | * | ||
4 | * Definitions for Freescale LITE5200 : MPC52xx Standard Development | 2 | * Definitions for Freescale LITE5200 : MPC52xx Standard Development |
5 | * Platform board support | 3 | * Platform board support |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/lopec.c b/arch/ppc/platforms/lopec.c index 06d247c23b82..c6445a727ca3 100644 --- a/arch/ppc/platforms/lopec.c +++ b/arch/ppc/platforms/lopec.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/lopec.c | ||
3 | * | ||
4 | * Setup routines for the Motorola LoPEC. | 2 | * Setup routines for the Motorola LoPEC. |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/mpc8272ads_setup.c b/arch/ppc/platforms/mpc8272ads_setup.c new file mode 100644 index 000000000000..bc9b94f77e39 --- /dev/null +++ b/arch/ppc/platforms/mpc8272ads_setup.c | |||
@@ -0,0 +1,236 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/82xx/pq2ads_pd.c | ||
3 | * | ||
4 | * MPC82xx Board-specific PlatformDevice descriptions | ||
5 | * | ||
6 | * 2005 (c) MontaVista Software, Inc. | ||
7 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/device.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/fs_enet_pd.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | |||
22 | #include <asm/io.h> | ||
23 | #include <asm/mpc8260.h> | ||
24 | #include <asm/cpm2.h> | ||
25 | #include <asm/immap_cpm2.h> | ||
26 | #include <asm/irq.h> | ||
27 | #include <asm/ppc_sys.h> | ||
28 | #include <asm/ppcboot.h> | ||
29 | |||
30 | #include "pq2ads_pd.h" | ||
31 | |||
32 | static void init_fcc1_ioports(void); | ||
33 | static void init_fcc2_ioports(void); | ||
34 | |||
35 | static struct fs_mii_bus_info mii_bus_info = { | ||
36 | .method = fsmii_bitbang, | ||
37 | .id = 0, | ||
38 | .i.bitbang = { | ||
39 | .mdio_port = fsiop_portc, | ||
40 | .mdio_bit = 18, | ||
41 | .mdc_port = fsiop_portc, | ||
42 | .mdc_bit = 19, | ||
43 | .delay = 1, | ||
44 | }, | ||
45 | }; | ||
46 | |||
47 | static struct fs_platform_info mpc82xx_fcc1_pdata = { | ||
48 | .fs_no = fsid_fcc1, | ||
49 | .cp_page = CPM_CR_FCC1_PAGE, | ||
50 | .cp_block = CPM_CR_FCC1_SBLOCK, | ||
51 | .clk_trx = (PC_F1RXCLK | PC_F1TXCLK), | ||
52 | .clk_route = CMX1_CLK_ROUTE, | ||
53 | .clk_mask = CMX1_CLK_MASK, | ||
54 | .init_ioports = init_fcc1_ioports, | ||
55 | |||
56 | .phy_addr = 0, | ||
57 | #ifdef PHY_INTERRUPT | ||
58 | .phy_irq = PHY_INTERRUPT, | ||
59 | #else | ||
60 | .phy_irq = -1; | ||
61 | #endif | ||
62 | .mem_offset = FCC1_MEM_OFFSET, | ||
63 | .bus_info = &mii_bus_info, | ||
64 | .rx_ring = 32, | ||
65 | .tx_ring = 32, | ||
66 | .rx_copybreak = 240, | ||
67 | .use_napi = 0, | ||
68 | .napi_weight = 17, | ||
69 | }; | ||
70 | |||
71 | static struct fs_platform_info mpc82xx_fcc2_pdata = { | ||
72 | .fs_no = fsid_fcc2, | ||
73 | .cp_page = CPM_CR_FCC2_PAGE, | ||
74 | .cp_block = CPM_CR_FCC2_SBLOCK, | ||
75 | .clk_trx = (PC_F2RXCLK | PC_F2TXCLK), | ||
76 | .clk_route = CMX2_CLK_ROUTE, | ||
77 | .clk_mask = CMX2_CLK_MASK, | ||
78 | .init_ioports = init_fcc2_ioports, | ||
79 | |||
80 | .phy_addr = 3, | ||
81 | #ifdef PHY_INTERRUPT | ||
82 | .phy_irq = PHY_INTERRUPT, | ||
83 | #else | ||
84 | .phy_irq = -1; | ||
85 | #endif | ||
86 | .mem_offset = FCC2_MEM_OFFSET, | ||
87 | .bus_info = &mii_bus_info, | ||
88 | .rx_ring = 32, | ||
89 | .tx_ring = 32, | ||
90 | .rx_copybreak = 240, | ||
91 | .use_napi = 0, | ||
92 | .napi_weight = 17, | ||
93 | }; | ||
94 | |||
95 | static void init_fcc1_ioports(void) | ||
96 | { | ||
97 | struct io_port *io; | ||
98 | u32 tempval; | ||
99 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); | ||
100 | u32 *bcsr = ioremap(BCSR_ADDR+4, sizeof(u32)); | ||
101 | |||
102 | io = &immap->im_ioport; | ||
103 | |||
104 | /* Enable the PHY */ | ||
105 | clrbits32(bcsr, BCSR1_FETHIEN); | ||
106 | setbits32(bcsr, BCSR1_FETH_RST); | ||
107 | |||
108 | /* FCC1 pins are on port A/C. */ | ||
109 | /* Configure port A and C pins for FCC1 Ethernet. */ | ||
110 | |||
111 | tempval = in_be32(&io->iop_pdira); | ||
112 | tempval &= ~PA1_DIRA0; | ||
113 | tempval |= PA1_DIRA1; | ||
114 | out_be32(&io->iop_pdira, tempval); | ||
115 | |||
116 | tempval = in_be32(&io->iop_psora); | ||
117 | tempval &= ~PA1_PSORA0; | ||
118 | tempval |= PA1_PSORA1; | ||
119 | out_be32(&io->iop_psora, tempval); | ||
120 | |||
121 | setbits32(&io->iop_ppara,PA1_DIRA0 | PA1_DIRA1); | ||
122 | |||
123 | /* Alter clocks */ | ||
124 | tempval = PC_F1TXCLK|PC_F1RXCLK; | ||
125 | |||
126 | clrbits32(&io->iop_psorc, tempval); | ||
127 | clrbits32(&io->iop_pdirc, tempval); | ||
128 | setbits32(&io->iop_pparc, tempval); | ||
129 | |||
130 | clrbits32(&immap->im_cpmux.cmx_fcr, CMX1_CLK_MASK); | ||
131 | setbits32(&immap->im_cpmux.cmx_fcr, CMX1_CLK_ROUTE); | ||
132 | iounmap(bcsr); | ||
133 | iounmap(immap); | ||
134 | } | ||
135 | |||
136 | static void init_fcc2_ioports(void) | ||
137 | { | ||
138 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); | ||
139 | u32 *bcsr = ioremap(BCSR_ADDR+12, sizeof(u32)); | ||
140 | |||
141 | struct io_port *io; | ||
142 | u32 tempval; | ||
143 | |||
144 | immap = cpm2_immr; | ||
145 | |||
146 | io = &immap->im_ioport; | ||
147 | |||
148 | /* Enable the PHY */ | ||
149 | clrbits32(bcsr, BCSR3_FETHIEN2); | ||
150 | setbits32(bcsr, BCSR3_FETH2_RST); | ||
151 | |||
152 | /* FCC2 are port B/C. */ | ||
153 | /* Configure port A and C pins for FCC2 Ethernet. */ | ||
154 | |||
155 | tempval = in_be32(&io->iop_pdirb); | ||
156 | tempval &= ~PB2_DIRB0; | ||
157 | tempval |= PB2_DIRB1; | ||
158 | out_be32(&io->iop_pdirb, tempval); | ||
159 | |||
160 | tempval = in_be32(&io->iop_psorb); | ||
161 | tempval &= ~PB2_PSORB0; | ||
162 | tempval |= PB2_PSORB1; | ||
163 | out_be32(&io->iop_psorb, tempval); | ||
164 | |||
165 | setbits32(&io->iop_pparb,PB2_DIRB0 | PB2_DIRB1); | ||
166 | |||
167 | tempval = PC_F2RXCLK|PC_F2TXCLK; | ||
168 | |||
169 | /* Alter clocks */ | ||
170 | clrbits32(&io->iop_psorc,tempval); | ||
171 | clrbits32(&io->iop_pdirc,tempval); | ||
172 | setbits32(&io->iop_pparc,tempval); | ||
173 | |||
174 | clrbits32(&immap->im_cpmux.cmx_fcr, CMX2_CLK_MASK); | ||
175 | setbits32(&immap->im_cpmux.cmx_fcr, CMX2_CLK_ROUTE); | ||
176 | |||
177 | iounmap(bcsr); | ||
178 | iounmap(immap); | ||
179 | } | ||
180 | |||
181 | |||
182 | static void __init mpc8272ads_fixup_enet_pdata(struct platform_device *pdev, | ||
183 | int idx) | ||
184 | { | ||
185 | bd_t* bi = (void*)__res; | ||
186 | int fs_no = fsid_fcc1+pdev->id-1; | ||
187 | |||
188 | mpc82xx_fcc1_pdata.dpram_offset = mpc82xx_fcc2_pdata.dpram_offset = (u32)cpm2_immr->im_dprambase; | ||
189 | mpc82xx_fcc1_pdata.fcc_regs_c = mpc82xx_fcc2_pdata.fcc_regs_c = (u32)cpm2_immr->im_fcc_c; | ||
190 | |||
191 | switch(fs_no) { | ||
192 | case fsid_fcc1: | ||
193 | memcpy(&mpc82xx_fcc1_pdata.macaddr,bi->bi_enetaddr,6); | ||
194 | pdev->dev.platform_data = &mpc82xx_fcc1_pdata; | ||
195 | break; | ||
196 | case fsid_fcc2: | ||
197 | memcpy(&mpc82xx_fcc2_pdata.macaddr,bi->bi_enetaddr,6); | ||
198 | mpc82xx_fcc2_pdata.macaddr[5] ^= 1; | ||
199 | pdev->dev.platform_data = &mpc82xx_fcc2_pdata; | ||
200 | break; | ||
201 | } | ||
202 | } | ||
203 | |||
204 | static int mpc8272ads_platform_notify(struct device *dev) | ||
205 | { | ||
206 | static const struct platform_notify_dev_map dev_map[] = { | ||
207 | { | ||
208 | .bus_id = "fsl-cpm-fcc", | ||
209 | .rtn = mpc8272ads_fixup_enet_pdata | ||
210 | }, | ||
211 | { | ||
212 | .bus_id = NULL | ||
213 | } | ||
214 | }; | ||
215 | platform_notify_map(dev_map,dev); | ||
216 | |||
217 | return 0; | ||
218 | |||
219 | } | ||
220 | |||
221 | int __init mpc8272ads_init(void) | ||
222 | { | ||
223 | printk(KERN_NOTICE "mpc8272ads: Init\n"); | ||
224 | |||
225 | platform_notify = mpc8272ads_platform_notify; | ||
226 | |||
227 | ppc_sys_device_initfunc(); | ||
228 | |||
229 | ppc_sys_device_disable_all(); | ||
230 | ppc_sys_device_enable(MPC82xx_CPM_FCC1); | ||
231 | ppc_sys_device_enable(MPC82xx_CPM_FCC2); | ||
232 | |||
233 | return 0; | ||
234 | } | ||
235 | |||
236 | arch_initcall(mpc8272ads_init); | ||
diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c new file mode 100644 index 000000000000..ac8fcc68afeb --- /dev/null +++ b/arch/ppc/platforms/mpc866ads_setup.c | |||
@@ -0,0 +1,273 @@ | |||
1 | /*arch/ppc/platforms/mpc885ads-setup.c | ||
2 | * | ||
3 | * Platform setup for the Freescale mpc885ads board | ||
4 | * | ||
5 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
6 | * | ||
7 | * Copyright 2005 MontaVista Software Inc. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/param.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/device.h> | ||
21 | |||
22 | #include <linux/fs_enet_pd.h> | ||
23 | #include <linux/mii.h> | ||
24 | |||
25 | #include <asm/delay.h> | ||
26 | #include <asm/io.h> | ||
27 | #include <asm/machdep.h> | ||
28 | #include <asm/page.h> | ||
29 | #include <asm/processor.h> | ||
30 | #include <asm/system.h> | ||
31 | #include <asm/time.h> | ||
32 | #include <asm/ppcboot.h> | ||
33 | #include <asm/8xx_immap.h> | ||
34 | #include <asm/commproc.h> | ||
35 | #include <asm/ppc_sys.h> | ||
36 | #include <asm/mpc8xx.h> | ||
37 | |||
38 | extern unsigned char __res[]; | ||
39 | |||
40 | static struct fs_mii_bus_info fec_mii_bus_info = { | ||
41 | .method = fsmii_fec, | ||
42 | .id = 0, | ||
43 | }; | ||
44 | |||
45 | static struct fs_mii_bus_info scc_mii_bus_info = { | ||
46 | .method = fsmii_fixed, | ||
47 | .id = 0, | ||
48 | .i.fixed.speed = 10, | ||
49 | .i.fixed.duplex = 0, | ||
50 | }; | ||
51 | |||
52 | static struct fs_platform_info mpc8xx_fec_pdata[] = { | ||
53 | { | ||
54 | .rx_ring = 128, | ||
55 | .tx_ring = 16, | ||
56 | .rx_copybreak = 240, | ||
57 | |||
58 | .use_napi = 1, | ||
59 | .napi_weight = 17, | ||
60 | |||
61 | .phy_addr = 15, | ||
62 | .phy_irq = -1, | ||
63 | |||
64 | .use_rmii = 0, | ||
65 | |||
66 | .bus_info = &fec_mii_bus_info, | ||
67 | } | ||
68 | }; | ||
69 | |||
70 | static struct fs_platform_info mpc8xx_scc_pdata = { | ||
71 | .rx_ring = 64, | ||
72 | .tx_ring = 8, | ||
73 | .rx_copybreak = 240, | ||
74 | |||
75 | .use_napi = 1, | ||
76 | .napi_weight = 17, | ||
77 | |||
78 | .phy_addr = -1, | ||
79 | .phy_irq = -1, | ||
80 | |||
81 | .bus_info = &scc_mii_bus_info, | ||
82 | }; | ||
83 | |||
84 | void __init board_init(void) | ||
85 | { | ||
86 | volatile cpm8xx_t *cp = cpmp; | ||
87 | unsigned *bcsr_io; | ||
88 | |||
89 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
90 | |||
91 | if (bcsr_io == NULL) { | ||
92 | printk(KERN_CRIT "Could not remap BCSR1\n"); | ||
93 | return; | ||
94 | } | ||
95 | #ifdef CONFIG_SERIAL_CPM_SMC1 | ||
96 | cp->cp_simode &= ~(0xe0000000 >> 17); /* brg1 */ | ||
97 | clrbits32(bcsr_io,(0x80000000 >> 7)); | ||
98 | #else | ||
99 | setbits32(bcsr_io,(0x80000000 >> 7)); | ||
100 | |||
101 | cp->cp_pbpar &= ~(0x000000c0); | ||
102 | cp->cp_pbdir |= 0x000000c0; | ||
103 | cp->cp_smc[0].smc_smcmr = 0; | ||
104 | cp->cp_smc[0].smc_smce = 0; | ||
105 | #endif | ||
106 | |||
107 | #ifdef CONFIG_SERIAL_CPM_SMC2 | ||
108 | cp->cp_simode &= ~(0xe0000000 >> 1); | ||
109 | cp->cp_simode |= (0x20000000 >> 1); /* brg2 */ | ||
110 | clrbits32(bcsr_io,(0x80000000 >> 13)); | ||
111 | #else | ||
112 | clrbits32(bcsr_io,(0x80000000 >> 13)); | ||
113 | cp->cp_pbpar &= ~(0x00000c00); | ||
114 | cp->cp_pbdir |= 0x00000c00; | ||
115 | cp->cp_smc[1].smc_smcmr = 0; | ||
116 | cp->cp_smc[1].smc_smce = 0; | ||
117 | #endif | ||
118 | iounmap(bcsr_io); | ||
119 | } | ||
120 | |||
121 | static void setup_fec1_ioports(void) | ||
122 | { | ||
123 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
124 | |||
125 | setbits16(&immap->im_ioport.iop_pdpar, 0x1fff); | ||
126 | setbits16(&immap->im_ioport.iop_pddir, 0x1fff); | ||
127 | } | ||
128 | |||
129 | static void setup_scc1_ioports(void) | ||
130 | { | ||
131 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
132 | unsigned *bcsr_io; | ||
133 | |||
134 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
135 | |||
136 | if (bcsr_io == NULL) { | ||
137 | printk(KERN_CRIT "Could not remap BCSR1\n"); | ||
138 | return; | ||
139 | } | ||
140 | |||
141 | /* Enable the PHY. | ||
142 | */ | ||
143 | clrbits32(bcsr_io,BCSR1_ETHEN); | ||
144 | |||
145 | /* Configure port A pins for Txd and Rxd. | ||
146 | */ | ||
147 | /* Disable receive and transmit in case EPPC-Bug started it. | ||
148 | */ | ||
149 | setbits16(&immap->im_ioport.iop_papar, PA_ENET_RXD | PA_ENET_TXD); | ||
150 | clrbits16(&immap->im_ioport.iop_padir, PA_ENET_RXD | PA_ENET_TXD); | ||
151 | clrbits16(&immap->im_ioport.iop_paodr, PA_ENET_TXD); | ||
152 | |||
153 | /* Configure port C pins to enable CLSN and RENA. | ||
154 | */ | ||
155 | clrbits16(&immap->im_ioport.iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA); | ||
156 | clrbits16(&immap->im_ioport.iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA); | ||
157 | setbits16(&immap->im_ioport.iop_pcso, PC_ENET_CLSN | PC_ENET_RENA); | ||
158 | /* Configure port A for TCLK and RCLK. | ||
159 | */ | ||
160 | setbits16(&immap->im_ioport.iop_papar, PA_ENET_TCLK | PA_ENET_RCLK); | ||
161 | clrbits16(&immap->im_ioport.iop_padir, PA_ENET_TCLK | PA_ENET_RCLK); | ||
162 | clrbits32(&immap->im_cpm.cp_pbpar, PB_ENET_TENA); | ||
163 | clrbits32(&immap->im_cpm.cp_pbdir, PB_ENET_TENA); | ||
164 | |||
165 | /* Configure Serial Interface clock routing. | ||
166 | * First, clear all SCC bits to zero, then set the ones we want. | ||
167 | */ | ||
168 | clrbits32(&immap->im_cpm.cp_sicr, SICR_ENET_MASK); | ||
169 | setbits32(&immap->im_cpm.cp_sicr, SICR_ENET_CLKRT); | ||
170 | |||
171 | /* In the original SCC enet driver the following code is placed at | ||
172 | the end of the initialization */ | ||
173 | setbits32(&immap->im_cpm.cp_pbpar, PB_ENET_TENA); | ||
174 | setbits32(&immap->im_cpm.cp_pbdir, PB_ENET_TENA); | ||
175 | |||
176 | } | ||
177 | |||
178 | static void mpc866ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) | ||
179 | { | ||
180 | struct fs_platform_info *fpi = pdev->dev.platform_data; | ||
181 | |||
182 | volatile cpm8xx_t *cp; | ||
183 | bd_t *bd = (bd_t *) __res; | ||
184 | char *e; | ||
185 | int i; | ||
186 | |||
187 | /* Get pointer to Communication Processor */ | ||
188 | cp = cpmp; | ||
189 | switch (fs_no) { | ||
190 | case fsid_fec1: | ||
191 | fpi = &mpc8xx_fec_pdata[0]; | ||
192 | fpi->init_ioports = &setup_fec1_ioports; | ||
193 | |||
194 | break; | ||
195 | case fsid_scc1: | ||
196 | fpi = &mpc8xx_scc_pdata; | ||
197 | fpi->init_ioports = &setup_scc1_ioports; | ||
198 | |||
199 | break; | ||
200 | default: | ||
201 | printk(KERN_WARNING"Device %s is not supported!\n", pdev->name); | ||
202 | return; | ||
203 | } | ||
204 | |||
205 | pdev->dev.platform_data = fpi; | ||
206 | fpi->fs_no = fs_no; | ||
207 | |||
208 | e = (unsigned char *)&bd->bi_enetaddr; | ||
209 | for (i = 0; i < 6; i++) | ||
210 | fpi->macaddr[i] = *e++; | ||
211 | |||
212 | fpi->macaddr[5 - pdev->id]++; | ||
213 | |||
214 | } | ||
215 | |||
216 | static void mpc866ads_fixup_fec_enet_pdata(struct platform_device *pdev, | ||
217 | int idx) | ||
218 | { | ||
219 | /* This is for FEC devices only */ | ||
220 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-fec"))) | ||
221 | return; | ||
222 | mpc866ads_fixup_enet_pdata(pdev, fsid_fec1 + pdev->id - 1); | ||
223 | } | ||
224 | |||
225 | static void mpc866ads_fixup_scc_enet_pdata(struct platform_device *pdev, | ||
226 | int idx) | ||
227 | { | ||
228 | /* This is for SCC devices only */ | ||
229 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-scc"))) | ||
230 | return; | ||
231 | |||
232 | mpc866ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); | ||
233 | } | ||
234 | |||
235 | static int mpc866ads_platform_notify(struct device *dev) | ||
236 | { | ||
237 | static const struct platform_notify_dev_map dev_map[] = { | ||
238 | { | ||
239 | .bus_id = "fsl-cpm-fec", | ||
240 | .rtn = mpc866ads_fixup_fec_enet_pdata, | ||
241 | }, | ||
242 | { | ||
243 | .bus_id = "fsl-cpm-scc", | ||
244 | .rtn = mpc866ads_fixup_scc_enet_pdata, | ||
245 | }, | ||
246 | { | ||
247 | .bus_id = NULL | ||
248 | } | ||
249 | }; | ||
250 | |||
251 | platform_notify_map(dev_map,dev); | ||
252 | |||
253 | return 0; | ||
254 | } | ||
255 | |||
256 | int __init mpc866ads_init(void) | ||
257 | { | ||
258 | printk(KERN_NOTICE "mpc866ads: Init\n"); | ||
259 | |||
260 | platform_notify = mpc866ads_platform_notify; | ||
261 | |||
262 | ppc_sys_device_initfunc(); | ||
263 | ppc_sys_device_disable_all(); | ||
264 | |||
265 | #ifdef MPC8xx_SECOND_ETH_SCC1 | ||
266 | ppc_sys_device_enable(MPC8xx_CPM_SCC1); | ||
267 | #endif | ||
268 | ppc_sys_device_enable(MPC8xx_CPM_FEC1); | ||
269 | |||
270 | return 0; | ||
271 | } | ||
272 | |||
273 | arch_initcall(mpc866ads_init); | ||
diff --git a/arch/ppc/platforms/mpc885ads_setup.c b/arch/ppc/platforms/mpc885ads_setup.c new file mode 100644 index 000000000000..50a99e5f7c68 --- /dev/null +++ b/arch/ppc/platforms/mpc885ads_setup.c | |||
@@ -0,0 +1,389 @@ | |||
1 | /*arch/ppc/platforms/mpc885ads-setup.c | ||
2 | * | ||
3 | * Platform setup for the Freescale mpc885ads board | ||
4 | * | ||
5 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
6 | * | ||
7 | * Copyright 2005 MontaVista Software Inc. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/param.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/device.h> | ||
21 | |||
22 | #include <linux/fs_enet_pd.h> | ||
23 | #include <linux/mii.h> | ||
24 | |||
25 | #include <asm/delay.h> | ||
26 | #include <asm/io.h> | ||
27 | #include <asm/machdep.h> | ||
28 | #include <asm/page.h> | ||
29 | #include <asm/processor.h> | ||
30 | #include <asm/system.h> | ||
31 | #include <asm/time.h> | ||
32 | #include <asm/ppcboot.h> | ||
33 | #include <asm/8xx_immap.h> | ||
34 | #include <asm/commproc.h> | ||
35 | #include <asm/ppc_sys.h> | ||
36 | |||
37 | extern unsigned char __res[]; | ||
38 | |||
39 | static void __init mpc885ads_scc_phy_init(char); | ||
40 | |||
41 | static struct fs_mii_bus_info fec_mii_bus_info = { | ||
42 | .method = fsmii_fec, | ||
43 | .id = 0, | ||
44 | }; | ||
45 | |||
46 | static struct fs_mii_bus_info scc_mii_bus_info = { | ||
47 | #ifdef CONFIG_SCC_ENET_8xx_FIXED | ||
48 | .method = fsmii_fixed, | ||
49 | #else | ||
50 | .method = fsmii_fec, | ||
51 | #endif | ||
52 | |||
53 | .id = 0, | ||
54 | }; | ||
55 | |||
56 | static struct fs_platform_info mpc8xx_fec_pdata[] = { | ||
57 | { | ||
58 | .rx_ring = 128, | ||
59 | .tx_ring = 16, | ||
60 | .rx_copybreak = 240, | ||
61 | |||
62 | .use_napi = 1, | ||
63 | .napi_weight = 17, | ||
64 | |||
65 | .phy_addr = 0, | ||
66 | .phy_irq = SIU_IRQ7, | ||
67 | |||
68 | .bus_info = &fec_mii_bus_info, | ||
69 | }, { | ||
70 | .rx_ring = 128, | ||
71 | .tx_ring = 16, | ||
72 | .rx_copybreak = 240, | ||
73 | |||
74 | .use_napi = 1, | ||
75 | .napi_weight = 17, | ||
76 | |||
77 | .phy_addr = 1, | ||
78 | .phy_irq = SIU_IRQ7, | ||
79 | |||
80 | .bus_info = &fec_mii_bus_info, | ||
81 | } | ||
82 | }; | ||
83 | |||
84 | static struct fs_platform_info mpc8xx_scc_pdata = { | ||
85 | .rx_ring = 64, | ||
86 | .tx_ring = 8, | ||
87 | .rx_copybreak = 240, | ||
88 | |||
89 | .use_napi = 1, | ||
90 | .napi_weight = 17, | ||
91 | |||
92 | .phy_addr = 2, | ||
93 | #ifdef CONFIG_MPC8xx_SCC_ENET_FIXED | ||
94 | .phy_irq = -1, | ||
95 | #else | ||
96 | .phy_irq = SIU_IRQ7, | ||
97 | #endif | ||
98 | |||
99 | .bus_info = &scc_mii_bus_info, | ||
100 | }; | ||
101 | |||
102 | void __init board_init(void) | ||
103 | { | ||
104 | volatile cpm8xx_t *cp = cpmp; | ||
105 | unsigned int *bcsr_io; | ||
106 | |||
107 | #ifdef CONFIG_FS_ENET | ||
108 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
109 | #endif | ||
110 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
111 | |||
112 | if (bcsr_io == NULL) { | ||
113 | printk(KERN_CRIT "Could not remap BCSR\n"); | ||
114 | return; | ||
115 | } | ||
116 | #ifdef CONFIG_SERIAL_CPM_SMC1 | ||
117 | cp->cp_simode &= ~(0xe0000000 >> 17); /* brg1 */ | ||
118 | clrbits32(bcsr_io, BCSR1_RS232EN_1); | ||
119 | #else | ||
120 | setbits32(bcsr_io,BCSR1_RS232EN_1); | ||
121 | cp->cp_smc[0].smc_smcmr = 0; | ||
122 | cp->cp_smc[0].smc_smce = 0; | ||
123 | #endif | ||
124 | |||
125 | #ifdef CONFIG_SERIAL_CPM_SMC2 | ||
126 | cp->cp_simode &= ~(0xe0000000 >> 1); | ||
127 | cp->cp_simode |= (0x20000000 >> 1); /* brg2 */ | ||
128 | clrbits32(bcsr_io,BCSR1_RS232EN_2); | ||
129 | #else | ||
130 | setbits32(bcsr_io,BCSR1_RS232EN_2); | ||
131 | cp->cp_smc[1].smc_smcmr = 0; | ||
132 | cp->cp_smc[1].smc_smce = 0; | ||
133 | #endif | ||
134 | iounmap(bcsr_io); | ||
135 | |||
136 | #ifdef CONFIG_FS_ENET | ||
137 | /* use MDC for MII (common) */ | ||
138 | setbits16(&immap->im_ioport.iop_pdpar, 0x0080); | ||
139 | clrbits16(&immap->im_ioport.iop_pddir, 0x0080); | ||
140 | #endif | ||
141 | } | ||
142 | |||
143 | static void setup_fec1_ioports(void) | ||
144 | { | ||
145 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
146 | |||
147 | /* configure FEC1 pins */ | ||
148 | setbits16(&immap->im_ioport.iop_papar, 0xf830); | ||
149 | setbits16(&immap->im_ioport.iop_padir, 0x0830); | ||
150 | clrbits16(&immap->im_ioport.iop_padir, 0xf000); | ||
151 | setbits32(&immap->im_cpm.cp_pbpar, 0x00001001); | ||
152 | |||
153 | clrbits32(&immap->im_cpm.cp_pbdir, 0x00001001); | ||
154 | setbits16(&immap->im_ioport.iop_pcpar, 0x000c); | ||
155 | clrbits16(&immap->im_ioport.iop_pcdir, 0x000c); | ||
156 | setbits32(&immap->im_cpm.cp_pepar, 0x00000003); | ||
157 | |||
158 | setbits32(&immap->im_cpm.cp_pedir, 0x00000003); | ||
159 | clrbits32(&immap->im_cpm.cp_peso, 0x00000003); | ||
160 | clrbits32(&immap->im_cpm.cp_cptr, 0x00000100); | ||
161 | } | ||
162 | |||
163 | static void setup_fec2_ioports(void) | ||
164 | { | ||
165 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
166 | |||
167 | /* configure FEC2 pins */ | ||
168 | setbits32(&immap->im_cpm.cp_pepar, 0x0003fffc); | ||
169 | setbits32(&immap->im_cpm.cp_pedir, 0x0003fffc); | ||
170 | setbits32(&immap->im_cpm.cp_peso, 0x00037800); | ||
171 | clrbits32(&immap->im_cpm.cp_peso, 0x000087fc); | ||
172 | clrbits32(&immap->im_cpm.cp_cptr, 0x00000080); | ||
173 | } | ||
174 | |||
175 | static void setup_scc3_ioports(void) | ||
176 | { | ||
177 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
178 | unsigned *bcsr_io; | ||
179 | |||
180 | bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE); | ||
181 | |||
182 | if (bcsr_io == NULL) { | ||
183 | printk(KERN_CRIT "Could not remap BCSR\n"); | ||
184 | return; | ||
185 | } | ||
186 | |||
187 | /* Enable the PHY. | ||
188 | */ | ||
189 | setbits32(bcsr_io+4, BCSR4_ETH10_RST); | ||
190 | /* Configure port A pins for Txd and Rxd. | ||
191 | */ | ||
192 | setbits16(&immap->im_ioport.iop_papar, PA_ENET_RXD | PA_ENET_TXD); | ||
193 | clrbits16(&immap->im_ioport.iop_padir, PA_ENET_RXD | PA_ENET_TXD); | ||
194 | |||
195 | /* Configure port C pins to enable CLSN and RENA. | ||
196 | */ | ||
197 | clrbits16(&immap->im_ioport.iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA); | ||
198 | clrbits16(&immap->im_ioport.iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA); | ||
199 | setbits16(&immap->im_ioport.iop_pcso, PC_ENET_CLSN | PC_ENET_RENA); | ||
200 | |||
201 | /* Configure port E for TCLK and RCLK. | ||
202 | */ | ||
203 | setbits32(&immap->im_cpm.cp_pepar, PE_ENET_TCLK | PE_ENET_RCLK); | ||
204 | clrbits32(&immap->im_cpm.cp_pepar, PE_ENET_TENA); | ||
205 | clrbits32(&immap->im_cpm.cp_pedir, | ||
206 | PE_ENET_TCLK | PE_ENET_RCLK | PE_ENET_TENA); | ||
207 | clrbits32(&immap->im_cpm.cp_peso, PE_ENET_TCLK | PE_ENET_RCLK); | ||
208 | setbits32(&immap->im_cpm.cp_peso, PE_ENET_TENA); | ||
209 | |||
210 | /* Configure Serial Interface clock routing. | ||
211 | * First, clear all SCC bits to zero, then set the ones we want. | ||
212 | */ | ||
213 | clrbits32(&immap->im_cpm.cp_sicr, SICR_ENET_MASK); | ||
214 | setbits32(&immap->im_cpm.cp_sicr, SICR_ENET_CLKRT); | ||
215 | |||
216 | /* Disable Rx and Tx. SMC1 sshould be stopped if SCC3 eternet are used. | ||
217 | */ | ||
218 | immap->im_cpm.cp_smc[0].smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN); | ||
219 | /* On the MPC885ADS SCC ethernet PHY is initialized in the full duplex mode | ||
220 | * by H/W setting after reset. SCC ethernet controller support only half duplex. | ||
221 | * This discrepancy of modes causes a lot of carrier lost errors. | ||
222 | */ | ||
223 | |||
224 | /* In the original SCC enet driver the following code is placed at | ||
225 | the end of the initialization */ | ||
226 | setbits32(&immap->im_cpm.cp_pepar, PE_ENET_TENA); | ||
227 | clrbits32(&immap->im_cpm.cp_pedir, PE_ENET_TENA); | ||
228 | setbits32(&immap->im_cpm.cp_peso, PE_ENET_TENA); | ||
229 | |||
230 | setbits32(bcsr_io+1, BCSR1_ETHEN); | ||
231 | iounmap(bcsr_io); | ||
232 | } | ||
233 | |||
234 | static void mpc885ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) | ||
235 | { | ||
236 | struct fs_platform_info *fpi = pdev->dev.platform_data; | ||
237 | |||
238 | volatile cpm8xx_t *cp; | ||
239 | bd_t *bd = (bd_t *) __res; | ||
240 | char *e; | ||
241 | int i; | ||
242 | |||
243 | /* Get pointer to Communication Processor */ | ||
244 | cp = cpmp; | ||
245 | switch (fs_no) { | ||
246 | case fsid_fec1: | ||
247 | fpi = &mpc8xx_fec_pdata[0]; | ||
248 | fpi->init_ioports = &setup_fec1_ioports; | ||
249 | break; | ||
250 | case fsid_fec2: | ||
251 | fpi = &mpc8xx_fec_pdata[1]; | ||
252 | fpi->init_ioports = &setup_fec2_ioports; | ||
253 | break; | ||
254 | case fsid_scc3: | ||
255 | fpi = &mpc8xx_scc_pdata; | ||
256 | fpi->init_ioports = &setup_scc3_ioports; | ||
257 | mpc885ads_scc_phy_init(fpi->phy_addr); | ||
258 | break; | ||
259 | default: | ||
260 | printk(KERN_WARNING"Device %s is not supported!\n", pdev->name); | ||
261 | return; | ||
262 | } | ||
263 | |||
264 | pdev->dev.platform_data = fpi; | ||
265 | fpi->fs_no = fs_no; | ||
266 | |||
267 | e = (unsigned char *)&bd->bi_enetaddr; | ||
268 | for (i = 0; i < 6; i++) | ||
269 | fpi->macaddr[i] = *e++; | ||
270 | |||
271 | fpi->macaddr[5 - pdev->id]++; | ||
272 | |||
273 | } | ||
274 | |||
275 | static void mpc885ads_fixup_fec_enet_pdata(struct platform_device *pdev, | ||
276 | int idx) | ||
277 | { | ||
278 | /* This is for FEC devices only */ | ||
279 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-fec"))) | ||
280 | return; | ||
281 | mpc885ads_fixup_enet_pdata(pdev, fsid_fec1 + pdev->id - 1); | ||
282 | } | ||
283 | |||
284 | static void __init mpc885ads_fixup_scc_enet_pdata(struct platform_device *pdev, | ||
285 | int idx) | ||
286 | { | ||
287 | /* This is for SCC devices only */ | ||
288 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-scc"))) | ||
289 | return; | ||
290 | |||
291 | mpc885ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); | ||
292 | } | ||
293 | |||
294 | /* SCC ethernet controller does not have MII management channel. FEC1 MII | ||
295 | * channel is used to communicate with the 10Mbit PHY. | ||
296 | */ | ||
297 | |||
298 | #define MII_ECNTRL_PINMUX 0x4 | ||
299 | #define FEC_ECNTRL_PINMUX 0x00000004 | ||
300 | #define FEC_RCNTRL_MII_MODE 0x00000004 | ||
301 | |||
302 | /* Make MII read/write commands. | ||
303 | */ | ||
304 | #define mk_mii_write(REG, VAL, PHY_ADDR) (0x50020000 | (((REG) & 0x1f) << 18) | \ | ||
305 | ((VAL) & 0xffff) | ((PHY_ADDR) << 23)) | ||
306 | |||
307 | static void mpc885ads_scc_phy_init(char phy_addr) | ||
308 | { | ||
309 | volatile immap_t *immap; | ||
310 | volatile fec_t *fecp; | ||
311 | bd_t *bd; | ||
312 | |||
313 | bd = (bd_t *) __res; | ||
314 | immap = (immap_t *) IMAP_ADDR; /* pointer to internal registers */ | ||
315 | fecp = &(immap->im_cpm.cp_fec); | ||
316 | |||
317 | /* Enable MII pins of the FEC1 | ||
318 | */ | ||
319 | setbits16(&immap->im_ioport.iop_pdpar, 0x0080); | ||
320 | clrbits16(&immap->im_ioport.iop_pddir, 0x0080); | ||
321 | /* Set MII speed to 2.5 MHz | ||
322 | */ | ||
323 | out_be32(&fecp->fec_mii_speed, | ||
324 | ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1); | ||
325 | |||
326 | /* Enable FEC pin MUX | ||
327 | */ | ||
328 | setbits32(&fecp->fec_ecntrl, MII_ECNTRL_PINMUX); | ||
329 | setbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); | ||
330 | |||
331 | out_be32(&fecp->fec_mii_data, | ||
332 | mk_mii_write(MII_BMCR, BMCR_ISOLATE, phy_addr)); | ||
333 | udelay(100); | ||
334 | out_be32(&fecp->fec_mii_data, | ||
335 | mk_mii_write(MII_ADVERTISE, | ||
336 | ADVERTISE_10HALF | ADVERTISE_CSMA, phy_addr)); | ||
337 | udelay(100); | ||
338 | |||
339 | /* Disable FEC MII settings | ||
340 | */ | ||
341 | clrbits32(&fecp->fec_ecntrl, MII_ECNTRL_PINMUX); | ||
342 | clrbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); | ||
343 | out_be32(&fecp->fec_mii_speed, 0); | ||
344 | } | ||
345 | |||
346 | static int mpc885ads_platform_notify(struct device *dev) | ||
347 | { | ||
348 | |||
349 | static const struct platform_notify_dev_map dev_map[] = { | ||
350 | { | ||
351 | .bus_id = "fsl-cpm-fec", | ||
352 | .rtn = mpc885ads_fixup_fec_enet_pdata, | ||
353 | }, | ||
354 | { | ||
355 | .bus_id = "fsl-cpm-scc", | ||
356 | .rtn = mpc885ads_fixup_scc_enet_pdata, | ||
357 | }, | ||
358 | { | ||
359 | .bus_id = NULL | ||
360 | } | ||
361 | }; | ||
362 | |||
363 | platform_notify_map(dev_map,dev); | ||
364 | |||
365 | } | ||
366 | |||
367 | int __init mpc885ads_init(void) | ||
368 | { | ||
369 | printk(KERN_NOTICE "mpc885ads: Init\n"); | ||
370 | |||
371 | platform_notify = mpc885ads_platform_notify; | ||
372 | |||
373 | ppc_sys_device_initfunc(); | ||
374 | ppc_sys_device_disable_all(); | ||
375 | |||
376 | ppc_sys_device_enable(MPC8xx_CPM_FEC1); | ||
377 | |||
378 | #ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3 | ||
379 | ppc_sys_device_enable(MPC8xx_CPM_SCC1); | ||
380 | |||
381 | #endif | ||
382 | #ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2 | ||
383 | ppc_sys_device_enable(MPC8xx_CPM_FEC2); | ||
384 | #endif | ||
385 | |||
386 | return 0; | ||
387 | } | ||
388 | |||
389 | arch_initcall(mpc885ads_init); | ||
diff --git a/arch/ppc/platforms/mvme5100.c b/arch/ppc/platforms/mvme5100.c index 108eb182dddc..c717cd92c028 100644 --- a/arch/ppc/platforms/mvme5100.c +++ b/arch/ppc/platforms/mvme5100.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mvme5100.c | ||
3 | * | ||
4 | * Board setup routines for the Motorola MVME5100. | 2 | * Board setup routines for the Motorola MVME5100. |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/pal4.h b/arch/ppc/platforms/pal4.h index 641a11a31657..8569c423d887 100644 --- a/arch/ppc/platforms/pal4.h +++ b/arch/ppc/platforms/pal4.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pal4.h | ||
3 | * | ||
4 | * Definitions for SBS Palomar IV board | 2 | * Definitions for SBS Palomar IV board |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/pal4_pci.c b/arch/ppc/platforms/pal4_pci.c index c3b1b757a48b..d81ae1c7e1cf 100644 --- a/arch/ppc/platforms/pal4_pci.c +++ b/arch/ppc/platforms/pal4_pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pal4_pci.c | ||
3 | * | ||
4 | * PCI support for SBS Palomar IV | 2 | * PCI support for SBS Palomar IV |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/pal4_serial.h b/arch/ppc/platforms/pal4_serial.h index a715c66e1adf..a75343224cfd 100644 --- a/arch/ppc/platforms/pal4_serial.h +++ b/arch/ppc/platforms/pal4_serial.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pal4_serial.h | ||
3 | * | ||
4 | * Definitions for SBS PalomarIV serial support | 2 | * Definitions for SBS PalomarIV serial support |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/pal4_setup.c b/arch/ppc/platforms/pal4_setup.c index f93a3f871932..3c3d881df00d 100644 --- a/arch/ppc/platforms/pal4_setup.c +++ b/arch/ppc/platforms/pal4_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pal4_setup.c | ||
3 | * | ||
4 | * Board setup routines for the SBS PalomarIV. | 2 | * Board setup routines for the SBS PalomarIV. |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/powerpmc250.c b/arch/ppc/platforms/powerpmc250.c index e6b520e6e13f..c3a86be11fb7 100644 --- a/arch/ppc/platforms/powerpmc250.c +++ b/arch/ppc/platforms/powerpmc250.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/powerpmc250.c | ||
3 | * | ||
4 | * Board setup routines for Force PowerPMC-250 Processor PMC | 2 | * Board setup routines for Force PowerPMC-250 Processor PMC |
5 | * | 3 | * |
6 | * Author: Troy Benjegerdes <tbenjegerdes@mvista.com> | 4 | * Author: Troy Benjegerdes <tbenjegerdes@mvista.com> |
diff --git a/arch/ppc/platforms/pplus.c b/arch/ppc/platforms/pplus.c index 22bd40cfb092..de2761ebe0d9 100644 --- a/arch/ppc/platforms/pplus.c +++ b/arch/ppc/platforms/pplus.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pplus.c | ||
3 | * | ||
4 | * Board and PCI setup routines for MCG PowerPlus | 2 | * Board and PCI setup routines for MCG PowerPlus |
5 | * | 3 | * |
6 | * Author: Randy Vinson <rvinson@mvista.com> | 4 | * Author: Randy Vinson <rvinson@mvista.com> |
diff --git a/arch/ppc/platforms/pplus.h b/arch/ppc/platforms/pplus.h index 90f0cb2d409f..a07cbbdd72c6 100644 --- a/arch/ppc/platforms/pplus.h +++ b/arch/ppc/platforms/pplus.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pplus.h | ||
3 | * | ||
4 | * Definitions for Motorola MCG Falcon/Raven & HAWK North Bridge & Memory ctlr. | 2 | * Definitions for Motorola MCG Falcon/Raven & HAWK North Bridge & Memory ctlr. |
5 | * | 3 | * |
6 | * Author: Mark A. Greerinclude/asm-ppc/hawk.h | 4 | * Author: Mark A. Greerinclude/asm-ppc/hawk.h |
diff --git a/arch/ppc/platforms/pq2ads.c b/arch/ppc/platforms/pq2ads.c index 71c9fca1fe9b..3365fd788a7a 100644 --- a/arch/ppc/platforms/pq2ads.c +++ b/arch/ppc/platforms/pq2ads.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pq2ads.c | ||
3 | * | ||
4 | * PQ2ADS platform support | 2 | * PQ2ADS platform support |
5 | * | 3 | * |
6 | * Author: Kumar Gala <galak@kernel.crashing.org> | 4 | * Author: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/pq2ads.h b/arch/ppc/platforms/pq2ads.h index 067d9a5aebc1..6b26dd36c640 100644 --- a/arch/ppc/platforms/pq2ads.h +++ b/arch/ppc/platforms/pq2ads.h | |||
@@ -13,6 +13,10 @@ | |||
13 | 13 | ||
14 | #include <asm/ppcboot.h> | 14 | #include <asm/ppcboot.h> |
15 | 15 | ||
16 | #if defined(CONFIG_ADS8272) | ||
17 | #define BOARD_CHIP_NAME "8272" | ||
18 | #endif | ||
19 | |||
16 | /* Memory map is configured by the PROM startup. | 20 | /* Memory map is configured by the PROM startup. |
17 | * We just map a few things we need. The CSR is actually 4 byte-wide | 21 | * We just map a few things we need. The CSR is actually 4 byte-wide |
18 | * registers that can be accessed as 8-, 16-, or 32-bit values. | 22 | * registers that can be accessed as 8-, 16-, or 32-bit values. |
diff --git a/arch/ppc/platforms/pq2ads_pd.h b/arch/ppc/platforms/pq2ads_pd.h new file mode 100644 index 000000000000..8f14a43eafec --- /dev/null +++ b/arch/ppc/platforms/pq2ads_pd.h | |||
@@ -0,0 +1,114 @@ | |||
1 | #ifndef __PQ2ADS_PD_H | ||
2 | #define __PQ2ADS_PD_H | ||
3 | /* | ||
4 | * arch/ppc/platforms/82xx/pq2ads_pd.h | ||
5 | * | ||
6 | * Some defines for MPC82xx board-specific PlatformDevice descriptions | ||
7 | * | ||
8 | * 2005 (c) MontaVista Software, Inc. | ||
9 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | /* FCC1 Clock Source Configuration. These can be redefined in the board specific file. | ||
17 | Can only choose from CLK9-12 */ | ||
18 | |||
19 | #define F1_RXCLK 11 | ||
20 | #define F1_TXCLK 10 | ||
21 | |||
22 | /* FCC2 Clock Source Configuration. These can be redefined in the board specific file. | ||
23 | Can only choose from CLK13-16 */ | ||
24 | #define F2_RXCLK 15 | ||
25 | #define F2_TXCLK 16 | ||
26 | |||
27 | /* FCC3 Clock Source Configuration. These can be redefined in the board specific file. | ||
28 | Can only choose from CLK13-16 */ | ||
29 | #define F3_RXCLK 13 | ||
30 | #define F3_TXCLK 14 | ||
31 | |||
32 | /* Automatically generates register configurations */ | ||
33 | #define PC_CLK(x) ((uint)(1<<(x-1))) /* FCC CLK I/O ports */ | ||
34 | |||
35 | #define CMXFCR_RF1CS(x) ((uint)((x-5)<<27)) /* FCC1 Receive Clock Source */ | ||
36 | #define CMXFCR_TF1CS(x) ((uint)((x-5)<<24)) /* FCC1 Transmit Clock Source */ | ||
37 | #define CMXFCR_RF2CS(x) ((uint)((x-9)<<19)) /* FCC2 Receive Clock Source */ | ||
38 | #define CMXFCR_TF2CS(x) ((uint)((x-9)<<16)) /* FCC2 Transmit Clock Source */ | ||
39 | #define CMXFCR_RF3CS(x) ((uint)((x-9)<<11)) /* FCC3 Receive Clock Source */ | ||
40 | #define CMXFCR_TF3CS(x) ((uint)((x-9)<<8)) /* FCC3 Transmit Clock Source */ | ||
41 | |||
42 | #define PC_F1RXCLK PC_CLK(F1_RXCLK) | ||
43 | #define PC_F1TXCLK PC_CLK(F1_TXCLK) | ||
44 | #define CMX1_CLK_ROUTE (CMXFCR_RF1CS(F1_RXCLK) | CMXFCR_TF1CS(F1_TXCLK)) | ||
45 | #define CMX1_CLK_MASK ((uint)0xff000000) | ||
46 | |||
47 | #define PC_F2RXCLK PC_CLK(F2_RXCLK) | ||
48 | #define PC_F2TXCLK PC_CLK(F2_TXCLK) | ||
49 | #define CMX2_CLK_ROUTE (CMXFCR_RF2CS(F2_RXCLK) | CMXFCR_TF2CS(F2_TXCLK)) | ||
50 | #define CMX2_CLK_MASK ((uint)0x00ff0000) | ||
51 | |||
52 | #define PC_F3RXCLK PC_CLK(F3_RXCLK) | ||
53 | #define PC_F3TXCLK PC_CLK(F3_TXCLK) | ||
54 | #define CMX3_CLK_ROUTE (CMXFCR_RF3CS(F3_RXCLK) | CMXFCR_TF3CS(F3_TXCLK)) | ||
55 | #define CMX3_CLK_MASK ((uint)0x0000ff00) | ||
56 | |||
57 | /* I/O Pin assignment for FCC1. I don't yet know the best way to do this, | ||
58 | * but there is little variation among the choices. | ||
59 | */ | ||
60 | #define PA1_COL 0x00000001U | ||
61 | #define PA1_CRS 0x00000002U | ||
62 | #define PA1_TXER 0x00000004U | ||
63 | #define PA1_TXEN 0x00000008U | ||
64 | #define PA1_RXDV 0x00000010U | ||
65 | #define PA1_RXER 0x00000020U | ||
66 | #define PA1_TXDAT 0x00003c00U | ||
67 | #define PA1_RXDAT 0x0003c000U | ||
68 | #define PA1_PSORA0 (PA1_RXDAT | PA1_TXDAT) | ||
69 | #define PA1_PSORA1 (PA1_COL | PA1_CRS | PA1_TXER | PA1_TXEN | \ | ||
70 | PA1_RXDV | PA1_RXER) | ||
71 | #define PA1_DIRA0 (PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV) | ||
72 | #define PA1_DIRA1 (PA1_TXDAT | PA1_TXEN | PA1_TXER) | ||
73 | |||
74 | |||
75 | /* I/O Pin assignment for FCC2. I don't yet know the best way to do this, | ||
76 | * but there is little variation among the choices. | ||
77 | */ | ||
78 | #define PB2_TXER 0x00000001U | ||
79 | #define PB2_RXDV 0x00000002U | ||
80 | #define PB2_TXEN 0x00000004U | ||
81 | #define PB2_RXER 0x00000008U | ||
82 | #define PB2_COL 0x00000010U | ||
83 | #define PB2_CRS 0x00000020U | ||
84 | #define PB2_TXDAT 0x000003c0U | ||
85 | #define PB2_RXDAT 0x00003c00U | ||
86 | #define PB2_PSORB0 (PB2_RXDAT | PB2_TXDAT | PB2_CRS | PB2_COL | \ | ||
87 | PB2_RXER | PB2_RXDV | PB2_TXER) | ||
88 | #define PB2_PSORB1 (PB2_TXEN) | ||
89 | #define PB2_DIRB0 (PB2_RXDAT | PB2_CRS | PB2_COL | PB2_RXER | PB2_RXDV) | ||
90 | #define PB2_DIRB1 (PB2_TXDAT | PB2_TXEN | PB2_TXER) | ||
91 | |||
92 | |||
93 | /* I/O Pin assignment for FCC3. I don't yet know the best way to do this, | ||
94 | * but there is little variation among the choices. | ||
95 | */ | ||
96 | #define PB3_RXDV 0x00004000U | ||
97 | #define PB3_RXER 0x00008000U | ||
98 | #define PB3_TXER 0x00010000U | ||
99 | #define PB3_TXEN 0x00020000U | ||
100 | #define PB3_COL 0x00040000U | ||
101 | #define PB3_CRS 0x00080000U | ||
102 | #define PB3_TXDAT 0x0f000000U | ||
103 | #define PB3_RXDAT 0x00f00000U | ||
104 | #define PB3_PSORB0 (PB3_RXDAT | PB3_TXDAT | PB3_CRS | PB3_COL | \ | ||
105 | PB3_RXER | PB3_RXDV | PB3_TXER | PB3_TXEN) | ||
106 | #define PB3_PSORB1 0 | ||
107 | #define PB3_DIRB0 (PB3_RXDAT | PB3_CRS | PB3_COL | PB3_RXER | PB3_RXDV) | ||
108 | #define PB3_DIRB1 (PB3_TXDAT | PB3_TXEN | PB3_TXER) | ||
109 | |||
110 | #define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128)) | ||
111 | #define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0) | ||
112 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1) | ||
113 | |||
114 | #endif | ||
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c index d06535802003..a0fc628ffb1e 100644 --- a/arch/ppc/platforms/prep_setup.c +++ b/arch/ppc/platforms/prep_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/platforms/prpmc750.c b/arch/ppc/platforms/prpmc750.c index 0bb14a5e824c..cdd9cfb13ee9 100644 --- a/arch/ppc/platforms/prpmc750.c +++ b/arch/ppc/platforms/prpmc750.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/prpmc750_setup.c | ||
3 | * | ||
4 | * Board setup routines for Motorola PrPMC750 | 2 | * Board setup routines for Motorola PrPMC750 |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/prpmc800.c b/arch/ppc/platforms/prpmc800.c index de7baefacd3a..e459a199fb1d 100644 --- a/arch/ppc/platforms/prpmc800.c +++ b/arch/ppc/platforms/prpmc800.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/prpmc800.c | ||
3 | * | ||
4 | * Author: Dale Farnsworth <dale.farnsworth@mvista.com> | 2 | * Author: Dale Farnsworth <dale.farnsworth@mvista.com> |
5 | * | 3 | * |
6 | * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c index 872c0a3ba3c7..bc26b6d71c1d 100644 --- a/arch/ppc/platforms/radstone_ppc7d.c +++ b/arch/ppc/platforms/radstone_ppc7d.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/radstone_ppc7d.c | ||
3 | * | ||
4 | * Board setup routines for the Radstone PPC7D boards. | 2 | * Board setup routines for the Radstone PPC7D boards. |
5 | * | 3 | * |
6 | * Author: James Chapman <jchapman@katalix.com> | 4 | * Author: James Chapman <jchapman@katalix.com> |
@@ -685,11 +683,10 @@ ppc7d_fixup_i2c_pdata(struct platform_device *pdev) | |||
685 | 683 | ||
686 | pdata = pdev->dev.platform_data; | 684 | pdata = pdev->dev.platform_data; |
687 | if (pdata == NULL) { | 685 | if (pdata == NULL) { |
688 | pdata = kmalloc(sizeof(*pdata), GFP_KERNEL); | 686 | pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); |
689 | if (pdata == NULL) | 687 | if (pdata == NULL) |
690 | return; | 688 | return; |
691 | 689 | ||
692 | memset(pdata, 0, sizeof(*pdata)); | ||
693 | pdev->dev.platform_data = pdata; | 690 | pdev->dev.platform_data = pdata; |
694 | } | 691 | } |
695 | 692 | ||
@@ -712,7 +709,7 @@ ppc7d_fixup_i2c_pdata(struct platform_device *pdev) | |||
712 | } | 709 | } |
713 | #endif | 710 | #endif |
714 | 711 | ||
715 | static int __init ppc7d_platform_notify(struct device *dev) | 712 | static int ppc7d_platform_notify(struct device *dev) |
716 | { | 713 | { |
717 | static struct { | 714 | static struct { |
718 | char *bus_id; | 715 | char *bus_id; |
diff --git a/arch/ppc/platforms/radstone_ppc7d.h b/arch/ppc/platforms/radstone_ppc7d.h index 938375510be4..2bb093a0c03e 100644 --- a/arch/ppc/platforms/radstone_ppc7d.h +++ b/arch/ppc/platforms/radstone_ppc7d.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/radstone_ppc7d.h | ||
3 | * | ||
4 | * Board definitions for the Radstone PPC7D boards. | 2 | * Board definitions for the Radstone PPC7D boards. |
5 | * | 3 | * |
6 | * Author: James Chapman <jchapman@katalix.com> | 4 | * Author: James Chapman <jchapman@katalix.com> |
diff --git a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c index 9eeed3572309..6dc459decb2d 100644 --- a/arch/ppc/platforms/sandpoint.c +++ b/arch/ppc/platforms/sandpoint.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/sandpoint_setup.c | ||
3 | * | ||
4 | * Board setup routines for the Motorola SPS Sandpoint Test Platform. | 2 | * Board setup routines for the Motorola SPS Sandpoint Test Platform. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/platforms/sandpoint.h b/arch/ppc/platforms/sandpoint.h index f4e982cb69df..3b64e6418489 100644 --- a/arch/ppc/platforms/sandpoint.h +++ b/arch/ppc/platforms/sandpoint.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/sandpoint.h | ||
3 | * | ||
4 | * Definitions for Motorola SPS Sandpoint Test Platform | 2 | * Definitions for Motorola SPS Sandpoint Test Platform |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c index 74c9ff72c3dd..866807b4ad0b 100644 --- a/arch/ppc/platforms/sbc82xx.c +++ b/arch/ppc/platforms/sbc82xx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/sbc82xx.c | ||
3 | * | ||
4 | * SBC82XX platform support | 2 | * SBC82XX platform support |
5 | * | 3 | * |
6 | * Author: Guy Streeter <streeter@redhat.com> | 4 | * Author: Guy Streeter <streeter@redhat.com> |
diff --git a/arch/ppc/platforms/spruce.c b/arch/ppc/platforms/spruce.c index 69e1de7971f2..3783deccd9b2 100644 --- a/arch/ppc/platforms/spruce.c +++ b/arch/ppc/platforms/spruce.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/spruce.c | ||
3 | * | ||
4 | * Board and PCI setup routines for IBM Spruce | 2 | * Board and PCI setup routines for IBM Spruce |
5 | * | 3 | * |
6 | * Author: MontaVista Software <source@mvista.com> | 4 | * Author: MontaVista Software <source@mvista.com> |
diff --git a/arch/ppc/platforms/tqm8260_setup.c b/arch/ppc/platforms/tqm8260_setup.c index 3409139330b1..b766339f44ac 100644 --- a/arch/ppc/platforms/tqm8260_setup.c +++ b/arch/ppc/platforms/tqm8260_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/tqm8260_setup.c | ||
3 | * | ||
4 | * TQM8260 platform support | 2 | * TQM8260 platform support |
5 | * | 3 | * |
6 | * Author: Allen Curtis <acurtis@onz.com> | 4 | * Author: Allen Curtis <acurtis@onz.com> |
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index 159dcd92a6d1..5cb62c6a51c8 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile | |||
@@ -17,8 +17,8 @@ obj-$(CONFIG_440GX) += ibm440gx_common.o | |||
17 | obj-$(CONFIG_440SP) += ibm440gx_common.o ibm440sp_common.o | 17 | obj-$(CONFIG_440SP) += ibm440gx_common.o ibm440sp_common.o |
18 | obj-$(CONFIG_440SPE) += ibm440gx_common.o ibm440sp_common.o ppc440spe_pcie.o | 18 | obj-$(CONFIG_440SPE) += ibm440gx_common.o ibm440sp_common.o ppc440spe_pcie.o |
19 | ifeq ($(CONFIG_4xx),y) | 19 | ifeq ($(CONFIG_4xx),y) |
20 | ifeq ($(CONFIG_VIRTEX_II_PRO),y) | 20 | ifeq ($(CONFIG_XILINX_VIRTEX),y) |
21 | obj-$(CONFIG_40x) += xilinx_pic.o | 21 | obj-$(CONFIG_40x) += xilinx_pic.o ppc_sys.o |
22 | else | 22 | else |
23 | ifeq ($(CONFIG_403),y) | 23 | ifeq ($(CONFIG_403),y) |
24 | obj-$(CONFIG_40x) += ppc403_pic.o | 24 | obj-$(CONFIG_40x) += ppc403_pic.o |
diff --git a/arch/ppc/syslib/cpc700.h b/arch/ppc/syslib/cpc700.h index f2c002531019..0a8a5d84390f 100644 --- a/arch/ppc/syslib/cpc700.h +++ b/arch/ppc/syslib/cpc700.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/cpc700.h | ||
3 | * | ||
4 | * Header file for IBM CPC700 Host Bridge, et. al. | 2 | * Header file for IBM CPC700 Host Bridge, et. al. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/syslib/cpc700_pic.c b/arch/ppc/syslib/cpc700_pic.c index 75fe8eb10693..5add0a919ef6 100644 --- a/arch/ppc/syslib/cpc700_pic.c +++ b/arch/ppc/syslib/cpc700_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/cpc700_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for IBM Spruce | 2 | * Interrupt controller support for IBM Spruce |
5 | * | 3 | * |
6 | * Authors: Mark Greer, Matt Porter, and Johnnie Peters | 4 | * Authors: Mark Greer, Matt Porter, and Johnnie Peters |
diff --git a/arch/ppc/syslib/cpc710.h b/arch/ppc/syslib/cpc710.h index cc0afd804029..5299bf8b5d01 100644 --- a/arch/ppc/syslib/cpc710.h +++ b/arch/ppc/syslib/cpc710.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/cpc710.h | ||
3 | * | ||
4 | * Definitions for the IBM CPC710 PCI Host Bridge | 2 | * Definitions for the IBM CPC710 PCI Host Bridge |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/syslib/gen550.h b/arch/ppc/syslib/gen550.h index 039d249e19a8..5254d3cdbca6 100644 --- a/arch/ppc/syslib/gen550.h +++ b/arch/ppc/syslib/gen550.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gen550.h | ||
3 | * | ||
4 | * gen550 prototypes | 2 | * gen550 prototypes |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/gen550_dbg.c b/arch/ppc/syslib/gen550_dbg.c index 9ef0113c83d1..9fcff74bfdd0 100644 --- a/arch/ppc/syslib/gen550_dbg.c +++ b/arch/ppc/syslib/gen550_dbg.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gen550_dbg.c | ||
3 | * | ||
4 | * A library of polled 16550 serial routines. These are intended to | 2 | * A library of polled 16550 serial routines. These are intended to |
5 | * be used to support progress messages, xmon, kgdb, etc. on a | 3 | * be used to support progress messages, xmon, kgdb, etc. on a |
6 | * variety of platforms. | 4 | * variety of platforms. |
diff --git a/arch/ppc/syslib/gen550_kgdb.c b/arch/ppc/syslib/gen550_kgdb.c index 7239d5d7ddcd..874078a7664d 100644 --- a/arch/ppc/syslib/gen550_kgdb.c +++ b/arch/ppc/syslib/gen550_kgdb.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gen550_kgdb.c | ||
3 | * | ||
4 | * Generic 16550 kgdb support intended to be useful on a variety | 2 | * Generic 16550 kgdb support intended to be useful on a variety |
5 | * of platforms. To enable this support, it is necessary to set | 3 | * of platforms. To enable this support, it is necessary to set |
6 | * the CONFIG_GEN550 option. Any virtual mapping of the serial | 4 | * the CONFIG_GEN550 option. Any virtual mapping of the serial |
diff --git a/arch/ppc/syslib/gt64260_pic.c b/arch/ppc/syslib/gt64260_pic.c index f97b3a9abd1e..dc3bd9ecbbf6 100644 --- a/arch/ppc/syslib/gt64260_pic.c +++ b/arch/ppc/syslib/gt64260_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gt64260_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for Galileo's GT64260. | 2 | * Interrupt controller support for Galileo's GT64260. |
5 | * | 3 | * |
6 | * Author: Chris Zankel <source@mvista.com> | 4 | * Author: Chris Zankel <source@mvista.com> |
diff --git a/arch/ppc/syslib/harrier.c b/arch/ppc/syslib/harrier.c index a6b3f8645793..c1583f488325 100644 --- a/arch/ppc/syslib/harrier.c +++ b/arch/ppc/syslib/harrier.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/harrier.c | ||
3 | * | ||
4 | * Motorola MCG Harrier northbridge/memory controller support | 2 | * Motorola MCG Harrier northbridge/memory controller support |
5 | * | 3 | * |
6 | * Author: Dale Farnsworth | 4 | * Author: Dale Farnsworth |
diff --git a/arch/ppc/syslib/hawk_common.c b/arch/ppc/syslib/hawk_common.c index a9911dc3a82f..c5bf16b0d6a1 100644 --- a/arch/ppc/syslib/hawk_common.c +++ b/arch/ppc/syslib/hawk_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/hawk_common.c | ||
3 | * | ||
4 | * Common Motorola PowerPlus Platform--really Falcon/Raven or HAWK. | 2 | * Common Motorola PowerPlus Platform--really Falcon/Raven or HAWK. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/syslib/ibm440gp_common.c b/arch/ppc/syslib/ibm440gp_common.c index 0d6be2d6dd67..fbaae5f6d834 100644 --- a/arch/ppc/syslib/ibm440gp_common.c +++ b/arch/ppc/syslib/ibm440gp_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm440gp_common.c | ||
3 | * | ||
4 | * PPC440GP system library | 2 | * PPC440GP system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/syslib/ibm440gp_common.h b/arch/ppc/syslib/ibm440gp_common.h index a054d83cb1ac..f48529f3c23d 100644 --- a/arch/ppc/syslib/ibm440gp_common.h +++ b/arch/ppc/syslib/ibm440gp_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm440gp_common.h | ||
3 | * | ||
4 | * PPC440GP system library | 2 | * PPC440GP system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ibm440gx_common.c b/arch/ppc/syslib/ibm440gx_common.c index c36db279b43d..a7dd55f1c63e 100644 --- a/arch/ppc/syslib/ibm440gx_common.c +++ b/arch/ppc/syslib/ibm440gx_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm440gx_common.c | ||
3 | * | ||
4 | * PPC440GX system library | 2 | * PPC440GX system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ibm440gx_common.h b/arch/ppc/syslib/ibm440gx_common.h index e73aa0411d35..a2ab9fab8e34 100644 --- a/arch/ppc/syslib/ibm440gx_common.h +++ b/arch/ppc/syslib/ibm440gx_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm440gx_common.h | ||
3 | * | ||
4 | * PPC440GX system library | 2 | * PPC440GX system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ibm440sp_common.c b/arch/ppc/syslib/ibm440sp_common.c index cdafda127d81..293e4138d172 100644 --- a/arch/ppc/syslib/ibm440sp_common.c +++ b/arch/ppc/syslib/ibm440sp_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm440sp_common.c | ||
3 | * | ||
4 | * PPC440SP/PPC440SPe system library | 2 | * PPC440SP/PPC440SPe system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ibm440sp_common.h b/arch/ppc/syslib/ibm440sp_common.h index a21a9906dcc9..8077bf8ed118 100644 --- a/arch/ppc/syslib/ibm440sp_common.h +++ b/arch/ppc/syslib/ibm440sp_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm440sp_common.h | ||
3 | * | ||
4 | * PPC440SP system library | 2 | * PPC440SP system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ibm44x_common.c b/arch/ppc/syslib/ibm44x_common.c index 71db11d22158..14a981a5cea7 100644 --- a/arch/ppc/syslib/ibm44x_common.c +++ b/arch/ppc/syslib/ibm44x_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm44x_common.c | ||
3 | * | ||
4 | * PPC44x system library | 2 | * PPC44x system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ibm44x_common.h b/arch/ppc/syslib/ibm44x_common.h index b25a8995e4e9..f179db8634e0 100644 --- a/arch/ppc/syslib/ibm44x_common.h +++ b/arch/ppc/syslib/ibm44x_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm44x_common.h | ||
3 | * | ||
4 | * PPC44x system library | 2 | * PPC44x system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/m8260_pci_erratum9.c b/arch/ppc/syslib/m8260_pci_erratum9.c index 1dc7e4e1d491..99e4bc0e42af 100644 --- a/arch/ppc/syslib/m8260_pci_erratum9.c +++ b/arch/ppc/syslib/m8260_pci_erratum9.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8260_pci9.c | ||
3 | * | ||
4 | * Workaround for device erratum PCI 9. | 2 | * Workaround for device erratum PCI 9. |
5 | * See Motorola's "XPC826xA Family Device Errata Reference." | 3 | * See Motorola's "XPC826xA Family Device Errata Reference." |
6 | * The erratum applies to all 8260 family Hip4 processors. It is scheduled | 4 | * The erratum applies to all 8260 family Hip4 processors. It is scheduled |
diff --git a/arch/ppc/syslib/m8260_setup.c b/arch/ppc/syslib/m8260_setup.c index 76a2aa4ce65e..b7a6cb2d8d52 100644 --- a/arch/ppc/syslib/m8260_setup.c +++ b/arch/ppc/syslib/m8260_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/m8260_setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c index 688616de3cde..dae9af78bde1 100644 --- a/arch/ppc/syslib/m8xx_setup.c +++ b/arch/ppc/syslib/m8xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
@@ -34,6 +32,13 @@ | |||
34 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
35 | #include <linux/root_dev.h> | 33 | #include <linux/root_dev.h> |
36 | 34 | ||
35 | #if defined(CONFIG_MTD) && defined(CONFIG_MTD_PHYSMAP) | ||
36 | #include <linux/mtd/partitions.h> | ||
37 | #include <linux/mtd/physmap.h> | ||
38 | #include <linux/mtd/mtd.h> | ||
39 | #include <linux/mtd/map.h> | ||
40 | #endif | ||
41 | |||
37 | #include <asm/mmu.h> | 42 | #include <asm/mmu.h> |
38 | #include <asm/reg.h> | 43 | #include <asm/reg.h> |
39 | #include <asm/residual.h> | 44 | #include <asm/residual.h> |
@@ -49,6 +54,34 @@ | |||
49 | 54 | ||
50 | #include "ppc8xx_pic.h" | 55 | #include "ppc8xx_pic.h" |
51 | 56 | ||
57 | #ifdef CONFIG_MTD_PHYSMAP | ||
58 | #define MPC8xxADS_BANK_WIDTH 4 | ||
59 | #endif | ||
60 | |||
61 | #define MPC8xxADS_U_BOOT_SIZE 0x80000 | ||
62 | #define MPC8xxADS_FREE_AREA_OFFSET MPC8xxADS_U_BOOT_SIZE | ||
63 | |||
64 | #if defined(CONFIG_MTD_PARTITIONS) | ||
65 | /* | ||
66 | NOTE: bank width and interleave relative to the installed flash | ||
67 | should have been chosen within MTD_CFI_GEOMETRY options. | ||
68 | */ | ||
69 | static struct mtd_partition mpc8xxads_partitions[] = { | ||
70 | { | ||
71 | .name = "bootloader", | ||
72 | .size = MPC8xxADS_U_BOOT_SIZE, | ||
73 | .offset = 0, | ||
74 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
75 | }, { | ||
76 | .name = "User FS", | ||
77 | .offset = MPC8xxADS_FREE_AREA_OFFSET | ||
78 | } | ||
79 | }; | ||
80 | |||
81 | #define mpc8xxads_part_num (sizeof (mpc8xxads_partitions) / sizeof (mpc8xxads_partitions[0])) | ||
82 | |||
83 | #endif | ||
84 | |||
52 | static int m8xx_set_rtc_time(unsigned long time); | 85 | static int m8xx_set_rtc_time(unsigned long time); |
53 | static unsigned long m8xx_get_rtc_time(void); | 86 | static unsigned long m8xx_get_rtc_time(void); |
54 | void m8xx_calibrate_decr(void); | 87 | void m8xx_calibrate_decr(void); |
@@ -71,6 +104,10 @@ board_init(void) | |||
71 | void __init | 104 | void __init |
72 | m8xx_setup_arch(void) | 105 | m8xx_setup_arch(void) |
73 | { | 106 | { |
107 | #if defined(CONFIG_MTD) && defined(CONFIG_MTD_PHYSMAP) | ||
108 | bd_t *binfo = (bd_t *)__res; | ||
109 | #endif | ||
110 | |||
74 | /* Reset the Communication Processor Module. | 111 | /* Reset the Communication Processor Module. |
75 | */ | 112 | */ |
76 | m8xx_cpm_reset(); | 113 | m8xx_cpm_reset(); |
@@ -106,6 +143,17 @@ m8xx_setup_arch(void) | |||
106 | } | 143 | } |
107 | #endif | 144 | #endif |
108 | #endif | 145 | #endif |
146 | |||
147 | #if defined (CONFIG_MPC86XADS) || defined (CONFIG_MPC885ADS) | ||
148 | #if defined(CONFIG_MTD_PHYSMAP) | ||
149 | physmap_configure(binfo->bi_flashstart, binfo->bi_flashsize, | ||
150 | MPC8xxADS_BANK_WIDTH, NULL); | ||
151 | #ifdef CONFIG_MTD_PARTITIONS | ||
152 | physmap_set_partitions(mpc8xxads_partitions, mpc8xxads_part_num); | ||
153 | #endif /* CONFIG_MTD_PARTITIONS */ | ||
154 | #endif /* CONFIG_MTD_PHYSMAP */ | ||
155 | #endif | ||
156 | |||
109 | board_init(); | 157 | board_init(); |
110 | } | 158 | } |
111 | 159 | ||
@@ -140,9 +188,11 @@ void __init __attribute__ ((weak)) | |||
140 | init_internal_rtc(void) | 188 | init_internal_rtc(void) |
141 | { | 189 | { |
142 | /* Disable the RTC one second and alarm interrupts. */ | 190 | /* Disable the RTC one second and alarm interrupts. */ |
143 | out_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, in_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc) & ~(RTCSC_SIE | RTCSC_ALE)); | 191 | clrbits16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, (RTCSC_SIE | RTCSC_ALE)); |
192 | |||
144 | /* Enable the RTC */ | 193 | /* Enable the RTC */ |
145 | out_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, in_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc) | (RTCSC_RTF | RTCSC_RTE)); | 194 | setbits16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, (RTCSC_RTF | RTCSC_RTE)); |
195 | |||
146 | } | 196 | } |
147 | 197 | ||
148 | /* The decrementer counts at the system (internal) clock frequency divided by | 198 | /* The decrementer counts at the system (internal) clock frequency divided by |
@@ -159,8 +209,7 @@ void __init m8xx_calibrate_decr(void) | |||
159 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrstk.cark_sccrk, KAPWR_KEY); | 209 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrstk.cark_sccrk, KAPWR_KEY); |
160 | 210 | ||
161 | /* Force all 8xx processors to use divide by 16 processor clock. */ | 211 | /* Force all 8xx processors to use divide by 16 processor clock. */ |
162 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr, | 212 | setbits32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr, 0x02000000); |
163 | in_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr)|0x02000000); | ||
164 | /* Processor frequency is MHz. | 213 | /* Processor frequency is MHz. |
165 | * The value 'fp' is the number of decrementer ticks per second. | 214 | * The value 'fp' is the number of decrementer ticks per second. |
166 | */ | 215 | */ |
@@ -239,8 +288,8 @@ m8xx_restart(char *cmd) | |||
239 | __volatile__ unsigned char dummy; | 288 | __volatile__ unsigned char dummy; |
240 | 289 | ||
241 | local_irq_disable(); | 290 | local_irq_disable(); |
242 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr, in_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr) | 0x00000080); | ||
243 | 291 | ||
292 | setbits32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr, 0x00000080); | ||
244 | /* Clear the ME bit in MSR to cause checkstop on machine check | 293 | /* Clear the ME bit in MSR to cause checkstop on machine check |
245 | */ | 294 | */ |
246 | mtmsr(mfmsr() & ~0x1000); | 295 | mtmsr(mfmsr() & ~0x1000); |
@@ -310,8 +359,8 @@ m8xx_init_IRQ(void) | |||
310 | i8259_init(0); | 359 | i8259_init(0); |
311 | 360 | ||
312 | /* The i8259 cascade interrupt must be level sensitive. */ | 361 | /* The i8259 cascade interrupt must be level sensitive. */ |
313 | out_be32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel, in_be32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel & ~(0x80000000 >> ISA_BRIDGE_INT))); | ||
314 | 362 | ||
363 | clrbits32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel, (0x80000000 >> ISA_BRIDGE_INT)); | ||
315 | if (setup_irq(ISA_BRIDGE_INT, &mbx_i8259_irqaction)) | 364 | if (setup_irq(ISA_BRIDGE_INT, &mbx_i8259_irqaction)) |
316 | enable_irq(ISA_BRIDGE_INT); | 365 | enable_irq(ISA_BRIDGE_INT); |
317 | #endif /* CONFIG_PCI */ | 366 | #endif /* CONFIG_PCI */ |
diff --git a/arch/ppc/syslib/m8xx_wdt.c b/arch/ppc/syslib/m8xx_wdt.c index df6c9557b86a..ac11d7bab443 100644 --- a/arch/ppc/syslib/m8xx_wdt.c +++ b/arch/ppc/syslib/m8xx_wdt.c | |||
@@ -41,8 +41,7 @@ static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) | |||
41 | 41 | ||
42 | m8xx_wdt_reset(); | 42 | m8xx_wdt_reset(); |
43 | 43 | ||
44 | out_be16(&imap->im_sit.sit_piscr, in_be16(&imap->im_sit.sit_piscr) | PISCR_PS); /* clear irq */ | 44 | setbits16(&imap->im_sit.sit_piscr, PISCR_PS); |
45 | |||
46 | return IRQ_HANDLED; | 45 | return IRQ_HANDLED; |
47 | } | 46 | } |
48 | 47 | ||
diff --git a/arch/ppc/syslib/mpc10x_common.c b/arch/ppc/syslib/mpc10x_common.c index 3e039706bdbc..2fc7c4150a18 100644 --- a/arch/ppc/syslib/mpc10x_common.c +++ b/arch/ppc/syslib/mpc10x_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc10x_common.c | ||
3 | * | ||
4 | * Common routines for the Motorola SPS MPC106, MPC107 and MPC8240 Host bridge, | 2 | * Common routines for the Motorola SPS MPC106, MPC107 and MPC8240 Host bridge, |
5 | * Mem ctlr, EPIC, etc. | 3 | * Mem ctlr, EPIC, etc. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_devices.c b/arch/ppc/syslib/mpc52xx_devices.c index da3c74bfdc92..7487539a4e92 100644 --- a/arch/ppc/syslib/mpc52xx_devices.c +++ b/arch/ppc/syslib/mpc52xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_devices.c | ||
3 | * | ||
4 | * Freescale MPC52xx device descriptions | 2 | * Freescale MPC52xx device descriptions |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c index 313c96ec7eb1..9ec525f9fe98 100644 --- a/arch/ppc/syslib/mpc52xx_pci.c +++ b/arch/ppc/syslib/mpc52xx_pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_pci.c | ||
3 | * | ||
4 | * PCI code for the Freescale MPC52xx embedded CPU. | 2 | * PCI code for the Freescale MPC52xx embedded CPU. |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_pci.h b/arch/ppc/syslib/mpc52xx_pci.h index 04b509a02530..77d47dbba85e 100644 --- a/arch/ppc/syslib/mpc52xx_pci.h +++ b/arch/ppc/syslib/mpc52xx_pci.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_pci.h | ||
3 | * | ||
4 | * PCI Include file the Freescale MPC52xx embedded cpu chips | 2 | * PCI Include file the Freescale MPC52xx embedded cpu chips |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_pic.c b/arch/ppc/syslib/mpc52xx_pic.c index 4c4497e62517..c4406f9dc6a3 100644 --- a/arch/ppc/syslib/mpc52xx_pic.c +++ b/arch/ppc/syslib/mpc52xx_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_pic.c | ||
3 | * | ||
4 | * Programmable Interrupt Controller functions for the Freescale MPC52xx | 2 | * Programmable Interrupt Controller functions for the Freescale MPC52xx |
5 | * embedded CPU. | 3 | * embedded CPU. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c index a4a4b02227df..2ee48ce0a517 100644 --- a/arch/ppc/syslib/mpc52xx_setup.c +++ b/arch/ppc/syslib/mpc52xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_setup.c | ||
3 | * | ||
4 | * Common code for the boards based on Freescale MPC52xx embedded CPU. | 2 | * Common code for the boards based on Freescale MPC52xx embedded CPU. |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_sys.c b/arch/ppc/syslib/mpc52xx_sys.c index 9a0f90aa8aac..b4e6f978f057 100644 --- a/arch/ppc/syslib/mpc52xx_sys.c +++ b/arch/ppc/syslib/mpc52xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_sys.c | ||
3 | * | ||
4 | * Freescale MPC52xx system descriptions | 2 | * Freescale MPC52xx system descriptions |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc83xx_devices.c b/arch/ppc/syslib/mpc83xx_devices.c index f9b95de70e23..1af2c000fcfa 100644 --- a/arch/ppc/syslib/mpc83xx_devices.c +++ b/arch/ppc/syslib/mpc83xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc83xx_devices.c | ||
3 | * | ||
4 | * MPC83xx Device descriptions | 2 | * MPC83xx Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc83xx_sys.c b/arch/ppc/syslib/mpc83xx_sys.c index 82cf3ab77f4a..0498ae7e01e3 100644 --- a/arch/ppc/syslib/mpc83xx_sys.c +++ b/arch/ppc/syslib/mpc83xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc83xx_sys.c | ||
3 | * | ||
4 | * MPC83xx System descriptions | 2 | * MPC83xx System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc85xx_devices.c b/arch/ppc/syslib/mpc85xx_devices.c index 00e9b6ff2f6e..7735336f5b8f 100644 --- a/arch/ppc/syslib/mpc85xx_devices.c +++ b/arch/ppc/syslib/mpc85xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_devices.c | ||
3 | * | ||
4 | * MPC85xx Device descriptions | 2 | * MPC85xx Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc85xx_sys.c b/arch/ppc/syslib/mpc85xx_sys.c index 397cfbcce5ea..d96a93dbcb5a 100644 --- a/arch/ppc/syslib/mpc85xx_sys.c +++ b/arch/ppc/syslib/mpc85xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_sys.c | ||
3 | * | ||
4 | * MPC85xx System descriptions | 2 | * MPC85xx System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc8xx_devices.c b/arch/ppc/syslib/mpc8xx_devices.c index 92dc98b36bde..bd41ed83beb3 100644 --- a/arch/ppc/syslib/mpc8xx_devices.c +++ b/arch/ppc/syslib/mpc8xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc8xx_devices.c | ||
3 | * | ||
4 | * MPC8xx Device descriptions | 2 | * MPC8xx Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc8xx_sys.c b/arch/ppc/syslib/mpc8xx_sys.c index d3c617521603..eee213284855 100644 --- a/arch/ppc/syslib/mpc8xx_sys.c +++ b/arch/ppc/syslib/mpc8xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8xx_sys.c | ||
3 | * | ||
4 | * MPC8xx System descriptions | 2 | * MPC8xx System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c index 58b0aa813e85..5a19697060f0 100644 --- a/arch/ppc/syslib/mv64360_pic.c +++ b/arch/ppc/syslib/mv64360_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/mv64360_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for Marvell's MV64360. | 2 | * Interrupt controller support for Marvell's MV64360. |
5 | * | 3 | * |
6 | * Author: Rabeeh Khoury <rabeeh@galileo.co.il> | 4 | * Author: Rabeeh Khoury <rabeeh@galileo.co.il> |
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c index 1f01b7e2376b..3b039c30a439 100644 --- a/arch/ppc/syslib/mv64x60.c +++ b/arch/ppc/syslib/mv64x60.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mv64x60.c | ||
3 | * | ||
4 | * Common routines for the Marvell/Galileo Discovery line of host bridges | 2 | * Common routines for the Marvell/Galileo Discovery line of host bridges |
5 | * (gt64260, mv64360, mv64460, ...). | 3 | * (gt64260, mv64360, mv64460, ...). |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mv64x60_dbg.c b/arch/ppc/syslib/mv64x60_dbg.c index fa5b2e45e0ca..9cf18764a1a1 100644 --- a/arch/ppc/syslib/mv64x60_dbg.c +++ b/arch/ppc/syslib/mv64x60_dbg.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mv64x60_dbg.c | ||
3 | * | ||
4 | * KGDB and progress routines for the Marvell/Galileo MV64x60 (Discovery). | 2 | * KGDB and progress routines for the Marvell/Galileo MV64x60 (Discovery). |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/syslib/mv64x60_win.c b/arch/ppc/syslib/mv64x60_win.c index 5b827e2bbe22..4bf1ad17bf1a 100644 --- a/arch/ppc/syslib/mv64x60_win.c +++ b/arch/ppc/syslib/mv64x60_win.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mv64x60_win.c | ||
3 | * | ||
4 | * Tables with info on how to manipulate the 32 & 64 bit windows on the | 2 | * Tables with info on how to manipulate the 32 & 64 bit windows on the |
5 | * various types of Marvell bridge chips. | 3 | * various types of Marvell bridge chips. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c index 2fe28ded2c60..a4ecc2ee579f 100644 --- a/arch/ppc/syslib/ocp.c +++ b/arch/ppc/syslib/ocp.c | |||
@@ -451,10 +451,9 @@ ocp_driver_init(void) | |||
451 | DBG(("ocp: ocp_driver_init()...\n")); | 451 | DBG(("ocp: ocp_driver_init()...\n")); |
452 | 452 | ||
453 | /* Allocate/register primary OCP bus */ | 453 | /* Allocate/register primary OCP bus */ |
454 | ocp_bus = kmalloc(sizeof(struct device), GFP_KERNEL); | 454 | ocp_bus = kzalloc(sizeof(struct device), GFP_KERNEL); |
455 | if (ocp_bus == NULL) | 455 | if (ocp_bus == NULL) |
456 | return 1; | 456 | return 1; |
457 | memset(ocp_bus, 0, sizeof(struct device)); | ||
458 | strcpy(ocp_bus->bus_id, "ocp"); | 457 | strcpy(ocp_bus->bus_id, "ocp"); |
459 | 458 | ||
460 | bus_register(&ocp_bus_type); | 459 | bus_register(&ocp_bus_type); |
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c index 894779712b46..38e5b93fbe41 100644 --- a/arch/ppc/syslib/open_pic.c +++ b/arch/ppc/syslib/open_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | 2 | * Copyright (C) 1997 Geert Uytterhoeven |
5 | * | 3 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c index 1c40049b9a45..bcbe40de26fe 100644 --- a/arch/ppc/syslib/open_pic2.c +++ b/arch/ppc/syslib/open_pic2.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | 2 | * Copyright (C) 1997 Geert Uytterhoeven |
5 | * | 3 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
diff --git a/arch/ppc/syslib/open_pic_defs.h b/arch/ppc/syslib/open_pic_defs.h index 6c94e7131463..3a25de7cb572 100644 --- a/arch/ppc/syslib/open_pic_defs.h +++ b/arch/ppc/syslib/open_pic_defs.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/open_pic_defs.h -- OpenPIC definitions | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | 2 | * Copyright (C) 1997 Geert Uytterhoeven |
5 | * | 3 | * |
6 | * This file is based on the following documentation: | 4 | * This file is based on the following documentation: |
diff --git a/arch/ppc/syslib/pci_auto.c b/arch/ppc/syslib/pci_auto.c index d64207c2a972..ee20a86fcc4b 100644 --- a/arch/ppc/syslib/pci_auto.c +++ b/arch/ppc/syslib/pci_auto.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/pci_auto.c | ||
3 | * | ||
4 | * PCI autoconfiguration library | 2 | * PCI autoconfiguration library |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/syslib/ppc4xx_dma.c b/arch/ppc/syslib/ppc4xx_dma.c index 05ccd598dd4e..b40b96a8c609 100644 --- a/arch/ppc/syslib/ppc4xx_dma.c +++ b/arch/ppc/syslib/ppc4xx_dma.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ppc4xx_dma.c | ||
3 | * | ||
4 | * IBM PPC4xx DMA engine core library | 2 | * IBM PPC4xx DMA engine core library |
5 | * | 3 | * |
6 | * Copyright 2000-2004 MontaVista Software Inc. | 4 | * Copyright 2000-2004 MontaVista Software Inc. |
diff --git a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c index aa4165144ec2..fd9af0fc0e9f 100644 --- a/arch/ppc/syslib/ppc4xx_pic.c +++ b/arch/ppc/syslib/ppc4xx_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc4xx_pic.c | ||
3 | * | ||
4 | * Interrupt controller driver for PowerPC 4xx-based processors. | 2 | * Interrupt controller driver for PowerPC 4xx-based processors. |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ppc4xx_pm.c b/arch/ppc/syslib/ppc4xx_pm.c deleted file mode 100644 index 60a479204885..000000000000 --- a/arch/ppc/syslib/ppc4xx_pm.c +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Author: Armin Kuster <akuster@mvista.com> | ||
3 | * | ||
4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | ||
5 | * the terms of the GNU General Public License version 2. This program | ||
6 | * is licensed "as is" without any warranty of any kind, whether express | ||
7 | * or implied. | ||
8 | * | ||
9 | * This an attempt to get Power Management going for the IBM 4xx processor. | ||
10 | * This was derived from the ppc4xx._setup.c file | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | #include <linux/init.h> | ||
15 | |||
16 | #include <asm/ibm4xx.h> | ||
17 | |||
18 | void __init | ||
19 | ppc4xx_pm_init(void) | ||
20 | { | ||
21 | |||
22 | unsigned int value = 0; | ||
23 | |||
24 | /* turn off unused hardware to save power */ | ||
25 | #ifdef CONFIG_405GP | ||
26 | value |= CPM_DCP; /* CodePack */ | ||
27 | #endif | ||
28 | |||
29 | #if !defined(CONFIG_IBM_OCP_GPIO) | ||
30 | value |= CPM_GPIO0; | ||
31 | #endif | ||
32 | |||
33 | #if !defined(CONFIG_PPC405_I2C_ADAP) | ||
34 | value |= CPM_IIC0; | ||
35 | #ifdef CONFIG_STB03xxx | ||
36 | value |= CPM_IIC1; | ||
37 | #endif | ||
38 | #endif | ||
39 | |||
40 | |||
41 | #if !defined(CONFIG_405_DMA) | ||
42 | value |= CPM_DMA; | ||
43 | #endif | ||
44 | |||
45 | mtdcr(DCRN_CPMFR, value); | ||
46 | |||
47 | } | ||
diff --git a/arch/ppc/syslib/ppc4xx_sgdma.c b/arch/ppc/syslib/ppc4xx_sgdma.c index 9f76e8ee39ed..280ea010a9c8 100644 --- a/arch/ppc/syslib/ppc4xx_sgdma.c +++ b/arch/ppc/syslib/ppc4xx_sgdma.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ppc4xx_sgdma.c | ||
3 | * | ||
4 | * IBM PPC4xx DMA engine scatter/gather library | 2 | * IBM PPC4xx DMA engine scatter/gather library |
5 | * | 3 | * |
6 | * Copyright 2002-2003 MontaVista Software Inc. | 4 | * Copyright 2002-2003 MontaVista Software Inc. |
diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c index 7bada82527a8..26afd637dc81 100644 --- a/arch/ppc/syslib/ppc83xx_setup.c +++ b/arch/ppc/syslib/ppc83xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc83xx_setup.c | ||
3 | * | ||
4 | * MPC83XX common board code | 2 | * MPC83XX common board code |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc83xx_setup.h b/arch/ppc/syslib/ppc83xx_setup.h index a122a7322e5e..478b011cd963 100644 --- a/arch/ppc/syslib/ppc83xx_setup.h +++ b/arch/ppc/syslib/ppc83xx_setup.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc83xx_setup.h | ||
3 | * | ||
4 | * MPC83XX common board definitions | 2 | * MPC83XX common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_common.c b/arch/ppc/syslib/ppc85xx_common.c index 19ad537225e4..0145c968f9ad 100644 --- a/arch/ppc/syslib/ppc85xx_common.c +++ b/arch/ppc/syslib/ppc85xx_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_common.c | ||
3 | * | ||
4 | * MPC85xx support routines | 2 | * MPC85xx support routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_common.h b/arch/ppc/syslib/ppc85xx_common.h index 94edf32151dd..182744a1321c 100644 --- a/arch/ppc/syslib/ppc85xx_common.h +++ b/arch/ppc/syslib/ppc85xx_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_common.h | ||
3 | * | ||
4 | * MPC85xx support routines | 2 | * MPC85xx support routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c index e4dda43fdaa7..79b7089d7500 100644 --- a/arch/ppc/syslib/ppc85xx_setup.c +++ b/arch/ppc/syslib/ppc85xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_setup.c | ||
3 | * | ||
4 | * MPC85XX common board code | 2 | * MPC85XX common board code |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
@@ -237,7 +235,7 @@ mpc85xx_setup_pci2(struct pci_controller *hose) | |||
237 | (__ilog2(MPC85XX_PCI2_UPPER_MEM - MPC85XX_PCI2_LOWER_MEM + 1) - 1); | 235 | (__ilog2(MPC85XX_PCI2_UPPER_MEM - MPC85XX_PCI2_LOWER_MEM + 1) - 1); |
238 | 236 | ||
239 | /* Setup outbound IO windows @ MPC85XX_PCI2_IO_BASE */ | 237 | /* Setup outbound IO windows @ MPC85XX_PCI2_IO_BASE */ |
240 | pci->potar2 = (MPC85XX_PCI2_LOWER_IO >> 12) & 0x000fffff;; | 238 | pci->potar2 = (MPC85XX_PCI2_LOWER_IO >> 12) & 0x000fffff; |
241 | pci->potear2 = 0x00000000; | 239 | pci->potear2 = 0x00000000; |
242 | pci->powbar2 = (MPC85XX_PCI2_IO_BASE >> 12) & 0x000fffff; | 240 | pci->powbar2 = (MPC85XX_PCI2_IO_BASE >> 12) & 0x000fffff; |
243 | /* Enable, IO R/W */ | 241 | /* Enable, IO R/W */ |
diff --git a/arch/ppc/syslib/ppc85xx_setup.h b/arch/ppc/syslib/ppc85xx_setup.h index e340b0545fb5..f55b8032d3d9 100644 --- a/arch/ppc/syslib/ppc85xx_setup.h +++ b/arch/ppc/syslib/ppc85xx_setup.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_setup.h | ||
3 | * | ||
4 | * MPC85XX common board definitions | 2 | * MPC85XX common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc_sys.c b/arch/ppc/syslib/ppc_sys.c index c0b93c4191ee..60c724e11584 100644 --- a/arch/ppc/syslib/ppc_sys.c +++ b/arch/ppc/syslib/ppc_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc_sys.c | ||
3 | * | ||
4 | * PPC System library functions | 2 | * PPC System library functions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
@@ -15,11 +13,22 @@ | |||
15 | */ | 13 | */ |
16 | 14 | ||
17 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/bootmem.h> | ||
18 | #include <asm/ppc_sys.h> | 17 | #include <asm/ppc_sys.h> |
19 | 18 | ||
20 | int (*ppc_sys_device_fixup) (struct platform_device * pdev); | 19 | int (*ppc_sys_device_fixup) (struct platform_device * pdev); |
21 | 20 | ||
22 | static int ppc_sys_inited; | 21 | static int ppc_sys_inited; |
22 | static int ppc_sys_func_inited; | ||
23 | |||
24 | static const char *ppc_sys_func_names[] = { | ||
25 | [PPC_SYS_FUNC_DUMMY] = "dummy", | ||
26 | [PPC_SYS_FUNC_ETH] = "eth", | ||
27 | [PPC_SYS_FUNC_UART] = "uart", | ||
28 | [PPC_SYS_FUNC_HLDC] = "hldc", | ||
29 | [PPC_SYS_FUNC_USB] = "usb", | ||
30 | [PPC_SYS_FUNC_IRDA] = "irda", | ||
31 | }; | ||
23 | 32 | ||
24 | void __init identify_ppc_sys_by_id(u32 id) | 33 | void __init identify_ppc_sys_by_id(u32 id) |
25 | { | 34 | { |
@@ -38,13 +47,13 @@ void __init identify_ppc_sys_by_id(u32 id) | |||
38 | void __init identify_ppc_sys_by_name(char *name) | 47 | void __init identify_ppc_sys_by_name(char *name) |
39 | { | 48 | { |
40 | unsigned int i = 0; | 49 | unsigned int i = 0; |
41 | while (ppc_sys_specs[i].ppc_sys_name[0]) | 50 | while (ppc_sys_specs[i].ppc_sys_name[0]) { |
42 | { | ||
43 | if (!strcmp(ppc_sys_specs[i].ppc_sys_name, name)) | 51 | if (!strcmp(ppc_sys_specs[i].ppc_sys_name, name)) |
44 | break; | 52 | break; |
45 | i++; | 53 | i++; |
46 | } | 54 | } |
47 | cur_ppc_sys_spec = &ppc_sys_specs[i]; | 55 | cur_ppc_sys_spec = &ppc_sys_specs[i]; |
56 | |||
48 | return; | 57 | return; |
49 | } | 58 | } |
50 | 59 | ||
@@ -128,6 +137,165 @@ void ppc_sys_device_remove(enum ppc_sys_devices dev) | |||
128 | } | 137 | } |
129 | } | 138 | } |
130 | 139 | ||
140 | /* Platform-notify mapping | ||
141 | * Helper function for BSP code to assign board-specific platfom-divice bits | ||
142 | */ | ||
143 | |||
144 | void platform_notify_map(const struct platform_notify_dev_map *map, | ||
145 | struct device *dev) | ||
146 | { | ||
147 | struct platform_device *pdev; | ||
148 | int len, idx; | ||
149 | const char *s; | ||
150 | |||
151 | /* do nothing if no device or no bus_id */ | ||
152 | if (!dev || !dev->bus_id) | ||
153 | return; | ||
154 | |||
155 | /* call per device map */ | ||
156 | while (map->bus_id != NULL) { | ||
157 | idx = -1; | ||
158 | s = strrchr(dev->bus_id, '.'); | ||
159 | if (s != NULL) | ||
160 | idx = (int)simple_strtol(s + 1, NULL, 10); | ||
161 | else | ||
162 | s = dev->bus_id; | ||
163 | |||
164 | len = s - dev->bus_id; | ||
165 | |||
166 | if (!strncmp(dev->bus_id, map->bus_id, len)) { | ||
167 | pdev = container_of(dev, struct platform_device, dev); | ||
168 | map->rtn(pdev, idx); | ||
169 | } | ||
170 | map++; | ||
171 | } | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | Function assignment stuff. | ||
176 | Intended to work as follows: | ||
177 | the device name defined in foo_devices.c will be concatenated with :"func", | ||
178 | where func is string map of respective function from platfom_device_func enum | ||
179 | |||
180 | The PPC_SYS_FUNC_DUMMY function is intended to remove all assignments, making the device to appear | ||
181 | in platform bus with unmodified name. | ||
182 | */ | ||
183 | |||
184 | /* | ||
185 | Here we'll replace .name pointers with fixed-lenght strings | ||
186 | Hereby, this should be called *before* any func stuff triggeded. | ||
187 | */ | ||
188 | void ppc_sys_device_initfunc(void) | ||
189 | { | ||
190 | int i; | ||
191 | const char *name; | ||
192 | static char new_names[NUM_PPC_SYS_DEVS][BUS_ID_SIZE]; | ||
193 | enum ppc_sys_devices cur_dev; | ||
194 | |||
195 | /* If inited yet, do nothing */ | ||
196 | if (ppc_sys_func_inited) | ||
197 | return; | ||
198 | |||
199 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
200 | if ((cur_dev = cur_ppc_sys_spec->device_list[i]) < 0) | ||
201 | continue; | ||
202 | |||
203 | if (ppc_sys_platform_devices[cur_dev].name) { | ||
204 | /*backup name */ | ||
205 | name = ppc_sys_platform_devices[cur_dev].name; | ||
206 | strlcpy(new_names[i], name, BUS_ID_SIZE); | ||
207 | ppc_sys_platform_devices[cur_dev].name = new_names[i]; | ||
208 | } | ||
209 | } | ||
210 | |||
211 | ppc_sys_func_inited = 1; | ||
212 | } | ||
213 | |||
214 | /*The "engine" of the func stuff. Here we either concat specified function string description | ||
215 | to the name, or remove it if PPC_SYS_FUNC_DUMMY parameter is passed here*/ | ||
216 | void ppc_sys_device_setfunc(enum ppc_sys_devices dev, | ||
217 | enum platform_device_func func) | ||
218 | { | ||
219 | char *s; | ||
220 | char *name = (char *)ppc_sys_platform_devices[dev].name; | ||
221 | char tmp[BUS_ID_SIZE]; | ||
222 | |||
223 | if (!ppc_sys_func_inited) { | ||
224 | printk(KERN_ERR "Unable to alter function - not inited!\n"); | ||
225 | return; | ||
226 | } | ||
227 | |||
228 | if (ppc_sys_inited) { | ||
229 | platform_device_unregister(&ppc_sys_platform_devices[dev]); | ||
230 | } | ||
231 | |||
232 | if ((s = (char *)strchr(name, ':')) != NULL) { /* reassign */ | ||
233 | /* Either change the name after ':' or remove func modifications */ | ||
234 | if (func != PPC_SYS_FUNC_DUMMY) | ||
235 | strlcpy(s + 1, ppc_sys_func_names[func], BUS_ID_SIZE); | ||
236 | else | ||
237 | *s = 0; | ||
238 | } else if (func != PPC_SYS_FUNC_DUMMY) { | ||
239 | /* do assignment if it is not just "clear" request */ | ||
240 | sprintf(tmp, "%s:%s", name, ppc_sys_func_names[func]); | ||
241 | strlcpy(name, tmp, BUS_ID_SIZE); | ||
242 | } | ||
243 | |||
244 | if (ppc_sys_inited) { | ||
245 | platform_device_register(&ppc_sys_platform_devices[dev]); | ||
246 | } | ||
247 | } | ||
248 | |||
249 | void ppc_sys_device_disable(enum ppc_sys_devices dev) | ||
250 | { | ||
251 | BUG_ON(cur_ppc_sys_spec == NULL); | ||
252 | |||
253 | /*Check if it is enabled*/ | ||
254 | if(!(cur_ppc_sys_spec->config[dev] & PPC_SYS_CONFIG_DISABLED)) { | ||
255 | if (ppc_sys_inited) { | ||
256 | platform_device_unregister(&ppc_sys_platform_devices[dev]); | ||
257 | } | ||
258 | cur_ppc_sys_spec->config[dev] |= PPC_SYS_CONFIG_DISABLED; | ||
259 | } | ||
260 | } | ||
261 | |||
262 | void ppc_sys_device_enable(enum ppc_sys_devices dev) | ||
263 | { | ||
264 | BUG_ON(cur_ppc_sys_spec == NULL); | ||
265 | |||
266 | /*Check if it is disabled*/ | ||
267 | if(cur_ppc_sys_spec->config[dev] & PPC_SYS_CONFIG_DISABLED) { | ||
268 | if (ppc_sys_inited) { | ||
269 | platform_device_register(&ppc_sys_platform_devices[dev]); | ||
270 | } | ||
271 | cur_ppc_sys_spec->config[dev] &= ~PPC_SYS_CONFIG_DISABLED; | ||
272 | } | ||
273 | |||
274 | } | ||
275 | |||
276 | void ppc_sys_device_enable_all(void) | ||
277 | { | ||
278 | enum ppc_sys_devices cur_dev; | ||
279 | int i; | ||
280 | |||
281 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
282 | cur_dev = cur_ppc_sys_spec->device_list[i]; | ||
283 | ppc_sys_device_enable(cur_dev); | ||
284 | } | ||
285 | } | ||
286 | |||
287 | void ppc_sys_device_disable_all(void) | ||
288 | { | ||
289 | enum ppc_sys_devices cur_dev; | ||
290 | int i; | ||
291 | |||
292 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
293 | cur_dev = cur_ppc_sys_spec->device_list[i]; | ||
294 | ppc_sys_device_disable(cur_dev); | ||
295 | } | ||
296 | } | ||
297 | |||
298 | |||
131 | static int __init ppc_sys_init(void) | 299 | static int __init ppc_sys_init(void) |
132 | { | 300 | { |
133 | unsigned int i, dev_id, ret = 0; | 301 | unsigned int i, dev_id, ret = 0; |
@@ -136,7 +304,8 @@ static int __init ppc_sys_init(void) | |||
136 | 304 | ||
137 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | 305 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { |
138 | dev_id = cur_ppc_sys_spec->device_list[i]; | 306 | dev_id = cur_ppc_sys_spec->device_list[i]; |
139 | if (dev_id != -1) { | 307 | if ((dev_id != -1) && |
308 | !(cur_ppc_sys_spec->config[dev_id] & PPC_SYS_CONFIG_DISABLED)) { | ||
140 | if (ppc_sys_device_fixup != NULL) | 309 | if (ppc_sys_device_fixup != NULL) |
141 | ppc_sys_device_fixup(&ppc_sys_platform_devices | 310 | ppc_sys_device_fixup(&ppc_sys_platform_devices |
142 | [dev_id]); | 311 | [dev_id]); |
diff --git a/arch/ppc/syslib/pq2_devices.c b/arch/ppc/syslib/pq2_devices.c index 6ff3aab82fc3..0636aed7b827 100644 --- a/arch/ppc/syslib/pq2_devices.c +++ b/arch/ppc/syslib/pq2_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/pq2_devices.c | ||
3 | * | ||
4 | * PQ2 Device descriptions | 2 | * PQ2 Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/pq2_sys.c b/arch/ppc/syslib/pq2_sys.c index 36d6e2179940..75e64f1c144d 100644 --- a/arch/ppc/syslib/pq2_sys.c +++ b/arch/ppc/syslib/pq2_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/pq2_devices.c | ||
3 | * | ||
4 | * PQ2 System descriptions | 2 | * PQ2 System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/prep_nvram.c b/arch/ppc/syslib/prep_nvram.c index 2c6364d9641f..474dccbc4a8a 100644 --- a/arch/ppc/syslib/prep_nvram.c +++ b/arch/ppc/syslib/prep_nvram.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/prep_nvram.c | ||
3 | * | ||
4 | * Copyright (C) 1998 Corey Minyard | 2 | * Copyright (C) 1998 Corey Minyard |
5 | * | 3 | * |
6 | * This reads the NvRAM on PReP compliant machines (generally from IBM or | 4 | * This reads the NvRAM on PReP compliant machines (generally from IBM or |
diff --git a/arch/ppc/syslib/todc_time.c b/arch/ppc/syslib/todc_time.c index 1323c641c19d..a8168b8e5683 100644 --- a/arch/ppc/syslib/todc_time.c +++ b/arch/ppc/syslib/todc_time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/todc_time.c | ||
3 | * | ||
4 | * Time of Day Clock support for the M48T35, M48T37, M48T59, and MC146818 | 2 | * Time of Day Clock support for the M48T35, M48T37, M48T59, and MC146818 |
5 | * Real Time Clocks/Timekeepers. | 3 | * Real Time Clocks/Timekeepers. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c index 47f04c71fe9c..e672b600f315 100644 --- a/arch/ppc/syslib/xilinx_pic.c +++ b/arch/ppc/syslib/xilinx_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/xilinx_pic.c | ||
3 | * | ||
4 | * Interrupt controller driver for Xilinx Virtex-II Pro. | 2 | * Interrupt controller driver for Xilinx Virtex-II Pro. |
5 | * | 3 | * |
6 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
@@ -15,7 +13,7 @@ | |||
15 | #include <linux/init.h> | 13 | #include <linux/init.h> |
16 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
17 | #include <asm/io.h> | 15 | #include <asm/io.h> |
18 | #include <asm/xparameters.h> | 16 | #include <platforms/4xx/xparameters/xparameters.h> |
19 | #include <asm/ibm4xx.h> | 17 | #include <asm/ibm4xx.h> |
20 | #include <asm/machdep.h> | 18 | #include <asm/machdep.h> |
21 | 19 | ||
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index b7ca5bf9acfc..2b7364ed23bc 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -460,6 +460,8 @@ config PCMCIA | |||
460 | 460 | ||
461 | source "drivers/base/Kconfig" | 461 | source "drivers/base/Kconfig" |
462 | 462 | ||
463 | source "drivers/connector/Kconfig" | ||
464 | |||
463 | source "drivers/scsi/Kconfig" | 465 | source "drivers/scsi/Kconfig" |
464 | 466 | ||
465 | source "drivers/s390/Kconfig" | 467 | source "drivers/s390/Kconfig" |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index d06a8d71c71d..54d35c130907 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -531,12 +531,11 @@ int appldata_register_ops(struct appldata_ops *ops) | |||
531 | P_ERROR("ctl_nr %i already in use!\n", ops->ctl_nr); | 531 | P_ERROR("ctl_nr %i already in use!\n", ops->ctl_nr); |
532 | return -EBUSY; | 532 | return -EBUSY; |
533 | } | 533 | } |
534 | ops->ctl_table = kmalloc(4*sizeof(struct ctl_table), GFP_KERNEL); | 534 | ops->ctl_table = kzalloc(4*sizeof(struct ctl_table), GFP_KERNEL); |
535 | if (ops->ctl_table == NULL) { | 535 | if (ops->ctl_table == NULL) { |
536 | P_ERROR("Not enough memory for %s ctl_table!\n", ops->name); | 536 | P_ERROR("Not enough memory for %s ctl_table!\n", ops->name); |
537 | return -ENOMEM; | 537 | return -ENOMEM; |
538 | } | 538 | } |
539 | memset(ops->ctl_table, 0, 4*sizeof(struct ctl_table)); | ||
540 | 539 | ||
541 | spin_lock(&appldata_ops_lock); | 540 | spin_lock(&appldata_ops_lock); |
542 | list_for_each(lh, &appldata_ops_list) { | 541 | list_for_each(lh, &appldata_ops_list) { |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 896d39d0e4ce..06a3fbc12536 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -204,16 +204,13 @@ debug_areas_alloc(int pages_per_area, int nr_areas) | |||
204 | goto fail_malloc_areas2; | 204 | goto fail_malloc_areas2; |
205 | } | 205 | } |
206 | for(j = 0; j < pages_per_area; j++) { | 206 | for(j = 0; j < pages_per_area; j++) { |
207 | areas[i][j] = (debug_entry_t*)kmalloc(PAGE_SIZE, | 207 | areas[i][j] = kzalloc(PAGE_SIZE, GFP_KERNEL); |
208 | GFP_KERNEL); | ||
209 | if(!areas[i][j]) { | 208 | if(!areas[i][j]) { |
210 | for(j--; j >=0 ; j--) { | 209 | for(j--; j >=0 ; j--) { |
211 | kfree(areas[i][j]); | 210 | kfree(areas[i][j]); |
212 | } | 211 | } |
213 | kfree(areas[i]); | 212 | kfree(areas[i]); |
214 | goto fail_malloc_areas2; | 213 | goto fail_malloc_areas2; |
215 | } else { | ||
216 | memset(areas[i][j],0,PAGE_SIZE); | ||
217 | } | 214 | } |
218 | } | 215 | } |
219 | } | 216 | } |
@@ -249,14 +246,12 @@ debug_info_alloc(char *name, int pages_per_area, int nr_areas, int buf_size, | |||
249 | rc = (debug_info_t*) kmalloc(sizeof(debug_info_t), GFP_KERNEL); | 246 | rc = (debug_info_t*) kmalloc(sizeof(debug_info_t), GFP_KERNEL); |
250 | if(!rc) | 247 | if(!rc) |
251 | goto fail_malloc_rc; | 248 | goto fail_malloc_rc; |
252 | rc->active_entries = (int*)kmalloc(nr_areas * sizeof(int), GFP_KERNEL); | 249 | rc->active_entries = kcalloc(nr_areas, sizeof(int), GFP_KERNEL); |
253 | if(!rc->active_entries) | 250 | if(!rc->active_entries) |
254 | goto fail_malloc_active_entries; | 251 | goto fail_malloc_active_entries; |
255 | memset(rc->active_entries, 0, nr_areas * sizeof(int)); | 252 | rc->active_pages = kcalloc(nr_areas, sizeof(int), GFP_KERNEL); |
256 | rc->active_pages = (int*)kmalloc(nr_areas * sizeof(int), GFP_KERNEL); | ||
257 | if(!rc->active_pages) | 253 | if(!rc->active_pages) |
258 | goto fail_malloc_active_pages; | 254 | goto fail_malloc_active_pages; |
259 | memset(rc->active_pages, 0, nr_areas * sizeof(int)); | ||
260 | if((mode == ALL_AREAS) && (pages_per_area != 0)){ | 255 | if((mode == ALL_AREAS) && (pages_per_area != 0)){ |
261 | rc->areas = debug_areas_alloc(pages_per_area, nr_areas); | 256 | rc->areas = debug_areas_alloc(pages_per_area, nr_areas); |
262 | if(!rc->areas) | 257 | if(!rc->areas) |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index da6fbae8df91..99182a415fe7 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -103,7 +103,7 @@ extern void s390_handle_mcck(void); | |||
103 | /* | 103 | /* |
104 | * The idle loop on a S390... | 104 | * The idle loop on a S390... |
105 | */ | 105 | */ |
106 | void default_idle(void) | 106 | static void default_idle(void) |
107 | { | 107 | { |
108 | int cpu, rc; | 108 | int cpu, rc; |
109 | 109 | ||
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 24f62f16c0e5..0a04e4a564b2 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -78,8 +78,6 @@ extern int _text,_etext, _edata, _end; | |||
78 | 78 | ||
79 | #include <asm/setup.h> | 79 | #include <asm/setup.h> |
80 | 80 | ||
81 | static char command_line[COMMAND_LINE_SIZE] = { 0, }; | ||
82 | |||
83 | static struct resource code_resource = { | 81 | static struct resource code_resource = { |
84 | .name = "Kernel code", | 82 | .name = "Kernel code", |
85 | .start = (unsigned long) &_text, | 83 | .start = (unsigned long) &_text, |
@@ -335,63 +333,38 @@ add_memory_hole(unsigned long start, unsigned long end) | |||
335 | } | 333 | } |
336 | } | 334 | } |
337 | 335 | ||
338 | static void __init | 336 | static int __init early_parse_mem(char *p) |
339 | parse_cmdline_early(char **cmdline_p) | 337 | { |
338 | memory_end = memparse(p, &p); | ||
339 | return 0; | ||
340 | } | ||
341 | early_param("mem", early_parse_mem); | ||
342 | |||
343 | /* | ||
344 | * "ipldelay=XXX[sm]" sets ipl delay in seconds or minutes | ||
345 | */ | ||
346 | static int __init early_parse_ipldelay(char *p) | ||
340 | { | 347 | { |
341 | char c = ' ', cn, *to = command_line, *from = COMMAND_LINE; | ||
342 | unsigned long delay = 0; | 348 | unsigned long delay = 0; |
343 | 349 | ||
344 | /* Save unparsed command line copy for /proc/cmdline */ | 350 | delay = simple_strtoul(p, &p, 0); |
345 | memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); | ||
346 | saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; | ||
347 | 351 | ||
348 | for (;;) { | 352 | switch (*p) { |
349 | /* | 353 | case 's': |
350 | * "mem=XXX[kKmM]" sets memsize | 354 | case 'S': |
351 | */ | 355 | delay *= 1000000; |
352 | if (c == ' ' && strncmp(from, "mem=", 4) == 0) { | 356 | break; |
353 | memory_end = simple_strtoul(from+4, &from, 0); | 357 | case 'm': |
354 | if ( *from == 'K' || *from == 'k' ) { | 358 | case 'M': |
355 | memory_end = memory_end << 10; | 359 | delay *= 60 * 1000000; |
356 | from++; | ||
357 | } else if ( *from == 'M' || *from == 'm' ) { | ||
358 | memory_end = memory_end << 20; | ||
359 | from++; | ||
360 | } | ||
361 | } | ||
362 | /* | ||
363 | * "ipldelay=XXX[sm]" sets ipl delay in seconds or minutes | ||
364 | */ | ||
365 | if (c == ' ' && strncmp(from, "ipldelay=", 9) == 0) { | ||
366 | delay = simple_strtoul(from+9, &from, 0); | ||
367 | if (*from == 's' || *from == 'S') { | ||
368 | delay = delay*1000000; | ||
369 | from++; | ||
370 | } else if (*from == 'm' || *from == 'M') { | ||
371 | delay = delay*60*1000000; | ||
372 | from++; | ||
373 | } | ||
374 | /* now wait for the requested amount of time */ | ||
375 | udelay(delay); | ||
376 | } | ||
377 | cn = *(from++); | ||
378 | if (!cn) | ||
379 | break; | ||
380 | if (cn == '\n') | ||
381 | cn = ' '; /* replace newlines with space */ | ||
382 | if (cn == 0x0d) | ||
383 | cn = ' '; /* replace 0x0d with space */ | ||
384 | if (cn == ' ' && c == ' ') | ||
385 | continue; /* remove additional spaces */ | ||
386 | c = cn; | ||
387 | if (to - command_line >= COMMAND_LINE_SIZE) | ||
388 | break; | ||
389 | *(to++) = c; | ||
390 | } | 360 | } |
391 | if (c == ' ' && to > command_line) to--; | 361 | |
392 | *to = '\0'; | 362 | /* now wait for the requested amount of time */ |
393 | *cmdline_p = command_line; | 363 | udelay(delay); |
364 | |||
365 | return 0; | ||
394 | } | 366 | } |
367 | early_param("ipldelay", early_parse_ipldelay); | ||
395 | 368 | ||
396 | static void __init | 369 | static void __init |
397 | setup_lowcore(void) | 370 | setup_lowcore(void) |
@@ -580,9 +553,26 @@ setup_arch(char **cmdline_p) | |||
580 | "We are running native (64 bit mode)\n"); | 553 | "We are running native (64 bit mode)\n"); |
581 | #endif /* CONFIG_64BIT */ | 554 | #endif /* CONFIG_64BIT */ |
582 | 555 | ||
556 | /* Save unparsed command line copy for /proc/cmdline */ | ||
557 | strlcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); | ||
558 | |||
559 | *cmdline_p = COMMAND_LINE; | ||
560 | *(*cmdline_p + COMMAND_LINE_SIZE - 1) = '\0'; | ||
561 | |||
583 | ROOT_DEV = Root_RAM0; | 562 | ROOT_DEV = Root_RAM0; |
563 | |||
564 | init_mm.start_code = PAGE_OFFSET; | ||
565 | init_mm.end_code = (unsigned long) &_etext; | ||
566 | init_mm.end_data = (unsigned long) &_edata; | ||
567 | init_mm.brk = (unsigned long) &_end; | ||
568 | |||
569 | memory_end = memory_size; | ||
570 | |||
571 | parse_early_param(); | ||
572 | |||
584 | #ifndef CONFIG_64BIT | 573 | #ifndef CONFIG_64BIT |
585 | memory_end = memory_size & ~0x400000UL; /* align memory end to 4MB */ | 574 | memory_end &= ~0x400000UL; |
575 | |||
586 | /* | 576 | /* |
587 | * We need some free virtual space to be able to do vmalloc. | 577 | * We need some free virtual space to be able to do vmalloc. |
588 | * On a machine with 2GB memory we make sure that we have at | 578 | * On a machine with 2GB memory we make sure that we have at |
@@ -591,17 +581,9 @@ setup_arch(char **cmdline_p) | |||
591 | if (memory_end > 1920*1024*1024) | 581 | if (memory_end > 1920*1024*1024) |
592 | memory_end = 1920*1024*1024; | 582 | memory_end = 1920*1024*1024; |
593 | #else /* CONFIG_64BIT */ | 583 | #else /* CONFIG_64BIT */ |
594 | memory_end = memory_size & ~0x200000UL; /* detected in head.s */ | 584 | memory_end &= ~0x200000UL; |
595 | #endif /* CONFIG_64BIT */ | 585 | #endif /* CONFIG_64BIT */ |
596 | 586 | ||
597 | init_mm.start_code = PAGE_OFFSET; | ||
598 | init_mm.end_code = (unsigned long) &_etext; | ||
599 | init_mm.end_data = (unsigned long) &_edata; | ||
600 | init_mm.brk = (unsigned long) &_end; | ||
601 | |||
602 | parse_cmdline_early(cmdline_p); | ||
603 | parse_early_param(); | ||
604 | |||
605 | setup_memory(); | 587 | setup_memory(); |
606 | setup_resources(); | 588 | setup_resources(); |
607 | setup_lowcore(); | 589 | setup_lowcore(); |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 7dbe00c76c6b..2b8841f85534 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -665,7 +665,9 @@ __cpu_up(unsigned int cpu) | |||
665 | cpu_lowcore->current_task = (unsigned long) idle; | 665 | cpu_lowcore->current_task = (unsigned long) idle; |
666 | cpu_lowcore->cpu_data.cpu_nr = cpu; | 666 | cpu_lowcore->cpu_data.cpu_nr = cpu; |
667 | eieio(); | 667 | eieio(); |
668 | signal_processor(cpu,sigp_restart); | 668 | |
669 | while (signal_processor(cpu,sigp_restart) == sigp_busy) | ||
670 | udelay(10); | ||
669 | 671 | ||
670 | while (!cpu_online(cpu)) | 672 | while (!cpu_online(cpu)) |
671 | cpu_relax(); | 673 | cpu_relax(); |
@@ -799,9 +801,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
799 | */ | 801 | */ |
800 | print_cpu_info(&S390_lowcore.cpu_data); | 802 | print_cpu_info(&S390_lowcore.cpu_data); |
801 | 803 | ||
802 | for(i = 0; i < NR_CPUS; i++) { | 804 | for_each_cpu(i) { |
803 | if (!cpu_possible(i)) | ||
804 | continue; | ||
805 | lowcore_ptr[i] = (struct _lowcore *) | 805 | lowcore_ptr[i] = (struct _lowcore *) |
806 | __get_free_pages(GFP_KERNEL|GFP_DMA, | 806 | __get_free_pages(GFP_KERNEL|GFP_DMA, |
807 | sizeof(void*) == 8 ? 1 : 0); | 807 | sizeof(void*) == 8 ? 1 : 0); |
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index b075ab499d05..51596f429235 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
@@ -339,19 +339,19 @@ static struct ctl_table cmm_table[] = { | |||
339 | { | 339 | { |
340 | .ctl_name = VM_CMM_PAGES, | 340 | .ctl_name = VM_CMM_PAGES, |
341 | .procname = "cmm_pages", | 341 | .procname = "cmm_pages", |
342 | .mode = 0600, | 342 | .mode = 0644, |
343 | .proc_handler = &cmm_pages_handler, | 343 | .proc_handler = &cmm_pages_handler, |
344 | }, | 344 | }, |
345 | { | 345 | { |
346 | .ctl_name = VM_CMM_TIMED_PAGES, | 346 | .ctl_name = VM_CMM_TIMED_PAGES, |
347 | .procname = "cmm_timed_pages", | 347 | .procname = "cmm_timed_pages", |
348 | .mode = 0600, | 348 | .mode = 0644, |
349 | .proc_handler = &cmm_pages_handler, | 349 | .proc_handler = &cmm_pages_handler, |
350 | }, | 350 | }, |
351 | { | 351 | { |
352 | .ctl_name = VM_CMM_TIMEOUT, | 352 | .ctl_name = VM_CMM_TIMEOUT, |
353 | .procname = "cmm_timeout", | 353 | .procname = "cmm_timeout", |
354 | .mode = 0600, | 354 | .mode = 0644, |
355 | .proc_handler = &cmm_timeout_handler, | 355 | .proc_handler = &cmm_timeout_handler, |
356 | }, | 356 | }, |
357 | { .ctl_name = 0 } | 357 | { .ctl_name = 0 } |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index df953383724d..a055894f3bd8 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -292,7 +292,7 @@ void free_initmem(void) | |||
292 | addr = (unsigned long)(&__init_begin); | 292 | addr = (unsigned long)(&__init_begin); |
293 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 293 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
294 | ClearPageReserved(virt_to_page(addr)); | 294 | ClearPageReserved(virt_to_page(addr)); |
295 | set_page_count(virt_to_page(addr), 1); | 295 | init_page_count(virt_to_page(addr)); |
296 | free_page(addr); | 296 | free_page(addr); |
297 | totalram_pages++; | 297 | totalram_pages++; |
298 | } | 298 | } |
@@ -307,7 +307,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
307 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | 307 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); |
308 | for (; start < end; start += PAGE_SIZE) { | 308 | for (; start < end; start += PAGE_SIZE) { |
309 | ClearPageReserved(virt_to_page(start)); | 309 | ClearPageReserved(virt_to_page(start)); |
310 | set_page_count(virt_to_page(start), 1); | 310 | init_page_count(virt_to_page(start)); |
311 | free_page(start); | 311 | free_page(start); |
312 | totalram_pages++; | 312 | totalram_pages++; |
313 | } | 313 | } |
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 08c9515c4806..c72e17a96eed 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -172,7 +172,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) include/config/MARKER | |||
172 | 172 | ||
173 | archprepare: maketools include/asm-sh/.cpu include/asm-sh/.mach | 173 | archprepare: maketools include/asm-sh/.cpu include/asm-sh/.mach |
174 | 174 | ||
175 | .PHONY: maketools FORCE | 175 | PHONY += maketools FORCE |
176 | maketools: include/linux/version.h FORCE | 176 | maketools: include/linux/version.h FORCE |
177 | $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h | 177 | $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h |
178 | 178 | ||
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 6883c00728cb..b56e79632f24 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -35,9 +35,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
35 | 35 | ||
36 | if (i == 0) { | 36 | if (i == 0) { |
37 | seq_puts(p, " "); | 37 | seq_puts(p, " "); |
38 | for (j=0; j<NR_CPUS; j++) | 38 | for_each_online_cpu(j) |
39 | if (cpu_online(j)) | 39 | seq_printf(p, "CPU%d ",j); |
40 | seq_printf(p, "CPU%d ",j); | ||
41 | seq_putc(p, '\n'); | 40 | seq_putc(p, '\n'); |
42 | } | 41 | } |
43 | 42 | ||
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 9fd1723e6219..22dc9c21201d 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/pm.h> | 20 | #include <linux/pm.h> |
21 | #include <linux/ptrace.h> | 21 | #include <linux/ptrace.h> |
22 | #include <linux/platform.h> | ||
23 | #include <linux/kallsyms.h> | 22 | #include <linux/kallsyms.h> |
24 | #include <linux/kexec.h> | 23 | #include <linux/kexec.h> |
25 | 24 | ||
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index a067a34e0b64..c0e79843f580 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -404,9 +404,8 @@ static int __init topology_init(void) | |||
404 | { | 404 | { |
405 | int cpu_id; | 405 | int cpu_id; |
406 | 406 | ||
407 | for (cpu_id = 0; cpu_id < NR_CPUS; cpu_id++) | 407 | for_each_cpu(cpu_id) |
408 | if (cpu_possible(cpu_id)) | 408 | register_cpu(&cpu[cpu_id], cpu_id, NULL); |
409 | register_cpu(&cpu[cpu_id], cpu_id, NULL); | ||
410 | 409 | ||
411 | return 0; | 410 | return 0; |
412 | } | 411 | } |
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index df3a9e452cc5..ee73e30263af 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c | |||
@@ -23,6 +23,7 @@ void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *handle) | |||
23 | page = alloc_pages(gfp, order); | 23 | page = alloc_pages(gfp, order); |
24 | if (!page) | 24 | if (!page) |
25 | return NULL; | 25 | return NULL; |
26 | split_page(page, order); | ||
26 | 27 | ||
27 | ret = page_address(page); | 28 | ret = page_address(page); |
28 | *handle = virt_to_phys(ret); | 29 | *handle = virt_to_phys(ret); |
@@ -37,8 +38,6 @@ void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *handle) | |||
37 | end = page + (1 << order); | 38 | end = page + (1 << order); |
38 | 39 | ||
39 | while (++page < end) { | 40 | while (++page < end) { |
40 | set_page_count(page, 1); | ||
41 | |||
42 | /* Free any unused pages */ | 41 | /* Free any unused pages */ |
43 | if (page >= free) { | 42 | if (page >= free) { |
44 | __free_page(page); | 43 | __free_page(page); |
diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index 6b7a7688c98e..a3568fd51508 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c | |||
@@ -84,18 +84,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
84 | return entry; | 84 | return entry; |
85 | } | 85 | } |
86 | 86 | ||
87 | /* | ||
88 | * This function checks for proper alignment of input addr and len parameters. | ||
89 | */ | ||
90 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | ||
91 | { | ||
92 | if (len & ~HPAGE_MASK) | ||
93 | return -EINVAL; | ||
94 | if (addr & ~HPAGE_MASK) | ||
95 | return -EINVAL; | ||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | struct page *follow_huge_addr(struct mm_struct *mm, | 87 | struct page *follow_huge_addr(struct mm_struct *mm, |
100 | unsigned long address, int write) | 88 | unsigned long address, int write) |
101 | { | 89 | { |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index e342565f75fb..77b4a838fe10 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -273,7 +273,7 @@ void free_initmem(void) | |||
273 | addr = (unsigned long)(&__init_begin); | 273 | addr = (unsigned long)(&__init_begin); |
274 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 274 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
275 | ClearPageReserved(virt_to_page(addr)); | 275 | ClearPageReserved(virt_to_page(addr)); |
276 | set_page_count(virt_to_page(addr), 1); | 276 | init_page_count(virt_to_page(addr)); |
277 | free_page(addr); | 277 | free_page(addr); |
278 | totalram_pages++; | 278 | totalram_pages++; |
279 | } | 279 | } |
@@ -286,7 +286,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
286 | unsigned long p; | 286 | unsigned long p; |
287 | for (p = start; p < end; p += PAGE_SIZE) { | 287 | for (p = start; p < end; p += PAGE_SIZE) { |
288 | ClearPageReserved(virt_to_page(p)); | 288 | ClearPageReserved(virt_to_page(p)); |
289 | set_page_count(virt_to_page(p), 1); | 289 | init_page_count(virt_to_page(p)); |
290 | free_page(p); | 290 | free_page(p); |
291 | totalram_pages++; | 291 | totalram_pages++; |
292 | } | 292 | } |
diff --git a/arch/sh64/kernel/irq.c b/arch/sh64/kernel/irq.c index 9fc2b71dbd84..d69879c0e063 100644 --- a/arch/sh64/kernel/irq.c +++ b/arch/sh64/kernel/irq.c | |||
@@ -53,9 +53,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
53 | 53 | ||
54 | if (i == 0) { | 54 | if (i == 0) { |
55 | seq_puts(p, " "); | 55 | seq_puts(p, " "); |
56 | for (j=0; j<NR_CPUS; j++) | 56 | for_each_online_cpu(j) |
57 | if (cpu_online(j)) | 57 | seq_printf(p, "CPU%d ",j); |
58 | seq_printf(p, "CPU%d ",j); | ||
59 | seq_putc(p, '\n'); | 58 | seq_putc(p, '\n'); |
60 | } | 59 | } |
61 | 60 | ||
diff --git a/arch/sh64/mm/hugetlbpage.c b/arch/sh64/mm/hugetlbpage.c index ed6a505b3ee2..3d89f2a6c785 100644 --- a/arch/sh64/mm/hugetlbpage.c +++ b/arch/sh64/mm/hugetlbpage.c | |||
@@ -84,18 +84,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
84 | return entry; | 84 | return entry; |
85 | } | 85 | } |
86 | 86 | ||
87 | /* | ||
88 | * This function checks for proper alignment of input addr and len parameters. | ||
89 | */ | ||
90 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | ||
91 | { | ||
92 | if (len & ~HPAGE_MASK) | ||
93 | return -EINVAL; | ||
94 | if (addr & ~HPAGE_MASK) | ||
95 | return -EINVAL; | ||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | struct page *follow_huge_addr(struct mm_struct *mm, | 87 | struct page *follow_huge_addr(struct mm_struct *mm, |
100 | unsigned long address, int write) | 88 | unsigned long address, int write) |
101 | { | 89 | { |
diff --git a/arch/sh64/mm/init.c b/arch/sh64/mm/init.c index a65e8bb2c3cc..1169757fb38b 100644 --- a/arch/sh64/mm/init.c +++ b/arch/sh64/mm/init.c | |||
@@ -173,7 +173,7 @@ void free_initmem(void) | |||
173 | addr = (unsigned long)(&__init_begin); | 173 | addr = (unsigned long)(&__init_begin); |
174 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 174 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
175 | ClearPageReserved(virt_to_page(addr)); | 175 | ClearPageReserved(virt_to_page(addr)); |
176 | set_page_count(virt_to_page(addr), 1); | 176 | init_page_count(virt_to_page(addr)); |
177 | free_page(addr); | 177 | free_page(addr); |
178 | totalram_pages++; | 178 | totalram_pages++; |
179 | } | 179 | } |
@@ -186,7 +186,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
186 | unsigned long p; | 186 | unsigned long p; |
187 | for (p = start; p < end; p += PAGE_SIZE) { | 187 | for (p = start; p < end; p += PAGE_SIZE) { |
188 | ClearPageReserved(virt_to_page(p)); | 188 | ClearPageReserved(virt_to_page(p)); |
189 | set_page_count(virt_to_page(p), 1); | 189 | init_page_count(virt_to_page(p)); |
190 | free_page(p); | 190 | free_page(p); |
191 | totalram_pages++; | 191 | totalram_pages++; |
192 | } | 192 | } |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index f944b58cdfe7..7c58fc1a39c4 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -23,7 +23,6 @@ menu "General machine setup" | |||
23 | 23 | ||
24 | config SMP | 24 | config SMP |
25 | bool "Symmetric multi-processing support (does not work on sun4/sun4c)" | 25 | bool "Symmetric multi-processing support (does not work on sun4/sun4c)" |
26 | depends on BROKEN | ||
27 | ---help--- | 26 | ---help--- |
28 | This enables support for systems with more than one CPU. If you have | 27 | This enables support for systems with more than one CPU. If you have |
29 | a system with only one CPU, say N. If you have a system with more | 28 | a system with only one CPU, say N. If you have a system with more |
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c index 410b9a72aba9..aac8af5aae51 100644 --- a/arch/sparc/kernel/irq.c +++ b/arch/sparc/kernel/irq.c | |||
@@ -154,9 +154,11 @@ void (*sparc_init_timers)(irqreturn_t (*)(int, void *,struct pt_regs *)) = | |||
154 | struct irqaction static_irqaction[MAX_STATIC_ALLOC]; | 154 | struct irqaction static_irqaction[MAX_STATIC_ALLOC]; |
155 | int static_irq_count; | 155 | int static_irq_count; |
156 | 156 | ||
157 | struct irqaction *irq_action[NR_IRQS] = { | 157 | struct { |
158 | [0 ... (NR_IRQS-1)] = NULL | 158 | struct irqaction *action; |
159 | }; | 159 | int flags; |
160 | } sparc_irq[NR_IRQS]; | ||
161 | #define SPARC_IRQ_INPROGRESS 1 | ||
160 | 162 | ||
161 | /* Used to protect the IRQ action lists */ | 163 | /* Used to protect the IRQ action lists */ |
162 | DEFINE_SPINLOCK(irq_action_lock); | 164 | DEFINE_SPINLOCK(irq_action_lock); |
@@ -177,17 +179,16 @@ int show_interrupts(struct seq_file *p, void *v) | |||
177 | } | 179 | } |
178 | spin_lock_irqsave(&irq_action_lock, flags); | 180 | spin_lock_irqsave(&irq_action_lock, flags); |
179 | if (i < NR_IRQS) { | 181 | if (i < NR_IRQS) { |
180 | action = *(i + irq_action); | 182 | action = sparc_irq[i].action; |
181 | if (!action) | 183 | if (!action) |
182 | goto out_unlock; | 184 | goto out_unlock; |
183 | seq_printf(p, "%3d: ", i); | 185 | seq_printf(p, "%3d: ", i); |
184 | #ifndef CONFIG_SMP | 186 | #ifndef CONFIG_SMP |
185 | seq_printf(p, "%10u ", kstat_irqs(i)); | 187 | seq_printf(p, "%10u ", kstat_irqs(i)); |
186 | #else | 188 | #else |
187 | for (j = 0; j < NR_CPUS; j++) { | 189 | for_each_online_cpu(j) { |
188 | if (cpu_online(j)) | 190 | seq_printf(p, "%10u ", |
189 | seq_printf(p, "%10u ", | 191 | kstat_cpu(j).irqs[i]); |
190 | kstat_cpu(cpu_logical_map(j)).irqs[i]); | ||
191 | } | 192 | } |
192 | #endif | 193 | #endif |
193 | seq_printf(p, " %c %s", | 194 | seq_printf(p, " %c %s", |
@@ -208,7 +209,7 @@ out_unlock: | |||
208 | void free_irq(unsigned int irq, void *dev_id) | 209 | void free_irq(unsigned int irq, void *dev_id) |
209 | { | 210 | { |
210 | struct irqaction * action; | 211 | struct irqaction * action; |
211 | struct irqaction * tmp = NULL; | 212 | struct irqaction **actionp; |
212 | unsigned long flags; | 213 | unsigned long flags; |
213 | unsigned int cpu_irq; | 214 | unsigned int cpu_irq; |
214 | 215 | ||
@@ -226,7 +227,8 @@ void free_irq(unsigned int irq, void *dev_id) | |||
226 | 227 | ||
227 | spin_lock_irqsave(&irq_action_lock, flags); | 228 | spin_lock_irqsave(&irq_action_lock, flags); |
228 | 229 | ||
229 | action = *(cpu_irq + irq_action); | 230 | actionp = &sparc_irq[cpu_irq].action; |
231 | action = *actionp; | ||
230 | 232 | ||
231 | if (!action->handler) { | 233 | if (!action->handler) { |
232 | printk("Trying to free free IRQ%d\n",irq); | 234 | printk("Trying to free free IRQ%d\n",irq); |
@@ -236,7 +238,7 @@ void free_irq(unsigned int irq, void *dev_id) | |||
236 | for (; action; action = action->next) { | 238 | for (; action; action = action->next) { |
237 | if (action->dev_id == dev_id) | 239 | if (action->dev_id == dev_id) |
238 | break; | 240 | break; |
239 | tmp = action; | 241 | actionp = &action->next; |
240 | } | 242 | } |
241 | if (!action) { | 243 | if (!action) { |
242 | printk("Trying to free free shared IRQ%d\n",irq); | 244 | printk("Trying to free free shared IRQ%d\n",irq); |
@@ -255,11 +257,8 @@ void free_irq(unsigned int irq, void *dev_id) | |||
255 | irq, action->name); | 257 | irq, action->name); |
256 | goto out_unlock; | 258 | goto out_unlock; |
257 | } | 259 | } |
258 | 260 | ||
259 | if (action && tmp) | 261 | *actionp = action->next; |
260 | tmp->next = action->next; | ||
261 | else | ||
262 | *(cpu_irq + irq_action) = action->next; | ||
263 | 262 | ||
264 | spin_unlock_irqrestore(&irq_action_lock, flags); | 263 | spin_unlock_irqrestore(&irq_action_lock, flags); |
265 | 264 | ||
@@ -269,7 +268,7 @@ void free_irq(unsigned int irq, void *dev_id) | |||
269 | 268 | ||
270 | kfree(action); | 269 | kfree(action); |
271 | 270 | ||
272 | if (!(*(cpu_irq + irq_action))) | 271 | if (!sparc_irq[cpu_irq].action) |
273 | disable_irq(irq); | 272 | disable_irq(irq); |
274 | 273 | ||
275 | out_unlock: | 274 | out_unlock: |
@@ -288,8 +287,11 @@ EXPORT_SYMBOL(free_irq); | |||
288 | #ifdef CONFIG_SMP | 287 | #ifdef CONFIG_SMP |
289 | void synchronize_irq(unsigned int irq) | 288 | void synchronize_irq(unsigned int irq) |
290 | { | 289 | { |
291 | printk("synchronize_irq says: implement me!\n"); | 290 | unsigned int cpu_irq; |
292 | BUG(); | 291 | |
292 | cpu_irq = irq & (NR_IRQS - 1); | ||
293 | while (sparc_irq[cpu_irq].flags & SPARC_IRQ_INPROGRESS) | ||
294 | cpu_relax(); | ||
293 | } | 295 | } |
294 | #endif /* SMP */ | 296 | #endif /* SMP */ |
295 | 297 | ||
@@ -300,7 +302,7 @@ void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs) | |||
300 | unsigned int cpu_irq; | 302 | unsigned int cpu_irq; |
301 | 303 | ||
302 | cpu_irq = irq & (NR_IRQS - 1); | 304 | cpu_irq = irq & (NR_IRQS - 1); |
303 | action = *(cpu_irq + irq_action); | 305 | action = sparc_irq[cpu_irq].action; |
304 | 306 | ||
305 | printk("IO device interrupt, irq = %d\n", irq); | 307 | printk("IO device interrupt, irq = %d\n", irq); |
306 | printk("PC = %08lx NPC = %08lx FP=%08lx\n", regs->pc, | 308 | printk("PC = %08lx NPC = %08lx FP=%08lx\n", regs->pc, |
@@ -331,7 +333,8 @@ void handler_irq(int irq, struct pt_regs * regs) | |||
331 | if(irq < 10) | 333 | if(irq < 10) |
332 | smp4m_irq_rotate(cpu); | 334 | smp4m_irq_rotate(cpu); |
333 | #endif | 335 | #endif |
334 | action = *(irq + irq_action); | 336 | action = sparc_irq[irq].action; |
337 | sparc_irq[irq].flags |= SPARC_IRQ_INPROGRESS; | ||
335 | kstat_cpu(cpu).irqs[irq]++; | 338 | kstat_cpu(cpu).irqs[irq]++; |
336 | do { | 339 | do { |
337 | if (!action || !action->handler) | 340 | if (!action || !action->handler) |
@@ -339,6 +342,7 @@ void handler_irq(int irq, struct pt_regs * regs) | |||
339 | action->handler(irq, action->dev_id, regs); | 342 | action->handler(irq, action->dev_id, regs); |
340 | action = action->next; | 343 | action = action->next; |
341 | } while (action); | 344 | } while (action); |
345 | sparc_irq[irq].flags &= ~SPARC_IRQ_INPROGRESS; | ||
342 | enable_pil_irq(irq); | 346 | enable_pil_irq(irq); |
343 | irq_exit(); | 347 | irq_exit(); |
344 | } | 348 | } |
@@ -390,7 +394,7 @@ int request_fast_irq(unsigned int irq, | |||
390 | 394 | ||
391 | spin_lock_irqsave(&irq_action_lock, flags); | 395 | spin_lock_irqsave(&irq_action_lock, flags); |
392 | 396 | ||
393 | action = *(cpu_irq + irq_action); | 397 | action = sparc_irq[cpu_irq].action; |
394 | if(action) { | 398 | if(action) { |
395 | if(action->flags & SA_SHIRQ) | 399 | if(action->flags & SA_SHIRQ) |
396 | panic("Trying to register fast irq when already shared.\n"); | 400 | panic("Trying to register fast irq when already shared.\n"); |
@@ -453,7 +457,7 @@ int request_fast_irq(unsigned int irq, | |||
453 | action->dev_id = NULL; | 457 | action->dev_id = NULL; |
454 | action->next = NULL; | 458 | action->next = NULL; |
455 | 459 | ||
456 | *(cpu_irq + irq_action) = action; | 460 | sparc_irq[cpu_irq].action = action; |
457 | 461 | ||
458 | enable_irq(irq); | 462 | enable_irq(irq); |
459 | 463 | ||
@@ -468,7 +472,7 @@ int request_irq(unsigned int irq, | |||
468 | irqreturn_t (*handler)(int, void *, struct pt_regs *), | 472 | irqreturn_t (*handler)(int, void *, struct pt_regs *), |
469 | unsigned long irqflags, const char * devname, void *dev_id) | 473 | unsigned long irqflags, const char * devname, void *dev_id) |
470 | { | 474 | { |
471 | struct irqaction * action, *tmp = NULL; | 475 | struct irqaction * action, **actionp; |
472 | unsigned long flags; | 476 | unsigned long flags; |
473 | unsigned int cpu_irq; | 477 | unsigned int cpu_irq; |
474 | int ret; | 478 | int ret; |
@@ -491,20 +495,20 @@ int request_irq(unsigned int irq, | |||
491 | 495 | ||
492 | spin_lock_irqsave(&irq_action_lock, flags); | 496 | spin_lock_irqsave(&irq_action_lock, flags); |
493 | 497 | ||
494 | action = *(cpu_irq + irq_action); | 498 | actionp = &sparc_irq[cpu_irq].action; |
499 | action = *actionp; | ||
495 | if (action) { | 500 | if (action) { |
496 | if ((action->flags & SA_SHIRQ) && (irqflags & SA_SHIRQ)) { | 501 | if (!(action->flags & SA_SHIRQ) || !(irqflags & SA_SHIRQ)) { |
497 | for (tmp = action; tmp->next; tmp = tmp->next); | ||
498 | } else { | ||
499 | ret = -EBUSY; | 502 | ret = -EBUSY; |
500 | goto out_unlock; | 503 | goto out_unlock; |
501 | } | 504 | } |
502 | if ((action->flags & SA_INTERRUPT) ^ (irqflags & SA_INTERRUPT)) { | 505 | if ((action->flags & SA_INTERRUPT) != (irqflags & SA_INTERRUPT)) { |
503 | printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq); | 506 | printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq); |
504 | ret = -EBUSY; | 507 | ret = -EBUSY; |
505 | goto out_unlock; | 508 | goto out_unlock; |
506 | } | 509 | } |
507 | action = NULL; /* Or else! */ | 510 | for ( ; action; action = *actionp) |
511 | actionp = &action->next; | ||
508 | } | 512 | } |
509 | 513 | ||
510 | /* If this is flagged as statically allocated then we use our | 514 | /* If this is flagged as statically allocated then we use our |
@@ -533,10 +537,7 @@ int request_irq(unsigned int irq, | |||
533 | action->next = NULL; | 537 | action->next = NULL; |
534 | action->dev_id = dev_id; | 538 | action->dev_id = dev_id; |
535 | 539 | ||
536 | if (tmp) | 540 | *actionp = action; |
537 | tmp->next = action; | ||
538 | else | ||
539 | *(cpu_irq + irq_action) = action; | ||
540 | 541 | ||
541 | enable_irq(irq); | 542 | enable_irq(irq); |
542 | 543 | ||
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c index c6e721d8f477..2be812115197 100644 --- a/arch/sparc/kernel/smp.c +++ b/arch/sparc/kernel/smp.c | |||
@@ -45,6 +45,7 @@ volatile int __cpu_logical_map[NR_CPUS]; | |||
45 | 45 | ||
46 | cpumask_t cpu_online_map = CPU_MASK_NONE; | 46 | cpumask_t cpu_online_map = CPU_MASK_NONE; |
47 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; | 47 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; |
48 | cpumask_t smp_commenced_mask = CPU_MASK_NONE; | ||
48 | 49 | ||
49 | /* The only guaranteed locking primitive available on all Sparc | 50 | /* The only guaranteed locking primitive available on all Sparc |
50 | * processors is 'ldstub [%reg + immediate], %dest_reg' which atomically | 51 | * processors is 'ldstub [%reg + immediate], %dest_reg' which atomically |
@@ -57,11 +58,6 @@ cpumask_t phys_cpu_present_map = CPU_MASK_NONE; | |||
57 | /* Used to make bitops atomic */ | 58 | /* Used to make bitops atomic */ |
58 | unsigned char bitops_spinlock = 0; | 59 | unsigned char bitops_spinlock = 0; |
59 | 60 | ||
60 | volatile unsigned long ipi_count; | ||
61 | |||
62 | volatile int smp_process_available=0; | ||
63 | volatile int smp_commenced = 0; | ||
64 | |||
65 | void __init smp_store_cpu_info(int id) | 61 | void __init smp_store_cpu_info(int id) |
66 | { | 62 | { |
67 | int cpu_node; | 63 | int cpu_node; |
@@ -79,6 +75,22 @@ void __init smp_store_cpu_info(int id) | |||
79 | 75 | ||
80 | void __init smp_cpus_done(unsigned int max_cpus) | 76 | void __init smp_cpus_done(unsigned int max_cpus) |
81 | { | 77 | { |
78 | extern void smp4m_smp_done(void); | ||
79 | unsigned long bogosum = 0; | ||
80 | int cpu, num; | ||
81 | |||
82 | for (cpu = 0, num = 0; cpu < NR_CPUS; cpu++) | ||
83 | if (cpu_online(cpu)) { | ||
84 | num++; | ||
85 | bogosum += cpu_data(cpu).udelay_val; | ||
86 | } | ||
87 | |||
88 | printk("Total of %d processors activated (%lu.%02lu BogoMIPS).\n", | ||
89 | num, bogosum/(500000/HZ), | ||
90 | (bogosum/(5000/HZ))%100); | ||
91 | |||
92 | BUG_ON(sparc_cpu_model != sun4m); | ||
93 | smp4m_smp_done(); | ||
82 | } | 94 | } |
83 | 95 | ||
84 | void cpu_panic(void) | 96 | void cpu_panic(void) |
@@ -89,17 +101,6 @@ void cpu_panic(void) | |||
89 | 101 | ||
90 | struct linux_prom_registers smp_penguin_ctable __initdata = { 0 }; | 102 | struct linux_prom_registers smp_penguin_ctable __initdata = { 0 }; |
91 | 103 | ||
92 | void __init smp_boot_cpus(void) | ||
93 | { | ||
94 | extern void smp4m_boot_cpus(void); | ||
95 | extern void smp4d_boot_cpus(void); | ||
96 | |||
97 | if (sparc_cpu_model == sun4m) | ||
98 | smp4m_boot_cpus(); | ||
99 | else | ||
100 | smp4d_boot_cpus(); | ||
101 | } | ||
102 | |||
103 | void smp_send_reschedule(int cpu) | 104 | void smp_send_reschedule(int cpu) |
104 | { | 105 | { |
105 | /* See sparc64 */ | 106 | /* See sparc64 */ |
@@ -243,9 +244,8 @@ int setup_profiling_timer(unsigned int multiplier) | |||
243 | return -EINVAL; | 244 | return -EINVAL; |
244 | 245 | ||
245 | spin_lock_irqsave(&prof_setup_lock, flags); | 246 | spin_lock_irqsave(&prof_setup_lock, flags); |
246 | for(i = 0; i < NR_CPUS; i++) { | 247 | for_each_cpu(i) { |
247 | if (cpu_possible(i)) | 248 | load_profile_irq(i, lvl14_resolution / multiplier); |
248 | load_profile_irq(i, lvl14_resolution / multiplier); | ||
249 | prof_multiplier(i) = multiplier; | 249 | prof_multiplier(i) = multiplier; |
250 | } | 250 | } |
251 | spin_unlock_irqrestore(&prof_setup_lock, flags); | 251 | spin_unlock_irqrestore(&prof_setup_lock, flags); |
@@ -253,33 +253,73 @@ int setup_profiling_timer(unsigned int multiplier) | |||
253 | return 0; | 253 | return 0; |
254 | } | 254 | } |
255 | 255 | ||
256 | void __init smp_prepare_cpus(unsigned int maxcpus) | 256 | void __init smp_prepare_cpus(unsigned int max_cpus) |
257 | { | 257 | { |
258 | extern void smp4m_boot_cpus(void); | ||
259 | int i, cpuid, ncpus, extra; | ||
260 | |||
261 | BUG_ON(sparc_cpu_model != sun4m); | ||
262 | printk("Entering SMP Mode...\n"); | ||
263 | |||
264 | ncpus = 1; | ||
265 | extra = 0; | ||
266 | for (i = 0; !cpu_find_by_instance(i, NULL, &cpuid); i++) { | ||
267 | if (cpuid == boot_cpu_id) | ||
268 | continue; | ||
269 | if (cpuid < NR_CPUS && ncpus++ < max_cpus) | ||
270 | cpu_set(cpuid, phys_cpu_present_map); | ||
271 | else | ||
272 | extra++; | ||
273 | } | ||
274 | if (max_cpus >= NR_CPUS && extra) | ||
275 | printk("Warning: NR_CPUS is too low to start all cpus\n"); | ||
276 | |||
277 | smp_store_cpu_info(boot_cpu_id); | ||
278 | |||
279 | smp4m_boot_cpus(); | ||
258 | } | 280 | } |
259 | 281 | ||
260 | void __devinit smp_prepare_boot_cpu(void) | 282 | void __devinit smp_prepare_boot_cpu(void) |
261 | { | 283 | { |
262 | current_thread_info()->cpu = hard_smp_processor_id(); | 284 | int cpuid = hard_smp_processor_id(); |
263 | cpu_set(smp_processor_id(), cpu_online_map); | 285 | |
264 | cpu_set(smp_processor_id(), phys_cpu_present_map); | 286 | if (cpuid >= NR_CPUS) { |
287 | prom_printf("Serious problem, boot cpu id >= NR_CPUS\n"); | ||
288 | prom_halt(); | ||
289 | } | ||
290 | if (cpuid != 0) | ||
291 | printk("boot cpu id != 0, this could work but is untested\n"); | ||
292 | |||
293 | current_thread_info()->cpu = cpuid; | ||
294 | cpu_set(cpuid, cpu_online_map); | ||
295 | cpu_set(cpuid, phys_cpu_present_map); | ||
265 | } | 296 | } |
266 | 297 | ||
267 | int __devinit __cpu_up(unsigned int cpu) | 298 | int __devinit __cpu_up(unsigned int cpu) |
268 | { | 299 | { |
269 | panic("smp doesn't work\n"); | 300 | extern int smp4m_boot_one_cpu(int); |
301 | int ret; | ||
302 | |||
303 | ret = smp4m_boot_one_cpu(cpu); | ||
304 | |||
305 | if (!ret) { | ||
306 | cpu_set(cpu, smp_commenced_mask); | ||
307 | while (!cpu_online(cpu)) | ||
308 | mb(); | ||
309 | } | ||
310 | return ret; | ||
270 | } | 311 | } |
271 | 312 | ||
272 | void smp_bogo(struct seq_file *m) | 313 | void smp_bogo(struct seq_file *m) |
273 | { | 314 | { |
274 | int i; | 315 | int i; |
275 | 316 | ||
276 | for (i = 0; i < NR_CPUS; i++) { | 317 | for_each_online_cpu(i) { |
277 | if (cpu_online(i)) | 318 | seq_printf(m, |
278 | seq_printf(m, | 319 | "Cpu%dBogo\t: %lu.%02lu\n", |
279 | "Cpu%dBogo\t: %lu.%02lu\n", | 320 | i, |
280 | i, | 321 | cpu_data(i).udelay_val/(500000/HZ), |
281 | cpu_data(i).udelay_val/(500000/HZ), | 322 | (cpu_data(i).udelay_val/(5000/HZ))%100); |
282 | (cpu_data(i).udelay_val/(5000/HZ))%100); | ||
283 | } | 323 | } |
284 | } | 324 | } |
285 | 325 | ||
@@ -288,8 +328,6 @@ void smp_info(struct seq_file *m) | |||
288 | int i; | 328 | int i; |
289 | 329 | ||
290 | seq_printf(m, "State:\n"); | 330 | seq_printf(m, "State:\n"); |
291 | for (i = 0; i < NR_CPUS; i++) { | 331 | for_each_online_cpu(i) |
292 | if (cpu_online(i)) | 332 | seq_printf(m, "CPU%d\t\t: online\n", i); |
293 | seq_printf(m, "CPU%d\t\t: online\n", i); | ||
294 | } | ||
295 | } | 333 | } |
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index 19b25399d7e4..2c21d7907635 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c | |||
@@ -136,10 +136,6 @@ EXPORT_PER_CPU_SYMBOL(__cpu_data); | |||
136 | /* IRQ implementation. */ | 136 | /* IRQ implementation. */ |
137 | EXPORT_SYMBOL(synchronize_irq); | 137 | EXPORT_SYMBOL(synchronize_irq); |
138 | 138 | ||
139 | /* Misc SMP information */ | ||
140 | EXPORT_SYMBOL(__cpu_number_map); | ||
141 | EXPORT_SYMBOL(__cpu_logical_map); | ||
142 | |||
143 | /* CPU online map and active count. */ | 139 | /* CPU online map and active count. */ |
144 | EXPORT_SYMBOL(cpu_online_map); | 140 | EXPORT_SYMBOL(cpu_online_map); |
145 | EXPORT_SYMBOL(phys_cpu_present_map); | 141 | EXPORT_SYMBOL(phys_cpu_present_map); |
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index 52621348a56c..ca656d9bd6fd 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c | |||
@@ -54,7 +54,7 @@ unsigned char cpu_leds[32]; | |||
54 | unsigned char sbus_tid[32]; | 54 | unsigned char sbus_tid[32]; |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | extern struct irqaction *irq_action[]; | 57 | static struct irqaction *irq_action[NR_IRQS]; |
58 | extern spinlock_t irq_action_lock; | 58 | extern spinlock_t irq_action_lock; |
59 | 59 | ||
60 | struct sbus_action { | 60 | struct sbus_action { |
@@ -103,11 +103,9 @@ found_it: seq_printf(p, "%3d: ", i); | |||
103 | #ifndef CONFIG_SMP | 103 | #ifndef CONFIG_SMP |
104 | seq_printf(p, "%10u ", kstat_irqs(i)); | 104 | seq_printf(p, "%10u ", kstat_irqs(i)); |
105 | #else | 105 | #else |
106 | for (x = 0; x < NR_CPUS; x++) { | 106 | for_each_online_cpu(x) |
107 | if (cpu_online(x)) | 107 | seq_printf(p, "%10u ", |
108 | seq_printf(p, "%10u ", | 108 | kstat_cpu(cpu_logical_map(x)).irqs[i]); |
109 | kstat_cpu(cpu_logical_map(x)).irqs[i]); | ||
110 | } | ||
111 | #endif | 109 | #endif |
112 | seq_printf(p, "%c %s", | 110 | seq_printf(p, "%c %s", |
113 | (action->flags & SA_INTERRUPT) ? '+' : ' ', | 111 | (action->flags & SA_INTERRUPT) ? '+' : ' ', |
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index 40d426cce824..b141b7ee6717 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c | |||
@@ -46,14 +46,16 @@ extern volatile int smp_processors_ready; | |||
46 | extern int smp_num_cpus; | 46 | extern int smp_num_cpus; |
47 | static int smp_highest_cpu; | 47 | static int smp_highest_cpu; |
48 | extern volatile unsigned long cpu_callin_map[NR_CPUS]; | 48 | extern volatile unsigned long cpu_callin_map[NR_CPUS]; |
49 | extern struct cpuinfo_sparc cpu_data[NR_CPUS]; | 49 | extern cpuinfo_sparc cpu_data[NR_CPUS]; |
50 | extern unsigned char boot_cpu_id; | 50 | extern unsigned char boot_cpu_id; |
51 | extern int smp_activated; | 51 | extern int smp_activated; |
52 | extern volatile int __cpu_number_map[NR_CPUS]; | 52 | extern volatile int __cpu_number_map[NR_CPUS]; |
53 | extern volatile int __cpu_logical_map[NR_CPUS]; | 53 | extern volatile int __cpu_logical_map[NR_CPUS]; |
54 | extern volatile unsigned long ipi_count; | 54 | extern volatile unsigned long ipi_count; |
55 | extern volatile int smp_process_available; | 55 | extern volatile int smp_process_available; |
56 | extern volatile int smp_commenced; | 56 | |
57 | extern cpumask_t smp_commenced_mask; | ||
58 | |||
57 | extern int __smp4d_processor_id(void); | 59 | extern int __smp4d_processor_id(void); |
58 | 60 | ||
59 | /* #define SMP_DEBUG */ | 61 | /* #define SMP_DEBUG */ |
@@ -136,7 +138,7 @@ void __init smp4d_callin(void) | |||
136 | 138 | ||
137 | local_irq_enable(); /* We don't allow PIL 14 yet */ | 139 | local_irq_enable(); /* We don't allow PIL 14 yet */ |
138 | 140 | ||
139 | while(!smp_commenced) | 141 | while (!cpu_isset(cpuid, smp_commenced_mask)) |
140 | barrier(); | 142 | barrier(); |
141 | 143 | ||
142 | spin_lock_irqsave(&sun4d_imsk_lock, flags); | 144 | spin_lock_irqsave(&sun4d_imsk_lock, flags); |
@@ -249,11 +251,9 @@ void __init smp4d_boot_cpus(void) | |||
249 | } else { | 251 | } else { |
250 | unsigned long bogosum = 0; | 252 | unsigned long bogosum = 0; |
251 | 253 | ||
252 | for(i = 0; i < NR_CPUS; i++) { | 254 | for_each_present_cpu(i) { |
253 | if (cpu_isset(i, cpu_present_map)) { | 255 | bogosum += cpu_data(i).udelay_val; |
254 | bogosum += cpu_data(i).udelay_val; | 256 | smp_highest_cpu = i; |
255 | smp_highest_cpu = i; | ||
256 | } | ||
257 | } | 257 | } |
258 | SMP_PRINTK(("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", cpucount + 1, bogosum/(500000/HZ), (bogosum/(5000/HZ))%100)); | 258 | SMP_PRINTK(("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", cpucount + 1, bogosum/(500000/HZ), (bogosum/(5000/HZ))%100)); |
259 | printk("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", | 259 | printk("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", |
@@ -266,19 +266,19 @@ void __init smp4d_boot_cpus(void) | |||
266 | 266 | ||
267 | /* Free unneeded trap tables */ | 267 | /* Free unneeded trap tables */ |
268 | ClearPageReserved(virt_to_page(trapbase_cpu1)); | 268 | ClearPageReserved(virt_to_page(trapbase_cpu1)); |
269 | set_page_count(virt_to_page(trapbase_cpu1), 1); | 269 | init_page_count(virt_to_page(trapbase_cpu1)); |
270 | free_page((unsigned long)trapbase_cpu1); | 270 | free_page((unsigned long)trapbase_cpu1); |
271 | totalram_pages++; | 271 | totalram_pages++; |
272 | num_physpages++; | 272 | num_physpages++; |
273 | 273 | ||
274 | ClearPageReserved(virt_to_page(trapbase_cpu2)); | 274 | ClearPageReserved(virt_to_page(trapbase_cpu2)); |
275 | set_page_count(virt_to_page(trapbase_cpu2), 1); | 275 | init_page_count(virt_to_page(trapbase_cpu2)); |
276 | free_page((unsigned long)trapbase_cpu2); | 276 | free_page((unsigned long)trapbase_cpu2); |
277 | totalram_pages++; | 277 | totalram_pages++; |
278 | num_physpages++; | 278 | num_physpages++; |
279 | 279 | ||
280 | ClearPageReserved(virt_to_page(trapbase_cpu3)); | 280 | ClearPageReserved(virt_to_page(trapbase_cpu3)); |
281 | set_page_count(virt_to_page(trapbase_cpu3), 1); | 281 | init_page_count(virt_to_page(trapbase_cpu3)); |
282 | free_page((unsigned long)trapbase_cpu3); | 282 | free_page((unsigned long)trapbase_cpu3); |
283 | totalram_pages++; | 283 | totalram_pages++; |
284 | num_physpages++; | 284 | num_physpages++; |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index a21f27d10e55..70b375a4c2c2 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
@@ -40,15 +40,11 @@ extern ctxd_t *srmmu_ctx_table_phys; | |||
40 | extern void calibrate_delay(void); | 40 | extern void calibrate_delay(void); |
41 | 41 | ||
42 | extern volatile int smp_processors_ready; | 42 | extern volatile int smp_processors_ready; |
43 | extern int smp_num_cpus; | ||
44 | extern volatile unsigned long cpu_callin_map[NR_CPUS]; | 43 | extern volatile unsigned long cpu_callin_map[NR_CPUS]; |
45 | extern unsigned char boot_cpu_id; | 44 | extern unsigned char boot_cpu_id; |
46 | extern int smp_activated; | 45 | |
47 | extern volatile int __cpu_number_map[NR_CPUS]; | 46 | extern cpumask_t smp_commenced_mask; |
48 | extern volatile int __cpu_logical_map[NR_CPUS]; | 47 | |
49 | extern volatile unsigned long ipi_count; | ||
50 | extern volatile int smp_process_available; | ||
51 | extern volatile int smp_commenced; | ||
52 | extern int __smp4m_processor_id(void); | 48 | extern int __smp4m_processor_id(void); |
53 | 49 | ||
54 | /*#define SMP_DEBUG*/ | 50 | /*#define SMP_DEBUG*/ |
@@ -77,8 +73,6 @@ void __init smp4m_callin(void) | |||
77 | local_flush_cache_all(); | 73 | local_flush_cache_all(); |
78 | local_flush_tlb_all(); | 74 | local_flush_tlb_all(); |
79 | 75 | ||
80 | set_irq_udt(boot_cpu_id); | ||
81 | |||
82 | /* Get our local ticker going. */ | 76 | /* Get our local ticker going. */ |
83 | smp_setup_percpu_timer(); | 77 | smp_setup_percpu_timer(); |
84 | 78 | ||
@@ -95,8 +89,9 @@ void __init smp4m_callin(void) | |||
95 | * to call the scheduler code. | 89 | * to call the scheduler code. |
96 | */ | 90 | */ |
97 | /* Allow master to continue. */ | 91 | /* Allow master to continue. */ |
98 | swap((unsigned long *)&cpu_callin_map[cpuid], 1); | 92 | swap(&cpu_callin_map[cpuid], 1); |
99 | 93 | ||
94 | /* XXX: What's up with all the flushes? */ | ||
100 | local_flush_cache_all(); | 95 | local_flush_cache_all(); |
101 | local_flush_tlb_all(); | 96 | local_flush_tlb_all(); |
102 | 97 | ||
@@ -111,13 +106,14 @@ void __init smp4m_callin(void) | |||
111 | atomic_inc(&init_mm.mm_count); | 106 | atomic_inc(&init_mm.mm_count); |
112 | current->active_mm = &init_mm; | 107 | current->active_mm = &init_mm; |
113 | 108 | ||
114 | while(!smp_commenced) | 109 | while (!cpu_isset(cpuid, smp_commenced_mask)) |
115 | barrier(); | 110 | mb(); |
116 | |||
117 | local_flush_cache_all(); | ||
118 | local_flush_tlb_all(); | ||
119 | 111 | ||
120 | local_irq_enable(); | 112 | local_irq_enable(); |
113 | |||
114 | cpu_set(cpuid, cpu_online_map); | ||
115 | /* last one in gets all the interrupts (for testing) */ | ||
116 | set_irq_udt(boot_cpu_id); | ||
121 | } | 117 | } |
122 | 118 | ||
123 | extern void init_IRQ(void); | 119 | extern void init_IRQ(void); |
@@ -134,120 +130,92 @@ extern unsigned long trapbase_cpu3[]; | |||
134 | 130 | ||
135 | void __init smp4m_boot_cpus(void) | 131 | void __init smp4m_boot_cpus(void) |
136 | { | 132 | { |
137 | int cpucount = 0; | 133 | smp_setup_percpu_timer(); |
138 | int i, mid; | 134 | local_flush_cache_all(); |
135 | } | ||
139 | 136 | ||
140 | printk("Entering SMP Mode...\n"); | 137 | int smp4m_boot_one_cpu(int i) |
138 | { | ||
139 | extern unsigned long sun4m_cpu_startup; | ||
140 | unsigned long *entry = &sun4m_cpu_startup; | ||
141 | struct task_struct *p; | ||
142 | int timeout; | ||
143 | int cpu_node; | ||
141 | 144 | ||
142 | local_irq_enable(); | 145 | cpu_find_by_mid(i, &cpu_node); |
143 | cpus_clear(cpu_present_map); | ||
144 | 146 | ||
145 | for (i = 0; !cpu_find_by_instance(i, NULL, &mid); i++) | 147 | /* Cook up an idler for this guy. */ |
146 | cpu_set(mid, cpu_present_map); | 148 | p = fork_idle(i); |
149 | current_set[i] = task_thread_info(p); | ||
150 | /* See trampoline.S for details... */ | ||
151 | entry += ((i-1) * 3); | ||
147 | 152 | ||
148 | for(i=0; i < NR_CPUS; i++) { | 153 | /* |
149 | __cpu_number_map[i] = -1; | 154 | * Initialize the contexts table |
150 | __cpu_logical_map[i] = -1; | 155 | * Since the call to prom_startcpu() trashes the structure, |
156 | * we need to re-initialize it for each cpu | ||
157 | */ | ||
158 | smp_penguin_ctable.which_io = 0; | ||
159 | smp_penguin_ctable.phys_addr = (unsigned int) srmmu_ctx_table_phys; | ||
160 | smp_penguin_ctable.reg_size = 0; | ||
161 | |||
162 | /* whirrr, whirrr, whirrrrrrrrr... */ | ||
163 | printk("Starting CPU %d at %p\n", i, entry); | ||
164 | local_flush_cache_all(); | ||
165 | prom_startcpu(cpu_node, | ||
166 | &smp_penguin_ctable, 0, (char *)entry); | ||
167 | |||
168 | /* wheee... it's going... */ | ||
169 | for(timeout = 0; timeout < 10000; timeout++) { | ||
170 | if(cpu_callin_map[i]) | ||
171 | break; | ||
172 | udelay(200); | ||
151 | } | 173 | } |
152 | 174 | ||
153 | __cpu_number_map[boot_cpu_id] = 0; | 175 | if (!(cpu_callin_map[i])) { |
154 | __cpu_logical_map[0] = boot_cpu_id; | 176 | printk("Processor %d is stuck.\n", i); |
155 | current_thread_info()->cpu = boot_cpu_id; | 177 | return -ENODEV; |
178 | } | ||
156 | 179 | ||
157 | smp_store_cpu_info(boot_cpu_id); | ||
158 | set_irq_udt(boot_cpu_id); | ||
159 | smp_setup_percpu_timer(); | ||
160 | local_flush_cache_all(); | 180 | local_flush_cache_all(); |
161 | if(cpu_find_by_instance(1, NULL, NULL)) | 181 | return 0; |
162 | return; /* Not an MP box. */ | 182 | } |
163 | for(i = 0; i < NR_CPUS; i++) { | 183 | |
164 | if(i == boot_cpu_id) | 184 | void __init smp4m_smp_done(void) |
165 | continue; | 185 | { |
166 | 186 | int i, first; | |
167 | if (cpu_isset(i, cpu_present_map)) { | 187 | int *prev; |
168 | extern unsigned long sun4m_cpu_startup; | 188 | |
169 | unsigned long *entry = &sun4m_cpu_startup; | 189 | /* setup cpu list for irq rotation */ |
170 | struct task_struct *p; | 190 | first = 0; |
171 | int timeout; | 191 | prev = &first; |
172 | 192 | for (i = 0; i < NR_CPUS; i++) { | |
173 | /* Cook up an idler for this guy. */ | 193 | if (cpu_online(i)) { |
174 | p = fork_idle(i); | 194 | *prev = i; |
175 | cpucount++; | 195 | prev = &cpu_data(i).next; |
176 | current_set[i] = task_thread_info(p); | ||
177 | /* See trampoline.S for details... */ | ||
178 | entry += ((i-1) * 3); | ||
179 | |||
180 | /* | ||
181 | * Initialize the contexts table | ||
182 | * Since the call to prom_startcpu() trashes the structure, | ||
183 | * we need to re-initialize it for each cpu | ||
184 | */ | ||
185 | smp_penguin_ctable.which_io = 0; | ||
186 | smp_penguin_ctable.phys_addr = (unsigned int) srmmu_ctx_table_phys; | ||
187 | smp_penguin_ctable.reg_size = 0; | ||
188 | |||
189 | /* whirrr, whirrr, whirrrrrrrrr... */ | ||
190 | printk("Starting CPU %d at %p\n", i, entry); | ||
191 | local_flush_cache_all(); | ||
192 | prom_startcpu(cpu_data(i).prom_node, | ||
193 | &smp_penguin_ctable, 0, (char *)entry); | ||
194 | |||
195 | /* wheee... it's going... */ | ||
196 | for(timeout = 0; timeout < 10000; timeout++) { | ||
197 | if(cpu_callin_map[i]) | ||
198 | break; | ||
199 | udelay(200); | ||
200 | } | ||
201 | if(cpu_callin_map[i]) { | ||
202 | /* Another "Red Snapper". */ | ||
203 | __cpu_number_map[i] = i; | ||
204 | __cpu_logical_map[i] = i; | ||
205 | } else { | ||
206 | cpucount--; | ||
207 | printk("Processor %d is stuck.\n", i); | ||
208 | } | ||
209 | } | ||
210 | if(!(cpu_callin_map[i])) { | ||
211 | cpu_clear(i, cpu_present_map); | ||
212 | __cpu_number_map[i] = -1; | ||
213 | } | 196 | } |
214 | } | 197 | } |
198 | *prev = first; | ||
215 | local_flush_cache_all(); | 199 | local_flush_cache_all(); |
216 | if(cpucount == 0) { | ||
217 | printk("Error: only one Processor found.\n"); | ||
218 | cpu_present_map = cpumask_of_cpu(smp_processor_id()); | ||
219 | } else { | ||
220 | unsigned long bogosum = 0; | ||
221 | for(i = 0; i < NR_CPUS; i++) { | ||
222 | if (cpu_isset(i, cpu_present_map)) | ||
223 | bogosum += cpu_data(i).udelay_val; | ||
224 | } | ||
225 | printk("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", | ||
226 | cpucount + 1, | ||
227 | bogosum/(500000/HZ), | ||
228 | (bogosum/(5000/HZ))%100); | ||
229 | smp_activated = 1; | ||
230 | smp_num_cpus = cpucount + 1; | ||
231 | } | ||
232 | 200 | ||
233 | /* Free unneeded trap tables */ | 201 | /* Free unneeded trap tables */ |
234 | if (!cpu_isset(i, cpu_present_map)) { | 202 | if (!cpu_isset(1, cpu_present_map)) { |
235 | ClearPageReserved(virt_to_page(trapbase_cpu1)); | 203 | ClearPageReserved(virt_to_page(trapbase_cpu1)); |
236 | set_page_count(virt_to_page(trapbase_cpu1), 1); | 204 | init_page_count(virt_to_page(trapbase_cpu1)); |
237 | free_page((unsigned long)trapbase_cpu1); | 205 | free_page((unsigned long)trapbase_cpu1); |
238 | totalram_pages++; | 206 | totalram_pages++; |
239 | num_physpages++; | 207 | num_physpages++; |
240 | } | 208 | } |
241 | if (!cpu_isset(2, cpu_present_map)) { | 209 | if (!cpu_isset(2, cpu_present_map)) { |
242 | ClearPageReserved(virt_to_page(trapbase_cpu2)); | 210 | ClearPageReserved(virt_to_page(trapbase_cpu2)); |
243 | set_page_count(virt_to_page(trapbase_cpu2), 1); | 211 | init_page_count(virt_to_page(trapbase_cpu2)); |
244 | free_page((unsigned long)trapbase_cpu2); | 212 | free_page((unsigned long)trapbase_cpu2); |
245 | totalram_pages++; | 213 | totalram_pages++; |
246 | num_physpages++; | 214 | num_physpages++; |
247 | } | 215 | } |
248 | if (!cpu_isset(3, cpu_present_map)) { | 216 | if (!cpu_isset(3, cpu_present_map)) { |
249 | ClearPageReserved(virt_to_page(trapbase_cpu3)); | 217 | ClearPageReserved(virt_to_page(trapbase_cpu3)); |
250 | set_page_count(virt_to_page(trapbase_cpu3), 1); | 218 | init_page_count(virt_to_page(trapbase_cpu3)); |
251 | free_page((unsigned long)trapbase_cpu3); | 219 | free_page((unsigned long)trapbase_cpu3); |
252 | totalram_pages++; | 220 | totalram_pages++; |
253 | num_physpages++; | 221 | num_physpages++; |
@@ -265,6 +233,9 @@ void __init smp4m_boot_cpus(void) | |||
265 | */ | 233 | */ |
266 | void smp4m_irq_rotate(int cpu) | 234 | void smp4m_irq_rotate(int cpu) |
267 | { | 235 | { |
236 | int next = cpu_data(cpu).next; | ||
237 | if (next != cpu) | ||
238 | set_irq_udt(next); | ||
268 | } | 239 | } |
269 | 240 | ||
270 | /* Cross calls, in order to work efficiently and atomically do all | 241 | /* Cross calls, in order to work efficiently and atomically do all |
@@ -291,7 +262,7 @@ void smp4m_message_pass(int target, int msg, unsigned long data, int wait) | |||
291 | 262 | ||
292 | smp_cpu_in_msg[me]++; | 263 | smp_cpu_in_msg[me]++; |
293 | if(target == MSG_ALL_BUT_SELF || target == MSG_ALL) { | 264 | if(target == MSG_ALL_BUT_SELF || target == MSG_ALL) { |
294 | mask = cpu_present_map; | 265 | mask = cpu_online_map; |
295 | if(target == MSG_ALL_BUT_SELF) | 266 | if(target == MSG_ALL_BUT_SELF) |
296 | cpu_clear(me, mask); | 267 | cpu_clear(me, mask); |
297 | for(i = 0; i < 4; i++) { | 268 | for(i = 0; i < 4; i++) { |
@@ -316,8 +287,8 @@ static struct smp_funcall { | |||
316 | unsigned long arg3; | 287 | unsigned long arg3; |
317 | unsigned long arg4; | 288 | unsigned long arg4; |
318 | unsigned long arg5; | 289 | unsigned long arg5; |
319 | unsigned long processors_in[NR_CPUS]; /* Set when ipi entered. */ | 290 | unsigned long processors_in[SUN4M_NCPUS]; /* Set when ipi entered. */ |
320 | unsigned long processors_out[NR_CPUS]; /* Set when ipi exited. */ | 291 | unsigned long processors_out[SUN4M_NCPUS]; /* Set when ipi exited. */ |
321 | } ccall_info; | 292 | } ccall_info; |
322 | 293 | ||
323 | static DEFINE_SPINLOCK(cross_call_lock); | 294 | static DEFINE_SPINLOCK(cross_call_lock); |
@@ -326,8 +297,7 @@ static DEFINE_SPINLOCK(cross_call_lock); | |||
326 | void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 297 | void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, |
327 | unsigned long arg3, unsigned long arg4, unsigned long arg5) | 298 | unsigned long arg3, unsigned long arg4, unsigned long arg5) |
328 | { | 299 | { |
329 | if(smp_processors_ready) { | 300 | register int ncpus = SUN4M_NCPUS; |
330 | register int ncpus = smp_num_cpus; | ||
331 | unsigned long flags; | 301 | unsigned long flags; |
332 | 302 | ||
333 | spin_lock_irqsave(&cross_call_lock, flags); | 303 | spin_lock_irqsave(&cross_call_lock, flags); |
@@ -342,7 +312,7 @@ void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | |||
342 | 312 | ||
343 | /* Init receive/complete mapping, plus fire the IPI's off. */ | 313 | /* Init receive/complete mapping, plus fire the IPI's off. */ |
344 | { | 314 | { |
345 | cpumask_t mask = cpu_present_map; | 315 | cpumask_t mask = cpu_online_map; |
346 | register int i; | 316 | register int i; |
347 | 317 | ||
348 | cpu_clear(smp_processor_id(), mask); | 318 | cpu_clear(smp_processor_id(), mask); |
@@ -375,7 +345,6 @@ void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | |||
375 | } | 345 | } |
376 | 346 | ||
377 | spin_unlock_irqrestore(&cross_call_lock, flags); | 347 | spin_unlock_irqrestore(&cross_call_lock, flags); |
378 | } | ||
379 | } | 348 | } |
380 | 349 | ||
381 | /* Running cross calls. */ | 350 | /* Running cross calls. */ |
diff --git a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c index 2cb0728cee05..1ef7fa03fefe 100644 --- a/arch/sparc/mm/generic.c +++ b/arch/sparc/mm/generic.c | |||
@@ -76,7 +76,6 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | |||
76 | vma->vm_pgoff = (offset >> PAGE_SHIFT) | | 76 | vma->vm_pgoff = (offset >> PAGE_SHIFT) | |
77 | ((unsigned long)space << 28UL); | 77 | ((unsigned long)space << 28UL); |
78 | 78 | ||
79 | prot = __pgprot(pg_iobits); | ||
80 | offset -= from; | 79 | offset -= from; |
81 | dir = pgd_offset(mm, from); | 80 | dir = pgd_offset(mm, from); |
82 | flush_cache_range(vma, beg, end); | 81 | flush_cache_range(vma, beg, end); |
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c index c03babaa0498..898669732466 100644 --- a/arch/sparc/mm/init.c +++ b/arch/sparc/mm/init.c | |||
@@ -383,7 +383,7 @@ void map_high_region(unsigned long start_pfn, unsigned long end_pfn) | |||
383 | struct page *page = pfn_to_page(tmp); | 383 | struct page *page = pfn_to_page(tmp); |
384 | 384 | ||
385 | ClearPageReserved(page); | 385 | ClearPageReserved(page); |
386 | set_page_count(page, 1); | 386 | init_page_count(page); |
387 | __free_page(page); | 387 | __free_page(page); |
388 | totalhigh_pages++; | 388 | totalhigh_pages++; |
389 | } | 389 | } |
@@ -480,7 +480,7 @@ void free_initmem (void) | |||
480 | p = virt_to_page(addr); | 480 | p = virt_to_page(addr); |
481 | 481 | ||
482 | ClearPageReserved(p); | 482 | ClearPageReserved(p); |
483 | set_page_count(p, 1); | 483 | init_page_count(p); |
484 | __free_page(p); | 484 | __free_page(p); |
485 | totalram_pages++; | 485 | totalram_pages++; |
486 | num_physpages++; | 486 | num_physpages++; |
@@ -497,7 +497,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
497 | struct page *p = virt_to_page(start); | 497 | struct page *p = virt_to_page(start); |
498 | 498 | ||
499 | ClearPageReserved(p); | 499 | ClearPageReserved(p); |
500 | set_page_count(p, 1); | 500 | init_page_count(p); |
501 | __free_page(p); | 501 | __free_page(p); |
502 | num_physpages++; | 502 | num_physpages++; |
503 | } | 503 | } |
diff --git a/arch/sparc/mm/loadmmu.c b/arch/sparc/mm/loadmmu.c index e9f9571601ba..36b4d24988f8 100644 --- a/arch/sparc/mm/loadmmu.c +++ b/arch/sparc/mm/loadmmu.c | |||
@@ -22,8 +22,6 @@ struct ctx_list *ctx_list_pool; | |||
22 | struct ctx_list ctx_free; | 22 | struct ctx_list ctx_free; |
23 | struct ctx_list ctx_used; | 23 | struct ctx_list ctx_used; |
24 | 24 | ||
25 | unsigned int pg_iobits; | ||
26 | |||
27 | extern void ld_mmu_sun4c(void); | 25 | extern void ld_mmu_sun4c(void); |
28 | extern void ld_mmu_srmmu(void); | 26 | extern void ld_mmu_srmmu(void); |
29 | 27 | ||
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index c664b962987c..58c65cc8d0d3 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -1302,7 +1302,12 @@ void __init srmmu_paging_init(void) | |||
1302 | 1302 | ||
1303 | flush_cache_all(); | 1303 | flush_cache_all(); |
1304 | srmmu_set_ctable_ptr((unsigned long)srmmu_ctx_table_phys); | 1304 | srmmu_set_ctable_ptr((unsigned long)srmmu_ctx_table_phys); |
1305 | #ifdef CONFIG_SMP | ||
1306 | /* Stop from hanging here... */ | ||
1307 | local_flush_tlb_all(); | ||
1308 | #else | ||
1305 | flush_tlb_all(); | 1309 | flush_tlb_all(); |
1310 | #endif | ||
1306 | poke_srmmu(); | 1311 | poke_srmmu(); |
1307 | 1312 | ||
1308 | #ifdef CONFIG_SUN_IO | 1313 | #ifdef CONFIG_SUN_IO |
@@ -1419,6 +1424,7 @@ static void __init init_vac_layout(void) | |||
1419 | max_size = vac_cache_size; | 1424 | max_size = vac_cache_size; |
1420 | if(vac_line_size < min_line_size) | 1425 | if(vac_line_size < min_line_size) |
1421 | min_line_size = vac_line_size; | 1426 | min_line_size = vac_line_size; |
1427 | //FIXME: cpus not contiguous!! | ||
1422 | cpu++; | 1428 | cpu++; |
1423 | if (cpu >= NR_CPUS || !cpu_online(cpu)) | 1429 | if (cpu >= NR_CPUS || !cpu_online(cpu)) |
1424 | break; | 1430 | break; |
@@ -2130,6 +2136,13 @@ static unsigned long srmmu_pte_to_pgoff(pte_t pte) | |||
2130 | return pte_val(pte) >> SRMMU_PTE_FILE_SHIFT; | 2136 | return pte_val(pte) >> SRMMU_PTE_FILE_SHIFT; |
2131 | } | 2137 | } |
2132 | 2138 | ||
2139 | static pgprot_t srmmu_pgprot_noncached(pgprot_t prot) | ||
2140 | { | ||
2141 | prot &= ~__pgprot(SRMMU_CACHE); | ||
2142 | |||
2143 | return prot; | ||
2144 | } | ||
2145 | |||
2133 | /* Load up routines and constants for sun4m and sun4d mmu */ | 2146 | /* Load up routines and constants for sun4m and sun4d mmu */ |
2134 | void __init ld_mmu_srmmu(void) | 2147 | void __init ld_mmu_srmmu(void) |
2135 | { | 2148 | { |
@@ -2150,9 +2163,9 @@ void __init ld_mmu_srmmu(void) | |||
2150 | BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY)); | 2163 | BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY)); |
2151 | BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL)); | 2164 | BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL)); |
2152 | page_kernel = pgprot_val(SRMMU_PAGE_KERNEL); | 2165 | page_kernel = pgprot_val(SRMMU_PAGE_KERNEL); |
2153 | pg_iobits = SRMMU_VALID | SRMMU_WRITE | SRMMU_REF; | ||
2154 | 2166 | ||
2155 | /* Functions */ | 2167 | /* Functions */ |
2168 | BTFIXUPSET_CALL(pgprot_noncached, srmmu_pgprot_noncached, BTFIXUPCALL_NORM); | ||
2156 | #ifndef CONFIG_SMP | 2169 | #ifndef CONFIG_SMP |
2157 | BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2); | 2170 | BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2); |
2158 | #endif | 2171 | #endif |
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index 731f19603cad..49f28c1bdc6d 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c | |||
@@ -1589,7 +1589,10 @@ static void sun4c_flush_tlb_page(struct vm_area_struct *vma, unsigned long page) | |||
1589 | 1589 | ||
1590 | static inline void sun4c_mapioaddr(unsigned long physaddr, unsigned long virt_addr) | 1590 | static inline void sun4c_mapioaddr(unsigned long physaddr, unsigned long virt_addr) |
1591 | { | 1591 | { |
1592 | unsigned long page_entry; | 1592 | unsigned long page_entry, pg_iobits; |
1593 | |||
1594 | pg_iobits = _SUN4C_PAGE_PRESENT | _SUN4C_READABLE | _SUN4C_WRITEABLE | | ||
1595 | _SUN4C_PAGE_IO | _SUN4C_PAGE_NOCACHE; | ||
1593 | 1596 | ||
1594 | page_entry = ((physaddr >> PAGE_SHIFT) & SUN4C_PFN_MASK); | 1597 | page_entry = ((physaddr >> PAGE_SHIFT) & SUN4C_PFN_MASK); |
1595 | page_entry |= ((pg_iobits | _SUN4C_PAGE_PRIV) & ~(_SUN4C_PAGE_PRESENT)); | 1598 | page_entry |= ((pg_iobits | _SUN4C_PAGE_PRIV) & ~(_SUN4C_PAGE_PRESENT)); |
@@ -2134,6 +2137,13 @@ void __init sun4c_paging_init(void) | |||
2134 | printk("SUN4C: %d mmu entries for the kernel\n", cnt); | 2137 | printk("SUN4C: %d mmu entries for the kernel\n", cnt); |
2135 | } | 2138 | } |
2136 | 2139 | ||
2140 | static pgprot_t sun4c_pgprot_noncached(pgprot_t prot) | ||
2141 | { | ||
2142 | prot |= __pgprot(_SUN4C_PAGE_IO | _SUN4C_PAGE_NOCACHE); | ||
2143 | |||
2144 | return prot; | ||
2145 | } | ||
2146 | |||
2137 | /* Load up routines and constants for sun4c mmu */ | 2147 | /* Load up routines and constants for sun4c mmu */ |
2138 | void __init ld_mmu_sun4c(void) | 2148 | void __init ld_mmu_sun4c(void) |
2139 | { | 2149 | { |
@@ -2156,10 +2166,9 @@ void __init ld_mmu_sun4c(void) | |||
2156 | BTFIXUPSET_INT(page_readonly, pgprot_val(SUN4C_PAGE_READONLY)); | 2166 | BTFIXUPSET_INT(page_readonly, pgprot_val(SUN4C_PAGE_READONLY)); |
2157 | BTFIXUPSET_INT(page_kernel, pgprot_val(SUN4C_PAGE_KERNEL)); | 2167 | BTFIXUPSET_INT(page_kernel, pgprot_val(SUN4C_PAGE_KERNEL)); |
2158 | page_kernel = pgprot_val(SUN4C_PAGE_KERNEL); | 2168 | page_kernel = pgprot_val(SUN4C_PAGE_KERNEL); |
2159 | pg_iobits = _SUN4C_PAGE_PRESENT | _SUN4C_READABLE | _SUN4C_WRITEABLE | | ||
2160 | _SUN4C_PAGE_IO | _SUN4C_PAGE_NOCACHE; | ||
2161 | 2169 | ||
2162 | /* Functions */ | 2170 | /* Functions */ |
2171 | BTFIXUPSET_CALL(pgprot_noncached, sun4c_pgprot_noncached, BTFIXUPCALL_NORM); | ||
2163 | BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4c, BTFIXUPCALL_NORM); | 2172 | BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4c, BTFIXUPCALL_NORM); |
2164 | BTFIXUPSET_CALL(do_check_pgt_cache, sun4c_check_pgt_cache, BTFIXUPCALL_NORM); | 2173 | BTFIXUPSET_CALL(do_check_pgt_cache, sun4c_check_pgt_cache, BTFIXUPCALL_NORM); |
2165 | 2174 | ||
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index c3685b314d71..267afddf63cf 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -175,11 +175,11 @@ config HUGETLB_PAGE_SIZE_4MB | |||
175 | bool "4MB" | 175 | bool "4MB" |
176 | 176 | ||
177 | config HUGETLB_PAGE_SIZE_512K | 177 | config HUGETLB_PAGE_SIZE_512K |
178 | depends on !SPARC64_PAGE_SIZE_4MB | 178 | depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512KB |
179 | bool "512K" | 179 | bool "512K" |
180 | 180 | ||
181 | config HUGETLB_PAGE_SIZE_64K | 181 | config HUGETLB_PAGE_SIZE_64K |
182 | depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512KB | 182 | depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512KB && !SPARC64_PAGE_SIZE_64K |
183 | bool "64K" | 183 | bool "64K" |
184 | 184 | ||
185 | endchoice | 185 | endchoice |
diff --git a/arch/sparc64/Kconfig.debug b/arch/sparc64/Kconfig.debug index 3e31be494e54..afe0a7720a26 100644 --- a/arch/sparc64/Kconfig.debug +++ b/arch/sparc64/Kconfig.debug | |||
@@ -24,7 +24,7 @@ config DEBUG_BOOTMEM | |||
24 | bool "Debug BOOTMEM initialization" | 24 | bool "Debug BOOTMEM initialization" |
25 | 25 | ||
26 | config DEBUG_PAGEALLOC | 26 | config DEBUG_PAGEALLOC |
27 | bool "Page alloc debugging" | 27 | bool "Debug page memory allocations" |
28 | depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND | 28 | depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND |
29 | help | 29 | help |
30 | Unmap pages from the kernel linear mapping after free_pages(). | 30 | Unmap pages from the kernel linear mapping after free_pages(). |
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 8c93ba655b33..11e645c9ec50 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -117,9 +117,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
117 | #ifndef CONFIG_SMP | 117 | #ifndef CONFIG_SMP |
118 | seq_printf(p, "%10u ", kstat_irqs(i)); | 118 | seq_printf(p, "%10u ", kstat_irqs(i)); |
119 | #else | 119 | #else |
120 | for (j = 0; j < NR_CPUS; j++) { | 120 | for_each_online_cpu(j) { |
121 | if (!cpu_online(j)) | ||
122 | continue; | ||
123 | seq_printf(p, "%10u ", | 121 | seq_printf(p, "%10u ", |
124 | kstat_cpu(j).irqs[i]); | 122 | kstat_cpu(j).irqs[i]); |
125 | } | 123 | } |
@@ -729,7 +727,7 @@ void handler_irq(int irq, struct pt_regs *regs) | |||
729 | } | 727 | } |
730 | 728 | ||
731 | #ifdef CONFIG_BLK_DEV_FD | 729 | #ifdef CONFIG_BLK_DEV_FD |
732 | extern irqreturn_t floppy_interrupt(int, void *, struct pt_regs *);; | 730 | extern irqreturn_t floppy_interrupt(int, void *, struct pt_regs *); |
733 | 731 | ||
734 | /* XXX No easy way to include asm/floppy.h XXX */ | 732 | /* XXX No easy way to include asm/floppy.h XXX */ |
735 | extern unsigned char *pdma_vaddr; | 733 | extern unsigned char *pdma_vaddr; |
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 95ffa9418620..dfccff29e182 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -656,6 +656,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
656 | __pci_mmap_set_flags(dev, vma, mmap_state); | 656 | __pci_mmap_set_flags(dev, vma, mmap_state); |
657 | __pci_mmap_set_pgprot(dev, vma, mmap_state); | 657 | __pci_mmap_set_pgprot(dev, vma, mmap_state); |
658 | 658 | ||
659 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | ||
659 | ret = io_remap_pfn_range(vma, vma->vm_start, | 660 | ret = io_remap_pfn_range(vma, vma->vm_start, |
660 | vma->vm_pgoff, | 661 | vma->vm_pgoff, |
661 | vma->vm_end - vma->vm_start, | 662 | vma->vm_end - vma->vm_start, |
@@ -663,7 +664,6 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
663 | if (ret) | 664 | if (ret) |
664 | return ret; | 665 | return ret; |
665 | 666 | ||
666 | vma->vm_flags |= VM_IO; | ||
667 | return 0; | 667 | return 0; |
668 | } | 668 | } |
669 | 669 | ||
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 373a701c90a5..7dc28a484268 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -57,25 +57,21 @@ void smp_info(struct seq_file *m) | |||
57 | int i; | 57 | int i; |
58 | 58 | ||
59 | seq_printf(m, "State:\n"); | 59 | seq_printf(m, "State:\n"); |
60 | for (i = 0; i < NR_CPUS; i++) { | 60 | for_each_online_cpu(i) |
61 | if (cpu_online(i)) | 61 | seq_printf(m, "CPU%d:\t\tonline\n", i); |
62 | seq_printf(m, | ||
63 | "CPU%d:\t\tonline\n", i); | ||
64 | } | ||
65 | } | 62 | } |
66 | 63 | ||
67 | void smp_bogo(struct seq_file *m) | 64 | void smp_bogo(struct seq_file *m) |
68 | { | 65 | { |
69 | int i; | 66 | int i; |
70 | 67 | ||
71 | for (i = 0; i < NR_CPUS; i++) | 68 | for_each_online_cpu(i) |
72 | if (cpu_online(i)) | 69 | seq_printf(m, |
73 | seq_printf(m, | 70 | "Cpu%dBogo\t: %lu.%02lu\n" |
74 | "Cpu%dBogo\t: %lu.%02lu\n" | 71 | "Cpu%dClkTck\t: %016lx\n", |
75 | "Cpu%dClkTck\t: %016lx\n", | 72 | i, cpu_data(i).udelay_val / (500000/HZ), |
76 | i, cpu_data(i).udelay_val / (500000/HZ), | 73 | (cpu_data(i).udelay_val / (5000/HZ)) % 100, |
77 | (cpu_data(i).udelay_val / (5000/HZ)) % 100, | 74 | i, cpu_data(i).clock_tick); |
78 | i, cpu_data(i).clock_tick); | ||
79 | } | 75 | } |
80 | 76 | ||
81 | void __init smp_store_cpu_info(int id) | 77 | void __init smp_store_cpu_info(int id) |
@@ -1282,7 +1278,7 @@ int setup_profiling_timer(unsigned int multiplier) | |||
1282 | return -EINVAL; | 1278 | return -EINVAL; |
1283 | 1279 | ||
1284 | spin_lock_irqsave(&prof_setup_lock, flags); | 1280 | spin_lock_irqsave(&prof_setup_lock, flags); |
1285 | for (i = 0; i < NR_CPUS; i++) | 1281 | for_each_cpu(i) |
1286 | prof_multiplier(i) = multiplier; | 1282 | prof_multiplier(i) = multiplier; |
1287 | current_tick_offset = (timer_tick_offset / multiplier); | 1283 | current_tick_offset = (timer_tick_offset / multiplier); |
1288 | spin_unlock_irqrestore(&prof_setup_lock, flags); | 1284 | spin_unlock_irqrestore(&prof_setup_lock, flags); |
@@ -1302,6 +1298,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
1302 | while (!cpu_find_by_instance(instance, NULL, &mid)) { | 1298 | while (!cpu_find_by_instance(instance, NULL, &mid)) { |
1303 | if (mid != boot_cpu_id) { | 1299 | if (mid != boot_cpu_id) { |
1304 | cpu_clear(mid, phys_cpu_present_map); | 1300 | cpu_clear(mid, phys_cpu_present_map); |
1301 | cpu_clear(mid, cpu_present_map); | ||
1305 | if (num_possible_cpus() <= max_cpus) | 1302 | if (num_possible_cpus() <= max_cpus) |
1306 | break; | 1303 | break; |
1307 | } | 1304 | } |
@@ -1336,8 +1333,10 @@ void __init smp_setup_cpu_possible_map(void) | |||
1336 | 1333 | ||
1337 | instance = 0; | 1334 | instance = 0; |
1338 | while (!cpu_find_by_instance(instance, NULL, &mid)) { | 1335 | while (!cpu_find_by_instance(instance, NULL, &mid)) { |
1339 | if (mid < NR_CPUS) | 1336 | if (mid < NR_CPUS) { |
1340 | cpu_set(mid, phys_cpu_present_map); | 1337 | cpu_set(mid, phys_cpu_present_map); |
1338 | cpu_set(mid, cpu_present_map); | ||
1339 | } | ||
1341 | instance++; | 1340 | instance++; |
1342 | } | 1341 | } |
1343 | } | 1342 | } |
@@ -1384,10 +1383,8 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
1384 | unsigned long bogosum = 0; | 1383 | unsigned long bogosum = 0; |
1385 | int i; | 1384 | int i; |
1386 | 1385 | ||
1387 | for (i = 0; i < NR_CPUS; i++) { | 1386 | for_each_online_cpu(i) |
1388 | if (cpu_online(i)) | 1387 | bogosum += cpu_data(i).udelay_val; |
1389 | bogosum += cpu_data(i).udelay_val; | ||
1390 | } | ||
1391 | printk("Total of %ld processors activated " | 1388 | printk("Total of %ld processors activated " |
1392 | "(%lu.%02lu BogoMIPS).\n", | 1389 | "(%lu.%02lu BogoMIPS).\n", |
1393 | (long) num_online_cpus(), | 1390 | (long) num_online_cpus(), |
diff --git a/arch/sparc64/kernel/sun4v_tlb_miss.S b/arch/sparc64/kernel/sun4v_tlb_miss.S index ab23ddb7116e..b731881224e8 100644 --- a/arch/sparc64/kernel/sun4v_tlb_miss.S +++ b/arch/sparc64/kernel/sun4v_tlb_miss.S | |||
@@ -29,15 +29,15 @@ | |||
29 | * | 29 | * |
30 | * index_mask = (512 << (tsb_reg & 0x7UL)) - 1UL; | 30 | * index_mask = (512 << (tsb_reg & 0x7UL)) - 1UL; |
31 | * tsb_base = tsb_reg & ~0x7UL; | 31 | * tsb_base = tsb_reg & ~0x7UL; |
32 | * tsb_index = ((vaddr >> PAGE_SHIFT) & tsb_mask); | 32 | * tsb_index = ((vaddr >> HASH_SHIFT) & tsb_mask); |
33 | * tsb_ptr = tsb_base + (tsb_index * 16); | 33 | * tsb_ptr = tsb_base + (tsb_index * 16); |
34 | */ | 34 | */ |
35 | #define COMPUTE_TSB_PTR(TSB_PTR, VADDR, TMP1, TMP2) \ | 35 | #define COMPUTE_TSB_PTR(TSB_PTR, VADDR, HASH_SHIFT, TMP1, TMP2) \ |
36 | and TSB_PTR, 0x7, TMP1; \ | 36 | and TSB_PTR, 0x7, TMP1; \ |
37 | mov 512, TMP2; \ | 37 | mov 512, TMP2; \ |
38 | andn TSB_PTR, 0x7, TSB_PTR; \ | 38 | andn TSB_PTR, 0x7, TSB_PTR; \ |
39 | sllx TMP2, TMP1, TMP2; \ | 39 | sllx TMP2, TMP1, TMP2; \ |
40 | srlx VADDR, PAGE_SHIFT, TMP1; \ | 40 | srlx VADDR, HASH_SHIFT, TMP1; \ |
41 | sub TMP2, 1, TMP2; \ | 41 | sub TMP2, 1, TMP2; \ |
42 | and TMP1, TMP2, TMP1; \ | 42 | and TMP1, TMP2, TMP1; \ |
43 | sllx TMP1, 4, TMP1; \ | 43 | sllx TMP1, 4, TMP1; \ |
@@ -53,7 +53,7 @@ sun4v_itlb_miss: | |||
53 | 53 | ||
54 | LOAD_ITLB_INFO(%g2, %g4, %g5) | 54 | LOAD_ITLB_INFO(%g2, %g4, %g5) |
55 | COMPUTE_TAG_TARGET(%g6, %g4, %g5, kvmap_itlb_4v) | 55 | COMPUTE_TAG_TARGET(%g6, %g4, %g5, kvmap_itlb_4v) |
56 | COMPUTE_TSB_PTR(%g1, %g4, %g3, %g7) | 56 | COMPUTE_TSB_PTR(%g1, %g4, PAGE_SHIFT, %g3, %g7) |
57 | 57 | ||
58 | /* Load TSB tag/pte into %g2/%g3 and compare the tag. */ | 58 | /* Load TSB tag/pte into %g2/%g3 and compare the tag. */ |
59 | ldda [%g1] ASI_QUAD_LDD_PHYS_4V, %g2 | 59 | ldda [%g1] ASI_QUAD_LDD_PHYS_4V, %g2 |
@@ -99,7 +99,7 @@ sun4v_dtlb_miss: | |||
99 | 99 | ||
100 | LOAD_DTLB_INFO(%g2, %g4, %g5) | 100 | LOAD_DTLB_INFO(%g2, %g4, %g5) |
101 | COMPUTE_TAG_TARGET(%g6, %g4, %g5, kvmap_dtlb_4v) | 101 | COMPUTE_TAG_TARGET(%g6, %g4, %g5, kvmap_dtlb_4v) |
102 | COMPUTE_TSB_PTR(%g1, %g4, %g3, %g7) | 102 | COMPUTE_TSB_PTR(%g1, %g4, PAGE_SHIFT, %g3, %g7) |
103 | 103 | ||
104 | /* Load TSB tag/pte into %g2/%g3 and compare the tag. */ | 104 | /* Load TSB tag/pte into %g2/%g3 and compare the tag. */ |
105 | ldda [%g1] ASI_QUAD_LDD_PHYS_4V, %g2 | 105 | ldda [%g1] ASI_QUAD_LDD_PHYS_4V, %g2 |
@@ -171,21 +171,26 @@ sun4v_dtsb_miss: | |||
171 | 171 | ||
172 | /* fallthrough */ | 172 | /* fallthrough */ |
173 | 173 | ||
174 | /* Create TSB pointer into %g1. This is something like: | ||
175 | * | ||
176 | * index_mask = (512 << (tsb_reg & 0x7UL)) - 1UL; | ||
177 | * tsb_base = tsb_reg & ~0x7UL; | ||
178 | * tsb_index = ((vaddr >> PAGE_SHIFT) & tsb_mask); | ||
179 | * tsb_ptr = tsb_base + (tsb_index * 16); | ||
180 | */ | ||
181 | sun4v_tsb_miss_common: | 174 | sun4v_tsb_miss_common: |
182 | COMPUTE_TSB_PTR(%g1, %g4, %g5, %g7) | 175 | COMPUTE_TSB_PTR(%g1, %g4, PAGE_SHIFT, %g5, %g7) |
183 | 176 | ||
184 | /* Branch directly to page table lookup. We have SCRATCHPAD_MMU_MISS | ||
185 | * still in %g2, so it's quite trivial to get at the PGD PHYS value | ||
186 | * so we can preload it into %g7. | ||
187 | */ | ||
188 | sub %g2, TRAP_PER_CPU_FAULT_INFO, %g2 | 177 | sub %g2, TRAP_PER_CPU_FAULT_INFO, %g2 |
178 | |||
179 | #ifdef CONFIG_HUGETLB_PAGE | ||
180 | mov SCRATCHPAD_UTSBREG2, %g5 | ||
181 | ldxa [%g5] ASI_SCRATCHPAD, %g5 | ||
182 | cmp %g5, -1 | ||
183 | be,pt %xcc, 80f | ||
184 | nop | ||
185 | COMPUTE_TSB_PTR(%g5, %g4, HPAGE_SHIFT, %g2, %g7) | ||
186 | |||
187 | /* That clobbered %g2, reload it. */ | ||
188 | ldxa [%g0] ASI_SCRATCHPAD, %g2 | ||
189 | sub %g2, TRAP_PER_CPU_FAULT_INFO, %g2 | ||
190 | |||
191 | 80: stx %g5, [%g2 + TRAP_PER_CPU_TSB_HUGE_TEMP] | ||
192 | #endif | ||
193 | |||
189 | ba,pt %xcc, tsb_miss_page_table_walk_sun4v_fastpath | 194 | ba,pt %xcc, tsb_miss_page_table_walk_sun4v_fastpath |
190 | ldx [%g2 + TRAP_PER_CPU_PGD_PADDR], %g7 | 195 | ldx [%g2 + TRAP_PER_CPU_PGD_PADDR], %g7 |
191 | 196 | ||
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 7f7dba0ca96a..df612e4f75f9 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -2482,6 +2482,7 @@ void init_cur_cpu_trap(struct thread_info *t) | |||
2482 | 2482 | ||
2483 | extern void thread_info_offsets_are_bolixed_dave(void); | 2483 | extern void thread_info_offsets_are_bolixed_dave(void); |
2484 | extern void trap_per_cpu_offsets_are_bolixed_dave(void); | 2484 | extern void trap_per_cpu_offsets_are_bolixed_dave(void); |
2485 | extern void tsb_config_offsets_are_bolixed_dave(void); | ||
2485 | 2486 | ||
2486 | /* Only invoked on boot processor. */ | 2487 | /* Only invoked on boot processor. */ |
2487 | void __init trap_init(void) | 2488 | void __init trap_init(void) |
@@ -2535,9 +2536,27 @@ void __init trap_init(void) | |||
2535 | (TRAP_PER_CPU_CPU_MONDO_BLOCK_PA != | 2536 | (TRAP_PER_CPU_CPU_MONDO_BLOCK_PA != |
2536 | offsetof(struct trap_per_cpu, cpu_mondo_block_pa)) || | 2537 | offsetof(struct trap_per_cpu, cpu_mondo_block_pa)) || |
2537 | (TRAP_PER_CPU_CPU_LIST_PA != | 2538 | (TRAP_PER_CPU_CPU_LIST_PA != |
2538 | offsetof(struct trap_per_cpu, cpu_list_pa))) | 2539 | offsetof(struct trap_per_cpu, cpu_list_pa)) || |
2540 | (TRAP_PER_CPU_TSB_HUGE != | ||
2541 | offsetof(struct trap_per_cpu, tsb_huge)) || | ||
2542 | (TRAP_PER_CPU_TSB_HUGE_TEMP != | ||
2543 | offsetof(struct trap_per_cpu, tsb_huge_temp))) | ||
2539 | trap_per_cpu_offsets_are_bolixed_dave(); | 2544 | trap_per_cpu_offsets_are_bolixed_dave(); |
2540 | 2545 | ||
2546 | if ((TSB_CONFIG_TSB != | ||
2547 | offsetof(struct tsb_config, tsb)) || | ||
2548 | (TSB_CONFIG_RSS_LIMIT != | ||
2549 | offsetof(struct tsb_config, tsb_rss_limit)) || | ||
2550 | (TSB_CONFIG_NENTRIES != | ||
2551 | offsetof(struct tsb_config, tsb_nentries)) || | ||
2552 | (TSB_CONFIG_REG_VAL != | ||
2553 | offsetof(struct tsb_config, tsb_reg_val)) || | ||
2554 | (TSB_CONFIG_MAP_VADDR != | ||
2555 | offsetof(struct tsb_config, tsb_map_vaddr)) || | ||
2556 | (TSB_CONFIG_MAP_PTE != | ||
2557 | offsetof(struct tsb_config, tsb_map_pte))) | ||
2558 | tsb_config_offsets_are_bolixed_dave(); | ||
2559 | |||
2541 | /* Attach to the address space of init_task. On SMP we | 2560 | /* Attach to the address space of init_task. On SMP we |
2542 | * do this in smp.c:smp_callin for other cpus. | 2561 | * do this in smp.c:smp_callin for other cpus. |
2543 | */ | 2562 | */ |
diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S index 118baea44f69..a0c8ba58920b 100644 --- a/arch/sparc64/kernel/tsb.S +++ b/arch/sparc64/kernel/tsb.S | |||
@@ -3,8 +3,13 @@ | |||
3 | * Copyright (C) 2006 David S. Miller <davem@davemloft.net> | 3 | * Copyright (C) 2006 David S. Miller <davem@davemloft.net> |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/config.h> | ||
7 | |||
6 | #include <asm/tsb.h> | 8 | #include <asm/tsb.h> |
7 | #include <asm/hypervisor.h> | 9 | #include <asm/hypervisor.h> |
10 | #include <asm/page.h> | ||
11 | #include <asm/cpudata.h> | ||
12 | #include <asm/mmu.h> | ||
8 | 13 | ||
9 | .text | 14 | .text |
10 | .align 32 | 15 | .align 32 |
@@ -34,34 +39,124 @@ tsb_miss_itlb: | |||
34 | ldxa [%g4] ASI_IMMU, %g4 | 39 | ldxa [%g4] ASI_IMMU, %g4 |
35 | 40 | ||
36 | /* At this point we have: | 41 | /* At this point we have: |
37 | * %g1 -- TSB entry address | 42 | * %g1 -- PAGE_SIZE TSB entry address |
38 | * %g3 -- FAULT_CODE_{D,I}TLB | 43 | * %g3 -- FAULT_CODE_{D,I}TLB |
39 | * %g4 -- missing virtual address | 44 | * %g4 -- missing virtual address |
40 | * %g6 -- TAG TARGET (vaddr >> 22) | 45 | * %g6 -- TAG TARGET (vaddr >> 22) |
41 | */ | 46 | */ |
42 | tsb_miss_page_table_walk: | 47 | tsb_miss_page_table_walk: |
43 | TRAP_LOAD_PGD_PHYS(%g7, %g5) | 48 | TRAP_LOAD_TRAP_BLOCK(%g7, %g5) |
44 | 49 | ||
45 | /* And now we have the PGD base physical address in %g7. */ | 50 | /* Before committing to a full page table walk, |
46 | tsb_miss_page_table_walk_sun4v_fastpath: | 51 | * check the huge page TSB. |
47 | USER_PGTABLE_WALK_TL1(%g4, %g7, %g5, %g2, tsb_do_fault) | 52 | */ |
53 | #ifdef CONFIG_HUGETLB_PAGE | ||
54 | |||
55 | 661: ldx [%g7 + TRAP_PER_CPU_TSB_HUGE], %g5 | ||
56 | nop | ||
57 | .section .sun4v_2insn_patch, "ax" | ||
58 | .word 661b | ||
59 | mov SCRATCHPAD_UTSBREG2, %g5 | ||
60 | ldxa [%g5] ASI_SCRATCHPAD, %g5 | ||
61 | .previous | ||
62 | |||
63 | cmp %g5, -1 | ||
64 | be,pt %xcc, 80f | ||
65 | nop | ||
66 | |||
67 | /* We need an aligned pair of registers containing 2 values | ||
68 | * which can be easily rematerialized. %g6 and %g7 foot the | ||
69 | * bill just nicely. We'll save %g6 away into %g2 for the | ||
70 | * huge page TSB TAG comparison. | ||
71 | * | ||
72 | * Perform a huge page TSB lookup. | ||
73 | */ | ||
74 | mov %g6, %g2 | ||
75 | and %g5, 0x7, %g6 | ||
76 | mov 512, %g7 | ||
77 | andn %g5, 0x7, %g5 | ||
78 | sllx %g7, %g6, %g7 | ||
79 | srlx %g4, HPAGE_SHIFT, %g6 | ||
80 | sub %g7, 1, %g7 | ||
81 | and %g6, %g7, %g6 | ||
82 | sllx %g6, 4, %g6 | ||
83 | add %g5, %g6, %g5 | ||
84 | |||
85 | TSB_LOAD_QUAD(%g5, %g6) | ||
86 | cmp %g6, %g2 | ||
87 | be,a,pt %xcc, tsb_tlb_reload | ||
88 | mov %g7, %g5 | ||
89 | |||
90 | /* No match, remember the huge page TSB entry address, | ||
91 | * and restore %g6 and %g7. | ||
92 | */ | ||
93 | TRAP_LOAD_TRAP_BLOCK(%g7, %g6) | ||
94 | srlx %g4, 22, %g6 | ||
95 | 80: stx %g5, [%g7 + TRAP_PER_CPU_TSB_HUGE_TEMP] | ||
96 | |||
97 | #endif | ||
98 | |||
99 | ldx [%g7 + TRAP_PER_CPU_PGD_PADDR], %g7 | ||
48 | 100 | ||
49 | /* At this point we have: | 101 | /* At this point we have: |
50 | * %g1 -- TSB entry address | 102 | * %g1 -- TSB entry address |
51 | * %g3 -- FAULT_CODE_{D,I}TLB | 103 | * %g3 -- FAULT_CODE_{D,I}TLB |
52 | * %g5 -- physical address of PTE in Linux page tables | 104 | * %g4 -- missing virtual address |
53 | * %g6 -- TAG TARGET (vaddr >> 22) | 105 | * %g6 -- TAG TARGET (vaddr >> 22) |
106 | * %g7 -- page table physical address | ||
107 | * | ||
108 | * We know that both the base PAGE_SIZE TSB and the HPAGE_SIZE | ||
109 | * TSB both lack a matching entry. | ||
54 | */ | 110 | */ |
55 | tsb_reload: | 111 | tsb_miss_page_table_walk_sun4v_fastpath: |
56 | TSB_LOCK_TAG(%g1, %g2, %g7) | 112 | USER_PGTABLE_WALK_TL1(%g4, %g7, %g5, %g2, tsb_do_fault) |
57 | 113 | ||
58 | /* Load and check PTE. */ | 114 | /* Load and check PTE. */ |
59 | ldxa [%g5] ASI_PHYS_USE_EC, %g5 | 115 | ldxa [%g5] ASI_PHYS_USE_EC, %g5 |
60 | mov 1, %g7 | 116 | brgez,pn %g5, tsb_do_fault |
61 | sllx %g7, TSB_TAG_INVALID_BIT, %g7 | 117 | nop |
62 | brgez,a,pn %g5, tsb_do_fault | 118 | |
63 | TSB_STORE(%g1, %g7) | 119 | #ifdef CONFIG_HUGETLB_PAGE |
120 | 661: sethi %uhi(_PAGE_SZALL_4U), %g7 | ||
121 | sllx %g7, 32, %g7 | ||
122 | .section .sun4v_2insn_patch, "ax" | ||
123 | .word 661b | ||
124 | mov _PAGE_SZALL_4V, %g7 | ||
125 | nop | ||
126 | .previous | ||
127 | |||
128 | and %g5, %g7, %g2 | ||
129 | |||
130 | 661: sethi %uhi(_PAGE_SZHUGE_4U), %g7 | ||
131 | sllx %g7, 32, %g7 | ||
132 | .section .sun4v_2insn_patch, "ax" | ||
133 | .word 661b | ||
134 | mov _PAGE_SZHUGE_4V, %g7 | ||
135 | nop | ||
136 | .previous | ||
137 | |||
138 | cmp %g2, %g7 | ||
139 | bne,pt %xcc, 60f | ||
140 | nop | ||
141 | |||
142 | /* It is a huge page, use huge page TSB entry address we | ||
143 | * calculated above. | ||
144 | */ | ||
145 | TRAP_LOAD_TRAP_BLOCK(%g7, %g2) | ||
146 | ldx [%g7 + TRAP_PER_CPU_TSB_HUGE_TEMP], %g2 | ||
147 | cmp %g2, -1 | ||
148 | movne %xcc, %g2, %g1 | ||
149 | 60: | ||
150 | #endif | ||
64 | 151 | ||
152 | /* At this point we have: | ||
153 | * %g1 -- TSB entry address | ||
154 | * %g3 -- FAULT_CODE_{D,I}TLB | ||
155 | * %g5 -- valid PTE | ||
156 | * %g6 -- TAG TARGET (vaddr >> 22) | ||
157 | */ | ||
158 | tsb_reload: | ||
159 | TSB_LOCK_TAG(%g1, %g2, %g7) | ||
65 | TSB_WRITE(%g1, %g5, %g6) | 160 | TSB_WRITE(%g1, %g5, %g6) |
66 | 161 | ||
67 | /* Finally, load TLB and return from trap. */ | 162 | /* Finally, load TLB and return from trap. */ |
@@ -240,10 +335,9 @@ tsb_flush: | |||
240 | * schedule() time. | 335 | * schedule() time. |
241 | * | 336 | * |
242 | * %o0: page table physical address | 337 | * %o0: page table physical address |
243 | * %o1: TSB register value | 338 | * %o1: TSB base config pointer |
244 | * %o2: TSB virtual address | 339 | * %o2: TSB huge config pointer, or NULL if none |
245 | * %o3: TSB mapping locked PTE | 340 | * %o3: Hypervisor TSB descriptor physical address |
246 | * %o4: Hypervisor TSB descriptor physical address | ||
247 | * | 341 | * |
248 | * We have to run this whole thing with interrupts | 342 | * We have to run this whole thing with interrupts |
249 | * disabled so that the current cpu doesn't change | 343 | * disabled so that the current cpu doesn't change |
@@ -253,63 +347,79 @@ tsb_flush: | |||
253 | .globl __tsb_context_switch | 347 | .globl __tsb_context_switch |
254 | .type __tsb_context_switch,#function | 348 | .type __tsb_context_switch,#function |
255 | __tsb_context_switch: | 349 | __tsb_context_switch: |
256 | rdpr %pstate, %o5 | 350 | rdpr %pstate, %g1 |
257 | wrpr %o5, PSTATE_IE, %pstate | 351 | wrpr %g1, PSTATE_IE, %pstate |
352 | |||
353 | TRAP_LOAD_TRAP_BLOCK(%g2, %g3) | ||
258 | 354 | ||
259 | ldub [%g6 + TI_CPU], %g1 | ||
260 | sethi %hi(trap_block), %g2 | ||
261 | sllx %g1, TRAP_BLOCK_SZ_SHIFT, %g1 | ||
262 | or %g2, %lo(trap_block), %g2 | ||
263 | add %g2, %g1, %g2 | ||
264 | stx %o0, [%g2 + TRAP_PER_CPU_PGD_PADDR] | 355 | stx %o0, [%g2 + TRAP_PER_CPU_PGD_PADDR] |
265 | 356 | ||
266 | sethi %hi(tlb_type), %g1 | 357 | ldx [%o1 + TSB_CONFIG_REG_VAL], %o0 |
267 | lduw [%g1 + %lo(tlb_type)], %g1 | 358 | brz,pt %o2, 1f |
268 | cmp %g1, 3 | 359 | mov -1, %g3 |
269 | bne,pt %icc, 1f | 360 | |
361 | ldx [%o2 + TSB_CONFIG_REG_VAL], %g3 | ||
362 | |||
363 | 1: stx %g3, [%g2 + TRAP_PER_CPU_TSB_HUGE] | ||
364 | |||
365 | sethi %hi(tlb_type), %g2 | ||
366 | lduw [%g2 + %lo(tlb_type)], %g2 | ||
367 | cmp %g2, 3 | ||
368 | bne,pt %icc, 50f | ||
270 | nop | 369 | nop |
271 | 370 | ||
272 | /* Hypervisor TSB switch. */ | 371 | /* Hypervisor TSB switch. */ |
273 | mov SCRATCHPAD_UTSBREG1, %g1 | 372 | mov SCRATCHPAD_UTSBREG1, %o5 |
274 | stxa %o1, [%g1] ASI_SCRATCHPAD | 373 | stxa %o0, [%o5] ASI_SCRATCHPAD |
275 | mov -1, %g2 | 374 | mov SCRATCHPAD_UTSBREG2, %o5 |
276 | mov SCRATCHPAD_UTSBREG2, %g1 | 375 | stxa %g3, [%o5] ASI_SCRATCHPAD |
277 | stxa %g2, [%g1] ASI_SCRATCHPAD | 376 | |
278 | 377 | mov 2, %o0 | |
279 | /* Save away %o5's %pstate, we have to use %o5 for | 378 | cmp %g3, -1 |
280 | * the hypervisor call. | 379 | move %xcc, 1, %o0 |
281 | */ | ||
282 | mov %o5, %g1 | ||
283 | 380 | ||
284 | mov HV_FAST_MMU_TSB_CTXNON0, %o5 | 381 | mov HV_FAST_MMU_TSB_CTXNON0, %o5 |
285 | mov 1, %o0 | 382 | mov %o3, %o1 |
286 | mov %o4, %o1 | ||
287 | ta HV_FAST_TRAP | 383 | ta HV_FAST_TRAP |
288 | 384 | ||
289 | /* Finish up and restore %o5. */ | 385 | /* Finish up. */ |
290 | ba,pt %xcc, 9f | 386 | ba,pt %xcc, 9f |
291 | mov %g1, %o5 | 387 | nop |
292 | 388 | ||
293 | /* SUN4U TSB switch. */ | 389 | /* SUN4U TSB switch. */ |
294 | 1: mov TSB_REG, %g1 | 390 | 50: mov TSB_REG, %o5 |
295 | stxa %o1, [%g1] ASI_DMMU | 391 | stxa %o0, [%o5] ASI_DMMU |
296 | membar #Sync | 392 | membar #Sync |
297 | stxa %o1, [%g1] ASI_IMMU | 393 | stxa %o0, [%o5] ASI_IMMU |
298 | membar #Sync | 394 | membar #Sync |
299 | 395 | ||
300 | 2: brz %o2, 9f | 396 | 2: ldx [%o1 + TSB_CONFIG_MAP_VADDR], %o4 |
301 | nop | 397 | brz %o4, 9f |
398 | ldx [%o1 + TSB_CONFIG_MAP_PTE], %o5 | ||
302 | 399 | ||
303 | sethi %hi(sparc64_highest_unlocked_tlb_ent), %g2 | 400 | sethi %hi(sparc64_highest_unlocked_tlb_ent), %g2 |
304 | mov TLB_TAG_ACCESS, %g1 | 401 | mov TLB_TAG_ACCESS, %g3 |
305 | lduw [%g2 + %lo(sparc64_highest_unlocked_tlb_ent)], %g2 | 402 | lduw [%g2 + %lo(sparc64_highest_unlocked_tlb_ent)], %g2 |
306 | stxa %o2, [%g1] ASI_DMMU | 403 | stxa %o4, [%g3] ASI_DMMU |
307 | membar #Sync | 404 | membar #Sync |
308 | sllx %g2, 3, %g2 | 405 | sllx %g2, 3, %g2 |
309 | stxa %o3, [%g2] ASI_DTLB_DATA_ACCESS | 406 | stxa %o5, [%g2] ASI_DTLB_DATA_ACCESS |
407 | membar #Sync | ||
408 | |||
409 | brz,pt %o2, 9f | ||
410 | nop | ||
411 | |||
412 | ldx [%o2 + TSB_CONFIG_MAP_VADDR], %o4 | ||
413 | ldx [%o2 + TSB_CONFIG_MAP_PTE], %o5 | ||
414 | mov TLB_TAG_ACCESS, %g3 | ||
415 | stxa %o4, [%g3] ASI_DMMU | ||
416 | membar #Sync | ||
417 | sub %g2, (1 << 3), %g2 | ||
418 | stxa %o5, [%g2] ASI_DTLB_DATA_ACCESS | ||
310 | membar #Sync | 419 | membar #Sync |
420 | |||
311 | 9: | 421 | 9: |
312 | wrpr %o5, %pstate | 422 | wrpr %g1, %pstate |
313 | 423 | ||
314 | retl | 424 | retl |
315 | nop | 425 | nop |
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c index 63b6cc0cd5d5..d21ff3230c02 100644 --- a/arch/sparc64/mm/fault.c +++ b/arch/sparc64/mm/fault.c | |||
@@ -410,9 +410,18 @@ good_area: | |||
410 | up_read(&mm->mmap_sem); | 410 | up_read(&mm->mmap_sem); |
411 | 411 | ||
412 | mm_rss = get_mm_rss(mm); | 412 | mm_rss = get_mm_rss(mm); |
413 | if (unlikely(mm_rss >= mm->context.tsb_rss_limit)) | 413 | #ifdef CONFIG_HUGETLB_PAGE |
414 | tsb_grow(mm, mm_rss); | 414 | mm_rss -= (mm->context.huge_pte_count * (HPAGE_SIZE / PAGE_SIZE)); |
415 | 415 | #endif | |
416 | if (unlikely(mm_rss >= | ||
417 | mm->context.tsb_block[MM_TSB_BASE].tsb_rss_limit)) | ||
418 | tsb_grow(mm, MM_TSB_BASE, mm_rss); | ||
419 | #ifdef CONFIG_HUGETLB_PAGE | ||
420 | mm_rss = mm->context.huge_pte_count; | ||
421 | if (unlikely(mm_rss >= | ||
422 | mm->context.tsb_block[MM_TSB_HUGE].tsb_rss_limit)) | ||
423 | tsb_grow(mm, MM_TSB_HUGE, mm_rss); | ||
424 | #endif | ||
416 | return; | 425 | return; |
417 | 426 | ||
418 | /* | 427 | /* |
diff --git a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c index 5fc5c579e35e..8cb06205d265 100644 --- a/arch/sparc64/mm/generic.c +++ b/arch/sparc64/mm/generic.c | |||
@@ -140,7 +140,6 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | |||
140 | vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP; | 140 | vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP; |
141 | vma->vm_pgoff = phys_base >> PAGE_SHIFT; | 141 | vma->vm_pgoff = phys_base >> PAGE_SHIFT; |
142 | 142 | ||
143 | prot = __pgprot(pg_iobits); | ||
144 | offset -= from; | 143 | offset -= from; |
145 | dir = pgd_offset(mm, from); | 144 | dir = pgd_offset(mm, from); |
146 | flush_cache_range(vma, beg, end); | 145 | flush_cache_range(vma, beg, end); |
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index a7a24869d045..074620d413d4 100644 --- a/arch/sparc64/mm/hugetlbpage.c +++ b/arch/sparc64/mm/hugetlbpage.c | |||
@@ -199,13 +199,11 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | |||
199 | pte_t *pte = NULL; | 199 | pte_t *pte = NULL; |
200 | 200 | ||
201 | pgd = pgd_offset(mm, addr); | 201 | pgd = pgd_offset(mm, addr); |
202 | if (pgd) { | 202 | pud = pud_alloc(mm, pgd, addr); |
203 | pud = pud_offset(pgd, addr); | 203 | if (pud) { |
204 | if (pud) { | 204 | pmd = pmd_alloc(mm, pud, addr); |
205 | pmd = pmd_alloc(mm, pud, addr); | 205 | if (pmd) |
206 | if (pmd) | 206 | pte = pte_alloc_map(mm, pmd, addr); |
207 | pte = pte_alloc_map(mm, pmd, addr); | ||
208 | } | ||
209 | } | 207 | } |
210 | return pte; | 208 | return pte; |
211 | } | 209 | } |
@@ -231,13 +229,14 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
231 | return pte; | 229 | return pte; |
232 | } | 230 | } |
233 | 231 | ||
234 | #define mk_pte_huge(entry) do { pte_val(entry) |= _PAGE_SZHUGE; } while (0) | ||
235 | |||
236 | void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, | 232 | void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, |
237 | pte_t *ptep, pte_t entry) | 233 | pte_t *ptep, pte_t entry) |
238 | { | 234 | { |
239 | int i; | 235 | int i; |
240 | 236 | ||
237 | if (!pte_present(*ptep) && pte_present(entry)) | ||
238 | mm->context.huge_pte_count++; | ||
239 | |||
241 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { | 240 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { |
242 | set_pte_at(mm, addr, ptep, entry); | 241 | set_pte_at(mm, addr, ptep, entry); |
243 | ptep++; | 242 | ptep++; |
@@ -253,6 +252,8 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
253 | int i; | 252 | int i; |
254 | 253 | ||
255 | entry = *ptep; | 254 | entry = *ptep; |
255 | if (pte_present(entry)) | ||
256 | mm->context.huge_pte_count--; | ||
256 | 257 | ||
257 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { | 258 | for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { |
258 | pte_clear(mm, addr, ptep); | 259 | pte_clear(mm, addr, ptep); |
@@ -263,18 +264,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
263 | return entry; | 264 | return entry; |
264 | } | 265 | } |
265 | 266 | ||
266 | /* | ||
267 | * This function checks for proper alignment of input addr and len parameters. | ||
268 | */ | ||
269 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | ||
270 | { | ||
271 | if (len & ~HPAGE_MASK) | ||
272 | return -EINVAL; | ||
273 | if (addr & ~HPAGE_MASK) | ||
274 | return -EINVAL; | ||
275 | return 0; | ||
276 | } | ||
277 | |||
278 | struct page *follow_huge_addr(struct mm_struct *mm, | 267 | struct page *follow_huge_addr(struct mm_struct *mm, |
279 | unsigned long address, int write) | 268 | unsigned long address, int write) |
280 | { | 269 | { |
@@ -302,6 +291,15 @@ static void context_reload(void *__data) | |||
302 | 291 | ||
303 | void hugetlb_prefault_arch_hook(struct mm_struct *mm) | 292 | void hugetlb_prefault_arch_hook(struct mm_struct *mm) |
304 | { | 293 | { |
294 | struct tsb_config *tp = &mm->context.tsb_block[MM_TSB_HUGE]; | ||
295 | |||
296 | if (likely(tp->tsb != NULL)) | ||
297 | return; | ||
298 | |||
299 | tsb_grow(mm, MM_TSB_HUGE, 0); | ||
300 | tsb_context_switch(mm); | ||
301 | smp_tsb_sync(mm); | ||
302 | |||
305 | /* On UltraSPARC-III+ and later, configure the second half of | 303 | /* On UltraSPARC-III+ and later, configure the second half of |
306 | * the Data-TLB for huge pages. | 304 | * the Data-TLB for huge pages. |
307 | */ | 305 | */ |
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index c2b556106fc1..1539a8362b6f 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -283,6 +283,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t p | |||
283 | struct mm_struct *mm; | 283 | struct mm_struct *mm; |
284 | struct tsb *tsb; | 284 | struct tsb *tsb; |
285 | unsigned long tag, flags; | 285 | unsigned long tag, flags; |
286 | unsigned long tsb_index, tsb_hash_shift; | ||
286 | 287 | ||
287 | if (tlb_type != hypervisor) { | 288 | if (tlb_type != hypervisor) { |
288 | unsigned long pfn = pte_pfn(pte); | 289 | unsigned long pfn = pte_pfn(pte); |
@@ -312,10 +313,26 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t p | |||
312 | 313 | ||
313 | mm = vma->vm_mm; | 314 | mm = vma->vm_mm; |
314 | 315 | ||
316 | tsb_index = MM_TSB_BASE; | ||
317 | tsb_hash_shift = PAGE_SHIFT; | ||
318 | |||
315 | spin_lock_irqsave(&mm->context.lock, flags); | 319 | spin_lock_irqsave(&mm->context.lock, flags); |
316 | 320 | ||
317 | tsb = &mm->context.tsb[(address >> PAGE_SHIFT) & | 321 | #ifdef CONFIG_HUGETLB_PAGE |
318 | (mm->context.tsb_nentries - 1UL)]; | 322 | if (mm->context.tsb_block[MM_TSB_HUGE].tsb != NULL) { |
323 | if ((tlb_type == hypervisor && | ||
324 | (pte_val(pte) & _PAGE_SZALL_4V) == _PAGE_SZHUGE_4V) || | ||
325 | (tlb_type != hypervisor && | ||
326 | (pte_val(pte) & _PAGE_SZALL_4U) == _PAGE_SZHUGE_4U)) { | ||
327 | tsb_index = MM_TSB_HUGE; | ||
328 | tsb_hash_shift = HPAGE_SHIFT; | ||
329 | } | ||
330 | } | ||
331 | #endif | ||
332 | |||
333 | tsb = mm->context.tsb_block[tsb_index].tsb; | ||
334 | tsb += ((address >> tsb_hash_shift) & | ||
335 | (mm->context.tsb_block[tsb_index].tsb_nentries - 1UL)); | ||
319 | tag = (address >> 22UL); | 336 | tag = (address >> 22UL); |
320 | tsb_insert(tsb, tag, pte_val(pte)); | 337 | tsb_insert(tsb, tag, pte_val(pte)); |
321 | 338 | ||
@@ -1461,7 +1478,7 @@ void free_initmem(void) | |||
1461 | p = virt_to_page(page); | 1478 | p = virt_to_page(page); |
1462 | 1479 | ||
1463 | ClearPageReserved(p); | 1480 | ClearPageReserved(p); |
1464 | set_page_count(p, 1); | 1481 | init_page_count(p); |
1465 | __free_page(p); | 1482 | __free_page(p); |
1466 | num_physpages++; | 1483 | num_physpages++; |
1467 | totalram_pages++; | 1484 | totalram_pages++; |
@@ -1477,7 +1494,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
1477 | struct page *p = virt_to_page(start); | 1494 | struct page *p = virt_to_page(start); |
1478 | 1495 | ||
1479 | ClearPageReserved(p); | 1496 | ClearPageReserved(p); |
1480 | set_page_count(p, 1); | 1497 | init_page_count(p); |
1481 | __free_page(p); | 1498 | __free_page(p); |
1482 | num_physpages++; | 1499 | num_physpages++; |
1483 | totalram_pages++; | 1500 | totalram_pages++; |
@@ -1811,8 +1828,8 @@ void __flush_tlb_all(void) | |||
1811 | void online_page(struct page *page) | 1828 | void online_page(struct page *page) |
1812 | { | 1829 | { |
1813 | ClearPageReserved(page); | 1830 | ClearPageReserved(page); |
1814 | set_page_count(page, 0); | 1831 | init_page_count(page); |
1815 | free_cold_page(page); | 1832 | __free_page(page); |
1816 | totalram_pages++; | 1833 | totalram_pages++; |
1817 | num_physpages++; | 1834 | num_physpages++; |
1818 | } | 1835 | } |
diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c index b2064e2a44d6..beaa02810f0e 100644 --- a/arch/sparc64/mm/tsb.c +++ b/arch/sparc64/mm/tsb.c | |||
@@ -15,9 +15,9 @@ | |||
15 | 15 | ||
16 | extern struct tsb swapper_tsb[KERNEL_TSB_NENTRIES]; | 16 | extern struct tsb swapper_tsb[KERNEL_TSB_NENTRIES]; |
17 | 17 | ||
18 | static inline unsigned long tsb_hash(unsigned long vaddr, unsigned long nentries) | 18 | static inline unsigned long tsb_hash(unsigned long vaddr, unsigned long hash_shift, unsigned long nentries) |
19 | { | 19 | { |
20 | vaddr >>= PAGE_SHIFT; | 20 | vaddr >>= hash_shift; |
21 | return vaddr & (nentries - 1); | 21 | return vaddr & (nentries - 1); |
22 | } | 22 | } |
23 | 23 | ||
@@ -36,7 +36,8 @@ void flush_tsb_kernel_range(unsigned long start, unsigned long end) | |||
36 | unsigned long v; | 36 | unsigned long v; |
37 | 37 | ||
38 | for (v = start; v < end; v += PAGE_SIZE) { | 38 | for (v = start; v < end; v += PAGE_SIZE) { |
39 | unsigned long hash = tsb_hash(v, KERNEL_TSB_NENTRIES); | 39 | unsigned long hash = tsb_hash(v, PAGE_SHIFT, |
40 | KERNEL_TSB_NENTRIES); | ||
40 | struct tsb *ent = &swapper_tsb[hash]; | 41 | struct tsb *ent = &swapper_tsb[hash]; |
41 | 42 | ||
42 | if (tag_compare(ent->tag, v)) { | 43 | if (tag_compare(ent->tag, v)) { |
@@ -46,49 +47,91 @@ void flush_tsb_kernel_range(unsigned long start, unsigned long end) | |||
46 | } | 47 | } |
47 | } | 48 | } |
48 | 49 | ||
49 | void flush_tsb_user(struct mmu_gather *mp) | 50 | static void __flush_tsb_one(struct mmu_gather *mp, unsigned long hash_shift, unsigned long tsb, unsigned long nentries) |
50 | { | 51 | { |
51 | struct mm_struct *mm = mp->mm; | 52 | unsigned long i; |
52 | unsigned long nentries, base, flags; | ||
53 | struct tsb *tsb; | ||
54 | int i; | ||
55 | |||
56 | spin_lock_irqsave(&mm->context.lock, flags); | ||
57 | |||
58 | tsb = mm->context.tsb; | ||
59 | nentries = mm->context.tsb_nentries; | ||
60 | 53 | ||
61 | if (tlb_type == cheetah_plus || tlb_type == hypervisor) | ||
62 | base = __pa(tsb); | ||
63 | else | ||
64 | base = (unsigned long) tsb; | ||
65 | |||
66 | for (i = 0; i < mp->tlb_nr; i++) { | 54 | for (i = 0; i < mp->tlb_nr; i++) { |
67 | unsigned long v = mp->vaddrs[i]; | 55 | unsigned long v = mp->vaddrs[i]; |
68 | unsigned long tag, ent, hash; | 56 | unsigned long tag, ent, hash; |
69 | 57 | ||
70 | v &= ~0x1UL; | 58 | v &= ~0x1UL; |
71 | 59 | ||
72 | hash = tsb_hash(v, nentries); | 60 | hash = tsb_hash(v, hash_shift, nentries); |
73 | ent = base + (hash * sizeof(struct tsb)); | 61 | ent = tsb + (hash * sizeof(struct tsb)); |
74 | tag = (v >> 22UL); | 62 | tag = (v >> 22UL); |
75 | 63 | ||
76 | tsb_flush(ent, tag); | 64 | tsb_flush(ent, tag); |
77 | } | 65 | } |
66 | } | ||
67 | |||
68 | void flush_tsb_user(struct mmu_gather *mp) | ||
69 | { | ||
70 | struct mm_struct *mm = mp->mm; | ||
71 | unsigned long nentries, base, flags; | ||
72 | |||
73 | spin_lock_irqsave(&mm->context.lock, flags); | ||
78 | 74 | ||
75 | base = (unsigned long) mm->context.tsb_block[MM_TSB_BASE].tsb; | ||
76 | nentries = mm->context.tsb_block[MM_TSB_BASE].tsb_nentries; | ||
77 | if (tlb_type == cheetah_plus || tlb_type == hypervisor) | ||
78 | base = __pa(base); | ||
79 | __flush_tsb_one(mp, PAGE_SHIFT, base, nentries); | ||
80 | |||
81 | #ifdef CONFIG_HUGETLB_PAGE | ||
82 | if (mm->context.tsb_block[MM_TSB_HUGE].tsb) { | ||
83 | base = (unsigned long) mm->context.tsb_block[MM_TSB_HUGE].tsb; | ||
84 | nentries = mm->context.tsb_block[MM_TSB_HUGE].tsb_nentries; | ||
85 | if (tlb_type == cheetah_plus || tlb_type == hypervisor) | ||
86 | base = __pa(base); | ||
87 | __flush_tsb_one(mp, HPAGE_SHIFT, base, nentries); | ||
88 | } | ||
89 | #endif | ||
79 | spin_unlock_irqrestore(&mm->context.lock, flags); | 90 | spin_unlock_irqrestore(&mm->context.lock, flags); |
80 | } | 91 | } |
81 | 92 | ||
82 | static void setup_tsb_params(struct mm_struct *mm, unsigned long tsb_bytes) | 93 | #if defined(CONFIG_SPARC64_PAGE_SIZE_8KB) |
94 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_8K | ||
95 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_8K | ||
96 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) | ||
97 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_64K | ||
98 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_64K | ||
99 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_512KB) | ||
100 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_512K | ||
101 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_512K | ||
102 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_4MB) | ||
103 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_4MB | ||
104 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_4MB | ||
105 | #else | ||
106 | #error Broken base page size setting... | ||
107 | #endif | ||
108 | |||
109 | #ifdef CONFIG_HUGETLB_PAGE | ||
110 | #if defined(CONFIG_HUGETLB_PAGE_SIZE_64K) | ||
111 | #define HV_PGSZ_IDX_HUGE HV_PGSZ_IDX_64K | ||
112 | #define HV_PGSZ_MASK_HUGE HV_PGSZ_MASK_64K | ||
113 | #elif defined(CONFIG_HUGETLB_PAGE_SIZE_512K) | ||
114 | #define HV_PGSZ_IDX_HUGE HV_PGSZ_IDX_512K | ||
115 | #define HV_PGSZ_MASK_HUGE HV_PGSZ_MASK_512K | ||
116 | #elif defined(CONFIG_HUGETLB_PAGE_SIZE_4MB) | ||
117 | #define HV_PGSZ_IDX_HUGE HV_PGSZ_IDX_4MB | ||
118 | #define HV_PGSZ_MASK_HUGE HV_PGSZ_MASK_4MB | ||
119 | #else | ||
120 | #error Broken huge page size setting... | ||
121 | #endif | ||
122 | #endif | ||
123 | |||
124 | static void setup_tsb_params(struct mm_struct *mm, unsigned long tsb_idx, unsigned long tsb_bytes) | ||
83 | { | 125 | { |
84 | unsigned long tsb_reg, base, tsb_paddr; | 126 | unsigned long tsb_reg, base, tsb_paddr; |
85 | unsigned long page_sz, tte; | 127 | unsigned long page_sz, tte; |
86 | 128 | ||
87 | mm->context.tsb_nentries = tsb_bytes / sizeof(struct tsb); | 129 | mm->context.tsb_block[tsb_idx].tsb_nentries = |
130 | tsb_bytes / sizeof(struct tsb); | ||
88 | 131 | ||
89 | base = TSBMAP_BASE; | 132 | base = TSBMAP_BASE; |
90 | tte = pgprot_val(PAGE_KERNEL_LOCKED); | 133 | tte = pgprot_val(PAGE_KERNEL_LOCKED); |
91 | tsb_paddr = __pa(mm->context.tsb); | 134 | tsb_paddr = __pa(mm->context.tsb_block[tsb_idx].tsb); |
92 | BUG_ON(tsb_paddr & (tsb_bytes - 1UL)); | 135 | BUG_ON(tsb_paddr & (tsb_bytes - 1UL)); |
93 | 136 | ||
94 | /* Use the smallest page size that can map the whole TSB | 137 | /* Use the smallest page size that can map the whole TSB |
@@ -147,61 +190,49 @@ static void setup_tsb_params(struct mm_struct *mm, unsigned long tsb_bytes) | |||
147 | /* Physical mapping, no locked TLB entry for TSB. */ | 190 | /* Physical mapping, no locked TLB entry for TSB. */ |
148 | tsb_reg |= tsb_paddr; | 191 | tsb_reg |= tsb_paddr; |
149 | 192 | ||
150 | mm->context.tsb_reg_val = tsb_reg; | 193 | mm->context.tsb_block[tsb_idx].tsb_reg_val = tsb_reg; |
151 | mm->context.tsb_map_vaddr = 0; | 194 | mm->context.tsb_block[tsb_idx].tsb_map_vaddr = 0; |
152 | mm->context.tsb_map_pte = 0; | 195 | mm->context.tsb_block[tsb_idx].tsb_map_pte = 0; |
153 | } else { | 196 | } else { |
154 | tsb_reg |= base; | 197 | tsb_reg |= base; |
155 | tsb_reg |= (tsb_paddr & (page_sz - 1UL)); | 198 | tsb_reg |= (tsb_paddr & (page_sz - 1UL)); |
156 | tte |= (tsb_paddr & ~(page_sz - 1UL)); | 199 | tte |= (tsb_paddr & ~(page_sz - 1UL)); |
157 | 200 | ||
158 | mm->context.tsb_reg_val = tsb_reg; | 201 | mm->context.tsb_block[tsb_idx].tsb_reg_val = tsb_reg; |
159 | mm->context.tsb_map_vaddr = base; | 202 | mm->context.tsb_block[tsb_idx].tsb_map_vaddr = base; |
160 | mm->context.tsb_map_pte = tte; | 203 | mm->context.tsb_block[tsb_idx].tsb_map_pte = tte; |
161 | } | 204 | } |
162 | 205 | ||
163 | /* Setup the Hypervisor TSB descriptor. */ | 206 | /* Setup the Hypervisor TSB descriptor. */ |
164 | if (tlb_type == hypervisor) { | 207 | if (tlb_type == hypervisor) { |
165 | struct hv_tsb_descr *hp = &mm->context.tsb_descr; | 208 | struct hv_tsb_descr *hp = &mm->context.tsb_descr[tsb_idx]; |
166 | 209 | ||
167 | switch (PAGE_SIZE) { | 210 | switch (tsb_idx) { |
168 | case 8192: | 211 | case MM_TSB_BASE: |
169 | default: | 212 | hp->pgsz_idx = HV_PGSZ_IDX_BASE; |
170 | hp->pgsz_idx = HV_PGSZ_IDX_8K; | ||
171 | break; | 213 | break; |
172 | 214 | #ifdef CONFIG_HUGETLB_PAGE | |
173 | case 64 * 1024: | 215 | case MM_TSB_HUGE: |
174 | hp->pgsz_idx = HV_PGSZ_IDX_64K; | 216 | hp->pgsz_idx = HV_PGSZ_IDX_HUGE; |
175 | break; | ||
176 | |||
177 | case 512 * 1024: | ||
178 | hp->pgsz_idx = HV_PGSZ_IDX_512K; | ||
179 | break; | ||
180 | |||
181 | case 4 * 1024 * 1024: | ||
182 | hp->pgsz_idx = HV_PGSZ_IDX_4MB; | ||
183 | break; | 217 | break; |
218 | #endif | ||
219 | default: | ||
220 | BUG(); | ||
184 | }; | 221 | }; |
185 | hp->assoc = 1; | 222 | hp->assoc = 1; |
186 | hp->num_ttes = tsb_bytes / 16; | 223 | hp->num_ttes = tsb_bytes / 16; |
187 | hp->ctx_idx = 0; | 224 | hp->ctx_idx = 0; |
188 | switch (PAGE_SIZE) { | 225 | switch (tsb_idx) { |
189 | case 8192: | 226 | case MM_TSB_BASE: |
190 | default: | 227 | hp->pgsz_mask = HV_PGSZ_MASK_BASE; |
191 | hp->pgsz_mask = HV_PGSZ_MASK_8K; | ||
192 | break; | ||
193 | |||
194 | case 64 * 1024: | ||
195 | hp->pgsz_mask = HV_PGSZ_MASK_64K; | ||
196 | break; | ||
197 | |||
198 | case 512 * 1024: | ||
199 | hp->pgsz_mask = HV_PGSZ_MASK_512K; | ||
200 | break; | 228 | break; |
201 | 229 | #ifdef CONFIG_HUGETLB_PAGE | |
202 | case 4 * 1024 * 1024: | 230 | case MM_TSB_HUGE: |
203 | hp->pgsz_mask = HV_PGSZ_MASK_4MB; | 231 | hp->pgsz_mask = HV_PGSZ_MASK_HUGE; |
204 | break; | 232 | break; |
233 | #endif | ||
234 | default: | ||
235 | BUG(); | ||
205 | }; | 236 | }; |
206 | hp->tsb_base = tsb_paddr; | 237 | hp->tsb_base = tsb_paddr; |
207 | hp->resv = 0; | 238 | hp->resv = 0; |
@@ -241,11 +272,11 @@ void __init tsb_cache_init(void) | |||
241 | } | 272 | } |
242 | } | 273 | } |
243 | 274 | ||
244 | /* When the RSS of an address space exceeds mm->context.tsb_rss_limit, | 275 | /* When the RSS of an address space exceeds tsb_rss_limit for a TSB, |
245 | * do_sparc64_fault() invokes this routine to try and grow the TSB. | 276 | * do_sparc64_fault() invokes this routine to try and grow it. |
246 | * | 277 | * |
247 | * When we reach the maximum TSB size supported, we stick ~0UL into | 278 | * When we reach the maximum TSB size supported, we stick ~0UL into |
248 | * mm->context.tsb_rss_limit so the grow checks in update_mmu_cache() | 279 | * tsb_rss_limit for that TSB so the grow checks in do_sparc64_fault() |
249 | * will not trigger any longer. | 280 | * will not trigger any longer. |
250 | * | 281 | * |
251 | * The TSB can be anywhere from 8K to 1MB in size, in increasing powers | 282 | * The TSB can be anywhere from 8K to 1MB in size, in increasing powers |
@@ -257,7 +288,7 @@ void __init tsb_cache_init(void) | |||
257 | * the number of entries that the current TSB can hold at once. Currently, | 288 | * the number of entries that the current TSB can hold at once. Currently, |
258 | * we trigger when the RSS hits 3/4 of the TSB capacity. | 289 | * we trigger when the RSS hits 3/4 of the TSB capacity. |
259 | */ | 290 | */ |
260 | void tsb_grow(struct mm_struct *mm, unsigned long rss) | 291 | void tsb_grow(struct mm_struct *mm, unsigned long tsb_index, unsigned long rss) |
261 | { | 292 | { |
262 | unsigned long max_tsb_size = 1 * 1024 * 1024; | 293 | unsigned long max_tsb_size = 1 * 1024 * 1024; |
263 | unsigned long new_size, old_size, flags; | 294 | unsigned long new_size, old_size, flags; |
@@ -297,7 +328,8 @@ retry_tsb_alloc: | |||
297 | * down to a 0-order allocation and force no TSB | 328 | * down to a 0-order allocation and force no TSB |
298 | * growing for this address space. | 329 | * growing for this address space. |
299 | */ | 330 | */ |
300 | if (mm->context.tsb == NULL && new_cache_index > 0) { | 331 | if (mm->context.tsb_block[tsb_index].tsb == NULL && |
332 | new_cache_index > 0) { | ||
301 | new_cache_index = 0; | 333 | new_cache_index = 0; |
302 | new_size = 8192; | 334 | new_size = 8192; |
303 | new_rss_limit = ~0UL; | 335 | new_rss_limit = ~0UL; |
@@ -307,8 +339,8 @@ retry_tsb_alloc: | |||
307 | /* If we failed on a TSB grow, we are under serious | 339 | /* If we failed on a TSB grow, we are under serious |
308 | * memory pressure so don't try to grow any more. | 340 | * memory pressure so don't try to grow any more. |
309 | */ | 341 | */ |
310 | if (mm->context.tsb != NULL) | 342 | if (mm->context.tsb_block[tsb_index].tsb != NULL) |
311 | mm->context.tsb_rss_limit = ~0UL; | 343 | mm->context.tsb_block[tsb_index].tsb_rss_limit = ~0UL; |
312 | return; | 344 | return; |
313 | } | 345 | } |
314 | 346 | ||
@@ -339,23 +371,26 @@ retry_tsb_alloc: | |||
339 | */ | 371 | */ |
340 | spin_lock_irqsave(&mm->context.lock, flags); | 372 | spin_lock_irqsave(&mm->context.lock, flags); |
341 | 373 | ||
342 | old_tsb = mm->context.tsb; | 374 | old_tsb = mm->context.tsb_block[tsb_index].tsb; |
343 | old_cache_index = (mm->context.tsb_reg_val & 0x7UL); | 375 | old_cache_index = |
344 | old_size = mm->context.tsb_nentries * sizeof(struct tsb); | 376 | (mm->context.tsb_block[tsb_index].tsb_reg_val & 0x7UL); |
377 | old_size = (mm->context.tsb_block[tsb_index].tsb_nentries * | ||
378 | sizeof(struct tsb)); | ||
345 | 379 | ||
346 | 380 | ||
347 | /* Handle multiple threads trying to grow the TSB at the same time. | 381 | /* Handle multiple threads trying to grow the TSB at the same time. |
348 | * One will get in here first, and bump the size and the RSS limit. | 382 | * One will get in here first, and bump the size and the RSS limit. |
349 | * The others will get in here next and hit this check. | 383 | * The others will get in here next and hit this check. |
350 | */ | 384 | */ |
351 | if (unlikely(old_tsb && (rss < mm->context.tsb_rss_limit))) { | 385 | if (unlikely(old_tsb && |
386 | (rss < mm->context.tsb_block[tsb_index].tsb_rss_limit))) { | ||
352 | spin_unlock_irqrestore(&mm->context.lock, flags); | 387 | spin_unlock_irqrestore(&mm->context.lock, flags); |
353 | 388 | ||
354 | kmem_cache_free(tsb_caches[new_cache_index], new_tsb); | 389 | kmem_cache_free(tsb_caches[new_cache_index], new_tsb); |
355 | return; | 390 | return; |
356 | } | 391 | } |
357 | 392 | ||
358 | mm->context.tsb_rss_limit = new_rss_limit; | 393 | mm->context.tsb_block[tsb_index].tsb_rss_limit = new_rss_limit; |
359 | 394 | ||
360 | if (old_tsb) { | 395 | if (old_tsb) { |
361 | extern void copy_tsb(unsigned long old_tsb_base, | 396 | extern void copy_tsb(unsigned long old_tsb_base, |
@@ -372,8 +407,8 @@ retry_tsb_alloc: | |||
372 | copy_tsb(old_tsb_base, old_size, new_tsb_base, new_size); | 407 | copy_tsb(old_tsb_base, old_size, new_tsb_base, new_size); |
373 | } | 408 | } |
374 | 409 | ||
375 | mm->context.tsb = new_tsb; | 410 | mm->context.tsb_block[tsb_index].tsb = new_tsb; |
376 | setup_tsb_params(mm, new_size); | 411 | setup_tsb_params(mm, tsb_index, new_size); |
377 | 412 | ||
378 | spin_unlock_irqrestore(&mm->context.lock, flags); | 413 | spin_unlock_irqrestore(&mm->context.lock, flags); |
379 | 414 | ||
@@ -394,40 +429,65 @@ retry_tsb_alloc: | |||
394 | 429 | ||
395 | int init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 430 | int init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
396 | { | 431 | { |
432 | #ifdef CONFIG_HUGETLB_PAGE | ||
433 | unsigned long huge_pte_count; | ||
434 | #endif | ||
435 | unsigned int i; | ||
436 | |||
397 | spin_lock_init(&mm->context.lock); | 437 | spin_lock_init(&mm->context.lock); |
398 | 438 | ||
399 | mm->context.sparc64_ctx_val = 0UL; | 439 | mm->context.sparc64_ctx_val = 0UL; |
400 | 440 | ||
441 | #ifdef CONFIG_HUGETLB_PAGE | ||
442 | /* We reset it to zero because the fork() page copying | ||
443 | * will re-increment the counters as the parent PTEs are | ||
444 | * copied into the child address space. | ||
445 | */ | ||
446 | huge_pte_count = mm->context.huge_pte_count; | ||
447 | mm->context.huge_pte_count = 0; | ||
448 | #endif | ||
449 | |||
401 | /* copy_mm() copies over the parent's mm_struct before calling | 450 | /* copy_mm() copies over the parent's mm_struct before calling |
402 | * us, so we need to zero out the TSB pointer or else tsb_grow() | 451 | * us, so we need to zero out the TSB pointer or else tsb_grow() |
403 | * will be confused and think there is an older TSB to free up. | 452 | * will be confused and think there is an older TSB to free up. |
404 | */ | 453 | */ |
405 | mm->context.tsb = NULL; | 454 | for (i = 0; i < MM_NUM_TSBS; i++) |
455 | mm->context.tsb_block[i].tsb = NULL; | ||
406 | 456 | ||
407 | /* If this is fork, inherit the parent's TSB size. We would | 457 | /* If this is fork, inherit the parent's TSB size. We would |
408 | * grow it to that size on the first page fault anyways. | 458 | * grow it to that size on the first page fault anyways. |
409 | */ | 459 | */ |
410 | tsb_grow(mm, get_mm_rss(mm)); | 460 | tsb_grow(mm, MM_TSB_BASE, get_mm_rss(mm)); |
411 | 461 | ||
412 | if (unlikely(!mm->context.tsb)) | 462 | #ifdef CONFIG_HUGETLB_PAGE |
463 | if (unlikely(huge_pte_count)) | ||
464 | tsb_grow(mm, MM_TSB_HUGE, huge_pte_count); | ||
465 | #endif | ||
466 | |||
467 | if (unlikely(!mm->context.tsb_block[MM_TSB_BASE].tsb)) | ||
413 | return -ENOMEM; | 468 | return -ENOMEM; |
414 | 469 | ||
415 | return 0; | 470 | return 0; |
416 | } | 471 | } |
417 | 472 | ||
418 | void destroy_context(struct mm_struct *mm) | 473 | static void tsb_destroy_one(struct tsb_config *tp) |
419 | { | 474 | { |
420 | unsigned long flags, cache_index; | 475 | unsigned long cache_index; |
421 | 476 | ||
422 | cache_index = (mm->context.tsb_reg_val & 0x7UL); | 477 | if (!tp->tsb) |
423 | kmem_cache_free(tsb_caches[cache_index], mm->context.tsb); | 478 | return; |
479 | cache_index = tp->tsb_reg_val & 0x7UL; | ||
480 | kmem_cache_free(tsb_caches[cache_index], tp->tsb); | ||
481 | tp->tsb = NULL; | ||
482 | tp->tsb_reg_val = 0UL; | ||
483 | } | ||
424 | 484 | ||
425 | /* We can remove these later, but for now it's useful | 485 | void destroy_context(struct mm_struct *mm) |
426 | * to catch any bogus post-destroy_context() references | 486 | { |
427 | * to the TSB. | 487 | unsigned long flags, i; |
428 | */ | 488 | |
429 | mm->context.tsb = NULL; | 489 | for (i = 0; i < MM_NUM_TSBS; i++) |
430 | mm->context.tsb_reg_val = 0UL; | 490 | tsb_destroy_one(&mm->context.tsb_block[i]); |
431 | 491 | ||
432 | spin_lock_irqsave(&ctx_alloc_lock, flags); | 492 | spin_lock_irqsave(&ctx_alloc_lock, flags); |
433 | 493 | ||
diff --git a/arch/um/Makefile b/arch/um/Makefile index c58b657f0097..8d14c7a831be 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -1,4 +1,7 @@ | |||
1 | # | 1 | # |
2 | # This file is included by the global makefile so that you can add your own | ||
3 | # architecture-specific flags and dependencies. | ||
4 | # | ||
2 | # Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | 5 | # Copyright (C) 2002 Jeff Dike (jdike@karaya.com) |
3 | # Licensed under the GPL | 6 | # Licensed under the GPL |
4 | # | 7 | # |
@@ -88,7 +91,7 @@ CONFIG_KERNEL_HALF_GIGS ?= 0 | |||
88 | 91 | ||
89 | SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000) | 92 | SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000) |
90 | 93 | ||
91 | .PHONY: linux | 94 | PHONY += linux |
92 | 95 | ||
93 | all: linux | 96 | all: linux |
94 | 97 | ||
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index fa4f915be5c5..92cce96b5e24 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -57,7 +57,7 @@ static void setup_highmem(unsigned long highmem_start, | |||
57 | for(i = 0; i < highmem_len >> PAGE_SHIFT; i++){ | 57 | for(i = 0; i < highmem_len >> PAGE_SHIFT; i++){ |
58 | page = &mem_map[highmem_pfn + i]; | 58 | page = &mem_map[highmem_pfn + i]; |
59 | ClearPageReserved(page); | 59 | ClearPageReserved(page); |
60 | set_page_count(page, 1); | 60 | init_page_count(page); |
61 | __free_page(page); | 61 | __free_page(page); |
62 | } | 62 | } |
63 | } | 63 | } |
@@ -296,7 +296,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
296 | (end - start) >> 10); | 296 | (end - start) >> 10); |
297 | for (; start < end; start += PAGE_SIZE) { | 297 | for (; start < end; start += PAGE_SIZE) { |
298 | ClearPageReserved(virt_to_page(start)); | 298 | ClearPageReserved(virt_to_page(start)); |
299 | set_page_count(virt_to_page(start), 1); | 299 | init_page_count(virt_to_page(start)); |
300 | free_page(start); | 300 | free_page(start); |
301 | totalram_pages++; | 301 | totalram_pages++; |
302 | } | 302 | } |
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index 544665e04513..0e65340eee33 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c | |||
@@ -279,7 +279,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem) | |||
279 | 279 | ||
280 | for(i = 0; i < total_pages; i++){ | 280 | for(i = 0; i < total_pages; i++){ |
281 | p = &map[i]; | 281 | p = &map[i]; |
282 | set_page_count(p, 0); | 282 | memset(p, 0, sizeof(struct page)); |
283 | SetPageReserved(p); | 283 | SetPageReserved(p); |
284 | INIT_LIST_HEAD(&p->lru); | 284 | INIT_LIST_HEAD(&p->lru); |
285 | } | 285 | } |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 27cdf9164422..80c9c18aae94 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -491,6 +491,16 @@ void __init check_bugs(void) | |||
491 | check_devanon(); | 491 | check_devanon(); |
492 | } | 492 | } |
493 | 493 | ||
494 | void apply_alternatives(void *start, void *end) | 494 | void apply_alternatives(struct alt_instr *start, struct alt_instr *end) |
495 | { | ||
496 | } | ||
497 | |||
498 | void alternatives_smp_module_add(struct module *mod, char *name, | ||
499 | void *locks, void *locks_end, | ||
500 | void *text, void *text_end) | ||
501 | { | ||
502 | } | ||
503 | |||
504 | void alternatives_smp_module_del(struct module *mod) | ||
495 | { | 505 | { |
496 | } | 506 | } |
diff --git a/arch/v850/kernel/process.c b/arch/v850/kernel/process.c index 621111ddf907..57218c76925c 100644 --- a/arch/v850/kernel/process.c +++ b/arch/v850/kernel/process.c | |||
@@ -37,7 +37,7 @@ extern void ret_from_fork (void); | |||
37 | 37 | ||
38 | 38 | ||
39 | /* The idle loop. */ | 39 | /* The idle loop. */ |
40 | void default_idle (void) | 40 | static void default_idle (void) |
41 | { | 41 | { |
42 | while (! need_resched ()) | 42 | while (! need_resched ()) |
43 | asm ("halt; nop; nop; nop; nop; nop" ::: "cc"); | 43 | asm ("halt; nop; nop; nop; nop; nop" ::: "cc"); |
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index e18eb79bf855..6420baeb8c1f 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -323,7 +323,7 @@ config HAVE_ARCH_EARLY_PFN_TO_NID | |||
323 | 323 | ||
324 | config NR_CPUS | 324 | config NR_CPUS |
325 | int "Maximum number of CPUs (2-256)" | 325 | int "Maximum number of CPUs (2-256)" |
326 | range 2 256 | 326 | range 2 255 |
327 | depends on SMP | 327 | depends on SMP |
328 | default "8" | 328 | default "8" |
329 | help | 329 | help |
@@ -364,13 +364,15 @@ config GART_IOMMU | |||
364 | select SWIOTLB | 364 | select SWIOTLB |
365 | depends on PCI | 365 | depends on PCI |
366 | help | 366 | help |
367 | Support the IOMMU. Needed to run systems with more than 3GB of memory | 367 | Support for hardware IOMMU in AMD's Opteron/Athlon64 Processors |
368 | properly with 32-bit PCI devices that do not support DAC (Double Address | 368 | and for the bounce buffering software IOMMU. |
369 | Cycle). The IOMMU can be turned off at runtime with the iommu=off parameter. | 369 | Needed to run systems with more than 3GB of memory properly with |
370 | Normally the kernel will take the right choice by itself. | 370 | 32-bit PCI devices that do not support DAC (Double Address Cycle). |
371 | This option includes a driver for the AMD Opteron/Athlon64 northbridge IOMMU | 371 | The IOMMU can be turned off at runtime with the iommu=off parameter. |
372 | and a software emulation used on other systems. | 372 | Normally the kernel will take the right choice by itself. |
373 | If unsure, say Y. | 373 | This option includes a driver for the AMD Opteron/Athlon64 IOMMU |
374 | northbridge and a software emulation used on other systems without | ||
375 | hardware IOMMU. If unsure, say Y. | ||
374 | 376 | ||
375 | # need this always enabled with GART_IOMMU for the VIA workaround | 377 | # need this always enabled with GART_IOMMU for the VIA workaround |
376 | config SWIOTLB | 378 | config SWIOTLB |
@@ -429,10 +431,10 @@ config CRASH_DUMP | |||
429 | config PHYSICAL_START | 431 | config PHYSICAL_START |
430 | hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) | 432 | hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) |
431 | default "0x1000000" if CRASH_DUMP | 433 | default "0x1000000" if CRASH_DUMP |
432 | default "0x100000" | 434 | default "0x200000" |
433 | help | 435 | help |
434 | This gives the physical address where the kernel is loaded. Normally | 436 | This gives the physical address where the kernel is loaded. Normally |
435 | for regular kernels this value is 0x100000 (1MB). But in the case | 437 | for regular kernels this value is 0x200000 (2MB). But in the case |
436 | of kexec on panic the fail safe kernel needs to run at a different | 438 | of kexec on panic the fail safe kernel needs to run at a different |
437 | address than the panic-ed kernel. This option is used to set the load | 439 | address than the panic-ed kernel. This option is used to set the load |
438 | address for kernels used to capture crash dump on being kexec'ed | 440 | address for kernels used to capture crash dump on being kexec'ed |
@@ -464,6 +466,14 @@ config SECCOMP | |||
464 | 466 | ||
465 | source kernel/Kconfig.hz | 467 | source kernel/Kconfig.hz |
466 | 468 | ||
469 | config REORDER | ||
470 | bool "Function reordering" | ||
471 | default n | ||
472 | help | ||
473 | This option enables the toolchain to reorder functions for a more | ||
474 | optimal TLB usage. If you have pretty much any version of binutils, | ||
475 | this can increase your kernel build time by roughly one minute. | ||
476 | |||
467 | endmenu | 477 | endmenu |
468 | 478 | ||
469 | # | 479 | # |
@@ -512,16 +522,6 @@ config PCI_MMCONFIG | |||
512 | bool "Support mmconfig PCI config space access" | 522 | bool "Support mmconfig PCI config space access" |
513 | depends on PCI && ACPI | 523 | depends on PCI && ACPI |
514 | 524 | ||
515 | config UNORDERED_IO | ||
516 | bool "Unordered IO mapping access" | ||
517 | depends on EXPERIMENTAL | ||
518 | help | ||
519 | Use unordered stores to access IO memory mappings in device drivers. | ||
520 | Still very experimental. When a driver works on IA64/ppc64/pa-risc it should | ||
521 | work with this option, but it makes the drivers behave differently | ||
522 | from i386. Requires that the driver writer used memory barriers | ||
523 | properly. | ||
524 | |||
525 | source "drivers/pci/pcie/Kconfig" | 525 | source "drivers/pci/pcie/Kconfig" |
526 | 526 | ||
527 | source "drivers/pci/Kconfig" | 527 | source "drivers/pci/Kconfig" |
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index d7fd46479c55..0fbc0283609c 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile | |||
@@ -29,12 +29,14 @@ CHECKFLAGS += -D__x86_64__ -m64 | |||
29 | 29 | ||
30 | cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) | 30 | cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) |
31 | cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) | 31 | cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) |
32 | cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) | ||
32 | CFLAGS += $(cflags-y) | 33 | CFLAGS += $(cflags-y) |
33 | 34 | ||
34 | CFLAGS += -m64 | 35 | CFLAGS += -m64 |
35 | CFLAGS += -mno-red-zone | 36 | CFLAGS += -mno-red-zone |
36 | CFLAGS += -mcmodel=kernel | 37 | CFLAGS += -mcmodel=kernel |
37 | CFLAGS += -pipe | 38 | CFLAGS += -pipe |
39 | cflags-$(CONFIG_REORDER) += -ffunction-sections | ||
38 | # this makes reading assembly source easier, but produces worse code | 40 | # this makes reading assembly source easier, but produces worse code |
39 | # actually it makes the kernel smaller too. | 41 | # actually it makes the kernel smaller too. |
40 | CFLAGS += -fno-reorder-blocks | 42 | CFLAGS += -fno-reorder-blocks |
@@ -67,8 +69,8 @@ drivers-$(CONFIG_OPROFILE) += arch/x86_64/oprofile/ | |||
67 | 69 | ||
68 | boot := arch/x86_64/boot | 70 | boot := arch/x86_64/boot |
69 | 71 | ||
70 | .PHONY: bzImage bzlilo install archmrproper \ | 72 | PHONY += bzImage bzlilo install archmrproper \ |
71 | fdimage fdimage144 fdimage288 archclean | 73 | fdimage fdimage144 fdimage288 archclean |
72 | 74 | ||
73 | #Default target when executing "make" | 75 | #Default target when executing "make" |
74 | all: bzImage | 76 | all: bzImage |
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index ce4de61ed85d..566ecc97ee5a 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.16-rc3-git9 | 3 | # Linux kernel version: 2.6.16-git9 |
4 | # Sat Feb 18 00:27:03 2006 | 4 | # Sat Mar 25 15:18:40 2006 |
5 | # | 5 | # |
6 | CONFIG_X86_64=y | 6 | CONFIG_X86_64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -38,6 +38,7 @@ CONFIG_SYSCTL=y | |||
38 | CONFIG_IKCONFIG=y | 38 | CONFIG_IKCONFIG=y |
39 | CONFIG_IKCONFIG_PROC=y | 39 | CONFIG_IKCONFIG_PROC=y |
40 | # CONFIG_CPUSETS is not set | 40 | # CONFIG_CPUSETS is not set |
41 | # CONFIG_RELAY is not set | ||
41 | CONFIG_INITRAMFS_SOURCE="" | 42 | CONFIG_INITRAMFS_SOURCE="" |
42 | CONFIG_UID16=y | 43 | CONFIG_UID16=y |
43 | CONFIG_VM86=y | 44 | CONFIG_VM86=y |
@@ -79,6 +80,7 @@ CONFIG_STOP_MACHINE=y | |||
79 | # Block layer | 80 | # Block layer |
80 | # | 81 | # |
81 | CONFIG_LBD=y | 82 | CONFIG_LBD=y |
83 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
82 | 84 | ||
83 | # | 85 | # |
84 | # IO Schedulers | 86 | # IO Schedulers |
@@ -139,7 +141,6 @@ CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y | |||
139 | CONFIG_NR_CPUS=32 | 141 | CONFIG_NR_CPUS=32 |
140 | CONFIG_HOTPLUG_CPU=y | 142 | CONFIG_HOTPLUG_CPU=y |
141 | CONFIG_HPET_TIMER=y | 143 | CONFIG_HPET_TIMER=y |
142 | CONFIG_X86_PM_TIMER=y | ||
143 | CONFIG_HPET_EMULATE_RTC=y | 144 | CONFIG_HPET_EMULATE_RTC=y |
144 | CONFIG_GART_IOMMU=y | 145 | CONFIG_GART_IOMMU=y |
145 | CONFIG_SWIOTLB=y | 146 | CONFIG_SWIOTLB=y |
@@ -148,12 +149,13 @@ CONFIG_X86_MCE_INTEL=y | |||
148 | CONFIG_X86_MCE_AMD=y | 149 | CONFIG_X86_MCE_AMD=y |
149 | # CONFIG_KEXEC is not set | 150 | # CONFIG_KEXEC is not set |
150 | # CONFIG_CRASH_DUMP is not set | 151 | # CONFIG_CRASH_DUMP is not set |
151 | CONFIG_PHYSICAL_START=0x100000 | 152 | CONFIG_PHYSICAL_START=0x200000 |
152 | CONFIG_SECCOMP=y | 153 | CONFIG_SECCOMP=y |
153 | # CONFIG_HZ_100 is not set | 154 | # CONFIG_HZ_100 is not set |
154 | CONFIG_HZ_250=y | 155 | CONFIG_HZ_250=y |
155 | # CONFIG_HZ_1000 is not set | 156 | # CONFIG_HZ_1000 is not set |
156 | CONFIG_HZ=250 | 157 | CONFIG_HZ=250 |
158 | # CONFIG_REORDER is not set | ||
157 | CONFIG_GENERIC_HARDIRQS=y | 159 | CONFIG_GENERIC_HARDIRQS=y |
158 | CONFIG_GENERIC_IRQ_PROBE=y | 160 | CONFIG_GENERIC_IRQ_PROBE=y |
159 | CONFIG_ISA_DMA_API=y | 161 | CONFIG_ISA_DMA_API=y |
@@ -189,12 +191,14 @@ CONFIG_ACPI_NUMA=y | |||
189 | # CONFIG_ACPI_ASUS is not set | 191 | # CONFIG_ACPI_ASUS is not set |
190 | # CONFIG_ACPI_IBM is not set | 192 | # CONFIG_ACPI_IBM is not set |
191 | CONFIG_ACPI_TOSHIBA=y | 193 | CONFIG_ACPI_TOSHIBA=y |
192 | CONFIG_ACPI_BLACKLIST_YEAR=2001 | 194 | CONFIG_ACPI_BLACKLIST_YEAR=0 |
193 | # CONFIG_ACPI_DEBUG is not set | 195 | # CONFIG_ACPI_DEBUG is not set |
194 | CONFIG_ACPI_EC=y | 196 | CONFIG_ACPI_EC=y |
195 | CONFIG_ACPI_POWER=y | 197 | CONFIG_ACPI_POWER=y |
196 | CONFIG_ACPI_SYSTEM=y | 198 | CONFIG_ACPI_SYSTEM=y |
199 | CONFIG_X86_PM_TIMER=y | ||
197 | CONFIG_ACPI_CONTAINER=y | 200 | CONFIG_ACPI_CONTAINER=y |
201 | CONFIG_ACPI_HOTPLUG_MEMORY=y | ||
198 | 202 | ||
199 | # | 203 | # |
200 | # CPU Frequency scaling | 204 | # CPU Frequency scaling |
@@ -232,10 +236,8 @@ CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y | |||
232 | CONFIG_PCI=y | 236 | CONFIG_PCI=y |
233 | CONFIG_PCI_DIRECT=y | 237 | CONFIG_PCI_DIRECT=y |
234 | CONFIG_PCI_MMCONFIG=y | 238 | CONFIG_PCI_MMCONFIG=y |
235 | CONFIG_UNORDERED_IO=y | ||
236 | CONFIG_PCIEPORTBUS=y | 239 | CONFIG_PCIEPORTBUS=y |
237 | CONFIG_PCI_MSI=y | 240 | CONFIG_PCI_MSI=y |
238 | # CONFIG_PCI_LEGACY_PROC is not set | ||
239 | # CONFIG_PCI_DEBUG is not set | 241 | # CONFIG_PCI_DEBUG is not set |
240 | 242 | ||
241 | # | 243 | # |
@@ -294,6 +296,7 @@ CONFIG_INET_TCP_DIAG=y | |||
294 | CONFIG_TCP_CONG_BIC=y | 296 | CONFIG_TCP_CONG_BIC=y |
295 | CONFIG_IPV6=y | 297 | CONFIG_IPV6=y |
296 | # CONFIG_IPV6_PRIVACY is not set | 298 | # CONFIG_IPV6_PRIVACY is not set |
299 | # CONFIG_IPV6_ROUTER_PREF is not set | ||
297 | # CONFIG_INET6_AH is not set | 300 | # CONFIG_INET6_AH is not set |
298 | # CONFIG_INET6_ESP is not set | 301 | # CONFIG_INET6_ESP is not set |
299 | # CONFIG_INET6_IPCOMP is not set | 302 | # CONFIG_INET6_IPCOMP is not set |
@@ -701,6 +704,7 @@ CONFIG_S2IO=m | |||
701 | # Wireless LAN (non-hamradio) | 704 | # Wireless LAN (non-hamradio) |
702 | # | 705 | # |
703 | # CONFIG_NET_RADIO is not set | 706 | # CONFIG_NET_RADIO is not set |
707 | # CONFIG_NET_WIRELESS_RTNETLINK is not set | ||
704 | 708 | ||
705 | # | 709 | # |
706 | # Wan interfaces | 710 | # Wan interfaces |
@@ -861,6 +865,8 @@ CONFIG_RTC=y | |||
861 | CONFIG_AGP=y | 865 | CONFIG_AGP=y |
862 | CONFIG_AGP_AMD64=y | 866 | CONFIG_AGP_AMD64=y |
863 | CONFIG_AGP_INTEL=y | 867 | CONFIG_AGP_INTEL=y |
868 | # CONFIG_AGP_SIS is not set | ||
869 | # CONFIG_AGP_VIA is not set | ||
864 | # CONFIG_DRM is not set | 870 | # CONFIG_DRM is not set |
865 | # CONFIG_MWAVE is not set | 871 | # CONFIG_MWAVE is not set |
866 | CONFIG_RAW_DRIVER=y | 872 | CONFIG_RAW_DRIVER=y |
@@ -907,10 +913,6 @@ CONFIG_HWMON=y | |||
907 | # CONFIG_IBM_ASM is not set | 913 | # CONFIG_IBM_ASM is not set |
908 | 914 | ||
909 | # | 915 | # |
910 | # Multimedia Capabilities Port drivers | ||
911 | # | ||
912 | |||
913 | # | ||
914 | # Multimedia devices | 916 | # Multimedia devices |
915 | # | 917 | # |
916 | # CONFIG_VIDEO_DEV is not set | 918 | # CONFIG_VIDEO_DEV is not set |
@@ -974,6 +976,7 @@ CONFIG_SOUND_ICH=y | |||
974 | # | 976 | # |
975 | CONFIG_USB_ARCH_HAS_HCD=y | 977 | CONFIG_USB_ARCH_HAS_HCD=y |
976 | CONFIG_USB_ARCH_HAS_OHCI=y | 978 | CONFIG_USB_ARCH_HAS_OHCI=y |
979 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
977 | CONFIG_USB=y | 980 | CONFIG_USB=y |
978 | # CONFIG_USB_DEBUG is not set | 981 | # CONFIG_USB_DEBUG is not set |
979 | 982 | ||
@@ -1002,7 +1005,6 @@ CONFIG_USB_UHCI_HCD=y | |||
1002 | # | 1005 | # |
1003 | # USB Device Class drivers | 1006 | # USB Device Class drivers |
1004 | # | 1007 | # |
1005 | # CONFIG_OBSOLETE_OSS_USB_DRIVER is not set | ||
1006 | # CONFIG_USB_ACM is not set | 1008 | # CONFIG_USB_ACM is not set |
1007 | CONFIG_USB_PRINTER=y | 1009 | CONFIG_USB_PRINTER=y |
1008 | 1010 | ||
@@ -1121,11 +1123,7 @@ CONFIG_USB_MON=y | |||
1121 | # CONFIG_INFINIBAND is not set | 1123 | # CONFIG_INFINIBAND is not set |
1122 | 1124 | ||
1123 | # | 1125 | # |
1124 | # SN Devices | 1126 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) |
1125 | # | ||
1126 | |||
1127 | # | ||
1128 | # EDAC - error detection and reporting (RAS) | ||
1129 | # | 1127 | # |
1130 | # CONFIG_EDAC is not set | 1128 | # CONFIG_EDAC is not set |
1131 | 1129 | ||
@@ -1198,7 +1196,6 @@ CONFIG_TMPFS=y | |||
1198 | CONFIG_HUGETLBFS=y | 1196 | CONFIG_HUGETLBFS=y |
1199 | CONFIG_HUGETLB_PAGE=y | 1197 | CONFIG_HUGETLB_PAGE=y |
1200 | CONFIG_RAMFS=y | 1198 | CONFIG_RAMFS=y |
1201 | CONFIG_RELAYFS_FS=y | ||
1202 | # CONFIG_CONFIGFS_FS is not set | 1199 | # CONFIG_CONFIGFS_FS is not set |
1203 | 1200 | ||
1204 | # | 1201 | # |
@@ -1321,6 +1318,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1321 | CONFIG_DEBUG_FS=y | 1318 | CONFIG_DEBUG_FS=y |
1322 | # CONFIG_DEBUG_VM is not set | 1319 | # CONFIG_DEBUG_VM is not set |
1323 | # CONFIG_FRAME_POINTER is not set | 1320 | # CONFIG_FRAME_POINTER is not set |
1321 | # CONFIG_UNWIND_INFO is not set | ||
1324 | # CONFIG_FORCED_INLINING is not set | 1322 | # CONFIG_FORCED_INLINING is not set |
1325 | # CONFIG_RCU_TORTURE_TEST is not set | 1323 | # CONFIG_RCU_TORTURE_TEST is not set |
1326 | # CONFIG_DEBUG_RODATA is not set | 1324 | # CONFIG_DEBUG_RODATA is not set |
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index 572b3b28772d..e776139afb20 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c | |||
@@ -58,7 +58,7 @@ struct elf_phdr; | |||
58 | 58 | ||
59 | #define USE_ELF_CORE_DUMP 1 | 59 | #define USE_ELF_CORE_DUMP 1 |
60 | 60 | ||
61 | /* Overwrite elfcore.h */ | 61 | /* Override elfcore.h */ |
62 | #define _LINUX_ELFCORE_H 1 | 62 | #define _LINUX_ELFCORE_H 1 |
63 | typedef unsigned int elf_greg_t; | 63 | typedef unsigned int elf_greg_t; |
64 | 64 | ||
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c index 2bc55af95419..2b2d029f477c 100644 --- a/arch/x86_64/ia32/sys_ia32.c +++ b/arch/x86_64/ia32/sys_ia32.c | |||
@@ -430,24 +430,12 @@ put_tv32(struct compat_timeval __user *o, struct timeval *i) | |||
430 | return err; | 430 | return err; |
431 | } | 431 | } |
432 | 432 | ||
433 | extern int do_setitimer(int which, struct itimerval *, struct itimerval *); | 433 | extern unsigned int alarm_setitimer(unsigned int seconds); |
434 | 434 | ||
435 | asmlinkage long | 435 | asmlinkage long |
436 | sys32_alarm(unsigned int seconds) | 436 | sys32_alarm(unsigned int seconds) |
437 | { | 437 | { |
438 | struct itimerval it_new, it_old; | 438 | return alarm_setitimer(seconds); |
439 | unsigned int oldalarm; | ||
440 | |||
441 | it_new.it_interval.tv_sec = it_new.it_interval.tv_usec = 0; | ||
442 | it_new.it_value.tv_sec = seconds; | ||
443 | it_new.it_value.tv_usec = 0; | ||
444 | do_setitimer(ITIMER_REAL, &it_new, &it_old); | ||
445 | oldalarm = it_old.it_value.tv_sec; | ||
446 | /* ehhh.. We can't return 0 if we have an alarm pending.. */ | ||
447 | /* And we'd better return too much than too little anyway */ | ||
448 | if (it_old.it_value.tv_usec) | ||
449 | oldalarm++; | ||
450 | return oldalarm; | ||
451 | } | 439 | } |
452 | 440 | ||
453 | /* Translations due to time_t size differences. Which affects all | 441 | /* Translations due to time_t size differences. Which affects all |
diff --git a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c index a0f955b9995f..fffd6b0a2fab 100644 --- a/arch/x86_64/kernel/aperture.c +++ b/arch/x86_64/kernel/aperture.c | |||
@@ -60,7 +60,7 @@ static u32 __init allocate_aperture(void) | |||
60 | printk("Cannot allocate aperture memory hole (%p,%uK)\n", | 60 | printk("Cannot allocate aperture memory hole (%p,%uK)\n", |
61 | p, aper_size>>10); | 61 | p, aper_size>>10); |
62 | if (p) | 62 | if (p) |
63 | free_bootmem_node(nd0, (unsigned long)p, aper_size); | 63 | free_bootmem_node(nd0, __pa(p), aper_size); |
64 | return 0; | 64 | return 0; |
65 | } | 65 | } |
66 | printk("Mapping aperture over %d KB of RAM @ %lx\n", | 66 | printk("Mapping aperture over %d KB of RAM @ %lx\n", |
@@ -161,7 +161,7 @@ static __u32 __init search_agp_bridge(u32 *order, int *valid_agp) | |||
161 | int num, slot, func; | 161 | int num, slot, func; |
162 | 162 | ||
163 | /* Poor man's PCI discovery */ | 163 | /* Poor man's PCI discovery */ |
164 | for (num = 0; num < 32; num++) { | 164 | for (num = 0; num < 256; num++) { |
165 | for (slot = 0; slot < 32; slot++) { | 165 | for (slot = 0; slot < 32; slot++) { |
166 | for (func = 0; func < 8; func++) { | 166 | for (func = 0; func < 8; func++) { |
167 | u32 class, cap; | 167 | u32 class, cap; |
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index e5b14c57eaa0..d54620147e8e 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c | |||
@@ -342,6 +342,7 @@ void __init init_bsp_APIC(void) | |||
342 | void __cpuinit setup_local_APIC (void) | 342 | void __cpuinit setup_local_APIC (void) |
343 | { | 343 | { |
344 | unsigned int value, maxlvt; | 344 | unsigned int value, maxlvt; |
345 | int i, j; | ||
345 | 346 | ||
346 | value = apic_read(APIC_LVR); | 347 | value = apic_read(APIC_LVR); |
347 | 348 | ||
@@ -371,6 +372,25 @@ void __cpuinit setup_local_APIC (void) | |||
371 | apic_write(APIC_TASKPRI, value); | 372 | apic_write(APIC_TASKPRI, value); |
372 | 373 | ||
373 | /* | 374 | /* |
375 | * After a crash, we no longer service the interrupts and a pending | ||
376 | * interrupt from previous kernel might still have ISR bit set. | ||
377 | * | ||
378 | * Most probably by now CPU has serviced that pending interrupt and | ||
379 | * it might not have done the ack_APIC_irq() because it thought, | ||
380 | * interrupt came from i8259 as ExtInt. LAPIC did not get EOI so it | ||
381 | * does not clear the ISR bit and cpu thinks it has already serivced | ||
382 | * the interrupt. Hence a vector might get locked. It was noticed | ||
383 | * for timer irq (vector 0x31). Issue an extra EOI to clear ISR. | ||
384 | */ | ||
385 | for (i = APIC_ISR_NR - 1; i >= 0; i--) { | ||
386 | value = apic_read(APIC_ISR + i*0x10); | ||
387 | for (j = 31; j >= 0; j--) { | ||
388 | if (value & (1<<j)) | ||
389 | ack_APIC_irq(); | ||
390 | } | ||
391 | } | ||
392 | |||
393 | /* | ||
374 | * Now that we are all set up, enable the APIC | 394 | * Now that we are all set up, enable the APIC |
375 | */ | 395 | */ |
376 | value = apic_read(APIC_SPIV); | 396 | value = apic_read(APIC_SPIV); |
diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c index 6dffb498ccd7..13af920b6594 100644 --- a/arch/x86_64/kernel/early_printk.c +++ b/arch/x86_64/kernel/early_printk.c | |||
@@ -17,11 +17,8 @@ | |||
17 | #define VGABASE ((void __iomem *)0xffffffff800b8000UL) | 17 | #define VGABASE ((void __iomem *)0xffffffff800b8000UL) |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #define MAX_YPOS max_ypos | ||
21 | #define MAX_XPOS max_xpos | ||
22 | |||
23 | static int max_ypos = 25, max_xpos = 80; | 20 | static int max_ypos = 25, max_xpos = 80; |
24 | static int current_ypos = 1, current_xpos = 0; | 21 | static int current_ypos = 25, current_xpos = 0; |
25 | 22 | ||
26 | static void early_vga_write(struct console *con, const char *str, unsigned n) | 23 | static void early_vga_write(struct console *con, const char *str, unsigned n) |
27 | { | 24 | { |
@@ -29,26 +26,26 @@ static void early_vga_write(struct console *con, const char *str, unsigned n) | |||
29 | int i, k, j; | 26 | int i, k, j; |
30 | 27 | ||
31 | while ((c = *str++) != '\0' && n-- > 0) { | 28 | while ((c = *str++) != '\0' && n-- > 0) { |
32 | if (current_ypos >= MAX_YPOS) { | 29 | if (current_ypos >= max_ypos) { |
33 | /* scroll 1 line up */ | 30 | /* scroll 1 line up */ |
34 | for (k = 1, j = 0; k < MAX_YPOS; k++, j++) { | 31 | for (k = 1, j = 0; k < max_ypos; k++, j++) { |
35 | for (i = 0; i < MAX_XPOS; i++) { | 32 | for (i = 0; i < max_xpos; i++) { |
36 | writew(readw(VGABASE + 2*(MAX_XPOS*k + i)), | 33 | writew(readw(VGABASE+2*(max_xpos*k+i)), |
37 | VGABASE + 2*(MAX_XPOS*j + i)); | 34 | VGABASE + 2*(max_xpos*j + i)); |
38 | } | 35 | } |
39 | } | 36 | } |
40 | for (i = 0; i < MAX_XPOS; i++) | 37 | for (i = 0; i < max_xpos; i++) |
41 | writew(0x720, VGABASE + 2*(MAX_XPOS*j + i)); | 38 | writew(0x720, VGABASE + 2*(max_xpos*j + i)); |
42 | current_ypos = MAX_YPOS-1; | 39 | current_ypos = max_ypos-1; |
43 | } | 40 | } |
44 | if (c == '\n') { | 41 | if (c == '\n') { |
45 | current_xpos = 0; | 42 | current_xpos = 0; |
46 | current_ypos++; | 43 | current_ypos++; |
47 | } else if (c != '\r') { | 44 | } else if (c != '\r') { |
48 | writew(((0x7 << 8) | (unsigned short) c), | 45 | writew(((0x7 << 8) | (unsigned short) c), |
49 | VGABASE + 2*(MAX_XPOS*current_ypos + | 46 | VGABASE + 2*(max_xpos*current_ypos + |
50 | current_xpos++)); | 47 | current_xpos++)); |
51 | if (current_xpos >= MAX_XPOS) { | 48 | if (current_xpos >= max_xpos) { |
52 | current_xpos = 0; | 49 | current_xpos = 0; |
53 | current_ypos++; | 50 | current_ypos++; |
54 | } | 51 | } |
@@ -63,7 +60,7 @@ static struct console early_vga_console = { | |||
63 | .index = -1, | 60 | .index = -1, |
64 | }; | 61 | }; |
65 | 62 | ||
66 | /* Serial functions loosely based on a similar package from Klaus P. Gerlicher */ | 63 | /* Serial functions loosely based on a similar package from Klaus P. Gerlicher */ |
67 | 64 | ||
68 | static int early_serial_base = 0x3f8; /* ttyS0 */ | 65 | static int early_serial_base = 0x3f8; /* ttyS0 */ |
69 | 66 | ||
@@ -83,30 +80,30 @@ static int early_serial_base = 0x3f8; /* ttyS0 */ | |||
83 | #define DLL 0 /* Divisor Latch Low */ | 80 | #define DLL 0 /* Divisor Latch Low */ |
84 | #define DLH 1 /* Divisor latch High */ | 81 | #define DLH 1 /* Divisor latch High */ |
85 | 82 | ||
86 | static int early_serial_putc(unsigned char ch) | 83 | static int early_serial_putc(unsigned char ch) |
87 | { | 84 | { |
88 | unsigned timeout = 0xffff; | 85 | unsigned timeout = 0xffff; |
89 | while ((inb(early_serial_base + LSR) & XMTRDY) == 0 && --timeout) | 86 | while ((inb(early_serial_base + LSR) & XMTRDY) == 0 && --timeout) |
90 | cpu_relax(); | 87 | cpu_relax(); |
91 | outb(ch, early_serial_base + TXR); | 88 | outb(ch, early_serial_base + TXR); |
92 | return timeout ? 0 : -1; | 89 | return timeout ? 0 : -1; |
93 | } | 90 | } |
94 | 91 | ||
95 | static void early_serial_write(struct console *con, const char *s, unsigned n) | 92 | static void early_serial_write(struct console *con, const char *s, unsigned n) |
96 | { | 93 | { |
97 | while (*s && n-- > 0) { | 94 | while (*s && n-- > 0) { |
98 | early_serial_putc(*s); | 95 | early_serial_putc(*s); |
99 | if (*s == '\n') | 96 | if (*s == '\n') |
100 | early_serial_putc('\r'); | 97 | early_serial_putc('\r'); |
101 | s++; | 98 | s++; |
102 | } | 99 | } |
103 | } | 100 | } |
104 | 101 | ||
105 | #define DEFAULT_BAUD 9600 | 102 | #define DEFAULT_BAUD 9600 |
106 | 103 | ||
107 | static __init void early_serial_init(char *s) | 104 | static __init void early_serial_init(char *s) |
108 | { | 105 | { |
109 | unsigned char c; | 106 | unsigned char c; |
110 | unsigned divisor; | 107 | unsigned divisor; |
111 | unsigned baud = DEFAULT_BAUD; | 108 | unsigned baud = DEFAULT_BAUD; |
112 | char *e; | 109 | char *e; |
@@ -115,7 +112,7 @@ static __init void early_serial_init(char *s) | |||
115 | ++s; | 112 | ++s; |
116 | 113 | ||
117 | if (*s) { | 114 | if (*s) { |
118 | unsigned port; | 115 | unsigned port; |
119 | if (!strncmp(s,"0x",2)) { | 116 | if (!strncmp(s,"0x",2)) { |
120 | early_serial_base = simple_strtoul(s, &e, 16); | 117 | early_serial_base = simple_strtoul(s, &e, 16); |
121 | } else { | 118 | } else { |
@@ -139,16 +136,16 @@ static __init void early_serial_init(char *s) | |||
139 | outb(0x3, early_serial_base + MCR); /* DTR + RTS */ | 136 | outb(0x3, early_serial_base + MCR); /* DTR + RTS */ |
140 | 137 | ||
141 | if (*s) { | 138 | if (*s) { |
142 | baud = simple_strtoul(s, &e, 0); | 139 | baud = simple_strtoul(s, &e, 0); |
143 | if (baud == 0 || s == e) | 140 | if (baud == 0 || s == e) |
144 | baud = DEFAULT_BAUD; | 141 | baud = DEFAULT_BAUD; |
145 | } | 142 | } |
146 | 143 | ||
147 | divisor = 115200 / baud; | 144 | divisor = 115200 / baud; |
148 | c = inb(early_serial_base + LCR); | 145 | c = inb(early_serial_base + LCR); |
149 | outb(c | DLAB, early_serial_base + LCR); | 146 | outb(c | DLAB, early_serial_base + LCR); |
150 | outb(divisor & 0xff, early_serial_base + DLL); | 147 | outb(divisor & 0xff, early_serial_base + DLL); |
151 | outb((divisor >> 8) & 0xff, early_serial_base + DLH); | 148 | outb((divisor >> 8) & 0xff, early_serial_base + DLH); |
152 | outb(c & ~DLAB, early_serial_base + LCR); | 149 | outb(c & ~DLAB, early_serial_base + LCR); |
153 | } | 150 | } |
154 | 151 | ||
@@ -205,67 +202,68 @@ struct console *early_console = &early_vga_console; | |||
205 | static int early_console_initialized = 0; | 202 | static int early_console_initialized = 0; |
206 | 203 | ||
207 | void early_printk(const char *fmt, ...) | 204 | void early_printk(const char *fmt, ...) |
208 | { | 205 | { |
209 | char buf[512]; | 206 | char buf[512]; |
210 | int n; | 207 | int n; |
211 | va_list ap; | 208 | va_list ap; |
212 | 209 | ||
213 | va_start(ap,fmt); | 210 | va_start(ap,fmt); |
214 | n = vscnprintf(buf,512,fmt,ap); | 211 | n = vscnprintf(buf,512,fmt,ap); |
215 | early_console->write(early_console,buf,n); | 212 | early_console->write(early_console,buf,n); |
216 | va_end(ap); | 213 | va_end(ap); |
217 | } | 214 | } |
218 | 215 | ||
219 | static int __initdata keep_early; | 216 | static int __initdata keep_early; |
220 | 217 | ||
221 | int __init setup_early_printk(char *opt) | 218 | int __init setup_early_printk(char *opt) |
222 | { | 219 | { |
223 | char *space; | 220 | char *space; |
224 | char buf[256]; | 221 | char buf[256]; |
225 | 222 | ||
226 | if (early_console_initialized) | 223 | if (early_console_initialized) |
227 | return -1; | 224 | return -1; |
228 | 225 | ||
229 | strlcpy(buf,opt,sizeof(buf)); | 226 | strlcpy(buf,opt,sizeof(buf)); |
230 | space = strchr(buf, ' '); | 227 | space = strchr(buf, ' '); |
231 | if (space) | 228 | if (space) |
232 | *space = 0; | 229 | *space = 0; |
233 | 230 | ||
234 | if (strstr(buf,"keep")) | 231 | if (strstr(buf,"keep")) |
235 | keep_early = 1; | 232 | keep_early = 1; |
236 | 233 | ||
237 | if (!strncmp(buf, "serial", 6)) { | 234 | if (!strncmp(buf, "serial", 6)) { |
238 | early_serial_init(buf + 6); | 235 | early_serial_init(buf + 6); |
239 | early_console = &early_serial_console; | 236 | early_console = &early_serial_console; |
240 | } else if (!strncmp(buf, "ttyS", 4)) { | 237 | } else if (!strncmp(buf, "ttyS", 4)) { |
241 | early_serial_init(buf); | 238 | early_serial_init(buf); |
242 | early_console = &early_serial_console; | 239 | early_console = &early_serial_console; |
243 | } else if (!strncmp(buf, "vga", 3) | 240 | } else if (!strncmp(buf, "vga", 3) |
244 | && SCREEN_INFO.orig_video_isVGA == 1) { | 241 | && SCREEN_INFO.orig_video_isVGA == 1) { |
245 | max_xpos = SCREEN_INFO.orig_video_cols; | 242 | max_xpos = SCREEN_INFO.orig_video_cols; |
246 | max_ypos = SCREEN_INFO.orig_video_lines; | 243 | max_ypos = SCREEN_INFO.orig_video_lines; |
247 | early_console = &early_vga_console; | 244 | current_ypos = SCREEN_INFO.orig_y; |
245 | early_console = &early_vga_console; | ||
248 | } else if (!strncmp(buf, "simnow", 6)) { | 246 | } else if (!strncmp(buf, "simnow", 6)) { |
249 | simnow_init(buf + 6); | 247 | simnow_init(buf + 6); |
250 | early_console = &simnow_console; | 248 | early_console = &simnow_console; |
251 | keep_early = 1; | 249 | keep_early = 1; |
252 | } | 250 | } |
253 | early_console_initialized = 1; | 251 | early_console_initialized = 1; |
254 | register_console(early_console); | 252 | register_console(early_console); |
255 | return 0; | 253 | return 0; |
256 | } | 254 | } |
257 | 255 | ||
258 | void __init disable_early_printk(void) | 256 | void __init disable_early_printk(void) |
259 | { | 257 | { |
260 | if (!early_console_initialized || !early_console) | 258 | if (!early_console_initialized || !early_console) |
261 | return; | 259 | return; |
262 | if (!keep_early) { | 260 | if (!keep_early) { |
263 | printk("disabling early console\n"); | 261 | printk("disabling early console\n"); |
264 | unregister_console(early_console); | 262 | unregister_console(early_console); |
265 | early_console_initialized = 0; | 263 | early_console_initialized = 0; |
266 | } else { | 264 | } else { |
267 | printk("keeping early console\n"); | 265 | printk("keeping early console\n"); |
268 | } | 266 | } |
269 | } | 267 | } |
270 | 268 | ||
271 | __setup("earlyprintk=", setup_early_printk); | 269 | __setup("earlyprintk=", setup_early_printk); |
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 7c10e9009d61..8538bfea30e6 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -553,7 +553,7 @@ iret_label: | |||
553 | /* force a signal here? this matches i386 behaviour */ | 553 | /* force a signal here? this matches i386 behaviour */ |
554 | /* running with kernel gs */ | 554 | /* running with kernel gs */ |
555 | bad_iret: | 555 | bad_iret: |
556 | movq $-9999,%rdi /* better code? */ | 556 | movq $11,%rdi /* SIGSEGV */ |
557 | sti | 557 | sti |
558 | jmp do_exit | 558 | jmp do_exit |
559 | .previous | 559 | .previous |
diff --git a/arch/x86_64/kernel/functionlist b/arch/x86_64/kernel/functionlist new file mode 100644 index 000000000000..2bcebdc3eedb --- /dev/null +++ b/arch/x86_64/kernel/functionlist | |||
@@ -0,0 +1,1286 @@ | |||
1 | *(.text.flush_thread) | ||
2 | *(.text.check_poison_obj) | ||
3 | *(.text.copy_page) | ||
4 | *(.text.__set_personality) | ||
5 | *(.text.gart_map_sg) | ||
6 | *(.text.kmem_cache_free) | ||
7 | *(.text.find_get_page) | ||
8 | *(.text._raw_spin_lock) | ||
9 | *(.text.ide_outb) | ||
10 | *(.text.unmap_vmas) | ||
11 | *(.text.copy_page_range) | ||
12 | *(.text.kprobe_handler) | ||
13 | *(.text.__handle_mm_fault) | ||
14 | *(.text.__d_lookup) | ||
15 | *(.text.copy_user_generic) | ||
16 | *(.text.__link_path_walk) | ||
17 | *(.text.get_page_from_freelist) | ||
18 | *(.text.kmem_cache_alloc) | ||
19 | *(.text.drive_cmd_intr) | ||
20 | *(.text.ia32_setup_sigcontext) | ||
21 | *(.text.huge_pte_offset) | ||
22 | *(.text.do_page_fault) | ||
23 | *(.text.page_remove_rmap) | ||
24 | *(.text.release_pages) | ||
25 | *(.text.ide_end_request) | ||
26 | *(.text.__mutex_lock_slowpath) | ||
27 | *(.text.__find_get_block) | ||
28 | *(.text.kfree) | ||
29 | *(.text.vfs_read) | ||
30 | *(.text._raw_spin_unlock) | ||
31 | *(.text.free_hot_cold_page) | ||
32 | *(.text.fget_light) | ||
33 | *(.text.schedule) | ||
34 | *(.text.memcmp) | ||
35 | *(.text.touch_atime) | ||
36 | *(.text.__might_sleep) | ||
37 | *(.text.__down_read_trylock) | ||
38 | *(.text.arch_pick_mmap_layout) | ||
39 | *(.text.find_vma) | ||
40 | *(.text.__make_request) | ||
41 | *(.text.do_generic_mapping_read) | ||
42 | *(.text.mutex_lock_interruptible) | ||
43 | *(.text.__generic_file_aio_read) | ||
44 | *(.text._atomic_dec_and_lock) | ||
45 | *(.text.__wake_up_bit) | ||
46 | *(.text.add_to_page_cache) | ||
47 | *(.text.cache_alloc_debugcheck_after) | ||
48 | *(.text.vm_normal_page) | ||
49 | *(.text.mutex_debug_check_no_locks_freed) | ||
50 | *(.text.net_rx_action) | ||
51 | *(.text.__find_first_zero_bit) | ||
52 | *(.text.put_page) | ||
53 | *(.text._raw_read_lock) | ||
54 | *(.text.__delay) | ||
55 | *(.text.dnotify_parent) | ||
56 | *(.text.do_path_lookup) | ||
57 | *(.text.do_sync_read) | ||
58 | *(.text.do_lookup) | ||
59 | *(.text.bit_waitqueue) | ||
60 | *(.text.file_read_actor) | ||
61 | *(.text.strncpy_from_user) | ||
62 | *(.text.__pagevec_lru_add_active) | ||
63 | *(.text.fget) | ||
64 | *(.text.dput) | ||
65 | *(.text.__strnlen_user) | ||
66 | *(.text.inotify_inode_queue_event) | ||
67 | *(.text.rw_verify_area) | ||
68 | *(.text.ide_intr) | ||
69 | *(.text.inotify_dentry_parent_queue_event) | ||
70 | *(.text.permission) | ||
71 | *(.text.memscan) | ||
72 | *(.text.hpet_rtc_interrupt) | ||
73 | *(.text.do_mmap_pgoff) | ||
74 | *(.text.current_fs_time) | ||
75 | *(.text.vfs_getattr) | ||
76 | *(.text.kmem_flagcheck) | ||
77 | *(.text.mark_page_accessed) | ||
78 | *(.text.free_pages_and_swap_cache) | ||
79 | *(.text.generic_fillattr) | ||
80 | *(.text.__block_prepare_write) | ||
81 | *(.text.__set_page_dirty_nobuffers) | ||
82 | *(.text.link_path_walk) | ||
83 | *(.text.find_get_pages_tag) | ||
84 | *(.text.ide_do_request) | ||
85 | *(.text.__alloc_pages) | ||
86 | *(.text.generic_permission) | ||
87 | *(.text.mod_page_state_offset) | ||
88 | *(.text.free_pgd_range) | ||
89 | *(.text.generic_file_buffered_write) | ||
90 | *(.text.number) | ||
91 | *(.text.ide_do_rw_disk) | ||
92 | *(.text.__brelse) | ||
93 | *(.text.__mod_page_state_offset) | ||
94 | *(.text.rotate_reclaimable_page) | ||
95 | *(.text.find_vma_prepare) | ||
96 | *(.text.find_vma_prev) | ||
97 | *(.text.lru_cache_add_active) | ||
98 | *(.text.__kmalloc_track_caller) | ||
99 | *(.text.smp_invalidate_interrupt) | ||
100 | *(.text.handle_IRQ_event) | ||
101 | *(.text.__find_get_block_slow) | ||
102 | *(.text.do_wp_page) | ||
103 | *(.text.do_select) | ||
104 | *(.text.set_user_nice) | ||
105 | *(.text.sys_read) | ||
106 | *(.text.do_munmap) | ||
107 | *(.text.csum_partial) | ||
108 | *(.text.__do_softirq) | ||
109 | *(.text.may_open) | ||
110 | *(.text.getname) | ||
111 | *(.text.get_empty_filp) | ||
112 | *(.text.__fput) | ||
113 | *(.text.remove_mapping) | ||
114 | *(.text.filp_ctor) | ||
115 | *(.text.poison_obj) | ||
116 | *(.text.unmap_region) | ||
117 | *(.text.test_set_page_writeback) | ||
118 | *(.text.__do_page_cache_readahead) | ||
119 | *(.text.sock_def_readable) | ||
120 | *(.text.ide_outl) | ||
121 | *(.text.shrink_zone) | ||
122 | *(.text.rb_insert_color) | ||
123 | *(.text.get_request) | ||
124 | *(.text.sys_pread64) | ||
125 | *(.text.spin_bug) | ||
126 | *(.text.ide_outsl) | ||
127 | *(.text.mask_and_ack_8259A) | ||
128 | *(.text.filemap_nopage) | ||
129 | *(.text.page_add_file_rmap) | ||
130 | *(.text.find_lock_page) | ||
131 | *(.text.tcp_poll) | ||
132 | *(.text.__mark_inode_dirty) | ||
133 | *(.text.file_ra_state_init) | ||
134 | *(.text.generic_file_llseek) | ||
135 | *(.text.__pagevec_lru_add) | ||
136 | *(.text.page_cache_readahead) | ||
137 | *(.text.n_tty_receive_buf) | ||
138 | *(.text.zonelist_policy) | ||
139 | *(.text.vma_adjust) | ||
140 | *(.text.test_clear_page_dirty) | ||
141 | *(.text.sync_buffer) | ||
142 | *(.text.do_exit) | ||
143 | *(.text.__bitmap_weight) | ||
144 | *(.text.alloc_pages_current) | ||
145 | *(.text.get_unused_fd) | ||
146 | *(.text.zone_watermark_ok) | ||
147 | *(.text.cpuset_update_task_memory_state) | ||
148 | *(.text.__bitmap_empty) | ||
149 | *(.text.sys_munmap) | ||
150 | *(.text.__inode_dir_notify) | ||
151 | *(.text.__generic_file_aio_write_nolock) | ||
152 | *(.text.__pte_alloc) | ||
153 | *(.text.sys_select) | ||
154 | *(.text.vm_acct_memory) | ||
155 | *(.text.vfs_write) | ||
156 | *(.text.__lru_add_drain) | ||
157 | *(.text.prio_tree_insert) | ||
158 | *(.text.generic_file_aio_read) | ||
159 | *(.text.vma_merge) | ||
160 | *(.text.block_write_full_page) | ||
161 | *(.text.__page_set_anon_rmap) | ||
162 | *(.text.apic_timer_interrupt) | ||
163 | *(.text.release_console_sem) | ||
164 | *(.text.sys_write) | ||
165 | *(.text.sys_brk) | ||
166 | *(.text.dup_mm) | ||
167 | *(.text.read_current_timer) | ||
168 | *(.text.ll_rw_block) | ||
169 | *(.text.blk_rq_map_sg) | ||
170 | *(.text.dbg_userword) | ||
171 | *(.text.__block_commit_write) | ||
172 | *(.text.cache_grow) | ||
173 | *(.text.copy_strings) | ||
174 | *(.text.release_task) | ||
175 | *(.text.do_sync_write) | ||
176 | *(.text.unlock_page) | ||
177 | *(.text.load_elf_binary) | ||
178 | *(.text.__follow_mount) | ||
179 | *(.text.__getblk) | ||
180 | *(.text.do_sys_open) | ||
181 | *(.text.current_kernel_time) | ||
182 | *(.text.call_rcu) | ||
183 | *(.text.write_chan) | ||
184 | *(.text.vsnprintf) | ||
185 | *(.text.dummy_inode_setsecurity) | ||
186 | *(.text.submit_bh) | ||
187 | *(.text.poll_freewait) | ||
188 | *(.text.bio_alloc_bioset) | ||
189 | *(.text.skb_clone) | ||
190 | *(.text.page_waitqueue) | ||
191 | *(.text.__mutex_lock_interruptible_slowpath) | ||
192 | *(.text.get_index) | ||
193 | *(.text.csum_partial_copy_generic) | ||
194 | *(.text.bad_range) | ||
195 | *(.text.remove_vma) | ||
196 | *(.text.cp_new_stat) | ||
197 | *(.text.alloc_arraycache) | ||
198 | *(.text.test_clear_page_writeback) | ||
199 | *(.text.strsep) | ||
200 | *(.text.open_namei) | ||
201 | *(.text._raw_read_unlock) | ||
202 | *(.text.get_vma_policy) | ||
203 | *(.text.__down_write_trylock) | ||
204 | *(.text.find_get_pages) | ||
205 | *(.text.tcp_rcv_established) | ||
206 | *(.text.generic_make_request) | ||
207 | *(.text.__block_write_full_page) | ||
208 | *(.text.cfq_set_request) | ||
209 | *(.text.sys_inotify_init) | ||
210 | *(.text.split_vma) | ||
211 | *(.text.__mod_timer) | ||
212 | *(.text.get_options) | ||
213 | *(.text.vma_link) | ||
214 | *(.text.mpage_writepages) | ||
215 | *(.text.truncate_complete_page) | ||
216 | *(.text.tcp_recvmsg) | ||
217 | *(.text.sigprocmask) | ||
218 | *(.text.filemap_populate) | ||
219 | *(.text.sys_close) | ||
220 | *(.text.inotify_dev_queue_event) | ||
221 | *(.text.do_task_stat) | ||
222 | *(.text.__dentry_open) | ||
223 | *(.text.unlink_file_vma) | ||
224 | *(.text.__pollwait) | ||
225 | *(.text.packet_rcv_spkt) | ||
226 | *(.text.drop_buffers) | ||
227 | *(.text.free_pgtables) | ||
228 | *(.text.generic_file_direct_write) | ||
229 | *(.text.copy_process) | ||
230 | *(.text.netif_receive_skb) | ||
231 | *(.text.dnotify_flush) | ||
232 | *(.text.print_bad_pte) | ||
233 | *(.text.anon_vma_unlink) | ||
234 | *(.text.sys_mprotect) | ||
235 | *(.text.sync_sb_inodes) | ||
236 | *(.text.find_inode_fast) | ||
237 | *(.text.dummy_inode_readlink) | ||
238 | *(.text.putname) | ||
239 | *(.text.init_smp_flush) | ||
240 | *(.text.dbg_redzone2) | ||
241 | *(.text.sk_run_filter) | ||
242 | *(.text.may_expand_vm) | ||
243 | *(.text.generic_file_aio_write) | ||
244 | *(.text.find_next_zero_bit) | ||
245 | *(.text.file_kill) | ||
246 | *(.text.audit_getname) | ||
247 | *(.text.arch_unmap_area_topdown) | ||
248 | *(.text.alloc_page_vma) | ||
249 | *(.text.tcp_transmit_skb) | ||
250 | *(.text.rb_next) | ||
251 | *(.text.dbg_redzone1) | ||
252 | *(.text.generic_file_mmap) | ||
253 | *(.text.vfs_fstat) | ||
254 | *(.text.sys_time) | ||
255 | *(.text.page_lock_anon_vma) | ||
256 | *(.text.get_unmapped_area) | ||
257 | *(.text.remote_llseek) | ||
258 | *(.text.__up_read) | ||
259 | *(.text.fd_install) | ||
260 | *(.text.eventpoll_init_file) | ||
261 | *(.text.dma_alloc_coherent) | ||
262 | *(.text.create_empty_buffers) | ||
263 | *(.text.__mutex_unlock_slowpath) | ||
264 | *(.text.dup_fd) | ||
265 | *(.text.d_alloc) | ||
266 | *(.text.tty_ldisc_try) | ||
267 | *(.text.sys_stime) | ||
268 | *(.text.__rb_rotate_right) | ||
269 | *(.text.d_validate) | ||
270 | *(.text.rb_erase) | ||
271 | *(.text.path_release) | ||
272 | *(.text.memmove) | ||
273 | *(.text.invalidate_complete_page) | ||
274 | *(.text.clear_inode) | ||
275 | *(.text.cache_estimate) | ||
276 | *(.text.alloc_buffer_head) | ||
277 | *(.text.smp_call_function_interrupt) | ||
278 | *(.text.flush_tlb_others) | ||
279 | *(.text.file_move) | ||
280 | *(.text.balance_dirty_pages_ratelimited) | ||
281 | *(.text.vma_prio_tree_add) | ||
282 | *(.text.timespec_trunc) | ||
283 | *(.text.mempool_alloc) | ||
284 | *(.text.iget_locked) | ||
285 | *(.text.d_alloc_root) | ||
286 | *(.text.cpuset_populate_dir) | ||
287 | *(.text.anon_vma_prepare) | ||
288 | *(.text.sys_newstat) | ||
289 | *(.text.alloc_page_interleave) | ||
290 | *(.text.__path_lookup_intent_open) | ||
291 | *(.text.__pagevec_free) | ||
292 | *(.text.inode_init_once) | ||
293 | *(.text.free_vfsmnt) | ||
294 | *(.text.__user_walk_fd) | ||
295 | *(.text.cfq_idle_slice_timer) | ||
296 | *(.text.sys_mmap) | ||
297 | *(.text.sys_llseek) | ||
298 | *(.text.prio_tree_remove) | ||
299 | *(.text.filp_close) | ||
300 | *(.text.file_permission) | ||
301 | *(.text.vma_prio_tree_remove) | ||
302 | *(.text.tcp_ack) | ||
303 | *(.text.nameidata_to_filp) | ||
304 | *(.text.sys_lseek) | ||
305 | *(.text.percpu_counter_mod) | ||
306 | *(.text.igrab) | ||
307 | *(.text.__bread) | ||
308 | *(.text.alloc_inode) | ||
309 | *(.text.filldir) | ||
310 | *(.text.__rb_rotate_left) | ||
311 | *(.text.irq_affinity_write_proc) | ||
312 | *(.text.init_request_from_bio) | ||
313 | *(.text.find_or_create_page) | ||
314 | *(.text.tty_poll) | ||
315 | *(.text.tcp_sendmsg) | ||
316 | *(.text.ide_wait_stat) | ||
317 | *(.text.free_buffer_head) | ||
318 | *(.text.flush_signal_handlers) | ||
319 | *(.text.tcp_v4_rcv) | ||
320 | *(.text.nr_blockdev_pages) | ||
321 | *(.text.locks_remove_flock) | ||
322 | *(.text.__iowrite32_copy) | ||
323 | *(.text.do_filp_open) | ||
324 | *(.text.try_to_release_page) | ||
325 | *(.text.page_add_new_anon_rmap) | ||
326 | *(.text.kmem_cache_size) | ||
327 | *(.text.eth_type_trans) | ||
328 | *(.text.try_to_free_buffers) | ||
329 | *(.text.schedule_tail) | ||
330 | *(.text.proc_lookup) | ||
331 | *(.text.no_llseek) | ||
332 | *(.text.kfree_skbmem) | ||
333 | *(.text.do_wait) | ||
334 | *(.text.do_mpage_readpage) | ||
335 | *(.text.vfs_stat_fd) | ||
336 | *(.text.tty_write) | ||
337 | *(.text.705) | ||
338 | *(.text.sync_page) | ||
339 | *(.text.__remove_shared_vm_struct) | ||
340 | *(.text.__kfree_skb) | ||
341 | *(.text.sock_poll) | ||
342 | *(.text.get_request_wait) | ||
343 | *(.text.do_sigaction) | ||
344 | *(.text.do_brk) | ||
345 | *(.text.tcp_event_data_recv) | ||
346 | *(.text.read_chan) | ||
347 | *(.text.pipe_writev) | ||
348 | *(.text.__emul_lookup_dentry) | ||
349 | *(.text.rtc_get_rtc_time) | ||
350 | *(.text.print_objinfo) | ||
351 | *(.text.file_update_time) | ||
352 | *(.text.do_signal) | ||
353 | *(.text.disable_8259A_irq) | ||
354 | *(.text.blk_queue_bounce) | ||
355 | *(.text.__anon_vma_link) | ||
356 | *(.text.__vma_link) | ||
357 | *(.text.vfs_rename) | ||
358 | *(.text.sys_newlstat) | ||
359 | *(.text.sys_newfstat) | ||
360 | *(.text.sys_mknod) | ||
361 | *(.text.__show_regs) | ||
362 | *(.text.iput) | ||
363 | *(.text.get_signal_to_deliver) | ||
364 | *(.text.flush_tlb_page) | ||
365 | *(.text.debug_mutex_wake_waiter) | ||
366 | *(.text.copy_thread) | ||
367 | *(.text.clear_page_dirty_for_io) | ||
368 | *(.text.buffer_io_error) | ||
369 | *(.text.vfs_permission) | ||
370 | *(.text.truncate_inode_pages_range) | ||
371 | *(.text.sys_recvfrom) | ||
372 | *(.text.remove_suid) | ||
373 | *(.text.mark_buffer_dirty) | ||
374 | *(.text.local_bh_enable) | ||
375 | *(.text.get_zeroed_page) | ||
376 | *(.text.get_vmalloc_info) | ||
377 | *(.text.flush_old_exec) | ||
378 | *(.text.dummy_inode_permission) | ||
379 | *(.text.__bio_add_page) | ||
380 | *(.text.prio_tree_replace) | ||
381 | *(.text.notify_change) | ||
382 | *(.text.mntput_no_expire) | ||
383 | *(.text.fput) | ||
384 | *(.text.__end_that_request_first) | ||
385 | *(.text.wake_up_bit) | ||
386 | *(.text.unuse_mm) | ||
387 | *(.text.skb_release_data) | ||
388 | *(.text.shrink_icache_memory) | ||
389 | *(.text.sched_balance_self) | ||
390 | *(.text.__pmd_alloc) | ||
391 | *(.text.pipe_poll) | ||
392 | *(.text.normal_poll) | ||
393 | *(.text.__free_pages) | ||
394 | *(.text.follow_mount) | ||
395 | *(.text.cdrom_start_packet_command) | ||
396 | *(.text.blk_recount_segments) | ||
397 | *(.text.bio_put) | ||
398 | *(.text.__alloc_skb) | ||
399 | *(.text.__wake_up) | ||
400 | *(.text.vm_stat_account) | ||
401 | *(.text.sys_fcntl) | ||
402 | *(.text.sys_fadvise64) | ||
403 | *(.text._raw_write_unlock) | ||
404 | *(.text.__pud_alloc) | ||
405 | *(.text.alloc_page_buffers) | ||
406 | *(.text.vfs_llseek) | ||
407 | *(.text.sockfd_lookup) | ||
408 | *(.text._raw_write_lock) | ||
409 | *(.text.put_compound_page) | ||
410 | *(.text.prune_dcache) | ||
411 | *(.text.pipe_readv) | ||
412 | *(.text.mempool_free) | ||
413 | *(.text.make_ahead_window) | ||
414 | *(.text.lru_add_drain) | ||
415 | *(.text.constant_test_bit) | ||
416 | *(.text.__clear_user) | ||
417 | *(.text.arch_unmap_area) | ||
418 | *(.text.anon_vma_link) | ||
419 | *(.text.sys_chroot) | ||
420 | *(.text.setup_arg_pages) | ||
421 | *(.text.radix_tree_preload) | ||
422 | *(.text.init_rwsem) | ||
423 | *(.text.generic_osync_inode) | ||
424 | *(.text.generic_delete_inode) | ||
425 | *(.text.do_sys_poll) | ||
426 | *(.text.dev_queue_xmit) | ||
427 | *(.text.default_llseek) | ||
428 | *(.text.__writeback_single_inode) | ||
429 | *(.text.vfs_ioctl) | ||
430 | *(.text.__up_write) | ||
431 | *(.text.unix_poll) | ||
432 | *(.text.sys_rt_sigprocmask) | ||
433 | *(.text.sock_recvmsg) | ||
434 | *(.text.recalc_bh_state) | ||
435 | *(.text.__put_unused_fd) | ||
436 | *(.text.process_backlog) | ||
437 | *(.text.locks_remove_posix) | ||
438 | *(.text.lease_modify) | ||
439 | *(.text.expand_files) | ||
440 | *(.text.end_buffer_read_nobh) | ||
441 | *(.text.d_splice_alias) | ||
442 | *(.text.debug_mutex_init_waiter) | ||
443 | *(.text.copy_from_user) | ||
444 | *(.text.cap_vm_enough_memory) | ||
445 | *(.text.show_vfsmnt) | ||
446 | *(.text.release_sock) | ||
447 | *(.text.pfifo_fast_enqueue) | ||
448 | *(.text.half_md4_transform) | ||
449 | *(.text.fs_may_remount_ro) | ||
450 | *(.text.do_fork) | ||
451 | *(.text.copy_hugetlb_page_range) | ||
452 | *(.text.cache_free_debugcheck) | ||
453 | *(.text.__tcp_select_window) | ||
454 | *(.text.task_handoff_register) | ||
455 | *(.text.sys_open) | ||
456 | *(.text.strlcpy) | ||
457 | *(.text.skb_copy_datagram_iovec) | ||
458 | *(.text.set_up_list3s) | ||
459 | *(.text.release_open_intent) | ||
460 | *(.text.qdisc_restart) | ||
461 | *(.text.n_tty_chars_in_buffer) | ||
462 | *(.text.inode_change_ok) | ||
463 | *(.text.__downgrade_write) | ||
464 | *(.text.debug_mutex_unlock) | ||
465 | *(.text.add_timer_randomness) | ||
466 | *(.text.sock_common_recvmsg) | ||
467 | *(.text.set_bh_page) | ||
468 | *(.text.printk_lock) | ||
469 | *(.text.path_release_on_umount) | ||
470 | *(.text.ip_output) | ||
471 | *(.text.ide_build_dmatable) | ||
472 | *(.text.__get_user_8) | ||
473 | *(.text.end_buffer_read_sync) | ||
474 | *(.text.__d_path) | ||
475 | *(.text.d_move) | ||
476 | *(.text.del_timer) | ||
477 | *(.text.constant_test_bit) | ||
478 | *(.text.blockable_page_cache_readahead) | ||
479 | *(.text.tty_read) | ||
480 | *(.text.sys_readlink) | ||
481 | *(.text.sys_faccessat) | ||
482 | *(.text.read_swap_cache_async) | ||
483 | *(.text.pty_write_room) | ||
484 | *(.text.page_address_in_vma) | ||
485 | *(.text.kthread) | ||
486 | *(.text.cfq_exit_io_context) | ||
487 | *(.text.__tcp_push_pending_frames) | ||
488 | *(.text.sys_pipe) | ||
489 | *(.text.submit_bio) | ||
490 | *(.text.pid_revalidate) | ||
491 | *(.text.page_referenced_file) | ||
492 | *(.text.lock_sock) | ||
493 | *(.text.get_page_state_node) | ||
494 | *(.text.generic_block_bmap) | ||
495 | *(.text.do_setitimer) | ||
496 | *(.text.dev_queue_xmit_nit) | ||
497 | *(.text.copy_from_read_buf) | ||
498 | *(.text.__const_udelay) | ||
499 | *(.text.console_conditional_schedule) | ||
500 | *(.text.wake_up_new_task) | ||
501 | *(.text.wait_for_completion_interruptible) | ||
502 | *(.text.tcp_rcv_rtt_update) | ||
503 | *(.text.sys_mlockall) | ||
504 | *(.text.set_fs_altroot) | ||
505 | *(.text.schedule_timeout) | ||
506 | *(.text.nr_free_pagecache_pages) | ||
507 | *(.text.nf_iterate) | ||
508 | *(.text.mapping_tagged) | ||
509 | *(.text.ip_queue_xmit) | ||
510 | *(.text.ip_local_deliver) | ||
511 | *(.text.follow_page) | ||
512 | *(.text.elf_map) | ||
513 | *(.text.dummy_file_permission) | ||
514 | *(.text.dispose_list) | ||
515 | *(.text.dentry_open) | ||
516 | *(.text.dentry_iput) | ||
517 | *(.text.bio_alloc) | ||
518 | *(.text.alloc_skb_from_cache) | ||
519 | *(.text.wait_on_page_bit) | ||
520 | *(.text.vfs_readdir) | ||
521 | *(.text.vfs_lstat) | ||
522 | *(.text.seq_escape) | ||
523 | *(.text.__posix_lock_file) | ||
524 | *(.text.mm_release) | ||
525 | *(.text.kref_put) | ||
526 | *(.text.ip_rcv) | ||
527 | *(.text.__iget) | ||
528 | *(.text.free_pages) | ||
529 | *(.text.find_mergeable_anon_vma) | ||
530 | *(.text.find_extend_vma) | ||
531 | *(.text.dummy_inode_listsecurity) | ||
532 | *(.text.bio_add_page) | ||
533 | *(.text.__vm_enough_memory) | ||
534 | *(.text.vfs_stat) | ||
535 | *(.text.tty_paranoia_check) | ||
536 | *(.text.tcp_read_sock) | ||
537 | *(.text.tcp_data_queue) | ||
538 | *(.text.sys_uname) | ||
539 | *(.text.sys_renameat) | ||
540 | *(.text.__strncpy_from_user) | ||
541 | *(.text.__mutex_init) | ||
542 | *(.text.__lookup_hash) | ||
543 | *(.text.kref_get) | ||
544 | *(.text.ip_route_input) | ||
545 | *(.text.__insert_inode_hash) | ||
546 | *(.text.do_sock_write) | ||
547 | *(.text.blk_done_softirq) | ||
548 | *(.text.__wake_up_sync) | ||
549 | *(.text.__vma_link_rb) | ||
550 | *(.text.tty_ioctl) | ||
551 | *(.text.tracesys) | ||
552 | *(.text.sys_getdents) | ||
553 | *(.text.sys_dup) | ||
554 | *(.text.stub_execve) | ||
555 | *(.text.sha_transform) | ||
556 | *(.text.radix_tree_tag_clear) | ||
557 | *(.text.put_unused_fd) | ||
558 | *(.text.put_files_struct) | ||
559 | *(.text.mpage_readpages) | ||
560 | *(.text.may_delete) | ||
561 | *(.text.kmem_cache_create) | ||
562 | *(.text.ip_mc_output) | ||
563 | *(.text.interleave_nodes) | ||
564 | *(.text.groups_search) | ||
565 | *(.text.generic_drop_inode) | ||
566 | *(.text.generic_commit_write) | ||
567 | *(.text.fcntl_setlk) | ||
568 | *(.text.exit_mmap) | ||
569 | *(.text.end_page_writeback) | ||
570 | *(.text.__d_rehash) | ||
571 | *(.text.debug_mutex_free_waiter) | ||
572 | *(.text.csum_ipv6_magic) | ||
573 | *(.text.count) | ||
574 | *(.text.cleanup_rbuf) | ||
575 | *(.text.check_spinlock_acquired_node) | ||
576 | *(.text.can_vma_merge_after) | ||
577 | *(.text.bio_endio) | ||
578 | *(.text.alloc_pidmap) | ||
579 | *(.text.write_ldt) | ||
580 | *(.text.vmtruncate_range) | ||
581 | *(.text.vfs_create) | ||
582 | *(.text.__user_walk) | ||
583 | *(.text.update_send_head) | ||
584 | *(.text.unmap_underlying_metadata) | ||
585 | *(.text.tty_ldisc_deref) | ||
586 | *(.text.tcp_setsockopt) | ||
587 | *(.text.tcp_send_ack) | ||
588 | *(.text.sys_pause) | ||
589 | *(.text.sys_gettimeofday) | ||
590 | *(.text.sync_dirty_buffer) | ||
591 | *(.text.strncmp) | ||
592 | *(.text.release_posix_timer) | ||
593 | *(.text.proc_file_read) | ||
594 | *(.text.prepare_to_wait) | ||
595 | *(.text.locks_mandatory_locked) | ||
596 | *(.text.interruptible_sleep_on_timeout) | ||
597 | *(.text.inode_sub_bytes) | ||
598 | *(.text.in_group_p) | ||
599 | *(.text.hrtimer_try_to_cancel) | ||
600 | *(.text.filldir64) | ||
601 | *(.text.fasync_helper) | ||
602 | *(.text.dummy_sb_pivotroot) | ||
603 | *(.text.d_lookup) | ||
604 | *(.text.d_instantiate) | ||
605 | *(.text.__d_find_alias) | ||
606 | *(.text.cpu_idle_wait) | ||
607 | *(.text.cond_resched_lock) | ||
608 | *(.text.chown_common) | ||
609 | *(.text.blk_congestion_wait) | ||
610 | *(.text.activate_page) | ||
611 | *(.text.unlock_buffer) | ||
612 | *(.text.tty_wakeup) | ||
613 | *(.text.tcp_v4_do_rcv) | ||
614 | *(.text.tcp_current_mss) | ||
615 | *(.text.sys_openat) | ||
616 | *(.text.sys_fchdir) | ||
617 | *(.text.strnlen_user) | ||
618 | *(.text.strnlen) | ||
619 | *(.text.strchr) | ||
620 | *(.text.sock_common_getsockopt) | ||
621 | *(.text.skb_checksum) | ||
622 | *(.text.remove_wait_queue) | ||
623 | *(.text.rb_replace_node) | ||
624 | *(.text.radix_tree_node_ctor) | ||
625 | *(.text.pty_chars_in_buffer) | ||
626 | *(.text.profile_hit) | ||
627 | *(.text.prio_tree_left) | ||
628 | *(.text.pgd_clear_bad) | ||
629 | *(.text.pfifo_fast_dequeue) | ||
630 | *(.text.page_referenced) | ||
631 | *(.text.open_exec) | ||
632 | *(.text.mmput) | ||
633 | *(.text.mm_init) | ||
634 | *(.text.__ide_dma_off_quietly) | ||
635 | *(.text.ide_dma_intr) | ||
636 | *(.text.hrtimer_start) | ||
637 | *(.text.get_io_context) | ||
638 | *(.text.__get_free_pages) | ||
639 | *(.text.find_first_zero_bit) | ||
640 | *(.text.file_free_rcu) | ||
641 | *(.text.dummy_socket_sendmsg) | ||
642 | *(.text.do_unlinkat) | ||
643 | *(.text.do_arch_prctl) | ||
644 | *(.text.destroy_inode) | ||
645 | *(.text.can_vma_merge_before) | ||
646 | *(.text.block_sync_page) | ||
647 | *(.text.block_prepare_write) | ||
648 | *(.text.bio_init) | ||
649 | *(.text.arch_ptrace) | ||
650 | *(.text.wake_up_inode) | ||
651 | *(.text.wait_on_retry_sync_kiocb) | ||
652 | *(.text.vma_prio_tree_next) | ||
653 | *(.text.tcp_rcv_space_adjust) | ||
654 | *(.text.__tcp_ack_snd_check) | ||
655 | *(.text.sys_utime) | ||
656 | *(.text.sys_recvmsg) | ||
657 | *(.text.sys_mremap) | ||
658 | *(.text.sys_bdflush) | ||
659 | *(.text.sleep_on) | ||
660 | *(.text.set_page_dirty_lock) | ||
661 | *(.text.seq_path) | ||
662 | *(.text.schedule_timeout_interruptible) | ||
663 | *(.text.sched_fork) | ||
664 | *(.text.rt_run_flush) | ||
665 | *(.text.profile_munmap) | ||
666 | *(.text.prepare_binprm) | ||
667 | *(.text.__pagevec_release_nonlru) | ||
668 | *(.text.m_show) | ||
669 | *(.text.lookup_mnt) | ||
670 | *(.text.__lookup_mnt) | ||
671 | *(.text.lock_timer_base) | ||
672 | *(.text.is_subdir) | ||
673 | *(.text.invalidate_bh_lru) | ||
674 | *(.text.init_buffer_head) | ||
675 | *(.text.ifind_fast) | ||
676 | *(.text.ide_dma_start) | ||
677 | *(.text.__get_page_state) | ||
678 | *(.text.flock_to_posix_lock) | ||
679 | *(.text.__find_symbol) | ||
680 | *(.text.do_futex) | ||
681 | *(.text.do_execve) | ||
682 | *(.text.dirty_writeback_centisecs_handler) | ||
683 | *(.text.dev_watchdog) | ||
684 | *(.text.can_share_swap_page) | ||
685 | *(.text.blkdev_put) | ||
686 | *(.text.bio_get_nr_vecs) | ||
687 | *(.text.xfrm_compile_policy) | ||
688 | *(.text.vma_prio_tree_insert) | ||
689 | *(.text.vfs_lstat_fd) | ||
690 | *(.text.__user_path_lookup_open) | ||
691 | *(.text.thread_return) | ||
692 | *(.text.tcp_send_delayed_ack) | ||
693 | *(.text.sock_def_error_report) | ||
694 | *(.text.shrink_slab) | ||
695 | *(.text.serial_out) | ||
696 | *(.text.seq_read) | ||
697 | *(.text.secure_ip_id) | ||
698 | *(.text.search_binary_handler) | ||
699 | *(.text.proc_pid_unhash) | ||
700 | *(.text.pagevec_lookup) | ||
701 | *(.text.new_inode) | ||
702 | *(.text.memcpy_toiovec) | ||
703 | *(.text.locks_free_lock) | ||
704 | *(.text.__lock_page) | ||
705 | *(.text.__lock_buffer) | ||
706 | *(.text.load_module) | ||
707 | *(.text.is_bad_inode) | ||
708 | *(.text.invalidate_inode_buffers) | ||
709 | *(.text.insert_vm_struct) | ||
710 | *(.text.inode_setattr) | ||
711 | *(.text.inode_add_bytes) | ||
712 | *(.text.ide_read_24) | ||
713 | *(.text.ide_get_error_location) | ||
714 | *(.text.ide_do_drive_cmd) | ||
715 | *(.text.get_locked_pte) | ||
716 | *(.text.get_filesystem_list) | ||
717 | *(.text.generic_file_open) | ||
718 | *(.text.follow_down) | ||
719 | *(.text.find_next_bit) | ||
720 | *(.text.__find_first_bit) | ||
721 | *(.text.exit_mm) | ||
722 | *(.text.exec_keys) | ||
723 | *(.text.end_buffer_write_sync) | ||
724 | *(.text.end_bio_bh_io_sync) | ||
725 | *(.text.dummy_socket_shutdown) | ||
726 | *(.text.d_rehash) | ||
727 | *(.text.d_path) | ||
728 | *(.text.do_ioctl) | ||
729 | *(.text.dget_locked) | ||
730 | *(.text.copy_thread_group_keys) | ||
731 | *(.text.cdrom_end_request) | ||
732 | *(.text.cap_bprm_apply_creds) | ||
733 | *(.text.blk_rq_bio_prep) | ||
734 | *(.text.__bitmap_intersects) | ||
735 | *(.text.bio_phys_segments) | ||
736 | *(.text.bio_free) | ||
737 | *(.text.arch_get_unmapped_area_topdown) | ||
738 | *(.text.writeback_in_progress) | ||
739 | *(.text.vfs_follow_link) | ||
740 | *(.text.tcp_rcv_state_process) | ||
741 | *(.text.tcp_check_space) | ||
742 | *(.text.sys_stat) | ||
743 | *(.text.sys_rt_sigreturn) | ||
744 | *(.text.sys_rt_sigaction) | ||
745 | *(.text.sys_remap_file_pages) | ||
746 | *(.text.sys_pwrite64) | ||
747 | *(.text.sys_fchownat) | ||
748 | *(.text.sys_fchmodat) | ||
749 | *(.text.strncat) | ||
750 | *(.text.strlcat) | ||
751 | *(.text.strcmp) | ||
752 | *(.text.steal_locks) | ||
753 | *(.text.sock_create) | ||
754 | *(.text.sk_stream_rfree) | ||
755 | *(.text.sk_stream_mem_schedule) | ||
756 | *(.text.skip_atoi) | ||
757 | *(.text.sk_alloc) | ||
758 | *(.text.show_stat) | ||
759 | *(.text.set_fs_pwd) | ||
760 | *(.text.set_binfmt) | ||
761 | *(.text.pty_unthrottle) | ||
762 | *(.text.proc_symlink) | ||
763 | *(.text.pipe_release) | ||
764 | *(.text.pageout) | ||
765 | *(.text.n_tty_write_wakeup) | ||
766 | *(.text.n_tty_ioctl) | ||
767 | *(.text.nr_free_zone_pages) | ||
768 | *(.text.migration_thread) | ||
769 | *(.text.mempool_free_slab) | ||
770 | *(.text.meminfo_read_proc) | ||
771 | *(.text.max_sane_readahead) | ||
772 | *(.text.lru_cache_add) | ||
773 | *(.text.kill_fasync) | ||
774 | *(.text.kernel_read) | ||
775 | *(.text.invalidate_mapping_pages) | ||
776 | *(.text.inode_has_buffers) | ||
777 | *(.text.init_once) | ||
778 | *(.text.inet_sendmsg) | ||
779 | *(.text.idedisk_issue_flush) | ||
780 | *(.text.generic_file_write) | ||
781 | *(.text.free_more_memory) | ||
782 | *(.text.__free_fdtable) | ||
783 | *(.text.filp_dtor) | ||
784 | *(.text.exit_sem) | ||
785 | *(.text.exit_itimers) | ||
786 | *(.text.error_interrupt) | ||
787 | *(.text.end_buffer_async_write) | ||
788 | *(.text.eligible_child) | ||
789 | *(.text.elf_map) | ||
790 | *(.text.dump_task_regs) | ||
791 | *(.text.dummy_task_setscheduler) | ||
792 | *(.text.dummy_socket_accept) | ||
793 | *(.text.dummy_file_free_security) | ||
794 | *(.text.__down_read) | ||
795 | *(.text.do_sock_read) | ||
796 | *(.text.do_sigaltstack) | ||
797 | *(.text.do_mremap) | ||
798 | *(.text.current_io_context) | ||
799 | *(.text.cpu_swap_callback) | ||
800 | *(.text.copy_vma) | ||
801 | *(.text.cap_bprm_set_security) | ||
802 | *(.text.blk_insert_request) | ||
803 | *(.text.bio_map_kern_endio) | ||
804 | *(.text.bio_hw_segments) | ||
805 | *(.text.bictcp_cong_avoid) | ||
806 | *(.text.add_interrupt_randomness) | ||
807 | *(.text.wait_for_completion) | ||
808 | *(.text.version_read_proc) | ||
809 | *(.text.unix_write_space) | ||
810 | *(.text.tty_ldisc_ref_wait) | ||
811 | *(.text.tty_ldisc_put) | ||
812 | *(.text.try_to_wake_up) | ||
813 | *(.text.tcp_v4_tw_remember_stamp) | ||
814 | *(.text.tcp_try_undo_dsack) | ||
815 | *(.text.tcp_may_send_now) | ||
816 | *(.text.sys_waitid) | ||
817 | *(.text.sys_sched_getparam) | ||
818 | *(.text.sys_getppid) | ||
819 | *(.text.sys_getcwd) | ||
820 | *(.text.sys_dup2) | ||
821 | *(.text.sys_chmod) | ||
822 | *(.text.sys_chdir) | ||
823 | *(.text.sprintf) | ||
824 | *(.text.sock_wfree) | ||
825 | *(.text.sock_aio_write) | ||
826 | *(.text.skb_drop_fraglist) | ||
827 | *(.text.skb_dequeue) | ||
828 | *(.text.set_close_on_exec) | ||
829 | *(.text.set_brk) | ||
830 | *(.text.seq_puts) | ||
831 | *(.text.SELECT_DRIVE) | ||
832 | *(.text.sched_exec) | ||
833 | *(.text.return_EIO) | ||
834 | *(.text.remove_from_page_cache) | ||
835 | *(.text.rcu_start_batch) | ||
836 | *(.text.__put_task_struct) | ||
837 | *(.text.proc_pid_readdir) | ||
838 | *(.text.proc_get_inode) | ||
839 | *(.text.prepare_to_wait_exclusive) | ||
840 | *(.text.pipe_wait) | ||
841 | *(.text.pipe_new) | ||
842 | *(.text.pdflush_operation) | ||
843 | *(.text.__pagevec_release) | ||
844 | *(.text.pagevec_lookup_tag) | ||
845 | *(.text.packet_rcv) | ||
846 | *(.text.n_tty_set_room) | ||
847 | *(.text.nr_free_pages) | ||
848 | *(.text.__net_timestamp) | ||
849 | *(.text.mpage_end_io_read) | ||
850 | *(.text.mod_timer) | ||
851 | *(.text.__memcpy) | ||
852 | *(.text.mb_cache_shrink_fn) | ||
853 | *(.text.lock_rename) | ||
854 | *(.text.kstrdup) | ||
855 | *(.text.is_ignored) | ||
856 | *(.text.int_very_careful) | ||
857 | *(.text.inotify_inode_is_dead) | ||
858 | *(.text.inotify_get_cookie) | ||
859 | *(.text.inode_get_bytes) | ||
860 | *(.text.init_timer) | ||
861 | *(.text.init_dev) | ||
862 | *(.text.inet_getname) | ||
863 | *(.text.ide_map_sg) | ||
864 | *(.text.__ide_dma_end) | ||
865 | *(.text.hrtimer_get_remaining) | ||
866 | *(.text.get_task_mm) | ||
867 | *(.text.get_random_int) | ||
868 | *(.text.free_pipe_info) | ||
869 | *(.text.filemap_write_and_wait_range) | ||
870 | *(.text.exit_thread) | ||
871 | *(.text.enter_idle) | ||
872 | *(.text.end_that_request_first) | ||
873 | *(.text.end_8259A_irq) | ||
874 | *(.text.dummy_file_alloc_security) | ||
875 | *(.text.do_group_exit) | ||
876 | *(.text.debug_mutex_init) | ||
877 | *(.text.cpuset_exit) | ||
878 | *(.text.cpu_idle) | ||
879 | *(.text.copy_semundo) | ||
880 | *(.text.copy_files) | ||
881 | *(.text.chrdev_open) | ||
882 | *(.text.cdrom_transfer_packet_command) | ||
883 | *(.text.cdrom_mode_sense) | ||
884 | *(.text.blk_phys_contig_segment) | ||
885 | *(.text.blk_get_queue) | ||
886 | *(.text.bio_split) | ||
887 | *(.text.audit_alloc) | ||
888 | *(.text.anon_pipe_buf_release) | ||
889 | *(.text.add_wait_queue_exclusive) | ||
890 | *(.text.add_wait_queue) | ||
891 | *(.text.acct_process) | ||
892 | *(.text.account) | ||
893 | *(.text.zeromap_page_range) | ||
894 | *(.text.yield) | ||
895 | *(.text.writeback_acquire) | ||
896 | *(.text.worker_thread) | ||
897 | *(.text.wait_on_page_writeback_range) | ||
898 | *(.text.__wait_on_buffer) | ||
899 | *(.text.vscnprintf) | ||
900 | *(.text.vmalloc_to_pfn) | ||
901 | *(.text.vgacon_save_screen) | ||
902 | *(.text.vfs_unlink) | ||
903 | *(.text.vfs_rmdir) | ||
904 | *(.text.unregister_md_personality) | ||
905 | *(.text.unlock_new_inode) | ||
906 | *(.text.unix_stream_sendmsg) | ||
907 | *(.text.unix_stream_recvmsg) | ||
908 | *(.text.unhash_process) | ||
909 | *(.text.udp_v4_lookup_longway) | ||
910 | *(.text.tty_ldisc_flush) | ||
911 | *(.text.tty_ldisc_enable) | ||
912 | *(.text.tty_hung_up_p) | ||
913 | *(.text.tty_buffer_free_all) | ||
914 | *(.text.tso_fragment) | ||
915 | *(.text.try_to_del_timer_sync) | ||
916 | *(.text.tcp_v4_err) | ||
917 | *(.text.tcp_unhash) | ||
918 | *(.text.tcp_seq_next) | ||
919 | *(.text.tcp_select_initial_window) | ||
920 | *(.text.tcp_sacktag_write_queue) | ||
921 | *(.text.tcp_cwnd_validate) | ||
922 | *(.text.sys_vhangup) | ||
923 | *(.text.sys_uselib) | ||
924 | *(.text.sys_symlink) | ||
925 | *(.text.sys_signal) | ||
926 | *(.text.sys_poll) | ||
927 | *(.text.sys_mount) | ||
928 | *(.text.sys_kill) | ||
929 | *(.text.sys_ioctl) | ||
930 | *(.text.sys_inotify_add_watch) | ||
931 | *(.text.sys_getuid) | ||
932 | *(.text.sys_getrlimit) | ||
933 | *(.text.sys_getitimer) | ||
934 | *(.text.sys_getgroups) | ||
935 | *(.text.sys_ftruncate) | ||
936 | *(.text.sysfs_lookup) | ||
937 | *(.text.sys_exit_group) | ||
938 | *(.text.stub_fork) | ||
939 | *(.text.sscanf) | ||
940 | *(.text.sock_map_fd) | ||
941 | *(.text.sock_get_timestamp) | ||
942 | *(.text.__sock_create) | ||
943 | *(.text.smp_call_function_single) | ||
944 | *(.text.sk_stop_timer) | ||
945 | *(.text.skb_copy_and_csum_datagram) | ||
946 | *(.text.__skb_checksum_complete) | ||
947 | *(.text.single_next) | ||
948 | *(.text.sigqueue_alloc) | ||
949 | *(.text.shrink_dcache_parent) | ||
950 | *(.text.select_idle_routine) | ||
951 | *(.text.run_workqueue) | ||
952 | *(.text.run_local_timers) | ||
953 | *(.text.remove_inode_hash) | ||
954 | *(.text.remove_dquot_ref) | ||
955 | *(.text.register_binfmt) | ||
956 | *(.text.read_cache_pages) | ||
957 | *(.text.rb_last) | ||
958 | *(.text.pty_open) | ||
959 | *(.text.proc_root_readdir) | ||
960 | *(.text.proc_pid_flush) | ||
961 | *(.text.proc_pident_lookup) | ||
962 | *(.text.proc_fill_super) | ||
963 | *(.text.proc_exe_link) | ||
964 | *(.text.posix_locks_deadlock) | ||
965 | *(.text.pipe_iov_copy_from_user) | ||
966 | *(.text.opost) | ||
967 | *(.text.nf_register_hook) | ||
968 | *(.text.netif_rx_ni) | ||
969 | *(.text.m_start) | ||
970 | *(.text.mpage_writepage) | ||
971 | *(.text.mm_alloc) | ||
972 | *(.text.memory_open) | ||
973 | *(.text.mark_buffer_async_write) | ||
974 | *(.text.lru_add_drain_all) | ||
975 | *(.text.locks_init_lock) | ||
976 | *(.text.locks_delete_lock) | ||
977 | *(.text.lock_hrtimer_base) | ||
978 | *(.text.load_script) | ||
979 | *(.text.__kill_fasync) | ||
980 | *(.text.ip_mc_sf_allow) | ||
981 | *(.text.__ioremap) | ||
982 | *(.text.int_with_check) | ||
983 | *(.text.int_sqrt) | ||
984 | *(.text.install_thread_keyring) | ||
985 | *(.text.init_page_buffers) | ||
986 | *(.text.inet_sock_destruct) | ||
987 | *(.text.idle_notifier_register) | ||
988 | *(.text.ide_execute_command) | ||
989 | *(.text.ide_end_drive_cmd) | ||
990 | *(.text.__ide_dma_host_on) | ||
991 | *(.text.hrtimer_run_queues) | ||
992 | *(.text.hpet_mask_rtc_irq_bit) | ||
993 | *(.text.__get_zone_counts) | ||
994 | *(.text.get_zone_counts) | ||
995 | *(.text.get_write_access) | ||
996 | *(.text.get_fs_struct) | ||
997 | *(.text.get_dirty_limits) | ||
998 | *(.text.generic_readlink) | ||
999 | *(.text.free_hot_page) | ||
1000 | *(.text.finish_wait) | ||
1001 | *(.text.find_inode) | ||
1002 | *(.text.find_first_bit) | ||
1003 | *(.text.__filemap_fdatawrite_range) | ||
1004 | *(.text.__filemap_copy_from_user_iovec) | ||
1005 | *(.text.exit_aio) | ||
1006 | *(.text.elv_set_request) | ||
1007 | *(.text.elv_former_request) | ||
1008 | *(.text.dup_namespace) | ||
1009 | *(.text.dupfd) | ||
1010 | *(.text.dummy_socket_getsockopt) | ||
1011 | *(.text.dummy_sb_post_mountroot) | ||
1012 | *(.text.dummy_quotactl) | ||
1013 | *(.text.dummy_inode_rename) | ||
1014 | *(.text.__do_SAK) | ||
1015 | *(.text.do_pipe) | ||
1016 | *(.text.do_fsync) | ||
1017 | *(.text.d_instantiate_unique) | ||
1018 | *(.text.d_find_alias) | ||
1019 | *(.text.deny_write_access) | ||
1020 | *(.text.dentry_unhash) | ||
1021 | *(.text.d_delete) | ||
1022 | *(.text.datagram_poll) | ||
1023 | *(.text.cpuset_fork) | ||
1024 | *(.text.cpuid_read) | ||
1025 | *(.text.copy_namespace) | ||
1026 | *(.text.cond_resched) | ||
1027 | *(.text.check_version) | ||
1028 | *(.text.__change_page_attr) | ||
1029 | *(.text.cfq_slab_kill) | ||
1030 | *(.text.cfq_completed_request) | ||
1031 | *(.text.cdrom_pc_intr) | ||
1032 | *(.text.cdrom_decode_status) | ||
1033 | *(.text.cap_capset_check) | ||
1034 | *(.text.blk_put_request) | ||
1035 | *(.text.bio_fs_destructor) | ||
1036 | *(.text.bictcp_min_cwnd) | ||
1037 | *(.text.alloc_chrdev_region) | ||
1038 | *(.text.add_element) | ||
1039 | *(.text.acct_update_integrals) | ||
1040 | *(.text.write_boundary_block) | ||
1041 | *(.text.writeback_release) | ||
1042 | *(.text.writeback_inodes) | ||
1043 | *(.text.wake_up_state) | ||
1044 | *(.text.__wake_up_locked) | ||
1045 | *(.text.wake_futex) | ||
1046 | *(.text.wait_task_inactive) | ||
1047 | *(.text.__wait_on_freeing_inode) | ||
1048 | *(.text.wait_noreap_copyout) | ||
1049 | *(.text.vmstat_start) | ||
1050 | *(.text.vgacon_do_font_op) | ||
1051 | *(.text.vfs_readv) | ||
1052 | *(.text.vfs_quota_sync) | ||
1053 | *(.text.update_queue) | ||
1054 | *(.text.unshare_files) | ||
1055 | *(.text.unmap_vm_area) | ||
1056 | *(.text.unix_socketpair) | ||
1057 | *(.text.unix_release_sock) | ||
1058 | *(.text.unix_detach_fds) | ||
1059 | *(.text.unix_create1) | ||
1060 | *(.text.unix_bind) | ||
1061 | *(.text.udp_sendmsg) | ||
1062 | *(.text.udp_rcv) | ||
1063 | *(.text.udp_queue_rcv_skb) | ||
1064 | *(.text.uart_write) | ||
1065 | *(.text.uart_startup) | ||
1066 | *(.text.uart_open) | ||
1067 | *(.text.tty_vhangup) | ||
1068 | *(.text.tty_termios_baud_rate) | ||
1069 | *(.text.tty_release) | ||
1070 | *(.text.tty_ldisc_ref) | ||
1071 | *(.text.throttle_vm_writeout) | ||
1072 | *(.text.058) | ||
1073 | *(.text.tcp_xmit_probe_skb) | ||
1074 | *(.text.tcp_v4_send_check) | ||
1075 | *(.text.tcp_v4_destroy_sock) | ||
1076 | *(.text.tcp_sync_mss) | ||
1077 | *(.text.tcp_snd_test) | ||
1078 | *(.text.tcp_slow_start) | ||
1079 | *(.text.tcp_send_fin) | ||
1080 | *(.text.tcp_rtt_estimator) | ||
1081 | *(.text.tcp_parse_options) | ||
1082 | *(.text.tcp_ioctl) | ||
1083 | *(.text.tcp_init_tso_segs) | ||
1084 | *(.text.tcp_init_cwnd) | ||
1085 | *(.text.tcp_getsockopt) | ||
1086 | *(.text.tcp_fin) | ||
1087 | *(.text.tcp_connect) | ||
1088 | *(.text.tcp_cong_avoid) | ||
1089 | *(.text.__tcp_checksum_complete_user) | ||
1090 | *(.text.task_dumpable) | ||
1091 | *(.text.sys_wait4) | ||
1092 | *(.text.sys_utimes) | ||
1093 | *(.text.sys_symlinkat) | ||
1094 | *(.text.sys_socketpair) | ||
1095 | *(.text.sys_rmdir) | ||
1096 | *(.text.sys_readahead) | ||
1097 | *(.text.sys_nanosleep) | ||
1098 | *(.text.sys_linkat) | ||
1099 | *(.text.sys_fstat) | ||
1100 | *(.text.sysfs_readdir) | ||
1101 | *(.text.sys_execve) | ||
1102 | *(.text.sysenter_tracesys) | ||
1103 | *(.text.sys_chown) | ||
1104 | *(.text.stub_clone) | ||
1105 | *(.text.strrchr) | ||
1106 | *(.text.strncpy) | ||
1107 | *(.text.stopmachine_set_state) | ||
1108 | *(.text.sock_sendmsg) | ||
1109 | *(.text.sock_release) | ||
1110 | *(.text.sock_fasync) | ||
1111 | *(.text.sock_close) | ||
1112 | *(.text.sk_stream_write_space) | ||
1113 | *(.text.sk_reset_timer) | ||
1114 | *(.text.skb_split) | ||
1115 | *(.text.skb_recv_datagram) | ||
1116 | *(.text.skb_queue_tail) | ||
1117 | *(.text.sk_attach_filter) | ||
1118 | *(.text.si_swapinfo) | ||
1119 | *(.text.simple_strtoll) | ||
1120 | *(.text.set_termios) | ||
1121 | *(.text.set_task_comm) | ||
1122 | *(.text.set_shrinker) | ||
1123 | *(.text.set_normalized_timespec) | ||
1124 | *(.text.set_brk) | ||
1125 | *(.text.serial_in) | ||
1126 | *(.text.seq_printf) | ||
1127 | *(.text.secure_dccp_sequence_number) | ||
1128 | *(.text.rwlock_bug) | ||
1129 | *(.text.rt_hash_code) | ||
1130 | *(.text.__rta_fill) | ||
1131 | *(.text.__request_resource) | ||
1132 | *(.text.relocate_new_kernel) | ||
1133 | *(.text.release_thread) | ||
1134 | *(.text.release_mem) | ||
1135 | *(.text.rb_prev) | ||
1136 | *(.text.rb_first) | ||
1137 | *(.text.random_poll) | ||
1138 | *(.text.__put_super_and_need_restart) | ||
1139 | *(.text.pty_write) | ||
1140 | *(.text.ptrace_stop) | ||
1141 | *(.text.proc_self_readlink) | ||
1142 | *(.text.proc_root_lookup) | ||
1143 | *(.text.proc_root_link) | ||
1144 | *(.text.proc_pid_make_inode) | ||
1145 | *(.text.proc_pid_attr_write) | ||
1146 | *(.text.proc_lookupfd) | ||
1147 | *(.text.proc_delete_inode) | ||
1148 | *(.text.posix_same_owner) | ||
1149 | *(.text.posix_block_lock) | ||
1150 | *(.text.poll_initwait) | ||
1151 | *(.text.pipe_write) | ||
1152 | *(.text.pipe_read_fasync) | ||
1153 | *(.text.pipe_ioctl) | ||
1154 | *(.text.pdflush) | ||
1155 | *(.text.pci_user_read_config_dword) | ||
1156 | *(.text.page_readlink) | ||
1157 | *(.text.null_lseek) | ||
1158 | *(.text.nf_hook_slow) | ||
1159 | *(.text.netlink_sock_destruct) | ||
1160 | *(.text.netlink_broadcast) | ||
1161 | *(.text.neigh_resolve_output) | ||
1162 | *(.text.name_to_int) | ||
1163 | *(.text.mwait_idle) | ||
1164 | *(.text.mutex_trylock) | ||
1165 | *(.text.mutex_debug_check_no_locks_held) | ||
1166 | *(.text.m_stop) | ||
1167 | *(.text.mpage_end_io_write) | ||
1168 | *(.text.mpage_alloc) | ||
1169 | *(.text.move_page_tables) | ||
1170 | *(.text.mounts_open) | ||
1171 | *(.text.__memset) | ||
1172 | *(.text.memcpy_fromiovec) | ||
1173 | *(.text.make_8259A_irq) | ||
1174 | *(.text.lookup_user_key_possessed) | ||
1175 | *(.text.lookup_create) | ||
1176 | *(.text.locks_insert_lock) | ||
1177 | *(.text.locks_alloc_lock) | ||
1178 | *(.text.kthread_should_stop) | ||
1179 | *(.text.kswapd) | ||
1180 | *(.text.kobject_uevent) | ||
1181 | *(.text.kobject_get_path) | ||
1182 | *(.text.kobject_get) | ||
1183 | *(.text.klist_children_put) | ||
1184 | *(.text.__ip_route_output_key) | ||
1185 | *(.text.ip_flush_pending_frames) | ||
1186 | *(.text.ip_compute_csum) | ||
1187 | *(.text.ip_append_data) | ||
1188 | *(.text.ioc_set_batching) | ||
1189 | *(.text.invalidate_inode_pages) | ||
1190 | *(.text.__invalidate_device) | ||
1191 | *(.text.install_arg_page) | ||
1192 | *(.text.in_sched_functions) | ||
1193 | *(.text.inotify_unmount_inodes) | ||
1194 | *(.text.init_once) | ||
1195 | *(.text.init_cdrom_command) | ||
1196 | *(.text.inet_stream_connect) | ||
1197 | *(.text.inet_sk_rebuild_header) | ||
1198 | *(.text.inet_csk_addr2sockaddr) | ||
1199 | *(.text.inet_create) | ||
1200 | *(.text.ifind) | ||
1201 | *(.text.ide_setup_dma) | ||
1202 | *(.text.ide_outsw) | ||
1203 | *(.text.ide_fixstring) | ||
1204 | *(.text.ide_dma_setup) | ||
1205 | *(.text.ide_cdrom_packet) | ||
1206 | *(.text.ide_cd_put) | ||
1207 | *(.text.ide_build_sglist) | ||
1208 | *(.text.i8259A_shutdown) | ||
1209 | *(.text.hung_up_tty_ioctl) | ||
1210 | *(.text.hrtimer_nanosleep) | ||
1211 | *(.text.hrtimer_init) | ||
1212 | *(.text.hrtimer_cancel) | ||
1213 | *(.text.hash_futex) | ||
1214 | *(.text.group_send_sig_info) | ||
1215 | *(.text.grab_cache_page_nowait) | ||
1216 | *(.text.get_wchan) | ||
1217 | *(.text.get_stack) | ||
1218 | *(.text.get_page_state) | ||
1219 | *(.text.getnstimeofday) | ||
1220 | *(.text.get_node) | ||
1221 | *(.text.get_kprobe) | ||
1222 | *(.text.generic_unplug_device) | ||
1223 | *(.text.free_task) | ||
1224 | *(.text.frag_show) | ||
1225 | *(.text.find_next_zero_string) | ||
1226 | *(.text.filp_open) | ||
1227 | *(.text.fillonedir) | ||
1228 | *(.text.exit_io_context) | ||
1229 | *(.text.exit_idle) | ||
1230 | *(.text.exact_lock) | ||
1231 | *(.text.eth_header) | ||
1232 | *(.text.dummy_unregister_security) | ||
1233 | *(.text.dummy_socket_post_create) | ||
1234 | *(.text.dummy_socket_listen) | ||
1235 | *(.text.dummy_quota_on) | ||
1236 | *(.text.dummy_inode_follow_link) | ||
1237 | *(.text.dummy_file_receive) | ||
1238 | *(.text.dummy_file_mprotect) | ||
1239 | *(.text.dummy_file_lock) | ||
1240 | *(.text.dummy_file_ioctl) | ||
1241 | *(.text.dummy_bprm_post_apply_creds) | ||
1242 | *(.text.do_writepages) | ||
1243 | *(.text.__down_interruptible) | ||
1244 | *(.text.do_notify_resume) | ||
1245 | *(.text.do_acct_process) | ||
1246 | *(.text.del_timer_sync) | ||
1247 | *(.text.default_rebuild_header) | ||
1248 | *(.text.d_callback) | ||
1249 | *(.text.dcache_readdir) | ||
1250 | *(.text.ctrl_dumpfamily) | ||
1251 | *(.text.cpuset_rmdir) | ||
1252 | *(.text.copy_strings_kernel) | ||
1253 | *(.text.con_write_room) | ||
1254 | *(.text.complete_all) | ||
1255 | *(.text.collect_sigign_sigcatch) | ||
1256 | *(.text.clear_user) | ||
1257 | *(.text.check_unthrottle) | ||
1258 | *(.text.cdrom_release) | ||
1259 | *(.text.cdrom_newpc_intr) | ||
1260 | *(.text.cdrom_ioctl) | ||
1261 | *(.text.cdrom_check_status) | ||
1262 | *(.text.cdev_put) | ||
1263 | *(.text.cdev_add) | ||
1264 | *(.text.cap_ptrace) | ||
1265 | *(.text.cap_bprm_secureexec) | ||
1266 | *(.text.cache_alloc_refill) | ||
1267 | *(.text.bmap) | ||
1268 | *(.text.blk_run_queue) | ||
1269 | *(.text.blk_queue_dma_alignment) | ||
1270 | *(.text.blk_ordered_req_seq) | ||
1271 | *(.text.blk_backing_dev_unplug) | ||
1272 | *(.text.__bitmap_subset) | ||
1273 | *(.text.__bitmap_and) | ||
1274 | *(.text.bio_unmap_user) | ||
1275 | *(.text.__bforget) | ||
1276 | *(.text.bd_forget) | ||
1277 | *(.text.bad_pipe_w) | ||
1278 | *(.text.bad_get_user) | ||
1279 | *(.text.audit_free) | ||
1280 | *(.text.anon_vma_ctor) | ||
1281 | *(.text.anon_pipe_buf_map) | ||
1282 | *(.text.alloc_sock_iocb) | ||
1283 | *(.text.alloc_fdset) | ||
1284 | *(.text.aio_kick_handler) | ||
1285 | *(.text.__add_entropy_words) | ||
1286 | *(.text.add_disk_randomness) | ||
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 02fc7fa0ea28..6df05e6034fa 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | .text | 28 | .text |
29 | .section .bootstrap.text | ||
29 | .code32 | 30 | .code32 |
30 | .globl startup_32 | 31 | .globl startup_32 |
31 | /* %bx: 1 if coming from smp trampoline on secondary cpu */ | 32 | /* %bx: 1 if coming from smp trampoline on secondary cpu */ |
@@ -192,7 +193,8 @@ startup_64: | |||
192 | movq initial_code(%rip),%rax | 193 | movq initial_code(%rip),%rax |
193 | jmp *%rax | 194 | jmp *%rax |
194 | 195 | ||
195 | /* SMP bootup changes these two */ | 196 | /* SMP bootup changes these two */ |
197 | .align 8 | ||
196 | .globl initial_code | 198 | .globl initial_code |
197 | initial_code: | 199 | initial_code: |
198 | .quad x86_64_start_kernel | 200 | .quad x86_64_start_kernel |
@@ -237,7 +239,7 @@ ENTRY(no_long_mode) | |||
237 | .org 0xf00 | 239 | .org 0xf00 |
238 | .globl pGDT32 | 240 | .globl pGDT32 |
239 | pGDT32: | 241 | pGDT32: |
240 | .word gdt_end-cpu_gdt_table | 242 | .word gdt_end-cpu_gdt_table-1 |
241 | .long cpu_gdt_table-__START_KERNEL_map | 243 | .long cpu_gdt_table-__START_KERNEL_map |
242 | 244 | ||
243 | .org 0xf10 | 245 | .org 0xf10 |
@@ -293,8 +295,6 @@ NEXT_PAGE(level2_kernel_pgt) | |||
293 | /* Module mapping starts here */ | 295 | /* Module mapping starts here */ |
294 | .fill 492,8,0 | 296 | .fill 492,8,0 |
295 | 297 | ||
296 | NEXT_PAGE(empty_zero_page) | ||
297 | |||
298 | NEXT_PAGE(level3_physmem_pgt) | 298 | NEXT_PAGE(level3_physmem_pgt) |
299 | .quad phys_level2_kernel_pgt | 0x007 /* so that __va works even before pagetable_init */ | 299 | .quad phys_level2_kernel_pgt | 0x007 /* so that __va works even before pagetable_init */ |
300 | .fill 511,8,0 | 300 | .fill 511,8,0 |
@@ -337,7 +337,7 @@ ENTRY(boot_level4_pgt) | |||
337 | .align 16 | 337 | .align 16 |
338 | .globl cpu_gdt_descr | 338 | .globl cpu_gdt_descr |
339 | cpu_gdt_descr: | 339 | cpu_gdt_descr: |
340 | .word gdt_end-cpu_gdt_table | 340 | .word gdt_end-cpu_gdt_table-1 |
341 | gdt: | 341 | gdt: |
342 | .quad cpu_gdt_table | 342 | .quad cpu_gdt_table |
343 | #ifdef CONFIG_SMP | 343 | #ifdef CONFIG_SMP |
@@ -352,7 +352,8 @@ gdt: | |||
352 | * Also sysret mandates a special GDT layout | 352 | * Also sysret mandates a special GDT layout |
353 | */ | 353 | */ |
354 | 354 | ||
355 | .align PAGE_SIZE | 355 | .section .data.page_aligned, "aw" |
356 | .align PAGE_SIZE | ||
356 | 357 | ||
357 | /* The TLS descriptors are currently at a different place compared to i386. | 358 | /* The TLS descriptors are currently at a different place compared to i386. |
358 | Hopefully nobody expects them at a fixed place (Wine?) */ | 359 | Hopefully nobody expects them at a fixed place (Wine?) */ |
@@ -378,9 +379,12 @@ gdt_end: | |||
378 | /* zero the remaining page */ | 379 | /* zero the remaining page */ |
379 | .fill PAGE_SIZE / 8 - GDT_ENTRIES,8,0 | 380 | .fill PAGE_SIZE / 8 - GDT_ENTRIES,8,0 |
380 | 381 | ||
381 | ENTRY(idt_table) | 382 | .section .bss, "aw", @nobits |
382 | .rept 256 | 383 | .align L1_CACHE_BYTES |
383 | .quad 0 | 384 | ENTRY(idt_table) |
384 | .quad 0 | 385 | .skip 256 * 16 |
385 | .endr | ||
386 | 386 | ||
387 | .section .bss.page_aligned, "aw", @nobits | ||
388 | .align PAGE_SIZE | ||
389 | ENTRY(empty_zero_page) | ||
390 | .skip PAGE_SIZE | ||
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index ffed464e6b12..77b4c608cca0 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -50,7 +50,7 @@ static int no_timer_check; | |||
50 | 50 | ||
51 | int disable_timer_pin_1 __initdata; | 51 | int disable_timer_pin_1 __initdata; |
52 | 52 | ||
53 | int timer_over_8254 __initdata = 1; | 53 | int timer_over_8254 __initdata = 0; |
54 | 54 | ||
55 | /* Where if anywhere is the i8259 connect in external int mode */ | 55 | /* Where if anywhere is the i8259 connect in external int mode */ |
56 | static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; | 56 | static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; |
@@ -310,7 +310,7 @@ void __init check_ioapic(void) | |||
310 | force_iommu) && | 310 | force_iommu) && |
311 | !iommu_aperture_allowed) { | 311 | !iommu_aperture_allowed) { |
312 | printk(KERN_INFO | 312 | printk(KERN_INFO |
313 | "Looks like a VIA chipset. Disabling IOMMU. Overwrite with \"iommu=allowed\"\n"); | 313 | "Looks like a VIA chipset. Disabling IOMMU. Override with \"iommu=allowed\"\n"); |
314 | iommu_aperture_disabled = 1; | 314 | iommu_aperture_disabled = 1; |
315 | } | 315 | } |
316 | #endif | 316 | #endif |
@@ -1848,7 +1848,7 @@ static inline void check_timer(void) | |||
1848 | */ | 1848 | */ |
1849 | setup_ExtINT_IRQ0_pin(apic2, pin2, vector); | 1849 | setup_ExtINT_IRQ0_pin(apic2, pin2, vector); |
1850 | if (timer_irq_works()) { | 1850 | if (timer_irq_works()) { |
1851 | printk("works.\n"); | 1851 | apic_printk(APIC_VERBOSE," works.\n"); |
1852 | nmi_watchdog_default(); | 1852 | nmi_watchdog_default(); |
1853 | if (nmi_watchdog == NMI_IO_APIC) { | 1853 | if (nmi_watchdog == NMI_IO_APIC) { |
1854 | setup_nmi(); | 1854 | setup_nmi(); |
@@ -1860,7 +1860,7 @@ static inline void check_timer(void) | |||
1860 | */ | 1860 | */ |
1861 | clear_IO_APIC_pin(apic2, pin2); | 1861 | clear_IO_APIC_pin(apic2, pin2); |
1862 | } | 1862 | } |
1863 | printk(" failed.\n"); | 1863 | apic_printk(APIC_VERBOSE," failed.\n"); |
1864 | 1864 | ||
1865 | if (nmi_watchdog == NMI_IO_APIC) { | 1865 | if (nmi_watchdog == NMI_IO_APIC) { |
1866 | printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); | 1866 | printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); |
@@ -1875,7 +1875,7 @@ static inline void check_timer(void) | |||
1875 | enable_8259A_irq(0); | 1875 | enable_8259A_irq(0); |
1876 | 1876 | ||
1877 | if (timer_irq_works()) { | 1877 | if (timer_irq_works()) { |
1878 | apic_printk(APIC_QUIET, " works.\n"); | 1878 | apic_printk(APIC_VERBOSE," works.\n"); |
1879 | return; | 1879 | return; |
1880 | } | 1880 | } |
1881 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector); | 1881 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector); |
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c index 30d2a1e545fe..d8bd0b345b1e 100644 --- a/arch/x86_64/kernel/irq.c +++ b/arch/x86_64/kernel/irq.c | |||
@@ -38,9 +38,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
38 | 38 | ||
39 | if (i == 0) { | 39 | if (i == 0) { |
40 | seq_printf(p, " "); | 40 | seq_printf(p, " "); |
41 | for (j=0; j<NR_CPUS; j++) | 41 | for_each_online_cpu(j) |
42 | if (cpu_online(j)) | 42 | seq_printf(p, "CPU%d ",j); |
43 | seq_printf(p, "CPU%d ",j); | ||
44 | seq_putc(p, '\n'); | 43 | seq_putc(p, '\n'); |
45 | } | 44 | } |
46 | 45 | ||
@@ -53,10 +52,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
53 | #ifndef CONFIG_SMP | 52 | #ifndef CONFIG_SMP |
54 | seq_printf(p, "%10u ", kstat_irqs(i)); | 53 | seq_printf(p, "%10u ", kstat_irqs(i)); |
55 | #else | 54 | #else |
56 | for (j=0; j<NR_CPUS; j++) | 55 | for_each_online_cpu(j) |
57 | if (cpu_online(j)) | 56 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
58 | seq_printf(p, "%10u ", | ||
59 | kstat_cpu(j).irqs[i]); | ||
60 | #endif | 57 | #endif |
61 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 58 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
62 | 59 | ||
@@ -68,15 +65,13 @@ skip: | |||
68 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 65 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
69 | } else if (i == NR_IRQS) { | 66 | } else if (i == NR_IRQS) { |
70 | seq_printf(p, "NMI: "); | 67 | seq_printf(p, "NMI: "); |
71 | for (j = 0; j < NR_CPUS; j++) | 68 | for_each_online_cpu(j) |
72 | if (cpu_online(j)) | 69 | seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count); |
73 | seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count); | ||
74 | seq_putc(p, '\n'); | 70 | seq_putc(p, '\n'); |
75 | #ifdef CONFIG_X86_LOCAL_APIC | 71 | #ifdef CONFIG_X86_LOCAL_APIC |
76 | seq_printf(p, "LOC: "); | 72 | seq_printf(p, "LOC: "); |
77 | for (j = 0; j < NR_CPUS; j++) | 73 | for_each_online_cpu(j) |
78 | if (cpu_online(j)) | 74 | seq_printf(p, "%10u ", cpu_pda(j)->apic_timer_irqs); |
79 | seq_printf(p, "%10u ", cpu_pda(j)->apic_timer_irqs); | ||
80 | seq_putc(p, '\n'); | 75 | seq_putc(p, '\n'); |
81 | #endif | 76 | #endif |
82 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); | 77 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); |
diff --git a/arch/x86_64/kernel/kprobes.c b/arch/x86_64/kernel/kprobes.c index 8b866a8572cf..14f0ced613b6 100644 --- a/arch/x86_64/kernel/kprobes.c +++ b/arch/x86_64/kernel/kprobes.c | |||
@@ -222,9 +222,9 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
222 | 222 | ||
223 | void __kprobes arch_remove_kprobe(struct kprobe *p) | 223 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
224 | { | 224 | { |
225 | down(&kprobe_mutex); | 225 | mutex_lock(&kprobe_mutex); |
226 | free_insn_slot(p->ainsn.insn); | 226 | free_insn_slot(p->ainsn.insn); |
227 | up(&kprobe_mutex); | 227 | mutex_unlock(&kprobe_mutex); |
228 | } | 228 | } |
229 | 229 | ||
230 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) | 230 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) |
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c index b8b9529fa89e..04282ef9fbd4 100644 --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c | |||
@@ -139,8 +139,7 @@ static void mce_panic(char *msg, struct mce *backup, unsigned long start) | |||
139 | 139 | ||
140 | static int mce_available(struct cpuinfo_x86 *c) | 140 | static int mce_available(struct cpuinfo_x86 *c) |
141 | { | 141 | { |
142 | return test_bit(X86_FEATURE_MCE, &c->x86_capability) && | 142 | return cpu_has(c, X86_FEATURE_MCE) && cpu_has(c, X86_FEATURE_MCA); |
143 | test_bit(X86_FEATURE_MCA, &c->x86_capability); | ||
144 | } | 143 | } |
145 | 144 | ||
146 | static inline void mce_get_rip(struct mce *m, struct pt_regs *regs) | 145 | static inline void mce_get_rip(struct mce *m, struct pt_regs *regs) |
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index 9013a90b5c2e..b17cf3eba359 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c | |||
@@ -106,11 +106,11 @@ static int __init mpf_checksum(unsigned char *mp, int len) | |||
106 | return sum & 0xFF; | 106 | return sum & 0xFF; |
107 | } | 107 | } |
108 | 108 | ||
109 | static void __init MP_processor_info (struct mpc_config_processor *m) | 109 | static void __cpuinit MP_processor_info (struct mpc_config_processor *m) |
110 | { | 110 | { |
111 | int cpu; | 111 | int cpu; |
112 | unsigned char ver; | 112 | unsigned char ver; |
113 | static int found_bsp=0; | 113 | cpumask_t tmp_map; |
114 | 114 | ||
115 | if (!(m->mpc_cpuflag & CPU_ENABLED)) { | 115 | if (!(m->mpc_cpuflag & CPU_ENABLED)) { |
116 | disabled_cpus++; | 116 | disabled_cpus++; |
@@ -133,8 +133,10 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
133 | return; | 133 | return; |
134 | } | 134 | } |
135 | 135 | ||
136 | cpu = num_processors++; | 136 | num_processors++; |
137 | 137 | cpus_complement(tmp_map, cpu_present_map); | |
138 | cpu = first_cpu(tmp_map); | ||
139 | |||
138 | #if MAX_APICS < 255 | 140 | #if MAX_APICS < 255 |
139 | if ((int)m->mpc_apicid > MAX_APICS) { | 141 | if ((int)m->mpc_apicid > MAX_APICS) { |
140 | printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", | 142 | printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", |
@@ -160,12 +162,7 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
160 | * entry is BSP, and so on. | 162 | * entry is BSP, and so on. |
161 | */ | 163 | */ |
162 | cpu = 0; | 164 | cpu = 0; |
163 | 165 | } | |
164 | bios_cpu_apicid[0] = m->mpc_apicid; | ||
165 | x86_cpu_to_apicid[0] = m->mpc_apicid; | ||
166 | found_bsp = 1; | ||
167 | } else | ||
168 | cpu = num_processors - found_bsp; | ||
169 | bios_cpu_apicid[cpu] = m->mpc_apicid; | 166 | bios_cpu_apicid[cpu] = m->mpc_apicid; |
170 | x86_cpu_to_apicid[cpu] = m->mpc_apicid; | 167 | x86_cpu_to_apicid[cpu] = m->mpc_apicid; |
171 | 168 | ||
@@ -691,7 +688,7 @@ void __init mp_register_lapic_address ( | |||
691 | } | 688 | } |
692 | 689 | ||
693 | 690 | ||
694 | void __init mp_register_lapic ( | 691 | void __cpuinit mp_register_lapic ( |
695 | u8 id, | 692 | u8 id, |
696 | u8 enabled) | 693 | u8 enabled) |
697 | { | 694 | { |
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 5bf17e41cd2d..d9e4067faf05 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -162,9 +162,7 @@ int __init check_nmi_watchdog (void) | |||
162 | local_irq_enable(); | 162 | local_irq_enable(); |
163 | mdelay((10*1000)/nmi_hz); // wait 10 ticks | 163 | mdelay((10*1000)/nmi_hz); // wait 10 ticks |
164 | 164 | ||
165 | for (cpu = 0; cpu < NR_CPUS; cpu++) { | 165 | for_each_online_cpu(cpu) { |
166 | if (!cpu_online(cpu)) | ||
167 | continue; | ||
168 | if (cpu_pda(cpu)->__nmi_count - counts[cpu] <= 5) { | 166 | if (cpu_pda(cpu)->__nmi_count - counts[cpu] <= 5) { |
169 | endflag = 1; | 167 | endflag = 1; |
170 | printk("CPU#%d: NMI appears to be stuck (%d->%d)!\n", | 168 | printk("CPU#%d: NMI appears to be stuck (%d->%d)!\n", |
@@ -536,6 +534,7 @@ asmlinkage __kprobes void do_nmi(struct pt_regs * regs, long error_code) | |||
536 | 534 | ||
537 | void set_nmi_callback(nmi_callback_t callback) | 535 | void set_nmi_callback(nmi_callback_t callback) |
538 | { | 536 | { |
537 | vmalloc_sync_all(); | ||
539 | rcu_assign_pointer(nmi_callback, callback); | 538 | rcu_assign_pointer(nmi_callback, callback); |
540 | } | 539 | } |
541 | 540 | ||
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c index 4ed391edd47a..03c9eeedb0f3 100644 --- a/arch/x86_64/kernel/pci-dma.c +++ b/arch/x86_64/kernel/pci-dma.c | |||
@@ -73,6 +73,9 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | |||
73 | if (dma_mask == 0) | 73 | if (dma_mask == 0) |
74 | dma_mask = 0xffffffff; | 74 | dma_mask = 0xffffffff; |
75 | 75 | ||
76 | /* Don't invoke OOM killer */ | ||
77 | gfp |= __GFP_NORETRY; | ||
78 | |||
76 | /* Kludge to make it bug-to-bug compatible with i386. i386 | 79 | /* Kludge to make it bug-to-bug compatible with i386. i386 |
77 | uses the normal dma_mask for alloc_coherent. */ | 80 | uses the normal dma_mask for alloc_coherent. */ |
78 | dma_mask &= *dev->dma_mask; | 81 | dma_mask &= *dev->dma_mask; |
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 0c3f052ba6ce..a6c01e121266 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c | |||
@@ -65,9 +65,7 @@ static u32 gart_unmapped_entry; | |||
65 | 65 | ||
66 | #define for_all_nb(dev) \ | 66 | #define for_all_nb(dev) \ |
67 | dev = NULL; \ | 67 | dev = NULL; \ |
68 | while ((dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL)\ | 68 | while ((dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL) |
69 | if (dev->bus->number == 0 && \ | ||
70 | (PCI_SLOT(dev->devfn) >= 24) && (PCI_SLOT(dev->devfn) <= 31)) | ||
71 | 69 | ||
72 | static struct pci_dev *northbridges[MAX_NB]; | 70 | static struct pci_dev *northbridges[MAX_NB]; |
73 | static u32 northbridge_flush_word[MAX_NB]; | 71 | static u32 northbridge_flush_word[MAX_NB]; |
@@ -148,9 +146,12 @@ static void flush_gart(struct device *dev) | |||
148 | if (!northbridges[i]) | 146 | if (!northbridges[i]) |
149 | continue; | 147 | continue; |
150 | /* Make sure the hardware actually executed the flush. */ | 148 | /* Make sure the hardware actually executed the flush. */ |
151 | do { | 149 | for (;;) { |
152 | pci_read_config_dword(northbridges[i], 0x9c, &w); | 150 | pci_read_config_dword(northbridges[i], 0x9c, &w); |
153 | } while (w & 1); | 151 | if (!(w & 1)) |
152 | break; | ||
153 | cpu_relax(); | ||
154 | } | ||
154 | } | 155 | } |
155 | if (!flushed) | 156 | if (!flushed) |
156 | printk("nothing to flush?\n"); | 157 | printk("nothing to flush?\n"); |
diff --git a/arch/x86_64/kernel/pmtimer.c b/arch/x86_64/kernel/pmtimer.c index 5c51d10408a6..ee5ee4891f3d 100644 --- a/arch/x86_64/kernel/pmtimer.c +++ b/arch/x86_64/kernel/pmtimer.c | |||
@@ -86,7 +86,7 @@ static unsigned pmtimer_wait_tick(void) | |||
86 | for (a = b = inl(pmtmr_ioport) & ACPI_PM_MASK; | 86 | for (a = b = inl(pmtmr_ioport) & ACPI_PM_MASK; |
87 | a == b; | 87 | a == b; |
88 | b = inl(pmtmr_ioport) & ACPI_PM_MASK) | 88 | b = inl(pmtmr_ioport) & ACPI_PM_MASK) |
89 | ; | 89 | cpu_relax(); |
90 | return b; | 90 | return b; |
91 | } | 91 | } |
92 | 92 | ||
@@ -97,6 +97,7 @@ void pmtimer_wait(unsigned us) | |||
97 | a = pmtimer_wait_tick(); | 97 | a = pmtimer_wait_tick(); |
98 | do { | 98 | do { |
99 | b = inl(pmtmr_ioport); | 99 | b = inl(pmtmr_ioport); |
100 | cpu_relax(); | ||
100 | } while (cyc2us(b - a) < us); | 101 | } while (cyc2us(b - a) < us); |
101 | } | 102 | } |
102 | 103 | ||
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 22a05dec81a2..81111835722d 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -114,7 +114,7 @@ void exit_idle(void) | |||
114 | * We use this if we don't have any better | 114 | * We use this if we don't have any better |
115 | * idle routine.. | 115 | * idle routine.. |
116 | */ | 116 | */ |
117 | void default_idle(void) | 117 | static void default_idle(void) |
118 | { | 118 | { |
119 | local_irq_enable(); | 119 | local_irq_enable(); |
120 | 120 | ||
@@ -508,7 +508,7 @@ out: | |||
508 | /* | 508 | /* |
509 | * This special macro can be used to load a debugging register | 509 | * This special macro can be used to load a debugging register |
510 | */ | 510 | */ |
511 | #define loaddebug(thread,r) set_debug(thread->debugreg ## r, r) | 511 | #define loaddebug(thread,r) set_debugreg(thread->debugreg ## r, r) |
512 | 512 | ||
513 | /* | 513 | /* |
514 | * switch_to(x,y) should switch tasks from x to y. | 514 | * switch_to(x,y) should switch tasks from x to y. |
@@ -527,8 +527,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
527 | int cpu = smp_processor_id(); | 527 | int cpu = smp_processor_id(); |
528 | struct tss_struct *tss = &per_cpu(init_tss, cpu); | 528 | struct tss_struct *tss = &per_cpu(init_tss, cpu); |
529 | 529 | ||
530 | unlazy_fpu(prev_p); | ||
531 | |||
532 | /* | 530 | /* |
533 | * Reload esp0, LDT and the page table pointer: | 531 | * Reload esp0, LDT and the page table pointer: |
534 | */ | 532 | */ |
@@ -586,11 +584,14 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
586 | } | 584 | } |
587 | 585 | ||
588 | /* | 586 | /* |
589 | * Switch the PDA context. | 587 | * Switch the PDA and FPU contexts. |
590 | */ | 588 | */ |
591 | prev->userrsp = read_pda(oldrsp); | 589 | prev->userrsp = read_pda(oldrsp); |
592 | write_pda(oldrsp, next->userrsp); | 590 | write_pda(oldrsp, next->userrsp); |
593 | write_pda(pcurrent, next_p); | 591 | write_pda(pcurrent, next_p); |
592 | /* This must be here to ensure both math_state_restore() and | ||
593 | kernel_fpu_begin() work consistently. */ | ||
594 | unlazy_fpu(prev_p); | ||
594 | write_pda(kernelstack, | 595 | write_pda(kernelstack, |
595 | task_stack_page(next_p) + THREAD_SIZE - PDA_STACKOFFSET); | 596 | task_stack_page(next_p) + THREAD_SIZE - PDA_STACKOFFSET); |
596 | 597 | ||
diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c index 53205622351c..d44b2c1e63a6 100644 --- a/arch/x86_64/kernel/ptrace.c +++ b/arch/x86_64/kernel/ptrace.c | |||
@@ -420,9 +420,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
420 | case offsetof(struct user, u_debugreg[7]): | 420 | case offsetof(struct user, u_debugreg[7]): |
421 | /* See arch/i386/kernel/ptrace.c for an explanation of | 421 | /* See arch/i386/kernel/ptrace.c for an explanation of |
422 | * this awkward check.*/ | 422 | * this awkward check.*/ |
423 | data &= ~DR_CONTROL_RESERVED; | 423 | data &= ~DR_CONTROL_RESERVED; |
424 | for(i=0; i<4; i++) | 424 | for(i=0; i<4; i++) |
425 | if ((0x5454 >> ((data >> (16 + 4*i)) & 0xf)) & 1) | 425 | if ((0x5554 >> ((data >> (16 + 4*i)) & 0xf)) & 1) |
426 | break; | 426 | break; |
427 | if (i == 4) { | 427 | if (i == 4) { |
428 | child->thread.debugreg7 = data; | 428 | child->thread.debugreg7 = data; |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index aa55e3cec665..a57eec8311a7 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/cpufreq.h> | 46 | #include <linux/cpufreq.h> |
47 | #include <linux/dmi.h> | 47 | #include <linux/dmi.h> |
48 | #include <linux/dma-mapping.h> | 48 | #include <linux/dma-mapping.h> |
49 | #include <linux/ctype.h> | ||
49 | 50 | ||
50 | #include <asm/mtrr.h> | 51 | #include <asm/mtrr.h> |
51 | #include <asm/uaccess.h> | 52 | #include <asm/uaccess.h> |
@@ -67,6 +68,7 @@ | |||
67 | #include <asm/swiotlb.h> | 68 | #include <asm/swiotlb.h> |
68 | #include <asm/sections.h> | 69 | #include <asm/sections.h> |
69 | #include <asm/gart-mapping.h> | 70 | #include <asm/gart-mapping.h> |
71 | #include <asm/dmi.h> | ||
70 | 72 | ||
71 | /* | 73 | /* |
72 | * Machine setup.. | 74 | * Machine setup.. |
@@ -91,6 +93,12 @@ int bootloader_type; | |||
91 | 93 | ||
92 | unsigned long saved_video_mode; | 94 | unsigned long saved_video_mode; |
93 | 95 | ||
96 | /* | ||
97 | * Early DMI memory | ||
98 | */ | ||
99 | int dmi_alloc_index; | ||
100 | char dmi_alloc_data[DMI_MAX_DATA]; | ||
101 | |||
94 | /* | 102 | /* |
95 | * Setup options | 103 | * Setup options |
96 | */ | 104 | */ |
@@ -270,6 +278,13 @@ static void __init probe_roms(void) | |||
270 | } | 278 | } |
271 | } | 279 | } |
272 | 280 | ||
281 | /* Check for full argument with no trailing characters */ | ||
282 | static int fullarg(char *p, char *arg) | ||
283 | { | ||
284 | int l = strlen(arg); | ||
285 | return !memcmp(p, arg, l) && (p[l] == 0 || isspace(p[l])); | ||
286 | } | ||
287 | |||
273 | static __init void parse_cmdline_early (char ** cmdline_p) | 288 | static __init void parse_cmdline_early (char ** cmdline_p) |
274 | { | 289 | { |
275 | char c = ' ', *to = command_line, *from = COMMAND_LINE; | 290 | char c = ' ', *to = command_line, *from = COMMAND_LINE; |
@@ -293,10 +308,10 @@ static __init void parse_cmdline_early (char ** cmdline_p) | |||
293 | #endif | 308 | #endif |
294 | #ifdef CONFIG_ACPI | 309 | #ifdef CONFIG_ACPI |
295 | /* "acpi=off" disables both ACPI table parsing and interpreter init */ | 310 | /* "acpi=off" disables both ACPI table parsing and interpreter init */ |
296 | if (!memcmp(from, "acpi=off", 8)) | 311 | if (fullarg(from,"acpi=off")) |
297 | disable_acpi(); | 312 | disable_acpi(); |
298 | 313 | ||
299 | if (!memcmp(from, "acpi=force", 10)) { | 314 | if (fullarg(from, "acpi=force")) { |
300 | /* add later when we do DMI horrors: */ | 315 | /* add later when we do DMI horrors: */ |
301 | acpi_force = 1; | 316 | acpi_force = 1; |
302 | acpi_disabled = 0; | 317 | acpi_disabled = 0; |
@@ -304,52 +319,47 @@ static __init void parse_cmdline_early (char ** cmdline_p) | |||
304 | 319 | ||
305 | /* acpi=ht just means: do ACPI MADT parsing | 320 | /* acpi=ht just means: do ACPI MADT parsing |
306 | at bootup, but don't enable the full ACPI interpreter */ | 321 | at bootup, but don't enable the full ACPI interpreter */ |
307 | if (!memcmp(from, "acpi=ht", 7)) { | 322 | if (fullarg(from, "acpi=ht")) { |
308 | if (!acpi_force) | 323 | if (!acpi_force) |
309 | disable_acpi(); | 324 | disable_acpi(); |
310 | acpi_ht = 1; | 325 | acpi_ht = 1; |
311 | } | 326 | } |
312 | else if (!memcmp(from, "pci=noacpi", 10)) | 327 | else if (fullarg(from, "pci=noacpi")) |
313 | acpi_disable_pci(); | 328 | acpi_disable_pci(); |
314 | else if (!memcmp(from, "acpi=noirq", 10)) | 329 | else if (fullarg(from, "acpi=noirq")) |
315 | acpi_noirq_set(); | 330 | acpi_noirq_set(); |
316 | 331 | ||
317 | else if (!memcmp(from, "acpi_sci=edge", 13)) | 332 | else if (fullarg(from, "acpi_sci=edge")) |
318 | acpi_sci_flags.trigger = 1; | 333 | acpi_sci_flags.trigger = 1; |
319 | else if (!memcmp(from, "acpi_sci=level", 14)) | 334 | else if (fullarg(from, "acpi_sci=level")) |
320 | acpi_sci_flags.trigger = 3; | 335 | acpi_sci_flags.trigger = 3; |
321 | else if (!memcmp(from, "acpi_sci=high", 13)) | 336 | else if (fullarg(from, "acpi_sci=high")) |
322 | acpi_sci_flags.polarity = 1; | 337 | acpi_sci_flags.polarity = 1; |
323 | else if (!memcmp(from, "acpi_sci=low", 12)) | 338 | else if (fullarg(from, "acpi_sci=low")) |
324 | acpi_sci_flags.polarity = 3; | 339 | acpi_sci_flags.polarity = 3; |
325 | 340 | ||
326 | /* acpi=strict disables out-of-spec workarounds */ | 341 | /* acpi=strict disables out-of-spec workarounds */ |
327 | else if (!memcmp(from, "acpi=strict", 11)) { | 342 | else if (fullarg(from, "acpi=strict")) { |
328 | acpi_strict = 1; | 343 | acpi_strict = 1; |
329 | } | 344 | } |
330 | #ifdef CONFIG_X86_IO_APIC | 345 | #ifdef CONFIG_X86_IO_APIC |
331 | else if (!memcmp(from, "acpi_skip_timer_override", 24)) | 346 | else if (fullarg(from, "acpi_skip_timer_override")) |
332 | acpi_skip_timer_override = 1; | 347 | acpi_skip_timer_override = 1; |
333 | #endif | 348 | #endif |
334 | #endif | 349 | #endif |
335 | 350 | ||
336 | if (!memcmp(from, "disable_timer_pin_1", 19)) | 351 | if (fullarg(from, "disable_timer_pin_1")) |
337 | disable_timer_pin_1 = 1; | 352 | disable_timer_pin_1 = 1; |
338 | if (!memcmp(from, "enable_timer_pin_1", 18)) | 353 | if (fullarg(from, "enable_timer_pin_1")) |
339 | disable_timer_pin_1 = -1; | 354 | disable_timer_pin_1 = -1; |
340 | 355 | ||
341 | if (!memcmp(from, "nolapic", 7) || | 356 | if (fullarg(from, "nolapic") || fullarg(from, "disableapic")) |
342 | !memcmp(from, "disableapic", 11)) | ||
343 | disable_apic = 1; | 357 | disable_apic = 1; |
344 | 358 | ||
345 | /* Don't confuse with noapictimer */ | 359 | if (fullarg(from, "noapic")) |
346 | if (!memcmp(from, "noapic", 6) && | ||
347 | (from[6] == ' ' || from[6] == 0)) | ||
348 | skip_ioapic_setup = 1; | 360 | skip_ioapic_setup = 1; |
349 | 361 | ||
350 | /* Make sure to not confuse with apic= */ | 362 | if (fullarg(from,"apic")) { |
351 | if (!memcmp(from, "apic", 4) && | ||
352 | (from[4] == ' ' || from[4] == 0)) { | ||
353 | skip_ioapic_setup = 0; | 363 | skip_ioapic_setup = 0; |
354 | ioapic_force = 1; | 364 | ioapic_force = 1; |
355 | } | 365 | } |
@@ -388,7 +398,7 @@ static __init void parse_cmdline_early (char ** cmdline_p) | |||
388 | iommu_setup(from+6); | 398 | iommu_setup(from+6); |
389 | } | 399 | } |
390 | 400 | ||
391 | if (!memcmp(from,"oops=panic", 10)) | 401 | if (fullarg(from,"oops=panic")) |
392 | panic_on_oops = 1; | 402 | panic_on_oops = 1; |
393 | 403 | ||
394 | if (!memcmp(from, "noexec=", 7)) | 404 | if (!memcmp(from, "noexec=", 7)) |
@@ -611,11 +621,14 @@ void __init setup_arch(char **cmdline_p) | |||
611 | * we are rounding upwards: | 621 | * we are rounding upwards: |
612 | */ | 622 | */ |
613 | end_pfn = e820_end_of_ram(); | 623 | end_pfn = e820_end_of_ram(); |
624 | num_physpages = end_pfn; /* for pfn_valid */ | ||
614 | 625 | ||
615 | check_efer(); | 626 | check_efer(); |
616 | 627 | ||
617 | init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT)); | 628 | init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT)); |
618 | 629 | ||
630 | dmi_scan_machine(); | ||
631 | |||
619 | zap_low_mappings(0); | 632 | zap_low_mappings(0); |
620 | 633 | ||
621 | #ifdef CONFIG_ACPI | 634 | #ifdef CONFIG_ACPI |
@@ -708,6 +721,12 @@ void __init setup_arch(char **cmdline_p) | |||
708 | 721 | ||
709 | check_ioapic(); | 722 | check_ioapic(); |
710 | 723 | ||
724 | /* | ||
725 | * set this early, so we dont allocate cpu0 | ||
726 | * if MADT list doesnt list BSP first | ||
727 | * mpparse.c/MP_processor_info() allocates logical cpu numbers. | ||
728 | */ | ||
729 | cpu_set(0, cpu_present_map); | ||
711 | #ifdef CONFIG_ACPI | 730 | #ifdef CONFIG_ACPI |
712 | /* | 731 | /* |
713 | * Read APIC and some other early information from ACPI tables. | 732 | * Read APIC and some other early information from ACPI tables. |
@@ -836,7 +855,7 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) | |||
836 | unsigned bits; | 855 | unsigned bits; |
837 | #ifdef CONFIG_NUMA | 856 | #ifdef CONFIG_NUMA |
838 | int node = 0; | 857 | int node = 0; |
839 | unsigned apicid = phys_proc_id[cpu]; | 858 | unsigned apicid = hard_smp_processor_id(); |
840 | #endif | 859 | #endif |
841 | 860 | ||
842 | bits = 0; | 861 | bits = 0; |
@@ -846,7 +865,7 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) | |||
846 | /* Low order bits define the core id (index of core in socket) */ | 865 | /* Low order bits define the core id (index of core in socket) */ |
847 | cpu_core_id[cpu] = phys_proc_id[cpu] & ((1 << bits)-1); | 866 | cpu_core_id[cpu] = phys_proc_id[cpu] & ((1 << bits)-1); |
848 | /* Convert the APIC ID into the socket ID */ | 867 | /* Convert the APIC ID into the socket ID */ |
849 | phys_proc_id[cpu] >>= bits; | 868 | phys_proc_id[cpu] = phys_pkg_id(bits); |
850 | 869 | ||
851 | #ifdef CONFIG_NUMA | 870 | #ifdef CONFIG_NUMA |
852 | node = phys_proc_id[cpu]; | 871 | node = phys_proc_id[cpu]; |
@@ -872,8 +891,8 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) | |||
872 | } | 891 | } |
873 | numa_set_node(cpu, node); | 892 | numa_set_node(cpu, node); |
874 | 893 | ||
875 | printk(KERN_INFO "CPU %d(%d) -> Node %d -> Core %d\n", | 894 | printk(KERN_INFO "CPU %d/%x(%d) -> Node %d -> Core %d\n", |
876 | cpu, c->x86_max_cores, node, cpu_core_id[cpu]); | 895 | cpu, apicid, c->x86_max_cores, node, cpu_core_id[cpu]); |
877 | #endif | 896 | #endif |
878 | #endif | 897 | #endif |
879 | } | 898 | } |
@@ -927,8 +946,6 @@ static int __init init_amd(struct cpuinfo_x86 *c) | |||
927 | 946 | ||
928 | if (c->extended_cpuid_level >= 0x80000008) { | 947 | if (c->extended_cpuid_level >= 0x80000008) { |
929 | c->x86_max_cores = (cpuid_ecx(0x80000008) & 0xff) + 1; | 948 | c->x86_max_cores = (cpuid_ecx(0x80000008) & 0xff) + 1; |
930 | if (c->x86_max_cores & (c->x86_max_cores - 1)) | ||
931 | c->x86_max_cores = 1; | ||
932 | 949 | ||
933 | amd_detect_cmp(c); | 950 | amd_detect_cmp(c); |
934 | } | 951 | } |
@@ -1261,7 +1278,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1261 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 1278 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
1262 | 1279 | ||
1263 | /* Intel-defined (#2) */ | 1280 | /* Intel-defined (#2) */ |
1264 | "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", NULL, "est", | 1281 | "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est", |
1265 | "tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL, | 1282 | "tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL, |
1266 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 1283 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
1267 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 1284 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
@@ -1344,8 +1361,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1344 | { | 1361 | { |
1345 | int i; | 1362 | int i; |
1346 | for ( i = 0 ; i < 32*NCAPINTS ; i++ ) | 1363 | for ( i = 0 ; i < 32*NCAPINTS ; i++ ) |
1347 | if ( test_bit(i, &c->x86_capability) && | 1364 | if (cpu_has(c, i) && x86_cap_flags[i] != NULL) |
1348 | x86_cap_flags[i] != NULL ) | ||
1349 | seq_printf(m, " %s", x86_cap_flags[i]); | 1365 | seq_printf(m, " %s", x86_cap_flags[i]); |
1350 | } | 1366 | } |
1351 | 1367 | ||
@@ -1403,10 +1419,3 @@ struct seq_operations cpuinfo_op = { | |||
1403 | .show = show_cpuinfo, | 1419 | .show = show_cpuinfo, |
1404 | }; | 1420 | }; |
1405 | 1421 | ||
1406 | static int __init run_dmi_scan(void) | ||
1407 | { | ||
1408 | dmi_scan_machine(); | ||
1409 | return 0; | ||
1410 | } | ||
1411 | core_initcall(run_dmi_scan); | ||
1412 | |||
diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c index 70f1bb808a20..eabdb63fec31 100644 --- a/arch/x86_64/kernel/setup64.c +++ b/arch/x86_64/kernel/setup64.c | |||
@@ -33,7 +33,7 @@ cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; | |||
33 | struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly; | 33 | struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly; |
34 | struct x8664_pda boot_cpu_pda[NR_CPUS] __cacheline_aligned; | 34 | struct x8664_pda boot_cpu_pda[NR_CPUS] __cacheline_aligned; |
35 | 35 | ||
36 | struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table }; | 36 | struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table }; |
37 | 37 | ||
38 | char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned"))); | 38 | char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned"))); |
39 | 39 | ||
@@ -59,7 +59,7 @@ int __init nonx_setup(char *str) | |||
59 | } | 59 | } |
60 | __setup("noexec=", nonx_setup); /* parsed early actually */ | 60 | __setup("noexec=", nonx_setup); /* parsed early actually */ |
61 | 61 | ||
62 | int force_personality32 = READ_IMPLIES_EXEC; | 62 | int force_personality32 = 0; |
63 | 63 | ||
64 | /* noexec32=on|off | 64 | /* noexec32=on|off |
65 | Control non executable heap for 32bit processes. | 65 | Control non executable heap for 32bit processes. |
@@ -248,7 +248,7 @@ void __cpuinit cpu_init (void) | |||
248 | switch (v + 1) { | 248 | switch (v + 1) { |
249 | #if DEBUG_STKSZ > EXCEPTION_STKSZ | 249 | #if DEBUG_STKSZ > EXCEPTION_STKSZ |
250 | case DEBUG_STACK: | 250 | case DEBUG_STACK: |
251 | cpu_pda[cpu].debugstack = (unsigned long)estacks; | 251 | cpu_pda(cpu)->debugstack = (unsigned long)estacks; |
252 | estacks += DEBUG_STKSZ; | 252 | estacks += DEBUG_STKSZ; |
253 | break; | 253 | break; |
254 | #endif | 254 | #endif |
@@ -281,12 +281,12 @@ void __cpuinit cpu_init (void) | |||
281 | * Clear all 6 debug registers: | 281 | * Clear all 6 debug registers: |
282 | */ | 282 | */ |
283 | 283 | ||
284 | set_debug(0UL, 0); | 284 | set_debugreg(0UL, 0); |
285 | set_debug(0UL, 1); | 285 | set_debugreg(0UL, 1); |
286 | set_debug(0UL, 2); | 286 | set_debugreg(0UL, 2); |
287 | set_debug(0UL, 3); | 287 | set_debugreg(0UL, 3); |
288 | set_debug(0UL, 6); | 288 | set_debugreg(0UL, 6); |
289 | set_debug(0UL, 7); | 289 | set_debugreg(0UL, 7); |
290 | 290 | ||
291 | fpu_init(); | 291 | fpu_init(); |
292 | } | 292 | } |
diff --git a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c index 5876df116c92..e5f5ce7909a3 100644 --- a/arch/x86_64/kernel/signal.c +++ b/arch/x86_64/kernel/signal.c | |||
@@ -443,9 +443,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
443 | if (!user_mode(regs)) | 443 | if (!user_mode(regs)) |
444 | return 1; | 444 | return 1; |
445 | 445 | ||
446 | if (try_to_freeze()) | ||
447 | goto no_signal; | ||
448 | |||
449 | if (!oldset) | 446 | if (!oldset) |
450 | oldset = ¤t->blocked; | 447 | oldset = ¤t->blocked; |
451 | 448 | ||
@@ -463,7 +460,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
463 | return handle_signal(signr, &info, &ka, oldset, regs); | 460 | return handle_signal(signr, &info, &ka, oldset, regs); |
464 | } | 461 | } |
465 | 462 | ||
466 | no_signal: | ||
467 | /* Did we come from a system call? */ | 463 | /* Did we come from a system call? */ |
468 | if ((long)regs->orig_rax >= 0) { | 464 | if ((long)regs->orig_rax >= 0) { |
469 | /* Restart the system call - no handlers present */ | 465 | /* Restart the system call - no handlers present */ |
diff --git a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c index 19ef012b1f17..4a6628b14d99 100644 --- a/arch/x86_64/kernel/smp.c +++ b/arch/x86_64/kernel/smp.c | |||
@@ -75,7 +75,7 @@ static inline void leave_mm(int cpu) | |||
75 | { | 75 | { |
76 | if (read_pda(mmu_state) == TLBSTATE_OK) | 76 | if (read_pda(mmu_state) == TLBSTATE_OK) |
77 | BUG(); | 77 | BUG(); |
78 | clear_bit(cpu, &read_pda(active_mm)->cpu_vm_mask); | 78 | cpu_clear(cpu, read_pda(active_mm)->cpu_vm_mask); |
79 | load_cr3(swapper_pg_dir); | 79 | load_cr3(swapper_pg_dir); |
80 | } | 80 | } |
81 | 81 | ||
@@ -85,7 +85,7 @@ static inline void leave_mm(int cpu) | |||
85 | * [cpu0: the cpu that switches] | 85 | * [cpu0: the cpu that switches] |
86 | * 1) switch_mm() either 1a) or 1b) | 86 | * 1) switch_mm() either 1a) or 1b) |
87 | * 1a) thread switch to a different mm | 87 | * 1a) thread switch to a different mm |
88 | * 1a1) clear_bit(cpu, &old_mm->cpu_vm_mask); | 88 | * 1a1) cpu_clear(cpu, old_mm->cpu_vm_mask); |
89 | * Stop ipi delivery for the old mm. This is not synchronized with | 89 | * Stop ipi delivery for the old mm. This is not synchronized with |
90 | * the other cpus, but smp_invalidate_interrupt ignore flush ipis | 90 | * the other cpus, but smp_invalidate_interrupt ignore flush ipis |
91 | * for the wrong mm, and in the worst case we perform a superfluous | 91 | * for the wrong mm, and in the worst case we perform a superfluous |
@@ -95,7 +95,7 @@ static inline void leave_mm(int cpu) | |||
95 | * was in lazy tlb mode. | 95 | * was in lazy tlb mode. |
96 | * 1a3) update cpu active_mm | 96 | * 1a3) update cpu active_mm |
97 | * Now cpu0 accepts tlb flushes for the new mm. | 97 | * Now cpu0 accepts tlb flushes for the new mm. |
98 | * 1a4) set_bit(cpu, &new_mm->cpu_vm_mask); | 98 | * 1a4) cpu_set(cpu, new_mm->cpu_vm_mask); |
99 | * Now the other cpus will send tlb flush ipis. | 99 | * Now the other cpus will send tlb flush ipis. |
100 | * 1a4) change cr3. | 100 | * 1a4) change cr3. |
101 | * 1b) thread switch without mm change | 101 | * 1b) thread switch without mm change |
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 3080f84bf7b7..7f58fa682491 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -88,7 +88,8 @@ static inline unsigned int do_gettimeoffset_tsc(void) | |||
88 | unsigned long t; | 88 | unsigned long t; |
89 | unsigned long x; | 89 | unsigned long x; |
90 | t = get_cycles_sync(); | 90 | t = get_cycles_sync(); |
91 | if (t < vxtime.last_tsc) t = vxtime.last_tsc; /* hack */ | 91 | if (t < vxtime.last_tsc) |
92 | t = vxtime.last_tsc; /* hack */ | ||
92 | x = ((t - vxtime.last_tsc) * vxtime.tsc_quot) >> 32; | 93 | x = ((t - vxtime.last_tsc) * vxtime.tsc_quot) >> 32; |
93 | return x; | 94 | return x; |
94 | } | 95 | } |
@@ -178,8 +179,9 @@ unsigned long profile_pc(struct pt_regs *regs) | |||
178 | { | 179 | { |
179 | unsigned long pc = instruction_pointer(regs); | 180 | unsigned long pc = instruction_pointer(regs); |
180 | 181 | ||
181 | /* Assume the lock function has either no stack frame or only a single word. | 182 | /* Assume the lock function has either no stack frame or only a single |
182 | This checks if the address on the stack looks like a kernel text address. | 183 | word. This checks if the address on the stack looks like a kernel |
184 | text address. | ||
183 | There is a small window for false hits, but in that case the tick | 185 | There is a small window for false hits, but in that case the tick |
184 | is just accounted to the spinlock function. | 186 | is just accounted to the spinlock function. |
185 | Better would be to write these functions in assembler again | 187 | Better would be to write these functions in assembler again |
@@ -242,17 +244,10 @@ static void set_rtc_mmss(unsigned long nowtime) | |||
242 | real_minutes += 30; /* correct for half hour time zone */ | 244 | real_minutes += 30; /* correct for half hour time zone */ |
243 | real_minutes %= 60; | 245 | real_minutes %= 60; |
244 | 246 | ||
245 | #if 0 | ||
246 | /* AMD 8111 is a really bad time keeper and hits this regularly. | ||
247 | It probably was an attempt to avoid screwing up DST, but ignore | ||
248 | that for now. */ | ||
249 | if (abs(real_minutes - cmos_minutes) >= 30) { | 247 | if (abs(real_minutes - cmos_minutes) >= 30) { |
250 | printk(KERN_WARNING "time.c: can't update CMOS clock " | 248 | printk(KERN_WARNING "time.c: can't update CMOS clock " |
251 | "from %d to %d\n", cmos_minutes, real_minutes); | 249 | "from %d to %d\n", cmos_minutes, real_minutes); |
252 | } else | 250 | } else { |
253 | #endif | ||
254 | |||
255 | { | ||
256 | BIN_TO_BCD(real_seconds); | 251 | BIN_TO_BCD(real_seconds); |
257 | BIN_TO_BCD(real_minutes); | 252 | BIN_TO_BCD(real_minutes); |
258 | CMOS_WRITE(real_seconds, RTC_SECONDS); | 253 | CMOS_WRITE(real_seconds, RTC_SECONDS); |
@@ -293,8 +288,7 @@ unsigned long long monotonic_clock(void) | |||
293 | this_offset = hpet_readl(HPET_COUNTER); | 288 | this_offset = hpet_readl(HPET_COUNTER); |
294 | } while (read_seqretry(&xtime_lock, seq)); | 289 | } while (read_seqretry(&xtime_lock, seq)); |
295 | offset = (this_offset - last_offset); | 290 | offset = (this_offset - last_offset); |
296 | offset *=(NSEC_PER_SEC/HZ)/hpet_tick; | 291 | offset *= (NSEC_PER_SEC/HZ) / hpet_tick; |
297 | return base + offset; | ||
298 | } else { | 292 | } else { |
299 | do { | 293 | do { |
300 | seq = read_seqbegin(&xtime_lock); | 294 | seq = read_seqbegin(&xtime_lock); |
@@ -303,50 +297,46 @@ unsigned long long monotonic_clock(void) | |||
303 | base = monotonic_base; | 297 | base = monotonic_base; |
304 | } while (read_seqretry(&xtime_lock, seq)); | 298 | } while (read_seqretry(&xtime_lock, seq)); |
305 | this_offset = get_cycles_sync(); | 299 | this_offset = get_cycles_sync(); |
306 | offset = (this_offset - last_offset)*1000/cpu_khz; | 300 | offset = (this_offset - last_offset)*1000 / cpu_khz; |
307 | return base + offset; | ||
308 | } | 301 | } |
302 | return base + offset; | ||
309 | } | 303 | } |
310 | EXPORT_SYMBOL(monotonic_clock); | 304 | EXPORT_SYMBOL(monotonic_clock); |
311 | 305 | ||
312 | static noinline void handle_lost_ticks(int lost, struct pt_regs *regs) | 306 | static noinline void handle_lost_ticks(int lost, struct pt_regs *regs) |
313 | { | 307 | { |
314 | static long lost_count; | 308 | static long lost_count; |
315 | static int warned; | 309 | static int warned; |
316 | 310 | if (report_lost_ticks) { | |
317 | if (report_lost_ticks) { | 311 | printk(KERN_WARNING "time.c: Lost %d timer tick(s)! ", lost); |
318 | printk(KERN_WARNING "time.c: Lost %d timer " | 312 | print_symbol("rip %s)\n", regs->rip); |
319 | "tick(s)! ", lost); | 313 | } |
320 | print_symbol("rip %s)\n", regs->rip); | 314 | |
321 | } | 315 | if (lost_count == 1000 && !warned) { |
322 | 316 | printk(KERN_WARNING "warning: many lost ticks.\n" | |
323 | if (lost_count == 1000 && !warned) { | 317 | KERN_WARNING "Your time source seems to be instable or " |
324 | printk(KERN_WARNING | ||
325 | "warning: many lost ticks.\n" | ||
326 | KERN_WARNING "Your time source seems to be instable or " | ||
327 | "some driver is hogging interupts\n"); | 318 | "some driver is hogging interupts\n"); |
328 | print_symbol("rip %s\n", regs->rip); | 319 | print_symbol("rip %s\n", regs->rip); |
329 | if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) { | 320 | if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) { |
330 | printk(KERN_WARNING "Falling back to HPET\n"); | 321 | printk(KERN_WARNING "Falling back to HPET\n"); |
331 | if (hpet_use_timer) | 322 | if (hpet_use_timer) |
332 | vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; | 323 | vxtime.last = hpet_readl(HPET_T0_CMP) - |
333 | else | 324 | hpet_tick; |
334 | vxtime.last = hpet_readl(HPET_COUNTER); | 325 | else |
335 | vxtime.mode = VXTIME_HPET; | 326 | vxtime.last = hpet_readl(HPET_COUNTER); |
336 | do_gettimeoffset = do_gettimeoffset_hpet; | 327 | vxtime.mode = VXTIME_HPET; |
337 | } | 328 | do_gettimeoffset = do_gettimeoffset_hpet; |
338 | /* else should fall back to PIT, but code missing. */ | 329 | } |
339 | warned = 1; | 330 | /* else should fall back to PIT, but code missing. */ |
340 | } else | 331 | warned = 1; |
341 | lost_count++; | 332 | } else |
333 | lost_count++; | ||
342 | 334 | ||
343 | #ifdef CONFIG_CPU_FREQ | 335 | #ifdef CONFIG_CPU_FREQ |
344 | /* In some cases the CPU can change frequency without us noticing | 336 | /* In some cases the CPU can change frequency without us noticing |
345 | (like going into thermal throttle) | 337 | Give cpufreq a change to catch up. */ |
346 | Give cpufreq a change to catch up. */ | 338 | if ((lost_count+1) % 25 == 0) |
347 | if ((lost_count+1) % 25 == 0) { | 339 | cpufreq_delayed_get(); |
348 | cpufreq_delayed_get(); | ||
349 | } | ||
350 | #endif | 340 | #endif |
351 | } | 341 | } |
352 | 342 | ||
@@ -354,7 +344,7 @@ void main_timer_handler(struct pt_regs *regs) | |||
354 | { | 344 | { |
355 | static unsigned long rtc_update = 0; | 345 | static unsigned long rtc_update = 0; |
356 | unsigned long tsc; | 346 | unsigned long tsc; |
357 | int delay, offset = 0, lost = 0; | 347 | int delay = 0, offset = 0, lost = 0; |
358 | 348 | ||
359 | /* | 349 | /* |
360 | * Here we are in the timer irq handler. We have irqs locally disabled (so we | 350 | * Here we are in the timer irq handler. We have irqs locally disabled (so we |
@@ -375,7 +365,7 @@ void main_timer_handler(struct pt_regs *regs) | |||
375 | */ | 365 | */ |
376 | offset = hpet_readl(HPET_T0_CMP) - hpet_tick; | 366 | offset = hpet_readl(HPET_T0_CMP) - hpet_tick; |
377 | delay = hpet_readl(HPET_COUNTER) - offset; | 367 | delay = hpet_readl(HPET_COUNTER) - offset; |
378 | } else { | 368 | } else if (!pmtmr_ioport) { |
379 | spin_lock(&i8253_lock); | 369 | spin_lock(&i8253_lock); |
380 | outb_p(0x00, 0x43); | 370 | outb_p(0x00, 0x43); |
381 | delay = inb_p(0x40); | 371 | delay = inb_p(0x40); |
@@ -477,7 +467,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
477 | return IRQ_HANDLED; | 467 | return IRQ_HANDLED; |
478 | } | 468 | } |
479 | 469 | ||
480 | static unsigned int cyc2ns_scale; | 470 | static unsigned int cyc2ns_scale __read_mostly; |
481 | #define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ | 471 | #define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ |
482 | 472 | ||
483 | static inline void set_cyc2ns_scale(unsigned long cpu_khz) | 473 | static inline void set_cyc2ns_scale(unsigned long cpu_khz) |
@@ -517,6 +507,7 @@ static unsigned long get_cmos_time(void) | |||
517 | unsigned int timeout = 1000000, year, mon, day, hour, min, sec; | 507 | unsigned int timeout = 1000000, year, mon, day, hour, min, sec; |
518 | unsigned char uip = 0, this = 0; | 508 | unsigned char uip = 0, this = 0; |
519 | unsigned long flags; | 509 | unsigned long flags; |
510 | unsigned extyear = 0; | ||
520 | 511 | ||
521 | /* | 512 | /* |
522 | * The Linux interpretation of the CMOS clock register contents: When the | 513 | * The Linux interpretation of the CMOS clock register contents: When the |
@@ -545,12 +536,17 @@ static unsigned long get_cmos_time(void) | |||
545 | mon = CMOS_READ(RTC_MONTH); | 536 | mon = CMOS_READ(RTC_MONTH); |
546 | year = CMOS_READ(RTC_YEAR); | 537 | year = CMOS_READ(RTC_YEAR); |
547 | 538 | ||
539 | #ifdef CONFIG_ACPI | ||
540 | if (acpi_fadt.revision >= FADT2_REVISION_ID && acpi_fadt.century) | ||
541 | extyear = CMOS_READ(acpi_fadt.century); | ||
542 | #endif | ||
543 | |||
548 | spin_unlock_irqrestore(&rtc_lock, flags); | 544 | spin_unlock_irqrestore(&rtc_lock, flags); |
549 | 545 | ||
550 | /* | 546 | /* |
551 | * We know that x86-64 always uses BCD format, no need to check the | 547 | * We know that x86-64 always uses BCD format, no need to check the |
552 | * config register. | 548 | * config register. |
553 | */ | 549 | */ |
554 | 550 | ||
555 | BCD_TO_BIN(sec); | 551 | BCD_TO_BIN(sec); |
556 | BCD_TO_BIN(min); | 552 | BCD_TO_BIN(min); |
@@ -559,11 +555,17 @@ static unsigned long get_cmos_time(void) | |||
559 | BCD_TO_BIN(mon); | 555 | BCD_TO_BIN(mon); |
560 | BCD_TO_BIN(year); | 556 | BCD_TO_BIN(year); |
561 | 557 | ||
562 | /* | 558 | if (extyear) { |
563 | * x86-64 systems only exists since 2002. | 559 | BCD_TO_BIN(extyear); |
564 | * This will work up to Dec 31, 2100 | 560 | year += extyear; |
565 | */ | 561 | printk(KERN_INFO "Extended CMOS year: %d\n", extyear); |
566 | year += 2000; | 562 | } else { |
563 | /* | ||
564 | * x86-64 systems only exists since 2002. | ||
565 | * This will work up to Dec 31, 2100 | ||
566 | */ | ||
567 | year += 2000; | ||
568 | } | ||
567 | 569 | ||
568 | return mktime(year, mon, day, hour, min, sec); | 570 | return mktime(year, mon, day, hour, min, sec); |
569 | } | 571 | } |
@@ -606,7 +608,8 @@ static void cpufreq_delayed_get(void) | |||
606 | cpufreq_delayed_issched = 1; | 608 | cpufreq_delayed_issched = 1; |
607 | if (!warned) { | 609 | if (!warned) { |
608 | warned = 1; | 610 | warned = 1; |
609 | printk(KERN_DEBUG "Losing some ticks... checking if CPU frequency changed.\n"); | 611 | printk(KERN_DEBUG |
612 | "Losing some ticks... checking if CPU frequency changed.\n"); | ||
610 | } | 613 | } |
611 | schedule_work(&cpufreq_delayed_get_work); | 614 | schedule_work(&cpufreq_delayed_get_work); |
612 | } | 615 | } |
@@ -629,9 +632,9 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | |||
629 | lpj = &dummy; | 632 | lpj = &dummy; |
630 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) | 633 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) |
631 | #ifdef CONFIG_SMP | 634 | #ifdef CONFIG_SMP |
632 | lpj = &cpu_data[freq->cpu].loops_per_jiffy; | 635 | lpj = &cpu_data[freq->cpu].loops_per_jiffy; |
633 | #else | 636 | #else |
634 | lpj = &boot_cpu_data.loops_per_jiffy; | 637 | lpj = &boot_cpu_data.loops_per_jiffy; |
635 | #endif | 638 | #endif |
636 | 639 | ||
637 | if (!ref_freq) { | 640 | if (!ref_freq) { |
@@ -768,9 +771,8 @@ static __init int late_hpet_init(void) | |||
768 | int i; | 771 | int i; |
769 | 772 | ||
770 | hpet = (struct hpet *) fix_to_virt(FIX_HPET_BASE); | 773 | hpet = (struct hpet *) fix_to_virt(FIX_HPET_BASE); |
771 | 774 | timer = &hpet->hpet_timers[2]; | |
772 | for (i = 2, timer = &hpet->hpet_timers[2]; i < ntimer; | 775 | for (i = 2; i < ntimer; timer++, i++) |
773 | timer++, i++) | ||
774 | hd.hd_irq[i] = (timer->hpet_config & | 776 | hd.hd_irq[i] = (timer->hpet_config & |
775 | Tn_INT_ROUTE_CNF_MASK) >> | 777 | Tn_INT_ROUTE_CNF_MASK) >> |
776 | Tn_INT_ROUTE_CNF_SHIFT; | 778 | Tn_INT_ROUTE_CNF_SHIFT; |
@@ -927,8 +929,7 @@ void __init time_init(void) | |||
927 | -xtime.tv_sec, -xtime.tv_nsec); | 929 | -xtime.tv_sec, -xtime.tv_nsec); |
928 | 930 | ||
929 | if (!hpet_init()) | 931 | if (!hpet_init()) |
930 | vxtime_hz = (1000000000000000L + hpet_period / 2) / | 932 | vxtime_hz = (1000000000000000L + hpet_period / 2) / hpet_period; |
931 | hpet_period; | ||
932 | else | 933 | else |
933 | vxtime.hpet_address = 0; | 934 | vxtime.hpet_address = 0; |
934 | 935 | ||
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 28d50dc540e8..7b148309c529 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -47,8 +47,6 @@ | |||
47 | #include <asm/proto.h> | 47 | #include <asm/proto.h> |
48 | #include <asm/nmi.h> | 48 | #include <asm/nmi.h> |
49 | 49 | ||
50 | extern struct gate_struct idt_table[256]; | ||
51 | |||
52 | asmlinkage void divide_error(void); | 50 | asmlinkage void divide_error(void); |
53 | asmlinkage void debug(void); | 51 | asmlinkage void debug(void); |
54 | asmlinkage void nmi(void); | 52 | asmlinkage void nmi(void); |
@@ -78,6 +76,8 @@ int register_die_notifier(struct notifier_block *nb) | |||
78 | { | 76 | { |
79 | int err = 0; | 77 | int err = 0; |
80 | unsigned long flags; | 78 | unsigned long flags; |
79 | |||
80 | vmalloc_sync_all(); | ||
81 | spin_lock_irqsave(&die_notifier_lock, flags); | 81 | spin_lock_irqsave(&die_notifier_lock, flags); |
82 | err = notifier_chain_register(&die_chain, nb); | 82 | err = notifier_chain_register(&die_chain, nb); |
83 | spin_unlock_irqrestore(&die_notifier_lock, flags); | 83 | spin_unlock_irqrestore(&die_notifier_lock, flags); |
@@ -122,7 +122,7 @@ int printk_address(unsigned long address) | |||
122 | if (!modname) | 122 | if (!modname) |
123 | modname = delim = ""; | 123 | modname = delim = ""; |
124 | return printk("<%016lx>{%s%s%s%s%+ld}", | 124 | return printk("<%016lx>{%s%s%s%s%+ld}", |
125 | address,delim,modname,delim,symname,offset); | 125 | address, delim, modname, delim, symname, offset); |
126 | } | 126 | } |
127 | #else | 127 | #else |
128 | int printk_address(unsigned long address) | 128 | int printk_address(unsigned long address) |
@@ -334,13 +334,12 @@ void show_registers(struct pt_regs *regs) | |||
334 | show_stack(NULL, (unsigned long*)rsp); | 334 | show_stack(NULL, (unsigned long*)rsp); |
335 | 335 | ||
336 | printk("\nCode: "); | 336 | printk("\nCode: "); |
337 | if(regs->rip < PAGE_OFFSET) | 337 | if (regs->rip < PAGE_OFFSET) |
338 | goto bad; | 338 | goto bad; |
339 | 339 | ||
340 | for(i=0;i<20;i++) | 340 | for (i=0; i<20; i++) { |
341 | { | ||
342 | unsigned char c; | 341 | unsigned char c; |
343 | if(__get_user(c, &((unsigned char*)regs->rip)[i])) { | 342 | if (__get_user(c, &((unsigned char*)regs->rip)[i])) { |
344 | bad: | 343 | bad: |
345 | printk(" Bad RIP value."); | 344 | printk(" Bad RIP value."); |
346 | break; | 345 | break; |
@@ -479,7 +478,7 @@ static void __kprobes do_trap(int trapnr, int signr, char *str, | |||
479 | printk(KERN_INFO | 478 | printk(KERN_INFO |
480 | "%s[%d] trap %s rip:%lx rsp:%lx error:%lx\n", | 479 | "%s[%d] trap %s rip:%lx rsp:%lx error:%lx\n", |
481 | tsk->comm, tsk->pid, str, | 480 | tsk->comm, tsk->pid, str, |
482 | regs->rip,regs->rsp,error_code); | 481 | regs->rip, regs->rsp, error_code); |
483 | 482 | ||
484 | if (info) | 483 | if (info) |
485 | force_sig_info(signr, info, tsk); | 484 | force_sig_info(signr, info, tsk); |
@@ -493,9 +492,9 @@ static void __kprobes do_trap(int trapnr, int signr, char *str, | |||
493 | { | 492 | { |
494 | const struct exception_table_entry *fixup; | 493 | const struct exception_table_entry *fixup; |
495 | fixup = search_exception_tables(regs->rip); | 494 | fixup = search_exception_tables(regs->rip); |
496 | if (fixup) { | 495 | if (fixup) |
497 | regs->rip = fixup->fixup; | 496 | regs->rip = fixup->fixup; |
498 | } else | 497 | else |
499 | die(str, regs, error_code); | 498 | die(str, regs, error_code); |
500 | return; | 499 | return; |
501 | } | 500 | } |
@@ -568,7 +567,7 @@ asmlinkage void __kprobes do_general_protection(struct pt_regs * regs, | |||
568 | printk(KERN_INFO | 567 | printk(KERN_INFO |
569 | "%s[%d] general protection rip:%lx rsp:%lx error:%lx\n", | 568 | "%s[%d] general protection rip:%lx rsp:%lx error:%lx\n", |
570 | tsk->comm, tsk->pid, | 569 | tsk->comm, tsk->pid, |
571 | regs->rip,regs->rsp,error_code); | 570 | regs->rip, regs->rsp, error_code); |
572 | 571 | ||
573 | force_sig(SIGSEGV, tsk); | 572 | force_sig(SIGSEGV, tsk); |
574 | return; | 573 | return; |
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S index 74db0062d4a2..39ff0708f803 100644 --- a/arch/x86_64/kernel/vmlinux.lds.S +++ b/arch/x86_64/kernel/vmlinux.lds.S | |||
@@ -20,6 +20,12 @@ SECTIONS | |||
20 | phys_startup_64 = startup_64 - LOAD_OFFSET; | 20 | phys_startup_64 = startup_64 - LOAD_OFFSET; |
21 | _text = .; /* Text and read-only data */ | 21 | _text = .; /* Text and read-only data */ |
22 | .text : AT(ADDR(.text) - LOAD_OFFSET) { | 22 | .text : AT(ADDR(.text) - LOAD_OFFSET) { |
23 | /* First the code that has to be first for bootstrapping */ | ||
24 | *(.bootstrap.text) | ||
25 | /* Then all the functions that are "hot" in profiles, to group them | ||
26 | onto the same hugetlb entry */ | ||
27 | #include "functionlist" | ||
28 | /* Then the rest */ | ||
23 | *(.text) | 29 | *(.text) |
24 | SCHED_TEXT | 30 | SCHED_TEXT |
25 | LOCK_TEXT | 31 | LOCK_TEXT |
diff --git a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c index 3496abc8d372..d96a9348e5a2 100644 --- a/arch/x86_64/kernel/x8664_ksyms.c +++ b/arch/x86_64/kernel/x8664_ksyms.c | |||
@@ -124,6 +124,7 @@ extern void * __memcpy(void *,const void *,__kernel_size_t); | |||
124 | 124 | ||
125 | EXPORT_SYMBOL(memset); | 125 | EXPORT_SYMBOL(memset); |
126 | EXPORT_SYMBOL(strlen); | 126 | EXPORT_SYMBOL(strlen); |
127 | EXPORT_SYMBOL(strpbrk); | ||
127 | EXPORT_SYMBOL(memmove); | 128 | EXPORT_SYMBOL(memmove); |
128 | EXPORT_SYMBOL(memcpy); | 129 | EXPORT_SYMBOL(memcpy); |
129 | EXPORT_SYMBOL(__memcpy); | 130 | EXPORT_SYMBOL(__memcpy); |
@@ -143,16 +144,12 @@ EXPORT_SYMBOL(rwsem_down_write_failed_thunk); | |||
143 | EXPORT_SYMBOL(empty_zero_page); | 144 | EXPORT_SYMBOL(empty_zero_page); |
144 | 145 | ||
145 | EXPORT_SYMBOL(die_chain); | 146 | EXPORT_SYMBOL(die_chain); |
146 | EXPORT_SYMBOL(register_die_notifier); | ||
147 | 147 | ||
148 | #ifdef CONFIG_SMP | 148 | #ifdef CONFIG_SMP |
149 | EXPORT_SYMBOL(cpu_sibling_map); | 149 | EXPORT_SYMBOL(cpu_sibling_map); |
150 | EXPORT_SYMBOL(smp_num_siblings); | 150 | EXPORT_SYMBOL(smp_num_siblings); |
151 | #endif | 151 | #endif |
152 | 152 | ||
153 | extern void do_softirq_thunk(void); | ||
154 | EXPORT_SYMBOL(do_softirq_thunk); | ||
155 | |||
156 | #ifdef CONFIG_BUG | 153 | #ifdef CONFIG_BUG |
157 | EXPORT_SYMBOL(out_of_line_bug); | 154 | EXPORT_SYMBOL(out_of_line_bug); |
158 | #endif | 155 | #endif |
diff --git a/arch/x86_64/lib/thunk.S b/arch/x86_64/lib/thunk.S index acc1e2ca7ed7..e49af0032e94 100644 --- a/arch/x86_64/lib/thunk.S +++ b/arch/x86_64/lib/thunk.S | |||
@@ -42,7 +42,6 @@ | |||
42 | thunk rwsem_wake_thunk,rwsem_wake | 42 | thunk rwsem_wake_thunk,rwsem_wake |
43 | thunk rwsem_downgrade_thunk,rwsem_downgrade_wake | 43 | thunk rwsem_downgrade_thunk,rwsem_downgrade_wake |
44 | #endif | 44 | #endif |
45 | thunk do_softirq_thunk,do_softirq | ||
46 | 45 | ||
47 | thunk __down_failed,__down | 46 | thunk __down_failed,__down |
48 | thunk_retrax __down_failed_interruptible,__down_interruptible | 47 | thunk_retrax __down_failed_interruptible,__down_interruptible |
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index 2e7c3c8ffe03..316c53de47bd 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c | |||
@@ -264,6 +264,8 @@ static int vmalloc_fault(unsigned long address) | |||
264 | return -1; | 264 | return -1; |
265 | if (pgd_none(*pgd)) | 265 | if (pgd_none(*pgd)) |
266 | set_pgd(pgd, *pgd_ref); | 266 | set_pgd(pgd, *pgd_ref); |
267 | else | ||
268 | BUG_ON(pgd_page(*pgd) != pgd_page(*pgd_ref)); | ||
267 | 269 | ||
268 | /* Below here mismatches are bugs because these lower tables | 270 | /* Below here mismatches are bugs because these lower tables |
269 | are shared */ | 271 | are shared */ |
@@ -312,21 +314,13 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
312 | unsigned long flags; | 314 | unsigned long flags; |
313 | siginfo_t info; | 315 | siginfo_t info; |
314 | 316 | ||
317 | tsk = current; | ||
318 | mm = tsk->mm; | ||
319 | prefetchw(&mm->mmap_sem); | ||
320 | |||
315 | /* get the address */ | 321 | /* get the address */ |
316 | __asm__("movq %%cr2,%0":"=r" (address)); | 322 | __asm__("movq %%cr2,%0":"=r" (address)); |
317 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, | ||
318 | SIGSEGV) == NOTIFY_STOP) | ||
319 | return; | ||
320 | |||
321 | if (likely(regs->eflags & X86_EFLAGS_IF)) | ||
322 | local_irq_enable(); | ||
323 | 323 | ||
324 | if (unlikely(page_fault_trace)) | ||
325 | printk("pagefault rip:%lx rsp:%lx cs:%lu ss:%lu address %lx error %lx\n", | ||
326 | regs->rip,regs->rsp,regs->cs,regs->ss,address,error_code); | ||
327 | |||
328 | tsk = current; | ||
329 | mm = tsk->mm; | ||
330 | info.si_code = SEGV_MAPERR; | 324 | info.si_code = SEGV_MAPERR; |
331 | 325 | ||
332 | 326 | ||
@@ -351,10 +345,12 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
351 | */ | 345 | */ |
352 | if (!(error_code & (PF_RSVD|PF_USER|PF_PROT)) && | 346 | if (!(error_code & (PF_RSVD|PF_USER|PF_PROT)) && |
353 | ((address >= VMALLOC_START && address < VMALLOC_END))) { | 347 | ((address >= VMALLOC_START && address < VMALLOC_END))) { |
354 | if (vmalloc_fault(address) < 0) | 348 | if (vmalloc_fault(address) >= 0) |
355 | goto bad_area_nosemaphore; | 349 | return; |
356 | return; | ||
357 | } | 350 | } |
351 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, | ||
352 | SIGSEGV) == NOTIFY_STOP) | ||
353 | return; | ||
358 | /* | 354 | /* |
359 | * Don't take the mm semaphore here. If we fixup a prefetch | 355 | * Don't take the mm semaphore here. If we fixup a prefetch |
360 | * fault we could otherwise deadlock. | 356 | * fault we could otherwise deadlock. |
@@ -362,6 +358,17 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
362 | goto bad_area_nosemaphore; | 358 | goto bad_area_nosemaphore; |
363 | } | 359 | } |
364 | 360 | ||
361 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, | ||
362 | SIGSEGV) == NOTIFY_STOP) | ||
363 | return; | ||
364 | |||
365 | if (likely(regs->eflags & X86_EFLAGS_IF)) | ||
366 | local_irq_enable(); | ||
367 | |||
368 | if (unlikely(page_fault_trace)) | ||
369 | printk("pagefault rip:%lx rsp:%lx cs:%lu ss:%lu address %lx error %lx\n", | ||
370 | regs->rip,regs->rsp,regs->cs,regs->ss,address,error_code); | ||
371 | |||
365 | if (unlikely(error_code & PF_RSVD)) | 372 | if (unlikely(error_code & PF_RSVD)) |
366 | pgtable_bad(address, regs, error_code); | 373 | pgtable_bad(address, regs, error_code); |
367 | 374 | ||
@@ -571,6 +578,48 @@ do_sigbus: | |||
571 | return; | 578 | return; |
572 | } | 579 | } |
573 | 580 | ||
581 | DEFINE_SPINLOCK(pgd_lock); | ||
582 | struct page *pgd_list; | ||
583 | |||
584 | void vmalloc_sync_all(void) | ||
585 | { | ||
586 | /* Note that races in the updates of insync and start aren't | ||
587 | problematic: | ||
588 | insync can only get set bits added, and updates to start are only | ||
589 | improving performance (without affecting correctness if undone). */ | ||
590 | static DECLARE_BITMAP(insync, PTRS_PER_PGD); | ||
591 | static unsigned long start = VMALLOC_START & PGDIR_MASK; | ||
592 | unsigned long address; | ||
593 | |||
594 | for (address = start; address <= VMALLOC_END; address += PGDIR_SIZE) { | ||
595 | if (!test_bit(pgd_index(address), insync)) { | ||
596 | const pgd_t *pgd_ref = pgd_offset_k(address); | ||
597 | struct page *page; | ||
598 | |||
599 | if (pgd_none(*pgd_ref)) | ||
600 | continue; | ||
601 | spin_lock(&pgd_lock); | ||
602 | for (page = pgd_list; page; | ||
603 | page = (struct page *)page->index) { | ||
604 | pgd_t *pgd; | ||
605 | pgd = (pgd_t *)page_address(page) + pgd_index(address); | ||
606 | if (pgd_none(*pgd)) | ||
607 | set_pgd(pgd, *pgd_ref); | ||
608 | else | ||
609 | BUG_ON(pgd_page(*pgd) != pgd_page(*pgd_ref)); | ||
610 | } | ||
611 | spin_unlock(&pgd_lock); | ||
612 | set_bit(pgd_index(address), insync); | ||
613 | } | ||
614 | if (address == start) | ||
615 | start = address + PGDIR_SIZE; | ||
616 | } | ||
617 | /* Check that there is no need to do the same for the modules area. */ | ||
618 | BUILD_BUG_ON(!(MODULES_VADDR > __START_KERNEL)); | ||
619 | BUILD_BUG_ON(!(((MODULES_END - 1) & PGDIR_MASK) == | ||
620 | (__START_KERNEL & PGDIR_MASK))); | ||
621 | } | ||
622 | |||
574 | static int __init enable_pagefaulttrace(char *str) | 623 | static int __init enable_pagefaulttrace(char *str) |
575 | { | 624 | { |
576 | page_fault_trace = 1; | 625 | page_fault_trace = 1; |
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 7af1742aa958..b04415625442 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c | |||
@@ -94,7 +94,7 @@ void show_mem(void) | |||
94 | 94 | ||
95 | int after_bootmem; | 95 | int after_bootmem; |
96 | 96 | ||
97 | static void *spp_getpage(void) | 97 | static __init void *spp_getpage(void) |
98 | { | 98 | { |
99 | void *ptr; | 99 | void *ptr; |
100 | if (after_bootmem) | 100 | if (after_bootmem) |
@@ -108,7 +108,7 @@ static void *spp_getpage(void) | |||
108 | return ptr; | 108 | return ptr; |
109 | } | 109 | } |
110 | 110 | ||
111 | static void set_pte_phys(unsigned long vaddr, | 111 | static __init void set_pte_phys(unsigned long vaddr, |
112 | unsigned long phys, pgprot_t prot) | 112 | unsigned long phys, pgprot_t prot) |
113 | { | 113 | { |
114 | pgd_t *pgd; | 114 | pgd_t *pgd; |
@@ -157,7 +157,8 @@ static void set_pte_phys(unsigned long vaddr, | |||
157 | } | 157 | } |
158 | 158 | ||
159 | /* NOTE: this is meant to be run only at boot */ | 159 | /* NOTE: this is meant to be run only at boot */ |
160 | void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t prot) | 160 | void __init |
161 | __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t prot) | ||
161 | { | 162 | { |
162 | unsigned long address = __fix_to_virt(idx); | 163 | unsigned long address = __fix_to_virt(idx); |
163 | 164 | ||
@@ -225,6 +226,33 @@ static __meminit void unmap_low_page(int i) | |||
225 | ti->allocated = 0; | 226 | ti->allocated = 0; |
226 | } | 227 | } |
227 | 228 | ||
229 | /* Must run before zap_low_mappings */ | ||
230 | __init void *early_ioremap(unsigned long addr, unsigned long size) | ||
231 | { | ||
232 | unsigned long map = round_down(addr, LARGE_PAGE_SIZE); | ||
233 | |||
234 | /* actually usually some more */ | ||
235 | if (size >= LARGE_PAGE_SIZE) { | ||
236 | printk("SMBIOS area too long %lu\n", size); | ||
237 | return NULL; | ||
238 | } | ||
239 | set_pmd(temp_mappings[0].pmd, __pmd(map | _KERNPG_TABLE | _PAGE_PSE)); | ||
240 | map += LARGE_PAGE_SIZE; | ||
241 | set_pmd(temp_mappings[1].pmd, __pmd(map | _KERNPG_TABLE | _PAGE_PSE)); | ||
242 | __flush_tlb(); | ||
243 | return temp_mappings[0].address + (addr & (LARGE_PAGE_SIZE-1)); | ||
244 | } | ||
245 | |||
246 | /* To avoid virtual aliases later */ | ||
247 | __init void early_iounmap(void *addr, unsigned long size) | ||
248 | { | ||
249 | if ((void *)round_down((unsigned long)addr, LARGE_PAGE_SIZE) != temp_mappings[0].address) | ||
250 | printk("early_iounmap: bad address %p\n", addr); | ||
251 | set_pmd(temp_mappings[0].pmd, __pmd(0)); | ||
252 | set_pmd(temp_mappings[1].pmd, __pmd(0)); | ||
253 | __flush_tlb(); | ||
254 | } | ||
255 | |||
228 | static void __meminit | 256 | static void __meminit |
229 | phys_pmd_init(pmd_t *pmd, unsigned long address, unsigned long end) | 257 | phys_pmd_init(pmd_t *pmd, unsigned long address, unsigned long end) |
230 | { | 258 | { |
@@ -344,7 +372,7 @@ void __meminit init_memory_mapping(unsigned long start, unsigned long end) | |||
344 | pud_t *pud; | 372 | pud_t *pud; |
345 | 373 | ||
346 | if (after_bootmem) | 374 | if (after_bootmem) |
347 | pud = pud_offset_k(pgd, __PAGE_OFFSET); | 375 | pud = pud_offset_k(pgd, start & PGDIR_MASK); |
348 | else | 376 | else |
349 | pud = alloc_low_page(&map, &pud_phys); | 377 | pud = alloc_low_page(&map, &pud_phys); |
350 | 378 | ||
@@ -486,7 +514,7 @@ void __init clear_kernel_mapping(unsigned long address, unsigned long size) | |||
486 | void online_page(struct page *page) | 514 | void online_page(struct page *page) |
487 | { | 515 | { |
488 | ClearPageReserved(page); | 516 | ClearPageReserved(page); |
489 | set_page_count(page, 1); | 517 | init_page_count(page); |
490 | __free_page(page); | 518 | __free_page(page); |
491 | totalram_pages++; | 519 | totalram_pages++; |
492 | num_physpages++; | 520 | num_physpages++; |
@@ -592,7 +620,7 @@ void free_initmem(void) | |||
592 | addr = (unsigned long)(&__init_begin); | 620 | addr = (unsigned long)(&__init_begin); |
593 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 621 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
594 | ClearPageReserved(virt_to_page(addr)); | 622 | ClearPageReserved(virt_to_page(addr)); |
595 | set_page_count(virt_to_page(addr), 1); | 623 | init_page_count(virt_to_page(addr)); |
596 | memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE); | 624 | memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE); |
597 | free_page(addr); | 625 | free_page(addr); |
598 | totalram_pages++; | 626 | totalram_pages++; |
@@ -632,7 +660,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
632 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | 660 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); |
633 | for (; start < end; start += PAGE_SIZE) { | 661 | for (; start < end; start += PAGE_SIZE) { |
634 | ClearPageReserved(virt_to_page(start)); | 662 | ClearPageReserved(virt_to_page(start)); |
635 | set_page_count(virt_to_page(start), 1); | 663 | init_page_count(virt_to_page(start)); |
636 | free_page(start); | 664 | free_page(start); |
637 | totalram_pages++; | 665 | totalram_pages++; |
638 | } | 666 | } |
diff --git a/arch/x86_64/mm/k8topology.c b/arch/x86_64/mm/k8topology.c index dd60e71fdba6..7c45c2d2b8b2 100644 --- a/arch/x86_64/mm/k8topology.c +++ b/arch/x86_64/mm/k8topology.c | |||
@@ -43,7 +43,7 @@ static __init int find_northbridge(void) | |||
43 | int __init k8_scan_nodes(unsigned long start, unsigned long end) | 43 | int __init k8_scan_nodes(unsigned long start, unsigned long end) |
44 | { | 44 | { |
45 | unsigned long prevbase; | 45 | unsigned long prevbase; |
46 | struct node nodes[8]; | 46 | struct bootnode nodes[8]; |
47 | int nodeid, i, nb; | 47 | int nodeid, i, nb; |
48 | unsigned char nodeids[8]; | 48 | unsigned char nodeids[8]; |
49 | int found = 0; | 49 | int found = 0; |
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c index 22e51beee8d3..63c72641b737 100644 --- a/arch/x86_64/mm/numa.c +++ b/arch/x86_64/mm/numa.c | |||
@@ -25,8 +25,7 @@ | |||
25 | struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; | 25 | struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; |
26 | bootmem_data_t plat_node_bdata[MAX_NUMNODES]; | 26 | bootmem_data_t plat_node_bdata[MAX_NUMNODES]; |
27 | 27 | ||
28 | int memnode_shift; | 28 | struct memnode memnode; |
29 | u8 memnodemap[NODEMAPSIZE]; | ||
30 | 29 | ||
31 | unsigned char cpu_to_node[NR_CPUS] __read_mostly = { | 30 | unsigned char cpu_to_node[NR_CPUS] __read_mostly = { |
32 | [0 ... NR_CPUS-1] = NUMA_NO_NODE | 31 | [0 ... NR_CPUS-1] = NUMA_NO_NODE |
@@ -47,7 +46,7 @@ int numa_off __initdata; | |||
47 | * -1 if node overlap or lost ram (shift too big) | 46 | * -1 if node overlap or lost ram (shift too big) |
48 | */ | 47 | */ |
49 | static int __init | 48 | static int __init |
50 | populate_memnodemap(const struct node *nodes, int numnodes, int shift) | 49 | populate_memnodemap(const struct bootnode *nodes, int numnodes, int shift) |
51 | { | 50 | { |
52 | int i; | 51 | int i; |
53 | int res = -1; | 52 | int res = -1; |
@@ -74,7 +73,7 @@ populate_memnodemap(const struct node *nodes, int numnodes, int shift) | |||
74 | return res; | 73 | return res; |
75 | } | 74 | } |
76 | 75 | ||
77 | int __init compute_hash_shift(struct node *nodes, int numnodes) | 76 | int __init compute_hash_shift(struct bootnode *nodes, int numnodes) |
78 | { | 77 | { |
79 | int shift = 20; | 78 | int shift = 20; |
80 | 79 | ||
@@ -149,7 +148,7 @@ void __init setup_node_bootmem(int nodeid, unsigned long start, unsigned long en | |||
149 | /* Initialize final allocator for a zone */ | 148 | /* Initialize final allocator for a zone */ |
150 | void __init setup_node_zones(int nodeid) | 149 | void __init setup_node_zones(int nodeid) |
151 | { | 150 | { |
152 | unsigned long start_pfn, end_pfn; | 151 | unsigned long start_pfn, end_pfn, memmapsize, limit; |
153 | unsigned long zones[MAX_NR_ZONES]; | 152 | unsigned long zones[MAX_NR_ZONES]; |
154 | unsigned long holes[MAX_NR_ZONES]; | 153 | unsigned long holes[MAX_NR_ZONES]; |
155 | 154 | ||
@@ -159,6 +158,16 @@ void __init setup_node_zones(int nodeid) | |||
159 | Dprintk(KERN_INFO "Setting up node %d %lx-%lx\n", | 158 | Dprintk(KERN_INFO "Setting up node %d %lx-%lx\n", |
160 | nodeid, start_pfn, end_pfn); | 159 | nodeid, start_pfn, end_pfn); |
161 | 160 | ||
161 | /* Try to allocate mem_map at end to not fill up precious <4GB | ||
162 | memory. */ | ||
163 | memmapsize = sizeof(struct page) * (end_pfn-start_pfn); | ||
164 | limit = end_pfn << PAGE_SHIFT; | ||
165 | NODE_DATA(nodeid)->node_mem_map = | ||
166 | __alloc_bootmem_core(NODE_DATA(nodeid)->bdata, | ||
167 | memmapsize, SMP_CACHE_BYTES, | ||
168 | round_down(limit - memmapsize, PAGE_SIZE), | ||
169 | limit); | ||
170 | |||
162 | size_zones(zones, holes, start_pfn, end_pfn); | 171 | size_zones(zones, holes, start_pfn, end_pfn); |
163 | free_area_init_node(nodeid, NODE_DATA(nodeid), zones, | 172 | free_area_init_node(nodeid, NODE_DATA(nodeid), zones, |
164 | start_pfn, holes); | 173 | start_pfn, holes); |
@@ -191,7 +200,7 @@ int numa_fake __initdata = 0; | |||
191 | static int numa_emulation(unsigned long start_pfn, unsigned long end_pfn) | 200 | static int numa_emulation(unsigned long start_pfn, unsigned long end_pfn) |
192 | { | 201 | { |
193 | int i; | 202 | int i; |
194 | struct node nodes[MAX_NUMNODES]; | 203 | struct bootnode nodes[MAX_NUMNODES]; |
195 | unsigned long sz = ((end_pfn - start_pfn)<<PAGE_SHIFT) / numa_fake; | 204 | unsigned long sz = ((end_pfn - start_pfn)<<PAGE_SHIFT) / numa_fake; |
196 | 205 | ||
197 | /* Kludge needed for the hash function */ | 206 | /* Kludge needed for the hash function */ |
@@ -357,8 +366,7 @@ void __init init_cpu_to_node(void) | |||
357 | 366 | ||
358 | EXPORT_SYMBOL(cpu_to_node); | 367 | EXPORT_SYMBOL(cpu_to_node); |
359 | EXPORT_SYMBOL(node_to_cpumask); | 368 | EXPORT_SYMBOL(node_to_cpumask); |
360 | EXPORT_SYMBOL(memnode_shift); | 369 | EXPORT_SYMBOL(memnode); |
361 | EXPORT_SYMBOL(memnodemap); | ||
362 | EXPORT_SYMBOL(node_data); | 370 | EXPORT_SYMBOL(node_data); |
363 | 371 | ||
364 | #ifdef CONFIG_DISCONTIGMEM | 372 | #ifdef CONFIG_DISCONTIGMEM |
diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c index 35f1f1aab063..531ad21447b1 100644 --- a/arch/x86_64/mm/pageattr.c +++ b/arch/x86_64/mm/pageattr.c | |||
@@ -45,6 +45,13 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot, | |||
45 | pte_t *pbase; | 45 | pte_t *pbase; |
46 | if (!base) | 46 | if (!base) |
47 | return NULL; | 47 | return NULL; |
48 | /* | ||
49 | * page_private is used to track the number of entries in | ||
50 | * the page table page have non standard attributes. | ||
51 | */ | ||
52 | SetPagePrivate(base); | ||
53 | page_private(base) = 0; | ||
54 | |||
48 | address = __pa(address); | 55 | address = __pa(address); |
49 | addr = address & LARGE_PAGE_MASK; | 56 | addr = address & LARGE_PAGE_MASK; |
50 | pbase = (pte_t *)page_address(base); | 57 | pbase = (pte_t *)page_address(base); |
@@ -77,26 +84,12 @@ static inline void flush_map(unsigned long address) | |||
77 | on_each_cpu(flush_kernel_map, (void *)address, 1, 1); | 84 | on_each_cpu(flush_kernel_map, (void *)address, 1, 1); |
78 | } | 85 | } |
79 | 86 | ||
80 | struct deferred_page { | 87 | static struct page *deferred_pages; /* protected by init_mm.mmap_sem */ |
81 | struct deferred_page *next; | ||
82 | struct page *fpage; | ||
83 | unsigned long address; | ||
84 | }; | ||
85 | static struct deferred_page *df_list; /* protected by init_mm.mmap_sem */ | ||
86 | 88 | ||
87 | static inline void save_page(unsigned long address, struct page *fpage) | 89 | static inline void save_page(struct page *fpage) |
88 | { | 90 | { |
89 | struct deferred_page *df; | 91 | fpage->lru.next = (struct list_head *)deferred_pages; |
90 | df = kmalloc(sizeof(struct deferred_page), GFP_KERNEL); | 92 | deferred_pages = fpage; |
91 | if (!df) { | ||
92 | flush_map(address); | ||
93 | __free_page(fpage); | ||
94 | } else { | ||
95 | df->next = df_list; | ||
96 | df->fpage = fpage; | ||
97 | df->address = address; | ||
98 | df_list = df; | ||
99 | } | ||
100 | } | 93 | } |
101 | 94 | ||
102 | /* | 95 | /* |
@@ -138,8 +131,8 @@ __change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot, | |||
138 | set_pte(kpte, pfn_pte(pfn, prot)); | 131 | set_pte(kpte, pfn_pte(pfn, prot)); |
139 | } else { | 132 | } else { |
140 | /* | 133 | /* |
141 | * split_large_page will take the reference for this change_page_attr | 134 | * split_large_page will take the reference for this |
142 | * on the split page. | 135 | * change_page_attr on the split page. |
143 | */ | 136 | */ |
144 | 137 | ||
145 | struct page *split; | 138 | struct page *split; |
@@ -151,23 +144,20 @@ __change_page_attr(unsigned long address, unsigned long pfn, pgprot_t prot, | |||
151 | set_pte(kpte,mk_pte(split, ref_prot2)); | 144 | set_pte(kpte,mk_pte(split, ref_prot2)); |
152 | kpte_page = split; | 145 | kpte_page = split; |
153 | } | 146 | } |
154 | get_page(kpte_page); | 147 | page_private(kpte_page)++; |
155 | } else if ((kpte_flags & _PAGE_PSE) == 0) { | 148 | } else if ((kpte_flags & _PAGE_PSE) == 0) { |
156 | set_pte(kpte, pfn_pte(pfn, ref_prot)); | 149 | set_pte(kpte, pfn_pte(pfn, ref_prot)); |
157 | __put_page(kpte_page); | 150 | BUG_ON(page_private(kpte_page) == 0); |
151 | page_private(kpte_page)--; | ||
158 | } else | 152 | } else |
159 | BUG(); | 153 | BUG(); |
160 | 154 | ||
161 | /* on x86-64 the direct mapping set at boot is not using 4k pages */ | 155 | /* on x86-64 the direct mapping set at boot is not using 4k pages */ |
162 | BUG_ON(PageReserved(kpte_page)); | 156 | BUG_ON(PageReserved(kpte_page)); |
163 | 157 | ||
164 | switch (page_count(kpte_page)) { | 158 | if (page_private(kpte_page) == 0) { |
165 | case 1: | 159 | save_page(kpte_page); |
166 | save_page(address, kpte_page); | ||
167 | revert_page(address, ref_prot); | 160 | revert_page(address, ref_prot); |
168 | break; | ||
169 | case 0: | ||
170 | BUG(); /* memleak and failed 2M page regeneration */ | ||
171 | } | 161 | } |
172 | return 0; | 162 | return 0; |
173 | } | 163 | } |
@@ -220,17 +210,18 @@ int change_page_attr(struct page *page, int numpages, pgprot_t prot) | |||
220 | 210 | ||
221 | void global_flush_tlb(void) | 211 | void global_flush_tlb(void) |
222 | { | 212 | { |
223 | struct deferred_page *df, *next_df; | 213 | struct page *dpage; |
224 | 214 | ||
225 | down_read(&init_mm.mmap_sem); | 215 | down_read(&init_mm.mmap_sem); |
226 | df = xchg(&df_list, NULL); | 216 | dpage = xchg(&deferred_pages, NULL); |
227 | up_read(&init_mm.mmap_sem); | 217 | up_read(&init_mm.mmap_sem); |
228 | flush_map((df && !df->next) ? df->address : 0); | 218 | |
229 | for (; df; df = next_df) { | 219 | flush_map((dpage && !dpage->lru.next) ? (unsigned long)page_address(dpage) : 0); |
230 | next_df = df->next; | 220 | while (dpage) { |
231 | if (df->fpage) | 221 | struct page *tmp = dpage; |
232 | __free_page(df->fpage); | 222 | dpage = (struct page *)dpage->lru.next; |
233 | kfree(df); | 223 | ClearPagePrivate(tmp); |
224 | __free_page(tmp); | ||
234 | } | 225 | } |
235 | } | 226 | } |
236 | 227 | ||
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c index 482c25767369..2eb879590dc4 100644 --- a/arch/x86_64/mm/srat.c +++ b/arch/x86_64/mm/srat.c | |||
@@ -23,7 +23,7 @@ static struct acpi_table_slit *acpi_slit; | |||
23 | 23 | ||
24 | static nodemask_t nodes_parsed __initdata; | 24 | static nodemask_t nodes_parsed __initdata; |
25 | static nodemask_t nodes_found __initdata; | 25 | static nodemask_t nodes_found __initdata; |
26 | static struct node nodes[MAX_NUMNODES] __initdata; | 26 | static struct bootnode nodes[MAX_NUMNODES] __initdata; |
27 | static u8 pxm2node[256] = { [0 ... 255] = 0xff }; | 27 | static u8 pxm2node[256] = { [0 ... 255] = 0xff }; |
28 | 28 | ||
29 | /* Too small nodes confuse the VM badly. Usually they result | 29 | /* Too small nodes confuse the VM badly. Usually they result |
@@ -57,7 +57,7 @@ static __init int conflicting_nodes(unsigned long start, unsigned long end) | |||
57 | { | 57 | { |
58 | int i; | 58 | int i; |
59 | for_each_node_mask(i, nodes_parsed) { | 59 | for_each_node_mask(i, nodes_parsed) { |
60 | struct node *nd = &nodes[i]; | 60 | struct bootnode *nd = &nodes[i]; |
61 | if (nd->start == nd->end) | 61 | if (nd->start == nd->end) |
62 | continue; | 62 | continue; |
63 | if (nd->end > start && nd->start < end) | 63 | if (nd->end > start && nd->start < end) |
@@ -70,7 +70,7 @@ static __init int conflicting_nodes(unsigned long start, unsigned long end) | |||
70 | 70 | ||
71 | static __init void cutoff_node(int i, unsigned long start, unsigned long end) | 71 | static __init void cutoff_node(int i, unsigned long start, unsigned long end) |
72 | { | 72 | { |
73 | struct node *nd = &nodes[i]; | 73 | struct bootnode *nd = &nodes[i]; |
74 | if (nd->start < start) { | 74 | if (nd->start < start) { |
75 | nd->start = start; | 75 | nd->start = start; |
76 | if (nd->end < nd->start) | 76 | if (nd->end < nd->start) |
@@ -159,7 +159,7 @@ acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa) | |||
159 | void __init | 159 | void __init |
160 | acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) | 160 | acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) |
161 | { | 161 | { |
162 | struct node *nd; | 162 | struct bootnode *nd; |
163 | unsigned long start, end; | 163 | unsigned long start, end; |
164 | int node, pxm; | 164 | int node, pxm; |
165 | int i; | 165 | int i; |
diff --git a/arch/x86_64/pci/Makefile b/arch/x86_64/pci/Makefile index a8f75a2a0f6f..a3f6ad570179 100644 --- a/arch/x86_64/pci/Makefile +++ b/arch/x86_64/pci/Makefile | |||
@@ -7,7 +7,7 @@ CFLAGS += -Iarch/i386/pci | |||
7 | 7 | ||
8 | obj-y := i386.o | 8 | obj-y := i386.o |
9 | obj-$(CONFIG_PCI_DIRECT)+= direct.o | 9 | obj-$(CONFIG_PCI_DIRECT)+= direct.o |
10 | obj-y += fixup.o | 10 | obj-y += fixup.o init.o |
11 | obj-$(CONFIG_ACPI) += acpi.o | 11 | obj-$(CONFIG_ACPI) += acpi.o |
12 | obj-y += legacy.o irq.o common.o | 12 | obj-y += legacy.o irq.o common.o |
13 | # mmconfig has a 64bit special | 13 | # mmconfig has a 64bit special |
@@ -22,3 +22,4 @@ irq-y += ../../i386/pci/irq.o | |||
22 | common-y += ../../i386/pci/common.o | 22 | common-y += ../../i386/pci/common.o |
23 | fixup-y += ../../i386/pci/fixup.o | 23 | fixup-y += ../../i386/pci/fixup.o |
24 | i386-y += ../../i386/pci/i386.o | 24 | i386-y += ../../i386/pci/i386.o |
25 | init-y += ../../i386/pci/init.o | ||
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index 18f371fe37f8..e616500207e4 100644 --- a/arch/x86_64/pci/mmconfig.c +++ b/arch/x86_64/pci/mmconfig.c | |||
@@ -55,7 +55,7 @@ static char __iomem *get_virt(unsigned int seg, unsigned bus) | |||
55 | static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) | 55 | static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) |
56 | { | 56 | { |
57 | char __iomem *addr; | 57 | char __iomem *addr; |
58 | if (seg == 0 && bus == 0 && test_bit(PCI_SLOT(devfn), &fallback_slots)) | 58 | if (seg == 0 && bus == 0 && test_bit(PCI_SLOT(devfn), fallback_slots)) |
59 | return NULL; | 59 | return NULL; |
60 | addr = get_virt(seg, bus); | 60 | addr = get_virt(seg, bus); |
61 | if (!addr) | 61 | if (!addr) |
@@ -143,29 +143,29 @@ static __init void unreachable_devices(void) | |||
143 | continue; | 143 | continue; |
144 | addr = pci_dev_base(0, 0, PCI_DEVFN(i, 0)); | 144 | addr = pci_dev_base(0, 0, PCI_DEVFN(i, 0)); |
145 | if (addr == NULL|| readl(addr) != val1) { | 145 | if (addr == NULL|| readl(addr) != val1) { |
146 | set_bit(i, &fallback_slots); | 146 | set_bit(i, fallback_slots); |
147 | } | 147 | } |
148 | } | 148 | } |
149 | } | 149 | } |
150 | 150 | ||
151 | static int __init pci_mmcfg_init(void) | 151 | void __init pci_mmcfg_init(void) |
152 | { | 152 | { |
153 | int i; | 153 | int i; |
154 | 154 | ||
155 | if ((pci_probe & PCI_PROBE_MMCONF) == 0) | 155 | if ((pci_probe & PCI_PROBE_MMCONF) == 0) |
156 | return 0; | 156 | return; |
157 | 157 | ||
158 | acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); | 158 | acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); |
159 | if ((pci_mmcfg_config_num == 0) || | 159 | if ((pci_mmcfg_config_num == 0) || |
160 | (pci_mmcfg_config == NULL) || | 160 | (pci_mmcfg_config == NULL) || |
161 | (pci_mmcfg_config[0].base_address == 0)) | 161 | (pci_mmcfg_config[0].base_address == 0)) |
162 | return 0; | 162 | return; |
163 | 163 | ||
164 | /* RED-PEN i386 doesn't do _nocache right now */ | 164 | /* RED-PEN i386 doesn't do _nocache right now */ |
165 | pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL); | 165 | pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL); |
166 | if (pci_mmcfg_virt == NULL) { | 166 | if (pci_mmcfg_virt == NULL) { |
167 | printk("PCI: Can not allocate memory for mmconfig structures\n"); | 167 | printk("PCI: Can not allocate memory for mmconfig structures\n"); |
168 | return 0; | 168 | return; |
169 | } | 169 | } |
170 | for (i = 0; i < pci_mmcfg_config_num; ++i) { | 170 | for (i = 0; i < pci_mmcfg_config_num; ++i) { |
171 | pci_mmcfg_virt[i].cfg = &pci_mmcfg_config[i]; | 171 | pci_mmcfg_virt[i].cfg = &pci_mmcfg_config[i]; |
@@ -173,7 +173,7 @@ static int __init pci_mmcfg_init(void) | |||
173 | if (!pci_mmcfg_virt[i].virt) { | 173 | if (!pci_mmcfg_virt[i].virt) { |
174 | printk("PCI: Cannot map mmconfig aperture for segment %d\n", | 174 | printk("PCI: Cannot map mmconfig aperture for segment %d\n", |
175 | pci_mmcfg_config[i].pci_segment_group_number); | 175 | pci_mmcfg_config[i].pci_segment_group_number); |
176 | return 0; | 176 | return; |
177 | } | 177 | } |
178 | printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[i].base_address); | 178 | printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[i].base_address); |
179 | } | 179 | } |
@@ -182,8 +182,4 @@ static int __init pci_mmcfg_init(void) | |||
182 | 182 | ||
183 | raw_pci_ops = &pci_mmcfg; | 183 | raw_pci_ops = &pci_mmcfg; |
184 | pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; | 184 | pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; |
185 | |||
186 | return 0; | ||
187 | } | 185 | } |
188 | |||
189 | arch_initcall(pci_mmcfg_init); | ||
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index 4cbf6d91571f..51f9bed455fa 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -83,9 +83,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
83 | 83 | ||
84 | if (i == 0) { | 84 | if (i == 0) { |
85 | seq_printf(p, " "); | 85 | seq_printf(p, " "); |
86 | for (j=0; j<NR_CPUS; j++) | 86 | for_each_online_cpu(j) |
87 | if (cpu_online(j)) | 87 | seq_printf(p, "CPU%d ",j); |
88 | seq_printf(p, "CPU%d ",j); | ||
89 | seq_putc(p, '\n'); | 88 | seq_putc(p, '\n'); |
90 | } | 89 | } |
91 | 90 | ||
@@ -98,9 +97,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
98 | #ifndef CONFIG_SMP | 97 | #ifndef CONFIG_SMP |
99 | seq_printf(p, "%10u ", kstat_irqs(i)); | 98 | seq_printf(p, "%10u ", kstat_irqs(i)); |
100 | #else | 99 | #else |
101 | for (j = 0; j < NR_CPUS; j++) | 100 | for_each_online_cpu(j) |
102 | if (cpu_online(j)) | 101 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
103 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | ||
104 | #endif | 102 | #endif |
105 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 103 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
106 | seq_printf(p, " %s", action->name); | 104 | seq_printf(p, " %s", action->name); |
@@ -113,9 +111,8 @@ skip: | |||
113 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 111 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
114 | } else if (i == NR_IRQS) { | 112 | } else if (i == NR_IRQS) { |
115 | seq_printf(p, "NMI: "); | 113 | seq_printf(p, "NMI: "); |
116 | for (j = 0; j < NR_CPUS; j++) | 114 | for_each_online_cpu(j) |
117 | if (cpu_online(j)) | 115 | seq_printf(p, "%10u ", nmi_count(j)); |
118 | seq_printf(p, "%10u ", nmi_count(j)); | ||
119 | seq_putc(p, '\n'); | 116 | seq_putc(p, '\n'); |
120 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); | 117 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); |
121 | } | 118 | } |
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index 5a91d6c9e66d..e1be4235f367 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c | |||
@@ -272,7 +272,7 @@ free_reserved_mem(void *start, void *end) | |||
272 | { | 272 | { |
273 | for (; start < end; start += PAGE_SIZE) { | 273 | for (; start < end; start += PAGE_SIZE) { |
274 | ClearPageReserved(virt_to_page(start)); | 274 | ClearPageReserved(virt_to_page(start)); |
275 | set_page_count(virt_to_page(start), 1); | 275 | init_page_count(virt_to_page(start)); |
276 | free_page((unsigned long)start); | 276 | free_page((unsigned long)start); |
277 | totalram_pages++; | 277 | totalram_pages++; |
278 | } | 278 | } |
diff --git a/arch/xtensa/mm/pgtable.c b/arch/xtensa/mm/pgtable.c index e5e119c820e4..7d28914d11cb 100644 --- a/arch/xtensa/mm/pgtable.c +++ b/arch/xtensa/mm/pgtable.c | |||
@@ -14,25 +14,21 @@ | |||
14 | 14 | ||
15 | pte_t* pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | 15 | pte_t* pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) |
16 | { | 16 | { |
17 | pte_t *pte, p; | 17 | pte_t *pte = NULL, *p; |
18 | int color = ADDR_COLOR(address); | 18 | int color = ADDR_COLOR(address); |
19 | int i; | 19 | int i; |
20 | 20 | ||
21 | p = (pte_t*) __get_free_pages(GFP_KERNEL|__GFP_REPEAT, COLOR_ORDER); | 21 | p = (pte_t*) __get_free_pages(GFP_KERNEL|__GFP_REPEAT, COLOR_ORDER); |
22 | 22 | ||
23 | if (likely(p)) { | 23 | if (likely(p)) { |
24 | struct page *page; | 24 | split_page(virt_to_page(p), COLOR_ORDER); |
25 | |||
26 | for (i = 0; i < COLOR_SIZE; i++, p++) { | ||
27 | page = virt_to_page(pte); | ||
28 | |||
29 | set_page_count(page, 1); | ||
30 | ClearPageCompound(page); | ||
31 | 25 | ||
26 | for (i = 0; i < COLOR_SIZE; i++) { | ||
32 | if (ADDR_COLOR(p) == color) | 27 | if (ADDR_COLOR(p) == color) |
33 | pte = p; | 28 | pte = p; |
34 | else | 29 | else |
35 | free_page(p); | 30 | free_page(p); |
31 | p += PTRS_PER_PTE; | ||
36 | } | 32 | } |
37 | clear_page(pte); | 33 | clear_page(pte); |
38 | } | 34 | } |
@@ -49,20 +45,20 @@ int flush; | |||
49 | 45 | ||
50 | struct page* pte_alloc_one(struct mm_struct *mm, unsigned long address) | 46 | struct page* pte_alloc_one(struct mm_struct *mm, unsigned long address) |
51 | { | 47 | { |
52 | struct page *page, p; | 48 | struct page *page = NULL, *p; |
53 | int color = ADDR_COLOR(address); | 49 | int color = ADDR_COLOR(address); |
54 | 50 | ||
55 | p = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER); | 51 | p = alloc_pages(GFP_KERNEL | __GFP_REPEAT, PTE_ORDER); |
56 | 52 | ||
57 | if (likely(p)) { | 53 | if (likely(p)) { |
58 | for (i = 0; i < PAGE_ORDER; i++) { | 54 | split_page(p, COLOR_ORDER); |
59 | set_page_count(p, 1); | ||
60 | ClearPageCompound(p); | ||
61 | 55 | ||
62 | if (PADDR_COLOR(page_address(pg)) == color) | 56 | for (i = 0; i < PAGE_ORDER; i++) { |
57 | if (PADDR_COLOR(page_address(p)) == color) | ||
63 | page = p; | 58 | page = p; |
64 | else | 59 | else |
65 | free_page(p); | 60 | __free_page(p); |
61 | p++; | ||
66 | } | 62 | } |
67 | clear_highpage(page); | 63 | clear_highpage(page); |
68 | } | 64 | } |
diff --git a/arch/xtensa/platform-iss/console.c b/arch/xtensa/platform-iss/console.c index 94fdfe474ac1..2a580efb58ec 100644 --- a/arch/xtensa/platform-iss/console.c +++ b/arch/xtensa/platform-iss/console.c | |||
@@ -31,10 +31,6 @@ | |||
31 | #include <linux/tty.h> | 31 | #include <linux/tty.h> |
32 | #include <linux/tty_flip.h> | 32 | #include <linux/tty_flip.h> |
33 | 33 | ||
34 | #ifdef SERIAL_INLINE | ||
35 | #define _INLINE_ inline | ||
36 | #endif | ||
37 | |||
38 | #define SERIAL_MAX_NUM_LINES 1 | 34 | #define SERIAL_MAX_NUM_LINES 1 |
39 | #define SERIAL_TIMER_VALUE (20 * HZ) | 35 | #define SERIAL_TIMER_VALUE (20 * HZ) |
40 | 36 | ||